@kanorio/elements 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/AudioPlayer-DKUAB5KE.js +2 -0
- package/dist/AudioPlayer-S7YF7A2E.js +2 -0
- package/dist/CustomerAccountPanel-DJKV7LT4.js +2 -0
- package/dist/CustomerAccountPanel-RWEHWBJY.js +2 -0
- package/dist/FormAddressField-C6VN7J6I.js +2 -0
- package/dist/FormAddressField-QR7ZCH77.js +2 -0
- package/dist/FormChoiceDropdown-SJXD26CC.js +2 -0
- package/dist/FormChoiceDropdown-U3NIOOHG.js +2 -0
- package/dist/FormFileField-LZDCXI2Z.js +2 -0
- package/dist/FormFileField-ONL4Q55V.js +2 -0
- package/dist/FormTaxIdField-K34MDUPW.js +2 -0
- package/dist/FormTaxIdField-XMK5WRQO.js +2 -0
- package/dist/KanorioAccount-EN3TM67X.js +2 -0
- package/dist/KanorioAccount-XGVSGVYN.js +2 -0
- package/dist/KanorioAnalytics-NEKTFQEE.js +2 -0
- package/dist/KanorioAnalytics-UMCUWQM7.js +2 -0
- package/dist/KanorioCurriculum-3QSCOHK7.js +2 -0
- package/dist/KanorioCurriculum-RUIGZ5X7.js +2 -0
- package/dist/KanorioForm-GUA5GEJY.js +2 -0
- package/dist/KanorioForm-KXV7D2TU.js +2 -0
- package/dist/KanorioLightbox-M72HNQQX.js +2 -0
- package/dist/KanorioLightbox-TQ3Q73TD.js +2 -0
- package/dist/KanorioLogin-5XFN3YEE.js +2 -0
- package/dist/KanorioLogin-AJHHVQGV.js +2 -0
- package/dist/KanorioMedia-ADKUDH5C.js +2 -0
- package/dist/KanorioMedia-DLBSXCKA.js +2 -0
- package/dist/KanorioReviews-42FZSXTI.js +2 -0
- package/dist/KanorioReviews-7LD5WKFG.js +2 -0
- package/dist/KanorioUnit-NWBX5DEI.js +2 -0
- package/dist/KanorioUnit-SIM3344J.js +2 -0
- package/dist/MediaPlayer-F43FPK4E.js +2 -0
- package/dist/MediaPlayer-JHFZFOOG.js +2 -0
- package/dist/{PDFViewerFull-KMUVT2BL.js → PDFViewerFull-CB44M7GW.js} +3 -3
- package/dist/{PDFViewerFull-FBLYNUDX.js → PDFViewerFull-INVHZL4V.js} +2 -2
- package/dist/VideoPlayer-FWZF4DQK.js +2 -0
- package/dist/VideoPlayer-LNS7XJ4C.js +2 -0
- package/dist/account.d.ts +165 -0
- package/dist/account.js +2 -0
- package/dist/analytics.d.ts +44 -0
- package/dist/analytics.js +2 -0
- package/dist/bot-protection.d.ts +297 -0
- package/dist/bot-protection.js +2 -0
- package/dist/chunk-2E6RCDAA.js +2 -0
- package/dist/chunk-2FSD3N7F.js +6 -0
- package/dist/chunk-2J5XQK4H.js +2 -0
- package/dist/chunk-2LOQXVFI.js +2 -0
- package/dist/chunk-2ONAW3CA.js +2 -0
- package/dist/chunk-33AQQY6T.js +69 -0
- package/dist/chunk-36YEGBKK.js +2 -0
- package/dist/chunk-4BBERZ6T.js +2 -0
- package/dist/chunk-4BEKWYEW.js +2 -0
- package/dist/chunk-4DPSNQEI.js +2 -0
- package/dist/chunk-4KA3HSRQ.js +2 -0
- package/dist/chunk-4MOCTNN7.js +2 -0
- package/dist/chunk-5AUWUK5R.js +2 -0
- package/dist/chunk-5G3PQI25.js +2 -0
- package/dist/chunk-5HWAL7VK.js +2 -0
- package/dist/chunk-63XJWMJG.js +2 -0
- package/dist/chunk-66XN5RR4.js +2 -0
- package/dist/chunk-6RZBXZFP.js +2 -0
- package/dist/chunk-763LNERD.js +2 -0
- package/dist/chunk-7XWBVRXP.js +15 -0
- package/dist/chunk-A4DPHHAP.js +42 -0
- package/dist/chunk-AF46NLXK.js +2 -0
- package/dist/chunk-AFNEGNVJ.js +2 -0
- package/dist/chunk-AQ6F6MIJ.js +2 -0
- package/dist/chunk-ARU5PTJV.js +2 -0
- package/dist/chunk-B7KLKVIM.js +2 -0
- package/dist/chunk-BGVTMWPN.js +2 -0
- package/dist/chunk-BKNL7ZCI.js +2 -0
- package/dist/chunk-BU7KUHZK.js +8 -0
- package/dist/chunk-C7HUM2EN.js +2 -0
- package/dist/chunk-CU2JJTXI.js +2 -0
- package/dist/{chunk-5U2SZE3H.js → chunk-CUQUEGX2.js} +2 -2
- package/dist/chunk-D7K3YCBR.js +2 -0
- package/dist/chunk-DLJDYXKL.js +2 -0
- package/dist/chunk-DTBRUBPG.js +2 -0
- package/dist/chunk-E77WGXYW.js +2 -0
- package/dist/chunk-EE4S6NRV.js +3 -0
- package/dist/chunk-ET57PWXC.js +2 -0
- package/dist/chunk-EZMTUAQX.js +2 -0
- package/dist/chunk-FFAWYDLJ.js +2 -0
- package/dist/chunk-FQCA2VGY.js +2 -0
- package/dist/chunk-FSY5GB5E.js +3 -0
- package/dist/chunk-G4U6BFZY.js +2 -0
- package/dist/chunk-GJY6AQIS.js +2 -0
- package/dist/chunk-GMW7AUSG.js +2 -0
- package/dist/chunk-GZCED6V3.js +2 -0
- package/dist/chunk-H2XQYT62.js +2 -0
- package/dist/chunk-H7VP4BYY.js +2 -0
- package/dist/chunk-HFYLTH5B.js +2 -0
- package/dist/chunk-IAXVJLJ3.js +2 -0
- package/dist/chunk-IXDKZO42.js +2 -0
- package/dist/chunk-J37D44SX.js +2 -0
- package/dist/chunk-JH5D6YJX.js +2 -0
- package/dist/chunk-JREL5347.js +2 -0
- package/dist/chunk-K2XZKV3Q.js +2 -0
- package/dist/chunk-K4VRRKYJ.js +2 -0
- package/dist/chunk-KBKDMTYF.js +2 -0
- package/dist/chunk-KDNGDR64.js +2 -0
- package/dist/chunk-KNNN5V3T.js +2 -0
- package/dist/chunk-LWKCGUHS.js +2 -0
- package/dist/chunk-LWRWKZBC.js +2 -0
- package/dist/chunk-LXNMHQFN.js +2 -0
- package/dist/chunk-MC63CLSM.js +2 -0
- package/dist/chunk-MIQK3T3Y.js +2 -0
- package/dist/chunk-MQ7PBFUM.js +4 -0
- package/dist/chunk-MWPRTK32.js +2 -0
- package/dist/chunk-MXGMJAWS.js +2 -0
- package/dist/chunk-N4BGAMWD.js +2 -0
- package/dist/chunk-N5PIQM4L.js +3 -0
- package/dist/chunk-NBDRYQZV.js +2 -0
- package/dist/chunk-NGRNPVON.js +2 -0
- package/dist/chunk-NSY72ZYX.js +15 -0
- package/dist/chunk-O2SYHUQF.js +2 -0
- package/dist/chunk-OIKRLEW6.js +2 -0
- package/dist/chunk-OTK4YNSG.js +2 -0
- package/dist/chunk-OU4IOHLN.js +15 -0
- package/dist/chunk-PR2NRUEI.js +2 -0
- package/dist/chunk-QGR3QAQB.js +3 -0
- package/dist/chunk-QOQQCCID.js +2 -0
- package/dist/chunk-RG5JA44V.js +2 -0
- package/dist/chunk-RKEHHJDU.js +2 -0
- package/dist/chunk-S2NFWI7C.js +69 -0
- package/dist/chunk-S7FE2XRA.js +2 -0
- package/dist/chunk-SUXTLVTX.js +2 -0
- package/dist/chunk-SVWEVSYJ.js +2 -0
- package/dist/chunk-TEUQV3AT.js +2 -0
- package/dist/chunk-U7H3W23Q.js +2 -0
- package/dist/chunk-U7KVGD47.js +2 -0
- package/dist/chunk-UIHBR4NU.js +3 -0
- package/dist/chunk-UM74DXPE.js +2 -0
- package/dist/chunk-VKSYPXNL.js +2 -0
- package/dist/chunk-VUTODQFX.js +2 -0
- package/dist/chunk-VYSRVTYI.js +2 -0
- package/dist/chunk-W32ZFOPN.js +2 -0
- package/dist/chunk-W63RJF6Q.js +2 -0
- package/dist/chunk-WM5S3YN5.js +2 -0
- package/dist/chunk-WP7UEAIB.js +2 -0
- package/dist/chunk-WXIUWMFR.js +2 -0
- package/dist/chunk-Z4A5NQWJ.js +2 -0
- package/dist/chunk-Z4OV6QHI.js +2 -0
- package/dist/curriculum.d.ts +20 -0
- package/dist/curriculum.js +2 -0
- package/dist/deliverables-BDS7WMBC.js +99 -0
- package/dist/deliverables-C5RD2ASE.js +131 -0
- package/dist/elements.css +1 -1
- package/dist/events-CJeBru-H.d.ts +11 -0
- package/dist/form.d.ts +775 -0
- package/dist/form.js +2 -0
- package/dist/forms-answers-address-7P6EVFY5.js +2 -0
- package/dist/forms-answers-address-IQV2Y56H.js +2 -0
- package/dist/forms-answers-phone-2VZ46OME.js +2 -0
- package/dist/forms-answers-phone-5PUB5WKD.js +2 -0
- package/dist/forms-answers-tax-id-D4GOUC6N.js +2 -0
- package/dist/forms-answers-tax-id-WJD7K3PG.js +2 -0
- package/dist/index.d.ts +17 -3045
- package/dist/index.js +1 -1
- package/dist/kanorio-elements.js +9 -73
- package/dist/lightbox-DEvsB5dB.d.ts +100 -0
- package/dist/lightbox.d.ts +5 -0
- package/dist/lightbox.js +2 -0
- package/dist/login.d.ts +14 -0
- package/dist/login.js +2 -0
- package/dist/media.d.ts +85 -0
- package/dist/media.js +2 -0
- package/dist/phone-input-Q5AV6KSW.js +2 -0
- package/dist/phone-input-T6QX2TDS.js +2 -0
- package/dist/provider-CMLzyAjJ.d.ts +1277 -0
- package/dist/provider.d.ts +4 -0
- package/dist/provider.js +2 -0
- package/dist/reviews.d.ts +42 -0
- package/dist/reviews.js +2 -0
- package/dist/unit.d.ts +118 -0
- package/dist/unit.js +2 -0
- package/dist/{vidstack-BmcqUMKx-XYI2YLUH.js → vidstack-BmcqUMKx-FXVV4FRB.js} +2 -2
- package/dist/{vidstack-GkTzay8D-PBE5ZIYA.js → vidstack-GkTzay8D-53C3FRCO.js} +2 -2
- package/dist/web-components.d.ts +13 -1
- package/dist/web-components.js +1 -1
- package/dist/wire-ofSodpi1.d.ts +176 -0
- package/package.json +46 -2
- package/dist/MediaPlayer-7IBSXL7Q.js +0 -2
- package/dist/MediaPlayer-HTXF4T2V.js +0 -2
- package/dist/chunk-2UVUNYL6.js +0 -2
- package/dist/chunk-3OGF7I4H.js +0 -2
- package/dist/chunk-5AWUTOK7.js +0 -2
- package/dist/chunk-DTDUK36B.js +0 -8
- package/dist/chunk-JZXJO62T.js +0 -15
- package/dist/chunk-LLHBSWTL.js +0 -2
- package/dist/chunk-NOCGHD2O.js +0 -2
- package/dist/chunk-S4ZA2INU.js +0 -415
- package/dist/chunk-TLBIYET7.js +0 -404
- package/dist/chunk-TLRFFLH4.js +0 -94
- package/dist/chunk-U3U5KVR6.js +0 -2
- package/dist/chunk-UBMXRFSK.js +0 -4
- package/dist/deliverables-FBCRGMTB.js +0 -93
- package/dist/deliverables-FMKPDHJH.js +0 -92
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var sides=["top","right","bottom","left"];var min=Math.min;var max=Math.max;var round=Math.round;var floor=Math.floor;var createCoords=v=>({x:v,y:v});var oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function clamp(start,value,end){return max(start,min(value,end))}function evaluate(value,param){return typeof value==="function"?value(param):value}function getSide(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return axis==="x"?"y":"x"}function getAxisLength(axis){return axis==="y"?"height":"width"}function getSideAxis(placement){const firstChar=placement[0];return firstChar==="t"||firstChar==="b"?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){if(rtl===void 0){rtl=false}const alignment=getAlignment(placement);const alignmentAxis=getAlignmentAxis(placement);const length=getAxisLength(alignmentAxis);let mainAlignmentSide=alignmentAxis==="x"?alignment===(rtl?"end":"start")?"right":"left":alignment==="start"?"bottom":"top";if(rects.reference[length]>rects.floating[length]){mainAlignmentSide=getOppositePlacement(mainAlignmentSide)}return[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.includes("start")?placement.replace("start","end"):placement.replace("end","start")}var lrPlacement=["left","right"];var rlPlacement=["right","left"];var tbPlacement=["top","bottom"];var btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){switch(side){case"top":case"bottom":if(rtl)return isStart?rlPlacement:lrPlacement;return isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){const alignment=getAlignment(placement);let list=getSideList(getSide(placement),direction==="start",rtl);if(alignment){list=list.map(side=>side+"-"+alignment);if(flipAlignment){list=list.concat(list.map(getOppositeAlignmentPlacement))}}return list}function getOppositePlacement(placement){const side=getSide(placement);return oppositeSideMap[side]+placement.slice(side.length)}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding!=="number"?expandPaddingObject(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=getSideAxis(placement);const alignmentAxis=getAlignmentAxis(placement);const alignLength=getAxisLength(alignmentAxis);const side=getSide(placement);const isVertical=sideAxis==="y";const commonX=reference.x+reference.width/2-floating.width/2;const commonY=reference.y+reference.height/2-floating.height/2;const commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords}async function detectOverflow(state,options){var _await$platform$isEle;if(options===void 0){options={}}const{x,y,platform:platform2,rects,elements,strategy}=state;const{boundary="clippingAncestors",rootBoundary="viewport",elementContext="floating",altBoundary=false,padding=0}=evaluate(options,state);const paddingObject=getPaddingObject(padding);const altContext=elementContext==="floating"?"reference":"floating";const element=elements[altBoundary?altContext:elementContext];const clippingClientRect=rectToClientRect(await platform2.getClippingRect({element:((_await$platform$isEle=await(platform2.isElement==null?void 0:platform2.isElement(element)))!=null?_await$platform$isEle:true)?element:element.contextElement||await(platform2.getDocumentElement==null?void 0:platform2.getDocumentElement(elements.floating)),boundary,rootBoundary,strategy}));const rect=elementContext==="floating"?{x,y,width:rects.floating.width,height:rects.floating.height}:rects.reference;const offsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(elements.floating));const offsetScale=await(platform2.isElement==null?void 0:platform2.isElement(offsetParent))?await(platform2.getScale==null?void 0:platform2.getScale(offsetParent))||{x:1,y:1}:{x:1,y:1};const elementClientRect=rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect?await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({elements,rect,offsetParent,strategy}):rect);return{top:(clippingClientRect.top-elementClientRect.top+paddingObject.top)/offsetScale.y,bottom:(elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom)/offsetScale.y,left:(clippingClientRect.left-elementClientRect.left+paddingObject.left)/offsetScale.x,right:(elementClientRect.right-clippingClientRect.right+paddingObject.right)/offsetScale.x}}var MAX_RESET_COUNT=50;var computePosition=async(reference,floating,config)=>{const{placement="bottom",strategy="absolute",middleware=[],platform:platform2}=config;const platformWithDetectOverflow=platform2.detectOverflow?platform2:{...platform2,detectOverflow};const rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(floating));let rects=await platform2.getElementRects({reference,floating,strategy});let{x,y}=computeCoordsFromPlacement(rects,placement,rtl);let statefulPlacement=placement;let resetCount=0;const middlewareData={};for(let i=0;i<middleware.length;i++){const currentMiddleware=middleware[i];if(!currentMiddleware){continue}const{name,fn}=currentMiddleware;const{x:nextX,y:nextY,data,reset}=await fn({x,y,initialPlacement:placement,placement:statefulPlacement,strategy,middlewareData,rects,platform:platformWithDetectOverflow,elements:{reference,floating}});x=nextX!=null?nextX:x;y=nextY!=null?nextY:y;middlewareData[name]={...middlewareData[name],...data};if(reset&&resetCount<MAX_RESET_COUNT){resetCount++;if(typeof reset==="object"){if(reset.placement){statefulPlacement=reset.placement}if(reset.rects){rects=reset.rects===true?await platform2.getElementRects({reference,floating,strategy}):reset.rects}({x,y}=computeCoordsFromPlacement(rects,statefulPlacement,rtl))}i=-1}}return{x,y,placement:statefulPlacement,strategy,middlewareData}};var arrow=options=>({name:"arrow",options,async fn(state){const{x,y,placement,rects,platform:platform2,elements,middlewareData}=state;const{element,padding=0}=evaluate(options,state)||{};if(element==null){return{}}const paddingObject=getPaddingObject(padding);const coords={x,y};const axis=getAlignmentAxis(placement);const length=getAxisLength(axis);const arrowDimensions=await platform2.getDimensions(element);const isYAxis=axis==="y";const minProp=isYAxis?"top":"left";const maxProp=isYAxis?"bottom":"right";const clientProp=isYAxis?"clientHeight":"clientWidth";const endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length];const startDiff=coords[axis]-rects.reference[axis];const arrowOffsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(element));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;if(!clientSize||!await(platform2.isElement==null?void 0:platform2.isElement(arrowOffsetParent))){clientSize=elements.floating[clientProp]||rects.floating[length]}const centerToReference=endDiff/2-startDiff/2;const largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1;const minPadding=min(paddingObject[minProp],largestPossiblePadding);const maxPadding=min(paddingObject[maxProp],largestPossiblePadding);const min$1=minPadding;const max2=clientSize-arrowDimensions[length]-maxPadding;const center=clientSize/2-arrowDimensions[length]/2+centerToReference;const offset3=clamp(min$1,center,max2);const shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!==offset3&&rects.reference[length]/2-(center<min$1?minPadding:maxPadding)-arrowDimensions[length]/2<0;const alignmentOffset=shouldAddOffset?center<min$1?center-min$1:center-max2:0;return{[axis]:coords[axis]+alignmentOffset,data:{[axis]:offset3,centerOffset:center-offset3-alignmentOffset,...shouldAddOffset&&{alignmentOffset}},reset:shouldAddOffset}}});var flip=function(options){if(options===void 0){options={}}return{name:"flip",options,async fn(state){var _middlewareData$arrow,_middlewareData$flip;const{placement,middlewareData,rects,initialPlacement,platform:platform2,elements}=state;const{mainAxis:checkMainAxis=true,crossAxis:checkCrossAxis=true,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy="bestFit",fallbackAxisSideDirection="none",flipAlignment=true,...detectOverflowOptions}=evaluate(options,state);if((_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset){return{}}const side=getSide(placement);const initialSideAxis=getSideAxis(initialPlacement);const isBasePlacement=getSide(initialPlacement)===initialPlacement;const rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating));const fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:getExpandedPlacements(initialPlacement));const hasFallbackAxisSideDirection=fallbackAxisSideDirection!=="none";if(!specifiedFallbackPlacements&&hasFallbackAxisSideDirection){fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl))}const placements2=[initialPlacement,...fallbackPlacements];const overflow=await platform2.detectOverflow(state,detectOverflowOptions);const overflows=[];let overflowsData=((_middlewareData$flip=middlewareData.flip)==null?void 0:_middlewareData$flip.overflows)||[];if(checkMainAxis){overflows.push(overflow[side])}if(checkCrossAxis){const sides2=getAlignmentSides(placement,rects,rtl);overflows.push(overflow[sides2[0]],overflow[sides2[1]])}overflowsData=[...overflowsData,{placement,overflows}];if(!overflows.every(side2=>side2<=0)){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=(((_middlewareData$flip2=middlewareData.flip)==null?void 0:_middlewareData$flip2.index)||0)+1;const nextPlacement=placements2[nextIndex];if(nextPlacement){const ignoreCrossAxisOverflow=checkCrossAxis==="alignment"?initialSideAxis!==getSideAxis(nextPlacement):false;if(!ignoreCrossAxisOverflow||overflowsData.every(d=>getSideAxis(d.placement)===initialSideAxis?d.overflows[0]>0:true)){return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}}}}let resetPlacement=(_overflowsData$filter=overflowsData.filter(d=>d.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])==null?void 0:_overflowsData$filter.placement;if(!resetPlacement){switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2;const placement2=(_overflowsData$filter2=overflowsData.filter(d=>{if(hasFallbackAxisSideDirection){const currentSideAxis=getSideAxis(d.placement);return currentSideAxis===initialSideAxis||currentSideAxis==="y"}return true}).map(d=>[d.placement,d.overflows.filter(overflow2=>overflow2>0).reduce((acc,overflow2)=>acc+overflow2,0)]).sort((a,b)=>a[1]-b[1])[0])==null?void 0:_overflowsData$filter2[0];if(placement2){resetPlacement=placement2}break}case"initialPlacement":resetPlacement=initialPlacement;break}}if(placement!==resetPlacement){return{reset:{placement:resetPlacement}}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}var hide=function(options){if(options===void 0){options={}}return{name:"hide",options,async fn(state){const{rects,platform:platform2}=state;const{strategy="referenceHidden",...detectOverflowOptions}=evaluate(options,state);switch(strategy){case"referenceHidden":{const overflow=await platform2.detectOverflow(state,{...detectOverflowOptions,elementContext:"reference"});const offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{const overflow=await platform2.detectOverflow(state,{...detectOverflowOptions,altBoundary:true});const offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:{return{}}}}}};var originSides=new Set(["left","top"]);async function convertValueToCoords(state,options){const{placement,platform:platform2,elements}=state;const rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating));const side=getSide(placement);const alignment=getAlignment(placement);const isVertical=getSideAxis(placement)==="y";const mainAxisMulti=originSides.has(side)?-1:1;const crossAxisMulti=rtl&&isVertical?-1:1;const rawValue=evaluate(options,state);let{mainAxis,crossAxis,alignmentAxis}=typeof rawValue==="number"?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};if(alignment&&typeof alignmentAxis==="number"){crossAxis=alignment==="end"?alignmentAxis*-1:alignmentAxis}return isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}var offset=function(options){if(options===void 0){options=0}return{name:"offset",options,async fn(state){var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state;const diffCoords=await convertValueToCoords(state,options);if(placement===((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse.placement)&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset){return{}}return{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}};var shift=function(options){if(options===void 0){options={}}return{name:"shift",options,async fn(state){const{x,y,placement,platform:platform2}=state;const{mainAxis:checkMainAxis=true,crossAxis:checkCrossAxis=false,limiter={fn:_ref=>{let{x:x2,y:y2}=_ref;return{x:x2,y:y2}}},...detectOverflowOptions}=evaluate(options,state);const coords={x,y};const overflow=await platform2.detectOverflow(state,detectOverflowOptions);const crossAxis=getSideAxis(getSide(placement));const mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis];let crossAxisCoord=coords[crossAxis];if(checkMainAxis){const minSide=mainAxis==="y"?"top":"left";const maxSide=mainAxis==="y"?"bottom":"right";const min2=mainAxisCoord+overflow[minSide];const max2=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp(min2,mainAxisCoord,max2)}if(checkCrossAxis){const minSide=crossAxis==="y"?"top":"left";const maxSide=crossAxis==="y"?"bottom":"right";const min2=crossAxisCoord+overflow[minSide];const max2=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp(min2,crossAxisCoord,max2)}const limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}};var limitShift=function(options){if(options===void 0){options={}}return{options,fn(state){const{x,y,placement,rects,middlewareData}=state;const{offset:offset3=0,mainAxis:checkMainAxis=true,crossAxis:checkCrossAxis=true}=evaluate(options,state);const coords={x,y};const crossAxis=getSideAxis(placement);const mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis];let crossAxisCoord=coords[crossAxis];const rawOffset=evaluate(offset3,state);const computedOffset=typeof rawOffset==="number"?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){const len=mainAxis==="y"?"height":"width";const limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis;const limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;if(mainAxisCoord<limitMin){mainAxisCoord=limitMin}else if(mainAxisCoord>limitMax){mainAxisCoord=limitMax}}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;const len=mainAxis==="y"?"width":"height";const isOriginSide=originSides.has(getSide(placement));const limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide?((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse[crossAxis])||0:0)+(isOriginSide?0:computedOffset.crossAxis);const limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:((_middlewareData$offse2=middlewareData.offset)==null?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);if(crossAxisCoord<limitMin){crossAxisCoord=limitMin}else if(crossAxisCoord>limitMax){crossAxisCoord=limitMax}}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}};var size=function(options){if(options===void 0){options={}}return{name:"size",options,async fn(state){var _state$middlewareData,_state$middlewareData2;const{placement,rects,platform:platform2,elements}=state;const{apply=()=>{},...detectOverflowOptions}=evaluate(options,state);const overflow=await platform2.detectOverflow(state,detectOverflowOptions);const side=getSide(placement);const alignment=getAlignment(placement);const isYAxis=getSideAxis(placement)==="y";const{width,height}=rects.floating;let heightSide;let widthSide;if(side==="top"||side==="bottom"){heightSide=side;widthSide=alignment===(await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating))?"start":"end")?"left":"right"}else{widthSide=side;heightSide=alignment==="end"?"top":"bottom"}const maximumClippingHeight=height-overflow.top-overflow.bottom;const maximumClippingWidth=width-overflow.left-overflow.right;const overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight);const overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth);const noShift=!state.middlewareData.shift;let availableHeight=overflowAvailableHeight;let availableWidth=overflowAvailableWidth;if((_state$middlewareData=state.middlewareData.shift)!=null&&_state$middlewareData.enabled.x){availableWidth=maximumClippingWidth}if((_state$middlewareData2=state.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y){availableHeight=maximumClippingHeight}if(noShift&&!alignment){const xMin=max(overflow.left,0);const xMax=max(overflow.right,0);const yMin=max(overflow.top,0);const yMax=max(overflow.bottom,0);if(isYAxis){availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right))}else{availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}}await apply({...state,availableWidth,availableHeight});const nextDimensions=await platform2.getDimensions(elements.floating);if(width!==nextDimensions.width||height!==nextDimensions.height){return{reset:{rects:true}}}return{}}}};function hasWindow(){return typeof window!=="undefined"}function getNodeName(node){if(isNode(node)){return(node.nodeName||"").toLowerCase()}return"#document"}function getWindow(node){var _node$ownerDocument;return(node==null||(_node$ownerDocument=node.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node){var _ref;return(_ref=(isNode(node)?node.ownerDocument:node.document)||window.document)==null?void 0:_ref.documentElement}function isNode(value){if(!hasWindow()){return false}return value instanceof Node||value instanceof getWindow(value).Node}function isElement(value){if(!hasWindow()){return false}return value instanceof Element||value instanceof getWindow(value).Element}function isHTMLElement(value){if(!hasWindow()){return false}return value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement}function isShadowRoot(value){if(!hasWindow()||typeof ShadowRoot==="undefined"){return false}return value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}function isOverflowElement(element){const{overflow,overflowX,overflowY,display}=getComputedStyle2(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&display!=="inline"&&display!=="contents"}function isTableElement(element){return/^(table|td|th)$/.test(getNodeName(element))}function isTopLayer(element){try{if(element.matches(":popover-open")){return true}}catch(_e){}try{return element.matches(":modal")}catch(_e){return false}}var willChangeRe=/transform|translate|scale|rotate|perspective|filter/;var containRe=/paint|layout|strict|content/;var isNotNone=value=>!!value&&value!=="none";var isWebKitValue;function isContainingBlock(elementOrCss){const css=isElement(elementOrCss)?getComputedStyle2(elementOrCss):elementOrCss;return isNotNone(css.transform)||isNotNone(css.translate)||isNotNone(css.scale)||isNotNone(css.rotate)||isNotNone(css.perspective)||!isWebKit()&&(isNotNone(css.backdropFilter)||isNotNone(css.filter))||willChangeRe.test(css.willChange||"")||containRe.test(css.contain||"")}function getContainingBlock(element){let currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode)){if(isContainingBlock(currentNode)){return currentNode}else if(isTopLayer(currentNode)){return null}currentNode=getParentNode(currentNode)}return null}function isWebKit(){if(isWebKitValue==null){isWebKitValue=typeof CSS!=="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}return isWebKitValue}function isLastTraversableNode(node){return/^(html|body|#document)$/.test(getNodeName(node))}function getComputedStyle2(element){return getWindow(element).getComputedStyle(element)}function getNodeScroll(element){if(isElement(element)){return{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}}return{scrollLeft:element.scrollX,scrollTop:element.scrollY}}function getParentNode(node){if(getNodeName(node)==="html"){return node}const result=node.assignedSlot||node.parentNode||isShadowRoot(node)&&node.host||getDocumentElement(node);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node){const parentNode=getParentNode(node);if(isLastTraversableNode(parentNode)){return node.ownerDocument?node.ownerDocument.body:node.body}if(isHTMLElement(parentNode)&&isOverflowElement(parentNode)){return parentNode}return getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node,list,traverseIframes){var _node$ownerDocument2;if(list===void 0){list=[]}if(traverseIframes===void 0){traverseIframes=true}const scrollableAncestor=getNearestOverflowAncestor(node);const isBody=scrollableAncestor===((_node$ownerDocument2=node.ownerDocument)==null?void 0:_node$ownerDocument2.body);const win=getWindow(scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}else{return list.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element){const css=getComputedStyle2(element);let width=parseFloat(css.width)||0;let height=parseFloat(css.height)||0;const hasOffset=isHTMLElement(element);const offsetWidth=hasOffset?element.offsetWidth:width;const offsetHeight=hasOffset?element.offsetHeight:height;const shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;if(shouldFallback){width=offsetWidth;height=offsetHeight}return{width,height,$:shouldFallback}}function unwrapElement(element){return!isElement(element)?element.contextElement:element}function getScale(element){const domElement=unwrapElement(element);if(!isHTMLElement(domElement)){return createCoords(1)}const rect=domElement.getBoundingClientRect();const{width,height,$}=getCssDimensions(domElement);let x=($?round(rect.width):rect.width)/width;let y=($?round(rect.height):rect.height)/height;if(!x||!Number.isFinite(x)){x=1}if(!y||!Number.isFinite(y)){y=1}return{x,y}}var noOffsets=createCoords(0);function getVisualOffsets(element){const win=getWindow(element);if(!isWebKit()||!win.visualViewport){return noOffsets}return{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element,isFixed,floatingOffsetParent){if(isFixed===void 0){isFixed=false}if(!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element)){return false}return isFixed}function getBoundingClientRect(element,includeScale,isFixedStrategy,offsetParent){if(includeScale===void 0){includeScale=false}if(isFixedStrategy===void 0){isFixedStrategy=false}const clientRect=element.getBoundingClientRect();const domElement=unwrapElement(element);let scale=createCoords(1);if(includeScale){if(offsetParent){if(isElement(offsetParent)){scale=getScale(offsetParent)}}else{scale=getScale(element)}}const visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale.x;let y=(clientRect.top+visualOffsets.y)/scale.y;let width=clientRect.width/scale.x;let height=clientRect.height/scale.y;if(domElement){const win=getWindow(domElement);const offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win;let currentIFrame=getFrameElement(currentWin);while(currentIFrame&&offsetParent&&offsetWin!==currentWin){const iframeScale=getScale(currentIFrame);const iframeRect=currentIFrame.getBoundingClientRect();const css=getComputedStyle2(currentIFrame);const left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x;const top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x*=iframeScale.x;y*=iframeScale.y;width*=iframeScale.x;height*=iframeScale.y;x+=left;y+=top;currentWin=getWindow(currentIFrame);currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element,rect){const leftScroll=getNodeScroll(element).scrollLeft;if(!rect){return getBoundingClientRect(getDocumentElement(element)).left+leftScroll}return rect.left+leftScroll}function getHTMLOffset(documentElement,scroll){const htmlRect=documentElement.getBoundingClientRect();const x=htmlRect.left+scroll.scrollLeft-getWindowScrollBarX(documentElement,htmlRect);const y=htmlRect.top+scroll.scrollTop;return{x,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref;const isFixed=strategy==="fixed";const documentElement=getDocumentElement(offsetParent);const topLayer=elements?isTopLayer(elements.floating):false;if(offsetParent===documentElement||topLayer&&isFixed){return rect}let scroll={scrollLeft:0,scrollTop:0};let scale=createCoords(1);const offsets=createCoords(0);const isOffsetParentAnElement=isHTMLElement(offsetParent);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement)){scroll=getNodeScroll(offsetParent)}if(isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent);scale=getScale(offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft;offsets.y=offsetRect.y+offsetParent.clientTop}}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0);return{width:rect.width*scale.x,height:rect.height*scale.y,x:rect.x*scale.x-scroll.scrollLeft*scale.x+offsets.x+htmlOffset.x,y:rect.y*scale.y-scroll.scrollTop*scale.y+offsets.y+htmlOffset.y}}function getClientRects(element){return Array.from(element.getClientRects())}function getDocumentRect(element){const html=getDocumentElement(element);const scroll=getNodeScroll(element);const body=element.ownerDocument.body;const width=max(html.scrollWidth,html.clientWidth,body.scrollWidth,body.clientWidth);const height=max(html.scrollHeight,html.clientHeight,body.scrollHeight,body.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element);const y=-scroll.scrollTop;if(getComputedStyle2(body).direction==="rtl"){x+=max(html.clientWidth,body.clientWidth)-width}return{width,height,x,y}}var SCROLLBAR_MAX=25;function getViewportRect(element,strategy){const win=getWindow(element);const html=getDocumentElement(element);const visualViewport=win.visualViewport;let width=html.clientWidth;let height=html.clientHeight;let x=0;let y=0;if(visualViewport){width=visualViewport.width;height=visualViewport.height;const visualViewportBased=isWebKit();if(!visualViewportBased||visualViewportBased&&strategy==="fixed"){x=visualViewport.offsetLeft;y=visualViewport.offsetTop}}const windowScrollbarX=getWindowScrollBarX(html);if(windowScrollbarX<=0){const doc=html.ownerDocument;const body=doc.body;const bodyStyles=getComputedStyle(body);const bodyMarginInline=doc.compatMode==="CSS1Compat"?parseFloat(bodyStyles.marginLeft)+parseFloat(bodyStyles.marginRight)||0:0;const clippingStableScrollbarWidth=Math.abs(html.clientWidth-body.clientWidth-bodyMarginInline);if(clippingStableScrollbarWidth<=SCROLLBAR_MAX){width-=clippingStableScrollbarWidth}}else if(windowScrollbarX<=SCROLLBAR_MAX){width+=windowScrollbarX}return{width,height,x,y}}function getInnerBoundingClientRect(element,strategy){const clientRect=getBoundingClientRect(element,true,strategy==="fixed");const top=clientRect.top+element.clientTop;const left=clientRect.left+element.clientLeft;const scale=isHTMLElement(element)?getScale(element):createCoords(1);const width=element.clientWidth*scale.x;const height=element.clientHeight*scale.y;const x=left*scale.x;const y=top*scale.y;return{width,height,x,y}}function getClientRectFromClippingAncestor(element,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport"){rect=getViewportRect(element,strategy)}else if(clippingAncestor==="document"){rect=getDocumentRect(getDocumentElement(element))}else if(isElement(clippingAncestor)){rect=getInnerBoundingClientRect(clippingAncestor,strategy)}else{const visualOffsets=getVisualOffsets(element);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element,stopNode){const parentNode=getParentNode(element);if(parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)){return false}return getComputedStyle2(parentNode).position==="fixed"||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element,cache){const cachedResult=cache.get(element);if(cachedResult){return cachedResult}let result=getOverflowAncestors(element,[],false).filter(el=>isElement(el)&&getNodeName(el)!=="body");let currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle2(element).position==="fixed";let currentNode=elementIsFixed?getParentNode(element):element;while(isElement(currentNode)&&!isLastTraversableNode(currentNode)){const computedStyle=getComputedStyle2(currentNode);const currentNodeIsContaining=isContainingBlock(currentNode);if(!currentNodeIsContaining&&computedStyle.position==="fixed"){currentContainingBlockComputedStyle=null}const shouldDropCurrentNode=elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&(currentContainingBlockComputedStyle.position==="absolute"||currentContainingBlockComputedStyle.position==="fixed")||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element,currentNode);if(shouldDropCurrentNode){result=result.filter(ancestor=>ancestor!==currentNode)}else{currentContainingBlockComputedStyle=computedStyle}currentNode=getParentNode(currentNode)}cache.set(element,result);return result}function getClippingRect(_ref){let{element,boundary,rootBoundary,strategy}=_ref;const elementClippingAncestors=boundary==="clippingAncestors"?isTopLayer(element)?[]:getClippingElementAncestors(element,this._c):[].concat(boundary);const clippingAncestors=[...elementClippingAncestors,rootBoundary];const firstRect=getClientRectFromClippingAncestor(element,clippingAncestors[0],strategy);let top=firstRect.top;let right=firstRect.right;let bottom=firstRect.bottom;let left=firstRect.left;for(let i=1;i<clippingAncestors.length;i++){const rect=getClientRectFromClippingAncestor(element,clippingAncestors[i],strategy);top=max(rect.top,top);right=min(rect.right,right);bottom=min(rect.bottom,bottom);left=max(rect.left,left)}return{width:right-left,height:bottom-top,x:left,y:top}}function getDimensions(element){const{width,height}=getCssDimensions(element);return{width,height}}function getRectRelativeToOffsetParent(element,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement(offsetParent);const documentElement=getDocumentElement(offsetParent);const isFixed=strategy==="fixed";const rect=getBoundingClientRect(element,true,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);function setLeftRTLScrollbarOffset(){offsets.x=getWindowScrollBarX(documentElement)}if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement)){scroll=getNodeScroll(offsetParent)}if(isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,true,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft;offsets.y=offsetRect.y+offsetParent.clientTop}else if(documentElement){setLeftRTLScrollbarOffset()}}if(isFixed&&!isOffsetParentAnElement&&documentElement){setLeftRTLScrollbarOffset()}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0);const x=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x;const y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x,y,width:rect.width,height:rect.height}}function isStaticPositioned(element){return getComputedStyle2(element).position==="static"}function getTrueOffsetParent(element,polyfill){if(!isHTMLElement(element)||getComputedStyle2(element).position==="fixed"){return null}if(polyfill){return polyfill(element)}let rawOffsetParent=element.offsetParent;if(getDocumentElement(element)===rawOffsetParent){rawOffsetParent=rawOffsetParent.ownerDocument.body}return rawOffsetParent}function getOffsetParent(element,polyfill){const win=getWindow(element);if(isTopLayer(element)){return win}if(!isHTMLElement(element)){let svgOffsetParent=getParentNode(element);while(svgOffsetParent&&!isLastTraversableNode(svgOffsetParent)){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent)){return svgOffsetParent}svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element,polyfill);while(offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent)){offsetParent=getTrueOffsetParent(offsetParent,polyfill)}if(offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)){return win}return offsetParent||getContainingBlock(element)||win}var getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent;const getDimensionsFn=this.getDimensions;const floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element){return getComputedStyle2(element).direction==="rtl"}var platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element,onMove){let io=null;let timeoutId;const root=getDocumentElement(element);function cleanup(){var _io;clearTimeout(timeoutId);(_io=io)==null||_io.disconnect();io=null}function refresh(skip,threshold){if(skip===void 0){skip=false}if(threshold===void 0){threshold=1}cleanup();const elementRectForRootMargin=element.getBoundingClientRect();const{left,top,width,height}=elementRectForRootMargin;if(!skip){onMove()}if(!width||!height){return}const insetTop=floor(top);const insetRight=floor(root.clientWidth-(left+width));const insetBottom=floor(root.clientHeight-(top+height));const insetLeft=floor(left);const rootMargin=-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px";const options={rootMargin,threshold:max(0,min(1,threshold))||1};let isFirstUpdate=true;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate){return refresh()}if(!ratio){timeoutId=setTimeout(()=>{refresh(false,1e-7)},1e3)}else{refresh(false,ratio)}}if(ratio===1&&!rectsAreEqual(elementRectForRootMargin,element.getBoundingClientRect())){refresh()}isFirstUpdate=false}try{io=new IntersectionObserver(handleObserve,{...options,root:root.ownerDocument})}catch(_e){io=new IntersectionObserver(handleObserve,options)}io.observe(element)}refresh(true);return cleanup}function autoUpdate(reference,floating,update,options){if(options===void 0){options={}}const{ancestorScroll=true,ancestorResize=true,elementResize=typeof ResizeObserver==="function",layoutShift=typeof IntersectionObserver==="function",animationFrame=false}=options;const referenceEl=unwrapElement(reference);const ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...floating?getOverflowAncestors(floating):[]]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update,{passive:true});ancestorResize&&ancestor.addEventListener("resize",update)});const cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null;let reobserveFrame=-1;let resizeObserver=null;if(elementResize){resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;if(firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&floating){resizeObserver.unobserve(floating);cancelAnimationFrame(reobserveFrame);reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})}update()});if(referenceEl&&!animationFrame){resizeObserver.observe(referenceEl)}if(floating){resizeObserver.observe(floating)}}let frameId;let prevRefRect=animationFrame?getBoundingClientRect(reference):null;if(animationFrame){frameLoop()}function frameLoop(){const nextRefRect=getBoundingClientRect(reference);if(prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)){update()}prevRefRect=nextRefRect;frameId=requestAnimationFrame(frameLoop)}update();return()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update);ancestorResize&&ancestor.removeEventListener("resize",update)});cleanupIo==null||cleanupIo();(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect();resizeObserver=null;if(animationFrame){cancelAnimationFrame(frameId)}}}var offset2=offset;var shift2=shift;var flip2=flip;var size2=size;var hide2=hide;var arrow2=arrow;var limitShift2=limitShift;var computePosition2=(reference,floating,options)=>{const cache=new Map;const mergedOptions={platform,...options};const platformWithCache={...mergedOptions.platform,_c:cache};return computePosition(reference,floating,{...mergedOptions,platform:platformWithCache})};export{autoUpdate,offset2 as offset,shift2 as shift,flip2 as flip,size2 as size,hide2 as hide,arrow2 as arrow,limitShift2 as limitShift,computePosition2 as computePosition};
|
|
2
|
+
//# sourceMappingURL=chunk-S7FE2XRA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BotProtectionAltcha,BotProtectionFields,preloadAltchaWidget,useBotProtection}from"./chunk-IXDKZO42.js";import{useIsInsideElementsRoot}from"./chunk-4MOCTNN7.js";import{PartScopeProvider}from"./chunk-763LNERD.js";import{useOptionalSiteLabels}from"./chunk-U7H3W23Q.js";import{ELEMENTS_PART_CLASS,markScope,optionalSiteUrl,resolveLocale,resolveVisitorLocale,useBrandStyle,useElementsMessages,useKanorioProviderConfig,useKanorioSiteUrl,useSiteMeta}from"./chunk-MIQK3T3Y.js";import{useEffect,useMemo as useMemo2}from"react";import{createContext,useContext,useMemo}from"react";import{jsx}from"react/jsx-runtime";var BotProtectionContext=createContext(null);import{Fragment,jsx as jsx2,jsxs}from"react/jsx-runtime";function useKanorioBotProtection(options={}){const siteUrl=useKanorioSiteUrl(options.siteUrl);return useBotProtection({...options,variant:options.variant??"full",challengeUrl:`${siteUrl}/api/form-protection/challenge`,altchaChallengeUrl:`${siteUrl}/api/form-protection/altcha`})}var ENGLISH_ALTCHA_LABELS={botProtection:"Human verification",botProtectionLoading:"Loading human verification"};function useBotProtectionPart(theme,localeProp,wantsAltcha){const parent=useKanorioProviderConfig();const insideRoot=useIsInsideElementsRoot();const locale=resolveLocale(localeProp??parent?.locale);const hostTheme=theme??(parent?.theme==="light"||parent?.theme==="dark"?parent.theme:null);const resolvedTheme=insideRoot?null:hostTheme;const brandSiteUrl=wantsAltcha&&!insideRoot&&parent!==null&&parent.brand!==false?optionalSiteUrl(parent.siteUrl):null;const{site}=useSiteMeta(brandSiteUrl??"",brandSiteUrl!==null);const brandScope=useBrandStyle(site,locale,brandSiteUrl!==null);const scope=useMemo2(()=>insideRoot?null:{className:ELEMENTS_PART_CLASS,mark:element=>markScope(element,resolvedTheme,brandScope)},[insideRoot,resolvedTheme,brandScope]);const rootLabels=useOptionalSiteLabels();const english=resolveVisitorLocale(locale).startsWith("en");const{messages}=useElementsMessages(locale,wantsAltcha&&rootLabels===null&&!english);const labels=useMemo2(()=>{if(rootLabels)return void 0;if(!messages||english)return ENGLISH_ALTCHA_LABELS;return{botProtection:messages.ui.botProtection,botProtectionLoading:messages.ui.botProtectionLoading}},[rootLabels,messages,english]);useEffect(()=>{if(wantsAltcha)preloadAltchaWidget(locale)},[wantsAltcha,locale]);return{scope,labels,locale}}function KanorioBotProtection({theme,...props}){return jsxs(Fragment,{children:[props.renderAltcha===false?null:jsx2(KanorioBotProtectionAltcha,{theme,...props}),jsx2(BotProtectionFields,{...props,renderAltcha:false})]})}function KanorioBotProtectionAltcha({theme,...props}){const{scope,labels,locale}=useBotProtectionPart(theme,props.locale,props.variant==="full");return jsx2(PartScopeProvider,{value:scope,children:jsx2(BotProtectionAltcha,{...props,locale,labels})})}export{useKanorioBotProtection,ENGLISH_ALTCHA_LABELS,KanorioBotProtection,KanorioBotProtectionAltcha};
|
|
2
|
+
//# sourceMappingURL=chunk-SUXTLVTX.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CONTROL_ERROR_SHADE_SOFT_CLASS}from"./chunk-RG5JA44V.js";var FORM_FG="text-[var(--site-fg,#18181b)]";var FORM_FG_MUTED="text-[var(--site-fg-muted,#71717a)]";var FORM_DANGER="text-[var(--site-danger-text,#dc2626)]";var FORM_ACCENT_ICON="text-[var(--site-accent-text,var(--brand-text,var(--brand-color,#FF5733)))]";var FORM_FIELD_BOX_COLORS="border-[var(--site-field-border,rgb(0_0_0/0.15))] bg-[var(--site-field-bg,rgb(255_255_255/0.9))] text-[var(--site-field-fg,#18181b)]";var FORM_FIELD_CLASS="rounded-lg border px-3.5 text-[length:var(--site-input-text,16px)] outline-none transition placeholder:text-zinc-400 data-[placeholder]:text-[var(--site-field-fg-muted,#71717a)] "+CONTROL_ERROR_SHADE_SOFT_CLASS+" focus-visible:ring-offset-0 "+FORM_FIELD_BOX_COLORS+" hover:border-[var(--site-field-border,rgb(0_0_0/0.15))] focus:border-[var(--site-field-accent,var(--brand-color,#FF5733))] focus:inset-ring-1 focus:inset-ring-[var(--site-field-accent,var(--brand-color,#FF5733))] focus:ring-2 focus:ring-[var(--site-field-accent,var(--brand-color,#FF5733))]/20";var FORM_FIELD_INVALID_CLASS="border-red-400 hover:border-red-400 focus:border-red-500 focus:inset-ring-red-500 focus:ring-red-500/20";var FORM_FIELD_FG_MUTED="text-[var(--site-field-fg-muted,#71717a)]";var FORM_SUBMIT_COLORS="bg-[var(--site-cta-brand-bg,var(--brand-color,#FF5733))] text-[var(--site-cta-brand-fg,var(--brand-foreground,#ffffff))]";export{FORM_FG,FORM_FG_MUTED,FORM_DANGER,FORM_ACCENT_ICON,FORM_FIELD_BOX_COLORS,FORM_FIELD_CLASS,FORM_FIELD_INVALID_CLASS,FORM_FIELD_FG_MUTED,FORM_SUBMIT_COLORS};
|
|
2
|
+
//# sourceMappingURL=chunk-SVWEVSYJ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var LOAD_RETRY_DELAYS_MS=[1e3,4e3,15e3];function createLoadRetry({retry,onExhausted}){let attempts=0;let timer=null;let listening=false;const clearTimer=()=>{if(timer)clearTimeout(timer);timer=null};const onOnline=()=>{clearTimer();attempts=0;retry()};const listen=()=>{if(listening||typeof window==="undefined")return;listening=true;window.addEventListener("online",onOnline)};const stopListening=()=>{if(!listening)return;listening=false;window.removeEventListener("online",onOnline)};return{failed(){listen();if(timer)return;const delay=LOAD_RETRY_DELAYS_MS[attempts];if(delay===void 0){onExhausted?.();return}attempts+=1;timer=setTimeout(()=>{timer=null;retry()},delay)},succeeded(){clearTimer();attempts=0;stopListening()},dispose(){clearTimer();attempts=0;stopListening()}}}export{createLoadRetry};
|
|
2
|
+
//# sourceMappingURL=chunk-TEUQV3AT.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext,useContext}from"react";import{jsx}from"react/jsx-runtime";var SiteLabelsContext=createContext(null);function SiteLabelsProvider({labels,children}){return jsx(SiteLabelsContext.Provider,{value:labels,children})}function useSiteLabels(){const labels=useContext(SiteLabelsContext);if(!labels)throw new Error("useSiteLabels() must be used inside a SiteLabelsProvider");return labels}function useOptionalSiteLabels(){return useContext(SiteLabelsContext)}export{SiteLabelsProvider,useSiteLabels,useOptionalSiteLabels};
|
|
2
|
+
//# sourceMappingURL=chunk-U7H3W23Q.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{CUSTOMER_SESSION_HINT_COOKIE_NAME,CustomerAccountPanel,createHostedCustomerAuthTransport,customerButtonClass,normalizeCustomerAuthMethods}from"./chunk-EE4S6NRV.js";import{composeRefs}from"./chunk-AQ6F6MIJ.js";import{useHydrated}from"./chunk-63XJWMJG.js";import{onDemand}from"./chunk-E77WGXYW.js";import{LOGIN_EVENT,LOGOUT_EVENT}from"./chunk-LWKCGUHS.js";import{BotProtectionConfigProvider,parsePublicBotProtectionConfig}from"./chunk-IXDKZO42.js";import{useSiteChrome}from"./chunk-Z4A5NQWJ.js";import{lockPageScroll}from"./chunk-HFYLTH5B.js";import{LoaderCircle,X}from"./chunk-33AQQY6T.js";import{clsx,cn}from"./chunk-VUTODQFX.js";import{ElementsRoot}from"./chunk-4MOCTNN7.js";import{fillLabel}from"./chunk-KNNN5V3T.js";import{useSiteLabels}from"./chunk-U7H3W23Q.js";import{KanorioApiError,completeHostedCustomerLogin,createCustomerClient,startHostedCustomerLogin,useElementContext}from"./chunk-MIQK3T3Y.js";import{useEffect as useEffect4,useMemo as useMemo2,useState as useState2}from"react";import{jsx,jsxs}from"react/jsx-runtime";import{jsx as jsx2}from"react/jsx-runtime";import{jsx as jsx3,jsxs as jsxs2}from"react/jsx-runtime";import{useEffect,useRef}from"react";import{jsx as jsx4,jsxs as jsxs3}from"react/jsx-runtime";import{createContext,useCallback as useCallback2,useContext,useEffect as useEffect3,useMemo,useRef as useRef3,useState}from"react";import{useCallback,useEffect as useEffect2,useRef as useRef2}from"react";import{createPortal}from"react-dom";import{jsx as jsx5,jsxs as jsxs4}from"react/jsx-runtime";var FOCUSABLE_SELECTOR='a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])';function SiteResponsiveModal({open,onClose,title,closeLabel,children,footer,showHeader=true,dismissible=true,desktopZIndexClassName="z-[var(--z-dialog,200)]",drawerZIndexClassName="z-[var(--z-dialog,200)]",maxWidthClassName="max-w-lg",desktopVariant="dialog",surface="glass",headerSlot,subheader,bodyClassName,footerClassName,id}){const isSide=desktopVariant==="side";const chrome=useSiteChrome();const mounted=useHydrated();const onCloseRef=useRef2(onClose);const dismissibleRef=useRef2(dismissible);useEffect2(()=>{onCloseRef.current=onClose;dismissibleRef.current=dismissible});useEffect2(()=>{if(!open)return;const releaseScrollLock=lockPageScroll();const onKeyDown=e=>{if(e.key==="Escape"&&dismissibleRef.current)onCloseRef.current()};document.addEventListener("keydown",onKeyDown);return()=>{releaseScrollLock();document.removeEventListener("keydown",onKeyDown)}},[open]);const sheetRef=useRef2(null);const subheaderRef=useRef2(null);const bodyRef=useRef2(null);const dragZoneRef=useRef2(null);const dragStartY=useRef2(null);const dragDelta=useRef2(0);const portalTarget=chrome?chrome.slots.modal:mounted?document.body:null;const rendered=open&&!!portalTarget;useEffect2(()=>{if(!rendered)return;const sheet=sheetRef.current;if(!sheet)return;const previouslyFocused=document.activeElement instanceof HTMLElement?document.activeElement:null;const focusables=()=>Array.from(sheet.querySelectorAll(FOCUSABLE_SELECTOR)).filter(el=>!el.hasAttribute("disabled")&&el.getAttribute("aria-hidden")!=="true");const firstInSubheader=subheaderRef.current?.querySelector(FOCUSABLE_SELECTOR);const firstInBody=bodyRef.current?.querySelector(FOCUSABLE_SELECTOR);(firstInSubheader??firstInBody??focusables()[0]??sheet).focus({preventScroll:true});const onKeyDown=e=>{if(e.key!=="Tab")return;const list=focusables();if(list.length===0){e.preventDefault();sheet.focus();return}const first=list[0];const last=list[list.length-1];const active=document.activeElement;const inside=active instanceof Node&&sheet.contains(active);if(e.shiftKey){if(!inside||active===first||active===sheet){e.preventDefault();last.focus()}}else if(!inside||active===last){e.preventDefault();first.focus()}};document.addEventListener("keydown",onKeyDown);return()=>{document.removeEventListener("keydown",onKeyDown);if(previouslyFocused&&previouslyFocused.isConnected){previouslyFocused.focus({preventScroll:true})}}},[rendered]);const onTouchStart=useCallback(e=>{if(!dismissibleRef.current)return;const target=e.target instanceof Node?e.target:null;const fromDragZone=!!target&&!!dragZoneRef.current?.contains(target);const bodyAtTop=(bodyRef.current?.scrollTop??0)<=0;if(!fromDragZone&&!bodyAtTop)return;dragStartY.current=e.touches[0].clientY;dragDelta.current=0},[]);const onTouchMove=useCallback(e=>{if(dragStartY.current==null)return;const delta=e.touches[0].clientY-dragStartY.current;if(delta<0&&(bodyRef.current?.scrollTop??0)>0){dragStartY.current=null;if(sheetRef.current)sheetRef.current.style.transform="";return}dragDelta.current=delta;if(delta>0&&sheetRef.current){sheetRef.current.style.transform=`translateY(${delta}px)`}},[]);const onTouchEnd=useCallback(()=>{if(dragStartY.current==null)return;if(sheetRef.current){sheetRef.current.style.transform=""}if(dragDelta.current>100&&dismissibleRef.current){onCloseRef.current()}dragStartY.current=null;dragDelta.current=0},[]);if(!rendered)return null;const headerCloseButton=jsx5("button",{type:"button",onClick:onClose,className:"relative h-10 w-10 flex items-center justify-center rounded-full text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors before:absolute before:-inset-0.5 before:content-['']","aria-label":closeLabel,children:jsx5(X,{className:"h-5 w-5"})});const floatingCloseButton=jsx5("button",{type:"button",onClick:onClose,className:"absolute right-2 top-2 z-10 h-9 w-9 flex items-center justify-center rounded-full bg-black/40 text-white backdrop-blur-sm hover:bg-black/60 transition-colors before:absolute before:-inset-1 before:content-['']","aria-label":closeLabel,children:jsx5(X,{className:"h-5 w-5"})});return createPortal(jsxs4("div",{className:cn("pointer-events-auto fixed inset-0 flex items-end justify-center",isSide?"md:items-stretch md:justify-end":"md:items-center md:p-4",desktopZIndexClassName,drawerZIndexClassName),role:"dialog","aria-modal":"true","aria-label":title,children:[jsx5("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:dismissible?onClose:void 0,"aria-hidden":"true"}),jsxs4("div",{id,ref:sheetRef,tabIndex:-1,onTouchStart,onTouchMove,onTouchEnd,className:cn("relative flex w-full flex-col overflow-hidden outline-none transition-transform duration-150 ease-out","max-h-[90dvh] rounded-t-[var(--site-radius-card)]",isSide?"animate-site-side-panel md:h-full md:max-h-full md:rounded-none md:rounded-l-[var(--site-radius-card)] md:border-y-0 md:border-r-0":"animate-site-sheet-up md:max-h-[80vh] md:rounded-[var(--site-radius-card)]",surface==="glass"?"glass-card":"border border-zinc-200/50 bg-white shadow-2xl shadow-black/20 dark:border-zinc-700/50 dark:bg-zinc-900 dark:shadow-black/40","max-md:max-w-none",maxWidthClassName),children:[jsxs4("div",{ref:dragZoneRef,className:"flex shrink-0 flex-col",children:[dismissible&&jsx5("button",{type:"button",onClick:onClose,className:"mx-auto mt-1.5 mb-0.5 flex h-4 w-14 shrink-0 items-center justify-center md:hidden","aria-label":closeLabel,children:jsx5("span",{className:"h-1 w-full rounded-full bg-zinc-400 dark:bg-zinc-500"})}),showHeader?jsxs4("div",{className:"flex flex-shrink-0 items-center justify-between border-b border-zinc-200/50 px-4 py-2 dark:border-zinc-700/50",children:[headerSlot??jsx5("h2",{className:"text-lg font-semibold text-zinc-900 dark:text-zinc-50",children:title}),headerSlot&&jsx5("h2",{className:"sr-only",children:title}),dismissible&&headerCloseButton]}):dismissible&&floatingCloseButton]}),subheader&&jsx5("div",{ref:subheaderRef,className:"shrink-0",children:subheader}),jsx5("div",{ref:bodyRef,className:cn("min-h-0 flex-1 overflow-y-auto overscroll-contain kano-scrollbar",showHeader?"p-4":"p-0",bodyClassName),children}),footer&&jsx5("div",{className:cn("flex-shrink-0 border-t border-zinc-200/50 p-4 dark:border-zinc-700/50",footerClassName),children:footer})]})]}),portalTarget)}import*as React2 from"react";import*as React from"react";import{Fragment as Fragment2,jsx as jsx6}from"react/jsx-runtime";var REACT_LAZY_TYPE=Symbol.for("react.lazy");var use=React[" use ".trim().toString()];function isPromiseLike(value){return typeof value==="object"&&value!==null&&"then"in value}function isLazyComponent(element){return element!=null&&typeof element==="object"&&"$$typeof"in element&&element.$$typeof===REACT_LAZY_TYPE&&"_payload"in element&&isPromiseLike(element._payload)}function createSlot(ownerName){const SlotClone=createSlotClone(ownerName);const Slot2=React.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props;if(isLazyComponent(children)&&typeof use==="function"){children=use(children._payload)}const childrenArray=React.Children.toArray(children);const slottable=childrenArray.find(isSlottable);if(slottable){const newElement=slottable.props.children;const newChildren=childrenArray.map(child=>{if(child===slottable){if(React.Children.count(newElement)>1)return React.Children.only(null);return React.isValidElement(newElement)?newElement.props.children:null}else{return child}});return jsx6(SlotClone,{...slotProps,ref:forwardedRef,children:React.isValidElement(newElement)?React.cloneElement(newElement,void 0,newChildren):null})}return jsx6(SlotClone,{...slotProps,ref:forwardedRef,children})});Slot2.displayName=`${ownerName}.Slot`;return Slot2}var Slot=createSlot("Slot");function createSlotClone(ownerName){const SlotClone=React.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props;if(isLazyComponent(children)&&typeof use==="function"){children=use(children._payload)}if(React.isValidElement(children)){const childrenRef=getElementRef(children);const props2=mergeProps(slotProps,children.props);if(children.type!==React.Fragment){props2.ref=forwardedRef?composeRefs(forwardedRef,childrenRef):childrenRef}return React.cloneElement(children,props2)}return React.Children.count(children)>1?React.Children.only(null):null});SlotClone.displayName=`${ownerName}.SlotClone`;return SlotClone}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function isSlottable(child){return React.isValidElement(child)&&typeof child.type==="function"&&"__radixId"in child.type&&child.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps(slotProps,childProps){const overrideProps={...childProps};for(const propName in childProps){const slotPropValue=slotProps[propName];const childPropValue=childProps[propName];const isHandler=/^on[A-Z]/.test(propName);if(isHandler){if(slotPropValue&&childPropValue){overrideProps[propName]=(...args)=>{const result=childPropValue(...args);slotPropValue(...args);return result}}else if(slotPropValue){overrideProps[propName]=slotPropValue}}else if(propName==="style"){overrideProps[propName]={...slotPropValue,...childPropValue}}else if(propName==="className"){overrideProps[propName]=[slotPropValue,childPropValue].filter(Boolean).join(" ")}}return{...slotProps,...overrideProps}}function getElementRef(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get;let mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;if(mayWarn){return element.ref}getter=Object.getOwnPropertyDescriptor(element,"ref")?.get;mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;if(mayWarn){return element.props.ref}return element.props.ref||element.ref}var falsyToString=value=>typeof value==="boolean"?`${value}`:value===0?"0":value;var cx=clsx;var cva=(base,config)=>props=>{var _config_compoundVariants;if((config===null||config===void 0?void 0:config.variants)==null)return cx(base,props===null||props===void 0?void 0:props.class,props===null||props===void 0?void 0:props.className);const{variants,defaultVariants}=config;const getVariantClassNames=Object.keys(variants).map(variant=>{const variantProp=props===null||props===void 0?void 0:props[variant];const defaultVariantProp=defaultVariants===null||defaultVariants===void 0?void 0:defaultVariants[variant];if(variantProp===null)return null;const variantKey=falsyToString(variantProp)||falsyToString(defaultVariantProp);return variants[variant][variantKey]});const propsWithoutUndefined=props&&Object.entries(props).reduce((acc,param)=>{let[key,value]=param;if(value===void 0){return acc}acc[key]=value;return acc},{});const getCompoundVariantClassNames=config===null||config===void 0?void 0:(_config_compoundVariants=config.compoundVariants)===null||_config_compoundVariants===void 0?void 0:_config_compoundVariants.reduce((acc,param)=>{let{class:cvClass,className:cvClassName,...compoundVariantOptions}=param;return Object.entries(compoundVariantOptions).every(param2=>{let[key,value]=param2;return Array.isArray(value)?value.includes({...defaultVariants,...propsWithoutUndefined}[key]):{...defaultVariants,...propsWithoutUndefined}[key]===value})?[...acc,cvClass,cvClassName]:acc},[]);return cx(base,getVariantClassNames,getCompoundVariantClassNames,props===null||props===void 0?void 0:props.class,props===null||props===void 0?void 0:props.className)};import{jsx as jsx7}from"react/jsx-runtime";var buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 hover:scale-[1.02] hover:shadow-md active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 disabled:hover:scale-100 disabled:hover:shadow-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-11 rounded-[var(--site-radius-button)] px-4 py-2",sm:"h-9 rounded-[var(--site-radius-button)] px-3",lg:"h-14 rounded-[var(--site-radius-button)] px-8",icon:"h-11 w-11 rounded-full"}},defaultVariants:{variant:"default",size:"default"}});var Button=React2.forwardRef(({className,variant,size,asChild=false,...props},ref)=>{const Comp=asChild?Slot:"button";return jsx7(Comp,{className:cn(buttonVariants({variant,size,className})),ref,...props})});Button.displayName="Button";import{jsx as jsx8,jsxs as jsxs5}from"react/jsx-runtime";var CustomerAccountPanel2=onDemand(()=>import("./CustomerAccountPanel-RWEHWBJY.js").then(m=>m.CustomerAccountPanel),()=>jsx8("div",{className:"flex min-h-40 items-center justify-center","aria-busy":"true",children:jsx8(LoaderCircle,{className:"h-5 w-5 animate-spin opacity-50"})}));function hasCustomerSessionHint(){if(typeof document==="undefined")return false;return document.cookie.split(";").some(part=>part.trim().startsWith(`${CUSTOMER_SESSION_HINT_COOKIE_NAME}=`))}function clearCustomerSessionHint(){if(typeof document==="undefined")return;document.cookie=`${CUSTOMER_SESSION_HINT_COOKIE_NAME}=; Max-Age=0; Path=/; SameSite=Lax`}var overviewCacheKey=siteId=>`knr_customer_overview:${siteId}`;function sessionFingerprint(sessionKey){if(sessionKey===null)return"";let hash=2166136261;for(let index=0;index<sessionKey.length;index+=1){hash^=sessionKey.charCodeAt(index);hash=Math.imul(hash,16777619)}return(hash>>>0).toString(36)}function readCachedOverview(siteId,sessionKey){try{const raw=typeof sessionStorage==="undefined"?null:sessionStorage.getItem(overviewCacheKey(siteId));if(!raw)return null;const parsed=JSON.parse(raw);if(!parsed||typeof parsed!=="object"||!parsed.contact||parsed.session!==sessionFingerprint(sessionKey))return null;return parsed}catch{return null}}function writeCachedOverview(siteId,overview,sessionKey){try{if(typeof sessionStorage==="undefined")return;if(overview){const{id,email,name}=overview.contact;const cached={session:sessionFingerprint(sessionKey),contact:{id,email,name},sections:overview.sections,landing:overview.landing};sessionStorage.setItem(overviewCacheKey(siteId),JSON.stringify(cached))}else sessionStorage.removeItem(overviewCacheKey(siteId))}catch{}}var SESSION_RETRY_DELAYS_MS=[1e3,3e3,1e4];var CustomerAuthContext=createContext(null);function CustomerAuthProvider({config,children}){const[user,setUser]=useState(null);const[sections,setSections]=useState([]);const[landing,setLanding]=useState(null);const[check,setCheck]=useState("pending");const[hinted,setHinted]=useState(false);const[panelOpen,setPanelOpen]=useState(false);const[refreshTick,setRefreshTick]=useState(0);const transport=useMemo(()=>config?.transport??createHostedCustomerAuthTransport(),[config?.transport]);const sessionHint=config?.sessionHint??hasCustomerSessionHint;const siteId=config?.siteId??null;const sessionKey=config?.sessionKey??null;const lastCheckRef=useRef3(null);const sessionKeyRef=useRef3(sessionKey);sessionKeyRef.current=sessionKey;const applySession=useCallback2(overview=>{if(siteId)writeCachedOverview(siteId,overview,sessionKeyRef.current);setUser(overview?.contact??null);setSections(overview?.sections??[]);setLanding(overview?.landing??null);setCheck("done");if(!overview)setRefreshTick(tick=>tick+1)},[siteId]);const retrySession=useCallback2(()=>{setCheck("pending");setRefreshTick(tick=>tick+1)},[]);useEffect3(()=>{if(siteId===null)return;const previous=lastCheckRef.current;lastCheckRef.current={siteId,sessionKey};if(!sessionHint()){writeCachedOverview(siteId,null,sessionKey);setHinted(false);setUser(null);setSections([]);setLanding(null);setCheck("done");return}setHinted(true);if(previous===null||previous.siteId!==siteId||previous.sessionKey!==sessionKey)setCheck("pending");const cached=readCachedOverview(siteId,sessionKey);if(cached){setUser(cached.contact);setSections(cached.sections??[]);setLanding(cached.landing??null)}else if(previous!==null&&(previous.siteId!==siteId||previous.sessionKey!==null&&previous.sessionKey!==sessionKey)){setUser(null);setSections([]);setLanding(null)}let cancelled=false;let retryTimer=null;const ask=attempt=>{transport.session().then(overview=>{if(cancelled)return;writeCachedOverview(siteId,overview,sessionKey);if(!overview)clearCustomerSessionHint();setUser(overview?.contact??null);setSections(overview?.sections??[]);setLanding(overview?.landing??null);setCheck("done")}).catch(()=>{if(cancelled)return;const delay=SESSION_RETRY_DELAYS_MS[attempt];if(delay!==void 0){retryTimer=setTimeout(()=>ask(attempt+1),delay);return}setCheck(current=>current==="pending"?"failed":current)})};ask(0);return()=>{cancelled=true;if(retryTimer!==null)clearTimeout(retryTimer)}},[siteId,sessionKey,transport,refreshTick]);useEffect3(()=>{if(!config||typeof document==="undefined")return;const sync=()=>{if(document.visibilityState!=="visible")return;const hint=sessionHint();if(hint&&user===null)setRefreshTick(tick=>tick+1);if(!hint&&user!==null){writeCachedOverview(config.siteId,null,sessionKey);setUser(null);setSections([]);setLanding(null);setCheck("done")}};document.addEventListener("visibilitychange",sync);window.addEventListener("focus",sync);return()=>{document.removeEventListener("visibilitychange",sync);window.removeEventListener("focus",sync)}},[config,user]);const refresh=useCallback2(async()=>{let overview;try{overview=await transport.session()}catch{setCheck("done");return}if(siteId)writeCachedOverview(siteId,overview,sessionKeyRef.current);setUser(overview?.contact??null);setSections(overview?.sections??[]);setLanding(overview?.landing??null);setCheck("done")},[transport,siteId]);const signOut=useCallback2(async()=>{await transport.signOut();if(siteId)writeCachedOverview(siteId,null,sessionKeyRef.current);clearCustomerSessionHint();setUser(null);setSections([]);setLanding(null);setCheck("done")},[transport,siteId]);const openPanel=useCallback2(()=>setPanelOpen(true),[]);const closePanel=useCallback2(()=>setPanelOpen(false),[]);const value=useMemo(()=>config?{siteId:config.siteId,siteName:config.siteName,locale:config.locale,siteLocale:config.siteLocale,accountBaseUrl:config.accountBaseUrl,showNavEntry:config.showNavEntry,allowSignup:config.allowSignup,methods:config.methods,messages:config.messages,transport,user,sections,landing,checked:check!=="pending",pending:hinted&&check==="pending"&&user===null,sessionUnavailable:hinted&&check==="failed"&&user===null,retrySession,applySession,refresh,signOut,panelOpen,openPanel,closePanel}:null,[config,transport,user,sections,landing,check,hinted,applySession,retrySession,refresh,signOut,panelOpen,openPanel,closePanel]);return jsxs5(CustomerAuthContext.Provider,{value,children:[children,value?jsx8(CustomerAccountModal,{auth:value}):null]})}function useCustomerAuth(){return useContext(CustomerAuthContext)}function CustomerAccountModal({auth}){const{ui}=useSiteLabels();const title=auth.user||auth.pending?ui.myAccount:fillLabel(auth.messages.signInTitle,{siteName:auth.siteName});return jsx8(SiteResponsiveModal,{id:"customer-account-panel",open:auth.panelOpen,onClose:auth.closePanel,title,closeLabel:ui.close,maxWidthClassName:"max-w-md",surface:"solid",bodyClassName:"p-5 sm:p-6",children:jsx8(CustomerAccountPanel2,{variant:"panel",auth,onNavigate:auth.closePanel})})}import{Fragment as Fragment3,jsx as jsx9,jsxs as jsxs6}from"react/jsx-runtime";function loginReturnTo(returnTo){if(returnTo?.startsWith("/"))return returnTo;if(typeof window==="undefined")return void 0;const url=new URL(window.location.href);for(const key of["token","handoff","error","verify","email"])url.searchParams.delete(key);return`${url.pathname}${url.search}`}function failure(error){if(error instanceof KanorioApiError)return{ok:false,code:error.code??"SERVER_ERROR"};return{ok:false,code:"NETWORK_ERROR"}}var sessionRequests=new Map;function createBearerCustomerAuthTransport(params){return bearerTransport(params,false)}function bearerTransport(params,strictSession){const siteUrl=params.siteUrl.replace(/\/+$/,"");const client=createCustomerClient({siteUrl,token:params.token});const post=async(path,body)=>{try{const data=await client.post(path,{body});return{ok:true,...data}}catch(error){return failure(error)}};const get=async path=>{try{const data=await client.get(path,{});return{ok:true,...data}}catch(error){return failure(error)}};const grant=result=>{if(result.ok&&result.sessionToken)params.onToken(result.sessionToken);return result};return{altchaChallengeUrl:`${siteUrl}/api/form-protection/altcha`,challengeUrl:`${siteUrl}/api/form-protection/challenge`,requestChallenge:({email,locale,returnTo,protection})=>post("/auth/challenge",{email,locale,returnTo,...protection}),verifyCode:async({email,code})=>grant(await post("/auth/verify",{method:"code",email,code,channel:"bearer"})),verifyToken:async({method,token})=>grant(await post("/auth/verify",{method,token,channel:"bearer"})),startOauth:({method,returnTo,locale})=>post("/auth/oauth/start",{method,returnTo,locale}),passkeyLoginOptions:()=>post("/auth/passkey/options",{origin:typeof window==="undefined"?void 0:window.location.origin}),passkeyLoginVerify:async input=>grant(await post("/auth/passkey/verify",{...input,channel:"bearer"})),listPasskeys:()=>get("/passkeys"),passkeyRegisterOptions:()=>post("/passkeys/register/options",{origin:typeof window==="undefined"?void 0:window.location.origin}),passkeyRegister:input=>post("/passkeys/register",input),session:()=>{const token=params.token();if(!token)return Promise.resolve(null);const key=`${siteUrl}
|
|
2
|
+
${token}`;const running=sessionRequests.get(key);const request=running??createCustomerClient({siteUrl,token}).get("/me").then(data=>{const overview=data;if(!overview.contact)return null;const{id,email,name}=overview.contact;return{contact:{id,email,name},sections:overview.sections??[],landing:overview.landing??"/account"}},error=>{if(error instanceof KanorioApiError&&error.status===401)return null;throw error});if(!running){sessionRequests.set(key,request);void request.then(()=>sessionRequests.delete(key),()=>sessionRequests.delete(key))}return strictSession?request:request.catch(()=>null)},signOut:async()=>{try{await client.delete("/session",{body:{mode:"current"}})}catch{}params.onToken(null)}}}var hostedExchanges=new Map;function hostedExchange(siteUrl,clientId){const key=`${siteUrl}|${clientId}`;const running=hostedExchanges.get(key);if(running)return running;if(!new URLSearchParams(window.location.search).has("code"))return null;const exchange={result:completeHostedCustomerLogin({siteUrl,clientId}),signedIn:false};hostedExchanges.set(key,exchange);void exchange.result.then(()=>hostedExchanges.delete(key),()=>hostedExchanges.delete(key));return exchange}function KanorioAccount({siteName,mode="direct",redirectUri,returnTo,onLogin,onLogout,renderSignedIn,className,...config}){const ctx=useElementContext(config,{needsSite:true});const site=ctx.site;const[redirectState,setRedirectState]=useState2({busy:false,error:null});const siteId=site?.id??"";const setToken=ctx.setToken;useEffect4(()=>{if(mode!=="redirect"||!siteId||typeof window==="undefined")return;const exchange=hostedExchange(ctx.siteUrl,siteId);if(!exchange)return;let cancelled=false;setRedirectState({busy:true,error:null});exchange.result.then(grant=>{if(cancelled)return;if(grant&&!exchange.signedIn){exchange.signedIn=true;setToken(grant.accessToken);const session={token:grant.accessToken,contactId:grant.contactId,expiresAt:grant.expiresAt};onLogin?.(session);window.dispatchEvent(new CustomEvent(LOGIN_EVENT,{detail:session}))}setRedirectState({busy:false,error:null})}).catch(error=>{if(cancelled)return;setRedirectState({busy:false,error:error instanceof KanorioApiError?error.code:"NETWORK_ERROR"})});return()=>{cancelled=true}},[mode,siteId,ctx.siteUrl,setToken]);const[initial]=useState2(()=>{if(typeof window==="undefined")return{};const params=new URLSearchParams(window.location.search);return{email:params.get("email")??void 0,token:params.get("token")??void 0,handoff:params.get("handoff")??void 0,verify:params.get("verify")==="1",error:params.get("error")??void 0}});const tokenRef=useLatest(ctx.token);const transport=useMemo2(()=>bearerTransport({siteUrl:ctx.siteUrl,token:()=>tokenRef.current,onToken:token=>{tokenRef.current=token;setToken(token)}},true),[ctx.siteUrl,setToken,tokenRef]);const resolvedSiteName=siteName??site?.brand?.displayName??site?.name??"";const authConfig=useMemo2(()=>site&&ctx.messages?{siteId:site.id,siteName:resolvedSiteName,locale:ctx.locale,siteLocale:site.locale??ctx.locale,accountBaseUrl:ctx.siteUrl,showNavEntry:site.customerAccess?.showNavEntry===true,allowSignup:site.customerAccess?.allowSignup===true,methods:normalizeCustomerAuthMethods(site.customerAccess?.methods),messages:ctx.messages.account,transport,sessionHint:()=>Boolean(tokenRef.current),sessionKey:ctx.token}:null,[site,ctx.messages,ctx.locale,ctx.siteUrl,ctx.token,resolvedSiteName,transport,tokenRef]);if(!ctx.messages)return jsx9(ElementsRoot,{context:ctx,className,loading:true});return jsx9(ElementsRoot,{context:ctx,className,children:jsx9(BotProtectionConfigProvider,{value:parsePublicBotProtectionConfig(site?.botProtection),children:jsx9(CustomerAuthProvider,{config:authConfig,children:mode==="redirect"?jsx9(RedirectBody,{siteUrl:ctx.siteUrl,siteId,siteName:resolvedSiteName,redirectUri,busy:redirectState.busy,error:redirectState.error,messages:ctx.messages.account,onLogout,renderSignedIn}):jsx9(AccountBody,{returnTo:loginReturnTo(returnTo),initial,onLogin,onLogout,renderSignedIn})})})})}function RedirectBody({siteUrl,siteId,siteName,redirectUri,busy,error,messages,onLogout,renderSignedIn}){const auth=useCustomerAuth();const[starting,setStarting]=useState2(false);if(!auth)return jsx9("div",{"aria-busy":"true"});if(auth.user){if(renderSignedIn)return jsx9(Fragment3,{children:renderSignedIn(()=>void auth.signOut().then(()=>emitLogout(onLogout)))});return jsx9("div",{className:"kanorio-account rounded-[var(--site-radius-card,1rem)] border border-[var(--site-border,rgba(0,0,0,0.12))] bg-[var(--site-surface,#ffffff)] p-6",children:jsx9(CustomerAccountPanel,{variant:"panel",auth,onSignedOut:()=>emitLogout(onLogout)})})}const start=async()=>{if(!siteId)return;setStarting(true);try{await startHostedCustomerLogin({siteUrl,clientId:siteId,redirectUri})}catch{setStarting(false)}};if(auth.sessionUnavailable){return jsxs6("div",{className:"kanorio-account rounded-[var(--site-radius-card,1rem)] border border-[var(--site-border,rgba(0,0,0,0.12))] bg-[var(--site-surface,#ffffff)] p-6",children:[jsx9("p",{role:"alert",className:"mb-4 text-sm text-red-700 dark:text-red-300",children:messages.errorServiceUnavailable}),jsx9("button",{type:"button",className:customerButtonClass({block:true}),onClick:auth.retrySession,children:messages.contentRetry})]})}return jsxs6("div",{className:"kanorio-account rounded-[var(--site-radius-card,1rem)] border border-[var(--site-border,rgba(0,0,0,0.12))] bg-[var(--site-surface,#ffffff)] p-6",children:[error?jsx9("p",{role:"alert",className:"mb-4 text-sm text-red-700 dark:text-red-300",children:messages.errorGeneric}):null,jsx9("button",{type:"button",className:customerButtonClass({block:true}),onClick:()=>void start(),disabled:starting||busy||auth.pending||!siteId,"aria-busy":busy||auth.pending||void 0,children:busy||auth.pending?messages.sessionChecking:fillLabel(messages.signInTitle,{siteName})})]})}function AccountBody({returnTo,initial,onLogin,onLogout,renderSignedIn}){const auth=useCustomerAuth();if(!auth)return jsx9("div",{"aria-busy":"true"});if(auth.user&&renderSignedIn){return jsx9(Fragment3,{children:renderSignedIn(()=>void auth.signOut().then(()=>emitLogout(onLogout)))})}return jsx9("div",{className:"kanorio-account rounded-[var(--site-radius-card,1rem)] border border-[var(--site-border,rgba(0,0,0,0.12))] bg-[var(--site-surface,#ffffff)] p-6",children:jsx9(CustomerAccountPanel,{variant:"panel",auth,initial,returnTo,onSignedIn:grant=>{if(!grant.sessionToken)return;const session={token:grant.sessionToken,contactId:grant.contactId??"",expiresAt:grant.expiresAt??""};onLogin?.(session);window.dispatchEvent(new CustomEvent(LOGIN_EVENT,{detail:session}))},onSignedOut:()=>emitLogout(onLogout)})})}function emitLogout(onLogout){onLogout?.();window.dispatchEvent(new CustomEvent(LOGOUT_EVENT))}function useLatest(value){const ref=useState2(()=>({current:value}))[0];useEffect4(()=>{ref.current=value},[ref,value]);ref.current=value;return ref}export{createBearerCustomerAuthTransport,KanorioAccount};
|
|
3
|
+
//# sourceMappingURL=chunk-UIHBR4NU.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var i=["section","product","form","attachment"],o=[{mime:"image/jpeg",extensions:[".jpg",".jpeg"],kind:"image",purposes:["product","form"]},{mime:"image/png",extensions:[".png"],kind:"image",purposes:["product","form"]},{mime:"image/webp",extensions:[".webp"],kind:"image",purposes:["product","form"]},{mime:"application/pdf",extensions:[".pdf"],kind:"pdf",purposes:["section","blog","product","form","attachment"]},{mime:"application/msword",extensions:[".doc"],kind:"document",purposes:i},{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",extensions:[".docx"],kind:"document",purposes:i,zipMarkers:["[Content_Types].xml","word/"]},{mime:"application/vnd.ms-excel",extensions:[".xls"],kind:"document",purposes:i},{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extensions:[".xlsx"],kind:"document",purposes:i,zipMarkers:["[Content_Types].xml","xl/"]},{mime:"application/vnd.ms-powerpoint",extensions:[".ppt"],kind:"document",purposes:i},{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",extensions:[".pptx"],kind:"document",purposes:i,zipMarkers:["[Content_Types].xml","ppt/"]},{mime:"application/epub+zip",extensions:[".epub"],kind:"ebook",purposes:i,zipMarkers:["mimetype","META-INF/container.xml"]},{mime:"application/zip",extensions:[".zip"],kind:"archive",purposes:["section","product","attachment"]},{mime:"audio/mpeg",extensions:[".mp3"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/mp4",extensions:[".m4a"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/wav",extensions:[".wav"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/ogg",extensions:[".ogg"],kind:"audio",purposes:["section","blog"]},{mime:"audio/aac",extensions:[".aac"],kind:"audio",purposes:["section","blog","product"]},{mime:"audio/flac",extensions:[".flac"],kind:"audio",purposes:["section","blog","product"]},{mime:"video/mp4",extensions:[".mp4"],kind:"video",purposes:["section","blog","product"]},{mime:"video/webm",extensions:[".webm"],kind:"video",purposes:["section","blog","product"]},{mime:"video/quicktime",extensions:[".mov"],kind:"video",purposes:["section","blog","product"]}];function s(e){return o.filter(n=>n.purposes.includes(e))}function t(e){return o.find(n=>n.mime===e)??null}function p(e){return t(e)?.kind??null}function r(e){return t(e)?.extensions[0]??""}export{s as a,p as b,r as c};
|
|
2
|
+
//# sourceMappingURL=chunk-UM74DXPE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function defineTaxIdFormat(definition){return definition}function cleanTaxIdInput(raw){return raw.normalize("NFKC").replace(/\s+/g,"").toUpperCase()}function stripSeparators(value){return value.replace(/[-./]/g,"")}var EU_VAT={AT:{prefix:"AT",pattern:/^ATU\d{8}$/,example:"ATU12345678"},BE:{prefix:"BE",pattern:/^BE[01]\d{9}$/,example:"BE0123456789"},BG:{prefix:"BG",pattern:/^BG\d{9,10}$/,example:"BG123456789"},CY:{prefix:"CY",pattern:/^CY\d{8}[A-Z]$/,example:"CY12345678Z"},CZ:{prefix:"CZ",pattern:/^CZ\d{8,10}$/,example:"CZ12345678"},DE:{prefix:"DE",pattern:/^DE\d{9}$/,example:"DE123456789"},DK:{prefix:"DK",pattern:/^DK\d{8}$/,example:"DK12345678"},EE:{prefix:"EE",pattern:/^EE\d{9}$/,example:"EE123456789"},GR:{prefix:"EL",pattern:/^EL\d{9}$/,example:"EL123456789"},ES:{prefix:"ES",pattern:/^ES[A-Z0-9]\d{7}[A-Z0-9]$/,example:"ESA1234567Z"},FI:{prefix:"FI",pattern:/^FI\d{8}$/,example:"FI12345678"},FR:{prefix:"FR",pattern:/^FR[A-HJ-NP-Z0-9]{2}\d{9}$/,example:"FRAB123456789"},HR:{prefix:"HR",pattern:/^HR\d{11}$/,example:"HR12345678912"},HU:{prefix:"HU",pattern:/^HU\d{8}$/,example:"HU12345678"},IE:{prefix:"IE",pattern:/^IE(\d{7}[A-Z]{1,2}|\d[A-Z+*]\d{5}[A-Z])$/,example:"IE1234567AB"},IT:{prefix:"IT",pattern:/^IT\d{11}$/,example:"IT12345678912"},LT:{prefix:"LT",pattern:/^LT(\d{9}|\d{12})$/,example:"LT123456789"},LU:{prefix:"LU",pattern:/^LU\d{8}$/,example:"LU12345678"},LV:{prefix:"LV",pattern:/^LV\d{11}$/,example:"LV12345678912"},MT:{prefix:"MT",pattern:/^MT\d{8}$/,example:"MT12345678"},NL:{prefix:"NL",pattern:/^NL\d{9}B\d{2}$/,example:"NL123456789B01"},PL:{prefix:"PL",pattern:/^PL\d{10}$/,example:"PL1234567890"},PT:{prefix:"PT",pattern:/^PT\d{9}$/,example:"PT123456789"},RO:{prefix:"RO",pattern:/^RO\d{2,10}$/,example:"RO1234567891"},SE:{prefix:"SE",pattern:/^SE\d{12}$/,example:"SE123456789123"},SI:{prefix:"SI",pattern:/^SI\d{8}$/,example:"SI12345678"},SK:{prefix:"SK",pattern:/^SK\d{10}$/,example:"SK1234567891"}};var EU_VAT_COUNTRIES=Object.keys(EU_VAT);var euVat=defineTaxIdFormat({type:"eu_vat",countries:EU_VAT_COUNTRIES,stripeType:"eu_vat",normalize:(cleaned,country)=>{const value=stripSeparators(cleaned);const rule=EU_VAT[country];return rule&&value&&!value.startsWith(rule.prefix)?`${rule.prefix}${value}`:value},validate:(normalized,country)=>EU_VAT[country]?.pattern.test(normalized)?null:"FORMAT",enforcement:"warn",hasChecksum:false,example:country=>EU_VAT[country]?.example??"",maxLength:20,inputMode:"text"});var hkBr=defineTaxIdFormat({type:"hk_br",countries:["HK"],stripeType:"hk_br",normalize:cleaned=>{const digits=stripSeparators(cleaned);return/^\d{16}$/.test(digits)&&/\D/.test(cleaned)?digits.slice(0,8):digits},validate:normalized=>/^\d{8}$/.test(normalized)?null:"FORMAT",enforcement:"block",hasChecksum:false,example:()=>"12345678",maxLength:24,inputMode:"numeric"});var jpTrn=defineTaxIdFormat({type:"jp_trn",countries:["JP"],stripeType:"jp_trn",normalize:cleaned=>{const value=stripSeparators(cleaned);return/^\d{13}$/.test(value)?`T${value}`:value},validate:normalized=>/^T\d{13}$/.test(normalized)?null:"FORMAT",enforcement:"block",hasChecksum:false,example:()=>"T1234567890123",maxLength:20,inputMode:"text"});var WEIGHTS=[1,3,7,1,3,7,1,3,5];function isValidKrBrn(normalized){if(!/^\d{10}$/.test(normalized))return false;const digits=normalized.split("").map(Number);let sum=0;for(let i=0;i<9;i++)sum+=digits[i]*WEIGHTS[i];sum+=Math.floor(digits[8]*5/10);return(10-sum%10)%10===digits[9]}var krBrn=defineTaxIdFormat({type:"kr_brn",countries:["KR"],stripeType:"kr_brn",normalize:cleaned=>stripSeparators(cleaned),validate:normalized=>!/^\d{10}$/.test(normalized)?"FORMAT":isValidKrBrn(normalized)?null:"CHECKSUM",enforcement:"block",hasChecksum:true,example:()=>"220-81-62517",maxLength:14,inputMode:"numeric"});var myItn=defineTaxIdFormat({type:"my_itn",countries:["MY"],stripeType:"my_itn",normalize:cleaned=>stripSeparators(cleaned),validate:normalized=>/^[A-Z]{1,2}\d{8,11}$/.test(normalized)?null:"FORMAT",enforcement:"warn",hasChecksum:false,example:()=>"C1234567890",maxLength:16,inputMode:"text"});var mySst=defineTaxIdFormat({type:"my_sst",countries:["MY"],stripeType:"my_sst",normalize:cleaned=>stripSeparators(cleaned),validate:normalized=>/^[A-Z]\d{14}$/.test(normalized)?null:"FORMAT",enforcement:"warn",hasChecksum:false,example:()=>"A12-3456-78912345",maxLength:20,inputMode:"text"});var SG_UEN=[/^\d{8}[A-Z]$/,/^(18|19|20)\d{2}\d{5}[A-Z]$/,/^[TSR]\d{2}[A-Z]{2}\d{4}[A-Z]$/];var sgUen=defineTaxIdFormat({type:"sg_uen",countries:["SG"],stripeType:"sg_uen",normalize:cleaned=>stripSeparators(cleaned),validate:normalized=>SG_UEN.some(re=>re.test(normalized))?null:"FORMAT",enforcement:"warn",hasChecksum:false,example:()=>"201912345K",maxLength:12,inputMode:"text"});var WEIGHTS2=[1,2,1,2,1,2,4,1];var sumOfDigits=n=>n<10?n:Math.floor(n/10)+n%10;function isValidTwVat(normalized){if(!/^\d{8}$/.test(normalized))return false;const digits=normalized.split("").map(Number);const total=digits.reduce((acc,d,i)=>acc+sumOfDigits(d*WEIGHTS2[i]),0);return total%5===0||digits[6]===7&&(total+1)%5===0}var twVat=defineTaxIdFormat({type:"tw_vat",countries:["TW"],stripeType:"tw_vat",normalize:cleaned=>stripSeparators(cleaned),validate:normalized=>!/^\d{8}$/.test(normalized)?"FORMAT":isValidTwVat(normalized)?null:"CHECKSUM",enforcement:"block",hasChecksum:true,example:()=>"04595252",maxLength:10,inputMode:"numeric"});var TAX_ID_FORMATS=[twVat,hkBr,jpTrn,krBrn,sgUen,myItn,mySst,euVat];var BY_TYPE=new Map(TAX_ID_FORMATS.map(format=>[format.type,format]));function getTaxIdFormat(type){return BY_TYPE.get(type)}function listTaxIdTypes(country){const code=country.toUpperCase();return TAX_ID_FORMATS.filter(format=>format.countries.includes(code)).map(format=>format.type)}function listTaxIdCountries(){return[...new Set(TAX_ID_FORMATS.flatMap(format=>format.countries))]}function validateTaxIdFormat(input){const country=input.country.toUpperCase();const cleaned=cleanTaxIdInput(input.value);const type=input.type??listTaxIdTypes(country)[0]??null;const format=type?BY_TYPE.get(type):void 0;if(!format||!format.countries.includes(country)){return{ok:false,country,type:null,issue:"UNSUPPORTED",enforcement:"warn",normalized:cleaned}}if(!cleaned)return{ok:false,country,type:format.type,issue:"EMPTY",enforcement:"block",normalized:""};const normalized=format.normalize(cleaned,country);const issue=format.validate(normalized,country);if(issue)return{ok:false,country,type:format.type,issue,enforcement:format.enforcement,normalized};return{ok:true,country,type:format.type,normalized}}function taxIdCountriesOf(field){return field.countries.length>0?field.countries:listTaxIdCountries()}function resolveTaxIdCountry(field,siteCountry){const allowed=taxIdCountriesOf(field);if(field.defaultCountry&&allowed.includes(field.defaultCountry))return field.defaultCountry;const site=siteCountry?.toUpperCase();if(site&&allowed.includes(site))return site;return allowed[0]??""}export{getTaxIdFormat,listTaxIdTypes,validateTaxIdFormat,taxIdCountriesOf,resolveTaxIdCountry};
|
|
2
|
+
//# sourceMappingURL=chunk-VKSYPXNL.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}var clsx_default=clsx;var concatArrays=(array1,array2)=>{const combinedArray=new Array(array1.length+array2.length);for(let i=0;i<array1.length;i++){combinedArray[i]=array1[i]}for(let i=0;i<array2.length;i++){combinedArray[array1.length+i]=array2[i]}return combinedArray};var createClassValidatorObject=(classGroupId,validator)=>({classGroupId,validator});var createClassPartObject=(nextPart=new Map,validators=null,classGroupId)=>({nextPart,validators,classGroupId});var CLASS_PART_SEPARATOR="-";var EMPTY_CONFLICTS=[];var ARBITRARY_PROPERTY_PREFIX="arbitrary..";var createClassGroupUtils=config=>{const classMap=createClassMap(config);const{conflictingClassGroups,conflictingClassGroupModifiers}=config;const getClassGroupId=className=>{if(className.startsWith("[")&&className.endsWith("]")){return getGroupIdForArbitraryProperty(className)}const classParts=className.split(CLASS_PART_SEPARATOR);const startIndex=classParts[0]===""&&classParts.length>1?1:0;return getGroupRecursive(classParts,startIndex,classMap)};const getConflictingClassGroupIds=(classGroupId,hasPostfixModifier)=>{if(hasPostfixModifier){const modifierConflicts=conflictingClassGroupModifiers[classGroupId];const baseConflicts=conflictingClassGroups[classGroupId];if(modifierConflicts){if(baseConflicts){return concatArrays(baseConflicts,modifierConflicts)}return modifierConflicts}return baseConflicts||EMPTY_CONFLICTS}return conflictingClassGroups[classGroupId]||EMPTY_CONFLICTS};return{getClassGroupId,getConflictingClassGroupIds}};var getGroupRecursive=(classParts,startIndex,classPartObject)=>{const classPathsLength=classParts.length-startIndex;if(classPathsLength===0){return classPartObject.classGroupId}const currentClassPart=classParts[startIndex];const nextClassPartObject=classPartObject.nextPart.get(currentClassPart);if(nextClassPartObject){const result=getGroupRecursive(classParts,startIndex+1,nextClassPartObject);if(result)return result}const validators=classPartObject.validators;if(validators===null){return void 0}const classRest=startIndex===0?classParts.join(CLASS_PART_SEPARATOR):classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);const validatorsLength=validators.length;for(let i=0;i<validatorsLength;i++){const validatorObj=validators[i];if(validatorObj.validator(classRest)){return validatorObj.classGroupId}}return void 0};var getGroupIdForArbitraryProperty=className=>className.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const content=className.slice(1,-1);const colonIndex=content.indexOf(":");const property=content.slice(0,colonIndex);return property?ARBITRARY_PROPERTY_PREFIX+property:void 0})();var createClassMap=config=>{const{theme,classGroups}=config;return processClassGroups(classGroups,theme)};var processClassGroups=(classGroups,theme)=>{const classMap=createClassPartObject();for(const classGroupId in classGroups){const group=classGroups[classGroupId];processClassesRecursively(group,classMap,classGroupId,theme)}return classMap};var processClassesRecursively=(classGroup,classPartObject,classGroupId,theme)=>{const len=classGroup.length;for(let i=0;i<len;i++){const classDefinition=classGroup[i];processClassDefinition(classDefinition,classPartObject,classGroupId,theme)}};var processClassDefinition=(classDefinition,classPartObject,classGroupId,theme)=>{if(typeof classDefinition==="string"){processStringDefinition(classDefinition,classPartObject,classGroupId);return}if(typeof classDefinition==="function"){processFunctionDefinition(classDefinition,classPartObject,classGroupId,theme);return}processObjectDefinition(classDefinition,classPartObject,classGroupId,theme)};var processStringDefinition=(classDefinition,classPartObject,classGroupId)=>{const classPartObjectToEdit=classDefinition===""?classPartObject:getPart(classPartObject,classDefinition);classPartObjectToEdit.classGroupId=classGroupId};var processFunctionDefinition=(classDefinition,classPartObject,classGroupId,theme)=>{if(isThemeGetter(classDefinition)){processClassesRecursively(classDefinition(theme),classPartObject,classGroupId,theme);return}if(classPartObject.validators===null){classPartObject.validators=[]}classPartObject.validators.push(createClassValidatorObject(classGroupId,classDefinition))};var processObjectDefinition=(classDefinition,classPartObject,classGroupId,theme)=>{const entries=Object.entries(classDefinition);const len=entries.length;for(let i=0;i<len;i++){const[key,value]=entries[i];processClassesRecursively(value,getPart(classPartObject,key),classGroupId,theme)}};var getPart=(classPartObject,path)=>{let current=classPartObject;const parts=path.split(CLASS_PART_SEPARATOR);const len=parts.length;for(let i=0;i<len;i++){const part=parts[i];let next=current.nextPart.get(part);if(!next){next=createClassPartObject();current.nextPart.set(part,next)}current=next}return current};var isThemeGetter=func=>"isThemeGetter"in func&&func.isThemeGetter===true;var createLruCache=maxCacheSize=>{if(maxCacheSize<1){return{get:()=>void 0,set:()=>{}}}let cacheSize=0;let cache=Object.create(null);let previousCache=Object.create(null);const update=(key,value)=>{cache[key]=value;cacheSize++;if(cacheSize>maxCacheSize){cacheSize=0;previousCache=cache;cache=Object.create(null)}};return{get(key){let value=cache[key];if(value!==void 0){return value}if((value=previousCache[key])!==void 0){update(key,value);return value}},set(key,value){if(key in cache){cache[key]=value}else{update(key,value)}}}};var IMPORTANT_MODIFIER="!";var MODIFIER_SEPARATOR=":";var EMPTY_MODIFIERS=[];var createResultObject=(modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition,isExternal)=>({modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition,isExternal});var createParseClassName=config=>{const{prefix,experimentalParseClassName}=config;let parseClassName=className=>{const modifiers=[];let bracketDepth=0;let parenDepth=0;let modifierStart=0;let postfixModifierPosition;const len=className.length;for(let index=0;index<len;index++){const currentCharacter=className[index];if(bracketDepth===0&&parenDepth===0){if(currentCharacter===MODIFIER_SEPARATOR){modifiers.push(className.slice(modifierStart,index));modifierStart=index+1;continue}if(currentCharacter==="/"){postfixModifierPosition=index;continue}}if(currentCharacter==="[")bracketDepth++;else if(currentCharacter==="]")bracketDepth--;else if(currentCharacter==="(")parenDepth++;else if(currentCharacter===")")parenDepth--}const baseClassNameWithImportantModifier=modifiers.length===0?className:className.slice(modifierStart);let baseClassName=baseClassNameWithImportantModifier;let hasImportantModifier=false;if(baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)){baseClassName=baseClassNameWithImportantModifier.slice(0,-1);hasImportantModifier=true}else if(baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)){baseClassName=baseClassNameWithImportantModifier.slice(1);hasImportantModifier=true}const maybePostfixModifierPosition=postfixModifierPosition&&postfixModifierPosition>modifierStart?postfixModifierPosition-modifierStart:void 0;return createResultObject(modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition)};if(prefix){const fullPrefix=prefix+MODIFIER_SEPARATOR;const parseClassNameOriginal=parseClassName;parseClassName=className=>className.startsWith(fullPrefix)?parseClassNameOriginal(className.slice(fullPrefix.length)):createResultObject(EMPTY_MODIFIERS,false,className,void 0,true)}if(experimentalParseClassName){const parseClassNameOriginal=parseClassName;parseClassName=className=>experimentalParseClassName({className,parseClassName:parseClassNameOriginal})}return parseClassName};var createSortModifiers=config=>{const modifierWeights=new Map;config.orderSensitiveModifiers.forEach((mod,index)=>{modifierWeights.set(mod,1e6+index)});return modifiers=>{const result=[];let currentSegment=[];for(let i=0;i<modifiers.length;i++){const modifier=modifiers[i];const isArbitrary=modifier[0]==="[";const isOrderSensitive=modifierWeights.has(modifier);if(isArbitrary||isOrderSensitive){if(currentSegment.length>0){currentSegment.sort();result.push(...currentSegment);currentSegment=[]}result.push(modifier)}else{currentSegment.push(modifier)}}if(currentSegment.length>0){currentSegment.sort();result.push(...currentSegment)}return result}};var createConfigUtils=config=>({cache:createLruCache(config.cacheSize),parseClassName:createParseClassName(config),sortModifiers:createSortModifiers(config),...createClassGroupUtils(config)});var SPLIT_CLASSES_REGEX=/\s+/;var mergeClassList=(classList,configUtils)=>{const{parseClassName,getClassGroupId,getConflictingClassGroupIds,sortModifiers}=configUtils;const classGroupsInConflict=[];const classNames=classList.trim().split(SPLIT_CLASSES_REGEX);let result="";for(let index=classNames.length-1;index>=0;index-=1){const originalClassName=classNames[index];const{isExternal,modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}=parseClassName(originalClassName);if(isExternal){result=originalClassName+(result.length>0?" "+result:result);continue}let hasPostfixModifier=!!maybePostfixModifierPosition;let classGroupId=getClassGroupId(hasPostfixModifier?baseClassName.substring(0,maybePostfixModifierPosition):baseClassName);if(!classGroupId){if(!hasPostfixModifier){result=originalClassName+(result.length>0?" "+result:result);continue}classGroupId=getClassGroupId(baseClassName);if(!classGroupId){result=originalClassName+(result.length>0?" "+result:result);continue}hasPostfixModifier=false}const variantModifier=modifiers.length===0?"":modifiers.length===1?modifiers[0]:sortModifiers(modifiers).join(":");const modifierId=hasImportantModifier?variantModifier+IMPORTANT_MODIFIER:variantModifier;const classId=modifierId+classGroupId;if(classGroupsInConflict.indexOf(classId)>-1){continue}classGroupsInConflict.push(classId);const conflictGroups=getConflictingClassGroupIds(classGroupId,hasPostfixModifier);for(let i=0;i<conflictGroups.length;++i){const group=conflictGroups[i];classGroupsInConflict.push(modifierId+group)}result=originalClassName+(result.length>0?" "+result:result)}return result};var twJoin=(...classLists)=>{let index=0;let argument;let resolvedValue;let string="";while(index<classLists.length){if(argument=classLists[index++]){if(resolvedValue=toValue(argument)){string&&(string+=" ");string+=resolvedValue}}}return string};var toValue=mix=>{if(typeof mix==="string"){return mix}let resolvedValue;let string="";for(let k=0;k<mix.length;k++){if(mix[k]){if(resolvedValue=toValue(mix[k])){string&&(string+=" ");string+=resolvedValue}}}return string};var createTailwindMerge=(createConfigFirst,...createConfigRest)=>{let configUtils;let cacheGet;let cacheSet;let functionToCall;const initTailwindMerge=classList=>{const config=createConfigRest.reduce((previousConfig,createConfigCurrent)=>createConfigCurrent(previousConfig),createConfigFirst());configUtils=createConfigUtils(config);cacheGet=configUtils.cache.get;cacheSet=configUtils.cache.set;functionToCall=tailwindMerge;return tailwindMerge(classList)};const tailwindMerge=classList=>{const cachedResult=cacheGet(classList);if(cachedResult){return cachedResult}const result=mergeClassList(classList,configUtils);cacheSet(classList,result);return result};functionToCall=initTailwindMerge;return(...args)=>functionToCall(twJoin(...args))};var fallbackThemeArr=[];var fromTheme=key=>{const themeGetter=theme=>theme[key]||fallbackThemeArr;themeGetter.isThemeGetter=true;return themeGetter};var arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i;var arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i;var fractionRegex=/^\d+\/\d+$/;var tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;var lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;var colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;var shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;var imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;var isFraction=value=>fractionRegex.test(value);var isNumber=value=>!!value&&!Number.isNaN(Number(value));var isInteger=value=>!!value&&Number.isInteger(Number(value));var isPercent=value=>value.endsWith("%")&&isNumber(value.slice(0,-1));var isTshirtSize=value=>tshirtUnitRegex.test(value);var isAny=()=>true;var isLengthOnly=value=>lengthUnitRegex.test(value)&&!colorFunctionRegex.test(value);var isNever=()=>false;var isShadow=value=>shadowRegex.test(value);var isImage=value=>imageRegex.test(value);var isAnyNonArbitrary=value=>!isArbitraryValue(value)&&!isArbitraryVariable(value);var isArbitrarySize=value=>getIsArbitraryValue(value,isLabelSize,isNever);var isArbitraryValue=value=>arbitraryValueRegex.test(value);var isArbitraryLength=value=>getIsArbitraryValue(value,isLabelLength,isLengthOnly);var isArbitraryNumber=value=>getIsArbitraryValue(value,isLabelNumber,isNumber);var isArbitraryPosition=value=>getIsArbitraryValue(value,isLabelPosition,isNever);var isArbitraryImage=value=>getIsArbitraryValue(value,isLabelImage,isImage);var isArbitraryShadow=value=>getIsArbitraryValue(value,isLabelShadow,isShadow);var isArbitraryVariable=value=>arbitraryVariableRegex.test(value);var isArbitraryVariableLength=value=>getIsArbitraryVariable(value,isLabelLength);var isArbitraryVariableFamilyName=value=>getIsArbitraryVariable(value,isLabelFamilyName);var isArbitraryVariablePosition=value=>getIsArbitraryVariable(value,isLabelPosition);var isArbitraryVariableSize=value=>getIsArbitraryVariable(value,isLabelSize);var isArbitraryVariableImage=value=>getIsArbitraryVariable(value,isLabelImage);var isArbitraryVariableShadow=value=>getIsArbitraryVariable(value,isLabelShadow,true);var getIsArbitraryValue=(value,testLabel,testValue)=>{const result=arbitraryValueRegex.exec(value);if(result){if(result[1]){return testLabel(result[1])}return testValue(result[2])}return false};var getIsArbitraryVariable=(value,testLabel,shouldMatchNoLabel=false)=>{const result=arbitraryVariableRegex.exec(value);if(result){if(result[1]){return testLabel(result[1])}return shouldMatchNoLabel}return false};var isLabelPosition=label=>label==="position"||label==="percentage";var isLabelImage=label=>label==="image"||label==="url";var isLabelSize=label=>label==="length"||label==="size"||label==="bg-size";var isLabelLength=label=>label==="length";var isLabelNumber=label=>label==="number";var isLabelFamilyName=label=>label==="family-name";var isLabelShadow=label=>label==="shadow";var getDefaultConfig=()=>{const themeColor=fromTheme("color");const themeFont=fromTheme("font");const themeText=fromTheme("text");const themeFontWeight=fromTheme("font-weight");const themeTracking=fromTheme("tracking");const themeLeading=fromTheme("leading");const themeBreakpoint=fromTheme("breakpoint");const themeContainer=fromTheme("container");const themeSpacing=fromTheme("spacing");const themeRadius=fromTheme("radius");const themeShadow=fromTheme("shadow");const themeInsetShadow=fromTheme("inset-shadow");const themeTextShadow=fromTheme("text-shadow");const themeDropShadow=fromTheme("drop-shadow");const themeBlur=fromTheme("blur");const themePerspective=fromTheme("perspective");const themeAspect=fromTheme("aspect");const themeEase=fromTheme("ease");const themeAnimate=fromTheme("animate");const scaleBreak=()=>["auto","avoid","all","avoid-page","page","left","right","column"];const scalePosition=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"];const scalePositionWithArbitrary=()=>[...scalePosition(),isArbitraryVariable,isArbitraryValue];const scaleOverflow=()=>["auto","hidden","clip","visible","scroll"];const scaleOverscroll=()=>["auto","contain","none"];const scaleUnambiguousSpacing=()=>[isArbitraryVariable,isArbitraryValue,themeSpacing];const scaleInset=()=>[isFraction,"full","auto",...scaleUnambiguousSpacing()];const scaleGridTemplateColsRows=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue];const scaleGridColRowStartAndEnd=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue];const scaleGridColRowStartOrEnd=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue];const scaleGridAutoColsRows=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue];const scaleAlignPrimaryAxis=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"];const scaleAlignSecondaryAxis=()=>["start","end","center","stretch","center-safe","end-safe"];const scaleMargin=()=>["auto",...scaleUnambiguousSpacing()];const scaleSizing=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...scaleUnambiguousSpacing()];const scaleColor=()=>[themeColor,isArbitraryVariable,isArbitraryValue];const scaleBgPosition=()=>[...scalePosition(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}];const scaleBgRepeat=()=>["no-repeat",{repeat:["","x","y","space","round"]}];const scaleBgSize=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}];const scaleGradientStopPosition=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength];const scaleRadius=()=>["","none","full",themeRadius,isArbitraryVariable,isArbitraryValue];const scaleBorderWidth=()=>["",isNumber,isArbitraryVariableLength,isArbitraryLength];const scaleLineStyle=()=>["solid","dashed","dotted","double"];const scaleBlendMode=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];const scaleMaskImagePosition=()=>[isNumber,isPercent,isArbitraryVariablePosition,isArbitraryPosition];const scaleBlur=()=>["","none",themeBlur,isArbitraryVariable,isArbitraryValue];const scaleRotate=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue];const scaleScale=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue];const scaleSkew=()=>[isNumber,isArbitraryVariable,isArbitraryValue];const scaleTranslate=()=>[isFraction,"full",...scaleUnambiguousSpacing()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,themeAspect]}],container:["container"],columns:[{columns:[isNumber,isArbitraryValue,isArbitraryVariable,themeContainer]}],"break-after":[{"break-after":scaleBreak()}],"break-before":[{"break-before":scaleBreak()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:scalePositionWithArbitrary()}],overflow:[{overflow:scaleOverflow()}],"overflow-x":[{"overflow-x":scaleOverflow()}],"overflow-y":[{"overflow-y":scaleOverflow()}],overscroll:[{overscroll:scaleOverscroll()}],"overscroll-x":[{"overscroll-x":scaleOverscroll()}],"overscroll-y":[{"overscroll-y":scaleOverscroll()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:scaleInset()}],"inset-x":[{"inset-x":scaleInset()}],"inset-y":[{"inset-y":scaleInset()}],start:[{start:scaleInset()}],end:[{end:scaleInset()}],top:[{top:scaleInset()}],right:[{right:scaleInset()}],bottom:[{bottom:scaleInset()}],left:[{left:scaleInset()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",themeContainer,...scaleUnambiguousSpacing()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":scaleGridTemplateColsRows()}],"col-start-end":[{col:scaleGridColRowStartAndEnd()}],"col-start":[{"col-start":scaleGridColRowStartOrEnd()}],"col-end":[{"col-end":scaleGridColRowStartOrEnd()}],"grid-rows":[{"grid-rows":scaleGridTemplateColsRows()}],"row-start-end":[{row:scaleGridColRowStartAndEnd()}],"row-start":[{"row-start":scaleGridColRowStartOrEnd()}],"row-end":[{"row-end":scaleGridColRowStartOrEnd()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":scaleGridAutoColsRows()}],"auto-rows":[{"auto-rows":scaleGridAutoColsRows()}],gap:[{gap:scaleUnambiguousSpacing()}],"gap-x":[{"gap-x":scaleUnambiguousSpacing()}],"gap-y":[{"gap-y":scaleUnambiguousSpacing()}],"justify-content":[{justify:[...scaleAlignPrimaryAxis(),"normal"]}],"justify-items":[{"justify-items":[...scaleAlignSecondaryAxis(),"normal"]}],"justify-self":[{"justify-self":["auto",...scaleAlignSecondaryAxis()]}],"align-content":[{content:["normal",...scaleAlignPrimaryAxis()]}],"align-items":[{items:[...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"place-content":[{"place-content":scaleAlignPrimaryAxis()}],"place-items":[{"place-items":[...scaleAlignSecondaryAxis(),"baseline"]}],"place-self":[{"place-self":["auto",...scaleAlignSecondaryAxis()]}],p:[{p:scaleUnambiguousSpacing()}],px:[{px:scaleUnambiguousSpacing()}],py:[{py:scaleUnambiguousSpacing()}],ps:[{ps:scaleUnambiguousSpacing()}],pe:[{pe:scaleUnambiguousSpacing()}],pt:[{pt:scaleUnambiguousSpacing()}],pr:[{pr:scaleUnambiguousSpacing()}],pb:[{pb:scaleUnambiguousSpacing()}],pl:[{pl:scaleUnambiguousSpacing()}],m:[{m:scaleMargin()}],mx:[{mx:scaleMargin()}],my:[{my:scaleMargin()}],ms:[{ms:scaleMargin()}],me:[{me:scaleMargin()}],mt:[{mt:scaleMargin()}],mr:[{mr:scaleMargin()}],mb:[{mb:scaleMargin()}],ml:[{ml:scaleMargin()}],"space-x":[{"space-x":scaleUnambiguousSpacing()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":scaleUnambiguousSpacing()}],"space-y-reverse":["space-y-reverse"],size:[{size:scaleSizing()}],w:[{w:[themeContainer,"screen",...scaleSizing()]}],"min-w":[{"min-w":[themeContainer,"screen","none",...scaleSizing()]}],"max-w":[{"max-w":[themeContainer,"screen","none","prose",{screen:[themeBreakpoint]},...scaleSizing()]}],h:[{h:["screen","lh",...scaleSizing()]}],"min-h":[{"min-h":["screen","lh","none",...scaleSizing()]}],"max-h":[{"max-h":["screen","lh",...scaleSizing()]}],"font-size":[{text:["base",themeText,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[themeFontWeight,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,themeFont]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[themeTracking,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[themeLeading,...scaleUnambiguousSpacing()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:scaleColor()}],"text-color":[{text:scaleColor()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...scaleLineStyle(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:scaleColor()}],"underline-offset":[{"underline-offset":[isNumber,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:scaleUnambiguousSpacing()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:scaleBgPosition()}],"bg-repeat":[{bg:scaleBgRepeat()}],"bg-size":[{bg:scaleBgSize()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:scaleColor()}],"gradient-from-pos":[{from:scaleGradientStopPosition()}],"gradient-via-pos":[{via:scaleGradientStopPosition()}],"gradient-to-pos":[{to:scaleGradientStopPosition()}],"gradient-from":[{from:scaleColor()}],"gradient-via":[{via:scaleColor()}],"gradient-to":[{to:scaleColor()}],rounded:[{rounded:scaleRadius()}],"rounded-s":[{"rounded-s":scaleRadius()}],"rounded-e":[{"rounded-e":scaleRadius()}],"rounded-t":[{"rounded-t":scaleRadius()}],"rounded-r":[{"rounded-r":scaleRadius()}],"rounded-b":[{"rounded-b":scaleRadius()}],"rounded-l":[{"rounded-l":scaleRadius()}],"rounded-ss":[{"rounded-ss":scaleRadius()}],"rounded-se":[{"rounded-se":scaleRadius()}],"rounded-ee":[{"rounded-ee":scaleRadius()}],"rounded-es":[{"rounded-es":scaleRadius()}],"rounded-tl":[{"rounded-tl":scaleRadius()}],"rounded-tr":[{"rounded-tr":scaleRadius()}],"rounded-br":[{"rounded-br":scaleRadius()}],"rounded-bl":[{"rounded-bl":scaleRadius()}],"border-w":[{border:scaleBorderWidth()}],"border-w-x":[{"border-x":scaleBorderWidth()}],"border-w-y":[{"border-y":scaleBorderWidth()}],"border-w-s":[{"border-s":scaleBorderWidth()}],"border-w-e":[{"border-e":scaleBorderWidth()}],"border-w-t":[{"border-t":scaleBorderWidth()}],"border-w-r":[{"border-r":scaleBorderWidth()}],"border-w-b":[{"border-b":scaleBorderWidth()}],"border-w-l":[{"border-l":scaleBorderWidth()}],"divide-x":[{"divide-x":scaleBorderWidth()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":scaleBorderWidth()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...scaleLineStyle(),"hidden","none"]}],"divide-style":[{divide:[...scaleLineStyle(),"hidden","none"]}],"border-color":[{border:scaleColor()}],"border-color-x":[{"border-x":scaleColor()}],"border-color-y":[{"border-y":scaleColor()}],"border-color-s":[{"border-s":scaleColor()}],"border-color-e":[{"border-e":scaleColor()}],"border-color-t":[{"border-t":scaleColor()}],"border-color-r":[{"border-r":scaleColor()}],"border-color-b":[{"border-b":scaleColor()}],"border-color-l":[{"border-l":scaleColor()}],"divide-color":[{divide:scaleColor()}],"outline-style":[{outline:[...scaleLineStyle(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:scaleColor()}],shadow:[{shadow:["","none",themeShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:scaleColor()}],"inset-shadow":[{"inset-shadow":["none",themeInsetShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":scaleColor()}],"ring-w":[{ring:scaleBorderWidth()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:scaleColor()}],"ring-offset-w":[{"ring-offset":[isNumber,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":scaleColor()}],"inset-ring-w":[{"inset-ring":scaleBorderWidth()}],"inset-ring-color":[{"inset-ring":scaleColor()}],"text-shadow":[{"text-shadow":["none",themeTextShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":scaleColor()}],opacity:[{opacity:[isNumber,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...scaleBlendMode(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":scaleBlendMode()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber]}],"mask-image-linear-from-pos":[{"mask-linear-from":scaleMaskImagePosition()}],"mask-image-linear-to-pos":[{"mask-linear-to":scaleMaskImagePosition()}],"mask-image-linear-from-color":[{"mask-linear-from":scaleColor()}],"mask-image-linear-to-color":[{"mask-linear-to":scaleColor()}],"mask-image-t-from-pos":[{"mask-t-from":scaleMaskImagePosition()}],"mask-image-t-to-pos":[{"mask-t-to":scaleMaskImagePosition()}],"mask-image-t-from-color":[{"mask-t-from":scaleColor()}],"mask-image-t-to-color":[{"mask-t-to":scaleColor()}],"mask-image-r-from-pos":[{"mask-r-from":scaleMaskImagePosition()}],"mask-image-r-to-pos":[{"mask-r-to":scaleMaskImagePosition()}],"mask-image-r-from-color":[{"mask-r-from":scaleColor()}],"mask-image-r-to-color":[{"mask-r-to":scaleColor()}],"mask-image-b-from-pos":[{"mask-b-from":scaleMaskImagePosition()}],"mask-image-b-to-pos":[{"mask-b-to":scaleMaskImagePosition()}],"mask-image-b-from-color":[{"mask-b-from":scaleColor()}],"mask-image-b-to-color":[{"mask-b-to":scaleColor()}],"mask-image-l-from-pos":[{"mask-l-from":scaleMaskImagePosition()}],"mask-image-l-to-pos":[{"mask-l-to":scaleMaskImagePosition()}],"mask-image-l-from-color":[{"mask-l-from":scaleColor()}],"mask-image-l-to-color":[{"mask-l-to":scaleColor()}],"mask-image-x-from-pos":[{"mask-x-from":scaleMaskImagePosition()}],"mask-image-x-to-pos":[{"mask-x-to":scaleMaskImagePosition()}],"mask-image-x-from-color":[{"mask-x-from":scaleColor()}],"mask-image-x-to-color":[{"mask-x-to":scaleColor()}],"mask-image-y-from-pos":[{"mask-y-from":scaleMaskImagePosition()}],"mask-image-y-to-pos":[{"mask-y-to":scaleMaskImagePosition()}],"mask-image-y-from-color":[{"mask-y-from":scaleColor()}],"mask-image-y-to-color":[{"mask-y-to":scaleColor()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":scaleMaskImagePosition()}],"mask-image-radial-to-pos":[{"mask-radial-to":scaleMaskImagePosition()}],"mask-image-radial-from-color":[{"mask-radial-from":scaleColor()}],"mask-image-radial-to-color":[{"mask-radial-to":scaleColor()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":scalePosition()}],"mask-image-conic-pos":[{"mask-conic":[isNumber]}],"mask-image-conic-from-pos":[{"mask-conic-from":scaleMaskImagePosition()}],"mask-image-conic-to-pos":[{"mask-conic-to":scaleMaskImagePosition()}],"mask-image-conic-from-color":[{"mask-conic-from":scaleColor()}],"mask-image-conic-to-color":[{"mask-conic-to":scaleColor()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:scaleBgPosition()}],"mask-repeat":[{mask:scaleBgRepeat()}],"mask-size":[{mask:scaleBgSize()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:scaleBlur()}],brightness:[{brightness:[isNumber,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",themeDropShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":scaleColor()}],grayscale:[{grayscale:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":scaleBlur()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":scaleUnambiguousSpacing()}],"border-spacing-x":[{"border-spacing-x":scaleUnambiguousSpacing()}],"border-spacing-y":[{"border-spacing-y":scaleUnambiguousSpacing()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",themeEase,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",themeAnimate,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[themePerspective,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":scalePositionWithArbitrary()}],rotate:[{rotate:scaleRotate()}],"rotate-x":[{"rotate-x":scaleRotate()}],"rotate-y":[{"rotate-y":scaleRotate()}],"rotate-z":[{"rotate-z":scaleRotate()}],scale:[{scale:scaleScale()}],"scale-x":[{"scale-x":scaleScale()}],"scale-y":[{"scale-y":scaleScale()}],"scale-z":[{"scale-z":scaleScale()}],"scale-3d":["scale-3d"],skew:[{skew:scaleSkew()}],"skew-x":[{"skew-x":scaleSkew()}],"skew-y":[{"skew-y":scaleSkew()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:scalePositionWithArbitrary()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:scaleTranslate()}],"translate-x":[{"translate-x":scaleTranslate()}],"translate-y":[{"translate-y":scaleTranslate()}],"translate-z":[{"translate-z":scaleTranslate()}],"translate-none":["translate-none"],accent:[{accent:scaleColor()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:scaleColor()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":scaleUnambiguousSpacing()}],"scroll-mx":[{"scroll-mx":scaleUnambiguousSpacing()}],"scroll-my":[{"scroll-my":scaleUnambiguousSpacing()}],"scroll-ms":[{"scroll-ms":scaleUnambiguousSpacing()}],"scroll-me":[{"scroll-me":scaleUnambiguousSpacing()}],"scroll-mt":[{"scroll-mt":scaleUnambiguousSpacing()}],"scroll-mr":[{"scroll-mr":scaleUnambiguousSpacing()}],"scroll-mb":[{"scroll-mb":scaleUnambiguousSpacing()}],"scroll-ml":[{"scroll-ml":scaleUnambiguousSpacing()}],"scroll-p":[{"scroll-p":scaleUnambiguousSpacing()}],"scroll-px":[{"scroll-px":scaleUnambiguousSpacing()}],"scroll-py":[{"scroll-py":scaleUnambiguousSpacing()}],"scroll-ps":[{"scroll-ps":scaleUnambiguousSpacing()}],"scroll-pe":[{"scroll-pe":scaleUnambiguousSpacing()}],"scroll-pt":[{"scroll-pt":scaleUnambiguousSpacing()}],"scroll-pr":[{"scroll-pr":scaleUnambiguousSpacing()}],"scroll-pb":[{"scroll-pb":scaleUnambiguousSpacing()}],"scroll-pl":[{"scroll-pl":scaleUnambiguousSpacing()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...scaleColor()]}],"stroke-w":[{stroke:[isNumber,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...scaleColor()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var mergeConfigs=(baseConfig,{cacheSize,prefix,experimentalParseClassName,extend={},override={}})=>{overrideProperty(baseConfig,"cacheSize",cacheSize);overrideProperty(baseConfig,"prefix",prefix);overrideProperty(baseConfig,"experimentalParseClassName",experimentalParseClassName);overrideConfigProperties(baseConfig.theme,override.theme);overrideConfigProperties(baseConfig.classGroups,override.classGroups);overrideConfigProperties(baseConfig.conflictingClassGroups,override.conflictingClassGroups);overrideConfigProperties(baseConfig.conflictingClassGroupModifiers,override.conflictingClassGroupModifiers);overrideProperty(baseConfig,"orderSensitiveModifiers",override.orderSensitiveModifiers);mergeConfigProperties(baseConfig.theme,extend.theme);mergeConfigProperties(baseConfig.classGroups,extend.classGroups);mergeConfigProperties(baseConfig.conflictingClassGroups,extend.conflictingClassGroups);mergeConfigProperties(baseConfig.conflictingClassGroupModifiers,extend.conflictingClassGroupModifiers);mergeArrayProperties(baseConfig,extend,"orderSensitiveModifiers");return baseConfig};var overrideProperty=(baseObject,overrideKey,overrideValue)=>{if(overrideValue!==void 0){baseObject[overrideKey]=overrideValue}};var overrideConfigProperties=(baseObject,overrideObject)=>{if(overrideObject){for(const key in overrideObject){overrideProperty(baseObject,key,overrideObject[key])}}};var mergeConfigProperties=(baseObject,mergeObject)=>{if(mergeObject){for(const key in mergeObject){mergeArrayProperties(baseObject,mergeObject,key)}}};var mergeArrayProperties=(baseObject,mergeObject,key)=>{const mergeValue=mergeObject[key];if(mergeValue!==void 0){baseObject[key]=baseObject[key]?baseObject[key].concat(mergeValue):mergeValue}};var extendTailwindMerge=(configExtension,...createConfig)=>typeof configExtension==="function"?createTailwindMerge(getDefaultConfig,configExtension,...createConfig):createTailwindMerge(()=>mergeConfigs(getDefaultConfig(),configExtension),...createConfig);var APP_TOKEN_TEXT_SIZES=["micro","caption","small","body","input","input-sm","title","lead","heading","page-title","display"];var APP_TOKEN_RADII=["check","control","inner","card","panel"];var twMerge=extendTailwindMerge({extend:{theme:{text:[...APP_TOKEN_TEXT_SIZES],radius:[...APP_TOKEN_RADII]}}});function cn(...inputs){return twMerge(clsx(inputs))}export{clsx,clsx_default,cn};
|
|
2
|
+
//# sourceMappingURL=chunk-VUTODQFX.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as h}from"./chunk-NSY72ZYX.js";import{a as d}from"./chunk-6LGTFWQS.js";import{c}from"./chunk-CDG7S4P5.js";var i=c(d()),y=100;function H({onKeyDown:e,onCompositionStart:t,onCompositionEnd:o}={}){let n=(0,i.useRef)(!1),r=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let s=(0,i.useCallback)(u=>u.nativeEvent.isComposing||u.keyCode===229||n.current,[]),m=(0,i.useCallback)(u=>{n.current=!0,r.current&&clearTimeout(r.current),t?.(u)},[t]),v=(0,i.useCallback)(u=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current=!1},y),o?.(u)},[o]),C=(0,i.useCallback)(u=>{u.key==="Enter"&&s(u)||e?.(u)},[e,s]);return{props:{onKeyDown:e?C:void 0,onCompositionStart:m,onCompositionEnd:v},isComposing:s}}var a=c(d()),E=c(h()),l=[],p=new WeakSet,f=!1;function g(e){if(e instanceof HTMLInputElement){if(e.type==="radio")return e.checked&&!e.defaultChecked;if(e.type==="checkbox")return e.checked!==e.defaultChecked;if(e.type==="file"||e.type==="hidden")return!1}return e.value!==e.defaultValue}function b({el:e,value:t,checked:o}){return new Proxy(e,{get(n,r){if(r==="value")return t;if(r==="checked")return o;let s=Reflect.get(n,r,n);return typeof s=="function"?s.bind(n):s}})}function T(e){let t=b(e);return{target:t,currentTarget:t,type:"change",nativeEvent:new Event("change",{bubbles:!0}),bubbles:!0,cancelable:!1,defaultPrevented:!1,isTrusted:!1,timeStamp:Date.now(),preventDefault(){},stopPropagation(){},isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist(){}}}function k(){f=!1;let e=document.activeElement,t=l.splice(0).sort((o,n)=>+(n.el===e)-+(o.el===e));for(let o of t){if(!o.el.isConnected)continue;let n=o.handler();if(n)try{(0,E.flushSync)(()=>n(T(o)))}catch(r){typeof reportError=="function"?reportError(r):console.error(r)}}}function x(e,t){let o=(0,a.useRef)(t);(0,a.useLayoutEffect)(()=>{o.current=t}),(0,a.useLayoutEffect)(()=>{let n=e.current;!n||p.has(n)||!g(n)||(p.add(n),l.push({el:n,value:n.value,checked:n instanceof HTMLInputElement?n.checked:!1,handler:()=>o.current}))},[]),(0,a.useEffect)(()=>{f||l.length===0||(f=!0,queueMicrotask(k))},[])}function w(e){let t=(0,a.useRef)(null),o=(0,a.useCallback)(n=>{t.current=n,typeof e=="function"?e(n):e&&(e.current=n)},[e]);return{ref:t,setRef:o}}export{H as a,x as b,w as c};
|
|
2
|
+
//# sourceMappingURL=chunk-VYSRVTYI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CONTROL_PLACEHOLDER_CLASS,CONTROL_RING_OFFSET_CLASS,controlClassName}from"./chunk-RG5JA44V.js";import{useAdoptTypedOnMount,useComposingEnterGuard,useControlRef}from"./chunk-C7HUM2EN.js";import{cn}from"./chunk-VUTODQFX.js";import*as React from"react";import{jsx}from"react/jsx-runtime";var INPUT_LAYOUT=cn("flex h-11 w-full rounded-md border px-3 py-2 text-[length:var(--site-input-text,16px)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",CONTROL_RING_OFFSET_CLASS,CONTROL_PLACEHOLDER_CLASS);var Input=React.forwardRef(({className,type,onKeyDown,onCompositionStart,onCompositionEnd,...props},ref)=>{const hasError=props["aria-invalid"]===true;const ime=useComposingEnterGuard({onKeyDown,onCompositionStart,onCompositionEnd});const control=useControlRef(ref);useAdoptTypedOnMount(control.ref,props.onChange);const getSecurityAttributes=()=>{const attrs={};if(type==="email"){attrs.autoComplete="email"}else if(type==="tel"||type==="phone"){attrs.autoComplete="tel"}else if(type==="password"){attrs.autoComplete="current-password"}else if(props.name==="name"||props.name==="username"){attrs.autoComplete="name"}if(type==="password"||type==="email"||type==="tel"){attrs.spellCheck=false}else{attrs.spellCheck=type==="text"||type==="search"||!type}if(type==="tel"){attrs.inputMode="tel"}else if(type==="email"){attrs.inputMode="email"}else if(type==="url"){attrs.inputMode="url"}else if(type==="number"){attrs.inputMode="numeric"}return attrs};const securityAttrs=getSecurityAttributes();return jsx("input",{type,className:controlClassName(INPUT_LAYOUT,{hasError,className,ring:true}),ref:control.setRef,...securityAttrs,...ime.props,...props})});Input.displayName="Input";export{Input};
|
|
2
|
+
//# sourceMappingURL=chunk-W32ZFOPN.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Rt=["top","right","bottom","left"];var N=Math.min,C=Math.max,it=Math.round,st=Math.floor,M=t=>({x:t,y:t}),ne={left:"right",right:"left",bottom:"top",top:"bottom"};function ft(t,e,o){return C(t,N(e,o))}function $(t,e){return typeof t=="function"?t(e):t}function H(t){return t.split("-")[0]}function K(t){return t.split("-")[1]}function at(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function F(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return at(F(t))}function Ct(t,e,o){o===void 0&&(o=!1);let n=K(t),i=dt(t),r=ut(i),s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ot(s)),[s,ot(s)]}function St(t){let e=ot(t);return[lt(t),e,lt(e)]}function lt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var At=["left","right"],Ot=["right","left"],oe=["top","bottom"],ie=["bottom","top"];function se(t,e,o){switch(t){case"top":case"bottom":return o?e?Ot:At:e?At:Ot;case"left":case"right":return e?oe:ie;default:return[]}}function Pt(t,e,o,n){let i=K(t),r=se(H(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(lt)))),r}function ot(t){let e=H(t);return ne[e]+t.slice(e.length)}function re(t){return{top:0,right:0,bottom:0,left:0,...t}}function xt(t){return typeof t!="number"?re(t):{top:t,right:t,bottom:t,left:t}}function U(t){let{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Tt(t,e,o){let{reference:n,floating:i}=t,r=F(e),s=dt(e),c=ut(s),a=H(e),d=r==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,m=n[c]/2-i[c]/2,l;switch(a){case"top":l={x:f,y:n.y-i.height};break;case"bottom":l={x:f,y:n.y+n.height};break;case"right":l={x:n.x+n.width,y:u};break;case"left":l={x:n.x-i.width,y:u};break;default:l={x:n.x,y:n.y}}switch(K(e)){case"start":l[s]-=m*(o&&d?-1:1);break;case"end":l[s]+=m*(o&&d?-1:1);break}return l}async function Dt(t,e){var o;e===void 0&&(e={});let{x:n,y:i,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:l=0}=$(e,t),g=xt(l),w=c[m?u==="floating"?"reference":"floating":u],p=U(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(w)))==null||o?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:d,rootBoundary:f,strategy:a})),y=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},b=U(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:a}):y);return{top:(p.top-b.top+g.top)/v.y,bottom:(b.bottom-p.bottom+g.bottom)/v.y,left:(p.left-b.left+g.left)/v.x,right:(b.right-p.right+g.right)/v.x}}var ce=50,Mt=async(t,e,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,c=s.detectOverflow?s:{...s,detectOverflow:Dt},a=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Tt(d,n,a),m=n,l=0,g={};for(let h=0;h<r.length;h++){let w=r[h];if(!w)continue;let{name:p,fn:y}=w,{x,y:v,data:b,reset:A}=await y({x:f,y:u,initialPlacement:n,placement:m,strategy:i,middlewareData:g,rects:d,platform:c,elements:{reference:t,floating:e}});f=x??f,u=v??u,g[p]={...g[p],...b},A&&l<ce&&(l++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(d=A.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:f,y:u}=Tt(d,m,a)),h=-1)}return{x:f,y:u,placement:m,strategy:i,middlewareData:g}},Ft=t=>({name:"arrow",options:t,async fn(e){let{x:o,y:n,placement:i,rects:r,platform:s,elements:c,middlewareData:a}=e,{element:d,padding:f=0}=$(t,e)||{};if(d==null)return{};let u=xt(f),m={x:o,y:n},l=dt(i),g=ut(l),h=await s.getDimensions(d),w=l==="y",p=w?"top":"left",y=w?"bottom":"right",x=w?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[l]-m[l]-r.floating[g],b=m[l]-r.reference[l],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d)),O=A?A[x]:0;(!O||!await(s.isElement==null?void 0:s.isElement(A)))&&(O=c.floating[x]||r.floating[g]);let _=v/2-b/2,W=O/2-h[g]/2-1,P=N(u[p],W),X=N(u[y],W),k=P,j=O-h[g]-X,R=O/2-h[g]/2+_,q=ft(k,R,j),z=!a.arrow&&K(i)!=null&&R!==q&&r.reference[g]/2-(R<k?P:X)-h[g]/2<0,E=z?R<k?R-k:R-j:0;return{[l]:m[l]+E,data:{[l]:q,centerOffset:R-q-E,...z&&{alignmentOffset:E}},reset:z}}});var Bt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:d}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:l="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...w}=$(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};let p=H(i),y=F(c),x=H(c)===c,v=await(a.isRTL==null?void 0:a.isRTL(d.floating)),b=m||(x||!h?[ot(c)]:St(c)),A=g!=="none";!m&&A&&b.push(...Pt(c,h,g,v));let O=[c,...b],_=await a.detectOverflow(e,w),W=[],P=((n=r.flip)==null?void 0:n.overflows)||[];if(f&&W.push(_[p]),u){let R=Ct(i,s,v);W.push(_[R[0]],_[R[1]])}if(P=[...P,{placement:i,overflows:W}],!W.every(R=>R<=0)){var X,k;let R=(((X=r.flip)==null?void 0:X.index)||0)+1,q=O[R];if(q&&(!(u==="alignment"?y!==F(q):!1)||P.every(D=>F(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:R,overflows:P},reset:{placement:q}};let z=(k=P.filter(E=>E.overflows[0]<=0).sort((E,D)=>E.overflows[1]-D.overflows[1])[0])==null?void 0:k.placement;if(!z)switch(l){case"bestFit":{var j;let E=(j=P.filter(D=>{if(A){let Y=F(D.placement);return Y===y||Y==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(Y=>Y>0).reduce((Y,ee)=>Y+ee,0)]).sort((D,Y)=>D[1]-Y[1])[0])==null?void 0:j[0];E&&(z=E);break}case"initialPlacement":z=c;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function Lt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Et(t){return Rt.some(e=>t[e]>=0)}var Wt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:o,platform:n}=e,{strategy:i="referenceHidden",...r}=$(t,e);switch(i){case"referenceHidden":{let s=await n.detectOverflow(e,{...r,elementContext:"reference"}),c=Lt(s,o.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Et(c)}}}case"escaped":{let s=await n.detectOverflow(e,{...r,altBoundary:!0}),c=Lt(s,o.floating);return{data:{escapedOffsets:c,escaped:Et(c)}}}default:return{}}}}};var kt=new Set(["left","top"]);async function le(t,e){let{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=H(o),c=K(o),a=F(o)==="y",d=kt.has(s)?-1:1,f=r&&a?-1:1,u=$(e,t),{mainAxis:m,crossAxis:l,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(l=c==="end"?g*-1:g),a?{x:l*f,y:m*d}:{x:m*d,y:l*f}}var Nt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;let{x:i,y:r,placement:s,middlewareData:c}=e,a=await le(e,t);return s===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},$t=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:p=>{let{x:y,y:x}=p;return{x:y,y:x}}},...d}=$(t,e),f={x:o,y:n},u=await r.detectOverflow(e,d),m=F(H(i)),l=at(m),g=f[l],h=f[m];if(s){let p=l==="y"?"top":"left",y=l==="y"?"bottom":"right",x=g+u[p],v=g-u[y];g=ft(x,g,v)}if(c){let p=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=h+u[p],v=h-u[y];h=ft(x,h,v)}let w=a.fn({...e,[l]:g,[m]:h});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[l]:s,[m]:c}}}}}},Ht=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:o,y:n,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:a=!0,crossAxis:d=!0}=$(t,e),f={x:o,y:n},u=F(i),m=at(u),l=f[m],g=f[u],h=$(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){let x=m==="y"?"height":"width",v=r.reference[m]-r.floating[x]+w.mainAxis,b=r.reference[m]+r.reference[x]-w.mainAxis;l<v?l=v:l>b&&(l=b)}if(d){var p,y;let x=m==="y"?"width":"height",v=kt.has(H(i)),b=r.reference[u]-r.floating[x]+(v&&((p=s.offset)==null?void 0:p[u])||0)+(v?0:w.crossAxis),A=r.reference[u]+r.reference[x]+(v?0:((y=s.offset)==null?void 0:y[u])||0)-(v?w.crossAxis:0);g<b?g=b:g>A&&(g=A)}return{[m]:l,[u]:g}}}},Vt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;let{placement:i,rects:r,platform:s,elements:c}=e,{apply:a=()=>{},...d}=$(t,e),f=await s.detectOverflow(e,d),u=H(i),m=K(i),l=F(i)==="y",{width:g,height:h}=r.floating,w,p;u==="top"||u==="bottom"?(w=u,p=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(p=u,w=m==="end"?"top":"bottom");let y=h-f.top-f.bottom,x=g-f.left-f.right,v=N(h-f[w],y),b=N(g-f[p],x),A=!e.middlewareData.shift,O=v,_=b;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(_=x),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(O=y),A&&!m){let P=C(f.left,0),X=C(f.right,0),k=C(f.top,0),j=C(f.bottom,0);l?_=g-2*(P!==0||X!==0?P+X:C(f.left,f.right)):O=h-2*(k!==0||j!==0?k+j:C(f.top,f.bottom))}await a({...e,availableWidth:_,availableHeight:O});let W=await s.getDimensions(c.floating);return g!==W.width||h!==W.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function J(t){return zt(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function B(t){var e;return(e=(zt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zt(t){return mt()?t instanceof Node||t instanceof S(t).Node:!1}function T(t){return mt()?t instanceof Element||t instanceof S(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof S(t).HTMLElement:!1}function _t(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof S(t).ShadowRoot}function et(t){let{overflow:e,overflowX:o,overflowY:n,display:i}=L(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function It(t){return/^(table|td|th)$/.test(J(t))}function rt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var fe=/transform|translate|scale|rotate|perspective|filter/,ae=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",yt;function gt(t){let e=T(t)?L(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!ht()&&(G(e.backdropFilter)||G(e.filter))||fe.test(e.willChange||"")||ae.test(e.contain||"")}function Xt(t){let e=I(t);for(;V(e)&&!Q(e);){if(gt(e))return e;if(rt(e))return null;e=I(e)}return null}function ht(){return yt==null&&(yt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yt}function Q(t){return/^(html|body|#document)$/.test(J(t))}function L(t){return S(t).getComputedStyle(t)}function ct(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function I(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||_t(t)&&t.host||B(t);return _t(e)?e.host:e}function jt(t){let e=I(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&et(e)?e:jt(e)}function tt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let i=jt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=S(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&o?tt(c):[])}else return e.concat(i,tt(i,[],o))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ut(t){let e=L(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=V(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=it(o)!==r||it(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function bt(t){return T(t)?t:t.contextElement}function nt(t){let e=bt(t);if(!V(e))return M(1);let o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Ut(e),s=(r?it(o.width):o.width)/n,c=(r?it(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var ue=M(0);function Gt(t){let e=S(t);return!ht()||!e.visualViewport?ue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function de(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==S(t)?!1:e}function Z(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let i=t.getBoundingClientRect(),r=bt(t),s=M(1);e&&(n?T(n)&&(s=nt(n)):s=nt(t));let c=de(r,o,n)?Gt(r):M(0),a=(i.left+c.x)/s.x,d=(i.top+c.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(r){let m=S(r),l=n&&T(n)?S(n):n,g=m,h=pt(g);for(;h&&n&&l!==g;){let w=nt(h),p=h.getBoundingClientRect(),y=L(h),x=p.left+(h.clientLeft+parseFloat(y.paddingLeft))*w.x,v=p.top+(h.clientTop+parseFloat(y.paddingTop))*w.y;a*=w.x,d*=w.y,f*=w.x,u*=w.y,a+=x,d+=v,g=S(h),h=pt(g)}}return U({width:f,height:u,x:a,y:d})}function wt(t,e){let o=ct(t).scrollLeft;return e?e.left+o:Z(B(t)).left+o}function Jt(t,e){let o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-wt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function me(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t,r=i==="fixed",s=B(n),c=e?rt(e.floating):!1;if(n===s||c&&r)return o;let a={scrollLeft:0,scrollTop:0},d=M(1),f=M(0),u=V(n);if((u||!u&&!r)&&((J(n)!=="body"||et(s))&&(a=ct(n)),u)){let l=Z(n);d=nt(n),f.x=l.x+n.clientLeft,f.y=l.y+n.clientTop}let m=s&&!u&&!r?Jt(s,a):M(0);return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-a.scrollLeft*d.x+f.x+m.x,y:o.y*d.y-a.scrollTop*d.y+f.y+m.y}}function ge(t){return Array.from(t.getClientRects())}function he(t){let e=B(t),o=ct(t),n=t.ownerDocument.body,i=C(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=C(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+wt(t),c=-o.scrollTop;return L(n).direction==="rtl"&&(s+=C(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Yt=25;function pe(t,e){let o=S(t),n=B(t),i=o.visualViewport,r=n.clientWidth,s=n.clientHeight,c=0,a=0;if(i){r=i.width,s=i.height;let f=ht();(!f||f&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}let d=wt(n);if(d<=0){let f=n.ownerDocument,u=f.body,m=getComputedStyle(u),l=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-l);g<=Yt&&(r-=g)}else d<=Yt&&(r+=d);return{width:r,height:s,x:c,y:a}}function we(t,e){let o=Z(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=V(t)?nt(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=i*r.x,d=n*r.y;return{width:s,height:c,x:a,y:d}}function qt(t,e,o){let n;if(e==="viewport")n=pe(t,o);else if(e==="document")n=he(B(t));else if(T(e))n=we(e,o);else{let i=Gt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return U(n)}function Qt(t,e){let o=I(t);return o===e||!T(o)||Q(o)?!1:L(o).position==="fixed"||Qt(o,e)}function xe(t,e){let o=e.get(t);if(o)return o;let n=tt(t,[],!1).filter(c=>T(c)&&J(c)!=="body"),i=null,r=L(t).position==="fixed",s=r?I(t):t;for(;T(s)&&!Q(s);){let c=L(s),a=gt(s);!a&&c.position==="fixed"&&(i=null),(r?!a&&!i:!a&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||et(s)&&!a&&Qt(t,s))?n=n.filter(f=>f!==s):i=c,s=I(s)}return e.set(t,n),n}function ye(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t,s=[...o==="clippingAncestors"?rt(e)?[]:xe(e,this._c):[].concat(o),n],c=qt(e,s[0],i),a=c.top,d=c.right,f=c.bottom,u=c.left;for(let m=1;m<s.length;m++){let l=qt(e,s[m],i);a=C(l.top,a),d=N(l.right,d),f=N(l.bottom,f),u=C(l.left,u)}return{width:d-u,height:f-a,x:u,y:a}}function ve(t){let{width:e,height:o}=Ut(t);return{width:e,height:o}}function be(t,e,o){let n=V(e),i=B(e),r=o==="fixed",s=Z(t,!0,r,e),c={scrollLeft:0,scrollTop:0},a=M(0);function d(){a.x=wt(i)}if(n||!n&&!r)if((J(e)!=="body"||et(i))&&(c=ct(e)),n){let l=Z(e,!0,r,e);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else i&&d();r&&!n&&i&&d();let f=i&&!n&&!r?Jt(i,c):M(0),u=s.left+c.scrollLeft-a.x-f.x,m=s.top+c.scrollTop-a.y-f.y;return{x:u,y:m,width:s.width,height:s.height}}function vt(t){return L(t).position==="static"}function Kt(t,e){if(!V(t)||L(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return B(t)===o&&(o=o.ownerDocument.body),o}function Zt(t,e){let o=S(t);if(rt(t))return o;if(!V(t)){let i=I(t);for(;i&&!Q(i);){if(T(i)&&!vt(i))return i;i=I(i)}return o}let n=Kt(t,e);for(;n&&It(n)&&vt(n);)n=Kt(n,e);return n&&Q(n)&&vt(n)&&!gt(n)?o:n||Xt(t)||o}var Ae=async function(t){let e=this.getOffsetParent||Zt,o=this.getDimensions,n=await o(t.floating);return{reference:be(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Oe(t){return L(t).direction==="rtl"}var Re={convertOffsetParentRelativeRectToViewportRelativeRect:me,getDocumentElement:B,getClippingRect:ye,getOffsetParent:Zt,getElementRects:Ae,getClientRects:ge,getDimensions:ve,getScale:nt,isElement:T,isRTL:Oe};function te(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ce(t,e){let o=null,n,i=B(t);function r(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),r();let d=t.getBoundingClientRect(),{left:f,top:u,width:m,height:l}=d;if(c||e(),!m||!l)return;let g=st(u),h=st(i.clientWidth-(f+m)),w=st(i.clientHeight-(u+l)),p=st(f),x={rootMargin:-g+"px "+-h+"px "+-w+"px "+-p+"px",threshold:C(0,N(1,a))||1},v=!0;function b(A){let O=A[0].intersectionRatio;if(O!==a){if(!v)return s();O?s(!1,O):n=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!te(d,t.getBoundingClientRect())&&s(),v=!1}try{o=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{o=new IntersectionObserver(b,x)}o.observe(t)}return s(!0),r}function Ne(t,e,o,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,d=bt(t),f=i||r?[...d?tt(d):[],...e?tt(e):[]]:[];f.forEach(p=>{i&&p.addEventListener("scroll",o,{passive:!0}),r&&p.addEventListener("resize",o)});let u=d&&c?Ce(d,o):null,m=-1,l=null;s&&(l=new ResizeObserver(p=>{let[y]=p;y&&y.target===d&&l&&e&&(l.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=l)==null||x.observe(e)})),o()}),d&&!a&&l.observe(d),e&&l.observe(e));let g,h=a?Z(t):null;a&&w();function w(){let p=Z(t);h&&!te(h,p)&&o(),h=p,g=requestAnimationFrame(w)}return o(),()=>{var p;f.forEach(y=>{i&&y.removeEventListener("scroll",o),r&&y.removeEventListener("resize",o)}),u?.(),(p=l)==null||p.disconnect(),l=null,a&&cancelAnimationFrame(g)}}var $e=Nt;var He=$t,Ve=Bt,_e=Vt,ze=Wt,Ie=Ft;var Xe=Ht,je=(t,e,o)=>{let n=new Map,i={platform:Re,...o},r={...i.platform,_c:n};return Mt(t,e,{...i,platform:r})};export{Ne as a,$e as b,He as c,Ve as d,_e as e,ze as f,Ie as g,Xe as h,je as i};
|
|
2
|
+
//# sourceMappingURL=chunk-W63RJF6Q.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as P}from"./chunk-MXGMJAWS.js";import{k as R,m as Z,n as U,w as H}from"./chunk-IAXVJLJ3.js";import{b as Y}from"./chunk-AFNEGNVJ.js";import{a as V}from"./chunk-6LGTFWQS.js";import{c as Q}from"./chunk-CDG7S4P5.js";var t=Q(V());var N=/\.(avif|gif|jpe?g|png|webp)$/i;function ee(n,h){let g=h?.trim()||R(n)||"image";return N.test(g)?g.replace(N,".jpg"):`${g}.jpg`}async function B(n,h){let g=Z(n,{useCase:"lightbox-image",format:"jpeg"}),l=await fetch(g);if(!l.ok)throw new Error(`Failed to fetch image: ${l.status} ${l.statusText}`);let u=await l.blob(),m=document.createElement("a");m.href=URL.createObjectURL(u),m.download=ee(n,h),m.click(),URL.revokeObjectURL(m.href)}var te=1,ne=3,j=.2,oe=.95,ie=.9,re="w-10 h-10 md:w-12 md:h-12 rounded-full bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] hover:bg-[color-mix(in_srgb,var(--media-fg)_20%,transparent)] flex items-center justify-center transition-all",he=`${re} disabled:opacity-30 disabled:cursor-not-allowed`,ue="h-10 md:h-12 min-w-[50px] px-2 rounded-full text-[var(--media-fg)] text-xs md:text-sm font-medium tabular-nums text-center transition-colors enabled:hover:bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] disabled:cursor-default";function z(n){return"touches"in n&&n.touches.length>0?{clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}:"changedTouches"in n&&n.changedTouches.length>0?{clientX:n.changedTouches[0].clientX,clientY:n.changedTouches[0].clientY}:{clientX:n.clientX,clientY:n.clientY}}function fe({images:n,filenames:h,enableKeyboard:g=!1,onDownload:l,onShare:u}){let{ui:m}=Y(),{imageDownloadUrl:k}=H(),S=(0,t.useCallback)(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(hover: hover) and (pointer: fine)").matches,[]),[f,X]=(0,t.useState)(!1),[d,p]=(0,t.useState)(0),[s,w]=(0,t.useState)(1),[v,L]=(0,t.useState)({x:0,y:0}),[I,A]=(0,t.useState)(!1),[O,G]=(0,t.useState)({x:0,y:0}),E=(0,t.useCallback)(()=>{w(e=>{let o=Math.min(e+j,ne);return Math.round(o*10)/10})},[]),D=(0,t.useCallback)(()=>{w(e=>{let o=Math.max(e-j,te),r=Math.round(o*10)/10;return r===1&&L({x:0,y:0}),r})},[]),c=(0,t.useCallback)(()=>{w(1),L({x:0,y:0})},[]),K=(0,t.useCallback)(e=>{p(e),X(!0),w(1),L({x:0,y:0})},[]),M=(0,t.useCallback)(()=>{X(!1),c()},[c]);(0,t.useEffect)(()=>{if(f)return P()},[f]);let T=(0,t.useCallback)(()=>{n.length<=1||(p(e=>e===0?e:e-1),c())},[n.length,c]),_=(0,t.useCallback)(()=>{n.length<=1||(p(e=>e===n.length-1?e:e+1),c())},[n.length,c]);(0,t.useEffect)(()=>{if(!f||!g)return;let e=o=>{let r=S(),a=o.metaKey||o.ctrlKey,i=o.key==="+"||o.key==="="||o.key==="NumpadAdd",b=o.key==="-"||o.key==="_"||o.key==="NumpadSubtract",y=o.key==="0"||o.key==="Numpad0";if(r&&(a&&(i||b||y)||i||b||y)){if(o.preventDefault(),i){E();return}if(b){D();return}c();return}switch(o.key){case"Escape":M();break;case"ArrowLeft":T();break;case"ArrowRight":_();break}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,g,M,T,_,E,D,c,S]);let x=(0,t.useMemo)(()=>{if(s<=1)return{maxOffsetX:0,maxOffsetY:0};let e=typeof window<"u"?window.innerWidth:1920,o=typeof window<"u"?window.innerHeight:1080,r=e*oe,a=o*ie,i=r*s,b=a*s,y=Math.max(0,(i-r)/2),q=Math.max(0,(b-a)/2);return{maxOffsetX:y,maxOffsetY:q}},[s]),F=(0,t.useCallback)(e=>{if(s<=1)return;A(!0);let{clientX:o,clientY:r}=z(e);G({x:o-v.x,y:r-v.y})},[s,v]),W=(0,t.useCallback)(e=>{if(!I||s<=1)return;let{clientX:o,clientY:r}=z(e),a=o-O.x,i=r-O.y;a=Math.max(-x.maxOffsetX,Math.min(x.maxOffsetX,a)),i=Math.max(-x.maxOffsetY,Math.min(x.maxOffsetY,i)),L({x:a,y:i})},[I,s,O,x]),$=(0,t.useCallback)(()=>{A(!1)},[]),C=(0,t.useCallback)(async()=>{let e=n[d];if(!e)return;if(l){let i=U(e);await l(i,d);return}let o=h?.[d],r=k(e,o);if(r){let i=document.createElement("a");i.href=r,i.rel="noopener",i.click();return}let a=U(e);await B(a,o)},[n,d,l,h,k]),J=(0,t.useCallback)(async()=>{let e=n[d];if(e){if(u){await u(e,d);return}if(navigator.share)try{await navigator.share({title:m.imageShareTitle,text:m.imageShareText,url:e})}catch{}else try{await navigator.clipboard.writeText(e)}catch{}}},[n,d,u]);return{lightboxOpen:f,lightboxIndex:d,zoomLevel:s,position:v,isDraggingLightbox:I,openLightbox:K,closeLightbox:M,setLightboxIndex:p,prevImage:T,nextImage:_,zoomIn:E,zoomOut:D,resetZoom:c,handleLightboxDragStart:F,handleLightboxDrag:W,handleLightboxDragEnd:$,handleDownload:C,handleShare:J}}export{te as a,ne as b,re as c,he as d,ue as e,fe as f};
|
|
2
|
+
//# sourceMappingURL=chunk-WM5S3YN5.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-OU4IOHLN.js";import{a as u}from"./chunk-H2XQYT62.js";import{a as T}from"./chunk-6LGTFWQS.js";import{c as i}from"./chunk-CDG7S4P5.js";var d=i(T());var p=i(m());function v(P,y){let o=null,t=!1,n=!1,s=new Set,l=()=>{for(let e of s)e()},f=()=>{o||t||(t=!0,P().then(e=>{t=!1,o=e,n=!1,r.succeeded(),l()},()=>{t=!1,s.size>0&&r.failed()}))},r=u({retry:()=>{n&&(n=!1,l()),f()},onExhausted:()=>{n=!0,l()}}),C=()=>{o||(n&&(n=!1,r.dispose(),l()),f())},h=e=>(s.add(e),()=>{s.delete(e),s.size===0&&(r.dispose(),n=!1)}),x=()=>o??(n?"failed":null),D=()=>null;function c(e){let a=(0,d.useSyncExternalStore)(h,x,D);return(0,d.useEffect)(C,[]),a===null||a==="failed"?(0,p.jsx)(y,{failed:a==="failed",props:e}):(0,p.jsx)(a,{...e})}return c.preload=()=>{!o&&!t&&f()},c}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WP7UEAIB.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as f,d as p,e as y,g as b,h as E,i as R}from"./chunk-GJY6AQIS.js";function m(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e!="string")return null;let r=e.normalize("NFKC").replace(/[\s,]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(r))return null;let n=Number(r);return Number.isFinite(n)?n:null}var k=/^[a-z0-9][a-z0-9_-]{0,39}$/;function v(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var P=/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,U=254;function I(e){return e.length<=U&&P.test(e)}var H=/^(\d{4})-(\d{2})-(\d{2})$/u,X=/^(\d{2}):(\d{2})$/u;function w(e){let r=H.exec(e);if(!r)return!1;let[,n,i,t]=r.map(Number),u=new Date(Date.UTC(n,i-1,t));return u.getUTCFullYear()===n&&u.getUTCMonth()===i-1&&u.getUTCDate()===t}function C(e){let r=X.exec(e);if(!r)return!1;let[,n,i]=r.map(Number);return n>=0&&n<=23&&i>=0&&i<=59}function O(e,r,n=1){if(typeof e!="string")return{ok:!1,code:"required"};let i=e.trim();return i?i.length>r?{ok:!1,code:"too_long"}:i.length<n?{ok:!1,code:"too_short"}:{ok:!0,value:i}:{ok:!1,code:"required"}}var z=2048;function T(e,r=z){if(typeof e!="string"||e.length>r)return null;try{let n=new URL(e.trim());return n.protocol!=="http:"&&n.protocol!=="https:"||n.username||n.password?null:n}catch{return null}}var B=200;function S(e,r=B){if(e.length===0||e.length>r||/\([^()]*[+*|][^()]*\)\s*[+*{]/.test(e)||/\\[1-9]/.test(e)||/\(\?[<=!]/.test(e))return!1;try{return new RegExp(e,"u"),!0}catch{return!1}}function $(e){return e.filter(r=>f(r.type))}function x(e){return e==null?!1:typeof e=="string"?e.trim()!=="":Array.isArray(e)?e.length>0:typeof e=="object"?Object.entries(e).some(([r,n])=>r!=="countryCode"&&typeof n=="string"&&n.trim()!==""):!0}function ye(e,r){return $(e).filter(n=>x(r[n.id])).length}var _=["answered","not_answered"],F=["answered","not_answered","equals","not_equals","contains"],j=["answered","not_answered","includes","not_includes"],N=["answered","not_answered","equals","not_equals","gt","gte","lt","lte"],W={short_text:F,long_text:F,url:F,email:_,phone:_,date:_,time:_,choice:j,number:N,rating:N,file:[],statement:[],address:[],tax_id:[],hidden:F};function Y(e){return W[e]??[]}function K(e,r){switch(r){case"answered":case"not_answered":return"none";case"includes":case"not_includes":return"option";case"contains":return"text";case"equals":case"not_equals":return e==="number"||e==="rating"?"number":"text";case"gt":case"gte":case"lt":case"lte":return"number"}}function G(e){return e==null?!1:typeof e=="string"?e.trim()!=="":Array.isArray(e)?e.length>0:!0}function g(e){return typeof e=="string"?e.normalize("NFKC").trim().toLowerCase():typeof e=="number"?String(e):""}function Q(e,r,n){if(!Y(r).includes(e.op))return null;let i=G(n);switch(e.op){case"answered":return i;case"not_answered":return!i;case"includes":case"not_includes":{let u=(Array.isArray(n)?n:typeof n=="string"&&n?[n]:[]).includes(e.value);return e.op==="includes"?u:!u}case"contains":return i&&g(n).includes(g(e.value));case"equals":case"not_equals":{if(K(r,e.op)==="number"){let u=m(n),o=u!==null&&u===e.value;return e.op==="equals"?o:!o}let t=i&&g(n)===g(e.value);return e.op==="equals"?t:!t}case"gt":case"gte":case"lt":case"lte":{let t=m(n),u=typeof e.value=="number"?e.value:null;return t===null||u===null?!1:e.op==="gt"?t>u:e.op==="gte"?t>=u:e.op==="lt"?t<u:t<=u}}}function V(e,r){let n=new Set,i=new Map;for(let t of e){let u=t.visibleWhen,o=u&&Array.isArray(u.conditions)?u.conditions:[];if(o.length===0||t.type==="email"||t.type==="phone"){n.add(t.id),i.set(t.id,t.type);continue}let a=!1,l=o.map(c=>{let h=c.kind==="hidden"?"hidden":i.get(c.ref);if(!h)return a=!0,!1;let q=c.kind==="hidden"||n.has(c.ref)?r[c.ref]:null,A=Q(c,h,q);return A===null&&(a=!0),A===!0});(a||(u?.match==="any"?l.some(Boolean):l.every(Boolean)))&&n.add(t.id),i.set(t.id,t.type)}return n}function Ae(e){return e.some(r=>(r.visibleWhen?.conditions?.length??0)>0)}var J=["required","invalid_email","invalid_phone","invalid_date","invalid_time","too_long","too_short","invalid_format","invalid_option","other_required","too_few_options","too_many_options","invalid_number","not_integer","out_of_range","invalid_url","date_out_of_range","invalid_address","invalid_tax_id","invalid_postal_code","invalid"];function Z(e){return typeof e=="string"&&J.includes(e)}var ee=/^[a-z][a-z_]{0,39}$/;function re(e){return Z(e)?e:typeof e=="string"&&ee.test(e)?"invalid":null}function D(e){let r={};if(!e||typeof e!="object"||Array.isArray(e))return r;for(let[n,i]of Object.entries(e)){let t=k.test(n)?re(i):null;t&&(r[n]=t)}return r}var ne=["invalid_answers","duplicate","daily_limit","rate_limited","verification_expired","temporarily_unavailable","too_large","server_error"];function te(e){return typeof e=="string"&&ne.includes(e)}var oe=/^[a-z0-9]{20,30}$/;function Ie(e){if(!e||typeof e!="object")return{ok:!1,error:"server_error"};let r=e;if(r.ok===!0||r.ok===void 0&&r.error===void 0){let n=r.state;if(n==="closed"||n==="not_open"||n==="full")return{ok:!0,state:n};let i=typeof r.redirectUrl=="string"&&!b(r.redirectUrl)?E(r.redirectUrl):null;return{ok:!0,...typeof r.submissionId=="string"&&oe.test(r.submissionId)?{submissionId:r.submissionId}:{},...i?{redirectUrl:i.url}:{}}}if(r.ok===!1&&te(r.error))return r.error!=="invalid_answers"?{ok:!1,error:r.error}:{ok:!1,error:"invalid_answers",errors:D(r.errors)};if(r.error&&typeof r.error=="object"){let n=r.error,t=(n.details&&typeof n.details=="object"?n.details:{}).issues??n.issues;switch(n.code){case"VERIFICATION_EXPIRED":return{ok:!1,error:"verification_expired"};case"DUPLICATE_SUBMISSION":return{ok:!1,error:"duplicate"};case"RATE_LIMITED":return{ok:!1,error:"rate_limited"};case"INVALID_ANSWERS":return{ok:!1,error:"invalid_answers",errors:D(t)};case"PAYLOAD_TOO_LARGE":return{ok:!1,error:"too_large"}}}return{ok:!1,error:"server_error"}}function ie(e,r){return e.defaultCountry?.toUpperCase()||r?.toUpperCase()||null}var se="__other__";function ue(e){return typeof e!="string"?null:e.replace(/\p{Cc}/gu,"").trim().slice(0,p.HIDDEN_VALUE_MAX)||null}var d=e=>({ok:!0,value:e}),s=e=>({ok:!1,code:e}),we={phone:null,address:null,tax_id:null};function le(e,r){if(!S(e))return!0;try{return new RegExp(`^(?:${e})$`,"u").test(r)}catch{return!0}}function L(e,r,n){let i=O(e,r,n??1);return i.ok?d(i.value):s(i.code)}var ae=40;function de(e,r){if(typeof r=="string"&&r.length>ae)return s("invalid_number");let n=m(r);return n===null||Math.abs(n)>Number.MAX_SAFE_INTEGER?s("invalid_number"):e.integer&&!Number.isInteger(n)?s("not_integer"):e.min!==void 0&&n<e.min||e.max!==void 0&&n>e.max?s("out_of_range"):d(n)}function ce(e){if(typeof e!="string")return s("invalid_url");let r=e.trim(),n=T(r.includes("://")?r:`https://${r}`);return!n||!n.hostname.includes(".")?s("invalid_url"):d(n.toString())}function pe(e,r,n){if(typeof r!="string"||!w(r))return s("invalid_date");let i=y(e.range?.min,n),t=y(e.range?.max,n);return i&&r<i||t&&r>t?s("date_out_of_range"):d(r)}function me(e,r,n){let i=new Set(e.options.map(a=>a.id)),t=Array.isArray(r)?r:typeof r=="string"&&r?[r]:[];if(!e.allowMultiple&&t.length>1||t.length>p.MAX_OPTIONS+1)return s("invalid_option");let u=n?.trim()??"",o=[];for(let a of t){if(typeof a!="string")return s("invalid_option");if(i.has(a)){o.includes(a)||o.push(a);continue}if(!e.allowOther)return s("invalid_option");let l=a===se?u:a.trim();if(!l)return s("other_required");if(l.length>p.LABEL_MAX)return s("too_long");o.push(l)}return o.length===0?s("required"):e.allowMultiple?e.minSelections!==void 0&&o.length<e.minSelections?s("too_few_options"):e.maxSelections!==void 0&&o.length>e.maxSelections?s("too_many_options"):d(o):d(o[0])}function M(e,r,n,i,t){let u=v(typeof n=="string"?n.trim():n);if(r.type==="file"){let o=Array.isArray(n)?n:[];if(o.some(l=>typeof l!="string"||!l||l.length>64)||o.length>r.maxFiles)return s("invalid_option");let a=t.fileRequired!=="skip"&&!t.fileRequired.exempt.includes(r.id);return r.required&&o.length===0&&a?s("required"):d(o.length>0?o:null)}if(r.type==="address")return e.address?e.address(r,n):r.required&&!x(n)?s("required"):d(n??null);if(r.type==="tax_id"){if(e.tax_id)return e.tax_id(r,n);let o=R(n)&&n.value.trim()!=="";return r.required&&!o?s("required"):d(n??null)}if(u)return r.required?s("required"):d(null);switch(r.type){case"short_text":{let o=L(n,r.maxLength??p.SHORT_TEXT_MAX,r.minLength);return!o.ok||!r.pattern||typeof o.value!="string"||le(r.pattern,o.value)?o:s("invalid_format")}case"long_text":return L(n,r.maxLength??p.LONG_TEXT_MAX,r.minLength);case"email":{if(typeof n!="string")return s("invalid_email");let o=n.trim().toLowerCase();return I(o)?d(o):s("invalid_email")}case"phone":{if(typeof n!="string")return s("invalid_phone");if(!e.phone)return d(n);let o=e.phone(n,ie(r,t.defaultPhoneCountry));return o?d(o):s("invalid_phone")}case"choice":return me(r,n,i.otherText?.[r.id]);case"date":return pe(r,n,t.today);case"number":return de(r,n);case"url":return ce(n);case"statement":return d(null);case"time":return typeof n=="string"&&C(n)?d(n):s("invalid_time");case"rating":{let o=typeof n=="number"?n:Number(n);return Number.isInteger(o)&&o>=1&&o<=r.max?d(o):s("invalid_option")}}}function Ce(e,r,n,i){let t={},u={},o=n.answers&&typeof n.answers=="object"?n.answers:{},a=V(r,o);for(let l of r){if(!f(l.type))continue;if(!a.has(l.id)){t[l.id]=null;continue}let c=M(e,l,o[l.id],n,i);c.ok?t[l.id]=c.value:u[l.id]=c.code}for(let l of i.hiddenFields??[])t[l.id]=ue(o[l.id]);return Object.keys(u).length>0?{ok:!1,errors:u}:{ok:!0,answers:t}}function Oe(e,r,n,i){if(!f(r.type))return null;let t=M(e,r,n.answers[r.id],n,i);return t.ok?null:t.code}export{ye as a,V as b,Ae as c,Ie as d,ie as e,se as f,d as g,s as h,we as i,Ce as j,Oe as k};
|
|
2
|
+
//# sourceMappingURL=chunk-WXIUWMFR.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext,useContext,useEffect,useMemo,useState}from"react";import{Fragment,jsx,jsxs}from"react/jsx-runtime";var SiteChromeContext=createContext(null);function useSiteChrome(){return useContext(SiteChromeContext)}export{useSiteChrome};
|
|
2
|
+
//# sourceMappingURL=chunk-Z4A5NQWJ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-OU4IOHLN.js";import{a as p}from"./chunk-6LGTFWQS.js";import{c as l}from"./chunk-CDG7S4P5.js";var r=l(p(),1),a=l(o(),1),t=(0,r.lazy)(()=>import("./MediaPlayer-F43FPK4E.js").then(e=>({default:e.MediaPlayer}))),n=(0,r.lazy)(()=>import("./deliverables-C5RD2ASE.js").then(e=>({default:e.DeliverablePlayer})));function i({className:e="aspect-video"}){return(0,a.jsx)("div",{className:`w-full animate-pulse rounded-(--media-radius,12px) bg-(--media-surface) ${e}`,"aria-busy":"true"})}function s(e){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(i,{}),children:(0,a.jsx)(t,{...e})})}function y(e){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(i,{className:"h-64"}),children:(0,a.jsx)(n,{...e})})}export{s as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-Z4OV6QHI.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { P as PublicDeliverableOutline } from './wire-ofSodpi1.js';
|
|
3
|
+
import { K as KanorioConfig } from './provider-CMLzyAjJ.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@kanorio/sdk';
|
|
6
|
+
|
|
7
|
+
interface KanorioCurriculumProps extends KanorioConfig {
|
|
8
|
+
/** Product slug (the URL segment of the product page) */
|
|
9
|
+
product: string;
|
|
10
|
+
/** Shows only one deliverable (for a bundle); all of them when omitted */
|
|
11
|
+
deliverable?: string;
|
|
12
|
+
/** An outline you already have (fetched from the Delivery API during SSR, for example), which skips the fetch */
|
|
13
|
+
outline?: PublicDeliverableOutline[];
|
|
14
|
+
/** Everything expanded by default; false expands only the first chapter */
|
|
15
|
+
expandAll?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function KanorioCurriculum({ product, deliverable, outline: given, expandAll, className, ...config }: KanorioCurriculumProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { KanorioCurriculum, type KanorioCurriculumProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{KanorioCurriculum}from"./chunk-H7VP4BYY.js";import"./chunk-5G3PQI25.js";import"./chunk-AF46NLXK.js";import"./chunk-4BEKWYEW.js";import"./chunk-OIKRLEW6.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-4MOCTNN7.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-MIQK3T3Y.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioCurriculum};
|
|
2
|
+
//# sourceMappingURL=curriculum.js.map
|