@rainbow-robotics/preview-host 1.10.2-dev.4 → 1.10.2-dev.5
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.
- package/build.mjs +1 -1
- package/dist/assets/{AmrCapabilityControl.BYWtW5zh.js → AmrCapabilityControl.B4CgW0HQ.js} +1 -1
- package/dist/assets/{RbLocalizationProvider.DiNCanKM.js → RbLocalizationProvider.GKeO3IYX.js} +1 -1
- package/dist/assets/{__federation_expose_App.5SC7k3oh.js → __federation_expose_App.CTNoe34M.js} +216 -216
- package/dist/assets/{cssMode.zUWdXEHX.js → cssMode.B8M8oTvW.js} +1 -1
- package/dist/assets/{freemarker2.BCp5-F58.js → freemarker2.DDRxBywH.js} +1 -1
- package/dist/assets/{handlebars.CdavlXja.js → handlebars.Bl_WSn3N.js} +1 -1
- package/dist/assets/{html.DycKZz0Z.js → html.B3xK5uKe.js} +1 -1
- package/dist/assets/{htmlMode.Bexa7Eb7.js → htmlMode.D7Y_WtSh.js} +1 -1
- package/dist/assets/{index.NxFdZIH_.js → index.2D6SvrX5.js} +2 -2
- package/dist/assets/{index.YvWt1NJa.js → index.Cl6A_3-S.js} +1 -1
- package/dist/assets/{index.D_wrWuT_.js → index.DHJstkPN.js} +1 -1
- package/dist/assets/{javascript.CPD6oUgF.js → javascript.DQdSFvQA.js} +1 -1
- package/dist/assets/{jsonMode.Bwc_CAZy.js → jsonMode.DxLwckq7.js} +1 -1
- package/dist/assets/{liquid.Rjjfinor.js → liquid.CPT7F-Bn.js} +1 -1
- package/dist/assets/{lspLanguageFeatures.DpniqVpd.js → lspLanguageFeatures.Bzs0D1Pd.js} +1 -1
- package/dist/assets/{mdx.2Fg5uNAP.js → mdx.B5UQl7GY.js} +1 -1
- package/dist/assets/{python.BXmYpQPB.js → python.DbaSmoQO.js} +1 -1
- package/dist/assets/{razor.D6a73xBW.js → razor.oekgvGjX.js} +1 -1
- package/dist/assets/remoteEntry.js +1 -1
- package/dist/assets/{tsMode.d9HzXipV.js → tsMode.PuE2ZtiA.js} +1 -1
- package/dist/assets/{typescript.NcbR-ZpH.js → typescript.cS3dWYR_.js} +1 -1
- package/dist/assets/{useFileDownload.B4x3iw6f.js → useFileDownload.BcvMcbUi.js} +1 -1
- package/dist/assets/{xml.BuYX8L0j.js → xml.B9eOzNfN.js} +1 -1
- package/dist/assets/{yaml.CtUyb4UQ.js → yaml.DHBk_OGj.js} +1 -1
- package/dist/index.html +5 -5
- package/package.json +1 -1
- package/serve.mjs +2 -1
package/build.mjs
CHANGED
|
@@ -44,7 +44,7 @@ mkdirSync(outDir, { recursive: true });
|
|
|
44
44
|
cpSync(nexusDist, outDir, { recursive: true });
|
|
45
45
|
|
|
46
46
|
// rb static assets served at runtime (/imgs, /fonts, ...)
|
|
47
|
-
// models/ excluded — too large for npm (700MB+)
|
|
47
|
+
// models/ excluded — too large for npm (700MB+); with --robot-host, serve.mjs uses the robot's assets
|
|
48
48
|
for (const dir of ["imgs", "fonts", "sounds", "data"]) {
|
|
49
49
|
const src = resolve(assetsPublic, dir);
|
|
50
50
|
if (existsSync(src)) cpSync(src, resolve(outDir, dir), { recursive: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as f}from"./__federation_fn_import.DdkEuT6t.js";import{co as g,H as s,j as t,X as v,U as p,x as b,c1 as c,bI as O,aW as E,a$ as F,V as B,bs as P,bF as _,_ as T,fP as w,gG as R}from"./RbLocalizationProvider.DiNCanKM.js";import{a as D}from"./index.D_wrWuT_.js";const{useQuery:L}=await f("@tanstack/react-query"),M={skipErrorToast:!0},C=[{key:"dock",endpoint:"/{robot_model}/capability/dock",labelKey:"move.amr.rightPanel.capability.dock"},{key:"io",endpoint:"/{robot_model}/capability/Io",labelKey:"move.amr.rightPanel.capability.io"},{key:"camera",endpoint:"/{robot_model}/capability/camera",labelKey:"move.amr.rightPanel.capability.camera"},{key:"lidar2d",endpoint:"/{robot_model}/capability/lidar2d",labelKey:"move.amr.rightPanel.capability.lidar2d"},{key:"lidar3d",endpoint:"/{robot_model}/capability/lidar3d",labelKey:"move.amr.rightPanel.capability.lidar3d"},{key:"imu",endpoint:"/{robot_model}/capability/imu",labelKey:"move.amr.rightPanel.capability.imu"},{key:"safetyBumper",endpoint:"/{robot_model}/capability/safetyBumper",labelKey:"move.amr.rightPanel.capability.safetyBumper"},{key:"safetyInterlock",endpoint:"/{robot_model}/capability/safetyInterlock",labelKey:"move.amr.rightPanel.capability.safetyInterlock"},{key:"safetyObstacle",endpoint:"/{robot_model}/capability/safetyObstacle",labelKey:"move.amr.rightPanel.capability.safetyObstacle"},{key:"safetyOperationStop",endpoint:"/{robot_model}/capability/safetyOperationStop",labelKey:"move.amr.rightPanel.capability.safetyOperationStop"},{key:"safetySpeedControl",endpoint:"/{robot_model}/capability/safetySpeedControl",labelKey:"move.amr.rightPanel.capability.safetySpeedControl"},{key:"tabos",endpoint:"/{robot_model}/capability/tabos",labelKey:"move.amr.rightPanel.capability.tabos"}],K=e=>typeof e=="object"&&e!==null&&"enabled"in e&&e.enabled===!1,q=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"message"in e){const a=e.message;if(typeof a=="string")return a}},U=async({robot_model:e})=>{const a=await Promise.allSettled(C.map(l=>{const r=l.endpoint.replace("{robot_model}",e);return D.get(r,M)}));return C.map((l,r)=>{const n=a[r];return n.status==="fulfilled"?{...l,supported:!K(n.value),data:n.value}:{...l,supported:!1,data:null,errorMessage:q(n.reason)}})},$=({robot_model:e,enabled:a=!0})=>L({queryKey:["amrCapabilities",e],queryFn:()=>U({robot_model:e}),enabled:!!e&&a,staleTime:5*1e3,gcTime:60*1e3}),{useMutation:V}=await f("@tanstack/react-query"),j=()=>V({mutationFn:({robot_model:e,target:a,frequency:l})=>D.post(`/${e}/control/streamFrequency`,{target:a,frequency:Math.min(10,Math.max(0,l))})}),{useState:k}=await f("react"),G=4294967295,x=e=>{if(!(e==null||e===G))return`${e} ms`},Y={0:"NONE",1:"CHARGING",2:"COMPLETE",3:"FAIL",4:"CANCEL"},z={0:"DEFAULT",1:"TABOS"},H={0:"CABLE",1:"CONTACT",2:"INDUCTIVE"},Q={0:"RPLIDAR",1:"SICK",2:"LAKI",3:"LIVOX",4:"HOKUYO"},X={0:"ORBBEC"},i=({label:e,children:a})=>s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:e}),t("span",{className:b("typo-compact-xs-normal text-right",a!=null?"text-fg-default":"text-fg-subtler"),children:a??"—"})]}),W={default:"gray",success:"green",warning:"orange",danger:"red"},y=({label:e,variant:a="default"})=>t(T,{type:"soft",color:W[a],children:e}),h=({label:e,value:a})=>t(i,{label:e,children:t(y,{label:a?"ON":"OFF",variant:a?"success":"default"})}),u=({label:e,bits:a})=>s(c,{className:"gap-1",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:e}),a?.length?t(p,{className:"gap-1",children:a.map((l,r)=>t("div",{className:b("size-4 rounded-sm border text-center leading-4",l?"border-fg-success bg-fill-success-subtlest":"border-border-subtler bg-fill-disabled"),children:t("span",{className:b("typo-compact-2xs-normal",l?"text-fg-success":"text-fg-subtler"),children:r})},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]}),N=({label:e,connection:a,rows:l,children:r})=>{const{t:n}=g();return s(c,{className:"bg-fill-disabled gap-1.5 rounded-md p-2.5",children:[s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-semibold text-fg-default min-w-0 break-words",children:e}),t("span",{className:b("typo-compact-2xs-medium shrink-0",a?"text-fg-success":"text-fg-subtler"),children:n(a?"settings.amr.frs.status.connected":"settings.amr.frs.status.disconnected")})]}),l.map(({key:o,value:d})=>t(i,{label:o,children:d},o)),r]})},J=({label:e,value:a})=>t(T,{type:"soft",color:a?"green":"gray",children:s(p,{className:"items-center gap-1",children:[a?t(w,{className:"size-3"}):t(R,{className:"size-3"}),t("span",{children:e}),t("span",{className:"font-semibold",children:a?"On":"Off"})]})}),I=({flags:e})=>t(p,{className:"flex-wrap gap-1.5",children:e.map(({label:a,value:l})=>t(J,{label:a,value:l},a))}),Z=({streams:e})=>e.length?s(c,{className:"border-subtle mt-0.5 gap-1 border-t pt-1.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Streams"}),t(p,{className:"flex-wrap gap-1",children:e.map(a=>s(p,{className:"border-subtle bg-alt-1 items-center gap-1 rounded px-1.5 py-1",children:[t("span",{className:"typo-compact-2xs-semibold text-fg-default",children:a.quality}),s("span",{className:"typo-compact-2xs-normal text-fg-subtle",children:[a.width,"x",a.height]}),s("span",{className:"typo-compact-2xs-normal text-fg-subtler",children:[a.fps,"fps"]})]},`${a.camId}-${a.quality}`))})]}):null,ee=({data:e})=>{const a=Y[e.chargeState??-1]??String(e.chargeState),l=e.chargeState===1?"success":e.chargeState===3?"danger":e.chargeState===4?"warning":"default";return s(c,{className:"gap-2",children:[s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Dock State",value:e.dockState}),t(i,{label:"Charge State",children:t(y,{label:a,variant:l})}),s(i,{label:"Battery",children:[e.batteryPercent?.toFixed(1)," %"]}),s(i,{label:"Charge Current",children:[e.chargeCurrent?.toFixed(2)," A"]}),s(i,{label:"Contact Voltage",children:[e.contactVoltage?.toFixed(2)," V"]}),t(i,{label:"Battery Type",children:t(y,{label:z[e.batteryType??0]??"—"})})]}),s(p,{className:"items-center gap-1.5 px-0.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:"Charge Type"}),e.chargeType?.length?t(p,{className:"flex-wrap gap-1.5",children:e.chargeType.map(r=>t(y,{label:H[r]??String(r),variant:"default"},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]})]})},ae=({data:e})=>s(c,{className:"gap-3 p-0.5",children:[t(u,{label:"MCU0 DIO",bits:e.mcu0Dio}),t(u,{label:"MCU1 DIO",bits:e.mcu1Dio}),t(u,{label:"MCU0 DIN",bits:e.mcu0Din}),t(u,{label:"MCU1 DIN",bits:e.mcu1Din})]}),te=({data:e})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs},{label:"Depth",value:e.enabledDepth},{label:"Filter",value:e.enabledFilter}]}),e.info?.length?e.info.map((a,l)=>{const r=typeof a.type=="number"?X[a.type]??String(a.type):a.type??"—",n=a.camId??a.index??l,o=e.rtspInfo?.filter(d=>d.camId===n)??[];return t(N,{label:`Camera ${n}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:r},{key:"TF",value:a.tf?.length?a.tf.map(d=>d.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(a.dataAgeMs)}],children:t(Z,{streams:o})},l)}):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),A=({data:e,is3d:a=!1})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs}]}),e.info?.length?e.info.map((l,r)=>t(N,{label:`Lidar ${l.index??r}${l.serial?` · ${l.serial}`:""}`,connection:l.connection,rows:[{key:"Type",value:Q[l.type]??String(l.type??"—")},...a?[]:[{key:"IP",value:l.ip}],{key:"Safety",value:l.safety!==void 0?l.safety?"Safety":"Normal":void 0},{key:"TF",value:l.tf?.length?l.tf.map(n=>n.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(l.dataAgeMs)}]},r)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),le=({data:e})=>t(c,{className:"gap-2",children:e.info?.length?e.info.map((a,l)=>t(N,{label:`IMU ${a.index??l}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:a.type===1?"IMU":"DEFAULT"},{key:"Data Age",value:x(a.dataAgeMs)}]},l)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})}),se=({data:e})=>{const a=[{label:"Bumper State",value:e.bumperState},{label:"Interlock State",value:e.interlockState},{label:"Obstacle Detect",value:e.obsDetect},{label:"Operation Stop",value:e.operationStopState},{label:"Speed Control",value:e.speedControlState}].filter(l=>l.value!==void 0);return s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Enabled",value:e.enabled}),a.map(l=>t(h,{label:l.label,value:l.value},l.label))]})},re=({data:e})=>s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[s(i,{label:"Voltage",children:[e.tabosVoltage?.toFixed(2)," V"]}),s(i,{label:"Current",children:[e.tabosCurrent?.toFixed(2)," A"]}),s(i,{label:"SOC",children:[e.tabosSoc?.toFixed(1)," %"]}),s(i,{label:"SOH",children:[e.tabosSoh?.toFixed(1)," %"]}),s(i,{label:"Temp",children:[e.tabosTemp?.toFixed(1)," °C"]})]}),ne=({capKey:e,data:a})=>{switch(e){case"dock":return t(ee,{data:a});case"io":return t(ae,{data:a});case"camera":return t(te,{data:a});case"lidar2d":return t(A,{data:a});case"lidar3d":return t(A,{data:a,is3d:!0});case"imu":return t(le,{data:a});case"tabos":return t(re,{data:a});default:return t(se,{data:a})}},ce=[{label:"LiDAR 2D",value:"lidar2d"},{label:"LiDAR 3D",value:"lidar3d"},{label:"OBS Map",value:"obsMap"}],oe=({robotModel:e})=>{const[a,l]=k("lidar2d"),[r,n]=k("1"),{mutate:o,isPending:d}=j();return s(c,{className:"gap-2 pb-1",children:[s(p,{className:"items-center justify-between gap-2",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Target"}),t(F,{size:"2xs",variant:"brand",disabled:d,onClick:()=>{const m=Math.min(10,Math.max(0,Number(r)));o({robot_model:e,target:a,frequency:m})},children:"Set"})]}),t(P,{size:"sm",value:a,handleChange:m=>l(m),children:ce.map(({label:m,value:S})=>t(B,{value:S,children:m},S))}),t(p,{className:"items-center gap-2",children:t(_,{className:"flex-1",size:"sm",value:r,step:1,digit:0,fixedDigit:0,min:"0",max:"10",handleChange:m=>n(m)})})]})},ie=({item:e})=>{const{t:a}=g();return e.supported?e.data?t("div",{className:"pb-1",children:t(ne,{capKey:e.key,data:e.data})}):null:t("p",{className:"typo-compact-xs-normal text-fg-disabled px-1 py-2",children:a("move.amr.rightPanel.capability.status.notSupported")})},pe=()=>{const{t:e}=g();return t(E,{className:"flex-1 [&_[data-slot='empty-view-section']]:h-full",type:"icon",icon:t(O,{size:20}),message:e("move.amr.rightPanel.capability.status.loading")})},ye=({className:e,robotModel:a})=>{const{t:l}=g(),{data:r,isLoading:n}=$({robot_model:a});return s(c,{className:b("AmrCapabilityControl h-full min-h-0",e),children:[n&&t(pe,{}),(r??[]).map(o=>t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{disabled:!o.supported,title:t(p,{className:"w-full items-center justify-between gap-2",children:t("span",{className:b("typo-compact-sm2-semibold min-w-0 truncate",o.supported?"text-fg-default":"text-fg-disabled"),children:l(o.labelKey)})}),children:t(ie,{item:o})})},o.key)),t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{title:t("span",{className:"typo-compact-sm2-semibold text-fg-default",children:l("move.amr.rightPanel.capability.streamFrequency")}),children:t(oe,{robotModel:a})})})]})};export{ye as default};
|
|
1
|
+
import{importShared as f}from"./__federation_fn_import.DdkEuT6t.js";import{co as g,H as s,j as t,X as v,U as p,x as b,c1 as c,bI as O,aW as E,a$ as F,V as B,bs as P,bF as _,_ as T,fP as w,gG as R}from"./RbLocalizationProvider.GKeO3IYX.js";import{a as D}from"./index.DHJstkPN.js";const{useQuery:L}=await f("@tanstack/react-query"),M={skipErrorToast:!0},C=[{key:"dock",endpoint:"/{robot_model}/capability/dock",labelKey:"move.amr.rightPanel.capability.dock"},{key:"io",endpoint:"/{robot_model}/capability/Io",labelKey:"move.amr.rightPanel.capability.io"},{key:"camera",endpoint:"/{robot_model}/capability/camera",labelKey:"move.amr.rightPanel.capability.camera"},{key:"lidar2d",endpoint:"/{robot_model}/capability/lidar2d",labelKey:"move.amr.rightPanel.capability.lidar2d"},{key:"lidar3d",endpoint:"/{robot_model}/capability/lidar3d",labelKey:"move.amr.rightPanel.capability.lidar3d"},{key:"imu",endpoint:"/{robot_model}/capability/imu",labelKey:"move.amr.rightPanel.capability.imu"},{key:"safetyBumper",endpoint:"/{robot_model}/capability/safetyBumper",labelKey:"move.amr.rightPanel.capability.safetyBumper"},{key:"safetyInterlock",endpoint:"/{robot_model}/capability/safetyInterlock",labelKey:"move.amr.rightPanel.capability.safetyInterlock"},{key:"safetyObstacle",endpoint:"/{robot_model}/capability/safetyObstacle",labelKey:"move.amr.rightPanel.capability.safetyObstacle"},{key:"safetyOperationStop",endpoint:"/{robot_model}/capability/safetyOperationStop",labelKey:"move.amr.rightPanel.capability.safetyOperationStop"},{key:"safetySpeedControl",endpoint:"/{robot_model}/capability/safetySpeedControl",labelKey:"move.amr.rightPanel.capability.safetySpeedControl"},{key:"tabos",endpoint:"/{robot_model}/capability/tabos",labelKey:"move.amr.rightPanel.capability.tabos"}],K=e=>typeof e=="object"&&e!==null&&"enabled"in e&&e.enabled===!1,q=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"message"in e){const a=e.message;if(typeof a=="string")return a}},U=async({robot_model:e})=>{const a=await Promise.allSettled(C.map(l=>{const r=l.endpoint.replace("{robot_model}",e);return D.get(r,M)}));return C.map((l,r)=>{const n=a[r];return n.status==="fulfilled"?{...l,supported:!K(n.value),data:n.value}:{...l,supported:!1,data:null,errorMessage:q(n.reason)}})},$=({robot_model:e,enabled:a=!0})=>L({queryKey:["amrCapabilities",e],queryFn:()=>U({robot_model:e}),enabled:!!e&&a,staleTime:5*1e3,gcTime:60*1e3}),{useMutation:V}=await f("@tanstack/react-query"),j=()=>V({mutationFn:({robot_model:e,target:a,frequency:l})=>D.post(`/${e}/control/streamFrequency`,{target:a,frequency:Math.min(10,Math.max(0,l))})}),{useState:k}=await f("react"),G=4294967295,x=e=>{if(!(e==null||e===G))return`${e} ms`},Y={0:"NONE",1:"CHARGING",2:"COMPLETE",3:"FAIL",4:"CANCEL"},z={0:"DEFAULT",1:"TABOS"},H={0:"CABLE",1:"CONTACT",2:"INDUCTIVE"},Q={0:"RPLIDAR",1:"SICK",2:"LAKI",3:"LIVOX",4:"HOKUYO"},X={0:"ORBBEC"},i=({label:e,children:a})=>s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:e}),t("span",{className:b("typo-compact-xs-normal text-right",a!=null?"text-fg-default":"text-fg-subtler"),children:a??"—"})]}),W={default:"gray",success:"green",warning:"orange",danger:"red"},y=({label:e,variant:a="default"})=>t(T,{type:"soft",color:W[a],children:e}),h=({label:e,value:a})=>t(i,{label:e,children:t(y,{label:a?"ON":"OFF",variant:a?"success":"default"})}),u=({label:e,bits:a})=>s(c,{className:"gap-1",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:e}),a?.length?t(p,{className:"gap-1",children:a.map((l,r)=>t("div",{className:b("size-4 rounded-sm border text-center leading-4",l?"border-fg-success bg-fill-success-subtlest":"border-border-subtler bg-fill-disabled"),children:t("span",{className:b("typo-compact-2xs-normal",l?"text-fg-success":"text-fg-subtler"),children:r})},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]}),N=({label:e,connection:a,rows:l,children:r})=>{const{t:n}=g();return s(c,{className:"bg-fill-disabled gap-1.5 rounded-md p-2.5",children:[s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-semibold text-fg-default min-w-0 break-words",children:e}),t("span",{className:b("typo-compact-2xs-medium shrink-0",a?"text-fg-success":"text-fg-subtler"),children:n(a?"settings.amr.frs.status.connected":"settings.amr.frs.status.disconnected")})]}),l.map(({key:o,value:d})=>t(i,{label:o,children:d},o)),r]})},J=({label:e,value:a})=>t(T,{type:"soft",color:a?"green":"gray",children:s(p,{className:"items-center gap-1",children:[a?t(w,{className:"size-3"}):t(R,{className:"size-3"}),t("span",{children:e}),t("span",{className:"font-semibold",children:a?"On":"Off"})]})}),I=({flags:e})=>t(p,{className:"flex-wrap gap-1.5",children:e.map(({label:a,value:l})=>t(J,{label:a,value:l},a))}),Z=({streams:e})=>e.length?s(c,{className:"border-subtle mt-0.5 gap-1 border-t pt-1.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Streams"}),t(p,{className:"flex-wrap gap-1",children:e.map(a=>s(p,{className:"border-subtle bg-alt-1 items-center gap-1 rounded px-1.5 py-1",children:[t("span",{className:"typo-compact-2xs-semibold text-fg-default",children:a.quality}),s("span",{className:"typo-compact-2xs-normal text-fg-subtle",children:[a.width,"x",a.height]}),s("span",{className:"typo-compact-2xs-normal text-fg-subtler",children:[a.fps,"fps"]})]},`${a.camId}-${a.quality}`))})]}):null,ee=({data:e})=>{const a=Y[e.chargeState??-1]??String(e.chargeState),l=e.chargeState===1?"success":e.chargeState===3?"danger":e.chargeState===4?"warning":"default";return s(c,{className:"gap-2",children:[s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Dock State",value:e.dockState}),t(i,{label:"Charge State",children:t(y,{label:a,variant:l})}),s(i,{label:"Battery",children:[e.batteryPercent?.toFixed(1)," %"]}),s(i,{label:"Charge Current",children:[e.chargeCurrent?.toFixed(2)," A"]}),s(i,{label:"Contact Voltage",children:[e.contactVoltage?.toFixed(2)," V"]}),t(i,{label:"Battery Type",children:t(y,{label:z[e.batteryType??0]??"—"})})]}),s(p,{className:"items-center gap-1.5 px-0.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:"Charge Type"}),e.chargeType?.length?t(p,{className:"flex-wrap gap-1.5",children:e.chargeType.map(r=>t(y,{label:H[r]??String(r),variant:"default"},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]})]})},ae=({data:e})=>s(c,{className:"gap-3 p-0.5",children:[t(u,{label:"MCU0 DIO",bits:e.mcu0Dio}),t(u,{label:"MCU1 DIO",bits:e.mcu1Dio}),t(u,{label:"MCU0 DIN",bits:e.mcu0Din}),t(u,{label:"MCU1 DIN",bits:e.mcu1Din})]}),te=({data:e})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs},{label:"Depth",value:e.enabledDepth},{label:"Filter",value:e.enabledFilter}]}),e.info?.length?e.info.map((a,l)=>{const r=typeof a.type=="number"?X[a.type]??String(a.type):a.type??"—",n=a.camId??a.index??l,o=e.rtspInfo?.filter(d=>d.camId===n)??[];return t(N,{label:`Camera ${n}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:r},{key:"TF",value:a.tf?.length?a.tf.map(d=>d.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(a.dataAgeMs)}],children:t(Z,{streams:o})},l)}):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),A=({data:e,is3d:a=!1})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs}]}),e.info?.length?e.info.map((l,r)=>t(N,{label:`Lidar ${l.index??r}${l.serial?` · ${l.serial}`:""}`,connection:l.connection,rows:[{key:"Type",value:Q[l.type]??String(l.type??"—")},...a?[]:[{key:"IP",value:l.ip}],{key:"Safety",value:l.safety!==void 0?l.safety?"Safety":"Normal":void 0},{key:"TF",value:l.tf?.length?l.tf.map(n=>n.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(l.dataAgeMs)}]},r)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),le=({data:e})=>t(c,{className:"gap-2",children:e.info?.length?e.info.map((a,l)=>t(N,{label:`IMU ${a.index??l}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:a.type===1?"IMU":"DEFAULT"},{key:"Data Age",value:x(a.dataAgeMs)}]},l)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})}),se=({data:e})=>{const a=[{label:"Bumper State",value:e.bumperState},{label:"Interlock State",value:e.interlockState},{label:"Obstacle Detect",value:e.obsDetect},{label:"Operation Stop",value:e.operationStopState},{label:"Speed Control",value:e.speedControlState}].filter(l=>l.value!==void 0);return s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Enabled",value:e.enabled}),a.map(l=>t(h,{label:l.label,value:l.value},l.label))]})},re=({data:e})=>s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[s(i,{label:"Voltage",children:[e.tabosVoltage?.toFixed(2)," V"]}),s(i,{label:"Current",children:[e.tabosCurrent?.toFixed(2)," A"]}),s(i,{label:"SOC",children:[e.tabosSoc?.toFixed(1)," %"]}),s(i,{label:"SOH",children:[e.tabosSoh?.toFixed(1)," %"]}),s(i,{label:"Temp",children:[e.tabosTemp?.toFixed(1)," °C"]})]}),ne=({capKey:e,data:a})=>{switch(e){case"dock":return t(ee,{data:a});case"io":return t(ae,{data:a});case"camera":return t(te,{data:a});case"lidar2d":return t(A,{data:a});case"lidar3d":return t(A,{data:a,is3d:!0});case"imu":return t(le,{data:a});case"tabos":return t(re,{data:a});default:return t(se,{data:a})}},ce=[{label:"LiDAR 2D",value:"lidar2d"},{label:"LiDAR 3D",value:"lidar3d"},{label:"OBS Map",value:"obsMap"}],oe=({robotModel:e})=>{const[a,l]=k("lidar2d"),[r,n]=k("1"),{mutate:o,isPending:d}=j();return s(c,{className:"gap-2 pb-1",children:[s(p,{className:"items-center justify-between gap-2",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Target"}),t(F,{size:"2xs",variant:"brand",disabled:d,onClick:()=>{const m=Math.min(10,Math.max(0,Number(r)));o({robot_model:e,target:a,frequency:m})},children:"Set"})]}),t(P,{size:"sm",value:a,handleChange:m=>l(m),children:ce.map(({label:m,value:S})=>t(B,{value:S,children:m},S))}),t(p,{className:"items-center gap-2",children:t(_,{className:"flex-1",size:"sm",value:r,step:1,digit:0,fixedDigit:0,min:"0",max:"10",handleChange:m=>n(m)})})]})},ie=({item:e})=>{const{t:a}=g();return e.supported?e.data?t("div",{className:"pb-1",children:t(ne,{capKey:e.key,data:e.data})}):null:t("p",{className:"typo-compact-xs-normal text-fg-disabled px-1 py-2",children:a("move.amr.rightPanel.capability.status.notSupported")})},pe=()=>{const{t:e}=g();return t(E,{className:"flex-1 [&_[data-slot='empty-view-section']]:h-full",type:"icon",icon:t(O,{size:20}),message:e("move.amr.rightPanel.capability.status.loading")})},ye=({className:e,robotModel:a})=>{const{t:l}=g(),{data:r,isLoading:n}=$({robot_model:a});return s(c,{className:b("AmrCapabilityControl h-full min-h-0",e),children:[n&&t(pe,{}),(r??[]).map(o=>t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{disabled:!o.supported,title:t(p,{className:"w-full items-center justify-between gap-2",children:t("span",{className:b("typo-compact-sm2-semibold min-w-0 truncate",o.supported?"text-fg-default":"text-fg-disabled"),children:l(o.labelKey)})}),children:t(ie,{item:o})})},o.key)),t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{title:t("span",{className:"typo-compact-sm2-semibold text-fg-default",children:l("move.amr.rightPanel.capability.streamFrequency")}),children:t(oe,{robotModel:a})})})]})};export{ye as default};
|
package/dist/assets/{RbLocalizationProvider.DiNCanKM.js → RbLocalizationProvider.GKeO3IYX.js}
RENAMED
|
@@ -308,4 +308,4 @@ Minimum version required to store current data is: `+L+`.
|
|
|
308
308
|
top ${r}ms ease,
|
|
309
309
|
bottom ${r}ms ease,
|
|
310
310
|
max-height ${r}ms ease
|
|
311
|
-
`},children:h("div",{"data-comp":"ToastStackContent",style:F&&B?{minHeight:y[M]+(g[M]?28:0),position:"relative",width:"100%"}:void 0,children:a[M]?.map((N,V)=>h(M0e,{...N,toastOrder:V+1,toastCount:a[M]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:l[M],isStackExpanded:d[M],isWrapperExpandedForLayout:B,isWrapperScrollable:g[M],requestStackExpand:O,onStackMouseEnter:R,onStackMouseLeave:P},N.id))})},M)})})},{useEffect:R0e,useMemo:V2,useRef:T6,useState:N6}=await q("react"),v_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=T6(null),x=T6(null),[C,R]=N6(!1),[P,O]=N6(!1),$=!!s,A=(f??0)>=3&&!m&&!v,M=A,L=V2(()=>v0e(n,r),[n,r]),B=V2(()=>_0e(d,C),[d,C]),F=V2(()=>{switch(r){case"copy":return h(C8,{});case"danger":return h(E8,{});case"warning":case"caution":return h(O8,{});case"success":return n==="basic"?h(u0e,{}):h(js,{});default:return null}},[n,r]),N=i??F,V=$?w0e(n,r):null,z=$&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},D=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:oe,startY:Q}=x.current,{clientX:re,clientY:le}=Y;x.current.deltaX=re-oe,x.current.deltaY=le-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},U=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const oe=Y.currentTarget;if(oe.style.transitionProperty="",oe.hasPointerCapture?.(Y.pointerId)&&oe.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:re=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:re;if(Q===0&&re===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?oe.style.top="0px":d==="bottom-center"?oe.style.bottom="0px":d.includes("left")?oe.style.left="0px":d.includes("right")&&(oe.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return R0e(()=>{R(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:ae(y0e({open:C,hidden:!1,stacked:!1,motion:B}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:D,onPointerUp:U,onPointerLeave:U,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:ae(p0e({type:n,variant:r,hasAction:$,stacked:M,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Ul,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),z&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),"min-w-0 flex-1"),children:[N?h("span",{className:h0e({type:n,tone:L,variant:r}),children:N}):null,te(Ul,{className:ae(m0e(),"w-full"),children:[o?h("div",{className:ae(g0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:ae(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),V&&z?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),V&&!z?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:T0e}=await q("react"),w_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=lue(),{theme:a}=Q0();return T0e(()=>{o&&n(o)},[o,n]),te(jh,{className:ae("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Dx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var j2={};const It=t=>typeof t=="string",Id=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},P6=t=>t==null?"":""+t,N0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},P0e=/###/g,A6=t=>t&&t.indexOf("###")>-1?t.replace(P0e,"."):t,I6=t=>!t||It(t),Gd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(I6(t))return{};const a=A6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return I6(t)?{}:{obj:t,k:A6(r[o])}},O6=(t,e,n)=>{const{obj:r,k:o}=Gd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Gd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Gd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},A0e=(t,e,n,r)=>{const{obj:o,k:a}=Gd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},U0=(t,e)=>{const{obj:n,k:r}=Gd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},I0e=(t,e,n)=>{const r=U0(t,n);return r!==void 0?r:U0(e,n)},lR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):lR(t[r],e[r],n):t[r]=e[r]);return t},El=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var O0e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const L0e=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>O0e[e]):t;class $0e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const D0e=[" ",",","?","!",";"],B0e=new $0e(20),z0e=(t,e,n)=>{e=e||"",n=n||"";const r=D0e.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=B0e.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},Zv=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},uf=t=>t?.replace(/_/g,"-"),F0e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Y0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||F0e,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Y0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Y0(this.logger,e)}}var Ja=new Y0;class Hh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class L6 extends Hh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=U0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:Zv(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),O6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=U0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lR(l,r,a):l={...l,...r},O6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var cR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const uR=Symbol("i18next/PATH_KEY");function V0e(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===uR?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function uu(t,e){const{[uR]:n}=t(V0e()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const $6={},H2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class G0 extends Hh{constructor(e,n={}){super(),N0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=H2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!z0e(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=uu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(F=>typeof F=="function"?uu(F,{...this.options,...o}):String(F));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),R=G0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",$=C&&!o.ordinal&&o.count===0,A=$&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let M=g;x&&!g&&R&&(M=A);const L=H2(M),B=Object.prototype.toString.apply(M);if(x&&M&&L&&_.indexOf(B)<0&&!(It(S)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,M,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=F,v.usedParams=this.getUsedParamsDetails(o),v):F}if(i){const F=Array.isArray(M),N=F?[]:{},V=F?y:w;for(const z in M)if(Object.prototype.hasOwnProperty.call(M,z)){const I=`${V}${i}${z}`;R&&!g?N[z]=this.translate(I,{...o,defaultValue:H2(A)?A[z]:void 0,joinArrays:!1,ns:l}):N[z]=this.translate(I,{...o,joinArrays:!1,ns:l}),N[z]===I&&(N[z]=M[z])}g=N}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let F=!1,N=!1;!this.isValidLookup(g)&&R&&(F=!0,g=A),this.isValidLookup(g)||(N=!0,g=s);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:g,I=R&&A!==g&&this.options.updateMissing;if(N||F||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const oe=this.resolve(s,{...o,keySeparator:!1});oe&&oe.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 D=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let oe=0;oe<U.length;oe++)D.push(U[oe]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(o.lng||this.language):D.push(o.lng||this.language);const Y=(oe,Q,re)=>{const le=R&&re!==g?re:z;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Q,le,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(oe,u,Q,le,I,o),this.emit("missingKey",oe,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach(oe=>{const Q=this.pluralResolver.getSuffixes(oe,o);$&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(re=>{Y([oe],s+re,o[`defaultValue${re}`]||A)})}):Y(D,s,A))}g=this.extendTranslation(g,e,o,v,r),N&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(N||F)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,F?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=cR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?uu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!$6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&($6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.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!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+R)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class D6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const B6={zero:0,one:1,two:2,few:3,many:4,other:5},z6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j0e{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=uf(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),z6;if(!e.match(/-|_/))return z6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>B6[o]-B6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const F6=(t,e,n,r=".",o=!0)=>{let a=I0e(t,e,n);return!a&&o&&It(n)&&(a=Zv(t,n,r),a===void 0&&(a=Zv(e,n,r))),a},W2=t=>t.replace(/\$/g,"$$$$");class V6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:L0e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?El(a):i||"{{",this.suffix=s?El(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?El(m):v||El("$t("),this.nestingSuffix=g?El(g):w||El(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"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,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=F6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(F6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>W2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?W2(this.escape(v)):W2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=P6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${El(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=P6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const H0e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},j6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(uf(r),o),e[i]=s),s(n)}},W0e=t=>(e,n,r)=>t(uf(n),r)(e);class q0e{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?j6:W0e;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=j6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=H0e(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const U0e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Y0e extends Hh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{A0e(l.loaded,[a],i),U0e(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const q2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),T1=()=>{},G0e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},dR="__i18next_supportNoticeShown",K0e=()=>!!(typeof globalThis<"u"&&globalThis[dR]||typeof process<"u"&&j2&&j2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&j2),X0e=()=>{typeof globalThis<"u"&&(globalThis[dR]=!0)},Z0e=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Kd extends Hh{constructor(e={},n){if(super(),this.options=H6(e),this.services={},this.logger=Ja,this.modules={external:[]},G0e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=q2();this.options={...r,...this.options,...H6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Z0e(this)&&!K0e()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),X0e());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=q0e;const d=new D6(this.options);this.store=new L6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new j0e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new V6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Y0e(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new G0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=T1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=Id(),l=()=>{const u=(d,f)=>{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(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=T1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Id();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=T1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&cR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Id();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=uu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=uu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=uu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=Id();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Id();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["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"],r=this.services?.languageUtils||new D6(q2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Kd(e,n);return r.createInstance=Kd.createInstance,r}cloneInstance(e={},n=T1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Kd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new L6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...q2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new V6(u)}return a.translator=new G0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Pr=Kd.createInstance();Pr.createInstance;Pr.dir;Pr.init;Pr.loadResources;Pr.reloadResources;Pr.use;Pr.changeLanguage;Pr.getFixedT;Pr.t;Pr.exists;Pr.setDefaultNamespace;Pr.hasLoadedNamespace;Pr.loadNamespaces;Pr.loadLanguages;const Q0e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,J0e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ehe=t=>J0e[t],the=t=>t.replace(Q0e,ehe);let W6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:the,transDefaultProps:void 0};const nhe=(t={})=>{W6={...W6,...t}},rhe={type:"3rdParty",init(t){nhe(t.options.react)}},{createContext:ohe}=await q("react"),ahe=ohe(),{createElement:ihe,useMemo:she}=await q("react");function lhe({i18n:t,defaultNS:e,children:n}){const r=she(()=>({i18n:t,defaultNS:e}),[t,e]);return ihe(ahe.Provider,{value:r},n)}const{createContext:che,useContext:uhe}=await q("react");let dhe=(t=>String(t));const fhe=t=>{dhe=t.t.bind(t)},fR=che(null),b_e=()=>{const t=uhe(fR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:phe,useEffect:hhe,useMemo:mhe,useState:U2}=await q("react"),y_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=U2(null),[l,u]=U2(!1),[d,f]=U2(localStorage.getItem(`${e}_Language`)||r);hhe(()=>{(async()=>{try{const g=a?Pr.createInstance():Pr;await g.use(rhe).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),fhe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=phe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=mhe(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(Kk,{size:"3rem",className:"text-fg-default"})}):h(fR.Provider,{value:v,children:h(lhe,{i18n:i,children:t})})};export{khe as $,uH as A,Bee as B,dH as C,cw as D,rn as E,uw as F,he as G,te as H,YU as I,cg as J,ug as K,yZ as L,UU as M,WU as N,_f as O,To as P,zhe as Q,M7 as R,Hi as S,_Z as T,Yo as U,qv as V,o6 as W,hz as X,Phe as Y,sfe as Z,nbe as _,ad as a,Wr as a$,abe as a0,ube as a1,fbe as a2,cbe as a3,pbe as a4,ibe as a5,sbe as a6,dbe as a7,lbe as a8,tw as a9,Wde as aA,jde as aB,Vde as aC,zde as aD,Bde as aE,Hde as aF,G3e as aG,hbe as aH,Sbe as aI,_be as aJ,gbe as aK,xbe as aL,Ebe as aM,M1e as aN,wbe as aO,Cbe as aP,Mbe as aQ,kbe as aR,vbe as aS,ybe as aT,bbe as aU,mbe as aV,m6 as aW,d8 as aX,The as aY,Nhe as aZ,rbe as a_,tz as aa,ZB as ab,Yk as ac,epe as ad,Gk as ae,npe as af,cfe as ag,W3e as ah,Nk as ai,Ik as aj,Ok as ak,xde as al,Y3e as am,Cde as an,d0 as ao,Mde as ap,Ede as aq,Vk as ar,Sde as as,u0 as at,U3e as au,xz as av,Dde as aw,X3e as ax,K3e as ay,Fde as az,mg as b,Ybe as b$,Rbe as b0,Dbe as b1,Lbe as b2,Nbe as b3,$be as b4,zbe as b5,Tbe as b6,Pbe as b7,Abe as b8,Bbe as b9,nfe as bA,efe as bB,Jde as bC,ofe as bD,Z3e as bE,Efe as bF,v_e as bG,Wbe as bH,Kk as bI,que as bJ,qbe as bK,Kfe as bL,Uk as bM,tbe as bN,xpe as bO,Gbe as bP,Zbe as bQ,Kbe as bR,Xbe as bS,Xk as bT,Spe as bU,mF as bV,pfe as bW,dfe as bX,sw as bY,ffe as bZ,Ube as b_,Fbe as ba,Hbe as bb,Ibe as bc,jbe as bd,Vbe as be,Obe as bf,jh as bg,Hpe as bh,A3 as bi,J3e as bj,mfe as bk,w_e as bl,jk as bm,Dfe as bn,q3e as bo,Qbe as bp,eye as bq,Jbe as br,Uv as bs,Ak as bt,zk as bu,Qde as bv,Q3e as bw,tfe as bx,afe as by,rfe as bz,lh as c,Hq as c$,obe as c0,Ul as c1,oz as c2,Cpe as c3,Mhe as c4,u1e as c5,k$ as c6,QB as c7,qB as c8,ebe as c9,rve as cA,Mr as cB,AD as cC,_he as cD,Eve as cE,C3 as cF,Dx as cG,xhe as cH,iB as cI,sB as cJ,She as cK,ID as cL,Ave as cM,Dl as cN,V8 as cO,Rve as cP,xo as cQ,hB as cR,zf as cS,FD as cT,zD as cU,FB as cV,$B as cW,zB as cX,BB as cY,DB as cZ,LB as c_,gz as ca,Tpe as cb,ode as cc,JL as cd,nz as ce,u8 as cf,Mfe as cg,gue as ch,bfe as ci,Bfe as cj,uF as ck,Oz as cl,Qn as cm,Q0 as cn,b_e as co,Dhe as cp,Th as cq,Ive as cr,P3 as cs,V2e as ct,Hd as cu,Wo as cv,kte as cw,ya as cx,kn as cy,OE as cz,id as d,o_e as d$,tc as d0,Che as d1,Rr as d2,ow as d3,K0 as d4,Gme as d5,TD as d6,ND as d7,Rhe as d8,MB as d9,s_e as dA,Xye as dB,hye as dC,i_e as dD,Cye as dE,uye as dF,Oye as dG,$ye as dH,Lye as dI,Dye as dJ,Bye as dK,Hye as dL,xye as dM,jye as dN,Vye as dO,Iye as dP,dye as dQ,Gye as dR,Fye as dS,Zye as dT,n_e as dU,c_e as dV,sye as dW,fye as dX,vye as dY,pye as dZ,iye as d_,$he as da,rge as db,oge as dc,age as dd,Vq as de,q$ as df,Y$ as dg,rye as dh,tye as di,nye as dj,oye as dk,l_e as dl,t_e as dm,aye as dn,r_e as dp,qye as dq,Wye as dr,Jye as ds,gye as dt,Pye as du,Yye as dv,lye as dw,Sye as dx,e_e as dy,Eye as dz,mG as e,u7 as e$,_ye as e0,u_e as e1,Kye as e2,wye as e3,Uye as e4,Aye as e5,Tye as e6,a_e as e7,bye as e8,yye as e9,Lhe as eA,H3e as eB,CD as eC,g8 as eD,k8 as eE,PB as eF,gB as eG,nB as eH,X9 as eI,dB as eJ,jD as eK,m8 as eL,jB as eM,oM as eN,K$ as eO,Nf as eP,f2e as eQ,Sve as eR,UD as eS,HD as eT,EB as eU,CB as eV,nue as eW,R8 as eX,MD as eY,SB as eZ,YD as e_,Mye as ea,Nye as eb,Rye as ec,kye as ed,mye as ee,zye as ef,Qye as eg,cye as eh,dhe as ei,Gn as ej,Ohe as ek,PD as el,O8 as em,eD as en,eB as eo,rB as ep,Z$ as eq,Poe as er,wD as es,J$ as et,yB as eu,hD as ev,x8 as ew,_8 as ex,N8 as ey,df as ez,Hs as f,ove as f$,d7 as f0,p7 as f1,f7 as f2,l7 as f3,Ph as f4,F$ as f5,wB as f6,vB as f7,Q$ as f8,GD as f9,f8 as fA,qhe as fB,C8 as fC,Zz as fD,LD as fE,V$ as fF,j$ as fG,uD as fH,pB as fI,G$ as fJ,W$ as fK,gD as fL,RD as fM,ED as fN,xD as fO,js as fP,X0 as fQ,QD as fR,mD as fS,fD as fT,nve as fU,bve as fV,nC as fW,rw as fX,RB as fY,Zme as fZ,Ihe as f_,lB as fa,BD as fb,mB as fc,$D as fd,DD as fe,tB as ff,oB as fg,xB as fh,bB as fi,H$ as fj,T8 as fk,sD as fl,y8 as fm,tte as fn,lue as fo,E8 as fp,Tve as fq,Qme as fr,Gl as fs,tve as ft,Ose as fu,nk as fv,yhe as fw,Z0 as fx,Jie as fy,_B as fz,qo as g,Ehe as g0,sV as g1,iV as g2,Kme as g3,Dme as g4,Fwe as g5,lge as g6,Xme as g7,Jme as g8,Rl as g9,KD as gA,rD as gB,ale as gC,NB as gD,vD as gE,Su as gF,cD as gG,Df as gH,Fee as ga,y_e as gb,Ahe as gc,Pve as gd,g_e as ge,SD as gf,uB as gg,pD as gh,aB as gi,yD as gj,JD as gk,aD as gl,nc as gm,sM as gn,Yme as go,Nte as gp,Ume as gq,Mte as gr,kr as gs,pte as gt,g3 as gu,IE as gv,Mve as gw,Hee as gx,jee as gy,kD as gz,yw as h,ln as i,h as j,Wt as k,it as l,v7 as m,I7 as n,_w as o,Go as p,X8 as q,fH as r,H8 as s,bf as t,Ko as u,yf as v,xf as w,ae as x,bZ as y,xZ as z};
|
|
311
|
+
`},children:h("div",{"data-comp":"ToastStackContent",style:F&&B?{minHeight:y[M]+(g[M]?28:0),position:"relative",width:"100%"}:void 0,children:a[M]?.map((N,V)=>h(M0e,{...N,toastOrder:V+1,toastCount:a[M]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:l[M],isStackExpanded:d[M],isWrapperExpandedForLayout:B,isWrapperScrollable:g[M],requestStackExpand:O,onStackMouseEnter:R,onStackMouseLeave:P},N.id))})},M)})})},{useEffect:R0e,useMemo:V2,useRef:T6,useState:N6}=await q("react"),v_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=T6(null),x=T6(null),[C,R]=N6(!1),[P,O]=N6(!1),$=!!s,A=(f??0)>=3&&!m&&!v,M=A,L=V2(()=>v0e(n,r),[n,r]),B=V2(()=>_0e(d,C),[d,C]),F=V2(()=>{switch(r){case"copy":return h(C8,{});case"danger":return h(E8,{});case"warning":case"caution":return h(O8,{});case"success":return n==="basic"?h(u0e,{}):h(js,{});default:return null}},[n,r]),N=i??F,V=$?w0e(n,r):null,z=$&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},D=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:oe,startY:Q}=x.current,{clientX:re,clientY:le}=Y;x.current.deltaX=re-oe,x.current.deltaY=le-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},U=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const oe=Y.currentTarget;if(oe.style.transitionProperty="",oe.hasPointerCapture?.(Y.pointerId)&&oe.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:re=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:re;if(Q===0&&re===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?oe.style.top="0px":d==="bottom-center"?oe.style.bottom="0px":d.includes("left")?oe.style.left="0px":d.includes("right")&&(oe.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return R0e(()=>{R(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:ae(y0e({open:C,hidden:!1,stacked:!1,motion:B}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:D,onPointerUp:U,onPointerLeave:U,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:ae(p0e({type:n,variant:r,hasAction:$,stacked:M,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Ul,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),z&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),"min-w-0 flex-1"),children:[N?h("span",{className:h0e({type:n,tone:L,variant:r}),children:N}):null,te(Ul,{className:ae(m0e(),"w-full"),children:[o?h("div",{className:ae(g0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:ae(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),V&&z?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),V&&!z?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:T0e}=await q("react"),w_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=lue(),{theme:a}=Q0();return T0e(()=>{o&&n(o)},[o,n]),te(jh,{className:ae("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Dx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var j2={};const It=t=>typeof t=="string",Id=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},P6=t=>t==null?"":""+t,N0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},P0e=/###/g,A6=t=>t&&t.indexOf("###")>-1?t.replace(P0e,"."):t,I6=t=>!t||It(t),Gd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(I6(t))return{};const a=A6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return I6(t)?{}:{obj:t,k:A6(r[o])}},O6=(t,e,n)=>{const{obj:r,k:o}=Gd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Gd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Gd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},A0e=(t,e,n,r)=>{const{obj:o,k:a}=Gd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},U0=(t,e)=>{const{obj:n,k:r}=Gd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},I0e=(t,e,n)=>{const r=U0(t,n);return r!==void 0?r:U0(e,n)},lR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):lR(t[r],e[r],n):t[r]=e[r]);return t},El=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var O0e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const L0e=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>O0e[e]):t;class $0e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const D0e=[" ",",","?","!",";"],B0e=new $0e(20),z0e=(t,e,n)=>{e=e||"",n=n||"";const r=D0e.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=B0e.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},Zv=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},uf=t=>t?.replace(/_/g,"-"),F0e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Y0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||F0e,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Y0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Y0(this.logger,e)}}var Ja=new Y0;class Hh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class L6 extends Hh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=U0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:Zv(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),O6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=U0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lR(l,r,a):l={...l,...r},O6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var cR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const uR=Symbol("i18next/PATH_KEY");function V0e(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===uR?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function uu(t,e){const{[uR]:n}=t(V0e()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const $6={},H2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class G0 extends Hh{constructor(e,n={}){super(),N0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=H2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!z0e(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=uu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(F=>typeof F=="function"?uu(F,{...this.options,...o}):String(F));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),R=G0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",$=C&&!o.ordinal&&o.count===0,A=$&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let M=g;x&&!g&&R&&(M=A);const L=H2(M),B=Object.prototype.toString.apply(M);if(x&&M&&L&&_.indexOf(B)<0&&!(It(S)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,M,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=F,v.usedParams=this.getUsedParamsDetails(o),v):F}if(i){const F=Array.isArray(M),N=F?[]:{},V=F?y:w;for(const z in M)if(Object.prototype.hasOwnProperty.call(M,z)){const I=`${V}${i}${z}`;R&&!g?N[z]=this.translate(I,{...o,defaultValue:H2(A)?A[z]:void 0,joinArrays:!1,ns:l}):N[z]=this.translate(I,{...o,joinArrays:!1,ns:l}),N[z]===I&&(N[z]=M[z])}g=N}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let F=!1,N=!1;!this.isValidLookup(g)&&R&&(F=!0,g=A),this.isValidLookup(g)||(N=!0,g=s);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:g,I=R&&A!==g&&this.options.updateMissing;if(N||F||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const oe=this.resolve(s,{...o,keySeparator:!1});oe&&oe.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 D=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let oe=0;oe<U.length;oe++)D.push(U[oe]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(o.lng||this.language):D.push(o.lng||this.language);const Y=(oe,Q,re)=>{const le=R&&re!==g?re:z;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Q,le,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(oe,u,Q,le,I,o),this.emit("missingKey",oe,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach(oe=>{const Q=this.pluralResolver.getSuffixes(oe,o);$&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(re=>{Y([oe],s+re,o[`defaultValue${re}`]||A)})}):Y(D,s,A))}g=this.extendTranslation(g,e,o,v,r),N&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(N||F)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,F?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=cR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?uu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!$6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&($6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.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!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+R)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class D6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const B6={zero:0,one:1,two:2,few:3,many:4,other:5},z6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j0e{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=uf(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),z6;if(!e.match(/-|_/))return z6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>B6[o]-B6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const F6=(t,e,n,r=".",o=!0)=>{let a=I0e(t,e,n);return!a&&o&&It(n)&&(a=Zv(t,n,r),a===void 0&&(a=Zv(e,n,r))),a},W2=t=>t.replace(/\$/g,"$$$$");class V6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:L0e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?El(a):i||"{{",this.suffix=s?El(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?El(m):v||El("$t("),this.nestingSuffix=g?El(g):w||El(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"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,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=F6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(F6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>W2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?W2(this.escape(v)):W2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=P6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${El(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=P6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const H0e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},j6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(uf(r),o),e[i]=s),s(n)}},W0e=t=>(e,n,r)=>t(uf(n),r)(e);class q0e{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?j6:W0e;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=j6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=H0e(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const U0e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Y0e extends Hh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{A0e(l.loaded,[a],i),U0e(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const q2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),T1=()=>{},G0e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},dR="__i18next_supportNoticeShown",K0e=()=>!!(typeof globalThis<"u"&&globalThis[dR]||typeof process<"u"&&j2&&j2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&j2),X0e=()=>{typeof globalThis<"u"&&(globalThis[dR]=!0)},Z0e=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Kd extends Hh{constructor(e={},n){if(super(),this.options=H6(e),this.services={},this.logger=Ja,this.modules={external:[]},G0e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=q2();this.options={...r,...this.options,...H6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Z0e(this)&&!K0e()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),X0e());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=q0e;const d=new D6(this.options);this.store=new L6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new j0e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new V6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Y0e(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new G0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=T1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=Id(),l=()=>{const u=(d,f)=>{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(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=T1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Id();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=T1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&cR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Id();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=uu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=uu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=uu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=Id();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Id();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["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"],r=this.services?.languageUtils||new D6(q2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Kd(e,n);return r.createInstance=Kd.createInstance,r}cloneInstance(e={},n=T1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Kd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new L6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...q2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new V6(u)}return a.translator=new G0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Pr=Kd.createInstance();Pr.createInstance;Pr.dir;Pr.init;Pr.loadResources;Pr.reloadResources;Pr.use;Pr.changeLanguage;Pr.getFixedT;Pr.t;Pr.exists;Pr.setDefaultNamespace;Pr.hasLoadedNamespace;Pr.loadNamespaces;Pr.loadLanguages;const Q0e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,J0e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ehe=t=>J0e[t],the=t=>t.replace(Q0e,ehe);let W6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:the,transDefaultProps:void 0};const nhe=(t={})=>{W6={...W6,...t}},rhe={type:"3rdParty",init(t){nhe(t.options.react)}},{createContext:ohe}=await q("react"),ahe=ohe(),{createElement:ihe,useMemo:she}=await q("react");function lhe({i18n:t,defaultNS:e,children:n}){const r=she(()=>({i18n:t,defaultNS:e}),[t,e]);return ihe(ahe.Provider,{value:r},n)}const{createContext:che,useContext:uhe}=await q("react");let dhe=(t=>String(t));const fhe=t=>{dhe=t.t.bind(t)},fR=che(null),b_e=()=>{const t=uhe(fR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:phe,useEffect:hhe,useMemo:mhe,useState:U2}=await q("react"),y_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=U2(null),[l,u]=U2(!1),[d,f]=U2(localStorage.getItem(`${e}_Language`)||r);hhe(()=>{(async()=>{try{const g=a?Pr.createInstance():Pr;await g.use(rhe).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),fhe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=phe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=mhe(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(Kk,{size:"3rem",className:"text-fg-default"})}):h(fR.Provider,{value:v,children:h(lhe,{i18n:i,children:t})})};export{khe as $,uH as A,Bee as B,dH as C,cw as D,rn as E,uw as F,he as G,te as H,YU as I,cg as J,ug as K,yZ as L,UU as M,WU as N,_f as O,To as P,zhe as Q,M7 as R,Hi as S,_Z as T,Yo as U,qv as V,o6 as W,hz as X,Phe as Y,sfe as Z,nbe as _,ad as a,Wr as a$,abe as a0,ube as a1,fbe as a2,cbe as a3,pbe as a4,ibe as a5,sbe as a6,dbe as a7,lbe as a8,tw as a9,Wde as aA,jde as aB,Vde as aC,zde as aD,Bde as aE,Hde as aF,G3e as aG,hbe as aH,Sbe as aI,_be as aJ,gbe as aK,xbe as aL,Ebe as aM,M1e as aN,wbe as aO,Cbe as aP,Mbe as aQ,kbe as aR,vbe as aS,ybe as aT,bbe as aU,mbe as aV,m6 as aW,d8 as aX,The as aY,Nhe as aZ,rbe as a_,tz as aa,ZB as ab,Yk as ac,epe as ad,Gk as ae,npe as af,cfe as ag,W3e as ah,Nk as ai,Ik as aj,Ok as ak,xde as al,Y3e as am,Cde as an,d0 as ao,Mde as ap,Ede as aq,Vk as ar,Sde as as,u0 as at,U3e as au,xz as av,Dde as aw,X3e as ax,K3e as ay,Fde as az,mg as b,Ybe as b$,Rbe as b0,Dbe as b1,Lbe as b2,Nbe as b3,$be as b4,zbe as b5,Tbe as b6,Pbe as b7,Abe as b8,Bbe as b9,nfe as bA,efe as bB,Jde as bC,ofe as bD,Z3e as bE,Efe as bF,v_e as bG,Wbe as bH,Kk as bI,que as bJ,qbe as bK,Kfe as bL,Uk as bM,tbe as bN,xpe as bO,Gbe as bP,Zbe as bQ,Kbe as bR,Xbe as bS,Xk as bT,Spe as bU,mF as bV,pfe as bW,dfe as bX,sw as bY,ffe as bZ,Ube as b_,Fbe as ba,Hbe as bb,Ibe as bc,jbe as bd,Vbe as be,Obe as bf,jh as bg,Hpe as bh,A3 as bi,J3e as bj,mfe as bk,w_e as bl,jk as bm,Dfe as bn,q3e as bo,Qbe as bp,eye as bq,Jbe as br,Uv as bs,Ak as bt,zk as bu,Qde as bv,Q3e as bw,tfe as bx,afe as by,rfe as bz,lh as c,Hq as c$,obe as c0,Ul as c1,oz as c2,Cpe as c3,Mhe as c4,u1e as c5,k$ as c6,QB as c7,qB as c8,ebe as c9,OE as cA,rve as cB,Mr as cC,AD as cD,_he as cE,Eve as cF,C3 as cG,Dx as cH,xhe as cI,iB as cJ,sB as cK,She as cL,ID as cM,Ave as cN,Dl as cO,Rve as cP,xo as cQ,hB as cR,zf as cS,FD as cT,zD as cU,FB as cV,$B as cW,zB as cX,BB as cY,DB as cZ,LB as c_,gz as ca,Tpe as cb,ode as cc,JL as cd,nz as ce,u8 as cf,Mfe as cg,gue as ch,bfe as ci,Bfe as cj,uF as ck,Oz as cl,Qn as cm,Q0 as cn,b_e as co,Dhe as cp,Th as cq,Ive as cr,P3 as cs,V2e as ct,Hd as cu,Wo as cv,kte as cw,ya as cx,kn as cy,V8 as cz,id as d,o_e as d$,tc as d0,Che as d1,Rr as d2,ow as d3,K0 as d4,Gme as d5,TD as d6,ND as d7,Rhe as d8,MB as d9,s_e as dA,Xye as dB,hye as dC,i_e as dD,Cye as dE,uye as dF,Oye as dG,$ye as dH,Lye as dI,Dye as dJ,Bye as dK,Hye as dL,xye as dM,jye as dN,Vye as dO,Iye as dP,dye as dQ,Gye as dR,Fye as dS,Zye as dT,n_e as dU,c_e as dV,sye as dW,fye as dX,vye as dY,pye as dZ,iye as d_,$he as da,rge as db,oge as dc,age as dd,Vq as de,q$ as df,Y$ as dg,rye as dh,tye as di,nye as dj,oye as dk,l_e as dl,t_e as dm,aye as dn,r_e as dp,qye as dq,Wye as dr,Jye as ds,gye as dt,Pye as du,Yye as dv,lye as dw,Sye as dx,e_e as dy,Eye as dz,mG as e,u7 as e$,_ye as e0,u_e as e1,Kye as e2,wye as e3,Uye as e4,Aye as e5,Tye as e6,a_e as e7,bye as e8,yye as e9,Lhe as eA,H3e as eB,CD as eC,g8 as eD,k8 as eE,PB as eF,gB as eG,nB as eH,X9 as eI,dB as eJ,jD as eK,m8 as eL,jB as eM,oM as eN,K$ as eO,Nf as eP,f2e as eQ,Sve as eR,UD as eS,HD as eT,EB as eU,CB as eV,nue as eW,R8 as eX,MD as eY,SB as eZ,YD as e_,Mye as ea,Nye as eb,Rye as ec,kye as ed,mye as ee,zye as ef,Qye as eg,cye as eh,dhe as ei,Gn as ej,Ohe as ek,PD as el,O8 as em,eD as en,eB as eo,rB as ep,Z$ as eq,Poe as er,wD as es,J$ as et,yB as eu,hD as ev,x8 as ew,_8 as ex,N8 as ey,df as ez,Hs as f,ove as f$,d7 as f0,p7 as f1,f7 as f2,l7 as f3,Ph as f4,F$ as f5,wB as f6,vB as f7,Q$ as f8,GD as f9,f8 as fA,qhe as fB,C8 as fC,Zz as fD,LD as fE,V$ as fF,j$ as fG,uD as fH,pB as fI,G$ as fJ,W$ as fK,gD as fL,RD as fM,ED as fN,xD as fO,js as fP,X0 as fQ,QD as fR,mD as fS,fD as fT,nve as fU,bve as fV,nC as fW,rw as fX,RB as fY,Zme as fZ,Ihe as f_,lB as fa,BD as fb,mB as fc,$D as fd,DD as fe,tB as ff,oB as fg,xB as fh,bB as fi,H$ as fj,T8 as fk,sD as fl,y8 as fm,tte as fn,lue as fo,E8 as fp,Tve as fq,Qme as fr,Gl as fs,tve as ft,Ose as fu,nk as fv,yhe as fw,Z0 as fx,Jie as fy,_B as fz,qo as g,Ehe as g0,sV as g1,iV as g2,Kme as g3,Dme as g4,Fwe as g5,lge as g6,Xme as g7,Jme as g8,Rl as g9,KD as gA,rD as gB,ale as gC,NB as gD,vD as gE,Su as gF,cD as gG,Df as gH,Fee as ga,y_e as gb,Ahe as gc,Pve as gd,g_e as ge,SD as gf,uB as gg,pD as gh,aB as gi,yD as gj,JD as gk,aD as gl,nc as gm,sM as gn,Yme as go,Nte as gp,Ume as gq,Mte as gr,kr as gs,pte as gt,g3 as gu,IE as gv,Mve as gw,Hee as gx,jee as gy,kD as gz,yw as h,ln as i,h as j,Wt as k,it as l,v7 as m,I7 as n,_w as o,Go as p,X8 as q,fH as r,H8 as s,bf as t,Ko as u,yf as v,xf as w,ae as x,bZ as y,xZ as z};
|