@kanorio/elements 1.1.0 → 1.2.0

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 (198) hide show
  1. package/README.md +4 -1
  2. package/dist/AudioPlayer-DKUAB5KE.js +2 -0
  3. package/dist/AudioPlayer-S7YF7A2E.js +2 -0
  4. package/dist/CustomerAccountPanel-DJKV7LT4.js +2 -0
  5. package/dist/CustomerAccountPanel-RWEHWBJY.js +2 -0
  6. package/dist/FormAddressField-C6VN7J6I.js +2 -0
  7. package/dist/FormAddressField-QR7ZCH77.js +2 -0
  8. package/dist/FormChoiceDropdown-SJXD26CC.js +2 -0
  9. package/dist/FormChoiceDropdown-U3NIOOHG.js +2 -0
  10. package/dist/FormFileField-LZDCXI2Z.js +2 -0
  11. package/dist/FormFileField-ONL4Q55V.js +2 -0
  12. package/dist/FormTaxIdField-K34MDUPW.js +2 -0
  13. package/dist/FormTaxIdField-XMK5WRQO.js +2 -0
  14. package/dist/KanorioAccount-EN3TM67X.js +2 -0
  15. package/dist/KanorioAccount-XGVSGVYN.js +2 -0
  16. package/dist/KanorioAnalytics-NEKTFQEE.js +2 -0
  17. package/dist/KanorioAnalytics-UMCUWQM7.js +2 -0
  18. package/dist/KanorioCurriculum-3QSCOHK7.js +2 -0
  19. package/dist/KanorioCurriculum-RUIGZ5X7.js +2 -0
  20. package/dist/KanorioForm-GUA5GEJY.js +2 -0
  21. package/dist/KanorioForm-KXV7D2TU.js +2 -0
  22. package/dist/KanorioLightbox-M72HNQQX.js +2 -0
  23. package/dist/KanorioLightbox-TQ3Q73TD.js +2 -0
  24. package/dist/KanorioLogin-5XFN3YEE.js +2 -0
  25. package/dist/KanorioLogin-AJHHVQGV.js +2 -0
  26. package/dist/KanorioMedia-ADKUDH5C.js +2 -0
  27. package/dist/KanorioMedia-DLBSXCKA.js +2 -0
  28. package/dist/KanorioReviews-42FZSXTI.js +2 -0
  29. package/dist/KanorioReviews-7LD5WKFG.js +2 -0
  30. package/dist/KanorioUnit-NWBX5DEI.js +2 -0
  31. package/dist/KanorioUnit-SIM3344J.js +2 -0
  32. package/dist/MediaPlayer-F43FPK4E.js +2 -0
  33. package/dist/MediaPlayer-JHFZFOOG.js +2 -0
  34. package/dist/{PDFViewerFull-KMUVT2BL.js → PDFViewerFull-CB44M7GW.js} +3 -3
  35. package/dist/{PDFViewerFull-FBLYNUDX.js → PDFViewerFull-INVHZL4V.js} +2 -2
  36. package/dist/VideoPlayer-FWZF4DQK.js +2 -0
  37. package/dist/VideoPlayer-LNS7XJ4C.js +2 -0
  38. package/dist/account.d.ts +165 -0
  39. package/dist/account.js +2 -0
  40. package/dist/analytics.d.ts +44 -0
  41. package/dist/analytics.js +2 -0
  42. package/dist/bot-protection.d.ts +297 -0
  43. package/dist/bot-protection.js +2 -0
  44. package/dist/chunk-2E6RCDAA.js +2 -0
  45. package/dist/chunk-2FSD3N7F.js +6 -0
  46. package/dist/chunk-2J5XQK4H.js +2 -0
  47. package/dist/chunk-2LOQXVFI.js +2 -0
  48. package/dist/chunk-2ONAW3CA.js +2 -0
  49. package/dist/chunk-33AQQY6T.js +69 -0
  50. package/dist/chunk-36YEGBKK.js +2 -0
  51. package/dist/chunk-4BBERZ6T.js +2 -0
  52. package/dist/chunk-4BEKWYEW.js +2 -0
  53. package/dist/chunk-4DPSNQEI.js +2 -0
  54. package/dist/chunk-4KA3HSRQ.js +2 -0
  55. package/dist/chunk-4MOCTNN7.js +2 -0
  56. package/dist/chunk-5AUWUK5R.js +2 -0
  57. package/dist/chunk-5G3PQI25.js +2 -0
  58. package/dist/chunk-5HWAL7VK.js +2 -0
  59. package/dist/chunk-63XJWMJG.js +2 -0
  60. package/dist/chunk-66XN5RR4.js +2 -0
  61. package/dist/chunk-6RZBXZFP.js +2 -0
  62. package/dist/chunk-763LNERD.js +2 -0
  63. package/dist/chunk-7XWBVRXP.js +15 -0
  64. package/dist/chunk-A4DPHHAP.js +42 -0
  65. package/dist/chunk-AF46NLXK.js +2 -0
  66. package/dist/chunk-AFNEGNVJ.js +2 -0
  67. package/dist/chunk-AQ6F6MIJ.js +2 -0
  68. package/dist/chunk-ARU5PTJV.js +2 -0
  69. package/dist/chunk-B7KLKVIM.js +2 -0
  70. package/dist/chunk-BGVTMWPN.js +2 -0
  71. package/dist/chunk-BKNL7ZCI.js +2 -0
  72. package/dist/chunk-BU7KUHZK.js +8 -0
  73. package/dist/chunk-C7HUM2EN.js +2 -0
  74. package/dist/chunk-CU2JJTXI.js +2 -0
  75. package/dist/{chunk-5U2SZE3H.js → chunk-CUQUEGX2.js} +2 -2
  76. package/dist/chunk-D7K3YCBR.js +2 -0
  77. package/dist/chunk-DLJDYXKL.js +2 -0
  78. package/dist/chunk-DTBRUBPG.js +2 -0
  79. package/dist/chunk-E77WGXYW.js +2 -0
  80. package/dist/chunk-EE4S6NRV.js +3 -0
  81. package/dist/chunk-ET57PWXC.js +2 -0
  82. package/dist/chunk-EZMTUAQX.js +2 -0
  83. package/dist/chunk-FFAWYDLJ.js +2 -0
  84. package/dist/chunk-FQCA2VGY.js +2 -0
  85. package/dist/chunk-FSY5GB5E.js +3 -0
  86. package/dist/chunk-G4U6BFZY.js +2 -0
  87. package/dist/chunk-GJY6AQIS.js +2 -0
  88. package/dist/chunk-GMW7AUSG.js +2 -0
  89. package/dist/chunk-GZCED6V3.js +2 -0
  90. package/dist/chunk-H2XQYT62.js +2 -0
  91. package/dist/chunk-H7VP4BYY.js +2 -0
  92. package/dist/chunk-HFYLTH5B.js +2 -0
  93. package/dist/chunk-IAXVJLJ3.js +2 -0
  94. package/dist/chunk-IXDKZO42.js +2 -0
  95. package/dist/chunk-J37D44SX.js +2 -0
  96. package/dist/chunk-JH5D6YJX.js +2 -0
  97. package/dist/chunk-JREL5347.js +2 -0
  98. package/dist/chunk-K2XZKV3Q.js +2 -0
  99. package/dist/chunk-K4VRRKYJ.js +2 -0
  100. package/dist/chunk-KBKDMTYF.js +2 -0
  101. package/dist/chunk-KDNGDR64.js +2 -0
  102. package/dist/chunk-KNNN5V3T.js +2 -0
  103. package/dist/chunk-LWKCGUHS.js +2 -0
  104. package/dist/chunk-LWRWKZBC.js +2 -0
  105. package/dist/chunk-LXNMHQFN.js +2 -0
  106. package/dist/chunk-MC63CLSM.js +2 -0
  107. package/dist/chunk-MIQK3T3Y.js +2 -0
  108. package/dist/chunk-MQ7PBFUM.js +4 -0
  109. package/dist/chunk-MWPRTK32.js +2 -0
  110. package/dist/chunk-MXGMJAWS.js +2 -0
  111. package/dist/chunk-N4BGAMWD.js +2 -0
  112. package/dist/chunk-N5PIQM4L.js +3 -0
  113. package/dist/chunk-NBDRYQZV.js +2 -0
  114. package/dist/chunk-NGRNPVON.js +2 -0
  115. package/dist/chunk-NSY72ZYX.js +15 -0
  116. package/dist/chunk-O2SYHUQF.js +2 -0
  117. package/dist/chunk-OIKRLEW6.js +2 -0
  118. package/dist/chunk-OTK4YNSG.js +2 -0
  119. package/dist/chunk-OU4IOHLN.js +15 -0
  120. package/dist/chunk-PR2NRUEI.js +2 -0
  121. package/dist/chunk-QGR3QAQB.js +3 -0
  122. package/dist/chunk-QOQQCCID.js +2 -0
  123. package/dist/chunk-RG5JA44V.js +2 -0
  124. package/dist/chunk-RKEHHJDU.js +2 -0
  125. package/dist/chunk-S2NFWI7C.js +69 -0
  126. package/dist/chunk-S7FE2XRA.js +2 -0
  127. package/dist/chunk-SUXTLVTX.js +2 -0
  128. package/dist/chunk-SVWEVSYJ.js +2 -0
  129. package/dist/chunk-TEUQV3AT.js +2 -0
  130. package/dist/chunk-U7H3W23Q.js +2 -0
  131. package/dist/chunk-U7KVGD47.js +2 -0
  132. package/dist/chunk-UIHBR4NU.js +3 -0
  133. package/dist/chunk-UM74DXPE.js +2 -0
  134. package/dist/chunk-VKSYPXNL.js +2 -0
  135. package/dist/chunk-VUTODQFX.js +2 -0
  136. package/dist/chunk-VYSRVTYI.js +2 -0
  137. package/dist/chunk-W32ZFOPN.js +2 -0
  138. package/dist/chunk-W63RJF6Q.js +2 -0
  139. package/dist/chunk-WM5S3YN5.js +2 -0
  140. package/dist/chunk-WP7UEAIB.js +2 -0
  141. package/dist/chunk-WXIUWMFR.js +2 -0
  142. package/dist/chunk-Z4A5NQWJ.js +2 -0
  143. package/dist/chunk-Z4OV6QHI.js +2 -0
  144. package/dist/curriculum.d.ts +20 -0
  145. package/dist/curriculum.js +2 -0
  146. package/dist/deliverables-BDS7WMBC.js +99 -0
  147. package/dist/deliverables-C5RD2ASE.js +131 -0
  148. package/dist/elements.css +1 -1
  149. package/dist/events-CJeBru-H.d.ts +11 -0
  150. package/dist/form.d.ts +775 -0
  151. package/dist/form.js +2 -0
  152. package/dist/forms-answers-address-7P6EVFY5.js +2 -0
  153. package/dist/forms-answers-address-IQV2Y56H.js +2 -0
  154. package/dist/forms-answers-phone-2VZ46OME.js +2 -0
  155. package/dist/forms-answers-phone-5PUB5WKD.js +2 -0
  156. package/dist/forms-answers-tax-id-D4GOUC6N.js +2 -0
  157. package/dist/forms-answers-tax-id-WJD7K3PG.js +2 -0
  158. package/dist/index.d.ts +17 -3045
  159. package/dist/index.js +1 -1
  160. package/dist/kanorio-elements.js +9 -73
  161. package/dist/lightbox-DEvsB5dB.d.ts +100 -0
  162. package/dist/lightbox.d.ts +5 -0
  163. package/dist/lightbox.js +2 -0
  164. package/dist/login.d.ts +14 -0
  165. package/dist/login.js +2 -0
  166. package/dist/media.d.ts +85 -0
  167. package/dist/media.js +2 -0
  168. package/dist/phone-input-Q5AV6KSW.js +2 -0
  169. package/dist/phone-input-T6QX2TDS.js +2 -0
  170. package/dist/provider-CMLzyAjJ.d.ts +1277 -0
  171. package/dist/provider.d.ts +4 -0
  172. package/dist/provider.js +2 -0
  173. package/dist/reviews.d.ts +42 -0
  174. package/dist/reviews.js +2 -0
  175. package/dist/unit.d.ts +118 -0
  176. package/dist/unit.js +2 -0
  177. package/dist/{vidstack-BmcqUMKx-XYI2YLUH.js → vidstack-BmcqUMKx-FXVV4FRB.js} +2 -2
  178. package/dist/{vidstack-GkTzay8D-PBE5ZIYA.js → vidstack-GkTzay8D-53C3FRCO.js} +2 -2
  179. package/dist/web-components.d.ts +13 -1
  180. package/dist/web-components.js +1 -1
  181. package/dist/wire-ofSodpi1.d.ts +176 -0
  182. package/package.json +46 -2
  183. package/dist/MediaPlayer-7IBSXL7Q.js +0 -2
  184. package/dist/MediaPlayer-HTXF4T2V.js +0 -2
  185. package/dist/chunk-2UVUNYL6.js +0 -2
  186. package/dist/chunk-3OGF7I4H.js +0 -2
  187. package/dist/chunk-5AWUTOK7.js +0 -2
  188. package/dist/chunk-DTDUK36B.js +0 -8
  189. package/dist/chunk-JZXJO62T.js +0 -15
  190. package/dist/chunk-LLHBSWTL.js +0 -2
  191. package/dist/chunk-NOCGHD2O.js +0 -2
  192. package/dist/chunk-S4ZA2INU.js +0 -415
  193. package/dist/chunk-TLBIYET7.js +0 -404
  194. package/dist/chunk-TLRFFLH4.js +0 -94
  195. package/dist/chunk-U3U5KVR6.js +0 -2
  196. package/dist/chunk-UBMXRFSK.js +0 -4
  197. package/dist/deliverables-FBCRGMTB.js +0 -93
  198. package/dist/deliverables-FMKPDHJH.js +0 -92
@@ -1,15 +0,0 @@
1
- import{a as $t}from"./chunk-S4ZA2INU.js";import{a as Ct}from"./chunk-6LGTFWQS.js";import{a as Nt,c as pt}from"./chunk-CDG7S4P5.js";var Ht=Nt(E=>{"use strict";var Pe=Ct();function Wt(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function q(){}var T={d:{f:q,r:function(){throw Error(Wt(522))},D:q,C:q,L:q,m:q,X:q,S:q,M:q},p:0,findDOMNode:null},Fe=Symbol.for("react.portal");function _e(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fe,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}var lt=Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ht(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}E.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T;E.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Wt(299));return _e(t,e,null,n)};E.flushSync=function(t){var e=lt.T,n=T.p;try{if(lt.T=null,T.p=2,t)return t()}finally{lt.T=e,T.p=n,T.d.f()}};E.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,T.d.C(t,e))};E.prefetchDNS=function(t){typeof t=="string"&&T.d.D(t)};E.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var n=e.as,i=ht(n,e.crossOrigin),o=typeof e.integrity=="string"?e.integrity:void 0,r=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;n==="style"?T.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:i,integrity:o,fetchPriority:r}):n==="script"&&T.d.X(t,{crossOrigin:i,integrity:o,fetchPriority:r,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};E.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var n=ht(e.as,e.crossOrigin);T.d.M(t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&T.d.M(t)};E.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var n=e.as,i=ht(n,e.crossOrigin);T.d.L(t,n,{crossOrigin:i,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};E.preloadModule=function(t,e){if(typeof t=="string")if(e){var n=ht(e.as,e.crossOrigin);T.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else T.d.m(t)};E.requestFormReset=function(t){T.d.r(t)};E.unstable_batchedUpdates=function(t,e){return t(e)};E.useFormState=function(t,e,n){return lt.H.useFormState(t,e,n)};E.useFormStatus=function(){return lt.H.useHostTransitionStatus()};E.version="19.2.1"});var De=Nt((vn,Vt)=>{"use strict";function zt(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zt)}catch(t){console.error(t)}}zt(),Vt.exports=Ht()});var Z=["section","product","form","attachment"],It=[{mime:"image/jpeg",extensions:[".jpg",".jpeg"],kind:"image",purposes:["product","form"]},{mime:"image/png",extensions:[".png"],kind:"image",purposes:["product","form"]},{mime:"image/webp",extensions:[".webp"],kind:"image",purposes:["product","form"]},{mime:"application/pdf",extensions:[".pdf"],kind:"pdf",purposes:["section","blog","product","form","attachment"]},{mime:"application/msword",extensions:[".doc"],kind:"document",purposes:Z},{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",extensions:[".docx"],kind:"document",purposes:Z,zipMarkers:["[Content_Types].xml","word/"]},{mime:"application/vnd.ms-excel",extensions:[".xls"],kind:"document",purposes:Z},{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extensions:[".xlsx"],kind:"document",purposes:Z,zipMarkers:["[Content_Types].xml","xl/"]},{mime:"application/vnd.ms-powerpoint",extensions:[".ppt"],kind:"document",purposes:Z},{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",extensions:[".pptx"],kind:"document",purposes:Z,zipMarkers:["[Content_Types].xml","ppt/"]},{mime:"application/epub+zip",extensions:[".epub"],kind:"ebook",purposes:Z,zipMarkers:["mimetype","META-INF/container.xml"]},{mime:"application/zip",extensions:[".zip"],kind:"archive",purposes:["section","product","attachment"]},{mime:"audio/mpeg",extensions:[".mp3"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/mp4",extensions:[".m4a"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/wav",extensions:[".wav"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/ogg",extensions:[".ogg"],kind:"audio",purposes:["section","blog"]},{mime:"audio/aac",extensions:[".aac"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/flac",extensions:[".flac"],kind:"audio",purposes:["section","blog","product"]},{mime:"video/mp4",extensions:[".mp4"],kind:"video",purposes:["section","blog","product"]},{mime:"video/webm",extensions:[".webm"],kind:"video",purposes:["section","blog","product"]},{mime:"video/quicktime",extensions:[".mov"],kind:"video",purposes:["section","blog","product"]}];function pn(t){return It.filter(e=>e.purposes.includes(t))}function Bt(t){return It.find(e=>e.mime===t)??null}function hn(t){return Bt(t)?.kind??null}function xn(t){return Bt(t)?.extensions[0]??""}var L=pt(Ct()),at=pt($t()),Lt=(0,L.createContext)(null),bn=Lt.Provider;function Me(t,e){if(typeof t=="function")return t(e);t&&(t.current=e)}function Ut(t,e){let n=(0,L.useRef)(null),i=(0,L.useCallback)(r=>{n.current=r,r&&t?.mark(r);let s=Me(e,r);if(typeof s=="function")return()=>{n.current=null,s()}},[t,e]),o=(0,L.useCallback)(()=>{n.current&&t?.mark(n.current)},[t]);return{className:t?.className||void 0,ref:i,refresh:o}}function Sn(t){return Ut((0,L.useContext)(Lt),t)}var jt=(0,L.createContext)(null),On=jt.Provider;function Rn(t){return Ut((0,L.useContext)(jt),t)}function Tn({children:t}){let e=(0,L.useContext)(Lt),n=(0,L.useCallback)(i=>{i&&e?.mark(i)},[e]);return e?(0,at.jsx)("div",{className:e.className,ref:n,style:{display:"contents"},children:t}):(0,at.jsx)(at.Fragment,{children:t})}var ke=/^(zh|ja)\b/i,Ne=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u;function $e(t){return ke.test(t)}function Ie(t,e,n){return $e(t)?`${e}\uFF08${n}\uFF09`:`${e} (${n})`}function An(t){return Ne.test(t)?{labelValue:"\uFF1A",item:"\uFF1B"}:{labelValue:": ",item:"; "}}var Be=new Map,We=new Map;function Kt(t,e,n){let i=t.get(e);return i||(i=n(),t.set(e,i)),i}function Gt(t,e={}){return Kt(Be,`${t}|${JSON.stringify(e)}`,()=>{try{return new Intl.NumberFormat(t,e)}catch{return new Intl.NumberFormat("en",e)}})}function Ln(t,e){return Kt(We,`${t}|${JSON.stringify(e)}`,()=>{try{return new Intl.DateTimeFormat(t,e)}catch{return new Intl.DateTimeFormat("en",{...e,timeZone:"UTC"})}})}var He="\u2014";var Yt=["B","KB","MB","GB","TB"];function Mn(t,e){if(t==null||!Number.isFinite(t)||t<0)return He;let n=t,i=0;for(;n>=1024&&i<Yt.length-1;)n/=1024,i+=1;return`${Gt(e.locale,{maximumFractionDigits:i===0?0:1}).format(n)} ${Yt[i]}`}function kn(t){let e=Math.max(0,Math.floor(t)),n=Math.floor(e/3600),i=Math.floor(e%3600/60),o=e%60,r=s=>String(s).padStart(2,"0");return n>0?`${n}:${r(i)}:${r(o)}`:`${i}:${r(o)}`}var Jt=["top","right","bottom","left"];var W=Math.min,A=Math.max,ut=Math.round,mt=Math.floor,k=t=>({x:t,y:t}),ze={left:"right",right:"left",bottom:"top",top:"bottom"};function yt(t,e,n){return A(t,W(e,n))}function H(t,e){return typeof t=="function"?t(e):t}function z(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function wt(t){return t==="x"?"y":"x"}function vt(t){return t==="y"?"height":"width"}function N(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function bt(t){return wt(N(t))}function Zt(t,e,n){n===void 0&&(n=!1);let i=Q(t),o=bt(t),r=vt(o),s=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function Qt(t){let e=ft(t);return[xt(t),e,xt(e)]}function xt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Xt=["left","right"],qt=["right","left"],Ve=["top","bottom"],Ue=["bottom","top"];function je(t,e,n){switch(t){case"top":case"bottom":return n?e?qt:Xt:e?Xt:qt;case"left":case"right":return e?Ve:Ue;default:return[]}}function te(t,e,n,i){let o=Q(t),r=je(z(t),n==="start",i);return o&&(r=r.map(s=>s+"-"+o),e&&(r=r.concat(r.map(xt)))),r}function ft(t){let e=z(t);return ze[e]+t.slice(e.length)}function Ke(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?Ke(t):{top:t,right:t,bottom:t,left:t}}function tt(t){let{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function ee(t,e,n){let{reference:i,floating:o}=t,r=N(e),s=bt(e),c=vt(s),f=z(e),m=r==="y",a=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,d=i[c]/2-o[c]/2,l;switch(f){case"top":l={x:a,y:i.y-o.height};break;case"bottom":l={x:a,y:i.y+i.height};break;case"right":l={x:i.x+i.width,y:u};break;case"left":l={x:i.x-o.width,y:u};break;default:l={x:i.x,y:i.y}}switch(Q(e)){case"start":l[s]-=d*(n&&m?-1:1);break;case"end":l[s]+=d*(n&&m?-1:1);break}return l}async function oe(t,e){var n;e===void 0&&(e={});let{x:i,y:o,platform:r,rects:s,elements:c,strategy:f}=t,{boundary:m="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:d=!1,padding:l=0}=H(e,t),g=Pt(l),x=c[d?u==="floating"?"reference":"floating":u],h=tt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(x)))==null||n?x:x.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:m,rootBoundary:a,strategy:f})),w=u==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},b=tt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:y,strategy:f}):w);return{top:(h.top-b.top+g.top)/v.y,bottom:(b.bottom-h.bottom+g.bottom)/v.y,left:(h.left-b.left+g.left)/v.x,right:(b.right-h.right+g.right)/v.x}}var Ge=50,re=async(t,e,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:oe},f=await(s.isRTL==null?void 0:s.isRTL(e)),m=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:a,y:u}=ee(m,i,f),d=i,l=0,g={};for(let p=0;p<r.length;p++){let x=r[p];if(!x)continue;let{name:h,fn:w}=x,{x:y,y:v,data:b,reset:S}=await w({x:a,y:u,initialPlacement:i,placement:d,strategy:o,middlewareData:g,rects:m,platform:c,elements:{reference:t,floating:e}});a=y??a,u=v??u,g[h]={...g[h],...b},S&&l<Ge&&(l++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(m=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):S.rects),{x:a,y:u}=ee(m,d,f)),p=-1)}return{x:a,y:u,placement:d,strategy:o,middlewareData:g}},se=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:i,placement:o,rects:r,platform:s,elements:c,middlewareData:f}=e,{element:m,padding:a=0}=H(t,e)||{};if(m==null)return{};let u=Pt(a),d={x:n,y:i},l=bt(o),g=vt(l),p=await s.getDimensions(m),x=l==="y",h=x?"top":"left",w=x?"bottom":"right",y=x?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[l]-d[l]-r.floating[g],b=d[l]-r.reference[l],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(m)),O=S?S[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(S)))&&(O=c.floating[y]||r.floating[g]);let U=v/2-b/2,I=O/2-p[g]/2-1,P=W(u[h],I),G=W(u[w],I),B=P,Y=O-p[g]-G,R=O/2-p[g]/2+U,J=yt(B,R,Y),j=!f.arrow&&Q(o)!=null&&R!==J&&r.reference[g]/2-(R<B?P:G)-p[g]/2<0,D=j?R<B?R-B:R-Y:0;return{[l]:d[l]+D,data:{[l]:J,centerOffset:R-J-D,...j&&{alignmentOffset:D}},reset:j}}});var ce=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;let{placement:o,middlewareData:r,rects:s,initialPlacement:c,platform:f,elements:m}=e,{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:l="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...x}=H(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let h=z(o),w=N(c),y=z(c)===c,v=await(f.isRTL==null?void 0:f.isRTL(m.floating)),b=d||(y||!p?[ft(c)]:Qt(c)),S=g!=="none";!d&&S&&b.push(...te(c,p,g,v));let O=[c,...b],U=await f.detectOverflow(e,x),I=[],P=((i=r.flip)==null?void 0:i.overflows)||[];if(a&&I.push(U[h]),u){let R=Zt(o,s,v);I.push(U[R[0]],U[R[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(R=>R<=0)){var G,B;let R=(((G=r.flip)==null?void 0:G.index)||0)+1,J=O[R];if(J&&(!(u==="alignment"?w!==N(J):!1)||P.every(M=>N(M.placement)===w?M.overflows[0]>0:!0)))return{data:{index:R,overflows:P},reset:{placement:J}};let j=(B=P.filter(D=>D.overflows[0]<=0).sort((D,M)=>D.overflows[1]-M.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(l){case"bestFit":{var Y;let D=(Y=P.filter(M=>{if(S){let X=N(M.placement);return X===w||X==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(X=>X>0).reduce((X,Le)=>X+Le,0)]).sort((M,X)=>M[1]-X[1])[0])==null?void 0:Y[0];D&&(j=D);break}case"initialPlacement":j=c;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function ne(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ie(t){return Jt.some(e=>t[e]>=0)}var le=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:i}=e,{strategy:o="referenceHidden",...r}=H(t,e);switch(o){case"referenceHidden":{let s=await i.detectOverflow(e,{...r,elementContext:"reference"}),c=ne(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:ie(c)}}}case"escaped":{let s=await i.detectOverflow(e,{...r,altBoundary:!0}),c=ne(s,n.floating);return{data:{escapedOffsets:c,escaped:ie(c)}}}default:return{}}}}};var ae=new Set(["left","top"]);async function Ye(t,e){let{placement:n,platform:i,elements:o}=t,r=await(i.isRTL==null?void 0:i.isRTL(o.floating)),s=z(n),c=Q(n),f=N(n)==="y",m=ae.has(s)?-1:1,a=r&&f?-1:1,u=H(e,t),{mainAxis:d,crossAxis:l,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(l=c==="end"?g*-1:g),f?{x:l*a,y:d*m}:{x:d*m,y:l*a}}var fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;let{x:o,y:r,placement:s,middlewareData:c}=e,f=await Ye(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:r+f.y,data:{...f,placement:s}}}}},ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:h=>{let{x:w,y}=h;return{x:w,y}}},...m}=H(t,e),a={x:n,y:i},u=await r.detectOverflow(e,m),d=N(z(o)),l=wt(d),g=a[l],p=a[d];if(s){let h=l==="y"?"top":"left",w=l==="y"?"bottom":"right",y=g+u[h],v=g-u[w];g=yt(y,g,v)}if(c){let h=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=p+u[h],v=p-u[w];p=yt(y,p,v)}let x=f.fn({...e,[l]:g,[d]:p});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[l]:s,[d]:c}}}}}},me=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:n,y:i,placement:o,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:m=!0}=H(t,e),a={x:n,y:i},u=N(o),d=wt(u),l=a[d],g=a[u],p=H(c,e),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(f){let y=d==="y"?"height":"width",v=r.reference[d]-r.floating[y]+x.mainAxis,b=r.reference[d]+r.reference[y]-x.mainAxis;l<v?l=v:l>b&&(l=b)}if(m){var h,w;let y=d==="y"?"width":"height",v=ae.has(z(o)),b=r.reference[u]-r.floating[y]+(v&&((h=s.offset)==null?void 0:h[u])||0)+(v?0:x.crossAxis),S=r.reference[u]+r.reference[y]+(v?0:((w=s.offset)==null?void 0:w[u])||0)-(v?x.crossAxis:0);g<b?g=b:g>S&&(g=S)}return{[d]:l,[u]:g}}}},de=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;let{placement:o,rects:r,platform:s,elements:c}=e,{apply:f=()=>{},...m}=H(t,e),a=await s.detectOverflow(e,m),u=z(o),d=Q(o),l=N(o)==="y",{width:g,height:p}=r.floating,x,h;u==="top"||u==="bottom"?(x=u,h=d===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(h=u,x=d==="end"?"top":"bottom");let w=p-a.top-a.bottom,y=g-a.left-a.right,v=W(p-a[x],w),b=W(g-a[h],y),S=!e.middlewareData.shift,O=v,U=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(U=y),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(O=w),S&&!d){let P=A(a.left,0),G=A(a.right,0),B=A(a.top,0),Y=A(a.bottom,0);l?U=g-2*(P!==0||G!==0?P+G:A(a.left,a.right)):O=p-2*(B!==0||Y!==0?B+Y:A(a.top,a.bottom))}await f({...e,availableWidth:U,availableHeight:O});let I=await s.getDimensions(c.floating);return g!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function St(){return typeof window<"u"}function nt(t){return pe(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $(t){var e;return(e=(pe(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pe(t){return St()?t instanceof Node||t instanceof C(t).Node:!1}function F(t){return St()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return St()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function ge(t){return!St()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function st(t){let{overflow:e,overflowX:n,overflowY:i,display:o}=_(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function he(t){return/^(table|td|th)$/.test(nt(t))}function dt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Xe=/transform|translate|scale|rotate|perspective|filter/,qe=/paint|layout|strict|content/,et=t=>!!t&&t!=="none",Ft;function Ot(t){let e=F(t)?_(t):t;return et(e.transform)||et(e.translate)||et(e.scale)||et(e.rotate)||et(e.perspective)||!Rt()&&(et(e.backdropFilter)||et(e.filter))||Xe.test(e.willChange||"")||qe.test(e.contain||"")}function xe(t){let e=K(t);for(;V(e)&&!it(e);){if(Ot(e))return e;if(dt(e))return null;e=K(e)}return null}function Rt(){return Ft==null&&(Ft=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ft}function it(t){return/^(html|body|#document)$/.test(nt(t))}function _(t){return C(t).getComputedStyle(t)}function gt(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ge(t)&&t.host||$(t);return ge(e)?e.host:e}function ye(t){let e=K(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&st(e)?e:ye(e)}function rt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=ye(t),r=o===((i=t.ownerDocument)==null?void 0:i.body),s=C(o);if(r){let c=Tt(s);return e.concat(s,s.visualViewport||[],st(o)?o:[],c&&n?rt(c):[])}else return e.concat(o,rt(o,[],n))}function Tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Se(t){let e=_(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=V(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,c=ut(n)!==r||ut(i)!==s;return c&&(n=r,i=s),{width:n,height:i,$:c}}function Dt(t){return F(t)?t:t.contextElement}function ct(t){let e=Dt(t);if(!V(e))return k(1);let n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Se(e),s=(r?ut(n.width):n.width)/i,c=(r?ut(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Je=k(0);function Oe(t){let e=C(t);return!Rt()||!e.visualViewport?Je:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ze(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==C(t)?!1:e}function ot(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),r=Dt(t),s=k(1);e&&(i?F(i)&&(s=ct(i)):s=ct(t));let c=Ze(r,n,i)?Oe(r):k(0),f=(o.left+c.x)/s.x,m=(o.top+c.y)/s.y,a=o.width/s.x,u=o.height/s.y;if(r){let d=C(r),l=i&&F(i)?C(i):i,g=d,p=Tt(g);for(;p&&i&&l!==g;){let x=ct(p),h=p.getBoundingClientRect(),w=_(p),y=h.left+(p.clientLeft+parseFloat(w.paddingLeft))*x.x,v=h.top+(p.clientTop+parseFloat(w.paddingTop))*x.y;f*=x.x,m*=x.y,a*=x.x,u*=x.y,f+=y,m+=v,g=C(p),p=Tt(g)}}return tt({width:a,height:u,x:f,y:m})}function Et(t,e){let n=gt(t).scrollLeft;return e?e.left+n:ot($(t)).left+n}function Re(t,e){let n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Et(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function Qe(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t,r=o==="fixed",s=$(i),c=e?dt(e.floating):!1;if(i===s||c&&r)return n;let f={scrollLeft:0,scrollTop:0},m=k(1),a=k(0),u=V(i);if((u||!u&&!r)&&((nt(i)!=="body"||st(s))&&(f=gt(i)),u)){let l=ot(i);m=ct(i),a.x=l.x+i.clientLeft,a.y=l.y+i.clientTop}let d=s&&!u&&!r?Re(s,f):k(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+a.x+d.x,y:n.y*m.y-f.scrollTop*m.y+a.y+d.y}}function tn(t){return Array.from(t.getClientRects())}function en(t){let e=$(t),n=gt(t),i=t.ownerDocument.body,o=A(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=A(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-n.scrollLeft+Et(t),c=-n.scrollTop;return _(i).direction==="rtl"&&(s+=A(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}var we=25;function nn(t,e){let n=C(t),i=$(t),o=n.visualViewport,r=i.clientWidth,s=i.clientHeight,c=0,f=0;if(o){r=o.width,s=o.height;let a=Rt();(!a||a&&e==="fixed")&&(c=o.offsetLeft,f=o.offsetTop)}let m=Et(i);if(m<=0){let a=i.ownerDocument,u=a.body,d=getComputedStyle(u),l=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(i.clientWidth-u.clientWidth-l);g<=we&&(r-=g)}else m<=we&&(r+=m);return{width:r,height:s,x:c,y:f}}function on(t,e){let n=ot(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=V(t)?ct(t):k(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=o*r.x,m=i*r.y;return{width:s,height:c,x:f,y:m}}function ve(t,e,n){let i;if(e==="viewport")i=nn(t,n);else if(e==="document")i=en($(t));else if(F(e))i=on(e,n);else{let o=Oe(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return tt(i)}function Te(t,e){let n=K(t);return n===e||!F(n)||it(n)?!1:_(n).position==="fixed"||Te(n,e)}function rn(t,e){let n=e.get(t);if(n)return n;let i=rt(t,[],!1).filter(c=>F(c)&&nt(c)!=="body"),o=null,r=_(t).position==="fixed",s=r?K(t):t;for(;F(s)&&!it(s);){let c=_(s),f=Ot(s);!f&&c.position==="fixed"&&(o=null),(r?!f&&!o:!f&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||st(s)&&!f&&Te(t,s))?i=i.filter(a=>a!==s):o=c,s=K(s)}return e.set(t,i),i}function sn(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t,s=[...n==="clippingAncestors"?dt(e)?[]:rn(e,this._c):[].concat(n),i],c=ve(e,s[0],o),f=c.top,m=c.right,a=c.bottom,u=c.left;for(let d=1;d<s.length;d++){let l=ve(e,s[d],o);f=A(l.top,f),m=W(l.right,m),a=W(l.bottom,a),u=A(l.left,u)}return{width:m-u,height:a-f,x:u,y:f}}function cn(t){let{width:e,height:n}=Se(t);return{width:e,height:n}}function ln(t,e,n){let i=V(e),o=$(e),r=n==="fixed",s=ot(t,!0,r,e),c={scrollLeft:0,scrollTop:0},f=k(0);function m(){f.x=Et(o)}if(i||!i&&!r)if((nt(e)!=="body"||st(o))&&(c=gt(e)),i){let l=ot(e,!0,r,e);f.x=l.x+e.clientLeft,f.y=l.y+e.clientTop}else o&&m();r&&!i&&o&&m();let a=o&&!i&&!r?Re(o,c):k(0),u=s.left+c.scrollLeft-f.x-a.x,d=s.top+c.scrollTop-f.y-a.y;return{x:u,y:d,width:s.width,height:s.height}}function _t(t){return _(t).position==="static"}function be(t,e){if(!V(t)||_(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function Ee(t,e){let n=C(t);if(dt(t))return n;if(!V(t)){let o=K(t);for(;o&&!it(o);){if(F(o)&&!_t(o))return o;o=K(o)}return n}let i=be(t,e);for(;i&&he(i)&&_t(i);)i=be(i,e);return i&&it(i)&&_t(i)&&!Ot(i)?n:i||xe(t)||n}var an=async function(t){let e=this.getOffsetParent||Ee,n=this.getDimensions,i=await n(t.floating);return{reference:ln(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function fn(t){return _(t).direction==="rtl"}var un={convertOffsetParentRelativeRectToViewportRelativeRect:Qe,getDocumentElement:$,getClippingRect:sn,getOffsetParent:Ee,getElementRects:an,getClientRects:tn,getDimensions:cn,getScale:ct,isElement:F,isRTL:fn};function Ae(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function mn(t,e){let n=null,i,o=$(t);function r(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();let m=t.getBoundingClientRect(),{left:a,top:u,width:d,height:l}=m;if(c||e(),!d||!l)return;let g=mt(u),p=mt(o.clientWidth-(a+d)),x=mt(o.clientHeight-(u+l)),h=mt(a),y={rootMargin:-g+"px "+-p+"px "+-x+"px "+-h+"px",threshold:A(0,W(1,f))||1},v=!0;function b(S){let O=S[0].intersectionRatio;if(O!==f){if(!v)return s();O?s(!1,O):i=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!Ae(m,t.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver(b,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,y)}n.observe(t)}return s(!0),r}function Yn(t,e,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,m=Dt(t),a=o||r?[...m?rt(m):[],...e?rt(e):[]]:[];a.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});let u=m&&c?mn(m,n):null,d=-1,l=null;s&&(l=new ResizeObserver(h=>{let[w]=h;w&&w.target===m&&l&&e&&(l.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=l)==null||y.observe(e)})),n()}),m&&!f&&l.observe(m),e&&l.observe(e));let g,p=f?ot(t):null;f&&x();function x(){let h=ot(t);p&&!Ae(p,h)&&n(),p=h,g=requestAnimationFrame(x)}return n(),()=>{var h;a.forEach(w=>{o&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u?.(),(h=l)==null||h.disconnect(),l=null,f&&cancelAnimationFrame(g)}}var Xn=fe;var qn=ue,Jn=ce,Zn=de,Qn=le,ti=se;var ei=me,ni=(t,e,n)=>{let i=new Map,o={platform:un,...n},r={...o.platform,_c:i};return re(t,e,{...o,platform:r})};var At=pt(Ct());function oi(){let[t,e]=(0,At.useState)(!1);return(0,At.useEffect)(()=>{e(!0)},[]),t}var Mt=["ar","bn","bg","my","zh-CN","zh-HK","zh-Hant","cs","da","nl-BE","nl-NL","en-AU","en-CA","en-GB","en-US","tl","fi","fr-CA","fr-FR","de","el","gu","he","hi","hu","id","it","ja","kn","km","ko","lo","ms","ml","mr","ne","nb","nn","fa","pl","pt-BR","pt-PT","pa","ro","ru","si","es-419","es-ES","sw","sv","ta","te","th","tr","uk","ur","vi"],si=new Set(Mt);function dn(t){return t.toLowerCase()}function kt(t){return t.split("-")[0].toLowerCase()}function Ce(t){let e=t.toLowerCase();return!e.startsWith("zh")&&!e.startsWith("yue")?null:e.includes("hk")||e.includes("mo")||e.startsWith("yue")?"hk":e.includes("cn")||e.includes("hans")||e.includes("sg")?"cn":"tw"}function ci(t,e){let n=o=>kt(o)==="yue"?"zh":kt(o),i=n(t);return i!==n(e)?!1:i!=="zh"?!0:Ce(t)===Ce(e)}var gn=Array.from(new Set([...Mt.map(dn),...Mt.map(kt)])).sort(),li=new Set(gn);export{Yn as a,Xn as b,qn as c,Jn as d,Zn as e,Qn as f,ti as g,ei as h,ni as i,De as j,oi as k,bn as l,Sn as m,On as n,Rn as o,Tn as p,ci as q,Ie as r,An as s,pn as t,hn as u,xn as v,Ln as w,He as x,Mn as y,kn as z};
2
- /*! Bundled license information:
3
-
4
- react-dom/cjs/react-dom.production.js:
5
- (**
6
- * @license React
7
- * react-dom.production.js
8
- *
9
- * Copyright (c) Meta Platforms, Inc. and affiliates.
10
- *
11
- * This source code is licensed under the MIT license found in the
12
- * LICENSE file in the root directory of this source tree.
13
- *)
14
- */
15
- //# sourceMappingURL=chunk-JZXJO62T.js.map
@@ -1,2 +0,0 @@
1
- function pickSiteLabels(messages,locale){return{locale,ui:messages.ui,search:messages.search,shop:messages.shop,blog:messages.blog,productInfo:messages.productInfo,delivery:messages.delivery,paymentMethods:messages.orderStatus.methodTypes,cookieSettings:messages.cookieConsent.settings,curriculum:{contentUnitsCount:messages.account.contentUnitsCount,contentPreviewBadge:messages.account.contentPreviewBadge,contentLocked:messages.account.contentLocked,contentOptional:messages.account.contentOptional,contentLoadError:messages.account.contentLoadError,contentNoUnits:messages.account.contentNoUnits}}}function fillLabel(template,vars){let text=template;for(const[name,value]of Object.entries(vars))text=text.replaceAll(`{${name}}`,value);return text}function clampText(value,max){if(value===null||value===void 0)return value;if(value.length<=max)return value;let index=0;for(let count=0;index<value.length&&count<max;count++){index+=(value.codePointAt(index)??0)>65535?2:1}return value.slice(0,index)}var WATERMARK_POSITIONS=["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"];var WATERMARK_SOURCES=["logo","text","image"];var WATERMARK_SIZE_RANGE={min:5,max:50,default:20};var WATERMARK_OPACITY_RANGE={min:10,max:100,default:60};var WATERMARK_TEXT_MAX_LENGTH=60;var DEFAULT_WATERMARK_APPLY={pages:true,articles:true,products:false};var DEFAULT_MEDIA_WATERMARK={enabled:false,source:"logo",text:"",image:null,layout:"single",position:"bottom-right",size:WATERMARK_SIZE_RANGE.default,opacity:WATERMARK_OPACITY_RANGE.default,apply:DEFAULT_WATERMARK_APPLY,overlay:null,version:null,activatedAt:null,deactivatedAt:null};var DEFAULT_MEDIA_PROTECTION={allowDownload:true,keepCopyright:true,deterrence:false,watermark:DEFAULT_MEDIA_WATERMARK};function clampInt(value,range){if(typeof value!=="number"||!Number.isFinite(value))return range.default;return Math.min(range.max,Math.max(range.min,Math.round(value)))}function pick(value,options,fallback){return typeof value==="string"&&options.includes(value)?value:fallback}function parseWatermarkApply(value){const raw=value&&typeof value==="object"?value:{};const flag=key=>typeof raw[key]==="boolean"?raw[key]:DEFAULT_WATERMARK_APPLY[key];return{pages:flag("pages"),articles:flag("articles"),products:flag("products")}}function parseMediaWatermark(value){const raw=value&&typeof value==="object"?value:{};const overlayRaw=raw.overlay&&typeof raw.overlay==="object"?raw.overlay:null;const overlay=overlayRaw&&typeof overlayRaw.url==="string"&&typeof overlayRaw.width==="number"&&typeof overlayRaw.height==="number"&&typeof overlayRaw.key==="string"?{url:overlayRaw.url,width:overlayRaw.width,height:overlayRaw.height,key:overlayRaw.key}:null;const regenHistory=Array.isArray(raw.regenHistory)?raw.regenHistory.filter(item=>typeof item==="string"&&!Number.isNaN(Date.parse(item))):void 0;const scheduledAt=isoOrNull(raw.scheduledAt);return{enabled:raw.enabled===true,source:pick(raw.source,WATERMARK_SOURCES,DEFAULT_MEDIA_WATERMARK.source),text:typeof raw.text==="string"?clampText(raw.text,WATERMARK_TEXT_MAX_LENGTH):"",image:typeof raw.image==="string"&&raw.image?raw.image:null,layout:raw.layout==="tile"?"tile":"single",position:pick(raw.position,WATERMARK_POSITIONS,DEFAULT_MEDIA_WATERMARK.position),size:clampInt(raw.size,WATERMARK_SIZE_RANGE),opacity:clampInt(raw.opacity,WATERMARK_OPACITY_RANGE),apply:parseWatermarkApply(raw.apply),overlay,version:typeof raw.version==="string"&&raw.version?raw.version:null,activatedAt:isoOrNull(raw.activatedAt),deactivatedAt:isoOrNull(raw.deactivatedAt),...regenHistory&&regenHistory.length>0?{regenHistory}:{},...scheduledAt?{scheduledAt}:{}}}function isoOrNull(value){return typeof value==="string"&&!Number.isNaN(Date.parse(value))?value:null}function parseMediaProtection(value){const raw=value&&typeof value==="object"?value:{};const flag=key=>typeof raw[key]==="boolean"?raw[key]:DEFAULT_MEDIA_PROTECTION[key];return{allowDownload:flag("allowDownload"),keepCopyright:flag("keepCopyright"),deterrence:flag("deterrence"),watermark:parseMediaWatermark(raw.watermark)}}function canVisitorsDownloadImages(protection){return protection.allowDownload&&!protection.deterrence}function canVisitorsShareImages(protection){return!protection.deterrence}import{createContext,useContext,useMemo}from"react";var HERO_BANNER_PRESET_RATIOS=["24:9","21:9","16:9","4:3","1:1","4:5"];var SPLIT_IMAGE_PRESET_RATIOS=["16:9","4:3","1:1","3:4","4:5"];var CARD_PRESET_RATIOS=["4:3","1:1","3:4"];function parseAspectRatio(ratio){if(typeof ratio!=="string")return null;const match=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/.exec(ratio.trim());if(!match)return null;const w=Number(match[1]);const h=Number(match[2]);if(!Number.isFinite(w)||!Number.isFinite(h)||w<=0||h<=0)return null;const value=w/h;if(value<.25-1e-6||value>5+1e-6)return null;return value}function hasNaturalDevice(ratios){return ratios.desktop===null||ratios.tablet===null||ratios.mobile===null}var FILL_POSITION_CLASSES={mobile:{fill:"absolute inset-0 h-full w-full",flow:"relative h-auto w-full"},tablet:{fill:"md:absolute md:inset-0 md:h-full",flow:"md:relative md:inset-auto md:h-auto"},desktop:{fill:"lg:absolute lg:inset-0 lg:h-full",flow:"lg:relative lg:inset-auto lg:h-auto"}};function buildResponsiveFillClasses(ratios){const mode=ratio=>ratio&&parseAspectRatio(ratio)?"fill":"flow";const m=mode(ratios.mobile);const t=mode(ratios.tablet);const d=mode(ratios.desktop);const classes=[FILL_POSITION_CLASSES.mobile[m]];if(t!==m)classes.push(FILL_POSITION_CLASSES.tablet[t]);if(d!==t)classes.push(FILL_POSITION_CLASSES.desktop[d]);return classes.join(" ")}function bannerHeightDefaultRatio(bannerHeight){switch(bannerHeight??"standard"){case"compact":return"24:9";case"tall":return"16:9";case"standard":default:return"21:9"}}var SECTION_RATIO_POLICIES={"page-main-visual:banner-profile":{tabletInherits:"desktop",devices:["desktop","tablet","mobile"],presets:HERO_BANNER_PRESET_RATIOS,allowCustomRatio:true},"page-main-visual:split-hero":{tabletInherits:"mobile",devices:["desktop","tablet","mobile"],presets:SPLIT_IMAGE_PRESET_RATIOS,allowCustomRatio:true},"page-main-visual:overlay-hero":{tabletInherits:"desktop",devices:["desktop","mobile"],presets:["16:9","4:5"],allowCustomRatio:false,fixedHeight:true},"image-text-split":{tabletInherits:"mobile",devices:["desktop","tablet","mobile"],presets:SPLIT_IMAGE_PRESET_RATIOS,allowCustomRatio:true,allowNatural:true},"full-width-image":{tabletInherits:"desktop",devices:["desktop","tablet","mobile"],presets:HERO_BANNER_PRESET_RATIOS,allowCustomRatio:true,allowNatural:true},"card-grid":{tabletInherits:"desktop",devices:["desktop"],presets:CARD_PRESET_RATIOS,allowCustomRatio:false},"multi-link":{tabletInherits:"desktop",devices:["desktop"],presets:["4:3"],allowCustomRatio:false}};function resolveDeviceValue(input,fallback,tabletInherits="desktop"){if(input===void 0||input===null){return{desktop:fallback,tablet:fallback,mobile:fallback}}if(typeof input!=="object"){return{desktop:input,tablet:input,mobile:input}}const record=input;const desktop=record.desktop??fallback;const mobile=record.mobile??desktop;const tablet=record.tablet??(tabletInherits==="mobile"?mobile:desktop);return{desktop,tablet,mobile}}function resolvePageMainVisualRatios(input){const layout=input.layout??"banner-profile";if(layout==="overlay-hero"){const policy2=SECTION_RATIO_POLICIES["page-main-visual:overlay-hero"];return{policy:policy2,ratios:{desktop:"16:9",tablet:"16:9",mobile:"4:5"},fixedHeight:true}}if(layout==="split-hero"){const policy2=SECTION_RATIO_POLICIES["page-main-visual:split-hero"];const raw2=resolveDeviceValue(input.imageRatio,"4:3",policy2.tabletInherits);return{policy:policy2,ratios:{desktop:raw2.desktop==="natural"||!parseAspectRatio(raw2.desktop)?"4:3":raw2.desktop,tablet:raw2.tablet==="natural"||!parseAspectRatio(raw2.tablet)?"4:3":raw2.tablet,mobile:raw2.mobile==="natural"||!parseAspectRatio(raw2.mobile)?"4:3":raw2.mobile},fixedHeight:false}}const policy=SECTION_RATIO_POLICIES["page-main-visual:banner-profile"];const fallback=bannerHeightDefaultRatio(input.bannerHeight);const raw=resolveDeviceValue(input.imageRatio,fallback,policy.tabletInherits);return{policy,ratios:{desktop:raw.desktop==="natural"||!parseAspectRatio(raw.desktop)?fallback:raw.desktop,tablet:raw.tablet==="natural"||!parseAspectRatio(raw.tablet)?fallback:raw.tablet,mobile:raw.mobile==="natural"||!parseAspectRatio(raw.mobile)?fallback:raw.mobile},fixedHeight:false}}function toFocusFrameSpecs(ratios){const d=ratios.desktop;const t=ratios.tablet;const m=ratios.mobile;if(!d&&!t&&!m)return null;if(d&&d===t&&d===m){return[{device:"all",ratio:d}]}const frames=[];if(d)frames.push({device:"desktop",ratio:d});if(t&&t!==d&&t!==m)frames.push({device:"tablet",ratio:t});if(m&&m!==d)frames.push({device:"mobile",ratio:m});return frames.length>0?frames:null}function pageMainVisualFocusFrames(input){const{ratios}=resolvePageMainVisualRatios(input??{});return toFocusFrameSpecs(ratios)??[{device:"all",ratio:"21:9"}]}var HERO_FOCUS_FRAMES=pageMainVisualFocusFrames();var MIN_CROP_RECT_SPAN=.05;function clampUnit(value){return Math.min(1,Math.max(0,value))}function normalizeImageFocus(value){if(!value||typeof value!=="object")return null;const{x,y}=value;if(typeof x!=="number"||typeof y!=="number")return null;if(!Number.isFinite(x)||!Number.isFinite(y))return null;return{x:clampUnit(x),y:clampUnit(y)}}function normalizeImageCropRect(value){if(!value||typeof value!=="object")return null;const{x,y,w,h}=value;if(typeof x!=="number"||typeof y!=="number"||typeof w!=="number"||typeof h!=="number"||!Number.isFinite(x)||!Number.isFinite(y)||!Number.isFinite(w)||!Number.isFinite(h)){return null}const nw=Math.min(1,Math.max(MIN_CROP_RECT_SPAN,w));const nh=Math.min(1,Math.max(MIN_CROP_RECT_SPAN,h));const nx=Math.min(1-nw,Math.max(0,x));const ny=Math.min(1-nh,Math.max(0,y));return{x:nx,y:ny,w:nw,h:nh}}function normalizeImageScreenFraming(value){if(!value||typeof value!=="object")return null;const raw=value;if(typeof raw.ratio!=="string"||!parseAspectRatio(raw.ratio))return null;const rect=normalizeImageCropRect(raw.rect);if(!rect)return null;return{ratio:raw.ratio.trim(),rect}}function normalizePadColor(value){if(typeof value!=="string")return void 0;const trimmed=value.trim();return/^#[0-9a-fA-F]{6}$/.test(trimmed)?trimmed.toLowerCase():void 0}function isCenteredFocus(focus){return Math.abs(focus.x-.5)<.005&&Math.abs(focus.y-.5)<.005}function effectiveImageFocus(framing){const focus=normalizeImageFocus(framing?.focus);if(!focus||isCenteredFocus(focus))return null;return focus}function hasScreenFraming(framing){if(!framing?.screens||typeof framing.screens!=="object")return false;for(const device of["desktop","tablet","mobile"]){if(normalizeImageScreenFraming(framing.screens[device]))return true}return false}function deriveRectFromFocus(focus,sourceAspect,targetAspect){const f=normalizeImageFocus(focus)??{x:.5,y:.5};if(!Number.isFinite(sourceAspect)||sourceAspect<=0||!Number.isFinite(targetAspect)||targetAspect<=0){return{x:0,y:0,w:1,h:1}}if(sourceAspect>=targetAspect){const w2=Math.min(1,Math.max(MIN_CROP_RECT_SPAN,targetAspect/sourceAspect));const h2=1;const x=Math.min(1-w2,Math.max(0,f.x-w2/2));return{x,y:0,w:w2,h:h2}}const w=1;const h=Math.min(1,Math.max(MIN_CROP_RECT_SPAN,sourceAspect/targetAspect));const y=Math.min(1-h,Math.max(0,f.y-h/2));return{x:0,y,w,h}}function isScreenFramingCompatible(screen,targetRatio,source){if(!screen)return false;const savedAspect=parseAspectRatio(screen.ratio);const targetAspect=parseAspectRatio(targetRatio);if(!savedAspect||!targetAspect)return false;if(Math.abs(savedAspect-targetAspect)/targetAspect>.01)return false;if(source&&source.width>0&&source.height>0&&screen.rect.h>0){const actualAspect=screen.rect.w*source.width/(screen.rect.h*source.height);if(Math.abs(actualAspect-targetAspect)/targetAspect>.02)return false}return true}function resolveScreenFraming(input){const{framing,device,targetRatio,tabletInherits="desktop"}=input;const source=input.source??framing?.source??null;const screens=framing?.screens;const candidateOrder=device==="desktop"?["desktop"]:device==="mobile"?["mobile","desktop"]:tabletInherits==="mobile"?["tablet","mobile","desktop"]:["tablet","desktop"];let matched=null;let hadIncompatibleOnDevice=false;for(const candidate of candidateOrder){const screen=normalizeImageScreenFraming(screens?.[candidate]);if(!screen)continue;if(isScreenFramingCompatible(screen,targetRatio,source)){matched=screen;break}if(candidate===device){hadIncompatibleOnDevice=true}}if(matched){return{ratio:targetRatio,rect:matched.rect,derived:false,ratioMismatchFallback:false}}const targetAspect=parseAspectRatio(targetRatio)??16/9;const sourceAspect=source&&source.width>0&&source.height>0?source.width/source.height:targetAspect;return{ratio:targetRatio,rect:deriveRectFromFocus(framing?.focus,sourceAspect,targetAspect),derived:true,ratioMismatchFallback:hadIncompatibleOnDevice}}function rectToCloudflareTrim(rect,source){if(!source||!Number.isFinite(source.width)||!Number.isFinite(source.height))return null;if(source.width<=0||source.height<=0)return null;const r=normalizeImageCropRect(rect);if(!r)return null;const left=Math.max(0,Math.round(r.x*source.width));const top=Math.max(0,Math.round(r.y*source.height));const cropW=Math.max(1,Math.round(r.w*source.width));const cropH=Math.max(1,Math.round(r.h*source.height));const right=Math.max(0,source.width-left-cropW);const bottom=Math.max(0,source.height-top-cropH);if(top<=1&&right<=1&&bottom<=1&&left<=1)return null;return{top,right,bottom,left}}function focusToObjectPosition(focus){const percent=value=>`${Math.round(value*1e3)/10}%`;return`${percent(focus.x)} ${percent(focus.y)}`}function focusToGravity(focus){const fixed=value=>(Math.round(value*100)/100).toFixed(2);return`${fixed(focus.x)}x${fixed(focus.y)}`}var ASSET_REF_PREFIX="asset:";var ASSET_REF_VALUE=/^asset:[a-z0-9]+$/;function isAssetRefValue(value){return ASSET_REF_VALUE.test(value)}var CF_IMAGES_ACCOUNT_HASH="xu6i8N5WjaI_9HFe-hZzmg";var CF_IMAGES_DELIVERY_BASE=`https://img.kanorio.com/cdn-cgi/imagedelivery/${CF_IMAGES_ACCOUNT_HASH}`;var URL_TAIL=String.raw`[^\s"'()<>?#\\]+`;var CF_IMAGE_ID=String.raw`[A-Za-z0-9_.-]+`;function escapeRegExp(value){return value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var QUERY_TAIL=String.raw`(?:[?#][^\s"'()<>\\]*)?`;var CF_IMAGE_URL=new RegExp(String.raw`^https://(?:imagedelivery\.net|[a-z0-9-]+\.kanorio\.com/cdn-cgi/imagedelivery|img\.kanorio\.com/wm/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)/${escapeRegExp(CF_IMAGES_ACCOUNT_HASH)}/(${CF_IMAGE_ID})(?:[/?#]|$)`);function cloudflareImageIdOf(url){return url?CF_IMAGE_URL.exec(url)?.[1]??null:null}var MIXED_EDGE_COLOR="mixed";function publicEdgeColor(edgeColor){return edgeColor&&edgeColor!==MIXED_EDGE_COLOR?edgeColor:null}function displayFileName(contentName,facts){const name=contentName??"";if(!facts?.name)return name;if(!name||name===facts.name||facts.formerNames?.includes(name))return facts.name;const dot=facts.name.lastIndexOf(".");const own=name.lastIndexOf(".");if(dot<=0||own<=0)return name;return`${name.slice(0,own)}${facts.name.slice(dot)}`}function mediaFactsFor(facts,ref){if(ref.assetId){const byId=facts[`${ASSET_REF_PREFIX}${ref.assetId}`];if(byId)return byId}if(!ref.url)return void 0;if(isAssetRefValue(ref.url))return facts[ref.url];const cfId=cloudflareImageIdOf(ref.url);if(cfId)return facts[cfId];const path=ref.url.split(/[?#]/,1)[0];for(const[key,item]of Object.entries(facts)){if(!key.startsWith(ASSET_REF_PREFIX)&&path.endsWith(`/${key}`))return item}return void 0}var CLOUDFLARE_IMAGE_QUALITY=85;function extractImageIdFromUrl(url){if(!url)return void 0;try{const urlObj=new URL(url);const pathParts=urlObj.pathname.split("/").filter(Boolean);if(urlObj.hostname==="imagedelivery.net"){if(pathParts.length>=2){return pathParts[1]}}if(urlObj.hostname.endsWith(".kanorio.com")&&pathParts[0]==="cdn-cgi"&&pathParts[1]==="imagedelivery"){if(pathParts.length>=4){return pathParts[3]}}return void 0}catch{return void 0}}function isSvgImageUrl(url){const path=url.split(/[?#]/,1)[0]??"";return path.toLowerCase().endsWith(".svg")}function isCloudflareImageUrl(url){if(!url)return false;try{const urlObj=new URL(url);if(urlObj.hostname==="imagedelivery.net"){return true}if(urlObj.hostname.endsWith(".kanorio.com")&&urlObj.pathname.startsWith("/cdn-cgi/imagedelivery/")){return true}return false}catch{return false}}function hasOptimizationParams(url){try{const urlObj=new URL(url);return urlObj.searchParams.has("width")||urlObj.searchParams.has("height")||urlObj.searchParams.has("quality")||urlObj.searchParams.has("fit")}catch{return false}}function getDefaultParamsForUseCase(useCase){switch(useCase){case"page-main-visual-background":return{width:1920,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"cover"};case"page-main-visual-logo":return{width:600,height:600,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"scale-down"};case"header-logo":return{width:600,height:600,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"scale-down"};case"card-grid-carousel-image":return{width:800,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"crop"};case"image-text-split-image":return{width:1200,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"crop"};case"multi-image-carousel-image":return{width:1600,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"scale-down"};case"lightbox-image":return{width:4096,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"scale-down"};case"full-width-image":return{width:1920,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"contain"};case"general":default:return{width:1920,quality:CLOUDFLARE_IMAGE_QUALITY,fit:"crop"}}}function parseCloudflareUrl(url){try{const urlObj=new URL(url);const pathParts=urlObj.pathname.split("/").filter(Boolean);if(urlObj.hostname==="imagedelivery.net"&&pathParts.length>=3){return{baseUrl:`${urlObj.protocol}//${urlObj.hostname}`,accountHash:pathParts[0],imageId:pathParts[1],variant:pathParts[2]||"public"}}if(urlObj.hostname.endsWith(".kanorio.com")&&pathParts[0]==="cdn-cgi"&&pathParts[1]==="imagedelivery"&&pathParts.length>=5){return{baseUrl:`${urlObj.protocol}//${urlObj.hostname}/cdn-cgi/imagedelivery`,accountHash:pathParts[2],imageId:pathParts[3],variant:pathParts[4]||"public"}}return null}catch{return null}}function buildOptimizedUrl(parsed,options){const{baseUrl,accountHash,imageId}=parsed;const defaults=getDefaultParamsForUseCase(options.useCase);const width=options.width??defaults.width;const height=options.height??defaults.height;const quality=CLOUDFLARE_IMAGE_QUALITY;const fit=options.fit??defaults.fit;const format=options.format;const params=[];if(options.trim){const{top,right,bottom,left}=options.trim;params.push(`trim=${Math.max(0,Math.round(top))};${Math.max(0,Math.round(right))};${Math.max(0,Math.round(bottom))};${Math.max(0,Math.round(left))}`)}if(width)params.push(`w=${width}`);if(height)params.push(`h=${height}`);if(fit)params.push(`fit=${fit}`);if(!options.trim&&options.focus&&width&&height&&(fit==="crop"||fit==="cover")){params.push(`gravity=${focusToGravity(options.focus)}`)}if(options.background&&/^#[0-9a-fA-F]{6}$/.test(options.background)){params.push(`background=${encodeURIComponent(options.background)}`)}params.push(`q=${quality}`);if(format)params.push(`f=${format}`);if(params.length>0){return`${baseUrl}/${accountHash}/${imageId}/${params.join(",")}`}return`${baseUrl}/${accountHash}/${imageId}/public`}function defaultWidthForUseCase(useCase){return getDefaultParamsForUseCase(useCase).width??1920}function getOptimizedImageUrl(originalUrl,options){if(!isCloudflareImageUrl(originalUrl)){return originalUrl}if(hasOptimizationParams(originalUrl)&&!options.format){return originalUrl}const parsed=parseCloudflareUrl(originalUrl);if(!parsed){return originalUrl}return buildOptimizedUrl(parsed,options)}function getOriginalImageUrl(url){if(!isCloudflareImageUrl(url)){return url}const parsed=parseCloudflareUrl(url);if(!parsed){return url}return`${parsed.baseUrl}/${parsed.accountHash}/${parsed.imageId}/public`}var MARKDOWN_IMAGE_SRCSET_WIDTHS=[400,800,1200,1600];var MARKDOWN_IMAGE_SIZES="(max-width: 768px) 100vw, 960px";function getResponsiveImageAttrs(originalUrl){if(!isCloudflareImageUrl(originalUrl)){return null}const parsed=parseCloudflareUrl(originalUrl);if(!parsed){return null}const{baseUrl,accountHash,imageId}=parsed;const quality=CLOUDFLARE_IMAGE_QUALITY;const fit="scale-down";const srcSet=MARKDOWN_IMAGE_SRCSET_WIDTHS.map(w=>`${baseUrl}/${accountHash}/${imageId}/w=${w},fit=${fit},q=${quality} ${w}w`).join(", ");const src=`${baseUrl}/${accountHash}/${imageId}/w=800,fit=${fit},q=${quality}`;return{src,srcSet,sizes:MARKDOWN_IMAGE_SIZES}}var PICTURE_DEVICE_WIDTHS={mobile:[640,1080],tablet:[1024,1536],desktop:[1440,1920]};var PICTURE_DEVICE_MEDIA={mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)"};var PICTURE_DEVICES=["desktop","tablet","mobile"];function resolveDeviceCrops(input){const out={};for(const device of PICTURE_DEVICES){const ratio=input.ratios[device];if(!ratio){out[device]={ratio:null,rect:null};continue}const resolved=resolveScreenFraming({framing:input.framing,device,targetRatio:ratio,tabletInherits:input.tabletInherits,source:input.source});out[device]={ratio,rect:resolved.derived?null:resolved.rect}}return out}function isSameDeviceCrop(a,b){if(a.ratio!==b.ratio)return false;if(!a.rect||!b.rect)return a.rect===b.rect;return Math.abs(a.rect.x-b.rect.x)<5e-4&&Math.abs(a.rect.y-b.rect.y)<5e-4&&Math.abs(a.rect.w-b.rect.w)<5e-4&&Math.abs(a.rect.h-b.rect.h)<5e-4}function pictureWidthsFor(device,maxWidth){const base=PICTURE_DEVICE_WIDTHS[device];if(!maxWidth||maxWidth<=0||maxWidth>=base[base.length-1])return base;return[...base.filter(w=>w<maxWidth),Math.round(maxWidth)]}function resolveSiteImageRenderMode(input){const{src,framing,deviceRatios,tabletInherits="desktop"}=input;if(!src||!deviceRatios)return"single";const uniformRatio=deviceRatios.mobile===deviceRatios.desktop&&deviceRatios.tablet===deviceRatios.desktop;const hasScreens=hasScreenFraming(framing);if(!hasScreens&&uniformRatio)return"single";const trimmable=isCloudflareImageUrl(src)&&!isSvgImageUrl(src);if(!hasScreens)return trimmable?"picture":"single";const source=framing?.source&&framing.source.width>0&&framing.source.height>0?framing.source:null;const crops=resolveDeviceCrops({framing,ratios:deviceRatios,tabletInherits,source});const anyRect=PICTURE_DEVICES.some(device=>crops[device].rect!==null);if(!anyRect)return uniformRatio||!trimmable?"single":"picture";if(!trimmable||!source)return"css-fallback";if(uniformRatio&&isSameDeviceCrop(crops.desktop,crops.tablet)&&isSameDeviceCrop(crops.desktop,crops.mobile)){return"single-trim"}return"picture"}function buildSingleTrimImageUrl(input){const useCase=input.useCase??"general";const width=input.width??defaultWidthForUseCase(useCase);const ratioNum=parseAspectRatio(input.ratio)??16/9;const height=Math.max(1,Math.round(width/ratioNum));const source=input.framing?.source&&input.framing.source.width>0&&input.framing.source.height>0?input.framing.source:null;const resolved=resolveScreenFraming({framing:input.framing,device:"desktop",targetRatio:input.ratio,tabletInherits:input.tabletInherits,source});const trim=!resolved.derived&&source?rectToCloudflareTrim(resolved.rect,source):null;return{src:getOptimizedImageUrl(input.src,{useCase,width,height,fit:"crop",trim,focus:trim?null:effectiveImageFocus(input.framing)}),width,height}}function buildPictureSourcesPlan(input){const{src,useCase="general",ratios,framing,tabletInherits="desktop",maxWidth}=input;if(!isCloudflareImageUrl(src))return null;const sourceDims=framing?.source&&framing.source.width>0&&framing.source.height>0?framing.source:null;const focus=effectiveImageFocus(framing);const crops=resolveDeviceCrops({framing,ratios,tabletInherits,source:sourceDims});const buildForDevice=device=>{const{ratio,rect}=crops[device];const ratioNum=ratio?parseAspectRatio(ratio)??16/9:null;const trim=rect&&sourceDims?rectToCloudflareTrim(rect,sourceDims):null;const widths=pictureWidthsFor(device,maxWidth);const urls=[];const srcSetParts=widths.map(w=>{const url=ratioNum?getOptimizedImageUrl(src,{useCase,width:w,height:Math.max(1,Math.round(w/ratioNum)),fit:"crop",trim,focus:trim?null:focus}):getOptimizedImageUrl(src,{useCase,width:w,fit:"scale-down"});urls.push(url);return`${url} ${w}w`});const primaryW=widths[widths.length-1];const naturalAspect=sourceDims?sourceDims.width/sourceDims.height:null;const primaryH=ratioNum?Math.max(1,Math.round(primaryW/ratioNum)):naturalAspect?Math.max(1,Math.round(primaryW/naturalAspect)):null;const primaryUrl=urls[urls.length-1];return{device,media:device==="desktop"?void 0:PICTURE_DEVICE_MEDIA[device],src:primaryUrl,srcSet:srcSetParts.join(", "),sizes:input.sizes?.[device]??"100vw",width:primaryW,height:primaryH,urls}};const mobile=buildForDevice("mobile");const tabletDesc=buildForDevice("tablet");const desktop=buildForDevice("desktop");const tablet=isSameDeviceCrop(crops.tablet,crops.desktop)?null:tabletDesc;const preloads=tablet?[{media:PICTURE_DEVICE_MEDIA.mobile,href:mobile.src,imageSrcSet:mobile.srcSet,imageSizes:mobile.sizes},{media:PICTURE_DEVICE_MEDIA.tablet,href:tablet.src,imageSrcSet:tablet.srcSet,imageSizes:tablet.sizes},{media:PICTURE_DEVICE_MEDIA.desktop,href:desktop.src,imageSrcSet:desktop.srcSet,imageSizes:desktop.sizes}]:[{media:PICTURE_DEVICE_MEDIA.mobile,href:mobile.src,imageSrcSet:mobile.srcSet,imageSizes:mobile.sizes},{media:"(min-width: 768px)",href:desktop.src,imageSrcSet:desktop.srcSet,imageSizes:desktop.sizes}];const allVariantUrls=Array.from(new Set([...mobile.urls,...tablet?tablet.urls:[],...desktop.urls]));return{mobile,tablet,desktop,preloads,allVariantUrls}}import{jsx}from"react/jsx-runtime";var FALLBACK={protection:DEFAULT_MEDIA_PROTECTION,imageDownloadUrl:()=>null};var MediaProtectionContext=createContext(FALLBACK);function MediaProtectionProvider({protection,websiteId,apiBase="",children}){const value=useMemo(()=>({protection:protection??DEFAULT_MEDIA_PROTECTION,imageDownloadUrl:(imageUrl,name)=>{const imageId=extractImageIdFromUrl(imageUrl);if(!websiteId||!imageId)return null;const base=`${apiBase}/api/public/sites/${encodeURIComponent(websiteId)}/images/${encodeURIComponent(imageId)}/download`;const query=new URLSearchParams;if(name)query.set("name",name);const search=query.toString();return search?`${base}?${search}`:base}}),[protection,websiteId,apiBase]);return jsx(MediaProtectionContext.Provider,{value,children})}function useMediaProtection(){return useContext(MediaProtectionContext)}export{pickSiteLabels,fillLabel,hasNaturalDevice,buildResponsiveFillClasses,normalizeImageCropRect,normalizePadColor,effectiveImageFocus,resolveScreenFraming,focusToObjectPosition,publicEdgeColor,displayFileName,mediaFactsFor,extractImageIdFromUrl,isSvgImageUrl,getOptimizedImageUrl,getOriginalImageUrl,getResponsiveImageAttrs,resolveSiteImageRenderMode,buildSingleTrimImageUrl,buildPictureSourcesPlan,clampText,parseMediaProtection,canVisitorsDownloadImages,canVisitorsShareImages,MediaProtectionProvider,useMediaProtection};
2
- //# sourceMappingURL=chunk-LLHBSWTL.js.map
@@ -1,2 +0,0 @@
1
- import{extractImageIdFromUrl,getOptimizedImageUrl,getOriginalImageUrl,useMediaProtection}from"./chunk-LLHBSWTL.js";import{useSiteLabels}from"./chunk-TLBIYET7.js";var PDFJS_PUBLIC_PATH="/pdfjs";var ELEMENTS_PDFJS_BASE_URL="https://js.kanorio.com/pdfjs";var assetBase=PDFJS_PUBLIC_PATH;function setPdfjsAssetBase(base){assetBase=base.replace(/\/+$/,"")}function pdfjsWorkerSrc(version){return`${assetBase}/${version}/pdf.worker.min.mjs`}function pdfjsCMapUrl(version){return`${assetBase}/${version}/cmaps/`}function pdfjsStandardFontDataUrl(version){return`${assetBase}/${version}/standard_fonts/`}function configurePdfjsWorker(pdfjs){const src=pdfjsWorkerSrc(pdfjs.version);if(pdfjs.GlobalWorkerOptions.workerSrc!==src){pdfjs.GlobalWorkerOptions.workerSrc=src}}var lockCount=0;var saved=null;function lockPageScroll(){if(typeof document==="undefined")return()=>{};const html=document.documentElement;const body=document.body;if(lockCount===0){const scrollbarWidth=window.innerWidth-html.clientWidth;saved={htmlOverflow:html.style.overflow,bodyOverflow:body.style.overflow,bodyPaddingRight:body.style.paddingRight};html.style.overflow="hidden";body.style.overflow="hidden";if(scrollbarWidth>0)body.style.paddingRight=`${scrollbarWidth}px`}lockCount+=1;let released=false;return()=>{if(released)return;released=true;lockCount-=1;if(lockCount>0||!saved)return;html.style.overflow=saved.htmlOverflow;body.style.overflow=saved.bodyOverflow;body.style.paddingRight=saved.bodyPaddingRight;saved=null}}import{useState,useCallback,useEffect,useMemo}from"react";var IMAGE_EXTENSION_PATTERN=/\.(avif|gif|jpe?g|png|webp)$/i;function getJpegDownloadFilename(url,filename){const baseFilename=filename?.trim()||extractImageIdFromUrl(url)||"image";if(IMAGE_EXTENSION_PATTERN.test(baseFilename)){return baseFilename.replace(IMAGE_EXTENSION_PATTERN,".jpg")}return`${baseFilename}.jpg`}async function downloadImageAsFile(url,filename){const downloadUrl=getOptimizedImageUrl(url,{useCase:"lightbox-image",format:"jpeg"});const res=await fetch(downloadUrl);if(!res.ok){throw new Error(`Failed to fetch image: ${res.status} ${res.statusText}`)}const blob=await res.blob();const a=document.createElement("a");a.href=URL.createObjectURL(blob);a.download=getJpegDownloadFilename(url,filename);a.click();URL.revokeObjectURL(a.href)}var MIN_ZOOM=1;var MAX_ZOOM=3;var ZOOM_STEP=.2;var IMAGE_DISPLAY_WIDTH_RATIO=.95;var IMAGE_DISPLAY_HEIGHT_RATIO=.9;var LIGHTBOX_BUTTON_BASE="w-10 h-10 md:w-12 md:h-12 rounded-full bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] hover:bg-[color-mix(in_srgb,var(--media-fg)_20%,transparent)] flex items-center justify-center transition-all";var LIGHTBOX_BUTTON_DISABLED=`${LIGHTBOX_BUTTON_BASE} disabled:opacity-30 disabled:cursor-not-allowed`;var LIGHTBOX_ZOOM_RESET_BUTTON="h-10 md:h-12 min-w-[50px] px-2 rounded-full text-[var(--media-fg)] text-xs md:text-sm font-medium tabular-nums text-center transition-colors enabled:hover:bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] disabled:cursor-default";function getDragClientPoint(e){if("touches"in e&&e.touches.length>0){return{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}if("changedTouches"in e&&e.changedTouches.length>0){return{clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY}}return{clientX:e.clientX,clientY:e.clientY}}function useImageLightbox({images,filenames,enableKeyboard=false,onDownload,onShare}){const{ui}=useSiteLabels();const{imageDownloadUrl}=useMediaProtection();const isDesktopPointerDevice=useCallback(()=>{if(typeof window==="undefined"||typeof window.matchMedia!=="function"){return false}return window.matchMedia("(hover: hover) and (pointer: fine)").matches},[]);const[lightboxOpen,setLightboxOpen]=useState(false);const[lightboxIndex,setLightboxIndex]=useState(0);const[zoomLevel,setZoomLevel]=useState(1);const[position,setPosition]=useState({x:0,y:0});const[isDraggingLightbox,setIsDraggingLightbox]=useState(false);const[dragStart,setDragStart]=useState({x:0,y:0});const zoomIn=useCallback(()=>{setZoomLevel(prev=>{const newZoom=Math.min(prev+ZOOM_STEP,MAX_ZOOM);return Math.round(newZoom*10)/10})},[]);const zoomOut=useCallback(()=>{setZoomLevel(prev=>{const newZoom=Math.max(prev-ZOOM_STEP,MIN_ZOOM);const rounded=Math.round(newZoom*10)/10;if(rounded===1){setPosition({x:0,y:0})}return rounded})},[]);const resetZoom=useCallback(()=>{setZoomLevel(1);setPosition({x:0,y:0})},[]);const openLightbox=useCallback(index=>{setLightboxIndex(index);setLightboxOpen(true);setZoomLevel(1);setPosition({x:0,y:0})},[]);const closeLightbox=useCallback(()=>{setLightboxOpen(false);resetZoom()},[resetZoom]);useEffect(()=>{if(!lightboxOpen)return;return lockPageScroll()},[lightboxOpen]);const prevImage=useCallback(()=>{if(images.length<=1)return;setLightboxIndex(prev=>{if(prev===0)return prev;return prev-1});resetZoom()},[images.length,resetZoom]);const nextImage=useCallback(()=>{if(images.length<=1)return;setLightboxIndex(prev=>{if(prev===images.length-1)return prev;return prev+1});resetZoom()},[images.length,resetZoom]);useEffect(()=>{if(!lightboxOpen||!enableKeyboard)return;const handleKeyDown=e=>{const isDesktopMode=isDesktopPointerDevice();const hasZoomModifier=e.metaKey||e.ctrlKey;const isZoomInKey=e.key==="+"||e.key==="="||e.key==="NumpadAdd";const isZoomOutKey=e.key==="-"||e.key==="_"||e.key==="NumpadSubtract";const isZoomResetKey=e.key==="0"||e.key==="Numpad0";if(isDesktopMode&&(hasZoomModifier&&(isZoomInKey||isZoomOutKey||isZoomResetKey)||isZoomInKey||isZoomOutKey||isZoomResetKey)){e.preventDefault();if(isZoomInKey){zoomIn();return}if(isZoomOutKey){zoomOut();return}resetZoom();return}switch(e.key){case"Escape":closeLightbox();break;case"ArrowLeft":prevImage();break;case"ArrowRight":nextImage();break}};window.addEventListener("keydown",handleKeyDown);return()=>window.removeEventListener("keydown",handleKeyDown)},[lightboxOpen,enableKeyboard,closeLightbox,prevImage,nextImage,zoomIn,zoomOut,resetZoom,isDesktopPointerDevice]);const dragBounds=useMemo(()=>{if(zoomLevel<=1){return{maxOffsetX:0,maxOffsetY:0}}const viewportWidth=typeof window!=="undefined"?window.innerWidth:1920;const viewportHeight=typeof window!=="undefined"?window.innerHeight:1080;const imageDisplayWidth=viewportWidth*IMAGE_DISPLAY_WIDTH_RATIO;const imageDisplayHeight=viewportHeight*IMAGE_DISPLAY_HEIGHT_RATIO;const scaledWidth=imageDisplayWidth*zoomLevel;const scaledHeight=imageDisplayHeight*zoomLevel;const maxOffsetX=Math.max(0,(scaledWidth-imageDisplayWidth)/2);const maxOffsetY=Math.max(0,(scaledHeight-imageDisplayHeight)/2);return{maxOffsetX,maxOffsetY}},[zoomLevel]);const handleLightboxDragStart=useCallback(e=>{if(zoomLevel<=1)return;setIsDraggingLightbox(true);const{clientX,clientY}=getDragClientPoint(e);setDragStart({x:clientX-position.x,y:clientY-position.y})},[zoomLevel,position]);const handleLightboxDrag=useCallback(e=>{if(!isDraggingLightbox||zoomLevel<=1)return;const{clientX,clientY}=getDragClientPoint(e);let newX=clientX-dragStart.x;let newY=clientY-dragStart.y;newX=Math.max(-dragBounds.maxOffsetX,Math.min(dragBounds.maxOffsetX,newX));newY=Math.max(-dragBounds.maxOffsetY,Math.min(dragBounds.maxOffsetY,newY));setPosition({x:newX,y:newY})},[isDraggingLightbox,zoomLevel,dragStart,dragBounds]);const handleLightboxDragEnd=useCallback(()=>{setIsDraggingLightbox(false)},[]);const handleDownload=useCallback(async()=>{const imageUrl=images[lightboxIndex];if(!imageUrl)return;if(onDownload){const originalUrl2=getOriginalImageUrl(imageUrl);await onDownload(originalUrl2,lightboxIndex);return}const filename=filenames?.[lightboxIndex];const routeUrl=imageDownloadUrl(imageUrl,filename);if(routeUrl){const anchor=document.createElement("a");anchor.href=routeUrl;anchor.rel="noopener";anchor.click();return}const originalUrl=getOriginalImageUrl(imageUrl);await downloadImageAsFile(originalUrl,filename)},[images,lightboxIndex,onDownload,filenames,imageDownloadUrl]);const handleShare=useCallback(async()=>{const imageUrl=images[lightboxIndex];if(!imageUrl)return;if(onShare){await onShare(imageUrl,lightboxIndex);return}if(navigator.share){try{await navigator.share({title:ui.imageShareTitle,text:ui.imageShareText,url:imageUrl})}catch{}}else{try{await navigator.clipboard.writeText(imageUrl)}catch{}}},[images,lightboxIndex,onShare]);return{lightboxOpen,lightboxIndex,zoomLevel,position,isDraggingLightbox,openLightbox,closeLightbox,setLightboxIndex,prevImage,nextImage,zoomIn,zoomOut,resetZoom,handleLightboxDragStart,handleLightboxDrag,handleLightboxDragEnd,handleDownload,handleShare}}export{ELEMENTS_PDFJS_BASE_URL,setPdfjsAssetBase,pdfjsCMapUrl,pdfjsStandardFontDataUrl,configurePdfjsWorker,lockPageScroll,MIN_ZOOM,MAX_ZOOM,LIGHTBOX_BUTTON_BASE,LIGHTBOX_BUTTON_DISABLED,LIGHTBOX_ZOOM_RESET_BUTTON,useImageLightbox};
2
- //# sourceMappingURL=chunk-NOCGHD2O.js.map