@abtnode/blocklet-services 1.16.39-beta-20250218-110004-a308c501 → 1.16.39-beta-20250218-132815-6baaf20e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/assets/{Add-eTw9dWVa.js → Add-meGhscd6.js} +1 -1
  2. package/dist/assets/{ArrowDropDown-D-RD-2MB.js → ArrowDropDown-B7S4xnEe.js} +1 -1
  3. package/dist/assets/{CheckCircle-fnIa_Tjy.js → CheckCircle-CnvZ4oB1.js} +1 -1
  4. package/dist/assets/{ChevronLeft-B6BBtJvf.js → ChevronLeft-D1qkw0FM.js} +1 -1
  5. package/dist/assets/{ChevronRight-BO6iBxGF.js → ChevronRight-CEkTH0up.js} +1 -1
  6. package/dist/assets/{DeleteOutline-6B6Fe5fo.js → DeleteOutline-BjrgG_HY.js} +1 -1
  7. package/dist/assets/{Done-BpK9makc.js → Done-7hvoRcVZ.js} +1 -1
  8. package/dist/assets/{Download-CHVAgVy8.js → Download-CMvqPsK9.js} +1 -1
  9. package/dist/assets/{Error-kGbi4Zxj.js → Error-D3I1nNnO.js} +1 -1
  10. package/dist/assets/{Google-T-9fe6qI.js → Google-TNOfJ3uU.js} +1 -1
  11. package/dist/assets/{InfoOutlined-BgLmQpjA.js → InfoOutlined-CwoytfGr.js} +1 -1
  12. package/dist/assets/{Launch-C9zEVLvk.js → Launch-wyBVNKfb.js} +1 -1
  13. package/dist/assets/{LaunchOutlined-Cql1NmZZ.js → LaunchOutlined-B2ZU9fkg.js} +1 -1
  14. package/dist/assets/{Loop-CawJEzLG.js → Loop-CQAI5rIS.js} +1 -1
  15. package/dist/assets/{MoreHoriz-M9rI-Gh1.js → MoreHoriz-CyCcv2bV.js} +1 -1
  16. package/dist/assets/{PlayArrow-BAowUCpY.js → PlayArrow-B5ZFUKPq.js} +1 -1
  17. package/dist/assets/{ViewList-BPtSTNst.js → ViewList-C8AcRueZ.js} +1 -1
  18. package/dist/assets/{access-control-DEUU0fDz.js → access-control-ClVHa3J1.js} +1 -1
  19. package/dist/assets/{actions-wYAFmtYW.js → actions-C0a0eUYM.js} +1 -1
  20. package/dist/assets/{add-component-core-C36Oh0S_.js → add-component-core-CK3SAdlQ.js} +1 -1
  21. package/dist/assets/{add-resource-Xm48tGBR.js → add-resource-hs_iM1xk.js} +1 -1
  22. package/dist/assets/{addon-DJRfOF39.js → addon-C7fx4MJ0.js} +1 -1
  23. package/dist/assets/{analytics-BxMLe4sZ.js → analytics-CjaAB5m2.js} +1 -1
  24. package/dist/assets/{audit-logs-QI7Dc290.js → audit-logs-bl5st5Lr.js} +1 -1
  25. package/dist/assets/{base32-BMSr-Oor.js → base32-9oQoOkFy.js} +1 -1
  26. package/dist/assets/{branding-BiBArxE7.js → branding-5S3zjZlC.js} +2 -2
  27. package/dist/assets/{bundle-avatar-CcKbW8ZA.js → bundle-avatar-Dnk7mw7b.js} +1 -1
  28. package/dist/assets/{button-hN0nkg5h.js → button-BTVoaDd7.js} +1 -1
  29. package/dist/assets/{click-to-copy-DlRwVMBE.js → click-to-copy-C9X-UQyL.js} +1 -1
  30. package/dist/assets/{complete-BCHhjgui.js → complete-C3yyjx_N.js} +1 -1
  31. package/dist/assets/{component---BohhtR.js → component-B0WI6_H4.js} +1 -1
  32. package/dist/assets/{config-BT7DA9eX.js → config-C0wq7rMr.js} +1 -1
  33. package/dist/assets/{config-Chtg5c7S.js → config-DINcJX6A.js} +1 -1
  34. package/dist/assets/{config-navigation-DGQXESo8.js → config-navigation-Dskr7Yic.js} +3 -3
  35. package/dist/assets/{config-space-D3_ddjoK.js → config-space-BYYAVRcS.js} +1 -1
  36. package/dist/assets/{confirm-BUf2FX6y.js → confirm-BmLsHbj9.js} +1 -1
  37. package/dist/assets/{connect-9ktVrhs9.js → connect-06lWrPrR.js} +1 -1
  38. package/dist/assets/{connect-Bg1fiX7Q.js → connect-hhGPDSK8.js} +1 -1
  39. package/dist/assets/{connect-to-6-yxL1od.js → connect-to-DIJ57-hM.js} +1 -1
  40. package/dist/assets/{dashboard-CRO3eTt1.js → dashboard-PlqPcVrd.js} +3 -3
  41. package/dist/assets/{did-address-Rncailh0.js → did-address-Bl2N44vc.js} +1 -1
  42. package/dist/assets/{domain-CiQ58Nbb.js → domain-DDa_Ldun.js} +1 -1
  43. package/dist/assets/{domain-list-DlMnYtcT.js → domain-list-DXbfS21Z.js} +1 -1
  44. package/dist/assets/{email-C7B2iQRL.js → email-9CbD02fM.js} +1 -1
  45. package/dist/assets/{exchange-passport-DvgnrFhH.js → exchange-passport-ZTeqENxf.js} +1 -1
  46. package/dist/assets/{form-text-input-B3XB3R1O.js → form-text-input-DEadnM80.js} +1 -1
  47. package/dist/assets/{fuel-De_bc9rw.js → fuel-AxStjHWS.js} +1 -1
  48. package/dist/assets/{fullpage-ClwEgpoB.js → fullpage-BXvfrD1C.js} +1 -1
  49. package/dist/assets/{get-safe-url-3FtlbQXR.js → get-safe-url-BVjMxmwp.js} +1 -1
  50. package/dist/assets/{get-safe-url-DgnUmHPg.js → get-safe-url-BxZD1oA_.js} +1 -1
  51. package/dist/assets/{home-s4XxyP6G.js → home-CrkVy1DG.js} +1 -1
  52. package/dist/assets/{iframe-DkAOGH82.js → iframe-BcWepstA.js} +1 -1
  53. package/dist/assets/{index-CKmE0Sqg.js → index-BBOSdbE7.js} +1 -1
  54. package/dist/assets/{index-C3Z6Hby2.js → index-BJA4YPaC.js} +1 -1
  55. package/dist/assets/{index-IC1Rf7BW.js → index-BSC2apzE.js} +1 -1
  56. package/dist/assets/{index-Pdt8JY75.js → index-BXlJ03I_.js} +1 -1
  57. package/dist/assets/{index-DiLNptzT.js → index-Be9vrMiA.js} +1 -1
  58. package/dist/assets/{index-DFzh5oL0.js → index-BtFCAsqh.js} +1 -1
  59. package/dist/assets/{index-C3cP3eho.js → index-CDvqNewi.js} +1 -1
  60. package/dist/assets/{index-XjSUrEf9.js → index-CoxJ8G1A.js} +1 -1
  61. package/dist/assets/{index-BQD1ktrC.js → index-DIQ33Q8Z.js} +1 -1
  62. package/dist/assets/{index-BuAHCrPZ.js → index-DfBNyFsV.js} +1 -1
  63. package/dist/assets/{index-DEkiPG8Y.js → index-DgaUl_lv.js} +1 -1
  64. package/dist/assets/{index-BM6MW3P4.js → index-DkVoxpR-.js} +1 -1
  65. package/dist/assets/{index-CctdI8X8.js → index-DkufOgYs.js} +3 -3
  66. package/dist/assets/{index-vSb5bw1I.js → index-MxM82EtU.js} +4 -4
  67. package/dist/assets/{index-AKILhCB1.js → index-uYcwdGZL.js} +3 -3
  68. package/dist/assets/{invitation-398ugOww.js → invitation-BzHMoDRH.js} +1 -1
  69. package/dist/assets/{invite-CxctjCks.js → invite-BBcuJaUv.js} +1 -1
  70. package/dist/assets/{issue-passport-BzEXCFP0.js → issue-passport-sgBfFZ4Y.js} +1 -1
  71. package/dist/assets/{item-BzigISWG.js → item-C5sAxGxS.js} +1 -1
  72. package/dist/assets/{layout-N5xbN7Ti.js → layout-CGas_HfS.js} +1 -1
  73. package/dist/assets/{list-QwzSO7Cs.js → list-cZ-OXxN0.js} +1 -1
  74. package/dist/assets/{list-header-bKaZ4zsu.js → list-header-Dd4BEf4y.js} +1 -1
  75. package/dist/assets/{localization-CNvFSQc0.js → localization-Z_CTe1Z8.js} +1 -1
  76. package/dist/assets/{log-Bz9TkxcV.js → log-BFj6TDz5.js} +1 -1
  77. package/dist/assets/{login-DbJD9Sgu.js → login-B-6s411x.js} +1 -1
  78. package/dist/assets/{login-oauth-callback-BagCPt1j.js → login-oauth-callback-aKbzfltj.js} +1 -1
  79. package/dist/assets/{logo-uploader-QnBnkpOO.js → logo-uploader-pyVqJwKp.js} +3 -3
  80. package/dist/assets/{lost-passport-se4N22vE.js → lost-passport-DKkxzCH8.js} +1 -1
  81. package/dist/assets/{open-window-BWPlSJZK.js → open-window-Cvetj9Mn.js} +1 -1
  82. package/dist/assets/{overview-u84fbCZU.js → overview-BxbJCUbS.js} +1 -1
  83. package/dist/assets/{page-header-CVCtfFXY.js → page-header--y63DY5K.js} +1 -1
  84. package/dist/assets/{permission-CoRqvd18.js → permission-Be_APIVZ.js} +1 -1
  85. package/dist/assets/{preferences-CCm3JuB9.js → preferences-D-NDmLhf.js} +1 -1
  86. package/dist/assets/publish-resource-CxkiI4_n.js +1 -0
  87. package/dist/assets/{react-beautiful-dnd.esm-CrvlS-3X.js → react-beautiful-dnd.esm-Czr1mmuu.js} +1 -1
  88. package/dist/assets/{relative-time-IDiRzYUd.js → relative-time-D0P0AJUI.js} +1 -1
  89. package/dist/assets/sdk-NKQJT0FS.js +1 -0
  90. package/dist/assets/{session-BzY_i5lZ.js → session-CV6ez46v.js} +1 -1
  91. package/dist/assets/{setup-CFL-k7o4.js → setup-CF2VhAxD.js} +3 -3
  92. package/dist/assets/{start-Bnol7r-4.js → start-BjFFihjS.js} +1 -1
  93. package/dist/assets/{step-actions-vFuOlgmX.js → step-actions-qXq3r5tX.js} +1 -1
  94. package/dist/assets/{studio-D8dNrjXX.js → studio-BNGylnt7.js} +1 -1
  95. package/dist/assets/{switch-control-DTOAJIEb.js → switch-control-DmKC0hpm.js} +1 -1
  96. package/dist/assets/{traffic-C-Or__6J.js → traffic-Djmt2Ph8.js} +1 -1
  97. package/dist/assets/{transfer-tWhnvLV8.js → transfer-B9ohZjja.js} +1 -1
  98. package/dist/assets/{unsubscribe-8PpNeEGq.js → unsubscribe-6xRksnNz.js} +1 -1
  99. package/dist/assets/{useLocalStorage-DDsWbihG.js → useLocalStorage-B5t6MEw6.js} +1 -1
  100. package/dist/assets/{user-center-FVVJclAc.js → user-center-DEGm9vzv.js} +1 -1
  101. package/dist/assets/{util-CqwLA_zk.js → util-Bl4vyFsm.js} +1 -1
  102. package/dist/assets/{util-DfAqJble.js → util-PzCAH0nE.js} +1 -1
  103. package/dist/assets/{vendor-arcblock-naCuSDgJ.js → vendor-arcblock-BFUPp1Ez.js} +3 -3
  104. package/dist/assets/{wrap-locale-JORvcC3E.js → wrap-locale-6MxBCfA2.js} +1 -1
  105. package/dist/index.html +2 -2
  106. package/dist/service-worker.js +1 -1
  107. package/package.json +28 -28
  108. package/dist/assets/publish-resource-Cmlpn7H3.js +0 -1
  109. package/dist/assets/sdk-DRntvOGy.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C3Z6Hby2.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-arcblock-naCuSDgJ.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-DcfIKM1A.js","assets/index-AKILhCB1.js","assets/index-C2fPoxDR.js","assets/index-DoZ2YM4T.js"])))=>i.map(i=>d[i]);
2
- var Kf=Object.defineProperty;var Xf=(i,e,t)=>e in i?Kf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var _e=(i,e,t)=>Xf(i,typeof e!="symbol"?e+"":e,t);import{bU as Yf,bV as Qf,bW as Jf,bX as Zf,bY as em,aI as qp,aC as Rs,be as tm,ai as fc,bZ as im,b_ as am}from"./vendor-arcblock-naCuSDgJ.js";import{r as M,g as Yt,e as mc,d as nm}from"./vendor-react-D-afvo_7.js";import{p as sm}from"./index-C2fPoxDR.js";import{_ as Vp,aG as om}from"./index-AKILhCB1.js";import{_ as Y,c as St,cL as Qa,d5 as rm,cP as lr,d6 as lm,d7 as cm,d8 as um,d9 as pm,da as dm,N as hm,db as fm,dc as Wp,dd as mm,u as cr,j as Z,cI as gm,g as Dn,a as ua,l as qe,k as In,de as vm,bS as wl,H as bm,cU as ym,d as qn,cM as lt,m as gc,df as xm,dg as wm,dh as Sm,di as Pm,b as Cm,E as A,a2 as Fm,dj as _m}from"./vendor-mui-core-xF5F4eT7.js";import{t as Gp,g as Qs,p as Zi,B as At,d as ur,Z as vc,U as Kp,az as km,aA as Xp,L as po,aB as bc,c as ho,b as fo}from"./vendor-utils-5TjOM6td.js";import{a as Tm,n as Em,y as Dm}from"./vendor-hooks-BKxTDk_P.js";import{c as je}from"./index-DoZ2YM4T.js";const On="$$material";function Im(i,e){return Y({toolbar:{minHeight:56,[i.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[i.up("sm")]:{minHeight:64}}},e)}const pn={black:"#000",white:"#fff"},Om={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Bi={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ni={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ba={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},zi={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ji={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},$i={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Am=["mode","contrastThreshold","tonalOffset"],yc={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pn.white,default:pn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},mo={text:{primary:pn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xc(i,e,t,a){const n=a.light||a,s=a.dark||a*1.5;i[e]||(i.hasOwnProperty(t)?i[e]=i[t]:e==="light"?i.light=lm(i.main,n):e==="dark"&&(i.dark=cm(i.main,s)))}function Rm(i="light"){return i==="dark"?{main:zi[200],light:zi[50],dark:zi[400]}:{main:zi[700],light:zi[400],dark:zi[800]}}function Um(i="light"){return i==="dark"?{main:Bi[200],light:Bi[50],dark:Bi[400]}:{main:Bi[500],light:Bi[300],dark:Bi[700]}}function Mm(i="light"){return i==="dark"?{main:Ni[500],light:Ni[300],dark:Ni[700]}:{main:Ni[700],light:Ni[400],dark:Ni[800]}}function Lm(i="light"){return i==="dark"?{main:ji[400],light:ji[300],dark:ji[700]}:{main:ji[700],light:ji[500],dark:ji[900]}}function Bm(i="light"){return i==="dark"?{main:$i[400],light:$i[300],dark:$i[700]}:{main:$i[800],light:$i[500],dark:$i[900]}}function Nm(i="light"){return i==="dark"?{main:ba[400],light:ba[300],dark:ba[700]}:{main:"#ed6c02",light:ba[500],dark:ba[900]}}function zm(i){const{mode:e="light",contrastThreshold:t=3,tonalOffset:a=.2}=i,n=St(i,Am),s=i.primary||Rm(e),o=i.secondary||Um(e),r=i.error||Mm(e),l=i.info||Lm(e),u=i.success||Bm(e),p=i.warning||Nm(e);function c(y){return rm(y,mo.text.primary)>=t?mo.text.primary:yc.text.primary}const h=({color:y,name:m,mainShade:v=500,lightShade:C=300,darkShade:x=700})=>{if(y=Y({},y),!y.main&&y[v]&&(y.main=y[v]),!y.hasOwnProperty("main"))throw new Error(lr(11,m?` (${m})`:"",v));if(typeof y.main!="string")throw new Error(lr(12,m?` (${m})`:"",JSON.stringify(y.main)));return xc(y,"light",C,a),xc(y,"dark",x,a),y.contrastText||(y.contrastText=c(y.main)),y},f={dark:mo,light:yc};return Qa(Y({common:Y({},pn),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:r,name:"error"}),warning:h({color:p,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:u,name:"success"}),grey:Om,contrastThreshold:t,getContrastText:c,augmentColor:h,tonalOffset:a},f[e]),n)}const jm=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function $m(i){return Math.round(i*1e5)/1e5}const wc={textTransform:"uppercase"},Sc='"Roboto", "Helvetica", "Arial", sans-serif';function Hm(i,e){const t=typeof e=="function"?e(i):e,{fontFamily:a=Sc,fontSize:n=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:r=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:p,pxToRem:c}=t,h=St(t,jm),f=n/14,g=c||(v=>`${v/u*f}rem`),y=(v,C,x,F,k)=>Y({fontFamily:a,fontWeight:v,fontSize:g(C),lineHeight:x},a===Sc?{letterSpacing:`${$m(F/C)}em`}:{},k,p),m={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(r,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(r,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(r,14,1.75,.4,wc),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,wc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qa(Y({htmlFontSize:u,pxToRem:g,fontFamily:a,fontSize:n,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:r,fontWeightBold:l},m),h,{clone:!1})}const qm=.2,Vm=.14,Wm=.12;function ne(...i){return[`${i[0]}px ${i[1]}px ${i[2]}px ${i[3]}px rgba(0,0,0,${qm})`,`${i[4]}px ${i[5]}px ${i[6]}px ${i[7]}px rgba(0,0,0,${Vm})`,`${i[8]}px ${i[9]}px ${i[10]}px ${i[11]}px rgba(0,0,0,${Wm})`].join(",")}const Gm=["none",ne(0,2,1,-1,0,1,1,0,0,1,3,0),ne(0,3,1,-2,0,2,2,0,0,1,5,0),ne(0,3,3,-2,0,3,4,0,0,1,8,0),ne(0,2,4,-1,0,4,5,0,0,1,10,0),ne(0,3,5,-1,0,5,8,0,0,1,14,0),ne(0,3,5,-1,0,6,10,0,0,1,18,0),ne(0,4,5,-2,0,7,10,1,0,2,16,1),ne(0,5,5,-3,0,8,10,1,0,3,14,2),ne(0,5,6,-3,0,9,12,1,0,3,16,2),ne(0,6,6,-3,0,10,14,1,0,4,18,3),ne(0,6,7,-4,0,11,15,1,0,4,20,3),ne(0,7,8,-4,0,12,17,2,0,5,22,4),ne(0,7,8,-4,0,13,19,2,0,5,24,4),ne(0,7,9,-4,0,14,21,2,0,5,26,4),ne(0,8,9,-5,0,15,22,2,0,6,28,5),ne(0,8,10,-5,0,16,24,2,0,6,30,5),ne(0,8,11,-5,0,17,26,2,0,6,32,5),ne(0,9,11,-5,0,18,28,2,0,7,34,6),ne(0,9,12,-6,0,19,29,2,0,7,36,6),ne(0,10,13,-6,0,20,31,3,0,8,38,7),ne(0,10,13,-6,0,21,33,3,0,8,40,7),ne(0,10,14,-6,0,22,35,3,0,8,42,7),ne(0,11,14,-7,0,23,36,3,0,9,44,8),ne(0,11,15,-7,0,24,38,3,0,9,46,8)],Km=["duration","easing","delay"],Xm={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ym={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Pc(i){return`${Math.round(i)}ms`}function Qm(i){if(!i)return 0;const e=i/36;return Math.round((4+15*e**.25+e/5)*10)}function Jm(i){const e=Y({},Xm,i.easing),t=Y({},Ym,i.duration);return Y({getAutoHeightDuration:Qm,create:(n=["all"],s={})=>{const{duration:o=t.standard,easing:r=e.easeInOut,delay:l=0}=s;return St(s,Km),(Array.isArray(n)?n:[n]).map(u=>`${u} ${typeof o=="string"?o:Pc(o)} ${r} ${typeof l=="string"?l:Pc(l)}`).join(",")}},i,{easing:e,duration:t})}const Zm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},eg=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yp(i={},...e){const{mixins:t={},palette:a={},transitions:n={},typography:s={}}=i,o=St(i,eg);if(i.vars)throw new Error(lr(18));const r=zm(a),l=um(i);let u=Qa(l,{mixins:Im(l.breakpoints,t),palette:r,shadows:Gm.slice(),typography:Hm(r,s),transitions:Jm(n),zIndex:Y({},Zm)});return u=Qa(u,o),u=e.reduce((p,c)=>Qa(p,c),u),u.unstable_sxConfig=Y({},pm,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(c){return dm({sx:c,theme:this})},u}const Js=Yp();function Qp(){const i=hm(Js);return i[On]||i}function pa({props:i,name:e}){return fm({props:i,name:e,defaultTheme:Js,themeId:On})}const tg=i=>Wp(i)&&i!=="classes",kS=Wp,Ri=mm({themeId:On,defaultTheme:Js,rootShouldForwardProp:tg}),ig=i=>i.scrollTop;function Cc(i,e){var t,a;const{timeout:n,easing:s,style:o={}}=i;return{duration:(t=o.transitionDuration)!=null?t:typeof n=="number"?n:n[e.mode]||0,easing:(a=o.transitionTimingFunction)!=null?a:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}const ag=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ng={entering:{opacity:1},entered:{opacity:1}},sg=M.forwardRef(function(e,t){const a=Qp(),n={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:r,easing:l,in:u,onEnter:p,onEntered:c,onEntering:h,onExit:f,onExited:g,onExiting:y,style:m,timeout:v=n,TransitionComponent:C=gm}=e,x=St(e,ag),F=M.useRef(null),k=cr(F,r.ref,t),P=R=>N=>{if(R){const S=F.current;N===void 0?R(S):R(S,N)}},_=P(h),D=P((R,N)=>{ig(R);const S=Cc({style:m,timeout:v,easing:l},{mode:"enter"});R.style.webkitTransition=a.transitions.create("opacity",S),R.style.transition=a.transitions.create("opacity",S),p&&p(R,N)}),O=P(c),j=P(y),B=P(R=>{const N=Cc({style:m,timeout:v,easing:l},{mode:"exit"});R.style.webkitTransition=a.transitions.create("opacity",N),R.style.transition=a.transitions.create("opacity",N),f&&f(R)}),q=P(g),H=R=>{s&&s(F.current,R)};return Z.jsx(C,Y({appear:o,in:u,nodeRef:F,onEnter:D,onEntered:O,onEntering:_,onExit:B,onExited:q,onExiting:j,addEndListener:H,timeout:v},x,{children:(R,N)=>M.cloneElement(r,Y({style:Y({opacity:0,visibility:R==="exited"&&!u?"hidden":void 0},ng[R],m,r.props.style),ref:k},N))}))});function og(i){return Dn("MuiBackdrop",i)}ua("MuiBackdrop",["root","invisible"]);const rg=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],lg=i=>{const{classes:e,invisible:t}=i;return In({root:["root",t&&"invisible"]},og,e)},cg=Ri("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(i,e)=>{const{ownerState:t}=i;return[e.root,t.invisible&&e.invisible]}})(({ownerState:i})=>Y({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},i.invisible&&{backgroundColor:"transparent"})),ug=M.forwardRef(function(e,t){var a,n,s;const o=pa({props:e,name:"MuiBackdrop"}),{children:r,className:l,component:u="div",components:p={},componentsProps:c={},invisible:h=!1,open:f,slotProps:g={},slots:y={},TransitionComponent:m=sg,transitionDuration:v}=o,C=St(o,rg),x=Y({},o,{component:u,invisible:h}),F=lg(x),k=(a=g.root)!=null?a:c.root;return Z.jsx(m,Y({in:f,timeout:v},C,{children:Z.jsx(cg,Y({"aria-hidden":!0},k,{as:(n=(s=y.root)!=null?s:p.Root)!=null?n:u,className:qe(F.root,l,k==null?void 0:k.className),ownerState:Y({},x,k==null?void 0:k.ownerState),classes:F,ref:t,children:r}))}))});function pg(i){return Z.jsx(vm,Y({},i,{defaultTheme:Js,themeId:On}))}function dg(i){const{className:e,classes:t,pulsate:a=!1,rippleX:n,rippleY:s,rippleSize:o,in:r,onExited:l,timeout:u}=i,[p,c]=M.useState(!1),h=qe(e,t.ripple,t.rippleVisible,a&&t.ripplePulsate),f={width:o,height:o,top:-(o/2)+s,left:-(o/2)+n},g=qe(t.child,p&&t.childLeaving,a&&t.childPulsate);return!r&&!p&&c(!0),M.useEffect(()=>{if(!r&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,r,u]),Z.jsx("span",{className:h,style:f,children:Z.jsx("span",{className:g})})}const st=ua("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),hg=["center","classes","className"];let Zs=i=>i,Fc,_c,kc,Tc;const pr=550,fg=80,mg=wl(Fc||(Fc=Zs`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BJA4YPaC.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-arcblock-BFUPp1Ez.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-DcfIKM1A.js","assets/index-uYcwdGZL.js","assets/index-C2fPoxDR.js","assets/index-DoZ2YM4T.js"])))=>i.map(i=>d[i]);
2
+ var Kf=Object.defineProperty;var Xf=(i,e,t)=>e in i?Kf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var _e=(i,e,t)=>Xf(i,typeof e!="symbol"?e+"":e,t);import{bU as Yf,bV as Qf,bW as Jf,bX as Zf,bY as em,aI as qp,aC as Rs,be as tm,ai as fc,bZ as im,b_ as am}from"./vendor-arcblock-BFUPp1Ez.js";import{r as M,g as Yt,e as mc,d as nm}from"./vendor-react-D-afvo_7.js";import{p as sm}from"./index-C2fPoxDR.js";import{_ as Vp,aG as om}from"./index-uYcwdGZL.js";import{_ as Y,c as St,cL as Qa,d5 as rm,cP as lr,d6 as lm,d7 as cm,d8 as um,d9 as pm,da as dm,N as hm,db as fm,dc as Wp,dd as mm,u as cr,j as Z,cI as gm,g as Dn,a as ua,l as qe,k as In,de as vm,bS as wl,H as bm,cU as ym,d as qn,cM as lt,m as gc,df as xm,dg as wm,dh as Sm,di as Pm,b as Cm,E as A,a2 as Fm,dj as _m}from"./vendor-mui-core-xF5F4eT7.js";import{t as Gp,g as Qs,p as Zi,B as At,d as ur,Z as vc,U as Kp,az as km,aA as Xp,L as po,aB as bc,c as ho,b as fo}from"./vendor-utils-5TjOM6td.js";import{a as Tm,n as Em,y as Dm}from"./vendor-hooks-BKxTDk_P.js";import{c as je}from"./index-DoZ2YM4T.js";const On="$$material";function Im(i,e){return Y({toolbar:{minHeight:56,[i.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[i.up("sm")]:{minHeight:64}}},e)}const pn={black:"#000",white:"#fff"},Om={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Bi={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ni={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ba={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},zi={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ji={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},$i={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Am=["mode","contrastThreshold","tonalOffset"],yc={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pn.white,default:pn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},mo={text:{primary:pn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xc(i,e,t,a){const n=a.light||a,s=a.dark||a*1.5;i[e]||(i.hasOwnProperty(t)?i[e]=i[t]:e==="light"?i.light=lm(i.main,n):e==="dark"&&(i.dark=cm(i.main,s)))}function Rm(i="light"){return i==="dark"?{main:zi[200],light:zi[50],dark:zi[400]}:{main:zi[700],light:zi[400],dark:zi[800]}}function Um(i="light"){return i==="dark"?{main:Bi[200],light:Bi[50],dark:Bi[400]}:{main:Bi[500],light:Bi[300],dark:Bi[700]}}function Mm(i="light"){return i==="dark"?{main:Ni[500],light:Ni[300],dark:Ni[700]}:{main:Ni[700],light:Ni[400],dark:Ni[800]}}function Lm(i="light"){return i==="dark"?{main:ji[400],light:ji[300],dark:ji[700]}:{main:ji[700],light:ji[500],dark:ji[900]}}function Bm(i="light"){return i==="dark"?{main:$i[400],light:$i[300],dark:$i[700]}:{main:$i[800],light:$i[500],dark:$i[900]}}function Nm(i="light"){return i==="dark"?{main:ba[400],light:ba[300],dark:ba[700]}:{main:"#ed6c02",light:ba[500],dark:ba[900]}}function zm(i){const{mode:e="light",contrastThreshold:t=3,tonalOffset:a=.2}=i,n=St(i,Am),s=i.primary||Rm(e),o=i.secondary||Um(e),r=i.error||Mm(e),l=i.info||Lm(e),u=i.success||Bm(e),p=i.warning||Nm(e);function c(y){return rm(y,mo.text.primary)>=t?mo.text.primary:yc.text.primary}const h=({color:y,name:m,mainShade:v=500,lightShade:C=300,darkShade:x=700})=>{if(y=Y({},y),!y.main&&y[v]&&(y.main=y[v]),!y.hasOwnProperty("main"))throw new Error(lr(11,m?` (${m})`:"",v));if(typeof y.main!="string")throw new Error(lr(12,m?` (${m})`:"",JSON.stringify(y.main)));return xc(y,"light",C,a),xc(y,"dark",x,a),y.contrastText||(y.contrastText=c(y.main)),y},f={dark:mo,light:yc};return Qa(Y({common:Y({},pn),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:r,name:"error"}),warning:h({color:p,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:u,name:"success"}),grey:Om,contrastThreshold:t,getContrastText:c,augmentColor:h,tonalOffset:a},f[e]),n)}const jm=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function $m(i){return Math.round(i*1e5)/1e5}const wc={textTransform:"uppercase"},Sc='"Roboto", "Helvetica", "Arial", sans-serif';function Hm(i,e){const t=typeof e=="function"?e(i):e,{fontFamily:a=Sc,fontSize:n=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:r=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:p,pxToRem:c}=t,h=St(t,jm),f=n/14,g=c||(v=>`${v/u*f}rem`),y=(v,C,x,F,k)=>Y({fontFamily:a,fontWeight:v,fontSize:g(C),lineHeight:x},a===Sc?{letterSpacing:`${$m(F/C)}em`}:{},k,p),m={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(r,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(r,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(r,14,1.75,.4,wc),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,wc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qa(Y({htmlFontSize:u,pxToRem:g,fontFamily:a,fontSize:n,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:r,fontWeightBold:l},m),h,{clone:!1})}const qm=.2,Vm=.14,Wm=.12;function ne(...i){return[`${i[0]}px ${i[1]}px ${i[2]}px ${i[3]}px rgba(0,0,0,${qm})`,`${i[4]}px ${i[5]}px ${i[6]}px ${i[7]}px rgba(0,0,0,${Vm})`,`${i[8]}px ${i[9]}px ${i[10]}px ${i[11]}px rgba(0,0,0,${Wm})`].join(",")}const Gm=["none",ne(0,2,1,-1,0,1,1,0,0,1,3,0),ne(0,3,1,-2,0,2,2,0,0,1,5,0),ne(0,3,3,-2,0,3,4,0,0,1,8,0),ne(0,2,4,-1,0,4,5,0,0,1,10,0),ne(0,3,5,-1,0,5,8,0,0,1,14,0),ne(0,3,5,-1,0,6,10,0,0,1,18,0),ne(0,4,5,-2,0,7,10,1,0,2,16,1),ne(0,5,5,-3,0,8,10,1,0,3,14,2),ne(0,5,6,-3,0,9,12,1,0,3,16,2),ne(0,6,6,-3,0,10,14,1,0,4,18,3),ne(0,6,7,-4,0,11,15,1,0,4,20,3),ne(0,7,8,-4,0,12,17,2,0,5,22,4),ne(0,7,8,-4,0,13,19,2,0,5,24,4),ne(0,7,9,-4,0,14,21,2,0,5,26,4),ne(0,8,9,-5,0,15,22,2,0,6,28,5),ne(0,8,10,-5,0,16,24,2,0,6,30,5),ne(0,8,11,-5,0,17,26,2,0,6,32,5),ne(0,9,11,-5,0,18,28,2,0,7,34,6),ne(0,9,12,-6,0,19,29,2,0,7,36,6),ne(0,10,13,-6,0,20,31,3,0,8,38,7),ne(0,10,13,-6,0,21,33,3,0,8,40,7),ne(0,10,14,-6,0,22,35,3,0,8,42,7),ne(0,11,14,-7,0,23,36,3,0,9,44,8),ne(0,11,15,-7,0,24,38,3,0,9,46,8)],Km=["duration","easing","delay"],Xm={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ym={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Pc(i){return`${Math.round(i)}ms`}function Qm(i){if(!i)return 0;const e=i/36;return Math.round((4+15*e**.25+e/5)*10)}function Jm(i){const e=Y({},Xm,i.easing),t=Y({},Ym,i.duration);return Y({getAutoHeightDuration:Qm,create:(n=["all"],s={})=>{const{duration:o=t.standard,easing:r=e.easeInOut,delay:l=0}=s;return St(s,Km),(Array.isArray(n)?n:[n]).map(u=>`${u} ${typeof o=="string"?o:Pc(o)} ${r} ${typeof l=="string"?l:Pc(l)}`).join(",")}},i,{easing:e,duration:t})}const Zm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},eg=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yp(i={},...e){const{mixins:t={},palette:a={},transitions:n={},typography:s={}}=i,o=St(i,eg);if(i.vars)throw new Error(lr(18));const r=zm(a),l=um(i);let u=Qa(l,{mixins:Im(l.breakpoints,t),palette:r,shadows:Gm.slice(),typography:Hm(r,s),transitions:Jm(n),zIndex:Y({},Zm)});return u=Qa(u,o),u=e.reduce((p,c)=>Qa(p,c),u),u.unstable_sxConfig=Y({},pm,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(c){return dm({sx:c,theme:this})},u}const Js=Yp();function Qp(){const i=hm(Js);return i[On]||i}function pa({props:i,name:e}){return fm({props:i,name:e,defaultTheme:Js,themeId:On})}const tg=i=>Wp(i)&&i!=="classes",kS=Wp,Ri=mm({themeId:On,defaultTheme:Js,rootShouldForwardProp:tg}),ig=i=>i.scrollTop;function Cc(i,e){var t,a;const{timeout:n,easing:s,style:o={}}=i;return{duration:(t=o.transitionDuration)!=null?t:typeof n=="number"?n:n[e.mode]||0,easing:(a=o.transitionTimingFunction)!=null?a:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}const ag=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ng={entering:{opacity:1},entered:{opacity:1}},sg=M.forwardRef(function(e,t){const a=Qp(),n={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:r,easing:l,in:u,onEnter:p,onEntered:c,onEntering:h,onExit:f,onExited:g,onExiting:y,style:m,timeout:v=n,TransitionComponent:C=gm}=e,x=St(e,ag),F=M.useRef(null),k=cr(F,r.ref,t),P=R=>N=>{if(R){const S=F.current;N===void 0?R(S):R(S,N)}},_=P(h),D=P((R,N)=>{ig(R);const S=Cc({style:m,timeout:v,easing:l},{mode:"enter"});R.style.webkitTransition=a.transitions.create("opacity",S),R.style.transition=a.transitions.create("opacity",S),p&&p(R,N)}),O=P(c),j=P(y),B=P(R=>{const N=Cc({style:m,timeout:v,easing:l},{mode:"exit"});R.style.webkitTransition=a.transitions.create("opacity",N),R.style.transition=a.transitions.create("opacity",N),f&&f(R)}),q=P(g),H=R=>{s&&s(F.current,R)};return Z.jsx(C,Y({appear:o,in:u,nodeRef:F,onEnter:D,onEntered:O,onEntering:_,onExit:B,onExited:q,onExiting:j,addEndListener:H,timeout:v},x,{children:(R,N)=>M.cloneElement(r,Y({style:Y({opacity:0,visibility:R==="exited"&&!u?"hidden":void 0},ng[R],m,r.props.style),ref:k},N))}))});function og(i){return Dn("MuiBackdrop",i)}ua("MuiBackdrop",["root","invisible"]);const rg=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],lg=i=>{const{classes:e,invisible:t}=i;return In({root:["root",t&&"invisible"]},og,e)},cg=Ri("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(i,e)=>{const{ownerState:t}=i;return[e.root,t.invisible&&e.invisible]}})(({ownerState:i})=>Y({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},i.invisible&&{backgroundColor:"transparent"})),ug=M.forwardRef(function(e,t){var a,n,s;const o=pa({props:e,name:"MuiBackdrop"}),{children:r,className:l,component:u="div",components:p={},componentsProps:c={},invisible:h=!1,open:f,slotProps:g={},slots:y={},TransitionComponent:m=sg,transitionDuration:v}=o,C=St(o,rg),x=Y({},o,{component:u,invisible:h}),F=lg(x),k=(a=g.root)!=null?a:c.root;return Z.jsx(m,Y({in:f,timeout:v},C,{children:Z.jsx(cg,Y({"aria-hidden":!0},k,{as:(n=(s=y.root)!=null?s:p.Root)!=null?n:u,className:qe(F.root,l,k==null?void 0:k.className),ownerState:Y({},x,k==null?void 0:k.ownerState),classes:F,ref:t,children:r}))}))});function pg(i){return Z.jsx(vm,Y({},i,{defaultTheme:Js,themeId:On}))}function dg(i){const{className:e,classes:t,pulsate:a=!1,rippleX:n,rippleY:s,rippleSize:o,in:r,onExited:l,timeout:u}=i,[p,c]=M.useState(!1),h=qe(e,t.ripple,t.rippleVisible,a&&t.ripplePulsate),f={width:o,height:o,top:-(o/2)+s,left:-(o/2)+n},g=qe(t.child,p&&t.childLeaving,a&&t.childPulsate);return!r&&!p&&c(!0),M.useEffect(()=>{if(!r&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,r,u]),Z.jsx("span",{className:h,style:f,children:Z.jsx("span",{className:g})})}const st=ua("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),hg=["center","classes","className"];let Zs=i=>i,Fc,_c,kc,Tc;const pr=550,fg=80,mg=wl(Fc||(Fc=Zs`
3
3
  0% {
4
4
  transform: scale(0);
5
5
  opacity: 0.1;
@@ -121,5 +121,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
121
121
  </div>
122
122
  `,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));_e(this,"convertImgToObject",ur(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(u=>u.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=Cf(s.originalname),[".mp4",".webm"].find(u=>{var p;return(p=a.src)==null?void 0:p.endsWith(u)})){const u=document.createElement("video");u.src=a.src,u.width=a.width,u.height=a.height,u.autoplay=!0,u.setAttribute("playsinline","playsinline"),u.muted=!0,u.loop=!0,u.style="pointer-events: none;",o.appendChild(u)}else{const u=document.createElement("object");u.data=n,u.type=s.mimetype||"image/png",u.alt=s.originalname,u.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",u.loading="lazy",o.appendChild(u)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));_e(this,"resetState",()=>{this.uploadedAPIData={...vp},this.uploaded.setPluginState({...bp}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...vp},this.addUploadItemFlag=!0,this.icon=()=>ve("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ve("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ve("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ve("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ve("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ve("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Il(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...bp}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const yp={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,componentDid:"",components:[]},xp={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},kf={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},a3={...kf,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class n3 extends Fe{constructor(t,a){super(t,a);_e(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await ma.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=Kp([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Tn(s,0,0,Ot);return n=Tn(s,400,0,Ot),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});_e(this,"resetState",()=>{this.apiData={...yp},this.resources.setPluginState({...xp})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...yp},this.icon=()=>ve("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ve("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ve("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ve("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ve("div",{id:"resources",className:"uploaded",children:[ve("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ve("button",{style:this.apiData.componentDid===a.did?a3:kf,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:km(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Il(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...xp}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var s3=tm();const o3=Yt(s3);var We=Uint8Array,Ji=Uint16Array,r3=Int32Array,Tf=new We([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ef=new We([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l3=new We([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Df=function(i,e){for(var t=new Ji(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new r3(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},If=Df(Tf,2),Of=If.b,c3=If.r;Of[28]=258,c3[258]=28;var u3=Df(Ef,0),p3=u3.b,cl=new Ji(32768);for(var ae=0;ae<32768;++ae){var ei=(ae&43690)>>1|(ae&21845)<<1;ei=(ei&52428)>>2|(ei&13107)<<2,ei=(ei&61680)>>4|(ei&3855)<<4,cl[ae]=((ei&65280)>>8|(ei&255)<<8)>>1}var cn=function(i,e,t){for(var a=i.length,n=0,s=new Ji(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new Ji(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new Ji(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var u=n<<4|i[n],p=e-i[n],c=o[i[n]-1]++<<p,h=c|(1<<p)-1;c<=h;++c)r[cl[c]>>l]=u}else for(r=new Ji(a),n=0;n<a;++n)i[n]&&(r[n]=cl[o[i[n]-1]++]>>15-i[n]);return r},zn=new We(288);for(var ae=0;ae<144;++ae)zn[ae]=8;for(var ae=144;ae<256;++ae)zn[ae]=9;for(var ae=256;ae<280;++ae)zn[ae]=7;for(var ae=280;ae<288;++ae)zn[ae]=8;var Af=new We(32);for(var ae=0;ae<32;++ae)Af[ae]=5;var d3=cn(zn,9,1),h3=cn(Af,5,1),Jo=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},ft=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Zo=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},f3=function(i){return(i+7)/8|0},ac=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new We(i.subarray(e,t))},m3=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Oe=function(i,e,t){var a=new Error(e||m3[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,Oe),!t)throw a;return a},nc=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new We(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new We(n*3));var u=function(li){var ci=t.length;if(li>ci){var ui=new We(Math.max(ci*2,li));ui.set(t),t=ui}},p=e.f||0,c=e.p||0,h=e.b||0,f=e.l,g=e.d,y=e.m,m=e.n,v=n*8;do{if(!f){p=ft(i,c,1);var C=ft(i,c+1,3);if(c+=3,C)if(C==1)f=d3,g=h3,y=9,m=5;else if(C==2){var P=ft(i,c,31)+257,_=ft(i,c+10,15)+4,D=P+ft(i,c+5,31)+1;c+=14;for(var O=new We(D),j=new We(19),B=0;B<_;++B)j[l3[B]]=ft(i,c+B*3,7);c+=_*3;for(var q=Jo(j),H=(1<<q)-1,R=cn(j,q,1),B=0;B<D;){var N=R[ft(i,c,H)];c+=N&15;var x=N>>4;if(x<16)O[B++]=x;else{var S=0,b=0;for(x==16?(b=3+ft(i,c,3),c+=2,S=O[B-1]):x==17?(b=3+ft(i,c,7),c+=3):x==18&&(b=11+ft(i,c,127),c+=7);b--;)O[B++]=S}}var w=O.subarray(0,P),T=O.subarray(P);y=Jo(w),m=Jo(T),f=cn(w,y,1),g=cn(T,m,1)}else Oe(1);else{var x=f3(c)+4,F=i[x-4]|i[x-3]<<8,k=x+F;if(k>n){l&&Oe(0);break}r&&u(h+F),t.set(i.subarray(x,k),h),e.b=h+=F,e.p=c=k*8,e.f=p;continue}if(c>v){l&&Oe(0);break}}r&&u(h+131072);for(var I=(1<<y)-1,E=(1<<m)-1,$=c;;$=c){var S=f[Zo(i,c)&I],W=S>>4;if(c+=S&15,c>v){l&&Oe(0);break}if(S||Oe(2),W<256)t[h++]=W;else if(W==256){$=c,f=null;break}else{var K=W-254;if(W>264){var B=W-257,J=Tf[B];K=ft(i,c,(1<<J)-1)+Of[B],c+=J}var ee=g[Zo(i,c)&E],ie=ee>>4;ee||Oe(3),c+=ee&15;var T=p3[ie];if(ie>3){var J=Ef[ie];T+=Zo(i,c)&(1<<J)-1,c+=J}if(c>v){l&&Oe(0);break}r&&u(h+131072);var ri=h+K;if(h<T){var Re=s-T,Mi=Math.min(T,ri);for(Re+h<0&&Oe(3);h<Mi;++h)t[h]=a[Re+h]}for(;h<ri;++h)t[h]=t[h-T]}}e.l=f,e.p=$,e.b=h,e.f=p,f&&(p=1,e.m=y,e.d=g,e.n=m)}while(!p);return h!=t.length&&o?ac(t,0,h):t.subarray(0,h)},g3=new We(0),_t=function(i,e){return i[e]|i[e+1]<<8},xt=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},er=function(i,e){return xt(i,e)+xt(i,e+4)*4294967296},v3=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Oe(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},b3=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},y3=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&Oe(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&Oe(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function Rf(i,e){return nc(i,{i:2},e&&e.out,e&&e.dictionary)}function x3(i,e){var t=v3(i);return t+8>i.length&&Oe(6,"invalid gzip data"),nc(i.subarray(t,-8),{i:2},e&&e.out||new We(b3(i)),e&&e.dictionary)}function w3(i,e){return nc(i.subarray(y3(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function tr(i,e){return i[0]==31&&i[1]==139&&i[2]==8?x3(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?Rf(i,e):w3(i,e)}var ul=typeof TextDecoder<"u"&&new TextDecoder,S3=0;try{ul.decode(g3,{stream:!0}),S3=1}catch{}var P3=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:ac(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function C3(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(ul)return ul.decode(i);var n=P3(i),s=n.s,t=n.r;return t.length&&Oe(8),s}}var F3=function(i,e){return e+30+_t(i,e+26)+_t(i,e+28)},_3=function(i,e,t){var a=_t(i,e+28),n=C3(i.subarray(e+46,e+46+a),!(_t(i,e+8)&2048)),s=e+46+a,o=xt(i,e+20),r=t&&o==4294967295?k3(i,s):[o,xt(i,e+24),xt(i,e+42)],l=r[0],u=r[1],p=r[2];return[_t(i,e+10),l,u,n,s+_t(i,e+30)+_t(i,e+32),p]},k3=function(i,e){for(;_t(i,e)!=1;e+=4+_t(i,e+2));return[er(i,e+12),er(i,e+4),er(i,e+20)]};function T3(i,e){for(var t={},a=i.length-22;xt(i,a)!=101010256;--a)(!a||i.length-a>65558)&&Oe(13);var n=_t(i,a+8);if(!n)return{};var s=xt(i,a+16),o=s==4294967295||n==65535;if(o){var r=xt(i,a-12);o=xt(i,r)==101075792,o&&(n=xt(i,r+32),s=xt(i,r+48))}for(var l=e&&e.filter,u=0;u<n;++u){var p=_3(i,s,o),c=p[0],h=p[1],f=p[2],g=p[3],y=p[4],m=p[5],v=F3(i,m);s=y,(!l||l({name:g,size:h,originalSize:f,compression:c}))&&(c?c==8?t[g]=Rf(i.subarray(v,v+h),{out:new We(f)}):Oe(14,"unknown compression type "+c):t[g]=ac(i,v,v+h))}return t}var ro=typeof self<"u"?self:Qs;const En=typeof navigator<"u",E3=En&&typeof HTMLImageElement>"u",Ws=!(typeof Qs>"u"||typeof Zi>"u"||!Zi.versions||!Zi.versions.node),sc=ro.Buffer,ls=ro.BigInt,oc=!!sc,D3=i=>i;function Gs(i,e=D3){if(Ws)try{return typeof require=="function"?Promise.resolve(e(require(i))):import(i).then(e)}catch{console.warn(`Couldn't load ${i}`)}}let rc=ro.fetch;const I3=i=>rc=i;if(!ro.fetch){const i=Gs("http",a=>a),e=Gs("https",a=>a),t=(a,{headers:n}={})=>new Promise(async(s,o)=>{let{port:r,hostname:l,pathname:u,protocol:p,search:c}=new URL(a);const h={method:"GET",hostname:l,path:encodeURI(u)+c,headers:n};r!==""&&(h.port=Number(r));const f=(p==="https:"?await e:await i).request(h,g=>{if(g.statusCode===301||g.statusCode===302){let y=new URL(g.headers.location,a).toString();return t(y,{headers:n}).then(s).catch(o)}s({status:g.statusCode,arrayBuffer:()=>new Promise(y=>{let m=[];g.on("data",v=>m.push(v)),g.on("end",()=>y(At.concat(m)))})})});f.on("error",o),f.end()});I3(t)}function G(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}const Ks=i=>Uf(i)?void 0:i,O3=i=>i!==void 0;function Uf(i){return i===void 0||(i instanceof Map?i.size===0:Object.values(i).filter(O3).length===0)}function ye(i){let e=new Error(i);throw delete e.stack,e}function Ei(i){return(i=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(i).trim())===""?void 0:i}function pl(i){let e=function(t){let a=0;return t.ifd0.enabled&&(a+=1024),t.exif.enabled&&(a+=2048),t.makerNote&&(a+=2048),t.userComment&&(a+=1024),t.gps.enabled&&(a+=512),t.interop.enabled&&(a+=100),t.ifd1.enabled&&(a+=1024),a+2048}(i);return i.jfif.enabled&&(e+=50),i.xmp.enabled&&(e+=2e4),i.iptc.enabled&&(e+=14e3),i.icc.enabled&&(e+=6e3),e}const dl=i=>String.fromCharCode.apply(null,i),wp=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function Mf(i){return wp?wp.decode(i):oc?At.from(i).toString("utf8"):decodeURIComponent(escape(dl(i)))}class Ge{static from(e,t){return e instanceof this&&e.le===t?e:new Ge(e,void 0,void 0,t)}constructor(e,t=0,a,n){if(typeof n=="boolean"&&(this.le=n),Array.isArray(e)&&(e=new Uint8Array(e)),e===0)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){a===void 0&&(a=e.byteLength-t);let s=new DataView(e,t,a);this._swapDataView(s)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof Ge){a===void 0&&(a=e.byteLength-t),(t+=e.byteOffset)+a>e.byteOffset+e.byteLength&&ye("Creating view outside of available memory in ArrayBuffer");let s=new DataView(e.buffer,t,a);this._swapDataView(s)}else if(typeof e=="number"){let s=new DataView(new ArrayBuffer(e));this._swapDataView(s)}else ye("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,a=Ge){return e instanceof DataView||e instanceof Ge?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||ye("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new a(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new Ge(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return Mf(this.getUint8Array(e,t))}getLatin1String(e=0,t=this.byteLength){let a=this.getUint8Array(e,t);return dl(a)}getUnicodeString(e=0,t=this.byteLength){const a=[];for(let n=0;n<t&&e+n<this.byteLength;n+=2)a.push(this.getUint16(e+n));return dl(a)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,a){switch(t){case 1:return this.getUint8(e,a);case 2:return this.getUint16(e,a);case 4:return this.getUint32(e,a);case 8:return this.getUint64&&this.getUint64(e,a)}}getUint(e,t,a){switch(t){case 8:return this.getUint8(e,a);case 16:return this.getUint16(e,a);case 32:return this.getUint32(e,a);case 64:return this.getUint64&&this.getUint64(e,a)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function hl(i,e){ye(`${i} '${e}' was not loaded, try using full build of exifr.`)}class lc extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||hl(this.kind,e),t&&(e in t||function(a,n){ye(`Unknown ${a} '${n}'.`)}(this.kind,e),t[e].enabled||hl(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var ca=new lc("file parser"),Ae=new lc("segment parser"),ga=new lc("file reader");function A3(i,e){return typeof i=="string"?Sp(i,e):En&&!E3&&i instanceof HTMLImageElement?Sp(i.src,e):i instanceof Uint8Array||i instanceof ArrayBuffer||i instanceof DataView?new Ge(i):En&&i instanceof Blob?fl(i,e,"blob",vl):void ye("Invalid input argument")}function Sp(i,e){return(t=i).startsWith("data:")||t.length>1e4?ml(i,e,"base64"):Ws&&i.includes("://")?fl(i,e,"url",gl):Ws?ml(i,e,"fs"):En?fl(i,e,"url",gl):void ye("Invalid input argument");var t}async function fl(i,e,t,a){return ga.has(t)?ml(i,e,t):a?async function(n,s){let o=await s(n);return new Ge(o)}(i,a):void ye(`Parser ${t} is not loaded`)}async function ml(i,e,t){let a=new(ga.get(t))(i,e);return await a.read(),a}const gl=i=>rc(i).then(e=>e.arrayBuffer()),vl=i=>new Promise((e,t)=>{let a=new FileReader;a.onloadend=()=>e(a.result||new ArrayBuffer),a.onerror=t,a.readAsArrayBuffer(i)});class R3 extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function Ee(i,e,t){let a=new R3;for(let[n,s]of t)a.set(n,s);if(Array.isArray(e))for(let n of e)i.set(n,a);else i.set(e,a);return a}function bl(i,e,t){let a,n=i.get(e);for(a of t)n.set(a[0],a[1])}const Ke=new Map,Ui=new Map,Os=new Map,cs=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Lf=["jfif","xmp","icc","iptc","ihdr"],yl=["tiff",...Lf],Se=["ifd0","ifd1","exif","gps","interop"],us=[...yl,...Se],ps=["makerNote","userComment"],Bf=["translateKeys","translateValues","reviveValues","multiSegment"],ds=[...Bf,"sanitize","mergeOutput","silentErrors"];class Nf{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Ha extends Nf{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,a,n){if(super(),G(this,"enabled",!1),G(this,"skip",new Set),G(this,"pick",new Set),G(this,"deps",new Set),G(this,"translateKeys",!1),G(this,"translateValues",!1),G(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(n),this.canBeFiltered=Se.includes(e),this.canBeFiltered&&(this.dict=Ke.get(e)),a!==void 0)if(Array.isArray(a))this.parse=this.enabled=!0,this.canBeFiltered&&a.length>0&&this.translateTagSet(a,this.pick);else if(typeof a=="object"){if(this.enabled=!0,this.parse=a.parse!==!1,this.canBeFiltered){let{pick:s,skip:o}=a;s&&s.length>0&&this.translateTagSet(s,this.pick),o&&o.length>0&&this.translateTagSet(o,this.skip)}this.applyInheritables(a)}else a===!0||a===!1?this.parse=this.enabled=a:ye(`Invalid options argument: ${a}`)}applyInheritables(e){let t,a;for(t of Bf)a=e[t],a!==void 0&&(this[t]=a)}translateTagSet(e,t){if(this.dict){let a,n,{tagKeys:s,tagValues:o}=this.dict;for(a of e)typeof a=="string"?(n=o.indexOf(a),n===-1&&(n=s.indexOf(Number(a))),n!==-1&&t.add(Number(s[n]))):t.add(a)}else for(let a of e)t.add(a)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,Xs(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Xs(this.pick,this.deps)}}var Ne={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Pp=new Map;class cc extends Nf{static useCached(e){let t=Pp.get(e);return t!==void 0||(t=new this(e),Pp.set(e,t)),t}constructor(e){super(),e===!0?this.setupFromTrue():e===void 0?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):typeof e=="object"?this.setupFromObject(e):ye(`Invalid options argument ${e}`),this.firstChunkSize===void 0&&(this.firstChunkSize=En?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of cs)this[e]=Ne[e];for(e of ds)this[e]=Ne[e];for(e of ps)this[e]=Ne[e];for(e of us)this[e]=new Ha(e,Ne[e],void 0,this)}setupFromTrue(){let e;for(e of cs)this[e]=Ne[e];for(e of ds)this[e]=Ne[e];for(e of ps)this[e]=!0;for(e of us)this[e]=new Ha(e,!0,void 0,this)}setupFromArray(e){let t;for(t of cs)this[t]=Ne[t];for(t of ds)this[t]=Ne[t];for(t of ps)this[t]=Ne[t];for(t of us)this[t]=new Ha(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,Se)}setupFromObject(e){let t;for(t of(Se.ifd0=Se.ifd0||Se.image,Se.ifd1=Se.ifd1||Se.thumbnail,Object.assign(this,e),cs))this[t]=ir(e[t],Ne[t]);for(t of ds)this[t]=ir(e[t],Ne[t]);for(t of ps)this[t]=ir(e[t],Ne[t]);for(t of yl)this[t]=new Ha(t,Ne[t],e[t],this);for(t of Se)this[t]=new Ha(t,Ne[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,Se,us),e.tiff===!0?this.batchEnableWithBool(Se,!0):e.tiff===!1?this.batchEnableWithUserValue(Se,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,Se):typeof e.tiff=="object"&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,Se)}batchEnableWithBool(e,t){for(let a of e)this[a].enabled=t}batchEnableWithUserValue(e,t){for(let a of e){let n=t[a];this[a].enabled=n!==!1&&n!==void 0}}setupGlobalFilters(e,t,a,n=a){if(e&&e.length){for(let o of n)this[o].enabled=!1;let s=Cp(e,a);for(let[o,r]of s)Xs(this[o].pick,r),this[o].enabled=!0}else if(t&&t.length){let s=Cp(t,a);for(let[o,r]of s)Xs(this[o].skip,r)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:a,iptc:n,icc:s}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),a.enabled||e.skip.add(700),n.enabled||e.skip.add(33723),s.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:a,interop:n}=this;n.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),a.needed&&e.deps.add(34853),this.tiff.enabled=Se.some(s=>this[s].enabled===!0)||this.makerNote||this.userComment;for(let s of Se)this[s].finalizeFilters()}get onlyTiff(){return!Lf.map(e=>this[e].enabled).some(e=>e===!0)&&this.tiff.enabled}checkLoadedPlugins(){for(let e of yl)this[e].enabled&&!Ae.has(e)&&hl("segment parser",e)}}function Cp(i,e){let t,a,n,s,o=[];for(n of e){for(s of(t=Ke.get(n),a=[],t))(i.includes(s[0])||i.includes(s[1]))&&a.push(s[0]);a.length&&o.push([n,a])}return o}function ir(i,e){return i!==void 0?i:e!==void 0?e:void 0}function Xs(i,e){for(let t of e)i.add(t)}G(cc,"default",Ne);class U3{constructor(e){G(this,"parsers",{}),G(this,"output",{}),G(this,"errors",[]),G(this,"pushToErrors",t=>this.errors.push(t)),this.options=cc.useCached(e)}async read(e){this.file=await A3(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[a,n]of ca)if(n.canHandle(e,t))return this.fileParser=new n(this.options,this.file,this.parsers),e[a]=!0;this.file.close&&this.file.close(),ye("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),Ks(e)}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map(async a=>{let n=await a.parse();a.assignToOutput(e,n)});this.options.silentErrors&&(t=t.map(a=>a.catch(this.pushToErrors))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,a=Ae.get("tiff",e);var n;if(t.tiff?n={start:0,type:"tiff"}:t.jpeg&&(n=await this.fileParser.getOrFindSegment("tiff")),n===void 0)return;let s=await this.fileParser.ensureSegmentChunk(n),o=this.parsers.tiff=new a(s,e,t),r=await o.extractThumbnail();return t.close&&t.close(),r}}class lo{constructor(e,t,a){G(this,"errors",[]),G(this,"ensureSegmentChunk",async n=>{let s=n.start,o=n.size||65536;if(this.file.chunked)if(this.file.available(s,o))n.chunk=this.file.subarray(s,o);else try{n.chunk=await this.file.readChunk(s,o)}catch(r){ye(`Couldn't read segment: ${JSON.stringify(n)}. ${r.message}`)}else this.file.byteLength>s+o?n.chunk=this.file.subarray(s,o):n.size===void 0?n.chunk=this.file.subarray(s):ye("Segment unreachable: "+JSON.stringify(n));return n.chunk}),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=a}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let a=new(Ae.get(e))(t,this.options,this.file);return this.parsers[e]=a}createParsers(e){for(let t of e){let{type:a,chunk:n}=t,s=this.options[a];if(s&&s.enabled){let o=this.parsers[a];o&&o.append||o||this.createParser(a,n)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}class wt{static findPosition(e,t){let a=e.getUint16(t+2)+2,n=typeof this.headerLength=="function"?this.headerLength(e,t,a):this.headerLength,s=t+n,o=a-n;return{offset:t,length:a,headerLength:n,start:s,size:o,end:s+o}}static parse(e,t={}){return new this(e,new cc({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof Ge?e:new Ge(e)}constructor(e,t={},a){G(this,"errors",[]),G(this,"raw",new Map),G(this,"handleError",n=>{if(!this.options.silentErrors)throw n;this.errors.push(n.message)}),this.chunk=this.normalizeInput(e),this.file=a,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let a=Os.get(t),n=Ui.get(t),s=Ke.get(t),o=this.options[t],r=o.reviveValues&&!!a,l=o.translateValues&&!!n,u=o.translateKeys&&!!s,p={};for(let[c,h]of e)r&&a.has(c)?h=a.get(c)(h):l&&n.has(c)&&(h=this.translateValue(h,n.get(c))),u&&s.has(c)&&(c=s.get(c)||c),p[c]=h;return p}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,a){if(this.globalOptions.mergeOutput)return Object.assign(e,a);e[t]?Object.assign(e[t],a):e[t]=a}}G(wt,"headerLength",4),G(wt,"type",void 0),G(wt,"multiSegment",!1),G(wt,"canHandle",()=>!1);function M3(i){return i===192||i===194||i===196||i===219||i===221||i===218||i===254}function L3(i){return i>=224&&i<=239}function B3(i,e,t){for(let[a,n]of Ae)if(n.canHandle(i,e,t))return a}class Fp extends lo{constructor(...e){super(...e),G(this,"appSegments",[]),G(this,"jpegSegments",[]),G(this,"unknownSegments",[])}static canHandle(e,t){return t===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){e===!0?(this.findAll=!0,this.wanted=new Set(Ae.keyList())):(e=e===void 0?Ae.keyList().filter(t=>this.options[t].enabled):e.filter(t=>this.options[t].enabled&&Ae.has(t)),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:a,findAll:n,wanted:s,remaining:o}=this;if(!n&&this.file.chunked&&(n=Array.from(s).some(r=>{let l=Ae.get(r),u=this.options[r];return l.multiSegment&&u.multiSegment}),n&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,a.byteLength),!this.options.onlyTiff&&a.chunked){let r=!1;for(;o.size>0&&!r&&(a.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:l}=a,u=this.appSegments.some(p=>!this.file.available(p.offset||p.start,p.length||p.size));if(r=e>l&&!u?!await a.readNextChunk(e):!await a.readNextChunk(l),(e=this.findAppSegmentsInRange(e,a.byteLength))===void 0)return}}}findAppSegmentsInRange(e,t){t-=2;let a,n,s,o,r,l,{file:u,findAll:p,wanted:c,remaining:h,options:f}=this;for(;e<t;e++)if(u.getUint8(e)===255){if(a=u.getUint8(e+1),L3(a)){if(n=u.getUint16(e+2),s=B3(u,e,n),s&&c.has(s)&&(o=Ae.get(s),r=o.findPosition(u,e),l=f[s],r.type=s,this.appSegments.push(r),!p&&(o.multiSegment&&l.multiSegment?(this.unfinishedMultiSegment=r.chunkNumber<r.chunkCount,this.unfinishedMultiSegment||h.delete(s)):h.delete(s),h.size===0)))break;f.recordUnknownSegments&&(r=wt.findPosition(u,e),r.marker=a,this.unknownSegments.push(r)),e+=n+1}else if(M3(a)){if(n=u.getUint16(e+2),a===218&&f.stopAfterSos!==!1)return;f.recordJpegSegments&&this.jpegSegments.push({offset:e,length:n,marker:a}),e+=n+1}}return e}mergeMultiSegments(){if(!this.appSegments.some(t=>t.multiSegment))return;let e=function(t,a){let n,s,o,r=new Map;for(let l=0;l<t.length;l++)n=t[l],s=n[a],r.has(s)?o=r.get(s):r.set(s,o=[]),o.push(n);return Array.from(r)}(this.appSegments,"type");this.mergedAppSegments=e.map(([t,a])=>{let n=Ae.get(t,this.options);return n.handleMultiSegments?{type:t,chunk:n.handleMultiSegments(a)}:a[0]})}getSegment(e){return this.appSegments.find(t=>t.type===e)}async getOrFindSegment(e){let t=this.getSegment(e);return t===void 0&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}G(Fp,"type","jpeg"),ca.set("jpeg",Fp);const N3=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class z3 extends wt{parseHeader(){var e=this.chunk.getUint16();e===18761?this.le=!0:e===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,a=new Map){let{pick:n,skip:s}=this.options[t];n=new Set(n);let o=n.size>0,r=s.size===0,l=this.chunk.getUint16(e);e+=2;for(let u=0;u<l;u++){let p=this.chunk.getUint16(e);if(o){if(n.has(p)&&(a.set(p,this.parseTag(e,p,t)),n.delete(p),n.size===0))break}else!r&&s.has(p)||a.set(p,this.parseTag(e,p,t));e+=12}return a}parseTag(e,t,a){let{chunk:n}=this,s=n.getUint16(e+2),o=n.getUint32(e+4),r=N3[s];if(r*o<=4?e+=8:e=n.getUint32(e+8),(s<1||s>13)&&ye(`Invalid TIFF value type. block: ${a.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e}`),e>n.byteLength&&ye(`Invalid TIFF value offset. block: ${a.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e} is outside of chunk size ${n.byteLength}`),s===1)return n.getUint8Array(e,o);if(s===2)return Ei(n.getString(e,o));if(s===7)return n.getUint8Array(e,o);if(o===1)return this.parseTagValue(s,e);{let l=new(function(p){switch(p){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(s))(o),u=r;for(let p=0;p<o;p++)l[p]=this.parseTagValue(s,e),e+=u;return l}}parseTagValue(e,t){let{chunk:a}=this;switch(e){case 1:return a.getUint8(t);case 3:return a.getUint16(t);case 4:return a.getUint32(t);case 5:return a.getUint32(t)/a.getUint32(t+4);case 6:return a.getInt8(t);case 8:return a.getInt16(t);case 9:return a.getInt32(t);case 10:return a.getInt32(t)/a.getInt32(t+4);case 11:return a.getFloat(t);case 12:return a.getDouble(t);case 13:return a.getUint32(t);default:ye(`Invalid tiff type ${e}`)}}}class ar extends z3{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1165519206&&e.getUint16(t+8)===0}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return t.catch!==void 0&&(t=t.catch(this.handleError)),t}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let a=new Map;return this[t]=a,this.parseTags(e,t,a),a}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&ye("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&ye(`IFD0 offset points to outside of file.
123
123
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,pl(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return t.size!==0?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,pl(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let a=e.get(t);a&&a.length===1&&e.set(t,a[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",_p(...e.get(2),e.get(1))),e.set("longitude",_p(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,a,n={};for(t of Se)if(e=this[t],!Uf(e))if(a=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(t==="ifd1")continue;Object.assign(n,a)}else n[t]=a;return this.makerNote&&(n.makerNote=this.makerNote),this.userComment&&(n.userComment=this.userComment),n}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[a,n]of Object.entries(t))this.assignObjectToOutput(e,a,n)}}function _p(i,e,t,a){var n=i+e/60+t/3600;return a!=="S"&&a!=="W"||(n*=-1),n}G(ar,"type","tiff"),G(ar,"headerLength",10),Ae.set("tiff",ar);const uc={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},uc,{firstChunkSize:4e4,gps:[1,2,3,4]});Object.assign({},uc,{tiff:!1,ifd1:!0,mergeOutput:!1});const j3=Object.assign({},uc,{firstChunkSize:4e4,ifd0:[274]});async function $3(i){let e=new U3(j3);await e.read(i);let t=await e.parse();if(t&&t.ifd0)return t.ifd0[274]}const H3=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let Xa=!0,Ya=!0;if(typeof navigator=="object"){let i=navigator.userAgent;if(i.includes("iPad")||i.includes("iPhone")){let e=i.match(/OS (\d+)_(\d+)/);if(e){let[,t,a]=e;Xa=Number(t)+.1*Number(a)<13.4,Ya=!1}}else if(i.includes("OS X 10")){let[,e]=i.match(/OS X 10[_.](\d+)/);Xa=Ya=Number(e)<15}if(i.includes("Chrome/")){let[,e]=i.match(/Chrome\/(\d+)/);Xa=Ya=Number(e)<81}else if(i.includes("Firefox/")){let[,e]=i.match(/Firefox\/(\d+)/);Xa=Ya=Number(e)<77}}async function q3(i){let e=await $3(i);return Object.assign({canvas:Xa,css:Ya},H3[e])}class V3 extends Ge{constructor(...e){super(...e),G(this,"ranges",new W3),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,a){if(e===0&&this.byteLength===0&&a){let n=new DataView(a.buffer||a,a.byteOffset,a.byteLength);this._swapDataView(n)}else{let n=e+t;if(n>this.byteLength){let{dataView:s}=this._extend(n);this._swapDataView(s)}}}_extend(e){let t;t=oc?sc.allocUnsafe(e):new Uint8Array(e);let a=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:a}}subarray(e,t,a=!1){return t=t||this._lengthToEnd(e),a&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,a=!1){a&&this._tryExtend(t,e.byteLength,e);let n=super.set(e,t);return this.ranges.add(t,n.byteLength),n}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class W3{constructor(){G(this,"list",[])}get length(){return this.list.length}add(e,t,a=0){let n=e+t,s=this.list.filter(o=>kp(e,o.offset,n)||kp(e,o.end,n));if(s.length>0){e=Math.min(e,...s.map(r=>r.offset)),n=Math.max(n,...s.map(r=>r.end)),t=n-e;let o=s.shift();o.offset=e,o.length=t,o.end=n,this.list=this.list.filter(r=>!s.includes(r))}else this.list.push({offset:e,length:t,end:n})}available(e,t){let a=e+t;return this.list.some(n=>n.offset<=e&&a<=n.end)}}function kp(i,e,t){return i<=e&&e<=t}class co extends V3{constructor(e,t){super(0),G(this,"chunksRead",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,a=await this.readChunk(e,t);return!!a&&a.byteLength===t}async readChunk(e,t){if(this.chunksRead++,(t=this.safeWrapAddress(e,t))!==0)return this._readChunk(e,t)}safeWrapAddress(e,t){return this.size!==void 0&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}ga.set("blob",class extends co{async readWhole(){this.chunked=!1;let i=await vl(this.input);this._swapArrayBuffer(i)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(i,e){let t=e?i+e:void 0,a=this.input.slice(i,t),n=await vl(a);return this.set(n,i,!0)}});ga.set("url",class extends co{async readWhole(){this.chunked=!1;let i=await gl(this.input);i instanceof ArrayBuffer?this._swapArrayBuffer(i):i instanceof Uint8Array&&this._swapBuffer(i)}async _readChunk(i,e){let t=e?i+e-1:void 0,a=this.options.httpHeaders||{};(i||t)&&(a.range=`bytes=${[i,t].join("-")}`);let n=await rc(this.input,{headers:a}),s=await n.arrayBuffer(),o=s.byteLength;if(n.status!==416)return o!==e&&(this.size=i+o),this.set(s,i,!0)}});Ge.prototype.getUint64=function(i){let e=this.getUint32(i),t=this.getUint32(i+4);return e<1048575?e<<32|t:typeof ls!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),ls(e)<<ls(32)|ls(t)):void ye("Trying to read 64b value but JS can only handle 53b numbers.")};class G3 extends lo{parseBoxes(e=0){let t=[];for(;e<this.file.byteLength-4;){let a=this.parseBoxHead(e);if(t.push(a),a.length===0)break;e+=a.length}return t}parseSubBoxes(e){e.boxes=this.parseBoxes(e.start)}findBox(e,t){return e.boxes===void 0&&this.parseSubBoxes(e),e.boxes.find(a=>a.kind===t)}parseBoxHead(e){let t=this.file.getUint32(e),a=this.file.getString(e+4,4),n=e+8;return t===1&&(t=this.file.getUint64(e+8),n+=8),{offset:e,length:t,kind:a,start:n}}parseBoxFullHead(e){if(e.version!==void 0)return;let t=this.file.getUint32(e.start);e.version=t>>24,e.start+=4}}class zf extends G3{static canHandle(e,t){if(t!==0)return!1;let a=e.getUint16(2);if(a>50)return!1;let n=16,s=[];for(;n<a;)s.push(e.getString(n,4)),n+=4;return s.includes(this.type)}async parse(){let e=this.file.getUint32(0),t=this.parseBoxHead(e);for(;t.kind!=="meta";)e+=t.length,await this.file.ensureChunk(e,16),t=this.parseBoxHead(e);await this.file.ensureChunk(t.offset,t.length),this.parseBoxFullHead(t),this.parseSubBoxes(t),this.options.icc.enabled&&await this.findIcc(t),this.options.tiff.enabled&&await this.findExif(t)}async registerSegment(e,t,a){await this.file.ensureChunk(t,a);let n=this.file.subarray(t,a);this.createParser(e,n)}async findIcc(e){let t=this.findBox(e,"iprp");if(t===void 0)return;let a=this.findBox(t,"ipco");if(a===void 0)return;let n=this.findBox(a,"colr");n!==void 0&&await this.registerSegment("icc",n.offset+12,n.length)}async findExif(e){let t=this.findBox(e,"iinf");if(t===void 0)return;let a=this.findBox(e,"iloc");if(a===void 0)return;let n=this.findExifLocIdInIinf(t),s=this.findExtentInIloc(a,n);if(s===void 0)return;let[o,r]=s;await this.file.ensureChunk(o,r);let l=4+this.file.getUint32(o);o+=l,r-=l,await this.registerSegment("tiff",o,r)}findExifLocIdInIinf(e){this.parseBoxFullHead(e);let t,a,n,s,o=e.start,r=this.file.getUint16(o);for(o+=2;r--;){if(t=this.parseBoxHead(o),this.parseBoxFullHead(t),a=t.start,t.version>=2&&(n=t.version===3?4:2,s=this.file.getString(a+n+2,4),s==="Exif"))return this.file.getUintBytes(a,n);o+=t.length}}get8bits(e){let t=this.file.getUint8(e);return[t>>4,15&t]}findExtentInIloc(e,t){this.parseBoxFullHead(e);let a=e.start,[n,s]=this.get8bits(a++),[o,r]=this.get8bits(a++),l=e.version===2?4:2,u=e.version===1||e.version===2?2:0,p=r+n+s,c=e.version===2?4:2,h=this.file.getUintBytes(a,c);for(a+=c;h--;){let f=this.file.getUintBytes(a,l);a+=l+u+2+o;let g=this.file.getUint16(a);if(a+=2,f===t)return g>1&&console.warn(`ILOC box has more than one extent but we're only processing one
124
- Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(a+r,n),this.file.getUintBytes(a+r+n,s)];a+=g*p}}}class jf extends zf{}G(jf,"type","heic");class Tp extends zf{}G(Tp,"type","avif"),ca.set("heic",jf),ca.set("avif",Tp),Ee(Ke,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),Ee(Ke,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),Ee(Ke,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),Ee(Ui,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let un=Ee(Ui,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const Ep={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};un.set(37392,Ep),un.set(41488,Ep);const nr={0:"Normal",1:"Low",2:"High"};function Dp(i){return typeof i=="object"&&i.length!==void 0?i[0]:i}function Ip(i){let e=Array.from(i).slice(1);return e[1]>15&&(e=e.map(t=>String.fromCharCode(t))),e[2]!=="0"&&e[2]!==0||e.pop(),e.join(".")}function sr(i){if(typeof i=="string"){var[e,t,a,n,s,o]=i.trim().split(/[-: ]/g).map(Number),r=new Date(e,t-1,a);return Number.isNaN(n)||Number.isNaN(s)||Number.isNaN(o)||(r.setHours(n),r.setMinutes(s),r.setSeconds(o)),Number.isNaN(+r)?i:r}}function qa(i){if(typeof i=="string")return i;let e=[];if(i[1]===0&&i[i.length-1]===0)for(let t=0;t<i.length;t+=2)e.push(Op(i[t+1],i[t]));else for(let t=0;t<i.length;t+=2)e.push(Op(i[t],i[t+1]));return Ei(String.fromCodePoint(...e))}function Op(i,e){return i<<8|e}un.set(41992,nr),un.set(41993,nr),un.set(41994,nr),Ee(Os,["ifd0","ifd1"],[[50827,function(i){return typeof i!="string"?Mf(i):i}],[306,sr],[40091,qa],[40092,qa],[40093,qa],[40094,qa],[40095,qa]]),Ee(Os,"exif",[[40960,Ip],[36864,Ip],[36867,sr],[36868,sr],[40962,Dp],[40963,Dp]]),Ee(Os,"gps",[[0,i=>Array.from(i).join(".")],[7,i=>Array.from(i).join(":")]]);class or extends wt{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1752462448&&e.getString(t+4,20)==="http://ns.adobe.com/"}static headerLength(e,t){return e.getString(t+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(e,t){let a=super.findPosition(e,t);return a.multiSegment=a.extended=a.headerLength===79,a.multiSegment?(a.chunkCount=e.getUint8(t+72),a.chunkNumber=e.getUint8(t+76),e.getUint8(t+77)!==0&&a.chunkNumber++):(a.chunkCount=1/0,a.chunkNumber=-1),a}static handleMultiSegments(e){return e.map(t=>t.chunk.getString()).join("")}normalizeInput(e){return typeof e=="string"?e:Ge.from(e).getString()}parse(e=this.chunk){if(!this.localOptions.parse)return e;e=function(s){let o={},r={};for(let l of Vf)o[l]=[],r[l]=0;return s.replace(Q3,(l,u,p)=>{if(u==="<"){let c=++r[p];return o[p].push(c),`${l}#${c}`}return`${l}#${o[p].pop()}`})}(e);let t=sa.findAll(e,"rdf","Description");t.length===0&&t.push(new sa("rdf","Description",void 0,e));let a,n={};for(let s of t)for(let o of s.properties)a=Y3(o.ns,n),$f(o,a);return function(s){let o;for(let r in s)o=s[r]=Ks(s[r]),o===void 0&&delete s[r];return Ks(s)}(n)}assignToOutput(e,t){if(this.localOptions.parse)for(let[a,n]of Object.entries(t))switch(a){case"tiff":this.assignObjectToOutput(e,"ifd0",n);break;case"exif":this.assignObjectToOutput(e,"exif",n);break;case"xmlns":break;default:this.assignObjectToOutput(e,a,n)}else e.xmp=t}}G(or,"type","xmp"),G(or,"multiSegment",!0),Ae.set("xmp",or);class Ys{static findAll(e){return Hf(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(Ys.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[3].slice(1,-1);return n=qf(n),new Ys(t,a,n)}constructor(e,t,a){this.ns=e,this.name=t,this.value=a}serialize(){return this.value}}class sa{static findAll(e,t,a){if(t!==void 0||a!==void 0){t=t||"[\\w\\d-]+",a=a||"[\\w\\d-]+";var n=new RegExp(`<(${t}):(${a})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else n=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return Hf(e,n).map(sa.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[4],s=e[8];return new sa(t,a,n,s)}constructor(e,t,a,n){this.ns=e,this.name=t,this.attrString=a,this.innerXml=n,this.attrs=Ys.findAll(a),this.children=sa.findAll(n),this.value=this.children.length===0?qf(n):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:e,name:t}=this;return e==="rdf"&&(t==="Seq"||t==="Bag"||t==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return X3(this.children.map(K3));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let e={};for(let t of this.properties)$f(t,e);return this.value!==void 0&&(e.value=this.value),Ks(e)}}function $f(i,e){let t=i.serialize();t!==void 0&&(e[i.name]=t)}var K3=i=>i.serialize(),X3=i=>i.length===1?i[0]:i,Y3=(i,e)=>e[i]?e[i]:e[i]={};function Hf(i,e){let t,a=[];if(!i)return a;for(;(t=e.exec(i))!==null;)a.push(t);return a}function qf(i){if(function(a){return a==null||a==="null"||a==="undefined"||a===""||a.trim()===""}(i))return;let e=Number(i);if(!Number.isNaN(e))return e;let t=i.toLowerCase();return t==="true"||t!=="false"&&i.trim()}const Vf=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Q3=new RegExp(`(<|\\/)(${Vf.join("|")})`,"g");let Ap=Gs("fs",i=>i.promises);ga.set("fs",class extends co{async readWhole(){this.chunked=!1,this.fs=await Ap;let i=await this.fs.readFile(this.input);this._swapBuffer(i)}async readChunked(){this.chunked=!0,this.fs=await Ap,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(i,e){this.fh===void 0&&await this.open(),i+e>this.size&&(e=this.size-i);var t=this.subarray(i,e,!0);return await this.fh.read(t.dataView,0,e,i),t}async close(){if(this.fh){let i=this.fh;this.fh=void 0,await i.close()}}});ga.set("base64",class extends co{constructor(...i){super(...i),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(i,e){let t,a,n=this.input;i===void 0?(i=0,t=0,a=0):(t=4*Math.floor(i/3),a=i-t/4*3),e===void 0&&(e=this.size);let s=i+e,o=t+4*Math.ceil(s/3);n=n.slice(t,o);let r=Math.min(e,this.size-i);if(oc){let l=sc.from(n,"base64").slice(a,a+r);return this.set(l,i,!0)}{let l=this.subarray(i,r,!0),u=atob(n),p=l.toUint8();for(let c=0;c<r;c++)p[c]=u.charCodeAt(a+c);return l}}});class Rp extends lo{static canHandle(e,t){return t===18761||t===19789}extendOptions(e){let{ifd0:t,xmp:a,iptc:n,icc:s}=e;a.enabled&&t.deps.add(700),n.enabled&&t.deps.add(33723),s.enabled&&t.deps.add(34675),t.finalizeFilters()}async parse(){let{tiff:e,xmp:t,iptc:a,icc:n}=this.options;if(e.enabled||t.enabled||a.enabled||n.enabled){let s=Math.max(pl(this.options),this.options.chunkSize);await this.file.ensureChunk(0,s),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.tiff[e];this.injectSegment(e,t)}}}G(Rp,"type","tiff"),ca.set("tiff",Rp);let J3=Gs("zlib");const Z3=["ihdr","iccp","text","itxt","exif"];class Up extends lo{constructor(...e){super(...e),G(this,"catchError",t=>this.errors.push(t)),G(this,"metaChunks",[]),G(this,"unknownChunks",[])}static canHandle(e,t){return t===35152&&e.getUint32(0)===2303741511&&e.getUint32(4)===218765834}async parse(){let{file:e}=this;await this.findPngChunksInRange(8,e.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(e,t){let{file:a}=this;for(;e<t;){let n=a.getUint32(e),s=a.getUint32(e+4),o=a.getString(e+4,4).toLowerCase(),r=n+4+4+4,l={type:o,offset:e,length:r,start:e+4+4,size:n,marker:s};Z3.includes(o)?this.metaChunks.push(l):this.unknownChunks.push(l),e+=r}}parseTextChunks(){let e=this.metaChunks.filter(t=>t.type==="text");for(let t of e){let[a,n]=this.file.getString(t.start,t.size).split("\0");this.injectKeyValToIhdr(a,n)}}injectKeyValToIhdr(e,t){let a=this.parsers.ihdr;a&&a.raw.set(e,t)}findIhdr(){let e=this.metaChunks.find(t=>t.type==="ihdr");e&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",e.chunk)}async findExif(){let e=this.metaChunks.find(t=>t.type==="exif");e&&this.injectSegment("tiff",e.chunk)}async findXmp(){let e=this.metaChunks.filter(t=>t.type==="itxt");for(let t of e)t.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",t.chunk)}async findIcc(){let e=this.metaChunks.find(r=>r.type==="iccp");if(!e)return;let{chunk:t}=e,a=t.getUint8Array(0,81),n=0;for(;n<80&&a[n]!==0;)n++;let s=n+2,o=t.getString(0,n);if(this.injectKeyValToIhdr("ProfileName",o),Ws){let r=await J3,l=t.getUint8Array(s);l=r.inflateSync(l),this.injectSegment("icc",l)}}}G(Up,"type","png"),ca.set("png",Up),Ee(Ke,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),bl(Ke,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let Mp=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];bl(Ke,"ifd0",Mp),bl(Ke,"exif",Mp),Ee(Ui,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class rr extends wt{static canHandle(e,t){return e.getUint8(t+1)===224&&e.getUint32(t+4)===1246120262&&e.getUint8(t+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}G(rr,"type","jfif"),G(rr,"headerLength",9),Ae.set("jfif",rr),Ee(Ke,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class Lp extends wt{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}G(Lp,"type","ihdr"),Ae.set("ihdr",Lp),Ee(Ke,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),Ee(Ui,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class As extends wt{static canHandle(e,t){return e.getUint8(t+1)===226&&e.getUint32(t+4)===1229144927}static findPosition(e,t){let a=super.findPosition(e,t);return a.chunkNumber=e.getUint8(t+16),a.chunkCount=e.getUint8(t+17),a.multiSegment=a.chunkCount>1,a}static handleMultiSegments(e){return function(t){let a=function(n){let s=n[0].constructor,o=0;for(let u of n)o+=u.length;let r=new s(o),l=0;for(let u of n)r.set(u,l),l+=u.length;return r}(t.map(n=>n.chunk.toUint8()));return new Ge(a)}(e)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&ye("ICC header is too short");for(let[t,a]of Object.entries(eS)){t=parseInt(t,10);let n=a(this.chunk,t);n!=="\0\0\0\0"&&e.set(t,n)}}parseTags(){let e,t,a,n,s,{raw:o}=this,r=this.chunk.getUint32(128),l=132,u=this.chunk.byteLength;for(;r--;){if(e=this.chunk.getString(l,4),t=this.chunk.getUint32(l+4),a=this.chunk.getUint32(l+8),n=this.chunk.getString(t,4),t+a>u)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");s=this.parseTag(n,t,a),s!==void 0&&s!=="\0\0\0\0"&&o.set(e,s),l+=12}}parseTag(e,t,a){switch(e){case"desc":return this.parseDesc(t);case"mluc":return this.parseMluc(t);case"text":return this.parseText(t,a);case"sig ":return this.parseSig(t)}if(!(t+a>this.chunk.byteLength))return this.chunk.getUint8Array(t,a)}parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return Ei(this.chunk.getString(e+12,t))}parseText(e,t){return Ei(this.chunk.getString(e+8,t-8))}parseSig(e){return Ei(this.chunk.getString(e+8,4))}parseMluc(e){let{chunk:t}=this,a=t.getUint32(e+8),n=t.getUint32(e+12),s=e+16,o=[];for(let r=0;r<a;r++){let l=t.getString(s+0,2),u=t.getString(s+2,2),p=t.getUint32(s+4),c=t.getUint32(s+8)+e,h=Ei(t.getUnicodeString(c,p));o.push({lang:l,country:u,text:h}),s+=n}return a===1?o[0].text:o}translateValue(e,t){return typeof e=="string"?t[e]||t[e.toLowerCase()]||e:t[e]||e}}G(As,"type","icc"),G(As,"multiSegment",!0),G(As,"headerLength",18);const eS={4:Ht,8:function(i,e){return[i.getUint8(e),i.getUint8(e+1)>>4,i.getUint8(e+1)%16].map(t=>t.toString(10)).join(".")},12:Ht,16:Ht,20:Ht,24:function(i,e){const t=i.getUint16(e),a=i.getUint16(e+2)-1,n=i.getUint16(e+4),s=i.getUint16(e+6),o=i.getUint16(e+8),r=i.getUint16(e+10);return new Date(Date.UTC(t,a,n,s,o,r))},36:Ht,40:Ht,48:Ht,52:Ht,64:(i,e)=>i.getUint32(e),80:Ht};function Ht(i,e){return Ei(i.getString(e,4))}Ae.set("icc",As),Ee(Ke,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const hs={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},Bp={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};Ee(Ui,"icc",[[4,hs],[12,Bp],[40,Object.assign({},hs,Bp)],[48,hs],[80,hs],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class fs extends wt{static canHandle(e,t,a){return e.getUint8(t+1)===237&&e.getString(t+4,9)==="Photoshop"&&this.containsIptc8bim(e,t,a)!==void 0}static headerLength(e,t,a){let n,s=this.containsIptc8bim(e,t,a);if(s!==void 0)return n=e.getUint8(t+s+7),n%2!=0&&(n+=1),n===0&&(n=4),s+8+n}static containsIptc8bim(e,t,a){for(let n=0;n<a;n++)if(this.isIptcSegmentHead(e,t+n))return n}static isIptcSegmentHead(e,t){return e.getUint8(t)===56&&e.getUint32(t)===943868237&&e.getUint16(t+4)===1028}parse(){let{raw:e}=this,t=this.chunk.byteLength-1,a=!1;for(let n=0;n<t;n++)if(this.chunk.getUint8(n)===28&&this.chunk.getUint8(n+1)===2){a=!0;let s=this.chunk.getUint16(n+3),o=this.chunk.getUint8(n+2),r=this.chunk.getLatin1String(n+5,s);e.set(o,this.pluralizeValue(e.get(o),r)),n+=4+s}else if(a)break;return this.translate(),this.output}pluralizeValue(e,t){return e!==void 0?e instanceof Array?(e.push(t),e):[e,t]:t}}G(fs,"type","iptc"),G(fs,"translateValues",!1),G(fs,"reviveValues",!1),Ae.set("iptc",fs),Ee(Ke,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),Ee(Ui,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const ms={zip:T3,gz:tr,tgz:tr,deflate:tr};class tS extends Fe{constructor(t,a){super(t,{...{},...a});_e(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=o3.createHash("md5").update(await r.text()).digest("hex"),u=aa(n),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});_e(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{webkitRelativePath:s,relativePath:o,name:r},hashFileName:l,size:u}=n,p=o||s||r||l;this.uppy.setFileMeta(a,{relativePath:p,name:p})}});_e(this,"preventXssAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:s,meta:o}=this.uppy.getFile(a),r=fc.sanitize(s);if(s!==r){const u=aa(n),p=r.endsWith(`.${u}`)?r:`${r}.${u}`;this.uppy.setFileState(a,{name:p,meta:{...o,name:p,filename:p}})}if(await Ff(n)){const{data:u,name:p,type:c}=this.uppy.getFile(a),h=await u.text(),f=fc.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ALLOWED_TAGS:["svg","circle","ellipse","line","path","polygon","polyline","rect","g","text","use","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop"],ALLOWED_ATTR:["d","points","x","y","width","height","r","cx","cy","rx","ry","x1","y1","x2","y2","transform","fill","stroke","stroke-width","viewBox","xmlns","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","xlink:href","onclick","onload","onerror"]});if(h!==f){const g=new Blob([f],{type:c}),y=sl(g,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:y}),console.info("clean svg file xss attack",{name:p,originalFile:n.data.text(),cleanFile:f})}}}});_e(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&ms[n.extension]){const{data:s}=n,o=ms[n.extension](new Uint8Array(await s.arrayBuffer())),r=(u,p,c=0)=>Object.entries(u instanceof Uint8Array?{[p||n.name]:u}:u).reduce((h,[f,g])=>{if(!g||g.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:f,item:g}),h;const y=h+g.byteLength;if(c>=5||y>n.size*100)throw console.error("Zip bomb detected, please check your file",{depth:c,baseAcc:y,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const m=rt.extension(rt.lookup(f));if(ms[m]){const v=ms[m](g);return y+r(v,f,c+1)}return y},0);if(r(o)>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});_e(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var y,m,v;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((y=this.opts.cropperOptions)!=null&&y.aspectRatio)||!((m=s==null?void 0:s.type)!=null&&m.includes("image"))||(v=s.type)!=null&&v.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,p=l==null?void 0:l.naturalHeight,c=Number(u/p).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const g=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:g,details:g}),new Promise((C,x)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{C()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));_e(this,"checkImageOrientation",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if((s=n==null?void 0:n.type)!=null&&s.startsWith("image/"))try{if(!(await q3(n.data).catch(()=>({deg:0}))).deg)return;const r=n.data.size*.98,l=await new Promise((v,C)=>{const x=new Image;let F=URL.createObjectURL(n.data);x.src=F,x.onload=()=>{URL.revokeObjectURL(F),F=null,v(x)},x.onerror=k=>{F&&(URL.revokeObjectURL(F),F=null),C(new Error(`Image load failed: ${k.message}`))}}),u=l.width/l.height;let p=Math.sqrt(r*u),c=p/u;const h=8096;if(p>h||c>h){const v=h/Math.max(p,c);p*=v,c*=v}const f=document.createElement("canvas");f.width=p,f.height=c;const g=f.getContext("2d",{willReadFrequently:!0,alpha:n.type==="image/png"});g.imageSmoothingEnabled=!0,g.imageSmoothingQuality="high",g.translate(f.width/2,f.height/2),g.drawImage(l,-p/2,-c/2,p,c);const y=1,m=await new Promise(v=>{f.toBlob(v,n.type,y)});this.uppy.setFileState(a,{data:m,size:m.size})}catch(o){console.error("Image rotation processing failed:",o);return}});_e(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.checkImageOrientation(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});_e(this,"tryDownloadRemoteFile",async t=>{var F,k;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:f=0}=t,g=!p&&r,y=`uploader:${u}:downloaded`,m=aa(t),v=(F=n==null?void 0:n.split("?"))==null?void 0:F[0],x=(()=>{const P=["jpg","jpeg"];return P.includes(m)&&P.some(_=>v==null?void 0:v.endsWith(_))?!0:v==null?void 0:v.endsWith(m)})()?v:`${v}${m?`.${m}`:""}`;if(g){const P=yf(s||((k=c==null?void 0:c.body)==null?void 0:k.url));if(f>=3)throw this.uppy.setFileState(u,{error:this.i18n("downloadRemoteFileFailure"),meta:{...h,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await tc.get(P,{responseType:"blob"}).then(_=>_==null?void 0:_.data).then(async _=>{const D=sl(_,x);this.uppy.setFileState(u,{name:x,extension:m,type:a,data:D,preview:s||nl(D),source:o,size:D.size,isDownloading:!1,isRemote:!1,meta:{...h,name:x,filename:x}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async _=>{console.error("Axios download remote file error: ",_),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(_=>{this.uppy.once(y,async()=>{_()})}))()});_e(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:nl(s)})},o.indexOf("gif")>-1?1e3:0)}});_e(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return ve(e3,{})}}class iS extends Fe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ve("div",{id:"ai-image",className:"ai-image",children:ve("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const aS="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9";function nS(i){return Dn("MuiTypography",i)}ua("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const sS=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],oS=i=>{const{align:e,gutterBottom:t,noWrap:a,paragraph:n,variant:s,classes:o}=i,r={root:["root",s,i.align!=="inherit"&&`align${lt(e)}`,t&&"gutterBottom",a&&"noWrap",n&&"paragraph"]};return In(r,nS,o)},rS=Ri("span",{name:"MuiTypography",slot:"Root",overridesResolver:(i,e)=>{const{ownerState:t}=i;return[e.root,t.variant&&e[t.variant],t.align!=="inherit"&&e[`align${lt(t.align)}`],t.noWrap&&e.noWrap,t.gutterBottom&&e.gutterBottom,t.paragraph&&e.paragraph]}})(({theme:i,ownerState:e})=>Y({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&i.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),Np={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},lS={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cS=i=>lS[i]||i,uS=M.forwardRef(function(e,t){const a=pa({props:e,name:"MuiTypography"}),n=cS(a.color),s=_m(Y({},a,{color:n})),{align:o="inherit",className:r,component:l,gutterBottom:u=!1,noWrap:p=!1,paragraph:c=!1,variant:h="body1",variantMapping:f=Np}=s,g=St(s,sS),y=Y({},s,{align:o,color:n,className:r,component:l,gutterBottom:u,noWrap:p,paragraph:c,variant:h,variantMapping:f}),m=l||(c?"p":f[h]||Np[h])||"span",v=oS(y);return Z.jsx(rS,Y({as:m,ref:t,ownerState:y,className:qe(v.root,r)},g))}),pS=M.lazy(()=>Vp(()=>import("./index-C3Z6Hby2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),zp="uploader-container",gs="uploader-dashboard",oa=localStorage.getItem("uppy_debug"),dS=()=>al.get("x-csrf-token")?{"x-csrf-token":al.get("x-csrf-token")}:{},hS=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=ic(e),l=dS(),u=async h=>(await ma.post("/api/image/generations",h)).data,p={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:jh,options:{quality:1,...s},alwayUse:!0},(oa||na()&&t.Uploaded&&!ol())&&{id:"Uploaded",plugin:i3,options:{params:a==null?void 0:a.params}},(oa||na()&&t.Resources&&!ol())&&{id:"Resources",plugin:n3,options:{params:n==null?void 0:n.params}},na()&&xf()&&t.AIImage&&{id:"AIImage",plugin:iS,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function f(){setTimeout(()=>{var y,m;const g=document.getElementById("ai-image");g?om(g).render(Z.jsx(pS,{theme:o,api:u,restrictions:p,i18n:(m=(y=h.current)==null?void 0:y.getUploader())==null?void 0:m.i18n,onSelect:v=>{const C=h.current.getUploader();C==null||C.emit("ai-image:selected",v),v.forEach(({src:x,alt:F},k)=>{const P=O=>(O==null?void 0:O.length)>16?`${O==null?void 0:O.slice(0,8)}...${O==null?void 0:O.slice(-4)}`:O,_=`${P(F)||P(x)}.png`,D={name:_,type:"image/png",data:bf(x,_),source:"AIImage",isRemote:!1};C==null||C.addFile(D)})}})):f()},100)}f()}},{id:"Url",plugin:Un,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:wd,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:jd,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:tS,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Bl,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function pc(i){const{id:e,plugins:t,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c,onChange:h,initialFiles:f}=i,g=Xp(p,"id"),{uploaderUrl:y}=ic(r);let m=new Pl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(oa||""),locale:Es[a],onBeforeFileAdded:(x,F)=>{if(Object.hasOwn(F,x.id))return!1;const k=!!rt.extension(x.type),P=rt.lookup(x.name)||"";if(!k&&P&&P!==x.type){const _=aa(x);_&&(x.extension=_),x.type=P}return x},...o,restrictions:c}).use(mf,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:y,async onBeforeRequest(x,F){var q,H;const{hashFileName:k,id:P,meta:_}=F,D=((q=m.getFile(P))==null?void 0:q.mockResponse)||null;x.getMethod()==="PATCH"&&D&&(x.send=()=>D);const O=aa(F);x.setHeader("x-uploader-file-name",`${k}`),x.setHeader("x-uploader-file-id",`${P}`),x.setHeader("x-uploader-file-ext",`${O}`),x.setHeader("x-uploader-base-url",new URL(x.getURL()).pathname),x.setHeader("x-uploader-endpoint-url",y),x.setHeader("x-uploader-metadata",JSON.stringify(_,(R,N)=>typeof N=="string"?encodeURIComponent(N):N));const j=al.get("x-csrf-token");j&&x.setHeader("x-csrf-token",j);const B=(window==null?void 0:window.uploaderComponentId)||((H=window==null?void 0:window.blocklet)==null?void 0:H.componentId);B&&x.setHeader("x-component-did",(B||"").split("/").pop())},onAfterResponse:async(x,F)=>{const k={},P=x.getUnderlyingObject();try{P.response&&(k.data=JSON.parse(P.response))}catch{k.data={}}k.method=x.getMethod().toUpperCase(),k.url=x.getURL(),k.status=P.status,k.headers={...x._headers};const _=P.getAllResponseHeaders();_&&_.split(`\r
124
+ Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(a+r,n),this.file.getUintBytes(a+r+n,s)];a+=g*p}}}class jf extends zf{}G(jf,"type","heic");class Tp extends zf{}G(Tp,"type","avif"),ca.set("heic",jf),ca.set("avif",Tp),Ee(Ke,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),Ee(Ke,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),Ee(Ke,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),Ee(Ui,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let un=Ee(Ui,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const Ep={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};un.set(37392,Ep),un.set(41488,Ep);const nr={0:"Normal",1:"Low",2:"High"};function Dp(i){return typeof i=="object"&&i.length!==void 0?i[0]:i}function Ip(i){let e=Array.from(i).slice(1);return e[1]>15&&(e=e.map(t=>String.fromCharCode(t))),e[2]!=="0"&&e[2]!==0||e.pop(),e.join(".")}function sr(i){if(typeof i=="string"){var[e,t,a,n,s,o]=i.trim().split(/[-: ]/g).map(Number),r=new Date(e,t-1,a);return Number.isNaN(n)||Number.isNaN(s)||Number.isNaN(o)||(r.setHours(n),r.setMinutes(s),r.setSeconds(o)),Number.isNaN(+r)?i:r}}function qa(i){if(typeof i=="string")return i;let e=[];if(i[1]===0&&i[i.length-1]===0)for(let t=0;t<i.length;t+=2)e.push(Op(i[t+1],i[t]));else for(let t=0;t<i.length;t+=2)e.push(Op(i[t],i[t+1]));return Ei(String.fromCodePoint(...e))}function Op(i,e){return i<<8|e}un.set(41992,nr),un.set(41993,nr),un.set(41994,nr),Ee(Os,["ifd0","ifd1"],[[50827,function(i){return typeof i!="string"?Mf(i):i}],[306,sr],[40091,qa],[40092,qa],[40093,qa],[40094,qa],[40095,qa]]),Ee(Os,"exif",[[40960,Ip],[36864,Ip],[36867,sr],[36868,sr],[40962,Dp],[40963,Dp]]),Ee(Os,"gps",[[0,i=>Array.from(i).join(".")],[7,i=>Array.from(i).join(":")]]);class or extends wt{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1752462448&&e.getString(t+4,20)==="http://ns.adobe.com/"}static headerLength(e,t){return e.getString(t+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(e,t){let a=super.findPosition(e,t);return a.multiSegment=a.extended=a.headerLength===79,a.multiSegment?(a.chunkCount=e.getUint8(t+72),a.chunkNumber=e.getUint8(t+76),e.getUint8(t+77)!==0&&a.chunkNumber++):(a.chunkCount=1/0,a.chunkNumber=-1),a}static handleMultiSegments(e){return e.map(t=>t.chunk.getString()).join("")}normalizeInput(e){return typeof e=="string"?e:Ge.from(e).getString()}parse(e=this.chunk){if(!this.localOptions.parse)return e;e=function(s){let o={},r={};for(let l of Vf)o[l]=[],r[l]=0;return s.replace(Q3,(l,u,p)=>{if(u==="<"){let c=++r[p];return o[p].push(c),`${l}#${c}`}return`${l}#${o[p].pop()}`})}(e);let t=sa.findAll(e,"rdf","Description");t.length===0&&t.push(new sa("rdf","Description",void 0,e));let a,n={};for(let s of t)for(let o of s.properties)a=Y3(o.ns,n),$f(o,a);return function(s){let o;for(let r in s)o=s[r]=Ks(s[r]),o===void 0&&delete s[r];return Ks(s)}(n)}assignToOutput(e,t){if(this.localOptions.parse)for(let[a,n]of Object.entries(t))switch(a){case"tiff":this.assignObjectToOutput(e,"ifd0",n);break;case"exif":this.assignObjectToOutput(e,"exif",n);break;case"xmlns":break;default:this.assignObjectToOutput(e,a,n)}else e.xmp=t}}G(or,"type","xmp"),G(or,"multiSegment",!0),Ae.set("xmp",or);class Ys{static findAll(e){return Hf(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(Ys.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[3].slice(1,-1);return n=qf(n),new Ys(t,a,n)}constructor(e,t,a){this.ns=e,this.name=t,this.value=a}serialize(){return this.value}}class sa{static findAll(e,t,a){if(t!==void 0||a!==void 0){t=t||"[\\w\\d-]+",a=a||"[\\w\\d-]+";var n=new RegExp(`<(${t}):(${a})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else n=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return Hf(e,n).map(sa.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[4],s=e[8];return new sa(t,a,n,s)}constructor(e,t,a,n){this.ns=e,this.name=t,this.attrString=a,this.innerXml=n,this.attrs=Ys.findAll(a),this.children=sa.findAll(n),this.value=this.children.length===0?qf(n):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:e,name:t}=this;return e==="rdf"&&(t==="Seq"||t==="Bag"||t==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return X3(this.children.map(K3));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let e={};for(let t of this.properties)$f(t,e);return this.value!==void 0&&(e.value=this.value),Ks(e)}}function $f(i,e){let t=i.serialize();t!==void 0&&(e[i.name]=t)}var K3=i=>i.serialize(),X3=i=>i.length===1?i[0]:i,Y3=(i,e)=>e[i]?e[i]:e[i]={};function Hf(i,e){let t,a=[];if(!i)return a;for(;(t=e.exec(i))!==null;)a.push(t);return a}function qf(i){if(function(a){return a==null||a==="null"||a==="undefined"||a===""||a.trim()===""}(i))return;let e=Number(i);if(!Number.isNaN(e))return e;let t=i.toLowerCase();return t==="true"||t!=="false"&&i.trim()}const Vf=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Q3=new RegExp(`(<|\\/)(${Vf.join("|")})`,"g");let Ap=Gs("fs",i=>i.promises);ga.set("fs",class extends co{async readWhole(){this.chunked=!1,this.fs=await Ap;let i=await this.fs.readFile(this.input);this._swapBuffer(i)}async readChunked(){this.chunked=!0,this.fs=await Ap,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(i,e){this.fh===void 0&&await this.open(),i+e>this.size&&(e=this.size-i);var t=this.subarray(i,e,!0);return await this.fh.read(t.dataView,0,e,i),t}async close(){if(this.fh){let i=this.fh;this.fh=void 0,await i.close()}}});ga.set("base64",class extends co{constructor(...i){super(...i),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(i,e){let t,a,n=this.input;i===void 0?(i=0,t=0,a=0):(t=4*Math.floor(i/3),a=i-t/4*3),e===void 0&&(e=this.size);let s=i+e,o=t+4*Math.ceil(s/3);n=n.slice(t,o);let r=Math.min(e,this.size-i);if(oc){let l=sc.from(n,"base64").slice(a,a+r);return this.set(l,i,!0)}{let l=this.subarray(i,r,!0),u=atob(n),p=l.toUint8();for(let c=0;c<r;c++)p[c]=u.charCodeAt(a+c);return l}}});class Rp extends lo{static canHandle(e,t){return t===18761||t===19789}extendOptions(e){let{ifd0:t,xmp:a,iptc:n,icc:s}=e;a.enabled&&t.deps.add(700),n.enabled&&t.deps.add(33723),s.enabled&&t.deps.add(34675),t.finalizeFilters()}async parse(){let{tiff:e,xmp:t,iptc:a,icc:n}=this.options;if(e.enabled||t.enabled||a.enabled||n.enabled){let s=Math.max(pl(this.options),this.options.chunkSize);await this.file.ensureChunk(0,s),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.tiff[e];this.injectSegment(e,t)}}}G(Rp,"type","tiff"),ca.set("tiff",Rp);let J3=Gs("zlib");const Z3=["ihdr","iccp","text","itxt","exif"];class Up extends lo{constructor(...e){super(...e),G(this,"catchError",t=>this.errors.push(t)),G(this,"metaChunks",[]),G(this,"unknownChunks",[])}static canHandle(e,t){return t===35152&&e.getUint32(0)===2303741511&&e.getUint32(4)===218765834}async parse(){let{file:e}=this;await this.findPngChunksInRange(8,e.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(e,t){let{file:a}=this;for(;e<t;){let n=a.getUint32(e),s=a.getUint32(e+4),o=a.getString(e+4,4).toLowerCase(),r=n+4+4+4,l={type:o,offset:e,length:r,start:e+4+4,size:n,marker:s};Z3.includes(o)?this.metaChunks.push(l):this.unknownChunks.push(l),e+=r}}parseTextChunks(){let e=this.metaChunks.filter(t=>t.type==="text");for(let t of e){let[a,n]=this.file.getString(t.start,t.size).split("\0");this.injectKeyValToIhdr(a,n)}}injectKeyValToIhdr(e,t){let a=this.parsers.ihdr;a&&a.raw.set(e,t)}findIhdr(){let e=this.metaChunks.find(t=>t.type==="ihdr");e&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",e.chunk)}async findExif(){let e=this.metaChunks.find(t=>t.type==="exif");e&&this.injectSegment("tiff",e.chunk)}async findXmp(){let e=this.metaChunks.filter(t=>t.type==="itxt");for(let t of e)t.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",t.chunk)}async findIcc(){let e=this.metaChunks.find(r=>r.type==="iccp");if(!e)return;let{chunk:t}=e,a=t.getUint8Array(0,81),n=0;for(;n<80&&a[n]!==0;)n++;let s=n+2,o=t.getString(0,n);if(this.injectKeyValToIhdr("ProfileName",o),Ws){let r=await J3,l=t.getUint8Array(s);l=r.inflateSync(l),this.injectSegment("icc",l)}}}G(Up,"type","png"),ca.set("png",Up),Ee(Ke,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),bl(Ke,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let Mp=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];bl(Ke,"ifd0",Mp),bl(Ke,"exif",Mp),Ee(Ui,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class rr extends wt{static canHandle(e,t){return e.getUint8(t+1)===224&&e.getUint32(t+4)===1246120262&&e.getUint8(t+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}G(rr,"type","jfif"),G(rr,"headerLength",9),Ae.set("jfif",rr),Ee(Ke,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class Lp extends wt{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}G(Lp,"type","ihdr"),Ae.set("ihdr",Lp),Ee(Ke,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),Ee(Ui,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class As extends wt{static canHandle(e,t){return e.getUint8(t+1)===226&&e.getUint32(t+4)===1229144927}static findPosition(e,t){let a=super.findPosition(e,t);return a.chunkNumber=e.getUint8(t+16),a.chunkCount=e.getUint8(t+17),a.multiSegment=a.chunkCount>1,a}static handleMultiSegments(e){return function(t){let a=function(n){let s=n[0].constructor,o=0;for(let u of n)o+=u.length;let r=new s(o),l=0;for(let u of n)r.set(u,l),l+=u.length;return r}(t.map(n=>n.chunk.toUint8()));return new Ge(a)}(e)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&ye("ICC header is too short");for(let[t,a]of Object.entries(eS)){t=parseInt(t,10);let n=a(this.chunk,t);n!=="\0\0\0\0"&&e.set(t,n)}}parseTags(){let e,t,a,n,s,{raw:o}=this,r=this.chunk.getUint32(128),l=132,u=this.chunk.byteLength;for(;r--;){if(e=this.chunk.getString(l,4),t=this.chunk.getUint32(l+4),a=this.chunk.getUint32(l+8),n=this.chunk.getString(t,4),t+a>u)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");s=this.parseTag(n,t,a),s!==void 0&&s!=="\0\0\0\0"&&o.set(e,s),l+=12}}parseTag(e,t,a){switch(e){case"desc":return this.parseDesc(t);case"mluc":return this.parseMluc(t);case"text":return this.parseText(t,a);case"sig ":return this.parseSig(t)}if(!(t+a>this.chunk.byteLength))return this.chunk.getUint8Array(t,a)}parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return Ei(this.chunk.getString(e+12,t))}parseText(e,t){return Ei(this.chunk.getString(e+8,t-8))}parseSig(e){return Ei(this.chunk.getString(e+8,4))}parseMluc(e){let{chunk:t}=this,a=t.getUint32(e+8),n=t.getUint32(e+12),s=e+16,o=[];for(let r=0;r<a;r++){let l=t.getString(s+0,2),u=t.getString(s+2,2),p=t.getUint32(s+4),c=t.getUint32(s+8)+e,h=Ei(t.getUnicodeString(c,p));o.push({lang:l,country:u,text:h}),s+=n}return a===1?o[0].text:o}translateValue(e,t){return typeof e=="string"?t[e]||t[e.toLowerCase()]||e:t[e]||e}}G(As,"type","icc"),G(As,"multiSegment",!0),G(As,"headerLength",18);const eS={4:Ht,8:function(i,e){return[i.getUint8(e),i.getUint8(e+1)>>4,i.getUint8(e+1)%16].map(t=>t.toString(10)).join(".")},12:Ht,16:Ht,20:Ht,24:function(i,e){const t=i.getUint16(e),a=i.getUint16(e+2)-1,n=i.getUint16(e+4),s=i.getUint16(e+6),o=i.getUint16(e+8),r=i.getUint16(e+10);return new Date(Date.UTC(t,a,n,s,o,r))},36:Ht,40:Ht,48:Ht,52:Ht,64:(i,e)=>i.getUint32(e),80:Ht};function Ht(i,e){return Ei(i.getString(e,4))}Ae.set("icc",As),Ee(Ke,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const hs={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},Bp={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};Ee(Ui,"icc",[[4,hs],[12,Bp],[40,Object.assign({},hs,Bp)],[48,hs],[80,hs],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class fs extends wt{static canHandle(e,t,a){return e.getUint8(t+1)===237&&e.getString(t+4,9)==="Photoshop"&&this.containsIptc8bim(e,t,a)!==void 0}static headerLength(e,t,a){let n,s=this.containsIptc8bim(e,t,a);if(s!==void 0)return n=e.getUint8(t+s+7),n%2!=0&&(n+=1),n===0&&(n=4),s+8+n}static containsIptc8bim(e,t,a){for(let n=0;n<a;n++)if(this.isIptcSegmentHead(e,t+n))return n}static isIptcSegmentHead(e,t){return e.getUint8(t)===56&&e.getUint32(t)===943868237&&e.getUint16(t+4)===1028}parse(){let{raw:e}=this,t=this.chunk.byteLength-1,a=!1;for(let n=0;n<t;n++)if(this.chunk.getUint8(n)===28&&this.chunk.getUint8(n+1)===2){a=!0;let s=this.chunk.getUint16(n+3),o=this.chunk.getUint8(n+2),r=this.chunk.getLatin1String(n+5,s);e.set(o,this.pluralizeValue(e.get(o),r)),n+=4+s}else if(a)break;return this.translate(),this.output}pluralizeValue(e,t){return e!==void 0?e instanceof Array?(e.push(t),e):[e,t]:t}}G(fs,"type","iptc"),G(fs,"translateValues",!1),G(fs,"reviveValues",!1),Ae.set("iptc",fs),Ee(Ke,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),Ee(Ui,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const ms={zip:T3,gz:tr,tgz:tr,deflate:tr};class tS extends Fe{constructor(t,a){super(t,{...{},...a});_e(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=o3.createHash("md5").update(await r.text()).digest("hex"),u=aa(n),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});_e(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{webkitRelativePath:s,relativePath:o,name:r},hashFileName:l,size:u}=n,p=o||s||r||l;this.uppy.setFileMeta(a,{relativePath:p,name:p})}});_e(this,"preventXssAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:s,meta:o}=this.uppy.getFile(a),r=fc.sanitize(s);if(s!==r){const u=aa(n),p=r.endsWith(`.${u}`)?r:`${r}.${u}`;this.uppy.setFileState(a,{name:p,meta:{...o,name:p,filename:p}})}if(await Ff(n)){const{data:u,name:p,type:c}=this.uppy.getFile(a),h=await u.text(),f=fc.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ALLOWED_TAGS:["svg","circle","ellipse","line","path","polygon","polyline","rect","g","text","use","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop"],ALLOWED_ATTR:["d","points","x","y","width","height","r","cx","cy","rx","ry","x1","y1","x2","y2","transform","fill","stroke","stroke-width","viewBox","xmlns","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","xlink:href","onclick","onload","onerror"]});if(h!==f){const g=new Blob([f],{type:c}),y=sl(g,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:y}),console.info("clean svg file xss attack",{name:p,originalFile:n.data.text(),cleanFile:f})}}}});_e(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&ms[n.extension]){const{data:s}=n,o=ms[n.extension](new Uint8Array(await s.arrayBuffer())),r=(u,p,c=0)=>Object.entries(u instanceof Uint8Array?{[p||n.name]:u}:u).reduce((h,[f,g])=>{if(!g||g.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:f,item:g}),h;const y=h+g.byteLength;if(c>=5||y>n.size*100)throw console.error("Zip bomb detected, please check your file",{depth:c,baseAcc:y,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const m=rt.extension(rt.lookup(f));if(ms[m]){const v=ms[m](g);return y+r(v,f,c+1)}return y},0);if(r(o)>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});_e(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var y,m,v;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((y=this.opts.cropperOptions)!=null&&y.aspectRatio)||!((m=s==null?void 0:s.type)!=null&&m.includes("image"))||(v=s.type)!=null&&v.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,p=l==null?void 0:l.naturalHeight,c=Number(u/p).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const g=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:g,details:g}),new Promise((C,x)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{C()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));_e(this,"checkImageOrientation",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if((s=n==null?void 0:n.type)!=null&&s.startsWith("image/"))try{if(!(await q3(n.data).catch(()=>({deg:0}))).deg)return;const r=n.data.size*.98,l=await new Promise((v,C)=>{const x=new Image;let F=URL.createObjectURL(n.data);x.src=F,x.onload=()=>{URL.revokeObjectURL(F),F=null,v(x)},x.onerror=k=>{F&&(URL.revokeObjectURL(F),F=null),C(new Error(`Image load failed: ${k.message}`))}}),u=l.width/l.height;let p=Math.sqrt(r*u),c=p/u;const h=8096;if(p>h||c>h){const v=h/Math.max(p,c);p*=v,c*=v}const f=document.createElement("canvas");f.width=p,f.height=c;const g=f.getContext("2d",{willReadFrequently:!0,alpha:n.type==="image/png"});g.imageSmoothingEnabled=!0,g.imageSmoothingQuality="high",g.translate(f.width/2,f.height/2),g.drawImage(l,-p/2,-c/2,p,c);const y=1,m=await new Promise(v=>{f.toBlob(v,n.type,y)});this.uppy.setFileState(a,{data:m,size:m.size})}catch(o){console.error("Image rotation processing failed:",o);return}});_e(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.checkImageOrientation(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});_e(this,"tryDownloadRemoteFile",async t=>{var F,k;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:f=0}=t,g=!p&&r,y=`uploader:${u}:downloaded`,m=aa(t),v=(F=n==null?void 0:n.split("?"))==null?void 0:F[0],x=(()=>{const P=["jpg","jpeg"];return P.includes(m)&&P.some(_=>v==null?void 0:v.endsWith(_))?!0:v==null?void 0:v.endsWith(m)})()?v:`${v}${m?`.${m}`:""}`;if(g){const P=yf(s||((k=c==null?void 0:c.body)==null?void 0:k.url));if(f>=3)throw this.uppy.setFileState(u,{error:this.i18n("downloadRemoteFileFailure"),meta:{...h,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await tc.get(P,{responseType:"blob"}).then(_=>_==null?void 0:_.data).then(async _=>{const D=sl(_,x);this.uppy.setFileState(u,{name:x,extension:m,type:a,data:D,preview:s||nl(D),source:o,size:D.size,isDownloading:!1,isRemote:!1,meta:{...h,name:x,filename:x}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async _=>{console.error("Axios download remote file error: ",_),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(_=>{this.uppy.once(y,async()=>{_()})}))()});_e(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:nl(s)})},o.indexOf("gif")>-1?1e3:0)}});_e(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return ve(e3,{})}}class iS extends Fe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ve("div",{id:"ai-image",className:"ai-image",children:ve("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const aS="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9";function nS(i){return Dn("MuiTypography",i)}ua("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const sS=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],oS=i=>{const{align:e,gutterBottom:t,noWrap:a,paragraph:n,variant:s,classes:o}=i,r={root:["root",s,i.align!=="inherit"&&`align${lt(e)}`,t&&"gutterBottom",a&&"noWrap",n&&"paragraph"]};return In(r,nS,o)},rS=Ri("span",{name:"MuiTypography",slot:"Root",overridesResolver:(i,e)=>{const{ownerState:t}=i;return[e.root,t.variant&&e[t.variant],t.align!=="inherit"&&e[`align${lt(t.align)}`],t.noWrap&&e.noWrap,t.gutterBottom&&e.gutterBottom,t.paragraph&&e.paragraph]}})(({theme:i,ownerState:e})=>Y({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&i.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),Np={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},lS={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cS=i=>lS[i]||i,uS=M.forwardRef(function(e,t){const a=pa({props:e,name:"MuiTypography"}),n=cS(a.color),s=_m(Y({},a,{color:n})),{align:o="inherit",className:r,component:l,gutterBottom:u=!1,noWrap:p=!1,paragraph:c=!1,variant:h="body1",variantMapping:f=Np}=s,g=St(s,sS),y=Y({},s,{align:o,color:n,className:r,component:l,gutterBottom:u,noWrap:p,paragraph:c,variant:h,variantMapping:f}),m=l||(c?"p":f[h]||Np[h])||"span",v=oS(y);return Z.jsx(rS,Y({as:m,ref:t,ownerState:y,className:qe(v.root,r)},g))}),pS=M.lazy(()=>Vp(()=>import("./index-BJA4YPaC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),zp="uploader-container",gs="uploader-dashboard",oa=localStorage.getItem("uppy_debug"),dS=()=>al.get("x-csrf-token")?{"x-csrf-token":al.get("x-csrf-token")}:{},hS=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=ic(e),l=dS(),u=async h=>(await ma.post("/api/image/generations",h)).data,p={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:jh,options:{quality:1,...s},alwayUse:!0},(oa||na()&&t.Uploaded&&!ol())&&{id:"Uploaded",plugin:i3,options:{params:a==null?void 0:a.params}},(oa||na()&&t.Resources&&!ol())&&{id:"Resources",plugin:n3,options:{params:n==null?void 0:n.params}},na()&&xf()&&t.AIImage&&{id:"AIImage",plugin:iS,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function f(){setTimeout(()=>{var y,m;const g=document.getElementById("ai-image");g?om(g).render(Z.jsx(pS,{theme:o,api:u,restrictions:p,i18n:(m=(y=h.current)==null?void 0:y.getUploader())==null?void 0:m.i18n,onSelect:v=>{const C=h.current.getUploader();C==null||C.emit("ai-image:selected",v),v.forEach(({src:x,alt:F},k)=>{const P=O=>(O==null?void 0:O.length)>16?`${O==null?void 0:O.slice(0,8)}...${O==null?void 0:O.slice(-4)}`:O,_=`${P(F)||P(x)}.png`,D={name:_,type:"image/png",data:bf(x,_),source:"AIImage",isRemote:!1};C==null||C.addFile(D)})}})):f()},100)}f()}},{id:"Url",plugin:Un,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:wd,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:jd,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:tS,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Bl,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function pc(i){const{id:e,plugins:t,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c,onChange:h,initialFiles:f}=i,g=Xp(p,"id"),{uploaderUrl:y}=ic(r);let m=new Pl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(oa||""),locale:Es[a],onBeforeFileAdded:(x,F)=>{if(Object.hasOwn(F,x.id))return!1;const k=!!rt.extension(x.type),P=rt.lookup(x.name)||"";if(!k&&P&&P!==x.type){const _=aa(x);_&&(x.extension=_),x.type=P}return x},...o,restrictions:c}).use(mf,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:y,async onBeforeRequest(x,F){var q,H;const{hashFileName:k,id:P,meta:_}=F,D=((q=m.getFile(P))==null?void 0:q.mockResponse)||null;x.getMethod()==="PATCH"&&D&&(x.send=()=>D);const O=aa(F);x.setHeader("x-uploader-file-name",`${k}`),x.setHeader("x-uploader-file-id",`${P}`),x.setHeader("x-uploader-file-ext",`${O}`),x.setHeader("x-uploader-base-url",new URL(x.getURL()).pathname),x.setHeader("x-uploader-endpoint-url",y),x.setHeader("x-uploader-metadata",JSON.stringify(_,(R,N)=>typeof N=="string"?encodeURIComponent(N):N));const j=al.get("x-csrf-token");j&&x.setHeader("x-csrf-token",j);const B=(window==null?void 0:window.uploaderComponentId)||((H=window==null?void 0:window.blocklet)==null?void 0:H.componentId);B&&x.setHeader("x-component-did",(B||"").split("/").pop())},onAfterResponse:async(x,F)=>{const k={},P=x.getUnderlyingObject();try{P.response&&(k.data=JSON.parse(P.response))}catch{k.data={}}k.method=x.getMethod().toUpperCase(),k.url=x.getURL(),k.status=P.status,k.headers={...x._headers};const _=P.getAllResponseHeaders();_&&_.split(`\r
125
125
  `).forEach(q=>{const[H,R]=q.split(": ");H&&R&&(k.headers[H]=R)});const D=m.getFile(k.headers["x-uploader-file-id"]);if(x.getMethod()==="PATCH"&&D.mockResponse)return;if(["PATCH","POST"].includes(k.method)&&[200,500].includes(k.status)){const B=[!0,"true"].includes(k.headers["x-uploader-file-exist"]),q=Sf(k.url,k.headers["x-uploader-file-name"]);k.file=D,k.uploadURL=q;const H={uploadURL:q,...k};m.setFileState(D.id,{responseResult:H}),B&&D&&(k.method==="POST"&&m.setFileState(D.id,{mockResponse:F}),m.emit("upload-success",m.getFile(D.id),{...H,body:k.data}),m.emit("postprocess-complete",m.getFile(D.id)),m.calculateTotalProgress()),k.status===200&&(await(s==null?void 0:s(k)),m.emitUploadSuccess(D,k))}n&&await(n==null?void 0:n(P));const O=m.getState().totalProgress===100,j=m.getFiles().every(B=>B.source==="DropTarget");O&&j&&m.close()},...l});const v=({fileIDs:x,id:F})=>{x.forEach(k=>{m.setFileState(k,{uploadID:F})})};m.off("upload",v),m.on("upload",v);const C=x=>{typeof h=="function"&&h(x,m.getFiles())};return m.off("file-added",C),m.on("file-added",C),m.off("file-removed-success",C),m.on("file-removed-success",C),u&&m.use(Fh,{target:document.body,onDrop:x=>{var F;(F=m==null?void 0:m.open)==null||F.call(m)},...u}),t==null||t.forEach(x=>{if(x){const{plugin:F,options:k}=g[x]||{};F&&m.use(F,k)}}),Pf(m),f&&(f==null?void 0:f.length)>0&&m.addFiles(f),m}const xl=M.forwardRef((i,e)=>{var H,R,N,S,b,w,T,I,E,$,W,K,J,ee,ie,ri,Re,Mi,li,ci,ui;const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,disableMediaKitStatus:!1,...i==null?void 0:i.apiPathProps},a=M.useRef(null),n=Tm({open:!1,uppy:null,availablePluginMap:{},restrictions:po((H=i==null?void 0:i.coreProps)==null?void 0:H.restrictions)||{}}),s=Qp(),o=hS({...i,apiPathProps:t,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions,theme:s}),{plugins:r=o.map(z=>z.id),id:l="Uploader",popup:u=!1,onUploadFinish:p,onOpen:c,onClose:h,locale:f="en",installerProps:g}=i,y=Xp(o,"id"),m=Mg(z=>{var le;return(le=z==null?void 0:z.breakpoints)==null?void 0:le.down("md")}),v=bc([...r,...o.filter(z=>z.alwayUse).map(z=>z.id)]),{loading:C}=Em(async()=>{var le,Ue,xe,ce,ut;let z=ho((le=i==null?void 0:i.coreProps)==null?void 0:le.restrictions)?{}:po((Ue=i==null?void 0:i.coreProps)==null?void 0:Ue.restrictions);if(!t.disableMediaKitStatus&&na())try{await ma.get("/api/uploader/status").then(({data:De})=>{var Qt;n.availablePluginMap=De.availablePluginMap,!t.disableMediaKitPrefix&&ho((Qt=i==null?void 0:i.coreProps)==null?void 0:Qt.restrictions)&&(z=De.restrictions||{})})}catch{}!((xe=z==null?void 0:z.allowedFileTypes)!=null&&xe.length)&&(z!=null&&z.allowedFileExts)&&(z.allowedFileTypes=bc((ut=(ce=(typeof(z==null?void 0:z.allowedFileExts)=="string"?z==null?void 0:z.allowedFileExts.split(","):z==null?void 0:z.allowedFileExts)||[])==null?void 0:ce.map(De=>rt.lookup((De==null?void 0:De.replaceAll(" ",""))||"")))==null?void 0:ut.filter(De=>De)),delete z.allowedFileExts),z.maxFileSize&&typeof z.maxFileSize=="string"&&(z.maxFileSize=im.parseSize(z.maxFileSize,{iec:!1})||void 0),n.restrictions=po(z)},{refreshDeps:[JSON.stringify({apiPathProps:t,restrictionsProps:(R=i==null?void 0:i.coreProps)==null?void 0:R.restrictions})]}),x=typeof((N=n.restrictions)==null?void 0:N.allowedFileTypes)=="object"&&((b=(S=n.restrictions)==null?void 0:S.allowedFileTypes)==null?void 0:b.length)===0,F=((E=(I=(T=(w=n.restrictions)==null?void 0:w.allowedFileTypes)==null?void 0:T.map(z=>rt.extension(z)))==null?void 0:I.filter(Boolean))==null?void 0:E.join(", "))||"";let k="";x?k=fo(Es,`${f}.strings.noAllowedFileTypes`,"No allowed file types"):(W=($=n.restrictions)==null?void 0:$.allowedFileTypes)!=null&&W.length&&F&&(k=fo(Es,`${f}.strings.allowedFileTypes`,"Allowed file types: ")+F),(ho(k)||["undefined","null",void 0,null].includes(k))&&(k=""),Dm("esc",z=>{n.open&&(z.stopPropagation(),z.preventDefault(),O())},{useCapture:!0}),M.useEffect(()=>{wf(t),n.uppy=pc({...i,id:l,plugins:v,apiPathProps:t,pluginList:o,restrictions:n.restrictions}),n.uppy.open=D,n.uppy.close=O,n.uppy.openPlugin=P;const z=xe=>{const{onShowPanel:ce}=y[xe];ce==null||ce(e)};n.uppy.off("dashboard:show-panel",z),n.uppy.on("dashboard:show-panel",z);const le=(xe,ce,ut,De)=>{var jn;const Qt=`${De.toLowerCase()}Props`,Li=(jn=ut[Qt])==null?void 0:jn.onSelectedFiles;if(typeof Li=="function"){const Jt=xe.map(Ie=>{var Hn,X,va;const uo={name:Ie.id||((va=(X=(Hn=Ie.fileUrl)==null?void 0:Hn.split("/"))==null?void 0:X.slice(-1))==null?void 0:va[0]),type:Ie.mimetype||rt.lookup(Ie.fileUrl),data:"",preview:Ie.fileUrl,source:De,isRemote:!0},$n=ce.uppy.addFile(uo);return{...Ie,uppyFile:ce.uppy.getFile($n)}});Li==null||Li(Jt)}else Promise.all(xe.map(async Jt=>{const Ie=_f(Jt);await(p==null?void 0:p(Ie)),ce.uppy.emitUploadSuccess(Ie.file,Ie)})).then(()=>{ce.uppy.close()})};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:xe,event:ce})=>{v.includes(xe)&&(n.uppy.off(ce),n.uppy.on(ce,ut=>le(ut,n,i,xe)))})},[JSON.stringify({id:l,plugins:v,apiPathProps:t,locale:f,restrictions:n.restrictions,theme:s})]);function P(z){var le,Ue,xe;if(z=z.replace(/\s/g,""),["MyDevice",...v].map(ce=>ce.toLowerCase()).includes(z.toLowerCase())){let ce=`div[data-uppy-acquirer-id="${z}"] > button`;(xe=(Ue=(le=document==null?void 0:document.getElementById(gs))==null?void 0:le.querySelector(ce))==null?void 0:Ue.click)==null||xe.call(Ue)}}const _=M.useCallback(z=>{oa&&a.current&&!a.current.contains(z.target)&&console.info("debug focus",a.current,z.target)},[]);function D(z){var Ue,xe,ce,ut;n.open=!0,z&&setTimeout(()=>{P(z)},200),n.uppy.emitOpen(),c==null||c(),(xe=(Ue=document.activeElement)==null?void 0:Ue.blur)==null||xe.call(Ue);const le=n.uppy.getPlugin(gs).el;(ce=le==null?void 0:le.focus)==null||ce.call(le),(ut=le==null?void 0:le.click)==null||ut.call(le),oa&&u&&(document.addEventListener("mousedown",_),document.addEventListener("touchstart",_))}function O(){var z;(z=n.uppy.getPlugin(gs))==null||z.hideAllPanels(),n.open=!1,n.uppy.emitClose(),h==null||h(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500),oa&&u&&(document.removeEventListener("mousedown",_),document.removeEventListener("touchstart",_))}M.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:D,close:O}));const j=u?ug:M.Fragment,B=u?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"},...(K=i==null?void 0:i.wrapperProps)==null?void 0:K.sx},invisible:!0,open:n.open,onClick:z=>{document.activeElement===document.body&&(z.stopPropagation(),O())},...i.wrapperProps}:{...i.wrapperProps},q=m?"42px":"40px";return Z.jsx(j,{...B,children:Z.jsxs(am,{onClose:O,did:aS,disabled:!n.open,...g,children:[Z.jsx(pg,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),Z.jsxs(dr,{className:"uploader-container",ref:a,id:zp,onClick:z=>z.stopPropagation(),sx:{position:"relative",width:m?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}},"& .uppy-Dashboard-browse, & .uppy-DashboardContent-addMore, & .uppy-DashboardContent-back, & .uppy-StatusBar-actionBtn--done, & .uppy-DashboardContent-save, & .uppy-StatusBar-actionBtn--upload":{color:`${(ee=(J=s==null?void 0:s.palette)==null?void 0:J.primary)==null?void 0:ee.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${(ri=(ie=s==null?void 0:s.palette)==null?void 0:ie.primary)==null?void 0:ri.main}`,filter:"brightness(1.2)"}},"& .uppy-Dashboard-browse":{textDecoration:"underline !important"},"& .uppy-c-btn-primary":{backgroundColor:`${(Mi=(Re=s==null?void 0:s.palette)==null?void 0:Re.primary)==null?void 0:Mi.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${(ci=(li=s==null?void 0:s.palette)==null?void 0:li.primary)==null?void 0:ci.main} !important`,filter:"brightness(1.2)"}}},children:[u&&Z.jsx(Og,{"aria-label":"close",onClick:O,sx:{color:"#fafafa",position:"absolute",...m?{bottom:`calc(0px - ${q} - 16px)`,left:`calc(50vw - ${q} - 8px)`}:{right:`calc(0px - ${q} - 16px)`,top:-12}},children:Z.jsx($g,{sx:{fontSize:q}})}),C&&Z.jsxs(dr,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:99999999999,flexDirection:"column",background:"rgba(256, 256, 256, 0.2)",backdropFilter:"blur(4px)",borderRadius:1,pointerEvents:"none"},children:[Z.jsx(Z2,{size:32}),Z.jsx(uS,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:fo(Es,`${f}.strings.loadingStatus`,"Loading...")})]}),n.uppy&&Z.jsx(mh,{inline:!0,target:`#${zp}`,id:gs,disabled:x,uppy:n.uppy,plugins:v,fileManagerSelectionType:((ui=n.restrictions)==null?void 0:ui.maxNumberOfFiles)===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:k,doneButtonHandler:O,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),fS=Object.freeze(Object.defineProperty({__proto__:null,Uploader:xl,default:xl,initUploader:pc},Symbol.toStringTag,{value:"Module"})),jp=M.lazy(()=>Vp(()=>Promise.resolve().then(()=>fS),void 0).then(i=>({default:i.Uploader}))),dc=M.createContext(null);function Wf(){const i=M.useContext(dc);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function mS({onChange:i,children:e,...t}){const a=Wf(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return Z.jsx(dr,{onClick:n,...t,children:e})}function gS({children:i,popup:e,...t}){const a=M.useRef(null),n=M.useMemo(()=>e?nm.createPortal(Z.jsx(jp,{ref:a,popup:!0,...t},"uploader"),document.body):Z.jsx(jp,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return Z.jsxs(dc.Provider,{value:a,children:[i,n]})}const HS=Object.freeze(Object.defineProperty({__proto__:null,CLOSE:Is,OPEN:Ds,UPLOADER_UPLOAD_SUCCESS:rl,Uploader:xl,UploaderContext:dc,UploaderProvider:gS,UploaderTrigger:mS,api:tc,base64ToFile:bf,blobToFile:sl,createImageUrl:Tn,getAIKitComponent:xf,getDownloadUrl:yf,getExt:aa,getMediaKitComponent:na,getObjectURL:nl,getUploaderEndpoint:ic,getUrl:Sf,initUploader:pc,initUppy:Pf,isBlob:vf,isMediaKit:ol,isSvgFile:Ff,mediaKitApi:ma,mediaKitMountPoint:Ot,mockUploaderFileResponse:_f,parseStringToDot:Cf,get prefixPath(){return oi},setPrefixPath:wf,useUploaderContext:Wf},Symbol.toStringTag,{value:"Module"}));export{_g as B,pg as G,Og as I,uS as T,ug as a,Qp as b,jg as c,ig as d,kS as e,dr as f,Cc as g,xf as h,HS as i,tg as r,Ri as s,pa as u};