File "order-summary-discount-frontend.js"
Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/woocommerce/assets/client/blocks/cart-blocks/order-summary-discount-frontend.js
File size: 62.36 KB
MIME-type: text/plain
Charset: utf-8
(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[5269],{5851:(e,t,o)=>{"use strict";o.d(t,{Iq:()=>i});var n=o(2819),r=o(9307),a=(o(2560),o(4283)),s=o(8864);function i(e,t,o={}){const{memo:i=!1}=o;let l=(0,r.forwardRef)(e);i&&(l=(0,r.memo)(l)),void 0===t&&"undefined"!=typeof process&&process.env;let c=l[a.rE]||[t];return Array.isArray(t)&&(c=[...c,...t]),"string"==typeof t&&(c=[...c,t]),l.displayName=t,l[a.rE]=(0,n.uniq)(c),l.selector=`.${(0,s.l)(t)}`,l}},202:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(9196),r=o(444);const a=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},9140:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(9196),r=o(444);const a=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},2720:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(9196),r=o(444);const a=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},1242:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(9196),r=o(444);const a=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"}))},2904:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(9196),r=o(9770),a=o(3849),s=o.n(a),i=(o(1029),o(2595));const l=({className:e,showSpinner:t=!1,children:o,variant:a="contained",...l})=>{const c=s()("wc-block-components-button","wp-element-button",e,a,{"wc-block-components-button--loading":t});return(0,n.createElement)(r.Z,{className:c,...l},t&&(0,n.createElement)(i.Z,null),(0,n.createElement)("span",{className:"wc-block-components-button__text"},o))}},6467:(e,t,o)=>{"use strict";o.d(t,{l:()=>ee});var n=o(9196),r=o(3554),a=o(711),s=o(9307),i=o(5736),l=o(2629),c=o(3849),p=o.n(c),u=o(7608),d=o.n(u),m=o(2819),f=o(4333),h=o(9630),g=o(5158),v=o(444);const b=(0,s.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(v.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var y=o(2314);class E extends s.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:o,selectedSuggestionIndex:n,className:r,...a}=this.props,i=e?e.length+1:0;return(0,s.createElement)("input",(0,y.Z)({ref:this.bindInput,id:`components-form-token-input-${o}`,type:"text"},a,{value:e||"",onChange:this.onChange,size:i,className:d()(r,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":-1!==n?`components-form-token-suggestions-${o}-${n}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`}))}}const w=E;var _=o(2121),k=o.n(_);class C extends s.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,k()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const o=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,o),suggestionMatch:e.substring(o,o+t.length),suggestionAfterMatch:e.substring(o+t.length)}}render(){return(0,s.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},(0,m.map)(this.props.suggestions,((e,t)=>{const o=this.computeSuggestionMatch(e),n=d()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return(0,s.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:n,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},o?(0,s.createElement)("span",{"aria-label":this.props.displayTransform(e)},o.suggestionBeforeMatch,(0,s.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):this.props.displayTransform(e))})))}}C.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])};const N=(0,f.withSafeTimeout)(C);var T=o(8494),S=o(9770),x=o(5082),A=o(1539),R=o(2021),L=o(3881);const I=(0,A.L)({as:"div",useHook:function(e){const t=(0,R.y)(e,"FlexBlock");return(0,L.i)({isBlock:!0,...t})},name:"FlexBlock"});var O=o(4762);const D=(0,f.createHigherOrderComponent)((e=>t=>{const[o,n]=(0,s.useState)(),r=(0,s.useCallback)((e=>n((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,s.createElement)("div",(0,f.__experimentalUseFocusOutside)(o),(0,s.createElement)(e,(0,y.Z)({ref:r},t)))}),"withFocusOutside")(class extends s.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}}),M=function e({value:t,label:o,options:n,onChange:r,onFilterValueChange:a=m.noop,hideLabelFromVision:l,help:c,allowReset:p=!0,className:u,messages:v={selected:(0,i.__)("Item selected.")}}){var y;const E=(0,f.useInstanceId)(e),[_,k]=(0,s.useState)(null),[C,A]=(0,s.useState)(!1),[R,L]=(0,s.useState)(""),M=(0,s.useRef)(),F=n.find((e=>e.value===t)),P=null!==(y=null==F?void 0:F.label)&&void 0!==y?y:"",U=(0,s.useMemo)((()=>{const e=[],t=[],o=(0,m.deburr)(R.toLocaleLowerCase());return n.forEach((n=>{const r=(0,m.deburr)(n.label).toLocaleLowerCase().indexOf(o);0===r?e.push(n):r>0&&t.push(n)})),e.concat(t)}),[R,n,t]),H=e=>{r(e.value),(0,g.speak)(v.selected,"assertive"),k(e),L(""),A(!1)},V=(e=1)=>{let t=U.indexOf(_)+e;t<0?t=U.length-1:t>=U.length&&(t=0),k(U[t]),A(!0)};return(0,s.useEffect)((()=>{const e=U.length>0;if(C){const t=e?(0,i.sprintf)(
/* translators: %d: number of results. */
/* translators: %d: number of results. */
(0,i._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",U.length),U.length):(0,i.__)("No results.");(0,g.speak)(t,"polite")}}),[U,C]),(0,s.createElement)(D,{onFocusOutside:()=>{A(!1)}},(0,s.createElement)(T.Z,{className:d()(u,"components-combobox-control"),tabIndex:"-1",label:o,id:`components-form-token-input-${E}`,hideLabelFromVision:l,help:c},(0,s.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;switch(e.keyCode){case h.ENTER:_&&(H(_),t=!0);break;case h.UP:V(-1),t=!0;break;case h.DOWN:V(1),t=!0;break;case h.ESCAPE:A(!1),k(null),t=!0,e.stopPropagation()}t&&e.preventDefault()}},(0,s.createElement)(x.Z,null,(0,s.createElement)(I,null,(0,s.createElement)(w,{className:"components-combobox-control__input",instanceId:E,ref:M,value:C?R:P,"aria-label":P?`${P}, ${o}`:null,onFocus:()=>{A(!0),a(""),L("")},isExpanded:C,selectedSuggestionIndex:U.indexOf(_),onChange:e=>{const t=e.value;L(t),a(t),A(!0)}})),p&&(0,s.createElement)(O.Z,null,(0,s.createElement)(S.Z,{className:"components-combobox-control__reset",icon:b,disabled:!t,onClick:()=>{r(null),M.current.input.focus()},label:(0,i.__)("Reset")}))),C&&(0,s.createElement)(N,{instanceId:E,match:{label:R},displayTransform:e=>e.label,suggestions:U,selectedIndex:U.indexOf(_),onHover:k,onSelect:H,scrollIntoView:!0}))))};var F=o(7998),P=o(9818),U=o(4801);o(2750);const H=({id:e,className:t,label:o,onChange:r,options:l,value:c,required:u=!1,errorId:d,autoComplete:m="off",errorMessage:f=(0,i.__)("Please select a valid option","woocommerce")})=>{const h=(0,s.useRef)(null),g=(0,s.useId)(),v=e||"control-"+g,b=d||v,{setValidationErrors:y,clearValidationError:E}=(0,P.useDispatch)(U.VALIDATION_STORE_KEY),{error:w,validationErrorId:_}=(0,P.useSelect)((e=>{const t=e(U.VALIDATION_STORE_KEY);return{error:t.getValidationError(b),validationErrorId:t.getValidationErrorId(b)}}));return(0,s.useEffect)((()=>(!u||c?E(b):y({[b]:{message:f,hidden:!0}}),()=>{E(b)})),[E,c,b,f,u,y]),(0,n.createElement)("div",{id:v,className:p()("wc-block-components-combobox",t,{"is-active":c,"has-error":(null==w?void 0:w.message)&&!(null!=w&&w.hidden)}),ref:h},(0,n.createElement)(M,{className:"wc-block-components-combobox-control",label:o,onChange:r,onFilterValueChange:e=>{if(e.length){const t=(0,F.Kn)(h.current)?h.current.ownerDocument.activeElement:void 0;if(t&&(0,F.Kn)(h.current)&&h.current.contains(t))return;const o=e.toLocaleUpperCase(),n=l.find((e=>e.value.toLocaleUpperCase()===o));if(n)return void r(n.value);const a=l.find((e=>e.label.toLocaleUpperCase().startsWith(o)));a&&r(a.value)}},options:l,value:c||"",allowReset:!1,autoComplete:m,"aria-invalid":(null==w?void 0:w.message)&&!(null!=w&&w.hidden),"aria-errormessage":_}),(0,n.createElement)(a.ValidationInputError,{propertyName:b}))};o(7368);const V=({className:e,countries:t,id:o,label:r,onChange:a,value:c="",autoComplete:u="off",required:d=!1,errorId:m,errorMessage:f=(0,i.__)("Please select a country","woocommerce")})=>{const h=(0,s.useMemo)((()=>Object.entries(t).map((([e,t])=>({value:e,label:(0,l.decodeEntities)(t)})))),[t]);return(0,n.createElement)("div",{className:p()(e,"wc-block-components-country-input")},(0,n.createElement)(H,{id:o,label:r,onChange:a,options:h,value:c,errorId:m,errorMessage:f,required:d,autoComplete:u}))};var z=o(8752);const B=e=>(0,n.createElement)(V,{countries:z.DK,...e}),W=e=>(0,n.createElement)(V,{countries:z.mO,...e});o(6115);const $=(e,t)=>{const o=t.find((t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()));return o?o.value:""},K=({className:e,id:t,states:o,country:r,label:c,onChange:u,autoComplete:d="off",value:m="",required:f=!1,errorId:h=""})=>{const g=o[r],v=(0,s.useMemo)((()=>g?Object.keys(g).map((e=>({value:e,label:(0,l.decodeEntities)(g[e])}))):[]),[g]),b=(0,s.useCallback)((e=>{const t=v.length>0?$(e,v):e;t!==m&&u(t)}),[u,v,m]),y=(0,s.useRef)(m);return(0,s.useEffect)((()=>{y.current!==m&&(y.current=m)}),[m]),(0,s.useEffect)((()=>{if(v.length>0&&y.current){const e=$(y.current,v);e!==y.current&&b(e)}}),[v,b]),v.length>0?(0,n.createElement)(H,{className:p()(e,"wc-block-components-state-input"),id:t,label:c,onChange:b,options:v,value:m,errorMessage:(0,i.__)("Please select a state.","woocommerce"),errorId:h,required:f,autoComplete:d}):(0,n.createElement)(a.ValidatedTextInput,{className:e,id:t,label:c,onChange:b,autoComplete:d,value:m,required:f})},Z=e=>(0,n.createElement)(K,{states:z.JJ,...e}),j=e=>(0,n.createElement)(K,{states:z.nm,...e});var G=o(9530),Y=o(9127),q=o.n(Y),X=o(5969);var J=o(6483);const Q=({id:e="",fields:t,fieldConfig:o={},onChange:l,addressType:c="shipping",values:u,children:d})=>{const m=(0,f.useInstanceId)(Q),h=(0,G.s)(t),g=(0,G.s)(o),v=(0,G.s)((0,F.$n)(u,"country")?u.country:""),b=(0,s.useMemo)((()=>{const e=(0,X.Z)(h,g,v);return{fields:e,addressType:c,required:e.filter((e=>e.required)),hidden:e.filter((e=>e.hidden))}}),[h,g,v,c]),y=(0,s.useRef)({});return(0,s.useEffect)((()=>{const e={...u,...Object.fromEntries(b.hidden.map((e=>[e.key,""])))};q()(u,e)||l(e)}),[l,b,u]),(0,s.useEffect)((()=>{"shipping"===c&&(0,F.$n)(u,"country")&&(e=>{const t="shipping_country",o=(0,P.select)(U.VALIDATION_STORE_KEY).getValidationError(t);!e.country&&(e.city||e.state||e.postcode)&&(o?(0,P.dispatch)(U.VALIDATION_STORE_KEY).showValidationError(t):(0,P.dispatch)(U.VALIDATION_STORE_KEY).setValidationErrors({[t]:{message:(0,i.__)("Please select your country","woocommerce"),hidden:!1}})),o&&e.country&&(0,P.dispatch)(U.VALIDATION_STORE_KEY).clearValidationError(t)})(u)}),[u,c]),(0,s.useEffect)((()=>{var e,t;null===(e=y.current)||void 0===e||null===(t=e.postcode)||void 0===t||t.revalidate()}),[v]),e=e||`${m}`,(0,n.createElement)("div",{id:e,className:"wc-block-components-address-form"},b.fields.map((t=>{if(t.hidden)return null;const o={id:`${e}-${t.key}`,errorId:`${c}_${t.key}`,label:t.required?t.label:t.optionalLabel,autoCapitalize:t.autocapitalize,autoComplete:t.autocomplete,errorMessage:t.errorMessage,required:t.required,className:`wc-block-components-address-form__${t.key}`,...t.attributes};if("email"===t.key&&(o.id="email",o.errorId="billing_email"),"checkbox"===t.type)return(0,n.createElement)(a.CheckboxControl,{className:`wc-block-components-address-form__${t.key}`,label:t.label,key:t.key,checked:Boolean(u[t.key]),onChange:e=>{l({...u,[t.key]:e})},...o});if("country"===t.key&&(0,F.$n)(u,"country")){const e="shipping"===c?W:B;return(0,n.createElement)(e,{key:t.key,...o,value:u.country,onChange:e=>{const t={...u,country:e,state:""};u.postcode&&!(0,r.isPostcode)({postcode:u.postcode,country:e})&&(t.postcode=""),l(t)}})}if("state"===t.key&&(0,F.$n)(u,"state")){const e="shipping"===c?j:Z;return(0,n.createElement)(e,{key:t.key,...o,country:u.country,value:u.state,onChange:e=>l({...u,state:e})})}return"select"===t.type?void 0===t.options?null:(0,n.createElement)(H,{key:t.key,...o,className:p()("wc-block-components-select-input",`wc-block-components-select-input-${t.key}`),value:u[t.key],onChange:e=>{l({...u,[t.key]:e})},options:t.options}):(0,n.createElement)(a.ValidatedTextInput,{key:t.key,ref:e=>y.current[t.key]=e,...o,type:t.type,value:u[t.key],onChange:e=>l({...u,[t.key]:e}),customFormatter:e=>"postcode"===t.key?e.trimStart().toUpperCase():e,customValidation:e=>((e,t,o)=>!((e.required||e.value)&&("postcode"===t&&o&&!(0,r.isPostcode)({postcode:e.value,country:o})?(e.setCustomValidity((0,i.__)("Please enter a valid postcode","woocommerce")),1):"email"===t&&!(0,J.isEmail)(e.value)&&(e.setCustomValidity((0,i.__)("Please enter a valid email address","woocommerce")),1))))(e,t.key,(0,F.$n)(u,"country")?u.country:"")})})),d)},ee=Q},8810:(e,t,o)=>{"use strict";o.d(t,{Z:()=>w});var n=o(9196),r=o(3849),a=o.n(r),s=o(5736),i=o(2629),l=o(711),c=o(9307),p=o(3251),u=o(3561),d=o.n(u);const m=["a","b","em","i","strong","p","br"],f=["target","href","rel","name","download"],h=(e,t)=>{const o=(null==t?void 0:t.tags)||m,n=(null==t?void 0:t.attr)||f;return d().sanitize(e,{ALLOWED_TAGS:o,ALLOWED_ATTR:n})};var g=o(8161),v=o(4293),b=o(4617);const y=e=>{const t=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:(0,i.decodeEntities)(e.name),value:e.rate_id,description:(0,n.createElement)(n.Fragment,null,Number.isFinite(t)&&(0,n.createElement)(l.FormattedMonetaryAmount,{currency:(0,v.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,(0,i.decodeEntities)(e.delivery_time))}},E=({className:e="",noResultsMessage:t,onSelectRate:o,rates:r,renderOption:a=y,selectedRate:s,disabled:i=!1})=>{const p=(null==s?void 0:s.rate_id)||"",u=(0,g.D)(p),[d,m]=(0,c.useState)((()=>{var e;return p||(null===(e=r[0])||void 0===e?void 0:e.rate_id)}));if((0,c.useEffect)((()=>{p&&p!==u&&p!==d&&m(p)}),[p,d,u]),(0,c.useEffect)((()=>{d&&o(d)}),[o,d]),0===r.length)return t;if(r.length>1)return(0,n.createElement)(l.RadioControl,{className:e,onChange:e=>{m(e),o(e)},disabled:i,selected:d,options:r.map(a)});const{label:f,secondaryLabel:h,description:v,secondaryDescription:b}=a(r[0]);return(0,n.createElement)(l.RadioControlOptionLayout,{label:f,secondaryLabel:h,description:v,secondaryDescription:b})};o(7099);const w=({packageId:e,className:t="",noResultsMessage:o,renderOption:r,packageData:u,collapsible:d,showItems:m})=>{const{selectShippingRate:f,isSelectingRate:g}=(0,p.V)(),v=document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length>1,b=null!=m?m:v,y=null!=d?d:v,w=(0,n.createElement)(n.Fragment,null,(y||b)&&(0,n.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:h(u.name)}}),b&&(0,n.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(u.items).map((e=>{const t=(0,i.decodeEntities)(e.name),o=e.quantity;return(0,n.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},(0,n.createElement)(l.Label,{label:o>1?`${t} × ${o}`:`${t}`,screenReaderLabel:(0,s.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */
(0,s._n)("%1$s (%2$d unit)","%1$s (%2$d units)",o,"woocommerce"),t,o)}))})))),_=(0,c.useCallback)((t=>{f(t,e)}),[e,f]),k={className:t,noResultsMessage:o,rates:u.shipping_rates,onSelectRate:_,selectedRate:u.shipping_rates.find((e=>e.selected)),renderOption:r,disabled:g};return y?(0,n.createElement)(l.Panel,{className:a()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":g}),initialOpen:!1,title:w},(0,n.createElement)(E,{...k})):(0,n.createElement)("div",{className:a()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":g})},w,(0,n.createElement)(E,{...k}))}},5091:(e,t,o)=>{"use strict";o.d(t,{Z:()=>v});var n=o(9196),r=o(5736),a=o(9307),s=o(6881),i=o(3554),l=o(7865),c=o(9659),p=o(8449),u=o(3251),d=o(4787),m=o(7998),f=o(8810),h=o(5158);const g=({packages:e,showItems:t,collapsible:o,noResultsMessage:r,renderOption:a})=>e.length?(0,n.createElement)(n.Fragment,null,e.map((({package_id:e,...s})=>(0,n.createElement)(f.Z,{key:e,packageId:e,packageData:s,collapsible:o,showItems:t,noResultsMessage:r,renderOption:a})))):null,v=({shippingRates:e,isLoadingRates:t,className:o,collapsible:v,showItems:b,noResultsMessage:y,renderOption:E,context:w})=>{(0,a.useEffect)((()=>{var o,n;t||(o=(0,l.wH)(e),n=(0,l.Q_)(e),1===o?(0,h.speak)((0,r.sprintf)(/* translators: %d number of shipping options found. */ /* translators: %d number of shipping options found. */
(0,r._n)("%d shipping option was found.","%d shipping options were found.",n,"woocommerce"),n)):(0,h.speak)((0,r.sprintf)(/* translators: %d number of shipping packages packages. */ /* translators: %d number of shipping packages packages. */
(0,r._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",o,"woocommerce"),o)+" "+(0,r.sprintf)(/* translators: %d number of shipping options available. */ /* translators: %d number of shipping options available. */
(0,r._n)("%d shipping option was found","%d shipping options were found",n,"woocommerce"),n)))}),[t,e]);const{extensions:_,receiveCart:k,...C}=(0,c.b)(),N={className:o,collapsible:v,showItems:b,noResultsMessage:y,renderOption:E,extensions:_,cart:C,components:{ShippingRatesControlPackage:f.Z},context:w},{isEditor:T}=(0,p._)(),{hasSelectedLocalPickup:S,selectedRates:x}=(0,u.V)(),A=(0,m.Kn)(x)?Object.values(x):[],R=A.every((e=>e===A[0]));return(0,n.createElement)(s.Z,{isLoading:t,screenReaderLabel:(0,r.__)("Loading shipping rates…","woocommerce"),showSpinner:!0},S&&"woocommerce/cart"===w&&e.length>1&&!R&&!T&&(0,n.createElement)(d.Z,{className:"wc-block-components-notice",isDismissible:!1,status:"warning"},(0,r.__)("Multiple shipments must have the same pickup location","woocommerce")),(0,n.createElement)(i.ExperimentalOrderShippingPackages.Slot,{...N}),(0,n.createElement)(i.ExperimentalOrderShippingPackages,null,(0,n.createElement)(g,{packages:e,noResultsMessage:y,renderOption:E})))}},7184:(e,t,o)=>{"use strict";o.d(t,{RK:()=>f,X$:()=>b,Br:()=>w,Tm:()=>$});var n=o(9196),r=o(5736),a=o(9307),s=o(2904),i=o(6881),l=o(4333),c=o(711),p=o(9818),u=o(4801),d=o(3849),m=o.n(d);o(1691);const f=(0,l.withInstanceId)((({instanceId:e,isLoading:t=!1,onSubmit:o,displayCouponForm:l=!1})=>{const[d,f]=(0,a.useState)(""),[h,g]=(0,a.useState)(!l),v=`wc-block-components-totals-coupon__input-${e}`,b=m()("wc-block-components-totals-coupon__content",{"screen-reader-text":h}),{validationErrorId:y}=(0,p.useSelect)((e=>({validationErrorId:e(u.VALIDATION_STORE_KEY).getValidationErrorId(v)})));return(0,n.createElement)("div",{className:"wc-block-components-totals-coupon"},h?(0,n.createElement)("a",{role:"button",href:"#wc-block-components-totals-coupon__form",className:"wc-block-components-totals-coupon-link","aria-label":(0,r.__)("Add a coupon","woocommerce"),onClick:e=>{e.preventDefault(),g(!1)}},(0,r.__)("Add a coupon","woocommerce")):(0,n.createElement)(i.Z,{screenReaderLabel:(0,r.__)("Applying coupon…","woocommerce"),isLoading:t,showSpinner:!1},(0,n.createElement)("div",{className:b},(0,n.createElement)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form"},(0,n.createElement)(c.ValidatedTextInput,{id:v,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:(0,r.__)("Enter code","woocommerce"),value:d,ariaDescribedBy:y,onChange:e=>{f(e)},focusOnMount:!0,validateOnMount:!1,showError:!1}),(0,n.createElement)(s.Z,{className:"wc-block-components-totals-coupon__button",disabled:t||!d,showSpinner:t,onClick:e=>{var t;e.preventDefault(),void 0!==o?null===(t=o(d))||void 0===t||t.then((e=>{e&&(f(""),g(!0))})):(f(""),g(!0))},type:"submit"},(0,r.__)("Apply","woocommerce"))),(0,n.createElement)(c.ValidationInputError,{propertyName:"coupon",elementId:v}))))}));var h=o(3554),g=o(4617);o(4970);const v={context:"summary"},b=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:a,values:s})=>{const{total_discount:l,total_discount_tax:p}=s,u=parseInt(l,10);if(!u&&0===e.length)return null;const d=parseInt(p,10),m=(0,g.getSetting)("displayCartPricesIncludingTax",!1)?u+d:u,f=(0,h.applyCheckoutFilter)({arg:v,filterName:"coupons",defaultValue:e});return(0,n.createElement)(c.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==f.length&&(0,n.createElement)(i.Z,{screenReaderLabel:(0,r.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1},(0,n.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},f.map((e=>(0,n.createElement)(c.RemovableChip,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:(0,r.sprintf)(/* translators: %s Coupon code. */ /* translators: %s Coupon code. */
(0,r.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{a(e.code)},radius:"large",ariaLabel:(0,r.sprintf)(/* translators: %s is a coupon code. */ /* translators: %s is a coupon code. */
(0,r.__)('Remove coupon "%s"',"woocommerce"),e.label)}))))),label:m?(0,r.__)("Discount","woocommerce"):(0,r.__)("Coupons","woocommerce"),value:m?-1*m:"-"})};var y=o(9659),E=o(4293);o(4554);const w=({currency:e,values:t,className:o})=>{const s=(0,g.getSetting)("taxesEnabled",!0)&&(0,g.getSetting)("displayCartPricesIncludingTax",!1),{total_price:i,total_tax:l,tax_lines:p}=t,{receiveCart:u,...d}=(0,y.b)(),f=(0,h.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:(0,r.__)("Total","woocommerce"),extensions:d.extensions,arg:{cart:d}}),v=parseInt(l,10),b=p&&p.length>0?(0,r.sprintf)(/* translators: %s is a list of tax rates */ /* translators: %s is a list of tax rates */
(0,r.__)("Including %s","woocommerce"),p.map((({name:t,price:o})=>`${(0,E.formatPrice)(o,e)} ${t}`)).join(", ")):(0,r.__)("Including <TaxAmount/> in taxes","woocommerce");return(0,n.createElement)(c.TotalsItem,{className:m()("wc-block-components-totals-footer-item",o),currency:e,label:f,value:parseInt(i,10),description:s&&0!==v&&(0,n.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},(0,a.createInterpolateElement)(b,{TaxAmount:(0,n.createElement)(c.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:v})}))})};var _=o(2629);const k=({selectedShippingRates:e})=>(0,n.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},(0,_.decodeEntities)(e.filter(((t,o)=>e.indexOf(t)===o)).join(", ")));var C=o(7865),N=o(9040),T=o(8540),S=o(1621),x=o(9127),A=o.n(x),R=(o(313),o(6467));const L=({address:e,onUpdate:t,onCancel:o,addressFields:i})=>{const[l,c]=(0,a.useState)(e),{showAllValidationErrors:d}=(0,p.useDispatch)(u.VALIDATION_STORE_KEY),{hasValidationErrors:m,isCustomerDataUpdating:f}=(0,p.useSelect)((e=>({hasValidationErrors:e(u.VALIDATION_STORE_KEY).hasValidationErrors,isCustomerDataUpdating:e(u.CART_STORE_KEY).isCustomerDataUpdating()})));return(0,n.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},(0,n.createElement)(R.l,{fields:i,onChange:c,values:l}),(0,n.createElement)(s.Z,{className:"wc-block-components-shipping-calculator-address__button",disabled:f,onClick:n=>(n.preventDefault(),A()(l,e)?o():(d(),m()?void 0:t(l))),type:"submit"},(0,r.__)("Update","woocommerce")))},I=({onUpdate:e=(()=>{}),onCancel:t=(()=>{}),addressFields:o=["country","state","city","postcode"]})=>{const{shippingAddress:r}=(0,T.L)(),a="wc/cart/shipping-calculator";return(0,n.createElement)("div",{className:"wc-block-components-shipping-calculator"},(0,n.createElement)(c.StoreNoticesContainer,{context:a}),(0,n.createElement)(L,{address:r,addressFields:o,onCancel:t,onUpdate:t=>{(0,p.dispatch)(u.CART_STORE_KEY).updateCustomerData({shipping_address:t},!1).then((()=>{(0,S.Zt)(a),e(t)})).catch((e=>{(0,u.processErrorResponse)(e,a)}))}}))};var O=o(7731);const D=({label:e=(0,r.__)("Calculate","woocommerce"),isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o})=>(0,n.createElement)("a",{role:"button",href:"#wc-block-components-shipping-calculator-address__link",className:"wc-block-components-totals-shipping__change-address__link",id:"wc-block-components-totals-shipping__change-address__link",onClick:e=>{e.preventDefault(),o(!t)},"aria-label":e,"aria-expanded":t},e),M=({showCalculator:e,isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o,isCheckout:a=!1})=>e?(0,n.createElement)(D,{label:(0,r.__)("Add an address for shipping options","woocommerce"),isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o}):(0,n.createElement)("em",null,a?(0,r.__)("No shipping options available","woocommerce"):(0,r.__)("Calculated during checkout","woocommerce"));var F=o(8449),P=o(7998);const U=()=>{const{pickupAddress:e}=(0,p.useSelect)((e=>{const t=e("wc/store/cart").getShippingRates().flatMap((e=>e.shipping_rates)).find((e=>e.selected&&(0,C.J3)(e)));if((0,P.Kn)(t)&&(0,P.$n)(t,"meta_data")){const e=t.meta_data.find((e=>"pickup_address"===e.key));if((0,P.Kn)(e)&&(0,P.$n)(e,"value")&&e.value)return{pickupAddress:e.value}}return(0,P.Kn)(t),{pickupAddress:void 0}}));return void 0===e?null:(0,n.createElement)("span",{className:"wc-block-components-shipping-address"},(0,r.sprintf)(/* translators: %s: shipping method name, e.g. "Amazon Locker" */ /* translators: %s: shipping method name, e.g. "Amazon Locker" */
(0,r.__)("Collection from %s","woocommerce"),e)+" ")},H=({formattedLocation:e})=>e?(0,n.createElement)("span",{className:"wc-block-components-shipping-address"},(0,r.sprintf)(/* translators: %s location. */ /* translators: %s location. */
(0,r.__)("Shipping to %s","woocommerce"),e)+" "):null,V=({showCalculator:e,isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o,shippingAddress:a})=>{const{isEditor:s}=(0,F._)(),i=(0,p.useSelect)((e=>e(u.CHECKOUT_STORE_KEY).prefersCollection())),l=(0,g.getSetting)("activeShippingZones"),c=l.length>1&&l.some((e=>"Everywhere"===e.description||"Locations outside all other zones"===e.description)),d=!!(0,N.ET)(a);if(!d&&!s&&!c)return null;const m=d?(0,r.__)("Change address","woocommerce"):(0,r.__)("Calculate shipping for your location","woocommerce"),f=(0,N.ET)(a);return(0,n.createElement)(n.Fragment,null,i?(0,n.createElement)(U,null):(0,n.createElement)(H,{formattedLocation:f}),e&&(0,n.createElement)(D,{label:m,isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o}))};var z=o(4787),B=o(5091);const W=({hasRates:e,shippingRates:t,isLoadingRates:o,isAddressComplete:a})=>{const s=e?(0,r.__)("Shipping options","woocommerce"):(0,r.__)("Choose a shipping option","woocommerce");return(0,n.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},(0,n.createElement)("legend",{className:"screen-reader-text"},s),(0,n.createElement)(B.Z,{className:"wc-block-components-totals-shipping__options",noResultsMessage:(0,n.createElement)(n.Fragment,null,a&&(0,n.createElement)(z.Z,{isDismissible:!1,className:"wc-block-components-shipping-rates-control__no-results-notice",status:"warning"},(0,r.__)("There are no shipping options available. Please check your shipping address.","woocommerce"))),shippingRates:t,isLoadingRates:o,context:"woocommerce/cart"}))};o(6968);const $=({currency:e,values:t,showCalculator:o=!0,showRateSelector:s=!0,isCheckout:i=!1,className:l})=>{const[d,f]=(0,a.useState)(!1),{shippingAddress:h,cartHasCalculatedShipping:g,shippingRates:v,isLoadingRates:b}=(0,y.b)(),E=(0,O.KR)(t),w=(0,O.CN)(v)||E>0,_=o&&d,T=(0,p.useSelect)((e=>e(u.CHECKOUT_STORE_KEY).prefersCollection())),S=v.flatMap((e=>e.shipping_rates.filter((e=>T&&(0,C.J3)(e)&&e.selected||!T&&e.selected)).flatMap((e=>e.name)))),x=(0,N.K5)(h),A=(0,O.iG)(w,T,v);return(0,n.createElement)("div",{className:m()("wc-block-components-totals-shipping",l)},(0,n.createElement)(c.TotalsItem,{label:(0,r.__)("Shipping","woocommerce"),value:!A&&g?E:(!x||i)&&(0,n.createElement)(M,{showCalculator:o,isCheckout:i,isShippingCalculatorOpen:d,setIsShippingCalculatorOpen:f}),description:!A&&g||x&&!i?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(k,{selectedShippingRates:S}),(0,n.createElement)(V,{shippingAddress:h,showCalculator:o,isShippingCalculatorOpen:d,setIsShippingCalculatorOpen:f})):null,currency:e}),_&&(0,n.createElement)(I,{onUpdate:()=>{f(!1)},onCancel:()=>{f(!1)}}),s&&g&&!_&&(0,n.createElement)(W,{hasRates:w,shippingRates:v,isLoadingRates:b,isAddressComplete:x}))}},7731:(e,t,o)=>{"use strict";o.d(t,{CN:()=>a,KR:()=>s,iG:()=>i});var n=o(4617),r=o(7865);const a=e=>e.some((e=>e.shipping_rates.length)),s=e=>(0,n.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.total_shipping,10)+parseInt(e.total_shipping_tax,10):parseInt(e.total_shipping,10),i=(e,t,o)=>!e||!t&&o.some((e=>!e.shipping_rates.some((e=>!(0,r.Ep)(e.method_id)))))},4787:(e,t,o)=>{"use strict";o.d(t,{Z:()=>d});var n=o(9196),r=o(3849),a=o.n(r),s=o(5736),i=o(2911),l=o(9140),c=(o(946),o(9114)),p=o(2904),u=o(2010);const d=({className:e,status:t="default",children:o,spokenMessage:r=o,onRemove:d=(()=>{}),isDismissible:m=!0,politeness:f=(0,c.x)(t),summary:h})=>((0,u.o)(r,f),(0,n.createElement)("div",{className:a()(e,"wc-block-components-notice-banner","is-"+t,{"is-dismissible":m})},(0,n.createElement)(i.Z,{icon:(0,c.X)(t)}),(0,n.createElement)("div",{className:"wc-block-components-notice-banner__content"},h&&(0,n.createElement)("p",{className:"wc-block-components-notice-banner__summary"},h),o),!!m&&(0,n.createElement)(p.Z,{className:"wc-block-components-notice-banner__dismiss",icon:l.Z,label:(0,s.__)("Dismiss this notice","woocommerce"),onClick:e=>{"function"==typeof(null==e?void 0:e.preventDefault)&&e.preventDefault&&e.preventDefault(),d()},showTooltip:!1})))},9114:(e,t,o)=>{"use strict";o.d(t,{X:()=>i,x:()=>s});var n=o(202),r=o(2720),a=o(1242);const s=e=>{switch(e){case"success":case"warning":case"info":case"default":return"polite";default:return"assertive"}},i=e=>{switch(e){case"success":return n.Z;case"warning":case"info":case"error":return r.Z;default:return a.Z}}},9095:(e,t,o)=>{"use strict";o.d(t,{K:()=>c});var n=o(5736),r=o(9818),a=o(4801),s=o(2629),i=o(3554),l=o(9659);const c=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=(0,l.b)(),{createErrorNotice:c}=(0,r.useDispatch)("core/notices"),{createNotice:p}=(0,r.useDispatch)("core/notices"),{setValidationErrors:u}=(0,r.useDispatch)(a.VALIDATION_STORE_KEY),{isApplyingCoupon:d,isRemovingCoupon:m}=(0,r.useSelect)((e=>{const t=e(a.CART_STORE_KEY);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}}),[c,p]),{applyCoupon:f,removeCoupon:h}=(0,r.useDispatch)(a.CART_STORE_KEY);return{appliedCoupons:t,isLoading:o,applyCoupon:t=>f(t).then((()=>((0,i.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&p("info",(0,n.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */
(0,n.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>(u({coupon:{message:(0,s.decodeEntities)(e.message),hidden:!1}}),Promise.resolve(!1)))),removeCoupon:t=>h(t).then((()=>((0,i.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&p("info",(0,n.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */
(0,n.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((t=>(c(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:d,isRemovingCoupon:m}}},8540:(e,t,o)=>{"use strict";o.d(t,{L:()=>a});var n=o(9818),r=o(4801);const a=()=>{const{customerData:e,isInitialized:t}=(0,n.useSelect)((e=>{const t=e(r.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}})),{setShippingAddress:o,setBillingAddress:a}=(0,n.useDispatch)(r.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:a,setShippingAddress:o}}},9530:(e,t,o)=>{"use strict";o.d(t,{s:()=>s});var n=o(9307),r=o(9127),a=o.n(r);function s(e){const t=(0,n.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},2010:(e,t,o)=>{"use strict";o.d(t,{o:()=>a});var n=o(9307),r=o(5158);const a=(e,t)=>{const o="string"==typeof e?e:(0,n.renderToString)(e);(0,n.useEffect)((()=>{o&&(0,r.speak)(o,t)}),[o,t])}},6591:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>u});var n=o(9196),r=o(7184),a=o(711),s=o(4293),i=o(9659),l=o(9095),c=o(3554);const p=()=>{const{extensions:e,receiveCart:t,...o}=(0,i.b)(),r={extensions:e,cart:o,context:"woocommerce/cart"};return(0,n.createElement)(c.ExperimentalDiscountsMeta.Slot,{...r})},u=({className:e})=>{const{cartTotals:t,cartCoupons:o}=(0,i.b)(),{removeCoupon:c,isRemovingCoupon:u}=(0,l.K)("wc/cart"),d=(0,s.getCurrencyFromPriceResponse)(t);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.TotalsWrapper,{className:e},(0,n.createElement)(r.X$,{cartCoupons:o,currency:d,isRemovingCoupon:u,removeCoupon:c,values:t})),(0,n.createElement)(p,null))}},2595:(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var n=o(9196);o(7440);const r=()=>(0,n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},2130:(e,t,o)=>{"use strict";var n=o(586);e.exports=function(e,t,o){o=o||{},9===t.nodeType&&(t=n.getWindow(t));var r=o.allowHorizontalScroll,a=o.onlyScrollIfNeeded,s=o.alignWithTop,i=o.alignWithLeft,l=o.offsetTop||0,c=o.offsetLeft||0,p=o.offsetBottom||0,u=o.offsetRight||0;r=void 0===r||r;var d=n.isWindow(t),m=n.offset(e),f=n.outerHeight(e),h=n.outerWidth(e),g=void 0,v=void 0,b=void 0,y=void 0,E=void 0,w=void 0,_=void 0,k=void 0,C=void 0,N=void 0;d?(_=t,N=n.height(_),C=n.width(_),k={left:n.scrollLeft(_),top:n.scrollTop(_)},E={left:m.left-k.left-c,top:m.top-k.top-l},w={left:m.left+h-(k.left+C)+u,top:m.top+f-(k.top+N)+p},y=k):(g=n.offset(t),v=t.clientHeight,b=t.clientWidth,y={left:t.scrollLeft,top:t.scrollTop},E={left:m.left-(g.left+(parseFloat(n.css(t,"borderLeftWidth"))||0))-c,top:m.top-(g.top+(parseFloat(n.css(t,"borderTopWidth"))||0))-l},w={left:m.left+h-(g.left+b+(parseFloat(n.css(t,"borderRightWidth"))||0))+u,top:m.top+f-(g.top+v+(parseFloat(n.css(t,"borderBottomWidth"))||0))+p}),E.top<0||w.top>0?!0===s?n.scrollTop(t,y.top+E.top):!1===s?n.scrollTop(t,y.top+w.top):E.top<0?n.scrollTop(t,y.top+E.top):n.scrollTop(t,y.top+w.top):a||((s=void 0===s||!!s)?n.scrollTop(t,y.top+E.top):n.scrollTop(t,y.top+w.top)),r&&(E.left<0||w.left>0?!0===i?n.scrollLeft(t,y.left+E.left):!1===i?n.scrollLeft(t,y.left+w.left):E.left<0?n.scrollLeft(t,y.left+E.left):n.scrollLeft(t,y.left+w.left):a||((i=void 0===i||!!i)?n.scrollLeft(t,y.left+E.left):n.scrollLeft(t,y.left+w.left)))}},2121:(e,t,o)=>{"use strict";e.exports=o(2130)},586:e=>{"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function n(e,t){var o=e["page"+(t?"Y":"X")+"Offset"],n="scroll"+(t?"Top":"Left");if("number"!=typeof o){var r=e.document;"number"!=typeof(o=r.documentElement[n])&&(o=r.body[n])}return o}function r(e){return n(e)}function a(e){return n(e,!0)}function s(e){var t=function(e){var t,o=void 0,n=void 0,r=e.ownerDocument,a=r.body,s=r&&r.documentElement;return o=(t=e.getBoundingClientRect()).left,n=t.top,{left:o-=s.clientLeft||a.clientLeft||0,top:n-=s.clientTop||a.clientTop||0}}(e),o=e.ownerDocument,n=o.defaultView||o.parentWindow;return t.left+=r(n),t.top+=a(n),t}var i=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,c="currentStyle",p="runtimeStyle",u="left",d=void 0;function m(e,t){for(var o=0;o<e.length;o++)t(e[o])}function f(e){return"border-box"===d(e,"boxSizing")}"undefined"!=typeof window&&(d=window.getComputedStyle?function(e,t,o){var n="",r=e.ownerDocument,a=o||r.defaultView.getComputedStyle(e,null);return a&&(n=a.getPropertyValue(t)||a[t]),n}:function(e,t){var o=e[c]&&e[c][t];if(i.test(o)&&!l.test(t)){var n=e.style,r=n[u],a=e[p][u];e[p][u]=e[c][u],n[u]="fontSize"===t?"1em":o||0,o=n.pixelLeft+"px",n[u]=r,e[p][u]=a}return""===o?"auto":o});var h=["margin","border","padding"],g=-1,v=2,b=1;function y(e,t,o){var n=0,r=void 0,a=void 0,s=void 0;for(a=0;a<t.length;a++)if(r=t[a])for(s=0;s<o.length;s++){var i;i="border"===r?r+o[s]+"Width":r+o[s],n+=parseFloat(d(e,i))||0}return n}function E(e){return null!=e&&e==e.window}var w={};function _(e,t,o){if(E(e))return"width"===t?w.viewportWidth(e):w.viewportHeight(e);if(9===e.nodeType)return"width"===t?w.docWidth(e):w.docHeight(e);var n="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,a=(d(e),f(e)),s=0;(null==r||r<=0)&&(r=void 0,(null==(s=d(e,t))||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===o&&(o=a?b:g);var i=void 0!==r||a,l=r||s;if(o===g)return i?l-y(e,["border","padding"],n):s;if(i){var c=o===v?-y(e,["border"],n):y(e,["margin"],n);return l+(o===b?0:c)}return s+y(e,h.slice(o),n)}m(["Width","Height"],(function(e){w["doc"+e]=function(t){var o=t.document;return Math.max(o.documentElement["scroll"+e],o.body["scroll"+e],w["viewport"+e](o))},w["viewport"+e]=function(t){var o="client"+e,n=t.document,r=n.body,a=n.documentElement[o];return"CSS1Compat"===n.compatMode&&a||r&&r[o]||a}}));var k={position:"absolute",visibility:"hidden",display:"block"};function C(e){var t=void 0,o=arguments;return 0!==e.offsetWidth?t=_.apply(void 0,o):function(e,n,r){var a={},s=e.style,i=void 0;for(i in n)n.hasOwnProperty(i)&&(a[i]=s[i],s[i]=n[i]);for(i in function(){t=_.apply(void 0,o)}.call(e),n)n.hasOwnProperty(i)&&(s[i]=a[i])}(e,k),t}function N(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):d(e,t);for(var a in t)t.hasOwnProperty(a)&&N(e,a,t[a])}m(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);w["outer"+t]=function(t,o){return t&&C(t,e,o?0:b)};var o="width"===e?["Left","Right"]:["Top","Bottom"];w[e]=function(t,n){return void 0===n?t&&C(t,e,g):t?(d(t),f(t)&&(n+=y(t,["padding","border"],o)),N(t,e,n)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return s(e);!function(e,t){"static"===N(e,"position")&&(e.style.position="relative");var o=s(e),n={},r=void 0,a=void 0;for(a in t)t.hasOwnProperty(a)&&(r=parseFloat(N(e,a))||0,n[a]=r+t[a]-o[a]);N(e,n)}(e,t)},isWindow:E,each:m,css:N,clone:function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);if(e.overflow)for(var o in e)e.hasOwnProperty(o)&&(t.overflow[o]=e.overflow[o]);return t},scrollLeft:function(e,t){if(E(e)){if(void 0===t)return r(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(E(e)){if(void 0===t)return a(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},w)},3561:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,o){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,o)}function o(e,n,r){return o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,o,n){var r=[null];r.push.apply(r,o);var a=new(Function.bind.apply(e,r));return n&&t(a,n.prototype),a},o.apply(null,arguments)}function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,i=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,p=Object.freeze,u=Object.seal,d=Object.create,m="undefined"!=typeof Reflect&&Reflect,f=m.apply,h=m.construct;f||(f=function(e,t,o){return e.apply(t,o)}),p||(p=function(e){return e}),u||(u=function(e){return e}),h||(h=function(e,t){return o(e,n(t))});var g,v=x(Array.prototype.forEach),b=x(Array.prototype.pop),y=x(Array.prototype.push),E=x(String.prototype.toLowerCase),w=x(String.prototype.toString),_=x(String.prototype.match),k=x(String.prototype.replace),C=x(String.prototype.indexOf),N=x(String.prototype.trim),T=x(RegExp.prototype.test),S=(g=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return h(g,t)});function x(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return f(e,t,n)}}function A(e,t,o){var n;o=null!==(n=o)&&void 0!==n?n:E,s&&s(e,null);for(var r=t.length;r--;){var a=t[r];if("string"==typeof a){var l=o(a);l!==a&&(i(t)||(t[r]=l),a=l)}e[a]=!0}return e}function R(e){var t,o=d(null);for(t in e)!0===f(a,e,[t])&&(o[t]=e[t]);return o}function L(e,t){for(;null!==e;){var o=c(e,t);if(o){if(o.get)return x(o.get);if("function"==typeof o.value)return x(o.value)}e=l(e)}return function(e){return console.warn("fallback value for",e),null}}var I=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=p(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),P=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=p(["#text"]),H=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=p(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),B=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=u(/<%[\w\W]*|[\w\W]*%>/gm),K=u(/\${[\w\W]*}/gm),Z=u(/^data-[\-\w.\u00B7-\uFFFF]/),j=u(/^aria-[\-\w]+$/),G=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=u(/^(?:\w+script|data):/i),q=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=u(/^html$/i),J=function(){return"undefined"==typeof window?null:window};return function t(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),r=function(e){return t(e)};if(r.version="2.4.7",r.removed=[],!o||!o.document||9!==o.document.nodeType)return r.isSupported=!1,r;var a=o.document,s=o.document,i=o.DocumentFragment,l=o.HTMLTemplateElement,c=o.Node,u=o.Element,d=o.NodeFilter,m=o.NamedNodeMap,f=void 0===m?o.NamedNodeMap||o.MozNamedAttrMap:m,h=o.HTMLFormElement,g=o.DOMParser,x=o.trustedTypes,Q=u.prototype,ee=L(Q,"cloneNode"),te=L(Q,"nextSibling"),oe=L(Q,"childNodes"),ne=L(Q,"parentNode");if("function"==typeof l){var re=s.createElement("template");re.content&&re.content.ownerDocument&&(s=re.content.ownerDocument)}var ae=function(t,o){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";o.currentScript&&o.currentScript.hasAttribute(r)&&(n=o.currentScript.getAttribute(r));var a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(x,a),se=ae?ae.createHTML(""):"",ie=s,le=ie.implementation,ce=ie.createNodeIterator,pe=ie.createDocumentFragment,ue=ie.getElementsByTagName,de=a.importNode,me={};try{me=R(s).documentMode?s.documentMode:{}}catch(e){}var fe={};r.isSupported="function"==typeof ne&&le&&void 0!==le.createHTMLDocument&&9!==me;var he,ge,ve=W,be=$,ye=K,Ee=Z,we=j,_e=Y,ke=q,Ce=G,Ne=null,Te=A({},[].concat(n(I),n(O),n(D),n(F),n(U))),Se=null,xe=A({},[].concat(n(H),n(V),n(z),n(B))),Ae=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Le=null,Ie=!0,Oe=!0,De=!1,Me=!0,Fe=!1,Pe=!1,Ue=!1,He=!1,Ve=!1,ze=!1,Be=!1,We=!0,$e=!1,Ke=!0,Ze=!1,je={},Ge=null,Ye=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Xe=A({},["audio","video","img","source","image","track"]),Je=null,Qe=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml",nt=ot,rt=!1,at=null,st=A({},[et,tt,ot],w),it=["application/xhtml+xml","text/html"],lt=null,ct=s.createElement("form"),pt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){lt&<===t||(t&&"object"===e(t)||(t={}),t=R(t),he=he=-1===it.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===he?w:E,Ne="ALLOWED_TAGS"in t?A({},t.ALLOWED_TAGS,ge):Te,Se="ALLOWED_ATTR"in t?A({},t.ALLOWED_ATTR,ge):xe,at="ALLOWED_NAMESPACES"in t?A({},t.ALLOWED_NAMESPACES,w):st,Je="ADD_URI_SAFE_ATTR"in t?A(R(Qe),t.ADD_URI_SAFE_ATTR,ge):Qe,qe="ADD_DATA_URI_TAGS"in t?A(R(Xe),t.ADD_DATA_URI_TAGS,ge):Xe,Ge="FORBID_CONTENTS"in t?A({},t.FORBID_CONTENTS,ge):Ye,Re="FORBID_TAGS"in t?A({},t.FORBID_TAGS,ge):{},Le="FORBID_ATTR"in t?A({},t.FORBID_ATTR,ge):{},je="USE_PROFILES"in t&&t.USE_PROFILES,Ie=!1!==t.ALLOW_ARIA_ATTR,Oe=!1!==t.ALLOW_DATA_ATTR,De=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Fe=t.SAFE_FOR_TEMPLATES||!1,Pe=t.WHOLE_DOCUMENT||!1,Ve=t.RETURN_DOM||!1,ze=t.RETURN_DOM_FRAGMENT||!1,Be=t.RETURN_TRUSTED_TYPE||!1,He=t.FORCE_BODY||!1,We=!1!==t.SANITIZE_DOM,$e=t.SANITIZE_NAMED_PROPS||!1,Ke=!1!==t.KEEP_CONTENT,Ze=t.IN_PLACE||!1,Ce=t.ALLOWED_URI_REGEXP||Ce,nt=t.NAMESPACE||ot,Ae=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&pt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&pt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(Oe=!1),ze&&(Ve=!0),je&&(Ne=A({},n(U)),Se=[],!0===je.html&&(A(Ne,I),A(Se,H)),!0===je.svg&&(A(Ne,O),A(Se,V),A(Se,B)),!0===je.svgFilters&&(A(Ne,D),A(Se,V),A(Se,B)),!0===je.mathMl&&(A(Ne,F),A(Se,z),A(Se,B))),t.ADD_TAGS&&(Ne===Te&&(Ne=R(Ne)),A(Ne,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Se===xe&&(Se=R(Se)),A(Se,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&A(Je,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(Ge===Ye&&(Ge=R(Ge)),A(Ge,t.FORBID_CONTENTS,ge)),Ke&&(Ne["#text"]=!0),Pe&&A(Ne,["html","head","body"]),Ne.table&&(A(Ne,["tbody"]),delete Re.tbody),p&&p(t),lt=t)},dt=A({},["mi","mo","mn","ms","mtext"]),mt=A({},["foreignobject","desc","title","annotation-xml"]),ft=A({},["title","style","font","a","script"]),ht=A({},O);A(ht,D),A(ht,M);var gt=A({},F);A(gt,P);var vt=function(e){y(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},bt=function(e,t){try{y(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){y(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Ve||ze)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){var t,o;if(He)e="<remove></remove>"+e;else{var n=_(e,/^[\r\n\t ]+/);o=n&&n[0]}"application/xhtml+xml"===he&&nt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var r=ae?ae.createHTML(e):e;if(nt===ot)try{t=(new g).parseFromString(r,he)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(nt,"template",null);try{t.documentElement.innerHTML=rt?se:r}catch(e){}}var a=t.body||t.documentElement;return e&&o&&a.insertBefore(s.createTextNode(o),a.childNodes[0]||null),nt===ot?ue.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:a},Et=function(e){return ce.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},wt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},_t=function(e,t,o){fe[e]&&v(fe[e],(function(e){e.call(r,t,o,lt)}))},kt=function(e){var t,o;if(_t("beforeSanitizeElements",e,null),(o=e)instanceof h&&("string"!=typeof o.nodeName||"string"!=typeof o.textContent||"function"!=typeof o.removeChild||!(o.attributes instanceof f)||"function"!=typeof o.removeAttribute||"function"!=typeof o.setAttribute||"string"!=typeof o.namespaceURI||"function"!=typeof o.insertBefore||"function"!=typeof o.hasChildNodes))return vt(e),!0;if(T(/[\u0080-\uFFFF]/,e.nodeName))return vt(e),!0;var n=ge(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!wt(e.firstElementChild)&&(!wt(e.content)||!wt(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return vt(e),!0;if("select"===n&&T(/<template/i,e.innerHTML))return vt(e),!0;if(!Ne[n]||Re[n]){if(!Re[n]&&Nt(n)){if(Ae.tagNameCheck instanceof RegExp&&T(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(Ke&&!Ge[n]){var a=ne(e)||e.parentNode,s=oe(e)||e.childNodes;if(s&&a)for(var i=s.length-1;i>=0;--i)a.insertBefore(ee(s[i],!0),te(e))}return vt(e),!0}return e instanceof u&&!function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var o=E(e.tagName),n=E(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===ot?"svg"===o:t.namespaceURI===et?"svg"===o&&("annotation-xml"===n||dt[n]):Boolean(ht[o]):e.namespaceURI===et?t.namespaceURI===ot?"math"===o:t.namespaceURI===tt?"math"===o&&mt[n]:Boolean(gt[o]):e.namespaceURI===ot?!(t.namespaceURI===tt&&!mt[n])&&!(t.namespaceURI===et&&!dt[n])&&!gt[o]&&(ft[o]||!ht[o]):!("application/xhtml+xml"!==he||!at[e.namespaceURI]))}(e)?(vt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(t=e.textContent,t=k(t,ve," "),t=k(t,be," "),t=k(t,ye," "),e.textContent!==t&&(y(r.removed,{element:e.cloneNode()}),e.textContent=t)),_t("afterSanitizeElements",e,null),!1):(vt(e),!0)},Ct=function(e,t,o){if(We&&("id"===t||"name"===t)&&(o in s||o in ct))return!1;if(Oe&&!Le[t]&&T(Ee,t));else if(Ie&&T(we,t));else if(!Se[t]||Le[t]){if(!(Nt(e)&&(Ae.tagNameCheck instanceof RegExp&&T(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&T(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&T(Ae.tagNameCheck,o)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(o))))return!1}else if(Je[t]);else if(T(Ce,k(o,ke,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(o,"data:")||!qe[e])if(De&&!T(_e,k(o,ke,"")));else if(o)return!1;return!0},Nt=function(e){return e.indexOf("-")>0},Tt=function(t){var o,n,a,s;_t("beforeSanitizeAttributes",t,null);var i=t.attributes;if(i){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(s=i.length;s--;){var c=o=i[s],p=c.name,u=c.namespaceURI;if(n="value"===p?o.value:N(o.value),a=ge(p),l.attrName=a,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,_t("uponSanitizeAttribute",t,l),n=l.attrValue,!l.forceKeepAttr&&(bt(p,t),l.keepAttr))if(Me||!T(/\/>/i,n)){Fe&&(n=k(n,ve," "),n=k(n,be," "),n=k(n,ye," "));var d=ge(t.nodeName);if(Ct(d,a,n)){if(!$e||"id"!==a&&"name"!==a||(bt(p,t),n="user-content-"+n),ae&&"object"===e(x)&&"function"==typeof x.getAttributeType)if(u);else switch(x.getAttributeType(d,a)){case"TrustedHTML":n=ae.createHTML(n);break;case"TrustedScriptURL":n=ae.createScriptURL(n)}try{u?t.setAttributeNS(u,p,n):t.setAttribute(p,n),b(r.removed)}catch(e){}}}else bt(p,t)}_t("afterSanitizeAttributes",t,null)}},St=function e(t){var o,n=Et(t);for(_t("beforeSanitizeShadowDOM",t,null);o=n.nextNode();)_t("uponSanitizeShadowNode",o,null),kt(o)||(o.content instanceof i&&e(o.content),Tt(o));_t("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t){var n,s,l,p,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((rt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!wt(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(o.toStaticHTML)||"function"==typeof o.toStaticHTML){if("string"==typeof t)return o.toStaticHTML(t);if(wt(t))return o.toStaticHTML(t.outerHTML)}return t}if(Ue||ut(d),r.removed=[],"string"==typeof t&&(Ze=!1),Ze){if(t.nodeName){var m=ge(t.nodeName);if(!Ne[m]||Re[m])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(s=(n=yt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!Ve&&!Fe&&!Pe&&-1===t.indexOf("<"))return ae&&Be?ae.createHTML(t):t;if(!(n=yt(t)))return Ve?null:Be?se:""}n&&He&&vt(n.firstChild);for(var f=Et(Ze?t:n);l=f.nextNode();)3===l.nodeType&&l===p||kt(l)||(l.content instanceof i&&St(l.content),Tt(l),p=l);if(p=null,Ze)return t;if(Ve){if(ze)for(u=pe.call(n.ownerDocument);n.firstChild;)u.appendChild(n.firstChild);else u=n;return(Se.shadowroot||Se.shadowrootmod)&&(u=de.call(a,u,!0)),u}var h=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(X,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Fe&&(h=k(h,ve," "),h=k(h,be," "),h=k(h,ye," ")),ae&&Be?ae.createHTML(h):h},r.setConfig=function(e){ut(e),Ue=!0},r.clearConfig=function(){lt=null,Ue=!1},r.isValidAttribute=function(e,t,o){lt||ut({});var n=ge(e),r=ge(t);return Ct(n,r,o)},r.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],y(fe[e],t))},r.removeHook=function(e){if(fe[e])return b(fe[e])},r.removeHooks=function(e){fe[e]&&(fe[e]=[])},r.removeAllHooks=function(){fe={}},r}()}()},1029:()=>{},313:()=>{},7099:()=>{},1691:()=>{},4970:()=>{},4554:()=>{},6968:()=>{},2750:()=>{},7368:()=>{},946:()=>{},6115:()=>{},7440:()=>{}}]);