(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[523],{29583:function(e,t,n){"use strict";function r(e,t){var n=t&&t.cache?t.cache:l,r=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:function(e,t){var n,r,s=1===e.length?i:o;return n=t.cache.create(),r=t.serializer,s.bind(this,e,n,r)})(e,{cache:n,serializer:r})}function i(e,t,n,r){var i=null==r||"number"==typeof r||"boolean"==typeof r?r:n(r),o=t.get(i);return void 0===o&&(o=e.call(this,r),t.set(i,o)),o}function o(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}n.r(t),n.d(t,{memoize:function(){return r},strategies:function(){return c}});var s=function(){return JSON.stringify(arguments)};function a(){this.cache=Object.create(null)}a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new a}},c={variadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,o.bind(this,e,n,r)},monadic:function(e,t){var n,r;return n=t.cache.create(),r=t.serializer,i.bind(this,e,n,r)}}},90889:function(e,t,n){"use strict";n.r(t),n.d(t,{ErrorCode:function(){return p},FormatError:function(){return eu},IntlMessageFormat:function(){return ev},InvalidValueError:function(){return eh},InvalidValueTypeError:function(){return ed},MissingValueError:function(){return ep},PART_TYPE:function(){return f},default:function(){return e_},formatToParts:function(){return em},isFormatXMLElementFn:function(){return ef}});var r,i,o,s,a,l,c,u,h,d,p,f,m=function(e,t){return(m=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function _(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return e.type===c.literal}function y(e){return e.type===c.number}function w(e){return e.type===c.date}function E(e){return e.type===c.time}function T(e){return e.type===c.select}function x(e){return e.type===c.plural}function N(e){return e.type===c.tag}function C(e){return!!(e&&"object"==typeof e&&e.type===u.number)}function A(e){return!!(e&&"object"==typeof e&&e.type===u.dateTime)}"function"==typeof SuppressedError&&SuppressedError,(r=l||(l={}))[r.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",r[r.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",r[r.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",r[r.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",r[r.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",r[r.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",r[r.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",r[r.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",r[r.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",r[r.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",r[r.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",r[r.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",r[r.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",r[r.INVALID_TAG=23]="INVALID_TAG",r[r.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",r[r.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",r[r.UNCLOSED_TAG=27]="UNCLOSED_TAG",(i=c||(c={}))[i.literal=0]="literal",i[i.argument=1]="argument",i[i.number=2]="number",i[i.date=3]="date",i[i.time=4]="time",i[i.select=5]="select",i[i.plural=6]="plural",i[i.pound=7]="pound",i[i.tag=8]="tag",(o=u||(u={}))[o.number=0]="number",o[o.dateTime=1]="dateTime";var S=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,j=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,O=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,I=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,L=/^(@+)?(\+|#+)?[rs]?$/g,H=/(\*)(0+)|(#+)(0+)|(0+)/g,k=/^(0+)$/;function B(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(L,function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""}),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function R(e){return P(e)||{}}var M={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},U=new RegExp("^".concat(S.source,"*")),D=new RegExp("".concat(S.source,"*$"));function F(e,t){return{start:e,end:t}}var G=!!String.prototype.startsWith&&"_a".startsWith("a",1),z=!!String.fromCodePoint,$=!!Object.fromEntries,V=!!String.prototype.codePointAt,W=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,X=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},K=!0;try{var q=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");K=(null===(h=q.exec("a"))||void 0===h?void 0:h[0])==="a"}catch(e){K=!1}var Y=G?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},J=z?String.fromCodePoint:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0;i>o;){if((e=t[o++])>1114111)throw RangeError(e+" is not a valid code point");r+=e<65536?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,e%1024+56320)}return r},Q=$?Object.fromEntries:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n],i=r[0],o=r[1];t[i]=o}return t},ee=V?function(e,t){return e.codePointAt(t)}:function(e,t){var n,r=e.length;if(!(t<0)&&!(t>=r)){var i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:(i-55296<<10)+(n-56320)+65536}},et=W?function(e){return e.trimStart()}:function(e){return e.replace(U,"")},en=Z?function(e){return e.trimEnd()}:function(e){return e.replace(D,"")};function er(e,t){return new RegExp(e,t)}if(K){var ei=er("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");d=function(e,t){var n;return ei.lastIndex=t,null!==(n=ei.exec(e)[1])&&void 0!==n?n:""}}else d=function(e,t){for(var n=[];;){var r,i=ee(e,t);if(void 0===i||ea(i)||(r=i)>=33&&r<=35||36===r||r>=37&&r<=39||40===r||41===r||42===r||43===r||44===r||45===r||r>=46&&r<=47||r>=58&&r<=59||r>=60&&r<=62||r>=63&&r<=64||91===r||92===r||93===r||94===r||96===r||123===r||124===r||125===r||126===r||161===r||r>=162&&r<=165||166===r||167===r||169===r||171===r||172===r||174===r||176===r||177===r||182===r||187===r||191===r||215===r||247===r||r>=8208&&r<=8213||r>=8214&&r<=8215||8216===r||8217===r||8218===r||r>=8219&&r<=8220||8221===r||8222===r||8223===r||r>=8224&&r<=8231||r>=8240&&r<=8248||8249===r||8250===r||r>=8251&&r<=8254||r>=8257&&r<=8259||8260===r||8261===r||8262===r||r>=8263&&r<=8273||8274===r||8275===r||r>=8277&&r<=8286||r>=8592&&r<=8596||r>=8597&&r<=8601||r>=8602&&r<=8603||r>=8604&&r<=8607||8608===r||r>=8609&&r<=8610||8611===r||r>=8612&&r<=8613||8614===r||r>=8615&&r<=8621||8622===r||r>=8623&&r<=8653||r>=8654&&r<=8655||r>=8656&&r<=8657||8658===r||8659===r||8660===r||r>=8661&&r<=8691||r>=8692&&r<=8959||r>=8960&&r<=8967||8968===r||8969===r||8970===r||8971===r||r>=8972&&r<=8991||r>=8992&&r<=8993||r>=8994&&r<=9e3||9001===r||9002===r||r>=9003&&r<=9083||9084===r||r>=9085&&r<=9114||r>=9115&&r<=9139||r>=9140&&r<=9179||r>=9180&&r<=9185||r>=9186&&r<=9254||r>=9255&&r<=9279||r>=9280&&r<=9290||r>=9291&&r<=9311||r>=9472&&r<=9654||9655===r||r>=9656&&r<=9664||9665===r||r>=9666&&r<=9719||r>=9720&&r<=9727||r>=9728&&r<=9838||9839===r||r>=9840&&r<=10087||10088===r||10089===r||10090===r||10091===r||10092===r||10093===r||10094===r||10095===r||10096===r||10097===r||10098===r||10099===r||10100===r||10101===r||r>=10132&&r<=10175||r>=10176&&r<=10180||10181===r||10182===r||r>=10183&&r<=10213||10214===r||10215===r||10216===r||10217===r||10218===r||10219===r||10220===r||10221===r||10222===r||10223===r||r>=10224&&r<=10239||r>=10240&&r<=10495||r>=10496&&r<=10626||10627===r||10628===r||10629===r||10630===r||10631===r||10632===r||10633===r||10634===r||10635===r||10636===r||10637===r||10638===r||10639===r||10640===r||10641===r||10642===r||10643===r||10644===r||10645===r||10646===r||10647===r||10648===r||r>=10649&&r<=10711||10712===r||10713===r||10714===r||10715===r||r>=10716&&r<=10747||10748===r||10749===r||r>=10750&&r<=11007||r>=11008&&r<=11055||r>=11056&&r<=11076||r>=11077&&r<=11078||r>=11079&&r<=11084||r>=11085&&r<=11123||r>=11124&&r<=11125||r>=11126&&r<=11157||11158===r||r>=11159&&r<=11263||r>=11776&&r<=11777||11778===r||11779===r||11780===r||11781===r||r>=11782&&r<=11784||11785===r||11786===r||11787===r||11788===r||11789===r||r>=11790&&r<=11798||11799===r||r>=11800&&r<=11801||11802===r||11803===r||11804===r||11805===r||r>=11806&&r<=11807||11808===r||11809===r||11810===r||11811===r||11812===r||11813===r||11814===r||11815===r||11816===r||11817===r||r>=11818&&r<=11822||11823===r||r>=11824&&r<=11833||r>=11834&&r<=11835||r>=11836&&r<=11839||11840===r||11841===r||11842===r||r>=11843&&r<=11855||r>=11856&&r<=11857||11858===r||r>=11859&&r<=11903||r>=12289&&r<=12291||12296===r||12297===r||12298===r||12299===r||12300===r||12301===r||12302===r||12303===r||12304===r||12305===r||r>=12306&&r<=12307||12308===r||12309===r||12310===r||12311===r||12312===r||12313===r||12314===r||12315===r||12316===r||12317===r||r>=12318&&r<=12319||12320===r||12336===r||64830===r||64831===r||r>=65093&&r<=65094)break;n.push(i),t+=i>=65536?2:1}return J.apply(void 0,n)};var eo=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){var o=this.parseArgument(e,n);if(o.err)return o;r.push(o.val)}else if(125===i&&e>0)break;else if(35===i&&("plural"===t||"selectordinal"===t)){var s=this.clonePosition();this.bump(),r.push({type:c.pound,location:F(s,this.clonePosition())})}else if(60!==i||this.ignoreTag||47!==this.peek()){if(60===i&&!this.ignoreTag&&es(this.peek()||0)){var o=this.parseTag(e,t);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(e,t);if(o.err)return o;r.push(o.val)}}else{if(!n)return this.error(l.UNMATCHED_CLOSING_TAG,F(this.clonePosition(),this.clonePosition()));break}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:c.literal,value:"<".concat(r,"/>"),location:F(n,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(l.INVALID_TAG,F(n,this.clonePosition()));var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();if(!this.bumpIf("</"))return this.error(l.UNCLOSED_TAG,F(n,this.clonePosition()));if(this.isEOF()||!es(this.char()))return this.error(l.INVALID_TAG,F(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(l.UNMATCHED_CLOSING_TAG,F(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:c.tag,value:r,children:o,location:F(n,this.clonePosition())},err:null}:this.error(l.INVALID_TAG,F(s,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i){r+=i;continue}var o=this.tryParseUnquoted(e,t);if(o){r+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){r+=s;continue}break}var a=F(n,this.clonePosition());return{val:{type:c.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){var e;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(es(e=this.peek()||0)||47===e)?null:(this.bump(),"<")},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39===this.peek())t.push(39),this.bump();else{this.bump();break}}else t.push(n);this.bump()}return J.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),J(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(l.EMPTY_ARGUMENT,F(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(l.MALFORMED_ARGUMENT,F(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:c.argument,value:r,location:F(n,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(n,this.clonePosition()));return this.parseArgumentOptions(e,t,r,n);default:return this.error(l.MALFORMED_ARGUMENT,F(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=d(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:F(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(l.EXPECT_ARGUMENT_TYPE,F(o,a));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=en(p.val);if(0===f.length)return this.error(l.EXPECT_ARGUMENT_STYLE,F(this.clonePosition(),this.clonePosition()));h={style:f,styleLocation:F(d,this.clonePosition())}}var m=this.tryParseArgumentClose(r);if(m.err)return m;var g=F(r,this.clonePosition());if(h&&Y(null==h?void 0:h.style,"::",0)){var _,b=et(h.style.slice(2));if("number"===s){var p=this.parseNumberSkeletonFromString(b,h.styleLocation);if(p.err)return p;return{val:{type:c.number,value:n,location:g,style:p.val},err:null}}if(0===b.length)return this.error(l.EXPECT_DATE_TIME_SKELETON,g);var y=b;this.locale&&(y=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=function(e){var t,n=e.hourCycle;if(void 0===n&&e.hourCycles&&e.hourCycles.length&&(n=e.hourCycles[0]),n)switch(n){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}var r=e.language;return"root"!==r&&(t=e.maximize().region),(M[t||""]||M[r||""]||M["".concat(r,"-001")]||M["001"])[0]}(t);for(("H"==l||"k"==l)&&(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else"J"===i?n+="H":n+=i}return n}(b,this.locale));var f={type:u.dateTime,pattern:y,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?(_={},y.replace(j,function(e){var t=e.length;switch(e[0]){case"G":_.era=4===t?"long":5===t?"narrow":"short";break;case"y":_.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":_.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":_.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":_.weekday=4===t?"long":5===t?"narrow":"short";break;case"e":if(t<4)throw RangeError("`e..eee` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");_.weekday=["short","long","narrow","short"][t-4];break;case"a":_.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":_.hourCycle="h12",_.hour=["numeric","2-digit"][t-1];break;case"H":_.hourCycle="h23",_.hour=["numeric","2-digit"][t-1];break;case"K":_.hourCycle="h11",_.hour=["numeric","2-digit"][t-1];break;case"k":_.hourCycle="h24",_.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":_.minute=["numeric","2-digit"][t-1];break;case"s":_.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":_.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),_):{}};return{val:{type:"date"===s?c.date:c.time,value:n,location:g,style:f},err:null}}return{val:{type:"number"===s?c.number:"date"===s?c.date:c.time,value:n,location:g,style:null!==(i=null==h?void 0:h.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(l.EXPECT_SELECT_ARGUMENT_OPTIONS,F(w,v({},w)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),T=0;if("select"!==s&&"offset"===E.value){if(!this.bumpIf(":"))return this.error(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,F(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,l.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),E=this.parseIdentifierIfPossible(),T=p.val}var x=this.tryParsePluralOrSelectOptions(e,s,t,E);if(x.err)return x;var m=this.tryParseArgumentClose(r);if(m.err)return m;var N=F(r,this.clonePosition());if("select"===s)return{val:{type:c.select,value:n,options:Q(x.val),location:N},err:null};return{val:{type:c.plural,value:n,options:Q(x.val),offset:T,pluralType:"plural"===s?"cardinal":"ordinal",location:N},err:null};default:return this.error(l.INVALID_ARGUMENT_TYPE,F(o,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(l.EXPECT_ARGUMENT_CLOSING_BRACE,F(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(l.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,F(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");for(var t=e.split(O).filter(function(e){return e.length>0}),n=[],r=0;r<t.length;r++){var i=t[r].split("/");if(0===i.length)throw Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0;a<s.length;a++)if(0===s[a].length)throw Error("Invalid number skeleton");n.push({stem:o,options:s})}return n}(e)}catch(e){return this.error(l.INVALID_NUMBER_SKELETON,t)}return{val:{type:u.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=v(v(v({},t),{notation:"scientific"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"engineering":t=v(v(v({},t),{notation:"engineering"}),r.options.reduce(function(e,t){return v(v({},e),P(t)||{})},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw RangeError("integer-width stems only accept a single optional option");r.options[0].replace(H,function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else if(i&&o)throw Error("We currently do not support maximum integer digits");else if(s)throw Error("We currently do not support exact integer digits");return""});continue}if(k.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(I.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(I,function(e,n,r,i,o,s){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=r.options[0];"w"===i?t=v(v({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=v(v({},t),B(i)));continue}if(L.test(r.stem)){t=v(v({},t),B(r.stem));continue}var o=P(r.stem);o&&(t=v(v({},t),o));var s=function(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!k.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}(r.stem);s&&(t=v(v({},t),s))}return t}(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,o=!1,s=[],a=new Set,c=r.value,u=r.location;;){if(0===c.length){var h=this.clonePosition();if("select"!==t&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(l.EXPECT_PLURAL_ARGUMENT_SELECTOR,l.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;u=F(h,this.clonePosition()),c=this.message.slice(h.offset,this.offset())}else break}if(a.has(c))return this.error("select"===t?l.DUPLICATE_SELECT_ARGUMENT_SELECTOR:l.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===c&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:l.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,F(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var m=this.tryParseArgumentClose(p);if(m.err)return m;s.push([c,{value:f.val,location:F(p,this.clonePosition())}]),a.add(c),this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===s.length?this.error("select"===t?l.EXPECT_SELECT_ARGUMENT_SELECTOR:l.EXPECT_PLURAL_ARGUMENT_SELECTOR,F(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(l.MISSING_OTHER_CLAUSE,F(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,o=10*o+(s-48),this.bump();else break}var a=F(r,this.clonePosition());return i?X(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=ee(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Y(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ea(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function es(e){return e>=97&&e<=122||e>=65&&e<=90}function ea(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function el(e,t){void 0===t&&(t={});var n=new eo(e,t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t)).parse();if(n.err){var r=SyntaxError(l[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach(function(t){if(delete t.location,T(t)||x(t))for(var n in t.options)delete t.options[n].location,e(t.options[n].value);else y(t)&&C(t.style)?delete t.style.location:(w(t)||E(t))&&A(t.style)?delete t.style.location:N(t)&&e(t.children)})}(n.val),n.val}var ec=n(29583);(s=p||(p={})).MISSING_VALUE="MISSING_VALUE",s.INVALID_VALUE="INVALID_VALUE",s.MISSING_INTL_API="MISSING_INTL_API";var eu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return g(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),eh=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),p.INVALID_VALUE,i)||this}return g(t,e),t}(eu),ed=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),p.INVALID_VALUE,r)||this}return g(t,e),t}(eu),ep=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),p.MISSING_VALUE,n)||this}return g(t,e),t}(eu);function ef(e){return"function"==typeof e}function em(e,t,n,r,i,o,s){if(1===e.length&&b(e[0]))return[{type:f.literal,value:e[0].value}];for(var a=[],l=0;l<e.length;l++){var u=e[l];if(b(u)){a.push({type:f.literal,value:u.value});continue}if(u.type===c.pound){"number"==typeof o&&a.push({type:f.literal,value:n.getNumberFormat(t).format(o)});continue}var h=u.value;if(!(i&&h in i))throw new ep(h,s);var d=i[h];if(u.type===c.argument){d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?f.literal:f.object,value:d});continue}if(w(u)){var m="string"==typeof u.style?r.date[u.style]:A(u.style)?u.style.parsedOptions:void 0;a.push({type:f.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(E(u)){var m="string"==typeof u.style?r.time[u.style]:A(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:f.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(y(u)){var m="string"==typeof u.style?r.number[u.style]:C(u.style)?u.style.parsedOptions:void 0;m&&m.scale&&(d*=m.scale||1),a.push({type:f.literal,value:n.getNumberFormat(t,m).format(d)});continue}if(N(u)){var g=u.children,v=u.value,_=i[v];if(!ef(_))throw new ed(v,"function",s);var S=_(em(g,t,n,r,i,o).map(function(e){return e.value}));Array.isArray(S)||(S=[S]),a.push.apply(a,S.map(function(e){return{type:"string"==typeof e?f.literal:f.object,value:e}}))}if(T(u)){var j=u.options[d]||u.options.other;if(!j)throw new eh(u.value,d,Object.keys(u.options),s);a.push.apply(a,em(j.value,t,n,r,i));continue}if(x(u)){var j=u.options["=".concat(d)];if(!j){if(!Intl.PluralRules)throw new eu('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',p.MISSING_INTL_API,s);var O=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));j=u.options[O]||u.options.other}if(!j)throw new eh(u.value,d,Object.keys(u.options),s);a.push.apply(a,em(j.value,t,n,r,i,d-(u.offset||0)));continue}}return a.length<2?a:a.reduce(function(e,t){var n=e[e.length-1];return n&&n.type===f.literal&&t.type===f.literal?n.value+=t.value:e.push(t),e},[])}function eg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}(a=f||(f={}))[a.literal=0]="literal",a[a.object=1]="object";var ev=function(){function e(t,n,r,i){var o,s,a=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce(function(e,t){return e.length&&t.type===f.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e},[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return em(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=a.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var l=i||{},c=(l.formatters,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(l,["formatters"]));this.ast=e.__parse(t,v(v({},c),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=(o=e.formats,r?Object.keys(o).reduce(function(e,t){var n,i;return e[t]=(n=o[t],(i=r[t])?v(v(v({},n||{}),i||{}),Object.keys(n).reduce(function(e,t){return e[t]=v(v({},n[t]),i[t]||{}),e},{})):n),e},v({},o)):o),this.formatters=i&&i.formatters||(void 0===(s=this.formatterCache)&&(s={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.number),strategy:ec.strategies.variadic}),getDateTimeFormat:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.dateTime),strategy:ec.strategies.variadic}),getPluralRules:(0,ec.memoize)(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,_([void 0],t,!1)))},{cache:eg(s.pluralRules),strategy:ec.strategies.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return new Intl.Locale(t.length>0?t[0]:"string"==typeof e?e:e[0])}},e.__parse=el,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),e_=ev},12612:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{default:function(){return s}});var i=n(2265),o=n(54480);function s(e){let{locale:t,...n}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale");return i.createElement(o.P,r({locale:t},n))}},40905:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DOMAttributeNames:function(){return r},default:function(){return s},isEqualNode:function(){return o}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function i(e){let{type:t,props:n}=e,i=document.createElement(t);for(let e in n){if(!n.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===n[e])continue;let o=r[e]||e.toLowerCase();"script"===t&&("async"===o||"defer"===o||"noModule"===o)?i[o]=!!n[e]:i.setAttribute(o,n[e])}let{children:o,dangerouslySetInnerHTML:s}=n;return s?i.innerHTML=s.__html||"":o&&(i.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),i}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){let r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}function s(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let n=t[e.type]||[];n.push(e),t[e.type]=n});let r=t.title?t.title[0]:null,i="";if(r){let{children:e}=r.props;i="string"==typeof e?e:Array.isArray(e)?e.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let n=document.getElementsByTagName("head")[0],r=n.querySelector("meta[name=next-head-count]"),s=Number(r.content),a=[];for(let t=0,n=r.previousElementSibling;t<s;t++,n=(null==n?void 0:n.previousElementSibling)||null){var l;(null==n?void 0:null==(l=n.tagName)?void 0:l.toLowerCase())===e&&a.push(n)}let c=t.map(i).filter(e=>{for(let t=0,n=a.length;t<n;t++)if(o(a[t],e))return a.splice(t,1),!1;return!0});a.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),c.forEach(e=>n.insertBefore(e,r)),r.content=(s-a.length+c.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},49189:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return v}});let r=n(99920),i=n(41452),o=n(57437),s=r._(n(54887)),a=i._(n(2265)),l=n(36590),c=n(40905),u=n(49189),h=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],f=e=>{if(s.default.preinit){e.forEach(e=>{s.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}},m=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:s="",strategy:a="afterInteractive",onError:l,stylesheets:u}=e,m=n||t;if(m&&d.has(m))return;if(h.has(t)){d.add(m),h.get(t).then(r,l);return}let g=()=>{i&&i(),d.add(m)},v=document.createElement("script"),_=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),r&&r.call(this,t),g()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[n,r]of(o?(v.innerHTML=o.__html||"",g()):s?(v.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",g()):t&&(v.src=t,h.set(t,_)),Object.entries(e))){if(void 0===r||p.includes(n))continue;let e=c.DOMAttributeNames[n]||n.toLowerCase();v.setAttribute(e,r)}"worker"===a&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",a),u&&f(u),document.body.appendChild(v)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>m(e))}):m(e)}function v(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function _(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:c="afterInteractive",onError:h,stylesheets:p,...f}=e,{updateScripts:g,scripts:v,getIsSsr:_,appDir:b,nonce:y}=(0,a.useContext)(l.HeadManagerContext),w=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=t||n;w.current||(i&&e&&d.has(e)&&i(),w.current=!0)},[i,t,n]);let E=(0,a.useRef)(!1);if((0,a.useEffect)(()=>{!E.current&&("afterInteractive"===c?m(e):"lazyOnload"===c&&("complete"===document.readyState?(0,u.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>m(e))})),E.current=!0)},[e,c]),("beforeInteractive"===c||"worker"===c)&&(g?(v[c]=(v[c]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:h,...f}]),g(v)):_&&_()?d.add(t||n):_&&!_()&&m(e)),b){if(p&&p.forEach(e=>{s.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)return n?(s.default.preload(n,f.integrity?{as:"script",integrity:f.integrity,nonce:y}:{as:"script",nonce:y}),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n,{...f,id:t}])+")"}})):(f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...f,id:t}])+")"}}));"afterInteractive"===c&&n&&s.default.preload(n,f.integrity?{as:"script",integrity:f.integrity,nonce:y}:{as:"script",nonce:y})}return null}Object.defineProperty(_,"__nextScript",{value:!0});let b=_;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},58945:function(e,t,n){"use strict";let r=n(2265).createContext(void 0);t.IntlContext=r},54480:function(e,t,n){"use strict";var r=n(2265),i=n(73834),o=n(58945);n(29583),n(90889);var s=r&&r.__esModule?r:{default:r};t.P=function(e){let{children:t,defaultTranslationValues:n,formats:a,getMessageFallback:l,locale:c,messages:u,now:h,onError:d,timeZone:p}=e,f=r.useMemo(()=>i.createFormatters(),[c]),m=r.useMemo(()=>({...i.initializeConfig({locale:c,defaultTranslationValues:n,formats:a,getMessageFallback:l,messages:u,now:h,onError:d,timeZone:p}),formatters:f}),[n,a,f,l,c,u,h,d,p]);return s.default.createElement(o.IntlContext.Provider,{value:m},t)}},73834:function(e,t,n){"use strict";var r,i=n(29583),o=(r=n(90889))&&r.__esModule?r:{default:r};function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(".")}function a(e){return s(e.namespace,e.key)}function l(e){console.error(e)}function c(e,t){return i.memoize(e,{cache:{create:()=>({get:e=>t[e],set(e,n){t[e]=n}})},strategy:i.strategies.variadic})}function u(e,t){return c(function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new e(...n)},t)}t.createFormatters=function(){let e=u(Intl.DateTimeFormat,{}),t=u(Intl.NumberFormat,{}),n=u(Intl.PluralRules,{}),r=u(Intl.RelativeTimeFormat,{}),i=u(Intl.ListFormat,{}),s=u(Intl.DisplayNames,{}),a=c(function(){return new o.default(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],{formatters:{getNumberFormat:t,getDateTimeFormat:e,getPluralRules:n},...arguments.length<=3?void 0:arguments[3]})},{});return{getDateTimeFormat:e,getNumberFormat:t,getPluralRules:n,getMessageFormat:a,getRelativeTimeFormat:r,getListFormat:i,getDisplayNames:s}},t.defaultGetMessageFallback=a,t.defaultOnError=l,t.initializeConfig=function(e){let{getMessageFallback:t,messages:n,onError:r,...i}=e;return{...i,messages:n,onError:r||l,getMessageFallback:t||a}},t.joinPath=s},87479:function(){},11826:function(){},74270:function(){},5195:function(e,t,n){"use strict";n.d(t,{D:function(){return I},P:function(){return U},U:function(){return M},u:function(){return w}});var r=n(57437),i=n(44839),o=n(2265),s=n(23644),a=n(93381),l=n(54887);let c=300,u=({opened:e})=>{let[t,n]=(0,o.useState)(!1),r=(0,o.useRef)(null),i=(0,o.useRef)(!1);return(0,o.useEffect)(()=>(e&&!i.current?(i.current=!0,n(!0)):!e&&i.current&&(r.current=setTimeout(()=>{i.current=!1,n(!1)},c)),()=>{r.current&&clearTimeout(r.current)}),[e]),{mounted:t}},h=(0,a.g)("click-outside","sc"),d=Object.freeze({overlay:`${h}__overlay`,open:`${h}--open`,close:`${h}--close`}),p=({onClose:e,onToucheMove:t,isOpen:n,delay:s=c})=>{let a=(0,o.useRef)(null),l=(0,o.useCallback)(()=>{e&&(a.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,o.useCallback)(e=>{"Escape"===e.key&&l()},[l]);return(0,o.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",u)}),[n,u]),(0,r.jsx)("div",{className:(0,i.Z)(d.overlay,{[d.open]:n,[d.close]:!n}),onTouchStart:t,onClick:l})},f=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},m=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},g=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},v=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vw")},_=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},b=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},y=()=>document.querySelectorAll("[data-portal]").length>1,w=e=>{let t=(0,o.useRef)(null),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{if(n.current===e)return;n.current=e;let r=t.current,i=document.body,o=document.documentElement,s=window.innerWidth-o.clientWidth,a=s>0;if(e&&a)m(i),g(i,o,s),f(r,!0);else if(e)v(i),f(r,!0);else{let e=!y();e&&_(i),e&&b(),f(r,!1)}return()=>{let e=!y();e&&_(i),e&&b()}},[e]),t},E=(0,a.g)("drawer-footer","sc"),T=Object.freeze({footer:`${E}__footer`,hasScroll:`${E}__footer--has-scroll`}),x=({footer:e,hasScroll:t,className:n})=>(0,r.jsx)("div",{className:(0,i.Z)(T.footer,{[T.hasScroll]:t},n),children:"function"==typeof e?e():e}),N=(0,a.g)("drawer-content","sc"),C=Object.freeze({container:`${N}__container`,open:`${N}--open`,close:`${N}--close`,header:`${N}__header`,rowHeader:`${N}__header--row`,title:`${N}__title`,center:`${N}__title--center`,left:`${N}__title--left`,right:`${N}__title--right`,controlContainer:`${N}__control-container`,content:`${N}__content`,footer:`${N}__footer`}),A=({onClose:e,onContentClick:t,children:n,title:a,rowTitle:l,titleAlign:c,isCloseable:u,footer:h,closeButton:d,isOpen:p,contentClassName:f,footerClassName:m,contentStyle:g,width:v})=>{let _=(0,o.useRef)(null),b=(0,o.useRef)(null),[y,w]=(0,o.useState)(!1);(0,o.useEffect)(()=>{var e;if(!b.current||!_.current)return;let t=(null==(e=null==b?void 0:b.current)?void 0:e.getBoundingClientRect().top)||0,n=null==_?void 0:_.current,r=()=>{let e=null==b?void 0:b.current;e&&w(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",r,!1),()=>{null==n||n.removeEventListener("scroll",r,!1)}},[]);let E=g||v?{width:v,...g||{}}:void 0;return(0,r.jsxs)("div",{ref:_,style:E,className:(0,i.Z)(C.container,{[C.open]:p,[C.close]:!p},f),children:[a||u?(0,r.jsxs)("div",{className:(0,i.Z)(C.header,{[C.rowHeader]:l}),children:[u?d?"function"==typeof d?d():d:(0,r.jsx)("button",{type:"button",className:C.controlContainer,onClick:e,children:(0,r.jsx)(s.IconFdsCloseO,{size:24})}):null,a?(0,r.jsx)("h3",{className:(0,i.Z)(C.title,{[C[c]]:!0}),children:a}):null]}):null,(0,r.jsx)("div",{ref:b,className:C.content,onClick:t,children:n}),h&&(0,r.jsx)(x,{className:(0,i.Z)(C.footer,m),footer:h,hasScroll:y})]})},S=(0,a.g)("drawer-layout","sc"),j=Object.freeze({window:`${S}__window`}),O=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:a,...l})=>{let c=(0,o.useCallback)(e=>e.stopPropagation(),[]);return w(t&&s),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(j.window,a),children:[(0,r.jsx)(p,{onClose:e,isOpen:t,delay:0}),(0,r.jsx)(A,{onContentClick:c,onClose:e,isOpen:t,...l,children:n})]})},I=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...s})=>{let{mounted:a}=u({opened:e});return a?(0,r.jsx)(O,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...s,children:t}):null};I.displayName="Drawer";let L=(0,a.g)("mobile-modal-footer","sc"),H=Object.freeze({footer:`${L}__footer`,footerWithoutShadow:`${L}__footer--without-shadow`}),k=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,r.jsx)("div",{className:(0,i.Z)(H.footer,t&&H.footerWithoutShadow,n),children:"function"==typeof e?e():e}),B=(0,a.g)("mobile-popup","sc"),P=Object.freeze({mobilePopup:`${B}`,mobilePopupOpen:`${B}--open`,content:`${B}__content`,contentFull:`${B}__content--full`,contentTransition:`${B}__content--transition`,contentTransitionOpen:`${B}__content--transition-open`,contentLine:`${B}__content-line`,contentContainer:`${B}__content-container`,smallContentContainer:`${B}__content-container--small`,min:`${B}__content-container--min`,title:`${B}__title`,closeContainer:`${B}__close-container`,closeButton:`${B}__close-button`}),R=({children:e,footer:t,isOpen:n,isSmallPopup:a,onClose:l,hasCloseButton:c=!0,full:u,touchDistance:h=100,withDisabledScroll:d=!0,contentClassName:f,className:m,title:g,closeButton:v,footerClassName:_})=>{let[b,y]=(0,o.useState)(!1),[E,T]=(0,o.useState)(!1),[x,N]=(0,o.useState)(!0),[C,A]=(0,o.useState)("120%"),S=(0,o.useRef)(null),j=(0,o.useRef)(0),O=(0,o.useRef)(!1),I=e=>{var t,n,r;let i=null==(t=S.current)?void 0:t.offsetTop,o=null==(n=S.current)?void 0:n.offsetHeight;if(O.current=!0,N(!1),i&&o){let t=(null==(r=null==e?void 0:e.touches[0])?void 0:r.clientY)-i,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),A(`${n}px`),j.current=n}},L=()=>{O.current&&(j.current>h&&l?null==l||l():A("0"),N(!0),O.current=!1),window.removeEventListener("touchmove",I),window.removeEventListener("touchend",L)};return(0,o.useEffect)(()=>{n&&setTimeout(()=>{y(!0),T(!0),A("0")},100),!n&&E&&(A("120%"),y(!1),T(!1))},[E,n]),w(n&&d),(0,r.jsxs)("div",{"data-portal":!0,className:(0,i.Z)(P.mobilePopup,E&&P.mobilePopupOpen,m),children:[(0,r.jsx)(p,{onClose:()=>{n&&(null==l||l())},onToucheMove:()=>{n&&(y(!1),window.addEventListener("touchmove",I),window.addEventListener("touchend",L))},isOpen:n,delay:0}),(0,r.jsxs)("div",{className:(0,i.Z)(P.content,u&&P.contentFull,x&&P.contentTransition,x&&b&&P.contentTransitionOpen),ref:S,style:{transform:`translateY(${C})`},children:[(0,r.jsx)("div",{className:P.contentLine}),(0,r.jsxs)("div",{className:(0,i.Z)(P.contentContainer,a&&P.smallContentContainer,{[P.min]:!g&&!c},f),children:[!!g&&(0,r.jsx)("div",{className:P.title,children:g}),c?(0,r.jsx)("div",{className:P.closeContainer,children:c?v?"function"==typeof v?v():v:(0,r.jsx)("button",{onClick:l,className:P.closeButton,children:(0,r.jsx)(s.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,r.jsx)(k,{footerClassName:_,isSmallPopup:a,footer:t})]})]})},M=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=u({opened:n});return o?(0,r.jsx)(R,{isSmallPopup:t,isOpen:n,...i,children:e}):null};M.displayName="UiMobilePopup";let U=({children:e,id:t="portal-root"})=>{let[n,r]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=document.getElementById(t);if(e){r(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),r(n),()=>{document.body.removeChild(n)}},[t]),n?(0,l.createPortal)(e,n):null}},93381:function(e,t,n){"use strict";function r(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return r}})},17868:function(e,t,n){"use strict";let r;n.d(t,{D:function(){return l},h:function(){return u}});let i={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},o=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in i?i[t]:e}).replaceAll(/[ \u00A0]/g,"_");var s=n(77707);let a=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),r=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),e.eventLabel||(e.eventLabel="undefined");let i=r.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!i){if(t){let t={...e};t.url=window.location.pathname,r.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(r))}(0,s.AB)(e)}};var l=((r=l||{}).icon="icon",r.chip="chip",r.accordion="accordion",r.button="button",r.checkbox="checkbox",r.radio="radio",r.select="select",r.toggle="toggle",r.tooltip="tooltip",r.link="link",r.banner="banner",r.tag="tag",r.date="date",r.field="field",r.offer="offer",r.tab="tab",r.submitButton="submitButton",r.popup="popup",r.block="block",r);let c={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},u=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:r})=>{let i={event:"data-event",eventCategory:e,eventAction:c[t]+o(n)};void 0!==r&&(i.eventLabel=o("string"==typeof r?r:r.toString())),a(i)}},46079:function(e,t,n){"use strict";n.d(t,{CookiesPlate:function(){return h}});var r=n(57437),i=n(23644),o=n(44839),s=n(2265),a=n(93381);let l={getItem:e=>{var t;if(typeof document>"u")return null;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!==(t=n.split("=")[1])&&void 0!==t?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let r="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t));for(let e in n){if(!n.hasOwnProperty(e))continue;r+="; ".concat(e);let t=n[e];!0!==t&&(r+="=".concat(t))}document.cookie=r},removeItem:e=>{l.setItem(e,"",{"max-age":-1})}},c=(0,a.g)("cookies-plate","sc"),u=Object.freeze({wrapper:"".concat(c,"__wrapper"),contentWrapper:"".concat(c,"__content-wrapper"),visible:"".concat(c,"--visible"),hidden:"".concat(c,"--hidden"),content:"".concat(c,"__content"),text:"".concat(c,"__text"),link:"".concat(c,"__link"),button:"".concat(c,"__button")}),h=e=>{let{className:t,mountDelay:n=3e3,href:a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:c,closeIcon:h,onMount:d,onLinkClick:p,onClose:f,mountAfterScroll:m=!0}=e,[g,v]=(0,s.useState)(!1),[_,b]=(0,s.useState)(!1),[y,w]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),l.getItem("Allow-Cookie")||(w(!0),setTimeout(()=>{v(!0),null==d||d()},n))};return m?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let E=(0,s.useCallback)(()=>{l.setItem("Allow-Cookie","1"),b(!0),null==f||f(),setTimeout(()=>w(!1),1e3)},[f]);return y?(0,r.jsx)("div",{className:u.wrapper,children:(0,r.jsx)("div",{className:(0,o.Z)(u.contentWrapper,{[u.visible]:g,[u.hidden]:_}),children:(0,r.jsxs)("div",{className:(0,o.Z)(t,u.content),children:[c||(0,r.jsxs)("p",{className:u.text,children:["Мы используем"," ",(0,r.jsx)("a",{className:u.link,href:a,target:"_blank",rel:"noreferrer",onClick:p,children:"cookie"})," ","для лучшей работы сайта"]}),(0,r.jsx)("button",{className:u.button,onClick:E,children:h||(0,r.jsx)(i.IconFdsCloseO,{})})]})})}):(0,r.jsx)(r.Fragment,{})}},28693:function(e,t,n){"use strict";n.d(t,{$:function(){return W}});var r=n(57437),i=n(9938),o=n(44839),s=n(7467),a=n(23644),l=n(93381),c=n(94702),u=n(17868),h=n(2265),d=n(5195);let p=(0,l.g)("footer-contacts-block","sc"),f=Object.freeze({contactsWrapper:"".concat(p,"__contacts-wrapper"),gray:"".concat(p,"__gray"),phones:"".concat(p,"__phones"),contactsButtons:"".concat(p,"__contacts-buttons"),vkIcon:"".concat(p,"__vk-icon"),tgIcon:"".concat(p,"__tg-icon"),dzenIcon:"".concat(p,"__dzen-icon"),ytIcon:"".concat(p,"__yt-icon"),link:"".concat(p,"__link")}),m=(0,l.g)("footer","sc"),g=Object.freeze({wrapper:"".concat(m,"__wrapper"),section:"".concat(m,"__section"),container:"".concat(m,"__container"),top:"".concat(m,"__top"),main:"".concat(m,"__main"),links:"".concat(m,"__links"),disclaimer:"".concat(m,"__disclaimer"),bottom:"".concat(m,"__bottom"),bottomLinks:"".concat(m,"__bottom-links"),bottomDisclaimer:"".concat(m,"__bottom-disclaimer"),compact:"".concat(m,"__wrapper--compact"),white:"".concat(m,"__wrapper--white")}),v="finkit-widgets-sc-footer",_=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],b=[..._,{title:"Онлайн чат",url:void 0}],y=[{type:"vk",className:f.vkIcon,iconName:"vk"},{type:"dzen",className:f.dzenIcon,iconName:"dzen"},{type:"telegramChannel",className:f.tgIcon,iconName:"telegram"},{type:"yt",className:f.ytIcon,iconName:"",icon:(0,r.jsx)(a.IconFdsYoutubeF,{})}],w=(0,r.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),E=e=>{let{onClick:t,eventActionText:n,eventLabel:i,...o}=e;return(0,r.jsx)(c.zx,{onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:v,eventActionType:u.D.button,eventActionText:n||"",eventLabel:i})},...o})},T=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:o,chat:s,...a}=e;return(0,r.jsx)(c.rU,{onClick:e=>{var r,a,l;null==t||t(e),s&&(null==e||e.preventDefault(),null==(l=null==(a=null==(r=null==window?void 0:window.supportWidget)?void 0:r.craftTalk)?void 0:a.open)||l.call(a)),(0,u.h)({eventCategory:v,eventActionType:n||u.D.link,eventActionText:i||"",eventLabel:o})},...a})},x=e=>{let{minioUrl:t,blogs:n}=e;return(0,r.jsxs)("div",{className:f.contactsWrapper,children:[(0,r.jsx)(i.xv,{className:f.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,r.jsx)("div",{className:f.phones,children:b.map(e=>{let{title:t,url:n}=e;return(0,r.jsx)(T,{href:n,eventActionText:t,chat:!n,children:t},t)})}),(0,r.jsx)(i.xv,{className:f.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,r.jsx)("div",{className:f.contactsButtons,children:y.map(e=>{let{type:i,className:o,iconName:a,icon:l}=e;return(0,r.jsx)(E,{as:"a",href:null==n?void 0:n[i],target:"_blank",className:o,iconRight:l||(0,r.jsx)("img",{src:(0,s.xn)(t,"/pl-common-blocks-renderer/footer/".concat(a,".svg")),alt:i,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:i,eventLabel:null==n?void 0:n[i]},i)})}),(0,r.jsx)(i.xv,{className:f.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,r.jsx)("div",{className:f.contactsButtons,children:(0,r.jsxs)(T,{href:null==n?void 0:n.investTg,target:"_blank",className:f.link,eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg,children:[(0,r.jsx)(E,{className:f.tgIcon,iconRight:(0,r.jsx)("img",{src:(0,s.xn)(t,"/pl-common-blocks-renderer/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==n?void 0:n.investTg}),"Финуслуги Инвест"]})})]})},N=(0,l.g)("footer-disclaimer","sc"),C=Object.freeze({disclaimer:"".concat(N)}),A=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:v,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,r.jsx)("div",{className:(0,o.Z)(e.className,C.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,r.jsx)("div",{className:(0,o.Z)(e.className,C.disclaimer),onClick:t,children:e.children})},S=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t,n]=(0,h.useState)(e);return(0,h.useEffect)(()=>{let t=S();if(!t||0===t.size)return;let[r,i=""]=e.split("?"),o=new URLSearchParams(i);t.forEach((e,t)=>{o.has(t)||o.set(t,e)});let s=o.toString();n(s?"".concat(r,"?").concat(s):r)},[e]),t},O=(0,l.g)("footer-modal-body","sc"),I=Object.freeze({wrapper:"".concat(O,"__wrapper"),title:"".concat(O,"__title"),item:"".concat(O,"__item"),label:"".concat(O,"__label"),button:"".concat(O,"__button"),description:"".concat(O,"__description")}),L=e=>{let{directions:t}=e;return(0,r.jsxs)("div",{className:I.wrapper,children:[(0,r.jsx)("div",{className:I.title,children:"Направления"}),t.map(e=>(0,r.jsxs)(T,{className:I.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:"".concat(e.name,"_").concat(e.url),children:[(0,r.jsxs)("div",{className:I.label,children:[(0,r.jsx)("span",{children:e.name}),(0,r.jsx)(E,{className:I.button,iconRight:(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,r.jsx)("p",{className:I.description,children:e.description})]},e.url))]})},H=(0,l.g)("footer-popup","sc"),k=Object.freeze({wrapper:"".concat(H,"__wrapper"),button:"".concat(H,"__button"),icon:"".concat(H,"__icon"),buttonWrapper:"".concat(H,"__button-wrapper")}),B=e=>{let{directions:t}=e,n=(0,c._m)("l"),[i,o]=(0,h.useState)(!1),s=()=>{o(!1)};return(0,r.jsxs)("div",{className:k.wrapper,children:[(0,r.jsx)("div",{className:k.buttonWrapper,children:(0,r.jsx)(E,{className:k.button,appearance:"ghost",variant:"white",onClick:()=>{o(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,r.jsx)("div",{className:k.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,r.jsx)("div",{},e))})})}),(0,r.jsxs)(d.P,{children:[!n&&(0,r.jsx)(d.U,{isOpen:i,onClose:s,full:!0,children:(0,r.jsx)(L,{directions:t})}),n&&(0,r.jsx)(d.D,{isOpen:i,onClose:s,width:"804px",children:(0,r.jsx)(L,{directions:t})})]})]})},P=(0,l.g)("footer-left-column","sc"),R=Object.freeze({leftColumn:"".concat(P,"__left-column"),logoWrapper:"".concat(P,"__logo-wrapper"),banner:"".concat(P,"__banner")}),M=e=>{let{showcaseUrl:t,minioUrl:n,directions:o,mobAppUrl:l}=e,c=j(l);return(0,r.jsxs)("div",{className:R.leftColumn,children:[(0,r.jsx)(T,{className:R.logoWrapper,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:(0,r.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,r.jsx)(B,{directions:null!=o?o:[]}),(0,r.jsx)(T,{href:c,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:c,children:(0,r.jsxs)(i.Zb,{className:R.banner,children:[(0,r.jsxs)(i.xv,{weight:"medium",children:["Управляйте финансами",(0,r.jsx)("br",{}),"через приложение Финуслуг"]}),(0,r.jsx)(E,{iconRight:(0,r.jsx)(a.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{srcSet:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,r.jsx)("img",{src:(0,s.xn)(n,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},U=(0,l.g)("footer-logo","sc"),D=Object.freeze({wrapper:"".concat(U,"__wrapper"),link:"".concat(U,"__link"),fromMoex:"".concat(U,"__from-moex"),logo:"".concat(U,"__logo"),white:"".concat(U,"__wrapper--white")}),F=e=>{let{showcaseUrl:t,minioUrl:n,isWhite:i}=e;return(0,r.jsx)("div",{className:(0,o.Z)(D.wrapper,{[D.white]:i}),children:(0,r.jsxs)(T,{className:D.link,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(t),children:[(0,r.jsx)("img",{className:D.logo,src:"".concat(n,"/images/logo-brandmark-common-finuslugi.svg")}),(0,r.jsx)("img",{className:D.fromMoex,src:"".concat(n,"/images/fromMoex.svg")})]})})},G=(0,l.g)("footer-warning","sc"),z=Object.freeze({reservedSpace:"".concat(G,"__reserved-space"),wrapper:"".concat(G,"__wrapper"),fixed:"".concat(G,"__wrapper--fixed"),container:"".concat(G,"__container")}),$=e=>{let{text:t,fixed:n}=e;return(0,r.jsx)("div",{className:(0,o.Z)(z.wrapper,{[z.fixed]:n}),children:(0,r.jsx)(i.W2,{className:z.container,children:t})})},V=e=>{let{text:t}=e;return(0,r.jsxs)("div",{className:z.reservedSpace,children:[(0,r.jsx)($,{text:t}),(0,r.jsx)($,{text:t,fixed:!0})]})},W=e=>{var t,n;let{data:s,showcaseUrl:a="https://finuslugi.ru",minioUrl:l="https://assets.finuslugi.ru/mp-assets",customDisclaimer:c,variant:u="default"}=e,h=!c&&null!=s&&s.disclaimer?s.disclaimer:void 0,d=u.includes("compact"),p=u.includes("white"),f=null==(t=null==s?void 0:s.bottom)?void 0:t.concat(d?_:[]),m="warning"in s?s.warning:void 0;return(0,r.jsx)("footer",{className:(0,o.Z)(g.wrapper,{[g.compact]:d,[g.white]:p}),children:(0,r.jsxs)("section",{className:g.section,children:[(0,r.jsxs)(i.W2,{className:g.container,children:[!d&&(0,r.jsx)(M,{showcaseUrl:a,minioUrl:l,directions:s.directions,mobAppUrl:s.mobAppUrl}),(0,r.jsx)("div",{className:g.wrapper,children:(0,r.jsxs)("div",{className:g.top,children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:g.main,children:[!d&&(0,r.jsx)("div",{className:g.links,children:null==(n=null==s?void 0:s.top)?void 0:n.map(e=>(0,r.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),d&&(0,r.jsx)(F,{showcaseUrl:a,minioUrl:l,isWhite:p}),(0,r.jsx)(A,{className:g.disclaimer,disclaimer:h,children:c||w})]}),(0,r.jsxs)("div",{className:g.bottom,children:[(0,r.jsx)("div",{className:g.bottomLinks,children:null==f?void 0:f.map(e=>(0,r.jsx)(T,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,r.jsx)(A,{className:g.bottomDisclaimer,disclaimer:null==s?void 0:s.bottomDisclaimer})]})]}),!d&&(0,r.jsx)(x,{minioUrl:l,blogs:s.blogs})]})})]}),d&&!!m&&(0,r.jsx)(V,{text:m})]})})}},87485:function(e,t,n){"use strict";n.d(t,{CitySelectProvider:function(){return z},h:function(){return eO}});var r=n(57437),i=n(2265),o=n(17868),s=n(23644),a=n(9938),l=n(94702),c=n(44839),u=n(7467),h=n(5195),d=n(93381);let p=(0,d.g)("header","sc"),f=Object.freeze({header:`${p}`,fixed:`${p}__fixed`,hidden:`${p}__fixed--hidden`,transparent:`${p}--transparent`,navigationOpen:`${p}__navigation-open`,container:`${p}__container`,leftRow:`${p}__left-row`,logo:`${p}__logo`,menuItems:`${p}__menu-items`,menuItemActive:`${p}__menu-item-active`,tabletMenuButton:`${p}__tablet-menu-button`,buttonGroup:`${p}__button-group`,chips:`${p}__chips`,menuButton:`${p}__menu-button`,moreButtons:`${p}__more-buttons`,auth:`${p}__auth`,close:`${p}__close`,removed:`${p}__removed`,overlay:`${p}__overlay`,overlayOpening:`${p}__overlay--opening`,overlayClosing:`${p}__overlay--closing`}),m="cb-header",g=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],v=g.reduce((e,t)=>(e[t.id]=t.label,e),{}),_=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let r=document.getElementById("mainHomeBanner"),i=!1,o=0;window.addEventListener("scroll",function(){let s=window.scrollY||document.documentElement.scrollTop,a=window.innerWidth<768?55:80,l=s<((null==r?void 0:r.clientHeight)||0);if(n&&l||s<a){i=!1,e(!1),t(!0);return}i=s>o,e(s>o),i&&setTimeout(()=>t(!1),50);let c=i?"0px":"";document.documentElement.style.setProperty("--new-header-height-desktop",c),document.documentElement.style.setProperty("--new-header-height-mobile",c),o=s<=0?0:s})},b=()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,r]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=r);return Object.keys(t).length>0?t:null},y=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),w=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let r=encodeURIComponent(JSON.stringify(e));document.cookie=`utm_params=${r};expires=${n.toUTCString()};path=/;SameSite=Lax`},E=()=>{if(y())return;let e=b();e&&w(e,90)},T=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{E()}catch(e){console.error("UTM tracking error:",e)}},0)},x=(e,t,n)=>(0,o.h)({eventCategory:m,eventActionType:e,eventActionText:t,eventLabel:n}),N=(0,d.g)("navigation-chips","sc"),C=Object.freeze({wrapper:`${N}__wrapper`,gray:`${N}__variantGray`,white:`${N}__variantWhite`,container:`${N}__container`,chip:`${N}__chip`,more:`${N}__chip--more`,active:`${N}__chip--active`,label:`${N}__label`,hidden:`${N}__hidden`}),A=(0,d.g)("navigation-content","sc"),S=Object.freeze({contentWrapper:`${A}__content-wrapper`,content:`${A}__content`,contentOpen:`${A}__content--open`,contentHeader:`${A}__content-header`,contentTitle:`${A}__content-title`,contentTitleUrl:`${A}__content-title--url`,contentTitleLink:`${A}__content-title--link`,contentTitleNew:`${A}__content-title--new`,new:`${A}__new`,vip:`${A}__vip`,arrowIcon:`${A}__arrow-icon`,links:`${A}__links`,linksColumns:`${A}__links--columns`,linksTitleless:`${A}__links--titleless`,removed:`${A}__removed`,hidden:`${A}__content--hidden`}),j=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:a})=>{let l=!!n,u=()=>{if(l)return null==n?void 0:n(e.url);x(o.D.chip,e.title,`${e.title}_${e.url}`)},h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:C.label,children:e.title}),e.arrow&&(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),d=(0,c.Z)(C.chip,{[C.hidden]:t,[S.new]:!!e.new,[S.vip]:!!e.vip,[C.active]:e.url===a});return l?(0,r.jsx)("button",{type:"button",className:d,onClick:u,ref:i,children:h}):(0,r.jsx)("a",{href:e.url,className:d,onClick:u,ref:i,children:h})},O=({items:e=[],maxNumberOfLines:t,variant:n,className:a,activeChipId:l,onClick:u})=>{let h=(0,i.useRef)(null),d=(0,i.useRef)(null),p=(0,i.useRef)({}),[f,m]=(0,i.useState)(!1),[g,v]=(0,i.useState)(e.length),[_,b]=(0,i.useState)(!1);(0,i.useMemo)(()=>{let t=p.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let y=(0,i.useCallback)(()=>{let n=h.current;if(!n)return;let r=e=>e?e.getBoundingClientRect().width:0,i=r(n),o=Math.max(Number(t)||0,0),s=()=>{v(e.length),b(!1)};if(f||0===o||i<=0){s();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),l=r(d.current),c=e.map(e=>r(p.current[e.url]));if(c.some(e=>0===e)){s();return}let u=1,m=0,g=0;for(let e of c){let t=u===o?l+a:0,n=0===m?e:m+a+e;if(n+t<=i-.5)m=n,g++;else{if(++u>o)break;m=e,g++}}b(g<e.length),v(g)},[f,e,t]);(0,i.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(y)});return t.observe(e),requestAnimationFrame(y),()=>{t.disconnect()}},[y]),(0,i.useEffect)(()=>{requestAnimationFrame(y)},[y]);let w=f||(t??0)<=0||!_;return(0,r.jsx)("div",{className:(0,c.Z)(a,C.wrapper,{[C.gray]:"gray"===n,[C.white]:"white"===n}),children:(0,r.jsxs)("div",{ref:h,className:C.container,children:[e.map((e,t)=>(0,r.jsx)(j,{chip:e,hidden:!w&&t>=g,activeChipId:l,onClick:u,refCallback:t=>{p.current[e.url]=t}},e.url)),!w&&_&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,c.Z)(C.chip,C.more),onClick:()=>{x(o.D.chip,"Еще"),m(!0)},children:[(0,r.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:C.label,children:"Еще"})]}),(w||!_)&&(0,r.jsxs)("button",{type:"button",ref:d,className:(0,c.Z)(C.chip,C.more,C.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,r.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,r.jsx)("span",{className:C.label,children:"Еще"})]})]})})},I=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn('Invalid object in localStorage for key "'.concat(e,'": ').concat(t))}return null},L=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=I("all_regions")||[];return window.allRegions=e,e},H=e=>{let t={};return e.map(e=>{let{id:n,name:r,towns:i}=e;return i.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=r}),i}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},k=async()=>{let e={regions:[]};try{e=await (await fetch("https://finuslugi.ru/money_data/Root.json?short=1")).json()}catch(e){console.warn(e)}let t=null!=e&&e.regions?e.regions:[];return t.length<1?[]:(window.allRegions=t,window.localStorage.setItem("all_regions",JSON.stringify(t)),window.localStorage.setItem("lastRegionsUpdateUnixTimestamp",JSON.stringify(Date.now())),t)},B=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},P=(e,t,n)=>{(0,o.h)({eventCategory:D,eventActionType:e,eventActionText:t,eventLabel:n})},R=L(),M=H(R),U={regions:R,towns:M,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},D="finkit-widgets-sc-city-select",F=(0,i.createContext)(U);function G(){return(0,i.useContext)(F)}let z=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:a="https://finuslugi.ru/backend/money/dadata"}=e,l=Number(I("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>l,[u,h]=(0,i.useState)(L()),[{startRegion:d,startTown:p},f]=(0,i.useState)({startRegion:U.startRegion,startTown:U.startTown}),[{region:m,town:g},v]=(0,i.useState)({region:U.region,town:U.town}),[_,b]=(0,i.useState)(U.startPopupVisible),[y,w]=(0,i.useState)(U.popupVisible),E=(0,i.useRef)(""),T=(0,i.useMemo)(()=>H(u),[u.length]),x=(0,i.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),b(!0),f({startRegion:e,startTown:t})},[b,f]),N=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||x(e,t)},[x]),C=(0,i.useCallback)(()=>{if(E.current&&!m&&!g){var e,t;let n=null!==(e=T.find(e=>e.name===E.current))&&void 0!==e?e:null;return N(null!==(t=u.find(e=>e.id===(null==n?void 0:n.parentId)))&&void 0!==t?t:null,n)}N(m,g)},[m,g,T,u,N]),A=(0,i.useCallback)(e=>{w(e)},[w]),S=(0,i.useCallback)(e=>{e?P(o.D.icon,"location"):P(o.D.button,(null==g?void 0:g.name)||"Вся Россия"),!n||window.sessionStorage.getItem("start_popup_opened")?A(!0):C()},[n,g,A,C]),j=(0,i.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem("user_region",JSON.stringify(e)||""),window.localStorage.setItem("user_town",JSON.stringify(t)||"")):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem("user_region",""),window.localStorage.setItem("user_town","")),v({region:e||null,town:t||null}),b(!1),A(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[A]),O=()=>{v({region:I("user_region"),town:I("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,r="".concat(a,"?lat=").concat(t,"&lon=").concat(n),i=await B(r);null!=i&&i.location&&(E.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&n)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch(e){}};return(0,i.useEffect)(()=>{if((u.length<1||c)&&k().then(e=>h(e)),window.innerWidth<1024){let e=()=>{O(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{O()},0)},[]),(0,r.jsx)(F.Provider,{value:{regions:u,towns:T,region:m,town:g,startPopupVisible:_,setStartPopupVisible:b,popupVisible:y,handleToggleModal:A,selectCity:j,handleButtonClick:S,startRegion:d,startTown:p},children:t})},$=()=>{let e=(0,i.useRef)(null),t=(0,i.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,i.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,i.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},V=(0,d.g)("city-select-modal-body","sc"),W=Object.freeze({wrapper:"".concat(V,"__wrapper"),subtitle:"".concat(V,"__subtitle"),hintWrapper:"".concat(V,"__hint-wrapper"),hintText:"".concat(V,"__hint-text"),input:"".concat(V,"__input"),chips:"".concat(V,"__chips"),townsListWrapper:"".concat(V,"__towns-list-wrapper"),townsList:"".concat(V,"__towns-list"),townsGroup:"".concat(V,"__towns-group"),townsGroupLabel:"".concat(V,"__towns-group-label"),townsGroupList:"".concat(V,"__towns-group-list"),townsName:"".concat(V,"__towns-name"),regionName:"".concat(V,"__region-name")}),Z=e=>{var t;let{groupedTowns:n,chips:a,query:c,setQuery:u,isDrawer:h}=e,d=G(),p=(0,i.useRef)(null),[f,m]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!h||!p.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,r)=>{let i=n.map(e=>[...e]),o=i.map(e),s=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===s&&i[0].push(i[1].shift()),2===s&&i[2].unshift(i[1].pop()),1===s&&o[0]>o[2]&&i[1].unshift(i[0].pop()),1===s&&o[0]<o[2]&&i[1].push(i[2].shift());let a=Math.max(...i.map(e));return a>=r?r:t(i,a)};new ResizeObserver(()=>{var e;if(!(null!=(e=p.current)&&e.children))return;let n=Array.from(p.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let r=0;try{r=t([[],n,[]],1/0)}catch(e){r=0}r>0&&m("".concat(r,"px"))}).observe(p.current)},[]);let g=e=>{if(P(o.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return d.selectCity();let t=d.regions.find(t=>t.id===Number(e.parentId))||null;d.selectCity(t,e)};return(0,r.jsxs)("div",{className:W.wrapper,children:[(0,r.jsxs)("div",{className:W.subtitle,children:["Покажем предложения рядом с вами",(0,r.jsxs)("div",{className:W.hintWrapper,children:[(0,r.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,r.jsx)("div",{className:W.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,r.jsx)(l.MA,{className:W.input,value:c,onChange:u,size:"s",placeholder:"Введите название города",icon:c?(0,r.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>u("")}):(0,r.jsx)(s.IconFdsSearchO,{size:24})}),(0,r.jsx)(l.cL,{className:W.chips,chips:a,value:(null==(t=d.town)?void 0:t.id)||0,onChipClick:e=>{g(d.towns.find(t=>t.id===e))}}),(0,r.jsx)("div",{className:W.townsListWrapper,children:(0,r.jsx)("div",{ref:p,className:W.townsList,style:{maxHeight:f},children:n.map(e=>(0,r.jsxs)("div",{className:W.townsGroup,children:[(0,r.jsx)("div",{className:W.townsGroupLabel,children:e.letter}),(0,r.jsx)("div",{className:W.townsGroupList,children:e.towns.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,r.jsx)("div",{className:W.townsName,children:e.name}),(0,r.jsx)("div",{className:W.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},X=[1095,1096,134,720,189,180],K=()=>{var e;let t=G(),n=(0,l._m)("l"),[s,a]=(0,i.useState)(""),c="Ваш выбор: ".concat((null==(e=t.town)?void 0:e.name)||"Вся Россия"),u=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(s.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[s,t.towns.length]),d=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...X.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),p=()=>{P(o.D.button,"close"),t.handleToggleModal(!1)};return(0,r.jsxs)(h.P,{children:[!n&&(0,r.jsx)(h.U,{title:c,isOpen:t.popupVisible,onClose:p,full:!0,children:(0,r.jsx)(Z,{groupedTowns:u,chips:d,query:s,setQuery:a})}),n&&(0,r.jsx)(h.D,{title:c,isOpen:t.popupVisible,onClose:p,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,r.jsx)(Z,{groupedTowns:u,chips:d,query:s,setQuery:a,isDrawer:!0})})]})},q=e=>{let{label:t,onClick:n,eventActionText:i,eventLabel:s,...a}=e;return(0,r.jsx)(l.zx,{label:t,onClick:e=>{null==n||n(e),(0,o.h)({eventCategory:m,eventActionType:o.D.button,eventActionText:i||"",eventLabel:s||""})},...a})},Y=(0,d.g)("header-popup","sc"),J=Object.freeze({popup:"".concat(Y,"__popup"),popupHeader:"".concat(Y,"__popup-header"),popupClose:"".concat(Y,"__popup-close"),body:"".concat(Y,"__body")}),Q=e=>{let{isOpen:t,onClose:n,children:i,title:o}=e,a=(0,l._m)("l");return(0,r.jsxs)(h.P,{children:[!a&&(0,r.jsx)(h.U,{title:o,isOpen:t,onClose:n,children:i}),a&&t&&(0,r.jsxs)("div",{className:J.popup,children:[(0,r.jsxs)("div",{className:J.popupHeader,children:[o,(0,r.jsx)(q,{className:J.popupClose,iconLeft:(0,r.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,r.jsx)("div",{className:J.body,children:i})]})]})},ee=(0,d.g)("start-choice-popup","sc"),et=Object.freeze({top:"".concat(ee,"__top"),progress:"".concat(ee,"__progress"),innerCircle:"".concat(ee,"__inner-circle"),title:"".concat(ee,"__title"),subtitle:"".concat(ee,"__subtitle"),actions:"".concat(ee,"__actions")}),en=()=>{var e,t;let n=G(),[s,a]=(0,i.useState)(10),[l,c]=(0,i.useState)(0),u=(0,i.useRef)(void 0),h=()=>{P(o.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(n.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(n.startRegion)||""),n.setStartPopupVisible(!1)};return(0,i.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+s).slice(1)),t=1e3*e/100,n=0,r=0;u.current=setInterval(()=>{n++,r+=t,c(3.6*n);let i=e-Math.floor(r/1e3);i<s&&a(i),100===n&&(clearInterval(u.current),h())},t)})():(clearInterval(u.current),a(10),c(0))},[n.startPopupVisible]),(0,r.jsxs)(Q,{isOpen:n.startPopupVisible,onClose:h,title:(0,r.jsx)("button",{type:"button",className:et.progress,style:{background:"conic-gradient(#ff0508 ".concat(l,"deg, #e3e7ec 0deg)")},onClick:h,children:(0,r.jsx)("div",{className:et.innerCircle,children:s})}),children:[(0,r.jsxs)("div",{className:et.top,children:[(0,r.jsxs)("div",{className:et.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,r.jsx)("div",{className:et.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,r.jsxs)("div",{className:et.actions,children:[(0,r.jsx)(q,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{P(o.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,r.jsx)(q,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{P(o.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},er=(0,d.g)("city-select","sc"),ei=Object.freeze({button:"".concat(er,"__button")}),eo=e=>{var t;let{initialTown:n}=e,i=G(),o=(null==(t=i.town)?void 0:t.name)||n||"Вся Россия";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.zx,{className:ei.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>i.handleButtonClick(!1),iconLeft:(0,r.jsx)(s.IconFdsLocationO,{size:16}),label:o}),(0,r.jsx)(K,{}),(0,r.jsx)(en,{})]})},es={"uat-mp.beta.moex.com":"//chat-marketplace.beta.moex.com","finuslugi.ru":"//chat.finuslugi.ru","dev-rc.beta.moex.com":"//dev-opbot.tech.finuslugi.ru"},ea=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(es,e)?es[e]:es["finuslugi.ru"]},el=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href="".concat(e,"/assets/css/").concat(t),document.head.appendChild(n);let r=document.createElement("script");r.src="".concat(e,"/get-bootstrap/").concat(t),r.defer=!0,document.body.appendChild(r)},ec=()=>new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),t=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=t)}})}),eu=()=>{let[e,t]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!1),o=(0,i.useRef)(!1),s=e=>{o.current=e,r(e)};return(0,i.useEffect)(()=>{if(typeof window>"u")return;let e=ea(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let r=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((i,a)=>{if(o.current){a(Error("chat is already opened"));return}r?(r.openWidget(),t(!1),i()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;r=e;let o=document.querySelector(".webchat");o&&ec().observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=r.closeWidget),null==r||r.openWidget(),s(!1),t(!1),i()},el(e,n))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,r;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(r=null==(n=window.supportWidget)?void 0:n.craftTalk)||r.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}},eh=(0,i.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1});function ed(){return(0,i.useContext)(eh)}let ep=e=>{let[t,n]=(0,i.useState)(!1),[o,s]=(0,i.useState)(!1),[a,l]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=eu(),[p,f]=(0,i.useState)(null),[m,g]=(0,i.useState)(null),[v,b]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1),[E,x]=(0,i.useState)(!1),N=(0,i.useRef)(null),C=(0,h.u)(v),A=(0,i.useRef)(null),S=(0,i.useRef)(null),j=(0,i.useCallback)(()=>{C.current&&C.current.scrollTo({top:0})},[C]),O=(0,i.useCallback)(e=>{g(e),j()},[j]),I=(0,i.useCallback)(e=>{A.current&&clearTimeout(A.current),e&&w(!0),e||(A.current=setTimeout(()=>{w(!1),O(null)},300))},[O]),L=(0,i.useCallback)((e,t,n)=>{if(t&&O(t),!n&&e===p||!e){I(!v),b(!v);return}f(e),I(!0),b(!0)},[p,O,v,I]),H=(0,i.useCallback)(()=>{S.current&&clearTimeout(S.current),x(!0),S.current=setTimeout(()=>{x(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id")),_(s,l,e.isMainBannerPage),T()},[]),(0,r.jsx)("div",{children:(0,r.jsx)(eh.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:a,openedBlock:p,setOpenedBlock:L,openedSection:m,setOpenedSection:O,isNavigationOpen:v,isNavigationMounted:y,navMenuItemsRef:N,navigationRef:C,ignoreClicks:E,setIgnoreClicks:H,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d},children:e.children})})},ef=(0,d.g)("header-chat-modal-body","sc"),em=Object.freeze({wrapper:"".concat(ef,"__wrapper"),cardButton:"".concat(ef,"__card-button"),card:"".concat(ef,"__card"),cardTitle:"".concat(ef,"__card-title"),cardSubtitle:"".concat(ef,"__card-subtitle"),button:"".concat(ef,"__button")}),eg=()=>{let e=ed();return(0,r.jsxs)("div",{className:em.wrapper,children:[(0,r.jsx)(q,{className:em.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,r.jsxs)(a.Zb,{className:em.card,variant:"secondary",children:[(0,r.jsxs)("div",{className:em.cardTitle,children:[(0,r.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,r.jsxs)("p",{className:em.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,r.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),(0,r.jsx)(q,{as:"a",href:"https://finuslugi.ru/landing/fingpt",target:"_blank",className:em.button,variant:"secondary",size:"s",iconLeft:(0,r.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/robot_icon_hover.svg",alt:"robot"}),eventActionText:"Новости от ФинGPT",children:"Новости от ФинGPT"})]})},ev=(0,d.g)("header-chat-modal","sc"),e_=Object.freeze({wrapper:"".concat(ev,"__wrapper")}),eb=()=>{let e=ed();return(0,r.jsx)(h.P,{children:(0,r.jsx)(Q,{isOpen:e.isChatModalOpen,onClose:()=>e.setIsChatModalOpen(!1),title:"Нужна помощь?",children:(0,r.jsx)("div",{className:e_.wrapper,children:(0,r.jsx)(eg,{})})})})},ey=e=>{let{onClick:t,eventActionType:n,eventActionText:i,eventLabel:s,...a}=e;return(0,r.jsx)(l.rU,{onClick:e=>{null==t||t(e),(0,o.h)({eventCategory:m,eventActionType:n||o.D.link,eventActionText:i||"",eventLabel:s||""})},...a})},ew=e=>{let{data:t,isMobile:n}=e,a=ed();return(0,r.jsx)("div",{className:S.contentWrapper,children:t.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsxs)("div",{className:(0,c.Z)(S.content,{[S.hidden]:a.openedSection!==e.id,[S.contentOpen]:!!a.openedSection}),children:[(0,r.jsx)("div",{className:S.contentHeader,children:(0,r.jsx)("label",{children:e.title})}),e.content.map((t,i)=>{var a,l;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)("a",{className:(0,c.Z)(S.contentTitle,{[S.removed]:!t.title,[S.contentTitleUrl]:!!t.url,[S.contentTitleLink]:!!e.isSeeAllLinkAvailable,[S.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,r.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,r.jsx)("div",{className:S.arrowIcon,children:(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,r.jsx)(O,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(l=t.links)&&l.length)&&(0,r.jsx)("div",{className:(0,c.Z)(S.links,{[S.linksColumns]:!!t.columns,[S.linksTitleless]:!t.title}),children:t.links.map(e=>(0,r.jsxs)("a",{href:e.url,className:(0,c.Z)({[S.new]:!!e.new}),onClick:()=>x(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,r.jsx)("div",{className:S.arrowIcon,children:(0,r.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,r.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(i))})]},e.id))},e.id))})},eE=(0,d.g)("navigation-section-icon","sc"),eT=Object.freeze({icon:"".concat(eE)}),ex=e=>{let{name:t,background:n}=e,o=(0,i.useMemo)(()=>t&&s[t]||null,[t]);return t&&o?(0,r.jsx)("div",{className:eT.icon,style:{background:n},children:(0,r.jsx)(o,{})}):null},eN=(0,d.g)("navigation","sc"),eC=Object.freeze({navigation:"".concat(eN),navigationOpening:"".concat(eN,"--opening"),navigationClosing:"".concat(eN,"--closing"),wrapper:"".concat(eN,"__wrapper"),container:"".concat(eN,"__container"),containerOpen:"".concat(eN,"__container--open"),sections:"".concat(eN,"__sections"),sectionsOpen:"".concat(eN,"__sections--open"),citySelectButton:"".concat(eN,"__city-select-button"),sectionsTitle:"".concat(eN,"__sections-title"),sectionsWrapper:"".concat(eN,"__sections-wrapper"),section:"".concat(eN,"__section"),sectionArrow:"".concat(eN,"__section-arrow"),sectionExtra:"".concat(eN,"__section--extra"),sectionActive:"".concat(eN,"__section--active"),sectionTitle:"".concat(eN,"__section-title"),chatWrapper:"".concat(eN,"__chat-wrapper"),chatHeader:"".concat(eN,"__chat-header"),backButton:"".concat(eN,"__back-button"),useful:"".concat(eN,"__useful"),usefulOpen:"".concat(eN,"__useful--open"),usefulTitle:"".concat(eN,"__useful-title"),usefulGrid:"".concat(eN,"__useful-grid"),removed:"".concat(eN,"__removed")}),eA=e=>{var t;let{data:n}=e,u=ed(),h=G(),d=(0,l.aF)("m"),[p,f]=(0,i.useState)(!0);(0,i.useEffect)(()=>{f(d)},[d]);let m=(0,i.useRef)(null),g=(0,i.useCallback)(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>u.openedSection?u.setOpenedSection(null):u.isNavigationOpen?u.setOpenedBlock(null):void 0,50)},[u]),_=(0,i.useRef)(!1),b=(0,i.useRef)(null),y=(0,i.useCallback)(()=>{p&&(_.current=!0,b.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,p]),w=(0,i.useCallback)(()=>{_.current=!1,window.onpopstate=b.current,window.history.go(-1)},[]),E=(0,i.useRef)(null),T=(0,i.useCallback)(e=>{if(p||!u.navMenuItemsRef.current||!u.navigationRef.current)return;let t=e.target,n=!u.navMenuItemsRef.current.contains(t)&&!u.navigationRef.current.contains(t);if(n&&!E.current){u.setIgnoreClicks(),E.current=setTimeout(()=>u.setOpenedBlock(null),300);return}!n&&E.current&&(clearTimeout(E.current),E.current=null)},[p,u]),N=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{typeof window>"u"||(e?(N.current=T,window.addEventListener("mousemove",N.current)):N.current&&window.removeEventListener("mousemove",N.current))},[T]);(0,i.useEffect)(()=>{C(u.isNavigationOpen),u.isNavigationOpen&&!_.current&&y(),!u.isNavigationOpen&&_.current&&w()},[u.isNavigationOpen]);let A=(e,t)=>()=>{x(o.D.button,t),u.setOpenedSection(e)},{start:S,clear:j}=$(),O=(e,t)=>()=>{p||S(A(e,t),200)},I=()=>{p||j()};return(0,r.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(eC.navigation,{[eC.removed]:!u.isNavigationMounted,[eC.navigationOpening]:u.isNavigationOpen,[eC.navigationClosing]:!u.isNavigationOpen}),children:(0,r.jsx)("div",{className:eC.wrapper,children:(0,r.jsxs)(a.W2,{className:(0,c.Z)(eC.container,{[eC.containerOpen]:!!u.openedSection}),children:[(0,r.jsxs)("div",{className:(0,c.Z)(eC.sections,{[eC.sectionsOpen]:!!u.openedSection}),children:[(0,r.jsx)(l.zx,{className:eC.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>h.handleButtonClick(!1),iconLeft:(0,r.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=h.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,r.jsxs)("ul",{className:(0,c.Z)(eC.sectionsWrapper,{[eC.removed]:u.openedBlock!==e.id&&!p}),children:[(0,r.jsx)("div",{className:eC.sectionsTitle,children:v[e.id]}),e.sections.map(e=>(0,r.jsxs)("li",{className:(0,c.Z)(eC.section,{[eC.sectionExtra]:!!e.extra,[eC.sectionActive]:u.openedSection===e.id}),onClick:A(e.id,e.title),onMouseEnter:O(e.id,e.title),onMouseLeave:I,children:[(0,r.jsx)(ex,{name:e.uikitIcon,background:e.uikitIconBg}),(0,r.jsx)("span",{className:eC.sectionTitle,children:e.title}),(0,r.jsx)("div",{className:eC.sectionArrow,children:(0,r.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,r.jsxs)("div",{className:eC.chatWrapper,children:[(0,r.jsx)("div",{className:eC.chatHeader,children:"Нужна помощь?"}),(0,r.jsx)(eg,{})]})]}),(0,r.jsxs)("button",{type:"button",className:(0,c.Z)(eC.backButton,{[eC.removed]:!u.openedSection}),onClick:()=>{x(o.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,r.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,r.jsx)("span",{children:"Назад"})]}),(0,r.jsx)(ew,{data:n,isMobile:p}),(0,r.jsxs)("div",{className:(0,c.Z)(eC.useful,{[eC.usefulOpen]:!!u.openedSection}),children:[(0,r.jsx)("div",{className:eC.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,r.jsx)(i.Fragment,{children:e.sections.map(e=>(0,r.jsx)("div",{className:(0,c.Z)(eC.usefulGrid,{[eC.removed]:u.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,r.jsxs)("a",{href:e.url,onClick:()=>x(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,r.jsx)("div",{children:(0,r.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:e.title,loading:"lazy"})}),(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id))},e.id))]})]})})})},eS=(e,t,n)=>{var r,i,o;let s=(null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r.findIndex(e=>{let{id:t}=e;return"news"===t}))||-1,a=(null==(o=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i[s])?void 0:o.content)||[];if(e&&Array.isArray(n)&&a.length){let r=n.map(e=>{let{title:n,url:r}=e;return{title:n,url:(0,u.xn)(t||"",r),new:0}});e.NAVIGATOR[s].content[0].links=r}return[{id:"FINPRODUCTS",sections:(null==e?void 0:e.FINPRODUCTS)||[]},{id:"NAVIGATOR",sections:(null==e?void 0:e.NAVIGATOR)||[]},{id:"ABOUT",sections:(null==e?void 0:e.ABOUT)||[]}]},ej=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:h="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:m,news:v}=e,_=ed(),b=eS(t,n,v),y=(0,i.useMemo)(()=>b.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[b]),w=_.isAuth?"Личный кабинет":"Войти",E=m&&_.isHeaderTransparent,T=(e,t,n,r)=>()=>{e!==_.openedBlock?x(o.D.toggle,t,"on"):x(o.D.button,"menu_close","on");let i=n?y[e]:"";_.setOpenedBlock(e,i,!!r)},{start:N,clear:C}=$(),A=(e,t,n,r)=>()=>{_.isNavigationOpen&&e===_.openedBlock||_.setIgnoreClicks(),N(T(e,t,n,r),200)},S=e=>()=>{_.ignoreClicks||e()},j=e=>_.openedBlock===e&&_.isNavigationOpen;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{className:(0,c.Z)(f.header,{[f.transparent]:E}),children:(0,r.jsx)("div",{className:(0,c.Z)(f.fixed,{[f.hidden]:_.isHeaderHidden,[f.navigationOpen]:_.isNavigationOpen}),children:(0,r.jsxs)(a.W2,{className:f.container,children:[(0,r.jsxs)("div",{className:f.leftRow,children:[(0,r.jsx)(ey,{className:f.logo,href:n,eventActionType:o.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,r.jsxs)("picture",{children:[(0,r.jsx)("source",{srcSet:(0,u.xn)(h,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,r.jsx)("img",{src:(0,u.xn)(h,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,r.jsx)("nav",{ref:_.navMenuItemsRef,className:f.menuItems,children:(0,r.jsx)("ul",{children:g.map(e=>{let{id:t,label:n}=e;return(0,r.jsx)("li",{children:(0,r.jsx)(l.zx,{className:(0,c.Z)({[f.menuItemActive]:j(t)}),label:n,variant:"white",size:"xs",onClick:S(T(t,n,!0)),onMouseEnter:A(t,n,!0,!0),onMouseLeave:C})},t)})})}),(0,r.jsx)(q,{className:(0,c.Z)(f.tabletMenuButton,{[f.menuItemActive]:_.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,r.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:T("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,r.jsxs)("div",{className:f.buttonGroup,children:[(0,r.jsxs)("div",{className:f.chips,children:[(0,r.jsx)(q,{onClick:()=>_.setIsChatModalOpen(!_.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,r.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,r.jsx)(q,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(d),iconLeft:(0,r.jsx)(s.IconFdsUserO,{size:24})})]}),(0,r.jsx)(q,{className:f.menuButton,size:"xs",shape:E?"icon":"default",appearance:E?"ghost":"fill",label:"Меню",onClick:T("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,r.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,r.jsxs)("div",{className:f.moreButtons,children:[(0,r.jsx)(eo,{initialTown:p}),(0,r.jsx)(eb,{}),(0,r.jsx)(q,{onClick:()=>_.setIsChatModalOpen(!_.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,r.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,r.jsx)(q,{as:"a",href:d,size:"xs",eventActionText:w,eventLabel:"".concat(w,"_").concat(d),label:w})]})]}),(0,r.jsxs)(ey,{className:f.auth,href:d,eventActionText:w,eventLabel:"".concat(w,"_").concat(d),children:[(0,r.jsx)(q,{size:"xs",shape:"circle-icon",iconLeft:(0,r.jsx)(s.IconFdsUserO,{}),eventActionText:w,eventLabel:"".concat(w,"_").concat(d)}),(0,r.jsx)("p",{children:w})]}),(0,r.jsx)("div",{className:f.close,children:(0,r.jsx)(q,{className:f.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,r.jsx)(s.IconFdsCloseO,{}),onClick:()=>_.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})})}),(0,r.jsx)("div",{className:(0,c.Z)(f.overlay,{[f.removed]:!_.isNavigationMounted,[f.overlayOpening]:_.isNavigationOpen,[f.overlayClosing]:!_.isNavigationOpen}),onClick:S(()=>_.setOpenedBlock(null))}),(0,r.jsx)(eA,{data:b,minioUrl:h})]})},eO=e=>(0,r.jsx)(ep,{isMainBannerPage:e.isMainBannerPage,children:(0,r.jsx)(ej,{...e})})}}]);