@elementor/elementor-one-assets 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +159 -0
  2. package/index.cjs.js +2 -0
  3. package/index.d.ts +53 -0
  4. package/index.esm.js +2 -0
  5. package/locales/de/assets-whatsnew.json +169 -0
  6. package/locales/de/common.json +5 -0
  7. package/locales/de/send-feedback.json +23 -0
  8. package/locales/en/assets-whatsnew.json +169 -0
  9. package/locales/en/common.json +12 -0
  10. package/locales/en/send-feedback.json +23 -0
  11. package/locales/es/assets-whatsnew.json +169 -0
  12. package/locales/es/common.json +5 -0
  13. package/locales/es/send-feedback.json +23 -0
  14. package/locales/fr/assets-whatsnew.json +169 -0
  15. package/locales/fr/common.json +5 -0
  16. package/locales/fr/send-feedback.json +23 -0
  17. package/locales/he-IL/assets-whatsnew.json +169 -0
  18. package/locales/he-IL/common.json +5 -0
  19. package/locales/he-IL/send-feedback.json +23 -0
  20. package/locales/id-ID/assets-whatsnew.json +169 -0
  21. package/locales/id-ID/common.json +5 -0
  22. package/locales/id-ID/send-feedback.json +23 -0
  23. package/locales/it/assets-whatsnew.json +169 -0
  24. package/locales/it/common.json +5 -0
  25. package/locales/it/send-feedback.json +23 -0
  26. package/locales/nl/assets-whatsnew.json +169 -0
  27. package/locales/nl/common.json +5 -0
  28. package/locales/nl/send-feedback.json +23 -0
  29. package/locales/pl-PL/assets-whatsnew.json +169 -0
  30. package/locales/pl-PL/common.json +5 -0
  31. package/locales/pl-PL/send-feedback.json +23 -0
  32. package/locales/pt-PT/assets-whatsnew.json +169 -0
  33. package/locales/pt-PT/common.json +5 -0
  34. package/locales/pt-PT/send-feedback.json +23 -0
  35. package/locales/tr-TR/assets-whatsnew.json +169 -0
  36. package/locales/tr-TR/common.json +5 -0
  37. package/locales/tr-TR/send-feedback.json +23 -0
  38. package/package.json +50 -0
package/index.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import { SxProps, Theme } from '@elementor/ui/styles';
3
+ import { SubscriptionAppType } from 'lib-shared-redux';
4
+ import * as react from 'react';
5
+ import { FC, ReactNode } from 'react';
6
+ import { SupportedLanguages } from 'lib-core-i18n';
7
+
8
+ type HeaderProps = {
9
+ appType: SubscriptionAppType;
10
+ multiDelpoymentSlot?: React.ReactNode;
11
+ colorScheme?: 'light' | 'dark';
12
+ containerSx?: SxProps<Theme>;
13
+ };
14
+ declare const ElementorOneHeader: React.FC<HeaderProps>;
15
+
16
+ type WhatsNewProps = {
17
+ containerSx?: SxProps<Theme>;
18
+ notificationsApiUrl?: string;
19
+ onCloseCallback?: () => void;
20
+ onItemClickedCallback?: () => void;
21
+ };
22
+ declare const WhatsNew: FC<WhatsNewProps>;
23
+
24
+ type SendFeedbackDialogProps = {
25
+ open: boolean;
26
+ colorScheme?: 'light' | 'dark';
27
+ onClose: () => void;
28
+ onSendFeedback: (data: FeedbackFormData) => void;
29
+ closeOnSubmit?: boolean;
30
+ resetFormOnClose?: boolean;
31
+ };
32
+ type FeedbackFormData = {
33
+ subject: string;
34
+ title: string;
35
+ description: string;
36
+ };
37
+ declare const SendFeedbackDialog: FC<SendFeedbackDialogProps>;
38
+
39
+ type Environment = 'local' | 'development' | 'staging' | 'production';
40
+ interface EnvConfig {
41
+ [key: string]: string;
42
+ }
43
+
44
+ declare const ElementorOneAssetsContext: react.Context<EnvConfig>;
45
+ interface ElementorOneAssetsProviderProps {
46
+ env: Environment;
47
+ language?: SupportedLanguages;
48
+ children: ReactNode;
49
+ }
50
+ declare const ElementorOneAssetsProvider: FC<ElementorOneAssetsProviderProps>;
51
+
52
+ export { ElementorOneAssetsContext, ElementorOneAssetsProvider, ElementorOneHeader, SendFeedbackDialog, WhatsNew };
53
+ export type { Environment, FeedbackFormData };
package/index.esm.js ADDED
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n from"@elementor/ui/AppBar";import i from"@elementor/ui/Stack";import s from"@elementor/ui/Toolbar";import o from"@elementor/ui/Typography";import a from"@elementor/ui/IconButton";import l from"@elementor/icons/BulbIcon";import c from"@elementor/icons/HelpIcon";import u from"@elementor/ui/Divider";import h from"@elementor/icons/UserIcon";import d from"@elementor/ui/Button";import p from"@elementor/ui/CircularProgress";import f,{bindTrigger as g,bindMenu as m}from"@elementor/ui/usePopupState";import y from"@elementor/ui/Menu";import b from"@elementor/ui/MenuItem";import v from"@elementor/ui/ListItemIcon";import S from"@elementor/ui/ListItemText";import E from"@elementor/icons/LogoutIcon";import{createSlice as _,createSelector as w}from"@reduxjs/toolkit";import A,{createContext as L,useContext as P,useCallback as x,useState as O,useRef as T,useEffect as k,useMemo as C}from"react";import{useDispatch as I,useSelector as N}from"react-redux";import R from"@elementor/ui/Avatar";import H from"@elementor/ui/DirectionProvider";import{ThemeProvider as B}from"@elementor/ui/styles";import F from"@elementor/icons/SpeakerphoneIcon";import D from"@elementor/ui/Drawer";import U from"@elementor/ui/Box";import M from"@elementor/ui/Chip";import V from"@elementor/icons/XIcon";import j from"@elementor/ui/Badge";import G from"@elementor/ui/Dialog";import $ from"@elementor/ui/DialogContent";import z from"@elementor/ui/DialogActions";import K from"@elementor/ui/DialogTitle";import q from"@elementor/ui/FormControl";import X from"@elementor/ui/TextField";import W from"@elementor/ui/DialogHeader";import J from"@elementor/ui/Autocomplete";import Y from"@elementor/ui/Alert";import Z from"@elementor/ui/AlertAction";import Q from"@elementor/ui/SvgIcon";const ee=A.forwardRef(((t,r)=>e(Q,{viewBox:"0 0 25 24",...t,ref:r,children:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.1207 0C5.42401 0 0 5.37 0 12C0 18.63 5.42401 24 12.1207 24C18.8174 24 24.2414 18.63 24.2414 12C24.2414 5.37 18.8174 0 12.1207 0ZM8.48448 18H6.06034V6H8.48448V18ZM18.181 18H10.9086V15.6H18.181V18ZM18.181 13.2H10.9086V10.8H18.181V13.2ZM18.181 8.4H10.9086V6H18.181V8.4Z",fill:"currentColor"})})}))),te={};function re(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];oe(t[0])&&te[t[0]]||(oe(t[0])&&(te[t[0]]=new Date),function(){if(console&&console.warn){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];oe(t[0])&&(t[0]="react-i18next:: "+t[0]),console.warn(...t)}}(...t))}const ne=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout((()=>{e.off("initialized",r)}),0),t()};e.on("initialized",r)}},ie=(e,t,r)=>{e.loadNamespaces(t,ne(e,r))},se=(e,t,r,n)=>{oe(r)&&(r=[r]),r.forEach((t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)})),e.loadLanguages(t,ne(e,n))},oe=e=>"string"==typeof e,ae=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,le={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ce=e=>le[e];let ue,he={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(ae,ce)};const de={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};he={...he,...e}}(e.options.react),(e=>{ue=e})(e)}},pe=L();class fe{addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}constructor(){this.getUsedNamespaces=()=>Object.keys(this.usedNamespaces),this.usedNamespaces={}}}const ge=(e,t,r,n)=>e.getFixedT(t,r,n),me=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:r}=t,{i18n:n,defaultNS:i}=P(pe)||{},s=r||n||ue;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new fe),!s){re("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return oe(t)?t:"object"==typeof(r=t)&&null!==r&&oe(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var r},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react&&void 0!==s.options.react.wait&&re("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...he,...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let c=e||i||s.options&&s.options.defaultNS;c=oe(c)?[c]:c||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(c);const u=(s.isInitialized||s.initializedStoreOnce)&&c.every((e=>function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(t,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=t.languages[0],i=!!t.options&&t.options.fallbackLng,s=t.languages[t.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,r)=>{const n=t.services.backendConnector.state[`${e}|${r}`];return-1===n||2===n};return!(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(n,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(n,e)||i&&!o(s,e)))}(e,t,r):(re("i18n.languages were undefined or empty",t.languages),!0)}(e,s,o))),h=((e,t,r,n)=>x(ge(e,t,r,n),[e,t,r,n]))(s,t.lng||null,"fallback"===o.nsMode?c:c[0],l),d=()=>h,p=()=>ge(s,t.lng||null,"fallback"===o.nsMode?c:c[0],l),[f,g]=O(d);let m=c.join();t.lng&&(m=`${t.lng}${m}`);const y=(e=>{const t=T();return k((()=>{t.current=e}),[e,void 0]),t.current})(m),b=T(!0);k((()=>{const{bindI18n:e,bindI18nStore:r}=o;b.current=!0,u||a||(t.lng?se(s,t.lng,c,(()=>{b.current&&g(p)})):ie(s,c,(()=>{b.current&&g(p)}))),u&&y&&y!==m&&b.current&&g(p);const n=()=>{b.current&&g(p)};return e&&s&&s.on(e,n),r&&s&&s.store.on(r,n),()=>{b.current=!1,e&&s&&e.split(" ").forEach((e=>s.off(e,n))),r&&s&&r.split(" ").forEach((e=>s.store.off(e,n)))}}),[s,m]),k((()=>{b.current&&u&&g(d)}),[s,l,u]);const v=[f,s,u];if(v.t=f,v.i18n=s,v.ready=u,u)return v;if(!u&&!a)return v;throw new Promise((e=>{t.lng?se(s,t.lng,c,(()=>e())):ie(s,c,(()=>e()))}))},ye={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class be{init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ye,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new be(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new be(this.logger,e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}}var ve=new be;class Se{on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach((e=>{let[t,n]=e;for(let e=0;n>e;e++)t(...r)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((t=>{let[n,i]=t;for(let t=0;i>t;t++)n.call(n,e,...r)}))}constructor(){this.observers={}}}const Ee=()=>{let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));return r.resolve=e,r.reject=t,r},_e=e=>null==e?"":""+e,we=/###/g,Ae=e=>e&&e.indexOf("###")>-1?e.replace(we,"."):e,Le=e=>!e||"string"==typeof e,Pe=(e,t,r)=>{const n="string"!=typeof t?t:t.split(".");let i=0;for(;i<n.length-1;){if(Le(e))return{};const t=Ae(n[i]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Le(e)?{}:{obj:e,k:Ae(n[i])}},xe=(e,t,r)=>{const{obj:n,k:i}=Pe(e,t,Object);if(void 0!==n||1===t.length)return void(n[i]=r);let s=t[t.length-1],o=t.slice(0,t.length-1),a=Pe(e,o,Object);for(;void 0===a.obj&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Pe(e,o,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${s}`]&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},Oe=(e,t)=>{const{obj:r,k:n}=Pe(e,t);if(r)return r[n]},Te=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):Te(e[n],t[n],r):e[n]=t[n]);return e},ke=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ie=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Ce[e])):e,Ne=[" ",",","?","!",";"],Re=new class{getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const r=RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}}(20),He=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let e=0;e<n.length;){if(!i||"object"!=typeof i)return;let t,s="";for(let o=e;o<n.length;++o)if(o!==e&&(s+=r),s+=n[o],t=i[s],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}i=t}return i},Be=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Fe extends Se{addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):"string"==typeof r&&i?o.push(...r.split(i)):o.push(r)));const a=Oe(this.data,o);return a||t||r||-1>=e.indexOf(".")||(e=o[0],t=o[1],r=o.slice(2).join(".")),a||!s||"string"!=typeof r?a:He(this.data&&this.data[e]&&this.data[e][t],r,i)}addResource(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=[e,t];r&&(o=o.concat(s?r.split(s):r)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),xe(this.data,o,n),i.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in r)("string"==typeof r[n]||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=r,r=t,t=o[1]),this.addNamespaces(t);let a=Oe(this.data,o)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?Te(a,r,i):a={...a,...r},xe(this.data,o,a),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}}var De={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,i))})),t}};const Ue={};class Me extends Se{changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const s=r&&e.indexOf(r)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=Ne.filter((e=>0>t.indexOf(e)&&0>r.indexOf(e)));if(0===n.length)return!0;const i=Re.getRegExp(`(${n.map((e=>"?"===e?"\\?":e)).join("|")})`);let s=!i.test(e);if(!s){const t=e.indexOf(r);t>0&&!i.test(e.substring(0,t))&&(s=!0)}return s})(e,r,n));if(s&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i};const s=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(s[0])>-1)&&(i=s.shift()),e=s.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}translate(e,t,r){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[e+""]);const n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],t),a=o[o.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${a}${e}${s}`,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${s}`}return n?{res:s,usedKey:s,exactUsedKey:s,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:s}const u=this.resolve(e,t);let h=u&&u.res;const d=u&&u.usedKey||s,p=u&&u.exactUsedKey||s,f=Object.prototype.toString.apply(h),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&h&&"string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(f)&&("string"!=typeof g||!Array.isArray(h))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...t,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return n?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(i){const e=Array.isArray(h),r=e?[]:{},n=e?p:d;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const s=`${n}${i}${e}`;r[e]=this.translate(s,{...t,joinArrays:!1,ns:o}),r[e]===s&&(r[e]=h[e])}h=r}}else if(m&&"string"==typeof g&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,e,t,r));else{let n=!1,o=!1;const c=void 0!==t.count&&"string"!=typeof t.count,d=Me.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t["defaultValue"+p]||t["defaultValue"+f]||t.defaultValue;!this.isValidLookup(h)&&d&&(n=!0,h=m),this.isValidLookup(h)||(o=!0,h=s);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:h,b=d&&m!==h&&this.options.updateMissing;if(o||n||b){if(this.logger.log(b?"updateKey":"missingKey",l,a,s,b?m:h),i){const e=this.resolve(s,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t<r.length;t++)e.push(r[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const n=(e,r,n)=>{const i=d&&n!==h?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,r,i,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,r,i,b,t),this.emit("missingKey",e,a,r,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const r=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>r.indexOf(this.options.pluralSeparator+"zero")&&r.push(this.options.pluralSeparator+"zero"),r.forEach((r=>{n([e],s+r,t["defaultValue"+r]||m)}))})):n(e,s,m))}h=this.extendTranslation(h,e,t,u,r),o&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${s}`),(o||n)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${s}`:s,n?h:void 0):this.options.parseMissingKeyHandler(h))}return n?(u.res=h,u.usedParams=this.getUsedParamsDetails(t),u):h}extendTranslation(e,t,r,n,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const o="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||n.usedLng,r),o){const t=e.match(this.interpolator.nestingRegexp);(t&&t.length)>a&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=Array(e),o=0;e>o;o++)n[o]=arguments[o];return i&&i[0]===n[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):s.translate(...n,t)}),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a="string"==typeof o?[o]:o;return null!=e&&a&&a.length&&!1!==r.applyPostProcessor&&(e=De.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t,r,n,i,s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,o),l=a.key;r=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==o.count&&"string"!=typeof o.count,h=u&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(s=e,!Ue[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Ue[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((r=>{if(this.isValidLookup(t))return;i=r;const s=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,o);else{let e;u&&(e=this.pluralResolver.getSuffix(r,o.count,o));const t=this.options.pluralSeparator+"zero",n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(s.push(l+e),o.ordinal&&0===e.indexOf(n)&&s.push(l+e.replace(n,this.options.pluralSeparator)),h&&s.push(l+t)),d){const r=`${l}${this.options.contextSeparator}${o.context}`;s.push(r),u&&(s.push(r+e),o.ordinal&&0===e.indexOf(n)&&s.push(r+e.replace(n,this.options.pluralSeparator)),h&&s.push(r+t))}}let a;for(;a=s.pop();)this.isValidLookup(t)||(n=a,t=this.getResource(r,e,a,o))})))}))})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:s}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&"string"!=typeof e.replace;let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,n;super(),r=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{r[e]&&(n[e]=r[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=ve.create("translator")}}const Ve=e=>e.charAt(0).toUpperCase()+e.slice(1);class je{getScriptPartFromCode(e){if(!(e=Be(e))||0>e.indexOf("-"))return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Be(e))||0>e.indexOf("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map((e=>e.toLowerCase())):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ve(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ve(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ve(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find((e=>e===r?e:0>e.indexOf("-")&&0>r.indexOf("-")?void 0:e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],i=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn("rejecting language code not found in supportedLngs: "+e))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((e=>{0>n.indexOf(e)&&i(this.formatLanguageCode(e))})),n}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ve.create("languageUtils")}}let Ge=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$e={1:e=>+(e>1),2:e=>+(1!=e),3:e=>0,4:e=>+(e%10==1&&e%100!=11?0:2>e%10||e%10>4||e%100>=10&&20>e%100?2:1),5:e=>+(0==e?0:1==e?1:2==e?2:3>e%100||e%100>10?11>e%100?5:4:3),6:e=>+(1==e?0:2>e||e>4?2:1),7:e=>+(1==e?0:2>e%10||e%10>4||e%100>=10&&20>e%100?2:1),8:e=>+(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>+(e>=2),10:e=>+(1==e?0:2==e?1:7>e?2:11>e?3:4),11:e=>+(1==e||11==e?0:2==e||12==e?1:e>2&&20>e?2:3),12:e=>+(e%10!=1||e%100==11),13:e=>+(0!==e),14:e=>+(1==e?0:2==e?1:3==e?2:3),15:e=>+(e%10==1&&e%100!=11?0:2>e%10||e%100>=10&&20>e%100?2:1),16:e=>+(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>+(1==e||e%10==1&&e%100!=11?0:1),18:e=>+(0==e?0:1==e?1:2),19:e=>+(1==e?0:0==e||e%100>1&&11>e%100?1:e%100>10&&20>e%100?2:3),20:e=>+(1==e?0:0==e||e%100>0&&20>e%100?1:2),21:e=>+(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>+(1==e?0:2==e?1:(0>e||e>10)&&e%10==0?2:3)};const ze=["v1","v2","v3"],Ke=["v4"],qe={zero:0,one:1,two:2,few:3,many:4,other:5};class Xe{addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Be("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:n});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const s=new Intl.PluralRules(r,{type:n});return this.pluralRulesCache[i]=s,s}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(((e,t)=>qe[e]-qe[t])).map((e=>`${this.options.prepend}${t.ordinal?"ordinal"+this.options.prepend:""}${e}`)):r.numbers.map((r=>this.getSuffix(e,r,t))):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?"ordinal"+this.options.prepend:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: "+e),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const i=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?"_plural_"+n.toString():i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!ze.includes(this.options.compatibilityJSON)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=ve.create("pluralResolver"),this.options.compatibilityJSON&&!Ke.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return Ge.forEach((t=>{t.lngs.forEach((r=>{e[r]={numbers:t.nr,plurals:$e[t.fc]}}))})),e})(),this.pluralRulesCache={}}}const We=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=4>=arguments.length||void 0===arguments[4]||arguments[4],s=((e,t,r)=>{const n=Oe(e,r);return void 0!==n?n:Oe(t,r)})(e,t,r);return!s&&i&&"string"==typeof r&&(s=He(e,r,n),void 0===s&&(s=He(t,r,n))),s},Je=e=>e.replace(/\$/g,"$$$$");class Ye{init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:Ie,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=i?ke(i):s||"{{",this.suffix=o?ke(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?ke(h):d||ke("$t("),this.nestingSuffix=p?ke(p):f||ke(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let i,s,o;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){const i=We(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,r,{...n,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),s=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(We(t,a,s,this.options.keySeparator,this.options.ignoreJSONStructure),o,r,{...n,...t,interpolationkey:s})};this.resetRegExp();const c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,u=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Je(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Je(this.escape(e)):Je(e)}].forEach((t=>{for(o=0;i=t.regex.exec(e);){const r=i[1].trim();if(s=l(r),void 0===s)if("function"==typeof c){const t=c(e,i,n);s="string"==typeof t?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))s="";else{if(u){s=i[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),s=""}else"string"==typeof s||this.useRawValueToEscape||(s=_e(s));const a=t.safeValue(s);if(e=e.replace(i[0],a),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),e}nest(e,t){let r,n,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=(e,t)=>{const r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;const n=e.split(RegExp(r+"[ ]*{"));let s="{"+n[1];e=n[0],s=this.interpolate(s,i);const o=s.match(/'/g),a=s.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{i=JSON.parse(s),t&&(i={...t,...i})}catch(t){return this.logger.warn("failed parsing options string in nesting for key "+e,t),`${e}${r}${s}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let a=[];i={...s},i=i.replace&&"string"!=typeof i.replace?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map((e=>e.trim()));r[1]=e.shift(),a=e,l=!0}if(n=t(o.call(this,r[1].trim(),i),i),n&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=_e(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),l&&(n=a.reduce(((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:r[1].trim()})),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=ve.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}}const Ze=e=>{const t={};return(r,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=n+JSON.stringify(s);let a=t[o];return a||(a=e(Be(n),i),t[o]=a),a(r)}};class Qe{init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ze(t)}format(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&0>i[0].indexOf(")")&&i.find((e=>e.indexOf(")")>-1))){const e=i.findIndex((e=>e.indexOf(")")>-1));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce(((e,t)=>{const{formatName:i,formatOptions:s}=(e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);"currency"===t&&0>i.indexOf(":")?r.currency||(r.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?r.range||(r.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...n]=e.split(":"),i=n.join(":").trim().replace(/^'+|'+$/g,""),s=t.trim();r[s]||(r[s]=i),"false"===i&&(r[s]=!1),"true"===i&&(r[s]=!0),isNaN(i)||(r[s]=parseInt(i,10))}}))}return{formatName:t,formatOptions:r}})(t);if(this.formats[i]){let t=e;try{const o=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=o.locale||o.lng||n.locale||n.lng||r;t=this.formats[i](e,a,{...s,...n,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn("there was no format function for "+i),e}),e)}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=ve.create("formatter"),this.options=e,this.formats={number:Ze(((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)})),currency:Ze(((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)})),datetime:Ze(((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)})),relativetime:Ze(((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")})),list:Ze(((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)}))},this.init(e)}}class et extends Se{queueLoad(e,t,r,n){const i={},s={},o={},a={};return e.forEach((e=>{let n=!0;t.forEach((t=>{const o=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:0>this.state[o]||(1===this.state[o]?void 0===s[o]&&(s[o]=!0):(this.state[o]=1,n=!1,void 0===s[o]&&(s[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===a[t]&&(a[t]=!0)))})),n||(o[e]=!0)})),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,r){const n=e.split("|"),i=n[0],s=n[1];t&&this.emit("failedLoading",i,s,t),!t&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const o={};this.queue.forEach((r=>{((e,t,r)=>{const{obj:n,k:i}=Pe(e,t,Object);n[i]=n[i]||[],n[i].push(r)})(r.loaded,[i],s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((e=>{o[e]||(o[e]={});const t=r.loaded[e];t.length&&t.forEach((t=>{void 0===o[e][t]&&(o[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((e=>!e.done))}read(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:i,callback:s});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,r,n+1,2*i,s)}),i):s(o,a)},a=this.backend[r].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const r=a(e,t);r&&"function"==typeof r.then?r.then((e=>o(null,e))).catch(o):o(null,r)}catch(e){o(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const i=this.queueLoad(e,t,r,n);if(!i.toLoad.length)return i.pending.length||n(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],i=r[1];this.read(n,i,"read",void 0,void 0,((r,s)=>{r&&this.logger.warn(`${t}loading namespace ${i} for language ${n} failed`,r),!r&&s&&this.logger.log(`${t}loaded namespace ${i} for language ${n}`,s),this.loaded(e,r,s)}))}saveMissing(e,t,r,n,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){const a={...s,isUpdate:i},l=this.backend.create.bind(this.backend);if(6>l.length)try{let i;i=5===l.length?l(e,t,r,n,a):l(e,t,r,n),i&&"function"==typeof i.then?i.then((e=>o(null,e))).catch(o):o(null,i)}catch(e){o(e)}else l(e,t,r,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=ve.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=0>n.maxRetries?5:n.maxRetries,this.retryTimeout=1>n.retryTimeout?350:n.retryTimeout,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,n.backend,n)}}const tt=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach((e=>{t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),rt=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),nt=()=>{};class it extends Se{init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));const n=tt();this.options={...n,...this.options,...rt(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?ve.init(i(this.modules.logger),this.options):ve.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Qe);const r=new je(this.options);this.store=new Fe(this.options.resources,this.options);const s=this.services;s.logger=ve,s.resourceStore=this.store,s.languageUtils=r,s.pluralResolver=new Xe(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(s.formatter=i(t),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new Ye(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new et(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;r>i;i++)n[i-1]=arguments[i];e.emit(t,...n)})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Me(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;r>i;i++)n[i-1]=arguments[i];e.emit(t,...n)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,r||(r=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const s=Ee(),o=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(t),r(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?o():setTimeout(o,0),s}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;const r="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)}))};r?n(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>n(e))),this.options.preload&&this.options.preload.forEach((e=>n(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,r){const n=Ee();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=nt),this.services.backendConnector.reload(e,t,(e=>{n.resolve(),r(e)})),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&De.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&-1>=["cimode","dev"].indexOf(e))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(-1>=["cimode","dev"].indexOf(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const n=Ee();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(e,s)=>{s?(i(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,n.resolve((function(){return r.t(...arguments)})),t&&t(e,(function(){return r.t(...arguments)}))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const r="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||i(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,(e=>{s(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,r){var n=this;const i=function(e,t){let s;if("object"!=typeof t){for(var o=arguments.length,a=Array(o>2?o-2:0),l=2;o>l;l++)a[l-2]=arguments[l];s=n.options.overloadTranslationOptionHandler([e,t].concat(a))}else s={...t};s.lng=s.lng||i.lng,s.lngs=s.lngs||i.lngs,s.ns=s.ns||i.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||r||i.keyPrefix);const c=n.options.keySeparator||".";let u;return u=s.keyPrefix&&Array.isArray(e)?e.map((e=>`${s.keyPrefix}${c}${e}`)):s.keyPrefix?`${s.keyPrefix}${c}${e}`:e,n.t(u,s)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const s=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,s);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!s(r,e)||n&&!s(i,e)))}loadNamespaces(e,t){const r=Ee();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)})),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Ee();"string"==typeof e&&(e=[e]);const n=this.options.preload||[],i=e.filter((e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=n.concat(i),this.loadResources((e=>{r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new je(tt());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},i=new it(n);return void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Fe(this.store.data,n),i.services.resourceStore=i.store),i.translator=new Me(i.services,n),i.translator.on("*",(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];i.emit(e,...r)})),i.init(n,t),i.translator.options=n,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=rt(e),this.services={},this.logger=ve,this.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(r=this)).forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}}const st=it.createInstance();function ot(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var s="string"!=typeof t?[].concat(t):t.split(".");s.length>1;){if(i())return{};var o=n(s.shift());!e[o]&&r&&(e[o]=new r),e=e[o]}return i()?{}:{obj:e,k:n(s.shift())}}st.createInstance=it.createInstance;var at=[],lt=at.forEach,ct=at.slice,ut=function(e,t){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},ut(e,t)};function ht(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");function r(){this.constructor=e}ut(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var dt,pt,ft,gt=function(){return gt=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gt.apply(this,arguments)};function mt(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;s>i;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function yt(e){return e.type===pt.literal}function bt(e){return e.type===pt.argument}function vt(e){return e.type===pt.number}function St(e){return e.type===pt.date}function Et(e){return e.type===pt.time}function _t(e){return e.type===pt.select}function wt(e){return e.type===pt.plural}function At(e){return e.type===pt.pound}function Lt(e){return e.type===pt.tag}function Pt(e){return!(!e||"object"!=typeof e||e.type!==ft.number)}function xt(e){return!(!e||"object"!=typeof e||e.type!==ft.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(dt||(dt={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(pt||(pt={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(ft||(ft={}));var Ot=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Tt=/(?:[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;function kt(e){var t={};return e.replace(Tt,(function(e){var r=e.length;switch(e[0]){case"G":t.era=4===r?"long":5===r?"narrow":"short";break;case"y":t.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(4>r)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(4>r)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=4>r?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var Ct=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,It=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Nt=/^(@+)?(\+|#+)?[rs]?$/g,Rt=/(\*)(0+)|(#+)(0+)|(0+)/g,Ht=/^(0+)$/;function Bt(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Nt,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function Ft(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 Dt(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 r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!Ht.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ut(e){return Ft(e)||{}}function Mt(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=i.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=gt(gt(gt({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return gt(gt({},e),Ut(t))}),{}));continue;case"engineering":t=gt(gt(gt({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return gt(gt({},e),Ut(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(i.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(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Rt,(function(e,r,n,i,s,o){if(r)t.minimumIntegerDigits=n.length;else{if(i&&s)throw Error("We currently do not support maximum integer digits");if(o)throw Error("We currently do not support exact integer digits")}return""}));continue}if(Ht.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(It.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(It,(function(e,r,n,i,s,o){return"*"===n?t.minimumFractionDigits=r.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:s&&o?(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length+o.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""}));var s=i.options[0];"w"===s?t=gt(gt({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=gt(gt({},t),Bt(s)))}else if(Nt.test(i.stem))t=gt(gt({},t),Bt(i.stem));else{var o=Ft(i.stem);o&&(t=gt(gt({},t),o));var a=Dt(i.stem);a&&(t=gt(gt({},t),a))}}return t}var Vt,jt={"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"]};function Gt(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(jt[r||""]||jt[n||""]||jt["".concat(n,"-001")]||jt["001"])[0]}var $t=RegExp("^".concat(Ot.source,"*")),zt=RegExp("".concat(Ot.source,"*$"));function Kt(e,t){return{start:e,end:t}}var qt=!!String.prototype.startsWith&&!0,Xt=!!String.fromCodePoint,Wt=!!Object.fromEntries,Jt=!!String.prototype.codePointAt,Yt=!!String.prototype.trimStart,Zt=!!String.prototype.trimEnd,Qt=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&9007199254740991>=Math.abs(e)},er=!0;try{er="a"===(null===(Vt=lr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Vt?void 0:Vt[0])}catch(e){er=!1}var tr,rr=qt?function(e,t,r){return e.startsWith(t,r)}:function(e,t,r){return e.slice(r,r+t.length)===t},nr=Xt?String.fromCodePoint:function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];for(var r,n="",i=e.length,s=0;i>s;){if((r=e[s++])>1114111)throw RangeError(r+" is not a valid code point");n+=65536>r?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},ir=Wt?Object.fromEntries:function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],s=i[0],o=i[1];t[s]=o}return t},sr=Jt?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(t>=0&&r>t){var n,i=e.charCodeAt(t);return 55296>i||i>56319||t+1===r||56320>(n=e.charCodeAt(t+1))||n>57343?i:n-56320+(i-55296<<10)+65536}},or=Yt?function(e){return e.trimStart()}:function(e){return e.replace($t,"")},ar=Zt?function(e){return e.trimEnd()}:function(e){return e.replace(zt,"")};function lr(e,t){return RegExp(e,t)}if(er){var cr=lr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");tr=function(e,t){var r;return cr.lastIndex=t,null!==(r=cr.exec(e)[1])&&void 0!==r?r:""}}else tr=function(e,t){for(var r=[];;){var n=sr(e,t);if(void 0===n||dr(n)||pr(n))break;r.push(n),t+=65536>n?1:2}return nr.apply(void 0,r)};var ur=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,r){for(var n=[];!this.isEOF();){var i=this.char();if(123===i){if((s=this.parseArgument(e,r)).err)return s;n.push(s.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(dt.UNMATCHED_CLOSING_TAG,Kt(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&hr(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;n.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;n.push(s.val)}}else{var o=this.clonePosition();this.bump(),n.push({type:pt.pound,location:Kt(o,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:pt.literal,value:"<".concat(n,"/>"),location:Kt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var s=i.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!hr(this.char()))return this.error(dt.INVALID_TAG,Kt(o,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(dt.UNMATCHED_CLOSING_TAG,Kt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:pt.tag,value:n,children:s,location:Kt(r,this.clonePosition())},err:null}:this.error(dt.INVALID_TAG,Kt(o,this.clonePosition())))}return this.error(dt.UNCLOSED_TAG,Kt(r,this.clonePosition()))}return this.error(dt.INVALID_TAG,Kt(r,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&57>=e||95===e||e>=97&&122>=e||e>=65&&90>=e||183==e||e>=192&&214>=e||e>=216&&246>=e||e>=248&&893>=e||e>=895&&8191>=e||e>=8204&&8205>=e||e>=8255&&8256>=e||e>=8304&&8591>=e||e>=11264&&12271>=e||e>=12289&&55295>=e||e>=63744&&64975>=e||e>=65008&&65533>=e||e>=65536&&983039>=e);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var s=this.tryParseUnquoted(e,t);if(s)n+=s;else{var o=this.tryParseLeftAngleBracket();if(!o)break;n+=o}}}var a=Kt(r,this.clonePosition());return{val:{type:pt.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(hr(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},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 r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(r);this.bump()}return nr.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),nr(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(dt.EXPECT_ARGUMENT_CLOSING_BRACE,Kt(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(dt.EMPTY_ARGUMENT,Kt(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(dt.MALFORMED_ARGUMENT,Kt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(dt.EXPECT_ARGUMENT_CLOSING_BRACE,Kt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:pt.argument,value:n,location:Kt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(dt.EXPECT_ARGUMENT_CLOSING_BRACE,Kt(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(dt.MALFORMED_ARGUMENT,Kt(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=tr(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Kt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var i,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(dt.EXPECT_ARGUMENT_TYPE,Kt(s,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=ar(y.val)).length)return this.error(dt.EXPECT_ARGUMENT_STYLE,Kt(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Kt(c,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var u=Kt(n,this.clonePosition());if(l&&rr(null==l?void 0:l.style,"::",0)){var h=or(l.style.slice(2));if("number"===o)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:pt.number,value:r,location:u,style:y.val},err:null};if(0===h.length)return this.error(dt.EXPECT_DATE_TIME_SKELETON,u);var d=h;this.locale&&(d=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if("j"===i){for(var s=0;n+1<e.length&&e.charAt(n+1)===i;)s++,n++;var o=1+(1&s),a=2>s?1:3+(s>>1),l=Gt(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)r+="a";for(;o-- >0;)r=l+r}else r+="J"===i?"H":i}return r}(h,this.locale));var p={type:ft.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?kt(d):{}};return{val:{type:"date"===o?pt.date:pt.time,value:r,location:u,style:p},err:null}}return{val:{type:"number"===o?pt.number:"date"===o?pt.date:pt.time,value:r,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(dt.EXPECT_SELECT_ARGUMENT_OPTIONS,Kt(f,gt({},f)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),m=0;if("select"!==o&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(dt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Kt(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(dt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,dt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=y.val}var b,v=this.tryParsePluralOrSelectOptions(e,o,t,g);if(v.err)return v;if((b=this.tryParseArgumentClose(n)).err)return b;var S=Kt(n,this.clonePosition());return"select"===o?{val:{type:pt.select,value:r,options:ir(v.val),location:S},err:null}:{val:{type:pt.plural,value:r,options:ir(v.val),offset:m,pluralType:"plural"===o?"cardinal":"ordinal",location:S},err:null};default:return this.error(dt.INVALID_ARGUMENT_TYPE,Kt(s,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(dt.EXPECT_ARGUMENT_CLOSING_BRACE,Kt(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 r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(dt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Kt(r,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(0>=e)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 r=[];try{r=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");for(var t=[],r=0,n=e.split(Ct).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw Error("Invalid number skeleton");for(var s=i[0],o=i.slice(1),a=0,l=o;a<l.length;a++)if(0===l[a].length)throw Error("Invalid number skeleton");t.push({stem:s,options:o})}return t}(e)}catch(e){return this.error(dt.INVALID_NUMBER_SKELETON,t)}return{val:{type:ft.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?Mt(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){for(var i,s=!1,o=[],a=new Set,l=n.value,c=n.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(dt.EXPECT_PLURAL_ARGUMENT_SELECTOR,dt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Kt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(a.has(l))return this.error("select"===t?dt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:dt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(s=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?dt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:dt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Kt(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var f=this.tryParseArgumentClose(d);if(f.err)return f;o.push([l,{value:p.val,location:Kt(d,this.clonePosition())}]),a.add(l),this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===o.length?this.error("select"===t?dt.EXPECT_SELECT_ARGUMENT_SELECTOR:dt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Kt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(dt.MISSING_OTHER_CLAUSE,Kt(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var o=this.char();if(48>o||o>57)break;i=!0,s=10*s+(o-48),this.bump()}var a=Kt(n,this.clonePosition());return i?Qt(s*=r)?{val:s,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=sr(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+=65536>e?1:2)}},e.prototype.bumpIf=function(e){if(rr(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(),r=this.message.indexOf(e,t);return 0>r?(this.bumpTo(this.message.length),!1):(this.bumpTo(r),!0)},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()&&dr(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),r=this.message.charCodeAt(t+(65536>e?1:2));return null!=r?r:null},e}();function hr(e){return e>=97&&122>=e||e>=65&&90>=e}function dr(e){return e>=9&&13>=e||32===e||133===e||e>=8206&&8207>=e||8232===e||8233===e}function pr(e){return e>=33&&35>=e||36===e||e>=37&&39>=e||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&47>=e||e>=58&&59>=e||e>=60&&62>=e||e>=63&&64>=e||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&165>=e||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&8213>=e||e>=8214&&8215>=e||8216===e||8217===e||8218===e||e>=8219&&8220>=e||8221===e||8222===e||8223===e||e>=8224&&8231>=e||e>=8240&&8248>=e||8249===e||8250===e||e>=8251&&8254>=e||e>=8257&&8259>=e||8260===e||8261===e||8262===e||e>=8263&&8273>=e||8274===e||8275===e||e>=8277&&8286>=e||e>=8592&&8596>=e||e>=8597&&8601>=e||e>=8602&&8603>=e||e>=8604&&8607>=e||8608===e||e>=8609&&8610>=e||8611===e||e>=8612&&8613>=e||8614===e||e>=8615&&8621>=e||8622===e||e>=8623&&8653>=e||e>=8654&&8655>=e||e>=8656&&8657>=e||8658===e||8659===e||8660===e||e>=8661&&8691>=e||e>=8692&&8959>=e||e>=8960&&8967>=e||8968===e||8969===e||8970===e||8971===e||e>=8972&&8991>=e||e>=8992&&8993>=e||e>=8994&&9e3>=e||9001===e||9002===e||e>=9003&&9083>=e||9084===e||e>=9085&&9114>=e||e>=9115&&9139>=e||e>=9140&&9179>=e||e>=9180&&9185>=e||e>=9186&&9254>=e||e>=9255&&9279>=e||e>=9280&&9290>=e||e>=9291&&9311>=e||e>=9472&&9654>=e||9655===e||e>=9656&&9664>=e||9665===e||e>=9666&&9719>=e||e>=9720&&9727>=e||e>=9728&&9838>=e||9839===e||e>=9840&&10087>=e||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&10175>=e||e>=10176&&10180>=e||10181===e||10182===e||e>=10183&&10213>=e||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&10239>=e||e>=10240&&10495>=e||e>=10496&&10626>=e||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&10711>=e||10712===e||10713===e||10714===e||10715===e||e>=10716&&10747>=e||10748===e||10749===e||e>=10750&&11007>=e||e>=11008&&11055>=e||e>=11056&&11076>=e||e>=11077&&11078>=e||e>=11079&&11084>=e||e>=11085&&11123>=e||e>=11124&&11125>=e||e>=11126&&11157>=e||11158===e||e>=11159&&11263>=e||e>=11776&&11777>=e||11778===e||11779===e||11780===e||11781===e||e>=11782&&11784>=e||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&11798>=e||11799===e||e>=11800&&11801>=e||11802===e||11803===e||11804===e||11805===e||e>=11806&&11807>=e||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&11822>=e||11823===e||e>=11824&&11833>=e||e>=11834&&11835>=e||e>=11836&&11839>=e||11840===e||11841===e||11842===e||e>=11843&&11855>=e||e>=11856&&11857>=e||11858===e||e>=11859&&11903>=e||e>=12289&&12291>=e||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&12307>=e||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&12319>=e||12320===e||12336===e||64830===e||64831===e||e>=65093&&65094>=e}function fr(e){e.forEach((function(e){if(delete e.location,_t(e)||wt(e))for(var t in e.options)delete e.options[t].location,fr(e.options[t].value);else vt(e)&&Pt(e.style)||(St(e)||Et(e))&&xt(e.style)?delete e.style.location:Lt(e)&&fr(e.children)}))}function gr(e,t){void 0===t&&(t={}),t=gt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new ur(e,t).parse();if(r.err){var n=SyntaxError(dt[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==t?void 0:t.captureLocation)||fr(r.val),r.val}function mr(e,t){var r=t&&t.cache?t.cache:Ar,n=t&&t.serializer?t.serializer:Er;return(t&&t.strategy?t.strategy:Sr)(e,{cache:r,serializer:n})}function yr(e,t,r,n){var i,s=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),o=t.get(s);return void 0===o&&(o=e.call(this,n),t.set(s,o)),o}function br(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return void 0===s&&(s=e.apply(this,n),t.set(i,s)),s}function vr(e,t,r,n,i){return r.bind(t,e,n,i)}function Sr(e,t){return vr(e,this,1===e.length?yr:br,t.cache.create(),t.serializer)}var Er=function(){return JSON.stringify(arguments)};function _r(){this.cache=Object.create(null)}_r.prototype.get=function(e){return this.cache[e]},_r.prototype.set=function(e,t){this.cache[e]=t};var wr,Ar={create:function(){return new _r}},Lr={variadic:function(e,t){return vr(e,this,br,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(wr||(wr={}));var Pr,xr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.code=r,i.originalMessage=n,i}return ht(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Or=function(e){function t(t,r,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),wr.INVALID_VALUE,i)||this}return ht(t,e),t}(xr),Tr=function(e){function t(t,r,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(r),wr.INVALID_VALUE,n)||this}return ht(t,e),t}(xr),kr=function(e){function t(t,r){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(r,'"'),wr.MISSING_VALUE,r)||this}return ht(t,e),t}(xr);function Cr(e){return"function"==typeof e}function Ir(e,t,r,n,i,s,o){if(1===e.length&&yt(e[0]))return[{type:Pr.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(yt(u))a.push({type:Pr.literal,value:u.value});else if(At(u))"number"==typeof s&&a.push({type:Pr.literal,value:r.getNumberFormat(t).format(s)});else{var h=u.value;if(!i||!(h in i))throw new kr(h,o);var d=i[h];if(bt(u))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?d+"":""),a.push({type:"string"==typeof d?Pr.literal:Pr.object,value:d});else if(St(u)){var p="string"==typeof u.style?n.date[u.style]:xt(u.style)?u.style.parsedOptions:void 0;a.push({type:Pr.literal,value:r.getDateTimeFormat(t,p).format(d)})}else if(Et(u))p="string"==typeof u.style?n.time[u.style]:xt(u.style)?u.style.parsedOptions:n.time.medium,a.push({type:Pr.literal,value:r.getDateTimeFormat(t,p).format(d)});else if(vt(u))(p="string"==typeof u.style?n.number[u.style]:Pt(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(d*=p.scale||1),a.push({type:Pr.literal,value:r.getNumberFormat(t,p).format(d)});else{if(Lt(u)){var f=u.children,g=u.value,m=i[g];if(!Cr(m))throw new Tr(g,"function",o);var y=m(Ir(f,t,r,n,i,s).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?Pr.literal:Pr.object,value:e}})))}if(_t(u)){if(!(b=u.options[d]||u.options.other))throw new Or(u.value,d,Object.keys(u.options),o);a.push.apply(a,Ir(b.value,t,r,n,i))}else if(wt(u)){var b;if(!(b=u.options["=".concat(d)])){if(!Intl.PluralRules)throw new xr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',wr.MISSING_INTL_API,o);var v=r.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new Or(u.value,d,Object.keys(u.options),o);a.push.apply(a,Ir(b.value,t,r,n,i,d-(u.offset||0)))}}}}return 2>(S=a).length?S:S.reduce((function(e,t){var r=e[e.length-1];return r&&r.type===Pr.literal&&t.type===Pr.literal?r.value+=t.value:e.push(t),e}),[]);var S}function Nr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(Pr||(Pr={}));var Rr=function(){function e(t,r,n,i){var s,o,a,l=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=l.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&t.type===Pr.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length>1?r:r[0]||""},this.formatToParts=function(e){return Ir(l.ast,l.locales,l.formatters,l.formats,e,void 0,l.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=l.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(i||{},["formatters"]);this.ast=e.__parse(t,gt(gt({},c),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(o=e.formats,(a=n)?Object.keys(o).reduce((function(e,t){var r,n;return e[t]=(r=o[t],(n=a[t])?gt(gt(gt({},r||{}),n||{}),Object.keys(r).reduce((function(e,t){return e[t]=gt(gt({},r[t]),n[t]||{}),e}),{})):r),e}),gt({},o)):o),this.formatters=i&&i.formatters||(void 0===(s=this.formatterCache)&&(s={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:mr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,mt([void 0],t,!1)))}),{cache:Nr(s.number),strategy:Lr.variadic}),getDateTimeFormat:mr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,mt([void 0],t,!1)))}),{cache:Nr(s.dateTime),strategy:Lr.variadic}),getPluralRules:mr((function(){for(var e,t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,mt([void 0],t,!1)))}),{cache:Nr(s.pluralRules),strategy:Lr.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 t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=gr,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}();function Hr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Br(e){for(var t=1;arguments.length>t;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(r),!0).forEach((function(t){Fr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Dr,Ur=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="i18nFormat",this.mem={},this.init(null,t)}return t=e,r=[{key:"init",value:function(e,t){var r=this,n=e&&e.options&&e.options.i18nFormat||{};if(this.options=function(e){return lt.call(ct.call(arguments,1),(function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])})),e}(n,t,this.options||{},{memoize:!0,memoizeFallback:!1,bindI18n:"",bindI18nStore:"",parseErrorHandler:function(e,t,r,n){return r},parseLngForICU:function(e){return e}}),this.formats=this.options.formats,e){var i=this.options,s=i.bindI18n,o=i.bindI18nStore,a=i.memoize;e.IntlMessageFormat=Rr,e.ICU=this,a&&(s&&e.on(s,(function(){return r.clearCache()})),o&&e.store.on(o,(function(){return r.clearCache()})))}}},{key:"addUserDefinedFormats",value:function(e){this.formats=this.formats?Br(Br({},this.formats),e):e}},{key:"parse",value:function(e,t,r,n,i,s){var o,a,l,c,u=s&&s.resolved&&s.resolved.res,h=this.options.memoize&&"".concat(r,".").concat(n,".").concat(i.replace(/\./g,"###"));this.options.memoize&&(o=function(e,t){var r=ot(e,t),n=r.obj,i=r.k;if(n)return n[i]}(this.mem,h));try{if(!o){var d=this.options.parseLngForICU(r);o=new Rr(e,d,this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!s||u)&&(a=this.mem,l=o,(c=ot(a,h,Object)).obj[c.k]=l)}return o.format(t)}catch(r){return this.options.parseErrorHandler(r,i,e,t)}}},{key:"addLookupKeys",value:function(e,t,r,n,i){return e}},{key:"clearCache",value:function(){this.mem={}}}],r&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),e;var t,r}();Ur.type="i18nFormat",function(e){e.EN="en",e.DE="de",e.ES="es",e.IT="it",e.NL="nl",e.PT="pt-PT",e.FR="fr",e.HE="he-IL"}(Dr||(Dr={}));const Mr={store:["he-IL"]};function Vr(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var jr=function e(t,r){function n(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=Vr({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var o in i)i[o]&&(s+="; "+o,!0!==i[o]&&(s+="="+i[o].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+s}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},i=0;i<r.length;i++){var s=r[i].split("="),o=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(n[a]=t.read(o,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",Vr({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Vr({},this.attributes,t))},withConverter:function(t){return e(Vr({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Gr{}Gr.defaultLanguage="en",Gr.normalizeLocale=e=>{const t=e.replace(/_/g,"-");try{return new Intl.Locale(t).toString()}catch(e){return Gr.defaultLanguage}},Gr.setSystemLanguage=e=>{const t=process.env.NX_PUBLIC_ELEMENTOR_SUBDOMAIN||void 0;jr.set("elementor_locale",Gr.convertToElementorLocale(e),{expires:Number.MAX_SAFE_INTEGER,path:"/",domain:t});const r=window.braze?.getUser();r&&r.setLanguage(e)},Gr.getSystemLanguage=()=>{const e=Gr.getSupportedLanguage(new URLSearchParams(window.location.search).get("lang")),t=Gr.getSupportedLanguage(jr.get("elementor_locale")),r=Gr.getSupportedLanguage(navigator.language||navigator.languages[0]);let n=Dr.EN;return e?n=e:t?n=t:r&&(n=r),Object.values(Dr).includes(n)?n:Dr.EN},Gr.isLanguageExcluded=e=>(Mr[process.env.NX_PUBLIC_PROJECT_NAME||""]||[]).includes(e),Gr.getSupportedLanguages=()=>Object.values(Dr).filter((e=>!Gr.isLanguageExcluded(e))),Gr.getSupportedLanguage=e=>{if(!e)return null;if(Gr.isLanguageExcluded(e))return null;if(Object.values(Dr).includes(e))return e;const t=Gr.normalizeLocale(e);if(Object.values(Dr).includes(t))return t;const r=e.split("_")[0];if(r&&Object.values(Dr).includes(r))return r;const n=e.split("-")[0];return n&&Object.values(Dr).includes(n)?n:null},Gr.convertToElementorLocale=e=>{if(!e)return`${Gr.defaultLanguage}-${Gr.defaultLanguage.toUpperCase()}`;const t=e.toLowerCase(),r={[Dr.EN]:"US"},n={[Dr.HE]:"he-IL",[Dr.PT]:"pt-PT"};return n[e]?n[e]:`${t}-${r[e]||e.toUpperCase()}`};class $r{constructor(){this.definedLanguage=Gr.getSystemLanguage(),this.instances=[],this.changeLanguage=async e=>{if(Gr.isLanguageExcluded(e))return;this.definedLanguage=e;const t=Gr.normalizeLocale(e),r=this.instances.map((e=>e.changeLanguage(t)));Gr.setSystemLanguage(e),await Promise.all(r)},this.createInstance=(e,t)=>{const r=st.createInstance();var n;return r.use(Ur).use((n=e,{type:"backend",init:function(e,t,r){},read:function(e,t,r){if("function"!=typeof n)r(null,n&&n[e]&&n[e][t]);else{if(3>n.length){try{var i=n(e,t);i&&"function"==typeof i.then?i.then((function(e){return r(null,e&&e.default||e)})).catch(r):r(null,i)}catch(e){r(e)}return}n(e,t,r)}}})).use(de).init({lng:Gr.normalizeLocale(this.definedLanguage),fallbackLng:"en",ns:"common",interpolation:{escapeValue:!1},react:{useSuspense:!0}}),this.instances.push(r),r},this.getLanguage=()=>this.definedLanguage}}$r.getSingleton=()=>($r.singleton||($r.singleton=new $r),$r.singleton);const zr=$r.getSingleton(),Kr=({children:e,directionInstance:r})=>{const n=(()=>{const[e,t]=O(zr.getLanguage()),{i18n:r}=me();return k((()=>{const e=e=>{t(e)};return r.on("languageChanged",e),()=>{r.off("languageChanged",e)}}),[r]),e})(),i=n===Dr.HE;return k((()=>{const e=i?"rtl":"ltr";document.documentElement.dir=e}),[i]),t(H,{rtl:i,children:[r&&A.createElement(r,{rtl:i,children:e}),!r&&e]})},qr=({themeInstance:r,directionInstance:n,children:i,colorScheme:s="light",...o})=>e(Kr,{directionInstance:n,children:t(B,{colorScheme:s,...o,children:[r&&A.createElement(r,{...o,colorScheme:s,children:i}),!r&&i]})}),Xr=t=>{const{isLoading:r,...n}=t,i=C((()=>r?{disabled:!0,startIcon:e(p,{"data-test":"spinner"})}:{}),[r]);return e(qr,{children:e(d,{...n,...i,children:t.children})})};var Wr,Jr,Yr,Zr;Wr={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Jr=["(","?"],Yr={")":["("],":":["?","?:"]},Zr=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var Qr={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return t>e},"<=":function(e,t){return t>=e},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};var en={contextDelimiter:"",onMissingKey:null};function tn(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},en)this.options[r]=void 0!==t&&r in t?t[r]:en[r]}tn.prototype.getPluralForm=function(e,t){var r,n,i,s,o=this.pluralForms[e];return o||("function"!=typeof(i=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),s=function(e){var t=function(e){for(var t,r,n,i,s=[],o=[];t=e.match(Zr);){for(r=t[0],(n=e.substr(0,t.index).trim())&&s.push(n);i=o.pop();){if(Yr[r]){if(Yr[r][0]===i){r=Yr[r][1]||r;break}}else if(Jr.indexOf(i)>=0||Wr[r]>Wr[i]){o.push(i);break}s.push(i)}Yr[r]||o.push(r),e=e.substr(t.index+r.length)}return(e=e.trim())&&s.push(e),s.concat(o.reverse())}(e);return function(e){return function(e,t){var r,n,i,s,o,a,l=[];for(r=0;r<e.length;r++){if(o=e[r],s=Qr[o]){for(n=s.length,i=Array(n);n--;)i[n]=l.pop();try{a=s.apply(null,i)}catch(e){return e}}else a=t.hasOwnProperty(o)?t[o]:+o;l.push(a)}return l[0]}(t,e)}}(n),i=function(e){return+s({n:e})}),o=this.pluralForms[e]=i),o(t)},tn.prototype.dcnpgettext=function(e,t,r,n,i){var s,o,a;return s=void 0===i?0:this.getPluralForm(e,i),o=r,t&&(o=t+this.options.contextDelimiter+r),(a=this.data[e][o])&&a[s]?a[s]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===s?r:n)};var rn={plural_forms:e=>1===e?0:1},nn=/^i18n\.(n?gettext|has_translation)(_|$)/,sn=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},on=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},an=function(e,t){return function(r,n,i,s=10){const o=e[t];if(!on(r))return;if(!sn(n))return;if("function"!=typeof i)return void console.error("The hook callback must be a function.");if("number"!=typeof s)return void console.error("If specified, the hook priority must be a number.");const a={callback:i,priority:s,namespace:n};if(o[r]){const e=o[r].handlers;let t;for(t=e.length;t>0&&s<e[t-1].priority;t--);t===e.length?e[t]=a:e.splice(t,0,a),o.__current.forEach((e=>{e.name!==r||e.currentIndex<t||e.currentIndex++}))}else o[r]={handlers:[a],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,i,s)}},ln=function(e,t,r=!1){return function(n,i){const s=e[t];if(!on(n))return;if(!r&&!sn(i))return;if(!s[n])return 0;let o=0;if(r)o=s[n].handlers.length,s[n]={runs:s[n].runs,handlers:[]};else{const e=s[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===i&&(e.splice(t,1),o++,s.__current.forEach((e=>{e.name!==n||e.currentIndex<t||e.currentIndex--})))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,i),o}},cn=function(e,t){return function(r,n){const i=e[t];return void 0!==n?r in i&&i[r].handlers.some((e=>e.namespace===n)):r in i}},un=function(e,t,r,n){return function(i,...s){const o=e[t];o[i]||(o[i]={handlers:[],runs:0}),o[i].runs++;const a=o[i].handlers;if("production"!==process.env.NODE_ENV&&"hookAdded"!==i&&o.all&&a.push(...o.all.handlers),!a||!a.length)return r?s[0]:void 0;const l={name:i,currentIndex:0};return(n?async function(){try{o.__current.add(l);let e=r?s[0]:void 0;for(;l.currentIndex<a.length;){const t=a[l.currentIndex];e=await t.callback.apply(null,s),r&&(s[0]=e),l.currentIndex++}return r?e:void 0}finally{o.__current.delete(l)}}:function(){try{o.__current.add(l);let e=r?s[0]:void 0;for(;l.currentIndex<a.length;)e=a[l.currentIndex].callback.apply(null,s),r&&(s[0]=e),l.currentIndex++;return r?e:void 0}finally{o.__current.delete(l)}})()}},hn=function(e,t){return function(){const r=e[t],n=Array.from(r.__current);return n.at(-1)?.name??null}},dn=function(e,t){return function(r){const n=e[t];return void 0===r?n.__current.size>0:Array.from(n.__current).some((e=>e.name===r))}},pn=function(e,t){return function(r){const n=e[t];if(on(r))return n[r]&&n[r].runs?n[r].runs:0}},fn=((e,t,r)=>{const n=new tn({}),i=new Set,s=()=>{i.forEach((e=>e()))},o=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...rn,...n.data[t]?.[""]},delete n.pluralForms[t]},a=(e,t)=>{o(e,t),s()},l=(e="default",t,r,i,s)=>(n.data[e]||o(void 0,e),n.dcnpgettext(e,t,r,i,s)),c=e=>e||"default",u=(e,t,n)=>{let i=l(n,t,e);return r?(i=r.applyFilters("i18n.gettext_with_context",i,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),i,e,t,n)):i};if(r){const e=e=>{nn.test(e)&&s()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:a,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...rn,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],s()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},a(e,t)},subscribe:e=>(i.add(e),()=>i.delete(e)),__:(e,t)=>{let n=l(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:(e,t,n,i)=>{let s=l(i,void 0,e,t,n);return r?(s=r.applyFilters("i18n.ngettext",s,e,t,n,i),r.applyFilters("i18n.ngettext_"+c(i),s,e,t,n,i)):s},_nx:(e,t,n,i,s)=>{let o=l(s,i,e,t,n);return r?(o=r.applyFilters("i18n.ngettext_with_context",o,e,t,n,i,s),r.applyFilters("i18n.ngettext_with_context_"+c(s),o,e,t,n,i,s)):o},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,i)=>{const s=t?t+""+e:e;let o=!!n.data?.[i??"default"]?.[s];return r&&(o=r.applyFilters("i18n.has_translation",o,e,t,i),o=r.applyFilters("i18n.has_translation_"+c(i),o,e,t,i)),o}}})(0,0,new class{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=an(this,"actions"),this.addFilter=an(this,"filters"),this.removeAction=ln(this,"actions"),this.removeFilter=ln(this,"filters"),this.hasAction=cn(this,"actions"),this.hasFilter=cn(this,"filters"),this.removeAllActions=ln(this,"actions",!0),this.removeAllFilters=ln(this,"filters",!0),this.doAction=un(this,"actions",!1,!1),this.doActionAsync=un(this,"actions",!1,!0),this.applyFilters=un(this,"filters",!0,!1),this.applyFiltersAsync=un(this,"filters",!0,!0),this.currentAction=hn(this,"actions"),this.currentFilter=hn(this,"filters"),this.doingAction=dn(this,"actions"),this.doingFilter=dn(this,"filters"),this.didAction=pn(this,"actions"),this.didFilter=pn(this,"filters")}});fn.getLocaleData.bind(fn),fn.setLocaleData.bind(fn),fn.resetLocaleData.bind(fn),fn.subscribe.bind(fn);var gn=fn.__.bind(fn);fn._x.bind(fn),fn._n.bind(fn),fn._nx.bind(fn),fn.isRTL.bind(fn),fn.hasTranslation.bind(fn);var mn=(e,t)=>{let r,n,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),i=n?r+"/"+n:r),delete e.namespace,delete e.endpoint,t({...e,path:i})};function yn(e){let t="";const r=Object.entries(e);let n;for(;n=r.shift();){let[e,i]=n;if(Array.isArray(i)||i&&i.constructor===Object){const t=Object.entries(i).reverse();for(const[n,i]of t)r.unshift([`${e}[${n}]`,i])}else void 0!==i&&(null===i&&(i=""),t+="&"+[e,i+""].map(encodeURIComponent).join("="))}return t.substr(1)}function bn(e){try{return decodeURIComponent(e)}catch(t){return e}}function vn(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce(((e,t)=>{const[r,n=""]=t.split("=").filter(Boolean).map(bn);return r&&function(e,t,r){const n=t.length,i=n-1;for(let s=0;n>s;s++){let n=t[s];!n&&Array.isArray(e)&&(n=e.length.toString()),n=["__proto__","constructor","prototype"].includes(n)?n.toUpperCase():n;const o=!isNaN(+t[s+1]);e[n]=s===i?r:e[n]||(o?[]:{}),Array.isArray(e[n])&&!o&&(e[n]={...e[n]}),e=e[n]}}(e,r.replace(/\]/g,"").split("["),n),e}),Object.create(null))}function Sn(e="",t){if(!t||!Object.keys(t).length)return e;const r=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(e)||"";let n=e.replace(r,"");const i=e.indexOf("?");return-1!==i&&(t=Object.assign(vn(e),t),n=n.substr(0,i)),n+"?"+yn(t)+r}function En(e,t){return vn(e)[t]}function _n(e,t){return void 0!==En(e,t)}function wn(e,...t){const r=e.replace(/^[^#]*/,""),n=(e=e.replace(/#.*/,"")).indexOf("?");if(-1===n)return e+r;const i=vn(e),s=e.substr(0,n);t.forEach((e=>delete i[e]));const o=yn(i);return(o?s+"?"+o:s)+r}function An(e){const t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((e=>e.split("="))).map((e=>e.map(decodeURIComponent))).sort(((e,t)=>e[0].localeCompare(t[0]))).map((e=>e.map(encodeURIComponent))).map((e=>e.join("="))).join("&"):n}function Ln(e,t){if(t)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach((([t,r])=>{"link"===t.toLowerCase()&&(e.headers[t]=r.replace(/<([^>]+)>/,((e,t)=>`<${encodeURI(t)}>`)))})),Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var Pn=({path:e,url:t,...r},n)=>({...r,url:t&&Sn(t,n),path:e&&Sn(e,n)}),xn=e=>e.json?e.json():Promise.reject(e),On=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},Tn=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||r})(e))return t(e);const r=await Vn({...Pn(e,{per_page:100}),parse:!1}),n=await xn(r);if(!Array.isArray(n))return n;let i=On(r);if(!i)return n;let s=[].concat(n);for(;i;){const t=await Vn({...e,path:void 0,url:i,parse:!1}),r=await xn(t);s=s.concat(r),i=On(t)}return s},kn=new Set(["PATCH","PUT","DELETE"]),Cn="GET";async function In(e){try{return await e.json()}catch{throw{code:"invalid_json",message:gn("The response is not a valid JSON response.")}}}async function Nn(e,t=!0){return t?204===e.status?null:await In(e):e}async function Rn(e,t=!0){if(!t)throw e;throw await In(e)}var Hn={Accept:"application/json, */*;q=0.1"},Bn={credentials:"include"},Fn=[(e,t)=>("string"!=typeof e.url||_n(e.url,"_locale")||(e.url=Sn(e.url,{_locale:"user"})),"string"!=typeof e.path||_n(e.path,"_locale")||(e.path=Sn(e.path,{_locale:"user"})),t(e)),mn,(e,t)=>{const{method:r=Cn}=e;return kn.has(r.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":r,"Content-Type":"application/json"},method:"POST"}),t(e)},Tn],Dn=e=>{const{url:t,path:r,data:n,parse:i=!0,...s}=e;let{body:o,headers:a}=e;return a={...Hn,...a},n&&(o=JSON.stringify(n),a["Content-Type"]="application/json"),globalThis.fetch(t||r||window.location.href,{...Bn,...s,body:o,headers:a}).then((e=>e.ok?Nn(e,i):Rn(e,i)),(e=>{if(e&&"AbortError"===e.name)throw e;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:gn("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:gn("Could not get a valid response from the server.")}}))},Un=e=>Fn.reduceRight(((e,t)=>r=>t(r,e)),Dn)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):globalThis.fetch(Un.nonceEndpoint).then((e=>e.ok?e.text():Promise.reject(t))).then((t=>(Un.nonceMiddleware.nonce=t,Un(e))))));Un.use=function(e){Fn.unshift(e)},Un.setFetchHandler=function(e){Dn=e},Un.createNonceMiddleware=function(e){const t=(e,r)=>{const{headers:n={}}=e;for(const i in n)if("x-wp-nonce"===i.toLowerCase()&&n[i]===t.nonce)return r(e);return r({...e,headers:{...n,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},Un.createPreloadingMiddleware=function(e){const t=Object.fromEntries(Object.entries(e).map((([e,t])=>[An(e),t])));return(e,r)=>{const{parse:n=!0}=e;let i=e.path;if(!i&&e.url){const{rest_route:t,...r}=vn(e.url);"string"==typeof t&&(i=Sn(t,r))}if("string"!=typeof i)return r(e);const s=e.method||"GET",o=An(i);if("GET"===s&&t[o]){const e=t[o];return delete t[o],Ln(e,!!n)}if("OPTIONS"===s&&t[s]&&t[s][o]){const e=t[s][o];return delete t[s][o],Ln(e,!!n)}return r(e)}},Un.createRootURLMiddleware=e=>(t,r)=>mn(t,(t=>{let n,i=t.url,s=t.path;return"string"==typeof s&&(n=e,-1!==e.indexOf("?")&&(s=s.replace("?","&")),s=s.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(s=s.replace("?","&")),i=n+s),r({...t,url:i})})),Un.fetchAllMiddleware=Tn,Un.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let r=0;const n=e=>(r++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>5>r?n(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{if(!(t instanceof globalThis.Response))return Promise.reject(t);const r=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&600>t.status&&r?n(r).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:gn("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):Rn(t,e.parse)})).then((t=>Nn(t,e.parse)))},Un.createThemePreviewMiddleware=e=>(t,r)=>{if("string"==typeof t.url){const r=En(t.url,"wp_theme_preview");void 0===r?t.url=Sn(t.url,{wp_theme_preview:e}):""===r&&(t.url=wn(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const r=En(t.path,"wp_theme_preview");void 0===r?t.path=Sn(t.path,{wp_theme_preview:e}):""===r&&(t.path=wn(t.path,"wp_theme_preview"))}return r(t)};var Mn,Vn=Un;class jn extends Error{constructor(e){super(e),this.name="APIError"}}!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.DELETE="DELETE",e.HEAD="HEAD"}(Mn||(Mn={}));const Gn="/wp/v2";class $n{static async request({path:e,data:t,method:r=Mn.POST}){try{const n=(window?.elementorOneSettingsData?.wpRestUrl||"/wp-json/").replace(/\/$/,""),i=window?.elementorOneSettingsData?.wpRestNonce;let s=`${n}${e}`;"GET"!==r||e.startsWith(Gn)||(s=Sn(s,{sb_time:(new Date).getTime()}));const o=await Vn({url:s,method:r,data:t,headers:{"X-WP-Nonce":i}});if(e.startsWith(Gn))return o;if(void 0===o.success)return o;if(!o.success)throw new jn(o.data?.message||"Unknown error");return o.data}catch(e){throw e instanceof jn?e:new jn(e?.message||"Unknown error")}}}const zn="/elementor-one/v1";class Kn extends $n{static async initConnect(e="new"){const t={wp_rest:window?.elementorOneSettingsData?.wpRestNonce};return"update"===e&&(t.update_redirect_uri=!0),$n.request({method:Mn.POST,path:zn+"/connect/authorize",data:t})}static async getInstalledPlugins(){return await $n.request({method:Mn.GET,path:zn+"/plugins"})}static async installPlugin(e,t){return await $n.request({method:Mn.POST,path:zn+"/plugins",data:{slug:e,status:t}})}static async clearSession(){return $n.request({method:Mn.POST,path:zn+"/connect/deactivate_and_disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce,clear_session:!0}})}static async deactivateAndDisconnect(){return $n.request({method:Mn.POST,path:zn+"/connect/deactivate_and_disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async deactivate(){return $n.request({method:Mn.POST,path:zn+"/connect/deactivate",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async disconnect(){return $n.request({method:Mn.POST,path:zn+"/connect/disconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async reconnect(){return $n.request({method:Mn.POST,path:zn+"/connect/reconnect",data:{wp_rest:window?.elementorOneSettingsData?.wpRestNonce}})}static async attachApps(e){return $n.request({method:Mn.POST,path:zn+"/apps/link",data:{app_type:e}})}static async detachApps(e){return $n.request({method:Mn.POST,path:zn+"/apps/unlink",data:{app_type:e}})}static async getPluginSettings(){return $n.request({method:Mn.GET,path:zn+"/settings"})}static async getSettings(){return $n.request({method:Mn.GET,path:Gn+"/settings"})}static async updateSettings(e){return $n.request({method:Mn.PUT,path:Gn+"/settings",data:e})}}const qn=_({name:"sharedElementorOne",initialState:{pluginSettings:void 0,dataFetched:{},loadingState:{},errorState:{}},reducers:{setPluginSettings(e,t){e.pluginSettings=t.payload},setDataFetched(e,t){e.dataFetched[t.payload.key]=t.payload.value},setLoadState(e,t){e.loadingState[t.payload.key]=t.payload.value},setErrorState(e,t){e.errorState[t.payload.key]=t.payload.value}}}),{actions:Xn}=qn;class Wn{}Wn.setPluginSettings=Xn.setPluginSettings,Wn.setDataFetched=Xn.setDataFetched,Wn.setLoadState=Xn.setLoadState,Wn.setErrorState=Xn.setErrorState;class Jn{}var Yn,Zn,Qn;Jn.selectState=e=>e.sharedElementorOne,Jn.selectPluginSettings=w(Jn.selectState,(e=>e?.pluginSettings)),Jn.selectDataFetched=w([Jn.selectState,(e,t)=>t],((e,t)=>e?.dataFetched[t]||void 0)),Jn.selectLoadingState=w([Jn.selectState,(e,t)=>t],((e,t)=>e?.loadingState[t]||void 0)),Jn.selectErrorState=w([Jn.selectState,(e,t)=>t],((e,t)=>e?.errorState[t]||void 0)),function(e){e.PLUGIN="PLUGIN",e.HOSTING="HOSTING",e.APP_AI="APP_AI",e.APP_IO="APP_IO",e.APP_BKP="APP_BKP",e.FREE_TRIAL="FREE_TRIAL",e.APP_SERVICE="APP_SERVICE",e.APP_STRATTIC="APP_STRATTIC",e.APP_SUPPORT="APP_SUPPORT",e.APP_MAILER="APP_MAILER",e.APP_EMPMA="APP_EMPMA",e.APP_ACCESS="APP_ACCESS",e.APP_MANAGE="APP_MANAGE",e.APP_DOMAIN="APP_DOMAIN",e.APP_ONE="APP_ONE"}(Yn||(Yn={})),function(e){e.Active="active",e.Expired="expired",e.OnHold="onhold",e.Canceled="canceled"}(Zn||(Zn={})),function(e){e.Pending="Pending",e.Completed="Completed",e.Failed="Failed",e.OnHold="OnHold"}(Qn||(Qn={}));const ei=[];for(let e=0;256>e;++e)ei.push((e+256).toString(16).slice(1));let ti;const ri=new Uint8Array(16),ni={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ii(e,t,r){if(ni.randomUUID&&!e)return ni.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!ti){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ti=crypto.getRandomValues.bind(crypto)}return ti(ri)}();if(16>n.length)throw Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(ei[e[t+0]]+ei[e[t+1]]+ei[e[t+2]]+ei[e[t+3]]+"-"+ei[e[t+4]]+ei[e[t+5]]+"-"+ei[e[t+6]]+ei[e[t+7]]+"-"+ei[e[t+8]]+ei[e[t+9]]+"-"+ei[e[t+10]]+ei[e[t+11]]+ei[e[t+12]]+ei[e[t+13]]+ei[e[t+14]]+ei[e[t+15]]).toLowerCase()}(n)}const si=_({name:"shared",initialState:{alertError:void 0,sharedLoader:void 0,showMobileNav:!1,toasts:[]},reducers:{setAlertError(e,t){e.alertError=t.payload},setSharedLoader(e,t){e.sharedLoader=t.payload},setShowMobileNav(e,t){e.showMobileNav=t.payload},setToast(e,t){const r={id:t.payload.id||ii(),type:t.payload.type||"info",text:t.payload.text||"",show:void 0===t.payload.show||t.payload.show,autohide:void 0===t.payload.autohide||t.payload.autohide,...t.payload},n=e.toasts?.find((e=>e.id===r.id));n?Object.assign(n,r):e.toasts?.push(r)},removeToast(e,t){const r=e.toasts?.find((e=>e.id===t.payload));r&&(r.show=!1)}}}),{actions:oi}=si;class ai{}ai.setAlertError=oi.setAlertError,ai.setSharedLoader=oi.setSharedLoader,ai.setShowMobileNav=oi.setShowMobileNav,ai.setToast=oi.setToast,ai.removeToast=oi.removeToast;const li=()=>I(),ci=N;class ui{}ui.getPluginSettings=()=>async e=>{try{e(Wn.setLoadState({key:"pluginSettings",value:!0}));const t=await Kn.getPluginSettings();e(Wn.setPluginSettings(t))}catch(t){e(ai.setAlertError({shouldRefresh:!0})),e(Wn.setErrorState({key:"pluginSettings",value:t?.message}))}finally{e(Wn.setDataFetched({key:"pluginSettings",value:!0})),e(Wn.setLoadState({key:"pluginSettings",value:!1}))}},ui.connect=()=>async e=>{try{e(Wn.setLoadState({key:"connect",value:!0}));const t=await Kn.initConnect();window.open(t,"_self")?.focus()}catch(t){e(ai.setAlertError({shouldRefresh:!0}))}finally{e(Wn.setLoadState({key:"connect",value:!1}))}},ui.disconnect=()=>async e=>{try{e(Wn.setLoadState({key:"disconnect",value:!0})),await Kn.disconnect(),e(ui.getPluginSettings())}catch(t){e(ai.setAlertError({shouldRefresh:!0}))}finally{e(Wn.setLoadState({key:"disconnect",value:!1}))}},ui.attachApps=e=>async t=>{try{return t(Wn.setLoadState({key:"attachApps-"+e,value:!0})),await Kn.attachApps(e)}catch(e){return void t(ai.setAlertError({shouldRefresh:!0}))}finally{t(Wn.setLoadState({key:"attachApps-"+e,value:!1}))}},ui.detachApps=e=>async t=>{try{return t(Wn.setLoadState({key:"detachApps-"+e,value:!0})),await Kn.detachApps(e)}catch(e){return void t(ai.setAlertError({shouldRefresh:!0}))}finally{t(Wn.setLoadState({key:"detachApps-"+e,value:!1}))}};class hi{}hi.getInitials=(e,t)=>e||t?`${e?.charAt(0)}${t?.charAt(0)}`:"",hi.getFullName=(e,t)=>`${e}${e&&t?" ":""}${t}`;const di=new Map,pi=new Map,fi=({firstName:r="",lastName:n="",showInitials:i,size:s=32,iconSize:a="medium",onClick:l})=>{const c=hi.getFullName(r,n),u=hi.getInitials(r,n);return t(R,{alt:c,sx:{height:s,width:s,color:"common.white"},onClick:l,children:[i&&(u?e(o,{variant:"caption","data-test":"user-avatar-initials",children:u}):e(h,{fontSize:a})),!i&&e(h,{fontSize:a})]})},gi=zr.createInstance(((e,t)=>import(`./locales/${e}/${t}.json`))),mi=r=>{const{t:n}=me("common",{i18n:gi}),i=li(),s=ci((e=>Jn.selectLoadingState(e,"disconnect")));return e(y,{...r,"data-test":"user-profile-menu",anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{overflow:"visible !important",borderRadius:1}},children:t(b,{onClick:async()=>{await i(ui.disconnect()),r.onClose?.({},"backdropClick")},disabled:s,children:[e(v,{children:s?e(p,{size:16}):e(E,{fontSize:"small"})}),e(S,{children:n("header.userProfileMenu.disconnect")})]})})},yi=()=>{const{t:n}=me("common",{i18n:gi}),i=li(),s=ci(Jn.selectPluginSettings),o=ci((e=>Jn.selectLoadingState(e,"connect"))),l=f({variant:"popover",popupId:"user-info-popover"});return e(r,{children:s?.isConnected?t(r,{children:[e(a,{disableRipple:!0,...g(l),"data-test":"profile-dropdown",children:e(fi,{})}),e(mi,{...m(l)})]}):e(d,{variant:"outlined",color:"secondary",size:"small",startIcon:o?e(p,{size:16}):e(h,{}),onClick:()=>{i(ui.connect())},disabled:o,children:n("header.userInfo.connectAccount")})})},bi=({id:r,title:n,description:i,topic:s,imageSrc:a,chipTags:l,link:c,readMoreText:u,cta:h,ctaLink:p,onItemClickedCallback:f})=>{const{t:g}=me("assets-whatsnew",{i18n:gi}),{cachedImageSrc:m,isLoading:y,error:b}=(e=>{const[t,r]=O(e&&di.get(e)||void 0),[n,i]=O(!1),[s,o]=O(null),a=T(!0);return k((()=>{if(!e)return void r(void 0);if(di.has(e))return void r(di.get(e));if(pi.has(e))return void pi.get(e)?.then((e=>{a.current&&r(e)})).catch((e=>{a.current&&o(e.message)}));i(!0),o(null);const t=new Promise(((t,r)=>{const n=new Image;n.onload=()=>{di.set(e,e),t(e)},n.onerror=()=>{r(Error("Failed to load image: "+e))},n.src=e}));pi.set(e,t),t.then((e=>{a.current&&(r(e),i(!1))})).catch((e=>{a.current&&(o(e.message),i(!1))})).finally((()=>{pi.delete(e)}))}),[e]),k((()=>()=>{a.current=!1}),[]),{cachedImageSrc:t,isLoading:n,error:s}})(a),v=C((()=>g(r+".chipTags",{returnObjects:!0})),[g,r]),S=()=>{f?.()};return t(U,{marginTop:2,children:[s&&e(o,{variant:"caption",color:"text.tertiary",children:g(r+".topic",{defaultValue:s})}),e(o,{variant:"subtitle1",color:"text.primary",children:g(r+".title",{defaultValue:n})}),a&&e(U,{style:{marginBottom:16},children:m&&!y&&!b&&e("img",{src:m,alt:g(r+".title",{defaultValue:n}),style:{width:"100%",height:"auto"}})}),l&&e(U,{display:"flex",gap:1,flexWrap:"wrap",marginBottom:1,children:l.map(((t,n)=>{const i=v?.at(n)||t;return e(M,{variant:"outlined",label:i},`${r}-${t}`)}))}),t(o,{variant:"body2",color:e=>e.palette.text.secondary,sx:{marginBottom:1},children:[g(r+".description",{defaultValue:i}),u&&e("a",{href:c,target:"_blank",rel:"noreferrer",onClick:S,children:" "+g(r+".readMoreText",{defaultValue:u})})]}),h&&e(d,{variant:"contained",color:"promotion",href:p,target:"_blank",onClick:S,children:g(r+".cta",{defaultValue:h})})]})};let vi=null;const Si=async e=>{try{const t=await fetch(e);if(!t.ok)throw Error(`HTTP ${t.status} ${t.statusText} when fetching image from: ${e}`);const r=await t.blob();return new Promise(((e,t)=>{const n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(Error("Base64 conversion failed")),n.readAsDataURL(r)}))}catch(t){return console.warn(`Failed to convert image ${e}:`,t),e}},Ei={local:{SUPPORT_FORM_URL:"https://my.stg.elementor.red/support-form/"},development:{SUPPORT_FORM_URL:"https://my.dev.elementor.red/support-form/"},staging:{SUPPORT_FORM_URL:"https://my.stg.elementor.red/support-form/"},production:{SUPPORT_FORM_URL:"https://my.elementor.com/support-form/"}},_i=L(null),wi=({env:t,language:r=Dr.EN,children:n})=>{const i=C((()=>(e=>Ei[e])(t)),[t]);return k((()=>{gi.changeLanguage(r)}),[r]),e(_i.Provider,{value:i,children:n})},Ai=()=>{const e=P(_i);if(!e)throw Error("Wrap your component in <ElementorOneAssetsProvider> to access the env config");return e},Li=({onClose:r,onItemClickedCallback:n,notificationsApiUrl:i})=>{const{t:s}=me("common",{i18n:gi}),[l,c]=O([]),[h,d]=O(!0),p=Ai(),{NOTIFICATIONS_API_URL:f}=p;return k((()=>{(async()=>{try{const e=await(async e=>{if(null!==vi)return vi;try{if(!e)throw Error("Notifications API URL is not defined");const t=await fetch(e);if(!t.ok)throw Error("Failed to fetch notifications: "+t.status);const r=((await t.json()).notifications||[]).filter(((e,t,r)=>r.findIndex((t=>t.id===e.id))===t)),n=await Promise.all(r.map((async e=>({...e,imageSrc:e.imageSrc?await Si(e.imageSrc):e.imageSrc}))));return vi=n,n}catch(e){return console.error("Error fetching notifications:",e),vi=[],[]}})(i||f);c(e),d(!1)}catch(e){c([]),d(!1)}})()}),[i,f]),t(U,{children:[t(U,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e(o,{variant:"subtitle1",color:"primary.text",children:s("whatsNew")}),e(a,{onClick:()=>{r()},"data-test":"service-banner-close",children:e(V,{})})]}),e(U,{children:!h&&l?.map(((r,i)=>t(U,{"data-test":"whats-new-card-"+i,children:[e(bi,{...r,onItemClickedCallback:n}),e(u,{sx:{margin:"16px 0"}})]},r.id)))})]})},Pi=({onCloseCallback:n,onItemClickedCallback:i,containerSx:s={},notificationsApiUrl:o})=>{const[l,c]=O(!1),[u,h]=O(!1),d=()=>{c(!1),n?.()};return t(r,{children:[e(j,{color:"primary",overlap:"circular",badgeContent:"",invisible:u,variant:"dot",children:e(a,{onClick:()=>{l||u||h(!0),c(!l)},"data-test":"whats-new-button",children:e(F,{})})}),e(qr,{themeInstance:B,directionInstance:H,colorScheme:"light",children:e(D,{variant:"temporary",open:l,hideBackdrop:!0,disableScrollLock:!0,anchor:"right",onClose:d,sx:s,children:e(Li,{onClose:d,onItemClickedCallback:i,notificationsApiUrl:o})})})]})};var xi=e=>"checkbox"===e.type,Oi=e=>e instanceof Date,Ti=e=>null==e;const ki=e=>"object"==typeof e;var Ci=e=>!Ti(e)&&!Array.isArray(e)&&ki(e)&&!Oi(e),Ii=e=>Ci(e)&&e.target?xi(e.target)?e.target.checked:e.target.value:e,Ni=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Ri=e=>{const t=e.constructor&&e.constructor.prototype;return Ci(t)&&t.hasOwnProperty("isPrototypeOf")},Hi="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Bi(e){let t;const r=Array.isArray(e),n="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(Hi&&(e instanceof Blob||n)||!r&&!Ci(e))return e;if(t=r?[]:Object.create(Object.getPrototypeOf(e)),r||Ri(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=Bi(e[r]));else t=e}return t}var Fi=e=>/^\w*$/.test(e),Di=e=>void 0===e,Ui=e=>Array.isArray(e)?e.filter(Boolean):[],Mi=e=>Ui(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Vi=(e,t,r)=>{if(!t||!Ci(e))return r;const n=(Fi(t)?[t]:Mi(t)).reduce(((e,t)=>Ti(e)?e:e[t]),e);return Di(n)||n===e?Di(e[t])?r:e[t]:n},ji=e=>"boolean"==typeof e,Gi=(e,t,r)=>{let n=-1;const i=Fi(t)?[t]:Mi(t),s=i.length,o=s-1;for(;++n<s;){const t=i[n];let s=r;if(n!==o){const r=e[t];s=Ci(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};const $i="blur",zi="focusout",Ki="change",qi="onBlur",Xi="onChange",Wi="onSubmit",Ji="onTouched",Yi="all",Zi="pattern",Qi="required",es=A.createContext(null);es.displayName="HookFormContext";const ts=()=>A.useContext(es);var rs=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Yi&&(t._proxyFormState[i]=!n||Yi),r&&(r[i]=!0),e[i]}});return i};const ns="undefined"!=typeof window?A.useLayoutEffect:A.useEffect;var is=e=>"string"==typeof e,ss=(e,t,r,n,i)=>is(e)?(n&&t.watch.add(e),Vi(r,e,i)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),Vi(r,e)))):(n&&(t.watchAll=!0),r),os=e=>Ti(e)||!ki(e);function as(e,t,r=new WeakSet){if(os(e)||os(t))return e===t;if(Oi(e)&&Oi(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const n=e[s];if(!i.includes(s))return!1;if("ref"!==s){const e=t[s];if(Oi(n)&&Oi(e)||Ci(n)&&Ci(e)||Array.isArray(n)&&Array.isArray(e)?!as(n,e,r):n!==e)return!1}}return!0}const ls=e=>e.render(function(e){const t=ts(),{name:r,disabled:n,control:i=t.control,shouldUnregister:s,defaultValue:o}=e,a=Ni(i._names.array,r),l=A.useMemo((()=>Vi(i._formValues,r,Vi(i._defaultValues,r,o))),[i,r,o]),c=function(e){const t=ts(),{control:r=t.control,name:n,defaultValue:i,disabled:s,exact:o,compute:a}=e||{},l=A.useRef(i),c=A.useRef(a),u=A.useRef(void 0);c.current=a;const h=A.useMemo((()=>r._getWatch(n,l.current)),[r,n]),[d,p]=A.useState(c.current?c.current(h):h);return ns((()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:e=>{if(!s){const t=ss(n,r._names,e.values||r._formValues,!1,l.current);if(c.current){const e=c.current(t);as(e,u.current)||(p(e),u.current=e)}else p(t)}}})),[r,s,n,o]),A.useEffect((()=>r._removeUnmounted())),d}({control:i,name:r,defaultValue:l,exact:!0}),u=function(e){const t=ts(),{control:r=t.control,disabled:n,name:i,exact:s}=e||{},[o,a]=A.useState(r._formState),l=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ns((()=>r._subscribe({name:i,formState:l.current,exact:s,callback:e=>{!n&&a({...r._formState,...e})}})),[i,n,s]),A.useEffect((()=>{l.current.isValid&&r._setValid(!0)}),[r]),A.useMemo((()=>rs(o,r,l.current,!1)),[o,r])}({control:i,name:r,exact:!0}),h=A.useRef(e),d=A.useRef(i.register(r,{...e.rules,value:c,...ji(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const p=A.useMemo((()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Vi(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!Vi(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Vi(u.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Vi(u.validatingFields,r)},error:{enumerable:!0,get:()=>Vi(u.errors,r)}})),[u,r]),f=A.useCallback((e=>d.current.onChange({target:{value:Ii(e),name:r},type:Ki})),[r]),g=A.useCallback((()=>d.current.onBlur({target:{value:Vi(i._formValues,r),name:r},type:$i})),[r,i._formValues]),m=A.useCallback((e=>{const t=Vi(i._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[i._fields,r]),y=A.useMemo((()=>({name:r,value:c,...ji(n)||u.disabled?{disabled:u.disabled||n}:{},onChange:f,onBlur:g,ref:m})),[r,n,u.disabled,f,g,m,c]);return A.useEffect((()=>{const e=i._options.shouldUnregister||s;i.register(r,{...h.current.rules,...ji(h.current.disabled)?{disabled:h.current.disabled}:{}});const t=(e,t)=>{const r=Vi(i._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){const e=Bi(Vi(i._options.defaultValues,r));Gi(i._defaultValues,r,e),Di(Vi(i._formValues,r))&&Gi(i._formValues,r,e)}return!a&&i.register(r),()=>{(a?e&&!i._state.action:e)?i.unregister(r):t(r,!1)}}),[r,i,a,s]),A.useEffect((()=>{i._setDisabledField({disabled:n,name:r})}),[n,r,i]),A.useMemo((()=>({field:y,formState:u,fieldState:p})),[y,u,p])}(e));var cs=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},us=e=>Array.isArray(e)?e:[e],hs=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},ds=e=>Ci(e)&&!Object.keys(e).length,ps=e=>"file"===e.type,fs=e=>"function"==typeof e,gs=e=>{if(!Hi)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ms=e=>"select-multiple"===e.type,ys=e=>"radio"===e.type,bs=e=>gs(e)&&e.isConnected;function vs(e,t){const r=Array.isArray(t)?t:Fi(t)?[t]:Mi(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;r>n;)e=Di(e)?n++:e[t[n++]];return e}(e,r),i=r.length-1,s=r[i];return n&&delete n[s],0!==i&&(Ci(n)&&ds(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Di(e[t]))return!1;return!0}(n))&&vs(e,r.slice(0,-1)),e}var Ss=e=>{for(const t in e)if(fs(e[t]))return!0;return!1};function Es(e,t={}){const r=Array.isArray(e);if(Ci(e)||r)for(const r in e)Array.isArray(e[r])||Ci(e[r])&&!Ss(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Es(e[r],t[r])):Ti(e[r])||(t[r]=!0);return t}function _s(e,t,r){const n=Array.isArray(e);if(Ci(e)||n)for(const n in e)Array.isArray(e[n])||Ci(e[n])&&!Ss(e[n])?Di(t)||os(r[n])?r[n]=Array.isArray(e[n])?Es(e[n],[]):{...Es(e[n])}:_s(e[n],Ti(t)?{}:t[n],r[n]):r[n]=!as(e[n],t[n]);return r}var ws=(e,t)=>_s(e,t,Es(t));const As={value:!1,isValid:!1},Ls={value:!0,isValid:!0};var Ps=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Di(e[0].attributes.value)?Di(e[0].value)||""===e[0].value?Ls:{value:e[0].value,isValid:!0}:Ls:As}return As},xs=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Di(e)?e:t?""===e?NaN:e?+e:e:r&&is(e)?new Date(e):n?n(e):e;const Os={isValid:!1,value:null};var Ts=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Os):Os;function ks(e){const t=e.ref;return ps(t)?t.files:ys(t)?Ts(e.refs).value:ms(t)?[...t.selectedOptions].map((({value:e})=>e)):xi(t)?Ps(e.refs).value:xs(Di(t.value)?e.ref.value:t.value,e)}var Cs=e=>e instanceof RegExp,Is=e=>Di(e)?e:Cs(e)?e.source:Ci(e)?Cs(e.value)?e.value.source:e.value:e,Ns=e=>({isOnSubmit:!e||e===Wi,isOnBlur:e===qi,isOnChange:e===Xi,isOnAll:e===Yi,isOnTouch:e===Ji});const Rs="AsyncFunction";var Hs=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const Bs=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=Vi(e,i);if(r){const{_f:e,...s}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n)return!0;if(e.ref&&t(e.ref,e.name)&&!n)return!0;if(Bs(s,t))break}else if(Ci(s)&&Bs(s,t))break}}};function Fs(e,t,r){const n=Vi(e,r);if(n||Fi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),s=Vi(t,n),o=Vi(e,n);if(s&&!Array.isArray(s)&&r!==n)return{name:r};if(o&&o.type)return{name:n,error:o};if(o&&o.root&&o.root.type)return{name:n+".root",error:o.root};i.pop()}return{name:r}}var Ds=(e,t,r)=>{const n=us(Vi(e,r));return Gi(n,"root",t[r]),Gi(e,r,n),e},Us=e=>is(e);function Ms(e,t,r="validate"){if(Us(e)||Array.isArray(e)&&e.every(Us)||ji(e)&&!e)return{type:r,message:Us(e)?e:"",ref:t}}var Vs=e=>Ci(e)&&!Cs(e)?e:{value:e,message:""},js=async(e,t,r,n,i,s)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:u,min:h,max:d,pattern:p,validate:f,name:g,valueAsNumber:m,mount:y}=e._f,b=Vi(r,g);if(!y||t.has(g))return{};const v=a?a[0]:o,S=e=>{i&&v.reportValidity&&(v.setCustomValidity(ji(e)?"":e||""),v.reportValidity())},E={},_=ys(o),w=xi(o),A=_||w,L=(m||ps(o))&&Di(o.value)&&Di(b)||gs(o)&&""===o.value||""===b||Array.isArray(b)&&!b.length,P=cs.bind(null,g,n,E),x=(e,t,r,n="maxLength",i="minLength")=>{const s=e?t:r;E[g]={type:e?n:i,message:s,ref:o,...P(e?n:i,s)}};if(s?!Array.isArray(b)||!b.length:l&&(!A&&(L||Ti(b))||ji(b)&&!b||w&&!Ps(a).isValid||_&&!Ts(a).isValid)){const{value:e,message:t}=Us(l)?{value:!!l,message:l}:Vs(l);if(e&&(E[g]={type:Qi,message:t,ref:v,...P(Qi,t)},!n))return S(t),E}if(!(L||Ti(h)&&Ti(d))){let e,t;const r=Vs(d),i=Vs(h);if(Ti(b)||isNaN(b)){const n=o.valueAsDate||new Date(b),s=e=>new Date((new Date).toDateString()+" "+e),a="time"==o.type,l="week"==o.type;is(r.value)&&b&&(e=a?s(b)>s(r.value):l?b>r.value:n>new Date(r.value)),is(i.value)&&b&&(t=a?s(b)<s(i.value):l?b<i.value:n<new Date(i.value))}else{const n=o.valueAsNumber||(b?+b:b);Ti(r.value)||(e=n>r.value),Ti(i.value)||(t=n<i.value)}if((e||t)&&(x(!!e,r.message,i.message,"max","min"),!n))return S(E[g].message),E}if((c||u)&&!L&&(is(b)||s&&Array.isArray(b))){const e=Vs(c),t=Vs(u),r=!Ti(e.value)&&b.length>+e.value,i=!Ti(t.value)&&b.length<+t.value;if((r||i)&&(x(r,e.message,t.message),!n))return S(E[g].message),E}if(p&&!L&&is(b)){const{value:e,message:t}=Vs(p);if(Cs(e)&&!b.match(e)&&(E[g]={type:Zi,message:t,ref:o,...P(Zi,t)},!n))return S(t),E}if(f)if(fs(f)){const e=Ms(await f(b,r),v);if(e&&(E[g]={...e,...P("validate",e.message)},!n))return S(e.message),E}else if(Ci(f)){let e={};for(const t in f){if(!ds(e)&&!n)break;const i=Ms(await f[t](b,r),v,t);i&&(e={...i,...P(t,i.message)},S(i.message),n&&(E[g]=e))}if(!ds(e)&&(E[g]={ref:v,...e},!n))return E}return S(!0),E};const Gs={mode:Wi,reValidateMode:Xi,shouldFocusError:!0};function $s(e={}){let t,r={...Gs,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:fs(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},i={},s=(Ci(r.defaultValues)||Ci(r.values))&&Bi(r.defaultValues||r.values)||{},o=r.shouldUnregister?{}:Bi(s),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...u};const d={array:hs(),state:hs()},p=r.criteriaMode===Yi,f=async e=>{if(!r.disabled&&(u.isValid||h.isValid||e)){const e=r.resolver?ds((await b()).errors):await v(i,!0);e!==n.isValid&&d.state.next({isValid:e})}},g=(e,t)=>{!r.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((e||Array.from(l.mount)).forEach((e=>{e&&(t?Gi(n.validatingFields,e,t):vs(n.validatingFields,e))})),d.state.next({validatingFields:n.validatingFields,isValidating:!ds(n.validatingFields)}))},m=(e,t,r,n)=>{const l=Vi(i,e);if(l){const i=Vi(o,e,Di(r)?Vi(s,e):r);Di(i)||n&&n.defaultChecked||t?Gi(o,e,t?i:ks(l._f)):_(e,i),a.mount&&f()}},y=(e,t,i,o,a)=>{let l=!1,c=!1;const p={name:e};if(!r.disabled){if(!i||o){(u.isDirty||h.isDirty)&&(c=n.isDirty,n.isDirty=p.isDirty=S(),l=c!==p.isDirty);const r=as(Vi(s,e),t);c=!!Vi(n.dirtyFields,e),r?vs(n.dirtyFields,e):Gi(n.dirtyFields,e,!0),p.dirtyFields=n.dirtyFields,l=l||(u.dirtyFields||h.dirtyFields)&&c!==!r}if(i){const t=Vi(n.touchedFields,e);t||(Gi(n.touchedFields,e,i),p.touchedFields=n.touchedFields,l=l||(u.touchedFields||h.touchedFields)&&t!==i)}l&&a&&d.state.next(p)}return l?p:{}},b=async e=>{g(e,!0);const t=await r.resolver(o,r.context,((e,t,r,n)=>{const i={};for(const r of e){const e=Vi(t,r);e&&Gi(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}})(e||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return g(e),t},v=async(e,t,i={valid:!0})=>{for(const a in e){const c=e[a];if(c){const{_f:e,...h}=c;if(e){const h=l.array.has(e.name),d=c._f&&(!!(s=c._f)&&!!s.validate&&!!(fs(s.validate)&&s.validate.constructor.name===Rs||Ci(s.validate)&&Object.values(s.validate).find((e=>e.constructor.name===Rs))));d&&u.validatingFields&&g([a],!0);const f=await js(c,l.disabled,o,p,r.shouldUseNativeValidation&&!t,h);if(d&&u.validatingFields&&g([a]),f[e.name]&&(i.valid=!1,t))break;!t&&(Vi(f,e.name)?h?Ds(n.errors,f,e.name):Gi(n.errors,e.name,f[e.name]):vs(n.errors,e.name))}!ds(h)&&await v(h,t,i)}}var s;return i.valid},S=(e,t)=>!r.disabled&&(e&&t&&Gi(o,e,t),!as(O(),s)),E=(e,t,r)=>ss(e,l,{...a.mount?o:Di(t)?s:is(e)?{[e]:t}:t},r,t),_=(e,t,r={})=>{const n=Vi(i,e);let s=t;if(n){const r=n._f;r&&(!r.disabled&&Gi(o,e,xs(t,r)),s=gs(r.ref)&&Ti(t)?"":t,ms(r.ref)?[...r.ref.options].forEach((e=>e.selected=s.includes(e.value))):r.refs?xi(r.ref)?r.refs.forEach((e=>{e.defaultChecked&&e.disabled||(e.checked=Array.isArray(s)?!!s.find((t=>t===e.value)):s===e.value||!!s)})):r.refs.forEach((e=>e.checked=e.value===s)):ps(r.ref)?r.ref.value="":(r.ref.value=s,r.ref.type||d.state.next({name:e,values:Bi(o)})))}(r.shouldDirty||r.shouldTouch)&&y(e,s,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&x(e)},w=(e,t,r)=>{for(const n in t){if(!t.hasOwnProperty(n))return;const s=t[n],o=e+"."+n,a=Vi(i,o);(l.array.has(e)||Ci(s)||a&&!a._f)&&!Oi(s)?w(o,s,r):_(o,s,r)}},A=(e,t,r={})=>{const c=Vi(i,e),p=l.array.has(e),f=Bi(t);Gi(o,e,f),p?(d.array.next({name:e,values:Bi(o)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&r.shouldDirty&&d.state.next({name:e,dirtyFields:ws(s,o),isDirty:S(e,f)})):!c||c._f||Ti(f)?_(e,f,r):w(e,f,r),Hs(e,l)&&d.state.next({...n,name:e}),d.state.next({name:a.mount?e:void 0,values:Bi(o)})},L=async e=>{a.mount=!0;const s=e.target;let m=s.name,S=!0;const E=Vi(i,m),_=e=>{S=Number.isNaN(e)||Oi(e)&&isNaN(e.getTime())||as(e,Vi(o,m,e))},w=Ns(r.mode),A=Ns(r.reValidateMode);if(E){let a,P;const O=s.type?ks(E._f):Ii(e),T=e.type===$i||e.type===zi,k=!((L=E._f).mount&&(L.required||L.min||L.max||L.maxLength||L.minLength||L.pattern||L.validate)||r.resolver||Vi(n.errors,m)||E._f.deps)||((e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:!(r?n.isOnChange:i.isOnChange)||e))(T,Vi(n.touchedFields,m),n.isSubmitted,A,w),C=Hs(m,l,T);Gi(o,m,O),T?s&&s.readOnly||(E._f.onBlur&&E._f.onBlur(e),t&&t(0)):E._f.onChange&&E._f.onChange(e);const I=y(m,O,T),N=!ds(I)||C;if(!T&&d.state.next({name:m,type:e.type,values:Bi(o)}),k)return(u.isValid||h.isValid)&&("onBlur"===r.mode?T&&f():T||f()),N&&d.state.next({name:m,...C?{}:I});if(!T&&C&&d.state.next({...n}),r.resolver){const{errors:e}=await b([m]);if(_(O),S){const t=Fs(n.errors,i,m),r=Fs(e,i,t.name||m);a=r.error,m=r.name,P=ds(e)}}else g([m],!0),a=(await js(E,l.disabled,o,p,r.shouldUseNativeValidation))[m],g([m]),_(O),S&&(a?P=!1:(u.isValid||h.isValid)&&(P=await v(i,!0)));S&&(E._f.deps&&x(E._f.deps),((e,i,s,o)=>{const a=Vi(n.errors,e),l=(u.isValid||h.isValid)&&ji(i)&&n.isValid!==i;var p;if(r.delayError&&s?(p=()=>((e,t)=>{Gi(n.errors,e,t),d.state.next({errors:n.errors})})(e,s),t=e=>{clearTimeout(c),c=setTimeout(p,e)},t(r.delayError)):(clearTimeout(c),t=null,s?Gi(n.errors,e,s):vs(n.errors,e)),(s?!as(a,s):a)||!ds(o)||l){const t={...o,...l&&ji(i)?{isValid:i}:{},errors:n.errors,name:e};n={...n,...t},d.state.next(t)}})(m,P,a,I))}var L},P=(e,t)=>{if(Vi(n.errors,t)&&e.focus)return e.focus(),1},x=async(e,t={})=>{let s,o;const a=us(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await b(e);if(e)for(const r of e){const e=Vi(t,r);e?Gi(n.errors,r,e):vs(n.errors,r)}else n.errors=t;return t})(Di(e)?e:a);s=ds(t),o=e?!a.some((e=>Vi(t,e))):s}else e?(o=(await Promise.all(a.map((async e=>{const t=Vi(i,e);return await v(t&&t._f?{[e]:t}:t)})))).every(Boolean),(o||n.isValid)&&f()):o=s=await v(i);return d.state.next({...!is(e)||(u.isValid||h.isValid)&&s!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:s}:{},errors:n.errors}),t.shouldFocus&&!o&&Bs(i,P,e?a:l.mount),o},O=e=>{const t={...a.mount?o:s};return Di(e)?t:is(e)?Vi(t,e):e.map((e=>Vi(t,e)))},T=(e,t)=>({invalid:!!Vi((t||n).errors,e),isDirty:!!Vi((t||n).dirtyFields,e),error:Vi((t||n).errors,e),isValidating:!!Vi(n.validatingFields,e),isTouched:!!Vi((t||n).touchedFields,e)}),k=(e,t,r)=>{const s=(Vi(i,e,{_f:{}})._f||{}).ref,o=Vi(n.errors,e)||{},{ref:a,message:l,type:c,...u}=o;Gi(n.errors,e,{...u,...t,ref:s}),d.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&s&&s.focus&&s.focus()},C=e=>d.state.subscribe({next:t=>{var r,i,a;r=e.name,i=t.name,a=e.exact,(!r||!i||r===i||us(r).some((e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e)))))&&((e,t,r,n)=>{r(e);const{name:i,...s}=e;return ds(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find((e=>t[e]===(!n||Yi)))})(t,e.formState||u,U,e.reRenderRoot)&&e.callback({values:{...o},...n,...t,defaultValues:s})}}).unsubscribe,I=(e,t={})=>{for(const a of e?us(e):l.mount)l.mount.delete(a),l.array.delete(a),t.keepValue||(vs(i,a),vs(o,a)),!t.keepError&&vs(n.errors,a),!t.keepDirty&&vs(n.dirtyFields,a),!t.keepTouched&&vs(n.touchedFields,a),!t.keepIsValidating&&vs(n.validatingFields,a),!r.shouldUnregister&&!t.keepDefaultValue&&vs(s,a);d.state.next({values:Bi(o)}),d.state.next({...n,...t.keepDirty?{isDirty:S()}:{}}),!t.keepIsValid&&f()},N=({disabled:e,name:t})=>{(ji(e)&&a.mount||e||l.disabled.has(t))&&(e?l.disabled.add(t):l.disabled.delete(t))},R=(e,t={})=>{let n=Vi(i,e);const o=ji(t.disabled)||ji(r.disabled);return Gi(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),n?N({disabled:ji(t.disabled)?t.disabled:r.disabled,name:e}):m(e,!0,t.value),{...o?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:Is(t.min),max:Is(t.max),minLength:Is(t.minLength),maxLength:Is(t.maxLength),pattern:Is(t.pattern)}:{},name:e,onChange:L,onBlur:L,ref:o=>{if(o){R(e,t),n=Vi(i,e);const r=Di(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>ys(e)||xi(e))(r),l=n._f.refs||[];if(a?l.find((e=>e===r)):r===n._f.ref)return;Gi(i,e,{_f:{...n._f,...a?{refs:[...l.filter(bs),r,...Array.isArray(Vi(s,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),m(e,!1,void 0,r)}else n=Vi(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Ni(l.array,e)||!a.action)&&l.unMount.add(e)}}},H=()=>r.shouldFocusError&&Bs(i,P,l.mount),B=(e,t)=>async s=>{let a;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let c=Bi(o);if(d.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await b();n.errors=e,c=Bi(t)}else await v(i);if(l.disabled.size)for(const e of l.disabled)vs(c,e);if(vs(n.errors,"root"),ds(n.errors)){d.state.next({errors:{}});try{await e(c,s)}catch(e){a=e}}else t&&await t({...n.errors},s),H(),setTimeout(H);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ds(n.errors)&&!a,submitCount:n.submitCount+1,errors:n.errors}),a)throw a},F=(e,t={})=>{const c=e?Bi(e):s,h=Bi(c),p=ds(e),f=p?s:h;if(t.keepDefaultValues||(s=c),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...l.mount,...Object.keys(ws(s,o))]);for(const t of Array.from(e))Vi(n.dirtyFields,t)?Gi(f,t,Vi(o,t)):A(t,Vi(f,t))}else{if(Hi&&Di(e))for(const e of l.mount){const t=Vi(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(gs(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of l.mount)A(e,Vi(f,e));else i={}}o=r.shouldUnregister?t.keepDefaultValues?Bi(s):{}:Bi(f),d.array.next({values:{...f}}),d.state.next({values:{...f}})}l={mount:t.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!t.keepIsValid||!!t.keepDirtyValues,a.watch=!!r.shouldUnregister,d.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!p&&(t.keepDirty?n.isDirty:!(!t.keepDefaultValues||as(e,s))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:p?{}:t.keepDirtyValues?t.keepDefaultValues&&o?ws(s,o):n.dirtyFields:t.keepDefaultValues&&e?ws(s,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:s})},D=(e,t)=>F(fs(e)?e(o):e,t),U=e=>{n={...n,...e}},M={control:{register:R,unregister:I,getFieldState:T,handleSubmit:B,setError:k,_subscribe:C,_runSchema:b,_focusError:H,_getWatch:E,_getDirty:S,_setValid:f,_setFieldArray:(e,t=[],l,c,p=!0,f=!0)=>{if(c&&l&&!r.disabled){if(a.action=!0,f&&Array.isArray(Vi(i,e))){const t=l(Vi(i,e),c.argA,c.argB);p&&Gi(i,e,t)}if(f&&Array.isArray(Vi(n.errors,e))){const t=l(Vi(n.errors,e),c.argA,c.argB);p&&Gi(n.errors,e,t),((e,t)=>{!Ui(Vi(e,t)).length&&vs(e,t)})(n.errors,e)}if((u.touchedFields||h.touchedFields)&&f&&Array.isArray(Vi(n.touchedFields,e))){const t=l(Vi(n.touchedFields,e),c.argA,c.argB);p&&Gi(n.touchedFields,e,t)}(u.dirtyFields||h.dirtyFields)&&(n.dirtyFields=ws(s,o)),d.state.next({name:e,isDirty:S(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Gi(o,e,t)},_setDisabledField:N,_setErrors:e=>{n.errors=e,d.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>Ui(Vi(a.mount?o:s,e,r.shouldUnregister?Vi(s,e,[]):[])),_reset:F,_resetDefaultValues:()=>fs(r.defaultValues)&&r.defaultValues().then((e=>{D(e,r.resetOptions),d.state.next({isLoading:!1})})),_removeUnmounted:()=>{for(const e of l.unMount){const t=Vi(i,e);t&&(t._f.refs?t._f.refs.every((e=>!bs(e))):!bs(t._f.ref))&&I(e)}l.unMount=new Set},_disableForm:e=>{ji(e)&&(d.state.next({disabled:e}),Bs(i,((t,r)=>{const n=Vi(i,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach((t=>{t.disabled=n._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:u,get _fields(){return i},get _formValues(){return o},get _state(){return a},set _state(e){a=e},get _defaultValues(){return s},get _names(){return l},set _names(e){l=e},get _formState(){return n},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(a.mount=!0,h={...h,...e.formState},C({...e,formState:h})),trigger:x,register:R,handleSubmit:B,watch:(e,t)=>fs(e)?d.state.subscribe({next:r=>"values"in r&&e(E(void 0,t),r)}):E(e,t,!0),setValue:A,getValues:O,reset:D,resetField:(e,t={})=>{Vi(i,e)&&(Di(t.defaultValue)?A(e,Bi(Vi(s,e))):(A(e,t.defaultValue),Gi(s,e,Bi(t.defaultValue))),t.keepTouched||vs(n.touchedFields,e),t.keepDirty||(vs(n.dirtyFields,e),n.isDirty=t.defaultValue?S(e,Bi(Vi(s,e))):S()),t.keepError||(vs(n.errors,e),u.isValid&&f()),d.state.next({...n}))},clearErrors:e=>{e&&us(e).forEach((e=>vs(n.errors,e))),d.state.next({errors:e?n.errors:{}})},unregister:I,setError:k,setFocus:(e,t={})=>{const r=Vi(i,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&fs(e.select)&&e.select())}},getFieldState:T};return{...M,formControl:M}}const zs=({open:r,onClose:n,colorScheme:s="light",onSendFeedback:a,closeOnSubmit:l=!0,resetFormOnClose:c=!0})=>{const{t:u}=me("send-feedback",{i18n:gi}),{SUPPORT_FORM_URL:h}=Ai(),{control:p,handleSubmit:f,reset:g,formState:{isSubmitting:m,isValid:y}}=function(e={}){const t=A.useRef(void 0),r=A.useRef(void 0),[n,i]=A.useState({isDirty:!1,isValidating:!1,isLoading:fs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:fs(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!fs(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:r,...i}=$s(e);t.current={...i,formState:n}}const s=t.current.control;return s._options=e,ns((()=>{const e=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i((e=>({...e,isReady:!0}))),s._formState.isReady=!0,e}),[s]),A.useEffect((()=>s._disableForm(e.disabled)),[s,e.disabled]),A.useEffect((()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)}),[s,e.mode,e.reValidateMode]),A.useEffect((()=>{e.errors&&(s._setErrors(e.errors),s._focusError())}),[s,e.errors]),A.useEffect((()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})}),[s,e.shouldUnregister]),A.useEffect((()=>{if(s._proxyFormState.isDirty){const e=s._getDirty();e!==n.isDirty&&s._subjects.state.next({isDirty:e})}}),[s,n.isDirty]),A.useEffect((()=>{e.values&&!as(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,i((e=>({...e})))):s._resetDefaultValues()}),[s,e.values]),A.useEffect((()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()})),t.current.formState=rs(n,s),t.current}({defaultValues:{subject:"",title:"",description:""},mode:"onChange"}),b=C((()=>[{label:u("dialog.subjects.leaveFeedback"),value:"leaveFeedback"},{label:u("dialog.subjects.reportBug"),value:"reportBug"},{label:u("dialog.subjects.requestFeature"),value:"requestFeature"},{label:u("dialog.subjects.shareThoughts"),value:"shareThoughts"}]),[u]);k((()=>{!r&&c&&g()}),[r,g,c]);const v=()=>{g(),n()};return e(qr,{themeInstance:B,directionInstance:H,colorScheme:s,children:t(G,{onClose:v,open:r,maxWidth:"sm",fullWidth:!0,"data-test":"send-feedback-dialog",children:[e(W,{logo:!1,onClose:v,children:e(K,{color:"text.primary",variant:"subtitle1",children:u("dialog.title")})}),t(U,{component:"form",onSubmit:f((async e=>{a(e),l&&v()})),children:[e($,{sx:{px:3},dividers:!0,children:t(i,{gap:2,children:[e(ls,{name:"subject",control:p,render:({field:{onChange:t,value:r}})=>e(J,{multiple:!1,options:b,value:b.find((e=>e.label===r))||null,onChange:(e,r)=>t(r?.label||""),renderInput:t=>e(X,{"data-test":"subject-send-feedback-input",...t,placeholder:u("dialog.fieldSubjectPlaceholder"),color:"secondary"})})}),e(ls,{name:"title",control:p,rules:{required:!0,maxLength:{value:90,message:u("dialog.titleLengthError")}},render:({field:t,fieldState:r})=>e(q,{fullWidth:!0,children:e(X,{...t,fullWidth:!0,placeholder:u("dialog.fieldTitlePlaceholder"),"data-test":"title-send-feedback-input",error:!!r.error,helperText:r.error?.message,required:!0,sx:{"& .MuiInputBase-root":{minHeight:56}},color:"secondary"})})}),e(ls,{name:"description",control:p,rules:{required:!0,maxLength:{value:1024,message:u("dialog.descriptionLengthError")}},render:({field:t,fieldState:r})=>e(q,{fullWidth:!0,children:e(X,{...t,multiline:!0,rows:5,fullWidth:!0,placeholder:u("dialog.fieldDescriptionPlaceholder"),"data-test":"description-send-feedback-input",error:!!r.error,helperText:r.error?.message,required:!0,color:"secondary"})})}),e(Y,{severity:"info",action:e(Z,{href:h,target:"_blank",color:"info",children:u("dialog.alert.button")}),children:u("dialog.alert.title")}),t(i,{direction:"row",gap:1,children:[e(o,{sx:{ml:.5},variant:"body2",color:"text.primary",children:"• "}),e(o,{variant:"body2",color:"text.primary",children:u("dialog.note")})]})]})}),t(z,{sx:{px:3,py:2,gap:1},children:[e(d,{variant:"text",color:"secondary",onClick:v,"data-test":"cancel-send-feedback-modal",children:u("dialog.cancel")}),e(Xr,{type:"submit",variant:"contained",color:"primary",isLoading:m,"data-test":"submit-feedback-button",disabled:!y||m,children:u("dialog.submit")})]})]})]})})},Ks=({appType:r,colorScheme:h="dark",multiDelpoymentSlot:d,containerSx:p={}})=>{const{t:f}=me("common",{i18n:gi}),g=(e=>{switch(e){case Yn.APP_IO:return"https://elementor.com/help/plugins-by-elementor/image-optimizer/";case Yn.APP_ACCESS:return"https://elementor.com/help/plugins-by-elementor/web-accessibility/";case Yn.PLUGIN:return"https://elementor.com/help/elementor-editor/";case Yn.APP_MAILER:return"https://elementor.com/help/plugins-by-elementor/site-mailer/";case Yn.APP_AI:return"https://elementor.com/help/elementor-ai/";default:return}})(r),[m,y]=O(!1);return t(qr,{themeInstance:B,directionInstance:H,colorScheme:h,children:[e(n,{sx:{top:0,...p,position:"sticky",zIndex:1100},children:e(s,{sx:{pl:"30px !important",backgroundColor:"background.paper"},variant:"dense",children:t(i,{direction:"row",justifyContent:"space-between",width:"100%",children:[t(i,{direction:"row",alignItems:"center",gap:1,flexWrap:"nowrap",children:[e(ee,{}),e(o,{variant:"button",fontSize:"24px",whiteSpace:"nowrap",children:f("header.title")})]}),t(i,{direction:"row",alignItems:"center",gap:1,children:[e(a,{size:"small",onClick:()=>y(!0),children:e(l,{})}),e(Pi,{containerSx:{"& .MuiDrawer-paper":{width:320,padding:3,top:80,height:"calc(100vh - 80px)","@media (max-width: 784px)":{top:94,height:"calc(100vh - 94px)"}}}}),g&&e(a,{size:"small",href:g,target:"_blank",children:e(c,{})}),d,e(u,{orientation:"vertical",flexItem:!0,sx:{my:1,mx:1}}),e(yi,{})]})]})})}),e(zs,{open:m,onClose:()=>y(!1),onSendFeedback:e=>console.log("send feedback",e)})]})};export{_i as ElementorOneAssetsContext,wi as ElementorOneAssetsProvider,Ks as ElementorOneHeader,zs as SendFeedbackDialog,Pi as WhatsNew};
2
+ //# sourceMappingURL=index.esm.js.map