cloudcommerce 0.33.5 → 0.35.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 (320) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/action.yml +11 -3
  3. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  4. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  5. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  6. package/ecomplus-stores/barra-doce/package.json +2 -2
  7. package/package.json +7 -7
  8. package/packages/api/lib/api.js +1 -1
  9. package/packages/api/lib/api.js.map +1 -1
  10. package/packages/api/package.json +1 -1
  11. package/packages/api/src/api.ts +1 -1
  12. package/packages/apps/affilate-program/lib/events-to-affilate-program.js.map +1 -1
  13. package/packages/apps/affilate-program/package.json +2 -2
  14. package/packages/apps/correios/package.json +2 -2
  15. package/packages/apps/custom-payment/lib/custom-payment-create-transaction.js.map +1 -1
  16. package/packages/apps/custom-payment/lib/custom-payment-list-payments.js.map +1 -1
  17. package/packages/apps/custom-payment/package.json +1 -1
  18. package/packages/apps/custom-shipping/package.json +1 -1
  19. package/packages/apps/datafrete/lib/datafrete-webhook.js.map +1 -1
  20. package/packages/apps/datafrete/package.json +2 -2
  21. package/packages/apps/discounts/package.json +1 -1
  22. package/packages/apps/emails/lib/events-to-app-emails.js.map +1 -1
  23. package/packages/apps/emails/lib/functios-lib/abandoned-carts.js.map +1 -1
  24. package/packages/apps/emails/lib/functios-lib/handle-orders.js.map +1 -1
  25. package/packages/apps/emails/package.json +2 -2
  26. package/packages/apps/fb-conversions/lib/fb-conversions-events.js.map +1 -1
  27. package/packages/apps/fb-conversions/lib/functions-lib/create-fb-objects.js.map +1 -1
  28. package/packages/apps/fb-conversions/package.json +2 -2
  29. package/packages/apps/flash-courier/package.json +1 -1
  30. package/packages/apps/frenet/lib/functions-lib/database.js.map +1 -1
  31. package/packages/apps/frenet/lib/functions-lib/events-to-frenet.js.map +1 -1
  32. package/packages/apps/frenet/lib/functions-lib/remove-delivered.js.map +1 -1
  33. package/packages/apps/frenet/lib/functions-lib/tracking-codes.js.map +1 -1
  34. package/packages/apps/frenet/lib/functions-lib/update-fulfillments.js.map +1 -1
  35. package/packages/apps/frenet/package.json +2 -2
  36. package/packages/apps/galaxpay/lib/functions-lib/all-parses.js.map +1 -1
  37. package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js.map +1 -1
  38. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.js.map +1 -1
  39. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-axios.js.map +1 -1
  40. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/gerate-token.js.map +1 -1
  41. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.js.map +1 -1
  42. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js.map +1 -1
  43. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.d.ts +1 -0
  44. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js.map +1 -1
  45. package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js +2 -2
  46. package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js.map +1 -1
  47. package/packages/apps/galaxpay/lib/galaxpay-events.js.map +1 -1
  48. package/packages/apps/galaxpay/lib/galaxpay-list-payments.js +1 -1
  49. package/packages/apps/galaxpay/lib/galaxpay-list-payments.js.map +1 -1
  50. package/packages/apps/galaxpay/package.json +2 -2
  51. package/packages/apps/google-analytics/lib/google-analytics-events.js +4 -4
  52. package/packages/apps/google-analytics/lib/google-analytics-events.js.map +1 -1
  53. package/packages/apps/google-analytics/package.json +2 -2
  54. package/packages/apps/google-analytics/src/google-analytics-events.ts +4 -4
  55. package/packages/apps/jadlog/package.json +1 -1
  56. package/packages/apps/loyalty-points/lib/functions-lib/cron-add-points.js.map +1 -1
  57. package/packages/apps/loyalty-points/lib/functions-lib/get-program-id.js.map +1 -1
  58. package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js.map +1 -1
  59. package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js.map +1 -1
  60. package/packages/apps/loyalty-points/lib/loyalty-list-payments.js.map +1 -1
  61. package/packages/apps/loyalty-points/lib/loyalty-points-events.js.map +1 -1
  62. package/packages/apps/loyalty-points/package.json +1 -1
  63. package/packages/apps/mandae/package.json +1 -1
  64. package/packages/apps/melhor-envio/lib/functions-lib/database.js.map +1 -1
  65. package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js.map +1 -1
  66. package/packages/apps/melhor-envio/lib/functions-lib/new-label.js.map +1 -1
  67. package/packages/apps/melhor-envio/lib/functions-lib/order-is-valid.js.map +1 -1
  68. package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js.map +1 -1
  69. package/packages/apps/melhor-envio/package.json +2 -2
  70. package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +1 -1
  71. package/packages/apps/mercadopago/lib/mp-list-payments.js.map +1 -1
  72. package/packages/apps/mercadopago/lib/mp-webhook.js.map +1 -1
  73. package/packages/apps/mercadopago/package.json +2 -2
  74. package/packages/apps/pagarme/lib/functions-lib/add-installments.js.map +1 -1
  75. package/packages/apps/pagarme/lib/functions-lib/parse-status-to-ecom.js.map +1 -1
  76. package/packages/apps/pagarme/lib/pagarme-create-transaction.js.map +1 -1
  77. package/packages/apps/pagarme/lib/pagarme-list-payments.js.map +1 -1
  78. package/packages/apps/pagarme/lib/pagarme-webhook.js.map +1 -1
  79. package/packages/apps/pagarme/package.json +2 -2
  80. package/packages/apps/pagarme-v5/lib/pagarme-v5-events.js.map +1 -1
  81. package/packages/apps/pagarme-v5/package.json +2 -2
  82. package/packages/apps/paghiper/lib/functions-lib/handle-webhook.d.ts +1 -0
  83. package/packages/apps/paghiper/lib/functions-lib/handle-webhook.js.map +1 -1
  84. package/packages/apps/paghiper/lib/paghiper-create-transaction.js.map +1 -1
  85. package/packages/apps/paghiper/lib/paghiper-list-payments.js.map +1 -1
  86. package/packages/apps/paghiper/lib/paghiper-webhook.js.map +1 -1
  87. package/packages/apps/paghiper/package.json +2 -2
  88. package/packages/apps/pix/lib/functions-lib/get-certificate.js.map +1 -1
  89. package/packages/apps/pix/lib/functions-lib/pix-auth/construtor.js.map +1 -1
  90. package/packages/apps/pix/lib/functions-lib/pix-auth/create-axios.js.map +1 -1
  91. package/packages/apps/pix/lib/functions-lib/pix-auth/oauth.js.map +1 -1
  92. package/packages/apps/pix/lib/pix-create-transaction.js.map +1 -1
  93. package/packages/apps/pix/lib/pix-list-payments.js.map +1 -1
  94. package/packages/apps/pix/lib/pix-webhook.js.map +1 -1
  95. package/packages/apps/pix/package.json +2 -2
  96. package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -1
  97. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -1
  98. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  99. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js.map +1 -1
  100. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  101. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  102. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  103. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  104. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  105. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  106. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js.map +1 -1
  107. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js.map +1 -1
  108. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js.map +1 -1
  109. package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +1 -1
  110. package/packages/apps/tiny-erp/package.json +2 -2
  111. package/packages/apps/webhooks/lib/events-to-webhooks-app.js.map +1 -1
  112. package/packages/apps/webhooks/package.json +2 -2
  113. package/packages/cli/package.json +1 -1
  114. package/packages/config/lib/config.js.map +1 -1
  115. package/packages/config/lib/env.js.map +1 -1
  116. package/packages/config/package.json +1 -1
  117. package/packages/emails/lib/index.js.map +1 -1
  118. package/packages/emails/lib/parse-template-to-html.js.map +1 -1
  119. package/packages/emails/lib/providers/sendgrid/index.js.map +1 -1
  120. package/packages/emails/lib/providers/sendgrid/parse-to-data.js.map +1 -1
  121. package/packages/emails/lib/providers/smtp/index.js.map +1 -1
  122. package/packages/emails/package.json +1 -1
  123. package/packages/eslint/package.json +1 -1
  124. package/packages/events/package.json +2 -2
  125. package/packages/feeds/lib/firebase/serve-feeds.js.map +1 -1
  126. package/packages/feeds/package.json +1 -1
  127. package/packages/firebase/lib/config.js.map +1 -1
  128. package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
  129. package/packages/firebase/lib/helpers/pubsub.js.map +1 -1
  130. package/packages/firebase/lib/helpers/update-app-data.js.map +1 -1
  131. package/packages/firebase/package.json +2 -2
  132. package/packages/i18n/package.json +1 -1
  133. package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
  134. package/packages/modules/lib/firebase/checkout.js.map +1 -1
  135. package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -1
  136. package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -1
  137. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
  138. package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
  139. package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
  140. package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
  141. package/packages/modules/lib/firebase/handle-module.js.map +1 -1
  142. package/packages/modules/lib/firebase/serve-modules-api.js.map +1 -1
  143. package/packages/modules/lib/firebase.js.map +1 -1
  144. package/packages/modules/package.json +2 -2
  145. package/packages/passport/lib/firebase/authenticate-customer.js.map +1 -1
  146. package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
  147. package/packages/passport/lib/firebase.js.map +1 -1
  148. package/packages/passport/package.json +2 -2
  149. package/packages/ssr/lib/analytics/send-to-ga4.js +44 -0
  150. package/packages/ssr/lib/analytics/send-to-ga4.js.map +1 -0
  151. package/packages/ssr/lib/analytics/send-to-meta.js +44 -0
  152. package/packages/ssr/lib/analytics/send-to-meta.js.map +1 -0
  153. package/packages/ssr/lib/analytics/send-to-tiktok.js +44 -0
  154. package/packages/ssr/lib/analytics/send-to-tiktok.js.map +1 -0
  155. package/packages/ssr/lib/analytics-events.js +52 -24
  156. package/packages/ssr/lib/analytics-events.js.map +1 -1
  157. package/packages/ssr/lib/firebase/serve-storefront.js +16 -3
  158. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  159. package/packages/ssr/package.json +6 -6
  160. package/packages/ssr/src/analytics/send-to-ga4.ts +56 -0
  161. package/packages/ssr/src/analytics/send-to-meta.ts +50 -0
  162. package/packages/ssr/src/analytics/send-to-tiktok.ts +49 -0
  163. package/packages/ssr/src/analytics-events.ts +57 -27
  164. package/packages/ssr/src/firebase/serve-storefront.ts +17 -3
  165. package/packages/storefront/.auto-imports.d.ts +1 -1
  166. package/packages/storefront/astro.config.mjs +5 -10
  167. package/packages/storefront/config/astro/mock-pwa-info.mjs +2 -0
  168. package/packages/storefront/dist/client/_astro/AccountPage.77d861e9.js +1 -0
  169. package/packages/storefront/dist/client/_astro/CartSidebar.005ec337.js +1 -0
  170. package/packages/storefront/dist/client/_astro/HeroSlider.b35ac2f9.js +1 -0
  171. package/packages/storefront/dist/client/_astro/PitchBar.7965ce11.js +1 -0
  172. package/packages/storefront/dist/client/_astro/Prices.862d15eb.js +1 -0
  173. package/packages/storefront/dist/client/_astro/ProductDetails.120b6513.js +1 -0
  174. package/packages/storefront/dist/client/_astro/ProductShelf.4a2f57cf.js +1 -0
  175. package/packages/storefront/dist/client/_astro/QuantitySelector.d7dd044c.js +1 -0
  176. package/packages/storefront/dist/client/_astro/SearchModal.0bf88bcc.js +1 -0
  177. package/packages/storefront/dist/client/_astro/ShopHeader.57302617.js +4 -0
  178. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.d927d271.js +1 -0
  179. package/packages/storefront/dist/client/_astro/_slug_.f458f318.css +1 -0
  180. package/packages/storefront/dist/client/_astro/afetch.f4507208.js +1 -0
  181. package/packages/storefront/dist/client/_astro/client.409c434f.js +1 -0
  182. package/packages/storefront/dist/client/_astro/customer-session.68901b4c.js +1 -0
  183. package/packages/storefront/dist/client/_astro/ecom-utils.f65876ca.js +1 -0
  184. package/packages/storefront/dist/client/_astro/firebase-app.992a296f.js +16 -0
  185. package/packages/storefront/dist/client/_astro/format-money.db179bca.js +1 -0
  186. package/packages/storefront/dist/client/_astro/hoisted.719d11e3.js +1 -0
  187. package/packages/storefront/dist/client/_astro/hoisted.f4c55052.js +1 -0
  188. package/packages/storefront/dist/client/_astro/i18n.614beec4.js +1 -0
  189. package/packages/storefront/dist/client/_astro/img-sizes.41e0efe4.js +1 -0
  190. package/packages/storefront/dist/client/_astro/img.27573b8b.js +1 -0
  191. package/packages/storefront/dist/client/_astro/{firebase-app.3f59f3c7.js → index-61e5ac61.bdc8d0cd.js} +129 -99
  192. package/packages/storefront/dist/client/_astro/index.aac4c53d.js +1 -0
  193. package/packages/storefront/dist/client/_astro/index.d93220be.js +1 -0
  194. package/packages/storefront/dist/client/_astro/modules-info.4373e917.js +1 -0
  195. package/packages/storefront/dist/client/_astro/name.2999355b.js +1 -0
  196. package/packages/storefront/dist/client/_astro/photoswipe-lightbox.esm.c157838f.js +4 -0
  197. package/packages/storefront/dist/client/_astro/photoswipe.01431ec7.js +2 -0
  198. package/packages/storefront/dist/client/_astro/photoswipe.esm.92c2d901.js +4 -0
  199. package/packages/storefront/dist/client/_astro/price.04ceb6c4.js +1 -0
  200. package/packages/storefront/dist/client/_astro/sf-utils.b04e1813.js +1 -0
  201. package/packages/storefront/dist/client/_astro/shopping-cart.608866aa.js +1 -0
  202. package/packages/storefront/dist/client/_astro/use-analytics.205d2b8f.js +1 -0
  203. package/packages/storefront/dist/client/_astro/use-product-card.cc44716b.js +1 -0
  204. package/packages/storefront/dist/client/robots.txt +1 -1
  205. package/packages/storefront/dist/server/chunks/CartSidebar_6cb69be3.mjs +203 -0
  206. package/packages/storefront/dist/server/chunks/SearchModal_930845a4.mjs +18 -0
  207. package/packages/storefront/dist/server/chunks/_.._07cccbbe.mjs +6 -0
  208. package/packages/storefront/dist/server/chunks/account_e71f4214.mjs +6 -0
  209. package/packages/storefront/dist/server/chunks/astro/assets-service_a9d9ab5f.mjs +544 -0
  210. package/packages/storefront/dist/server/chunks/{astro.708269c6.mjs → astro_d98f7186.mjs} +214 -1878
  211. package/packages/storefront/dist/server/chunks/index_414d53c7.mjs +6 -0
  212. package/packages/storefront/dist/server/chunks/index_a7b0afbf.mjs +6 -0
  213. package/packages/storefront/dist/server/chunks/node_7efff4d0.mjs +6 -0
  214. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0808946e.mjs → __e7ddf925.mjs} +2019 -1017
  215. package/packages/storefront/dist/server/chunks/pages/account_f14e6f5a.mjs +28 -0
  216. package/packages/storefront/dist/server/chunks/pages/index_b300d887.mjs +316 -0
  217. package/packages/storefront/dist/server/chunks/pages/node_2b0cb889.mjs +93 -0
  218. package/packages/storefront/dist/server/chunks/pages/~fallback_2bbdf875.mjs +40 -0
  219. package/packages/storefront/dist/server/chunks/photoswipe_9528923e.mjs +3 -0
  220. package/packages/storefront/dist/server/chunks/~fallback_43c17ff0.mjs +6 -0
  221. package/packages/storefront/dist/server/entry.mjs +1012 -2526
  222. package/packages/storefront/dist/server/manifest_4dba1382.mjs +1069 -0
  223. package/packages/storefront/dist/server/renderers.mjs +335 -51
  224. package/packages/storefront/package.json +11 -13
  225. package/packages/storefront/src/env.d.ts +1 -1
  226. package/packages/storefront/src/images/get-built-image.ts +36 -8
  227. package/packages/storefront/src/images/get-built-picture.ts +3 -130
  228. package/packages/storefront/src/images/picture-base.ts +135 -0
  229. package/packages/storefront/src/images/use-ssr-picture.ts +18 -10
  230. package/packages/storefront/src/lib/assets/forms.css +35 -30
  231. package/packages/storefront/src/lib/components/Carousel.vue +3 -1
  232. package/packages/storefront/src/lib/components/CarouselControl.vue +1 -1
  233. package/packages/storefront/src/lib/components/Drawer.vue +45 -7
  234. package/packages/storefront/src/lib/components/Picture.astro +47 -4
  235. package/packages/storefront/src/lib/components/globals/Fade.vue +1 -1
  236. package/packages/storefront/src/lib/composables/use-product-shelf.ts +1 -1
  237. package/packages/storefront/src/lib/scripts/vbeta-app.ts +25 -15
  238. package/packages/storefront/src/lib/state/search-engine.ts +101 -0
  239. package/packages/storefront/src/lib/state/shopping-cart.ts +52 -65
  240. package/packages/storefront/src/lib/state/use-analytics.ts +2 -1
  241. package/packages/storefront/src/lib/state/use-storage.ts +5 -2
  242. package/packages/test-base/lib/endpoints.js.map +1 -1
  243. package/packages/test-base/package.json +1 -1
  244. package/packages/types/package.json +1 -1
  245. package/packages/ssr/lib/analytics-providers/google-analytics.js +0 -48
  246. package/packages/ssr/lib/analytics-providers/google-analytics.js.map +0 -1
  247. package/packages/ssr/lib/analytics-providers/meta-conversions-api.js +0 -44
  248. package/packages/ssr/lib/analytics-providers/meta-conversions-api.js.map +0 -1
  249. package/packages/ssr/src/analytics-providers/google-analytics.ts +0 -67
  250. package/packages/ssr/src/analytics-providers/meta-conversions-api.ts +0 -57
  251. package/packages/storefront/dist/client/_astro/Carousel.4bf71bce.js +0 -1
  252. package/packages/storefront/dist/client/_astro/CartSidebar.05b12b39.js +0 -1
  253. package/packages/storefront/dist/client/_astro/HeroSlider.fe108a14.js +0 -1
  254. package/packages/storefront/dist/client/_astro/PitchBar.2c821b77.js +0 -1
  255. package/packages/storefront/dist/client/_astro/Prices.78eb0a61.js +0 -1
  256. package/packages/storefront/dist/client/_astro/ProductShelf.46d8a51c.js +0 -1
  257. package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +0 -1
  258. package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +0 -4
  259. package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +0 -1
  260. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +0 -1
  261. package/packages/storefront/dist/client/_astro/api.a2eda23e.js +0 -1
  262. package/packages/storefront/dist/client/_astro/client.e6d9439a.js +0 -1
  263. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  264. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  265. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  266. package/packages/storefront/dist/client/_astro/format-money.923559cc.js +0 -1
  267. package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
  268. package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
  269. package/packages/storefront/dist/client/_astro/hoisted.648beb9d.js +0 -1
  270. package/packages/storefront/dist/client/_astro/img.ec6ba316.js +0 -1
  271. package/packages/storefront/dist/client/_astro/index.fadf28bd.js +0 -1
  272. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  273. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  274. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  275. package/packages/storefront/dist/client/_astro/modules-info.df822732.js +0 -1
  276. package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
  277. package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
  278. package/packages/storefront/dist/client/_astro/preload-helper.cf010ec4.js +0 -1
  279. package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
  280. package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
  281. package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
  282. package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
  283. package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
  284. package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
  285. package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
  286. package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
  287. package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
  288. package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
  289. package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
  290. package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
  291. package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
  292. package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
  293. package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
  294. package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
  295. package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
  296. package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
  297. package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
  298. package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
  299. package/packages/storefront/dist/client/_astro/session-utm.744b0db3.js +0 -1
  300. package/packages/storefront/dist/client/_astro/workbox-window.prod.es5.a7b12eab.js +0 -2
  301. package/packages/storefront/dist/client/manifest.webmanifest +0 -1
  302. package/packages/storefront/dist/client/sw.js +0 -1
  303. package/packages/storefront/dist/client/workbox-1b331600.js +0 -1
  304. package/packages/storefront/dist/client/~fallback.html +0 -67
  305. package/packages/storefront/dist/client/~index.html +0 -113
  306. package/packages/storefront/dist/server/chunks/CartSidebar.4179ad81.mjs +0 -386
  307. package/packages/storefront/dist/server/chunks/SearchModal.146ce2f7.mjs +0 -37
  308. package/packages/storefront/dist/server/chunks/_...05c626ea.mjs +0 -28
  309. package/packages/storefront/dist/server/chunks/account@_@astro.5eaddaf8.mjs +0 -28
  310. package/packages/storefront/dist/server/chunks/index@_@astro.25a343cc.mjs +0 -28
  311. package/packages/storefront/dist/server/chunks/index@_@astro.2d2f2e33.mjs +0 -28
  312. package/packages/storefront/dist/server/chunks/pages/account.astro.32e7e6ef.mjs +0 -23
  313. package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +0 -186
  314. package/packages/storefront/dist/server/chunks/pages/~fallback.astro.84d4765b.mjs +0 -49
  315. package/packages/storefront/dist/server/chunks/~fallback@_@astro.86d710c3.mjs +0 -28
  316. package/packages/storefront/dist/server/images.dist.csv +0 -30
  317. package/packages/storefront/dist/server/images.src.csv +0 -11
  318. package/packages/storefront/dist/server/manifest.webmanifest +0 -1
  319. package/packages/storefront/dist/server/registerSW.js +0 -1
  320. package/packages/storefront/dist/server/static-builds.csv +0 -51
@@ -1,2438 +1,1076 @@
1
- import { performance } from 'node:perf_hooks';
2
- import { webcrypto } from 'node:crypto';
3
- import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
4
- import { File, FormData, Headers, Request, Response, fetch } from 'undici';
5
- import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
6
- import { N as NodeApp, h as deserializeManifest } from './chunks/astro.708269c6.mjs';
7
- import { Readable } from 'stream';
1
+ import fs from 'node:fs';
2
+ import http from 'node:http';
3
+ import { TLSSocket } from 'node:tls';
4
+ import { appendForwardSlash as appendForwardSlash$1, joinPaths, slash, prependForwardSlash, removeTrailingForwardSlash, collapseDuplicateSlashes } from '@astrojs/internal-helpers/path';
5
+ import 'cookie';
6
+ import { l as levels, d as dateTimeFormat, A as AstroCookies, c as computePreferredLocale, a as computePreferredLocaleList, b as computeCurrentLocale, r as routeIsRedirect, e as redirectRouteStatus, f as redirectRouteGenerate, g as routeIsFallback, h as attachCookiesToResponse, i as createAPIContext, j as callEndpoint, k as callMiddleware, L as Logger, m as AstroIntegrationLogger, R as RouteCache, n as getSetCookiesFromResponse, o as createRenderContext, manifest } from './manifest_4dba1382.mjs';
7
+ import { yellow, dim, bold, cyan, red, reset } from 'kleur/colors';
8
+ import { A as AstroError, R as ReservedSlotName, k as renderSlotToString, o as renderJSX, p as chunkToString, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, q as ResponseSentError, t as CantRenderPage, v as renderPage$1 } from './chunks/astro_d98f7186.mjs';
9
+ import 'clsx';
10
+ import buffer from 'node:buffer';
11
+ import crypto from 'node:crypto';
8
12
  import https from 'https';
9
13
  import path from 'node:path';
10
14
  import { fileURLToPath } from 'node:url';
11
15
  import os from 'os';
12
- import fs from 'node:fs';
13
- import http from 'node:http';
14
16
  import send from 'send';
15
17
  import enableDestroy from 'server-destroy';
16
18
  import { renderers } from './renderers.mjs';
17
- import 'mime';
18
- import 'cookie';
19
- import 'kleur/colors';
20
- import '@astrojs/internal-helpers/path';
21
- import 'path-to-regexp';
22
- import 'node:tls';
23
- import 'string-width';
24
- import 'html-escaper';
25
- import 'vue';
26
- import 'vue/server-renderer';
27
- import '@ecomplus/utils';
28
- import './chunks/pages/_...slug_.astro.0808946e.mjs';
29
- import '@cloudcommerce/api';
30
- import 'node:events';
31
- import '@cloudcommerce/config';
32
- import 'ultrahtml';
33
- /* empty css */import '@vueuse/core';
34
- import '@headlessui/vue';
35
-
36
- /** Returns the function bound to the given object. */
37
- const __function_bind = Function.bind.bind(Function.call);
38
- /** Returns whether the object prototype exists in another object. */
39
- const __object_isPrototypeOf = Function.call.bind(Object.prototype.isPrototypeOf);
40
- /** Current high resolution millisecond timestamp. */
41
- const __performance_now = performance.now;
42
- // @ts-expect-error
43
- const INTERNALS = new WeakMap();
44
- const internalsOf = (target, className, propName) => {
45
- const internals = INTERNALS.get(target);
46
- if (!internals)
47
- throw new TypeError(`${className}.${propName} can only be used on instances of ${className}`);
48
- return internals;
49
- };
50
- const allowStringTag = (value) => (value.prototype[Symbol.toStringTag] = value.name);
51
-
52
- class DOMException extends Error {
53
- constructor(message = '', name = 'Error') {
54
- super(message);
55
- this.code = 0;
56
- this.name = name;
57
- }
58
- }
59
- DOMException.INDEX_SIZE_ERR = 1;
60
- DOMException.DOMSTRING_SIZE_ERR = 2;
61
- DOMException.HIERARCHY_REQUEST_ERR = 3;
62
- DOMException.WRONG_DOCUMENT_ERR = 4;
63
- DOMException.INVALID_CHARACTER_ERR = 5;
64
- DOMException.NO_DATA_ALLOWED_ERR = 6;
65
- DOMException.NO_MODIFICATION_ALLOWED_ERR = 7;
66
- DOMException.NOT_FOUND_ERR = 8;
67
- DOMException.NOT_SUPPORTED_ERR = 9;
68
- DOMException.INUSE_ATTRIBUTE_ERR = 10;
69
- DOMException.INVALID_STATE_ERR = 11;
70
- DOMException.SYNTAX_ERR = 12;
71
- DOMException.INVALID_MODIFICATION_ERR = 13;
72
- DOMException.NAMESPACE_ERR = 14;
73
- DOMException.INVALID_ACCESS_ERR = 15;
74
- DOMException.VALIDATION_ERR = 16;
75
- DOMException.TYPE_MISMATCH_ERR = 17;
76
- DOMException.SECURITY_ERR = 18;
77
- DOMException.NETWORK_ERR = 19;
78
- DOMException.ABORT_ERR = 20;
79
- DOMException.URL_MISMATCH_ERR = 21;
80
- DOMException.QUOTA_EXCEEDED_ERR = 22;
81
- DOMException.TIMEOUT_ERR = 23;
82
- DOMException.INVALID_NODE_TYPE_ERR = 24;
83
- DOMException.DATA_CLONE_ERR = 25;
84
- allowStringTag(DOMException);
85
-
86
- /**
87
- * Assert a condition.
88
- * @param condition The condition that it should satisfy.
89
- * @param message The error message.
90
- * @param args The arguments for replacing placeholders in the message.
91
- */
92
- function assertType(condition, message, ...args) {
93
- if (!condition) {
94
- throw new TypeError(format(message, args));
95
- }
96
- }
97
- /**
98
- * Convert a text and arguments to one string.
99
- * @param message The formating text
100
- * @param args The arguments.
101
- */
102
- function format(message, args) {
103
- let i = 0;
104
- return message.replace(/%[os]/gu, () => anyToString(args[i++]));
105
- }
106
- /**
107
- * Convert a value to a string representation.
108
- * @param x The value to get the string representation.
109
- */
110
- function anyToString(x) {
111
- if (typeof x !== "object" || x === null) {
112
- return String(x);
113
- }
114
- return Object.prototype.toString.call(x);
115
- }
116
-
117
- let currentErrorHandler;
118
- /**
119
- * Print a error message.
120
- * @param maybeError The error object.
121
- */
122
- function reportError(maybeError) {
123
- try {
124
- const error = maybeError instanceof Error
125
- ? maybeError
126
- : new Error(anyToString(maybeError));
127
- // Call the user-defined error handler if exists.
128
- if (currentErrorHandler) ;
129
- // Dispatch an `error` event if this is on a browser.
130
- if (typeof dispatchEvent === "function" &&
131
- typeof ErrorEvent === "function") {
132
- dispatchEvent(new ErrorEvent("error", { error, message: error.message }));
133
- }
134
- // Emit an `uncaughtException` event if this is on Node.js.
135
- //istanbul ignore else
136
- else if (typeof process !== "undefined" &&
137
- typeof process.emit === "function") {
138
- process.emit("uncaughtException", error);
139
- return;
140
- }
141
- // Otherwise, print the error.
142
- console.error(error);
143
- }
144
- catch (_a) {
145
- // ignore.
146
- }
147
- }
148
-
149
- let currentWarnHandler;
150
- /**
151
- * The warning information.
152
- */
153
- class Warning {
154
- constructor(code, message) {
155
- this.code = code;
156
- this.message = message;
157
- }
158
- /**
159
- * Report this warning.
160
- * @param args The arguments of the warning.
161
- */
162
- warn(...args) {
163
- var _a;
164
- try {
165
- // Call the user-defined warning handler if exists.
166
- if (currentWarnHandler) ;
167
- // Otherwise, print the warning.
168
- const stack = ((_a = new Error().stack) !== null && _a !== void 0 ? _a : "").replace(/^(?:.+?\n){2}/gu, "\n");
169
- console.warn(this.message, ...args, stack);
170
- }
171
- catch (_b) {
172
- // Ignore.
173
- }
174
- }
175
- }
176
-
177
- const InitEventWasCalledWhileDispatching = new Warning("W01", "Unable to initialize event under dispatching.");
178
- const FalsyWasAssignedToCancelBubble = new Warning("W02", "Assigning any falsy value to 'cancelBubble' property has no effect.");
179
- const TruthyWasAssignedToReturnValue = new Warning("W03", "Assigning any truthy value to 'returnValue' property has no effect.");
180
- const NonCancelableEventWasCanceled = new Warning("W04", "Unable to preventDefault on non-cancelable events.");
181
- const CanceledInPassiveListener = new Warning("W05", "Unable to preventDefault inside passive event listener invocation.");
182
- const EventListenerWasDuplicated = new Warning("W06", "An event listener wasn't added because it has been added already: %o, %o");
183
- const OptionWasIgnored = new Warning("W07", "The %o option value was abandoned because the event listener wasn't added as duplicated.");
184
- const InvalidEventListener = new Warning("W08", "The 'callback' argument must be a function or an object that has 'handleEvent' method: %o");
185
-
186
- /*eslint-disable class-methods-use-this */
187
- /**
188
- * An implementation of `Event` interface, that wraps a given event object.
189
- * `EventTarget` shim can control the internal state of this `Event` objects.
190
- * @see https://dom.spec.whatwg.org/#event
191
- */
192
- class Event {
193
- /**
194
- * @see https://dom.spec.whatwg.org/#dom-event-none
195
- */
196
- static get NONE() {
197
- return NONE;
198
- }
199
- /**
200
- * @see https://dom.spec.whatwg.org/#dom-event-capturing_phase
201
- */
202
- static get CAPTURING_PHASE() {
203
- return CAPTURING_PHASE;
204
- }
205
- /**
206
- * @see https://dom.spec.whatwg.org/#dom-event-at_target
207
- */
208
- static get AT_TARGET() {
209
- return AT_TARGET;
210
- }
211
- /**
212
- * @see https://dom.spec.whatwg.org/#dom-event-bubbling_phase
213
- */
214
- static get BUBBLING_PHASE() {
215
- return BUBBLING_PHASE;
216
- }
217
- /**
218
- * Initialize this event instance.
219
- * @param type The type of this event.
220
- * @param eventInitDict Options to initialize.
221
- * @see https://dom.spec.whatwg.org/#dom-event-event
222
- */
223
- constructor(type, eventInitDict) {
224
- Object.defineProperty(this, "isTrusted", {
225
- value: false,
226
- enumerable: true,
227
- });
228
- const opts = eventInitDict !== null && eventInitDict !== void 0 ? eventInitDict : {};
229
- internalDataMap.set(this, {
230
- type: String(type),
231
- bubbles: Boolean(opts.bubbles),
232
- cancelable: Boolean(opts.cancelable),
233
- composed: Boolean(opts.composed),
234
- target: null,
235
- currentTarget: null,
236
- stopPropagationFlag: false,
237
- stopImmediatePropagationFlag: false,
238
- canceledFlag: false,
239
- inPassiveListenerFlag: false,
240
- dispatchFlag: false,
241
- timeStamp: Date.now(),
242
- });
243
- }
244
- /**
245
- * The type of this event.
246
- * @see https://dom.spec.whatwg.org/#dom-event-type
247
- */
248
- get type() {
249
- return $(this).type;
250
- }
251
- /**
252
- * The event target of the current dispatching.
253
- * @see https://dom.spec.whatwg.org/#dom-event-target
254
- */
255
- get target() {
256
- return $(this).target;
257
- }
258
- /**
259
- * The event target of the current dispatching.
260
- * @deprecated Use the `target` property instead.
261
- * @see https://dom.spec.whatwg.org/#dom-event-srcelement
262
- */
263
- get srcElement() {
264
- return $(this).target;
265
- }
266
- /**
267
- * The event target of the current dispatching.
268
- * @see https://dom.spec.whatwg.org/#dom-event-currenttarget
269
- */
270
- get currentTarget() {
271
- return $(this).currentTarget;
272
- }
273
- /**
274
- * The event target of the current dispatching.
275
- * This doesn't support node tree.
276
- * @see https://dom.spec.whatwg.org/#dom-event-composedpath
277
- */
278
- composedPath() {
279
- const currentTarget = $(this).currentTarget;
280
- if (currentTarget) {
281
- return [currentTarget];
282
- }
283
- return [];
284
- }
285
- /**
286
- * @see https://dom.spec.whatwg.org/#dom-event-none
287
- */
288
- get NONE() {
289
- return NONE;
290
- }
291
- /**
292
- * @see https://dom.spec.whatwg.org/#dom-event-capturing_phase
293
- */
294
- get CAPTURING_PHASE() {
295
- return CAPTURING_PHASE;
296
- }
297
- /**
298
- * @see https://dom.spec.whatwg.org/#dom-event-at_target
299
- */
300
- get AT_TARGET() {
301
- return AT_TARGET;
302
- }
303
- /**
304
- * @see https://dom.spec.whatwg.org/#dom-event-bubbling_phase
305
- */
306
- get BUBBLING_PHASE() {
307
- return BUBBLING_PHASE;
308
- }
309
- /**
310
- * The current event phase.
311
- * @see https://dom.spec.whatwg.org/#dom-event-eventphase
312
- */
313
- get eventPhase() {
314
- return $(this).dispatchFlag ? 2 : 0;
315
- }
316
- /**
317
- * Stop event bubbling.
318
- * Because this shim doesn't support node tree, this merely changes the `cancelBubble` property value.
319
- * @see https://dom.spec.whatwg.org/#dom-event-stoppropagation
320
- */
321
- stopPropagation() {
322
- $(this).stopPropagationFlag = true;
323
- }
324
- /**
325
- * `true` if event bubbling was stopped.
326
- * @deprecated
327
- * @see https://dom.spec.whatwg.org/#dom-event-cancelbubble
328
- */
329
- get cancelBubble() {
330
- return $(this).stopPropagationFlag;
331
- }
332
- /**
333
- * Stop event bubbling if `true` is set.
334
- * @deprecated Use the `stopPropagation()` method instead.
335
- * @see https://dom.spec.whatwg.org/#dom-event-cancelbubble
336
- */
337
- set cancelBubble(value) {
338
- if (value) {
339
- $(this).stopPropagationFlag = true;
340
- }
341
- else {
342
- FalsyWasAssignedToCancelBubble.warn();
343
- }
344
- }
345
- /**
346
- * Stop event bubbling and subsequent event listener callings.
347
- * @see https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
348
- */
349
- stopImmediatePropagation() {
350
- const data = $(this);
351
- data.stopPropagationFlag = data.stopImmediatePropagationFlag = true;
352
- }
353
- /**
354
- * `true` if this event will bubble.
355
- * @see https://dom.spec.whatwg.org/#dom-event-bubbles
356
- */
357
- get bubbles() {
358
- return $(this).bubbles;
359
- }
360
- /**
361
- * `true` if this event can be canceled by the `preventDefault()` method.
362
- * @see https://dom.spec.whatwg.org/#dom-event-cancelable
363
- */
364
- get cancelable() {
365
- return $(this).cancelable;
366
- }
367
- /**
368
- * `true` if the default behavior will act.
369
- * @deprecated Use the `defaultPrevented` proeprty instead.
370
- * @see https://dom.spec.whatwg.org/#dom-event-returnvalue
371
- */
372
- get returnValue() {
373
- return !$(this).canceledFlag;
374
- }
375
- /**
376
- * Cancel the default behavior if `false` is set.
377
- * @deprecated Use the `preventDefault()` method instead.
378
- * @see https://dom.spec.whatwg.org/#dom-event-returnvalue
379
- */
380
- set returnValue(value) {
381
- if (!value) {
382
- setCancelFlag($(this));
383
- }
384
- else {
385
- TruthyWasAssignedToReturnValue.warn();
386
- }
387
- }
388
- /**
389
- * Cancel the default behavior.
390
- * @see https://dom.spec.whatwg.org/#dom-event-preventdefault
391
- */
392
- preventDefault() {
393
- setCancelFlag($(this));
394
- }
395
- /**
396
- * `true` if the default behavior was canceled.
397
- * @see https://dom.spec.whatwg.org/#dom-event-defaultprevented
398
- */
399
- get defaultPrevented() {
400
- return $(this).canceledFlag;
401
- }
402
- /**
403
- * @see https://dom.spec.whatwg.org/#dom-event-composed
404
- */
405
- get composed() {
406
- return $(this).composed;
407
- }
408
- /**
409
- * @see https://dom.spec.whatwg.org/#dom-event-istrusted
410
- */
411
- //istanbul ignore next
412
- get isTrusted() {
413
- return false;
414
- }
415
- /**
416
- * @see https://dom.spec.whatwg.org/#dom-event-timestamp
417
- */
418
- get timeStamp() {
419
- return $(this).timeStamp;
420
- }
421
- /**
422
- * @deprecated Don't use this method. The constructor did initialization.
423
- */
424
- initEvent(type, bubbles = false, cancelable = false) {
425
- const data = $(this);
426
- if (data.dispatchFlag) {
427
- InitEventWasCalledWhileDispatching.warn();
428
- return;
429
- }
430
- internalDataMap.set(this, {
431
- ...data,
432
- type: String(type),
433
- bubbles: Boolean(bubbles),
434
- cancelable: Boolean(cancelable),
435
- target: null,
436
- currentTarget: null,
437
- stopPropagationFlag: false,
438
- stopImmediatePropagationFlag: false,
439
- canceledFlag: false,
440
- });
441
- }
442
- }
443
- //------------------------------------------------------------------------------
444
- // Helpers
445
- //------------------------------------------------------------------------------
446
- const NONE = 0;
447
- const CAPTURING_PHASE = 1;
448
- const AT_TARGET = 2;
449
- const BUBBLING_PHASE = 3;
450
- /**
451
- * Private data for event wrappers.
452
- */
453
- const internalDataMap = new WeakMap();
454
- /**
455
- * Get private data.
456
- * @param event The event object to get private data.
457
- * @param name The variable name to report.
458
- * @returns The private data of the event.
459
- */
460
- function $(event, name = "this") {
461
- const retv = internalDataMap.get(event);
462
- assertType(retv != null, "'%s' must be an object that Event constructor created, but got another one: %o", name, event);
463
- return retv;
464
- }
465
- /**
466
- * https://dom.spec.whatwg.org/#set-the-canceled-flag
467
- * @param data private data.
468
- */
469
- function setCancelFlag(data) {
470
- if (data.inPassiveListenerFlag) {
471
- CanceledInPassiveListener.warn();
472
- return;
473
- }
474
- if (!data.cancelable) {
475
- NonCancelableEventWasCanceled.warn();
476
- return;
477
- }
478
- data.canceledFlag = true;
479
- }
480
- // Set enumerable
481
- Object.defineProperty(Event, "NONE", { enumerable: true });
482
- Object.defineProperty(Event, "CAPTURING_PHASE", { enumerable: true });
483
- Object.defineProperty(Event, "AT_TARGET", { enumerable: true });
484
- Object.defineProperty(Event, "BUBBLING_PHASE", { enumerable: true });
485
- const keys$1 = Object.getOwnPropertyNames(Event.prototype);
486
- for (let i = 0; i < keys$1.length; ++i) {
487
- if (keys$1[i] === "constructor") {
488
- continue;
489
- }
490
- Object.defineProperty(Event.prototype, keys$1[i], { enumerable: true });
491
- }
492
-
493
- /**
494
- * An implementation of `Event` interface, that wraps a given event object.
495
- * This class controls the internal state of `Event`.
496
- * @see https://dom.spec.whatwg.org/#interface-event
497
- */
498
- class EventWrapper extends Event {
499
- /**
500
- * Wrap a given event object to control states.
501
- * @param event The event-like object to wrap.
502
- */
503
- static wrap(event) {
504
- return new (getWrapperClassOf(event))(event);
505
- }
506
- constructor(event) {
507
- super(event.type, {
508
- bubbles: event.bubbles,
509
- cancelable: event.cancelable,
510
- composed: event.composed,
511
- });
512
- if (event.cancelBubble) {
513
- super.stopPropagation();
514
- }
515
- if (event.defaultPrevented) {
516
- super.preventDefault();
517
- }
518
- internalDataMap$1.set(this, { original: event });
519
- // Define accessors
520
- const keys = Object.keys(event);
521
- for (let i = 0; i < keys.length; ++i) {
522
- const key = keys[i];
523
- if (!(key in this)) {
524
- Object.defineProperty(this, key, defineRedirectDescriptor(event, key));
525
- }
526
- }
527
- }
528
- stopPropagation() {
529
- super.stopPropagation();
530
- const { original } = $$1(this);
531
- if ("stopPropagation" in original) {
532
- original.stopPropagation();
533
- }
534
- }
535
- get cancelBubble() {
536
- return super.cancelBubble;
537
- }
538
- set cancelBubble(value) {
539
- super.cancelBubble = value;
540
- const { original } = $$1(this);
541
- if ("cancelBubble" in original) {
542
- original.cancelBubble = value;
543
- }
544
- }
545
- stopImmediatePropagation() {
546
- super.stopImmediatePropagation();
547
- const { original } = $$1(this);
548
- if ("stopImmediatePropagation" in original) {
549
- original.stopImmediatePropagation();
550
- }
551
- }
552
- get returnValue() {
553
- return super.returnValue;
554
- }
555
- set returnValue(value) {
556
- super.returnValue = value;
557
- const { original } = $$1(this);
558
- if ("returnValue" in original) {
559
- original.returnValue = value;
560
- }
561
- }
562
- preventDefault() {
563
- super.preventDefault();
564
- const { original } = $$1(this);
565
- if ("preventDefault" in original) {
566
- original.preventDefault();
567
- }
568
- }
569
- get timeStamp() {
570
- const { original } = $$1(this);
571
- if ("timeStamp" in original) {
572
- return original.timeStamp;
573
- }
574
- return super.timeStamp;
575
- }
576
- }
577
- /**
578
- * Private data for event wrappers.
579
- */
580
- const internalDataMap$1 = new WeakMap();
581
- /**
582
- * Get private data.
583
- * @param event The event object to get private data.
584
- * @returns The private data of the event.
585
- */
586
- function $$1(event) {
587
- const retv = internalDataMap$1.get(event);
588
- assertType(retv != null, "'this' is expected an Event object, but got", event);
589
- return retv;
590
- }
591
- /**
592
- * Cache for wrapper classes.
593
- * @type {WeakMap<Object, Function>}
594
- * @private
595
- */
596
- const wrapperClassCache = new WeakMap();
597
- // Make association for wrappers.
598
- wrapperClassCache.set(Object.prototype, EventWrapper);
599
- /**
600
- * Get the wrapper class of a given prototype.
601
- * @param originalEvent The event object to wrap.
602
- */
603
- function getWrapperClassOf(originalEvent) {
604
- const prototype = Object.getPrototypeOf(originalEvent);
605
- if (prototype == null) {
606
- return EventWrapper;
607
- }
608
- let wrapper = wrapperClassCache.get(prototype);
609
- if (wrapper == null) {
610
- wrapper = defineWrapper(getWrapperClassOf(prototype), prototype);
611
- wrapperClassCache.set(prototype, wrapper);
612
- }
613
- return wrapper;
614
- }
615
- /**
616
- * Define new wrapper class.
617
- * @param BaseEventWrapper The base wrapper class.
618
- * @param originalPrototype The prototype of the original event.
619
- */
620
- function defineWrapper(BaseEventWrapper, originalPrototype) {
621
- class CustomEventWrapper extends BaseEventWrapper {
622
- }
623
- const keys = Object.keys(originalPrototype);
624
- for (let i = 0; i < keys.length; ++i) {
625
- Object.defineProperty(CustomEventWrapper.prototype, keys[i], defineRedirectDescriptor(originalPrototype, keys[i]));
626
- }
627
- return CustomEventWrapper;
628
- }
629
- /**
630
- * Get the property descriptor to redirect a given property.
631
- */
632
- function defineRedirectDescriptor(obj, key) {
633
- const d = Object.getOwnPropertyDescriptor(obj, key);
634
- return {
635
- get() {
636
- const original = $$1(this).original;
637
- const value = original[key];
638
- if (typeof value === "function") {
639
- return value.bind(original);
640
- }
641
- return value;
642
- },
643
- set(value) {
644
- const original = $$1(this).original;
645
- original[key] = value;
646
- },
647
- configurable: d.configurable,
648
- enumerable: d.enumerable,
649
- };
650
- }
651
-
652
- /**
653
- * Create a new listener.
654
- * @param callback The callback function.
655
- * @param capture The capture flag.
656
- * @param passive The passive flag.
657
- * @param once The once flag.
658
- * @param signal The abort signal.
659
- * @param signalListener The abort event listener for the abort signal.
660
- */
661
- function createListener(callback, capture, passive, once, signal, signalListener) {
662
- return {
663
- callback,
664
- flags: (capture ? 1 /* Capture */ : 0) |
665
- (passive ? 2 /* Passive */ : 0) |
666
- (once ? 4 /* Once */ : 0),
667
- signal,
668
- signalListener,
669
- };
670
- }
671
- /**
672
- * Set the `removed` flag to the given listener.
673
- * @param listener The listener to check.
674
- */
675
- function setRemoved(listener) {
676
- listener.flags |= 8 /* Removed */;
677
- }
678
- /**
679
- * Check if the given listener has the `capture` flag or not.
680
- * @param listener The listener to check.
681
- */
682
- function isCapture(listener) {
683
- return (listener.flags & 1 /* Capture */) === 1 /* Capture */;
684
- }
685
- /**
686
- * Check if the given listener has the `passive` flag or not.
687
- * @param listener The listener to check.
688
- */
689
- function isPassive(listener) {
690
- return (listener.flags & 2 /* Passive */) === 2 /* Passive */;
691
- }
692
- /**
693
- * Check if the given listener has the `once` flag or not.
694
- * @param listener The listener to check.
695
- */
696
- function isOnce(listener) {
697
- return (listener.flags & 4 /* Once */) === 4 /* Once */;
698
- }
699
- /**
700
- * Check if the given listener has the `removed` flag or not.
701
- * @param listener The listener to check.
702
- */
703
- function isRemoved(listener) {
704
- return (listener.flags & 8 /* Removed */) === 8 /* Removed */;
705
- }
706
- /**
707
- * Call an event listener.
708
- * @param listener The listener to call.
709
- * @param target The event target object for `thisArg`.
710
- * @param event The event object for the first argument.
711
- * @param attribute `true` if this callback is an event attribute handler.
712
- */
713
- function invokeCallback({ callback }, target, event) {
714
- try {
715
- if (typeof callback === "function") {
716
- callback.call(target, event);
717
- }
718
- else if (typeof callback.handleEvent === "function") {
719
- callback.handleEvent(event);
720
- }
721
- }
722
- catch (thrownError) {
723
- reportError(thrownError);
724
- }
725
- }
726
-
727
- /**
728
- * Find the index of given listener.
729
- * This returns `-1` if not found.
730
- * @param list The listener list.
731
- * @param callback The callback function to find.
732
- * @param capture The capture flag to find.
733
- */
734
- function findIndexOfListener({ listeners }, callback, capture) {
735
- for (let i = 0; i < listeners.length; ++i) {
736
- if (listeners[i].callback === callback &&
737
- isCapture(listeners[i]) === capture) {
738
- return i;
739
- }
740
- }
741
- return -1;
742
- }
743
- /**
744
- * Add the given listener.
745
- * Does copy-on-write if needed.
746
- * @param list The listener list.
747
- * @param callback The callback function.
748
- * @param capture The capture flag.
749
- * @param passive The passive flag.
750
- * @param once The once flag.
751
- * @param signal The abort signal.
752
- */
753
- function addListener(list, callback, capture, passive, once, signal) {
754
- let signalListener;
755
- if (signal) {
756
- signalListener = removeListener.bind(null, list, callback, capture);
757
- signal.addEventListener("abort", signalListener);
758
- }
759
- const listener = createListener(callback, capture, passive, once, signal, signalListener);
760
- if (list.cow) {
761
- list.cow = false;
762
- list.listeners = [...list.listeners, listener];
763
- }
764
- else {
765
- list.listeners.push(listener);
766
- }
767
- return listener;
768
- }
769
- /**
770
- * Remove a listener.
771
- * @param list The listener list.
772
- * @param callback The callback function to find.
773
- * @param capture The capture flag to find.
774
- * @returns `true` if it mutated the list directly.
775
- */
776
- function removeListener(list, callback, capture) {
777
- const index = findIndexOfListener(list, callback, capture);
778
- if (index !== -1) {
779
- return removeListenerAt(list, index);
780
- }
781
- return false;
782
- }
783
- /**
784
- * Remove a listener.
785
- * @param list The listener list.
786
- * @param index The index of the target listener.
787
- * @param disableCow Disable copy-on-write if true.
788
- * @returns `true` if it mutated the `listeners` array directly.
789
- */
790
- function removeListenerAt(list, index, disableCow = false) {
791
- const listener = list.listeners[index];
792
- // Set the removed flag.
793
- setRemoved(listener);
794
- // Dispose the abort signal listener if exists.
795
- if (listener.signal) {
796
- listener.signal.removeEventListener("abort", listener.signalListener);
797
- }
798
- // Remove it from the array.
799
- if (list.cow && !disableCow) {
800
- list.cow = false;
801
- list.listeners = list.listeners.filter((_, i) => i !== index);
802
- return false;
803
- }
804
- list.listeners.splice(index, 1);
805
- return true;
806
- }
807
-
808
- /**
809
- * Create a new `ListenerListMap` object.
810
- */
811
- function createListenerListMap() {
812
- return Object.create(null);
813
- }
814
- /**
815
- * Get the listener list of the given type.
816
- * If the listener list has not been initialized, initialize and return it.
817
- * @param listenerMap The listener list map.
818
- * @param type The event type to get.
819
- */
820
- function ensureListenerList(listenerMap, type) {
821
- var _a;
822
- return ((_a = listenerMap[type]) !== null && _a !== void 0 ? _a : (listenerMap[type] = {
823
- attrCallback: undefined,
824
- attrListener: undefined,
825
- cow: false,
826
- listeners: [],
827
- }));
828
- }
829
19
 
830
- /**
831
- * An implementation of the `EventTarget` interface.
832
- * @see https://dom.spec.whatwg.org/#eventtarget
833
- */
834
- class EventTarget {
835
- /**
836
- * Initialize this instance.
837
- */
838
- constructor() {
839
- internalDataMap$2.set(this, createListenerListMap());
840
- }
841
- // Implementation
842
- addEventListener(type0, callback0, options0) {
843
- const listenerMap = $$2(this);
844
- const { callback, capture, once, passive, signal, type, } = normalizeAddOptions(type0, callback0, options0);
845
- if (callback == null || (signal === null || signal === void 0 ? void 0 : signal.aborted)) {
846
- return;
847
- }
848
- const list = ensureListenerList(listenerMap, type);
849
- // Find existing listener.
850
- const i = findIndexOfListener(list, callback, capture);
851
- if (i !== -1) {
852
- warnDuplicate(list.listeners[i], passive, once, signal);
853
- return;
854
- }
855
- // Add the new listener.
856
- addListener(list, callback, capture, passive, once, signal);
857
- }
858
- // Implementation
859
- removeEventListener(type0, callback0, options0) {
860
- const listenerMap = $$2(this);
861
- const { callback, capture, type } = normalizeOptions(type0, callback0, options0);
862
- const list = listenerMap[type];
863
- if (callback != null && list) {
864
- removeListener(list, callback, capture);
865
- }
866
- }
867
- // Implementation
868
- dispatchEvent(e) {
869
- const list = $$2(this)[String(e.type)];
870
- if (list == null) {
871
- return true;
872
- }
873
- const event = e instanceof Event ? e : EventWrapper.wrap(e);
874
- const eventData = $(event, "event");
875
- if (eventData.dispatchFlag) {
876
- throw new DOMException("This event has been in dispatching.");
877
- }
878
- eventData.dispatchFlag = true;
879
- eventData.target = eventData.currentTarget = this;
880
- if (!eventData.stopPropagationFlag) {
881
- const { cow, listeners } = list;
882
- // Set copy-on-write flag.
883
- list.cow = true;
884
- // Call listeners.
885
- for (let i = 0; i < listeners.length; ++i) {
886
- const listener = listeners[i];
887
- // Skip if removed.
888
- if (isRemoved(listener)) {
889
- continue;
890
- }
891
- // Remove this listener if has the `once` flag.
892
- if (isOnce(listener) && removeListenerAt(list, i, !cow)) {
893
- // Because this listener was removed, the next index is the
894
- // same as the current value.
895
- i -= 1;
896
- }
897
- // Call this listener with the `passive` flag.
898
- eventData.inPassiveListenerFlag = isPassive(listener);
899
- invokeCallback(listener, this, event);
900
- eventData.inPassiveListenerFlag = false;
901
- // Stop if the `event.stopImmediatePropagation()` method was called.
902
- if (eventData.stopImmediatePropagationFlag) {
903
- break;
904
- }
905
- }
906
- // Restore copy-on-write flag.
907
- if (!cow) {
908
- list.cow = false;
909
- }
910
- }
911
- eventData.target = null;
912
- eventData.currentTarget = null;
913
- eventData.stopImmediatePropagationFlag = false;
914
- eventData.stopPropagationFlag = false;
915
- eventData.dispatchFlag = false;
916
- return !eventData.canceledFlag;
917
- }
918
- }
919
- /**
920
- * Internal data.
921
- */
922
- const internalDataMap$2 = new WeakMap();
923
- /**
924
- * Get private data.
925
- * @param target The event target object to get private data.
926
- * @param name The variable name to report.
927
- * @returns The private data of the event.
928
- */
929
- function $$2(target, name = "this") {
930
- const retv = internalDataMap$2.get(target);
931
- assertType(retv != null, "'%s' must be an object that EventTarget constructor created, but got another one: %o", name, target);
932
- return retv;
933
- }
934
- /**
935
- * Normalize options.
936
- * @param options The options to normalize.
937
- */
938
- function normalizeAddOptions(type, callback, options) {
939
- var _a;
940
- assertCallback(callback);
941
- if (typeof options === "object" && options !== null) {
942
- return {
943
- type: String(type),
944
- callback: callback !== null && callback !== void 0 ? callback : undefined,
945
- capture: Boolean(options.capture),
946
- passive: Boolean(options.passive),
947
- once: Boolean(options.once),
948
- signal: (_a = options.signal) !== null && _a !== void 0 ? _a : undefined,
949
- };
950
- }
951
- return {
952
- type: String(type),
953
- callback: callback !== null && callback !== void 0 ? callback : undefined,
954
- capture: Boolean(options),
955
- passive: false,
956
- once: false,
957
- signal: undefined,
958
- };
959
- }
960
- /**
961
- * Normalize options.
962
- * @param options The options to normalize.
963
- */
964
- function normalizeOptions(type, callback, options) {
965
- assertCallback(callback);
966
- if (typeof options === "object" && options !== null) {
967
- return {
968
- type: String(type),
969
- callback: callback !== null && callback !== void 0 ? callback : undefined,
970
- capture: Boolean(options.capture),
971
- };
972
- }
973
- return {
974
- type: String(type),
975
- callback: callback !== null && callback !== void 0 ? callback : undefined,
976
- capture: Boolean(options),
977
- };
978
- }
979
- /**
980
- * Assert the type of 'callback' argument.
981
- * @param callback The callback to check.
982
- */
983
- function assertCallback(callback) {
984
- if (typeof callback === "function" ||
985
- (typeof callback === "object" &&
986
- callback !== null &&
987
- typeof callback.handleEvent === "function")) {
988
- return;
989
- }
990
- if (callback == null || typeof callback === "object") {
991
- InvalidEventListener.warn(callback);
992
- return;
993
- }
994
- throw new TypeError(format(InvalidEventListener.message, [callback]));
995
- }
996
- /**
997
- * Print warning for duplicated.
998
- * @param listener The current listener that is duplicated.
999
- * @param passive The passive flag of the new duplicated listener.
1000
- * @param once The once flag of the new duplicated listener.
1001
- * @param signal The signal object of the new duplicated listener.
1002
- */
1003
- function warnDuplicate(listener, passive, once, signal) {
1004
- EventListenerWasDuplicated.warn(isCapture(listener) ? "capture" : "bubble", listener.callback);
1005
- if (isPassive(listener) !== passive) {
1006
- OptionWasIgnored.warn("passive");
1007
- }
1008
- if (isOnce(listener) !== once) {
1009
- OptionWasIgnored.warn("once");
1010
- }
1011
- if (listener.signal !== signal) {
1012
- OptionWasIgnored.warn("signal");
1013
- }
1014
- }
1015
- // Set enumerable
1016
- const keys$1$1 = Object.getOwnPropertyNames(EventTarget.prototype);
1017
- for (let i = 0; i < keys$1$1.length; ++i) {
1018
- if (keys$1$1[i] === "constructor") {
1019
- continue;
1020
- }
1021
- Object.defineProperty(EventTarget.prototype, keys$1$1[i], { enumerable: true });
1022
- }
1023
-
1024
- function u(u,D){for(var t=0;t<D.length;t++){var F=D[t];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(u,F.key,F);}}function D(D,t,F){return t&&u(D.prototype,t),F&&u(D,F),D}function t(u,D){(null==D||D>u.length)&&(D=u.length);for(var t=0,F=new Array(D);t<D;t++)F[t]=u[t];return F}function F(u,D){var F="undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(F)return (F=F.call(u)).next.bind(F);if(Array.isArray(u)||(F=function(u,D){if(u){if("string"==typeof u)return t(u,D);var F=Object.prototype.toString.call(u).slice(8,-1);return "Object"===F&&u.constructor&&(F=u.constructor.name),"Map"===F||"Set"===F?Array.from(u):"Arguments"===F||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?t(u,D):void 0}}(u))||D&&u&&"number"==typeof u.length){F&&(u=F);var e=0;return function(){return e>=u.length?{done:!0}:{done:!1,value:u[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e=/(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,C=/(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])/;function A(u,D){return (D?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(u)}function E(u,D){void 0===D&&(D=!1);for(var t=[],F=0;F<u.length;){var E=u[F],n=function(e){if(!D)throw new TypeError(e);t.push({type:"INVALID_CHAR",index:F,value:u[F++]});};if("*"!==E)if("+"!==E&&"?"!==E)if("\\"!==E)if("{"!==E)if("}"!==E)if(":"!==E)if("("!==E)t.push({type:"CHAR",index:F,value:u[F++]});else {var r=1,i="",s=F+1,a=!1;if("?"===u[s]){n('Pattern cannot start with "?" at '+s);continue}for(;s<u.length;){if(!A(u[s],!1)){n("Invalid character '"+u[s]+"' at "+s+"."),a=!0;break}if("\\"!==u[s]){if(")"===u[s]){if(0==--r){s++;break}}else if("("===u[s]&&(r++,"?"!==u[s+1])){n("Capturing groups are not allowed at "+s),a=!0;break}i+=u[s++];}else i+=u[s++]+u[s++];}if(a)continue;if(r){n("Unbalanced pattern at "+F);continue}if(!i){n("Missing pattern at "+F);continue}t.push({type:"PATTERN",index:F,value:i}),F=s;}else {for(var B="",o=F+1;o<u.length;){var h=u.substr(o,1);if(!(o===F+1&&e.test(h)||o!==F+1&&C.test(h)))break;B+=u[o++];}if(!B){n("Missing parameter name at "+F);continue}t.push({type:"NAME",index:F,value:B}),F=o;}else t.push({type:"CLOSE",index:F,value:u[F++]});else t.push({type:"OPEN",index:F,value:u[F++]});else t.push({type:"ESCAPED_CHAR",index:F++,value:u[F++]});else t.push({type:"MODIFIER",index:F,value:u[F++]});else t.push({type:"ASTERISK",index:F,value:u[F++]});}return t.push({type:"END",index:F,value:""}),t}function n(u,D){void 0===D&&(D={});for(var t=E(u),F=D.prefixes,e=void 0===F?"./":F,C="[^"+r(D.delimiter||"/#?")+"]+?",A=[],n=0,i=0,s="",a=new Set,B=function(u){if(i<t.length&&t[i].type===u)return t[i++].value},o=function(){return B("MODIFIER")||B("ASTERISK")},h=function(u){var D=B(u);if(void 0!==D)return D;var F=t[i];throw new TypeError("Unexpected "+F.type+" at "+F.index+", expected "+u)},p=function(){for(var u,D="";u=B("CHAR")||B("ESCAPED_CHAR");)D+=u;return D},c=D.encodePart||function(u){return u};i<t.length;){var f=B("CHAR"),l=B("NAME"),m=B("PATTERN");if(l||m||!B("ASTERISK")||(m=".*"),l||m){var d=f||"";-1===e.indexOf(d)&&(s+=d,d=""),s&&(A.push(c(s)),s="");var g=l||n++;if(a.has(g))throw new TypeError("Duplicate name '"+g+"'.");a.add(g),A.push({name:g,prefix:c(d),suffix:"",pattern:m||C,modifier:o()||""});}else {var x=f||B("ESCAPED_CHAR");if(x)s+=x;else if(B("OPEN")){var S=p(),v=B("NAME")||"",y=B("PATTERN")||"";v||y||!B("ASTERISK")||(y=".*");var R=p();h("CLOSE");var k=o()||"";if(!v&&!y&&!k){s+=S;continue}if(!v&&!y&&!S)continue;s&&(A.push(c(s)),s=""),A.push({name:v||(y?n++:""),pattern:v&&!y?C:y,prefix:c(S),suffix:c(R),modifier:k});}else s&&(A.push(c(s)),s=""),h("END");}}return A}function r(u){return u.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function i(u){return u&&u.sensitive?"u":"ui"}function s(u,D,t){void 0===t&&(t={});for(var e,C=t.strict,A=void 0!==C&&C,E=t.start,n=void 0===E||E,s=t.end,a=void 0===s||s,B=t.encode,o=void 0===B?function(u){return u}:B,h="["+r(t.endsWith||"")+"]|$",p="["+r(t.delimiter||"/#?")+"]",c=n?"^":"",f=F(u);!(e=f()).done;){var l=e.value;if("string"==typeof l)c+=r(o(l));else {var m=r(o(l.prefix)),d=r(o(l.suffix));l.pattern?(D&&D.push(l),c+=m||d?"+"===l.modifier||"*"===l.modifier?"(?:"+m+"((?:"+l.pattern+")(?:"+d+m+"(?:"+l.pattern+"))*)"+d+")"+("*"===l.modifier?"?":""):"(?:"+m+"("+l.pattern+")"+d+")"+l.modifier:"+"===l.modifier||"*"===l.modifier?"((?:"+l.pattern+")"+l.modifier+")":"("+l.pattern+")"+l.modifier):c+="(?:"+m+d+")"+l.modifier;}}if(a)A||(c+=p+"?"),c+=t.endsWith?"(?="+h+")":"$";else {var g=u[u.length-1],x="string"==typeof g?p.indexOf(g[g.length-1])>-1:void 0===g;A||(c+="(?:"+p+"(?="+h+"))?"),x||(c+="(?="+p+"|"+h+")");}return new RegExp(c,i(t))}function a(u,D,t){return u instanceof RegExp?function(u,D){if(!D)return u;for(var t=/\((?:\?<(.*?)>)?(?!\?)/g,F=0,e=t.exec(u.source);e;)D.push({name:e[1]||F++,prefix:"",suffix:"",modifier:"",pattern:""}),e=t.exec(u.source);return u}(u,D):Array.isArray(u)?function(u,D,t){var F=u.map(function(u){return a(u,D,t).source});return new RegExp("(?:"+F.join("|")+")",i(t))}(u,D,t):function(u,D,t){return s(n(u,t),D,t)}(u,D,t)}var B={delimiter:"",prefixes:"",sensitive:!0,strict:!0},o={delimiter:".",prefixes:"",sensitive:!0,strict:!0},h={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function p(u,D){return u.startsWith(D)?u.substring(D.length,u.length):u}function c(u){return !(!u||u.length<2||"["!==u[0]&&("\\"!==u[0]&&"{"!==u[0]||"["!==u[1]))}var f,l=["ftp","file","http","https","ws","wss"];function m(u){if(!u)return !0;for(var D,t=F(l);!(D=t()).done;)if(u.test(D.value))return !0;return !1}function d(u){switch(u){case"ws":case"http":return "80";case"wws":case"https":return "443";case"ftp":return "21";default:return ""}}function g(u){if(""===u)return u;if(/^[-+.A-Za-z0-9]*$/.test(u))return u.toLowerCase();throw new TypeError("Invalid protocol '"+u+"'.")}function x(u){if(""===u)return u;var D=new URL("https://example.com");return D.username=u,D.username}function S(u){if(""===u)return u;var D=new URL("https://example.com");return D.password=u,D.password}function v(u){if(""===u)return u;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(u))throw new TypeError("Invalid hostname '"+u+"'");var D=new URL("https://example.com");return D.hostname=u,D.hostname}function y(u){if(""===u)return u;if(/[^0-9a-fA-F[\]:]/g.test(u))throw new TypeError("Invalid IPv6 hostname '"+u+"'");return u.toLowerCase()}function R(u){if(""===u)return u;if(/^[0-9]*$/.test(u)&&parseInt(u)<=65535)return u;throw new TypeError("Invalid port '"+u+"'.")}function k(u){if(""===u)return u;var D=new URL("https://example.com");return D.pathname="/"!==u[0]?"/-"+u:u,"/"!==u[0]?D.pathname.substring(2,D.pathname.length):D.pathname}function w(u){return ""===u?u:new URL("data:"+u).pathname}function P(u){if(""===u)return u;var D=new URL("https://example.com");return D.search=u,D.search.substring(1,D.search.length)}function T(u){if(""===u)return u;var D=new URL("https://example.com");return D.hash=u,D.hash.substring(1,D.hash.length)}!function(u){u[u.INIT=0]="INIT",u[u.PROTOCOL=1]="PROTOCOL",u[u.AUTHORITY=2]="AUTHORITY",u[u.USERNAME=3]="USERNAME",u[u.PASSWORD=4]="PASSWORD",u[u.HOSTNAME=5]="HOSTNAME",u[u.PORT=6]="PORT",u[u.PATHNAME=7]="PATHNAME",u[u.SEARCH=8]="SEARCH",u[u.HASH=9]="HASH",u[u.DONE=10]="DONE";}(f||(f={}));var b=function(){function u(u){this.input=void 0,this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=f.INIT,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=u;}var t=u.prototype;return t.parse=function(){for(this.tokenList=E(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(this.state===f.INIT){this.rewind(),this.isHashPrefix()?this.changeState(f.HASH,1):this.isSearchPrefix()?(this.changeState(f.SEARCH,1),this.internalResult.hash=""):(this.changeState(f.PATHNAME,0),this.internalResult.search="",this.internalResult.hash="");continue}if(this.state===f.AUTHORITY){this.rewindAndSetState(f.HOSTNAME);continue}this.changeState(f.DONE,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1;}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case f.INIT:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(f.PROTOCOL));break;case f.PROTOCOL:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();var u=f.PATHNAME,D=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(u=f.AUTHORITY,D=3):this.shouldTreatAsStandardURL&&(u=f.AUTHORITY),this.changeState(u,D);}break;case f.AUTHORITY:this.isIdentityTerminator()?this.rewindAndSetState(f.USERNAME):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(f.HOSTNAME);break;case f.USERNAME:this.isPasswordPrefix()?this.changeState(f.PASSWORD,1):this.isIdentityTerminator()&&this.changeState(f.HOSTNAME,1);break;case f.PASSWORD:this.isIdentityTerminator()&&this.changeState(f.HOSTNAME,1);break;case f.HOSTNAME:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(f.PORT,1):this.isPathnameStart()?this.changeState(f.PATHNAME,0):this.isSearchPrefix()?this.changeState(f.SEARCH,1):this.isHashPrefix()&&this.changeState(f.HASH,1);break;case f.PORT:this.isPathnameStart()?this.changeState(f.PATHNAME,0):this.isSearchPrefix()?this.changeState(f.SEARCH,1):this.isHashPrefix()&&this.changeState(f.HASH,1);break;case f.PATHNAME:this.isSearchPrefix()?this.changeState(f.SEARCH,1):this.isHashPrefix()&&this.changeState(f.HASH,1);break;case f.SEARCH:this.isHashPrefix()&&this.changeState(f.HASH,1);}}},t.changeState=function(u,D){switch(this.state){case f.INIT:break;case f.PROTOCOL:this.internalResult.protocol=this.makeComponentString();break;case f.AUTHORITY:break;case f.USERNAME:this.internalResult.username=this.makeComponentString();break;case f.PASSWORD:this.internalResult.password=this.makeComponentString();break;case f.HOSTNAME:this.internalResult.hostname=this.makeComponentString();break;case f.PORT:this.internalResult.port=this.makeComponentString();break;case f.PATHNAME:this.internalResult.pathname=this.makeComponentString();break;case f.SEARCH:this.internalResult.search=this.makeComponentString();break;case f.HASH:this.internalResult.hash=this.makeComponentString();}this.changeStateWithoutSettingComponent(u,D);},t.changeStateWithoutSettingComponent=function(u,D){this.state=u,this.componentStart=this.tokenIndex+D,this.tokenIndex+=D,this.tokenIncrement=0;},t.rewind=function(){this.tokenIndex=this.componentStart,this.tokenIncrement=0;},t.rewindAndSetState=function(u){this.rewind(),this.state=u;},t.safeToken=function(u){return u<0&&(u=this.tokenList.length-u),u<this.tokenList.length?this.tokenList[u]:this.tokenList[this.tokenList.length-1]},t.isNonSpecialPatternChar=function(u,D){var t=this.safeToken(u);return t.value===D&&("CHAR"===t.type||"ESCAPED_CHAR"===t.type||"INVALID_CHAR"===t.type)},t.isProtocolSuffix=function(){return this.isNonSpecialPatternChar(this.tokenIndex,":")},t.nextIsAuthoritySlashes=function(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")},t.isIdentityTerminator=function(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")},t.isPasswordPrefix=function(){return this.isNonSpecialPatternChar(this.tokenIndex,":")},t.isPortPrefix=function(){return this.isNonSpecialPatternChar(this.tokenIndex,":")},t.isPathnameStart=function(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")},t.isSearchPrefix=function(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return !0;if("?"!==this.tokenList[this.tokenIndex].value)return !1;var u=this.safeToken(this.tokenIndex-1);return "NAME"!==u.type&&"PATTERN"!==u.type&&"CLOSE"!==u.type&&"ASTERISK"!==u.type},t.isHashPrefix=function(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")},t.isGroupOpen=function(){return "OPEN"==this.tokenList[this.tokenIndex].type},t.isGroupClose=function(){return "CLOSE"==this.tokenList[this.tokenIndex].type},t.isIPv6Open=function(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")},t.isIPv6Close=function(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")},t.makeComponentString=function(){var u=this.tokenList[this.tokenIndex],D=this.safeToken(this.componentStart).index;return this.input.substring(D,u.index)},t.computeShouldTreatAsStandardURL=function(){var u={};Object.assign(u,B),u.encodePart=g;var D=a(this.makeComponentString(),void 0,u);this.shouldTreatAsStandardURL=m(D);},D(u,[{key:"result",get:function(){return this.internalResult}}]),u}(),I=["protocol","username","password","hostname","port","pathname","search","hash"];function O(u,D){if("string"!=typeof u)throw new TypeError("parameter 1 is not of type 'string'.");var t=new URL(u,D);return {protocol:t.protocol.substring(0,t.protocol.length-1),username:t.username,password:t.password,hostname:t.hostname,port:t.port,pathname:t.pathname,search:""!=t.search?t.search.substring(1,t.search.length):void 0,hash:""!=t.hash?t.hash.substring(1,t.hash.length):void 0}}function H(u,D,t){var F;if("string"==typeof D.baseURL)try{F=new URL(D.baseURL),u.protocol=F.protocol?F.protocol.substring(0,F.protocol.length-1):"",u.username=F.username,u.password=F.password,u.hostname=F.hostname,u.port=F.port,u.pathname=F.pathname,u.search=F.search?F.search.substring(1,F.search.length):"",u.hash=F.hash?F.hash.substring(1,F.hash.length):"";}catch(u){throw new TypeError("invalid baseURL '"+D.baseURL+"'.")}if("string"==typeof D.protocol&&(u.protocol=function(u,D){var t;return u=(t=u).endsWith(":")?t.substr(0,t.length-":".length):t,D||""===u?u:g(u)}(D.protocol,t)),"string"==typeof D.username&&(u.username=function(u,D){if(D||""===u)return u;var t=new URL("https://example.com");return t.username=u,t.username}(D.username,t)),"string"==typeof D.password&&(u.password=function(u,D){if(D||""===u)return u;var t=new URL("https://example.com");return t.password=u,t.password}(D.password,t)),"string"==typeof D.hostname&&(u.hostname=function(u,D){return D||""===u?u:c(u)?y(u):v(u)}(D.hostname,t)),"string"==typeof D.port&&(u.port=function(u,D,t){return d(D)===u&&(u=""),t||""===u?u:R(u)}(D.port,u.protocol,t)),"string"==typeof D.pathname){if(u.pathname=D.pathname,F&&!function(u,D){return !(!u.length||"/"!==u[0]&&(!D||u.length<2||"\\"!=u[0]&&"{"!=u[0]||"/"!=u[1]))}(u.pathname,t)){var e=F.pathname.lastIndexOf("/");e>=0&&(u.pathname=F.pathname.substring(0,e+1)+u.pathname);}u.pathname=function(u,D,t){if(t||""===u)return u;if(D&&!l.includes(D))return new URL(D+":"+u).pathname;var F="/"==u[0];return u=new URL(F?u:"/-"+u,"https://example.com").pathname,F||(u=u.substring(2,u.length)),u}(u.pathname,u.protocol,t);}return "string"==typeof D.search&&(u.search=function(u,D){if(u=p(u,"?"),D||""===u)return u;var t=new URL("https://example.com");return t.search=u,t.search?t.search.substring(1,t.search.length):""}(D.search,t)),"string"==typeof D.hash&&(u.hash=function(u,D){if(u=p(u,"#"),D||""===u)return u;var t=new URL("https://example.com");return t.hash=u,t.hash?t.hash.substring(1,t.hash.length):""}(D.hash,t)),u}function N(u){return u.replace(/([+*?:{}()\\])/g,"\\$1")}function L(u,D){for(var t="[^"+(D.delimiter||"/#?").replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")+"]+?",F=/(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])/,e="",C=0;C<u.length;++C){var A=u[C],E=C>0?u[C-1]:null,n=C<u.length-1?u[C+1]:null;if("string"!=typeof A)if(""!==A.pattern){var r="number"!=typeof A.name,i=void 0!==D.prefixes?D.prefixes:"./",s=""!==A.suffix||""!==A.prefix&&(1!==A.prefix.length||!i.includes(A.prefix));s||!r||A.pattern!==t||""!==A.modifier||!n||n.prefix||n.suffix||(s="string"==typeof n?F.test(n.length>0?n[0]:""):"number"==typeof n.name),!s&&""===A.prefix&&E&&"string"==typeof E&&E.length>0&&(s=i.includes(E[E.length-1])),s&&(e+="{"),e+=N(A.prefix),r&&(e+=":"+A.name),".*"===A.pattern?e+=r||E&&"string"!=typeof E&&!E.modifier&&!s&&""===A.prefix?"(.*)":"*":A.pattern===t?r||(e+="("+t+")"):e+="("+A.pattern+")",A.pattern===t&&r&&""!==A.suffix&&F.test(A.suffix[0])&&(e+="\\"),e+=N(A.suffix),s&&(e+="}"),e+=A.modifier;}else {if(""===A.modifier){e+=N(A.prefix);continue}e+="{"+N(A.prefix)+"}"+A.modifier;}else e+=N(A);}return e}var U=function(){function u(u,D){void 0===u&&(u={}),this.pattern=void 0,this.regexp={},this.keys={},this.component_pattern={};try{if("string"==typeof u){var t=new b(u);if(t.parse(),u=t.result,D){if("string"!=typeof D)throw new TypeError("'baseURL' parameter is not of type 'string'.");u.baseURL=D;}else if("string"!=typeof u.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.")}else if(D)throw new TypeError("parameter 1 is not of type 'string'.");if(!u||"object"!=typeof u)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");var e;this.pattern=H({pathname:"*",protocol:"*",username:"*",password:"*",hostname:"*",port:"*",search:"*",hash:"*"},u,!0),d(this.pattern.protocol)===this.pattern.port&&(this.pattern.port="");for(var C,A=F(I);!(C=A()).done;)if((e=C.value)in this.pattern){var E={},r=this.pattern[e];switch(this.keys[e]=[],e){case"protocol":Object.assign(E,B),E.encodePart=g;break;case"username":Object.assign(E,B),E.encodePart=x;break;case"password":Object.assign(E,B),E.encodePart=S;break;case"hostname":Object.assign(E,o),E.encodePart=c(r)?y:v;break;case"port":Object.assign(E,B),E.encodePart=R;break;case"pathname":m(this.regexp.protocol)?(Object.assign(E,h),E.encodePart=k):(Object.assign(E,B),E.encodePart=w);break;case"search":Object.assign(E,B),E.encodePart=P;break;case"hash":Object.assign(E,B),E.encodePart=T;}try{var i=n(r,E);this.regexp[e]=s(i,this.keys[e],E),this.component_pattern[e]=L(i,E);}catch(u){throw new TypeError("invalid "+e+" pattern '"+this.pattern[e]+"'.")}}}catch(u){throw new TypeError("Failed to construct 'URLPattern': "+u.message)}}var t=u.prototype;return t.test=function(u,D){void 0===u&&(u={});var t,F={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof u&&D)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===u)return !1;try{F=H(F,"object"==typeof u?u:O(u,D),!1);}catch(u){return !1}for(t in this.pattern)if(!this.regexp[t].exec(F[t]))return !1;return !0},t.exec=function(u,D){void 0===u&&(u={});var t={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof u&&D)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0!==u){try{t=H(t,"object"==typeof u?u:O(u,D),!1);}catch(u){return null}var e,C={};for(e in C.inputs=D?[u,D]:[u],this.pattern){var A=this.regexp[e].exec(t[e]);if(!A)return null;for(var E,n={},r=F(this.keys[e].entries());!(E=r()).done;){var i=E.value,s=i[1];"string"!=typeof s.name&&"number"!=typeof s.name||(n[s.name]=A[i[0]+1]||"");}C[e]={input:t[e]||"",groups:n};}return C}},D(u,[{key:"protocol",get:function(){return this.component_pattern.protocol}},{key:"username",get:function(){return this.component_pattern.username}},{key:"password",get:function(){return this.component_pattern.password}},{key:"hostname",get:function(){return this.component_pattern.hostname}},{key:"port",get:function(){return this.component_pattern.port}},{key:"pathname",get:function(){return this.component_pattern.pathname}},{key:"search",get:function(){return this.component_pattern.search}},{key:"hash",get:function(){return this.component_pattern.hash}}]),u}();
1025
-
1026
- const INTERNAL$2 = { tick: 0, pool: new Map() };
1027
- function requestAnimationFrame(callback) {
1028
- if (!INTERNAL$2.pool.size) {
1029
- setTimeout$1(() => {
1030
- const next = __performance_now();
1031
- for (const func of INTERNAL$2.pool.values()) {
1032
- func(next);
1033
- }
1034
- INTERNAL$2.pool.clear();
1035
- }, 1000 / 16);
1036
- }
1037
- const func = __function_bind(callback, undefined);
1038
- const tick = ++INTERNAL$2.tick;
1039
- INTERNAL$2.pool.set(tick, func);
1040
- return tick;
1041
- }
1042
- function cancelAnimationFrame(requestId) {
1043
- const timeout = INTERNAL$2.pool.get(requestId);
1044
- if (timeout) {
1045
- clearTimeout$1(timeout);
1046
- INTERNAL$2.pool.delete(requestId);
1047
- }
1048
- }
1049
-
1050
- class Node extends EventTarget {
1051
- append(...nodesOrDOMStrings) {
1052
- }
1053
- appendChild(childNode) {
1054
- return childNode;
1055
- }
1056
- after(...nodesOrDOMStrings) {
1057
- }
1058
- before(...nodesOrDOMStrings) {
1059
- }
1060
- prepend(...nodesOrDOMStrings) {
1061
- }
1062
- replaceChild(newChild, oldChild) {
1063
- return oldChild;
1064
- }
1065
- removeChild(childNode) {
1066
- return childNode;
1067
- }
1068
- get attributes() {
1069
- return {};
1070
- }
1071
- get childNodes() {
1072
- return [];
1073
- }
1074
- get children() {
1075
- return [];
1076
- }
1077
- get ownerDocument() {
1078
- return null;
1079
- }
1080
- get nodeValue() {
1081
- return '';
1082
- }
1083
- set nodeValue(value) {
1084
- }
1085
- get textContent() {
1086
- return '';
1087
- }
1088
- set textContent(value) {
1089
- }
1090
- get previousElementSibling() {
1091
- return null;
1092
- }
1093
- get nextElementSibling() {
1094
- return null;
1095
- }
1096
- [Symbol.for('nodejs.util.inspect.custom')](depth, options) {
1097
- return `${this.constructor.name}`;
1098
- }
1099
- }
1100
- class DocumentFragment extends Node {
1101
- }
1102
- class ShadowRoot extends DocumentFragment {
1103
- get innerHTML() {
1104
- return '';
1105
- }
1106
- set innerHTML(value) {
1107
- }
1108
- }
1109
- const NodeFilter$1 = Object.assign({
1110
- NodeFilter() {
1111
- throw new TypeError('Illegal constructor');
1112
- },
1113
- }.NodeFilter, {
1114
- FILTER_ACCEPT: 1,
1115
- FILTER_REJECT: 2,
1116
- FILTER_SKIP: 3,
1117
- SHOW_ALL: 4294967295,
1118
- SHOW_ELEMENT: 1,
1119
- SHOW_ATTRIBUTE: 2,
1120
- SHOW_TEXT: 4,
1121
- SHOW_CDATA_SECTION: 8,
1122
- SHOW_ENTITY_REFERENCE: 16,
1123
- SHOW_ENTITY: 32,
1124
- SHOW_PROCESSING_INSTRUCTION: 64,
1125
- SHOW_COMMENT: 128,
1126
- SHOW_DOCUMENT: 256,
1127
- SHOW_DOCUMENT_TYPE: 512,
1128
- SHOW_DOCUMENT_FRAGMENT: 1024,
1129
- SHOW_NOTATION: 2048,
1130
- });
1131
- class NodeIterator$1 {
1132
- nextNode() {
1133
- return null;
1134
- }
1135
- previousNode() {
1136
- return null;
1137
- }
1138
- get filter() {
1139
- const internals = internalsOf(this, 'NodeIterator', 'filter');
1140
- return internals.filter;
1141
- }
1142
- get pointerBeforeReferenceNode() {
1143
- const internals = internalsOf(this, 'NodeIterator', 'pointerBeforeReferenceNode');
1144
- return internals.pointerBeforeReferenceNode;
1145
- }
1146
- get referenceNode() {
1147
- const internals = internalsOf(this, 'NodeIterator', 'referenceNode');
1148
- return internals.referenceNode;
1149
- }
1150
- get root() {
1151
- const internals = internalsOf(this, 'NodeIterator', 'root');
1152
- return internals.root;
1153
- }
1154
- get whatToShow() {
1155
- const internals = internalsOf(this, 'NodeIterator', 'whatToShow');
1156
- return internals.whatToShow;
1157
- }
1158
- }
1159
- allowStringTag(Node);
1160
- allowStringTag(NodeIterator$1);
1161
- allowStringTag(DocumentFragment);
1162
- allowStringTag(ShadowRoot);
1163
-
1164
- class CharacterData extends Node {
1165
- constructor(data) {
1166
- INTERNALS.set(super(), {
1167
- data: String(data),
1168
- });
1169
- }
1170
- get data() {
1171
- return internalsOf(this, 'CharacterData', 'data')
1172
- .data;
1173
- }
1174
- get textContent() {
1175
- return internalsOf(this, 'CharacterData', 'textContent').data;
1176
- }
1177
- }
1178
- class Comment extends CharacterData {
1179
- }
1180
- class Text extends CharacterData {
1181
- get assignedSlot() {
1182
- return null;
1183
- }
1184
- get wholeText() {
1185
- return internalsOf(this, 'CharacterData', 'textContent').data;
1186
- }
1187
- }
1188
- allowStringTag(CharacterData);
1189
- allowStringTag(Text);
1190
- allowStringTag(Comment);
1191
-
1192
- class CustomEvent extends Event {
1193
- constructor(type, params) {
1194
- params = Object(params);
1195
- super(type, params);
1196
- if ('detail' in params)
1197
- this.detail = params.detail;
1198
- }
1199
- }
1200
- allowStringTag(CustomEvent);
1201
-
1202
- const INTERNAL$1 = { tick: 0, pool: new Map() };
1203
- function requestIdleCallback(callback) {
1204
- if (!INTERNAL$1.pool.size) {
1205
- setTimeout$1(() => {
1206
- const next = __performance_now();
1207
- for (const func of INTERNAL$1.pool.values()) {
1208
- func(next);
1209
- }
1210
- INTERNAL$1.pool.clear();
1211
- }, 1000 / 16);
1212
- }
1213
- const func = __function_bind(callback, undefined);
1214
- const tick = ++INTERNAL$1.tick;
1215
- INTERNAL$1.pool.set(tick, func);
1216
- return tick;
1217
- }
1218
- function cancelIdleCallback(requestId) {
1219
- const timeout = INTERNAL$1.pool.get(requestId);
1220
- if (timeout) {
1221
- clearTimeout$1(timeout);
1222
- INTERNAL$1.pool.delete(requestId);
20
+ const routeDataSymbol = Symbol.for("astro.routeData");
21
+ function checkIsLocaleFree(pathname, locales) {
22
+ for (const locale of locales) {
23
+ if (pathname.includes(`/${locale}`)) {
24
+ return false;
1223
25
  }
26
+ }
27
+ return true;
1224
28
  }
1225
-
1226
- const PRIMITIVE = 0;
1227
- const ARRAY = 1;
1228
- const OBJECT = 2;
1229
- const DATE = 3;
1230
- const REGEXP = 4;
1231
- const MAP = 5;
1232
- const SET = 6;
1233
- const ERROR = 7;
1234
- const BIGINT = 8;
1235
- // export const SYMBOL = 9;
1236
-
1237
- const env = typeof self === 'object' ? self : globalThis;
1238
-
1239
- const deserializer = ($, _) => {
1240
- const as = (out, index) => {
1241
- $.set(index, out);
1242
- return out;
1243
- };
1244
-
1245
- const unpair = index => {
1246
- if ($.has(index))
1247
- return $.get(index);
1248
-
1249
- const [type, value] = _[index];
1250
- switch (type) {
1251
- case PRIMITIVE:
1252
- return as(value, index);
1253
- case ARRAY: {
1254
- const arr = as([], index);
1255
- for (const index of value)
1256
- arr.push(unpair(index));
1257
- return arr;
1258
- }
1259
- case OBJECT: {
1260
- const object = as({}, index);
1261
- for (const [key, index] of value)
1262
- object[unpair(key)] = unpair(index);
1263
- return object;
1264
- }
1265
- case DATE:
1266
- return as(new Date(value), index);
1267
- case REGEXP: {
1268
- const {source, flags} = value;
1269
- return as(new RegExp(source, flags), index);
1270
- }
1271
- case MAP: {
1272
- const map = as(new Map, index);
1273
- for (const [key, index] of value)
1274
- map.set(unpair(key), unpair(index));
1275
- return map;
1276
- }
1277
- case SET: {
1278
- const set = as(new Set, index);
1279
- for (const index of value)
1280
- set.add(unpair(index));
1281
- return set;
1282
- }
1283
- case ERROR: {
1284
- const {name, message} = value;
1285
- return as(new env[name](message), index);
1286
- }
1287
- case BIGINT:
1288
- return as(BigInt(value), index);
1289
- case 'BigInt':
1290
- return as(Object(BigInt(value)), index);
1291
- }
1292
- return as(new env[type](value), index);
1293
- };
1294
-
1295
- return unpair;
1296
- };
1297
-
1298
- /**
1299
- * @typedef {Array<string,any>} Record a type representation
1300
- */
1301
-
1302
- /**
1303
- * Returns a deserialized value from a serialized array of Records.
1304
- * @param {Record[]} serialized a previously serialized value.
1305
- * @returns {any}
1306
- */
1307
- const deserialize = serialized => deserializer(new Map, serialized)(0);
1308
-
1309
- const EMPTY = '';
1310
-
1311
- const {toString} = {};
1312
- const {keys} = Object;
1313
-
1314
- const typeOf = value => {
1315
- const type = typeof value;
1316
- if (type !== 'object' || !value)
1317
- return [PRIMITIVE, type];
1318
-
1319
- const asString = toString.call(value).slice(8, -1);
1320
- switch (asString) {
1321
- case 'Array':
1322
- return [ARRAY, EMPTY];
1323
- case 'Object':
1324
- return [OBJECT, EMPTY];
1325
- case 'Date':
1326
- return [DATE, EMPTY];
1327
- case 'RegExp':
1328
- return [REGEXP, EMPTY];
1329
- case 'Map':
1330
- return [MAP, EMPTY];
1331
- case 'Set':
1332
- return [SET, EMPTY];
29
+ function createI18nMiddleware(i18n, base, trailingSlash) {
30
+ if (!i18n) {
31
+ return void 0;
1333
32
  }
1334
-
1335
- if (asString.includes('Array'))
1336
- return [ARRAY, asString];
1337
-
1338
- if (asString.includes('Error'))
1339
- return [ERROR, asString];
1340
-
1341
- return [OBJECT, asString];
1342
- };
1343
-
1344
- const shouldSkip = ([TYPE, type]) => (
1345
- TYPE === PRIMITIVE &&
1346
- (type === 'function' || type === 'symbol')
1347
- );
1348
-
1349
- const serializer = (strict, json, $, _) => {
1350
-
1351
- const as = (out, value) => {
1352
- const index = _.push(out) - 1;
1353
- $.set(value, index);
1354
- return index;
1355
- };
1356
-
1357
- const pair = value => {
1358
- if ($.has(value))
1359
- return $.get(value);
1360
-
1361
- let [TYPE, type] = typeOf(value);
1362
- switch (TYPE) {
1363
- case PRIMITIVE: {
1364
- let entry = value;
1365
- switch (type) {
1366
- case 'bigint':
1367
- TYPE = BIGINT;
1368
- entry = value.toString();
1369
- break;
1370
- case 'function':
1371
- case 'symbol':
1372
- if (strict)
1373
- throw new TypeError('unable to serialize ' + type);
1374
- entry = null;
1375
- break;
1376
- }
1377
- return as([TYPE, entry], value);
33
+ return async (context, next) => {
34
+ if (!i18n) {
35
+ return await next();
36
+ }
37
+ const routeData = Reflect.get(context.request, routeDataSymbol);
38
+ if (routeData) {
39
+ if (routeData.type !== "page" && routeData.type !== "fallback") {
40
+ return await next();
1378
41
  }
1379
- case ARRAY: {
1380
- if (type)
1381
- return as([type, [...value]], value);
1382
-
1383
- const arr = [];
1384
- const index = as([TYPE, arr], value);
1385
- for (const entry of value)
1386
- arr.push(pair(entry));
1387
- return index;
1388
- }
1389
- case OBJECT: {
1390
- if (type) {
1391
- switch (type) {
1392
- case 'BigInt':
1393
- return as([type, value.toString()], value);
1394
- case 'Boolean':
1395
- case 'Number':
1396
- case 'String':
1397
- return as([type, value.valueOf()], value);
42
+ }
43
+ const url = context.url;
44
+ const { locales, defaultLocale, fallback } = i18n;
45
+ const response = await next();
46
+ if (response instanceof Response) {
47
+ const separators = url.pathname.split("/");
48
+ const pathnameContainsDefaultLocale = url.pathname.includes(`/${defaultLocale}`);
49
+ const isLocaleFree = checkIsLocaleFree(url.pathname, i18n.locales);
50
+ if (i18n.routingStrategy === "prefix-other-locales" && pathnameContainsDefaultLocale) {
51
+ const newLocation = url.pathname.replace(`/${defaultLocale}`, "");
52
+ response.headers.set("Location", newLocation);
53
+ return new Response(null, {
54
+ status: 404,
55
+ headers: response.headers
56
+ });
57
+ } else if (i18n.routingStrategy === "prefix-always") {
58
+ if (url.pathname === base + "/" || url.pathname === base) {
59
+ if (trailingSlash === "always") {
60
+ return context.redirect(`${appendForwardSlash$1(joinPaths(base, i18n.defaultLocale))}`);
61
+ } else {
62
+ return context.redirect(`${joinPaths(base, i18n.defaultLocale)}`);
1398
63
  }
64
+ } else if (isLocaleFree) {
65
+ return new Response(null, {
66
+ status: 404,
67
+ headers: response.headers
68
+ });
1399
69
  }
1400
-
1401
- if (json && ('toJSON' in value))
1402
- return pair(value.toJSON());
1403
-
1404
- const entries = [];
1405
- const index = as([TYPE, entries], value);
1406
- for (const key of keys(value)) {
1407
- if (strict || !shouldSkip(typeOf(value[key])))
1408
- entries.push([pair(key), pair(value[key])]);
1409
- }
1410
- return index;
1411
- }
1412
- case DATE:
1413
- return as([TYPE, value.toISOString()], value);
1414
- case REGEXP: {
1415
- const {source, flags} = value;
1416
- return as([TYPE, {source, flags}], value);
1417
70
  }
1418
- case MAP: {
1419
- const entries = [];
1420
- const index = as([TYPE, entries], value);
1421
- for (const [key, entry] of value) {
1422
- if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
1423
- entries.push([pair(key), pair(entry)]);
1424
- }
1425
- return index;
1426
- }
1427
- case SET: {
1428
- const entries = [];
1429
- const index = as([TYPE, entries], value);
1430
- for (const entry of value) {
1431
- if (strict || !shouldSkip(typeOf(entry)))
1432
- entries.push(pair(entry));
71
+ if (response.status >= 300 && fallback) {
72
+ const fallbackKeys = i18n.fallback ? Object.keys(i18n.fallback) : [];
73
+ const urlLocale = separators.find((s) => locales.includes(s));
74
+ if (urlLocale && fallbackKeys.includes(urlLocale)) {
75
+ const fallbackLocale = fallback[urlLocale];
76
+ let newPathname;
77
+ if (fallbackLocale === defaultLocale) {
78
+ newPathname = url.pathname.replace(`/${urlLocale}`, ``);
79
+ } else {
80
+ newPathname = url.pathname.replace(`/${urlLocale}`, `/${fallbackLocale}`);
81
+ }
82
+ return context.redirect(newPathname);
1433
83
  }
1434
- return index;
1435
84
  }
1436
85
  }
1437
-
1438
- const {message} = value;
1439
- return as([TYPE, {name: type, message}], value);
86
+ return response;
1440
87
  };
1441
-
1442
- return pair;
1443
- };
1444
-
1445
- /**
1446
- * @typedef {Array<string,any>} Record a type representation
1447
- */
1448
-
1449
- /**
1450
- * Returns an array of serialized Records.
1451
- * @param {any} value a serializable value.
1452
- * @param {{lossy?: boolean}?} options an object with a `lossy` property that,
1453
- * if `true`, will not throw errors on incompatible types, and behave more
1454
- * like JSON stringify would behave. Symbol and Function will be discarded.
1455
- * @returns {Record[]}
1456
- */
1457
- const serialize = (value, {json, lossy} = {}) => {
1458
- const _ = [];
1459
- return serializer(!(json || lossy), !!json, new Map, _)(value), _;
1460
- };
1461
-
1462
- var structuredClone = (any, options) => deserialize(serialize(any, options));
1463
-
1464
- const INTERNAL = { tick: 0, pool: new Map() };
1465
- function setTimeout(callback, delay = 0, ...args) {
1466
- const func = __function_bind(callback, globalThis);
1467
- const tick = ++INTERNAL.tick;
1468
- const timeout = setTimeout$1(func, delay, ...args);
1469
- INTERNAL.pool.set(tick, timeout);
1470
- return tick;
1471
- }
1472
- function clearTimeout(timeoutId) {
1473
- const timeout = INTERNAL.pool.get(timeoutId);
1474
- if (timeout) {
1475
- clearTimeout$1(timeout);
1476
- INTERNAL.pool.delete(timeoutId);
1477
- }
1478
- }
1479
-
1480
- class TreeWalker {
1481
- parentNode() {
1482
- return null;
1483
- }
1484
- firstChild() {
1485
- return null;
1486
- }
1487
- lastChild() {
1488
- return null;
1489
- }
1490
- previousSibling() {
1491
- return null;
1492
- }
1493
- nextSibling() {
1494
- return null;
1495
- }
1496
- previousNode() {
1497
- return null;
1498
- }
1499
- nextNode() {
1500
- return null;
1501
- }
1502
- get currentNode() {
1503
- const internals = internalsOf(this, 'TreeWalker', 'currentNode');
1504
- return internals.currentNode;
1505
- }
1506
- get root() {
1507
- const internals = internalsOf(this, 'TreeWalker', 'root');
1508
- return internals.root;
1509
- }
1510
- get whatToShow() {
1511
- const internals = internalsOf(this, 'TreeWalker', 'whatToShow');
1512
- return internals.whatToShow;
1513
- }
1514
88
  }
1515
- allowStringTag(TreeWalker);
89
+ const i18nPipelineHook = (ctx) => {
90
+ Reflect.set(ctx.request, routeDataSymbol, ctx.route);
91
+ };
1516
92
 
1517
- class ImageData {
1518
- constructor(arg0, arg1, ...args) {
1519
- if (arguments.length < 2)
1520
- throw new TypeError(`Failed to construct 'ImageData': 2 arguments required.`);
1521
- /** Whether Uint8ClampedArray data is provided. */
1522
- const hasData = __object_isPrototypeOf(Uint8ClampedArray.prototype, arg0);
1523
- /** Image data, either provided or calculated. */
1524
- const d = hasData
1525
- ? arg0
1526
- : new Uint8ClampedArray(asNumber(arg0, 'width') * asNumber(arg1, 'height') * 4);
1527
- /** Image width. */
1528
- const w = asNumber(hasData ? arg1 : arg0, 'width');
1529
- /** Image height. */
1530
- const h = d.length / w / 4;
1531
- /** Image color space. */
1532
- const c = String(Object(hasData ? args[1] : args[0]).colorSpace || 'srgb');
1533
- // throw if a provided height does not match the calculated height
1534
- if (args.length && asNumber(args[0], 'height') !== h)
1535
- throw new DOMException('height is not equal to (4 * width * height)', 'IndexSizeError');
1536
- // throw if a provided colorspace does not match a known colorspace
1537
- if (c !== 'srgb' && c !== 'rec2020' && c !== 'display-p3')
1538
- throw new TypeError('colorSpace is not known value');
1539
- Object.defineProperty(this, 'data', {
1540
- configurable: true,
1541
- enumerable: true,
1542
- value: d,
1543
- });
1544
- INTERNALS.set(this, {
1545
- width: w,
1546
- height: h,
1547
- colorSpace: c,
1548
- });
1549
- }
1550
- get data() {
1551
- internalsOf(this, 'ImageData', 'data');
1552
- return Object.getOwnPropertyDescriptor(this, 'data').value;
1553
- }
1554
- get width() {
1555
- return internalsOf(this, 'ImageData', 'width').width;
93
+ let lastMessage;
94
+ let lastMessageCount = 1;
95
+ const consoleLogDestination = {
96
+ write(event) {
97
+ let dest = console.error;
98
+ if (levels[event.level] < levels["error"]) {
99
+ dest = console.log;
100
+ }
101
+ function getPrefix() {
102
+ let prefix = "";
103
+ let type = event.label;
104
+ if (type) {
105
+ prefix += dim(dateTimeFormat.format(/* @__PURE__ */ new Date()) + " ");
106
+ if (event.level === "info") {
107
+ type = bold(cyan(`[${type}]`));
108
+ } else if (event.level === "warn") {
109
+ type = bold(yellow(`[${type}]`));
110
+ } else if (event.level === "error") {
111
+ type = bold(red(`[${type}]`));
112
+ }
113
+ prefix += `${type} `;
114
+ }
115
+ return reset(prefix);
1556
116
  }
1557
- get height() {
1558
- return internalsOf(this, 'ImageData', 'height').height;
117
+ let message = event.message;
118
+ if (message === lastMessage) {
119
+ lastMessageCount++;
120
+ message = `${message} ${yellow(`(x${lastMessageCount})`)}`;
121
+ } else {
122
+ lastMessage = message;
123
+ lastMessageCount = 1;
1559
124
  }
1560
- }
1561
- allowStringTag(ImageData);
1562
- /** Returns a coerced number, optionally throwing if the number is zero-ish. */
1563
- const asNumber = (value, axis) => {
1564
- value = Number(value) || 0;
1565
- if (value === 0)
1566
- throw new TypeError(`The source ${axis} is zero or not a number.`);
1567
- return value;
125
+ const outMessage = getPrefix() + message;
126
+ dest(outMessage);
127
+ return true;
128
+ }
1568
129
  };
1569
130
 
1570
- class CanvasRenderingContext2D {
1571
- get canvas() {
1572
- return internalsOf(this, 'CanvasRenderingContext2D', 'canvas').canvas;
1573
- }
1574
- get direction() {
1575
- return internalsOf(this, 'CanvasRenderingContext2D', 'direction')
1576
- .direction;
1577
- }
1578
- get fillStyle() {
1579
- return internalsOf(this, 'CanvasRenderingContext2D', 'fillStyle')
1580
- .fillStyle;
1581
- }
1582
- get filter() {
1583
- return internalsOf(this, 'CanvasRenderingContext2D', 'filter').filter;
1584
- }
1585
- get globalAlpha() {
1586
- return internalsOf(this, 'CanvasRenderingContext2D', 'globalAlpha')
1587
- .globalAlpha;
1588
- }
1589
- get globalCompositeOperation() {
1590
- return internalsOf(this, 'CanvasRenderingContext2D', 'globalCompositeOperation').globalCompositeOperation;
1591
- }
1592
- get font() {
1593
- return internalsOf(this, 'CanvasRenderingContext2D', 'font').font;
1594
- }
1595
- get imageSmoothingEnabled() {
1596
- return internalsOf(this, 'CanvasRenderingContext2D', 'imageSmoothingEnabled').imageSmoothingEnabled;
1597
- }
1598
- get imageSmoothingQuality() {
1599
- return internalsOf(this, 'CanvasRenderingContext2D', 'imageSmoothingQuality').imageSmoothingQuality;
1600
- }
1601
- get lineCap() {
1602
- return internalsOf(this, 'CanvasRenderingContext2D', 'lineCap').lineCap;
1603
- }
1604
- get lineDashOffset() {
1605
- return internalsOf(this, 'CanvasRenderingContext2D', 'lineDashOffset')
1606
- .lineDashOffset;
1607
- }
1608
- get lineJoin() {
1609
- return internalsOf(this, 'CanvasRenderingContext2D', 'lineJoin').lineJoin;
1610
- }
1611
- get lineWidth() {
1612
- return internalsOf(this, 'CanvasRenderingContext2D', 'lineWidth')
1613
- .lineWidth;
1614
- }
1615
- get miterLimit() {
1616
- return internalsOf(this, 'CanvasRenderingContext2D', 'miterLimit')
1617
- .miterLimit;
1618
- }
1619
- get strokeStyle() {
1620
- return internalsOf(this, 'CanvasRenderingContext2D', 'strokeStyle')
1621
- .strokeStyle;
1622
- }
1623
- get shadowOffsetX() {
1624
- return internalsOf(this, 'CanvasRenderingContext2D', 'shadowOffsetX')
1625
- .shadowOffsetX;
1626
- }
1627
- get shadowOffsetY() {
1628
- return internalsOf(this, 'CanvasRenderingContext2D', 'shadowOffsetY')
1629
- .shadowOffsetY;
1630
- }
1631
- get shadowBlur() {
1632
- return internalsOf(this, 'CanvasRenderingContext2D', 'shadowBlur')
1633
- .shadowBlur;
1634
- }
1635
- get shadowColor() {
1636
- return internalsOf(this, 'CanvasRenderingContext2D', 'shadowColor')
1637
- .shadowColor;
1638
- }
1639
- get textAlign() {
1640
- return internalsOf(this, 'CanvasRenderingContext2D', 'textAlign')
1641
- .textAlign;
1642
- }
1643
- get textBaseline() {
1644
- return internalsOf(this, 'CanvasRenderingContext2D', 'textBaseline')
1645
- .textBaseline;
1646
- }
1647
- arc() { }
1648
- arcTo() { }
1649
- beginPath() { }
1650
- bezierCurveTo() { }
1651
- clearRect() { }
1652
- clip() { }
1653
- closePath() { }
1654
- createImageData(arg0, arg1) {
1655
- /** Whether ImageData is provided. */
1656
- const hasData = __object_isPrototypeOf(ImageData.prototype, arg0);
1657
- const w = hasData ? arg0.width : arg0;
1658
- const h = hasData ? arg0.height : arg1;
1659
- const d = hasData
1660
- ? arg0.data
1661
- : new Uint8ClampedArray(w * h * 4);
1662
- return new ImageData(d, w, h);
1663
- }
1664
- createLinearGradient() { }
1665
- createPattern() { }
1666
- createRadialGradient() { }
1667
- drawFocusIfNeeded() { }
1668
- drawImage() { }
1669
- ellipse() { }
1670
- fill() { }
1671
- fillRect() { }
1672
- fillText() { }
1673
- getContextAttributes() { }
1674
- getImageData() { }
1675
- getLineDash() { }
1676
- getTransform() { }
1677
- isPointInPath() { }
1678
- isPointInStroke() { }
1679
- lineTo() { }
1680
- measureText() { }
1681
- moveTo() { }
1682
- putImageData() { }
1683
- quadraticCurveTo() { }
1684
- rect() { }
1685
- resetTransform() { }
1686
- restore() { }
1687
- rotate() { }
1688
- save() { }
1689
- scale() { }
1690
- setLineDash() { }
1691
- setTransform() { }
1692
- stroke() { }
1693
- strokeRect() { }
1694
- strokeText() { }
1695
- transform() { }
1696
- translate() { }
1697
- }
1698
- allowStringTag(CanvasRenderingContext2D);
1699
- const __createCanvasRenderingContext2D = (canvas) => {
1700
- const renderingContext2D = Object.create(CanvasRenderingContext2D.prototype);
1701
- INTERNALS.set(renderingContext2D, {
1702
- canvas,
1703
- direction: 'inherit',
1704
- fillStyle: '#000',
1705
- filter: 'none',
1706
- font: '10px sans-serif',
1707
- globalAlpha: 0,
1708
- globalCompositeOperation: 'source-over',
1709
- imageSmoothingEnabled: false,
1710
- imageSmoothingQuality: 'high',
1711
- lineCap: 'butt',
1712
- lineDashOffset: 0.0,
1713
- lineJoin: 'miter',
1714
- lineWidth: 1.0,
1715
- miterLimit: 10.0,
1716
- shadowBlur: 0,
1717
- shadowColor: '#000',
1718
- shadowOffsetX: 0,
1719
- shadowOffsetY: 0,
1720
- strokeStyle: '#000',
1721
- textAlign: 'start',
1722
- textBaseline: 'alphabetic',
131
+ const RedirectComponentInstance = {
132
+ default() {
133
+ return new Response(null, {
134
+ status: 301
1723
135
  });
1724
- return renderingContext2D;
136
+ }
137
+ };
138
+ const RedirectSinglePageBuiltModule = {
139
+ page: () => Promise.resolve(RedirectComponentInstance),
140
+ onRequest: (_, next) => next(),
141
+ renderers: []
1725
142
  };
1726
143
 
1727
- class CustomElementRegistry {
1728
- /** Defines a new custom element using the given tag name and HTMLElement constructor. */
1729
- define(name, constructor, options) {
1730
- const internals = internalsOf(this, 'CustomElementRegistry', 'define');
1731
- name = String(name);
1732
- if (/[A-Z]/.test(name))
1733
- throw new SyntaxError('Custom element name cannot contain an uppercase ASCII letter');
1734
- if (!/^[a-z]/.test(name))
1735
- throw new SyntaxError('Custom element name must have a lowercase ASCII letter as its first character');
1736
- if (!/-/.test(name))
1737
- throw new SyntaxError('Custom element name must contain a hyphen');
1738
- INTERNALS.set(constructor, {
1739
- attributes: {},
1740
- localName: name,
1741
- });
1742
- internals.constructorByName.set(name, constructor);
1743
- internals.nameByConstructor.set(constructor, name);
1744
- }
1745
- /** Returns the constructor associated with the given tag name. */
1746
- get(name) {
1747
- const internals = internalsOf(this, 'CustomElementRegistry', 'get');
1748
- name = String(name).toLowerCase();
1749
- return internals.constructorByName.get(name);
1750
- }
1751
- getName(constructor) {
1752
- const internals = internalsOf(this, 'CustomElementRegistry', 'getName');
1753
- return internals.nameByConstructor.get(constructor);
1754
- }
144
+ function createEnvironment(options) {
145
+ return options;
1755
146
  }
1756
- allowStringTag(CustomElementRegistry);
1757
- const initCustomElementRegistry = (target, exclude) => {
1758
- if (exclude.has('customElements'))
1759
- return;
1760
- const CustomElementRegistry = target.CustomElementRegistry || globalThis.CustomElementRegistry;
1761
- const customElements = target.customElements ||
1762
- (target.customElements = new CustomElementRegistry());
1763
- INTERNALS.set(customElements, {
1764
- constructorByName: new Map(),
1765
- nameByConstructor: new Map(),
1766
- });
1767
- };
1768
147
 
1769
- class Element extends Node {
1770
- constructor() {
1771
- super();
1772
- if (INTERNALS.has(new.target)) {
1773
- const internals = internalsOf(new.target, 'Element', 'localName');
1774
- INTERNALS.set(this, {
1775
- attributes: {},
1776
- localName: internals.localName,
1777
- ownerDocument: this.ownerDocument,
1778
- shadowInit: null,
1779
- shadowRoot: null,
1780
- });
148
+ function sequence(...handlers) {
149
+ const filtered = handlers.filter((h) => !!h);
150
+ const length = filtered.length;
151
+ if (!length) {
152
+ const handler = defineMiddleware((context, next) => {
153
+ return next();
154
+ });
155
+ return handler;
156
+ }
157
+ return defineMiddleware((context, next) => {
158
+ return applyHandle(0, context);
159
+ function applyHandle(i, handleContext) {
160
+ const handle = filtered[i];
161
+ const result = handle(handleContext, async () => {
162
+ if (i < length - 1) {
163
+ return applyHandle(i + 1, handleContext);
164
+ } else {
165
+ return next();
1781
166
  }
167
+ });
168
+ return result;
1782
169
  }
1783
- hasAttribute(name) {
1784
- return false;
1785
- }
1786
- getAttribute(name) {
1787
- return null;
1788
- }
1789
- setAttribute(name, value) {
1790
- }
1791
- removeAttribute(name) {
1792
- }
1793
- attachShadow(init) {
1794
- if (arguments.length < 1)
1795
- throw new TypeError(`Failed to execute 'attachShadow' on 'Element': 1 argument required, but only 0 present.`);
1796
- if (init !== Object(init))
1797
- throw new TypeError(`Failed to execute 'attachShadow' on 'Element': The provided value is not of type 'ShadowRootInit'.`);
1798
- if (init.mode !== 'open' && init.mode !== 'closed')
1799
- throw new TypeError(`Failed to execute 'attachShadow' on 'Element': Failed to read the 'mode' property from 'ShadowRootInit': The provided value '${init.mode}' is not a valid enum value of type ShadowRootMode.`);
1800
- const internals = internalsOf(this, 'Element', 'attachShadow');
1801
- if (internals.shadowRoot)
1802
- throw new Error('The operation is not supported.');
1803
- internals.shadowInit = internals.shadowInit || {
1804
- mode: init.mode,
1805
- delegatesFocus: Boolean(init.delegatesFocus),
1806
- };
1807
- internals.shadowRoot =
1808
- internals.shadowRoot ||
1809
- (/^open$/.test(internals.shadowInit.mode)
1810
- ? Object.setPrototypeOf(new EventTarget(), ShadowRoot.prototype)
1811
- : null);
1812
- return internals.shadowRoot;
1813
- }
1814
- get assignedSlot() {
1815
- return null;
1816
- }
1817
- get innerHTML() {
1818
- internalsOf(this, 'Element', 'innerHTML');
1819
- return '';
1820
- }
1821
- set innerHTML(value) {
1822
- internalsOf(this, 'Element', 'innerHTML');
1823
- }
1824
- get shadowRoot() {
1825
- const internals = internalsOf(this, 'Element', 'shadowRoot');
1826
- return Object(internals.shadowInit).mode === 'open'
1827
- ? internals.shadowRoot
1828
- : null;
1829
- }
1830
- get localName() {
1831
- return internalsOf(this, 'Element', 'localName')
1832
- .localName;
1833
- }
1834
- get nodeName() {
1835
- return internalsOf(this, 'Element', 'nodeName')
1836
- .localName.toUpperCase();
1837
- }
1838
- get tagName() {
1839
- return internalsOf(this, 'Element', 'tagName')
1840
- .localName.toUpperCase();
1841
- }
1842
- }
1843
- class HTMLElement extends Element {
1844
- }
1845
- class HTMLBodyElement extends HTMLElement {
170
+ });
1846
171
  }
1847
- class HTMLDivElement extends HTMLElement {
172
+
173
+ function defineMiddleware(fn) {
174
+ return fn;
1848
175
  }
1849
- class HTMLHeadElement extends HTMLElement {
176
+
177
+ function createAssetLink(href, base, assetsPrefix) {
178
+ if (assetsPrefix) {
179
+ return joinPaths(assetsPrefix, slash(href));
180
+ } else if (base) {
181
+ return prependForwardSlash(joinPaths(base, slash(href)));
182
+ } else {
183
+ return href;
184
+ }
1850
185
  }
1851
- class HTMLHtmlElement extends HTMLElement {
186
+ function createStylesheetElement(stylesheet, base, assetsPrefix) {
187
+ if (stylesheet.type === "inline") {
188
+ return {
189
+ props: {},
190
+ children: stylesheet.content
191
+ };
192
+ } else {
193
+ return {
194
+ props: {
195
+ rel: "stylesheet",
196
+ href: createAssetLink(stylesheet.src, base, assetsPrefix)
197
+ },
198
+ children: ""
199
+ };
200
+ }
1852
201
  }
1853
- class HTMLSpanElement extends HTMLElement {
202
+ function createStylesheetElementSet(stylesheets, base, assetsPrefix) {
203
+ return new Set(stylesheets.map((s) => createStylesheetElement(s, base, assetsPrefix)));
1854
204
  }
1855
- class HTMLStyleElement extends HTMLElement {
205
+ function createModuleScriptElement(script, base, assetsPrefix) {
206
+ if (script.type === "external") {
207
+ return createModuleScriptElementWithSrc(script.value, base, assetsPrefix);
208
+ } else {
209
+ return {
210
+ props: {
211
+ type: "module"
212
+ },
213
+ children: script.value
214
+ };
215
+ }
1856
216
  }
1857
- class HTMLTemplateElement extends HTMLElement {
217
+ function createModuleScriptElementWithSrc(src, base, assetsPrefix) {
218
+ return {
219
+ props: {
220
+ type: "module",
221
+ src: createAssetLink(src, base, assetsPrefix)
222
+ },
223
+ children: ""
224
+ };
1858
225
  }
1859
- class HTMLUnknownElement extends HTMLElement {
226
+
227
+ function matchRoute(pathname, manifest) {
228
+ const decodedPathname = decodeURI(pathname);
229
+ return manifest.routes.find((route) => {
230
+ return route.pattern.test(decodedPathname) || route.fallbackRoutes.some((fallbackRoute) => fallbackRoute.pattern.test(decodedPathname));
231
+ });
1860
232
  }
1861
- allowStringTag(Element);
1862
- allowStringTag(HTMLElement);
1863
- allowStringTag(HTMLBodyElement);
1864
- allowStringTag(HTMLDivElement);
1865
- allowStringTag(HTMLHeadElement);
1866
- allowStringTag(HTMLHtmlElement);
1867
- allowStringTag(HTMLSpanElement);
1868
- allowStringTag(HTMLStyleElement);
1869
- allowStringTag(HTMLTemplateElement);
1870
- allowStringTag(HTMLUnknownElement);
1871
233
 
1872
- class Document extends Node {
1873
- createElement(name) {
1874
- const internals = internalsOf(this, 'Document', 'createElement');
1875
- const customElementInternals = INTERNALS.get(internals.target.customElements);
1876
- name = String(name).toLowerCase();
1877
- const TypeOfHTMLElement = internals.constructorByName.get(name) ||
1878
- (customElementInternals &&
1879
- customElementInternals.constructorByName.get(name)) ||
1880
- HTMLUnknownElement;
1881
- const element = Object.setPrototypeOf(new EventTarget(), TypeOfHTMLElement.prototype);
1882
- INTERNALS.set(element, {
1883
- attributes: {},
1884
- localName: name,
1885
- ownerDocument: this,
1886
- shadowInit: null,
1887
- shadowRoot: null,
1888
- });
1889
- return element;
1890
- }
1891
- createNodeIterator(root, whatToShow = NodeFilter.SHOW_ALL, filter) {
1892
- const target = Object.create(NodeIterator.prototype);
1893
- INTERNALS.set(target, {
1894
- filter,
1895
- pointerBeforeReferenceNode: false,
1896
- referenceNode: root,
1897
- root,
1898
- whatToShow,
1899
- });
1900
- return target;
1901
- }
1902
- createTextNode(data) {
1903
- return new Text(data);
1904
- }
1905
- createTreeWalker(root, whatToShow = NodeFilter.SHOW_ALL, filter, expandEntityReferences) {
1906
- const target = Object.create(TreeWalker.prototype);
1907
- INTERNALS.set(target, {
1908
- filter,
1909
- currentNode: root,
1910
- root,
1911
- whatToShow,
234
+ const clientAddressSymbol$1 = Symbol.for("astro.clientAddress");
235
+ const responseSentSymbol$1 = Symbol.for("astro.responseSent");
236
+ function getFunctionExpression(slot) {
237
+ if (!slot)
238
+ return;
239
+ if (slot.expressions?.length !== 1)
240
+ return;
241
+ return slot.expressions[0];
242
+ }
243
+ class Slots {
244
+ #result;
245
+ #slots;
246
+ #logger;
247
+ constructor(result, slots, logger) {
248
+ this.#result = result;
249
+ this.#slots = slots;
250
+ this.#logger = logger;
251
+ if (slots) {
252
+ for (const key of Object.keys(slots)) {
253
+ if (this[key] !== void 0) {
254
+ throw new AstroError({
255
+ ...ReservedSlotName,
256
+ message: ReservedSlotName.message(key)
257
+ });
258
+ }
259
+ Object.defineProperty(this, key, {
260
+ get() {
261
+ return true;
262
+ },
263
+ enumerable: true
1912
264
  });
1913
- return target;
1914
- }
1915
- get adoptedStyleSheets() {
1916
- return [];
1917
- }
1918
- get styleSheets() {
1919
- return [];
265
+ }
1920
266
  }
1921
- }
1922
- class HTMLDocument extends Document {
1923
- }
1924
- allowStringTag(Document);
1925
- allowStringTag(HTMLDocument);
1926
- const initDocument = (target, exclude) => {
1927
- if (exclude.has('document'))
1928
- return;
1929
- const EventTarget = target.EventTarget || globalThis.EventTarget;
1930
- const HTMLDocument = target.HTMLDocument || globalThis.HTMLDocument;
1931
- const document = (target.document = Object.setPrototypeOf(new EventTarget(), HTMLDocument.prototype));
1932
- INTERNALS.set(document, {
1933
- target,
1934
- constructorByName: new Map([
1935
- ['body', target.HTMLBodyElement],
1936
- ['canvas', target.HTMLCanvasElement],
1937
- ['div', target.HTMLDivElement],
1938
- ['head', target.HTMLHeadElement],
1939
- ['html', target.HTMLHtmlElement],
1940
- ['img', target.HTMLImageElement],
1941
- ['span', target.HTMLSpanElement],
1942
- ['style', target.HTMLStyleElement],
1943
- ]),
1944
- nameByConstructor: new Map(),
1945
- });
1946
- const initElement = (name, Class) => {
1947
- const target = Object.setPrototypeOf(new EventTarget(), Class.prototype);
1948
- INTERNALS.set(target, {
1949
- attributes: {},
1950
- localName: name,
1951
- ownerDocument: document,
1952
- shadowRoot: null,
1953
- shadowInit: null,
267
+ }
268
+ has(name) {
269
+ if (!this.#slots)
270
+ return false;
271
+ return Boolean(this.#slots[name]);
272
+ }
273
+ async render(name, args = []) {
274
+ if (!this.#slots || !this.has(name))
275
+ return;
276
+ const result = this.#result;
277
+ if (!Array.isArray(args)) {
278
+ this.#logger.warn(
279
+ "Astro.slots.render",
280
+ `Expected second parameter to be an array, received a ${typeof args}. If you're trying to pass an array as a single argument and getting unexpected results, make sure you're passing your array as a item of an array. Ex: Astro.slots.render('default', [["Hello", "World"]])`
281
+ );
282
+ } else if (args.length > 0) {
283
+ const slotValue = this.#slots[name];
284
+ const component = typeof slotValue === "function" ? await slotValue(result) : await slotValue;
285
+ const expression = getFunctionExpression(component);
286
+ if (expression) {
287
+ const slot = async () => typeof expression === "function" ? expression(...args) : expression;
288
+ return await renderSlotToString(result, slot).then((res) => {
289
+ return res != null ? String(res) : res;
1954
290
  });
1955
- return target;
1956
- };
1957
- document.body = initElement('body', target.HTMLBodyElement);
1958
- document.head = initElement('head', target.HTMLHeadElement);
1959
- document.documentElement = initElement('html', target.HTMLHtmlElement);
1960
- };
1961
-
1962
- class HTMLCanvasElement extends HTMLElement {
1963
- get height() {
1964
- return internalsOf(this, 'HTMLCanvasElement', 'height').height;
1965
- }
1966
- set height(value) {
1967
- internalsOf(this, 'HTMLCanvasElement', 'height').height =
1968
- Number(value) || 0;
1969
- }
1970
- get width() {
1971
- return internalsOf(this, 'HTMLCanvasElement', 'width').width;
1972
- }
1973
- set width(value) {
1974
- internalsOf(this, 'HTMLCanvasElement', 'width').width = Number(value) || 0;
1975
- }
1976
- captureStream() {
1977
- return null;
1978
- }
1979
- getContext(contextType) {
1980
- const internals = internalsOf(this, 'HTMLCanvasElement', 'getContext');
1981
- switch (contextType) {
1982
- case '2d':
1983
- if (internals.renderingContext2D)
1984
- return internals.renderingContext2D;
1985
- internals.renderingContext2D = __createCanvasRenderingContext2D(this);
1986
- return internals.renderingContext2D;
1987
- default:
1988
- return null;
1989
- }
291
+ }
292
+ if (typeof component === "function") {
293
+ return await renderJSX(result, component(...args)).then(
294
+ (res) => res != null ? String(res) : res
295
+ );
296
+ }
1990
297
  }
1991
- toBlob() { }
1992
- toDataURL() { }
1993
- transferControlToOffscreen() { }
298
+ const content = await renderSlotToString(result, this.#slots[name]);
299
+ const outHTML = chunkToString(result, content);
300
+ return outHTML;
301
+ }
1994
302
  }
1995
- allowStringTag(HTMLCanvasElement);
1996
-
1997
- class HTMLImageElement extends HTMLElement {
1998
- get src() {
1999
- return internalsOf(this, 'HTMLImageElement', 'src').src;
2000
- }
2001
- set src(value) {
2002
- const internals = internalsOf(this, 'HTMLImageElement', 'src');
2003
- internals.src = String(value);
303
+ function createResult(args) {
304
+ const { params, request, resolve, locals } = args;
305
+ const url = new URL(request.url);
306
+ const headers = new Headers();
307
+ headers.set("Content-Type", "text/html");
308
+ const response = {
309
+ status: args.status,
310
+ statusText: "OK",
311
+ headers
312
+ };
313
+ Object.defineProperty(response, "headers", {
314
+ value: response.headers,
315
+ enumerable: true,
316
+ writable: false
317
+ });
318
+ let cookies = args.cookies;
319
+ let preferredLocale = void 0;
320
+ let preferredLocaleList = void 0;
321
+ let currentLocale = void 0;
322
+ const result = {
323
+ styles: args.styles ?? /* @__PURE__ */ new Set(),
324
+ scripts: args.scripts ?? /* @__PURE__ */ new Set(),
325
+ links: args.links ?? /* @__PURE__ */ new Set(),
326
+ componentMetadata: args.componentMetadata ?? /* @__PURE__ */ new Map(),
327
+ renderers: args.renderers,
328
+ clientDirectives: args.clientDirectives,
329
+ compressHTML: args.compressHTML,
330
+ partial: args.partial,
331
+ pathname: args.pathname,
332
+ cookies,
333
+ /** This function returns the `Astro` faux-global */
334
+ createAstro(astroGlobal, props, slots) {
335
+ const astroSlots = new Slots(result, slots, args.logger);
336
+ const Astro = {
337
+ // @ts-expect-error
338
+ __proto__: astroGlobal,
339
+ get clientAddress() {
340
+ if (!(clientAddressSymbol$1 in request)) {
341
+ if (args.adapterName) {
342
+ throw new AstroError({
343
+ ...ClientAddressNotAvailable,
344
+ message: ClientAddressNotAvailable.message(args.adapterName)
345
+ });
346
+ } else {
347
+ throw new AstroError(StaticClientAddressNotAvailable);
348
+ }
349
+ }
350
+ return Reflect.get(request, clientAddressSymbol$1);
351
+ },
352
+ get cookies() {
353
+ if (cookies) {
354
+ return cookies;
355
+ }
356
+ cookies = new AstroCookies(request);
357
+ result.cookies = cookies;
358
+ return cookies;
359
+ },
360
+ get preferredLocale() {
361
+ if (preferredLocale) {
362
+ return preferredLocale;
363
+ }
364
+ if (args.locales) {
365
+ preferredLocale = computePreferredLocale(request, args.locales);
366
+ return preferredLocale;
367
+ }
368
+ return void 0;
369
+ },
370
+ get preferredLocaleList() {
371
+ if (preferredLocaleList) {
372
+ return preferredLocaleList;
373
+ }
374
+ if (args.locales) {
375
+ preferredLocaleList = computePreferredLocaleList(request, args.locales);
376
+ return preferredLocaleList;
377
+ }
378
+ return void 0;
379
+ },
380
+ get currentLocale() {
381
+ if (currentLocale) {
382
+ return currentLocale;
383
+ }
384
+ if (args.locales) {
385
+ currentLocale = computeCurrentLocale(
386
+ request,
387
+ args.locales,
388
+ args.routingStrategy,
389
+ args.defaultLocale
390
+ );
391
+ if (currentLocale) {
392
+ return currentLocale;
393
+ }
394
+ }
395
+ return void 0;
396
+ },
397
+ params,
398
+ props,
399
+ locals,
400
+ request,
401
+ url,
402
+ redirect(path, status) {
403
+ if (request[responseSentSymbol$1]) {
404
+ throw new AstroError({
405
+ ...ResponseSentError
406
+ });
407
+ }
408
+ return new Response(null, {
409
+ status: status || 302,
410
+ headers: {
411
+ Location: path
412
+ }
413
+ });
414
+ },
415
+ response,
416
+ slots: astroSlots
417
+ };
418
+ return Astro;
419
+ },
420
+ resolve,
421
+ response,
422
+ _metadata: {
423
+ hasHydrationScript: false,
424
+ hasRenderedHead: false,
425
+ hasDirectives: /* @__PURE__ */ new Set(),
426
+ headInTree: false,
427
+ extraHead: [],
428
+ propagators: /* @__PURE__ */ new Set()
2004
429
  }
430
+ };
431
+ return result;
2005
432
  }
2006
- allowStringTag(HTMLImageElement);
2007
433
 
2008
- function Image() {
2009
- // @ts-expect-error
2010
- INTERNALS.set(this, {
2011
- attributes: {},
2012
- localName: 'img',
2013
- innerHTML: '',
2014
- shadowRoot: null,
2015
- shadowInit: null,
434
+ async function renderPage({ mod, renderContext, env, cookies }) {
435
+ if (routeIsRedirect(renderContext.route)) {
436
+ return new Response(null, {
437
+ status: redirectRouteStatus(renderContext.route, renderContext.request.method),
438
+ headers: {
439
+ location: redirectRouteGenerate(renderContext.route, renderContext.params)
440
+ }
2016
441
  });
442
+ } else if (routeIsFallback(renderContext.route)) {
443
+ return new Response(null, {
444
+ status: 404
445
+ });
446
+ } else if (!mod) {
447
+ throw new AstroError(CantRenderPage);
448
+ }
449
+ const Component = mod.default;
450
+ if (!Component)
451
+ throw new Error(`Expected an exported Astro component but received typeof ${typeof Component}`);
452
+ const result = createResult({
453
+ adapterName: env.adapterName,
454
+ links: renderContext.links,
455
+ styles: renderContext.styles,
456
+ logger: env.logger,
457
+ params: renderContext.params,
458
+ pathname: renderContext.pathname,
459
+ componentMetadata: renderContext.componentMetadata,
460
+ resolve: env.resolve,
461
+ renderers: env.renderers,
462
+ clientDirectives: env.clientDirectives,
463
+ compressHTML: env.compressHTML,
464
+ request: renderContext.request,
465
+ partial: !!mod.partial,
466
+ site: env.site,
467
+ scripts: renderContext.scripts,
468
+ ssr: env.ssr,
469
+ status: renderContext.status ?? 200,
470
+ cookies,
471
+ locals: renderContext.locals ?? {},
472
+ locales: renderContext.locales,
473
+ defaultLocale: renderContext.defaultLocale,
474
+ routingStrategy: renderContext.routingStrategy
475
+ });
476
+ if (mod.frontmatter && typeof mod.frontmatter === "object" && "draft" in mod.frontmatter) {
477
+ env.logger.warn(
478
+ "astro",
479
+ `The drafts feature is deprecated and used in ${renderContext.route.component}. You should migrate to content collections instead. See https://docs.astro.build/en/guides/content-collections/#filtering-collection-queries for more information.`
480
+ );
481
+ }
482
+ const response = await renderPage$1(
483
+ result,
484
+ Component,
485
+ renderContext.props,
486
+ null,
487
+ env.streaming,
488
+ renderContext.route
489
+ );
490
+ if (result.cookies) {
491
+ attachCookiesToResponse(response, result.cookies);
492
+ }
493
+ return response;
2017
494
  }
2018
- Image.prototype = HTMLImageElement.prototype;
2019
495
 
2020
- class MediaQueryList extends EventTarget {
2021
- get matches() {
2022
- return internalsOf(this, 'MediaQueryList', 'matches').matches;
496
+ class Pipeline {
497
+ env;
498
+ #onRequest;
499
+ #hooks = {
500
+ before: []
501
+ };
502
+ /**
503
+ * The handler accepts the *original* `Request` and result returned by the endpoint.
504
+ * It must return a `Response`.
505
+ */
506
+ #endpointHandler;
507
+ /**
508
+ * When creating a pipeline, an environment is mandatory.
509
+ * The environment won't change for the whole lifetime of the pipeline.
510
+ */
511
+ constructor(env) {
512
+ this.env = env;
513
+ }
514
+ setEnvironment() {
515
+ }
516
+ /**
517
+ * When rendering a route, an "endpoint" will a type that needs to be handled and transformed into a `Response`.
518
+ *
519
+ * Each consumer might have different needs; use this function to set up the handler.
520
+ */
521
+ setEndpointHandler(handler) {
522
+ this.#endpointHandler = handler;
523
+ }
524
+ /**
525
+ * A middleware function that will be called before each request.
526
+ */
527
+ setMiddlewareFunction(onRequest) {
528
+ this.#onRequest = onRequest;
529
+ }
530
+ /**
531
+ * Removes the current middleware function. Subsequent requests won't trigger any middleware.
532
+ */
533
+ unsetMiddlewareFunction() {
534
+ this.#onRequest = void 0;
535
+ }
536
+ /**
537
+ * Returns the current environment
538
+ */
539
+ getEnvironment() {
540
+ return this.env;
541
+ }
542
+ /**
543
+ * The main function of the pipeline. Use this function to render any route known to Astro;
544
+ */
545
+ async renderRoute(renderContext, componentInstance) {
546
+ for (const hook of this.#hooks.before) {
547
+ hook(renderContext, componentInstance);
548
+ }
549
+ const result = await this.#tryRenderRoute(
550
+ renderContext,
551
+ this.env,
552
+ componentInstance,
553
+ this.#onRequest
554
+ );
555
+ if (renderContext.route.type === "endpoint") {
556
+ if (!this.#endpointHandler) {
557
+ throw new Error(
558
+ "You created a pipeline that does not know how to handle the result coming from an endpoint."
559
+ );
560
+ }
561
+ return this.#endpointHandler(renderContext.request, result);
562
+ } else {
563
+ return result;
2023
564
  }
2024
- get media() {
2025
- return internalsOf(this, 'MediaQueryList', 'media').media;
565
+ }
566
+ /**
567
+ * It attempts to render a route. A route can be a:
568
+ * - page
569
+ * - redirect
570
+ * - endpoint
571
+ *
572
+ * ## Errors
573
+ *
574
+ * It throws an error if the page can't be rendered.
575
+ */
576
+ async #tryRenderRoute(renderContext, env, mod, onRequest) {
577
+ const apiContext = createAPIContext({
578
+ request: renderContext.request,
579
+ params: renderContext.params,
580
+ props: renderContext.props,
581
+ site: env.site,
582
+ adapterName: env.adapterName,
583
+ locales: renderContext.locales,
584
+ routingStrategy: renderContext.routingStrategy,
585
+ defaultLocale: renderContext.defaultLocale
586
+ });
587
+ switch (renderContext.route.type) {
588
+ case "page":
589
+ case "fallback":
590
+ case "redirect": {
591
+ if (onRequest) {
592
+ return await callMiddleware(
593
+ env.logger,
594
+ onRequest,
595
+ apiContext,
596
+ () => {
597
+ return renderPage({
598
+ mod,
599
+ renderContext,
600
+ env,
601
+ cookies: apiContext.cookies
602
+ });
603
+ }
604
+ );
605
+ } else {
606
+ return await renderPage({
607
+ mod,
608
+ renderContext,
609
+ env,
610
+ cookies: apiContext.cookies
611
+ });
612
+ }
613
+ }
614
+ case "endpoint": {
615
+ return await callEndpoint(mod, env, renderContext, onRequest);
616
+ }
617
+ default:
618
+ throw new Error(`Couldn't find route of type [${renderContext.route.type}]`);
2026
619
  }
620
+ }
621
+ /**
622
+ * Store a function that will be called before starting the rendering phase.
623
+ * @param fn
624
+ */
625
+ onBeforeRenderRoute(fn) {
626
+ this.#hooks.before.push(fn);
627
+ }
2027
628
  }
2028
- allowStringTag(MediaQueryList);
2029
- const initMediaQueryList = (target, exclude) => {
2030
- if (exclude.has('MediaQueryList') || exclude.has('matchMedia'))
2031
- return;
2032
- const EventTarget = target.EventTarget || globalThis.EventTarget;
2033
- const MediaQueryList = target.MediaQueryList || globalThis.MediaQueryList;
2034
- target.matchMedia = function matchMedia(media) {
2035
- const mql = Object.setPrototypeOf(new EventTarget(), MediaQueryList.prototype);
2036
- INTERNALS.set(mql, {
2037
- matches: false,
2038
- media,
2039
- });
2040
- return mql;
2041
- };
2042
- };
2043
629
 
2044
- class IntersectionObserver {
2045
- disconnect() { }
2046
- observe() { }
2047
- takeRecords() {
2048
- return [];
2049
- }
2050
- unobserve() { }
2051
- }
2052
- class MutationObserver {
2053
- disconnect() { }
2054
- observe() { }
2055
- takeRecords() {
2056
- return [];
2057
- }
2058
- unobserve() { }
630
+ class EndpointNotFoundError extends Error {
631
+ originalResponse;
632
+ constructor(originalResponse) {
633
+ super();
634
+ this.originalResponse = originalResponse;
635
+ }
2059
636
  }
2060
- class ResizeObserver {
2061
- disconnect() { }
2062
- observe() { }
2063
- takeRecords() {
2064
- return [];
637
+ class SSRRoutePipeline extends Pipeline {
638
+ constructor(env) {
639
+ super(env);
640
+ this.setEndpointHandler(this.#ssrEndpointHandler);
641
+ }
642
+ // This function is responsible for handling the result coming from an endpoint.
643
+ async #ssrEndpointHandler(request, response) {
644
+ if (response.headers.get("X-Astro-Response") === "Not-Found") {
645
+ throw new EndpointNotFoundError(response);
2065
646
  }
2066
- unobserve() { }
647
+ return response;
648
+ }
2067
649
  }
2068
- allowStringTag(MutationObserver);
2069
- allowStringTag(IntersectionObserver);
2070
- allowStringTag(ResizeObserver);
2071
650
 
2072
- class OffscreenCanvas extends EventTarget {
2073
- constructor(width, height) {
2074
- super();
2075
- if (arguments.length < 2)
2076
- throw new TypeError(`Failed to construct 'OffscreenCanvas': 2 arguments required.`);
2077
- width = Number(width) || 0;
2078
- height = Number(height) || 0;
2079
- INTERNALS.set(this, { width, height });
651
+ const clientLocalsSymbol = Symbol.for("astro.locals");
652
+ const responseSentSymbol = Symbol.for("astro.responseSent");
653
+ const STATUS_CODES = /* @__PURE__ */ new Set([404, 500]);
654
+ class App {
655
+ /**
656
+ * The current environment of the application
657
+ */
658
+ #manifest;
659
+ #manifestData;
660
+ #routeDataToRouteInfo;
661
+ #logger = new Logger({
662
+ dest: consoleLogDestination,
663
+ level: "info"
664
+ });
665
+ #baseWithoutTrailingSlash;
666
+ #pipeline;
667
+ #adapterLogger;
668
+ constructor(manifest, streaming = true) {
669
+ this.#manifest = manifest;
670
+ this.#manifestData = {
671
+ routes: manifest.routes.map((route) => route.routeData)
672
+ };
673
+ this.#routeDataToRouteInfo = new Map(manifest.routes.map((route) => [route.routeData, route]));
674
+ this.#baseWithoutTrailingSlash = removeTrailingForwardSlash(this.#manifest.base);
675
+ this.#pipeline = new SSRRoutePipeline(this.#createEnvironment(streaming));
676
+ this.#adapterLogger = new AstroIntegrationLogger(
677
+ this.#logger.options,
678
+ this.#manifest.adapterName
679
+ );
680
+ }
681
+ getAdapterLogger() {
682
+ return this.#adapterLogger;
683
+ }
684
+ /**
685
+ * Creates an environment by reading the stored manifest
686
+ *
687
+ * @param streaming
688
+ * @private
689
+ */
690
+ #createEnvironment(streaming = false) {
691
+ return createEnvironment({
692
+ adapterName: this.#manifest.adapterName,
693
+ logger: this.#logger,
694
+ mode: "production",
695
+ compressHTML: this.#manifest.compressHTML,
696
+ renderers: this.#manifest.renderers,
697
+ clientDirectives: this.#manifest.clientDirectives,
698
+ resolve: async (specifier) => {
699
+ if (!(specifier in this.#manifest.entryModules)) {
700
+ throw new Error(`Unable to resolve [${specifier}]`);
701
+ }
702
+ const bundlePath = this.#manifest.entryModules[specifier];
703
+ switch (true) {
704
+ case bundlePath.startsWith("data:"):
705
+ case bundlePath.length === 0: {
706
+ return bundlePath;
707
+ }
708
+ default: {
709
+ return createAssetLink(bundlePath, this.#manifest.base, this.#manifest.assetsPrefix);
710
+ }
711
+ }
712
+ },
713
+ routeCache: new RouteCache(this.#logger),
714
+ site: this.#manifest.site,
715
+ ssr: true,
716
+ streaming
717
+ });
718
+ }
719
+ set setManifestData(newManifestData) {
720
+ this.#manifestData = newManifestData;
721
+ }
722
+ removeBase(pathname) {
723
+ if (pathname.startsWith(this.#manifest.base)) {
724
+ return pathname.slice(this.#baseWithoutTrailingSlash.length + 1);
2080
725
  }
2081
- get height() {
2082
- return internalsOf(this, 'OffscreenCanvas', 'height').height;
726
+ return pathname;
727
+ }
728
+ #getPathnameFromRequest(request) {
729
+ const url = new URL(request.url);
730
+ const pathname = prependForwardSlash(this.removeBase(url.pathname));
731
+ return pathname;
732
+ }
733
+ match(request, _opts = {}) {
734
+ const url = new URL(request.url);
735
+ if (this.#manifest.assets.has(url.pathname))
736
+ return void 0;
737
+ const pathname = prependForwardSlash(this.removeBase(url.pathname));
738
+ const routeData = matchRoute(pathname, this.#manifestData);
739
+ if (!routeData || routeData.prerender)
740
+ return void 0;
741
+ return routeData;
742
+ }
743
+ async render(request, routeData, locals) {
744
+ if (request.url !== collapseDuplicateSlashes(request.url)) {
745
+ request = new Request(collapseDuplicateSlashes(request.url), request);
746
+ }
747
+ if (!routeData) {
748
+ routeData = this.match(request);
749
+ }
750
+ if (!routeData) {
751
+ return this.#renderError(request, { status: 404 });
752
+ }
753
+ Reflect.set(request, clientLocalsSymbol, locals ?? {});
754
+ const pathname = this.#getPathnameFromRequest(request);
755
+ const defaultStatus = this.#getDefaultStatusCode(routeData, pathname);
756
+ const mod = await this.#getModuleForRoute(routeData);
757
+ const pageModule = await mod.page();
758
+ const url = new URL(request.url);
759
+ const renderContext = await this.#createRenderContext(
760
+ url,
761
+ request,
762
+ routeData,
763
+ mod,
764
+ defaultStatus
765
+ );
766
+ let response;
767
+ try {
768
+ let i18nMiddleware = createI18nMiddleware(
769
+ this.#manifest.i18n,
770
+ this.#manifest.base,
771
+ this.#manifest.trailingSlash
772
+ );
773
+ if (i18nMiddleware) {
774
+ if (mod.onRequest) {
775
+ this.#pipeline.setMiddlewareFunction(
776
+ sequence(i18nMiddleware, mod.onRequest)
777
+ );
778
+ } else {
779
+ this.#pipeline.setMiddlewareFunction(i18nMiddleware);
780
+ }
781
+ this.#pipeline.onBeforeRenderRoute(i18nPipelineHook);
782
+ } else {
783
+ if (mod.onRequest) {
784
+ this.#pipeline.setMiddlewareFunction(mod.onRequest);
785
+ }
786
+ }
787
+ response = await this.#pipeline.renderRoute(renderContext, pageModule);
788
+ } catch (err) {
789
+ if (err instanceof EndpointNotFoundError) {
790
+ return this.#renderError(request, { status: 404, response: err.originalResponse });
791
+ } else {
792
+ this.#logger.error("ssr", err.stack || err.message || String(err));
793
+ return this.#renderError(request, { status: 500 });
794
+ }
2083
795
  }
2084
- set height(value) {
2085
- internalsOf(this, 'OffscreenCanvas', 'height').height = Number(value) || 0;
796
+ if (routeData.type === "page" || routeData.type === "redirect") {
797
+ if (STATUS_CODES.has(response.status)) {
798
+ return this.#renderError(request, {
799
+ response,
800
+ status: response.status
801
+ });
802
+ }
803
+ Reflect.set(response, responseSentSymbol, true);
804
+ return response;
2086
805
  }
2087
- get width() {
2088
- return internalsOf(this, 'OffscreenCanvas', 'width').width;
806
+ return response;
807
+ }
808
+ setCookieHeaders(response) {
809
+ return getSetCookiesFromResponse(response);
810
+ }
811
+ /**
812
+ * Creates the render context of the current route
813
+ */
814
+ async #createRenderContext(url, request, routeData, page, status = 200) {
815
+ if (routeData.type === "endpoint") {
816
+ const pathname = "/" + this.removeBase(url.pathname);
817
+ const mod = await page.page();
818
+ const handler = mod;
819
+ return await createRenderContext({
820
+ request,
821
+ pathname,
822
+ route: routeData,
823
+ status,
824
+ env: this.#pipeline.env,
825
+ mod: handler,
826
+ locales: this.#manifest.i18n?.locales,
827
+ routingStrategy: this.#manifest.i18n?.routingStrategy,
828
+ defaultLocale: this.#manifest.i18n?.defaultLocale
829
+ });
830
+ } else {
831
+ const pathname = prependForwardSlash(this.removeBase(url.pathname));
832
+ const info = this.#routeDataToRouteInfo.get(routeData);
833
+ const links = /* @__PURE__ */ new Set();
834
+ const styles = createStylesheetElementSet(info.styles);
835
+ let scripts = /* @__PURE__ */ new Set();
836
+ for (const script of info.scripts) {
837
+ if ("stage" in script) {
838
+ if (script.stage === "head-inline") {
839
+ scripts.add({
840
+ props: {},
841
+ children: script.children
842
+ });
843
+ }
844
+ } else {
845
+ scripts.add(createModuleScriptElement(script));
846
+ }
847
+ }
848
+ const mod = await page.page();
849
+ return await createRenderContext({
850
+ request,
851
+ pathname,
852
+ componentMetadata: this.#manifest.componentMetadata,
853
+ scripts,
854
+ styles,
855
+ links,
856
+ route: routeData,
857
+ status,
858
+ mod,
859
+ env: this.#pipeline.env,
860
+ locales: this.#manifest.i18n?.locales,
861
+ routingStrategy: this.#manifest.i18n?.routingStrategy,
862
+ defaultLocale: this.#manifest.i18n?.defaultLocale
863
+ });
2089
864
  }
2090
- set width(value) {
2091
- internalsOf(this, 'OffscreenCanvas', 'width').width = Number(value) || 0;
865
+ }
866
+ /**
867
+ * If it is a known error code, try sending the according page (e.g. 404.astro / 500.astro).
868
+ * This also handles pre-rendered /404 or /500 routes
869
+ */
870
+ async #renderError(request, { status, response: originalResponse, skipMiddleware = false }) {
871
+ const errorRouteData = matchRoute("/" + status, this.#manifestData);
872
+ const url = new URL(request.url);
873
+ if (errorRouteData) {
874
+ if (errorRouteData.prerender) {
875
+ const maybeDotHtml = errorRouteData.route.endsWith(`/${status}`) ? ".html" : "";
876
+ const statusURL = new URL(
877
+ `${this.#baseWithoutTrailingSlash}/${status}${maybeDotHtml}`,
878
+ url
879
+ );
880
+ const response2 = await fetch(statusURL.toString());
881
+ const override = { status };
882
+ return this.#mergeResponses(response2, originalResponse, override);
883
+ }
884
+ const mod = await this.#getModuleForRoute(errorRouteData);
885
+ try {
886
+ const newRenderContext = await this.#createRenderContext(
887
+ url,
888
+ request,
889
+ errorRouteData,
890
+ mod,
891
+ status
892
+ );
893
+ const page = await mod.page();
894
+ if (skipMiddleware === false && mod.onRequest) {
895
+ this.#pipeline.setMiddlewareFunction(mod.onRequest);
896
+ }
897
+ if (skipMiddleware) {
898
+ this.#pipeline.unsetMiddlewareFunction();
899
+ }
900
+ const response2 = await this.#pipeline.renderRoute(newRenderContext, page);
901
+ return this.#mergeResponses(response2, originalResponse);
902
+ } catch {
903
+ if (skipMiddleware === false && mod.onRequest) {
904
+ return this.#renderError(request, {
905
+ status,
906
+ response: originalResponse,
907
+ skipMiddleware: true
908
+ });
909
+ }
910
+ }
2092
911
  }
2093
- getContext(contextType) {
2094
- const internals = internalsOf(this, 'HTMLCanvasElement', 'getContext');
2095
- switch (contextType) {
2096
- case '2d':
2097
- if (internals.renderingContext2D)
2098
- return internals.renderingContext2D;
2099
- internals.renderingContext2D = __createCanvasRenderingContext2D(this);
2100
- return internals.renderingContext2D;
2101
- default:
2102
- return null;
912
+ const response = this.#mergeResponses(new Response(null, { status }), originalResponse);
913
+ Reflect.set(response, responseSentSymbol, true);
914
+ return response;
915
+ }
916
+ #mergeResponses(newResponse, oldResponse, override) {
917
+ if (!oldResponse) {
918
+ if (override !== void 0) {
919
+ return new Response(newResponse.body, {
920
+ status: override.status,
921
+ statusText: newResponse.statusText,
922
+ headers: newResponse.headers
923
+ });
924
+ }
925
+ return newResponse;
926
+ }
927
+ const { statusText, headers } = oldResponse;
928
+ const status = override?.status ? override.status : oldResponse.status === 200 ? newResponse.status : oldResponse.status;
929
+ return new Response(newResponse.body, {
930
+ status,
931
+ statusText: status === 200 ? newResponse.statusText : statusText,
932
+ headers: new Headers(Array.from(headers))
933
+ });
934
+ }
935
+ #getDefaultStatusCode(routeData, pathname) {
936
+ if (!routeData.pattern.exec(pathname)) {
937
+ for (const fallbackRoute of routeData.fallbackRoutes) {
938
+ if (fallbackRoute.pattern.test(pathname)) {
939
+ return 302;
2103
940
  }
941
+ }
2104
942
  }
2105
- convertToBlob(options) {
2106
- options = Object(options);
2107
- Number(options.quality) || 0;
2108
- const type = getImageType(String(options.type).trim().toLowerCase());
2109
- return Promise.resolve(new Blob([], { type }));
943
+ const route = removeTrailingForwardSlash(routeData.route);
944
+ if (route.endsWith("/404"))
945
+ return 404;
946
+ if (route.endsWith("/500"))
947
+ return 500;
948
+ return 200;
949
+ }
950
+ async #getModuleForRoute(route) {
951
+ if (route.type === "redirect") {
952
+ return RedirectSinglePageBuiltModule;
953
+ } else {
954
+ if (this.#manifest.pageMap) {
955
+ const importComponentInstance = this.#manifest.pageMap.get(route.component);
956
+ if (!importComponentInstance) {
957
+ throw new Error(
958
+ `Unexpectedly unable to find a component instance for route ${route.route}`
959
+ );
960
+ }
961
+ const pageModule = await importComponentInstance();
962
+ return pageModule;
963
+ } else if (this.#manifest.pageModule) {
964
+ const importComponentInstance = this.#manifest.pageModule;
965
+ return importComponentInstance;
966
+ } else {
967
+ throw new Error(
968
+ "Astro couldn't find the correct page to render, probably because it wasn't correctly mapped for SSR usage. This is an internal error, please file an issue."
969
+ );
970
+ }
2110
971
  }
972
+ }
2111
973
  }
2112
- allowStringTag(OffscreenCanvas);
2113
- const getImageType = (type) => type === 'image/avif' ||
2114
- type === 'image/jpeg' ||
2115
- type === 'image/png' ||
2116
- type === 'image/webp'
2117
- ? type
2118
- : 'image/png';
2119
974
 
2120
- class Storage {
2121
- clear() {
2122
- internalsOf(this, 'Storage', 'clear').storage.clear();
2123
- }
2124
- getItem(key) {
2125
- return getStringOrNull(internalsOf(this, 'Storage', 'getItem').storage.get(String(key)));
2126
- }
2127
- key(index) {
2128
- return getStringOrNull([
2129
- ...internalsOf(this, 'Storage', 'key').storage.keys(),
2130
- ][Number(index) || 0]);
2131
- }
2132
- removeItem(key) {
2133
- internalsOf(this, 'Storage', 'getItem').storage.delete(String(key));
2134
- }
2135
- setItem(key, value) {
2136
- internalsOf(this, 'Storage', 'getItem').storage.set(String(key), String(value));
2137
- }
2138
- get length() {
2139
- return internalsOf(this, 'Storage', 'size').storage.size;
2140
- }
2141
- }
2142
- const getStringOrNull = (value) => typeof value === 'string' ? value : null;
2143
- const initStorage = (target, exclude) => {
2144
- if (exclude.has('Storage') || exclude.has('localStorage'))
2145
- return;
2146
- target.localStorage = Object.create(Storage.prototype);
2147
- const storageInternals = new Map();
2148
- INTERNALS.set(target.localStorage, {
2149
- storage: storageInternals,
975
+ function apply() {
976
+ if (!globalThis.crypto) {
977
+ Object.defineProperty(globalThis, "crypto", {
978
+ value: crypto.webcrypto
2150
979
  });
2151
- };
980
+ }
981
+ if (!globalThis.File) {
982
+ Object.defineProperty(globalThis, "File", {
983
+ value: buffer.File
984
+ });
985
+ }
986
+ }
2152
987
 
2153
- class StyleSheet {
988
+ const clientAddressSymbol = Symbol.for("astro.clientAddress");
989
+ function createRequestFromNodeRequest(req, options) {
990
+ const protocol = req.socket instanceof TLSSocket || req.headers["x-forwarded-proto"] === "https" ? "https" : "http";
991
+ const hostname = req.headers.host || req.headers[":authority"];
992
+ const url = `${protocol}://${hostname}${req.url}`;
993
+ const headers = makeRequestHeaders(req);
994
+ const method = req.method || "GET";
995
+ let bodyProps = {};
996
+ const bodyAllowed = method !== "HEAD" && method !== "GET" && !options?.emptyBody;
997
+ if (bodyAllowed) {
998
+ bodyProps = makeRequestBody(req);
999
+ }
1000
+ const request = new Request(url, {
1001
+ method,
1002
+ headers,
1003
+ ...bodyProps
1004
+ });
1005
+ if (req.socket?.remoteAddress) {
1006
+ Reflect.set(request, clientAddressSymbol, req.socket.remoteAddress);
1007
+ }
1008
+ return request;
2154
1009
  }
2155
- class CSSStyleSheet extends StyleSheet {
2156
- async replace(text) {
2157
- return new CSSStyleSheet();
1010
+ function makeRequestHeaders(req) {
1011
+ const headers = new Headers();
1012
+ for (const [name, value] of Object.entries(req.headers)) {
1013
+ if (value === void 0) {
1014
+ continue;
2158
1015
  }
2159
- replaceSync(text) {
2160
- return new CSSStyleSheet();
2161
- }
2162
- get cssRules() {
2163
- return [];
1016
+ if (Array.isArray(value)) {
1017
+ for (const item of value) {
1018
+ headers.append(name, item);
1019
+ }
1020
+ } else {
1021
+ headers.append(name, value);
2164
1022
  }
1023
+ }
1024
+ return headers;
2165
1025
  }
2166
- allowStringTag(StyleSheet);
2167
- allowStringTag(CSSStyleSheet);
2168
-
2169
- class Window extends EventTarget {
2170
- get self() {
2171
- return this;
2172
- }
2173
- get top() {
2174
- return this;
2175
- }
2176
- get window() {
2177
- return this;
2178
- }
2179
- get innerHeight() {
2180
- return 0;
1026
+ function makeRequestBody(req) {
1027
+ if (req.body !== void 0) {
1028
+ if (typeof req.body === "string" && req.body.length > 0) {
1029
+ return { body: Buffer.from(req.body) };
2181
1030
  }
2182
- get innerWidth() {
2183
- return 0;
1031
+ if (typeof req.body === "object" && req.body !== null && Object.keys(req.body).length > 0) {
1032
+ return { body: Buffer.from(JSON.stringify(req.body)) };
2184
1033
  }
2185
- get scrollX() {
2186
- return 0;
2187
- }
2188
- get scrollY() {
2189
- return 0;
1034
+ if (typeof req.body === "object" && req.body !== null && typeof req.body[Symbol.asyncIterator] !== "undefined") {
1035
+ return asyncIterableToBodyProps(req.body);
2190
1036
  }
1037
+ }
1038
+ return asyncIterableToBodyProps(req);
2191
1039
  }
2192
- allowStringTag(Window);
2193
- const initWindow = (target, exclude) => {
2194
- if (exclude.has('Window') || exclude.has('window'))
2195
- return;
2196
- target.window = target;
2197
- };
2198
-
2199
- function alert(...messages) {
2200
- console.log(...messages);
1040
+ function asyncIterableToBodyProps(iterable) {
1041
+ return {
1042
+ // Node uses undici for the Request implementation. Undici accepts
1043
+ // a non-standard async iterable for the body.
1044
+ // @ts-expect-error
1045
+ body: iterable,
1046
+ // The duplex property is required when using a ReadableStream or async
1047
+ // iterable for the body. The type definitions do not include the duplex
1048
+ // property because they are not up-to-date.
1049
+ // @ts-expect-error
1050
+ duplex: "half"
1051
+ };
2201
1052
  }
2202
-
2203
- const exclusionsForHTMLElement = [
2204
- 'CustomElementsRegistry',
2205
- 'HTMLElement',
2206
- 'HTMLBodyElement',
2207
- 'HTMLCanvasElement',
2208
- 'HTMLDivElement',
2209
- 'HTMLHeadElement',
2210
- 'HTMLHtmlElement',
2211
- 'HTMLImageElement',
2212
- 'HTMLStyleElement',
2213
- 'HTMLTemplateElement',
2214
- 'HTMLUnknownElement',
2215
- 'Image',
2216
- ];
2217
- const exclusionsForElement = ['Element', ...exclusionsForHTMLElement];
2218
- const exclusionsForDocument = [
2219
- 'CustomElementsRegistry',
2220
- 'Document',
2221
- 'HTMLDocument',
2222
- 'document',
2223
- 'customElements',
2224
- ];
2225
- const exclusionsForNode = [
2226
- 'Node',
2227
- 'DocumentFragment',
2228
- 'ShadowRoot',
2229
- ...exclusionsForDocument,
2230
- ...exclusionsForElement,
2231
- ];
2232
- const exclusionsForEventTarget = [
2233
- 'Event',
2234
- 'CustomEvent',
2235
- 'EventTarget',
2236
- 'OffscreenCanvas',
2237
- 'MediaQueryList',
2238
- 'Window',
2239
- ...exclusionsForNode,
2240
- ];
2241
- const exclusionsForEvent = [
2242
- 'Event',
2243
- 'CustomEvent',
2244
- 'EventTarget',
2245
- 'MediaQueryList',
2246
- 'OffscreenCanvas',
2247
- 'Window',
2248
- ...exclusionsForNode,
2249
- ];
2250
- const exclusions = {
2251
- 'Document+': exclusionsForDocument,
2252
- 'Element+': exclusionsForElement,
2253
- 'Event+': exclusionsForEvent,
2254
- 'EventTarget+': exclusionsForEventTarget,
2255
- 'HTMLElement+': exclusionsForHTMLElement,
2256
- 'Node+': exclusionsForNode,
2257
- 'StyleSheet+': ['StyleSheet', 'CSSStyleSheet'],
2258
- };
2259
-
2260
- const inheritance = {
2261
- CSSStyleSheet: 'StyleSheet',
2262
- CustomEvent: 'Event',
2263
- DOMException: 'Error',
2264
- Document: 'Node',
2265
- DocumentFragment: 'Node',
2266
- Element: 'Node',
2267
- HTMLDocument: 'Document',
2268
- HTMLElement: 'Element',
2269
- HTMLBodyElement: 'HTMLElement',
2270
- HTMLCanvasElement: 'HTMLElement',
2271
- HTMLDivElement: 'HTMLElement',
2272
- HTMLHeadElement: 'HTMLElement',
2273
- HTMLHtmlElement: 'HTMLElement',
2274
- HTMLImageElement: 'HTMLElement',
2275
- HTMLSpanElement: 'HTMLElement',
2276
- HTMLStyleElement: 'HTMLElement',
2277
- HTMLTemplateElement: 'HTMLElement',
2278
- HTMLUnknownElement: 'HTMLElement',
2279
- Image: 'HTMLElement',
2280
- MediaQueryList: 'EventTarget',
2281
- Node: 'EventTarget',
2282
- OffscreenCanvas: 'EventTarget',
2283
- ShadowRoot: 'DocumentFragment',
2284
- Window: 'EventTarget',
2285
- };
2286
-
2287
- const polyfill = (target, options) => {
2288
- const webAPIs = {
2289
- ByteLengthQueuingStrategy,
2290
- CanvasRenderingContext2D,
2291
- CharacterData,
2292
- Comment,
2293
- CountQueuingStrategy,
2294
- CSSStyleSheet,
2295
- CustomElementRegistry,
2296
- CustomEvent,
2297
- Document,
2298
- DocumentFragment,
2299
- DOMException,
2300
- Element,
2301
- Event,
2302
- EventTarget,
2303
- File,
2304
- FormData,
2305
- HTMLDocument,
2306
- HTMLElement,
2307
- HTMLBodyElement,
2308
- HTMLCanvasElement,
2309
- HTMLDivElement,
2310
- HTMLHeadElement,
2311
- HTMLHtmlElement,
2312
- HTMLImageElement,
2313
- HTMLSpanElement,
2314
- HTMLStyleElement,
2315
- HTMLTemplateElement,
2316
- HTMLUnknownElement,
2317
- Headers,
2318
- IntersectionObserver,
2319
- Image,
2320
- ImageData,
2321
- MediaQueryList,
2322
- MutationObserver,
2323
- Node,
2324
- NodeFilter: NodeFilter$1,
2325
- NodeIterator: NodeIterator$1,
2326
- OffscreenCanvas,
2327
- ReadableByteStreamController,
2328
- ReadableStream,
2329
- ReadableStreamBYOBReader,
2330
- ReadableStreamBYOBRequest,
2331
- ReadableStreamDefaultController,
2332
- ReadableStreamDefaultReader,
2333
- Request,
2334
- ResizeObserver,
2335
- Response,
2336
- ShadowRoot,
2337
- Storage,
2338
- StyleSheet,
2339
- Text,
2340
- TransformStream,
2341
- TreeWalker,
2342
- URLPattern: U,
2343
- WritableStream,
2344
- WritableStreamDefaultController,
2345
- WritableStreamDefaultWriter,
2346
- Window,
2347
- alert,
2348
- cancelAnimationFrame,
2349
- cancelIdleCallback,
2350
- clearTimeout,
2351
- crypto: webcrypto,
2352
- fetch,
2353
- requestAnimationFrame,
2354
- requestIdleCallback,
2355
- setTimeout,
2356
- structuredClone,
2357
- };
2358
- // initialize exclude options
2359
- const excludeOptions = new Set(typeof Object(options).exclude === 'string'
2360
- ? String(Object(options).exclude).trim().split(/\s+/)
2361
- : Array.isArray(Object(options).exclude)
2362
- ? Object(options).exclude.reduce((array, entry) => array.splice(array.length, 0, ...(typeof entry === 'string' ? entry.trim().split(/\s+/) : [])) && array, [])
2363
- : []);
2364
- // expand exclude options using exclusion shorthands
2365
- for (const excludeOption of excludeOptions) {
2366
- if (excludeOption in exclusions) {
2367
- for (const exclusion of exclusions[excludeOption]) {
2368
- excludeOptions.add(exclusion);
2369
- }
2370
- }
2371
- }
2372
- // apply each WebAPI
2373
- for (const name of Object.keys(webAPIs)) {
2374
- // skip WebAPIs that are excluded
2375
- if (excludeOptions.has(name))
2376
- continue;
2377
- // skip WebAPIs that are built-in
2378
- if (Object.hasOwnProperty.call(target, name))
2379
- continue;
2380
- // define WebAPIs on the target
2381
- Object.defineProperty(target, name, {
2382
- configurable: true,
2383
- enumerable: true,
2384
- writable: true,
2385
- value: webAPIs[name],
2386
- });
2387
- }
2388
- // ensure WebAPIs correctly inherit other WebAPIs
2389
- for (const name of Object.keys(webAPIs)) {
2390
- // skip WebAPIs that are excluded
2391
- if (excludeOptions.has(name))
2392
- continue;
2393
- // skip WebAPIs that do not extend other WebAPIs
2394
- if (!Object.hasOwnProperty.call(inheritance, name))
2395
- continue;
2396
- const Class = target[name];
2397
- const Super = target[inheritance[name]];
2398
- // skip WebAPIs that are not available
2399
- if (!Class || !Super)
2400
- continue;
2401
- // skip WebAPIs that are already inherited correctly
2402
- if (Object.getPrototypeOf(Class.prototype) === Super.prototype)
2403
- continue;
2404
- // define WebAPIs inheritance
2405
- Object.setPrototypeOf(Class.prototype, Super.prototype);
1053
+ class NodeApp extends App {
1054
+ match(req, opts = {}) {
1055
+ if (!(req instanceof Request)) {
1056
+ req = createRequestFromNodeRequest(req, {
1057
+ emptyBody: true
1058
+ });
2406
1059
  }
2407
- if (!excludeOptions.has('HTMLDocument') &&
2408
- !excludeOptions.has('HTMLElement')) {
2409
- initDocument(target, excludeOptions);
2410
- if (!excludeOptions.has('CustomElementRegistry')) {
2411
- initCustomElementRegistry(target, excludeOptions);
2412
- }
1060
+ return super.match(req, opts);
1061
+ }
1062
+ render(req, routeData, locals) {
1063
+ if (!(req instanceof Request)) {
1064
+ req = createRequestFromNodeRequest(req);
2413
1065
  }
2414
- initMediaQueryList(target, excludeOptions);
2415
- initStorage(target, excludeOptions);
2416
- initWindow(target, excludeOptions);
2417
- return target;
2418
- };
2419
- polyfill.internals = (target, name) => {
2420
- const init = {
2421
- CustomElementRegistry: initCustomElementRegistry,
2422
- Document: initDocument,
2423
- MediaQueryList: initMediaQueryList,
2424
- Storage: initStorage,
2425
- Window: initWindow,
2426
- };
2427
- init[name](target, new Set());
2428
- return target;
2429
- };
1066
+ return super.render(req, routeData, locals);
1067
+ }
1068
+ }
2430
1069
 
2431
- const createOutgoingHttpHeaders = (webHeaders) => {
2432
- if (!webHeaders) {
1070
+ const createOutgoingHttpHeaders = (headers) => {
1071
+ if (!headers) {
2433
1072
  return void 0;
2434
1073
  }
2435
- const headers = webHeaders;
2436
1074
  const nodeHeaders = Object.fromEntries(headers.entries());
2437
1075
  if (Object.keys(nodeHeaders).length === 0) {
2438
1076
  return void 0;
@@ -2446,167 +1084,6 @@ const createOutgoingHttpHeaders = (webHeaders) => {
2446
1084
  return nodeHeaders;
2447
1085
  };
2448
1086
 
2449
- const canUseSymbol = typeof Symbol === "function" && typeof Symbol.for === "function";
2450
- const canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;
2451
- function isBuffer(value) {
2452
- return (value == null ? void 0 : value.constructor) != null && typeof value.constructor.isBuffer === "function" && value.constructor.isBuffer(value);
2453
- }
2454
- function isNodeResponse(value) {
2455
- return !!value.body;
2456
- }
2457
- function isReadableStream(value) {
2458
- return !!value.getReader;
2459
- }
2460
- function isAsyncIterableIterator(value) {
2461
- return !!(canUseAsyncIteratorSymbol && value[Symbol.asyncIterator]);
2462
- }
2463
- function isStreamableBlob(value) {
2464
- return !!value.stream;
2465
- }
2466
- function isBlob(value) {
2467
- return !!value.arrayBuffer;
2468
- }
2469
- function isNodeReadableStream(value) {
2470
- return !!value.pipe;
2471
- }
2472
- function readerIterator(reader) {
2473
- const iterator = {
2474
- //@ts-expect-error
2475
- next() {
2476
- return reader.read();
2477
- }
2478
- };
2479
- if (canUseAsyncIteratorSymbol) {
2480
- iterator[Symbol.asyncIterator] = function() {
2481
- return this;
2482
- };
2483
- }
2484
- return iterator;
2485
- }
2486
- function promiseIterator(promise) {
2487
- let resolved = false;
2488
- const iterator = {
2489
- next() {
2490
- if (resolved)
2491
- return Promise.resolve({
2492
- value: void 0,
2493
- done: true
2494
- });
2495
- resolved = true;
2496
- return new Promise(function(resolve, reject) {
2497
- promise.then(function(value) {
2498
- resolve({ value, done: false });
2499
- }).catch(reject);
2500
- });
2501
- }
2502
- };
2503
- if (canUseAsyncIteratorSymbol) {
2504
- iterator[Symbol.asyncIterator] = function() {
2505
- return this;
2506
- };
2507
- }
2508
- return iterator;
2509
- }
2510
- function nodeStreamIterator(stream) {
2511
- let cleanup = null;
2512
- let error = null;
2513
- let done = false;
2514
- const data = [];
2515
- const waiting = [];
2516
- function onData(chunk) {
2517
- if (error)
2518
- return;
2519
- if (waiting.length) {
2520
- const shiftedArr = waiting.shift();
2521
- if (Array.isArray(shiftedArr) && shiftedArr[0]) {
2522
- return shiftedArr[0]({ value: chunk, done: false });
2523
- }
2524
- }
2525
- data.push(chunk);
2526
- }
2527
- function onError(err) {
2528
- error = err;
2529
- const all = waiting.slice();
2530
- all.forEach(function(pair) {
2531
- pair[1](err);
2532
- });
2533
- !cleanup || cleanup();
2534
- }
2535
- function onEnd() {
2536
- done = true;
2537
- const all = waiting.slice();
2538
- all.forEach(function(pair) {
2539
- pair[0]({ value: void 0, done: true });
2540
- });
2541
- !cleanup || cleanup();
2542
- }
2543
- cleanup = function() {
2544
- cleanup = null;
2545
- stream.removeListener("data", onData);
2546
- stream.removeListener("error", onError);
2547
- stream.removeListener("end", onEnd);
2548
- stream.removeListener("finish", onEnd);
2549
- stream.removeListener("close", onEnd);
2550
- };
2551
- stream.on("data", onData);
2552
- stream.on("error", onError);
2553
- stream.on("end", onEnd);
2554
- stream.on("finish", onEnd);
2555
- stream.on("close", onEnd);
2556
- function getNext() {
2557
- return new Promise(function(resolve, reject) {
2558
- if (error)
2559
- return reject(error);
2560
- if (data.length)
2561
- return resolve({ value: data.shift(), done: false });
2562
- if (done)
2563
- return resolve({ value: void 0, done: true });
2564
- waiting.push([resolve, reject]);
2565
- });
2566
- }
2567
- const iterator = {
2568
- next() {
2569
- return getNext();
2570
- }
2571
- };
2572
- if (canUseAsyncIteratorSymbol) {
2573
- iterator[Symbol.asyncIterator] = function() {
2574
- return this;
2575
- };
2576
- }
2577
- return iterator;
2578
- }
2579
- function asyncIterator(source) {
2580
- const iterator = source[Symbol.asyncIterator]();
2581
- return {
2582
- next() {
2583
- return iterator.next();
2584
- },
2585
- [Symbol.asyncIterator]() {
2586
- return this;
2587
- }
2588
- };
2589
- }
2590
- function responseIterator(response) {
2591
- let body = response;
2592
- if (isNodeResponse(response))
2593
- body = response.body;
2594
- if (isBuffer(body))
2595
- body = Readable.from(body);
2596
- if (isAsyncIterableIterator(body))
2597
- return asyncIterator(body);
2598
- if (isReadableStream(body))
2599
- return readerIterator(body.getReader());
2600
- if (isStreamableBlob(body)) {
2601
- return readerIterator(body.stream().getReader());
2602
- }
2603
- if (isBlob(body))
2604
- return promiseIterator(body.arrayBuffer());
2605
- if (isNodeReadableStream(body))
2606
- return nodeStreamIterator(body);
2607
- throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
2608
- }
2609
-
2610
1087
  function nodeMiddleware_default(app, mode) {
2611
1088
  return async function(...args) {
2612
1089
  let error = null;
@@ -2650,6 +1127,9 @@ function nodeMiddleware_default(app, mode) {
2650
1127
  await writeWebResponse(app, res, response);
2651
1128
  }
2652
1129
  } catch (err) {
1130
+ const logger = app.getAdapterLogger();
1131
+ logger.error(`Could not render ${req.url}`);
1132
+ console.error(err);
2653
1133
  if (!res.headersSent) {
2654
1134
  res.writeHead(500, `Server error`);
2655
1135
  res.end();
@@ -2671,11 +1151,17 @@ async function writeWebResponse(app, res, webResponse) {
2671
1151
  res.writeHead(status, nodeHeaders);
2672
1152
  if (webResponse.body) {
2673
1153
  try {
2674
- for await (const chunk of responseIterator(webResponse)) {
2675
- res.write(chunk);
1154
+ const reader = webResponse.body.getReader();
1155
+ res.on("close", () => {
1156
+ reader.cancel();
1157
+ });
1158
+ let result = await reader.read();
1159
+ while (!result.done) {
1160
+ res.write(result.value);
1161
+ result = await reader.read();
2676
1162
  }
2677
1163
  } catch (err) {
2678
- console.error((err == null ? void 0 : err.stack) || (err == null ? void 0 : err.message) || String(err));
1164
+ console.error(err?.stack || err?.message || String(err));
2679
1165
  res.write("Internal server error");
2680
1166
  }
2681
1167
  }
@@ -2818,6 +1304,7 @@ function getResolvedHostForHttpServer(host) {
2818
1304
  }
2819
1305
  }
2820
1306
  function startServer$1(app, options) {
1307
+ const logger = app.getAdapterLogger();
2821
1308
  const port = process.env.PORT ? Number(process.env.PORT) : options.port ?? 8080;
2822
1309
  const { client } = resolvePaths(options);
2823
1310
  const handler = nodeMiddleware_default(app, options.mode);
@@ -2836,14 +1323,14 @@ function startServer$1(app, options) {
2836
1323
  const protocol = server.server instanceof https.Server ? "https" : "http";
2837
1324
  const address = getNetworkAddress(protocol, host, port);
2838
1325
  if (host === void 0) {
2839
- console.log(
2840
- `Preview server listening on
1326
+ logger.info(
1327
+ `Server listening on
2841
1328
  local: ${address.local[0]}
2842
1329
  network: ${address.network[0]}
2843
1330
  `
2844
1331
  );
2845
1332
  } else {
2846
- console.log(`Preview server listening on ${address.local[0]}`);
1333
+ logger.info(`Server listening on ${address.local[0]}`);
2847
1334
  }
2848
1335
  return {
2849
1336
  server,
@@ -2851,9 +1338,7 @@ function startServer$1(app, options) {
2851
1338
  };
2852
1339
  }
2853
1340
 
2854
- polyfill(globalThis, {
2855
- exclude: "window document"
2856
- });
1341
+ apply();
2857
1342
  function createExports(manifest, options) {
2858
1343
  const app = new NodeApp(manifest);
2859
1344
  return {
@@ -2875,16 +1360,17 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2875
1360
  start
2876
1361
  }, Symbol.toStringTag, { value: 'Module' }));
2877
1362
 
2878
- const _page0 = () => import('./chunks/index@_@astro.2d2f2e33.mjs');
2879
- const _page1 = () => import('./chunks/~fallback@_@astro.86d710c3.mjs');
2880
- const _page2 = () => import('./chunks/index@_@astro.25a343cc.mjs');
2881
- const _page3 = () => import('./chunks/account@_@astro.5eaddaf8.mjs');
2882
- const _page4 = () => import('./chunks/_...05c626ea.mjs');const pageMap = new Map([["src/pages/index.astro", _page0],["src/pages/~fallback.astro", _page1],["src/pages/app/index.astro", _page2],["src/pages/app/account.astro", _page3],["src/pages/[...slug].astro", _page4]]);
2883
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.648beb9d.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.a4a7a874.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.648beb9d.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.a4a7a874.css"}],"routeData":{"route":"/~fallback","type":"page","pattern":"^\\/~fallback\\/?$","segments":[[{"content":"~fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/~fallback.astro","pathname":"/~fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.648beb9d.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.a4a7a874.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":true,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.32e7e6ef.mjs","/src/pages/~fallback.astro":"chunks/pages/~fallback.astro.84d4765b.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.2d2f2e33.mjs","\u0000@astro-page:src/pages/~fallback@_@astro":"chunks/~fallback@_@astro.86d710c3.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.25a343cc.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.5eaddaf8.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...05c626ea.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/SearchModal.vue":"_astro/SearchModal.cffd4c2d.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/CartSidebar.vue":"_astro/CartSidebar.05b12b39.js","/astro/hoisted.js?q=0":"_astro/hoisted.648beb9d.js","~/components/PitchBar.vue":"_astro/PitchBar.2c821b77.js","~/components/ProductShelf.vue":"_astro/ProductShelf.46d8a51c.js","~/components/HeroSlider.vue":"_astro/HeroSlider.fe108a14.js","@astrojs/vue/client.js":"_astro/client.e6d9439a.js","~/components/ShopHeader.vue":"_astro/ShopHeader.3694a82b.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.3f59f3c7.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.a4a7a874.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-1b331600.js","/_astro/Carousel.4bf71bce.js","/_astro/CartSidebar.05b12b39.js","/_astro/HeroSlider.fe108a14.js","/_astro/PitchBar.2c821b77.js","/_astro/Prices.78eb0a61.js","/_astro/ProductShelf.46d8a51c.js","/_astro/SearchModal.cffd4c2d.js","/_astro/ShopHeader.3694a82b.js","/_astro/_plugin-vue_export-helper.ee681fa8.js","/_astro/api.a2eda23e.js","/_astro/client.e6d9439a.js","/_astro/firebase-app.3f59f3c7.js","/_astro/format-money.923559cc.js","/_astro/hoisted.648beb9d.js","/_astro/img.ec6ba316.js","/_astro/index.fadf28bd.js","/_astro/modules-info.df822732.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
1363
+ const _page0 = () => import('./chunks/node_7efff4d0.mjs');
1364
+ const _page1 = () => import('./chunks/index_a7b0afbf.mjs');
1365
+ const _page2 = () => import('./chunks/~fallback_43c17ff0.mjs');
1366
+ const _page3 = () => import('./chunks/index_414d53c7.mjs');
1367
+ const _page4 = () => import('./chunks/account_e71f4214.mjs');
1368
+ const _page5 = () => import('./chunks/_.._07cccbbe.mjs');const pageMap = new Map([["../../node_modules/.pnpm/astro@3.6.0_@types+node@18.18.13_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js", _page0],["src/pages/index.astro", _page1],["src/pages/~fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
1369
+ const _manifest = Object.assign(manifest, {
2884
1370
  pageMap,
2885
1371
  renderers,
2886
1372
  });
2887
- const _args = {"mode":"middleware","client":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/","server":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/server/","host":false,"port":3000};
1373
+ const _args = {"mode":"middleware","client":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/","server":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/server/","host":false,"port":4321};
2888
1374
 
2889
1375
  const _exports = createExports(_manifest, _args);
2890
1376
  const handler = _exports['handler'];