@duffel/components 3.1.2--prototype.2 → 3.1.3--prototype.2

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 (168) hide show
  1. package/.circleci/config.yml +2 -2
  2. package/.prettierignore +5 -1
  3. package/.storybook/main.ts +1 -1
  4. package/.vscode/extensions.json +7 -0
  5. package/.vscode/settings.json +10 -0
  6. package/.yarn/releases/yarn-4.0.1.cjs +893 -0
  7. package/.yarn/sdks/eslint/bin/eslint.js +20 -0
  8. package/.yarn/sdks/eslint/lib/api.js +20 -0
  9. package/.yarn/sdks/eslint/lib/unsupported-api.js +20 -0
  10. package/.yarn/sdks/eslint/package.json +14 -0
  11. package/.yarn/sdks/integrations.yml +5 -0
  12. package/.yarn/sdks/prettier/bin-prettier.js +20 -0
  13. package/.yarn/sdks/prettier/index.js +20 -0
  14. package/.yarn/sdks/prettier/package.json +7 -0
  15. package/.yarn/sdks/typescript/bin/tsc +20 -0
  16. package/.yarn/sdks/typescript/bin/tsserver +20 -0
  17. package/.yarn/sdks/typescript/lib/tsc.js +20 -0
  18. package/.yarn/sdks/typescript/lib/tsserver.js +225 -0
  19. package/.yarn/sdks/typescript/lib/tsserverlibrary.js +225 -0
  20. package/.yarn/sdks/typescript/lib/typescript.js +20 -0
  21. package/.yarn/sdks/typescript/package.json +10 -0
  22. package/.yarnrc.yml +3 -0
  23. package/README.md +4 -0
  24. package/jest.config.ts +1 -1
  25. package/package.json +83 -134
  26. package/react-dist/custom-elements.js +40 -0
  27. package/react-dist/custom-elements.js.map +7 -0
  28. package/react-dist/index.js +21 -47
  29. package/react-dist/index.js.map +7 -0
  30. package/react-dist/scripts/generate-fixture.d.ts +3 -0
  31. package/react-dist/scripts/setup-suggestion-data.d.ts +28 -0
  32. package/react-dist/src/components/DuffelAncillaries/Card.d.ts +14 -0
  33. package/react-dist/src/components/DuffelAncillaries/Counter.d.ts +10 -0
  34. package/react-dist/src/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  35. package/react-dist/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +12 -0
  36. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
  37. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
  38. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
  39. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
  40. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
  41. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
  42. package/react-dist/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
  43. package/react-dist/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
  44. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
  45. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
  46. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
  47. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  48. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
  49. package/react-dist/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  50. package/react-dist/src/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
  51. package/react-dist/src/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  52. package/react-dist/src/components/DuffelAncillaries/seats/Element.d.ts +15 -0
  53. package/react-dist/src/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  54. package/react-dist/src/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  55. package/react-dist/src/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
  56. package/react-dist/src/components/DuffelAncillaries/seats/Row.d.ts +13 -0
  57. package/react-dist/src/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
  58. package/react-dist/src/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
  59. package/react-dist/src/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
  60. package/react-dist/src/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
  61. package/react-dist/src/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  62. package/react-dist/src/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  63. package/react-dist/src/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
  64. package/react-dist/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  65. package/react-dist/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  66. package/react-dist/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
  67. package/react-dist/src/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
  68. package/react-dist/src/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  69. package/react-dist/src/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
  70. package/react-dist/src/components/PlacesLookup/PlacesLookup.d.ts +20 -0
  71. package/react-dist/src/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  72. package/react-dist/src/components/shared/Button.d.ts +23 -0
  73. package/react-dist/src/components/shared/ErrorBoundary.d.ts +13 -0
  74. package/react-dist/src/components/shared/FetchOfferErrorState.d.ts +5 -0
  75. package/react-dist/src/components/shared/Icon.d.ts +46 -0
  76. package/react-dist/src/components/shared/IconButton.d.ts +16 -0
  77. package/react-dist/src/components/shared/Modal.d.ts +11 -0
  78. package/react-dist/src/components/shared/NonIdealState.d.ts +4 -0
  79. package/react-dist/src/components/shared/Stamp.d.ts +7 -0
  80. package/react-dist/src/components/shared/Tabs.d.ts +16 -0
  81. package/react-dist/src/custom-elements.d.ts +6 -0
  82. package/react-dist/src/index.d.ts +7 -0
  83. package/react-dist/src/lib/captureErrorInSentry.d.ts +1 -0
  84. package/react-dist/src/lib/compileCreateOrderPayload.d.ts +14 -0
  85. package/react-dist/src/lib/createPriceFormatters.d.ts +12 -0
  86. package/react-dist/src/lib/fetchFromDuffelAPI.d.ts +8 -0
  87. package/react-dist/src/lib/fetchFromFixtures.d.ts +4 -0
  88. package/react-dist/src/lib/formatAvailableServices.d.ts +12 -0
  89. package/react-dist/src/lib/formatDate.d.ts +2 -0
  90. package/react-dist/src/lib/formatSeatMaps.d.ts +4 -0
  91. package/react-dist/src/lib/getBaggageServiceDescription.d.ts +2 -0
  92. package/react-dist/src/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
  93. package/react-dist/src/lib/getCurrencyForSeatMaps.d.ts +10 -0
  94. package/react-dist/src/lib/getCurrencyForServices.d.ts +11 -0
  95. package/react-dist/src/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
  96. package/react-dist/src/lib/getPassengerBySegmentList.d.ts +6 -0
  97. package/react-dist/src/lib/getPassengerInitials.d.ts +1 -0
  98. package/react-dist/src/lib/getPassengerMapById.d.ts +3 -0
  99. package/react-dist/src/lib/getPassengerName.d.ts +3 -0
  100. package/react-dist/src/lib/getRowNumber.d.ts +2 -0
  101. package/react-dist/src/lib/getSegmentList.d.ts +2 -0
  102. package/react-dist/src/lib/getServicePriceMapById.d.ts +3 -0
  103. package/react-dist/src/lib/getSymbols.d.ts +2 -0
  104. package/react-dist/src/lib/getTotalAmountForServices.d.ts +6 -0
  105. package/react-dist/src/lib/getTotalQuantity.d.ts +2 -0
  106. package/react-dist/src/lib/hasHighLuminance.d.ts +1 -0
  107. package/react-dist/src/lib/hasService.d.ts +2 -0
  108. package/react-dist/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
  109. package/react-dist/src/lib/hasWings.d.ts +2 -0
  110. package/react-dist/src/lib/isBaggageService.d.ts +2 -0
  111. package/react-dist/src/lib/isCancelForAnyReasonService.d.ts +2 -0
  112. package/react-dist/src/lib/isFixtureOfferId.d.ts +2 -0
  113. package/react-dist/src/lib/isPayloadComplete.d.ts +2 -0
  114. package/react-dist/src/lib/isSeatElement.d.ts +2 -0
  115. package/react-dist/src/lib/logging.d.ts +46 -0
  116. package/react-dist/src/lib/moneyStringFormatter.d.ts +8 -0
  117. package/react-dist/src/lib/offerIsExpired.d.ts +2 -0
  118. package/react-dist/src/lib/retrieveOffer.d.ts +2 -0
  119. package/react-dist/src/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  120. package/react-dist/src/lib/retrieveSeatMaps.d.ts +2 -0
  121. package/react-dist/src/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  122. package/react-dist/src/lib/setBodyScrollability.d.ts +1 -0
  123. package/react-dist/src/lib/validateProps.d.ts +7 -0
  124. package/react-dist/src/lib/withPlural.d.ts +1 -0
  125. package/react-dist/src/types/Aircraft.d.ts +14 -0
  126. package/react-dist/src/types/Airline.d.ts +14 -0
  127. package/react-dist/src/types/Airport.d.ts +44 -0
  128. package/react-dist/src/types/City.d.ts +18 -0
  129. package/react-dist/src/types/CreateOrderPayload.d.ts +72 -0
  130. package/react-dist/src/types/CurrencyConversion.d.ts +10 -0
  131. package/react-dist/src/types/DuffelAncillariesProps.d.ts +70 -0
  132. package/react-dist/src/types/Offer.d.ts +711 -0
  133. package/react-dist/src/types/Order.d.ts +8 -0
  134. package/react-dist/src/types/Place.d.ts +8 -0
  135. package/react-dist/src/types/SeatMap.d.ts +190 -0
  136. package/react-dist/src/types/index.d.ts +11 -0
  137. package/scripts/build-and-publish.sh +42 -0
  138. package/scripts/generate-fixture.ts +2 -2
  139. package/scripts.tsconfig.json +1 -1
  140. package/src/components/PlacesLookup/PlacesLookup.tsx +2 -3
  141. package/src/custom-elements.ts +0 -4
  142. package/src/examples/just-typescript/.yarn/install-state.gz +0 -0
  143. package/src/examples/just-typescript/package.json +2 -2
  144. package/src/examples/just-typescript/yarn.lock +467 -0
  145. package/src/examples/next/README.md +28 -0
  146. package/src/examples/next/next-env.d.ts +5 -0
  147. package/src/examples/next/next.config.js +4 -0
  148. package/src/examples/next/package.json +24 -0
  149. package/src/examples/next/src/app/DuffelComponents.tsx +40 -0
  150. package/src/examples/next/src/app/layout.tsx +18 -0
  151. package/src/examples/next/src/app/page.tsx +9 -0
  152. package/src/examples/next/tsconfig.json +27 -0
  153. package/src/examples/next/yarn.lock +257 -0
  154. package/src/examples/payments-just-typescript/yarn.lock +154 -0
  155. package/src/examples/react-app/src/index.tsx +1 -1
  156. package/src/examples/react-app/yarn.lock +219 -0
  157. package/src/index.ts +0 -2
  158. package/src/lib/logging.ts +1 -1
  159. package/tsconfig.json +9 -3
  160. package/.github/workflows/autoapprove.yml +0 -18
  161. package/.github/workflows/release.yml +0 -89
  162. package/.husky/post-commit +0 -4
  163. package/.husky/pre-commit +0 -4
  164. package/.storybook/Storyshots.test.js +0 -3
  165. package/.storybook/__snapshots__/Storyshots.test.js.snap +0 -67984
  166. package/src/components/ShowData/ShowData.tsx +0 -38
  167. package/src/components/ShowData/ShowDataCustomElement.tsx +0 -85
  168. package/src/stories/ShowData.stories.tsx +0 -16
@@ -1,49 +1,33 @@
1
- "use strict";var b2=Object.create;var ss=Object.defineProperty;var T2=Object.getOwnPropertyDescriptor;var R2=Object.getOwnPropertyNames;var x2=Object.getPrototypeOf,A2=Object.prototype.hasOwnProperty;var cs=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),Gu=(t,n)=>{for(var i in n)ss(t,i,{get:n[i],enumerable:!0})},$d=(t,n,i,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of R2(n))!A2.call(t,s)&&s!==i&&ss(t,s,{get:()=>n[s],enumerable:!(a=T2(n,s))||a.enumerable});return t};var ge=(t,n,i)=>(i=t!=null?b2(x2(t)):{},$d(n||!t||!t.__esModule?ss(i,"default",{value:t,enumerable:!0}):i,t)),O2=t=>$d(ss({},"__esModule",{value:!0}),t);var yn=cs((t7,Ks)=>{(function(){"use strict";var t={}.hasOwnProperty,n="[native code]";function i(){for(var a=[],s=0;s<arguments.length;s++){var u=arguments[s];if(u){var l=typeof u;if(l==="string"||l==="number")a.push(u);else if(Array.isArray(u)){if(u.length){var p=i.apply(null,u);p&&a.push(p)}}else if(l==="object"){if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]")){a.push(u.toString());continue}for(var m in u)t.call(u,m)&&u[m]&&a.push(m)}}}return a.join(" ")}typeof Ks<"u"&&Ks.exports?(i.default=i,Ks.exports=i):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return i}):window.classNames=i})()});var Xh=cs((uc,Zh)=>{(function(t,n){typeof uc=="object"&&typeof Zh<"u"?n(uc,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],n):(t=t||self,n(t.ReactStripe={},t.React))})(uc,function(t,n){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function i(M,T){var N=Object.keys(M);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(M);T&&($=$.filter(function(Re){return Object.getOwnPropertyDescriptor(M,Re).enumerable})),N.push.apply(N,$)}return N}function a(M){for(var T=1;T<arguments.length;T++){var N=arguments[T]!=null?arguments[T]:{};T%2?i(Object(N),!0).forEach(function($){u(M,$,N[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(N)):i(Object(N)).forEach(function($){Object.defineProperty(M,$,Object.getOwnPropertyDescriptor(N,$))})}return M}function s(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(T){return typeof T}:s=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},s(M)}function u(M,T,N){return T in M?Object.defineProperty(M,T,{value:N,enumerable:!0,configurable:!0,writable:!0}):M[T]=N,M}function l(M,T){return p(M)||m(M,T)||h(M,T)||v()}function p(M){if(Array.isArray(M))return M}function m(M,T){var N=M&&(typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"]);if(N!=null){var $=[],Re=!0,ne=!1,Oe,et;try{for(N=N.call(M);!(Re=(Oe=N.next()).done)&&($.push(Oe.value),!(T&&$.length===T));Re=!0);}catch(ae){ne=!0,et=ae}finally{try{!Re&&N.return!=null&&N.return()}finally{if(ne)throw et}}return $}}function h(M,T){if(M){if(typeof M=="string")return S(M,T);var N=Object.prototype.toString.call(M).slice(8,-1);if(N==="Object"&&M.constructor&&(N=M.constructor.name),N==="Map"||N==="Set")return Array.from(M);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return S(M,T)}}function S(M,T){(T==null||T>M.length)&&(T=M.length);for(var N=0,$=new Array(T);N<T;N++)$[N]=M[N];return $}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(M,T){return T={exports:{}},M(T,T.exports),T.exports}var P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",L=P;function Y(){}function ce(){}ce.resetWarningCache=Y;var X=function(){function M($,Re,ne,Oe,et,ae){if(ae!==L){var ft=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ft.name="Invariant Violation",ft}}M.isRequired=M;function T(){return M}var N={array:M,bool:M,func:M,number:M,object:M,string:M,symbol:M,any:M,arrayOf:T,element:M,elementType:M,instanceOf:T,node:M,objectOf:T,oneOf:T,oneOfType:T,shape:T,exact:T,checkPropTypes:ce,resetWarningCache:Y};return N.PropTypes=N,N},H=I(function(M){M.exports=X()}),ue=function(T){var N=n.useRef(T);return n.useEffect(function(){N.current=T},[T]),N.current},de=function(T){return T!==null&&s(T)==="object"},Ne=function(T){return de(T)&&typeof T.then=="function"},Me=function(T){return de(T)&&typeof T.elements=="function"&&typeof T.createToken=="function"&&typeof T.createPaymentMethod=="function"&&typeof T.confirmCardPayment=="function"},Te="[object Object]",he=function M(T,N){if(!de(T)||!de(N))return T===N;var $=Array.isArray(T),Re=Array.isArray(N);if($!==Re)return!1;var ne=Object.prototype.toString.call(T)===Te,Oe=Object.prototype.toString.call(N)===Te;if(ne!==Oe)return!1;if(!ne&&!$)return T===N;var et=Object.keys(T),ae=Object.keys(N);if(et.length!==ae.length)return!1;for(var ft={},Dt=0;Dt<et.length;Dt+=1)ft[et[Dt]]=!0;for(var Bt=0;Bt<ae.length;Bt+=1)ft[ae[Bt]]=!0;var Lt=Object.keys(ft);if(Lt.length!==et.length)return!1;var Qr=T,ei=N,kt=function(yr){return M(Qr[yr],ei[yr])};return Lt.every(kt)},_e=function(T,N,$){return de(T)?Object.keys(T).reduce(function(Re,ne){var Oe=!de(N)||!he(T[ne],N[ne]);return $.includes(ne)?(Oe&&console.warn("Unsupported prop change: options.".concat(ne," is not a mutable property.")),Re):Oe?a(a({},Re||{}),{},u({},ne,T[ne])):Re},null):null},it="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Nt=function(T){if(T===null||Me(T))return T;throw new Error(it)},ot=function(T){if(Ne(T))return{tag:"async",stripePromise:Promise.resolve(T).then(Nt)};var N=Nt(T);return N===null?{tag:"empty"}:{tag:"sync",stripe:N}},Wr=n.createContext(null);Wr.displayName="ElementsContext";var oe=function(T,N){if(!T)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(N," in an <Elements> provider."));return T},ye=n.createContext(null);ye.displayName="CartElementContext";var ze=function(T,N){if(!T)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(N," in an <Elements> provider."));return T},Vr=function(T){var N=T.stripe,$=T.options,Re=T.children,ne=n.useMemo(function(){return ot(N)},[N]),Oe=n.useState(null),et=l(Oe,2),ae=et[0],ft=et[1],Dt=n.useState(null),Bt=l(Dt,2),Lt=Bt[0],Qr=Bt[1],ei=n.useState(function(){return{stripe:ne.tag==="sync"?ne.stripe:null,elements:ne.tag==="sync"?ne.stripe.elements($):null}}),kt=l(ei,2),Ze=kt[0],yr=kt[1];n.useEffect(function(){var Xe=!0,xi=function(Ai){yr(function(Oi){return Oi.stripe?Oi:{stripe:Ai,elements:Ai.elements($)}})};return ne.tag==="async"&&!Ze.stripe?ne.stripePromise.then(function(en){en&&Xe&&xi(en)}):ne.tag==="sync"&&!Ze.stripe&&xi(ne.stripe),function(){Xe=!1}},[ne,Ze,$]);var ti=ue(N);n.useEffect(function(){ti!==null&&ti!==N&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[ti,N]);var Ri=ue($);return n.useEffect(function(){if(Ze.elements){var Xe=_e($,Ri,["clientSecret","fonts"]);Xe&&Ze.elements.update(Xe)}},[$,Ri,Ze.elements]),n.useEffect(function(){var Xe=Ze.stripe;!Xe||!Xe._registerWrapper||!Xe.registerAppInfo||(Xe._registerWrapper({name:"react-stripe-js",version:"2.1.1"}),Xe.registerAppInfo({name:"react-stripe-js",version:"2.1.1",url:"https://stripe.com/docs/stripe-js/react"}))},[Ze.stripe]),n.createElement(Wr.Provider,{value:Ze},n.createElement(ye.Provider,{value:{cart:ae,setCart:ft,cartState:Lt,setCartState:Qr}},Re))};Vr.propTypes={stripe:H.any,options:H.object};var Mt=function(T){var N=n.useContext(Wr);return oe(N,T)},at=function(T){var N=n.useContext(ye);return ze(N,T)},hc=function(){var T=Mt("calls useElements()"),N=T.elements;return N},_c=function(){var T=Mt("calls useStripe()"),N=T.stripe;return N},yc=function(){var T=at("calls useCartElement()"),N=T.cart;return N},hr=function(){var T=at("calls useCartElementState()"),N=T.cartState;return N},qr=function(T){var N=T.children,$=Mt("mounts <ElementsConsumer>");return N($)};qr.propTypes={children:H.func.isRequired};var Ke=function(T,N,$){var Re=!!$,ne=n.useRef($);n.useEffect(function(){ne.current=$},[$]),n.useEffect(function(){if(!Re||!T)return function(){};var Oe=function(){ne.current&&ne.current.apply(ne,arguments)};return T.on(N,Oe),function(){T.off(N,Oe)}},[Re,N,T,ne])},zr=function(T){return T.charAt(0).toUpperCase()+T.slice(1)},Se=function(T,N){var $="".concat(zr(T),"Element"),Re=function(ae){var ft=ae.id,Dt=ae.className,Bt=ae.options,Lt=Bt===void 0?{}:Bt,Qr=ae.onBlur,ei=ae.onFocus,kt=ae.onReady,Ze=ae.onChange,yr=ae.onEscape,ti=ae.onClick,Ri=ae.onLoadError,Xe=ae.onLoaderStart,xi=ae.onNetworksChange,en=ae.onCheckout,Ai=ae.onLineItemClick,Oi=ae.onConfirm,bc=ae.onCancel,Tc=ae.onShippingAddressChange,Rc=ae.onShippingRateChange,xc=Mt("mounts <".concat($,">")),xo=xc.elements,Ac=n.useState(null),Ao=l(Ac,2),Ye=Ao[0],Oc=Ao[1],Cn=n.useRef(null),Oo=n.useRef(null),Sa=at("mounts <".concat($,">")),Io=Sa.setCart,Sr=Sa.setCartState;Ke(Ye,"blur",Qr),Ke(Ye,"focus",ei),Ke(Ye,"escape",yr),Ke(Ye,"click",ti),Ke(Ye,"loaderror",Ri),Ke(Ye,"loaderstart",Xe),Ke(Ye,"networkschange",xi),Ke(Ye,"lineitemclick",Ai),Ke(Ye,"confirm",Oi),Ke(Ye,"cancel",bc),Ke(Ye,"shippingaddresschange",Tc),Ke(Ye,"shippingratechange",Rc);var Ii;T==="cart"?Ii=function(wo){Sr(wo),kt&&kt(wo)}:kt&&(T==="expressCheckout"?Ii=kt:Ii=function(){kt(Ye)}),Ke(Ye,"ready",Ii);var wi=T==="cart"?function(We){Sr(We),Ze&&Ze(We)}:Ze;Ke(Ye,"change",wi);var Ic=T==="cart"?function(We){Sr(We),en&&en(We)}:en;Ke(Ye,"checkout",Ic),n.useLayoutEffect(function(){if(Cn.current===null&&xo&&Oo.current!==null){var We=xo.create(T,Lt);T==="cart"&&Io&&Io(We),Cn.current=We,Oc(We),We.mount(Oo.current)}},[xo,Lt,Io]);var va=ue(Lt);return n.useEffect(function(){if(Cn.current){var We=_e(Lt,va,["paymentRequest"]);We&&Cn.current.update(We)}},[Lt,va]),n.useLayoutEffect(function(){return function(){if(Cn.current&&typeof Cn.current.destroy=="function")try{Cn.current.destroy(),Cn.current=null}catch{}}},[]),n.createElement("div",{id:ft,className:Dt,ref:Oo})},ne=function(ae){Mt("mounts <".concat($,">")),at("mounts <".concat($,">"));var ft=ae.id,Dt=ae.className;return n.createElement("div",{id:ft,className:Dt})},Oe=N?ne:Re;return Oe.propTypes={id:H.string,className:H.string,onChange:H.func,onBlur:H.func,onFocus:H.func,onReady:H.func,onEscape:H.func,onClick:H.func,onLoadError:H.func,onLoaderStart:H.func,onNetworksChange:H.func,onCheckout:H.func,onLineItemClick:H.func,onConfirm:H.func,onCancel:H.func,onShippingAddressChange:H.func,onShippingRateChange:H.func,options:H.object},Oe.displayName=$,Oe.__elementType=T,Oe},Ae=typeof window>"u",Ci=Se("auBankAccount",Ae),bi=Se("card",Ae),_a=Se("cardNumber",Ae),yt=Se("cardExpiry",Ae),Kr=Se("cardCvc",Ae),Sc=Se("fpxBank",Ae),Qt=Se("iban",Ae),ya=Se("idealBank",Ae),vc=Se("p24Bank",Ae),Zr=Se("epsBank",Ae),St=Se("payment",Ae),Xr=Se("expressCheckout",Ae),Ti=Se("paymentRequestButton",Ae),Ec=Se("linkAuthentication",Ae),jr=Se("address",Ae),Cc=Se("shippingAddress",Ae),Jr=Se("cart",Ae),_r=Se("paymentMethodMessaging",Ae),To=Se("affirmMessage",Ae),Ro=Se("afterpayClearpayMessage",Ae);t.AddressElement=jr,t.AffirmMessageElement=To,t.AfterpayClearpayMessageElement=Ro,t.AuBankAccountElement=Ci,t.CardCvcElement=Kr,t.CardElement=bi,t.CardExpiryElement=yt,t.CardNumberElement=_a,t.CartElement=Jr,t.Elements=Vr,t.ElementsConsumer=qr,t.EpsBankElement=Zr,t.ExpressCheckoutElement=Xr,t.FpxBankElement=Sc,t.IbanElement=Qt,t.IdealBankElement=ya,t.LinkAuthenticationElement=Ec,t.P24BankElement=vc,t.PaymentElement=St,t.PaymentMethodMessagingElement=_r,t.PaymentRequestButtonElement=Ti,t.ShippingAddressElement=Cc,t.useCartElement=yc,t.useCartElementState=hr,t.useElements=hc,t.useStripe=_c,Object.defineProperty(t,"__esModule",{value:!0})})});var d_=cs((Eo,ha)=>{(function(){var t,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",p=500,m="__lodash_placeholder__",h=1,S=2,v=4,I=1,P=2,L=1,Y=2,ce=4,X=8,H=16,ue=32,de=64,Ne=128,Me=256,Te=512,he=30,_e="...",it=800,Nt=16,ot=1,Wr=2,oe=3,ye=1/0,ze=9007199254740991,Vr=17976931348623157e292,Mt=0/0,at=4294967295,hc=at-1,_c=at>>>1,yc=[["ary",Ne],["bind",L],["bindKey",Y],["curry",X],["curryRight",H],["flip",Te],["partial",ue],["partialRight",de],["rearg",Me]],hr="[object Arguments]",qr="[object Array]",Ke="[object AsyncFunction]",zr="[object Boolean]",Se="[object Date]",Ae="[object DOMException]",Ci="[object Error]",bi="[object Function]",_a="[object GeneratorFunction]",yt="[object Map]",Kr="[object Number]",Sc="[object Null]",Qt="[object Object]",ya="[object Promise]",vc="[object Proxy]",Zr="[object RegExp]",St="[object Set]",Xr="[object String]",Ti="[object Symbol]",Ec="[object Undefined]",jr="[object WeakMap]",Cc="[object WeakSet]",Jr="[object ArrayBuffer]",_r="[object DataView]",To="[object Float32Array]",Ro="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",$="[object Uint8Array]",Re="[object Uint8ClampedArray]",ne="[object Uint16Array]",Oe="[object Uint32Array]",et=/\b__p \+= '';/g,ae=/\b(__p \+=) '' \+/g,ft=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dt=/&(?:amp|lt|gt|quot|#39);/g,Bt=/[&<>"']/g,Lt=RegExp(Dt.source),Qr=RegExp(Bt.source),ei=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Ze=/<%=([\s\S]+?)%>/g,yr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ti=/^\w*$/,Ri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xe=/[\\^$.*+?()[\]{}|]/g,xi=RegExp(Xe.source),en=/^\s+/,Ai=/\s/,Oi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bc=/\{\n\/\* \[wrapped with (.+)\] \*/,Tc=/,? & /,Rc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xc=/[()=,{}\[\]\/\s]/,xo=/\\(\\)?/g,Ac=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ao=/\w*$/,Ye=/^[-+]0x[0-9a-f]+$/i,Oc=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Oo=/^0o[0-7]+$/i,Sa=/^(?:0|[1-9]\d*)$/,Io=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sr=/($^)/,Ii=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",Ic="\\u0300-\\u036f",va="\\ufe20-\\ufe2f",We="\\u20d0-\\u20ff",wo=Ic+va+We,yf="\\u2700-\\u27bf",Sf="a-z\\xdf-\\xf6\\xf8-\\xff",S_="\\xac\\xb1\\xd7\\xf7",v_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E_="\\u2000-\\u206f",C_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vf="A-Z\\xc0-\\xd6\\xd8-\\xde",Ef="\\ufe0e\\ufe0f",Cf=S_+v_+E_+C_,wc="['\u2019]",b_="["+wi+"]",bf="["+Cf+"]",Ea="["+wo+"]",Tf="\\d+",T_="["+yf+"]",Rf="["+Sf+"]",xf="[^"+wi+Cf+Tf+yf+Sf+vf+"]",Pc="\\ud83c[\\udffb-\\udfff]",R_="(?:"+Ea+"|"+Pc+")",Af="[^"+wi+"]",Nc="(?:\\ud83c[\\udde6-\\uddff]){2}",Mc="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+vf+"]",Of="\\u200d",If="(?:"+Rf+"|"+xf+")",x_="(?:"+Pi+"|"+xf+")",wf="(?:"+wc+"(?:d|ll|m|re|s|t|ve))?",Pf="(?:"+wc+"(?:D|LL|M|RE|S|T|VE))?",Nf=R_+"?",Mf="["+Ef+"]?",A_="(?:"+Of+"(?:"+[Af,Nc,Mc].join("|")+")"+Mf+Nf+")*",O_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",I_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Df=Mf+Nf+A_,w_="(?:"+[T_,Nc,Mc].join("|")+")"+Df,P_="(?:"+[Af+Ea+"?",Ea,Nc,Mc,b_].join("|")+")",N_=RegExp(wc,"g"),M_=RegExp(Ea,"g"),Dc=RegExp(Pc+"(?="+Pc+")|"+P_+Df,"g"),D_=RegExp([Pi+"?"+Rf+"+"+wf+"(?="+[bf,Pi,"$"].join("|")+")",x_+"+"+Pf+"(?="+[bf,Pi+If,"$"].join("|")+")",Pi+"?"+If+"+"+wf,Pi+"+"+Pf,I_,O_,Tf,w_].join("|"),"g"),B_=RegExp("["+Of+wi+wo+Ef+"]"),L_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,k_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],F_=-1,Ee={};Ee[To]=Ee[Ro]=Ee[M]=Ee[T]=Ee[N]=Ee[$]=Ee[Re]=Ee[ne]=Ee[Oe]=!0,Ee[hr]=Ee[qr]=Ee[Jr]=Ee[zr]=Ee[_r]=Ee[Se]=Ee[Ci]=Ee[bi]=Ee[yt]=Ee[Kr]=Ee[Qt]=Ee[Zr]=Ee[St]=Ee[Xr]=Ee[jr]=!1;var ve={};ve[hr]=ve[qr]=ve[Jr]=ve[_r]=ve[zr]=ve[Se]=ve[To]=ve[Ro]=ve[M]=ve[T]=ve[N]=ve[yt]=ve[Kr]=ve[Qt]=ve[Zr]=ve[St]=ve[Xr]=ve[Ti]=ve[$]=ve[Re]=ve[ne]=ve[Oe]=!0,ve[Ci]=ve[bi]=ve[jr]=!1;var U_={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},G_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},H_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Y_=parseFloat,W_=parseInt,Bf=typeof global=="object"&&global&&global.Object===Object&&global,V_=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Bf||V_||Function("return this")(),Bc=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,ni=Bc&&typeof ha=="object"&&ha&&!ha.nodeType&&ha,Lf=ni&&ni.exports===Bc,Lc=Lf&&Bf.process,Ft=function(){try{var E=ni&&ni.require&&ni.require("util").types;return E||Lc&&Lc.binding&&Lc.binding("util")}catch{}}(),kf=Ft&&Ft.isArrayBuffer,Ff=Ft&&Ft.isDate,Uf=Ft&&Ft.isMap,Gf=Ft&&Ft.isRegExp,Hf=Ft&&Ft.isSet,$f=Ft&&Ft.isTypedArray;function vt(E,R,b){switch(b.length){case 0:return E.call(R);case 1:return E.call(R,b[0]);case 2:return E.call(R,b[0],b[1]);case 3:return E.call(R,b[0],b[1],b[2])}return E.apply(R,b)}function q_(E,R,b,B){for(var V=-1,se=E==null?0:E.length;++V<se;){var Ge=E[V];R(B,Ge,b(Ge),E)}return B}function Ut(E,R){for(var b=-1,B=E==null?0:E.length;++b<B&&R(E[b],b,E)!==!1;);return E}function z_(E,R){for(var b=E==null?0:E.length;b--&&R(E[b],b,E)!==!1;);return E}function Yf(E,R){for(var b=-1,B=E==null?0:E.length;++b<B;)if(!R(E[b],b,E))return!1;return!0}function vr(E,R){for(var b=-1,B=E==null?0:E.length,V=0,se=[];++b<B;){var Ge=E[b];R(Ge,b,E)&&(se[V++]=Ge)}return se}function Ca(E,R){var b=E==null?0:E.length;return!!b&&Ni(E,R,0)>-1}function kc(E,R,b){for(var B=-1,V=E==null?0:E.length;++B<V;)if(b(R,E[B]))return!0;return!1}function Ce(E,R){for(var b=-1,B=E==null?0:E.length,V=Array(B);++b<B;)V[b]=R(E[b],b,E);return V}function Er(E,R){for(var b=-1,B=R.length,V=E.length;++b<B;)E[V+b]=R[b];return E}function Fc(E,R,b,B){var V=-1,se=E==null?0:E.length;for(B&&se&&(b=E[++V]);++V<se;)b=R(b,E[V],V,E);return b}function K_(E,R,b,B){var V=E==null?0:E.length;for(B&&V&&(b=E[--V]);V--;)b=R(b,E[V],V,E);return b}function Uc(E,R){for(var b=-1,B=E==null?0:E.length;++b<B;)if(R(E[b],b,E))return!0;return!1}var Z_=Gc("length");function X_(E){return E.split("")}function j_(E){return E.match(Rc)||[]}function Wf(E,R,b){var B;return b(E,function(V,se,Ge){if(R(V,se,Ge))return B=se,!1}),B}function ba(E,R,b,B){for(var V=E.length,se=b+(B?1:-1);B?se--:++se<V;)if(R(E[se],se,E))return se;return-1}function Ni(E,R,b){return R===R?u1(E,R,b):ba(E,Vf,b)}function J_(E,R,b,B){for(var V=b-1,se=E.length;++V<se;)if(B(E[V],R))return V;return-1}function Vf(E){return E!==E}function qf(E,R){var b=E==null?0:E.length;return b?$c(E,R)/b:Mt}function Gc(E){return function(R){return R==null?t:R[E]}}function Hc(E){return function(R){return E==null?t:E[R]}}function zf(E,R,b,B,V){return V(E,function(se,Ge,me){b=B?(B=!1,se):R(b,se,Ge,me)}),b}function Q_(E,R){var b=E.length;for(E.sort(R);b--;)E[b]=E[b].value;return E}function $c(E,R){for(var b,B=-1,V=E.length;++B<V;){var se=R(E[B]);se!==t&&(b=b===t?se:b+se)}return b}function Yc(E,R){for(var b=-1,B=Array(E);++b<E;)B[b]=R(b);return B}function e1(E,R){return Ce(R,function(b){return[b,E[b]]})}function Kf(E){return E&&E.slice(0,Jf(E)+1).replace(en,"")}function Et(E){return function(R){return E(R)}}function Wc(E,R){return Ce(R,function(b){return E[b]})}function Po(E,R){return E.has(R)}function Zf(E,R){for(var b=-1,B=E.length;++b<B&&Ni(R,E[b],0)>-1;);return b}function Xf(E,R){for(var b=E.length;b--&&Ni(R,E[b],0)>-1;);return b}function t1(E,R){for(var b=E.length,B=0;b--;)E[b]===R&&++B;return B}var n1=Hc(U_),r1=Hc(G_);function i1(E){return"\\"+$_[E]}function o1(E,R){return E==null?t:E[R]}function Mi(E){return B_.test(E)}function a1(E){return L_.test(E)}function s1(E){for(var R,b=[];!(R=E.next()).done;)b.push(R.value);return b}function Vc(E){var R=-1,b=Array(E.size);return E.forEach(function(B,V){b[++R]=[V,B]}),b}function jf(E,R){return function(b){return E(R(b))}}function Cr(E,R){for(var b=-1,B=E.length,V=0,se=[];++b<B;){var Ge=E[b];(Ge===R||Ge===m)&&(E[b]=m,se[V++]=b)}return se}function Ta(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=B}),b}function c1(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=[B,B]}),b}function u1(E,R,b){for(var B=b-1,V=E.length;++B<V;)if(E[B]===R)return B;return-1}function l1(E,R,b){for(var B=b+1;B--;)if(E[B]===R)return B;return B}function Di(E){return Mi(E)?p1(E):Z_(E)}function tn(E){return Mi(E)?d1(E):X_(E)}function Jf(E){for(var R=E.length;R--&&Ai.test(E.charAt(R)););return R}var f1=Hc(H_);function p1(E){for(var R=Dc.lastIndex=0;Dc.test(E);)++R;return R}function d1(E){return E.match(Dc)||[]}function m1(E){return E.match(D_)||[]}var g1=function E(R){R=R==null?Ve:br.defaults(Ve.Object(),R,br.pick(Ve,k_));var b=R.Array,B=R.Date,V=R.Error,se=R.Function,Ge=R.Math,me=R.Object,qc=R.RegExp,h1=R.String,Gt=R.TypeError,Ra=b.prototype,_1=se.prototype,Bi=me.prototype,xa=R["__core-js_shared__"],Aa=_1.toString,fe=Bi.hasOwnProperty,y1=0,Qf=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Oa=Bi.toString,S1=Aa.call(me),v1=Ve._,E1=qc("^"+Aa.call(fe).replace(Xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ia=Lf?R.Buffer:t,Tr=R.Symbol,wa=R.Uint8Array,ep=Ia?Ia.allocUnsafe:t,Pa=jf(me.getPrototypeOf,me),tp=me.create,np=Bi.propertyIsEnumerable,Na=Ra.splice,rp=Tr?Tr.isConcatSpreadable:t,No=Tr?Tr.iterator:t,ri=Tr?Tr.toStringTag:t,Ma=function(){try{var e=ci(me,"defineProperty");return e({},"",{}),e}catch{}}(),C1=R.clearTimeout!==Ve.clearTimeout&&R.clearTimeout,b1=B&&B.now!==Ve.Date.now&&B.now,T1=R.setTimeout!==Ve.setTimeout&&R.setTimeout,Da=Ge.ceil,Ba=Ge.floor,zc=me.getOwnPropertySymbols,R1=Ia?Ia.isBuffer:t,ip=R.isFinite,x1=Ra.join,A1=jf(me.keys,me),He=Ge.max,tt=Ge.min,O1=B.now,I1=R.parseInt,op=Ge.random,w1=Ra.reverse,Kc=ci(R,"DataView"),Mo=ci(R,"Map"),Zc=ci(R,"Promise"),Li=ci(R,"Set"),Do=ci(R,"WeakMap"),Bo=ci(me,"create"),La=Do&&new Do,ki={},P1=ui(Kc),N1=ui(Mo),M1=ui(Zc),D1=ui(Li),B1=ui(Do),ka=Tr?Tr.prototype:t,Lo=ka?ka.valueOf:t,ap=ka?ka.toString:t;function d(e){if(Ie(e)&&!q(e)&&!(e instanceof te)){if(e instanceof Ht)return e;if(fe.call(e,"__wrapped__"))return sd(e)}return new Ht(e)}var Fi=function(){function e(){}return function(r){if(!xe(r))return{};if(tp)return tp(r);e.prototype=r;var o=new e;return e.prototype=t,o}}();function Fa(){}function Ht(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=t}d.templateSettings={escape:ei,evaluate:kt,interpolate:Ze,variable:"",imports:{_:d}},d.prototype=Fa.prototype,d.prototype.constructor=d,Ht.prototype=Fi(Fa.prototype),Ht.prototype.constructor=Ht;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=at,this.__views__=[]}function L1(){var e=new te(this.__wrapped__);return e.__actions__=pt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pt(this.__views__),e}function k1(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function F1(){var e=this.__wrapped__.value(),r=this.__dir__,o=q(e),c=r<0,f=o?e.length:0,g=Xy(0,f,this.__views__),_=g.start,y=g.end,C=y-_,A=c?y:_-1,O=this.__iteratees__,w=O.length,D=0,k=tt(C,this.__takeCount__);if(!o||!c&&f==C&&k==C)return wp(e,this.__actions__);var U=[];e:for(;C--&&D<k;){A+=r;for(var j=-1,G=e[A];++j<w;){var Q=O[j],re=Q.iteratee,Tt=Q.type,ut=re(G);if(Tt==Wr)G=ut;else if(!ut){if(Tt==ot)continue e;break e}}U[D++]=G}return U}te.prototype=Fi(Fa.prototype),te.prototype.constructor=te;function ii(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function U1(){this.__data__=Bo?Bo(null):{},this.size=0}function G1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function H1(e){var r=this.__data__;if(Bo){var o=r[e];return o===l?t:o}return fe.call(r,e)?r[e]:t}function $1(e){var r=this.__data__;return Bo?r[e]!==t:fe.call(r,e)}function Y1(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Bo&&r===t?l:r,this}ii.prototype.clear=U1,ii.prototype.delete=G1,ii.prototype.get=H1,ii.prototype.has=$1,ii.prototype.set=Y1;function Yn(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function W1(){this.__data__=[],this.size=0}function V1(e){var r=this.__data__,o=Ua(r,e);if(o<0)return!1;var c=r.length-1;return o==c?r.pop():Na.call(r,o,1),--this.size,!0}function q1(e){var r=this.__data__,o=Ua(r,e);return o<0?t:r[o][1]}function z1(e){return Ua(this.__data__,e)>-1}function K1(e,r){var o=this.__data__,c=Ua(o,e);return c<0?(++this.size,o.push([e,r])):o[c][1]=r,this}Yn.prototype.clear=W1,Yn.prototype.delete=V1,Yn.prototype.get=q1,Yn.prototype.has=z1,Yn.prototype.set=K1;function Wn(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function Z1(){this.size=0,this.__data__={hash:new ii,map:new(Mo||Yn),string:new ii}}function X1(e){var r=ja(this,e).delete(e);return this.size-=r?1:0,r}function j1(e){return ja(this,e).get(e)}function J1(e){return ja(this,e).has(e)}function Q1(e,r){var o=ja(this,e),c=o.size;return o.set(e,r),this.size+=o.size==c?0:1,this}Wn.prototype.clear=Z1,Wn.prototype.delete=X1,Wn.prototype.get=j1,Wn.prototype.has=J1,Wn.prototype.set=Q1;function oi(e){var r=-1,o=e==null?0:e.length;for(this.__data__=new Wn;++r<o;)this.add(e[r])}function ey(e){return this.__data__.set(e,l),this}function ty(e){return this.__data__.has(e)}oi.prototype.add=oi.prototype.push=ey,oi.prototype.has=ty;function nn(e){var r=this.__data__=new Yn(e);this.size=r.size}function ny(){this.__data__=new Yn,this.size=0}function ry(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}function iy(e){return this.__data__.get(e)}function oy(e){return this.__data__.has(e)}function ay(e,r){var o=this.__data__;if(o instanceof Yn){var c=o.__data__;if(!Mo||c.length<i-1)return c.push([e,r]),this.size=++o.size,this;o=this.__data__=new Wn(c)}return o.set(e,r),this.size=o.size,this}nn.prototype.clear=ny,nn.prototype.delete=ry,nn.prototype.get=iy,nn.prototype.has=oy,nn.prototype.set=ay;function sp(e,r){var o=q(e),c=!o&&li(e),f=!o&&!c&&Ir(e),g=!o&&!c&&!f&&$i(e),_=o||c||f||g,y=_?Yc(e.length,h1):[],C=y.length;for(var A in e)(r||fe.call(e,A))&&!(_&&(A=="length"||f&&(A=="offset"||A=="parent")||g&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Kn(A,C)))&&y.push(A);return y}function cp(e){var r=e.length;return r?e[au(0,r-1)]:t}function sy(e,r){return Ja(pt(e),ai(r,0,e.length))}function cy(e){return Ja(pt(e))}function Xc(e,r,o){(o!==t&&!rn(e[r],o)||o===t&&!(r in e))&&Vn(e,r,o)}function ko(e,r,o){var c=e[r];(!(fe.call(e,r)&&rn(c,o))||o===t&&!(r in e))&&Vn(e,r,o)}function Ua(e,r){for(var o=e.length;o--;)if(rn(e[o][0],r))return o;return-1}function uy(e,r,o,c){return Rr(e,function(f,g,_){r(c,f,o(f),_)}),c}function up(e,r){return e&&Tn(r,qe(r),e)}function ly(e,r){return e&&Tn(r,mt(r),e)}function Vn(e,r,o){r=="__proto__"&&Ma?Ma(e,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[r]=o}function jc(e,r){for(var o=-1,c=r.length,f=b(c),g=e==null;++o<c;)f[o]=g?t:Pu(e,r[o]);return f}function ai(e,r,o){return e===e&&(o!==t&&(e=e<=o?e:o),r!==t&&(e=e>=r?e:r)),e}function $t(e,r,o,c,f,g){var _,y=r&h,C=r&S,A=r&v;if(o&&(_=f?o(e,c,f,g):o(e)),_!==t)return _;if(!xe(e))return e;var O=q(e);if(O){if(_=Jy(e),!y)return pt(e,_)}else{var w=nt(e),D=w==bi||w==_a;if(Ir(e))return Mp(e,y);if(w==Qt||w==hr||D&&!f){if(_=C||D?{}:Jp(e),!y)return C?Hy(e,ly(_,e)):Gy(e,up(_,e))}else{if(!ve[w])return f?e:{};_=Qy(e,w,y)}}g||(g=new nn);var k=g.get(e);if(k)return k;g.set(e,_),Ad(e)?e.forEach(function(G){_.add($t(G,r,o,G,e,g))}):Rd(e)&&e.forEach(function(G,Q){_.set(Q,$t(G,r,o,Q,e,g))});var U=A?C?_u:hu:C?mt:qe,j=O?t:U(e);return Ut(j||e,function(G,Q){j&&(Q=G,G=e[Q]),ko(_,Q,$t(G,r,o,Q,e,g))}),_}function fy(e){var r=qe(e);return function(o){return lp(o,e,r)}}function lp(e,r,o){var c=o.length;if(e==null)return!c;for(e=me(e);c--;){var f=o[c],g=r[f],_=e[f];if(_===t&&!(f in e)||!g(_))return!1}return!0}function fp(e,r,o){if(typeof e!="function")throw new Gt(s);return Wo(function(){e.apply(t,o)},r)}function Fo(e,r,o,c){var f=-1,g=Ca,_=!0,y=e.length,C=[],A=r.length;if(!y)return C;o&&(r=Ce(r,Et(o))),c?(g=kc,_=!1):r.length>=i&&(g=Po,_=!1,r=new oi(r));e:for(;++f<y;){var O=e[f],w=o==null?O:o(O);if(O=c||O!==0?O:0,_&&w===w){for(var D=A;D--;)if(r[D]===w)continue e;C.push(O)}else g(r,w,c)||C.push(O)}return C}var Rr=Fp(bn),pp=Fp(Qc,!0);function py(e,r){var o=!0;return Rr(e,function(c,f,g){return o=!!r(c,f,g),o}),o}function Ga(e,r,o){for(var c=-1,f=e.length;++c<f;){var g=e[c],_=r(g);if(_!=null&&(y===t?_===_&&!bt(_):o(_,y)))var y=_,C=g}return C}function dy(e,r,o,c){var f=e.length;for(o=z(o),o<0&&(o=-o>f?0:f+o),c=c===t||c>f?f:z(c),c<0&&(c+=f),c=o>c?0:Id(c);o<c;)e[o++]=r;return e}function dp(e,r){var o=[];return Rr(e,function(c,f,g){r(c,f,g)&&o.push(c)}),o}function je(e,r,o,c,f){var g=-1,_=e.length;for(o||(o=tS),f||(f=[]);++g<_;){var y=e[g];r>0&&o(y)?r>1?je(y,r-1,o,c,f):Er(f,y):c||(f[f.length]=y)}return f}var Jc=Up(),mp=Up(!0);function bn(e,r){return e&&Jc(e,r,qe)}function Qc(e,r){return e&&mp(e,r,qe)}function Ha(e,r){return vr(r,function(o){return Zn(e[o])})}function si(e,r){r=Ar(r,e);for(var o=0,c=r.length;e!=null&&o<c;)e=e[Rn(r[o++])];return o&&o==c?e:t}function gp(e,r,o){var c=r(e);return q(e)?c:Er(c,o(e))}function st(e){return e==null?e===t?Ec:Sc:ri&&ri in me(e)?Zy(e):cS(e)}function eu(e,r){return e>r}function my(e,r){return e!=null&&fe.call(e,r)}function gy(e,r){return e!=null&&r in me(e)}function hy(e,r,o){return e>=tt(r,o)&&e<He(r,o)}function tu(e,r,o){for(var c=o?kc:Ca,f=e[0].length,g=e.length,_=g,y=b(g),C=1/0,A=[];_--;){var O=e[_];_&&r&&(O=Ce(O,Et(r))),C=tt(O.length,C),y[_]=!o&&(r||f>=120&&O.length>=120)?new oi(_&&O):t}O=e[0];var w=-1,D=y[0];e:for(;++w<f&&A.length<C;){var k=O[w],U=r?r(k):k;if(k=o||k!==0?k:0,!(D?Po(D,U):c(A,U,o))){for(_=g;--_;){var j=y[_];if(!(j?Po(j,U):c(e[_],U,o)))continue e}D&&D.push(U),A.push(k)}}return A}function _y(e,r,o,c){return bn(e,function(f,g,_){r(c,o(f),g,_)}),c}function Uo(e,r,o){r=Ar(r,e),e=nd(e,r);var c=e==null?e:e[Rn(Wt(r))];return c==null?t:vt(c,e,o)}function hp(e){return Ie(e)&&st(e)==hr}function yy(e){return Ie(e)&&st(e)==Jr}function Sy(e){return Ie(e)&&st(e)==Se}function Go(e,r,o,c,f){return e===r?!0:e==null||r==null||!Ie(e)&&!Ie(r)?e!==e&&r!==r:vy(e,r,o,c,Go,f)}function vy(e,r,o,c,f,g){var _=q(e),y=q(r),C=_?qr:nt(e),A=y?qr:nt(r);C=C==hr?Qt:C,A=A==hr?Qt:A;var O=C==Qt,w=A==Qt,D=C==A;if(D&&Ir(e)){if(!Ir(r))return!1;_=!0,O=!1}if(D&&!O)return g||(g=new nn),_||$i(e)?Zp(e,r,o,c,f,g):zy(e,r,C,o,c,f,g);if(!(o&I)){var k=O&&fe.call(e,"__wrapped__"),U=w&&fe.call(r,"__wrapped__");if(k||U){var j=k?e.value():e,G=U?r.value():r;return g||(g=new nn),f(j,G,o,c,g)}}return D?(g||(g=new nn),Ky(e,r,o,c,f,g)):!1}function Ey(e){return Ie(e)&&nt(e)==yt}function nu(e,r,o,c){var f=o.length,g=f,_=!c;if(e==null)return!g;for(e=me(e);f--;){var y=o[f];if(_&&y[2]?y[1]!==e[y[0]]:!(y[0]in e))return!1}for(;++f<g;){y=o[f];var C=y[0],A=e[C],O=y[1];if(_&&y[2]){if(A===t&&!(C in e))return!1}else{var w=new nn;if(c)var D=c(A,O,C,e,r,w);if(!(D===t?Go(O,A,I|P,c,w):D))return!1}}return!0}function _p(e){if(!xe(e)||rS(e))return!1;var r=Zn(e)?E1:Cn;return r.test(ui(e))}function Cy(e){return Ie(e)&&st(e)==Zr}function by(e){return Ie(e)&&nt(e)==St}function Ty(e){return Ie(e)&&is(e.length)&&!!Ee[st(e)]}function yp(e){return typeof e=="function"?e:e==null?gt:typeof e=="object"?q(e)?Ep(e[0],e[1]):vp(e):Gd(e)}function ru(e){if(!Yo(e))return A1(e);var r=[];for(var o in me(e))fe.call(e,o)&&o!="constructor"&&r.push(o);return r}function Ry(e){if(!xe(e))return sS(e);var r=Yo(e),o=[];for(var c in e)c=="constructor"&&(r||!fe.call(e,c))||o.push(c);return o}function iu(e,r){return e<r}function Sp(e,r){var o=-1,c=dt(e)?b(e.length):[];return Rr(e,function(f,g,_){c[++o]=r(f,g,_)}),c}function vp(e){var r=Su(e);return r.length==1&&r[0][2]?ed(r[0][0],r[0][1]):function(o){return o===e||nu(o,e,r)}}function Ep(e,r){return Eu(e)&&Qp(r)?ed(Rn(e),r):function(o){var c=Pu(o,e);return c===t&&c===r?Nu(o,e):Go(r,c,I|P)}}function $a(e,r,o,c,f){e!==r&&Jc(r,function(g,_){if(f||(f=new nn),xe(g))xy(e,r,_,o,$a,c,f);else{var y=c?c(bu(e,_),g,_+"",e,r,f):t;y===t&&(y=g),Xc(e,_,y)}},mt)}function xy(e,r,o,c,f,g,_){var y=bu(e,o),C=bu(r,o),A=_.get(C);if(A){Xc(e,o,A);return}var O=g?g(y,C,o+"",e,r,_):t,w=O===t;if(w){var D=q(C),k=!D&&Ir(C),U=!D&&!k&&$i(C);O=C,D||k||U?q(y)?O=y:De(y)?O=pt(y):k?(w=!1,O=Mp(C,!0)):U?(w=!1,O=Dp(C,!0)):O=[]:Vo(C)||li(C)?(O=y,li(y)?O=wd(y):(!xe(y)||Zn(y))&&(O=Jp(C))):w=!1}w&&(_.set(C,O),f(O,C,c,g,_),_.delete(C)),Xc(e,o,O)}function Cp(e,r){var o=e.length;if(o)return r+=r<0?o:0,Kn(r,o)?e[r]:t}function bp(e,r,o){r.length?r=Ce(r,function(g){return q(g)?function(_){return si(_,g.length===1?g[0]:g)}:g}):r=[gt];var c=-1;r=Ce(r,Et(F()));var f=Sp(e,function(g,_,y){var C=Ce(r,function(A){return A(g)});return{criteria:C,index:++c,value:g}});return Q_(f,function(g,_){return Uy(g,_,o)})}function Ay(e,r){return Tp(e,r,function(o,c){return Nu(e,c)})}function Tp(e,r,o){for(var c=-1,f=r.length,g={};++c<f;){var _=r[c],y=si(e,_);o(y,_)&&Ho(g,Ar(_,e),y)}return g}function Oy(e){return function(r){return si(r,e)}}function ou(e,r,o,c){var f=c?J_:Ni,g=-1,_=r.length,y=e;for(e===r&&(r=pt(r)),o&&(y=Ce(e,Et(o)));++g<_;)for(var C=0,A=r[g],O=o?o(A):A;(C=f(y,O,C,c))>-1;)y!==e&&Na.call(y,C,1),Na.call(e,C,1);return e}function Rp(e,r){for(var o=e?r.length:0,c=o-1;o--;){var f=r[o];if(o==c||f!==g){var g=f;Kn(f)?Na.call(e,f,1):uu(e,f)}}return e}function au(e,r){return e+Ba(op()*(r-e+1))}function Iy(e,r,o,c){for(var f=-1,g=He(Da((r-e)/(o||1)),0),_=b(g);g--;)_[c?g:++f]=e,e+=o;return _}function su(e,r){var o="";if(!e||r<1||r>ze)return o;do r%2&&(o+=e),r=Ba(r/2),r&&(e+=e);while(r);return o}function J(e,r){return Tu(td(e,r,gt),e+"")}function wy(e){return cp(Yi(e))}function Py(e,r){var o=Yi(e);return Ja(o,ai(r,0,o.length))}function Ho(e,r,o,c){if(!xe(e))return e;r=Ar(r,e);for(var f=-1,g=r.length,_=g-1,y=e;y!=null&&++f<g;){var C=Rn(r[f]),A=o;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(f!=_){var O=y[C];A=c?c(O,C,y):t,A===t&&(A=xe(O)?O:Kn(r[f+1])?[]:{})}ko(y,C,A),y=y[C]}return e}var xp=La?function(e,r){return La.set(e,r),e}:gt,Ny=Ma?function(e,r){return Ma(e,"toString",{configurable:!0,enumerable:!1,value:Du(r),writable:!0})}:gt;function My(e){return Ja(Yi(e))}function Yt(e,r,o){var c=-1,f=e.length;r<0&&(r=-r>f?0:f+r),o=o>f?f:o,o<0&&(o+=f),f=r>o?0:o-r>>>0,r>>>=0;for(var g=b(f);++c<f;)g[c]=e[c+r];return g}function Dy(e,r){var o;return Rr(e,function(c,f,g){return o=r(c,f,g),!o}),!!o}function Ya(e,r,o){var c=0,f=e==null?c:e.length;if(typeof r=="number"&&r===r&&f<=_c){for(;c<f;){var g=c+f>>>1,_=e[g];_!==null&&!bt(_)&&(o?_<=r:_<r)?c=g+1:f=g}return f}return cu(e,r,gt,o)}function cu(e,r,o,c){var f=0,g=e==null?0:e.length;if(g===0)return 0;r=o(r);for(var _=r!==r,y=r===null,C=bt(r),A=r===t;f<g;){var O=Ba((f+g)/2),w=o(e[O]),D=w!==t,k=w===null,U=w===w,j=bt(w);if(_)var G=c||U;else A?G=U&&(c||D):y?G=U&&D&&(c||!k):C?G=U&&D&&!k&&(c||!j):k||j?G=!1:G=c?w<=r:w<r;G?f=O+1:g=O}return tt(g,hc)}function Ap(e,r){for(var o=-1,c=e.length,f=0,g=[];++o<c;){var _=e[o],y=r?r(_):_;if(!o||!rn(y,C)){var C=y;g[f++]=_===0?0:_}}return g}function Op(e){return typeof e=="number"?e:bt(e)?Mt:+e}function Ct(e){if(typeof e=="string")return e;if(q(e))return Ce(e,Ct)+"";if(bt(e))return ap?ap.call(e):"";var r=e+"";return r=="0"&&1/e==-ye?"-0":r}function xr(e,r,o){var c=-1,f=Ca,g=e.length,_=!0,y=[],C=y;if(o)_=!1,f=kc;else if(g>=i){var A=r?null:Vy(e);if(A)return Ta(A);_=!1,f=Po,C=new oi}else C=r?[]:y;e:for(;++c<g;){var O=e[c],w=r?r(O):O;if(O=o||O!==0?O:0,_&&w===w){for(var D=C.length;D--;)if(C[D]===w)continue e;r&&C.push(w),y.push(O)}else f(C,w,o)||(C!==y&&C.push(w),y.push(O))}return y}function uu(e,r){return r=Ar(r,e),e=nd(e,r),e==null||delete e[Rn(Wt(r))]}function Ip(e,r,o,c){return Ho(e,r,o(si(e,r)),c)}function Wa(e,r,o,c){for(var f=e.length,g=c?f:-1;(c?g--:++g<f)&&r(e[g],g,e););return o?Yt(e,c?0:g,c?g+1:f):Yt(e,c?g+1:0,c?f:g)}function wp(e,r){var o=e;return o instanceof te&&(o=o.value()),Fc(r,function(c,f){return f.func.apply(f.thisArg,Er([c],f.args))},o)}function lu(e,r,o){var c=e.length;if(c<2)return c?xr(e[0]):[];for(var f=-1,g=b(c);++f<c;)for(var _=e[f],y=-1;++y<c;)y!=f&&(g[f]=Fo(g[f]||_,e[y],r,o));return xr(je(g,1),r,o)}function Pp(e,r,o){for(var c=-1,f=e.length,g=r.length,_={};++c<f;){var y=c<g?r[c]:t;o(_,e[c],y)}return _}function fu(e){return De(e)?e:[]}function pu(e){return typeof e=="function"?e:gt}function Ar(e,r){return q(e)?e:Eu(e,r)?[e]:ad(le(e))}var By=J;function Or(e,r,o){var c=e.length;return o=o===t?c:o,!r&&o>=c?e:Yt(e,r,o)}var Np=C1||function(e){return Ve.clearTimeout(e)};function Mp(e,r){if(r)return e.slice();var o=e.length,c=ep?ep(o):new e.constructor(o);return e.copy(c),c}function du(e){var r=new e.constructor(e.byteLength);return new wa(r).set(new wa(e)),r}function Ly(e,r){var o=r?du(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function ky(e){var r=new e.constructor(e.source,Ao.exec(e));return r.lastIndex=e.lastIndex,r}function Fy(e){return Lo?me(Lo.call(e)):{}}function Dp(e,r){var o=r?du(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Bp(e,r){if(e!==r){var o=e!==t,c=e===null,f=e===e,g=bt(e),_=r!==t,y=r===null,C=r===r,A=bt(r);if(!y&&!A&&!g&&e>r||g&&_&&C&&!y&&!A||c&&_&&C||!o&&C||!f)return 1;if(!c&&!g&&!A&&e<r||A&&o&&f&&!c&&!g||y&&o&&f||!_&&f||!C)return-1}return 0}function Uy(e,r,o){for(var c=-1,f=e.criteria,g=r.criteria,_=f.length,y=o.length;++c<_;){var C=Bp(f[c],g[c]);if(C){if(c>=y)return C;var A=o[c];return C*(A=="desc"?-1:1)}}return e.index-r.index}function Lp(e,r,o,c){for(var f=-1,g=e.length,_=o.length,y=-1,C=r.length,A=He(g-_,0),O=b(C+A),w=!c;++y<C;)O[y]=r[y];for(;++f<_;)(w||f<g)&&(O[o[f]]=e[f]);for(;A--;)O[y++]=e[f++];return O}function kp(e,r,o,c){for(var f=-1,g=e.length,_=-1,y=o.length,C=-1,A=r.length,O=He(g-y,0),w=b(O+A),D=!c;++f<O;)w[f]=e[f];for(var k=f;++C<A;)w[k+C]=r[C];for(;++_<y;)(D||f<g)&&(w[k+o[_]]=e[f++]);return w}function pt(e,r){var o=-1,c=e.length;for(r||(r=b(c));++o<c;)r[o]=e[o];return r}function Tn(e,r,o,c){var f=!o;o||(o={});for(var g=-1,_=r.length;++g<_;){var y=r[g],C=c?c(o[y],e[y],y,o,e):t;C===t&&(C=e[y]),f?Vn(o,y,C):ko(o,y,C)}return o}function Gy(e,r){return Tn(e,vu(e),r)}function Hy(e,r){return Tn(e,Xp(e),r)}function Va(e,r){return function(o,c){var f=q(o)?q_:uy,g=r?r():{};return f(o,e,F(c,2),g)}}function Ui(e){return J(function(r,o){var c=-1,f=o.length,g=f>1?o[f-1]:t,_=f>2?o[2]:t;for(g=e.length>3&&typeof g=="function"?(f--,g):t,_&&ct(o[0],o[1],_)&&(g=f<3?t:g,f=1),r=me(r);++c<f;){var y=o[c];y&&e(r,y,c,g)}return r})}function Fp(e,r){return function(o,c){if(o==null)return o;if(!dt(o))return e(o,c);for(var f=o.length,g=r?f:-1,_=me(o);(r?g--:++g<f)&&c(_[g],g,_)!==!1;);return o}}function Up(e){return function(r,o,c){for(var f=-1,g=me(r),_=c(r),y=_.length;y--;){var C=_[e?y:++f];if(o(g[C],C,g)===!1)break}return r}}function $y(e,r,o){var c=r&L,f=$o(e);function g(){var _=this&&this!==Ve&&this instanceof g?f:e;return _.apply(c?o:this,arguments)}return g}function Gp(e){return function(r){r=le(r);var o=Mi(r)?tn(r):t,c=o?o[0]:r.charAt(0),f=o?Or(o,1).join(""):r.slice(1);return c[e]()+f}}function Gi(e){return function(r){return Fc(Fd(kd(r).replace(N_,"")),e,"")}}function $o(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=Fi(e.prototype),c=e.apply(o,r);return xe(c)?c:o}}function Yy(e,r,o){var c=$o(e);function f(){for(var g=arguments.length,_=b(g),y=g,C=Hi(f);y--;)_[y]=arguments[y];var A=g<3&&_[0]!==C&&_[g-1]!==C?[]:Cr(_,C);if(g-=A.length,g<o)return Vp(e,r,qa,f.placeholder,t,_,A,t,t,o-g);var O=this&&this!==Ve&&this instanceof f?c:e;return vt(O,this,_)}return f}function Hp(e){return function(r,o,c){var f=me(r);if(!dt(r)){var g=F(o,3);r=qe(r),o=function(y){return g(f[y],y,f)}}var _=e(r,o,c);return _>-1?f[g?r[_]:_]:t}}function $p(e){return zn(function(r){var o=r.length,c=o,f=Ht.prototype.thru;for(e&&r.reverse();c--;){var g=r[c];if(typeof g!="function")throw new Gt(s);if(f&&!_&&Xa(g)=="wrapper")var _=new Ht([],!0)}for(c=_?c:o;++c<o;){g=r[c];var y=Xa(g),C=y=="wrapper"?yu(g):t;C&&Cu(C[0])&&C[1]==(Ne|X|ue|Me)&&!C[4].length&&C[9]==1?_=_[Xa(C[0])].apply(_,C[3]):_=g.length==1&&Cu(g)?_[y]():_.thru(g)}return function(){var A=arguments,O=A[0];if(_&&A.length==1&&q(O))return _.plant(O).value();for(var w=0,D=o?r[w].apply(this,A):O;++w<o;)D=r[w].call(this,D);return D}})}function qa(e,r,o,c,f,g,_,y,C,A){var O=r&Ne,w=r&L,D=r&Y,k=r&(X|H),U=r&Te,j=D?t:$o(e);function G(){for(var Q=arguments.length,re=b(Q),Tt=Q;Tt--;)re[Tt]=arguments[Tt];if(k)var ut=Hi(G),Rt=t1(re,ut);if(c&&(re=Lp(re,c,f,k)),g&&(re=kp(re,g,_,k)),Q-=Rt,k&&Q<A){var Be=Cr(re,ut);return Vp(e,r,qa,G.placeholder,o,re,Be,y,C,A-Q)}var on=w?o:this,jn=D?on[e]:e;return Q=re.length,y?re=uS(re,y):U&&Q>1&&re.reverse(),O&&C<Q&&(re.length=C),this&&this!==Ve&&this instanceof G&&(jn=j||$o(jn)),jn.apply(on,re)}return G}function Yp(e,r){return function(o,c){return _y(o,e,r(c),{})}}function za(e,r){return function(o,c){var f;if(o===t&&c===t)return r;if(o!==t&&(f=o),c!==t){if(f===t)return c;typeof o=="string"||typeof c=="string"?(o=Ct(o),c=Ct(c)):(o=Op(o),c=Op(c)),f=e(o,c)}return f}}function mu(e){return zn(function(r){return r=Ce(r,Et(F())),J(function(o){var c=this;return e(r,function(f){return vt(f,c,o)})})})}function Ka(e,r){r=r===t?" ":Ct(r);var o=r.length;if(o<2)return o?su(r,e):r;var c=su(r,Da(e/Di(r)));return Mi(r)?Or(tn(c),0,e).join(""):c.slice(0,e)}function Wy(e,r,o,c){var f=r&L,g=$o(e);function _(){for(var y=-1,C=arguments.length,A=-1,O=c.length,w=b(O+C),D=this&&this!==Ve&&this instanceof _?g:e;++A<O;)w[A]=c[A];for(;C--;)w[A++]=arguments[++y];return vt(D,f?o:this,w)}return _}function Wp(e){return function(r,o,c){return c&&typeof c!="number"&&ct(r,o,c)&&(o=c=t),r=Xn(r),o===t?(o=r,r=0):o=Xn(o),c=c===t?r<o?1:-1:Xn(c),Iy(r,o,c,e)}}function Za(e){return function(r,o){return typeof r=="string"&&typeof o=="string"||(r=Vt(r),o=Vt(o)),e(r,o)}}function Vp(e,r,o,c,f,g,_,y,C,A){var O=r&X,w=O?_:t,D=O?t:_,k=O?g:t,U=O?t:g;r|=O?ue:de,r&=~(O?de:ue),r&ce||(r&=~(L|Y));var j=[e,r,f,k,w,U,D,y,C,A],G=o.apply(t,j);return Cu(e)&&rd(G,j),G.placeholder=c,id(G,e,r)}function gu(e){var r=Ge[e];return function(o,c){if(o=Vt(o),c=c==null?0:tt(z(c),292),c&&ip(o)){var f=(le(o)+"e").split("e"),g=r(f[0]+"e"+(+f[1]+c));return f=(le(g)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return r(o)}}var Vy=Li&&1/Ta(new Li([,-0]))[1]==ye?function(e){return new Li(e)}:ku;function qp(e){return function(r){var o=nt(r);return o==yt?Vc(r):o==St?c1(r):e1(r,e(r))}}function qn(e,r,o,c,f,g,_,y){var C=r&Y;if(!C&&typeof e!="function")throw new Gt(s);var A=c?c.length:0;if(A||(r&=~(ue|de),c=f=t),_=_===t?_:He(z(_),0),y=y===t?y:z(y),A-=f?f.length:0,r&de){var O=c,w=f;c=f=t}var D=C?t:yu(e),k=[e,r,o,c,f,O,w,g,_,y];if(D&&aS(k,D),e=k[0],r=k[1],o=k[2],c=k[3],f=k[4],y=k[9]=k[9]===t?C?0:e.length:He(k[9]-A,0),!y&&r&(X|H)&&(r&=~(X|H)),!r||r==L)var U=$y(e,r,o);else r==X||r==H?U=Yy(e,r,y):(r==ue||r==(L|ue))&&!f.length?U=Wy(e,r,o,c):U=qa.apply(t,k);var j=D?xp:rd;return id(j(U,k),e,r)}function zp(e,r,o,c){return e===t||rn(e,Bi[o])&&!fe.call(c,o)?r:e}function Kp(e,r,o,c,f,g){return xe(e)&&xe(r)&&(g.set(r,e),$a(e,r,t,Kp,g),g.delete(r)),e}function qy(e){return Vo(e)?t:e}function Zp(e,r,o,c,f,g){var _=o&I,y=e.length,C=r.length;if(y!=C&&!(_&&C>y))return!1;var A=g.get(e),O=g.get(r);if(A&&O)return A==r&&O==e;var w=-1,D=!0,k=o&P?new oi:t;for(g.set(e,r),g.set(r,e);++w<y;){var U=e[w],j=r[w];if(c)var G=_?c(j,U,w,r,e,g):c(U,j,w,e,r,g);if(G!==t){if(G)continue;D=!1;break}if(k){if(!Uc(r,function(Q,re){if(!Po(k,re)&&(U===Q||f(U,Q,o,c,g)))return k.push(re)})){D=!1;break}}else if(!(U===j||f(U,j,o,c,g))){D=!1;break}}return g.delete(e),g.delete(r),D}function zy(e,r,o,c,f,g,_){switch(o){case _r:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Jr:return!(e.byteLength!=r.byteLength||!g(new wa(e),new wa(r)));case zr:case Se:case Kr:return rn(+e,+r);case Ci:return e.name==r.name&&e.message==r.message;case Zr:case Xr:return e==r+"";case yt:var y=Vc;case St:var C=c&I;if(y||(y=Ta),e.size!=r.size&&!C)return!1;var A=_.get(e);if(A)return A==r;c|=P,_.set(e,r);var O=Zp(y(e),y(r),c,f,g,_);return _.delete(e),O;case Ti:if(Lo)return Lo.call(e)==Lo.call(r)}return!1}function Ky(e,r,o,c,f,g){var _=o&I,y=hu(e),C=y.length,A=hu(r),O=A.length;if(C!=O&&!_)return!1;for(var w=C;w--;){var D=y[w];if(!(_?D in r:fe.call(r,D)))return!1}var k=g.get(e),U=g.get(r);if(k&&U)return k==r&&U==e;var j=!0;g.set(e,r),g.set(r,e);for(var G=_;++w<C;){D=y[w];var Q=e[D],re=r[D];if(c)var Tt=_?c(re,Q,D,r,e,g):c(Q,re,D,e,r,g);if(!(Tt===t?Q===re||f(Q,re,o,c,g):Tt)){j=!1;break}G||(G=D=="constructor")}if(j&&!G){var ut=e.constructor,Rt=r.constructor;ut!=Rt&&"constructor"in e&&"constructor"in r&&!(typeof ut=="function"&&ut instanceof ut&&typeof Rt=="function"&&Rt instanceof Rt)&&(j=!1)}return g.delete(e),g.delete(r),j}function zn(e){return Tu(td(e,t,ld),e+"")}function hu(e){return gp(e,qe,vu)}function _u(e){return gp(e,mt,Xp)}var yu=La?function(e){return La.get(e)}:ku;function Xa(e){for(var r=e.name+"",o=ki[r],c=fe.call(ki,r)?o.length:0;c--;){var f=o[c],g=f.func;if(g==null||g==e)return f.name}return r}function Hi(e){var r=fe.call(d,"placeholder")?d:e;return r.placeholder}function F(){var e=d.iteratee||Bu;return e=e===Bu?yp:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,r){var o=e.__data__;return nS(r)?o[typeof r=="string"?"string":"hash"]:o.map}function Su(e){for(var r=qe(e),o=r.length;o--;){var c=r[o],f=e[c];r[o]=[c,f,Qp(f)]}return r}function ci(e,r){var o=o1(e,r);return _p(o)?o:t}function Zy(e){var r=fe.call(e,ri),o=e[ri];try{e[ri]=t;var c=!0}catch{}var f=Oa.call(e);return c&&(r?e[ri]=o:delete e[ri]),f}var vu=zc?function(e){return e==null?[]:(e=me(e),vr(zc(e),function(r){return np.call(e,r)}))}:Fu,Xp=zc?function(e){for(var r=[];e;)Er(r,vu(e)),e=Pa(e);return r}:Fu,nt=st;(Kc&&nt(new Kc(new ArrayBuffer(1)))!=_r||Mo&&nt(new Mo)!=yt||Zc&&nt(Zc.resolve())!=ya||Li&&nt(new Li)!=St||Do&&nt(new Do)!=jr)&&(nt=function(e){var r=st(e),o=r==Qt?e.constructor:t,c=o?ui(o):"";if(c)switch(c){case P1:return _r;case N1:return yt;case M1:return ya;case D1:return St;case B1:return jr}return r});function Xy(e,r,o){for(var c=-1,f=o.length;++c<f;){var g=o[c],_=g.size;switch(g.type){case"drop":e+=_;break;case"dropRight":r-=_;break;case"take":r=tt(r,e+_);break;case"takeRight":e=He(e,r-_);break}}return{start:e,end:r}}function jy(e){var r=e.match(bc);return r?r[1].split(Tc):[]}function jp(e,r,o){r=Ar(r,e);for(var c=-1,f=r.length,g=!1;++c<f;){var _=Rn(r[c]);if(!(g=e!=null&&o(e,_)))break;e=e[_]}return g||++c!=f?g:(f=e==null?0:e.length,!!f&&is(f)&&Kn(_,f)&&(q(e)||li(e)))}function Jy(e){var r=e.length,o=new e.constructor(r);return r&&typeof e[0]=="string"&&fe.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function Jp(e){return typeof e.constructor=="function"&&!Yo(e)?Fi(Pa(e)):{}}function Qy(e,r,o){var c=e.constructor;switch(r){case Jr:return du(e);case zr:case Se:return new c(+e);case _r:return Ly(e,o);case To:case Ro:case M:case T:case N:case $:case Re:case ne:case Oe:return Dp(e,o);case yt:return new c;case Kr:case Xr:return new c(e);case Zr:return ky(e);case St:return new c;case Ti:return Fy(e)}}function eS(e,r){var o=r.length;if(!o)return e;var c=o-1;return r[c]=(o>1?"& ":"")+r[c],r=r.join(o>2?", ":" "),e.replace(Oi,`{
3
- /* [wrapped with `+r+`] */
4
- `)}function tS(e){return q(e)||li(e)||!!(rp&&e&&e[rp])}function Kn(e,r){var o=typeof e;return r=r??ze,!!r&&(o=="number"||o!="symbol"&&Sa.test(e))&&e>-1&&e%1==0&&e<r}function ct(e,r,o){if(!xe(o))return!1;var c=typeof r;return(c=="number"?dt(o)&&Kn(r,o.length):c=="string"&&r in o)?rn(o[r],e):!1}function Eu(e,r){if(q(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||bt(e)?!0:ti.test(e)||!yr.test(e)||r!=null&&e in me(r)}function nS(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Cu(e){var r=Xa(e),o=d[r];if(typeof o!="function"||!(r in te.prototype))return!1;if(e===o)return!0;var c=yu(o);return!!c&&e===c[0]}function rS(e){return!!Qf&&Qf in e}var iS=xa?Zn:Uu;function Yo(e){var r=e&&e.constructor,o=typeof r=="function"&&r.prototype||Bi;return e===o}function Qp(e){return e===e&&!xe(e)}function ed(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==t||e in me(o))}}function oS(e){var r=ns(e,function(c){return o.size===p&&o.clear(),c}),o=r.cache;return r}function aS(e,r){var o=e[1],c=r[1],f=o|c,g=f<(L|Y|Ne),_=c==Ne&&o==X||c==Ne&&o==Me&&e[7].length<=r[8]||c==(Ne|Me)&&r[7].length<=r[8]&&o==X;if(!(g||_))return e;c&L&&(e[2]=r[2],f|=o&L?0:ce);var y=r[3];if(y){var C=e[3];e[3]=C?Lp(C,y,r[4]):y,e[4]=C?Cr(e[3],m):r[4]}return y=r[5],y&&(C=e[5],e[5]=C?kp(C,y,r[6]):y,e[6]=C?Cr(e[5],m):r[6]),y=r[7],y&&(e[7]=y),c&Ne&&(e[8]=e[8]==null?r[8]:tt(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=f,e}function sS(e){var r=[];if(e!=null)for(var o in me(e))r.push(o);return r}function cS(e){return Oa.call(e)}function td(e,r,o){return r=He(r===t?e.length-1:r,0),function(){for(var c=arguments,f=-1,g=He(c.length-r,0),_=b(g);++f<g;)_[f]=c[r+f];f=-1;for(var y=b(r+1);++f<r;)y[f]=c[f];return y[r]=o(_),vt(e,this,y)}}function nd(e,r){return r.length<2?e:si(e,Yt(r,0,-1))}function uS(e,r){for(var o=e.length,c=tt(r.length,o),f=pt(e);c--;){var g=r[c];e[c]=Kn(g,o)?f[g]:t}return e}function bu(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var rd=od(xp),Wo=T1||function(e,r){return Ve.setTimeout(e,r)},Tu=od(Ny);function id(e,r,o){var c=r+"";return Tu(e,eS(c,lS(jy(c),o)))}function od(e){var r=0,o=0;return function(){var c=O1(),f=Nt-(c-o);if(o=c,f>0){if(++r>=it)return arguments[0]}else r=0;return e.apply(t,arguments)}}function Ja(e,r){var o=-1,c=e.length,f=c-1;for(r=r===t?c:r;++o<r;){var g=au(o,f),_=e[g];e[g]=e[o],e[o]=_}return e.length=r,e}var ad=oS(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ri,function(o,c,f,g){r.push(f?g.replace(xo,"$1"):c||o)}),r});function Rn(e){if(typeof e=="string"||bt(e))return e;var r=e+"";return r=="0"&&1/e==-ye?"-0":r}function ui(e){if(e!=null){try{return Aa.call(e)}catch{}try{return e+""}catch{}}return""}function lS(e,r){return Ut(yc,function(o){var c="_."+o[0];r&o[1]&&!Ca(e,c)&&e.push(c)}),e.sort()}function sd(e){if(e instanceof te)return e.clone();var r=new Ht(e.__wrapped__,e.__chain__);return r.__actions__=pt(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function fS(e,r,o){(o?ct(e,r,o):r===t)?r=1:r=He(z(r),0);var c=e==null?0:e.length;if(!c||r<1)return[];for(var f=0,g=0,_=b(Da(c/r));f<c;)_[g++]=Yt(e,f,f+=r);return _}function pS(e){for(var r=-1,o=e==null?0:e.length,c=0,f=[];++r<o;){var g=e[r];g&&(f[c++]=g)}return f}function dS(){var e=arguments.length;if(!e)return[];for(var r=b(e-1),o=arguments[0],c=e;c--;)r[c-1]=arguments[c];return Er(q(o)?pt(o):[o],je(r,1))}var mS=J(function(e,r){return De(e)?Fo(e,je(r,1,De,!0)):[]}),gS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?Fo(e,je(r,1,De,!0),F(o,2)):[]}),hS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?Fo(e,je(r,1,De,!0),t,o):[]});function _S(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),Yt(e,r<0?0:r,c)):[]}function yS(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),r=c-r,Yt(e,0,r<0?0:r)):[]}function SS(e,r){return e&&e.length?Wa(e,F(r,3),!0,!0):[]}function vS(e,r){return e&&e.length?Wa(e,F(r,3),!0):[]}function ES(e,r,o,c){var f=e==null?0:e.length;return f?(o&&typeof o!="number"&&ct(e,r,o)&&(o=0,c=f),dy(e,r,o,c)):[]}function cd(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=o==null?0:z(o);return f<0&&(f=He(c+f,0)),ba(e,F(r,3),f)}function ud(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=c-1;return o!==t&&(f=z(o),f=o<0?He(c+f,0):tt(f,c-1)),ba(e,F(r,3),f,!0)}function ld(e){var r=e==null?0:e.length;return r?je(e,1):[]}function CS(e){var r=e==null?0:e.length;return r?je(e,ye):[]}function bS(e,r){var o=e==null?0:e.length;return o?(r=r===t?1:z(r),je(e,r)):[]}function TS(e){for(var r=-1,o=e==null?0:e.length,c={};++r<o;){var f=e[r];c[f[0]]=f[1]}return c}function fd(e){return e&&e.length?e[0]:t}function RS(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=o==null?0:z(o);return f<0&&(f=He(c+f,0)),Ni(e,r,f)}function xS(e){var r=e==null?0:e.length;return r?Yt(e,0,-1):[]}var AS=J(function(e){var r=Ce(e,fu);return r.length&&r[0]===e[0]?tu(r):[]}),OS=J(function(e){var r=Wt(e),o=Ce(e,fu);return r===Wt(o)?r=t:o.pop(),o.length&&o[0]===e[0]?tu(o,F(r,2)):[]}),IS=J(function(e){var r=Wt(e),o=Ce(e,fu);return r=typeof r=="function"?r:t,r&&o.pop(),o.length&&o[0]===e[0]?tu(o,t,r):[]});function wS(e,r){return e==null?"":x1.call(e,r)}function Wt(e){var r=e==null?0:e.length;return r?e[r-1]:t}function PS(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=c;return o!==t&&(f=z(o),f=f<0?He(c+f,0):tt(f,c-1)),r===r?l1(e,r,f):ba(e,Vf,f,!0)}function NS(e,r){return e&&e.length?Cp(e,z(r)):t}var MS=J(pd);function pd(e,r){return e&&e.length&&r&&r.length?ou(e,r):e}function DS(e,r,o){return e&&e.length&&r&&r.length?ou(e,r,F(o,2)):e}function BS(e,r,o){return e&&e.length&&r&&r.length?ou(e,r,t,o):e}var LS=zn(function(e,r){var o=e==null?0:e.length,c=jc(e,r);return Rp(e,Ce(r,function(f){return Kn(f,o)?+f:f}).sort(Bp)),c});function kS(e,r){var o=[];if(!(e&&e.length))return o;var c=-1,f=[],g=e.length;for(r=F(r,3);++c<g;){var _=e[c];r(_,c,e)&&(o.push(_),f.push(c))}return Rp(e,f),o}function Ru(e){return e==null?e:w1.call(e)}function FS(e,r,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&ct(e,r,o)?(r=0,o=c):(r=r==null?0:z(r),o=o===t?c:z(o)),Yt(e,r,o)):[]}function US(e,r){return Ya(e,r)}function GS(e,r,o){return cu(e,r,F(o,2))}function HS(e,r){var o=e==null?0:e.length;if(o){var c=Ya(e,r);if(c<o&&rn(e[c],r))return c}return-1}function $S(e,r){return Ya(e,r,!0)}function YS(e,r,o){return cu(e,r,F(o,2),!0)}function WS(e,r){var o=e==null?0:e.length;if(o){var c=Ya(e,r,!0)-1;if(rn(e[c],r))return c}return-1}function VS(e){return e&&e.length?Ap(e):[]}function qS(e,r){return e&&e.length?Ap(e,F(r,2)):[]}function zS(e){var r=e==null?0:e.length;return r?Yt(e,1,r):[]}function KS(e,r,o){return e&&e.length?(r=o||r===t?1:z(r),Yt(e,0,r<0?0:r)):[]}function ZS(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),r=c-r,Yt(e,r<0?0:r,c)):[]}function XS(e,r){return e&&e.length?Wa(e,F(r,3),!1,!0):[]}function jS(e,r){return e&&e.length?Wa(e,F(r,3)):[]}var JS=J(function(e){return xr(je(e,1,De,!0))}),QS=J(function(e){var r=Wt(e);return De(r)&&(r=t),xr(je(e,1,De,!0),F(r,2))}),e0=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,xr(je(e,1,De,!0),t,r)});function t0(e){return e&&e.length?xr(e):[]}function n0(e,r){return e&&e.length?xr(e,F(r,2)):[]}function r0(e,r){return r=typeof r=="function"?r:t,e&&e.length?xr(e,t,r):[]}function xu(e){if(!(e&&e.length))return[];var r=0;return e=vr(e,function(o){if(De(o))return r=He(o.length,r),!0}),Yc(r,function(o){return Ce(e,Gc(o))})}function dd(e,r){if(!(e&&e.length))return[];var o=xu(e);return r==null?o:Ce(o,function(c){return vt(r,t,c)})}var i0=J(function(e,r){return De(e)?Fo(e,r):[]}),o0=J(function(e){return lu(vr(e,De))}),a0=J(function(e){var r=Wt(e);return De(r)&&(r=t),lu(vr(e,De),F(r,2))}),s0=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,lu(vr(e,De),t,r)}),c0=J(xu);function u0(e,r){return Pp(e||[],r||[],ko)}function l0(e,r){return Pp(e||[],r||[],Ho)}var f0=J(function(e){var r=e.length,o=r>1?e[r-1]:t;return o=typeof o=="function"?(e.pop(),o):t,dd(e,o)});function md(e){var r=d(e);return r.__chain__=!0,r}function p0(e,r){return r(e),e}function Qa(e,r){return r(e)}var d0=zn(function(e){var r=e.length,o=r?e[0]:0,c=this.__wrapped__,f=function(g){return jc(g,e)};return r>1||this.__actions__.length||!(c instanceof te)||!Kn(o)?this.thru(f):(c=c.slice(o,+o+(r?1:0)),c.__actions__.push({func:Qa,args:[f],thisArg:t}),new Ht(c,this.__chain__).thru(function(g){return r&&!g.length&&g.push(t),g}))});function m0(){return md(this)}function g0(){return new Ht(this.value(),this.__chain__)}function h0(){this.__values__===t&&(this.__values__=Od(this.value()));var e=this.__index__>=this.__values__.length,r=e?t:this.__values__[this.__index__++];return{done:e,value:r}}function _0(){return this}function y0(e){for(var r,o=this;o instanceof Fa;){var c=sd(o);c.__index__=0,c.__values__=t,r?f.__wrapped__=c:r=c;var f=c;o=o.__wrapped__}return f.__wrapped__=e,r}function S0(){var e=this.__wrapped__;if(e instanceof te){var r=e;return this.__actions__.length&&(r=new te(this)),r=r.reverse(),r.__actions__.push({func:Qa,args:[Ru],thisArg:t}),new Ht(r,this.__chain__)}return this.thru(Ru)}function v0(){return wp(this.__wrapped__,this.__actions__)}var E0=Va(function(e,r,o){fe.call(e,o)?++e[o]:Vn(e,o,1)});function C0(e,r,o){var c=q(e)?Yf:py;return o&&ct(e,r,o)&&(r=t),c(e,F(r,3))}function b0(e,r){var o=q(e)?vr:dp;return o(e,F(r,3))}var T0=Hp(cd),R0=Hp(ud);function x0(e,r){return je(es(e,r),1)}function A0(e,r){return je(es(e,r),ye)}function O0(e,r,o){return o=o===t?1:z(o),je(es(e,r),o)}function gd(e,r){var o=q(e)?Ut:Rr;return o(e,F(r,3))}function hd(e,r){var o=q(e)?z_:pp;return o(e,F(r,3))}var I0=Va(function(e,r,o){fe.call(e,o)?e[o].push(r):Vn(e,o,[r])});function w0(e,r,o,c){e=dt(e)?e:Yi(e),o=o&&!c?z(o):0;var f=e.length;return o<0&&(o=He(f+o,0)),os(e)?o<=f&&e.indexOf(r,o)>-1:!!f&&Ni(e,r,o)>-1}var P0=J(function(e,r,o){var c=-1,f=typeof r=="function",g=dt(e)?b(e.length):[];return Rr(e,function(_){g[++c]=f?vt(r,_,o):Uo(_,r,o)}),g}),N0=Va(function(e,r,o){Vn(e,o,r)});function es(e,r){var o=q(e)?Ce:Sp;return o(e,F(r,3))}function M0(e,r,o,c){return e==null?[]:(q(r)||(r=r==null?[]:[r]),o=c?t:o,q(o)||(o=o==null?[]:[o]),bp(e,r,o))}var D0=Va(function(e,r,o){e[o?0:1].push(r)},function(){return[[],[]]});function B0(e,r,o){var c=q(e)?Fc:zf,f=arguments.length<3;return c(e,F(r,4),o,f,Rr)}function L0(e,r,o){var c=q(e)?K_:zf,f=arguments.length<3;return c(e,F(r,4),o,f,pp)}function k0(e,r){var o=q(e)?vr:dp;return o(e,rs(F(r,3)))}function F0(e){var r=q(e)?cp:wy;return r(e)}function U0(e,r,o){(o?ct(e,r,o):r===t)?r=1:r=z(r);var c=q(e)?sy:Py;return c(e,r)}function G0(e){var r=q(e)?cy:My;return r(e)}function H0(e){if(e==null)return 0;if(dt(e))return os(e)?Di(e):e.length;var r=nt(e);return r==yt||r==St?e.size:ru(e).length}function $0(e,r,o){var c=q(e)?Uc:Dy;return o&&ct(e,r,o)&&(r=t),c(e,F(r,3))}var Y0=J(function(e,r){if(e==null)return[];var o=r.length;return o>1&&ct(e,r[0],r[1])?r=[]:o>2&&ct(r[0],r[1],r[2])&&(r=[r[0]]),bp(e,je(r,1),[])}),ts=b1||function(){return Ve.Date.now()};function W0(e,r){if(typeof r!="function")throw new Gt(s);return e=z(e),function(){if(--e<1)return r.apply(this,arguments)}}function _d(e,r,o){return r=o?t:r,r=e&&r==null?e.length:r,qn(e,Ne,t,t,t,t,r)}function yd(e,r){var o;if(typeof r!="function")throw new Gt(s);return e=z(e),function(){return--e>0&&(o=r.apply(this,arguments)),e<=1&&(r=t),o}}var Au=J(function(e,r,o){var c=L;if(o.length){var f=Cr(o,Hi(Au));c|=ue}return qn(e,c,r,o,f)}),Sd=J(function(e,r,o){var c=L|Y;if(o.length){var f=Cr(o,Hi(Sd));c|=ue}return qn(r,c,e,o,f)});function vd(e,r,o){r=o?t:r;var c=qn(e,X,t,t,t,t,t,r);return c.placeholder=vd.placeholder,c}function Ed(e,r,o){r=o?t:r;var c=qn(e,H,t,t,t,t,t,r);return c.placeholder=Ed.placeholder,c}function Cd(e,r,o){var c,f,g,_,y,C,A=0,O=!1,w=!1,D=!0;if(typeof e!="function")throw new Gt(s);r=Vt(r)||0,xe(o)&&(O=!!o.leading,w="maxWait"in o,g=w?He(Vt(o.maxWait)||0,r):g,D="trailing"in o?!!o.trailing:D);function k(Be){var on=c,jn=f;return c=f=t,A=Be,_=e.apply(jn,on),_}function U(Be){return A=Be,y=Wo(Q,r),O?k(Be):_}function j(Be){var on=Be-C,jn=Be-A,Hd=r-on;return w?tt(Hd,g-jn):Hd}function G(Be){var on=Be-C,jn=Be-A;return C===t||on>=r||on<0||w&&jn>=g}function Q(){var Be=ts();if(G(Be))return re(Be);y=Wo(Q,j(Be))}function re(Be){return y=t,D&&c?k(Be):(c=f=t,_)}function Tt(){y!==t&&Np(y),A=0,c=C=f=y=t}function ut(){return y===t?_:re(ts())}function Rt(){var Be=ts(),on=G(Be);if(c=arguments,f=this,C=Be,on){if(y===t)return U(C);if(w)return Np(y),y=Wo(Q,r),k(C)}return y===t&&(y=Wo(Q,r)),_}return Rt.cancel=Tt,Rt.flush=ut,Rt}var V0=J(function(e,r){return fp(e,1,r)}),q0=J(function(e,r,o){return fp(e,Vt(r)||0,o)});function z0(e){return qn(e,Te)}function ns(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new Gt(s);var o=function(){var c=arguments,f=r?r.apply(this,c):c[0],g=o.cache;if(g.has(f))return g.get(f);var _=e.apply(this,c);return o.cache=g.set(f,_)||g,_};return o.cache=new(ns.Cache||Wn),o}ns.Cache=Wn;function rs(e){if(typeof e!="function")throw new Gt(s);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function K0(e){return yd(2,e)}var Z0=By(function(e,r){r=r.length==1&&q(r[0])?Ce(r[0],Et(F())):Ce(je(r,1),Et(F()));var o=r.length;return J(function(c){for(var f=-1,g=tt(c.length,o);++f<g;)c[f]=r[f].call(this,c[f]);return vt(e,this,c)})}),Ou=J(function(e,r){var o=Cr(r,Hi(Ou));return qn(e,ue,t,r,o)}),bd=J(function(e,r){var o=Cr(r,Hi(bd));return qn(e,de,t,r,o)}),X0=zn(function(e,r){return qn(e,Me,t,t,t,r)});function j0(e,r){if(typeof e!="function")throw new Gt(s);return r=r===t?r:z(r),J(e,r)}function J0(e,r){if(typeof e!="function")throw new Gt(s);return r=r==null?0:He(z(r),0),J(function(o){var c=o[r],f=Or(o,0,r);return c&&Er(f,c),vt(e,this,f)})}function Q0(e,r,o){var c=!0,f=!0;if(typeof e!="function")throw new Gt(s);return xe(o)&&(c="leading"in o?!!o.leading:c,f="trailing"in o?!!o.trailing:f),Cd(e,r,{leading:c,maxWait:r,trailing:f})}function ev(e){return _d(e,1)}function tv(e,r){return Ou(pu(r),e)}function nv(){if(!arguments.length)return[];var e=arguments[0];return q(e)?e:[e]}function rv(e){return $t(e,v)}function iv(e,r){return r=typeof r=="function"?r:t,$t(e,v,r)}function ov(e){return $t(e,h|v)}function av(e,r){return r=typeof r=="function"?r:t,$t(e,h|v,r)}function sv(e,r){return r==null||lp(e,r,qe(r))}function rn(e,r){return e===r||e!==e&&r!==r}var cv=Za(eu),uv=Za(function(e,r){return e>=r}),li=hp(function(){return arguments}())?hp:function(e){return Ie(e)&&fe.call(e,"callee")&&!np.call(e,"callee")},q=b.isArray,lv=kf?Et(kf):yy;function dt(e){return e!=null&&is(e.length)&&!Zn(e)}function De(e){return Ie(e)&&dt(e)}function fv(e){return e===!0||e===!1||Ie(e)&&st(e)==zr}var Ir=R1||Uu,pv=Ff?Et(Ff):Sy;function dv(e){return Ie(e)&&e.nodeType===1&&!Vo(e)}function mv(e){if(e==null)return!0;if(dt(e)&&(q(e)||typeof e=="string"||typeof e.splice=="function"||Ir(e)||$i(e)||li(e)))return!e.length;var r=nt(e);if(r==yt||r==St)return!e.size;if(Yo(e))return!ru(e).length;for(var o in e)if(fe.call(e,o))return!1;return!0}function gv(e,r){return Go(e,r)}function hv(e,r,o){o=typeof o=="function"?o:t;var c=o?o(e,r):t;return c===t?Go(e,r,t,o):!!c}function Iu(e){if(!Ie(e))return!1;var r=st(e);return r==Ci||r==Ae||typeof e.message=="string"&&typeof e.name=="string"&&!Vo(e)}function _v(e){return typeof e=="number"&&ip(e)}function Zn(e){if(!xe(e))return!1;var r=st(e);return r==bi||r==_a||r==Ke||r==vc}function Td(e){return typeof e=="number"&&e==z(e)}function is(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ze}function xe(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function Ie(e){return e!=null&&typeof e=="object"}var Rd=Uf?Et(Uf):Ey;function yv(e,r){return e===r||nu(e,r,Su(r))}function Sv(e,r,o){return o=typeof o=="function"?o:t,nu(e,r,Su(r),o)}function vv(e){return xd(e)&&e!=+e}function Ev(e){if(iS(e))throw new V(a);return _p(e)}function Cv(e){return e===null}function bv(e){return e==null}function xd(e){return typeof e=="number"||Ie(e)&&st(e)==Kr}function Vo(e){if(!Ie(e)||st(e)!=Qt)return!1;var r=Pa(e);if(r===null)return!0;var o=fe.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Aa.call(o)==S1}var wu=Gf?Et(Gf):Cy;function Tv(e){return Td(e)&&e>=-ze&&e<=ze}var Ad=Hf?Et(Hf):by;function os(e){return typeof e=="string"||!q(e)&&Ie(e)&&st(e)==Xr}function bt(e){return typeof e=="symbol"||Ie(e)&&st(e)==Ti}var $i=$f?Et($f):Ty;function Rv(e){return e===t}function xv(e){return Ie(e)&&nt(e)==jr}function Av(e){return Ie(e)&&st(e)==Cc}var Ov=Za(iu),Iv=Za(function(e,r){return e<=r});function Od(e){if(!e)return[];if(dt(e))return os(e)?tn(e):pt(e);if(No&&e[No])return s1(e[No]());var r=nt(e),o=r==yt?Vc:r==St?Ta:Yi;return o(e)}function Xn(e){if(!e)return e===0?e:0;if(e=Vt(e),e===ye||e===-ye){var r=e<0?-1:1;return r*Vr}return e===e?e:0}function z(e){var r=Xn(e),o=r%1;return r===r?o?r-o:r:0}function Id(e){return e?ai(z(e),0,at):0}function Vt(e){if(typeof e=="number")return e;if(bt(e))return Mt;if(xe(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=xe(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Kf(e);var o=Oc.test(e);return o||Oo.test(e)?W_(e.slice(2),o?2:8):Ye.test(e)?Mt:+e}function wd(e){return Tn(e,mt(e))}function wv(e){return e?ai(z(e),-ze,ze):e===0?e:0}function le(e){return e==null?"":Ct(e)}var Pv=Ui(function(e,r){if(Yo(r)||dt(r)){Tn(r,qe(r),e);return}for(var o in r)fe.call(r,o)&&ko(e,o,r[o])}),Pd=Ui(function(e,r){Tn(r,mt(r),e)}),as=Ui(function(e,r,o,c){Tn(r,mt(r),e,c)}),Nv=Ui(function(e,r,o,c){Tn(r,qe(r),e,c)}),Mv=zn(jc);function Dv(e,r){var o=Fi(e);return r==null?o:up(o,r)}var Bv=J(function(e,r){e=me(e);var o=-1,c=r.length,f=c>2?r[2]:t;for(f&&ct(r[0],r[1],f)&&(c=1);++o<c;)for(var g=r[o],_=mt(g),y=-1,C=_.length;++y<C;){var A=_[y],O=e[A];(O===t||rn(O,Bi[A])&&!fe.call(e,A))&&(e[A]=g[A])}return e}),Lv=J(function(e){return e.push(t,Kp),vt(Nd,t,e)});function kv(e,r){return Wf(e,F(r,3),bn)}function Fv(e,r){return Wf(e,F(r,3),Qc)}function Uv(e,r){return e==null?e:Jc(e,F(r,3),mt)}function Gv(e,r){return e==null?e:mp(e,F(r,3),mt)}function Hv(e,r){return e&&bn(e,F(r,3))}function $v(e,r){return e&&Qc(e,F(r,3))}function Yv(e){return e==null?[]:Ha(e,qe(e))}function Wv(e){return e==null?[]:Ha(e,mt(e))}function Pu(e,r,o){var c=e==null?t:si(e,r);return c===t?o:c}function Vv(e,r){return e!=null&&jp(e,r,my)}function Nu(e,r){return e!=null&&jp(e,r,gy)}var qv=Yp(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Oa.call(r)),e[r]=o},Du(gt)),zv=Yp(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Oa.call(r)),fe.call(e,r)?e[r].push(o):e[r]=[o]},F),Kv=J(Uo);function qe(e){return dt(e)?sp(e):ru(e)}function mt(e){return dt(e)?sp(e,!0):Ry(e)}function Zv(e,r){var o={};return r=F(r,3),bn(e,function(c,f,g){Vn(o,r(c,f,g),c)}),o}function Xv(e,r){var o={};return r=F(r,3),bn(e,function(c,f,g){Vn(o,f,r(c,f,g))}),o}var jv=Ui(function(e,r,o){$a(e,r,o)}),Nd=Ui(function(e,r,o,c){$a(e,r,o,c)}),Jv=zn(function(e,r){var o={};if(e==null)return o;var c=!1;r=Ce(r,function(g){return g=Ar(g,e),c||(c=g.length>1),g}),Tn(e,_u(e),o),c&&(o=$t(o,h|S|v,qy));for(var f=r.length;f--;)uu(o,r[f]);return o});function Qv(e,r){return Md(e,rs(F(r)))}var eE=zn(function(e,r){return e==null?{}:Ay(e,r)});function Md(e,r){if(e==null)return{};var o=Ce(_u(e),function(c){return[c]});return r=F(r),Tp(e,o,function(c,f){return r(c,f[0])})}function tE(e,r,o){r=Ar(r,e);var c=-1,f=r.length;for(f||(f=1,e=t);++c<f;){var g=e==null?t:e[Rn(r[c])];g===t&&(c=f,g=o),e=Zn(g)?g.call(e):g}return e}function nE(e,r,o){return e==null?e:Ho(e,r,o)}function rE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Ho(e,r,o,c)}var Dd=qp(qe),Bd=qp(mt);function iE(e,r,o){var c=q(e),f=c||Ir(e)||$i(e);if(r=F(r,4),o==null){var g=e&&e.constructor;f?o=c?new g:[]:xe(e)?o=Zn(g)?Fi(Pa(e)):{}:o={}}return(f?Ut:bn)(e,function(_,y,C){return r(o,_,y,C)}),o}function oE(e,r){return e==null?!0:uu(e,r)}function aE(e,r,o){return e==null?e:Ip(e,r,pu(o))}function sE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Ip(e,r,pu(o),c)}function Yi(e){return e==null?[]:Wc(e,qe(e))}function cE(e){return e==null?[]:Wc(e,mt(e))}function uE(e,r,o){return o===t&&(o=r,r=t),o!==t&&(o=Vt(o),o=o===o?o:0),r!==t&&(r=Vt(r),r=r===r?r:0),ai(Vt(e),r,o)}function lE(e,r,o){return r=Xn(r),o===t?(o=r,r=0):o=Xn(o),e=Vt(e),hy(e,r,o)}function fE(e,r,o){if(o&&typeof o!="boolean"&&ct(e,r,o)&&(r=o=t),o===t&&(typeof r=="boolean"?(o=r,r=t):typeof e=="boolean"&&(o=e,e=t)),e===t&&r===t?(e=0,r=1):(e=Xn(e),r===t?(r=e,e=0):r=Xn(r)),e>r){var c=e;e=r,r=c}if(o||e%1||r%1){var f=op();return tt(e+f*(r-e+Y_("1e-"+((f+"").length-1))),r)}return au(e,r)}var pE=Gi(function(e,r,o){return r=r.toLowerCase(),e+(o?Ld(r):r)});function Ld(e){return Mu(le(e).toLowerCase())}function kd(e){return e=le(e),e&&e.replace(Io,n1).replace(M_,"")}function dE(e,r,o){e=le(e),r=Ct(r);var c=e.length;o=o===t?c:ai(z(o),0,c);var f=o;return o-=r.length,o>=0&&e.slice(o,f)==r}function mE(e){return e=le(e),e&&Qr.test(e)?e.replace(Bt,r1):e}function gE(e){return e=le(e),e&&xi.test(e)?e.replace(Xe,"\\$&"):e}var hE=Gi(function(e,r,o){return e+(o?"-":"")+r.toLowerCase()}),_E=Gi(function(e,r,o){return e+(o?" ":"")+r.toLowerCase()}),yE=Gp("toLowerCase");function SE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;if(!r||c>=r)return e;var f=(r-c)/2;return Ka(Ba(f),o)+e+Ka(Da(f),o)}function vE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;return r&&c<r?e+Ka(r-c,o):e}function EE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;return r&&c<r?Ka(r-c,o)+e:e}function CE(e,r,o){return o||r==null?r=0:r&&(r=+r),I1(le(e).replace(en,""),r||0)}function bE(e,r,o){return(o?ct(e,r,o):r===t)?r=1:r=z(r),su(le(e),r)}function TE(){var e=arguments,r=le(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var RE=Gi(function(e,r,o){return e+(o?"_":"")+r.toLowerCase()});function xE(e,r,o){return o&&typeof o!="number"&&ct(e,r,o)&&(r=o=t),o=o===t?at:o>>>0,o?(e=le(e),e&&(typeof r=="string"||r!=null&&!wu(r))&&(r=Ct(r),!r&&Mi(e))?Or(tn(e),0,o):e.split(r,o)):[]}var AE=Gi(function(e,r,o){return e+(o?" ":"")+Mu(r)});function OE(e,r,o){return e=le(e),o=o==null?0:ai(z(o),0,e.length),r=Ct(r),e.slice(o,o+r.length)==r}function IE(e,r,o){var c=d.templateSettings;o&&ct(e,r,o)&&(r=t),e=le(e),r=as({},r,c,zp);var f=as({},r.imports,c.imports,zp),g=qe(f),_=Wc(f,g),y,C,A=0,O=r.interpolate||Sr,w="__p += '",D=qc((r.escape||Sr).source+"|"+O.source+"|"+(O===Ze?Ac:Sr).source+"|"+(r.evaluate||Sr).source+"|$","g"),k="//# sourceURL="+(fe.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++F_+"]")+`
5
- `;e.replace(D,function(G,Q,re,Tt,ut,Rt){return re||(re=Tt),w+=e.slice(A,Rt).replace(Ii,i1),Q&&(y=!0,w+=`' +
6
- __e(`+Q+`) +
7
- '`),ut&&(C=!0,w+=`';
8
- `+ut+`;
9
- __p += '`),re&&(w+=`' +
10
- ((__t = (`+re+`)) == null ? '' : __t) +
11
- '`),A=Rt+G.length,G}),w+=`';
12
- `;var U=fe.call(r,"variable")&&r.variable;if(!U)w=`with (obj) {
13
- `+w+`
14
- }
15
- `;else if(xc.test(U))throw new V(u);w=(C?w.replace(et,""):w).replace(ae,"$1").replace(ft,"$1;"),w="function("+(U||"obj")+`) {
16
- `+(U?"":`obj || (obj = {});
17
- `)+"var __t, __p = ''"+(y?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
18
- function print() { __p += __j.call(arguments, '') }
19
- `:`;
20
- `)+w+`return __p
21
- }`;var j=Ud(function(){return se(g,k+"return "+w).apply(t,_)});if(j.source=w,Iu(j))throw j;return j}function wE(e){return le(e).toLowerCase()}function PE(e){return le(e).toUpperCase()}function NE(e,r,o){if(e=le(e),e&&(o||r===t))return Kf(e);if(!e||!(r=Ct(r)))return e;var c=tn(e),f=tn(r),g=Zf(c,f),_=Xf(c,f)+1;return Or(c,g,_).join("")}function ME(e,r,o){if(e=le(e),e&&(o||r===t))return e.slice(0,Jf(e)+1);if(!e||!(r=Ct(r)))return e;var c=tn(e),f=Xf(c,tn(r))+1;return Or(c,0,f).join("")}function DE(e,r,o){if(e=le(e),e&&(o||r===t))return e.replace(en,"");if(!e||!(r=Ct(r)))return e;var c=tn(e),f=Zf(c,tn(r));return Or(c,f).join("")}function BE(e,r){var o=he,c=_e;if(xe(r)){var f="separator"in r?r.separator:f;o="length"in r?z(r.length):o,c="omission"in r?Ct(r.omission):c}e=le(e);var g=e.length;if(Mi(e)){var _=tn(e);g=_.length}if(o>=g)return e;var y=o-Di(c);if(y<1)return c;var C=_?Or(_,0,y).join(""):e.slice(0,y);if(f===t)return C+c;if(_&&(y+=C.length-y),wu(f)){if(e.slice(y).search(f)){var A,O=C;for(f.global||(f=qc(f.source,le(Ao.exec(f))+"g")),f.lastIndex=0;A=f.exec(O);)var w=A.index;C=C.slice(0,w===t?y:w)}}else if(e.indexOf(Ct(f),y)!=y){var D=C.lastIndexOf(f);D>-1&&(C=C.slice(0,D))}return C+c}function LE(e){return e=le(e),e&&Lt.test(e)?e.replace(Dt,f1):e}var kE=Gi(function(e,r,o){return e+(o?" ":"")+r.toUpperCase()}),Mu=Gp("toUpperCase");function Fd(e,r,o){return e=le(e),r=o?t:r,r===t?a1(e)?m1(e):j_(e):e.match(r)||[]}var Ud=J(function(e,r){try{return vt(e,t,r)}catch(o){return Iu(o)?o:new V(o)}}),FE=zn(function(e,r){return Ut(r,function(o){o=Rn(o),Vn(e,o,Au(e[o],e))}),e});function UE(e){var r=e==null?0:e.length,o=F();return e=r?Ce(e,function(c){if(typeof c[1]!="function")throw new Gt(s);return[o(c[0]),c[1]]}):[],J(function(c){for(var f=-1;++f<r;){var g=e[f];if(vt(g[0],this,c))return vt(g[1],this,c)}})}function GE(e){return fy($t(e,h))}function Du(e){return function(){return e}}function HE(e,r){return e==null||e!==e?r:e}var $E=$p(),YE=$p(!0);function gt(e){return e}function Bu(e){return yp(typeof e=="function"?e:$t(e,h))}function WE(e){return vp($t(e,h))}function VE(e,r){return Ep(e,$t(r,h))}var qE=J(function(e,r){return function(o){return Uo(o,e,r)}}),zE=J(function(e,r){return function(o){return Uo(e,o,r)}});function Lu(e,r,o){var c=qe(r),f=Ha(r,c);o==null&&!(xe(r)&&(f.length||!c.length))&&(o=r,r=e,e=this,f=Ha(r,qe(r)));var g=!(xe(o)&&"chain"in o)||!!o.chain,_=Zn(e);return Ut(f,function(y){var C=r[y];e[y]=C,_&&(e.prototype[y]=function(){var A=this.__chain__;if(g||A){var O=e(this.__wrapped__),w=O.__actions__=pt(this.__actions__);return w.push({func:C,args:arguments,thisArg:e}),O.__chain__=A,O}return C.apply(e,Er([this.value()],arguments))})}),e}function KE(){return Ve._===this&&(Ve._=v1),this}function ku(){}function ZE(e){return e=z(e),J(function(r){return Cp(r,e)})}var XE=mu(Ce),jE=mu(Yf),JE=mu(Uc);function Gd(e){return Eu(e)?Gc(Rn(e)):Oy(e)}function QE(e){return function(r){return e==null?t:si(e,r)}}var e2=Wp(),t2=Wp(!0);function Fu(){return[]}function Uu(){return!1}function n2(){return{}}function r2(){return""}function i2(){return!0}function o2(e,r){if(e=z(e),e<1||e>ze)return[];var o=at,c=tt(e,at);r=F(r),e-=at;for(var f=Yc(c,r);++o<e;)r(o);return f}function a2(e){return q(e)?Ce(e,Rn):bt(e)?[e]:pt(ad(le(e)))}function s2(e){var r=++y1;return le(e)+r}var c2=za(function(e,r){return e+r},0),u2=gu("ceil"),l2=za(function(e,r){return e/r},1),f2=gu("floor");function p2(e){return e&&e.length?Ga(e,gt,eu):t}function d2(e,r){return e&&e.length?Ga(e,F(r,2),eu):t}function m2(e){return qf(e,gt)}function g2(e,r){return qf(e,F(r,2))}function h2(e){return e&&e.length?Ga(e,gt,iu):t}function _2(e,r){return e&&e.length?Ga(e,F(r,2),iu):t}var y2=za(function(e,r){return e*r},1),S2=gu("round"),v2=za(function(e,r){return e-r},0);function E2(e){return e&&e.length?$c(e,gt):0}function C2(e,r){return e&&e.length?$c(e,F(r,2)):0}return d.after=W0,d.ary=_d,d.assign=Pv,d.assignIn=Pd,d.assignInWith=as,d.assignWith=Nv,d.at=Mv,d.before=yd,d.bind=Au,d.bindAll=FE,d.bindKey=Sd,d.castArray=nv,d.chain=md,d.chunk=fS,d.compact=pS,d.concat=dS,d.cond=UE,d.conforms=GE,d.constant=Du,d.countBy=E0,d.create=Dv,d.curry=vd,d.curryRight=Ed,d.debounce=Cd,d.defaults=Bv,d.defaultsDeep=Lv,d.defer=V0,d.delay=q0,d.difference=mS,d.differenceBy=gS,d.differenceWith=hS,d.drop=_S,d.dropRight=yS,d.dropRightWhile=SS,d.dropWhile=vS,d.fill=ES,d.filter=b0,d.flatMap=x0,d.flatMapDeep=A0,d.flatMapDepth=O0,d.flatten=ld,d.flattenDeep=CS,d.flattenDepth=bS,d.flip=z0,d.flow=$E,d.flowRight=YE,d.fromPairs=TS,d.functions=Yv,d.functionsIn=Wv,d.groupBy=I0,d.initial=xS,d.intersection=AS,d.intersectionBy=OS,d.intersectionWith=IS,d.invert=qv,d.invertBy=zv,d.invokeMap=P0,d.iteratee=Bu,d.keyBy=N0,d.keys=qe,d.keysIn=mt,d.map=es,d.mapKeys=Zv,d.mapValues=Xv,d.matches=WE,d.matchesProperty=VE,d.memoize=ns,d.merge=jv,d.mergeWith=Nd,d.method=qE,d.methodOf=zE,d.mixin=Lu,d.negate=rs,d.nthArg=ZE,d.omit=Jv,d.omitBy=Qv,d.once=K0,d.orderBy=M0,d.over=XE,d.overArgs=Z0,d.overEvery=jE,d.overSome=JE,d.partial=Ou,d.partialRight=bd,d.partition=D0,d.pick=eE,d.pickBy=Md,d.property=Gd,d.propertyOf=QE,d.pull=MS,d.pullAll=pd,d.pullAllBy=DS,d.pullAllWith=BS,d.pullAt=LS,d.range=e2,d.rangeRight=t2,d.rearg=X0,d.reject=k0,d.remove=kS,d.rest=j0,d.reverse=Ru,d.sampleSize=U0,d.set=nE,d.setWith=rE,d.shuffle=G0,d.slice=FS,d.sortBy=Y0,d.sortedUniq=VS,d.sortedUniqBy=qS,d.split=xE,d.spread=J0,d.tail=zS,d.take=KS,d.takeRight=ZS,d.takeRightWhile=XS,d.takeWhile=jS,d.tap=p0,d.throttle=Q0,d.thru=Qa,d.toArray=Od,d.toPairs=Dd,d.toPairsIn=Bd,d.toPath=a2,d.toPlainObject=wd,d.transform=iE,d.unary=ev,d.union=JS,d.unionBy=QS,d.unionWith=e0,d.uniq=t0,d.uniqBy=n0,d.uniqWith=r0,d.unset=oE,d.unzip=xu,d.unzipWith=dd,d.update=aE,d.updateWith=sE,d.values=Yi,d.valuesIn=cE,d.without=i0,d.words=Fd,d.wrap=tv,d.xor=o0,d.xorBy=a0,d.xorWith=s0,d.zip=c0,d.zipObject=u0,d.zipObjectDeep=l0,d.zipWith=f0,d.entries=Dd,d.entriesIn=Bd,d.extend=Pd,d.extendWith=as,Lu(d,d),d.add=c2,d.attempt=Ud,d.camelCase=pE,d.capitalize=Ld,d.ceil=u2,d.clamp=uE,d.clone=rv,d.cloneDeep=ov,d.cloneDeepWith=av,d.cloneWith=iv,d.conformsTo=sv,d.deburr=kd,d.defaultTo=HE,d.divide=l2,d.endsWith=dE,d.eq=rn,d.escape=mE,d.escapeRegExp=gE,d.every=C0,d.find=T0,d.findIndex=cd,d.findKey=kv,d.findLast=R0,d.findLastIndex=ud,d.findLastKey=Fv,d.floor=f2,d.forEach=gd,d.forEachRight=hd,d.forIn=Uv,d.forInRight=Gv,d.forOwn=Hv,d.forOwnRight=$v,d.get=Pu,d.gt=cv,d.gte=uv,d.has=Vv,d.hasIn=Nu,d.head=fd,d.identity=gt,d.includes=w0,d.indexOf=RS,d.inRange=lE,d.invoke=Kv,d.isArguments=li,d.isArray=q,d.isArrayBuffer=lv,d.isArrayLike=dt,d.isArrayLikeObject=De,d.isBoolean=fv,d.isBuffer=Ir,d.isDate=pv,d.isElement=dv,d.isEmpty=mv,d.isEqual=gv,d.isEqualWith=hv,d.isError=Iu,d.isFinite=_v,d.isFunction=Zn,d.isInteger=Td,d.isLength=is,d.isMap=Rd,d.isMatch=yv,d.isMatchWith=Sv,d.isNaN=vv,d.isNative=Ev,d.isNil=bv,d.isNull=Cv,d.isNumber=xd,d.isObject=xe,d.isObjectLike=Ie,d.isPlainObject=Vo,d.isRegExp=wu,d.isSafeInteger=Tv,d.isSet=Ad,d.isString=os,d.isSymbol=bt,d.isTypedArray=$i,d.isUndefined=Rv,d.isWeakMap=xv,d.isWeakSet=Av,d.join=wS,d.kebabCase=hE,d.last=Wt,d.lastIndexOf=PS,d.lowerCase=_E,d.lowerFirst=yE,d.lt=Ov,d.lte=Iv,d.max=p2,d.maxBy=d2,d.mean=m2,d.meanBy=g2,d.min=h2,d.minBy=_2,d.stubArray=Fu,d.stubFalse=Uu,d.stubObject=n2,d.stubString=r2,d.stubTrue=i2,d.multiply=y2,d.nth=NS,d.noConflict=KE,d.noop=ku,d.now=ts,d.pad=SE,d.padEnd=vE,d.padStart=EE,d.parseInt=CE,d.random=fE,d.reduce=B0,d.reduceRight=L0,d.repeat=bE,d.replace=TE,d.result=tE,d.round=S2,d.runInContext=E,d.sample=F0,d.size=H0,d.snakeCase=RE,d.some=$0,d.sortedIndex=US,d.sortedIndexBy=GS,d.sortedIndexOf=HS,d.sortedLastIndex=$S,d.sortedLastIndexBy=YS,d.sortedLastIndexOf=WS,d.startCase=AE,d.startsWith=OE,d.subtract=v2,d.sum=E2,d.sumBy=C2,d.template=IE,d.times=o2,d.toFinite=Xn,d.toInteger=z,d.toLength=Id,d.toLower=wE,d.toNumber=Vt,d.toSafeInteger=wv,d.toString=le,d.toUpper=PE,d.trim=NE,d.trimEnd=ME,d.trimStart=DE,d.truncate=BE,d.unescape=LE,d.uniqueId=s2,d.upperCase=kE,d.upperFirst=Mu,d.each=gd,d.eachRight=hd,d.first=fd,Lu(d,function(){var e={};return bn(d,function(r,o){fe.call(d.prototype,o)||(e[o]=r)}),e}(),{chain:!1}),d.VERSION=n,Ut(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Ut(["drop","take"],function(e,r){te.prototype[e]=function(o){o=o===t?1:He(z(o),0);var c=this.__filtered__&&!r?new te(this):this.clone();return c.__filtered__?c.__takeCount__=tt(o,c.__takeCount__):c.__views__.push({size:tt(o,at),type:e+(c.__dir__<0?"Right":"")}),c},te.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),Ut(["filter","map","takeWhile"],function(e,r){var o=r+1,c=o==ot||o==oe;te.prototype[e]=function(f){var g=this.clone();return g.__iteratees__.push({iteratee:F(f,3),type:o}),g.__filtered__=g.__filtered__||c,g}}),Ut(["head","last"],function(e,r){var o="take"+(r?"Right":"");te.prototype[e]=function(){return this[o](1).value()[0]}}),Ut(["initial","tail"],function(e,r){var o="drop"+(r?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[o](1)}}),te.prototype.compact=function(){return this.filter(gt)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=J(function(e,r){return typeof e=="function"?new te(this):this.map(function(o){return Uo(o,e,r)})}),te.prototype.reject=function(e){return this.filter(rs(F(e)))},te.prototype.slice=function(e,r){e=z(e);var o=this;return o.__filtered__&&(e>0||r<0)?new te(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),r!==t&&(r=z(r),o=r<0?o.dropRight(-r):o.take(r-e)),o)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(at)},bn(te.prototype,function(e,r){var o=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),f=d[c?"take"+(r=="last"?"Right":""):r],g=c||/^find/.test(r);f&&(d.prototype[r]=function(){var _=this.__wrapped__,y=c?[1]:arguments,C=_ instanceof te,A=y[0],O=C||q(_),w=function(Q){var re=f.apply(d,Er([Q],y));return c&&D?re[0]:re};O&&o&&typeof A=="function"&&A.length!=1&&(C=O=!1);var D=this.__chain__,k=!!this.__actions__.length,U=g&&!D,j=C&&!k;if(!g&&O){_=j?_:new te(this);var G=e.apply(_,y);return G.__actions__.push({func:Qa,args:[w],thisArg:t}),new Ht(G,D)}return U&&j?e.apply(this,y):(G=this.thru(w),U?c?G.value()[0]:G.value():G)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(e){var r=Ra[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var f=arguments;if(c&&!this.__chain__){var g=this.value();return r.apply(q(g)?g:[],f)}return this[o](function(_){return r.apply(q(_)?_:[],f)})}}),bn(te.prototype,function(e,r){var o=d[r];if(o){var c=o.name+"";fe.call(ki,c)||(ki[c]=[]),ki[c].push({name:r,func:o})}}),ki[qa(t,Y).name]=[{name:"wrapper",func:t}],te.prototype.clone=L1,te.prototype.reverse=k1,te.prototype.value=F1,d.prototype.at=d0,d.prototype.chain=m0,d.prototype.commit=g0,d.prototype.next=h0,d.prototype.plant=y0,d.prototype.reverse=S0,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=v0,d.prototype.first=d.prototype.head,No&&(d.prototype[No]=_0),d},br=g1();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ve._=br,define(function(){return br})):ni?((ni.exports=br)._=br,Bc._=br):Ve._=br}).call(Eo)});var g_=cs((Co,m_)=>{"use strict";var m3=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},vi=m3();m_.exports=Co=vi.fetch;vi.fetch&&(Co.default=vi.fetch.bind(vi));Co.Headers=vi.Headers;Co.Request=vi.Request;Co.Response=vi.Response});var C3={};Gu(C3,{CabinClassMap:()=>v3,DuffelAncillaries:()=>ET,DuffelPayments:()=>BT,PassengerTypeMap:()=>E3,PlacesLookup:()=>_3,ShowData:()=>S3});module.exports=O2(C3);var Yd=Object.prototype.toString;function qo(t){switch(Yd.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return qt(t,Error)}}function Wi(t,n){return Yd.call(t)===`[object ${n}]`}function zo(t){return Wi(t,"ErrorEvent")}function us(t){return Wi(t,"DOMError")}function Hu(t){return Wi(t,"DOMException")}function ht(t){return Wi(t,"String")}function Vi(t){return t===null||typeof t!="object"&&typeof t!="function"}function an(t){return Wi(t,"Object")}function qi(t){return typeof Event<"u"&&qt(t,Event)}function $u(t){return typeof Element<"u"&&qt(t,Element)}function Yu(t){return Wi(t,"RegExp")}function fi(t){return!!(t&&t.then&&typeof t.then=="function")}function Wu(t){return an(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Ko(t){return typeof t=="number"&&t!==t}function qt(t,n){try{return t instanceof n}catch{return!1}}function ls(t){return t&&t.Math==Math?t:void 0}var Le=typeof globalThis=="object"&&ls(globalThis)||typeof window=="object"&&ls(window)||typeof self=="object"&&ls(self)||typeof global=="object"&&ls(global)||function(){return this}()||{};function sn(){return Le}function pi(t,n,i){let a=i||Le,s=a.__SENTRY__=a.__SENTRY__||{};return s[t]||(s[t]=n())}var fs=sn(),I2=80;function xn(t,n={}){try{let i=t,a=5,s=[],u=0,l=0,p=" > ",m=p.length,h,S=Array.isArray(n)?n:n.keyAttrs,v=!Array.isArray(n)&&n.maxStringLength||I2;for(;i&&u++<a&&(h=w2(i,S),!(h==="html"||u>1&&l+s.length*m+h.length>=v));)s.push(h),l+=h.length,i=i.parentNode;return s.reverse().join(p)}catch{return"<unknown>"}}function w2(t,n){let i=t,a=[],s,u,l,p,m;if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase());let h=n&&n.length?n.filter(v=>i.getAttribute(v)).map(v=>[v,i.getAttribute(v)]):null;if(h&&h.length)h.forEach(v=>{a.push(`[${v[0]}="${v[1]}"]`)});else if(i.id&&a.push(`#${i.id}`),s=i.className,s&&ht(s))for(u=s.split(/\s+/),m=0;m<u.length;m++)a.push(`.${u[m]}`);let S=["aria-label","type","name","title","alt"];for(m=0;m<S.length;m++)l=S[m],p=i.getAttribute(l),p&&a.push(`[${l}="${p}"]`);return a.join("")}function Vu(){try{return fs.document.location.href}catch{return""}}function qu(t){return fs.document&&fs.document.querySelector?fs.document.querySelector(t):null}var P2="Sentry Logger ",zi=["debug","info","warn","error","log","assert","trace"];function ps(t){if(!("console"in Le))return t();let n=Le.console,i={};zi.forEach(a=>{let s=n[a]&&n[a].__sentry_original__;a in n&&s&&(i[a]=n[a],n[a]=s)});try{return t()}finally{Object.keys(i).forEach(a=>{n[a]=i[a]})}}function Wd(){let t=!1,n={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zi.forEach(i=>{n[i]=(...a)=>{t&&ps(()=>{Le.console[i](`${P2}[${i}]:`,...a)})}}):zi.forEach(i=>{n[i]=()=>{}}),n}var x;typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?x=pi("logger",Wd):x=Wd();var N2=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function M2(t){return t==="http"||t==="https"}function An(t,n=!1){let{host:i,path:a,pass:s,port:u,projectId:l,protocol:p,publicKey:m}=t;return`${p}://${m}${n&&s?`:${s}`:""}@${i}${u?`:${u}`:""}/${a&&`${a}/`}${l}`}function Vd(t){let n=N2.exec(t);if(!n){console.error(`Invalid Sentry Dsn: ${t}`);return}let[i,a,s="",u,l="",p]=n.slice(1),m="",h=p,S=h.split("/");if(S.length>1&&(m=S.slice(0,-1).join("/"),h=S.pop()),h){let v=h.match(/^\d+/);v&&(h=v[0])}return qd({host:u,pass:s,path:m,projectId:h,port:l,protocol:i,publicKey:a})}function qd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function D2(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:n,projectId:i,protocol:a}=t;return["protocol","publicKey","host","projectId"].find(l=>t[l]?!1:(x.error(`Invalid Sentry Dsn: ${l} missing`),!0))?!1:i.match(/^\d+$/)?M2(a)?n&&isNaN(parseInt(n,10))?(x.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(x.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(x.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function ds(t){let n=typeof t=="string"?Vd(t):qd(t);if(!(!n||!D2(n)))return n}var Je=class extends Error{constructor(n,i="warn"){super(n),this.message=n,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=i}};function wr(t,n=0){return typeof t!="string"||n===0||t.length<=n?t:`${t.slice(0,n)}...`}function ms(t,n){if(!Array.isArray(t))return"";let i=[];for(let a=0;a<t.length;a++){let s=t[a];try{i.push(String(s))}catch{i.push("[value cannot be serialized]")}}return i.join(n)}function zd(t,n,i=!1){return ht(t)?Yu(n)?n.test(t):ht(n)?i?t===n:t.includes(n):!1:!1}function Pr(t,n=[],i=!1){return n.some(a=>zd(t,a,i))}function ke(t,n,i){if(!(n in t))return;let a=t[n],s=i(a);if(typeof s=="function")try{gs(s,a)}catch{}t[n]=s}function Ki(t,n,i){Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0})}function gs(t,n){let i=n.prototype||{};t.prototype=n.prototype=i,Ki(t,"__sentry_original__",n)}function di(t){return t.__sentry_original__}function Ku(t){return Object.keys(t).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(t[n])}`).join("&")}function hs(t){if(qo(t))return{message:t.message,name:t.name,stack:t.stack,...Zd(t)};if(qi(t)){let n={type:t.type,target:Kd(t.target),currentTarget:Kd(t.currentTarget),...Zd(t)};return typeof CustomEvent<"u"&&qt(t,CustomEvent)&&(n.detail=t.detail),n}else return t}function Kd(t){try{return $u(t)?xn(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Zd(t){if(typeof t=="object"&&t!==null){let n={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}else return{}}function Zu(t,n=40){let i=Object.keys(hs(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=n)return wr(i[0],n);for(let a=i.length;a>0;a--){let s=i.slice(0,a).join(", ");if(!(s.length>n))return a===i.length?s:wr(s,n)}return""}function xt(t){return zu(t,new Map)}function zu(t,n){if(an(t)){let i=n.get(t);if(i!==void 0)return i;let a={};n.set(t,a);for(let s of Object.keys(t))typeof t[s]<"u"&&(a[s]=zu(t[s],n));return a}if(Array.isArray(t)){let i=n.get(t);if(i!==void 0)return i;let a=[];return n.set(t,a),t.forEach(s=>{a.push(zu(s,n))}),a}return t}var jd=50,Xd=/\(error: (.*)\)/;function _s(...t){let n=t.sort((i,a)=>i[0]-a[0]).map(i=>i[1]);return(i,a=0)=>{let s=[],u=i.split(`
22
- `);for(let l=a;l<u.length;l++){let p=u[l];if(p.length>1024)continue;let m=Xd.test(p)?p.replace(Xd,"$1"):p;if(!m.match(/\S*Error: /)){for(let h of n){let S=h(m);if(S){s.push(S);break}}if(s.length>=jd)break}}return Jd(s)}}function ju(t){return Array.isArray(t)?_s(...t):t}function Jd(t){if(!t.length)return[];let n=t.slice(0,jd),i=n[n.length-1].function;i&&/sentryWrapped/.test(i)&&n.pop(),n.reverse();let a=n[n.length-1].function;return a&&/captureMessage|captureException/.test(a)&&n.pop(),n.map(s=>({...s,filename:s.filename||n[n.length-1].filename,function:s.function||"?"}))}var Xu="<anonymous>";function zt(t){try{return!t||typeof t!="function"?Xu:t.name||Xu}catch{return Xu}}var Ju=sn();function ys(){if(!("fetch"in Ju))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zo(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Qu(){if(!ys())return!1;if(Zo(Ju.fetch))return!0;let t=!1,n=Ju.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(t=Zo(i.contentWindow.fetch)),n.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}var Ss=sn();function Qd(){let t=Ss.chrome,n=t&&t.app&&t.app.runtime,i="history"in Ss&&!!Ss.history.pushState&&!!Ss.history.replaceState;return!n&&i}var be=sn(),Jn="__sentry_xhr_v2__",Xo={},em={};function B2(t){if(!em[t])switch(em[t]=!0,t){case"console":L2();break;case"dom":Y2();break;case"xhr":F2();break;case"fetch":k2();break;case"history":U2();break;case"error":W2();break;case"unhandledrejection":V2();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("unknown instrumentation type:",t);return}}function Fe(t,n){Xo[t]=Xo[t]||[],Xo[t].push(n),B2(t)}function cn(t,n){if(!(!t||!Xo[t]))for(let i of Xo[t]||[])try{i(n)}catch(a){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Error while triggering instrumentation handler.
1
+ "use strict";var sd=Object.create;var hn=Object.defineProperty;var cd=Object.getOwnPropertyDescriptor;var ld=Object.getOwnPropertyNames;var dd=Object.getPrototypeOf,ud=Object.prototype.hasOwnProperty;var Qi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),To=(t,e)=>{for(var r in e)hn(t,r,{get:e[r],enumerable:!0})},ea=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ld(e))!ud.call(t,o)&&o!==r&&hn(t,o,{get:()=>e[o],enumerable:!(n=cd(e,o))||n.enumerable});return t};var A=(t,e,r)=>(r=t!=null?sd(dd(t)):{},ea(e||!t||!t.__esModule?hn(r,"default",{value:t,enumerable:!0}):r,t)),fd=t=>ea(hn({},"__esModule",{value:!0}),t);var Pe=Qi((Xy,ro)=>{(function(){"use strict";var t={}.hasOwnProperty,e="[native code]";function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var c in i)t.call(i,c)&&i[c]&&n.push(c)}}}return n.join(" ")}typeof ro<"u"&&ro.exports?(r.default=r,ro.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()});var bl=Qi((So,vl)=>{(function(t,e){typeof So=="object"&&typeof vl<"u"?e(So,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],e):(t=t||self,e(t.ReactStripe={},t.React))})(So,function(t,e){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function r(_,f){var g=Object.keys(_);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(_);f&&(E=E.filter(function(Y){return Object.getOwnPropertyDescriptor(_,Y).enumerable})),g.push.apply(g,E)}return g}function n(_){for(var f=1;f<arguments.length;f++){var g=arguments[f]!=null?arguments[f]:{};f%2?r(Object(g),!0).forEach(function(E){i(_,E,g[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(g)):r(Object(g)).forEach(function(E){Object.defineProperty(_,E,Object.getOwnPropertyDescriptor(g,E))})}return _}function o(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(f){return typeof f}:o=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},o(_)}function i(_,f,g){return f in _?Object.defineProperty(_,f,{value:g,enumerable:!0,configurable:!0,writable:!0}):_[f]=g,_}function a(_,f){return s(_)||c(_,f)||l(_,f)||d()}function s(_){if(Array.isArray(_))return _}function c(_,f){var g=_&&(typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"]);if(g!=null){var E=[],Y=!0,x=!1,V,re;try{for(g=g.call(_);!(Y=(V=g.next()).done)&&(E.push(V.value),!(f&&E.length===f));Y=!0);}catch(O){x=!0,re=O}finally{try{!Y&&g.return!=null&&g.return()}finally{if(x)throw re}}return E}}function l(_,f){if(_){if(typeof _=="string")return u(_,f);var g=Object.prototype.toString.call(_).slice(8,-1);if(g==="Object"&&_.constructor&&(g=_.constructor.name),g==="Map"||g==="Set")return Array.from(_);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return u(_,f)}}function u(_,f){(f==null||f>_.length)&&(f=_.length);for(var g=0,E=new Array(f);g<f;g++)E[g]=_[g];return E}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,f){return f={exports:{}},_(f,f.exports),f.exports}var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",S=h;function y(){}function D(){}D.resetWarningCache=y;var P=function(){function _(E,Y,x,V,re,O){if(O!==S){var me=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw me.name="Invariant Violation",me}}_.isRequired=_;function f(){return _}var g={array:_,bool:_,func:_,number:_,object:_,string:_,symbol:_,any:_,arrayOf:f,element:_,elementType:_,instanceOf:f,node:_,objectOf:f,oneOf:f,oneOfType:f,shape:f,exact:f,checkPropTypes:D,resetWarningCache:y};return g.PropTypes=g,g},b=m(function(_){_.exports=P()}),ce=function(f){var g=e.useRef(f);return e.useEffect(function(){g.current=f},[f]),g.current},j=function(f){return f!==null&&o(f)==="object"},qe=function(f){return j(f)&&typeof f.then=="function"},ye=function(f){return j(f)&&typeof f.elements=="function"&&typeof f.createToken=="function"&&typeof f.createPaymentMethod=="function"&&typeof f.confirmCardPayment=="function"},Yt="[object Object]",K=function _(f,g){if(!j(f)||!j(g))return f===g;var E=Array.isArray(f),Y=Array.isArray(g);if(E!==Y)return!1;var x=Object.prototype.toString.call(f)===Yt,V=Object.prototype.toString.call(g)===Yt;if(x!==V)return!1;if(!x&&!E)return f===g;var re=Object.keys(f),O=Object.keys(g);if(re.length!==O.length)return!1;for(var me={},ze=0;ze<re.length;ze+=1)me[re[ze]]=!0;for(var Ze=0;Ze<O.length;Ze+=1)me[O[Ze]]=!0;var De=Object.keys(me);if(De.length!==re.length)return!1;var Ir=f,Nr=g,we=function(Vt){return _(Ir[Vt],Nr[Vt])};return De.every(we)},X=function(f,g,E){return j(f)?Object.keys(f).reduce(function(Y,x){var V=!j(g)||!K(f[x],g[x]);return E.includes(x)?(V&&console.warn("Unsupported prop change: options.".concat(x," is not a mutable property.")),Y):V?n(n({},Y||{}),{},i({},x,f[x])):Y},null):null},Me="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",$t=function(f){if(f===null||ye(f))return f;throw new Error(Me)},xr=function(f){if(qe(f))return{tag:"async",stripePromise:Promise.resolve(f).then($t)};var g=$t(f);return g===null?{tag:"empty"}:{tag:"sync",stripe:g}},dn=e.createContext(null);dn.displayName="ElementsContext";var k=function(f,g){if(!f)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return f},le=e.createContext(null);le.displayName="CartElementContext";var Or=function(f,g){if(!f)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(g," in an <Elements> provider."));return f},Pr=function(f){var g=f.stripe,E=f.options,Y=f.children,x=e.useMemo(function(){return xr(g)},[g]),V=e.useState(null),re=a(V,2),O=re[0],me=re[1],ze=e.useState(null),Ze=a(ze,2),De=Ze[0],Ir=Ze[1],Nr=e.useState(function(){return{stripe:x.tag==="sync"?x.stripe:null,elements:x.tag==="sync"?x.stripe.elements(E):null}}),we=a(Nr,2),ne=we[0],Vt=we[1];e.useEffect(function(){var de=!0,pn=function(mn){Vt(function(gn){return gn.stripe?gn:{stripe:mn,elements:mn.elements(E)}})};return x.tag==="async"&&!ne.stripe?x.stripePromise.then(function(Nt){Nt&&de&&pn(Nt)}):x.tag==="sync"&&!ne.stripe&&pn(x.stripe),function(){de=!1}},[x,ne,E]);var Ar=ce(g);e.useEffect(function(){Ar!==null&&Ar!==g&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[Ar,g]);var fn=ce(E);return e.useEffect(function(){if(ne.elements){var de=X(E,fn,["clientSecret","fonts"]);de&&ne.elements.update(de)}},[E,fn,ne.elements]),e.useEffect(function(){var de=ne.stripe;!de||!de._registerWrapper||!de.registerAppInfo||(de._registerWrapper({name:"react-stripe-js",version:"2.1.0"}),de.registerAppInfo({name:"react-stripe-js",version:"2.1.0",url:"https://stripe.com/docs/stripe-js/react"}))},[ne.stripe]),e.createElement(dn.Provider,{value:ne},e.createElement(le.Provider,{value:{cart:O,setCart:me,cartState:De,setCartState:Ir}},Y))};Pr.propTypes={stripe:b.any,options:b.object};var It=function(f){var g=e.useContext(dn);return k(g,f)},un=function(f){var g=e.useContext(le);return Or(g,f)},Pl=function(){var f=It("calls useElements()"),g=f.elements;return g},Il=function(){var f=It("calls useStripe()"),g=f.stripe;return g},Nl=function(){var f=un("calls useCartElement()"),g=f.cart;return g},Al=function(){var f=un("calls useCartElementState()"),g=f.cartState;return g},zi=function(f){var g=f.children,E=It("mounts <ElementsConsumer>");return g(E)};zi.propTypes={children:b.func.isRequired};var J=function(f,g,E){var Y=!!E,x=e.useRef(E);e.useEffect(function(){x.current=E},[E]),e.useEffect(function(){if(!Y||!f)return function(){};var V=function(){x.current&&x.current.apply(x,arguments)};return f.on(g,V),function(){f.off(g,V)}},[Y,g,f,x])},Ml=function(f){return f.charAt(0).toUpperCase()+f.slice(1)},B=function(f,g){var E="".concat(Ml(f),"Element"),Y=function(O){var me=O.id,ze=O.className,Ze=O.options,De=Ze===void 0?{}:Ze,Ir=O.onBlur,Nr=O.onFocus,we=O.onReady,ne=O.onChange,Vt=O.onEscape,Ar=O.onClick,fn=O.onLoadError,de=O.onLoaderStart,pn=O.onNetworksChange,Nt=O.onCheckout,mn=O.onLineItemClick,gn=O.onConfirm,Ql=O.onCancel,ed=O.onShippingAddressChange,td=O.onShippingRateChange,rd=It("mounts <".concat(E,">")),Eo=rd.elements,nd=e.useState(null),Zi=a(nd,2),q=Zi[0],od=Zi[1],At=e.useRef(null),vo=e.useRef(null),Ki=un("mounts <".concat(E,">")),bo=Ki.setCart,Co=Ki.setCartState;J(q,"blur",Ir),J(q,"focus",Nr),J(q,"escape",Vt),J(q,"click",Ar),J(q,"loaderror",fn),J(q,"loaderstart",de),J(q,"networkschange",pn),J(q,"lineitemclick",mn),J(q,"confirm",gn),J(q,"cancel",Ql),J(q,"shippingaddresschange",ed),J(q,"shippingratechange",td);var _n;f==="cart"?_n=function(Ji){Co(Ji),we&&we(Ji)}:we&&(f==="expressCheckout"?_n=we:_n=function(){we(q)}),J(q,"ready",_n);var id=f==="cart"?function(Q){Co(Q),ne&&ne(Q)}:ne;J(q,"change",id);var ad=f==="cart"?function(Q){Co(Q),Nt&&Nt(Q)}:Nt;J(q,"checkout",ad),e.useLayoutEffect(function(){if(At.current===null&&Eo&&vo.current!==null){var Q=Eo.create(f,De);f==="cart"&&bo&&bo(Q),At.current=Q,od(Q),Q.mount(vo.current)}},[Eo,De,bo]);var Xi=ce(De);return e.useEffect(function(){if(At.current){var Q=X(De,Xi,["paymentRequest"]);Q&&At.current.update(Q)}},[De,Xi]),e.useLayoutEffect(function(){return function(){At.current&&(At.current.destroy(),At.current=null)}},[]),e.createElement("div",{id:me,className:ze,ref:vo})},x=function(O){It("mounts <".concat(E,">")),un("mounts <".concat(E,">"));var me=O.id,ze=O.className;return e.createElement("div",{id:me,className:ze})},V=g?x:Y;return V.propTypes={id:b.string,className:b.string,onChange:b.func,onBlur:b.func,onFocus:b.func,onReady:b.func,onEscape:b.func,onClick:b.func,onLoadError:b.func,onLoaderStart:b.func,onNetworksChange:b.func,onCheckout:b.func,onLineItemClick:b.func,onConfirm:b.func,onCancel:b.func,onShippingAddressChange:b.func,onShippingRateChange:b.func,options:b.object},V.displayName=E,V.__elementType=f,V},F=typeof window>"u",Dl=B("auBankAccount",F),wl=B("card",F),kl=B("cardNumber",F),Bl=B("cardExpiry",F),Fl=B("cardCvc",F),Ll=B("fpxBank",F),Hl=B("iban",F),Ul=B("idealBank",F),Gl=B("p24Bank",F),Yl=B("epsBank",F),$l=B("payment",F),Vl=B("expressCheckout",F),Wl=B("paymentRequestButton",F),jl=B("linkAuthentication",F),ql=B("address",F),zl=B("shippingAddress",F),Zl=B("cart",F),Kl=B("paymentMethodMessaging",F),Xl=B("affirmMessage",F),Jl=B("afterpayClearpayMessage",F);t.AddressElement=ql,t.AffirmMessageElement=Xl,t.AfterpayClearpayMessageElement=Jl,t.AuBankAccountElement=Dl,t.CardCvcElement=Fl,t.CardElement=wl,t.CardExpiryElement=Bl,t.CardNumberElement=kl,t.CartElement=Zl,t.Elements=Pr,t.ElementsConsumer=zi,t.EpsBankElement=Yl,t.ExpressCheckoutElement=Vl,t.FpxBankElement=Ll,t.IbanElement=Hl,t.IdealBankElement=Ul,t.LinkAuthenticationElement=jl,t.P24BankElement=Gl,t.PaymentElement=$l,t.PaymentMethodMessagingElement=Kl,t.PaymentRequestButtonElement=Wl,t.ShippingAddressElement=zl,t.useCartElement=Nl,t.useCartElementState=Al,t.useElements=Pl,t.useStripe=Il,Object.defineProperty(t,"__esModule",{value:!0})})});var Up={};To(Up,{CabinClassMap:()=>Lp,DuffelAncillaries:()=>Cp,DuffelPayments:()=>Fp,PassengerTypeMap:()=>Hp});module.exports=fd(Up);var ta=Object.prototype.toString;function Mr(t){switch(ta.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ue(t,Error)}}function Wt(t,e){return ta.call(t)===`[object ${e}]`}function jt(t){return Wt(t,"ErrorEvent")}function Sn(t){return Wt(t,"DOMError")}function Ro(t){return Wt(t,"DOMException")}function oe(t){return Wt(t,"String")}function qt(t){return t===null||typeof t!="object"&&typeof t!="function"}function Ee(t){return Wt(t,"Object")}function Mt(t){return typeof Event<"u"&&ue(t,Event)}function xo(t){return typeof Element<"u"&&ue(t,Element)}function Oo(t){return Wt(t,"RegExp")}function Dt(t){return!!(t&&t.then&&typeof t.then=="function")}function Po(t){return Ee(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Dr(t){return typeof t=="number"&&t!==t}function ue(t,e){try{return t instanceof e}catch{return!1}}function wr(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function ke(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function yn(t,e){if(!Array.isArray(t))return"";let r=[];for(let n=0;n<t.length;n++){let o=t[n];try{wr(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function ra(t,e,r=!1){return oe(t)?Oo(e)?e.test(t):oe(e)?r?t===e:t.includes(e):!1:!1}function _t(t,e=[],r=!1){return e.some(n=>ra(t,n,r))}function kr(t,e,r=250,n,o,i,a){if(!i.exception||!i.exception.values||!a||!ue(a.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=pd(Io(t,e,o,a.originalException,n,i.exception.values,s,0),r))}function Io(t,e,r,n,o,i,a,s){if(i.length>=r+1)return i;let c=[...i];if(ue(n[o],Error)){na(a,s);let l=t(e,n[o]),u=c.length;oa(l,o,u,s),c=Io(t,e,r,n[o],o,[l,...c],l,u)}return Array.isArray(n.errors)&&n.errors.forEach((l,u)=>{if(ue(l,Error)){na(a,s);let d=t(e,l),m=c.length;oa(d,`errors[${u}]`,m,s),c=Io(t,e,r,l,o,[d,...c],d,m)}}),c}function na(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function oa(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function pd(t,e){return t.map(r=>(r.value&&(r.value=ke(r.value,e)),r))}function En(t){return t&&t.Math==Math?t:void 0}var I=typeof globalThis=="object"&&En(globalThis)||typeof window=="object"&&En(window)||typeof self=="object"&&En(self)||typeof global=="object"&&En(global)||function(){return this}()||{};function ve(){return I}function Br(t,e,r){let n=r||I,o=n.__SENTRY__=n.__SENTRY__||{};return o[t]||(o[t]=e())}var vn=ve(),md=80;function Be(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,o=[],i=0,a=0,s=" > ",c=s.length,l,u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||md;for(;r&&i++<n&&(l=gd(r,u),!(l==="html"||i>1&&a+o.length*c+l.length>=d));)o.push(l),a+=l.length,r=r.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function gd(t,e){let r=t,n=[],o,i,a,s,c;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let l=e&&e.length?e.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),o=r.className,o&&oe(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)n.push(`.${i[c]}`);let u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],s=r.getAttribute(a),s&&n.push(`[${a}="${s}"]`);return n.join("")}function No(){try{return vn.document.location.href}catch{return""}}function Ao(t){return vn.document&&vn.document.querySelector?vn.document.querySelector(t):null}var _d="Sentry Logger ",Fr=["debug","info","warn","error","log","assert","trace"],zt={};function bn(t){if(!("console"in I))return t();let e=I.console,r={},n=Object.keys(zt);n.forEach(o=>{let i=zt[o];r[o]=e[o],e[o]=i});try{return t()}finally{n.forEach(o=>{e[o]=r[o]})}}function hd(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Fr.forEach(r=>{e[r]=(...n)=>{t&&bn(()=>{I.console[r](`${_d}[${r}]:`,...n)})}}):Fr.forEach(r=>{e[r]=()=>{}}),e}var p=hd();var Sd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function yd(t){return t==="http"||t==="https"}function Fe(t,e=!1){let{host:r,path:n,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${a}`}function ia(t){let e=Sd.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,o="",i,a="",s]=e.slice(1),c="",l=s,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let d=l.match(/^\d+/);d&&(l=d[0])}return aa({host:i,pass:o,path:c,projectId:l,port:a,protocol:r,publicKey:n})}function aa(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Ed(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(p.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:r.match(/^\d+$/)?yd(n)?e&&isNaN(parseInt(e,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Cn(t){let e=typeof t=="string"?ia(t):aa(t);if(!(!e||!Ed(e)))return e}var z=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};function L(t,e,r){if(!(e in t))return;let n=t[e],o=r(n);typeof o=="function"&&Tn(o,n),t[e]=o}function Ke(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Tn(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,Ke(t,"__sentry_original__",e)}catch{}}function wt(t){return t.__sentry_original__}function Do(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Rn(t){if(Mr(t))return{message:t.message,name:t.name,stack:t.stack,...ca(t)};if(Mt(t)){let e={type:t.type,target:sa(t.target),currentTarget:sa(t.currentTarget),...ca(t)};return typeof CustomEvent<"u"&&ue(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function sa(t){try{return xo(t)?Be(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ca(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function wo(t,e=40){let r=Object.keys(Rn(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return ke(r[0],e);for(let n=r.length;n>0;n--){let o=r.slice(0,n).join(", ");if(!(o.length>e))return n===r.length?o:ke(o,e)}return""}function ie(t){return Mo(t,new Map)}function Mo(t,e){if(Ee(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let o of Object.keys(t))typeof t[o]<"u"&&(n[o]=Mo(t[o],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(o=>{n.push(Mo(o,e))}),n}return t}function M(){let t=I,e=t.crypto||t.msCrypto,r=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>e.getRandomValues(new Uint8Array(1))[0])}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function la(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function be(t){let{message:e,event_id:r}=t;if(e)return e;let n=la(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Zt(t,e,r){let n=t.exception=t.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=r||"Error")}function Xe(t,e){let r=la(t);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...e},e&&"data"in e){let i={...o&&o.data,...e.data};r.mechanism.data=i}}function xn(t){if(t&&t.__sentry_captured__)return!0;try{Ke(t,"__sentry_captured__",!0)}catch{}return!1}function Lr(t){return Array.isArray(t)?t:[t]}var fa=50,da=/\(error: (.*)\)/,ua=/captureMessage|captureException/;function On(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let o=[],i=r.split(`
3
+ `);for(let a=n;a<i.length;a++){let s=i[a];if(s.length>1024)continue;let c=da.test(s)?s.replace(da,"$1"):s;if(!c.match(/\S*Error: /)){for(let l of e){let u=l(c);if(u){o.push(u);break}}if(o.length>=fa)break}}return pa(o)}}function Bo(t){return Array.isArray(t)?On(...t):t}function pa(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),ua.test(e[e.length-1].function||"")&&(e.pop(),ua.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,fa).map(r=>({...r,filename:r.filename||e[e.length-1].filename,function:r.function||"?"}))}var ko="<anonymous>";function ae(t){try{return!t||typeof t!="function"?ko:t.name||ko}catch{return ko}}var Fo=ve();function Pn(){if(!("fetch"in Fo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Hr(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Lo(){if(!Pn())return!1;if(Hr(Fo.fetch))return!0;let t=!1,e=Fo.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Hr(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}var In=ve();function ma(){let t=In.chrome,e=t&&t.app&&t.app.runtime,r="history"in In&&!!In.history.pushState&&!!In.history.replaceState;return!e&&r}var W=ve(),Je="__sentry_xhr_v2__",Ur={},ga={};function vd(t){if(!ga[t])switch(ga[t]=!0,t){case"console":bd();break;case"dom":va();break;case"xhr":Ea();break;case"fetch":Cd();break;case"history":Td();break;case"error":Id();break;case"unhandledrejection":Nd();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("unknown instrumentation type:",t);return}}function H(t,e){Ur[t]=Ur[t]||[],Ur[t].push(e),vd(t)}function Ce(t,e){if(!(!t||!Ur[t]))for(let r of Ur[t]||[])try{r(e)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
23
4
  Type: ${t}
24
- Name: ${zt(i)}
25
- Error:`,a)}}function L2(){"console"in be&&zi.forEach(function(t){t in be.console&&ke(be.console,t,function(n){return function(...i){cn("console",{args:i,level:t}),n&&n.apply(be.console,i)}})})}function k2(){Qu()&&ke(be,"fetch",function(t){return function(...n){let{method:i,url:a}=rm(n),s={args:n,fetchData:{method:i,url:a},startTimestamp:Date.now()};return cn("fetch",{...s}),t.apply(be,n).then(u=>(cn("fetch",{...s,endTimestamp:Date.now(),response:u}),u),u=>{throw cn("fetch",{...s,endTimestamp:Date.now(),error:u}),u})}})}function el(t,n){return!!t&&typeof t=="object"&&!!t[n]}function tm(t){return typeof t=="string"?t:t?el(t,"url")?t.url:t.toString?t.toString():"":""}function rm(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[i,a]=t;return{url:tm(i),method:el(a,"method")?String(a.method).toUpperCase():"GET"}}let n=t[0];return{url:tm(n),method:el(n,"method")?String(n.method).toUpperCase():"GET"}}function F2(){if(!("XMLHttpRequest"in be))return;let t=XMLHttpRequest.prototype;ke(t,"open",function(n){return function(...i){let a=i[1],s=this[Jn]={method:ht(i[0])?i[0].toUpperCase():i[0],url:i[1],request_headers:{}};ht(a)&&s.method==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let u=()=>{let l=this[Jn];if(l&&this.readyState===4){try{l.status_code=this.status}catch{}cn("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ke(this,"onreadystatechange",function(l){return function(...p){return u(),l.apply(this,p)}}):this.addEventListener("readystatechange",u),ke(this,"setRequestHeader",function(l){return function(...p){let[m,h]=p,S=this[Jn];return S&&(S.request_headers[m.toLowerCase()]=h),l.apply(this,p)}}),n.apply(this,i)}}),ke(t,"send",function(n){return function(...i){let a=this[Jn];return a&&i[0]!==void 0&&(a.body=i[0]),cn("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),n.apply(this,i)}})}var vs;function U2(){if(!Qd())return;let t=be.onpopstate;be.onpopstate=function(...i){let a=be.location.href,s=vs;if(vs=a,cn("history",{from:s,to:a}),t)try{return t.apply(this,i)}catch{}};function n(i){return function(...a){let s=a.length>2?a[2]:void 0;if(s){let u=vs,l=String(s);vs=l,cn("history",{from:u,to:l})}return i.apply(this,a)}}ke(be.history,"pushState",n),ke(be.history,"replaceState",n)}var G2=1e3,Es,Cs;function H2(t,n){if(!t||t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch{}return!1}function $2(t){if(t.type!=="keypress")return!1;try{let n=t.target;if(!n||!n.tagName)return!0;if(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable)return!1}catch{}return!0}function nm(t,n=!1){return i=>{if(!i||Cs===i||$2(i))return;let a=i.type==="keypress"?"input":i.type;Es===void 0?(t({event:i,name:a,global:n}),Cs=i):H2(Cs,i)&&(t({event:i,name:a,global:n}),Cs=i),clearTimeout(Es),Es=be.setTimeout(()=>{Es=void 0},G2)}}function Y2(){if(!("document"in be))return;let t=cn.bind(null,"dom"),n=nm(t,!0);be.document.addEventListener("click",n,!1),be.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(i=>{let a=be[i]&&be[i].prototype;!a||!a.hasOwnProperty||!a.hasOwnProperty("addEventListener")||(ke(a,"addEventListener",function(s){return function(u,l,p){if(u==="click"||u=="keypress")try{let m=this,h=m.__sentry_instrumentation_handlers__=m.__sentry_instrumentation_handlers__||{},S=h[u]=h[u]||{refCount:0};if(!S.handler){let v=nm(t);S.handler=v,s.call(this,u,v,p)}S.refCount++}catch{}return s.call(this,u,l,p)}}),ke(a,"removeEventListener",function(s){return function(u,l,p){if(u==="click"||u=="keypress")try{let m=this,h=m.__sentry_instrumentation_handlers__||{},S=h[u];S&&(S.refCount--,S.refCount<=0&&(s.call(this,u,S.handler,p),S.handler=void 0,delete h[u]),Object.keys(h).length===0&&delete m.__sentry_instrumentation_handlers__)}catch{}return s.call(this,u,l,p)}}))})}var bs=null;function W2(){bs=be.onerror,be.onerror=function(t,n,i,a,s){return cn("error",{column:a,error:s,line:i,msg:t,url:n}),bs&&!bs.__SENTRY_LOADER__?bs.apply(this,arguments):!1},be.onerror.__SENTRY_INSTRUMENTED__=!0}var Ts=null;function V2(){Ts=be.onunhandledrejection,be.onunhandledrejection=function(t){return cn("unhandledrejection",t),Ts&&!Ts.__SENTRY_LOADER__?Ts.apply(this,arguments):!0},be.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function im(){let t=typeof WeakSet=="function",n=t?new WeakSet:[];function i(s){if(t)return n.has(s)?!0:(n.add(s),!1);for(let u=0;u<n.length;u++)if(n[u]===s)return!0;return n.push(s),!1}function a(s){if(t)n.delete(s);else for(let u=0;u<n.length;u++)if(n[u]===s){n.splice(u,1);break}}return[i,a]}function At(){let t=Le,n=t.crypto||t.msCrypto;if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");let i=n&&n.getRandomValues?()=>n.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,a=>(a^(i()&15)>>a/4).toString(16))}function om(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function un(t){let{message:n,event_id:i}=t;if(n)return n;let a=om(t);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function Zi(t,n,i){let a=t.exception=t.exception||{},s=a.values=a.values||[],u=s[0]=s[0]||{};u.value||(u.value=n||""),u.type||(u.type=i||"Error")}function Qn(t,n){let i=om(t);if(!i)return;let a={type:"generic",handled:!0},s=i.mechanism;if(i.mechanism={...a,...s,...n},n&&"data"in n){let u={...s&&s.data,...n.data};i.mechanism.data=u}}function Rs(t){if(t&&t.__sentry_captured__)return!0;try{Ki(t,"__sentry_captured__",!0)}catch{}return!1}function jo(t){return Array.isArray(t)?t:[t]}function tl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function nl(){return"npm"}function am(){return!tl()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function sm(t,n){return t.require(n)}function ln(t,n=100,i=1/0){try{return xs("",t,n,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function As(t,n=3,i=100*1024){let a=ln(t,n);return Z2(a)>i?As(t,n-1,i):a}function xs(t,n,i=1/0,a=1/0,s=im()){let[u,l]=s;if(n==null||["number","boolean","string"].includes(typeof n)&&!Ko(n))return n;let p=q2(t,n);if(!p.startsWith("[object "))return p;if(n.__sentry_skip_normalization__)return n;let m=typeof n.__sentry_override_normalization_depth__=="number"?n.__sentry_override_normalization_depth__:i;if(m===0)return p.replace("object ","");if(u(n))return"[Circular ~]";let h=n;if(h&&typeof h.toJSON=="function")try{let P=h.toJSON();return xs("",P,m-1,a,s)}catch{}let S=Array.isArray(n)?[]:{},v=0,I=hs(n);for(let P in I){if(!Object.prototype.hasOwnProperty.call(I,P))continue;if(v>=a){S[P]="[MaxProperties ~]";break}let L=I[P];S[P]=xs(P,L,m-1,a,s),v++}return l(n),S}function q2(t,n){try{if(t==="domain"&&n&&typeof n=="object"&&n._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&n===global)return"[Global]";if(typeof window<"u"&&n===window)return"[Window]";if(typeof document<"u"&&n===document)return"[Document]";if(Wu(n))return"[SyntheticEvent]";if(typeof n=="number"&&n!==n)return"[NaN]";if(typeof n=="function")return`[Function: ${zt(n)}]`;if(typeof n=="symbol")return`[${String(n)}]`;if(typeof n=="bigint")return`[BigInt: ${String(n)}]`;let i=z2(n);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function z2(t){let n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}function K2(t){return~-encodeURI(t).split(/%..|./).length}function Z2(t){return K2(JSON.stringify(t))}var er;(function(t){t[t.PENDING=0]="PENDING";let i=1;t[t.RESOLVED=i]="RESOLVED";let a=2;t[t.REJECTED=a]="REJECTED"})(er||(er={}));function _t(t){return new we(n=>{n(t)})}function Nr(t){return new we((n,i)=>{i(t)})}var we=class{__init(){this._state=er.PENDING}__init2(){this._handlers=[]}constructor(n){we.prototype.__init.call(this),we.prototype.__init2.call(this),we.prototype.__init3.call(this),we.prototype.__init4.call(this),we.prototype.__init5.call(this),we.prototype.__init6.call(this);try{n(this._resolve,this._reject)}catch(i){this._reject(i)}}then(n,i){return new we((a,s)=>{this._handlers.push([!1,u=>{if(!n)a(u);else try{a(n(u))}catch(l){s(l)}},u=>{if(!i)s(u);else try{a(i(u))}catch(l){s(l)}}]),this._executeHandlers()})}catch(n){return this.then(i=>i,n)}finally(n){return new we((i,a)=>{let s,u;return this.then(l=>{u=!1,s=l,n&&n()},l=>{u=!0,s=l,n&&n()}).then(()=>{if(u){a(s);return}i(s)})})}__init3(){this._resolve=n=>{this._setResult(er.RESOLVED,n)}}__init4(){this._reject=n=>{this._setResult(er.REJECTED,n)}}__init5(){this._setResult=(n,i)=>{if(this._state===er.PENDING){if(fi(i)){i.then(this._resolve,this._reject);return}this._state=n,this._value=i,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===er.PENDING)return;let n=this._handlers.slice();this._handlers=[],n.forEach(i=>{i[0]||(this._state===er.RESOLVED&&i[1](this._value),this._state===er.REJECTED&&i[2](this._value),i[0]=!0)})}}};function rl(t){let n=[];function i(){return t===void 0||n.length<t}function a(l){return n.splice(n.indexOf(l),1)[0]}function s(l){if(!i())return Nr(new Je("Not adding Promise because buffer limit was reached."));let p=l();return n.indexOf(p)===-1&&n.push(p),p.then(()=>a(p)).then(null,()=>a(p).then(null,()=>{})),p}function u(l){return new we((p,m)=>{let h=n.length;if(!h)return p(!0);let S=setTimeout(()=>{l&&l>0&&p(!1)},l);n.forEach(v=>{_t(v).then(()=>{--h||(clearTimeout(S),p(!0))},m)})})}return{$:n,add:s,drain:u}}function Jo(t){if(!t)return{};let n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};let i=n[6]||"",a=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:i,hash:a,relative:n[5]+i+a}}var cm=["fatal","error","warning","log","info","debug"];function il(t){return t==="warn"?"warning":cm.includes(t)?t:"log"}var lm=sn(),al={nowSeconds:()=>Date.now()/1e3};function X2(){let{performance:t}=lm;if(!t||!t.now)return;let n=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:n}}function j2(){try{return sm(module,"perf_hooks").performance}catch{return}}var ol=am()?j2():X2(),um=ol===void 0?al:{nowSeconds:()=>(ol.timeOrigin+ol.now())/1e3},tr=al.nowSeconds.bind(al),fn=um.nowSeconds.bind(um);var Qo,pn=(()=>{let{performance:t}=lm;if(!t||!t.now){Qo="none";return}let n=3600*1e3,i=t.now(),a=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+i-a):n,u=s<n,l=t.timing&&t.timing.navigationStart,m=typeof l=="number"?Math.abs(l+i-a):n,h=m<n;return u||h?s<=m?(Qo="timeOrigin",t.timeOrigin):(Qo="navigationStart",l):(Qo="dateNow",a)})();var fm=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ea(t){let n=t.match(fm);if(!t||!n)return;let i;return n[3]==="1"?i=!0:n[3]==="0"&&(i=!1),{traceId:n[1],parentSampled:i,parentSpanId:n[2]}}function On(t,n=[]){return[t,n]}function cl(t,n){let[i,a]=t;return[i,[...a,n]]}function Os(t,n){let i=t[1];for(let a of i){let s=a[0].type;if(n(a,s))return!0}return!1}function sl(t,n){return(n||new TextEncoder).encode(t)}function ul(t,n){let[i,a]=t,s=JSON.stringify(i);function u(l){typeof s=="string"?s=typeof l=="string"?s+l:[sl(s,n),l]:s.push(typeof l=="string"?sl(l,n):l)}for(let l of a){let[p,m]=l;if(u(`
26
- ${JSON.stringify(p)}
27
- `),typeof m=="string"||m instanceof Uint8Array)u(m);else{let h;try{h=JSON.stringify(m)}catch{h=JSON.stringify(ln(m))}u(h)}}return typeof s=="string"?s:J2(s)}function J2(t){let n=t.reduce((s,u)=>s+u.length,0),i=new Uint8Array(n),a=0;for(let s of t)i.set(s,a),a+=s.length;return i}function ll(t,n){let i=typeof t.data=="string"?sl(t.data,n):t.data;return[xt({type:"attachment",length:i.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),i]}var Q2={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Is(t){return Q2[t]}function ws(t){if(!t||!t.sdk)return;let{name:n,version:i}=t.sdk;return{name:n,version:i}}function fl(t,n,i,a){let s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&{dsn:An(a)},...s&&{trace:xt({...s})}}}function pl(t,n,i){let a=[{type:"client_report"},{timestamp:i||tr(),discarded_events:t}];return On(n?{dsn:n}:{},[a])}function pm(t,n=Date.now()){let i=parseInt(`${t}`,10);if(!isNaN(i))return i*1e3;let a=Date.parse(`${t}`);return isNaN(a)?6e4:a-n}function dm(t,n){return t[n]||t.all||0}function dl(t,n,i=Date.now()){return dm(t,n)>i}function ml(t,{statusCode:n,headers:i},a=Date.now()){let s={...t},u=i&&i["x-sentry-rate-limits"],l=i&&i["retry-after"];if(u)for(let p of u.trim().split(",")){let[m,h]=p.split(":",2),S=parseInt(m,10),v=(isNaN(S)?60:S)*1e3;if(!h)s.all=a+v;else for(let I of h.split(";"))s[I]=a+v}else l?s.all=a+pm(l,a):n===429&&(s.all=a+60*1e3);return s}var ta="baggage",gl="sentry-",gm=/^sentry-/,hm=8192;function hl(t){if(!ht(t)&&!Array.isArray(t))return;let n={};if(Array.isArray(t))n=t.reduce((a,s)=>{let u=mm(s);return{...a,...u}},{});else{if(!t)return;n=mm(t)}let i=Object.entries(n).reduce((a,[s,u])=>{if(s.match(gm)){let l=s.slice(gl.length);a[l]=u}return a},{});if(Object.keys(i).length>0)return i}function Ps(t){let n=Object.entries(t).reduce((i,[a,s])=>(s&&(i[`${gl}${a}`]=s),i),{});return eC(n)}function mm(t){return t.split(",").map(n=>n.split("=").map(i=>decodeURIComponent(i.trim()))).reduce((n,[i,a])=>(n[i]=a,n),{})}function eC(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((n,[i,a],s)=>{let u=`${encodeURIComponent(i)}=${encodeURIComponent(a)}`,l=s===0?u:`${n},${u}`;return l.length>hm?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Not adding key: ${i} with val: ${a} to baggage header due to exceeding baggage size limits.`),n):l},"")}var Xi="production";function _m(t){let n=fn(),i={sid:At(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>tC(i)};return t&&nr(i,t),i}function nr(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),!t.did&&!n.did&&(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||fn(),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=n.sid.length===32?n.sid:At()),n.init!==void 0&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),typeof n.started=="number"&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if(typeof n.duration=="number")t.duration=n.duration;else{let i=t.timestamp-t.started;t.duration=i>=0?i:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),typeof n.errors=="number"&&(t.errors=n.errors),n.status&&(t.status=n.status)}function ym(t,n){let i={};n?i={status:n}:t.status==="ok"&&(i={status:"exited"}),nr(t,i)}function tC(t){return xt({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var nC=100,Ot=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(n){let i=new Ot;return n&&(i._breadcrumbs=[...n._breadcrumbs],i._tags={...n._tags},i._extra={...n._extra},i._contexts={...n._contexts},i._user=n._user,i._level=n._level,i._span=n._span,i._session=n._session,i._transactionName=n._transactionName,i._fingerprint=n._fingerprint,i._eventProcessors=[...n._eventProcessors],i._requestSession=n._requestSession,i._attachments=[...n._attachments],i._sdkProcessingMetadata={...n._sdkProcessingMetadata}),i}addScopeListener(n){this._scopeListeners.push(n)}addEventProcessor(n){return this._eventProcessors.push(n),this}setUser(n){return this._user=n||{},this._session&&nr(this._session,{user:n}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(n){return this._requestSession=n,this}setTags(n){return this._tags={...this._tags,...n},this._notifyScopeListeners(),this}setTag(n,i){return this._tags={...this._tags,[n]:i},this._notifyScopeListeners(),this}setExtras(n){return this._extra={...this._extra,...n},this._notifyScopeListeners(),this}setExtra(n,i){return this._extra={...this._extra,[n]:i},this._notifyScopeListeners(),this}setFingerprint(n){return this._fingerprint=n,this._notifyScopeListeners(),this}setLevel(n){return this._level=n,this._notifyScopeListeners(),this}setTransactionName(n){return this._transactionName=n,this._notifyScopeListeners(),this}setContext(n,i){return i===null?delete this._contexts[n]:this._contexts[n]=i,this._notifyScopeListeners(),this}setSpan(n){return this._span=n,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let n=this.getSpan();return n&&n.transaction}setSession(n){return n?this._session=n:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(n){if(!n)return this;if(typeof n=="function"){let i=n(this);return i instanceof Ot?i:this}return n instanceof Ot?(this._tags={...this._tags,...n._tags},this._extra={...this._extra,...n._extra},this._contexts={...this._contexts,...n._contexts},n._user&&Object.keys(n._user).length&&(this._user=n._user),n._level&&(this._level=n._level),n._fingerprint&&(this._fingerprint=n._fingerprint),n._requestSession&&(this._requestSession=n._requestSession)):an(n)&&(n=n,this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(n,i){let a=typeof i=="number"?i:nC;if(a<=0)return this;let s={timestamp:tr(),...n};return this._breadcrumbs=[...this._breadcrumbs,s].slice(-a),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(n){return this._attachments.push(n),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(n,i={}){if(this._extra&&Object.keys(this._extra).length&&(n.extra={...this._extra,...n.extra}),this._tags&&Object.keys(this._tags).length&&(n.tags={...this._tags,...n.tags}),this._user&&Object.keys(this._user).length&&(n.user={...this._user,...n.user}),this._contexts&&Object.keys(this._contexts).length&&(n.contexts={...this._contexts,...n.contexts}),this._level&&(n.level=this._level),this._transactionName&&(n.transaction=this._transactionName),this._span){n.contexts={trace:this._span.getTraceContext(),...n.contexts};let a=this._span.transaction;if(a){n.sdkProcessingMetadata={dynamicSamplingContext:a.getDynamicSamplingContext(),...n.sdkProcessingMetadata};let s=a.name;s&&(n.tags={transaction:s,...n.tags})}}return this._applyFingerprint(n),n.breadcrumbs=[...n.breadcrumbs||[],...this._breadcrumbs],n.breadcrumbs=n.breadcrumbs.length>0?n.breadcrumbs:void 0,n.sdkProcessingMetadata={...n.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Sm(),...this._eventProcessors],n,i)}setSDKProcessingMetadata(n){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...n},this}_notifyEventProcessors(n,i,a,s=0){return new we((u,l)=>{let p=n[s];if(i===null||typeof p!="function")u(i);else{let m=p({...i},a);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.id&&m===null&&x.log(`Event processor "${p.id}" dropped event`),fi(m)?m.then(h=>this._notifyEventProcessors(n,h,a,s+1).then(u)).then(null,l):this._notifyEventProcessors(n,m,a,s+1).then(u).then(null,l)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(n=>{n(this)}),this._notifyingListeners=!1)}_applyFingerprint(n){n.fingerprint=n.fingerprint?jo(n.fingerprint):[],this._fingerprint&&(n.fingerprint=n.fingerprint.concat(this._fingerprint)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint}};function Sm(){return pi("globalEventProcessors",()=>[])}function Mr(t){Sm().push(t)}var vm=4,rC=100,ji=class{constructor(n,i=new Ot,a=vm){this._version=a,this._stack=[{scope:i}],n&&this.bindClient(n)}isOlderThan(n){return this._version<n}bindClient(n){let i=this.getStackTop();i.client=n,n&&n.setupIntegrations&&n.setupIntegrations()}pushScope(){let n=Ot.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(n){let i=this.pushScope();try{n(i)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(n,i){let a=this._lastEventId=i&&i.event_id?i.event_id:At(),s=new Error("Sentry syntheticException");return this._withClient((u,l)=>{u.captureException(n,{originalException:n,syntheticException:s,...i,event_id:a},l)}),a}captureMessage(n,i,a){let s=this._lastEventId=a&&a.event_id?a.event_id:At(),u=new Error(n);return this._withClient((l,p)=>{l.captureMessage(n,i,{originalException:n,syntheticException:u,...a,event_id:s},p)}),s}captureEvent(n,i){let a=i&&i.event_id?i.event_id:At();return n.type||(this._lastEventId=a),this._withClient((s,u)=>{s.captureEvent(n,{...i,event_id:a},u)}),a}lastEventId(){return this._lastEventId}addBreadcrumb(n,i){let{scope:a,client:s}=this.getStackTop();if(!s)return;let{beforeBreadcrumb:u=null,maxBreadcrumbs:l=rC}=s.getOptions&&s.getOptions()||{};if(l<=0)return;let m={timestamp:tr(),...n},h=u?ps(()=>u(m,i)):m;h!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",h,i),a.addBreadcrumb(h,l))}setUser(n){this.getScope().setUser(n)}setTags(n){this.getScope().setTags(n)}setExtras(n){this.getScope().setExtras(n)}setTag(n,i){this.getScope().setTag(n,i)}setExtra(n,i){this.getScope().setExtra(n,i)}setContext(n,i){this.getScope().setContext(n,i)}configureScope(n){let{scope:i,client:a}=this.getStackTop();a&&n(i)}run(n){let i=Ns(this);try{n(this)}finally{Ns(i)}}getIntegration(n){let i=this.getClient();if(!i)return null;try{return i.getIntegration(n)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Cannot retrieve integration ${n.id} from the current Hub`),null}}startTransaction(n,i){let a=this._callExtensionMethod("startTransaction",n,i);return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!a&&console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
5
+ Name: ${ae(r)}
6
+ Error:`,n)}}function bd(){"console"in I&&Fr.forEach(function(t){t in I.console&&L(I.console,t,function(e){return zt[t]=e,function(...r){Ce("console",{args:r,level:t});let n=zt[t];n&&n.apply(I.console,r)}})})}function Cd(){Lo()&&L(I,"fetch",function(t){return function(...e){let{method:r,url:n}=ya(e),o={args:e,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Ce("fetch",{...o}),t.apply(I,e).then(i=>(Ce("fetch",{...o,endTimestamp:Date.now(),response:i}),i),i=>{throw Ce("fetch",{...o,endTimestamp:Date.now(),error:i}),i})}})}function Ho(t,e){return!!t&&typeof t=="object"&&!!t[e]}function _a(t){return typeof t=="string"?t:t?Ho(t,"url")?t.url:t.toString?t.toString():"":""}function ya(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:_a(r),method:Ho(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:_a(e),method:Ho(e,"method")?String(e.method).toUpperCase():"GET"}}function Ea(){if(!W.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;L(t,"open",function(e){return function(...r){let n=Date.now(),o=r[1],i=this[Je]={method:oe(r[0])?r[0].toUpperCase():r[0],url:r[1],request_headers:{}};oe(o)&&i.method==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let s=this[Je];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}Ce("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?L(this,"onreadystatechange",function(s){return function(...c){return a(),s.apply(this,c)}}):this.addEventListener("readystatechange",a),L(this,"setRequestHeader",function(s){return function(...c){let[l,u]=c,d=this[Je];return d&&(d.request_headers[l.toLowerCase()]=u),s.apply(this,c)}}),e.apply(this,r)}}),L(t,"send",function(e){return function(...r){let n=this[Je];return n&&r[0]!==void 0&&(n.body=r[0]),Ce("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),e.apply(this,r)}})}var Nn;function Td(){if(!ma())return;let t=W.onpopstate;W.onpopstate=function(...r){let n=W.location.href,o=Nn;if(Nn=n,Ce("history",{from:o,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let o=n.length>2?n[2]:void 0;if(o){let i=Nn,a=String(o);Nn=a,Ce("history",{from:i,to:a})}return r.apply(this,n)}}L(W.history,"pushState",e),L(W.history,"replaceState",e)}var Rd=1e3,ha,Uo,Go;function xd(t){if(t.type!==Uo)return!1;try{if(!t.target||t.target._sentryId!==Go)return!1}catch{}return!0}function Od(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Pd(t){try{return t.target}catch{return null}}function Sa(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Pd(r);if(Od(r.type,n))return;Ke(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ke(n,"_sentryId",M());let o=r.type==="keypress"?"input":r.type;xd(r)||(t({event:r,name:o,global:e}),Uo=r.type,Go=n?n._sentryId:void 0),clearTimeout(ha),ha=W.setTimeout(()=>{Go=void 0,Uo=void 0},Rd)}}function va(){if(!W.document)return;let t=Ce.bind(null,"dom"),e=Sa(t,!0);W.document.addEventListener("click",e,!1),W.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=W[r]&&W[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(L(n,"addEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=l[i]=l[i]||{refCount:0};if(!u.handler){let d=Sa(t);u.handler=d,o.call(this,i,d,s)}u.refCount++}catch{}return o.call(this,i,a,s)}}),L(n,"removeEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},u=l[i];u&&(u.refCount--,u.refCount<=0&&(o.call(this,i,u.handler,s),u.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,s)}}))})}var An=null;function Id(){An=W.onerror,W.onerror=function(t,e,r,n,o){return Ce("error",{column:n,error:o,line:r,msg:t,url:e}),An&&!An.__SENTRY_LOADER__?An.apply(this,arguments):!1},W.onerror.__SENTRY_INSTRUMENTED__=!0}var Mn=null;function Nd(){Mn=W.onunhandledrejection,W.onunhandledrejection=function(t){return Ce("unhandledrejection",t),Mn&&!Mn.__SENTRY_LOADER__?Mn.apply(this,arguments):!0},W.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Yo(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function $o(){return"npm"}function ba(){return!Yo()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ca(t,e){return t.require(e)}function Ta(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function r(o){if(t)return e.has(o)?!0:(e.add(o),!1);for(let i=0;i<e.length;i++)if(e[i]===o)return!0;return e.push(o),!1}function n(o){if(t)e.delete(o);else for(let i=0;i<e.length;i++)if(e[i]===o){e.splice(i,1);break}}return[r,n]}function Te(t,e=100,r=1/0){try{return Dn("",t,e,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function wn(t,e=3,r=100*1024){let n=Te(t,e);return wd(n)>r?wn(t,e-1,r):n}function Dn(t,e,r=1/0,n=1/0,o=Ta()){let[i,a]=o;if(e==null||["number","boolean","string"].includes(typeof e)&&!Dr(e))return e;let s=Ad(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(c===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let l=e;if(l&&typeof l.toJSON=="function")try{let h=l.toJSON();return Dn("",h,c-1,n,o)}catch{}let u=Array.isArray(e)?[]:{},d=0,m=Rn(e);for(let h in m){if(!Object.prototype.hasOwnProperty.call(m,h))continue;if(d>=n){u[h]="[MaxProperties ~]";break}let S=m[h];u[h]=Dn(h,S,c-1,n,o),d++}return a(e),u}function Ad(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(wr(e))return"[VueViewModel]";if(Po(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${ae(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let r=Md(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Md(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Dd(t){return~-encodeURI(t).split(/%..|./).length}function wd(t){return Dd(JSON.stringify(t))}var Qe;(function(t){t[t.PENDING=0]="PENDING";let r=1;t[t.RESOLVED=r]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(Qe||(Qe={}));function fe(t){return new U(e=>{e(t)})}function kt(t){return new U((e,r)=>{r(t)})}var U=class{constructor(e){U.prototype.__init.call(this),U.prototype.__init2.call(this),U.prototype.__init3.call(this),U.prototype.__init4.call(this),this._state=Qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new U((n,o)=>{this._handlers.push([!1,i=>{if(!e)n(i);else try{n(e(i))}catch(a){o(a)}},i=>{if(!r)o(i);else try{n(r(i))}catch(a){o(a)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new U((r,n)=>{let o,i;return this.then(a=>{i=!1,o=a,e&&e()},a=>{i=!0,o=a,e&&e()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=e=>{this._setResult(Qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Qe.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{if(this._state===Qe.PENDING){if(Dt(r)){r.then(this._resolve,this._reject);return}this._state=e,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Qe.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===Qe.RESOLVED&&r[1](this._value),this._state===Qe.REJECTED&&r[2](this._value),r[0]=!0)})}}};function Vo(t){let e=[];function r(){return t===void 0||e.length<t}function n(a){return e.splice(e.indexOf(a),1)[0]}function o(a){if(!r())return kt(new z("Not adding Promise because buffer limit was reached."));let s=a();return e.indexOf(s)===-1&&e.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function i(a){return new U((s,c)=>{let l=e.length;if(!l)return s(!0);let u=setTimeout(()=>{a&&a>0&&s(!1)},a);e.forEach(d=>{fe(d).then(()=>{--l||(clearTimeout(u),s(!0))},c)})})}return{$:e,add:o,drain:i}}function Gr(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}var Ra=["fatal","error","warning","log","info","debug"];function Wo(t){return t==="warn"?"warning":Ra.includes(t)?t:"log"}var Oa=ve(),qo={nowSeconds:()=>Date.now()/1e3};function kd(){let{performance:t}=Oa;if(!t||!t.now)return;let e=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:e}}function Bd(){try{return Ca(module,"perf_hooks").performance}catch{return}}var jo=ba()?Bd():kd(),xa=jo===void 0?qo:{nowSeconds:()=>(jo.timeOrigin+jo.now())/1e3},et=qo.nowSeconds.bind(qo),Re=xa.nowSeconds.bind(xa);var Yr,se=(()=>{let{performance:t}=Oa;if(!t||!t.now){Yr="none";return}let e=3600*1e3,r=t.now(),n=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,i=o<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+r-n):e,l=c<e;return i||l?o<=c?(Yr="timeOrigin",t.timeOrigin):(Yr="navigationStart",a):(Yr="dateNow",n)})();var $r="baggage",zo="sentry-",Ia=/^sentry-/,Na=8192;function Zo(t){if(!oe(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((n,o)=>{let i=Pa(o);return{...n,...i}},{});else{if(!t)return;e=Pa(t)}let r=Object.entries(e).reduce((n,[o,i])=>{if(o.match(Ia)){let a=o.slice(zo.length);n[a]=i}return n},{});if(Object.keys(r).length>0)return r}function Vr(t){if(!t)return;let e=Object.entries(t).reduce((r,[n,o])=>(o&&(r[`${zo}${n}`]=o),r),{});return Fd(e)}function Pa(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,n])=>(e[r]=n,e),{})}function Fd(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,a=o===0?i:`${e},${i}`;return a.length>Na?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},"")}var Aa=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ko(t){if(!t)return;let e=t.match(Aa);if(!e)return;let r;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}function Xo(t,e){let r=Ko(t),n=Zo(e),{traceId:o,parentSpanId:i,parentSampled:a}=r||{},s={traceId:o||M(),spanId:M().substring(16),sampled:a};return i&&(s.parentSpanId=i),n&&(s.dsc=n),{traceparentData:r,dynamicSamplingContext:n,propagationContext:s}}function Kt(t=M(),e=M().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${t}-${e}${n}`}function Le(t,e=[]){return[t,e]}function Qo(t,e){let[r,n]=t;return[r,[...n,e]]}function kn(t,e){let r=t[1];for(let n of r){let o=n[0].type;if(e(n,o))return!0}return!1}function Jo(t,e){return(e||new TextEncoder).encode(t)}function ei(t,e){let[r,n]=t,o=JSON.stringify(r);function i(a){typeof o=="string"?o=typeof a=="string"?o+a:[Jo(o,e),a]:o.push(typeof a=="string"?Jo(a,e):a)}for(let a of n){let[s,c]=a;if(i(`
7
+ ${JSON.stringify(s)}
8
+ `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Te(c))}i(l)}}return typeof o=="string"?o:Ld(o)}function Ld(t){let e=t.reduce((o,i)=>o+i.length,0),r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}function ti(t,e){let r=typeof t.data=="string"?Jo(t.data,e):t.data;return[ie({type:"attachment",length:r.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),r]}var Hd={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",statsd:"unknown"};function Bn(t){return Hd[t]}function Fn(t){if(!t||!t.sdk)return;let{name:e,version:r}=t.sdk;return{name:e,version:r}}function ri(t,e,r,n){let o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&n&&{dsn:Fe(n)},...o&&{trace:ie({...o})}}}function ni(t,e,r){let n=[{type:"client_report"},{timestamp:r||et(),discarded_events:t}];return Le(e?{dsn:e}:{},[n])}function Ma(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function Da(t,e){return t[e]||t.all||0}function oi(t,e,r=Date.now()){return Da(t,e)>r}function ii(t,{statusCode:e,headers:r},n=Date.now()){let o={...t},i=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(i)for(let s of i.trim().split(",")){let[c,l]=s.split(":",2),u=parseInt(c,10),d=(isNaN(u)?60:u)*1e3;if(!l)o.all=n+d;else for(let m of l.split(";"))o[m]=n+d}else a?o.all=n+Ma(a,n):e===429&&(o.all=n+60*1e3);return o}function wa(t,e){return t(e.stack||"",1)}function ai(t,e){let r={type:e.name||e.constructor.name,value:e.message},n=wa(t,e);return n.length&&(r.stacktrace={frames:n}),r}var Xt="production";function Wr(){return Br("globalEventProcessors",()=>[])}function si(t){Wr().push(t)}function Jt(t,e,r,n=0){return new U((o,i)=>{let a=t[n];if(e===null||typeof a!="function")o(e);else{let s=a({...e},r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&a.id&&s===null&&p.log(`Event processor "${a.id}" dropped event`),Dt(s)?s.then(c=>Jt(t,c,r,n+1).then(o)).then(null,i):Jt(t,s,r,n+1).then(o).then(null,i)}})}function ka(t){let e=Re(),r={sid:M(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ud(r)};return t&&tt(r,t),r}function tt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Re(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:M()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Ba(t,e){let r={};e?r={status:e}:t.status==="ok"&&(r={status:"exited"}),tt(t,r)}function Ud(t){return ie({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Gd=100,ge=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Fa()}static clone(e){let r=new ge;return e&&(r._breadcrumbs=[...e._breadcrumbs],r._tags={...e._tags},r._extra={...e._extra},r._contexts={...e._contexts},r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=[...e._eventProcessors],r._requestSession=e._requestSession,r._attachments=[...e._attachments],r._sdkProcessingMetadata={...e._sdkProcessingMetadata},r._propagationContext={...e._propagationContext}),r}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&tt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let r=e(this);return r instanceof ge?r:this}return e instanceof ge?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Ee(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Fa(),this}addBreadcrumb(e,r){let n=typeof r=="number"?r:Gd;if(n<=0)return this;let o={timestamp:et(),...e},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,r={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let a=this._span.transaction;if(a){e.sdkProcessingMetadata={dynamicSamplingContext:a.getDynamicSamplingContext(),...e.sdkProcessingMetadata};let s=a.name;s&&(e.tags={transaction:s,...e.tags})}}this._applyFingerprint(e);let o=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...o];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},Jt([...n||[],...Wr(),...this._eventProcessors],e,r)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Lr(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Fa(){return{traceId:M(),spanId:M().substring(16)}}var La=4,Yd=100,Qt=class{constructor(e,r=new ge,n=La){this._version=n,this._stack=[{scope:r}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=ge.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let r=this.pushScope();try{e(r)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,r){let n=this._lastEventId=r&&r.event_id?r.event_id:M(),o=new Error("Sentry syntheticException");return this._withClient((i,a)=>{i.captureException(e,{originalException:e,syntheticException:o,...r,event_id:n},a)}),n}captureMessage(e,r,n){let o=this._lastEventId=n&&n.event_id?n.event_id:M(),i=new Error(e);return this._withClient((a,s)=>{a.captureMessage(e,r,{originalException:e,syntheticException:i,...n,event_id:o},s)}),o}captureEvent(e,r){let n=r&&r.event_id?r.event_id:M();return e.type||(this._lastEventId=n),this._withClient((o,i)=>{o.captureEvent(e,{...r,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,r){let{scope:n,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Yd}=o.getOptions&&o.getOptions()||{};if(a<=0)return;let c={timestamp:et(),...e},l=i?bn(()=>i(c,r)):c;l!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,a))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,r){this.getScope().setTag(e,r)}setExtra(e,r){this.getScope().setExtra(e,r)}setContext(e,r){this.getScope().setContext(e,r)}configureScope(e){let{scope:r,client:n}=this.getStackTop();n&&e(r)}run(e){let r=Ln(this);try{e(this)}finally{Ln(r)}}getIntegration(e){let r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,r){let n=this._callExtensionMethod("startTransaction",e,r);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let o=this.getClient();console.warn(o?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
28
9
  Sentry.addTracingExtensions();
29
10
  Sentry.init({...});
30
- `),a}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(n=!1){if(n)return this.endSession();this._sendSessionUpdate()}endSession(){let i=this.getStackTop().scope,a=i.getSession();a&&ym(a),this._sendSessionUpdate(),i.setSession()}startSession(n){let{scope:i,client:a}=this.getStackTop(),{release:s,environment:u=Xi}=a&&a.getOptions()||{},{userAgent:l}=Le.navigator||{},p=_m({release:s,environment:u,user:i.getUser(),...l&&{userAgent:l},...n}),m=i.getSession&&i.getSession();return m&&m.status==="ok"&&nr(m,{status:"exited"}),this.endSession(),i.setSession(p),p}shouldSendDefaultPii(){let n=this.getClient(),i=n&&n.getOptions();return!!(i&&i.sendDefaultPii)}_sendSessionUpdate(){let{scope:n,client:i}=this.getStackTop(),a=n.getSession();a&&i&&i.captureSession&&i.captureSession(a)}_withClient(n){let{scope:i,client:a}=this.getStackTop();a&&n(a,i)}_callExtensionMethod(n,...i){let s=mi().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[n]=="function")return s.extensions[n].apply(this,i);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Extension method ${n} couldn't be found, doing nothing.`)}};function mi(){return Le.__SENTRY__=Le.__SENTRY__||{extensions:{},hub:void 0},Le}function Ns(t){let n=mi(),i=na(n);return _l(n,t),i}function K(){let t=mi();if(t.__SENTRY__&&t.__SENTRY__.acs){let n=t.__SENTRY__.acs.getCurrentHub();if(n)return n}return iC(t)}function iC(t=mi()){return(!oC(t)||na(t).isOlderThan(vm))&&_l(t,new ji),na(t)}function oC(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function na(t){return pi("hub",()=>new ji,t)}function _l(t,n){if(!t)return!1;let i=t.__SENTRY__=t.__SENTRY__||{};return i.hub=n,!0}function Ji(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let n=K().getClient(),i=t||n&&n.getOptions();return!!i&&(i.enableTracing||"tracesSampleRate"in i||"tracesSampler"in i)}function dn(t){return(t||K()).getScope().getTransaction()}var Em=!1;function Cm(){Em||(Em=!0,Fe("error",yl),Fe("unhandledrejection",yl))}function yl(){let t=dn();if(t){let n="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Transaction: ${n} -> Global error occured`),t.setStatus(n)}}yl.tag="sentry_tracingErrorCallback";var Dr=class{__init(){this.spans=[]}constructor(n=1e3){Dr.prototype.__init.call(this),this._maxlen=n}add(n){this.spans.length>this._maxlen?n.spanRecorder=void 0:this.spans.push(n)}},Kt=class{__init2(){this.traceId=At()}__init3(){this.spanId=At().substring(16)}__init4(){this.startTimestamp=fn()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(n){if(Kt.prototype.__init2.call(this),Kt.prototype.__init3.call(this),Kt.prototype.__init4.call(this),Kt.prototype.__init5.call(this),Kt.prototype.__init6.call(this),Kt.prototype.__init7.call(this),!n)return this;n.traceId&&(this.traceId=n.traceId),n.spanId&&(this.spanId=n.spanId),n.parentSpanId&&(this.parentSpanId=n.parentSpanId),"sampled"in n&&(this.sampled=n.sampled),n.op&&(this.op=n.op),n.description&&(this.description=n.description),n.data&&(this.data=n.data),n.tags&&(this.tags=n.tags),n.status&&(this.status=n.status),n.startTimestamp&&(this.startTimestamp=n.startTimestamp),n.endTimestamp&&(this.endTimestamp=n.endTimestamp),n.instrumenter&&(this.instrumenter=n.instrumenter)}startChild(n){let i=new Kt({...n,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(i.spanRecorder=this.spanRecorder,i.spanRecorder&&i.spanRecorder.add(i),i.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&i.transaction){let a=n&&n.op||"< unknown op >",s=i.transaction.name||"< unknown name >",u=i.transaction.spanId,l=`[Tracing] Starting '${a}' span on transaction '${s}' (${u}).`;i.transaction.metadata.spanMetadata[i.spanId]={logMessage:l},x.log(l)}return i}setTag(n,i){return this.tags={...this.tags,[n]:i},this}setData(n,i){return this.data={...this.data,[n]:i},this}setStatus(n){return this.status=n,this}setHttpStatus(n){this.setTag("http.status_code",String(n));let i=bm(n);return i!=="unknown_error"&&this.setStatus(i),this}isSuccess(){return this.status==="ok"}finish(n){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:i}=this.transaction.metadata.spanMetadata[this.spanId];i&&x.log(i.replace("Starting","Finishing"))}this.endTimestamp=typeof n=="number"?n:fn()}toTraceparent(){let n="";return this.sampled!==void 0&&(n=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${n}`}toContext(){return xt({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(n){return this.data=n.data||{},this.description=n.description,this.endTimestamp=n.endTimestamp,this.op=n.op,this.parentSpanId=n.parentSpanId,this.sampled=n.sampled,this.spanId=n.spanId||this.spanId,this.startTimestamp=n.startTimestamp||this.startTimestamp,this.status=n.status,this.tags=n.tags||{},this.traceId=n.traceId||this.traceId,this}getTraceContext(){return xt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return xt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}};function bm(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var In=class extends Kt{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(n,i){super(n),In.prototype.__init.call(this),In.prototype.__init2.call(this),In.prototype.__init3.call(this),this._hub=i||K(),this._name=n.name||"",this.metadata={source:"custom",...n.metadata,spanMetadata:{}},this._trimEnd=n.trimEnd,this.transaction=this;let a=this.metadata.dynamicSamplingContext;a&&(this._frozenDynamicSamplingContext={...a})}get name(){return this._name}set name(n){this.setName(n)}setName(n,i="custom"){this._name=n,this.metadata.source=i}initSpanRecorder(n=1e3){this.spanRecorder||(this.spanRecorder=new Dr(n)),this.spanRecorder.add(this)}setContext(n,i){i===null?delete this._contexts[n]:this._contexts[n]=i}setMeasurement(n,i,a=""){this._measurements[n]={value:i,unit:a}}setMetadata(n){this.metadata={...this.metadata,...n}}finish(n){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(n);let i=this._hub.getClient();if(i&&i.emit&&i.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}let a=this.spanRecorder?this.spanRecorder.spans.filter(p=>p!==this&&p.endTimestamp):[];this._trimEnd&&a.length>0&&(this.endTimestamp=a.reduce((p,m)=>p.endTimestamp&&m.endTimestamp?p.endTimestamp>m.endTimestamp?p:m:p).endTimestamp);let s=this.metadata,u={contexts:{...this._contexts,trace:this.getTraceContext()},spans:a,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...s,dynamicSamplingContext:this.getDynamicSamplingContext()},...s.source&&{transaction_info:{source:s.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(u)}toContext(){let n=super.toContext();return xt({...n,name:this.name,trimEnd:this._trimEnd})}updateWithContext(n){return super.updateWithContext(n),this.name=n.name||"",this._trimEnd=n.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let n=this._hub||K(),i=n&&n.getClient();if(!i)return{};let{environment:a,release:s}=i.getOptions()||{},{publicKey:u}=i.getDsn()||{},l=this.metadata.sampleRate,p=l!==void 0?l.toString():void 0,{segment:m}=n.getScope().getUser()||{},h=this.metadata.source,S=h&&h!=="url"?this.name:void 0,v=xt({environment:a||Xi,release:s,transaction:S,user_segment:m,public_key:u,trace_id:this.traceId,sample_rate:p});return i.emit&&i.emit("createDsc",v),v}setHub(n){this._hub=n}};var eo={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},aC="finishReason",Qi=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Sl=class extends Dr{constructor(n,i,a,s){super(s),this._pushActivity=n,this._popActivity=i,this.transactionSpanId=a}add(n){n.spanId!==this.transactionSpanId&&(n.finish=i=>{n.endTimestamp=typeof i=="number"?i:fn(),this._popActivity(n.spanId)},n.endTimestamp===void 0&&this._pushActivity(n.spanId)),super.add(n)}},Zt=class extends In{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Qi[4]}constructor(n,i,a=eo.idleTimeout,s=eo.finalTimeout,u=eo.heartbeatInterval,l=!1){super(n,i),this._idleHub=i,this._idleTimeout=a,this._finalTimeout=s,this._heartbeatInterval=u,this._onScope=l,Zt.prototype.__init.call(this),Zt.prototype.__init2.call(this),Zt.prototype.__init3.call(this),Zt.prototype.__init4.call(this),Zt.prototype.__init5.call(this),Zt.prototype.__init6.call(this),l&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),i.configureScope(p=>p.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Qi[3],this.finish())},this._finalTimeout)}finish(n=fn()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(aC,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let i of this._beforeFinishCallbacks)i(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(i=>{if(i.spanId===this.spanId)return!0;i.endTimestamp||(i.endTimestamp=n,i.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(i,void 0,2)));let a=i.startTimestamp<n;return a||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(i,void 0,2)),a}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] No active IdleTransaction");if(this._onScope){let i=this._idleHub.getScope();i.getTransaction()===this&&i.setSpan(void 0)}return super.finish(n)}registerBeforeFinishCallback(n){this._beforeFinishCallbacks.push(n)}initSpanRecorder(n){if(!this.spanRecorder){let i=s=>{this._finished||this._pushActivity(s)},a=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Sl(i,a,this.spanId,n),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(n,{restartOnChildSpanChange:i}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=i===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Qi[5],this.finish(n)))}setFinishReason(n){this._finishReason=n}_restartIdleTimeout(n){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Qi[1],this.finish(n))},this._idleTimeout)}_pushActivity(n){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] pushActivity: ${n}`),this.activities[n]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(n){if(this.activities[n]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] popActivity ${n}`),delete this.activities[n],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let i=fn();this._idleTimeoutCanceledPermanently?(this._finishReason=Qi[5],this.finish(i)):this._restartIdleTimeout(i+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let n=Object.keys(this.activities).join("");n===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=n,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Qi[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function sC(){let n=this.getScope().getSpan();return n?{"sentry-trace":n.toTraceparent()}:{}}function Tm(t,n,i){if(!Ji(n))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let a;return typeof n.tracesSampler=="function"?(a=n.tracesSampler(i),t.setMetadata({sampleRate:Number(a)})):i.parentSampled!==void 0?a=i.parentSampled:typeof n.tracesSampleRate<"u"?(a=n.tracesSampleRate,t.setMetadata({sampleRate:Number(a)})):(a=1,t.setMetadata({sampleRate:a})),cC(a)?a?(t.sampled=Math.random()<a,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Discarding transaction because ${typeof n.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function cC(t){return Ko(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function uC(t,n){let i=this.getClient(),a=i&&i.getOptions()||{},s=a.instrumenter||"sentry",u=t.instrumenter||"sentry";s!==u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`A transaction was started with instrumenter=\`${u}\`, but the SDK is configured with the \`${s}\` instrumenter.
31
- The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1);let l=new In(t,this);return l=Tm(l,a,{parentSampled:t.parentSampled,transactionContext:t,...n}),l.sampled&&l.initSpanRecorder(a._experiments&&a._experiments.maxSpans),i&&i.emit&&i.emit("startTransaction",l),l}function Ms(t,n,i,a,s,u,l){let p=t.getClient(),m=p&&p.getOptions()||{},h=new Zt(n,t,i,a,l,s);return h=Tm(h,m,{parentSampled:n.parentSampled,transactionContext:n,...u}),h.sampled&&h.initSpanRecorder(m._experiments&&m._experiments.maxSpans),p&&p.emit&&p.emit("startTransaction",h),h}function Ds(){let t=mi();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=uC),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=sC),Cm())}function to(t,n){return K().captureException(t,{captureContext:n})}function ra(t){K().addBreadcrumb(t)}function Bs(t,n){K().setContext(t,n)}function Ls(t){K().withScope(t)}var lC="7";function fC(t){let n=t.protocol?`${t.protocol}:`:"",i=t.port?`:${t.port}`:"";return`${n}//${t.host}${i}${t.path?`/${t.path}`:""}/api/`}function pC(t){return`${fC(t)}${t.projectId}/envelope/`}function dC(t,n){return Ku({sentry_key:t.publicKey,sentry_version:lC,...n&&{sentry_client:`${n.name}/${n.version}`}})}function Rm(t,n={}){let i=typeof n=="string"?n:n.tunnel,a=typeof n=="string"||!n._metadata?void 0:n._metadata.sdk;return i||`${pC(t)}?${dC(t,a)}`}function mC(t,n){return n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]]),t}function xm(t,n,i,a){let s=ws(i),u={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&{dsn:An(n)}},l="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return On(u,[l])}function Am(t,n,i,a){let s=ws(i),u=t.type&&t.type!=="replay_event"?t.type:"event";mC(t,i&&i.sdk);let l=fl(t,s,a,n);return delete t.sdkProcessingMetadata,On(l,[[{type:u},t]])}var Om=[];function gC(t){let n={};return t.forEach(i=>{let{name:a}=i,s=n[a];s&&!s.isDefaultInstance&&i.isDefaultInstance||(n[a]=i)}),Object.keys(n).map(i=>n[i])}function vl(t){let n=t.defaultIntegrations||[],i=t.integrations;n.forEach(l=>{l.isDefaultInstance=!0});let a;Array.isArray(i)?a=[...n,...i]:typeof i=="function"?a=jo(i(n)):a=n;let s=gC(a),u=hC(s,l=>l.name==="Debug");if(u!==-1){let[l]=s.splice(u,1);s.push(l)}return s}function Im(t){let n={};return t.forEach(i=>{i&&El(i,n)}),n}function El(t,n){n[t.name]=t,Om.indexOf(t.name)===-1&&(t.setupOnce(Mr,K),Om.push(t.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Integration installed: ${t.name}`))}function hC(t,n){for(let i=0;i<t.length;i++)if(n(t[i])===!0)return i;return-1}function Pm(t,n,i,a){let{normalizeDepth:s=3,normalizeMaxBreadth:u=1e3}=t,l={...n,event_id:n.event_id||i.event_id||At(),timestamp:n.timestamp||tr()},p=i.integrations||t.integrations.map(S=>S.name);_C(l,t),SC(l,p),n.type===void 0&&yC(l,t.stackParser);let m=a;i.captureContext&&(m=Ot.clone(m).update(i.captureContext));let h=_t(l);if(m){if(m.getAttachments){let S=[...i.attachments||[],...m.getAttachments()];S.length&&(i.attachments=S)}h=m.applyToEvent(l,i)}return h.then(S=>typeof s=="number"&&s>0?vC(S,s,u):S)}function _C(t,n){let{environment:i,release:a,dist:s,maxValueLength:u=250}=n;"environment"in t||(t.environment="environment"in n?i:Xi),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&s!==void 0&&(t.dist=s),t.message&&(t.message=wr(t.message,u));let l=t.exception&&t.exception.values&&t.exception.values[0];l&&l.value&&(l.value=wr(l.value,u));let p=t.request;p&&p.url&&(p.url=wr(p.url,u))}var wm=new WeakMap;function yC(t,n){let i=Le._sentryDebugIds;if(!i)return;let a,s=wm.get(n);s?a=s:(a=new Map,wm.set(n,a));let u=Object.keys(i).reduce((m,h)=>{let S,v=a.get(h);v?S=v:(S=n(h),a.set(h,S));for(let I=S.length-1;I>=0;I--){let P=S[I];if(P.filename){m[P.filename]=i[h];break}}return m},{}),l=new Set;try{t.exception.values.forEach(m=>{m.stacktrace.frames.forEach(h=>{h.filename&&l.add(h.filename)})})}catch{}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let p=t.debug_meta.images;l.forEach(m=>{u[m]&&p.push({type:"sourcemap",code_file:m,debug_id:u[m]})})}function SC(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}function vC(t,n,i){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:ln(s.data,n,i)}}))},...t.user&&{user:ln(t.user,n,i)},...t.contexts&&{contexts:ln(t.contexts,n,i)},...t.extra&&{extra:ln(t.extra,n,i)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=ln(t.contexts.trace.data,n,i))),t.spans&&(a.spans=t.spans.map(s=>(s.data&&(s.data=ln(s.data,n,i)),s))),a}var Nm="Not capturing exception because it's already been captured.",mn=class{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(n){if(mn.prototype.__init.call(this),mn.prototype.__init2.call(this),mn.prototype.__init3.call(this),mn.prototype.__init4.call(this),mn.prototype.__init5.call(this),this._options=n,n.dsn?this._dsn=ds(n.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("No DSN provided, client will not do anything."),this._dsn){let i=Rm(this._dsn,n);this._transport=n.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...n.transportOptions,url:i})}}captureException(n,i,a){if(Rs(n)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Nm);return}let s=i&&i.event_id;return this._process(this.eventFromException(n,i).then(u=>this._captureEvent(u,i,a)).then(u=>{s=u})),s}captureMessage(n,i,a,s){let u=a&&a.event_id,l=Vi(n)?this.eventFromMessage(String(n),i,a):this.eventFromException(n,a);return this._process(l.then(p=>this._captureEvent(p,a,s)).then(p=>{u=p})),u}captureEvent(n,i,a){if(i&&i.originalException&&Rs(i.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Nm);return}let s=i&&i.event_id;return this._process(this._captureEvent(n,i,a).then(u=>{s=u})),s}captureSession(n){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("SDK not enabled, will not capture session.");return}typeof n.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Discarded session because of missing or non-string release"):(this.sendSession(n),nr(n,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(n){let i=this._transport;return i?this._isClientDoneProcessing(n).then(a=>i.flush(n).then(s=>a&&s)):_t(!0)}close(n){return this.flush(n).then(i=>(this.getOptions().enabled=!1,i))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Im(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(n){return this._integrations[n]}getIntegration(n){try{return this._integrations[n.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Cannot retrieve integration ${n.id} from the current Client`),null}}addIntegration(n){El(n,this._integrations)}sendEvent(n,i={}){if(this._dsn){let a=Am(n,this._dsn,this._options._metadata,this._options.tunnel);for(let u of i.attachments||[])a=cl(a,ll(u,this._options.transportOptions&&this._options.transportOptions.textEncoder));let s=this._sendEnvelope(a);s&&s.then(u=>this.emit("afterSendEvent",n,u),null)}}sendSession(n){if(this._dsn){let i=xm(n,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(i)}}recordDroppedEvent(n,i,a){if(this._options.sendClientReports){let s=`${n}:${i}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}on(n,i){this._hooks[n]||(this._hooks[n]=[]),this._hooks[n].push(i)}emit(n,...i){this._hooks[n]&&this._hooks[n].forEach(a=>a(...i))}_updateSessionFromEvent(n,i){let a=!1,s=!1,u=i.exception&&i.exception.values;if(u){s=!0;for(let m of u){let h=m.mechanism;if(h&&h.handled===!1){a=!0;break}}}let l=n.status==="ok";(l&&n.errors===0||l&&a)&&(nr(n,{...a&&{status:"crashed"},errors:n.errors||Number(s||a)}),this.captureSession(n))}_isClientDoneProcessing(n){return new we(i=>{let a=0,s=1,u=setInterval(()=>{this._numProcessing==0?(clearInterval(u),i(!0)):(a+=s,n&&a>=n&&(clearInterval(u),i(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(n,i,a){let s=this.getOptions(),u=Object.keys(this._integrations);return!i.integrations&&u.length>0&&(i.integrations=u),Pm(s,n,i,a)}_captureEvent(n,i={},a){return this._processEvent(n,i,a).then(s=>s.event_id,s=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let u=s;u.logLevel==="log"?x.log(u.message):x.warn(u)}})}_processEvent(n,i,a){let s=this.getOptions(),{sampleRate:u}=s;if(!this._isEnabled())return Nr(new Je("SDK not enabled, will not capture event.","log"));let l=Dm(n),p=Mm(n),m=n.type||"error",h=`before send for type \`${m}\``;if(p&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",n),Nr(new Je(`Discarding event because it's not included in the random sample (sampling rate = ${u})`,"log"));let S=m==="replay_event"?"replay":m;return this._prepareEvent(n,i,a).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",S,n),new Je("An event processor returned `null`, will not send event.","log");if(i.data&&i.data.__sentry__===!0)return v;let P=CC(s,v,i);return EC(P,h)}).then(v=>{if(v===null)throw this.recordDroppedEvent("before_send",S,n),new Je(`${h} returned \`null\`, will not send event.`,"log");let I=a&&a.getSession();!l&&I&&this._updateSessionFromEvent(I,v);let P=v.transaction_info;if(l&&P&&v.transaction!==n.transaction){let L="custom";v.transaction_info={...P,source:L}}return this.sendEvent(v,i),v}).then(null,v=>{throw v instanceof Je?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),new Je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
32
- Reason: ${v}`))})}_process(n){this._numProcessing++,n.then(i=>(this._numProcessing--,i),i=>(this._numProcessing--,i))}_sendEnvelope(n){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",n),this._transport.send(n).then(null,i=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error("Error while sending event:",i)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error("Transport disabled")}_clearOutcomes(){let n=this._outcomes;return this._outcomes={},Object.keys(n).map(i=>{let[a,s]=i.split(":");return{reason:a,category:s,quantity:n[i]}})}};function EC(t,n){let i=`${n} must return \`null\` or a valid event.`;if(fi(t))return t.then(a=>{if(!an(a)&&a!==null)throw new Je(i);return a},a=>{throw new Je(`${n} rejected with ${a}`)});if(!an(t)&&t!==null)throw new Je(i);return t}function CC(t,n,i){let{beforeSend:a,beforeSendTransaction:s}=t;return Mm(n)&&a?a(n,i):Dm(n)&&s?s(n,i):n}function Mm(t){return t.type===void 0}function Dm(t){return t.type==="transaction"}function Cl(t,n){n.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?x.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let i=K();i.getScope().update(n.initialScope);let s=new t(n);i.bindClient(s)}var bC=30;function no(t,n,i=rl(t.bufferSize||bC)){let a={},s=l=>i.drain(l);function u(l){let p=[];if(Os(l,(v,I)=>{let P=Is(I);if(dl(a,P)){let L=Bm(v,I);t.recordDroppedEvent("ratelimit_backoff",P,L)}else p.push(v)}),p.length===0)return _t();let m=On(l[0],p),h=v=>{Os(m,(I,P)=>{let L=Bm(I,P);t.recordDroppedEvent(v,Is(P),L)})},S=()=>n({body:ul(m,t.textEncoder)}).then(v=>(v.statusCode!==void 0&&(v.statusCode<200||v.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Sentry responded with status code ${v.statusCode} to sent event.`),a=ml(a,v),v),v=>{throw h("network_error"),v});return i.add(S).then(v=>v,v=>{if(v instanceof Je)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error("Skipped sending event because buffer is full."),h("queue_overflow"),_t();throw v})}return u.__sentry__baseTransport__=!0,{send:u,flush:s}}function Bm(t,n){if(!(n!=="event"&&n!=="transaction"))return Array.isArray(t)?t[1]:void 0}var ia="7.54.0";var gi={};Gu(gi,{FunctionToString:()=>rr,InboundFilters:()=>wn});var Lm,rr=class{constructor(){rr.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=rr.id}setupOnce(){Lm=Function.prototype.toString;try{Function.prototype.toString=function(...n){let i=di(this)||this;return Lm.apply(i,n)}}catch{}}};rr.__initStatic();var TC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],RC=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],wn=class{static __initStatic(){this.id="InboundFilters"}__init(){this.name=wn.id}constructor(n={}){this._options=n,wn.prototype.__init.call(this)}setupOnce(n,i){let a=s=>{let u=i();if(u){let l=u.getIntegration(wn);if(l){let p=u.getClient(),m=p?p.getOptions():{},h=xC(l._options,m);return AC(s,h)?null:s}}return s};a.id=this.name,n(a)}};wn.__initStatic();function xC(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:TC],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[],...t.disableTransactionDefaults?[]:RC],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function AC(t,n){return n.ignoreInternal&&MC(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Event dropped due to being internal Sentry Error.
33
- Event: ${un(t)}`),!0):OC(t,n.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
34
- Event: ${un(t)}`),!0):IC(t,n.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
35
- Event: ${un(t)}`),!0):wC(t,n.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Event dropped due to being matched by \`denyUrls\` option.
36
- Event: ${un(t)}.
37
- Url: ${ks(t)}`),!0):PC(t,n.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Event dropped due to not being matched by \`allowUrls\` option.
38
- Event: ${un(t)}.
39
- Url: ${ks(t)}`),!0)}function OC(t,n){return t.type||!n||!n.length?!1:NC(t).some(i=>Pr(i,n))}function IC(t,n){if(t.type!=="transaction"||!n||!n.length)return!1;let i=t.transaction;return i?Pr(i,n):!1}function wC(t,n){if(!n||!n.length)return!1;let i=ks(t);return i?Pr(i,n):!1}function PC(t,n){if(!n||!n.length)return!0;let i=ks(t);return i?Pr(i,n):!0}function NC(t){if(t.message)return[t.message];if(t.exception){let{values:n}=t.exception;try{let{type:i="",value:a=""}=n&&n[n.length-1]||{};return[`${a}`,`${i}: ${a}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Cannot extract message for event ${un(t)}`),[]}}return[]}function MC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function DC(t=[]){for(let n=t.length-1;n>=0;n--){let i=t[n];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function ks(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch{}return n?DC(n):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Cannot extract url for event ${un(t)}`),null}}var ee=Le,bl=0;function Tl(){return bl>0}function WC(){bl++,setTimeout(()=>{bl--})}function Br(t,n={},i){if(typeof t!="function")return t;try{let s=t.__sentry_wrapped__;if(s)return s;if(di(t))return t}catch{return t}let a=function(){let s=Array.prototype.slice.call(arguments);try{i&&typeof i=="function"&&i.apply(this,arguments);let u=s.map(l=>Br(l,n));return t.apply(this,u)}catch(u){throw WC(),Ls(l=>{l.addEventProcessor(p=>(n.mechanism&&(Zi(p,void 0,void 0),Qn(p,n.mechanism)),p.extra={...p.extra,arguments:s},p)),to(u)}),u}};try{for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=t[s])}catch{}gs(a,t),Ki(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return t.name}})}catch{}return a}function Al(t,n){let i=Ol(t,n),a={type:n&&n.name,value:KC(n)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function VC(t,n,i,a){let u=K().getClient(),l=u&&u.getOptions().normalizeDepth,p={exception:{values:[{type:qi(n)?n.constructor.name:a?"UnhandledRejection":"Error",value:`Non-Error ${a?"promise rejection":"exception"} captured with keys: ${Zu(n)}`}]},extra:{__serialized__:As(n,l)}};if(i){let m=Ol(t,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function Rl(t,n){return{exception:{values:[Al(t,n)]}}}function Ol(t,n){let i=n.stacktrace||n.stack||"",a=zC(n);try{return t(i,a)}catch{}return[]}var qC=/Minified React error #\d+;/i;function zC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(qC.test(t.message))return 1}return 0}function KC(t){let n=t&&t.message;return n?n.error&&typeof n.error.message=="string"?n.error.message:n:"No error message"}function km(t,n,i,a){let s=i&&i.syntheticException||void 0,u=Fs(t,n,s,a);return Qn(u),u.level="error",i&&i.event_id&&(u.event_id=i.event_id),_t(u)}function Fm(t,n,i="info",a,s){let u=a&&a.syntheticException||void 0,l=xl(t,n,u,s);return l.level=i,a&&a.event_id&&(l.event_id=a.event_id),_t(l)}function Fs(t,n,i,a,s){let u;if(zo(n)&&n.error)return Rl(t,n.error);if(us(n)||Hu(n)){let l=n;if("stack"in n)u=Rl(t,n);else{let p=l.name||(us(l)?"DOMError":"DOMException"),m=l.message?`${p}: ${l.message}`:p;u=xl(t,m,i,a),Zi(u,m)}return"code"in l&&(u.tags={...u.tags,"DOMException.code":`${l.code}`}),u}return qo(n)?Rl(t,n):an(n)||qi(n)?(u=VC(t,n,i,s),Qn(u,{synthetic:!0}),u):(u=xl(t,n,i,a),Zi(u,`${n}`,void 0),Qn(u,{synthetic:!0}),u)}function xl(t,n,i,a){let s={message:n};if(a&&i){let u=Ol(t,i);u.length&&(s.exception={values:[{value:n,stacktrace:{frames:u}}]})}return s}var Us=1024,Il="Breadcrumbs",Pn=class{static __initStatic(){this.id=Il}__init(){this.name=Pn.id}constructor(n){Pn.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...n}}setupOnce(){this.options.console&&Fe("console",XC),this.options.dom&&Fe("dom",ZC(this.options.dom)),this.options.xhr&&Fe("xhr",jC),this.options.fetch&&Fe("fetch",JC),this.options.history&&Fe("history",QC)}addSentryBreadcrumb(n){this.options.sentry&&K().addBreadcrumb({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:un(n)},{event:n})}};Pn.__initStatic();function ZC(t){function n(i){let a,s=typeof t=="object"?t.serializeAttribute:void 0,u=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;u&&u>Us&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`\`dom.maxStringLength\` cannot exceed ${Us}, but a value of ${u} was configured. Sentry will use ${Us} instead.`),u=Us),typeof s=="string"&&(s=[s]);try{let l=i.event;a=eb(l)?xn(l.target,{keyAttrs:s,maxStringLength:u}):xn(l,{keyAttrs:s,maxStringLength:u})}catch{a="<unknown>"}a.length!==0&&K().addBreadcrumb({category:`ui.${i.name}`,message:a},{event:i.event,name:i.name,global:i.global})}return n}function XC(t){for(let i=0;i<t.args.length;i++)if(t.args[i]==="ref=Ref<"){t.args[i+1]="viewRef";break}let n={category:"console",data:{arguments:t.args,logger:"console"},level:il(t.level),message:ms(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${ms(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;K().addBreadcrumb(n,{input:t.args,level:t.level})}function jC(t){let{startTimestamp:n,endTimestamp:i}=t,a=t.xhr[Jn];if(!n||!i||!a)return;let{method:s,url:u,status_code:l,body:p}=a,m={method:s,url:u,status_code:l},h={xhr:t.xhr,input:p,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"xhr",data:m,type:"http"},h)}function JC(t){let{startTimestamp:n,endTimestamp:i}=t;if(i&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let a=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"fetch",data:a,level:"error",type:"http"},s)}else{let a={...t.fetchData,status_code:t.response&&t.response.status},s={input:t.args,response:t.response,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"fetch",data:a,type:"http"},s)}}function QC(t){let n=t.from,i=t.to,a=Jo(ee.location.href),s=Jo(n),u=Jo(i);s.path||(s=a),a.protocol===u.protocol&&a.host===u.host&&(i=u.relative),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),K().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}function eb(t){return t&&!!t.target}function Um(t,{metadata:n,tunnel:i,dsn:a}){let s={event_id:t.event_id,sent_at:new Date().toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!i&&!!a&&{dsn:An(a)}},u=tb(t);return On(s,[u])}function tb(t){return[{type:"user_report"},t]}var Gs=class extends mn{constructor(n){let i=ee.SENTRY_SDK_SOURCE||nl();n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${i}:@sentry/browser`,version:ia}],version:ia},super(n),n.sendClientReports&&ee.document&&ee.document.addEventListener("visibilitychange",()=>{ee.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(n,i){return km(this._options.stackParser,n,i,this._options.attachStacktrace)}eventFromMessage(n,i="info",a){return Fm(this._options.stackParser,n,i,a,this._options.attachStacktrace)}sendEvent(n,i){let a=this.getIntegrationById(Il);a&&a.addSentryBreadcrumb&&a.addSentryBreadcrumb(n),super.sendEvent(n,i)}captureUserFeedback(n){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("SDK not enabled, will not capture user feedback.");return}let i=Um(n,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(i)}_prepareEvent(n,i,a){return n.platform=n.platform||"javascript",super._prepareEvent(n,i,a)}_flushOutcomes(){let n=this._clearOutcomes();if(n.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("Sending outcomes:",n);let i=pl(n,this._options.tunnel&&An(this._dsn));this._sendEnvelope(i)}};var oa;function Gm(){if(oa)return oa;if(Zo(ee.fetch))return oa=ee.fetch.bind(ee);let t=ee.document,n=ee.fetch;if(t&&typeof t.createElement=="function")try{let i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i);let a=i.contentWindow;a&&a.fetch&&(n=a.fetch),t.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return oa=n.bind(ee)}function Hm(){oa=void 0}function $m(t,n=Gm()){let i=0,a=0;function s(u){let l=u.body.length;i+=l,a++;let p={body:u.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:i<=6e4&&a<15,...t.fetchOptions};try{return n(t.url,p).then(m=>(i-=l,a--,{statusCode:m.status,headers:{"x-sentry-rate-limits":m.headers.get("X-Sentry-Rate-Limits"),"retry-after":m.headers.get("Retry-After")}}))}catch(m){return Hm(),i-=l,a--,Nr(m)}}return no(t,s)}var nb=4;function Ym(t){function n(i){return new we((a,s)=>{let u=new XMLHttpRequest;u.onerror=s,u.onreadystatechange=()=>{u.readyState===nb&&a({statusCode:u.status,headers:{"x-sentry-rate-limits":u.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":u.getResponseHeader("Retry-After")}})},u.open("POST",t.url);for(let l in t.headers)Object.prototype.hasOwnProperty.call(t.headers,l)&&u.setRequestHeader(l,t.headers[l]);u.send(i.body)})}return no(t,n)}var Hs="?";var rb=30,ib=40,ob=50;function wl(t,n,i,a){let s={filename:t,function:n,in_app:!0};return i!==void 0&&(s.lineno=i),a!==void 0&&(s.colno=a),s}var ab=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sb=/\((\S*)(?::(\d+))(?::(\d+))\)/,cb=t=>{let n=ab.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let u=sb.exec(n[2]);u&&(n[2]=u[1],n[3]=u[2],n[4]=u[3])}let[a,s]=Vm(n[1]||Hs,n[2]);return wl(s,a,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},ub=[rb,cb],lb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pb=t=>{let n=lb.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){let u=fb.exec(n[3]);u&&(n[1]=n[1]||"eval",n[3]=u[1],n[4]=u[2],n[5]="")}let a=n[3],s=n[1]||Hs;return[s,a]=Vm(s,a),wl(a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},db=[ob,pb],mb=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,gb=t=>{let n=mb.exec(t);return n?wl(n[2],n[1]||Hs,+n[3],n[4]?+n[4]:void 0):void 0},hb=[ib,gb];var _b=[ub,db,hb],Wm=_s(..._b),Vm=(t,n)=>{let i=t.indexOf("safari-extension")!==-1,a=t.indexOf("safari-web-extension")!==-1;return i||a?[t.indexOf("@")!==-1?t.split("@")[0]:Hs,i?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]};var It=class{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=It.id}__init2(){this._installFunc={onerror:yb,onunhandledrejection:Sb}}constructor(n){It.prototype.__init.call(this),It.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...n}}setupOnce(){Error.stackTraceLimit=50;let n=this._options;for(let i in n){let a=this._installFunc[i];a&&n[i]&&(Cb(i),a(),this._installFunc[i]=void 0)}}};It.__initStatic();function yb(){Fe("error",t=>{let[n,i,a]=Km();if(!n.getIntegration(It))return;let{msg:s,url:u,line:l,column:p,error:m}=t;if(Tl()||m&&m.__sentry_own_request__)return;let h=m===void 0&&ht(s)?Eb(s,u,l,p):qm(Fs(i,m||s,void 0,a,!1),u,l,p);h.level="error",zm(n,m,h,"onerror")})}function Sb(){Fe("unhandledrejection",t=>{let[n,i,a]=Km();if(!n.getIntegration(It))return;let s=t;try{"reason"in t?s=t.reason:"detail"in t&&"reason"in t.detail&&(s=t.detail.reason)}catch{}if(Tl()||s&&s.__sentry_own_request__)return!0;let u=Vi(s)?vb(s):Fs(i,s,void 0,a,!0);u.level="error",zm(n,s,u,"onunhandledrejection")})}function vb(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Eb(t,n,i,a){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,u=zo(t)?t.message:t,l="Error",p=u.match(s);return p&&(l=p[1],u=p[2]),qm({exception:{values:[{type:l,value:u}]}},n,i,a)}function qm(t,n,i,a){let s=t.exception=t.exception||{},u=s.values=s.values||[],l=u[0]=u[0]||{},p=l.stacktrace=l.stacktrace||{},m=p.frames=p.frames||[],h=isNaN(parseInt(a,10))?void 0:a,S=isNaN(parseInt(i,10))?void 0:i,v=ht(n)&&n.length>0?n:Vu();return m.length===0&&m.push({colno:h,filename:v,function:"?",in_app:!0,lineno:S}),t}function Cb(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Global Handler attached: ${t}`)}function zm(t,n,i,a){Qn(i,{handled:!1,type:a}),t.captureEvent(i,{originalException:n})}function Km(){let t=K(),n=t.getClient(),i=n&&n.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,i.stackParser,i.attachStacktrace]}var bb=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Nn=class{static __initStatic(){this.id="TryCatch"}__init(){this.name=Nn.id}constructor(n){Nn.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...n}}setupOnce(){this._options.setTimeout&&ke(ee,"setTimeout",Zm),this._options.setInterval&&ke(ee,"setInterval",Zm),this._options.requestAnimationFrame&&ke(ee,"requestAnimationFrame",Tb),this._options.XMLHttpRequest&&"XMLHttpRequest"in ee&&ke(XMLHttpRequest.prototype,"send",Rb);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:bb).forEach(xb)}};Nn.__initStatic();function Zm(t){return function(...n){let i=n[0];return n[0]=Br(i,{mechanism:{data:{function:zt(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}function Tb(t){return function(n){return t.apply(this,[Br(n,{mechanism:{data:{function:"requestAnimationFrame",handler:zt(t)},handled:!0,type:"instrument"}})])}}function Rb(t){return function(...n){let i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in i&&typeof i[s]=="function"&&ke(i,s,function(u){let l={mechanism:{data:{function:s,handler:zt(u)},handled:!0,type:"instrument"}},p=di(u);return p&&(l.mechanism.data.handler=zt(p)),Br(u,l)})}),t.apply(this,n)}}function xb(t){let n=ee,i=n[t]&&n[t].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(ke(i,"addEventListener",function(a){return function(s,u,l){try{typeof u.handleEvent=="function"&&(u.handleEvent=Br(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:zt(u),target:t},handled:!0,type:"instrument"}}))}catch{}return a.apply(this,[s,Br(u,{mechanism:{data:{function:"addEventListener",handler:zt(u),target:t},handled:!0,type:"instrument"}}),l])}}),ke(i,"removeEventListener",function(a){return function(s,u,l){let p=u;try{let m=p&&p.__sentry_wrapped__;m&&a.call(this,s,m,l)}catch{}return a.call(this,s,p,l)}}))}var Ab="cause",Ob=5,gn=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=gn.id}constructor(n={}){gn.prototype.__init.call(this),this._key=n.key||Ab,this._limit=n.limit||Ob}setupOnce(){let n=K().getClient();n&&Mr((i,a)=>{let s=K().getIntegration(gn);return s?Ib(n.getOptions().stackParser,s._key,s._limit,i,a):i})}};gn.__initStatic();function Ib(t,n,i,a,s){if(!a.exception||!a.exception.values||!s||!qt(s.originalException,Error))return a;let u=Xm(t,i,s.originalException,n);return a.exception.values=[...u,...a.exception.values],a}function Xm(t,n,i,a,s=[]){if(!qt(i[a],Error)||s.length+1>=n)return s;let u=Al(t,i[a]);return Xm(t,n,i[a],a,[u,...s])}var hn=class{constructor(){hn.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=hn.id}setupOnce(){Mr(n=>{if(K().getIntegration(hn)){if(!ee.navigator&&!ee.location&&!ee.document)return n;let i=n.request&&n.request.url||ee.location&&ee.location.href,{referrer:a}=ee.document||{},{userAgent:s}=ee.navigator||{},u={...n.request&&n.request.headers,...a&&{Referer:a},...s&&{"User-Agent":s}},l={...n.request,...i&&{url:i},headers:u};return{...n,request:l}}return n})}};hn.__initStatic();var _n=class{constructor(){_n.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=_n.id}setupOnce(n,i){let a=s=>{if(s.type)return s;let u=i().getIntegration(_n);if(u){try{if(wb(s,u._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return u._previousEvent=s}return u._previousEvent=s}return s};a.id=this.name,n(a)}};_n.__initStatic();function wb(t,n){return n?!!(Pb(t,n)||Nb(t,n)):!1}function Pb(t,n){let i=t.message,a=n.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!eg(t,n)||!Qm(t,n))}function Nb(t,n){let i=jm(n),a=jm(t);return!(!i||!a||i.type!==a.type||i.value!==a.value||!eg(t,n)||!Qm(t,n))}function Qm(t,n){let i=Jm(t),a=Jm(n);if(!i&&!a)return!0;if(i&&!a||!i&&a||(i=i,a=a,a.length!==i.length))return!1;for(let s=0;s<a.length;s++){let u=a[s],l=i[s];if(u.filename!==l.filename||u.lineno!==l.lineno||u.colno!==l.colno||u.function!==l.function)return!1}return!0}function eg(t,n){let i=t.fingerprint,a=n.fingerprint;if(!i&&!a)return!0;if(i&&!a||!i&&a)return!1;i=i,a=a;try{return i.join("")===a.join("")}catch{return!1}}function jm(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Jm(t){let n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch{return}}var ng=[new gi.InboundFilters,new gi.FunctionToString,new Nn,new Pn,new It,new gn,new _n,new hn];function Pl(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=ng),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),ee.SENTRY_RELEASE&&ee.SENTRY_RELEASE.id&&(t.release=ee.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let n={...t,stackParser:ju(t.stackParser||Wm),integrations:vl(t),transport:t.transport||(ys()?$m:Ym)};Cl(Gs,n),t.autoSessionTracking&&Mb()}function tg(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Mb(){if(typeof ee.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=K();t.captureSession&&(tg(t),Fe("history",({from:n,to:i})=>{n===void 0||n===i||tg(K())}))}var Nl={};Gu(Nl,{Breadcrumbs:()=>Pn,Dedupe:()=>_n,GlobalHandlers:()=>It,HttpContext:()=>hn,LinkedErrors:()=>gn,TryCatch:()=>Nn});var ie=Le;function rg(){ie&&ie.document?ie.document.addEventListener("visibilitychange",()=>{let t=dn();if(ie.document.hidden&&t){let n="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(n),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var ro=(t,n,i)=>{let a,s;return u=>{n.value>=0&&(u||i)&&(s=n.value-(a||0),(s||a===void 0)&&(a=n.value,n.delta=s,t(n)))}};var ig=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Db=()=>{let t=ie.performance.timing,n=ie.performance.navigation.type,i={entryType:"navigation",startTime:0,type:n==2?"back_forward":n===1?"reload":"navigate"};for(let a in t)a!=="navigationStart"&&a!=="toJSON"&&(i[a]=Math.max(t[a]-t.navigationStart,0));return i},$s=()=>ie.__WEB_VITALS_POLYFILL__?ie.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Db()):ie.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Ys=()=>{let t=$s();return t&&t.activationStart||0};var io=(t,n)=>{let i=$s(),a="navigate";return i&&(ie.document.prerendering||Ys()>0?a="prerender":a=i.type.replace(/_/g,"-")),{name:t,value:typeof n>"u"?-1:n,rating:"good",delta:0,entries:[],id:ig(),navigationType:a}};var ir=(t,n,i)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let a=new PerformanceObserver(s=>{n(s.getEntries())});return a.observe(Object.assign({type:t,buffered:!0},i||{})),a}}catch{}};var Lr=(t,n)=>{let i=a=>{(a.type==="pagehide"||ie.document.visibilityState==="hidden")&&(t(a),n&&(removeEventListener("visibilitychange",i,!0),removeEventListener("pagehide",i,!0)))};addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0)};var og=t=>{let n=io("CLS",0),i,a=0,s=[],u=p=>{p.forEach(m=>{if(!m.hadRecentInput){let h=s[0],S=s[s.length-1];a&&s.length!==0&&m.startTime-S.startTime<1e3&&m.startTime-h.startTime<5e3?(a+=m.value,s.push(m)):(a=m.value,s=[m]),a>n.value&&(n.value=a,n.entries=s,i&&i())}})},l=ir("layout-shift",u);if(l){i=ro(t,n);let p=()=>{u(l.takeRecords()),i(!0)};return Lr(p),p}};var Ws=-1,Bb=()=>ie.document.visibilityState==="hidden"&&!ie.document.prerendering?0:1/0,Lb=()=>{Lr(({timeStamp:t})=>{Ws=t},!0)},oo=()=>(Ws<0&&(Ws=Bb(),Lb()),{get firstHiddenTime(){return Ws}});var ag=t=>{let n=oo(),i=io("FID"),a,s=p=>{p.startTime<n.firstHiddenTime&&(i.value=p.processingStart-p.startTime,i.entries.push(p),a(!0))},u=p=>{p.forEach(s)},l=ir("first-input",u);a=ro(t,i),l&&Lr(()=>{u(l.takeRecords()),l.disconnect()},!0)};var sg={},cg=t=>{let n=oo(),i=io("LCP"),a,s=l=>{let p=l[l.length-1];if(p){let m=Math.max(p.startTime-Ys(),0);m<n.firstHiddenTime&&(i.value=m,i.entries=[p],a())}},u=ir("largest-contentful-paint",s);if(u){a=ro(t,i);let l=()=>{sg[i.id]||(s(u.takeRecords()),u.disconnect(),sg[i.id]=!0,a(!0))};return["keydown","click"].forEach(p=>{addEventListener(p,l,{once:!0,capture:!0})}),Lr(l,!0),l}};function Vs(t){return typeof t=="number"&&isFinite(t)}function hi(t,{startTimestamp:n,...i}){return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function $e(t){return t/1e3}function lg(){return ie&&ie.addEventListener&&ie.performance}var ug=0,Pe={},Mn,aa;function fg(){let t=lg();if(t&&pn){t.mark&&ie.performance.mark("sentry-tracing-init"),Ub();let n=kb(),i=Fb();return()=>{n&&n(),i&&i()}}return()=>{}}function pg(){ir("longtask",n=>{for(let i of n){let a=dn();if(!a)return;let s=$e(pn+i.startTime),u=$e(i.duration);a.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:s,endTimestamp:s+u})}})}function dg(){ir("event",n=>{for(let i of n){let a=dn();if(!a)return;if(i.name==="click"){let s=$e(pn+i.startTime),u=$e(i.duration);a.startChild({description:xn(i.target),op:`ui.interaction.${i.name}`,startTimestamp:s,endTimestamp:s+u})}}},{durationThreshold:0})}function kb(){return og(t=>{let n=t.entries.pop();n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS"),Pe.cls={value:t.value,unit:""},aa=n)})}function Fb(){return cg(t=>{let n=t.entries.pop();n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding LCP"),Pe.lcp={value:t.value,unit:"millisecond"},Mn=n)})}function Ub(){ag(t=>{let n=t.entries.pop();if(!n)return;let i=$e(pn),a=$e(n.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FID"),Pe.fid={value:t.value,unit:"millisecond"},Pe["mark.fid"]={value:i+a,unit:"second"}})}function mg(t){let n=lg();if(!n||!ie.performance.getEntries||!pn)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Adding & adjusting spans using Performance API");let i=$e(pn),a=n.getEntries(),s,u;if(a.slice(ug).forEach(l=>{let p=$e(l.startTime),m=$e(l.duration);if(!(t.op==="navigation"&&i+p<t.startTimestamp))switch(l.entryType){case"navigation":{Hb(t,l,i),s=i+$e(l.responseStart),u=i+$e(l.requestStart);break}case"mark":case"paint":case"measure":{Gb(t,l,p,m,i);let h=oo(),S=l.startTime<h.firstHiddenTime;l.name==="first-paint"&&S&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FP"),Pe.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&S&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FCP"),Pe.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{let h=l.name.replace(ie.location.origin,"");Yb(t,l,h,p,m,i);break}}}),ug=Math.max(a.length-1,0),Wb(t),t.op==="pageload"){typeof s=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding TTFB"),Pe.ttfb={value:(s-t.startTimestamp)*1e3,unit:"millisecond"},typeof u=="number"&&u<=s&&(Pe["ttfb.requestTime"]={value:(s-u)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(p=>{if(!Pe[p]||i>=t.startTimestamp)return;let m=Pe[p].value,h=i+$e(m),S=Math.abs((h-t.startTimestamp)*1e3),v=S-m;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Measurements] Normalized ${p} from ${m} to ${S} (${v})`),Pe[p].value=S});let l=Pe["mark.fid"];l&&Pe.fid&&(hi(t,{description:"first input delay",endTimestamp:l.value+$e(Pe.fid.value),op:"ui.action",startTimestamp:l.value}),delete Pe["mark.fid"]),"fcp"in Pe||delete Pe.cls,Object.keys(Pe).forEach(p=>{t.setMeasurement(p,Pe[p].value,Pe[p].unit)}),Vb(t)}Mn=void 0,aa=void 0,Pe={}}function Gb(t,n,i,a,s){let u=s+i,l=u+a;return hi(t,{description:n.name,endTimestamp:l,op:n.entryType,startTimestamp:u}),u}function Hb(t,n,i){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(a=>{qs(t,n,a,i)}),qs(t,n,"secureConnection",i,"TLS/SSL","connectEnd"),qs(t,n,"fetch",i,"cache","domainLookupStart"),qs(t,n,"domainLookup",i,"DNS"),$b(t,n,i)}function qs(t,n,i,a,s,u){let l=u?n[u]:n[`${i}End`],p=n[`${i}Start`];!p||!l||hi(t,{op:"browser",description:s||i,startTimestamp:a+$e(p),endTimestamp:a+$e(l)})}function $b(t,n,i){hi(t,{op:"browser",description:"request",startTimestamp:i+$e(n.requestStart),endTimestamp:i+$e(n.responseEnd)}),hi(t,{op:"browser",description:"response",startTimestamp:i+$e(n.responseStart),endTimestamp:i+$e(n.responseEnd)})}function Yb(t,n,i,a,s,u){if(n.initiatorType==="xmlhttprequest"||n.initiatorType==="fetch")return;let l={};"transferSize"in n&&(l["http.response_transfer_size"]=n.transferSize),"encodedBodySize"in n&&(l["http.response_content_length"]=n.encodedBodySize),"decodedBodySize"in n&&(l["http.decoded_response_content_length"]=n.decodedBodySize),"renderBlockingStatus"in n&&(l["resource.render_blocking_status"]=n.renderBlockingStatus);let p=u+a,m=p+s;hi(t,{description:i,endTimestamp:m,op:n.initiatorType?`resource.${n.initiatorType}`:"resource.other",startTimestamp:p,data:l})}function Wb(t){let n=ie.navigator;if(!n)return;let i=n.connection;i&&(i.effectiveType&&t.setTag("effectiveConnectionType",i.effectiveType),i.type&&t.setTag("connectionType",i.type),Vs(i.rtt)&&(Pe["connection.rtt"]={value:i.rtt,unit:"millisecond"})),Vs(n.deviceMemory)&&t.setTag("deviceMemory",`${n.deviceMemory} GB`),Vs(n.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(n.hardwareConcurrency))}function Vb(t){Mn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding LCP Data"),Mn.element&&t.setTag("lcp.element",xn(Mn.element)),Mn.id&&t.setTag("lcp.id",Mn.id),Mn.url&&t.setTag("lcp.url",Mn.url.trim().slice(0,200)),t.setTag("lcp.size",Mn.size)),aa&&aa.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS Data"),aa.sources.forEach((n,i)=>t.setTag(`cls.source.${i+1}`,xn(n.node))))}var Ml=["localhost",/^\/(?!\/)/],sa={traceFetch:!0,traceXHR:!0,tracingOrigins:Ml,tracePropagationTargets:Ml};function Dl(t){let{traceFetch:n,traceXHR:i,tracePropagationTargets:a,tracingOrigins:s,shouldCreateSpanForRequest:u}={traceFetch:sa.traceFetch,traceXHR:sa.traceXHR,...t},l=typeof u=="function"?u:h=>!0,p=h=>qb(h,a||s),m={};n&&Fe("fetch",h=>{zb(h,l,p,m)}),i&&Fe("xhr",h=>{Zb(h,l,p,m)})}function qb(t,n){return Pr(t,n||Ml)}function zb(t,n,i,a){if(!Ji()||!(t.fetchData&&n(t.fetchData.url)))return;if(t.endTimestamp){let p=t.fetchData.__span;if(!p)return;let m=a[p];if(m){if(t.response){m.setHttpStatus(t.response.status);let h=t.response&&t.response.headers&&t.response.headers.get("content-length"),S=parseInt(h);S>0&&m.setData("http.response_content_length",S)}else t.error&&m.setStatus("internal_error");m.finish(),delete a[p]}return}let s=K().getScope(),u=s&&s.getSpan(),l=u&&u.transaction;if(u&&l){let{method:p,url:m}=t.fetchData,h=u.startChild({data:{url:m,type:"fetch","http.method":p},description:`${p} ${m}`,op:"http.client"});t.fetchData.__span=h.spanId,a[h.spanId]=h;let S=t.args[0];t.args[1]=t.args[1]||{};let v=t.args[1];i(t.fetchData.url)&&(v.headers=Kb(S,l.getDynamicSamplingContext(),h,v))}}function Kb(t,n,i,a){let s=Ps(n),u=i.toTraceparent(),l=typeof Request<"u"&&qt(t,Request)?t.headers:a.headers;if(l)if(typeof Headers<"u"&&qt(l,Headers)){let p=new Headers(l);return p.append("sentry-trace",u),s&&p.append(ta,s),p}else if(Array.isArray(l)){let p=[...l,["sentry-trace",u]];return s&&p.push([ta,s]),p}else{let p="baggage"in l?l.baggage:void 0,m=[];return Array.isArray(p)?m.push(...p):p&&m.push(p),s&&m.push(s),{...l,"sentry-trace":u,baggage:m.length>0?m.join(","):void 0}}else return{"sentry-trace":u,baggage:s}}function Zb(t,n,i,a){let s=t.xhr,u=s&&s[Jn];if(!Ji()||s&&s.__sentry_own_request__||!(s&&u&&n(u.url)))return;if(t.endTimestamp){let h=s.__sentry_xhr_span_id__;if(!h)return;let S=a[h];S&&(S.setHttpStatus(u.status_code),S.finish(),delete a[h]);return}let l=K().getScope(),p=l&&l.getSpan(),m=p&&p.transaction;if(p&&m){let h=p.startChild({data:{...u.data,type:"xhr","http.method":u.method,url:u.url},description:`${u.method} ${u.url}`,op:"http.client"});if(s.__sentry_xhr_span_id__=h.spanId,a[s.__sentry_xhr_span_id__]=h,s.setRequestHeader&&i(u.url))try{s.setRequestHeader("sentry-trace",h.toTraceparent());let S=m.getDynamicSamplingContext(),v=Ps(S);v&&s.setRequestHeader(ta,v)}catch{}}}function gg(t,n=!0,i=!0){if(!ie||!ie.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not initialize routing instrumentation due to invalid location");return}let a=ie.location.href,s;n&&(s=t({name:ie.location.pathname,startTimestamp:pn?pn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),i&&Fe("history",({to:u,from:l})=>{if(l===void 0&&a&&a.indexOf(u)!==-1){a=void 0;return}l!==u&&(a=void 0,s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.finish()),s=t({name:ie.location.pathname,op:"navigation",metadata:{source:"url"}}))})}var _g="BrowserTracing",Xb={...eo,markBackgroundTransactions:!0,routingInstrumentation:gg,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...sa},kr=class{__init(){this.name=_g}constructor(n){kr.prototype.__init.call(this),Ds(),this.options={...Xb,...n},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),n&&!n.tracePropagationTargets&&n.tracingOrigins&&(this.options.tracePropagationTargets=n.tracingOrigins),this._collectWebVitals=fg(),this.options.enableLongTask&&pg(),this.options._experiments.enableInteractions&&dg()}setupOnce(n,i){this._getCurrentHub=i;let{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:u,markBackgroundTransactions:l,traceFetch:p,traceXHR:m,tracePropagationTargets:h,shouldCreateSpanForRequest:S,_experiments:v}=this.options;a(I=>{let P=this._createRouteTransaction(I);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(P,I,i),P},u,s),l&&rg(),v.enableInteractions&&this._registerInteractionListener(),Dl({traceFetch:p,traceXHR:m,tracePropagationTargets:h,shouldCreateSpanForRequest:S})}_createRouteTransaction(n){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${n.op} transaction because _getCurrentHub is invalid.`);return}let{beforeNavigate:i,idleTimeout:a,finalTimeout:s,heartbeatInterval:u}=this.options,l=n.op==="pageload",p=l?hg("sentry-trace"):null,m=l?hg("baggage"):null,h=p?ea(p):void 0,S=m?hl(m):void 0,v={...n,...h,metadata:{...n.metadata,dynamicSamplingContext:h&&!S?{}:S},trimEnd:!0},I=typeof i=="function"?i(v):v,P=I===void 0?{...v,sampled:!1}:I;P.metadata=P.name!==v.name?{...P.metadata,source:"custom"}:P.metadata,this._latestRouteName=P.name,this._latestRouteSource=P.metadata&&P.metadata.source,P.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Will not send ${P.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Starting ${P.op} transaction on scope`);let L=this._getCurrentHub(),{location:Y}=ie,ce=Ms(L,P,a,s,!0,{location:Y},u);return ce.registerBeforeFinishCallback(X=>{this._collectWebVitals(),mg(X)}),ce}_registerInteractionListener(){let n,i=()=>{let{idleTimeout:a,finalTimeout:s,heartbeatInterval:u}=this.options,l="ui.action.click",p=dn();if(p&&p.op&&["navigation","pageload"].includes(p.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.finish(),n=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}let m=this._getCurrentHub(),{location:h}=ie,S={name:this._latestRouteName,op:l,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};n=Ms(m,S,a,s,!0,{location:h},u)};["click"].forEach(a=>{addEventListener(a,i,{once:!1,capture:!0})})}};function hg(t){let n=qu(`meta[name=${t}]`);return n?n.getAttribute("content"):null}var yg={};ee.Sentry&&ee.Sentry.Integrations&&(yg=ee.Sentry.Integrations);var W4={...yg,...gi,...Nl};var jb=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};jb.SENTRY_RELEASE={id:"3.1.2--prototype.2"};var Sg=!1;function Jb(){Pl({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.2--prototype.2",integrations:[new kr],tracesSampleRate:1}),Sg=!0}var Xt=t=>(Sg||Jb(),to(t));var xg=ge(require("react"));var Ll="[Duffel Ancillaries] ",Eg="duffel-ancillaries-logger-state",vg=!1,Qb=t=>{localStorage.setItem(Eg,t.toString())},Cg=()=>localStorage.getItem(Eg)==="true",zs=t=>{Qb(t),t&&!vg&&console.info(Ll,`
11
+ `:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let r=this.getStackTop().scope,n=r.getSession();n&&Ba(n),this._sendSessionUpdate(),r.setSession()}startSession(e){let{scope:r,client:n}=this.getStackTop(),{release:o,environment:i=Xt}=n&&n.getOptions()||{},{userAgent:a}=I.navigator||{},s=ka({release:o,environment:i,user:r.getUser(),...a&&{userAgent:a},...e}),c=r.getSession&&r.getSession();return c&&c.status==="ok"&&tt(c,{status:"exited"}),this.endSession(),r.setSession(s),s}shouldSendDefaultPii(){let e=this.getClient(),r=e&&e.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:r}=this.getStackTop(),n=e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_withClient(e){let{scope:r,client:n}=this.getStackTop();n&&e(n,r)}_callExtensionMethod(e,...r){let o=Bt().__SENTRY__;if(o&&o.extensions&&typeof o.extensions[e]=="function")return o.extensions[e].apply(this,r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Bt(){return I.__SENTRY__=I.__SENTRY__||{extensions:{},hub:void 0},I}function Ln(t){let e=Bt(),r=jr(e);return ci(e,t),r}function C(){let t=Bt();if(t.__SENTRY__&&t.__SENTRY__.acs){let e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return $d(t)}function $d(t=Bt()){return(!Vd(t)||jr(t).isOlderThan(La))&&ci(t,new Qt),jr(t)}function Vd(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function jr(t){return Br("hub",()=>new Qt,t)}function ci(t,e){if(!t)return!1;let r=t.__SENTRY__=t.__SENTRY__||{};return r.hub=e,!0}function xe(t){return(t||C()).getScope().getTransaction()}var Ha=!1;function Ua(){Ha||(Ha=!0,H("error",li),H("unhandledrejection",li))}function li(){let t=xe();if(t){let e="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}li.tag="sentry_tracingErrorCallback";var er=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},tr=class{constructor(e={}){this.traceId=e.traceId||M(),this.spanId=e.spanId||M().substring(16),this.startTimestamp=e.startTimestamp||Re(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let r=new tr({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&r.transaction){let n=e&&e.op||"< unknown op >",o=r.transaction.name||"< unknown name >",i=r.transaction.spanId,a=`[Tracing] Starting '${n}' span on transaction '${o}' (${i}).`;r.transaction.metadata.spanMetadata[r.spanId]={logMessage:a},p.log(a)}return r}setTag(e,r){return this.tags={...this.tags,[e]:r},this}setData(e,r){return this.data={...this.data,[e]:r},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let r=Ga(e);return r!=="unknown_error"&&this.setStatus(r),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:r}=this.transaction.metadata.spanMetadata[this.spanId];r&&p.log(r.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:Re()}toTraceparent(){return Kt(this.traceId,this.spanId,this.sampled)}toContext(){return ie({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ie({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Ga(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function ht(t,e,r){let n=e.getOptions(),{publicKey:o}=e.getDsn()||{},{segment:i}=r&&r.getUser()||{},a=ie({environment:n.environment||Xt,release:n.release,user_segment:i,public_key:o,trace_id:t});return e.emit&&e.emit("createDsc",a),a}var rr=class extends tr{constructor(e,r){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=r||C(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,r="custom"){this._name=e,this.metadata.source=r}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new er(e)),this.spanRecorder.add(this)}setContext(e,r){r===null?delete this._contexts[e]:this._contexts[e]=r}setMeasurement(e,r,n=""){this._measurements[e]={value:r,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){let r=this._finishTransaction(e);if(r)return this._hub.captureEvent(r)}toContext(){let e=super.toContext();return ie({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||C(),r=e.getClient();if(!r)return{};let n=e.getScope(),o=ht(this.traceId,r,n),i=this.metadata.sampleRate;i!==void 0&&(o.sample_rate=`${i}`);let a=this.metadata.source;return a&&a!=="url"&&(o.transaction=this.name),this.sampled!==void 0&&(o.sampled=String(this.sampled)),o}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,c)=>s.endTimestamp&&c.endTimestamp?s.endTimestamp>c.endTimestamp?s:c:s).endTimestamp);let o=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...o,dynamicSamplingContext:this.getDynamicSamplingContext()},...o.source&&{transaction_info:{source:o.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),i}};var or={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Wd="finishReason",nr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],di=class extends er{constructor(e,r,n,o){super(o),this._pushActivity=e,this._popActivity=r,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=r=>{e.endTimestamp=typeof r=="number"?r:Re(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},qr=class extends rr{constructor(e,r,n=or.idleTimeout,o=or.finalTimeout,i=or.heartbeatInterval,a=!1){super(e,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=o,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=nr[4],a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),r.configureScope(s=>s.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=nr[3],this.finish())},this._finalTimeout)}finish(e=Re()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Wd,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanId===this.spanId)return!0;r.endTimestamp||(r.endTimestamp=e,r.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let n=r.startTimestamp<e,o=(this._finalTimeout+this._idleTimeout)/1e3,i=r.endTimestamp-this.startTimestamp<o;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=JSON.stringify(r,void 0,2);n?i||p.log("[Tracing] discarding Span since it finished after Transaction final timeout",a):p.log("[Tracing] discarding Span since it happened after Transaction was finished",a)}return n&&i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let r=o=>{this._finished||this._pushActivity(o)},n=o=>{this._finished||this._popActivity(o)};this.spanRecorder=new di(r,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=nr[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=nr[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let r=Re();this._idleTimeoutCanceledPermanently?(this._finishReason=nr[5],this.finish(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=nr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function ir(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=C().getClient(),r=t||e&&e.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function ui(t,e,r){if(!ir(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({sampleRate:Number(n)})):r.parentSampled!==void 0?n=r.parentSampled:typeof e.tracesSampleRate<"u"?(n=e.tracesSampleRate,t.setMetadata({sampleRate:Number(n)})):(n=1,t.setMetadata({sampleRate:n})),jd(n)?n?(t.sampled=Math.random()<n,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function jd(t){return Dr(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function qd(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function zd(t,e){let r=this.getClient(),n=r&&r.getOptions()||{},o=n.instrumenter||"sentry",i=t.instrumenter||"sentry";o!==i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.
12
+ The transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),t.sampled=!1);let a=new rr(t,this);return a=ui(a,n,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",a),a}function Hn(t,e,r,n,o,i,a){let s=t.getClient(),c=s&&s.getOptions()||{},l=new qr(e,t,r,n,a,o);return l=ui(l,c,{parentSampled:e.parentSampled,transactionContext:e,...i}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),s&&s.emit&&s.emit("startTransaction",l),l}function Un(){let t=Bt();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=zd),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=qd),Ua())}function ar(t,e){return C().captureException(t,{captureContext:e})}function zr(t){C().addBreadcrumb(t)}function Gn(t,e){C().setContext(t,e)}function Yn(t){C().withScope(t)}var Zd="7";function Kd(t){let e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function Xd(t){return`${Kd(t)}${t.projectId}/envelope/`}function Jd(t,e){return Do({sentry_key:t.publicKey,sentry_version:Zd,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Ya(t,e={}){let r=typeof e=="string"?e:e.tunnel,n=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return r||`${Xd(t)}?${Jd(t,n)}`}function Qd(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function $a(t,e,r,n){let o=Fn(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&e&&{dsn:Fe(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Le(i,[a])}function Va(t,e,r,n){let o=Fn(r),i=t.type&&t.type!=="replay_event"?t.type:"event";Qd(t,r&&r.sdk);let a=ri(t,o,n,e);return delete t.sdkProcessingMetadata,Le(a,[[{type:i},t]])}var Wa=[];function eu(t){let e={};return t.forEach(r=>{let{name:n}=r,o=e[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(e[n]=r)}),Object.keys(e).map(r=>e[r])}function fi(t){let e=t.defaultIntegrations||[],r=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...e,...r]:typeof r=="function"?n=Lr(r(e)):n=e;let o=eu(n),i=tu(o,a=>a.name==="Debug");if(i!==-1){let[a]=o.splice(i,1);o.push(a)}return o}function ja(t,e){let r={};return e.forEach(n=>{n&&pi(t,n,r)}),r}function pi(t,e,r){if(r[e.name]=e,Wa.indexOf(e.name)===-1&&(e.setupOnce(si,C),Wa.push(e.name)),t.on&&typeof e.preprocessEvent=="function"){let n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,i)=>n(o,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){let n=e.processEvent.bind(e),o=Object.assign((i,a)=>n(i,a,t),{id:e.name});t.addEventProcessor(o)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Integration installed: ${e.name}`)}function tu(t,e){for(let r=0;r<t.length;r++)if(e(t[r])===!0)return r;return-1}function za(t,e,r,n,o){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,s={...e,event_id:e.event_id||r.event_id||M(),timestamp:e.timestamp||et()},c=r.integrations||t.integrations.map(m=>m.name);ru(s,t),iu(s,c),e.type===void 0&&nu(s,t.stackParser);let l=n;r.captureContext&&(l=ge.clone(l).update(r.captureContext));let u=fe(s),d=o&&o.getEventProcessors?o.getEventProcessors():[];if(l){if(l.getAttachments){let m=[...r.attachments||[],...l.getAttachments()];m.length&&(r.attachments=m)}u=l.applyToEvent(s,r,d)}else u=Jt([...d,...Wr()],s,r);return u.then(m=>(m&&ou(m),typeof i=="number"&&i>0?au(m,i,a):m))}function ru(t,e){let{environment:r,release:n,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?r:Xt),t.release===void 0&&n!==void 0&&(t.release=n),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=ke(t.message,i));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=ke(a.value,i));let s=t.request;s&&s.url&&(s.url=ke(s.url,i))}var qa=new WeakMap;function nu(t,e){let r=I._sentryDebugIds;if(!r)return;let n,o=qa.get(e);o?n=o:(n=new Map,qa.set(e,n));let i=Object.keys(r).reduce((a,s)=>{let c,l=n.get(s);l?c=l:(c=e(s),n.set(s,c));for(let u=c.length-1;u>=0;u--){let d=c[u];if(d.filename){a[d.filename]=r[s];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=i[s.filename])})})}catch{}}function ou(t){let e={};try{t.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let r=t.debug_meta.images;Object.keys(e).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:e[n]})})}function iu(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function au(t,e,r){if(!t)return null;let n={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>({...o,...o.data&&{data:Te(o.data,e,r)}}))},...t.user&&{user:Te(t.user,e,r)},...t.contexts&&{contexts:Te(t.contexts,e,r)},...t.extra&&{extra:Te(t.extra,e,r)}};return t.contexts&&t.contexts.trace&&n.contexts&&(n.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(n.contexts.trace.data=Te(t.contexts.trace.data,e,r))),t.spans&&(n.spans=t.spans.map(o=>(o.data&&(o.data=Te(o.data,e,r)),o))),n}var Za="Not capturing exception because it's already been captured.",Zr=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Cn(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=Ya(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,n){if(xn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Za);return}let o=r&&r.event_id;return this._process(this.eventFromException(e,r).then(i=>this._captureEvent(i,r,n)).then(i=>{o=i})),o}captureMessage(e,r,n,o){let i=n&&n.event_id,a=qt(e)?this.eventFromMessage(String(e),r,n):this.eventFromException(e,n);return this._process(a.then(s=>this._captureEvent(s,n,o)).then(s=>{i=s})),i}captureEvent(e,r,n){if(r&&r.originalException&&xn(r.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Za);return}let o=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(i=>{o=i})),o}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),tt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let r=this._transport;return r?this._isClientDoneProcessing(e).then(n=>r.flush(e).then(o=>n&&o)):fe(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=ja(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){pi(this,e,this._integrations)}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let n=Va(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])n=Qo(n,ti(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let o=this._sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let r=$a(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(e,r,n){if(this._options.sendClientReports){let o=`${e}:${r}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Adding outcome: "${o}"`),this._outcomes[o]=this._outcomes[o]+1||1}}on(e,r){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(r)}emit(e,...r){this._hooks[e]&&this._hooks[e].forEach(n=>n(...r))}_updateSessionFromEvent(e,r){let n=!1,o=!1,i=r.exception&&r.exception.values;if(i){o=!0;for(let c of i){let l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}let a=e.status==="ok";(a&&e.errors===0||a&&n)&&(tt(e,{...n&&{status:"crashed"},errors:e.errors||Number(o||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new U(r=>{let n=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,e&&n>=e&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,n){let o=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i.length>0&&(r.integrations=i),this.emit("preprocessEvent",e,r),za(o,e,r,n,this).then(a=>{if(a===null)return a;let{propagationContext:s}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&s){let{traceId:l,spanId:u,parentSpanId:d,dsc:m}=s;a.contexts={trace:{trace_id:l,span_id:u,parent_span_id:d},...a.contexts};let h=m||ht(l,this,n);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,r={},n){return this._processEvent(e,r,n).then(o=>o.event_id,o=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let i=o;i.logLevel==="log"?p.log(i.message):p.warn(i)}})}_processEvent(e,r,n){let o=this.getOptions(),{sampleRate:i}=o,a=Xa(e),s=Ka(e),c=e.type||"error",l=`before send for type \`${c}\``;if(s&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),kt(new z(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let u=c==="replay_event"?"replay":c;return this._prepareEvent(e,r,n).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",u,e),new z("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return d;let h=cu(o,d,r);return su(h,l)}).then(d=>{if(d===null)throw this.recordDroppedEvent("before_send",u,e),new z(`${l} returned \`null\`, will not send event.`,"log");let m=n&&n.getSession();!a&&m&&this._updateSessionFromEvent(m,d);let h=d.transaction_info;if(a&&h&&d.transaction!==e.transaction){let S="custom";d.transaction_info={...h,source:S}}return this.sendEvent(d,r),d}).then(null,d=>{throw d instanceof z?d:(this.captureException(d,{data:{__sentry__:!0},originalException:d}),new z(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
+ Reason: ${d}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,r=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Error while sending event:",r)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(r=>{let[n,o]=r.split(":");return{reason:n,category:o,quantity:e[r]}})}};function su(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Dt(t))return t.then(n=>{if(!Ee(n)&&n!==null)throw new z(r);return n},n=>{throw new z(`${e} rejected with ${n}`)});if(!Ee(t)&&t!==null)throw new z(r);return t}function cu(t,e,r){let{beforeSend:n,beforeSendTransaction:o}=t;return Ka(e)&&n?n(e,r):Xa(e)&&o?o(e,r):e}function Ka(t){return t.type===void 0}function Xa(t){return t.type==="transaction"}function mi(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?p.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let r=C();r.getScope().update(e.initialScope);let o=new t(e);r.bindClient(o)}var lu=30;function sr(t,e,r=Vo(t.bufferSize||lu)){let n={},o=a=>r.drain(a);function i(a){let s=[];if(kn(a,(d,m)=>{let h=Bn(m);if(oi(n,h)){let S=Ja(d,m);t.recordDroppedEvent("ratelimit_backoff",h,S)}else s.push(d)}),s.length===0)return fe();let c=Le(a[0],s),l=d=>{kn(c,(m,h)=>{let S=Ja(m,h);t.recordDroppedEvent(d,Bn(h),S)})},u=()=>e({body:ei(c,t.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=ii(n,d),d),d=>{throw l("network_error"),d});return r.add(u).then(d=>d,d=>{if(d instanceof z)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Skipped sending event because buffer is full."),l("queue_overflow"),fe();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:o}}function Ja(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}var Kr="7.77.0";var Lt={};To(Lt,{FunctionToString:()=>St,InboundFilters:()=>yt,LinkedErrors:()=>Ft});var Qa,St=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=St.id}setupOnce(){Qa=Function.prototype.toString;try{Function.prototype.toString=function(...e){let r=wt(this)||this;return Qa.apply(r,e)}}catch{}}};St.__initStatic();var du=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],uu=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],yt=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=yt.id,this._options=e}setupOnce(e,r){}processEvent(e,r,n){let o=n.getOptions(),i=fu(this._options,o);return pu(e,i)?null:e}};yt.__initStatic();function fu(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:du],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:uu],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function pu(t,e){return e.ignoreInternal&&yu(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being internal Sentry Error.
14
+ Event: ${be(t)}`),!0):mu(t,e.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
+ Event: ${be(t)}`),!0):gu(t,e.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
+ Event: ${be(t)}`),!0):_u(t,e.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
+ Event: ${be(t)}.
18
+ Url: ${$n(t)}`),!0):hu(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
+ Event: ${be(t)}.
20
+ Url: ${$n(t)}`),!0)}function mu(t,e){return t.type||!e||!e.length?!1:Su(t).some(r=>_t(r,e))}function gu(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?_t(r,e):!1}function _u(t,e){if(!e||!e.length)return!1;let r=$n(t);return r?_t(r,e):!1}function hu(t,e){if(!e||!e.length)return!0;let r=$n(t);return r?_t(r,e):!0}function Su(t){let e=[];t.message&&e.push(t.message);let r;try{r=t.exception.values[t.exception.values.length-1]}catch{}return r&&r.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&e.length===0&&p.error(`Could not extract message for event ${be(t)}`),e}function yu(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Eu(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function $n(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Eu(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Cannot extract url for event ${be(t)}`),null}}var vu="cause",bu=5,Ft=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this._key=e.key||vu,this._limit=e.limit||bu,this.name=Ft.id}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();kr(ai,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};Ft.__initStatic();var T=I,gi=0;function _i(){return gi>0}function Bu(){gi++,setTimeout(()=>{gi--})}function Et(t,e={},r){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(wt(t))return t}catch{return t}let n=function(){let o=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let i=o.map(a=>Et(a,e));return t.apply(this,i)}catch(i){throw Bu(),Yn(a=>{a.addEventProcessor(s=>(e.mechanism&&(Zt(s,void 0,void 0),Xe(s,e.mechanism)),s.extra={...s.extra,arguments:o},s)),ar(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}catch{}Tn(n,t),Ke(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function yi(t,e){let r=Ei(t,e),n={type:e&&e.name,value:Uu(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Fu(t,e,r,n){let i=C().getClient(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Mt(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:Gu(e,{isUnhandledRejection:n})}]},extra:{__serialized__:wn(e,a)}};if(r){let c=Ei(t,r);c.length&&(s.exception.values[0].stacktrace={frames:c})}return s}function hi(t,e){return{exception:{values:[yi(t,e)]}}}function Ei(t,e){let r=e.stacktrace||e.stack||"",n=Hu(e);try{return t(r,n)}catch{}return[]}var Lu=/Minified React error #\d+;/i;function Hu(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Lu.test(t.message))return 1}return 0}function Uu(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function es(t,e,r,n){let o=r&&r.syntheticException||void 0,i=Vn(t,e,o,n);return Xe(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),fe(i)}function ts(t,e,r="info",n,o){let i=n&&n.syntheticException||void 0,a=Si(t,e,i,o);return a.level=r,n&&n.event_id&&(a.event_id=n.event_id),fe(a)}function Vn(t,e,r,n,o){let i;if(jt(e)&&e.error)return hi(t,e.error);if(Sn(e)||Ro(e)){let a=e;if("stack"in e)i=hi(t,e);else{let s=a.name||(Sn(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;i=Si(t,c,r,n),Zt(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Mr(e)?hi(t,e):Ee(e)||Mt(e)?(i=Fu(t,e,r,o),Xe(i,{synthetic:!0}),i):(i=Si(t,e,r,n),Zt(i,`${e}`,void 0),Xe(i,{synthetic:!0}),i)}function Si(t,e,r,n){let o={message:e};if(n&&r){let i=Ei(t,r);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}return o}function Gu(t,{isUnhandledRejection:e}){let r=wo(t),n=e?"promise rejection":"exception";return jt(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:Mt(t)?`Event \`${Yu(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Yu(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function rs(t,{metadata:e,tunnel:r,dsn:n}){let o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!r&&!!n&&{dsn:Fe(n)}},i=$u(t);return Le(o,[i])}function $u(t){return[{type:"user_report"},t]}var Wn=class extends Zr{constructor(e){let r=T.SENTRY_SDK_SOURCE||$o();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${r}:@sentry/browser`,version:Kr}],version:Kr},super(e),e.sendClientReports&&T.document&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return es(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return ts(this._options.stackParser,e,r,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("SDK not enabled, will not capture user feedback.");return}let r=rs(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(e,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Sending outcomes:",e);let r=ni(e,this._options.tunnel&&Fe(this._dsn));this._sendEnvelope(r)}};var Xr;function ns(){if(Xr)return Xr;if(Hr(T.fetch))return Xr=T.fetch.bind(T);let t=T.document,e=T.fetch;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r);let n=r.contentWindow;n&&n.fetch&&(e=n.fetch),t.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Xr=e.bind(T)}function os(){Xr=void 0}function is(t,e=ns()){let r=0,n=0;function o(i){let a=i.body.length;r+=a,n++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15,...t.fetchOptions};try{return e(t.url,s).then(c=>(r-=a,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return os(),r-=a,n--,kt(c)}}return sr(t,o)}var Vu=4;function as(t){function e(r){return new U((n,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===Vu&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(let a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&i.setRequestHeader(a,t.headers[a]);i.send(r.body)})}return sr(t,e)}var jn="?";var Wu=30,ju=40,qu=50;function vi(t,e,r,n){let o={filename:t,function:e,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var zu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ku=t=>{let e=zu.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=Zu.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[n,o]=cs(e[1]||jn,e[2]);return vi(o,n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},Xu=[Wu,Ku],Ju=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ef=t=>{let e=Ju.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=Qu.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],o=e[1]||jn;return[o,n]=cs(o,n),vi(n,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},tf=[qu,ef],rf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,nf=t=>{let e=rf.exec(t);return e?vi(e[2],e[1]||jn,+e[3],e[4]?+e[4]:void 0):void 0},of=[ju,nf];var af=[Xu,tf,of],ss=On(...af),cs=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:jn,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Oe=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=Oe.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:sf,onunhandledrejection:cf}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let r in e){let n=this._installFunc[r];n&&e[r]&&(uf(r),n(),this._installFunc[r]=void 0)}}};Oe.__initStatic();function sf(){H("error",t=>{let[e,r,n]=us();if(!e.getIntegration(Oe))return;let{msg:o,url:i,line:a,column:s,error:c}=t;if(_i()||c&&c.__sentry_own_request__)return;let l=c===void 0&&oe(o)?df(o,i,a,s):ls(Vn(r,c||o,void 0,n,!1),i,a,s);l.level="error",ds(e,c,l,"onerror")})}function cf(){H("unhandledrejection",t=>{let[e,r,n]=us();if(!e.getIntegration(Oe))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch{}if(_i()||o&&o.__sentry_own_request__)return!0;let i=qt(o)?lf(o):Vn(r,o,void 0,n,!0);i.level="error",ds(e,o,i,"onunhandledrejection")})}function lf(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function df(t,e,r,n){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=jt(t)?t.message:t,a="Error",s=i.match(o);return s&&(a=s[1],i=s[2]),ls({exception:{values:[{type:a,value:i}]}},e,r,n)}function ls(t,e,r,n){let o=t.exception=t.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(n,10))?void 0:n,u=isNaN(parseInt(r,10))?void 0:r,d=oe(e)&&e.length>0?e:No();return c.length===0&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function uf(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Global Handler attached: ${t}`)}function ds(t,e,r,n){Xe(r,{handled:!1,type:n}),t.captureEvent(r,{originalException:e})}function us(){let t=C(),e=t.getClient(),r=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,r.stackParser,r.attachStacktrace]}var ff=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],rt=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=rt.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&L(T,"setTimeout",fs),this._options.setInterval&&L(T,"setInterval",fs),this._options.requestAnimationFrame&&L(T,"requestAnimationFrame",pf),this._options.XMLHttpRequest&&"XMLHttpRequest"in T&&L(XMLHttpRequest.prototype,"send",mf);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:ff).forEach(gf)}};rt.__initStatic();function fs(t){return function(...e){let r=e[0];return e[0]=Et(r,{mechanism:{data:{function:ae(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function pf(t){return function(e){return t.apply(this,[Et(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ae(t)},handled:!1,type:"instrument"}})])}}function mf(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&L(r,o,function(i){let a={mechanism:{data:{function:o,handler:ae(i)},handled:!1,type:"instrument"}},s=wt(i);return s&&(a.mechanism.data.handler=ae(s)),Et(i,a)})}),t.apply(this,e)}}function gf(t){let e=T,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(L(r,"addEventListener",function(n){return function(o,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=Et(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ae(i),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[o,Et(i,{mechanism:{data:{function:"addEventListener",handler:ae(i),target:t},handled:!1,type:"instrument"}}),a])}}),L(r,"removeEventListener",function(n){return function(o,i,a){let s=i;try{let c=s&&s.__sentry_wrapped__;c&&n.call(this,o,c,a)}catch{}return n.call(this,o,s,a)}}))}var qn=1024,nt=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=nt.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&H("console",Sf),this.options.dom&&H("dom",hf(this.options.dom)),this.options.xhr&&H("xhr",yf),this.options.fetch&&H("fetch",Ef),this.options.history&&H("history",vf),this.options.sentry){let e=C().getClient();e&&e.on&&e.on("beforeSendEvent",_f)}}};nt.__initStatic();function _f(t){C().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:be(t)},{event:t})}function hf(t){function e(r){let n,o=typeof t=="object"?t.serializeAttribute:void 0,i=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;i&&i>qn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`\`dom.maxStringLength\` cannot exceed ${qn}, but a value of ${i} was configured. Sentry will use ${qn} instead.`),i=qn),typeof o=="string"&&(o=[o]);try{let a=r.event;n=bf(a)?Be(a.target,{keyAttrs:o,maxStringLength:i}):Be(a,{keyAttrs:o,maxStringLength:i})}catch{n="<unknown>"}n.length!==0&&C().addBreadcrumb({category:`ui.${r.name}`,message:n},{event:r.event,name:r.name,global:r.global})}return e}function Sf(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Wo(t.level),message:yn(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${yn(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;C().addBreadcrumb(e,{input:t.args,level:t.level})}function yf(t){let{startTimestamp:e,endTimestamp:r}=t,n=t.xhr[Je];if(!e||!r||!n)return;let{method:o,url:i,status_code:a,body:s}=n,c={method:o,url:i,status_code:a},l={xhr:t.xhr,input:s,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ef(t){let{startTimestamp:e,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let n=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"fetch",data:n,level:"error",type:"http"},o)}else{let n={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:r};C().addBreadcrumb({category:"fetch",data:n,type:"http"},o)}}function vf(t){let e=t.from,r=t.to,n=Gr(T.location.href),o=Gr(e),i=Gr(r);o.path||(o=n),n.protocol===i.protocol&&n.host===i.host&&(r=i.relative),n.protocol===o.protocol&&n.host===o.host&&(e=o.relative),C().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}function bf(t){return!!t&&!!t.target}var Cf="cause",Tf=5,ot=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=ot.id,this._key=e.key||Cf,this._limit=e.limit||Tf}setupOnce(){}preprocessEvent(e,r,n){let o=n.getOptions();kr(yi,o.stackParser,o.maxValueLength,this._key,this._limit,e,r)}};ot.__initStatic();var it=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=it.id}setupOnce(){}preprocessEvent(e){if(!T.navigator&&!T.location&&!T.document)return;let r=e.request&&e.request.url||T.location&&T.location.href,{referrer:n}=T.document||{},{userAgent:o}=T.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...o&&{"User-Agent":o}},a={...e.request,...r&&{url:r},headers:i};e.request=a}};it.__initStatic();var at=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=at.id}setupOnce(e,r){}processEvent(e){if(e.type)return e;try{if(Rf(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};at.__initStatic();function Rf(t,e){return e?!!(xf(t,e)||Of(t,e)):!1}function xf(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!_s(t,e)||!gs(t,e))}function Of(t,e){let r=ps(e),n=ps(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!_s(t,e)||!gs(t,e))}function gs(t,e){let r=ms(t),n=ms(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],a=r[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function _s(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ps(t){return t.exception&&t.exception.values&&t.exception.values[0]}function ms(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var Ss=[new Lt.InboundFilters,new Lt.FunctionToString,new rt,new nt,new Oe,new ot,new at,new it];function bi(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=Ss),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),T.SENTRY_RELEASE&&T.SENTRY_RELEASE.id&&(t.release=T.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:Bo(t.stackParser||ss),integrations:fi(t),transport:t.transport||(Pn()?is:as)};mi(Wn,e),t.autoSessionTracking&&Pf()}function hs(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Pf(){if(typeof T.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=C();t.captureSession&&(hs(t),H("history",({from:e,to:r})=>{e===void 0||e===r||hs(C())}))}var Ci={};To(Ci,{Breadcrumbs:()=>nt,Dedupe:()=>at,GlobalHandlers:()=>Oe,HttpContext:()=>it,LinkedErrors:()=>ot,TryCatch:()=>rt});var R=I;function ys(){R&&R.document?R.document.addEventListener("visibilitychange",()=>{let t=xe();if(R.document.hidden&&t){let e="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var cr=(t,e,r)=>{let n,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(n||0),(o||n===void 0)&&(n=e.value,e.delta=o,t(e)))}};var Es=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var If=()=>{let t=R.performance.timing,e=R.performance.navigation.type,r={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(let n in t)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(t[n]-t.navigationStart,0));return r},zn=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||If()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Zn=()=>{let t=zn();return t&&t.activationStart||0};var lr=(t,e)=>{let r=zn(),n="navigate";return r&&(R.document.prerendering||Zn()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:Es(),navigationType:n}};var vt=(t,e,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let n=new PerformanceObserver(o=>{e(o.getEntries())});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}};var bt=(t,e)=>{let r=n=>{(n.type==="pagehide"||R.document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)};var vs=t=>{let e=lr("CLS",0),r,n=0,o=[],i=s=>{s.forEach(c=>{if(!c.hadRecentInput){let l=o[0],u=o[o.length-1];n&&o.length!==0&&c.startTime-u.startTime<1e3&&c.startTime-l.startTime<5e3?(n+=c.value,o.push(c)):(n=c.value,o=[c]),n>e.value&&(e.value=n,e.entries=o,r&&r())}})},a=vt("layout-shift",i);if(a){r=cr(t,e);let s=()=>{i(a.takeRecords()),r(!0)};return bt(s),s}};var Kn=-1,Nf=()=>R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0,Af=()=>{bt(({timeStamp:t})=>{Kn=t},!0)},dr=()=>(Kn<0&&(Kn=Nf(),Af()),{get firstHiddenTime(){return Kn}});var bs=t=>{let e=dr(),r=lr("FID"),n,o=s=>{s.startTime<e.firstHiddenTime&&(r.value=s.processingStart-s.startTime,r.entries.push(s),n(!0))},i=s=>{s.forEach(o)},a=vt("first-input",i);n=cr(t,r),a&&bt(()=>{i(a.takeRecords()),a.disconnect()},!0)};var Cs={},Ts=t=>{let e=dr(),r=lr("LCP"),n,o=a=>{let s=a[a.length-1];if(s){let c=Math.max(s.startTime-Zn(),0);c<e.firstHiddenTime&&(r.value=c,r.entries=[s],n())}},i=vt("largest-contentful-paint",o);if(i){n=cr(t,r);let a=()=>{Cs[r.id]||(o(i.takeRecords()),i.disconnect(),Cs[r.id]=!0,n(!0))};return["keydown","click"].forEach(s=>{addEventListener(s,a,{once:!0,capture:!0})}),bt(a,!0),a}};var Jr={},Xn={},Rs,xs,Os;function Ps(t){return Ti("cls",t,Mf,Rs)}function Is(t){return Ti("lcp",t,wf,Os)}function Ns(t){return Ti("fid",t,Df,xs)}function Qr(t,e){return As(t,e),Xn[t]||(kf(t),Xn[t]=!0),Ms(t,e)}function Jn(t,e){let r=Jr[t];if(!(!r||!r.length))for(let n of r)try{n(e)}catch(o){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
21
+ Type: ${t}
22
+ Name: ${ae(n)}
23
+ Error:`,o)}}function Mf(){vs(t=>{Jn("cls",{metric:t}),Rs=t})}function Df(){bs(t=>{Jn("fid",{metric:t}),xs=t})}function wf(){Ts(t=>{Jn("lcp",{metric:t}),Os=t})}function Ti(t,e,r,n){return As(t,e),Xn[t]||(r(),Xn[t]=!0),n&&e({metric:n}),Ms(t,e)}function kf(t){let e={};t==="event"&&(e.durationThreshold=0),vt(t,r=>{Jn(t,{entries:r})},e)}function As(t,e){Jr[t]=Jr[t]||[],Jr[t].push(e)}function Ms(t,e){return()=>{let r=Jr[t];if(!r)return;let n=r.indexOf(e);n!==-1&&r.splice(n,1)}}function Qn(t){return typeof t=="number"&&isFinite(t)}function Ht(t,{startTimestamp:e,...r}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...r})}function $(t){return t/1e3}function ws(){return R&&R.addEventListener&&R.performance}var Ds=0,w={},He,en;function ks(){let t=ws();if(t&&se){t.mark&&R.performance.mark("sentry-tracing-init");let e=Lf(),r=Bf(),n=Ff();return()=>{e(),r(),n()}}return()=>{}}function Bs(){Qr("longtask",({entries:t})=>{for(let e of t){let r=xe();if(!r)return;let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}})}function Fs(){Qr("event",({entries:t})=>{for(let e of t){let r=xe();if(!r)return;if(e.name==="click"){let n=$(se+e.startTime),o=$(e.duration);r.startChild({description:Be(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+o})}}})}function Bf(){return Ps(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS"),w.cls={value:t.value,unit:""},en=e)})}function Ff(){return Is(({metric:t})=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP"),w.lcp={value:t.value,unit:"millisecond"},He=e)})}function Lf(){return Ns(({metric:t})=>{let e=t.entries.pop();if(!e)return;let r=$(se),n=$(e.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FID"),w.fid={value:t.value,unit:"millisecond"},w["mark.fid"]={value:r+n,unit:"second"}})}function Ls(t){let e=ws();if(!e||!R.performance.getEntries||!se)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Adding & adjusting spans using Performance API");let r=$(se),n=e.getEntries(),o,i;if(n.slice(Ds).forEach(a=>{let s=$(a.startTime),c=$(a.duration);if(!(t.op==="navigation"&&r+s<t.startTimestamp))switch(a.entryType){case"navigation":{Uf(t,a,r),o=r+$(a.responseStart),i=r+$(a.requestStart);break}case"mark":case"paint":case"measure":{Hf(t,a,s,c,r);let l=dr(),u=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FP"),w.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FCP"),w.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(R.location.origin,"");Yf(t,a,l,s,c,r);break}}}),Ds=Math.max(n.length-1,0),$f(t),t.op==="pageload"){typeof o=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding TTFB"),w.ttfb={value:(o-t.startTimestamp)*1e3,unit:"millisecond"},typeof i=="number"&&i<=o&&(w["ttfb.requestTime"]={value:(o-i)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(s=>{if(!w[s]||r>=t.startTimestamp)return;let c=w[s].value,l=r+$(c),u=Math.abs((l-t.startTimestamp)*1e3),d=u-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Measurements] Normalized ${s} from ${c} to ${u} (${d})`),w[s].value=u});let a=w["mark.fid"];a&&w.fid&&(Ht(t,{description:"first input delay",endTimestamp:a.value+$(w.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete w["mark.fid"]),"fcp"in w||delete w.cls,Object.keys(w).forEach(s=>{t.setMeasurement(s,w[s].value,w[s].unit)}),Vf(t)}He=void 0,en=void 0,w={}}function Hf(t,e,r,n,o){let i=o+r,a=i+n;return Ht(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Uf(t,e,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{eo(t,e,n,r)}),eo(t,e,"secureConnection",r,"TLS/SSL","connectEnd"),eo(t,e,"fetch",r,"cache","domainLookupStart"),eo(t,e,"domainLookup",r,"DNS"),Gf(t,e,r)}function eo(t,e,r,n,o,i){let a=i?e[i]:e[`${r}End`],s=e[`${r}Start`];!s||!a||Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:o||r,startTimestamp:n+$(s),endTimestamp:n+$(a)})}function Gf(t,e,r){Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+$(e.requestStart),endTimestamp:r+$(e.responseEnd)}),Ht(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+$(e.responseStart),endTimestamp:r+$(e.responseEnd)})}function Yf(t,e,r,n,o,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);let s=i+n,c=s+o;Ht(t,{description:r,endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:s,data:a})}function $f(t){let e=R.navigator;if(!e)return;let r=e.connection;r&&(r.effectiveType&&t.setTag("effectiveConnectionType",r.effectiveType),r.type&&t.setTag("connectionType",r.type),Qn(r.rtt)&&(w["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Qn(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Qn(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function Vf(t){He&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP Data"),He.element&&t.setTag("lcp.element",Be(He.element)),He.id&&t.setTag("lcp.id",He.id),He.url&&t.setTag("lcp.url",He.url.trim().slice(0,200)),t.setTag("lcp.size",He.size)),en&&en.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS Data"),en.sources.forEach((e,r)=>t.setTag(`cls.source.${r+1}`,Be(e.node))))}var Ri=["localhost",/^\/(?!\/)/],tn={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ri,tracePropagationTargets:Ri};function xi(t){let{traceFetch:e,traceXHR:r,tracePropagationTargets:n,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:tn.traceFetch,traceXHR:tn.traceXHR,...t},s=typeof i=="function"?i:u=>!0,c=u=>zf(u,n||o),l={};e&&H("fetch",u=>{let d=Zf(u,s,c,l);a&&d&&Hs(d)}),r&&H("xhr",u=>{let d=Xf(u,s,c,l);a&&d&&Hs(d)})}function Wf(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Hs(t){let e=t.data.url;if(!e)return;let r=Qr("resource",({entries:n})=>{n.forEach(o=>{Wf(o)&&o.name.endsWith(e)&&(qf(o).forEach(a=>t.setData(...a)),setTimeout(r))})})}function jf(t){let e="unknown",r="unknown",n="";for(let o of t){if(o==="/"){[e,r]=t.split("/");break}if(!isNaN(Number(o))){e=n==="h"?"http":n,r=t.split(n)[1];break}n+=o}return n===t&&(e=n),{name:e,version:r}}function Ue(t=0){return((se||performance.timeOrigin)+t)/1e3}function qf(t){let{name:e,version:r}=jf(t.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",e]),se?[...n,["http.request.redirect_start",Ue(t.redirectStart)],["http.request.fetch_start",Ue(t.fetchStart)],["http.request.domain_lookup_start",Ue(t.domainLookupStart)],["http.request.domain_lookup_end",Ue(t.domainLookupEnd)],["http.request.connect_start",Ue(t.connectStart)],["http.request.secure_connection_start",Ue(t.secureConnectionStart)],["http.request.connection_end",Ue(t.connectEnd)],["http.request.request_start",Ue(t.requestStart)],["http.request.response_start",Ue(t.responseStart)],["http.request.response_end",Ue(t.responseEnd)]]:n}function zf(t,e){return _t(t,e||Ri)}function Zf(t,e,r,n){if(!ir()||!t.fetchData)return;let o=e(t.fetchData.url);if(t.endTimestamp&&o){let m=t.fetchData.__span;if(!m)return;let h=n[m];if(h){if(t.response){h.setHttpStatus(t.response.status);let S=t.response&&t.response.headers&&t.response.headers.get("content-length"),y=parseInt(S);y>0&&h.setData("http.response_content_length",y)}else t.error&&h.setStatus("internal_error");h.finish(),delete n[m]}return}let i=C(),a=i.getScope(),s=i.getClient(),c=a.getSpan(),{method:l,url:u}=t.fetchData,d=o&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(d&&(t.fetchData.__span=d.spanId,n[d.spanId]=d),r(t.fetchData.url)&&s){let m=t.args[0];t.args[1]=t.args[1]||{};let h=t.args[1];h.headers=Kf(m,s,a,h,d)}return d}function Kf(t,e,r,n,o){let i=o||r.getSpan(),a=i&&i.transaction,{traceId:s,sampled:c,dsc:l}=r.getPropagationContext(),u=i?i.toTraceparent():Kt(s,void 0,c),d=a?a.getDynamicSamplingContext():l||ht(s,e,r),m=Vr(d),h=typeof Request<"u"&&ue(t,Request)?t.headers:n.headers;if(h)if(typeof Headers<"u"&&ue(h,Headers)){let S=new Headers(h);return S.append("sentry-trace",u),m&&S.append($r,m),S}else if(Array.isArray(h)){let S=[...h,["sentry-trace",u]];return m&&S.push([$r,m]),S}else{let S="baggage"in h?h.baggage:void 0,y=[];return Array.isArray(S)?y.push(...S):S&&y.push(S),m&&y.push(m),{...h,"sentry-trace":u,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":u,baggage:m}}function Xf(t,e,r,n){let o=t.xhr,i=o&&o[Je];if(!ir()||o&&o.__sentry_own_request__||!o||!i)return;let a=e(i.url);if(t.endTimestamp&&a){let d=o.__sentry_xhr_span_id__;if(!d)return;let m=n[d];m&&(m.setHttpStatus(i.status_code),m.finish(),delete n[d]);return}let s=C(),c=s.getScope(),l=c.getSpan(),u=a&&l?l.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(u&&(o.__sentry_xhr_span_id__=u.spanId,n[o.__sentry_xhr_span_id__]=u),o.setRequestHeader&&r(i.url))if(u){let d=u&&u.transaction,m=d&&d.getDynamicSamplingContext(),h=Vr(m);Us(o,u.toTraceparent(),h)}else{let d=s.getClient(),{traceId:m,sampled:h,dsc:S}=c.getPropagationContext(),y=Kt(m,void 0,h),D=S||(d?ht(m,d,c):void 0),P=Vr(D);Us(o,y,P)}return u}function Us(t,e,r){try{t.setRequestHeader("sentry-trace",e),r&&t.setRequestHeader($r,r)}catch{}}function Gs(t,e=!0,r=!0){if(!R||!R.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not initialize routing instrumentation due to invalid location");return}let n=R.location.href,o;e&&(o=t({name:R.location.pathname,startTimestamp:se?se/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&H("history",({to:i,from:a})=>{if(a===void 0&&n&&n.indexOf(i)!==-1){n=void 0;return}a!==i&&(n=void 0,o&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing current transaction with op: ${o.op}`),o.finish()),o=t({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var $s="BrowserTracing",Jf={...or,markBackgroundTransactions:!0,routingInstrumentation:Gs,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...tn},ur=class{constructor(e){this.name=$s,this._hasSetTracePropagationTargets=!1,Un(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Jf,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=ks(),this.options.enableLongTask&&Bs(),this.options._experiments.enableInteractions&&Fs()}setupOnce(e,r){this._getCurrentHub=r;let o=r().getClient(),i=o&&o.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:c,markBackgroundTransactions:l,traceFetch:u,traceXHR:d,shouldCreateSpanForRequest:m,enableHTTPTimings:h,_experiments:S}=this.options,y=i&&i.tracePropagationTargets,D=y||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&y&&p.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(P=>{let b=this._createRouteTransaction(P);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(b,P,r),b},c,s),l&&ys(),S.enableInteractions&&this._registerInteractionListener(),xi({traceFetch:u,traceXHR:d,tracePropagationTargets:D,shouldCreateSpanForRequest:m,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let r=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:o,finalTimeout:i,heartbeatInterval:a}=this.options,s=e.op==="pageload",c=s?Ys("sentry-trace"):"",l=s?Ys("baggage"):"",{traceparentData:u,dynamicSamplingContext:d,propagationContext:m}=Xo(c,l),h={...e,...u,metadata:{...e.metadata,dynamicSamplingContext:u&&!d?{}:d},trimEnd:!0},S=typeof n=="function"?n(h):h,y=S===void 0?{...h,sampled:!1}:S;y.metadata=y.name!==h.name?{...y.metadata,source:"custom"}:y.metadata,this._latestRouteName=y.name,this._latestRouteSource=y.metadata&&y.metadata.source,y.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Will not send ${y.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Starting ${y.op} transaction on scope`);let{location:D}=R,P=Hn(r,y,o,i,!0,{location:D},a),b=r.getScope();return s&&u?b.setPropagationContext(m):b.setPropagationContext({traceId:P.traceId,spanId:P.spanId,parentSpanId:P.parentSpanId,sampled:P.sampled}),P.registerBeforeFinishCallback(ce=>{this._collectWebVitals(),Ls(ce)}),P}_registerInteractionListener(){let e,r=()=>{let{idleTimeout:n,finalTimeout:o,heartbeatInterval:i}=this.options,a="ui.action.click",s=xe();if(s&&s.op&&["navigation","pageload"].includes(s.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=R,u={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Hn(c,u,n,o,!0,{location:l},i)};["click"].forEach(n=>{addEventListener(n,r,{once:!1,capture:!0})})}};function Ys(t){let e=Ao(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}var Vs={};T.Sentry&&T.Sentry.Integrations&&(Vs=T.Sentry.Integrations);var Uy={...Vs,...Lt,...Ci};var Qf=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Qf.SENTRY_RELEASE={id:"3.1.3--prototype.2"};var Ws=!1;function ep(){bi({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.3--prototype.2",integrations:[new ur],tracesSampleRate:1}),Ws=!0}var _e=t=>(Ws||ep(),ar(t));var Js=A(require("react"));var Pi="[Duffel Ancillaries] ",qs="duffel-ancillaries-logger-state",js=!1,tp=t=>{localStorage.setItem(qs,t.toString())},zs=()=>localStorage.getItem(qs)==="true",to=t=>{tp(t),t&&!js&&console.info(Pi,`
40
24
 
41
25
  Debug mode is enabled. Information about your setup will be printed to the console.
42
26
 
43
27
  If you do not want to enable debug mode (for example in a production environment), pass "debug: false" when initializing this component.
44
28
 
45
29
  Learn more about the Ancillaries component:
46
- http://duffel.com/docs/guides/ancillaries-component`),vg=!0},bg=t=>{Cg()?console.info(Ll,t):ra({category:"log",message:t})};function or(t,n){let i=[];Array.isArray(n)?i=n:i=Object.entries(n).map(([a,s])=>({property:a,value:s})),Cg()?(console.groupCollapsed(Ll,t),i.forEach(a=>{console.info(a)}),console.groupEnd()):ra({category:"log.group",message:t,data:n})}var Z=require("react/jsx-runtime"),Tg={add:(0,Z.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,Z.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,Z.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,Z.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,Z.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,Z.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,Z.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,Z.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,Z.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,Z.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,Z.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,Z.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,Z.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,Z.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,Z.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,Z.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,Z.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,Z.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,Z.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,Z.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,Z.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,Z.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,Z.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,Z.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,Z.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,Z.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,Z.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,Z.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,Z.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,Z.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,Z.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},eT=t=>t in Tg?Tg[t]:(bg(`The icon "${t}" is missing from ICON_MAP`),null),pe=({name:t,size:n,className:i,viewBox:a,style:s})=>(0,Z.jsx)("svg",{className:i,width:n||24,height:n||24,viewBox:a||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...s},children:eT(t)});var Rg=ge(yn());var Zs=require("react/jsx-runtime"),tT={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},nT={32:"button--32",40:"button--40",48:"button--48"},Qe=({iconBefore:t,variant:n="primary",size:i=40,children:a,className:s,type:u="button",...l})=>(0,Zs.jsxs)("button",{type:u,className:(0,Rg.default)("button",tT[n],nT[i],s),...l,children:[t&&(0,Zs.jsx)(pe,{className:"duffel-button__icon duffel-button__icon--before",name:t}),a]});var kl=require("react/jsx-runtime"),ao=({style:t,children:n})=>(0,kl.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,kl.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:n})});var _i=require("react/jsx-runtime"),so=class extends xg.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){Xt(n)}render(){return this.state.hasError?(0,_i.jsxs)(ao,{children:[(0,_i.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,_i.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,_i.jsx)("div",{children:(0,_i.jsx)(Qe,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var yi=require("react/jsx-runtime"),Ag=({height:t,message:n})=>(0,yi.jsxs)(ao,{style:{minHeight:t},children:[(0,yi.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,yi.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:n||"Please try reloading. If the problem persists reach out to our support team."}),(0,yi.jsx)("div",{children:(0,yi.jsx)(Qe,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var co=t=>t.reduce((n,{id:i,total_amount:a,total_currency:s})=>({[i]:{total_amount:a,total_currency:s},...n}),{});var Fr=(t,n,i)=>{if(!t||n.length===0)return 0;let a=co(t.available_services);return ca(a,n,i)},ca=(t,n,i)=>n.reduce((a,{quantity:s,id:u})=>{let l=a;return u in t?l+=s*+t[u].total_amount:i?l+=s*rT(u,i):Xt(new Error(`The service id (${u}) provided could not be found in neither the offer nor the seat maps.`)),l},0),rT=(t,n)=>{for(let i of n)for(let a of i.cabins)for(let s of a.rows)for(let u of s.sections)for(let l of u.elements)if(l.type==="seat"&&Array.isArray(l.available_services)){let p=l.available_services.find(m=>m.id===t);if(p)return+p.total_amount}return 0};var Og=({baggageSelectedServices:t,seatSelectedServices:n,cfarSelectedServices:i,offer:a,seatMaps:s,passengers:u})=>{let l=[...t,...n,...i],p=+a.total_amount+Fr(a,l,s);return{...a&&{selected_offers:[a.id]},passengers:u,services:iT(l),...a&&{payments:[{type:"balance",amount:`${p}`,currency:a.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.2--prototype.2"}}},iT=t=>Array.isArray(t)?t.filter(({quantity:n})=>n>0).map(({id:n,quantity:i})=>({id:n,quantity:i})):[];var Fl=t=>(n,i)=>{let{rate:a,amount:s}=t;return{amount:n*(1+a)+s,currency:i}},Ul="You cannot supply both markup and priceFormatters for the same service.",Ig=(t,n)=>{let i={};if(n&&(n.bags&&(i.bags=n.bags),n.seats&&(i.seats=n.seats),n.cancel_for_any_reason&&(i.cancel_for_any_reason=n.cancel_for_any_reason)),t){if(t.bags){if(n&&n.bags)throw new Error(Ul);i.bags=Fl(t.bags)}if(t.seats){if(n&&n.seats)throw new Error(Ul);i.seats=Fl(t.seats)}if(t.cancel_for_any_reason){if(n&&n.cancel_for_any_reason)throw new Error(Ul);i.cancel_for_any_reason=Fl(t.cancel_for_any_reason)}}return i};var Xs=t=>t.type==="baggage";var uo=t=>t.type==="cancel_for_any_reason";var oT=(t,n)=>`${t} must all have the same currency, but they have ${n.size} different currencies (${[...n].join(", ")}). Check the price formatters passed into the component's render function.`,wg=(t,n)=>{if(!n)return t;let i=t.available_services,a=new Set,s={baggage:n?.bags,cancel_for_any_reason:n?.cancel_for_any_reason},u=i.map(l=>{let p={...l};if(l.type in s&&s[l.type]){let{total_amount:m,total_currency:h}=l;if(Xs(l)){let{amount:S,currency:v}=s[l.type](+l.total_amount,l.total_currency,l);m=S.toString(),v&&(h=v)}if(uo(l)){let{amount:S,currency:v}=s[l.type](+l.total_amount,l.total_currency,l);m=S.toString(),v&&(h=v)}if(a.add(h),a.size>1)throw new Error(oT(l.type,a));p.total_amount=m,p.total_currency=h}return p});return{...t,available_services:u}};function js(t){return t.type==="seat"}var aT=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,sT=(t,n,i)=>{let a={...t};if(js(a)&&a.available_services.length>0){let s=a.available_services.map(u=>{let l={...u},{amount:p,currency:m}=n(+u.total_amount,u.total_currency,u);if(l.total_amount=p.toString(),m&&(l.total_currency=m,i.add(m),i.size>1))throw new Error(aT(i));return l});a.available_services=s}return a},Pg=(t,n)=>{if(!n)return t;let i=new Set;return t.map(s=>{let u=s.cabins.map(l=>{let p=l.rows.map(m=>{let h=m.sections.map(S=>{let v=S.elements.map(I=>sT(I,n,i));return{...S,elements:v}});return{...m,sections:h}});return{...l,rows:p}});return{...s,cabins:u}})};var Js=t=>{let n=t.split(", ").map(a=>parseInt(a));return(.2126*n[0]+.7152*n[1]+.0722*n[2])/255>.5};var Ng=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var Mg=t=>t.expires_at&&new Date(t.expires_at)<new Date;var ua=t=>"data"in t&&Array.isArray(t.data.errors),cT="https://api.duffel.com",uT="3.1.2--prototype.2";async function Qs(t,n,i="GET",a){or("Making request to the Duffel API",{path:n,method:i});let s=`${cT}/ancillaries-component/${n}`,u=null;try{u=await fetch(s,{method:i,body:a,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${uT}`}})}catch(p){throw or("Failed to make request to the Duffel API",{error:p}),p}let l=await u.json();if(Array.isArray(l.errors))throw or("Request to the Duffel API failed",{operation:`${i} ${s}`,method:i,request_id:l?.meta?.request_id,errors:l.errors,status:u.status}),{...u,data:l};return or("Request to the Duffel succeeded",{request_id:l?.meta?.request_id}),l}var Dg="https://assets.duffel.com/components/3.1.2--prototype.2",Bg=async t=>await(await fetch(Dg+`/fixtures/offers/${t}.json`)).json(),Lg=async t=>await(await fetch(Dg+`/fixtures/seat-maps/${t}.json`)).json();var ec=t=>t.startsWith("fixture_off_");async function kg(t,n){return(await Qs(n,`offers/${t}?return_available_services=true`)).data}async function Fg(t,n,i,a,s){a(!0);let u=ec(t);if(t=u?t.replace("fixture_",""):t,u)return Bg(t).then(l=>{a(!1),s(l)});if(!n)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let l=await kg(t,n);s(l)}catch(l){let p="An unknown error occurred while retrieving the offer.";l instanceof Error?(p=l.message,l.message.includes("Load failed")&&(p="The Duffel API is not available. Please try again later.")):ua(l)&&l.status===404&&(p="The offer you are looking for does not exist or has expired."),ua(l)&&l.status>=500&&l.status<600&&Xt(new Error(p)),i(p)}finally{a(!1)}}async function Ug(t,n){return(await Qs(n,`offers/${t}/seat_maps`)).data}async function Gg(t,n,i,a,s){a(!0);let u=ec(t);if(t=u?t.replace("fixture_",""):t,u)return Lg(t).then(l=>{a(!1),s(l)});if(!n)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let l=await Ug(t,n);s(l)}catch(l){let p="An unknown error occurred while retrieving the seat maps.";l instanceof Error?(p=l.message,l.message.includes("Load failed")&&(p="The Duffel API is not available. Please try again later.")):ua(l)&&(p=l.data.errors[0]?.message||"Received an unknown error from the Duffel API."),Xt(new Error(p)),i()}finally{a(!1)}}var Gl=t=>lT(t)&&(Hl(t)||$l(t)||Yl(t)||Wl(t)),lT=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,Hl=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),$l=t=>"offer_id"in t&&"client_key"in t,Yl=t=>"offer"in t&&"seat_maps"in t,Wl=t=>"offer"in t&&"client_key"in t;var wt=ge(require("react"));var Hg=require("react/jsx-runtime"),lo=()=>(0,Hg.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var $g=require("react/jsx-runtime"),ar=({backgroundColor:t,color:n,children:i})=>(0,$g.jsx)("div",{style:{backgroundColor:t,color:n,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:i});var fo=(t,n)=>{if(t.available_services.length===0)throw new Error("No services available");let i=t.available_services.find(a=>a.type===n);if(!i)throw new Error(`No ${n} services available`);return i.total_currency};var Dn=t=>t.reduce((n,{quantity:i})=>n+i,0);var fT={baggage:Xs,cancel_for_any_reason:uo},po=(t,n)=>{let i=fT[n];if(!i)throw new Error(`Unknown service type: ${n}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(a=>i(a)&&a.maximum_quantity>0)};var Ue=(t,n="en-GB",i={})=>a=>{try{let u=new Intl.NumberFormat(n,{style:"currency",currency:t,...i}).format(a);return i&&i.signDisplay&&(i.signDisplay==="always"||i.signDisplay==="exceptZero"&&a!==0)?u.replace(/^([+-])/,"$1 "):u}catch{return`${a} ${t}`}};var Sn=(t,n,i)=>t==1?`${t} ${n}`:`${t} ${i}`;var ah=ge(require("react"));var Yg=ge(yn()),Wg=ge(require("react"));var jt=require("react/jsx-runtime"),mo=({buttonTitle:t,title:n,icon:i,copy:a,onClick:s,children:u,isLoading:l,disabled:p,isSelected:m})=>{let h=Wg.Children.toArray(u).length>0;return(0,jt.jsxs)("button",{title:t,...s&&{onClick:s},disabled:p,className:(0,Yg.default)("ancillary-card",l&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,jt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,jt.jsx)("div",{children:m?(0,jt.jsx)(pe,{name:"check",className:"ancillary-card__selected-icon"}):(0,jt.jsx)(pe,{name:i})}),(0,jt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,jt.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:n}),(0,jt.jsx)("div",{className:"ancillary-card__children",children:h?u:(0,jt.jsx)(pe,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,jt.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:a})]})};var Vl=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var qg=ge(yn()),zg=ge(require("react"));var Vg=ge(yn());var ql=require("react/jsx-runtime"),pT={primary:"icon-button--primary",outlined:"icon-button--outlined"},la=({icon:t,variant:n="primary",className:i,...a})=>(0,ql.jsx)("button",{type:"button",className:(0,Vg.default)("icon-button",pT[n],i),...a,children:(0,ql.jsx)(pe,{name:t})});var go=require("react/jsx-runtime"),ho=({children:t,onClose:n,isOpen:i})=>(zg.useEffect(()=>(Vl(!i),()=>Vl(!0)),[i]),(0,go.jsx)("div",{className:(0,qg.default)("modal",i&&"modal--open"),style:{opacity:0},children:(0,go.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,go.jsx)(la,{icon:"close",onClick:n,title:"Close modal",className:"modal--close-button"})]})})),_o=({children:t})=>(0,go.jsx)("div",{className:"modal-body",children:t});var tc=t=>t.reduce((n,i)=>({[i.id]:i,...n}),{});var nc=t=>t.slices.reduce((n,i)=>[...n,...i.segments],new Array);var oc=ge(require("react"));var rc=(t,n,i)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:n?.given_name&&n?.family_name?`${n.given_name} ${n.family_name}`:n?.given_name?n.given_name:n?.family_name?n.family_name:`Passenger ${i}`:`Passenger ${i}`;var Kg=t=>{if(!t)return Xt(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let n=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,i="";n&&(i=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let a="";return t.maximum_weight_kg&&(a=`Up to ${t.maximum_weight_kg}kg`),`${a}${i}`};var Zg=(t,n,i,a)=>t.some(s=>s.id===a.id||s.serviceInformation?.type!=="carry_on"&&s.serviceInformation?.type!=="checked"||s.serviceInformation?.segmentId!==n||s.serviceInformation?.passengerId!==i?!1:s.serviceInformation?.type===a.metadata.type);var yo=require("react/jsx-runtime"),Xg=({id:t,min:n,max:i,value:a,onChange:s})=>(0,yo.jsxs)("div",{className:"counter",id:t,children:[(0,yo.jsx)(la,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:a<=n,onClick:()=>s(Math.max(a-1,n))}),(0,yo.jsx)("div",{className:"counter__count-label",children:a}),(0,yo.jsx)(la,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:a>=i,onClick:()=>s(Math.min(a+1,i))})]});var sr=require("react/jsx-runtime"),jg=({segmentId:t,passengerId:n,availableService:i,quantity:a,onQuantityChanged:s,selectedServices:u})=>{let l=i.metadata.type==="carry_on"?"Cabin bag":"Checked bag",p=Ue(i.total_currency)(+i.total_amount),m=Kg(i.metadata),h=Zg(u,t,n,i);return(0,sr.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,sr.jsxs)("div",{children:[(0,sr.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[l,(0,sr.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,sr.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${i.id}--${n}`,children:p})]}),(0,sr.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:m})]}),(0,sr.jsx)(Xg,{id:`counter--${i.id}--${n}`,min:0,value:a,onChange:s,max:h?0:i.maximum_quantity})]})};var Qg=require("react/jsx-runtime"),Jg=({includedBaggage:t})=>{let{carryOnBagsQuantity:n,checkedBagsQuantity:i}=t.reduce((s,{type:u,quantity:l})=>({carryOnBagsQuantity:s.carryOnBagsQuantity+(u==="carry_on"?l:0),checkedBagsQuantity:s.checkedBagsQuantity+(u==="checked"?l:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),a=new Array;return n>0&&a.push(Sn(n,"cabin bag","cabin bags")),i>0&&a.push(Sn(i,"checked bag","checked bags")),(0,Qg.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[a.join(" and ")," included with ticket"]})};var Ur=require("react/jsx-runtime"),eh=({segmentId:t,passengerId:n,passengerName:i,includedBaggage:a,passengerServicesForSegment:s,selectedServices:u,setSelectedServices:l})=>{let p=a.reduce((m,h)=>m+h.quantity,0);return(0,Ur.jsxs)("div",{style:{marginTop:"24px"},children:[(0,Ur.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:i}),p?(0,Ur.jsx)(Jg,{includedBaggage:a}):null,(0,Ur.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:s.map(m=>(0,Ur.jsx)(jg,{passengerId:n,segmentId:t,availableService:m,selectedServices:u,quantity:u.find(({id:h})=>h==m.id)?.quantity||0,onQuantityChanged:h=>dT(h,t,n,i,m,u,l)},m.id))}),s.length===0&&(0,Ur.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},dT=(t,n,i,a,s,u,l)=>{let p=u.findIndex(({id:h})=>s.id===h),m=Array.from(u);p<0?m.push({id:s.id,quantity:t,serviceInformation:{segmentId:n,passengerId:i,passengerName:a,total_amount:s.total_amount,total_currency:s.total_currency,...s.metadata}}):m[p].quantity=t,l(m.filter(({quantity:h})=>h!==0))};var zl=require("react/jsx-runtime"),th=({offer:t,segment:n,passengersById:i,selectedServices:a,setSelectedServices:s})=>(0,zl.jsx)(_o,{children:n.passengers.map(({passenger_id:u,baggages:l},p)=>(0,zl.jsx)(eh,{segmentId:n.id,passengerId:u,passengerName:rc(i[u],t.passengers.find(({id:m})=>m===u),p+1),includedBaggage:l,passengerServicesForSegment:t.available_services.filter(({type:m,passenger_ids:h,segment_ids:S})=>m==="baggage"&&h.includes(u)&&S.includes(n.id)),selectedServices:a,setSelectedServices:s},u))});var cr=require("react/jsx-runtime"),nh=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p})=>{let m=Dn(t),h=ca(n,t),S=Ue(i)(h),v=a&&a;return(0,cr.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,cr.jsxs)("div",{className:"flex--space-between",children:[(0,cr.jsxs)("div",{children:["Price for ",Sn(m,"extra bag","extra bags")]}),(0,cr.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",S]})]}),(0,cr.jsxs)("div",{style:v?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!v&&(0,cr.jsx)(Qe,{size:48,variant:"outlined",disabled:a,onClick:()=>l(),children:"Back"}),(0,cr.jsx)(Qe,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var ic=t=>{let n=new Date(t);if(isNaN(n.valueOf()))Xt(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return mT(n)},mT=t=>{let{format:n}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return n(t)};var Bn=require("react/jsx-runtime"),rh=({segmentCount:t,currentSegmentIndex:n,currentSegment:i,setCurrentSegmentIndex:a})=>(0,Bn.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Bn.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((s,u)=>u===n?(0,Bn.jsx)(gT,{},`segment_${u}`):(0,Bn.jsx)(ih,{onClick:()=>a(u)},`segment_${u}`))}),(0,Bn.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",i.destination.iata_code,(0,Bn.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ic(i.departing_at)})]})]}),ih=({onClick:t,style:n})=>(0,Bn.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...n}}),gT=()=>(0,Bn.jsx)(ih,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var So=require("react/jsx-runtime"),oh=({isOpen:t,offer:n,passengers:i,onClose:a,selectedServices:s})=>{let[u,l]=(0,oc.useState)(0),[p,m]=oc.default.useState(s);if(!n)return null;let h=nc(n),S=h[u],v=tc(i),I=co(n.available_services),P=n.base_currency;return po(n,"baggage")&&(P=fo(n,"baggage")),(0,So.jsxs)(ho,{isOpen:t,onClose:()=>a(s),children:[(0,So.jsx)(rh,{segmentCount:h.length,currentSegment:S,currentSegmentIndex:u,setCurrentSegmentIndex:L=>l(L)}),(0,So.jsx)(th,{offer:n,selectedServices:p,passengersById:v,segment:S,setSelectedServices:m}),(0,So.jsx)(nh,{currency:P,selectedServices:p,servicePrices:I,isFirstSegment:u===0,isLastSegment:u+1===h.length,onNextSegmentButtonClicked:()=>l(u+1),onPreviousSegmentButtonClicked:()=>l(u-1),onClose:()=>a(p)})]})};var Ln=require("react/jsx-runtime"),sh=({isLoading:t,offer:n,passengers:i,selectedServices:a,setSelectedServices:s})=>{let[u,l]=ah.default.useState(!1),p=po(n,"baggage"),m=Dn(a),h=m>0,S=Fr(n,a),v=n?.base_currency||"";p&&(v=fo(n,"baggage"));let I=n?Ue(v)(S):"0",P=p&&h?`${Sn(m,"bag","bags")} added for ${I}`:"Add any extra baggage you need for your trip";return(0,Ln.jsxs)(Ln.Fragment,{children:[(0,Ln.jsxs)(mo,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:P,icon:"cabin_bag",onClick:p?()=>l(!0):null,isLoading:t,disabled:!t&&!p,isSelected:h,children:[t&&(0,Ln.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Ln.jsx)(lo,{})]}),!t&&!p&&(0,Ln.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Ln.jsx)(oh,{isOpen:!!(u&&n),offer:n,passengers:i,onClose:L=>{let Y=JSON.parse(JSON.stringify(L));s(Y),l(!1)},selectedServices:a})]})};var ph=ge(require("react"));var fa=require("react/jsx-runtime"),ac=({children:t})=>(0,fa.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,fa.jsx)(pe,{name:"check"}),(0,fa.jsx)("p",{children:t})]});var ur=require("react/jsx-runtime"),ch=({offerCurrency:t,service:n})=>(0,ur.jsxs)(_o,{children:[(0,ur.jsxs)("ul",{style:{padding:0},children:[(0,ur.jsx)(ac,{children:"Cancel your trip for any reason"}),(0,ur.jsxs)(ac,{children:["Guaranteed refund of"," ",Ue(t)(+n.metadata.refund_amount)]}),(0,ur.jsx)(ac,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,ur.jsxs)("a",{href:n.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,ur.jsx)(pe,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var Gr=require("react/jsx-runtime"),uh=({service:t,selectedServices:n,onAddCfarService:i,onRemoveCfarService:a,onClose:s})=>{let u=n.some(({id:p})=>p==t.id),l=Ue(t.total_currency)(+t.total_amount);return(0,Gr.jsxs)("div",{className:"cfar-modal-footer",children:[(0,Gr.jsx)(Qe,{size:48,variant:u?"destructive":"outlined",onClick:u?a:s,children:u?"Remove protection":"Don\u2019t protect trip"}),!u&&(0,Gr.jsxs)(Qe,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:i,children:["Add protection for ",l]}),u&&(0,Gr.jsx)(hT,{})]})},hT=()=>(0,Gr.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,Gr.jsx)(pe,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Kl=require("react/jsx-runtime"),lh=()=>(0,Kl.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Kl.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var lr=require("react/jsx-runtime"),fh=({isOpen:t,offerCurrency:n,service:i,onClose:a,selectedServices:s})=>(0,lr.jsxs)(ho,{isOpen:t,onClose:()=>a(s),children:[(0,lr.jsx)(lh,{}),i&&n&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(ch,{service:i,offerCurrency:n}),(0,lr.jsx)(uh,{service:i,selectedServices:s,onAddCfarService:()=>a([{id:i.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:i.total_amount,total_currency:i.total_currency,...i.metadata}}]),onRemoveCfarService:()=>a([]),onClose:()=>a(s)})]})]});var kn=require("react/jsx-runtime"),dh=({isLoading:t,offer:n,selectedServices:i,setSelectedServices:a})=>{let[s,u]=ph.default.useState(!1),l=po(n,"cancel_for_any_reason"),m=Dn(i)>0,h=n?.base_currency||"";l&&(h=fo(n,"cancel_for_any_reason"));let S=Fr(n,i),v=n?Ue(h)(S):"0",I=n?.available_services.find(uo),P=l&&m?`Your trip is protected for ${v}`:"Protect your purchase if you decide to cancel";return(0,kn.jsxs)(kn.Fragment,{children:[(0,kn.jsxs)(mo,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:P,icon:"shield_with_moon",onClick:l?()=>u(!0):null,isLoading:t,disabled:!t&&!l,isSelected:m,children:[t&&(0,kn.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,kn.jsx)(lo,{})]}),!t&&!l&&(0,kn.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,kn.jsx)(fh,{isOpen:!!(s&&n&&I),offerCurrency:n?.base_currency,service:I,onClose:L=>{u(!1),a(L)},selectedServices:i})]})};var mh=(t,n)=>{for(let i of t)for(let a of i.cabins)for(let s of a.rows)for(let u of s.sections)for(let l of u.elements)if(n(l))return l};var sc=t=>mh(t,i=>i.type==="seat"&&i.available_services.length>0)?.available_services[0]?.total_currency;var zh=ge(require("react"));var gh=t=>t.flatMap(n=>n.passengers.map((i,a)=>({passenger:i,passengerIndex:a,segment:n})));var tf=ge(require("react"));var hh=(t,n)=>n.cabins.filter(i=>i.deck===t);var _h=t=>{let n=new Set;for(let i of t)for(let a of i.rows)for(let s of a.sections)for(let u of s.elements)u.type!=="seat"&&u.type!=="empty"&&n.add(u.type);return n};var yh=(t,n)=>!!(t.wings&&t.wings.first_row_index<=n&&t.wings.last_row_index>=n);var Uh=ge(yn()),Gh=ge(require("react"));var Sh=ge(yn());var Zl=require("react/jsx-runtime"),vh=({value:t,onChange:n,options:i})=>(0,Zl.jsx)("div",{className:"seat-map__tab-select",children:i.map(a=>(0,Zl.jsx)("button",{type:"button",className:(0,Sh.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":a===t}),onClick:()=>t!==a&&n(a),children:a},a))});var Ch=require("react/jsx-runtime"),Eh=({value:t,setValue:n})=>{let i=["Lower deck","Upper deck"];return(0,Ch.jsx)(vh,{options:i,value:i[t],onChange:a=>n(i.indexOf(a))})};var lt=require("react/jsx-runtime"),bh=({symbols:t})=>(0,lt.jsxs)("div",{className:"seat-map__legend",children:[(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,lt.jsx)(pe,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,lt.jsx)(pe,{name:"close",size:14})}),"Unavailable"]}),[...t].map(n=>(0,lt.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,lt.jsx)(pe,{name:n,size:20}),n.split("_")[0]]},n))]});var Th=t=>{let n=Object.values(t.sections).map(i=>i.elements).reduce((i,a)=>i.concat(a),[]).filter(i=>i.type==="seat");return n.length>0?n[0].designator.substring(0,n[0].designator.length-1):null};var Lh=ge(yn()),Jl=ge(require("react"));var Rh=ge(yn());var Xl=require("react/jsx-runtime"),_T=["bassinet","exit_row"],xh=({type:t})=>(0,Xl.jsx)("div",{className:(0,Rh.default)("map-element map-element--amenity",{"map-element--wrapped":!_T.includes(t)}),"aria-label":t.toString(),children:(0,Xl.jsx)(pe,{name:t,size:16})});var Ah=require("react/jsx-runtime"),pa=()=>(0,Ah.jsx)("div",{className:"map-element map-element--empty"});var Oh=ge(yn());var cc=require("react/jsx-runtime"),Ih=({isRight:t})=>(0,cc.jsx)("div",{className:(0,Oh.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,cc.jsx)(pe,{name:"exit_row_right"}):(0,cc.jsx)(pe,{name:"exit_row"})});var wh=(t="")=>t.split(" ").map(n=>n[0]).slice(0,2).join("");var Mh=ge(yn());var Hr=require("react/jsx-runtime"),Ph=({seat:t,service:n})=>{let i=n?Ue(n.total_currency)(+n.total_amount):"";return(0,Hr.jsxs)("div",{className:"seat-info",children:[(0,Hr.jsxs)("div",{className:"seat-info__details",children:[(0,Hr.jsx)("strong",{children:t?.designator}),(0,Hr.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,Hr.jsx)("strong",{children:i})]}),t?.disclosures.map((a,s)=>(0,Hr.jsx)("div",{className:"seat-info__disclosure",children:a},s))]})};var jl=require("react/jsx-runtime"),Nh=({seat:t})=>(0,jl.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,jl.jsx)(pe,{name:"close",size:14})});var fr=require("react/jsx-runtime"),Dh=({element:t,currentPassengerId:n,currentSegmentId:i,currentPassengerName:a,onSeatToggled:s,selectedServicesMap:u})=>{let l=t.available_services.find(ce=>ce.passenger_id===n);if(!l)return(0,fr.jsx)(Nh,{seat:t});let p=Object.values(u).find(ce=>ce.serviceInformation?.designator===t.designator&&ce.serviceInformation?.segmentId===i),m=p!=null,h=m?wh(p.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),S=!isNaN(+l?.total_amount)&&+l?.total_amount!=0,v=!m&&l.passenger_id===n,I=!m||m&&i===p.serviceInformation?.segmentId&&n===p.serviceInformation?.passengerId,P=(0,Mh.default)("map-element","map-element__seat",{"map-element--available":v,"map-element--selected":m,"map-element--actionable":I}),L=Ue(l.total_currency)(+l.total_amount),Y=m&&i===p.serviceInformation?.segmentId&&n===p.serviceInformation?.passengerId;return(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsxs)("button",{"data-testid":`seat-${t.designator}`,id:t.designator,className:P,onClick:()=>{I&&s({quantity:m?0:1,id:l.id,serviceInformation:{type:"seat",segmentId:i,passengerId:n,passengerName:a,designator:t.designator,disclosures:t.disclosures,total_amount:l.total_amount,total_currency:l.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${L}`,children:[S&&(0,fr.jsx)(pe,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),h]}),Y&&(0,fr.jsx)(Ph,{seat:t,service:l})]})};var $r=require("react/jsx-runtime"),Bh=({element:t,elementIndex:n,sectionIndex:i,onSeatToggled:a,selectedServicesMap:s,currentPassengerId:u,currentSegmentId:l,currentPassengerName:p})=>(0,$r.jsx)($r.Fragment,{children:js(t)?(0,$r.jsx)(Dh,{currentSegmentId:l,currentPassengerId:u,currentPassengerName:p,selectedServicesMap:s,element:t,onSeatToggled:a},n):t.type==="empty"?(0,$r.jsx)(pa,{},n):t.type==="exit_row"?(0,$r.jsx)(Ih,{isRight:i>0},n):(0,$r.jsx)(xh,{type:t.type},n)});var pr=require("react/jsx-runtime"),kh=({row:t,rowNumber:n,hasWings:i,section:a,sectionIndex:s,onSeatToggled:u,selectedServicesMap:l,currentPassengerId:p,currentPassengerName:m,currentSegmentId:h})=>{let S=Object.keys(t.sections).length,v=S===1;return(0,pr.jsxs)(Jl.Fragment,{children:[(0,pr.jsx)("div",{className:(0,Lh.default)("map-section",{"map-section--left":s===0,"map-section--right":v?!1:s===S-1,"map-section--wing":i}),children:a.elements.length>0?a.elements.map((I,P)=>(0,pr.jsx)(Jl.Fragment,{children:(0,pr.jsx)(Bh,{sectionIndex:s,elementIndex:P,element:I,selectedServicesMap:l,onSeatToggled:u,currentPassengerId:p,currentSegmentId:h,currentPassengerName:m})},P)):(0,pr.jsx)(pa,{})}),(s<S-1||v&&s<S)&&(0,pr.jsx)("span",{className:"map-section__aisle",children:n}),v&&s===t.sections.length-1&&(0,pr.jsx)(pa,{})]},s)};var da=require("react/jsx-runtime"),Fh=({row:t,hasWings:n,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l})=>{let p=Th(t);return(0,da.jsx)(da.Fragment,{children:t.sections.map((m,h)=>(0,da.jsx)(kh,{row:t,rowNumber:p,hasWings:n,section:m,sectionIndex:h,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l},h))})};var ma=require("react/jsx-runtime"),Ql=()=>(0,ma.jsxs)(ao,{children:[(0,ma.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,ma.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var Fn=require("react/jsx-runtime"),Hh=({seatMap:t,onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u})=>{let[l,p]=Gh.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Fn.jsx)(Ql,{});let m=hh(l,t),h=m.length!==t.cabins.length,S=t.cabins.some(I=>I.wings);if(!m||!m.length)return(0,Fn.jsx)(Ql,{});let v=_h(m);return(0,Fn.jsxs)("div",{className:(0,Uh.default)("seat-map",{"seat-map--wings":S}),children:[h&&(0,Fn.jsx)(Eh,{value:l,setValue:I=>{p(I)}}),(0,Fn.jsx)("div",{className:"seat-map__legend-container",children:(0,Fn.jsx)(bh,{symbols:v})}),m.map((I,P)=>(0,Fn.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":I.aisles},children:I.rows.map((L,Y)=>(0,Fn.jsx)(Fh,{row:L,hasWings:yh(I,Y),onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u},Y))},`cabin-${P}`))]})};var ef=require("react/jsx-runtime"),$h=t=>(0,ef.jsx)(_o,{children:(0,ef.jsx)(Hh,{...t})});var dr=require("react/jsx-runtime"),Yh=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p,seatMaps:m})=>{let h=Dn(t),S=ca(n,t,m),v=Ue(i)(S),I=a&&s;return(0,dr.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,dr.jsxs)("div",{className:"flex--space-between",children:[(0,dr.jsxs)("div",{children:["Price for ",Sn(h,"seat","seats")]}),(0,dr.jsxs)("div",{className:"h3--semibold",children:["+ ",v]})]}),(0,dr.jsxs)("div",{style:I?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!I&&(0,dr.jsx)(Qe,{size:48,disabled:a,variant:"outlined",onClick:()=>l(),children:"Back"}),(0,dr.jsx)(Qe,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var vn=require("react/jsx-runtime"),Wh=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:n,currentSegment:i,currentPassengerName:a,setCurrentSegmentAndPassengerPermutationsIndex:s})=>(0,vn.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,vn.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((u,l)=>l===n?(0,vn.jsx)(yT,{},`segment_${l}`):(0,vn.jsx)(Vh,{onClick:()=>s(l)},`segment_${l}`))}),(0,vn.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",i.destination.iata_code,(0,vn.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ic(i.departing_at)})]}),(0,vn.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:a})]}),Vh=({onClick:t,style:n})=>(0,vn.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...n}}),yT=()=>(0,vn.jsx)(Vh,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var vo=require("react/jsx-runtime"),qh=({isOpen:t,offer:n,passengers:i,seatMaps:a,selectedServices:s,onClose:u})=>{let[l,p]=tf.default.useState(0),[m,h]=tf.default.useState(s),S=m.reduce((he,_e)=>({...he,[_e.id]:_e}),{});if(!n||!a)return null;let v=nc(n),I=tc(i),P=co(n.available_services),L=gh(v),{passenger:{passenger_id:Y},passengerIndex:ce,segment:{id:X}}=L[l],H=v.find(({id:he})=>he===X),ue=I[Y],de=a.find(he=>he.segment_id===X),Ne=rc(ue,n.passengers[ce],ce+1),Me=he=>{let _e=new Array;for(let it of m){let Nt=it.id===he.id&&he.quantity===0,ot=it.serviceInformation?.segmentId===X&&it.serviceInformation?.passengerId===Y;!Nt&&!ot&&(_e=[..._e,it])}he.quantity>0&&(_e=[..._e,he]),h(_e)},Te=sc(a)??n.total_currency;return(0,vo.jsxs)(ho,{isOpen:t,onClose:()=>u(s),children:[(0,vo.jsx)(Wh,{segmentAndPassengerPermutationsCount:L.length,currentSegment:H,currentPassengerName:Ne,currentSegmentAndPassengerPermutationsIndex:l,setCurrentSegmentAndPassengerPermutationsIndex:p}),(0,vo.jsx)($h,{selectedServicesMap:S,seatMap:de,onSeatToggled:Me,currentPassengerId:Y,currentPassengerName:Ne,currentSegmentId:X}),(0,vo.jsx)(Yh,{seatMaps:a,currency:Te,selectedServices:m,servicePrices:P,isFirstSegment:l===0,isLastSegment:l+1===L.length,onNextSegmentButtonClicked:()=>{p(l+1)},onPreviousSegmentButtonClicked:()=>{p(l-1)},onClose:()=>u(m)})]})};var Un=require("react/jsx-runtime"),Kh=({isLoading:t,offer:n,seatMaps:i,passengers:a,selectedServices:s,setSelectedServices:u})=>{let[l,p]=zh.default.useState(!1),m=Array.isArray(i)&&i.length>0,h=Dn(s),S=h>0,v=Fr(n,s,i),I=n?.base_currency??"";i&&(I=sc(i)??I);let P=n?Ue(I)(v):"0",L=m&&S?`${Sn(h,"seat","seats")} selected for ${P}`:"Specify where on the plane you\u2019d like to sit";return(0,Un.jsxs)(Un.Fragment,{children:[(0,Un.jsxs)(mo,{buttonTitle:"Select seats",title:"Seat selection",copy:L,icon:"flight_class",onClick:m?()=>p(!0):null,isLoading:t,disabled:t&&!m,isSelected:S,children:[t&&(0,Un.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Un.jsx)(lo,{})]}),!t&&!m&&(0,Un.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Un.jsx)(qh,{isOpen:!!(n&&i&&l),seatMaps:i,offer:n,passengers:a,selectedServices:s,onClose:Y=>{u(Y),p(!1)}})]})};var Jt=require("react/jsx-runtime"),ST="https://assets.duffel.com/components/3.1.2--prototype.2",vT=`${ST}/global.css`,ET=t=>{if(zs(t.debug||!1),or("Properties passed into the component:",t),!Gl(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let n=Hl(t),i=$l(t),a=Yl(t),s=Wl(t),u=t.services.includes("seats")&&!("seat_maps"in t)&&(n||i||s),[l,p]=wt.useState(t.passengers),[m,h]=wt.useState(t.offer),[S,v]=wt.useState(i),[I,P]=wt.useState(a?t.seat_maps:void 0),[L,Y]=wt.useState(u),[ce,X]=wt.useState(null),[H,ue]=wt.useState(new Array),[de,Ne]=wt.useState(new Array),[Me,Te]=wt.useState(new Array),he=Ig(t.markup,t.priceFormatters),_e=oe=>{let ye="This offer has expired.";if(Mg(oe)){X(ye);return}else{let Vr=new Date(oe?.expires_at)?.getTime()-Date.now(),Mt=1e3*60*60*24;Vr<Mt&&setTimeout(()=>X(ye),Vr)}let ze=wg(oe,he);h(ze)},it=oe=>{let ye=Pg(oe,he.seats);P(ye)};if(wt.useEffect(()=>{Bs("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(i||n)&&Fg(t.offer_id,n?null:t.client_key,X,v,oe=>{if(_e(oe),oe.passengers.length!==l.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${oe.passengers.length}).`);n&&p(t.passengers.map((ye,ze)=>({...ye,id:oe.passengers[ze].id})))}),u&&Gg(i||n?t.offer_id:t.offer.id,n?null:t.client_key,()=>it([]),Y,it),s&&_e(t.offer),a&&(_e(t.offer),it(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),wt.useEffect(()=>{if(!m)return;let oe=Og({baggageSelectedServices:H,seatSelectedServices:de,cfarSelectedServices:Me,offer:m,passengers:l,seatMaps:I});if(Ng(oe)){let ye={offer_total_amount:m.total_amount,offer_total_currency:m.total_currency,offer_tax_amount:m.tax_amount,offer_tax_currency:m.tax_currency,baggage_services:H,seat_services:de,cancel_for_any_reason_services:Me};or("Payload ready",{"Order creation payload":oe,"Services metadata":ye}),t.onPayloadReady(oe,ye)}},[H,de,Me]),!Gl(t))return null;let Nt=`${72*t.services.length+32*(t.services.length-1)}px`,ot={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Js(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return or("Component's internal state:",{isOfferLoading:S,isSeatMapLoading:L,baggageSelectedServices:H,seatSelectedServices:de,cfarSelectedServices:Me,offer:m,seatMaps:I,error:ce}),(0,Jt.jsxs)(Jt.Fragment,{children:[(0,Jt.jsx)("link",{rel:"stylesheet",href:vT}),(0,Jt.jsx)("div",{className:"duffel-components",style:ot,children:(0,Jt.jsxs)(so,{children:[ce&&(0,Jt.jsx)(Ag,{height:Nt,message:ce}),!ce&&t.services.map(oe=>{if(oe==="bags")return(0,Jt.jsx)(sh,{isLoading:S,offer:m,passengers:l,selectedServices:H,setSelectedServices:ue},"bags");if(oe==="seats")return(0,Jt.jsx)(Kh,{isLoading:S||L,seatMaps:I,offer:m,passengers:l,selectedServices:de,setSelectedServices:Ne},"seats");if(oe==="cancel_for_any_reason")return(0,Jt.jsx)(dh,{isLoading:S,offer:m,selectedServices:Me,setSelectedServices:Te},"cancel_for_any_reason")})]})})]})};var Yr=ge(Xh());var Jh="https://js.stripe.com/v3",CT=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,jh="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",bT=function(){for(var n=document.querySelectorAll('script[src^="'.concat(Jh,'"]')),i=0;i<n.length;i++){var a=n[i];if(CT.test(a.src))return a}return null},TT=function(n){var i=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"",a=document.createElement("script");a.src="".concat(Jh).concat(i);var s=document.head||document.body;if(!s)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return s.appendChild(a),a},RT=function(n,i){!n||!n._registerWrapper||n._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:i})},lc=null,xT=function(n){return lc!==null||(lc=new Promise(function(i,a){if(typeof window>"u"||typeof document>"u"){i(null);return}if(window.Stripe&&n&&console.warn(jh),window.Stripe){i(window.Stripe);return}try{var s=bT();s&&n?console.warn(jh):s||(s=TT(n)),s.addEventListener("load",function(){window.Stripe?i(window.Stripe):a(new Error("Stripe.js not available"))}),s.addEventListener("error",function(){a(new Error("Failed to load Stripe.js"))})}catch(u){a(u);return}})),lc},AT=function(n,i,a){if(n===null)return null;var s=n.apply(void 0,i);return RT(s,a),s},Qh=Promise.resolve().then(function(){return xT(null)}),e_=!1;Qh.catch(function(t){e_||console.warn(t)});var t_=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];e_=!0;var s=Date.now();return Qh.then(function(u){return AT(u,i,s)})};var En=ge(require("react"));var rt=require("react/jsx-runtime"),OT="https://assets.duffel.com/components/3.1.2--prototype.2",IT=`${OT}/global.css`,wT="card",PT="3.1.2--prototype.2",NT={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},MT={color:"#ef4444",iconColor:"#ef4444"},DT=({styles:t,paymentIntentClientToken:n,onSuccessfulPayment:i,onFailedPayment:a})=>{let[s,u]=En.useState(null),[l,p]=En.useState(!1),[m,h]=En.useState(!1),[S,v]=En.useState(!1),[I,P]=En.useState(""),L=(0,Yr.useStripe)(),Y=(0,Yr.useElements)();return En.useEffect(()=>{if(Y&&!s){let X=Y?.getElement(wT);X&&u(X)}},[Y,s]),En.useEffect(()=>{s&&s.on("change",X=>{let{error:H,complete:ue}=X;H?(h(!0),P(H.message)):h(!1),p(!!ue)})},[s]),n?(0,rt.jsx)("div",{className:"card-payment__container",children:(0,rt.jsxs)("form",{onSubmit:async X=>{if(X.preventDefault(),!(!L||!Y)&&s){v(!0);let H=atob(n),ue=JSON.parse(H),{client_secret:de}=ue,Ne=await L.confirmCardPayment(de,{payment_method:{card:s,metadata:{duffel_components_version:PT||"failed-to-get-version"}}});if(v(!1),Ne.error){let{error:Me}=Ne;a(Me)}else i()}},children:[S&&(0,rt.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,rt.jsx)(Yr.CardElement,{className:"card-details",options:{style:{base:{...NT,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...MT}}}}),(0,rt.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:m&&I}),(0,rt.jsx)(Qe,{className:"card-payment__pay-button",type:"submit",disabled:!l||S,"aria-label":"Pay",children:S?"Processing...":"Pay"})]})}):null},BT=t=>{let[n,i]=En.useState(null);zs(t.debug||!1);let a=atob(t.paymentIntentClientToken),s;try{s=JSON.parse(a)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:u}=s;En.useEffect(()=>{if(!n&&u){let p=t_(u);p&&i(p)}},[n,u]);let l={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Js(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)("link",{rel:"stylesheet",href:IT}),(0,rt.jsx)("div",{className:"duffel-components",style:l,children:(0,rt.jsx)(so,{children:(0,rt.jsx)(Yr.Elements,{stripe:n,children:(0,rt.jsx)(DT,{...t})})})})]})};function mr(t){return Array.isArray?Array.isArray(t):u_(t)==="[object Array]"}var LT=1/0;function kT(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-LT?"-0":n}function FT(t){return t==null?"":kT(t)}function Gn(t){return typeof t=="string"}function s_(t){return typeof t=="number"}function UT(t){return t===!0||t===!1||GT(t)&&u_(t)=="[object Boolean]"}function c_(t){return typeof t=="object"}function GT(t){return c_(t)&&t!==null}function Pt(t){return t!=null}function nf(t){return!t.trim().length}function u_(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var HT="Incorrect 'index' type",$T=t=>`Invalid value for key ${t}`,YT=t=>`Pattern length exceeds max of ${t}.`,WT=t=>`Missing ${t} property in key`,VT=t=>`Property 'weight' in key '${t}' must be a positive integer`,n_=Object.prototype.hasOwnProperty,rf=class{constructor(n){this._keys=[],this._keyMap={};let i=0;n.forEach(a=>{let s=l_(a);i+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,i+=s.weight}),this._keys.forEach(a=>{a.weight/=i})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function l_(t){let n=null,i=null,a=null,s=1,u=null;if(Gn(t)||mr(t))a=t,n=r_(t),i=of(t);else{if(!n_.call(t,"name"))throw new Error(WT("name"));let l=t.name;if(a=l,n_.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(VT(l));n=r_(l),i=of(l),u=t.getFn}return{path:n,id:i,weight:s,src:a,getFn:u}}function r_(t){return mr(t)?t:t.split(".")}function of(t){return mr(t)?t.join("."):t}function qT(t,n){let i=[],a=!1,s=(u,l,p)=>{if(Pt(u))if(!l[p])i.push(u);else{let m=l[p],h=u[m];if(!Pt(h))return;if(p===l.length-1&&(Gn(h)||s_(h)||UT(h)))i.push(FT(h));else if(mr(h)){a=!0;for(let S=0,v=h.length;S<v;S+=1)s(h[S],l,p+1)}else l.length&&s(h,l,p+1)}};return s(t,Gn(n)?n.split("."):n,0),a?i:i[0]}var zT={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},KT={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,n)=>t.score===n.score?t.idx<n.idx?-1:1:t.score<n.score?-1:1},ZT={location:0,threshold:.6,distance:100},XT={useExtendedSearch:!1,getFn:qT,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},W={...KT,...zT,...ZT,...XT},jT=/[^ ]+/g;function JT(t=1,n=3){let i=new Map,a=Math.pow(10,n);return{get(s){let u=s.match(jT).length;if(i.has(u))return i.get(u);let l=1/Math.pow(u,.5*t),p=parseFloat(Math.round(l*a)/a);return i.set(u,p),p},clear(){i.clear()}}}var ga=class{constructor({getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){this.norm=JT(i,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((i,a)=>{this._keysMap[i.id]=a})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Gn(this.docs[0])?this.docs.forEach((n,i)=>{this._addString(n,i)}):this.docs.forEach((n,i)=>{this._addObject(n,i)}),this.norm.clear())}add(n){let i=this.size();Gn(n)?this._addString(n,i):this._addObject(n,i)}removeAt(n){this.records.splice(n,1);for(let i=n,a=this.size();i<a;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(n,i){return n[this._keysMap[i]]}size(){return this.records.length}_addString(n,i){if(!Pt(n)||nf(n))return;let a={v:n,i,n:this.norm.get(n)};this.records.push(a)}_addObject(n,i){let a={i,$:{}};this.keys.forEach((s,u)=>{let l=s.getFn?s.getFn(n):this.getFn(n,s.path);if(Pt(l)){if(mr(l)){let p=[],m=[{nestedArrIndex:-1,value:l}];for(;m.length;){let{nestedArrIndex:h,value:S}=m.pop();if(Pt(S))if(Gn(S)&&!nf(S)){let v={v:S,i:h,n:this.norm.get(S)};p.push(v)}else mr(S)&&S.forEach((v,I)=>{m.push({nestedArrIndex:I,value:v})})}a.$[u]=p}else if(Gn(l)&&!nf(l)){let p={v:l,n:this.norm.get(l)};a.$[u]=p}}}),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}};function f_(t,n,{getFn:i=W.getFn,fieldNormWeight:a=W.fieldNormWeight}={}){let s=new ga({getFn:i,fieldNormWeight:a});return s.setKeys(t.map(l_)),s.setSources(n),s.create(),s}function QT(t,{getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){let{keys:a,records:s}=t,u=new ga({getFn:n,fieldNormWeight:i});return u.setKeys(a),u.setIndexRecords(s),u}function fc(t,{errors:n=0,currentLocation:i=0,expectedLocation:a=0,distance:s=W.distance,ignoreLocation:u=W.ignoreLocation}={}){let l=n/t.length;if(u)return l;let p=Math.abs(a-i);return s?l+p/s:p?1:l}function e3(t=[],n=W.minMatchCharLength){let i=[],a=-1,s=-1,u=0;for(let l=t.length;u<l;u+=1){let p=t[u];p&&a===-1?a=u:!p&&a!==-1&&(s=u-1,s-a+1>=n&&i.push([a,s]),a=-1)}return t[u-1]&&u-a>=n&&i.push([a,u-1]),i}var Si=32;function t3(t,n,i,{location:a=W.location,distance:s=W.distance,threshold:u=W.threshold,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,includeMatches:m=W.includeMatches,ignoreLocation:h=W.ignoreLocation}={}){if(n.length>Si)throw new Error(YT(Si));let S=n.length,v=t.length,I=Math.max(0,Math.min(a,v)),P=u,L=I,Y=p>1||m,ce=Y?Array(v):[],X;for(;(X=t.indexOf(n,L))>-1;){let Te=fc(n,{currentLocation:X,expectedLocation:I,distance:s,ignoreLocation:h});if(P=Math.min(Te,P),L=X+S,Y){let he=0;for(;he<S;)ce[X+he]=1,he+=1}}L=-1;let H=[],ue=1,de=S+v,Ne=1<<S-1;for(let Te=0;Te<S;Te+=1){let he=0,_e=de;for(;he<_e;)fc(n,{errors:Te,currentLocation:I+_e,expectedLocation:I,distance:s,ignoreLocation:h})<=P?he=_e:de=_e,_e=Math.floor((de-he)/2+he);de=_e;let it=Math.max(1,I-_e+1),Nt=l?v:Math.min(I+_e,v)+S,ot=Array(Nt+2);ot[Nt+1]=(1<<Te)-1;for(let oe=Nt;oe>=it;oe-=1){let ye=oe-1,ze=i[t.charAt(ye)];if(Y&&(ce[ye]=+!!ze),ot[oe]=(ot[oe+1]<<1|1)&ze,Te&&(ot[oe]|=(H[oe+1]|H[oe])<<1|1|H[oe+1]),ot[oe]&Ne&&(ue=fc(n,{errors:Te,currentLocation:ye,expectedLocation:I,distance:s,ignoreLocation:h}),ue<=P)){if(P=ue,L=ye,L<=I)break;it=Math.max(1,2*I-L)}}if(fc(n,{errors:Te+1,currentLocation:I,expectedLocation:I,distance:s,ignoreLocation:h})>P)break;H=ot}let Me={isMatch:L>=0,score:Math.max(.001,ue)};if(Y){let Te=e3(ce,p);Te.length?m&&(Me.indices=Te):Me.isMatch=!1}return Me}function n3(t){let n={};for(let i=0,a=t.length;i<a;i+=1){let s=t.charAt(i);n[s]=(n[s]||0)|1<<a-i-1}return n}var pc=class{constructor(n,{location:i=W.location,threshold:a=W.threshold,distance:s=W.distance,includeMatches:u=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,isCaseSensitive:m=W.isCaseSensitive,ignoreLocation:h=W.ignoreLocation}={}){if(this.options={location:i,threshold:a,distance:s,includeMatches:u,findAllMatches:l,minMatchCharLength:p,isCaseSensitive:m,ignoreLocation:h},this.pattern=m?n:n.toLowerCase(),this.chunks=[],!this.pattern.length)return;let S=(I,P)=>{this.chunks.push({pattern:I,alphabet:n3(I),startIndex:P})},v=this.pattern.length;if(v>Si){let I=0,P=v%Si,L=v-P;for(;I<L;)S(this.pattern.substr(I,Si),I),I+=Si;if(P){let Y=v-Si;S(this.pattern.substr(Y),Y)}}else S(this.pattern,0)}searchIn(n){let{isCaseSensitive:i,includeMatches:a}=this.options;if(i||(n=n.toLowerCase()),this.pattern===n){let L={isMatch:!0,score:0};return a&&(L.indices=[[0,n.length-1]]),L}let{location:s,distance:u,threshold:l,findAllMatches:p,minMatchCharLength:m,ignoreLocation:h}=this.options,S=[],v=0,I=!1;this.chunks.forEach(({pattern:L,alphabet:Y,startIndex:ce})=>{let{isMatch:X,score:H,indices:ue}=t3(n,L,Y,{location:s+ce,distance:u,threshold:l,findAllMatches:p,minMatchCharLength:m,includeMatches:a,ignoreLocation:h});X&&(I=!0),v+=H,X&&ue&&(S=[...S,...ue])});let P={isMatch:I,score:I?v/this.chunks.length:1};return I&&a&&(P.indices=S),P}},Hn=class{constructor(n){this.pattern=n}static isMultiMatch(n){return i_(n,this.multiRegex)}static isSingleMatch(n){return i_(n,this.singleRegex)}search(){}};function i_(t,n){let i=t.match(n);return i?i[1]:null}var af=class extends Hn{constructor(n){super(n)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(n){let i=n===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}},sf=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(n){let a=n.indexOf(this.pattern)===-1;return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}},cf=class extends Hn{constructor(n){super(n)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(n){let i=n.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}},uf=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(n){let i=!n.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}},lf=class extends Hn{constructor(n){super(n)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(n){let i=n.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[n.length-this.pattern.length,n.length-1]}}},ff=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(n){let i=!n.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}},dc=class extends Hn{constructor(n,{location:i=W.location,threshold:a=W.threshold,distance:s=W.distance,includeMatches:u=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,isCaseSensitive:m=W.isCaseSensitive,ignoreLocation:h=W.ignoreLocation}={}){super(n),this._bitapSearch=new pc(n,{location:i,threshold:a,distance:s,includeMatches:u,findAllMatches:l,minMatchCharLength:p,isCaseSensitive:m,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(n){return this._bitapSearch.searchIn(n)}},mc=class extends Hn{constructor(n){super(n)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(n){let i=0,a,s=[],u=this.pattern.length;for(;(a=n.indexOf(this.pattern,i))>-1;)i=a+u,s.push([a,i-1]);let l=!!s.length;return{isMatch:l,score:l?0:1,indices:s}}},pf=[af,mc,cf,uf,ff,lf,sf,dc],o_=pf.length,r3=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,i3="|";function o3(t,n={}){return t.split(i3).map(i=>{let a=i.trim().split(r3).filter(u=>u&&!!u.trim()),s=[];for(let u=0,l=a.length;u<l;u+=1){let p=a[u],m=!1,h=-1;for(;!m&&++h<o_;){let S=pf[h],v=S.isMultiMatch(p);v&&(s.push(new S(v,n)),m=!0)}if(!m)for(h=-1;++h<o_;){let S=pf[h],v=S.isSingleMatch(p);if(v){s.push(new S(v,n));break}}}return s})}var a3=new Set([dc.type,mc.type]),df=class{constructor(n,{isCaseSensitive:i=W.isCaseSensitive,includeMatches:a=W.includeMatches,minMatchCharLength:s=W.minMatchCharLength,ignoreLocation:u=W.ignoreLocation,findAllMatches:l=W.findAllMatches,location:p=W.location,threshold:m=W.threshold,distance:h=W.distance}={}){this.query=null,this.options={isCaseSensitive:i,includeMatches:a,minMatchCharLength:s,findAllMatches:l,ignoreLocation:u,location:p,threshold:m,distance:h},this.pattern=i?n:n.toLowerCase(),this.query=o3(this.pattern,this.options)}static condition(n,i){return i.useExtendedSearch}searchIn(n){let i=this.query;if(!i)return{isMatch:!1,score:1};let{includeMatches:a,isCaseSensitive:s}=this.options;n=s?n:n.toLowerCase();let u=0,l=[],p=0;for(let m=0,h=i.length;m<h;m+=1){let S=i[m];l.length=0,u=0;for(let v=0,I=S.length;v<I;v+=1){let P=S[v],{isMatch:L,indices:Y,score:ce}=P.search(n);if(L){if(u+=1,p+=ce,a){let X=P.constructor.type;a3.has(X)?l=[...l,...Y]:l.push(Y)}}else{p=0,u=0,l.length=0;break}}if(u){let v={isMatch:!0,score:p/u};return a&&(v.indices=l),v}}return{isMatch:!1,score:1}}},mf=[];function s3(...t){mf.push(...t)}function gf(t,n){for(let i=0,a=mf.length;i<a;i+=1){let s=mf[i];if(s.condition(t,n))return new s(t,n)}return new pc(t,n)}var gc={AND:"$and",OR:"$or"},hf={PATH:"$path",PATTERN:"$val"},_f=t=>!!(t[gc.AND]||t[gc.OR]),c3=t=>!!t[hf.PATH],u3=t=>!mr(t)&&c_(t)&&!_f(t),a_=t=>({[gc.AND]:Object.keys(t).map(n=>({[n]:t[n]}))});function p_(t,n,{auto:i=!0}={}){let a=s=>{let u=Object.keys(s),l=c3(s);if(!l&&u.length>1&&!_f(s))return a(a_(s));if(u3(s)){let m=l?s[hf.PATH]:u[0],h=l?s[hf.PATTERN]:s[m];if(!Gn(h))throw new Error($T(m));let S={keyId:of(m),pattern:h};return i&&(S.searcher=gf(h,n)),S}let p={children:[],operator:u[0]};return u.forEach(m=>{let h=s[m];mr(h)&&h.forEach(S=>{p.children.push(a(S))})}),p};return _f(t)||(t=a_(t)),a(t)}function l3(t,{ignoreFieldNorm:n=W.ignoreFieldNorm}){t.forEach(i=>{let a=1;i.matches.forEach(({key:s,norm:u,score:l})=>{let p=s?s.weight:null;a*=Math.pow(l===0&&p?Number.EPSILON:l,(p||1)*(n?1:u))}),i.score=a})}function f3(t,n){let i=t.matches;n.matches=[],Pt(i)&&i.forEach(a=>{if(!Pt(a.indices)||!a.indices.length)return;let{indices:s,value:u}=a,l={indices:s,value:u};a.key&&(l.key=a.key.src),a.idx>-1&&(l.refIndex=a.idx),n.matches.push(l)})}function p3(t,n){n.score=t.score}function d3(t,n,{includeMatches:i=W.includeMatches,includeScore:a=W.includeScore}={}){let s=[];return i&&s.push(f3),a&&s.push(p3),t.map(u=>{let{idx:l}=u,p={item:n[l],refIndex:l};return s.length&&s.forEach(m=>{m(u,p)}),p})}var $n=class{constructor(n,i={},a){this.options={...W,...i},this.options.useExtendedSearch,this._keyStore=new rf(this.options.keys),this.setCollection(n,a)}setCollection(n,i){if(this._docs=n,i&&!(i instanceof ga))throw new Error(HT);this._myIndex=i||f_(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){Pt(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){let i=[];for(let a=0,s=this._docs.length;a<s;a+=1){let u=this._docs[a];n(u,a)&&(this.removeAt(a),a-=1,s-=1,i.push(u))}return i}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:i=-1}={}){let{includeMatches:a,includeScore:s,shouldSort:u,sortFn:l,ignoreFieldNorm:p}=this.options,m=Gn(n)?Gn(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return l3(m,{ignoreFieldNorm:p}),u&&m.sort(l),s_(i)&&i>-1&&(m=m.slice(0,i)),d3(m,this._docs,{includeMatches:a,includeScore:s})}_searchStringList(n){let i=gf(n,this.options),{records:a}=this._myIndex,s=[];return a.forEach(({v:u,i:l,n:p})=>{if(!Pt(u))return;let{isMatch:m,score:h,indices:S}=i.searchIn(u);m&&s.push({item:u,idx:l,matches:[{score:h,value:u,norm:p,indices:S}]})}),s}_searchLogical(n){let i=p_(n,this.options),a=(p,m,h)=>{if(!p.children){let{keyId:v,searcher:I}=p,P=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(m,v),searcher:I});return P&&P.length?[{idx:h,item:m,matches:P}]:[]}let S=[];for(let v=0,I=p.children.length;v<I;v+=1){let P=p.children[v],L=a(P,m,h);if(L.length)S.push(...L);else if(p.operator===gc.AND)return[]}return S},s=this._myIndex.records,u={},l=[];return s.forEach(({$:p,i:m})=>{if(Pt(p)){let h=a(i,p,m);h.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},l.push(u[m])),h.forEach(({matches:S})=>{u[m].matches.push(...S)}))}}),l}_searchObjectList(n){let i=gf(n,this.options),{keys:a,records:s}=this._myIndex,u=[];return s.forEach(({$:l,i:p})=>{if(!Pt(l))return;let m=[];a.forEach((h,S)=>{m.push(...this._findMatches({key:h,value:l[S],searcher:i}))}),m.length&&u.push({idx:p,item:l,matches:m})}),u}_findMatches({key:n,value:i,searcher:a}){if(!Pt(i))return[];let s=[];if(mr(i))i.forEach(({v:u,i:l,n:p})=>{if(!Pt(u))return;let{isMatch:m,score:h,indices:S}=a.searchIn(u);m&&s.push({score:h,key:n,value:u,idx:l,norm:p,indices:S})});else{let{v:u,n:l}=i,{isMatch:p,score:m,indices:h}=a.searchIn(u);p&&s.push({score:m,key:n,value:u,norm:l,indices:h})}return s}};$n.version="6.6.2";$n.createIndex=f_;$n.parseIndex=QT;$n.config=W;$n.parseQuery=p_;s3(df);var h_=ge(d_()),__=ge(g_()),bo=ge(require("react"));var gr=require("react/jsx-runtime"),g3="https://assets.duffel.com/data/iata-lookup-v2.json",h3=t=>t.map(n=>{let[i,a,s,u,l]=n.split(",");return i==="C"?{type:"city",name:a,iata_code:s}:{type:"airport",name:a,iata_code:s,latitude:u,longitude:l}}),_3=({onPlaceSelected:t,placeholder:n="Lookup city or airport"})=>{let[i,a]=bo.default.useState(!0),[s,u]=bo.default.useState(""),[l,p]=bo.default.useState(new $n([])),[m,h]=bo.default.useState([]),S=(0,h_.debounce)(v=>{h(l.search(v,{limit:10}))},300);return bo.default.useEffect(()=>{(0,__.default)(g3).then(v=>v.json()).then(v=>p(new $n(h3(v),{threshold:.2,keys:["name","iata_code"]})))},[]),(0,gr.jsxs)("div",{className:"places-lookup",children:[(0,gr.jsx)("input",{className:"places-lookup-input",placeholder:n,type:"text",value:s,onChange:v=>{i||a(!0),u(v.target.value),S(v.target.value)}}),i&&s.length>0&&m.length>0&&(0,gr.jsx)("div",{className:"places-lookup-popover",style:{display:"flex",flexDirection:"column"},children:m.map(({item:v},I)=>(0,gr.jsxs)("button",{className:"places-lookup-popover__item",onClick:()=>{a(!1),t(v),u(v.name)},children:[(0,gr.jsxs)("span",{className:"places-lookup-popover__icon-and-name-container",children:[(0,gr.jsx)(pe,{style:{fill:"var(--GREY-400)",marginTop:"-2px"},name:v.type==="airport"?"flight_takeoff":"apartment"}),v.name]})," ",(0,gr.jsx)("span",{style:{color:"var(--GREY-600)",fontSize:"12px"},children:v.iata_code})]},v.iata_code+I))})]})};var y_=ge(require("react"));var Ei=require("react/jsx-runtime");function y3(t){try{JSON.parse(t)}catch{return!1}return!0}var S3=({data:t,onFinished:n})=>{let[i,a]=y_.default.useState("{}"),s=y3(i);return(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)("pre",{children:JSON.stringify(t,null,2)}),(0,Ei.jsx)("textarea",{value:i,onChange:u=>a(u.target.value)}),(0,Ei.jsx)(Qe,{disabled:!s,onClick:()=>n(JSON.parse(i)),children:"Click me to trigger `onFinished` event"}),!s&&(0,Ei.jsx)("p",{style:{color:"tomato"},children:"Invalid JSON"})]})};var v3={economy:"Economy",premium_economy:"Premium Economy",business:"Business",first:"First",any:"Any"},E3={adult:"Adult",child:"Child",infant_without_seat:"Infant"};
30
+ http://duffel.com/docs/guides/ancillaries-component`),js=!0},Zs=t=>{zs()?console.info(Pi,t):zr({category:"log",message:t})};function st(t,e){let r=[];Array.isArray(e)?r=e:r=Object.entries(e).map(([n,o])=>({property:n,value:o})),zs()?(console.groupCollapsed(Pi,t),r.forEach(n=>{console.info(n)}),console.groupEnd()):zr({category:"log.group",message:t,data:e})}var v=require("react/jsx-runtime"),Ks={add:(0,v.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,v.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,v.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,v.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,v.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,v.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,v.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,v.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,v.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,v.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,v.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,v.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,v.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,v.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,v.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,v.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,v.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,v.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,v.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,v.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,v.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,v.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,v.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,v.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,v.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,v.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,v.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,v.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,v.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,v.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,v.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},rp=t=>t in Ks?Ks[t]:(Zs(`The icon "${t}" is missing from ICON_MAP`),null),N=({name:t,size:e,className:r,viewBox:n,style:o})=>(0,v.jsx)("svg",{className:r,width:e||24,height:e||24,viewBox:n||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...o},children:rp(t)});var Xs=A(Pe());var no=require("react/jsx-runtime"),np={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},op={32:"button--32",40:"button--40",48:"button--48"},ee=({iconBefore:t,variant:e="primary",size:r=40,children:n,className:o,type:i="button",...a})=>(0,no.jsxs)("button",{type:i,className:(0,Xs.default)("button",np[e],op[r],o),...a,children:[t&&(0,no.jsx)(N,{className:"duffel-button__icon duffel-button__icon--before",name:t}),n]});var Ii=require("react/jsx-runtime"),fr=({style:t,children:e})=>(0,Ii.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,Ii.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:e})});var Ut=require("react/jsx-runtime"),pr=class extends Js.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){_e(e)}render(){return this.state.hasError?(0,Ut.jsxs)(fr,{children:[(0,Ut.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,Ut.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,Ut.jsx)("div",{children:(0,Ut.jsx)(ee,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var Gt=require("react/jsx-runtime"),Qs=({height:t,message:e})=>(0,Gt.jsxs)(fr,{style:{minHeight:t},children:[(0,Gt.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,Gt.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:e||"Please try reloading. If the problem persists reach out to our support team."}),(0,Gt.jsx)("div",{children:(0,Gt.jsx)(ee,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var mr=t=>t.reduce((e,{id:r,total_amount:n,total_currency:o})=>({[r]:{total_amount:n,total_currency:o},...e}),{});var Ct=(t,e,r)=>{if(!t||e.length===0)return 0;let n=mr(t.available_services);return rn(n,e,r)},rn=(t,e,r)=>e.reduce((n,{quantity:o,id:i})=>{let a=n;return i in t?a+=o*+t[i].total_amount:r?a+=o*ip(i,r):_e(new Error(`The service id (${i}) provided could not be found in neither the offer nor the seat maps.`)),a},0),ip=(t,e)=>{for(let r of e)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(a.type==="seat"&&Array.isArray(a.available_services)){let s=a.available_services.find(c=>c.id===t);if(s)return+s.total_amount}return 0};var ec=({baggageSelectedServices:t,seatSelectedServices:e,cfarSelectedServices:r,offer:n,seatMaps:o,passengers:i})=>{let a=[...t,...e,...r],s=+n.total_amount+Ct(n,a,o);return{...n&&{selected_offers:[n.id]},passengers:i,services:ap(a),...n&&{payments:[{type:"balance",amount:`${s}`,currency:n.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.3--prototype.2"}}},ap=t=>Array.isArray(t)?t.filter(({quantity:e})=>e>0).map(({id:e,quantity:r})=>({id:e,quantity:r})):[];var Ni=t=>(e,r)=>{let{rate:n,amount:o}=t;return{amount:e*(1+n)+o,currency:r}},Ai="You cannot supply both markup and priceFormatters for the same service.",tc=(t,e)=>{let r={};if(e&&(e.bags&&(r.bags=e.bags),e.seats&&(r.seats=e.seats),e.cancel_for_any_reason&&(r.cancel_for_any_reason=e.cancel_for_any_reason)),t){if(t.bags){if(e&&e.bags)throw new Error(Ai);r.bags=Ni(t.bags)}if(t.seats){if(e&&e.seats)throw new Error(Ai);r.seats=Ni(t.seats)}if(t.cancel_for_any_reason){if(e&&e.cancel_for_any_reason)throw new Error(Ai);r.cancel_for_any_reason=Ni(t.cancel_for_any_reason)}}return r};var oo=t=>t.type==="baggage";var gr=t=>t.type==="cancel_for_any_reason";var sp=(t,e)=>`${t} must all have the same currency, but they have ${e.size} different currencies (${[...e].join(", ")}). Check the price formatters passed into the component's render function.`,rc=(t,e)=>{if(!e)return t;let r=t.available_services,n=new Set,o={baggage:e?.bags,cancel_for_any_reason:e?.cancel_for_any_reason},i=r.map(a=>{let s={...a};if(a.type in o&&o[a.type]){let{total_amount:c,total_currency:l}=a;if(oo(a)){let{amount:u,currency:d}=o[a.type](+a.total_amount,a.total_currency,a);c=u.toString(),d&&(l=d)}if(gr(a)){let{amount:u,currency:d}=o[a.type](+a.total_amount,a.total_currency,a);c=u.toString(),d&&(l=d)}if(n.add(l),n.size>1)throw new Error(sp(a.type,n));s.total_amount=c,s.total_currency=l}return s});return{...t,available_services:i}};function io(t){return t.type==="seat"}var cp=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,lp=(t,e,r)=>{let n={...t};if(io(n)&&n.available_services.length>0){let o=n.available_services.map(i=>{let a={...i},{amount:s,currency:c}=e(+i.total_amount,i.total_currency,i);if(a.total_amount=s.toString(),c&&(a.total_currency=c,r.add(c),r.size>1))throw new Error(cp(r));return a});n.available_services=o}return n},nc=(t,e)=>{if(!e)return t;let r=new Set;return t.map(o=>{let i=o.cabins.map(a=>{let s=a.rows.map(c=>{let l=c.sections.map(u=>{let d=u.elements.map(m=>lp(m,e,r));return{...u,elements:d}});return{...c,sections:l}});return{...a,rows:s}});return{...o,cabins:i}})};var ao=t=>{let e=t.split(", ").map(n=>parseInt(n));return(.2126*e[0]+.7152*e[1]+.0722*e[2])/255>.5};var oc=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var ic=t=>t.expires_at&&new Date(t.expires_at)<new Date;var nn=t=>"data"in t&&Array.isArray(t.data.errors),dp="https://api.duffel.com",up="3.1.3--prototype.2";async function so(t,e,r="GET",n){st("Making request to the Duffel API",{path:e,method:r});let o=`${dp}/ancillaries-component/${e}`,i=null;try{i=await fetch(o,{method:r,body:n,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${up}`}})}catch(s){throw st("Failed to make request to the Duffel API",{error:s}),s}let a=await i.json();if(Array.isArray(a.errors))throw st("Request to the Duffel API failed",{operation:`${r} ${o}`,method:r,request_id:a?.meta?.request_id,errors:a.errors,status:i.status}),{...i,data:a};return st("Request to the Duffel succeeded",{request_id:a?.meta?.request_id}),a}var ac="https://assets.duffel.com/components/3.1.3--prototype.2",sc=async t=>await(await fetch(ac+`/fixtures/offers/${t}.json`)).json(),cc=async t=>await(await fetch(ac+`/fixtures/seat-maps/${t}.json`)).json();var co=t=>t.startsWith("fixture_off_");async function lc(t,e){return(await so(e,`offers/${t}?return_available_services=true`)).data}async function dc(t,e,r,n,o){n(!0);let i=co(t);if(t=i?t.replace("fixture_",""):t,i)return sc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let a=await lc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the offer.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):nn(a)&&a.status===404&&(s="The offer you are looking for does not exist or has expired."),nn(a)&&a.status>=500&&a.status<600&&_e(new Error(s)),r(s)}finally{n(!1)}}async function uc(t,e){return(await so(e,`offers/${t}/seat_maps`)).data}async function fc(t,e,r,n,o){n(!0);let i=co(t);if(t=i?t.replace("fixture_",""):t,i)return cc(t).then(a=>{n(!1),o(a)});if(!e)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let a=await uc(t,e);o(a)}catch(a){let s="An unknown error occurred while retrieving the seat maps.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):nn(a)&&(s=a.data.errors[0]?.message||"Received an unknown error from the Duffel API."),_e(new Error(s)),r()}finally{n(!1)}}var Mi=t=>fp(t)&&(Di(t)||wi(t)||ki(t)||Bi(t)),fp=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,Di=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),wi=t=>"offer_id"in t&&"client_key"in t,ki=t=>"offer"in t&&"seat_maps"in t,Bi=t=>"offer"in t&&"client_key"in t;var pe=A(require("react"));var pc=require("react/jsx-runtime"),_r=()=>(0,pc.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var mc=require("react/jsx-runtime"),ct=({backgroundColor:t,color:e,children:r})=>(0,mc.jsx)("div",{style:{backgroundColor:t,color:e,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:r});var hr=(t,e)=>{if(t.available_services.length===0)throw new Error("No services available");let r=t.available_services.find(n=>n.type===e);if(!r)throw new Error(`No ${e} services available`);return r.total_currency};var Ge=t=>t.reduce((e,{quantity:r})=>e+r,0);var pp={baggage:oo,cancel_for_any_reason:gr},Sr=(t,e)=>{let r=pp[e];if(!r)throw new Error(`Unknown service type: ${e}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(n=>r(n)&&n.maximum_quantity>0)};var G=(t,e="en-GB",r={})=>n=>{try{let i=new Intl.NumberFormat(e,{style:"currency",currency:t,...r}).format(n);return r&&r.signDisplay&&(r.signDisplay==="always"||r.signDisplay==="exceptZero"&&n!==0)?i.replace(/^([+-])/,"$1 "):i}catch{return`${n} ${t}`}};var Ie=(t,e,r)=>t==1?`${t} ${e}`:`${t} ${r}`;var Mc=A(require("react"));var gc=A(Pe()),_c=A(require("react"));var he=require("react/jsx-runtime"),yr=({buttonTitle:t,title:e,icon:r,copy:n,onClick:o,children:i,isLoading:a,disabled:s,isSelected:c})=>{let l=_c.Children.toArray(i).length>0;return(0,he.jsxs)("button",{title:t,...o&&{onClick:o},disabled:s,className:(0,gc.default)("ancillary-card",a&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,he.jsx)("div",{children:c?(0,he.jsx)(N,{name:"check",className:"ancillary-card__selected-icon"}):(0,he.jsx)(N,{name:r})}),(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,he.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:e}),(0,he.jsx)("div",{className:"ancillary-card__children",children:l?i:(0,he.jsx)(N,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,he.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:n})]})};var Fi=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var Sc=A(Pe()),yc=A(require("react"));var hc=A(Pe());var Li=require("react/jsx-runtime"),mp={primary:"icon-button--primary",outlined:"icon-button--outlined"},on=({icon:t,variant:e="primary",className:r,...n})=>(0,Li.jsx)("button",{type:"button",className:(0,hc.default)("icon-button",mp[e],r),...n,children:(0,Li.jsx)(N,{name:t})});var Er=require("react/jsx-runtime"),vr=({children:t,onClose:e,isOpen:r})=>(yc.useEffect(()=>(Fi(!r),()=>Fi(!0)),[r]),(0,Er.jsx)("div",{className:(0,Sc.default)("modal",r&&"modal--open"),style:{opacity:0},children:(0,Er.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,Er.jsx)(on,{icon:"close",onClick:e,title:"Close modal",className:"modal--close-button"})]})})),br=({children:t})=>(0,Er.jsx)("div",{className:"modal-body",children:t});var lo=t=>t.reduce((e,r)=>({[r.id]:r,...e}),{});var uo=t=>t.slices.reduce((e,r)=>[...e,...r.segments],new Array);var mo=A(require("react"));var fo=(t,e,r)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:e?.given_name&&e?.family_name?`${e.given_name} ${e.family_name}`:e?.given_name?e.given_name:e?.family_name?e.family_name:`Passenger ${r}`:`Passenger ${r}`;var Ec=t=>{if(!t)return _e(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let e=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,r="";e&&(r=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let n="";return t.maximum_weight_kg&&(n=`Up to ${t.maximum_weight_kg}kg`),`${n}${r}`};var vc=(t,e,r,n)=>t.some(o=>o.id===n.id||o.serviceInformation?.type!=="carry_on"&&o.serviceInformation?.type!=="checked"||o.serviceInformation?.segmentId!==e||o.serviceInformation?.passengerId!==r?!1:o.serviceInformation?.type===n.metadata.type);var Cr=require("react/jsx-runtime"),bc=({id:t,min:e,max:r,value:n,onChange:o})=>(0,Cr.jsxs)("div",{className:"counter",id:t,children:[(0,Cr.jsx)(on,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:n<=e,onClick:()=>o(Math.max(n-1,e))}),(0,Cr.jsx)("div",{className:"counter__count-label",children:n}),(0,Cr.jsx)(on,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:n>=r,onClick:()=>o(Math.min(n+1,r))})]});var lt=require("react/jsx-runtime"),Cc=({segmentId:t,passengerId:e,availableService:r,quantity:n,onQuantityChanged:o,selectedServices:i})=>{let a=r.metadata.type==="carry_on"?"Cabin bag":"Checked bag",s=G(r.total_currency)(+r.total_amount),c=Ec(r.metadata),l=vc(i,t,e,r);return(0,lt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,lt.jsxs)("div",{children:[(0,lt.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[a,(0,lt.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,lt.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${r.id}--${e}`,children:s})]}),(0,lt.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:c})]}),(0,lt.jsx)(bc,{id:`counter--${r.id}--${e}`,min:0,value:n,onChange:o,max:l?0:r.maximum_quantity})]})};var Rc=require("react/jsx-runtime"),Tc=({includedBaggage:t})=>{let{carryOnBagsQuantity:e,checkedBagsQuantity:r}=t.reduce((o,{type:i,quantity:a})=>({carryOnBagsQuantity:o.carryOnBagsQuantity+(i==="carry_on"?a:0),checkedBagsQuantity:o.checkedBagsQuantity+(i==="checked"?a:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),n=new Array;return e>0&&n.push(Ie(e,"cabin bag","cabin bags")),r>0&&n.push(Ie(r,"checked bag","checked bags")),(0,Rc.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[n.join(" and ")," included with ticket"]})};var Tt=require("react/jsx-runtime"),xc=({segmentId:t,passengerId:e,passengerName:r,includedBaggage:n,passengerServicesForSegment:o,selectedServices:i,setSelectedServices:a})=>{let s=n.reduce((c,l)=>c+l.quantity,0);return(0,Tt.jsxs)("div",{style:{marginTop:"24px"},children:[(0,Tt.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:r}),s?(0,Tt.jsx)(Tc,{includedBaggage:n}):null,(0,Tt.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:o.map(c=>(0,Tt.jsx)(Cc,{passengerId:e,segmentId:t,availableService:c,selectedServices:i,quantity:i.find(({id:l})=>l==c.id)?.quantity||0,onQuantityChanged:l=>gp(l,t,e,r,c,i,a)},c.id))}),o.length===0&&(0,Tt.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},gp=(t,e,r,n,o,i,a)=>{let s=i.findIndex(({id:l})=>o.id===l),c=Array.from(i);s<0?c.push({id:o.id,quantity:t,serviceInformation:{segmentId:e,passengerId:r,passengerName:n,total_amount:o.total_amount,total_currency:o.total_currency,...o.metadata}}):c[s].quantity=t,a(c.filter(({quantity:l})=>l!==0))};var Hi=require("react/jsx-runtime"),Oc=({offer:t,segment:e,passengersById:r,selectedServices:n,setSelectedServices:o})=>(0,Hi.jsx)(br,{children:e.passengers.map(({passenger_id:i,baggages:a},s)=>(0,Hi.jsx)(xc,{segmentId:e.id,passengerId:i,passengerName:fo(r[i],t.passengers.find(({id:c})=>c===i),s+1),includedBaggage:a,passengerServicesForSegment:t.available_services.filter(({type:c,passenger_ids:l,segment_ids:u})=>c==="baggage"&&l.includes(i)&&u.includes(e.id)),selectedServices:n,setSelectedServices:o},i))});var dt=require("react/jsx-runtime"),Pc=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s})=>{let c=Ge(t),l=rn(e,t),u=G(r)(l),d=n&&n;return(0,dt.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,dt.jsxs)("div",{className:"flex--space-between",children:[(0,dt.jsxs)("div",{children:["Price for ",Ie(c,"extra bag","extra bags")]}),(0,dt.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",u]})]}),(0,dt.jsxs)("div",{style:d?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!d&&(0,dt.jsx)(ee,{size:48,variant:"outlined",disabled:n,onClick:()=>a(),children:"Back"}),(0,dt.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var po=t=>{let e=new Date(t);if(isNaN(e.valueOf()))_e(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return _p(e)},_p=t=>{let{format:e}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return e(t)};var Ye=require("react/jsx-runtime"),Ic=({segmentCount:t,currentSegmentIndex:e,currentSegment:r,setCurrentSegmentIndex:n})=>(0,Ye.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ye.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((o,i)=>i===e?(0,Ye.jsx)(hp,{},`segment_${i}`):(0,Ye.jsx)(Nc,{onClick:()=>n(i)},`segment_${i}`))}),(0,Ye.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ye.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:po(r.departing_at)})]})]}),Nc=({onClick:t,style:e})=>(0,Ye.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),hp=()=>(0,Ye.jsx)(Nc,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Tr=require("react/jsx-runtime"),Ac=({isOpen:t,offer:e,passengers:r,onClose:n,selectedServices:o})=>{let[i,a]=(0,mo.useState)(0),[s,c]=mo.default.useState(o);if(!e)return null;let l=uo(e),u=l[i],d=lo(r),m=mr(e.available_services),h=e.base_currency;return Sr(e,"baggage")&&(h=hr(e,"baggage")),(0,Tr.jsxs)(vr,{isOpen:t,onClose:()=>n(o),children:[(0,Tr.jsx)(Ic,{segmentCount:l.length,currentSegment:u,currentSegmentIndex:i,setCurrentSegmentIndex:S=>a(S)}),(0,Tr.jsx)(Oc,{offer:e,selectedServices:s,passengersById:d,segment:u,setSelectedServices:c}),(0,Tr.jsx)(Pc,{currency:h,selectedServices:s,servicePrices:m,isFirstSegment:i===0,isLastSegment:i+1===l.length,onNextSegmentButtonClicked:()=>a(i+1),onPreviousSegmentButtonClicked:()=>a(i-1),onClose:()=>n(s)})]})};var $e=require("react/jsx-runtime"),Dc=({isLoading:t,offer:e,passengers:r,selectedServices:n,setSelectedServices:o})=>{let[i,a]=Mc.default.useState(!1),s=Sr(e,"baggage"),c=Ge(n),l=c>0,u=Ct(e,n),d=e?.base_currency||"";s&&(d=hr(e,"baggage"));let m=e?G(d)(u):"0",h=s&&l?`${Ie(c,"bag","bags")} added for ${m}`:"Add any extra baggage you need for your trip";return(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(yr,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:h,icon:"cabin_bag",onClick:s?()=>a(!0):null,isLoading:t,disabled:!t&&!s,isSelected:l,children:[t&&(0,$e.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,$e.jsx)(_r,{})]}),!t&&!s&&(0,$e.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,$e.jsx)(Ac,{isOpen:!!(i&&e),offer:e,passengers:r,onClose:S=>{let y=JSON.parse(JSON.stringify(S));o(y),a(!1)},selectedServices:n})]})};var Lc=A(require("react"));var an=require("react/jsx-runtime"),go=({children:t})=>(0,an.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,an.jsx)(N,{name:"check"}),(0,an.jsx)("p",{children:t})]});var ut=require("react/jsx-runtime"),wc=({offerCurrency:t,service:e})=>(0,ut.jsxs)(br,{children:[(0,ut.jsxs)("ul",{style:{padding:0},children:[(0,ut.jsx)(go,{children:"Cancel your trip for any reason"}),(0,ut.jsxs)(go,{children:["Guaranteed refund of"," ",G(t)(+e.metadata.refund_amount)]}),(0,ut.jsx)(go,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,ut.jsxs)("a",{href:e.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,ut.jsx)(N,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var Rt=require("react/jsx-runtime"),kc=({service:t,selectedServices:e,onAddCfarService:r,onRemoveCfarService:n,onClose:o})=>{let i=e.some(({id:s})=>s==t.id),a=G(t.total_currency)(+t.total_amount);return(0,Rt.jsxs)("div",{className:"cfar-modal-footer",children:[(0,Rt.jsx)(ee,{size:48,variant:i?"destructive":"outlined",onClick:i?n:o,children:i?"Remove protection":"Don\u2019t protect trip"}),!i&&(0,Rt.jsxs)(ee,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:r,children:["Add protection for ",a]}),i&&(0,Rt.jsx)(Sp,{})]})},Sp=()=>(0,Rt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,Rt.jsx)(N,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Ui=require("react/jsx-runtime"),Bc=()=>(0,Ui.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Ui.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var ft=require("react/jsx-runtime"),Fc=({isOpen:t,offerCurrency:e,service:r,onClose:n,selectedServices:o})=>(0,ft.jsxs)(vr,{isOpen:t,onClose:()=>n(o),children:[(0,ft.jsx)(Bc,{}),r&&e&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)(wc,{service:r,offerCurrency:e}),(0,ft.jsx)(kc,{service:r,selectedServices:o,onAddCfarService:()=>n([{id:r.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:r.total_amount,total_currency:r.total_currency,...r.metadata}}]),onRemoveCfarService:()=>n([]),onClose:()=>n(o)})]})]});var Ve=require("react/jsx-runtime"),Hc=({isLoading:t,offer:e,selectedServices:r,setSelectedServices:n})=>{let[o,i]=Lc.default.useState(!1),a=Sr(e,"cancel_for_any_reason"),c=Ge(r)>0,l=e?.base_currency||"";a&&(l=hr(e,"cancel_for_any_reason"));let u=Ct(e,r),d=e?G(l)(u):"0",m=e?.available_services.find(gr),h=a&&c?`Your trip is protected for ${d}`:"Protect your purchase if you decide to cancel";return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)(yr,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:h,icon:"shield_with_moon",onClick:a?()=>i(!0):null,isLoading:t,disabled:!t&&!a,isSelected:c,children:[t&&(0,Ve.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Ve.jsx)(_r,{})]}),!t&&!a&&(0,Ve.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Ve.jsx)(Fc,{isOpen:!!(o&&e&&m),offerCurrency:e?.base_currency,service:m,onClose:S=>{i(!1),n(S)},selectedServices:r})]})};var Uc=(t,e)=>{for(let r of t)for(let n of r.cabins)for(let o of n.rows)for(let i of o.sections)for(let a of i.elements)if(e(a))return a};var _o=t=>Uc(t,r=>r.type==="seat"&&r.available_services.length>0)?.available_services[0]?.total_currency;var yl=A(require("react"));var Gc=t=>t.flatMap(e=>e.passengers.map((r,n)=>({passenger:r,passengerIndex:n,segment:e})));var qi=A(require("react"));var Yc=(t,e)=>e.cabins.filter(r=>r.deck===t);var $c=t=>{let e=new Set;for(let r of t)for(let n of r.rows)for(let o of n.sections)for(let i of o.elements)i.type!=="seat"&&i.type!=="empty"&&e.add(i.type);return e};var Vc=(t,e)=>!!(t.wings&&t.wings.first_row_index<=e&&t.wings.last_row_index>=e);var ul=A(Pe()),fl=A(require("react"));var Wc=A(Pe());var Gi=require("react/jsx-runtime"),jc=({value:t,onChange:e,options:r})=>(0,Gi.jsx)("div",{className:"seat-map__tab-select",children:r.map(n=>(0,Gi.jsx)("button",{type:"button",className:(0,Wc.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":n===t}),onClick:()=>t!==n&&e(n),children:n},n))});var zc=require("react/jsx-runtime"),qc=({value:t,setValue:e})=>{let r=["Lower deck","Upper deck"];return(0,zc.jsx)(jc,{options:r,value:r[t],onChange:n=>e(r.indexOf(n))})};var te=require("react/jsx-runtime"),Zc=({symbols:t})=>(0,te.jsxs)("div",{className:"seat-map__legend",children:[(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,te.jsx)(N,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,te.jsxs)("span",{className:"seat-map__legend-item",children:[(0,te.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,te.jsx)(N,{name:"close",size:14})}),"Unavailable"]}),[...t].map(e=>(0,te.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,te.jsx)(N,{name:e,size:20}),e.split("_")[0]]},e))]});var Kc=t=>{let e=Object.values(t.sections).map(r=>r.elements).reduce((r,n)=>r.concat(n),[]).filter(r=>r.type==="seat");return e.length>0?e[0].designator.substring(0,e[0].designator.length-1):null};var cl=A(Pe()),Vi=A(require("react"));var Xc=A(Pe());var Yi=require("react/jsx-runtime"),yp=["bassinet","exit_row"],Jc=({type:t})=>(0,Yi.jsx)("div",{className:(0,Xc.default)("map-element map-element--amenity",{"map-element--wrapped":!yp.includes(t)}),"aria-label":t.toString(),children:(0,Yi.jsx)(N,{name:t,size:16})});var Qc=require("react/jsx-runtime"),sn=()=>(0,Qc.jsx)("div",{className:"map-element map-element--empty"});var el=A(Pe());var ho=require("react/jsx-runtime"),tl=({isRight:t})=>(0,ho.jsx)("div",{className:(0,el.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,ho.jsx)(N,{name:"exit_row_right"}):(0,ho.jsx)(N,{name:"exit_row"})});var rl=(t="")=>t.split(" ").map(e=>e[0]).slice(0,2).join("");var il=A(Pe());var xt=require("react/jsx-runtime"),nl=({seat:t,service:e})=>{let r=e?G(e.total_currency)(+e.total_amount):"";return(0,xt.jsxs)("div",{className:"seat-info",children:[(0,xt.jsxs)("div",{className:"seat-info__details",children:[(0,xt.jsx)("strong",{children:t?.designator}),(0,xt.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,xt.jsx)("strong",{children:r})]}),t?.disclosures.map((n,o)=>(0,xt.jsx)("div",{className:"seat-info__disclosure",children:n},o))]})};var $i=require("react/jsx-runtime"),ol=({seat:t})=>(0,$i.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,$i.jsx)(N,{name:"close",size:14})});var pt=require("react/jsx-runtime"),al=({element:t,currentPassengerId:e,currentSegmentId:r,currentPassengerName:n,onSeatToggled:o,selectedServicesMap:i})=>{let a=t.available_services.find(D=>D.passenger_id===e);if(!a)return(0,pt.jsx)(ol,{seat:t});let s=Object.values(i).find(D=>D.serviceInformation?.designator===t.designator&&D.serviceInformation?.segmentId===r),c=s!=null,l=c?rl(s.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),u=!isNaN(+a?.total_amount)&&+a?.total_amount!=0,d=!c&&a.passenger_id===e,m=!c||c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId,h=(0,il.default)("map-element","map-element__seat",{"map-element--available":d,"map-element--selected":c,"map-element--actionable":m}),S=G(a.total_currency)(+a.total_amount),y=c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId;return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsxs)("button",{"data-testid":`seat-${t.designator}`,id:t.designator,className:h,onClick:()=>{m&&o({quantity:c?0:1,id:a.id,serviceInformation:{type:"seat",segmentId:r,passengerId:e,passengerName:n,designator:t.designator,disclosures:t.disclosures,total_amount:a.total_amount,total_currency:a.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${S}`,children:[u&&(0,pt.jsx)(N,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),l]}),y&&(0,pt.jsx)(nl,{seat:t,service:a})]})};var Ot=require("react/jsx-runtime"),sl=({element:t,elementIndex:e,sectionIndex:r,onSeatToggled:n,selectedServicesMap:o,currentPassengerId:i,currentSegmentId:a,currentPassengerName:s})=>(0,Ot.jsx)(Ot.Fragment,{children:io(t)?(0,Ot.jsx)(al,{currentSegmentId:a,currentPassengerId:i,currentPassengerName:s,selectedServicesMap:o,element:t,onSeatToggled:n},e):t.type==="empty"?(0,Ot.jsx)(sn,{},e):t.type==="exit_row"?(0,Ot.jsx)(tl,{isRight:r>0},e):(0,Ot.jsx)(Jc,{type:t.type},e)});var mt=require("react/jsx-runtime"),ll=({row:t,rowNumber:e,hasWings:r,section:n,sectionIndex:o,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:c,currentSegmentId:l})=>{let u=Object.keys(t.sections).length,d=u===1;return(0,mt.jsxs)(Vi.Fragment,{children:[(0,mt.jsx)("div",{className:(0,cl.default)("map-section",{"map-section--left":o===0,"map-section--right":d?!1:o===u-1,"map-section--wing":r}),children:n.elements.length>0?n.elements.map((m,h)=>(0,mt.jsx)(Vi.Fragment,{children:(0,mt.jsx)(sl,{sectionIndex:o,elementIndex:h,element:m,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentSegmentId:l,currentPassengerName:c})},h)):(0,mt.jsx)(sn,{})}),(o<u-1||d&&o<u)&&(0,mt.jsx)("span",{className:"map-section__aisle",children:e}),d&&o===t.sections.length-1&&(0,mt.jsx)(sn,{})]},o)};var cn=require("react/jsx-runtime"),dl=({row:t,hasWings:e,onSeatToggled:r,selectedServicesMap:n,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a})=>{let s=Kc(t);return(0,cn.jsx)(cn.Fragment,{children:t.sections.map((c,l)=>(0,cn.jsx)(ll,{row:t,rowNumber:s,hasWings:e,section:c,sectionIndex:l,selectedServicesMap:n,onSeatToggled:r,currentPassengerId:o,currentPassengerName:i,currentSegmentId:a},l))})};var ln=require("react/jsx-runtime"),Wi=()=>(0,ln.jsxs)(fr,{children:[(0,ln.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,ln.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var We=require("react/jsx-runtime"),pl=({seatMap:t,onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i})=>{let[a,s]=fl.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,We.jsx)(Wi,{});let c=Yc(a,t),l=c.length!==t.cabins.length,u=t.cabins.some(m=>m.wings);if(!c||!c.length)return(0,We.jsx)(Wi,{});let d=$c(c);return(0,We.jsxs)("div",{className:(0,ul.default)("seat-map",{"seat-map--wings":u}),children:[l&&(0,We.jsx)(qc,{value:a,setValue:m=>{s(m)}}),(0,We.jsx)("div",{className:"seat-map__legend-container",children:(0,We.jsx)(Zc,{symbols:d})}),c.map((m,h)=>(0,We.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":m.aisles},children:m.rows.map((S,y)=>(0,We.jsx)(dl,{row:S,hasWings:Vc(m,y),onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:o,currentSegmentId:i},y))},`cabin-${h}`))]})};var ji=require("react/jsx-runtime"),ml=t=>(0,ji.jsx)(br,{children:(0,ji.jsx)(pl,{...t})});var gt=require("react/jsx-runtime"),gl=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:o,onNextSegmentButtonClicked:i,onPreviousSegmentButtonClicked:a,onClose:s,seatMaps:c})=>{let l=Ge(t),u=rn(e,t,c),d=G(r)(u),m=n&&o;return(0,gt.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,gt.jsxs)("div",{className:"flex--space-between",children:[(0,gt.jsxs)("div",{children:["Price for ",Ie(l,"seat","seats")]}),(0,gt.jsxs)("div",{className:"h3--semibold",children:["+ ",d]})]}),(0,gt.jsxs)("div",{style:m?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!m&&(0,gt.jsx)(ee,{size:48,disabled:n,variant:"outlined",onClick:()=>a(),children:"Back"}),(0,gt.jsx)(ee,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>o?s():i(),children:o?"Confirm":"Next"})]})]})};var Ne=require("react/jsx-runtime"),_l=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:e,currentSegment:r,currentPassengerName:n,setCurrentSegmentAndPassengerPermutationsIndex:o})=>(0,Ne.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ne.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((i,a)=>a===e?(0,Ne.jsx)(Ep,{},`segment_${a}`):(0,Ne.jsx)(hl,{onClick:()=>o(a)},`segment_${a}`))}),(0,Ne.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ne.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:po(r.departing_at)})]}),(0,Ne.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:n})]}),hl=({onClick:t,style:e})=>(0,Ne.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),Ep=()=>(0,Ne.jsx)(hl,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Rr=require("react/jsx-runtime"),Sl=({isOpen:t,offer:e,passengers:r,seatMaps:n,selectedServices:o,onClose:i})=>{let[a,s]=qi.default.useState(0),[c,l]=qi.default.useState(o),u=c.reduce((K,X)=>({...K,[X.id]:X}),{});if(!e||!n)return null;let d=uo(e),m=lo(r),h=mr(e.available_services),S=Gc(d),{passenger:{passenger_id:y},passengerIndex:D,segment:{id:P}}=S[a],b=d.find(({id:K})=>K===P),ce=m[y],j=n.find(K=>K.segment_id===P),qe=fo(ce,e.passengers[D],D+1),ye=K=>{let X=new Array;for(let Me of c){let $t=Me.id===K.id&&K.quantity===0,xr=Me.serviceInformation?.segmentId===P&&Me.serviceInformation?.passengerId===y;!$t&&!xr&&(X=[...X,Me])}K.quantity>0&&(X=[...X,K]),l(X)},Yt=_o(n)??e.total_currency;return(0,Rr.jsxs)(vr,{isOpen:t,onClose:()=>i(o),children:[(0,Rr.jsx)(_l,{segmentAndPassengerPermutationsCount:S.length,currentSegment:b,currentPassengerName:qe,currentSegmentAndPassengerPermutationsIndex:a,setCurrentSegmentAndPassengerPermutationsIndex:s}),(0,Rr.jsx)(ml,{selectedServicesMap:u,seatMap:j,onSeatToggled:ye,currentPassengerId:y,currentPassengerName:qe,currentSegmentId:P}),(0,Rr.jsx)(gl,{seatMaps:n,currency:Yt,selectedServices:c,servicePrices:h,isFirstSegment:a===0,isLastSegment:a+1===S.length,onNextSegmentButtonClicked:()=>{s(a+1)},onPreviousSegmentButtonClicked:()=>{s(a-1)},onClose:()=>i(c)})]})};var je=require("react/jsx-runtime"),El=({isLoading:t,offer:e,seatMaps:r,passengers:n,selectedServices:o,setSelectedServices:i})=>{let[a,s]=yl.default.useState(!1),c=Array.isArray(r)&&r.length>0,l=Ge(o),u=l>0,d=Ct(e,o,r),m=e?.base_currency??"";r&&(m=_o(r)??m);let h=e?G(m)(d):"0",S=c&&u?`${Ie(l,"seat","seats")} selected for ${h}`:"Specify where on the plane you\u2019d like to sit";return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(yr,{buttonTitle:"Select seats",title:"Seat selection",copy:S,icon:"flight_class",onClick:c?()=>s(!0):null,isLoading:t,disabled:t&&!c,isSelected:u,children:[t&&(0,je.jsxs)(ct,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,je.jsx)(_r,{})]}),!t&&!c&&(0,je.jsx)(ct,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,je.jsx)(Sl,{isOpen:!!(e&&r&&a),seatMaps:r,offer:e,passengers:n,selectedServices:o,onClose:y=>{i(y),s(!1)}})]})};var Se=require("react/jsx-runtime"),vp="https://assets.duffel.com/components/3.1.3--prototype.2",bp=`${vp}/global.css`,Cp=t=>{if(to(t.debug||!1),st("Properties passed into the component:",t),!Mi(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let e=Di(t),r=wi(t),n=ki(t),o=Bi(t),i=t.services.includes("seats")&&!("seat_maps"in t)&&(e||r||o),[a,s]=pe.useState(t.passengers),[c,l]=pe.useState(t.offer),[u,d]=pe.useState(r),[m,h]=pe.useState(n?t.seat_maps:void 0),[S,y]=pe.useState(i),[D,P]=pe.useState(null),[b,ce]=pe.useState(new Array),[j,qe]=pe.useState(new Array),[ye,Yt]=pe.useState(new Array),K=tc(t.markup,t.priceFormatters),X=k=>{let le="This offer has expired.";if(ic(k)){P(le);return}else{let Pr=new Date(k?.expires_at)?.getTime()-Date.now(),It=1e3*60*60*24;Pr<It&&setTimeout(()=>P(le),Pr)}let Or=rc(k,K);l(Or)},Me=k=>{let le=nc(k,K.seats);h(le)};if(pe.useEffect(()=>{Gn("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(r||e)&&dc(t.offer_id,e?null:t.client_key,P,d,k=>{if(X(k),k.passengers.length!==a.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${k.passengers.length}).`);e&&s(t.passengers.map((le,Or)=>({...le,id:k.passengers[Or].id})))}),i&&fc(r||e?t.offer_id:t.offer.id,e?null:t.client_key,()=>Me([]),y,Me),o&&X(t.offer),n&&(X(t.offer),Me(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),pe.useEffect(()=>{if(!c)return;let k=ec({baggageSelectedServices:b,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,passengers:a,seatMaps:m});if(oc(k)){let le={offer_total_amount:c.total_amount,offer_total_currency:c.total_currency,offer_tax_amount:c.tax_amount,offer_tax_currency:c.tax_currency,baggage_services:b,seat_services:j,cancel_for_any_reason_services:ye};st("Payload ready",{"Order creation payload":k,"Services metadata":le}),t.onPayloadReady(k,le)}},[b,j,ye]),!Mi(t))return null;let $t=`${72*t.services.length+32*(t.services.length-1)}px`,xr={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&ao(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return st("Component's internal state:",{isOfferLoading:u,isSeatMapLoading:S,baggageSelectedServices:b,seatSelectedServices:j,cfarSelectedServices:ye,offer:c,seatMaps:m,error:D}),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("link",{rel:"stylesheet",href:bp}),(0,Se.jsx)("div",{className:"duffel-components",style:xr,children:(0,Se.jsxs)(pr,{children:[D&&(0,Se.jsx)(Qs,{height:$t,message:D}),!D&&t.services.map(k=>{if(k==="bags")return(0,Se.jsx)(Dc,{isLoading:u,offer:c,passengers:a,selectedServices:b,setSelectedServices:ce},"bags");if(k==="seats")return(0,Se.jsx)(El,{isLoading:u||S,seatMaps:m,offer:c,passengers:a,selectedServices:j,setSelectedServices:qe},"seats");if(k==="cancel_for_any_reason")return(0,Se.jsx)(Hc,{isLoading:u,offer:c,selectedServices:ye,setSelectedServices:Yt},"cancel_for_any_reason")})]})})]})};var Pt=A(bl());var Tl="https://js.stripe.com/v3",Tp=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Cl="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rp=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Tl,'"]')),r=0;r<e.length;r++){var n=e[r];if(Tp.test(n.src))return n}return null},xp=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(Tl).concat(r);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(n),n},Op=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:r})},yo=null,Pp=function(e){return yo!==null||(yo=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(Cl),window.Stripe){r(window.Stripe);return}try{var o=Rp();o&&e?console.warn(Cl):o||(o=xp(e)),o.addEventListener("load",function(){window.Stripe?r(window.Stripe):n(new Error("Stripe.js not available"))}),o.addEventListener("error",function(){n(new Error("Failed to load Stripe.js"))})}catch(i){n(i);return}})),yo},Ip=function(e,r,n){if(e===null)return null;var o=e.apply(void 0,r);return Op(o,n),o},Rl=Promise.resolve().then(function(){return Pp(null)}),xl=!1;Rl.catch(function(t){xl||console.warn(t)});var Ol=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];xl=!0;var o=Date.now();return Rl.then(function(i){return Ip(i,r,o)})};var Ae=A(require("react"));var Z=require("react/jsx-runtime"),Np="https://assets.duffel.com/components/3.1.3--prototype.2",Ap=`${Np}/global.css`,Mp="card",Dp="3.1.3--prototype.2",wp={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},kp={color:"#ef4444",iconColor:"#ef4444"},Bp=({styles:t,paymentIntentClientToken:e,onSuccessfulPayment:r,onFailedPayment:n})=>{let[o,i]=Ae.useState(null),[a,s]=Ae.useState(!1),[c,l]=Ae.useState(!1),[u,d]=Ae.useState(!1),[m,h]=Ae.useState(""),S=(0,Pt.useStripe)(),y=(0,Pt.useElements)();return Ae.useEffect(()=>{if(y&&!o){let P=y?.getElement(Mp);P&&i(P)}},[y,o]),Ae.useEffect(()=>{o&&o.on("change",P=>{let{error:b,complete:ce}=P;b?(l(!0),h(b.message)):l(!1),s(!!ce)})},[o]),e?(0,Z.jsx)("div",{className:"card-payment__container",children:(0,Z.jsxs)("form",{onSubmit:async P=>{if(P.preventDefault(),!(!S||!y)&&o){d(!0);let b=atob(e),ce=JSON.parse(b),{client_secret:j}=ce,qe=await S.confirmCardPayment(j,{payment_method:{card:o,metadata:{duffel_components_version:Dp||"failed-to-get-version"}}});if(d(!1),qe.error){let{error:ye}=qe;n(ye)}else r()}},children:[u&&(0,Z.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,Z.jsx)(Pt.CardElement,{className:"card-details",options:{style:{base:{...wp,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...kp}}}}),(0,Z.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:c&&m}),(0,Z.jsx)(ee,{className:"card-payment__pay-button",type:"submit",disabled:!a||u,"aria-label":"Pay",children:u?"Processing...":"Pay"})]})}):null},Fp=t=>{let[e,r]=Ae.useState(null);to(t.debug||!1);let n=atob(t.paymentIntentClientToken),o;try{o=JSON.parse(n)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:i}=o;Ae.useEffect(()=>{if(!e&&i){let s=Ol(i);s&&r(s)}},[e,i]);let a={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&ao(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("link",{rel:"stylesheet",href:Ap}),(0,Z.jsx)("div",{className:"duffel-components",style:a,children:(0,Z.jsx)(pr,{children:(0,Z.jsx)(Pt.Elements,{stripe:e,children:(0,Z.jsx)(Bp,{...t})})})})]})};var Lp={economy:"Economy",premium_economy:"Premium Economy",business:"Business",first:"First",any:"Any"},Hp={adult:"Adult",child:"Child",infant_without_seat:"Infant"};
47
31
  /*! Bundled license information:
48
32
 
49
33
  classnames/index.js:
@@ -52,15 +36,5 @@ classnames/index.js:
52
36
  Licensed under the MIT License (MIT), see
53
37
  http://jedwatson.github.io/classnames
54
38
  *)
55
-
56
- lodash/lodash.js:
57
- (**
58
- * @license
59
- * Lodash <https://lodash.com/>
60
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
61
- * Released under MIT license <https://lodash.com/license>
62
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
63
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
64
- *)
65
39
  */
66
40
  //# sourceMappingURL=index.js.map