🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@flows/react-components

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flows/react-components - npm Package Compare versions

Comparing version
2.6.0
to
2.7.0
+2
dist/chunk-L5UHJ6SK.mjs
"use client"
var at=Object.defineProperty,lt=Object.defineProperties;var ct=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var G=(t,e,n)=>e in t?at(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v=(t,e)=>{for(var n in e||(e={}))Y.call(e,n)&&G(t,n,e[n]);if(k)for(var n of k(e))q.call(e,n)&&G(t,n,e[n]);return t},W=(t,e)=>lt(t,ct(e));var T=(t,e)=>{var n={};for(var o in t)Y.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&k)for(var o of k(t))e.indexOf(o)<0&&q.call(t,o)&&(n[o]=t[o]);return n};import{useCallback as mt}from"react";import{clsx as ut}from"clsx";import{jsx as X}from"react/jsx-runtime";var dt=(t,e)=>{if(e==="_blank")return!1;try{let n=new URL(t);return!1}catch(n){return!0}},Q=r=>{var s=r,{className:t,variant:e,size:n="default"}=s,o=T(s,["className","variant","size"]);let i=ut("flows_basicsV2_button",`flows_basicsV2_button_${e}`,`flows_basicsV2_button_size_${n}`,t),m=window.__flows_LinkComponent,c=o.href;if(m&&typeof m=="function"&&c&&dt(c,o.target))return X(m,{href:c,className:i,onClick:o.onClick,children:o.children});let l=o.href?"a":"button";return X(l,v({type:l==="button"?"button":void 0,className:i},o))};import{jsx as ft}from"react/jsx-runtime";var u=({action:t,variant:e,size:n,onClick:o,className:r})=>{let s=mt(()=>{var i;o==null||o(),(i=t.callAction)==null||i.call(t)},[t,o]);return ft(Q,{variant:e,size:n,href:t.url,target:t.openInNew?"_blank":void 0,onClick:s,className:r,children:t.label})};import{clsx as _t}from"clsx";import{jsx as yt}from"react/jsx-runtime";var d=o=>{var r=o,{className:t,variant:e}=r,n=T(r,["className","variant"]);return yt("p",v({className:_t("flows_basicsV2_text",`flows_basicsV2_text_${e}`,t)},n))};import gt from"dompurify";import{jsx as Z}from"react/jsx-runtime";function h(t){return Z("svg",W(v({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:Z("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}import{clsx as bt}from"clsx";import{jsx as pt}from"react/jsx-runtime";var N=n=>{var o=n,{className:t}=o,e=T(o,["className"]);return pt("button",v({type:"button",className:bt("flows_basicsV2_iconButton",t)},e))};import{jsx as _,jsxs as K}from"react/jsx-runtime";var Ee=t=>{var o;let e=[];t.primaryButton&&e.push(_(u,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&e.push(_(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&e.reverse();let n=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return K("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:n},children:[_(d,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),_(d,{variant:"body",dangerouslySetInnerHTML:{__html:gt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&e.length?_("div",{className:"flows_basicsV2_card_footer",children:_("div",{className:"flows_basicsV2_card_buttons",children:e})}):null,t.tour&&((o=t.dots)!=null?o:e.length)?K("div",{className:"flows_basicsV2_card_footer",children:[t.dots,e.length?_("div",{className:"flows_basicsV2_card_buttons_wrapper",children:_("div",{className:"flows_basicsV2_card_buttons",children:e})}):null]}):null,t.onClose?_(N,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:_(h,{})}):null]})};import{flip as Et,autoUpdate as Tt,offset as Vt,shift as Rt,useFloating as J}from"@floating-ui/react-dom";var wt="#22262d",vt="#fff",L="%cFlows%c",I=`color:${vt};background:${wt};padding:2px 4px;border-radius:4px`,D={error:(t,...e)=>{console.error(`${L} ${t}`,I,"",...e)},warn:(t,...e)=>{console.warn(`${L} ${t}`,I,"",...e)},info:(t,...e)=>{console.info(`${L} ${t}`,I,"",...e)}};import{useCallback as j,useEffect as $,useRef as xt,useState as tt}from"react";import Ft from"dompurify";import{useEffect as ht,useState as Nt}from"react";var S=()=>{let[t,e]=Nt(!0);return ht(()=>{e(!1)},[]),t};import{useState as Ct,useEffect as At}from"react";var Bt=t=>typeof window=="undefined"?null:document.querySelector(t);function O(t){let[e,n]=Ct(t?Bt(t):null);return At(()=>{if(!t){n(null);return}let o=()=>{let s=document.querySelector(t);n(i=>i!==s?s:i)};o();let r=new MutationObserver(s=>{s.some(m=>m.addedNodes.length>0||m.removedNodes.length>0)&&o()});return r.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{r.disconnect()}},[t]),e}import{Fragment as St,jsx as b,jsxs as z}from"react/jsx-runtime";var Pt=300,kt=8,Dt=4,et="data-flows-hint-target",ot=(t,e,n)=>Tt(t,e,n,{animationFrame:!0}),Ge=t=>{var V,R,g;let e=S(),[n,o]=tt(!1),[r,s]=tt(!1),i=xt(null),m=j(()=>{var w;o(!0),s(!1),window.clearTimeout((w=i.current)!=null?w:void 0),i.current=null},[]),c=j(()=>{s(!0),i.current=window.setTimeout(()=>{o(!1),s(!1),i.current=null},Pt)},[]),l=O(t.targetElement),C=J({placement:t.placement,elements:{reference:l},whileElementsMounted:ot,transform:!1}),B=C.refs.floating,p=J({placement:"bottom",elements:{reference:C.refs.floating.current},whileElementsMounted:ot,transform:!1,middleware:[Et({fallbackPlacements:["top","bottom","left","right"]}),Rt({crossAxis:!0,padding:kt}),Vt(Dt)]}),x=p.refs.floating;if($(()=>{let w=F=>{let E=F.target,a=x.current,P=B.current;if(!a||!E.isConnected)return;!a.contains(E)&&!(P!=null&&P.contains(E))&&c()};return window.addEventListener("click",w),()=>{window.removeEventListener("click",w)}},[c,B,x]),$(()=>(l==null||l.setAttribute(et,"true"),()=>{l==null||l.removeAttribute(et)}),[l]),$(()=>{t.targetElement||D.error("Cannot render Hint without target element")},[t.targetElement]),!l||e)return null;let A=[];return t.secondaryButton&&A.push(b(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&A.push(b(u,{action:t.primaryButton,variant:"primary"},"primary")),z(St,{children:[b("button",{ref:C.refs.setFloating,style:{left:C.x+((V=t.offsetX)!=null?V:0),top:C.y+((R=t.offsetY)!=null?R:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:n&&!r?c:m}),n?z("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":r?"false":"true",ref:p.refs.setFloating,style:{left:p.x,top:p.y},children:[b(d,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),b(d,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Ft.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((g=t.dots)!=null?g:A.length)?z("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,A.length?b("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:b("div",{className:"flows_basicsV2_tooltip_buttons",children:A})}):null]}):null,t.onClose?b(N,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:b(h,{})}):null]}):null]})};import{clsx as Ot}from"clsx";import Mt from"dompurify";import{Fragment as Lt,jsx as y,jsxs as nt}from"react/jsx-runtime";var je=t=>{let e=t.position||"center",n=t.size||"small",o=[];return t.secondaryButton&&o.push(y(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&o.push(y(u,{action:t.primaryButton,variant:"primary"},"primary")),nt(Lt,{children:[t.overlay?y("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,y("div",{className:"flows_basicsV2_modal_wrapper",children:nt("div",{className:Ot("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${e}`,`flows_basicsV2_modal_width_${n}`),children:[y(d,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),y(d,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Mt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?y("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,o.length?y("div",{className:"flows_basicsV2_modal_footer",children:o}):null,t.onClose?y(N,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:y(h,{})}):null]})})]})};import{arrow as It,flip as $t,autoUpdate as zt,offset as Ut,shift as Ht,useFloating as Gt}from"@floating-ui/react-dom";import{clsx as st}from"clsx";import{useCallback as Yt,useEffect as M,useMemo as qt,useRef as U,useState as Wt}from"react";import Xt from"dompurify";import{jsx as f,jsxs as H}from"react/jsx-runtime";var Qt=4,rt=6,Zt=Qt+rt,Kt=8,Jt=8,it="data-flows-tooltip-target",jt=(t,e,n)=>zt(t,e,n,{animationFrame:!0}),_o=t=>{var w,F,E;let e=S(),n=U(null),o=U(null),r=U(null),s=O(t.targetElement),{refs:i,middlewareData:m,placement:c,x:l,y:C}=Gt({placement:t.placement,elements:{reference:s},whileElementsMounted:jt,middleware:[$t({fallbackPlacements:["top","bottom","left","right"]}),Ht({crossAxis:!0,padding:Kt}),It({element:o,padding:Jt}),Ut(Zt)]}),[B,p]=Wt(!1);M(()=>{s||p(!1)},[s]),M(()=>{if(B)return;let a=i.floating.current;if(!a)return;window.getComputedStyle(a).animationName!=="none"||p(!0)},[B,i.floating]);let x=Yt(()=>{p(!0)},[]),A=qt(()=>c.includes("top")?"bottom":c.includes("bottom")?"top":c.includes("left")?"right":"left",[c]);if(M(()=>(s==null||s.setAttribute(it,"true"),()=>{s==null||s.removeAttribute(it)}),[s]),M(()=>{t.targetElement||D.error("Cannot render Tooltip without target element")},[t.targetElement]),!s||e)return null;i.floating.current&&(i.floating.current.style.left=`${l}px`,i.floating.current.style.top=`${C}px`);let V=(w=m.arrow)==null?void 0:w.x,R=(F=m.arrow)==null?void 0:F.y;if([o,n].forEach(a=>{a.current&&(a.current.style.left=V!=null?`${V}px`:"",a.current.style.top=R!=null?`${R}px`:"",a.current.style.right="",a.current.style.bottom="",a.current.style[A]=`${-rt}px`)}),r.current){let a=s.getBoundingClientRect();r.current.style.top=`${a.top}px`,r.current.style.left=`${a.left}px`,r.current.style.width=`${a.width}px`,r.current.style.height=`${a.height}px`}let g=[];return t.secondaryButton&&g.push(f(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&g.push(f(u,{action:t.primaryButton,variant:"primary"},"primary")),H("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?f("div",{className:"flows_basicsV2_tooltip_overlay",ref:r}):null,H("div",{className:"flows_basicsV2_tooltip_tooltip",ref:i.setFloating,"data-open":B?"true":"false",onAnimationEnd:x,children:[f(d,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),f(d,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Xt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((E=t.dots)!=null?E:g.length)?H("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,g.length?f("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:f("div",{className:"flows_basicsV2_tooltip_buttons",children:g})}):null]}):null,t.onClose?f(N,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:f(h,{})}):null,f("div",{className:st("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:o}),f("div",{className:st("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:n})]})]})};export{v as a,W as b,u as c,d,Ee as e,Ge as f,je as g,_o as h};
+1
-1
"use client"
"use strict";var Zt=Object.create;var Y=Object.defineProperty,Xt=Object.defineProperties,qt=Object.getOwnPropertyDescriptor,Wt=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,Kt=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var ut=(t,e,o)=>e in t?Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,f=(t,e)=>{for(var o in e||(e={}))tt.call(e,o)&&ut(t,o,e[o]);if(Z)for(var o of Z(e))ft.call(e,o)&&ut(t,o,e[o]);return t},L=(t,e)=>Xt(t,Wt(e));var $=(t,e)=>{var o={};for(var n in t)tt.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Z)for(var n of Z(t))e.indexOf(n)<0&&ft.call(t,n)&&(o[n]=t[n]);return o};var Jt=(t,e)=>{for(var o in e)Y(t,o,{get:e[o],enumerable:!0})},_t=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Qt(e))!tt.call(t,s)&&s!==o&&Y(t,s,{get:()=>e[s],enumerable:!(n=qt(e,s))||n.enumerable});return t};var G=(t,e,o)=>(o=t!=null?Zt(Kt(t)):{},_t(e||!t||!t.__esModule?Y(o,"default",{value:t,enumerable:!0}):o,t)),jt=t=>_t(Y({},"__esModule",{value:!0}),t);var Ne={};Jt(Ne,{BasicsV2Card:()=>oe,BasicsV2FloatingChecklist:()=>le,BasicsV2Hint:()=>_e,BasicsV2Modal:()=>Ce,BasicsV2Tooltip:()=>Be});module.exports=jt(Ne);var Bt=G(require("dompurify"));var et=require("react/jsx-runtime");function I(t){return(0,et.jsx)("svg",L(f({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,et.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var yt=require("react");var pt=require("clsx");var ot=require("react/jsx-runtime"),te=(t,e)=>{if(e==="_blank")return!1;try{let o=new URL(t);return!1}catch(o){return!0}},Ct=s=>{var l=s,{className:t,variant:e,size:o="default"}=l,n=$(l,["className","variant","size"]);let a=(0,pt.clsx)("flows_basicsV2_button",`flows_basicsV2_button_${e}`,`flows_basicsV2_button_size_${o}`,t),d=window.__flows_LinkComponent,g=n.href;if(d&&typeof d=="function"&&g&&te(g,n.target))return(0,ot.jsx)(d,{href:g,className:a,onClick:n.onClick,children:n.children});let A=n.href?"a":"button";return(0,ot.jsx)(A,f({type:A==="button"?"button":void 0,className:a},n))};var gt=require("react/jsx-runtime"),u=({action:t,variant:e,size:o,onClick:n,className:s})=>{let l=(0,yt.useCallback)(()=>{var a;n==null||n(),(a=t.callAction)==null||a.call(t)},[t,n]);return(0,gt.jsx)(Ct,{variant:e,size:o,href:t.url,target:t.openInNew?"_blank":void 0,onClick:l,className:s,children:t.label})};var bt=require("clsx");var ht=require("react/jsx-runtime"),O=o=>{var n=o,{className:t}=n,e=$(n,["className"]);return(0,ht.jsx)("button",f({type:"button",className:(0,bt.clsx)("flows_basicsV2_iconButton",t)},e))};var vt=require("clsx");var wt=require("react/jsx-runtime"),m=n=>{var s=n,{className:t,variant:e}=s,o=$(s,["className","variant"]);return(0,wt.jsx)("p",f({className:(0,vt.clsx)("flows_basicsV2_text",`flows_basicsV2_text_${e}`,t)},o))};var v=require("react/jsx-runtime"),Nt=t=>{var n;let e=[];t.primaryButton&&e.push((0,v.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&e.push((0,v.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&e.reverse();let o=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return(0,v.jsxs)("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:o},children:[(0,v.jsx)(m,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),(0,v.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:Bt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&e.length?(0,v.jsx)("div",{className:"flows_basicsV2_card_footer",children:(0,v.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null,t.tour&&((n=t.dots)!=null?n:e.length)?(0,v.jsxs)("div",{className:"flows_basicsV2_card_footer",children:[t.dots,e.length?(0,v.jsx)("div",{className:"flows_basicsV2_card_buttons_wrapper",children:(0,v.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null]}):null,t.onClose?(0,v.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:(0,v.jsx)(I,{})}):null]})};var kt=require("react/jsx-runtime"),ee=t=>(0,kt.jsx)(Nt,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.close:void 0,width:t.width,tour:!1}),oe=ee;var r=require("react"),rt=G(require("dompurify"));var nt=require("react/jsx-runtime");function X(t){return(0,nt.jsx)("svg",L(f({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,nt.jsx)("path",{d:"M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"})}))}var it=require("react/jsx-runtime");function Vt(t){return(0,it.jsx)("svg",L(f({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,it.jsx)("path",{d:"M4.00467 9.90936C4.47969 9.92404 4.9358 10.091 5.30545 10.384L5.4578 10.5178L5.46756 10.5265C6.29333 11.3419 6.28038 12.6477 5.57303 13.4846L5.57205 13.4836C5.26637 13.8467 4.84929 14.1108 4.45389 14.3039C4.04925 14.5015 3.61374 14.6515 3.2244 14.7629C2.83297 14.8748 2.47214 14.9523 2.20975 15.0021C2.07819 15.0271 1.96974 15.0457 1.89334 15.0578C1.8551 15.0639 1.82398 15.0683 1.80252 15.0715C1.79197 15.073 1.78323 15.0745 1.77713 15.0754C1.77436 15.0758 1.7703 15.0764 1.7703 15.0764H1.76639C1.53476 15.1073 1.30175 15.0287 1.13651 14.8635C0.971325 14.6982 0.892655 14.4652 0.923617 14.2336V14.2297C0.923617 14.2297 0.924208 14.2256 0.924593 14.2228C0.925447 14.2167 0.926954 14.2081 0.928499 14.1974C0.931608 14.1761 0.936144 14.1456 0.942171 14.1076C0.954274 14.0313 0.972854 13.9228 0.997835 13.7912C1.04767 13.5287 1.12506 13.1673 1.23709 12.7756C1.34847 12.3862 1.49842 11.9507 1.69608 11.5461C1.88948 11.1501 2.15347 10.7317 2.51737 10.426C2.93255 10.0763 3.46219 9.89261 4.00467 9.90936ZM7.24979 13.3332V10.3107L5.68924 8.75018H2.66678C2.44443 8.75018 2.23311 8.65134 2.09061 8.48065C1.94833 8.31007 1.88893 8.08496 1.9285 7.86639L1.92948 7.86444V7.86248C1.92948 7.86248 1.92996 7.85829 1.93045 7.85565C1.93149 7.85016 1.93354 7.84239 1.93534 7.83319C1.93893 7.8148 1.94422 7.78896 1.95096 7.75702C1.96448 7.69294 1.98444 7.60246 2.01151 7.49334C2.06543 7.276 2.14805 6.9771 2.26541 6.6535C2.48216 6.05594 2.8822 5.17898 3.5828 4.71014L3.58377 4.70916C3.99623 4.43419 4.47689 4.3224 4.90702 4.28241C5.34364 4.24183 5.78587 4.2703 6.16776 4.31952C6.49492 4.36168 6.79235 4.42332 7.02616 4.47772C7.83659 3.34782 8.8913 2.41097 10.114 1.73846C11.5097 0.970905 13.0789 0.573308 14.6717 0.583188C15.0839 0.585868 15.4167 0.920942 15.4168 1.33319C15.4168 3.21468 14.8889 6.4889 11.5222 8.97869C11.5764 9.21178 11.6385 9.50719 11.6805 9.83221C11.7297 10.2141 11.7581 10.6564 11.7176 11.093C11.6776 11.5231 11.5658 12.0037 11.2908 12.4162L11.2898 12.4172C10.821 13.1178 9.94404 13.5178 9.34647 13.7346C9.02285 13.8519 8.72396 13.9345 8.50662 13.9885C8.39735 14.0156 8.30705 14.0365 8.24295 14.05C8.21095 14.0567 8.18517 14.061 8.16678 14.0646C8.15758 14.0664 8.1498 14.0685 8.14432 14.0695C8.14175 14.07 8.13748 14.0705 8.13748 14.0705L8.13553 14.0715H8.13358C7.91497 14.111 7.68988 14.0517 7.51932 13.9094C7.34863 13.7669 7.24979 13.5555 7.24979 13.3332ZM3.95877 11.4084C3.78547 11.403 3.61572 11.4617 3.48319 11.5734L3.48221 11.5744C3.34634 11.6886 3.19393 11.8968 3.04373 12.2043C2.89768 12.5033 2.77642 12.8488 2.67948 13.1877C2.66228 13.2478 2.64802 13.308 2.6326 13.3664C2.69123 13.3509 2.7519 13.3378 2.81229 13.3205C3.15122 13.2235 3.49663 13.1023 3.79569 12.9562C4.10322 12.806 4.31135 12.6536 4.42557 12.5178L4.42752 12.5158C4.66586 12.2337 4.64014 11.822 4.41483 11.5969C4.29036 11.4812 4.12877 11.4137 3.95877 11.4084ZM10.1609 9.83026C9.70217 10.0789 9.23126 10.3043 8.74979 10.506V12.3517C8.7776 12.3421 8.80651 12.3346 8.83475 12.3244C9.40878 12.1162 9.86586 11.8491 10.0437 11.5832C10.1284 11.4556 10.196 11.2495 10.2234 10.9543C10.2503 10.6648 10.2339 10.3409 10.1931 10.0246C10.1846 9.95836 10.171 9.89361 10.1609 9.83026ZM13.8787 2.11737C12.8142 2.21762 11.7784 2.53498 10.8367 3.05291C9.66522 3.69722 8.67847 4.6313 7.96952 5.76483L7.96463 5.77069C7.54695 6.42306 7.18496 7.1093 6.88162 7.82147L8.17948 9.11932C8.9013 8.81632 9.59725 8.45463 10.2596 8.03631C12.9928 6.19872 13.7245 3.81048 13.8787 2.11737ZM5.04569 5.77655C4.74999 5.80406 4.54329 5.87135 4.4158 5.95623L4.41678 5.95721C4.15104 6.13531 3.88367 6.59151 3.67557 7.16522C3.66529 7.19356 3.65692 7.22227 3.64725 7.25018H5.49588C5.70028 6.76879 5.92833 6.29797 6.18045 5.84002C6.11394 5.82931 6.04609 5.81581 5.97635 5.80682C5.6599 5.76604 5.33532 5.74963 5.04569 5.77655Z"})}))}var q=require("react");function xt(t){let e=(0,q.useRef)(t);return(0,q.useEffect)(()=>{e.current=t},[t]),e.current}var S=require("react"),lt=G(require("dompurify"));var st=require("react/jsx-runtime");function Tt(t){return(0,st.jsx)("svg",L(f({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,st.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.03 5.22032C12.1705 5.36094 12.2494 5.55157 12.2494 5.75032C12.2494 5.94907 12.1705 6.13969 12.03 6.28032L7.53003 10.7803C7.38941 10.9208 7.19878 10.9997 7.00003 10.9997C6.80128 10.9997 6.61066 10.9208 6.47003 10.7803L4.22003 8.53032C4.14634 8.46165 4.08724 8.37885 4.04625 8.28685C4.00526 8.19486 3.98322 8.09554 3.98144 7.99484C3.97966 7.89414 3.99819 7.79411 4.03591 7.70072C4.07363 7.60733 4.12977 7.5225 4.20099 7.45128C4.27221 7.38006 4.35705 7.32391 4.45043 7.28619C4.54382 7.24847 4.64385 7.22995 4.74455 7.23172C4.84526 7.2335 4.94457 7.25554 5.03657 7.29654C5.12857 7.33753 5.21137 7.39663 5.28003 7.47032L7.00003 9.19032L10.97 5.22032C11.1107 5.07987 11.3013 5.00098 11.5 5.00098C11.6988 5.00098 11.8894 5.07987 12.03 5.22032Z"})}))}var _=require("react/jsx-runtime"),Pt=t=>{var o;return t.triggers.length===1&&((o=t.triggers.at(0))==null?void 0:o.type)==="manual"},Et=t=>{var d;let{onNonManualButtonClick:e,toggleExpanded:o}=t,n=(0,S.useCallback)(()=>{o(t.index)},[t.index,o]),s=(0,S.useRef)(null);(0,S.useEffect)(()=>{s.current&&s.current.style.setProperty("--flows-content-height",`${s.current.scrollHeight}px`)},[]);let l=(0,S.useCallback)(()=>{Pt(t.completed)||e()},[e,t.completed]),a=(0,S.useCallback)(()=>{Pt(t.completed)&&t.completed.setValue(!0),l()},[l,t.completed]);return(0,_.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item","data-expanded":t.expanded?"true":"false",children:[(0,_.jsxs)("button",{type:"button",className:"flows_basicsV2_floating_checklist_item_expand_button",onClick:n,"data-expanded":t.expanded?"true":"false",children:[(0,_.jsx)(ne,{completed:t.completed.value}),(0,_.jsx)("span",{className:"flows_basicsV2_floating_checklist_item_title",dangerouslySetInnerHTML:{__html:lt.default.sanitize(t.title,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),(0,_.jsx)(X,{className:"flows_basicsV2_floating_checklist_item_chevron","data-expanded":t.expanded?"true":"false","aria-hidden":"true"})]}),(0,_.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_content",ref:s,"data-expanded":t.expanded?"true":"false",children:(0,_.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item_content_inner",children:[t.description?(0,_.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:lt.default.sanitize(t.description,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,((d=t.primaryButton)!=null?d:t.secondaryButton)?(0,_.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item_buttons",children:[t.primaryButton?(0,_.jsx)(u,{onClick:a,action:t.primaryButton,variant:"primary",size:"small"}):null,t.secondaryButton?(0,_.jsx)(u,{action:t.secondaryButton,onClick:e,variant:"secondary",size:"small"}):null]}):null]})})]})},ne=({completed:t})=>t?(0,_.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_indicator flows_basicsV2_floating_checklist_item_indicator_completed",children:(0,_.jsx)(Tt,{})}):(0,_.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_indicator"});var Rt=require("clsx"),at=require("react/jsx-runtime"),At=({max:t,value:e,className:o})=>{let n=e/t*100||0;return(0,at.jsx)("div",{className:(0,Rt.clsx)("flows_basicsV2_progress",o),"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,role:"progressbar",children:(0,at.jsx)("div",{className:"flows_basicsV2_progress_indicator",style:{width:`${n}%`}})})};var U=require("react/jsx-runtime"),Ft=t=>(0,U.jsxs)("div",{className:"flows_basicsV2_floating_checklist_progress",children:[(0,U.jsxs)("p",{className:"flows_basicsV2_floating_checklist_progress_text",children:[t.completedItems," / ",t.totalItems]}),(0,U.jsx)(At,{max:t.totalItems,value:t.completedItems})]});var c=require("react/jsx-runtime"),ie=300,se=t=>{let e=t.position||"bottom-right",o=`floating-checklist-open-${t.__flows.id}`,[n,s]=(0,r.useState)(!1),[l,a]=(0,r.useState)(!1),[d,g]=(0,r.useState)(null),A=(0,r.useCallback)(i=>{g(h=>h===i?null:i)},[]),[N,F]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(!N)return;F(!1);let i=window.sessionStorage.getItem(o);s(i!==null?i==="true":t.defaultOpen)},[N,t.defaultOpen,o]),(0,r.useEffect)(()=>{N||window.sessionStorage.setItem(o,String(n))},[n,N,o]);let b=xt(t.items);(0,r.useEffect)(()=>{b!==void 0&&t.items.forEach((i,h)=>{let z=b.at(h);z&&!z.completed.value&&i.completed.value&&d===h&&g(null)})},[d,b,t.items]);let D=(0,r.useMemo)(()=>t.items.filter(i=>i.completed.value),[t.items]),P=t.items.length===D.length,k=(0,r.useRef)(null),E=(0,r.useCallback)(()=>{var i;window.clearTimeout((i=k.current)!=null?i:void 0),k.current=null,a(!0),k.current=window.setTimeout(()=>{s(!1),a(!1),k.current=null},ie)},[]),B=(0,r.useCallback)(()=>{var i;window.clearTimeout((i=k.current)!=null?i:void 0),k.current=null,a(!1),s(!0)},[]),R=(0,r.useCallback)(()=>{n&&!l?E():B()},[l,n,E,B]),H=(0,r.useRef)(null),M=(0,r.useCallback)(()=>{var i;t.hideOnClick&&(E(),(i=H.current)==null||i.focus())},[E,t.hideOnClick]);return(0,r.useEffect)(()=>{!t.openOnItemCompleted||b===void 0||t.items.forEach((i,h)=>{let z=b.at(h);z&&!z.completed.value&&i.completed.value&&B()})},[B,b,t.items,t.openOnItemCompleted]),(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist","data-position":e,children:[(0,c.jsxs)("button",{type:"button",className:"flows_basicsV2_floating_checklist_widget_button",onClick:R,ref:H,children:[(0,c.jsx)(Vt,{"aria-hidden":"true"}),t.widgetTitle,(0,c.jsx)(X,{className:"flows_basicsV2_floating_checklist_widget_button_chevron","data-open":n&&!l?"true":"false","aria-hidden":"true"})]}),n?(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_popover","data-open":l?"false":"true",children:[(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_header",children:[t.popupTitle?(0,c.jsx)(m,{variant:"title",className:"flows_basicsV2_floating_checklist_title",dangerouslySetInnerHTML:{__html:rt.default.sanitize(t.popupTitle,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,t.popupDescription?(0,c.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:rt.default.sanitize(t.popupDescription,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null]}),(0,c.jsx)(Ft,{completedItems:D.length,totalItems:t.items.length}),!P&&(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_items",children:[t.items.map((i,h)=>(0,c.jsx)(Et,f({index:h,expanded:d===h,toggleExpanded:A,onNonManualButtonClick:M},i),h)),t.skipButton?(0,c.jsx)("div",{className:"flows_basicsV2_floating_checklist_skip_button",children:(0,c.jsx)(u,{variant:"text",action:t.skipButton})}):null]}),P?(0,c.jsx)("div",{className:"flows_basicsV2_floating_checklist_completed",children:(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_completed_inner",children:[(0,c.jsx)(m,{variant:"title",className:"flows_basicsV2_floating_checklist_completed_title",children:t.completedTitle}),(0,c.jsx)(m,{variant:"body",className:"flows_basicsV2_floating_checklist_completed_description",children:t.completedDescription}),t.completedButton?(0,c.jsx)(u,{variant:"primary",size:"small",action:t.completedButton,className:"flows_basicsV2_floating_checklist_completed_button"}):null]})}):null]}):null]})},le=se;var x=require("@floating-ui/react-dom");var ae="#22262d",re="#fff",ct="%cFlows%c",mt=`color:${re};background:${ae};padding:2px 4px;border-radius:4px`,W={error:(t,...e)=>{console.error(`${ct} ${t}`,mt,"",...e)},warn:(t,...e)=>{console.warn(`${ct} ${t}`,mt,"",...e)},info:(t,...e)=>{console.info(`${ct} ${t}`,mt,"",...e)}};var T=require("react"),Lt=G(require("dompurify"));var Q=require("react"),K=()=>{let[t,e]=(0,Q.useState)(!0);return(0,Q.useEffect)(()=>{e(!1)},[]),t};var J=require("react"),ce=t=>typeof window=="undefined"?null:document.querySelector(t);function j(t){let[e,o]=(0,J.useState)(t?ce(t):null);return(0,J.useEffect)(()=>{if(!t){o(null);return}let n=()=>{let l=document.querySelector(t);o(a=>a!==l?l:a)};n();let s=new MutationObserver(l=>{l.some(d=>d.addedNodes.length>0||d.removedNodes.length>0)&&n()});return s.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{s.disconnect()}},[t]),e}var p=require("react/jsx-runtime"),me=300,de=8,ue=4,Mt=(t,e,o)=>(0,x.autoUpdate)(t,e,o,{animationFrame:!0}),It=t=>{var k,E,B;let e=K(),[o,n]=(0,T.useState)(!1),[s,l]=(0,T.useState)(!1),a=(0,T.useRef)(null),d=(0,T.useCallback)(()=>{var R;n(!0),l(!1),window.clearTimeout((R=a.current)!=null?R:void 0),a.current=null},[]),g=(0,T.useCallback)(()=>{l(!0),a.current=window.setTimeout(()=>{n(!1),l(!1),a.current=null},me)},[]),A=j(t.targetElement),N=(0,x.useFloating)({placement:t.placement,elements:{reference:A},whileElementsMounted:Mt,transform:!1}),F=N.refs.floating,b=(0,x.useFloating)({placement:"bottom",elements:{reference:N.refs.floating.current},whileElementsMounted:Mt,transform:!1,middleware:[(0,x.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,x.shift)({crossAxis:!0,padding:de}),(0,x.offset)(ue)]}),D=b.refs.floating;if((0,T.useEffect)(()=>{let R=H=>{let M=H.target,i=D.current,h=F.current;if(!i||!M.isConnected)return;!i.contains(M)&&!(h!=null&&h.contains(M))&&g()};return window.addEventListener("click",R),()=>{window.removeEventListener("click",R)}},[g,F,D]),(0,T.useEffect)(()=>{t.targetElement||W.error("Cannot render Hint without target element")},[t.targetElement]),!A||e)return null;let P=[];return t.secondaryButton&&P.push((0,p.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&P.push((0,p.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("button",{ref:N.refs.setFloating,style:{left:N.x+((k=t.offsetX)!=null?k:0),top:N.y+((E=t.offsetY)!=null?E:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:o&&!s?g:d}),o?(0,p.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":s?"false":"true",ref:b.refs.setFloating,style:{left:b.x,top:b.y},children:[(0,p.jsx)(m,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,p.jsx)(m,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Lt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((B=t.dots)!=null?B:P.length)?(0,p.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,P.length?(0,p.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,p.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:P})}):null]}):null,t.onClose?(0,p.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,p.jsx)(I,{})}):null]}):null]})};var Ot=require("react/jsx-runtime"),fe=t=>(0,Ot.jsx)(It,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),_e=fe;var St=require("clsx"),Dt=G(require("dompurify"));var C=require("react/jsx-runtime"),Ht=t=>{let e=t.position||"center",o=t.size||"small",n=[];return t.secondaryButton&&n.push((0,C.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&n.push((0,C.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,C.jsxs)(C.Fragment,{children:[t.overlay?(0,C.jsx)("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,(0,C.jsx)("div",{className:"flows_basicsV2_modal_wrapper",children:(0,C.jsxs)("div",{className:(0,St.clsx)("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${e}`,`flows_basicsV2_modal_width_${o}`),children:[(0,C.jsx)(m,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),(0,C.jsx)(m,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Dt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?(0,C.jsx)("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,n.length?(0,C.jsx)("div",{className:"flows_basicsV2_modal_footer",children:n}):null,t.onClose?(0,C.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:(0,C.jsx)(I,{})}):null]})})]})};var zt=require("react/jsx-runtime"),pe=t=>(0,zt.jsx)(Ht,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,position:t.position,size:t.size}),Ce=pe;var V=require("@floating-ui/react-dom");var dt=require("clsx"),w=require("react"),$t=G(require("dompurify"));var y=require("react/jsx-runtime"),ye=4,Gt=6,ge=ye+Gt,be=8,he=8,ve=(t,e,o)=>(0,V.autoUpdate)(t,e,o,{animationFrame:!0}),Yt=t=>{var R,H,M;let e=K(),o=(0,w.useRef)(null),n=(0,w.useRef)(null),s=(0,w.useRef)(null),l=j(t.targetElement),{refs:a,middlewareData:d,placement:g,x:A,y:N}=(0,V.useFloating)({placement:t.placement,elements:{reference:l},whileElementsMounted:ve,middleware:[(0,V.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,V.shift)({crossAxis:!0,padding:be}),(0,V.arrow)({element:n,padding:he}),(0,V.offset)(ge)]}),[F,b]=(0,w.useState)(!1);(0,w.useEffect)(()=>{l||b(!1)},[l]),(0,w.useEffect)(()=>{if(F)return;let i=a.floating.current;if(!i)return;window.getComputedStyle(i).animationName!=="none"||b(!0)},[F,a.floating]);let D=(0,w.useCallback)(()=>{b(!0)},[]),P=(0,w.useMemo)(()=>g.includes("top")?"bottom":g.includes("bottom")?"top":g.includes("left")?"right":"left",[g]);if((0,w.useEffect)(()=>{t.targetElement||W.error("Cannot render Tooltip without target element")},[t.targetElement]),!l||e)return null;a.floating.current&&(a.floating.current.style.left=`${A}px`,a.floating.current.style.top=`${N}px`);let k=(R=d.arrow)==null?void 0:R.x,E=(H=d.arrow)==null?void 0:H.y;if([n,o].forEach(i=>{i.current&&(i.current.style.left=k!=null?`${k}px`:"",i.current.style.top=E!=null?`${E}px`:"",i.current.style.right="",i.current.style.bottom="",i.current.style[P]=`${-Gt}px`)}),s.current){let i=l.getBoundingClientRect();s.current.style.top=`${i.top}px`,s.current.style.left=`${i.left}px`,s.current.style.width=`${i.width}px`,s.current.style.height=`${i.height}px`}let B=[];return t.secondaryButton&&B.push((0,y.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&B.push((0,y.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,y.jsxs)("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?(0,y.jsx)("div",{className:"flows_basicsV2_tooltip_overlay",ref:s}):null,(0,y.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip",ref:a.setFloating,"data-open":F?"true":"false",onAnimationEnd:D,children:[(0,y.jsx)(m,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,y.jsx)(m,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:$t.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((M=t.dots)!=null?M:B.length)?(0,y.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,B.length?(0,y.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,y.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:B})}):null]}):null,t.onClose?(0,y.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,y.jsx)(I,{})}):null,(0,y.jsx)("div",{className:(0,dt.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:n}),(0,y.jsx)("div",{className:(0,dt.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:o})]})]})};var Ut=require("react/jsx-runtime"),we=t=>(0,Ut.jsx)(Yt,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),Be=we;
"use strict";var qt=Object.create;var U=Object.defineProperty,Wt=Object.defineProperties,Qt=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,jt=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var ut=(t,e,o)=>e in t?U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,_=(t,e)=>{for(var o in e||(e={}))tt.call(e,o)&&ut(t,o,e[o]);if(Z)for(var o of Z(e))ft.call(e,o)&&ut(t,o,e[o]);return t},L=(t,e)=>Wt(t,Kt(e));var $=(t,e)=>{var o={};for(var n in t)tt.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Z)for(var n of Z(t))e.indexOf(n)<0&&ft.call(t,n)&&(o[n]=t[n]);return o};var te=(t,e)=>{for(var o in e)U(t,o,{get:e[o],enumerable:!0})},_t=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Jt(e))!tt.call(t,s)&&s!==o&&U(t,s,{get:()=>e[s],enumerable:!(n=Qt(e,s))||n.enumerable});return t};var G=(t,e,o)=>(o=t!=null?qt(jt(t)):{},_t(e||!t||!t.__esModule?U(o,"default",{value:t,enumerable:!0}):o,t)),ee=t=>_t(U({},"__esModule",{value:!0}),t);var ke={};te(ke,{BasicsV2Card:()=>ie,BasicsV2FloatingChecklist:()=>re,BasicsV2Hint:()=>Ce,BasicsV2Modal:()=>ge,BasicsV2Tooltip:()=>Te});module.exports=ee(ke);var Bt=G(require("dompurify"));var et=require("react/jsx-runtime");function I(t){return(0,et.jsx)("svg",L(_({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,et.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var yt=require("react");var pt=require("clsx");var ot=require("react/jsx-runtime"),oe=(t,e)=>{if(e==="_blank")return!1;try{let o=new URL(t);return!1}catch(o){return!0}},Ct=s=>{var l=s,{className:t,variant:e,size:o="default"}=l,n=$(l,["className","variant","size"]);let a=(0,pt.clsx)("flows_basicsV2_button",`flows_basicsV2_button_${e}`,`flows_basicsV2_button_size_${o}`,t),d=window.__flows_LinkComponent,b=n.href;if(d&&typeof d=="function"&&b&&oe(b,n.target))return(0,ot.jsx)(d,{href:b,className:a,onClick:n.onClick,children:n.children});let f=n.href?"a":"button";return(0,ot.jsx)(f,_({type:f==="button"?"button":void 0,className:a},n))};var gt=require("react/jsx-runtime"),u=({action:t,variant:e,size:o,onClick:n,className:s})=>{let l=(0,yt.useCallback)(()=>{var a;n==null||n(),(a=t.callAction)==null||a.call(t)},[t,n]);return(0,gt.jsx)(Ct,{variant:e,size:o,href:t.url,target:t.openInNew?"_blank":void 0,onClick:l,className:s,children:t.label})};var bt=require("clsx");var ht=require("react/jsx-runtime"),O=o=>{var n=o,{className:t}=n,e=$(n,["className"]);return(0,ht.jsx)("button",_({type:"button",className:(0,bt.clsx)("flows_basicsV2_iconButton",t)},e))};var vt=require("clsx");var wt=require("react/jsx-runtime"),m=n=>{var s=n,{className:t,variant:e}=s,o=$(s,["className","variant"]);return(0,wt.jsx)("p",_({className:(0,vt.clsx)("flows_basicsV2_text",`flows_basicsV2_text_${e}`,t)},o))};var B=require("react/jsx-runtime"),Nt=t=>{var n;let e=[];t.primaryButton&&e.push((0,B.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&e.push((0,B.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&e.reverse();let o=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return(0,B.jsxs)("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:o},children:[(0,B.jsx)(m,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),(0,B.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:Bt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&e.length?(0,B.jsx)("div",{className:"flows_basicsV2_card_footer",children:(0,B.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null,t.tour&&((n=t.dots)!=null?n:e.length)?(0,B.jsxs)("div",{className:"flows_basicsV2_card_footer",children:[t.dots,e.length?(0,B.jsx)("div",{className:"flows_basicsV2_card_buttons_wrapper",children:(0,B.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null]}):null,t.onClose?(0,B.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:(0,B.jsx)(I,{})}):null]})};var Tt=require("react/jsx-runtime"),ne=t=>(0,Tt.jsx)(Nt,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.close:void 0,width:t.width,tour:!1}),ie=ne;var r=require("react"),rt=G(require("dompurify"));var nt=require("react/jsx-runtime");function X(t){return(0,nt.jsx)("svg",L(_({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,nt.jsx)("path",{d:"M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"})}))}var it=require("react/jsx-runtime");function kt(t){return(0,it.jsx)("svg",L(_({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,it.jsx)("path",{d:"M4.00467 9.90936C4.47969 9.92404 4.9358 10.091 5.30545 10.384L5.4578 10.5178L5.46756 10.5265C6.29333 11.3419 6.28038 12.6477 5.57303 13.4846L5.57205 13.4836C5.26637 13.8467 4.84929 14.1108 4.45389 14.3039C4.04925 14.5015 3.61374 14.6515 3.2244 14.7629C2.83297 14.8748 2.47214 14.9523 2.20975 15.0021C2.07819 15.0271 1.96974 15.0457 1.89334 15.0578C1.8551 15.0639 1.82398 15.0683 1.80252 15.0715C1.79197 15.073 1.78323 15.0745 1.77713 15.0754C1.77436 15.0758 1.7703 15.0764 1.7703 15.0764H1.76639C1.53476 15.1073 1.30175 15.0287 1.13651 14.8635C0.971325 14.6982 0.892655 14.4652 0.923617 14.2336V14.2297C0.923617 14.2297 0.924208 14.2256 0.924593 14.2228C0.925447 14.2167 0.926954 14.2081 0.928499 14.1974C0.931608 14.1761 0.936144 14.1456 0.942171 14.1076C0.954274 14.0313 0.972854 13.9228 0.997835 13.7912C1.04767 13.5287 1.12506 13.1673 1.23709 12.7756C1.34847 12.3862 1.49842 11.9507 1.69608 11.5461C1.88948 11.1501 2.15347 10.7317 2.51737 10.426C2.93255 10.0763 3.46219 9.89261 4.00467 9.90936ZM7.24979 13.3332V10.3107L5.68924 8.75018H2.66678C2.44443 8.75018 2.23311 8.65134 2.09061 8.48065C1.94833 8.31007 1.88893 8.08496 1.9285 7.86639L1.92948 7.86444V7.86248C1.92948 7.86248 1.92996 7.85829 1.93045 7.85565C1.93149 7.85016 1.93354 7.84239 1.93534 7.83319C1.93893 7.8148 1.94422 7.78896 1.95096 7.75702C1.96448 7.69294 1.98444 7.60246 2.01151 7.49334C2.06543 7.276 2.14805 6.9771 2.26541 6.6535C2.48216 6.05594 2.8822 5.17898 3.5828 4.71014L3.58377 4.70916C3.99623 4.43419 4.47689 4.3224 4.90702 4.28241C5.34364 4.24183 5.78587 4.2703 6.16776 4.31952C6.49492 4.36168 6.79235 4.42332 7.02616 4.47772C7.83659 3.34782 8.8913 2.41097 10.114 1.73846C11.5097 0.970905 13.0789 0.573308 14.6717 0.583188C15.0839 0.585868 15.4167 0.920942 15.4168 1.33319C15.4168 3.21468 14.8889 6.4889 11.5222 8.97869C11.5764 9.21178 11.6385 9.50719 11.6805 9.83221C11.7297 10.2141 11.7581 10.6564 11.7176 11.093C11.6776 11.5231 11.5658 12.0037 11.2908 12.4162L11.2898 12.4172C10.821 13.1178 9.94404 13.5178 9.34647 13.7346C9.02285 13.8519 8.72396 13.9345 8.50662 13.9885C8.39735 14.0156 8.30705 14.0365 8.24295 14.05C8.21095 14.0567 8.18517 14.061 8.16678 14.0646C8.15758 14.0664 8.1498 14.0685 8.14432 14.0695C8.14175 14.07 8.13748 14.0705 8.13748 14.0705L8.13553 14.0715H8.13358C7.91497 14.111 7.68988 14.0517 7.51932 13.9094C7.34863 13.7669 7.24979 13.5555 7.24979 13.3332ZM3.95877 11.4084C3.78547 11.403 3.61572 11.4617 3.48319 11.5734L3.48221 11.5744C3.34634 11.6886 3.19393 11.8968 3.04373 12.2043C2.89768 12.5033 2.77642 12.8488 2.67948 13.1877C2.66228 13.2478 2.64802 13.308 2.6326 13.3664C2.69123 13.3509 2.7519 13.3378 2.81229 13.3205C3.15122 13.2235 3.49663 13.1023 3.79569 12.9562C4.10322 12.806 4.31135 12.6536 4.42557 12.5178L4.42752 12.5158C4.66586 12.2337 4.64014 11.822 4.41483 11.5969C4.29036 11.4812 4.12877 11.4137 3.95877 11.4084ZM10.1609 9.83026C9.70217 10.0789 9.23126 10.3043 8.74979 10.506V12.3517C8.7776 12.3421 8.80651 12.3346 8.83475 12.3244C9.40878 12.1162 9.86586 11.8491 10.0437 11.5832C10.1284 11.4556 10.196 11.2495 10.2234 10.9543C10.2503 10.6648 10.2339 10.3409 10.1931 10.0246C10.1846 9.95836 10.171 9.89361 10.1609 9.83026ZM13.8787 2.11737C12.8142 2.21762 11.7784 2.53498 10.8367 3.05291C9.66522 3.69722 8.67847 4.6313 7.96952 5.76483L7.96463 5.77069C7.54695 6.42306 7.18496 7.1093 6.88162 7.82147L8.17948 9.11932C8.9013 8.81632 9.59725 8.45463 10.2596 8.03631C12.9928 6.19872 13.7245 3.81048 13.8787 2.11737ZM5.04569 5.77655C4.74999 5.80406 4.54329 5.87135 4.4158 5.95623L4.41678 5.95721C4.15104 6.13531 3.88367 6.59151 3.67557 7.16522C3.66529 7.19356 3.65692 7.22227 3.64725 7.25018H5.49588C5.70028 6.76879 5.92833 6.29797 6.18045 5.84002C6.11394 5.82931 6.04609 5.81581 5.97635 5.80682C5.6599 5.76604 5.33532 5.74963 5.04569 5.77655Z"})}))}var q=require("react");function Vt(t){let e=(0,q.useRef)(t);return(0,q.useEffect)(()=>{e.current=t},[t]),e.current}var S=require("react"),lt=G(require("dompurify"));var st=require("react/jsx-runtime");function Et(t){return(0,st.jsx)("svg",L(_({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,st.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.03 5.22032C12.1705 5.36094 12.2494 5.55157 12.2494 5.75032C12.2494 5.94907 12.1705 6.13969 12.03 6.28032L7.53003 10.7803C7.38941 10.9208 7.19878 10.9997 7.00003 10.9997C6.80128 10.9997 6.61066 10.9208 6.47003 10.7803L4.22003 8.53032C4.14634 8.46165 4.08724 8.37885 4.04625 8.28685C4.00526 8.19486 3.98322 8.09554 3.98144 7.99484C3.97966 7.89414 3.99819 7.79411 4.03591 7.70072C4.07363 7.60733 4.12977 7.5225 4.20099 7.45128C4.27221 7.38006 4.35705 7.32391 4.45043 7.28619C4.54382 7.24847 4.64385 7.22995 4.74455 7.23172C4.84526 7.2335 4.94457 7.25554 5.03657 7.29654C5.12857 7.33753 5.21137 7.39663 5.28003 7.47032L7.00003 9.19032L10.97 5.22032C11.1107 5.07987 11.3013 5.00098 11.5 5.00098C11.6988 5.00098 11.8894 5.07987 12.03 5.22032Z"})}))}var p=require("react/jsx-runtime"),xt=t=>{var o;return t.triggers.length===1&&((o=t.triggers.at(0))==null?void 0:o.type)==="manual"},Pt=t=>{var d;let{onNonManualButtonClick:e,toggleExpanded:o}=t,n=(0,S.useCallback)(()=>{o(t.index)},[t.index,o]),s=(0,S.useRef)(null);(0,S.useEffect)(()=>{s.current&&s.current.style.setProperty("--flows-content-height",`${s.current.scrollHeight}px`)},[]);let l=(0,S.useCallback)(()=>{xt(t.completed)||e()},[e,t.completed]),a=(0,S.useCallback)(()=>{xt(t.completed)&&t.completed.setValue(!0),l()},[l,t.completed]);return(0,p.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item","data-expanded":t.expanded?"true":"false",children:[(0,p.jsxs)("button",{type:"button",className:"flows_basicsV2_floating_checklist_item_expand_button",onClick:n,"data-expanded":t.expanded?"true":"false",children:[(0,p.jsx)(se,{completed:t.completed.value}),(0,p.jsx)("span",{className:"flows_basicsV2_floating_checklist_item_title",dangerouslySetInnerHTML:{__html:lt.default.sanitize(t.title,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),(0,p.jsx)(X,{className:"flows_basicsV2_floating_checklist_item_chevron","data-expanded":t.expanded?"true":"false","aria-hidden":"true"})]}),(0,p.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_content",ref:s,"data-expanded":t.expanded?"true":"false",children:(0,p.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item_content_inner",children:[t.description?(0,p.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:lt.default.sanitize(t.description,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,((d=t.primaryButton)!=null?d:t.secondaryButton)?(0,p.jsxs)("div",{className:"flows_basicsV2_floating_checklist_item_buttons",children:[t.primaryButton?(0,p.jsx)(u,{onClick:a,action:t.primaryButton,variant:"primary",size:"small"}):null,t.secondaryButton?(0,p.jsx)(u,{action:t.secondaryButton,onClick:e,variant:"secondary",size:"small"}):null]}):null]})})]})},se=({completed:t})=>t?(0,p.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_indicator flows_basicsV2_floating_checklist_item_indicator_completed",children:(0,p.jsx)(Et,{})}):(0,p.jsx)("div",{className:"flows_basicsV2_floating_checklist_item_indicator"});var Rt=require("clsx"),at=require("react/jsx-runtime"),At=({max:t,value:e,className:o})=>{let n=e/t*100||0;return(0,at.jsx)("div",{className:(0,Rt.clsx)("flows_basicsV2_progress",o),"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,role:"progressbar",children:(0,at.jsx)("div",{className:"flows_basicsV2_progress_indicator",style:{width:`${n}%`}})})};var Y=require("react/jsx-runtime"),Mt=t=>(0,Y.jsxs)("div",{className:"flows_basicsV2_floating_checklist_progress",children:[(0,Y.jsxs)("p",{className:"flows_basicsV2_floating_checklist_progress_text",children:[t.completedItems," / ",t.totalItems]}),(0,Y.jsx)(At,{max:t.totalItems,value:t.completedItems})]});var c=require("react/jsx-runtime"),le=300,ae=t=>{let e=t.position||"bottom-right",o=`floating-checklist-open-${t.__flows.id}`,[n,s]=(0,r.useState)(!1),[l,a]=(0,r.useState)(!1),[d,b]=(0,r.useState)(null),f=(0,r.useCallback)(i=>{b(v=>v===i?null:i)},[]),[T,M]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(!T)return;M(!1);let i=window.sessionStorage.getItem(o);s(i!==null?i==="true":t.defaultOpen)},[T,t.defaultOpen,o]),(0,r.useEffect)(()=>{T||window.sessionStorage.setItem(o,String(n))},[n,T,o]);let h=Vt(t.items);(0,r.useEffect)(()=>{h!==void 0&&t.items.forEach((i,v)=>{let z=h.at(v);z&&!z.completed.value&&i.completed.value&&d===v&&b(null)})},[d,h,t.items]);let D=(0,r.useMemo)(()=>t.items.filter(i=>i.completed.value),[t.items]),P=t.items.length===D.length,k=(0,r.useRef)(null),R=(0,r.useCallback)(()=>{var i;window.clearTimeout((i=k.current)!=null?i:void 0),k.current=null,a(!0),k.current=window.setTimeout(()=>{s(!1),a(!1),k.current=null},le)},[]),N=(0,r.useCallback)(()=>{var i;window.clearTimeout((i=k.current)!=null?i:void 0),k.current=null,a(!1),s(!0)},[]),A=(0,r.useCallback)(()=>{n&&!l?R():N()},[l,n,R,N]),H=(0,r.useRef)(null),F=(0,r.useCallback)(()=>{var i;t.hideOnClick&&(R(),(i=H.current)==null||i.focus())},[R,t.hideOnClick]);return(0,r.useEffect)(()=>{!t.openOnItemCompleted||h===void 0||t.items.forEach((i,v)=>{let z=h.at(v);z&&!z.completed.value&&i.completed.value&&N()})},[N,h,t.items,t.openOnItemCompleted]),(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist","data-position":e,children:[(0,c.jsxs)("button",{type:"button",className:"flows_basicsV2_floating_checklist_widget_button",onClick:A,ref:H,children:[(0,c.jsx)(kt,{"aria-hidden":"true"}),t.widgetTitle,(0,c.jsx)(X,{className:"flows_basicsV2_floating_checklist_widget_button_chevron","data-open":n&&!l?"true":"false","aria-hidden":"true"})]}),n?(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_popover","data-open":l?"false":"true",children:[(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_header",children:[t.popupTitle?(0,c.jsx)(m,{variant:"title",className:"flows_basicsV2_floating_checklist_title",dangerouslySetInnerHTML:{__html:rt.default.sanitize(t.popupTitle,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,t.popupDescription?(0,c.jsx)(m,{variant:"body",dangerouslySetInnerHTML:{__html:rt.default.sanitize(t.popupDescription,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null]}),(0,c.jsx)(Mt,{completedItems:D.length,totalItems:t.items.length}),!P&&(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_items",children:[t.items.map((i,v)=>(0,c.jsx)(Pt,_({index:v,expanded:d===v,toggleExpanded:f,onNonManualButtonClick:F},i),v)),t.skipButton?(0,c.jsx)("div",{className:"flows_basicsV2_floating_checklist_skip_button",children:(0,c.jsx)(u,{variant:"text",action:t.skipButton})}):null]}),P?(0,c.jsx)("div",{className:"flows_basicsV2_floating_checklist_completed",children:(0,c.jsxs)("div",{className:"flows_basicsV2_floating_checklist_completed_inner",children:[(0,c.jsx)(m,{variant:"title",className:"flows_basicsV2_floating_checklist_completed_title",children:t.completedTitle}),(0,c.jsx)(m,{variant:"body",className:"flows_basicsV2_floating_checklist_completed_description",children:t.completedDescription}),t.completedButton?(0,c.jsx)(u,{variant:"primary",size:"small",action:t.completedButton,className:"flows_basicsV2_floating_checklist_completed_button"}):null]})}):null]}):null]})},re=ae;var x=require("@floating-ui/react-dom");var ce="#22262d",me="#fff",ct="%cFlows%c",mt=`color:${me};background:${ce};padding:2px 4px;border-radius:4px`,W={error:(t,...e)=>{console.error(`${ct} ${t}`,mt,"",...e)},warn:(t,...e)=>{console.warn(`${ct} ${t}`,mt,"",...e)},info:(t,...e)=>{console.info(`${ct} ${t}`,mt,"",...e)}};var V=require("react"),It=G(require("dompurify"));var Q=require("react"),K=()=>{let[t,e]=(0,Q.useState)(!0);return(0,Q.useEffect)(()=>{e(!1)},[]),t};var J=require("react"),de=t=>typeof window=="undefined"?null:document.querySelector(t);function j(t){let[e,o]=(0,J.useState)(t?de(t):null);return(0,J.useEffect)(()=>{if(!t){o(null);return}let n=()=>{let l=document.querySelector(t);o(a=>a!==l?l:a)};n();let s=new MutationObserver(l=>{l.some(d=>d.addedNodes.length>0||d.removedNodes.length>0)&&n()});return s.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{s.disconnect()}},[t]),e}var C=require("react/jsx-runtime"),ue=300,fe=8,_e=4,Ft="data-flows-hint-target",Lt=(t,e,o)=>(0,x.autoUpdate)(t,e,o,{animationFrame:!0}),Ot=t=>{var k,R,N;let e=K(),[o,n]=(0,V.useState)(!1),[s,l]=(0,V.useState)(!1),a=(0,V.useRef)(null),d=(0,V.useCallback)(()=>{var A;n(!0),l(!1),window.clearTimeout((A=a.current)!=null?A:void 0),a.current=null},[]),b=(0,V.useCallback)(()=>{l(!0),a.current=window.setTimeout(()=>{n(!1),l(!1),a.current=null},ue)},[]),f=j(t.targetElement),T=(0,x.useFloating)({placement:t.placement,elements:{reference:f},whileElementsMounted:Lt,transform:!1}),M=T.refs.floating,h=(0,x.useFloating)({placement:"bottom",elements:{reference:T.refs.floating.current},whileElementsMounted:Lt,transform:!1,middleware:[(0,x.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,x.shift)({crossAxis:!0,padding:fe}),(0,x.offset)(_e)]}),D=h.refs.floating;if((0,V.useEffect)(()=>{let A=H=>{let F=H.target,i=D.current,v=M.current;if(!i||!F.isConnected)return;!i.contains(F)&&!(v!=null&&v.contains(F))&&b()};return window.addEventListener("click",A),()=>{window.removeEventListener("click",A)}},[b,M,D]),(0,V.useEffect)(()=>(f==null||f.setAttribute(Ft,"true"),()=>{f==null||f.removeAttribute(Ft)}),[f]),(0,V.useEffect)(()=>{t.targetElement||W.error("Cannot render Hint without target element")},[t.targetElement]),!f||e)return null;let P=[];return t.secondaryButton&&P.push((0,C.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&P.push((0,C.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("button",{ref:T.refs.setFloating,style:{left:T.x+((k=t.offsetX)!=null?k:0),top:T.y+((R=t.offsetY)!=null?R:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:o&&!s?b:d}),o?(0,C.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":s?"false":"true",ref:h.refs.setFloating,style:{left:h.x,top:h.y},children:[(0,C.jsx)(m,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,C.jsx)(m,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:It.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((N=t.dots)!=null?N:P.length)?(0,C.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,P.length?(0,C.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,C.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:P})}):null]}):null,t.onClose?(0,C.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,C.jsx)(I,{})}):null]}):null]})};var St=require("react/jsx-runtime"),pe=t=>(0,St.jsx)(Ot,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),Ce=pe;var Dt=require("clsx"),Ht=G(require("dompurify"));var y=require("react/jsx-runtime"),zt=t=>{let e=t.position||"center",o=t.size||"small",n=[];return t.secondaryButton&&n.push((0,y.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&n.push((0,y.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,y.jsxs)(y.Fragment,{children:[t.overlay?(0,y.jsx)("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,(0,y.jsx)("div",{className:"flows_basicsV2_modal_wrapper",children:(0,y.jsxs)("div",{className:(0,Dt.clsx)("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${e}`,`flows_basicsV2_modal_width_${o}`),children:[(0,y.jsx)(m,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),(0,y.jsx)(m,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Ht.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?(0,y.jsx)("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,n.length?(0,y.jsx)("div",{className:"flows_basicsV2_modal_footer",children:n}):null,t.onClose?(0,y.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:(0,y.jsx)(I,{})}):null]})})]})};var $t=require("react/jsx-runtime"),ye=t=>(0,$t.jsx)(zt,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,position:t.position,size:t.size}),ge=ye;var E=require("@floating-ui/react-dom");var dt=require("clsx"),w=require("react"),Ut=G(require("dompurify"));var g=require("react/jsx-runtime"),be=4,Yt=6,he=be+Yt,ve=8,we=8,Gt="data-flows-tooltip-target",Be=(t,e,o)=>(0,E.autoUpdate)(t,e,o,{animationFrame:!0}),Zt=t=>{var A,H,F;let e=K(),o=(0,w.useRef)(null),n=(0,w.useRef)(null),s=(0,w.useRef)(null),l=j(t.targetElement),{refs:a,middlewareData:d,placement:b,x:f,y:T}=(0,E.useFloating)({placement:t.placement,elements:{reference:l},whileElementsMounted:Be,middleware:[(0,E.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,E.shift)({crossAxis:!0,padding:ve}),(0,E.arrow)({element:n,padding:we}),(0,E.offset)(he)]}),[M,h]=(0,w.useState)(!1);(0,w.useEffect)(()=>{l||h(!1)},[l]),(0,w.useEffect)(()=>{if(M)return;let i=a.floating.current;if(!i)return;window.getComputedStyle(i).animationName!=="none"||h(!0)},[M,a.floating]);let D=(0,w.useCallback)(()=>{h(!0)},[]),P=(0,w.useMemo)(()=>b.includes("top")?"bottom":b.includes("bottom")?"top":b.includes("left")?"right":"left",[b]);if((0,w.useEffect)(()=>(l==null||l.setAttribute(Gt,"true"),()=>{l==null||l.removeAttribute(Gt)}),[l]),(0,w.useEffect)(()=>{t.targetElement||W.error("Cannot render Tooltip without target element")},[t.targetElement]),!l||e)return null;a.floating.current&&(a.floating.current.style.left=`${f}px`,a.floating.current.style.top=`${T}px`);let k=(A=d.arrow)==null?void 0:A.x,R=(H=d.arrow)==null?void 0:H.y;if([n,o].forEach(i=>{i.current&&(i.current.style.left=k!=null?`${k}px`:"",i.current.style.top=R!=null?`${R}px`:"",i.current.style.right="",i.current.style.bottom="",i.current.style[P]=`${-Yt}px`)}),s.current){let i=l.getBoundingClientRect();s.current.style.top=`${i.top}px`,s.current.style.left=`${i.left}px`,s.current.style.width=`${i.width}px`,s.current.style.height=`${i.height}px`}let N=[];return t.secondaryButton&&N.push((0,g.jsx)(u,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&N.push((0,g.jsx)(u,{action:t.primaryButton,variant:"primary"},"primary")),(0,g.jsxs)("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?(0,g.jsx)("div",{className:"flows_basicsV2_tooltip_overlay",ref:s}):null,(0,g.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip",ref:a.setFloating,"data-open":M?"true":"false",onAnimationEnd:D,children:[(0,g.jsx)(m,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,g.jsx)(m,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Ut.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((F=t.dots)!=null?F:N.length)?(0,g.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,N.length?(0,g.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,g.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:N})}):null]}):null,t.onClose?(0,g.jsx)(O,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,g.jsx)(I,{})}):null,(0,g.jsx)("div",{className:(0,dt.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:n}),(0,g.jsx)("div",{className:(0,dt.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:o})]})]})};var Xt=require("react/jsx-runtime"),Ne=t=>(0,Xt.jsx)(Zt,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),Te=Ne;
"use client"
import{a as c,b as _,c as p,d,e as I,f as R,g as F,h as O}from"./chunk-2DU4HBKV.mjs";import{jsx as it}from"react/jsx-runtime";var ot=t=>it(I,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.close:void 0,width:t.width,tour:!1}),wt=ot;import{useCallback as b,useEffect as x,useMemo as dt,useRef as J,useState as V}from"react";import Q from"dompurify";import{jsx as S}from"react/jsx-runtime";function P(t){return S("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:S("path",{d:"M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"})}))}import{jsx as H}from"react/jsx-runtime";function D(t){return H("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:H("path",{d:"M4.00467 9.90936C4.47969 9.92404 4.9358 10.091 5.30545 10.384L5.4578 10.5178L5.46756 10.5265C6.29333 11.3419 6.28038 12.6477 5.57303 13.4846L5.57205 13.4836C5.26637 13.8467 4.84929 14.1108 4.45389 14.3039C4.04925 14.5015 3.61374 14.6515 3.2244 14.7629C2.83297 14.8748 2.47214 14.9523 2.20975 15.0021C2.07819 15.0271 1.96974 15.0457 1.89334 15.0578C1.8551 15.0639 1.82398 15.0683 1.80252 15.0715C1.79197 15.073 1.78323 15.0745 1.77713 15.0754C1.77436 15.0758 1.7703 15.0764 1.7703 15.0764H1.76639C1.53476 15.1073 1.30175 15.0287 1.13651 14.8635C0.971325 14.6982 0.892655 14.4652 0.923617 14.2336V14.2297C0.923617 14.2297 0.924208 14.2256 0.924593 14.2228C0.925447 14.2167 0.926954 14.2081 0.928499 14.1974C0.931608 14.1761 0.936144 14.1456 0.942171 14.1076C0.954274 14.0313 0.972854 13.9228 0.997835 13.7912C1.04767 13.5287 1.12506 13.1673 1.23709 12.7756C1.34847 12.3862 1.49842 11.9507 1.69608 11.5461C1.88948 11.1501 2.15347 10.7317 2.51737 10.426C2.93255 10.0763 3.46219 9.89261 4.00467 9.90936ZM7.24979 13.3332V10.3107L5.68924 8.75018H2.66678C2.44443 8.75018 2.23311 8.65134 2.09061 8.48065C1.94833 8.31007 1.88893 8.08496 1.9285 7.86639L1.92948 7.86444V7.86248C1.92948 7.86248 1.92996 7.85829 1.93045 7.85565C1.93149 7.85016 1.93354 7.84239 1.93534 7.83319C1.93893 7.8148 1.94422 7.78896 1.95096 7.75702C1.96448 7.69294 1.98444 7.60246 2.01151 7.49334C2.06543 7.276 2.14805 6.9771 2.26541 6.6535C2.48216 6.05594 2.8822 5.17898 3.5828 4.71014L3.58377 4.70916C3.99623 4.43419 4.47689 4.3224 4.90702 4.28241C5.34364 4.24183 5.78587 4.2703 6.16776 4.31952C6.49492 4.36168 6.79235 4.42332 7.02616 4.47772C7.83659 3.34782 8.8913 2.41097 10.114 1.73846C11.5097 0.970905 13.0789 0.573308 14.6717 0.583188C15.0839 0.585868 15.4167 0.920942 15.4168 1.33319C15.4168 3.21468 14.8889 6.4889 11.5222 8.97869C11.5764 9.21178 11.6385 9.50719 11.6805 9.83221C11.7297 10.2141 11.7581 10.6564 11.7176 11.093C11.6776 11.5231 11.5658 12.0037 11.2908 12.4162L11.2898 12.4172C10.821 13.1178 9.94404 13.5178 9.34647 13.7346C9.02285 13.8519 8.72396 13.9345 8.50662 13.9885C8.39735 14.0156 8.30705 14.0365 8.24295 14.05C8.21095 14.0567 8.18517 14.061 8.16678 14.0646C8.15758 14.0664 8.1498 14.0685 8.14432 14.0695C8.14175 14.07 8.13748 14.0705 8.13748 14.0705L8.13553 14.0715H8.13358C7.91497 14.111 7.68988 14.0517 7.51932 13.9094C7.34863 13.7669 7.24979 13.5555 7.24979 13.3332ZM3.95877 11.4084C3.78547 11.403 3.61572 11.4617 3.48319 11.5734L3.48221 11.5744C3.34634 11.6886 3.19393 11.8968 3.04373 12.2043C2.89768 12.5033 2.77642 12.8488 2.67948 13.1877C2.66228 13.2478 2.64802 13.308 2.6326 13.3664C2.69123 13.3509 2.7519 13.3378 2.81229 13.3205C3.15122 13.2235 3.49663 13.1023 3.79569 12.9562C4.10322 12.806 4.31135 12.6536 4.42557 12.5178L4.42752 12.5158C4.66586 12.2337 4.64014 11.822 4.41483 11.5969C4.29036 11.4812 4.12877 11.4137 3.95877 11.4084ZM10.1609 9.83026C9.70217 10.0789 9.23126 10.3043 8.74979 10.506V12.3517C8.7776 12.3421 8.80651 12.3346 8.83475 12.3244C9.40878 12.1162 9.86586 11.8491 10.0437 11.5832C10.1284 11.4556 10.196 11.2495 10.2234 10.9543C10.2503 10.6648 10.2339 10.3409 10.1931 10.0246C10.1846 9.95836 10.171 9.89361 10.1609 9.83026ZM13.8787 2.11737C12.8142 2.21762 11.7784 2.53498 10.8367 3.05291C9.66522 3.69722 8.67847 4.6313 7.96952 5.76483L7.96463 5.77069C7.54695 6.42306 7.18496 7.1093 6.88162 7.82147L8.17948 9.11932C8.9013 8.81632 9.59725 8.45463 10.2596 8.03631C12.9928 6.19872 13.7245 3.81048 13.8787 2.11737ZM5.04569 5.77655C4.74999 5.80406 4.54329 5.87135 4.4158 5.95623L4.41678 5.95721C4.15104 6.13531 3.88367 6.59151 3.67557 7.16522C3.66529 7.19356 3.65692 7.22227 3.64725 7.25018H5.49588C5.70028 6.76879 5.92833 6.29797 6.18045 5.84002C6.11394 5.82931 6.04609 5.81581 5.97635 5.80682C5.6599 5.76604 5.33532 5.74963 5.04569 5.77655Z"})}))}import{useEffect as nt,useRef as st}from"react";function A(t){let o=st(t);return nt(()=>{o.current=t},[t]),o.current}import{useCallback as T,useEffect as lt,useRef as at}from"react";import Z from"dompurify";import{jsx as z}from"react/jsx-runtime";function G(t){return z("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:z("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.03 5.22032C12.1705 5.36094 12.2494 5.55157 12.2494 5.75032C12.2494 5.94907 12.1705 6.13969 12.03 6.28032L7.53003 10.7803C7.38941 10.9208 7.19878 10.9997 7.00003 10.9997C6.80128 10.9997 6.61066 10.9208 6.47003 10.7803L4.22003 8.53032C4.14634 8.46165 4.08724 8.37885 4.04625 8.28685C4.00526 8.19486 3.98322 8.09554 3.98144 7.99484C3.97966 7.89414 3.99819 7.79411 4.03591 7.70072C4.07363 7.60733 4.12977 7.5225 4.20099 7.45128C4.27221 7.38006 4.35705 7.32391 4.45043 7.28619C4.54382 7.24847 4.64385 7.22995 4.74455 7.23172C4.84526 7.2335 4.94457 7.25554 5.03657 7.29654C5.12857 7.33753 5.21137 7.39663 5.28003 7.47032L7.00003 9.19032L10.97 5.22032C11.1107 5.07987 11.3013 5.00098 11.5 5.00098C11.6988 5.00098 11.8894 5.07987 12.03 5.22032Z"})}))}import{jsx as a,jsxs as B}from"react/jsx-runtime";var Y=t=>{var i;return t.triggers.length===1&&((i=t.triggers.at(0))==null?void 0:i.type)==="manual"},$=t=>{var u;let{onNonManualButtonClick:o,toggleExpanded:i}=t,s=T(()=>{i(t.index)},[t.index,i]),r=at(null);lt(()=>{r.current&&r.current.style.setProperty("--flows-content-height",`${r.current.scrollHeight}px`)},[]);let m=T(()=>{Y(t.completed)||o()},[o,t.completed]),h=T(()=>{Y(t.completed)&&t.completed.setValue(!0),m()},[m,t.completed]);return B("div",{className:"flows_basicsV2_floating_checklist_item","data-expanded":t.expanded?"true":"false",children:[B("button",{type:"button",className:"flows_basicsV2_floating_checklist_item_expand_button",onClick:s,"data-expanded":t.expanded?"true":"false",children:[a(rt,{completed:t.completed.value}),a("span",{className:"flows_basicsV2_floating_checklist_item_title",dangerouslySetInnerHTML:{__html:Z.sanitize(t.title,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),a(P,{className:"flows_basicsV2_floating_checklist_item_chevron","data-expanded":t.expanded?"true":"false","aria-hidden":"true"})]}),a("div",{className:"flows_basicsV2_floating_checklist_item_content",ref:r,"data-expanded":t.expanded?"true":"false",children:B("div",{className:"flows_basicsV2_floating_checklist_item_content_inner",children:[t.description?a(d,{variant:"body",dangerouslySetInnerHTML:{__html:Z.sanitize(t.description,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,((u=t.primaryButton)!=null?u:t.secondaryButton)?B("div",{className:"flows_basicsV2_floating_checklist_item_buttons",children:[t.primaryButton?a(p,{onClick:h,action:t.primaryButton,variant:"primary",size:"small"}):null,t.secondaryButton?a(p,{action:t.secondaryButton,onClick:o,variant:"secondary",size:"small"}):null]}):null]})})]})},rt=({completed:t})=>t?a("div",{className:"flows_basicsV2_floating_checklist_item_indicator flows_basicsV2_floating_checklist_item_indicator_completed",children:a(G,{})}):a("div",{className:"flows_basicsV2_floating_checklist_item_indicator"});import{clsx as ct}from"clsx";import{jsx as X}from"react/jsx-runtime";var K=({max:t,value:o,className:i})=>{let s=o/t*100||0;return X("div",{className:ct("flows_basicsV2_progress",i),"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":o,role:"progressbar",children:X("div",{className:"flows_basicsV2_progress_indicator",style:{width:`${s}%`}})})};import{jsx as mt,jsxs as U}from"react/jsx-runtime";var q=t=>U("div",{className:"flows_basicsV2_floating_checklist_progress",children:[U("p",{className:"flows_basicsV2_floating_checklist_progress_text",children:[t.completedItems," / ",t.totalItems]}),mt(K,{max:t.totalItems,value:t.completedItems})]});import{jsx as n,jsxs as g}from"react/jsx-runtime";var ut=300,Ct=t=>{let o=t.position||"bottom-right",i=`floating-checklist-open-${t.__flows.id}`,[s,r]=V(!1),[m,h]=V(!1),[u,L]=V(null),W=b(e=>{L(l=>l===e?null:e)},[]),[v,j]=V(!0);x(()=>{if(!v)return;j(!1);let e=window.sessionStorage.getItem(i);r(e!==null?e==="true":t.defaultOpen)},[v,t.defaultOpen,i]),x(()=>{v||window.sessionStorage.setItem(i,String(s))},[s,v,i]);let C=A(t.items);x(()=>{C!==void 0&&t.items.forEach((e,l)=>{let y=C.at(l);y&&!y.completed.value&&e.completed.value&&u===l&&L(null)})},[u,C,t.items]);let M=dt(()=>t.items.filter(e=>e.completed.value),[t.items]),N=t.items.length===M.length,f=J(null),k=b(()=>{var e;window.clearTimeout((e=f.current)!=null?e:void 0),f.current=null,h(!0),f.current=window.setTimeout(()=>{r(!1),h(!1),f.current=null},ut)},[]),w=b(()=>{var e;window.clearTimeout((e=f.current)!=null?e:void 0),f.current=null,h(!1),r(!0)},[]),tt=b(()=>{s&&!m?k():w()},[m,s,k,w]),E=J(null),et=b(()=>{var e;t.hideOnClick&&(k(),(e=E.current)==null||e.focus())},[k,t.hideOnClick]);return x(()=>{!t.openOnItemCompleted||C===void 0||t.items.forEach((e,l)=>{let y=C.at(l);y&&!y.completed.value&&e.completed.value&&w()})},[w,C,t.items,t.openOnItemCompleted]),g("div",{className:"flows_basicsV2_floating_checklist","data-position":o,children:[g("button",{type:"button",className:"flows_basicsV2_floating_checklist_widget_button",onClick:tt,ref:E,children:[n(D,{"aria-hidden":"true"}),t.widgetTitle,n(P,{className:"flows_basicsV2_floating_checklist_widget_button_chevron","data-open":s&&!m?"true":"false","aria-hidden":"true"})]}),s?g("div",{className:"flows_basicsV2_floating_checklist_popover","data-open":m?"false":"true",children:[g("div",{className:"flows_basicsV2_floating_checklist_header",children:[t.popupTitle?n(d,{variant:"title",className:"flows_basicsV2_floating_checklist_title",dangerouslySetInnerHTML:{__html:Q.sanitize(t.popupTitle,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,t.popupDescription?n(d,{variant:"body",dangerouslySetInnerHTML:{__html:Q.sanitize(t.popupDescription,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null]}),n(q,{completedItems:M.length,totalItems:t.items.length}),!N&&g("div",{className:"flows_basicsV2_floating_checklist_items",children:[t.items.map((e,l)=>n($,c({index:l,expanded:u===l,toggleExpanded:W,onNonManualButtonClick:et},e),l)),t.skipButton?n("div",{className:"flows_basicsV2_floating_checklist_skip_button",children:n(p,{variant:"text",action:t.skipButton})}):null]}),N?n("div",{className:"flows_basicsV2_floating_checklist_completed",children:g("div",{className:"flows_basicsV2_floating_checklist_completed_inner",children:[n(d,{variant:"title",className:"flows_basicsV2_floating_checklist_completed_title",children:t.completedTitle}),n(d,{variant:"body",className:"flows_basicsV2_floating_checklist_completed_description",children:t.completedDescription}),t.completedButton?n(p,{variant:"primary",size:"small",action:t.completedButton,className:"flows_basicsV2_floating_checklist_completed_button"}):null]})}):null]}):null]})},le=Ct;import{jsx as _t}from"react/jsx-runtime";var ft=t=>_t(R,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),de=ft;import{jsx as gt}from"react/jsx-runtime";var pt=t=>gt(F,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,position:t.position,size:t.size}),_e=pt;import{jsx as yt}from"react/jsx-runtime";var ht=t=>yt(O,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),ye=ht;export{wt as BasicsV2Card,le as BasicsV2FloatingChecklist,de as BasicsV2Hint,_e as BasicsV2Modal,ye as BasicsV2Tooltip};
import{a as c,b as _,c as p,d,e as I,f as R,g as F,h as O}from"./chunk-L5UHJ6SK.mjs";import{jsx as it}from"react/jsx-runtime";var ot=t=>it(I,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.close:void 0,width:t.width,tour:!1}),wt=ot;import{useCallback as b,useEffect as x,useMemo as dt,useRef as J,useState as V}from"react";import Q from"dompurify";import{jsx as S}from"react/jsx-runtime";function P(t){return S("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:S("path",{d:"M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"})}))}import{jsx as H}from"react/jsx-runtime";function D(t){return H("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:H("path",{d:"M4.00467 9.90936C4.47969 9.92404 4.9358 10.091 5.30545 10.384L5.4578 10.5178L5.46756 10.5265C6.29333 11.3419 6.28038 12.6477 5.57303 13.4846L5.57205 13.4836C5.26637 13.8467 4.84929 14.1108 4.45389 14.3039C4.04925 14.5015 3.61374 14.6515 3.2244 14.7629C2.83297 14.8748 2.47214 14.9523 2.20975 15.0021C2.07819 15.0271 1.96974 15.0457 1.89334 15.0578C1.8551 15.0639 1.82398 15.0683 1.80252 15.0715C1.79197 15.073 1.78323 15.0745 1.77713 15.0754C1.77436 15.0758 1.7703 15.0764 1.7703 15.0764H1.76639C1.53476 15.1073 1.30175 15.0287 1.13651 14.8635C0.971325 14.6982 0.892655 14.4652 0.923617 14.2336V14.2297C0.923617 14.2297 0.924208 14.2256 0.924593 14.2228C0.925447 14.2167 0.926954 14.2081 0.928499 14.1974C0.931608 14.1761 0.936144 14.1456 0.942171 14.1076C0.954274 14.0313 0.972854 13.9228 0.997835 13.7912C1.04767 13.5287 1.12506 13.1673 1.23709 12.7756C1.34847 12.3862 1.49842 11.9507 1.69608 11.5461C1.88948 11.1501 2.15347 10.7317 2.51737 10.426C2.93255 10.0763 3.46219 9.89261 4.00467 9.90936ZM7.24979 13.3332V10.3107L5.68924 8.75018H2.66678C2.44443 8.75018 2.23311 8.65134 2.09061 8.48065C1.94833 8.31007 1.88893 8.08496 1.9285 7.86639L1.92948 7.86444V7.86248C1.92948 7.86248 1.92996 7.85829 1.93045 7.85565C1.93149 7.85016 1.93354 7.84239 1.93534 7.83319C1.93893 7.8148 1.94422 7.78896 1.95096 7.75702C1.96448 7.69294 1.98444 7.60246 2.01151 7.49334C2.06543 7.276 2.14805 6.9771 2.26541 6.6535C2.48216 6.05594 2.8822 5.17898 3.5828 4.71014L3.58377 4.70916C3.99623 4.43419 4.47689 4.3224 4.90702 4.28241C5.34364 4.24183 5.78587 4.2703 6.16776 4.31952C6.49492 4.36168 6.79235 4.42332 7.02616 4.47772C7.83659 3.34782 8.8913 2.41097 10.114 1.73846C11.5097 0.970905 13.0789 0.573308 14.6717 0.583188C15.0839 0.585868 15.4167 0.920942 15.4168 1.33319C15.4168 3.21468 14.8889 6.4889 11.5222 8.97869C11.5764 9.21178 11.6385 9.50719 11.6805 9.83221C11.7297 10.2141 11.7581 10.6564 11.7176 11.093C11.6776 11.5231 11.5658 12.0037 11.2908 12.4162L11.2898 12.4172C10.821 13.1178 9.94404 13.5178 9.34647 13.7346C9.02285 13.8519 8.72396 13.9345 8.50662 13.9885C8.39735 14.0156 8.30705 14.0365 8.24295 14.05C8.21095 14.0567 8.18517 14.061 8.16678 14.0646C8.15758 14.0664 8.1498 14.0685 8.14432 14.0695C8.14175 14.07 8.13748 14.0705 8.13748 14.0705L8.13553 14.0715H8.13358C7.91497 14.111 7.68988 14.0517 7.51932 13.9094C7.34863 13.7669 7.24979 13.5555 7.24979 13.3332ZM3.95877 11.4084C3.78547 11.403 3.61572 11.4617 3.48319 11.5734L3.48221 11.5744C3.34634 11.6886 3.19393 11.8968 3.04373 12.2043C2.89768 12.5033 2.77642 12.8488 2.67948 13.1877C2.66228 13.2478 2.64802 13.308 2.6326 13.3664C2.69123 13.3509 2.7519 13.3378 2.81229 13.3205C3.15122 13.2235 3.49663 13.1023 3.79569 12.9562C4.10322 12.806 4.31135 12.6536 4.42557 12.5178L4.42752 12.5158C4.66586 12.2337 4.64014 11.822 4.41483 11.5969C4.29036 11.4812 4.12877 11.4137 3.95877 11.4084ZM10.1609 9.83026C9.70217 10.0789 9.23126 10.3043 8.74979 10.506V12.3517C8.7776 12.3421 8.80651 12.3346 8.83475 12.3244C9.40878 12.1162 9.86586 11.8491 10.0437 11.5832C10.1284 11.4556 10.196 11.2495 10.2234 10.9543C10.2503 10.6648 10.2339 10.3409 10.1931 10.0246C10.1846 9.95836 10.171 9.89361 10.1609 9.83026ZM13.8787 2.11737C12.8142 2.21762 11.7784 2.53498 10.8367 3.05291C9.66522 3.69722 8.67847 4.6313 7.96952 5.76483L7.96463 5.77069C7.54695 6.42306 7.18496 7.1093 6.88162 7.82147L8.17948 9.11932C8.9013 8.81632 9.59725 8.45463 10.2596 8.03631C12.9928 6.19872 13.7245 3.81048 13.8787 2.11737ZM5.04569 5.77655C4.74999 5.80406 4.54329 5.87135 4.4158 5.95623L4.41678 5.95721C4.15104 6.13531 3.88367 6.59151 3.67557 7.16522C3.66529 7.19356 3.65692 7.22227 3.64725 7.25018H5.49588C5.70028 6.76879 5.92833 6.29797 6.18045 5.84002C6.11394 5.82931 6.04609 5.81581 5.97635 5.80682C5.6599 5.76604 5.33532 5.74963 5.04569 5.77655Z"})}))}import{useEffect as nt,useRef as st}from"react";function A(t){let o=st(t);return nt(()=>{o.current=t},[t]),o.current}import{useCallback as T,useEffect as lt,useRef as at}from"react";import Z from"dompurify";import{jsx as z}from"react/jsx-runtime";function G(t){return z("svg",_(c({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:z("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.03 5.22032C12.1705 5.36094 12.2494 5.55157 12.2494 5.75032C12.2494 5.94907 12.1705 6.13969 12.03 6.28032L7.53003 10.7803C7.38941 10.9208 7.19878 10.9997 7.00003 10.9997C6.80128 10.9997 6.61066 10.9208 6.47003 10.7803L4.22003 8.53032C4.14634 8.46165 4.08724 8.37885 4.04625 8.28685C4.00526 8.19486 3.98322 8.09554 3.98144 7.99484C3.97966 7.89414 3.99819 7.79411 4.03591 7.70072C4.07363 7.60733 4.12977 7.5225 4.20099 7.45128C4.27221 7.38006 4.35705 7.32391 4.45043 7.28619C4.54382 7.24847 4.64385 7.22995 4.74455 7.23172C4.84526 7.2335 4.94457 7.25554 5.03657 7.29654C5.12857 7.33753 5.21137 7.39663 5.28003 7.47032L7.00003 9.19032L10.97 5.22032C11.1107 5.07987 11.3013 5.00098 11.5 5.00098C11.6988 5.00098 11.8894 5.07987 12.03 5.22032Z"})}))}import{jsx as a,jsxs as B}from"react/jsx-runtime";var Y=t=>{var i;return t.triggers.length===1&&((i=t.triggers.at(0))==null?void 0:i.type)==="manual"},$=t=>{var u;let{onNonManualButtonClick:o,toggleExpanded:i}=t,s=T(()=>{i(t.index)},[t.index,i]),r=at(null);lt(()=>{r.current&&r.current.style.setProperty("--flows-content-height",`${r.current.scrollHeight}px`)},[]);let m=T(()=>{Y(t.completed)||o()},[o,t.completed]),h=T(()=>{Y(t.completed)&&t.completed.setValue(!0),m()},[m,t.completed]);return B("div",{className:"flows_basicsV2_floating_checklist_item","data-expanded":t.expanded?"true":"false",children:[B("button",{type:"button",className:"flows_basicsV2_floating_checklist_item_expand_button",onClick:s,"data-expanded":t.expanded?"true":"false",children:[a(rt,{completed:t.completed.value}),a("span",{className:"flows_basicsV2_floating_checklist_item_title",dangerouslySetInnerHTML:{__html:Z.sanitize(t.title,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),a(P,{className:"flows_basicsV2_floating_checklist_item_chevron","data-expanded":t.expanded?"true":"false","aria-hidden":"true"})]}),a("div",{className:"flows_basicsV2_floating_checklist_item_content",ref:r,"data-expanded":t.expanded?"true":"false",children:B("div",{className:"flows_basicsV2_floating_checklist_item_content_inner",children:[t.description?a(d,{variant:"body",dangerouslySetInnerHTML:{__html:Z.sanitize(t.description,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,((u=t.primaryButton)!=null?u:t.secondaryButton)?B("div",{className:"flows_basicsV2_floating_checklist_item_buttons",children:[t.primaryButton?a(p,{onClick:h,action:t.primaryButton,variant:"primary",size:"small"}):null,t.secondaryButton?a(p,{action:t.secondaryButton,onClick:o,variant:"secondary",size:"small"}):null]}):null]})})]})},rt=({completed:t})=>t?a("div",{className:"flows_basicsV2_floating_checklist_item_indicator flows_basicsV2_floating_checklist_item_indicator_completed",children:a(G,{})}):a("div",{className:"flows_basicsV2_floating_checklist_item_indicator"});import{clsx as ct}from"clsx";import{jsx as X}from"react/jsx-runtime";var K=({max:t,value:o,className:i})=>{let s=o/t*100||0;return X("div",{className:ct("flows_basicsV2_progress",i),"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":o,role:"progressbar",children:X("div",{className:"flows_basicsV2_progress_indicator",style:{width:`${s}%`}})})};import{jsx as mt,jsxs as U}from"react/jsx-runtime";var q=t=>U("div",{className:"flows_basicsV2_floating_checklist_progress",children:[U("p",{className:"flows_basicsV2_floating_checklist_progress_text",children:[t.completedItems," / ",t.totalItems]}),mt(K,{max:t.totalItems,value:t.completedItems})]});import{jsx as n,jsxs as g}from"react/jsx-runtime";var ut=300,Ct=t=>{let o=t.position||"bottom-right",i=`floating-checklist-open-${t.__flows.id}`,[s,r]=V(!1),[m,h]=V(!1),[u,L]=V(null),W=b(e=>{L(l=>l===e?null:e)},[]),[v,j]=V(!0);x(()=>{if(!v)return;j(!1);let e=window.sessionStorage.getItem(i);r(e!==null?e==="true":t.defaultOpen)},[v,t.defaultOpen,i]),x(()=>{v||window.sessionStorage.setItem(i,String(s))},[s,v,i]);let C=A(t.items);x(()=>{C!==void 0&&t.items.forEach((e,l)=>{let y=C.at(l);y&&!y.completed.value&&e.completed.value&&u===l&&L(null)})},[u,C,t.items]);let M=dt(()=>t.items.filter(e=>e.completed.value),[t.items]),N=t.items.length===M.length,f=J(null),k=b(()=>{var e;window.clearTimeout((e=f.current)!=null?e:void 0),f.current=null,h(!0),f.current=window.setTimeout(()=>{r(!1),h(!1),f.current=null},ut)},[]),w=b(()=>{var e;window.clearTimeout((e=f.current)!=null?e:void 0),f.current=null,h(!1),r(!0)},[]),tt=b(()=>{s&&!m?k():w()},[m,s,k,w]),E=J(null),et=b(()=>{var e;t.hideOnClick&&(k(),(e=E.current)==null||e.focus())},[k,t.hideOnClick]);return x(()=>{!t.openOnItemCompleted||C===void 0||t.items.forEach((e,l)=>{let y=C.at(l);y&&!y.completed.value&&e.completed.value&&w()})},[w,C,t.items,t.openOnItemCompleted]),g("div",{className:"flows_basicsV2_floating_checklist","data-position":o,children:[g("button",{type:"button",className:"flows_basicsV2_floating_checklist_widget_button",onClick:tt,ref:E,children:[n(D,{"aria-hidden":"true"}),t.widgetTitle,n(P,{className:"flows_basicsV2_floating_checklist_widget_button_chevron","data-open":s&&!m?"true":"false","aria-hidden":"true"})]}),s?g("div",{className:"flows_basicsV2_floating_checklist_popover","data-open":m?"false":"true",children:[g("div",{className:"flows_basicsV2_floating_checklist_header",children:[t.popupTitle?n(d,{variant:"title",className:"flows_basicsV2_floating_checklist_title",dangerouslySetInnerHTML:{__html:Q.sanitize(t.popupTitle,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null,t.popupDescription?n(d,{variant:"body",dangerouslySetInnerHTML:{__html:Q.sanitize(t.popupDescription,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}):null]}),n(q,{completedItems:M.length,totalItems:t.items.length}),!N&&g("div",{className:"flows_basicsV2_floating_checklist_items",children:[t.items.map((e,l)=>n($,c({index:l,expanded:u===l,toggleExpanded:W,onNonManualButtonClick:et},e),l)),t.skipButton?n("div",{className:"flows_basicsV2_floating_checklist_skip_button",children:n(p,{variant:"text",action:t.skipButton})}):null]}),N?n("div",{className:"flows_basicsV2_floating_checklist_completed",children:g("div",{className:"flows_basicsV2_floating_checklist_completed_inner",children:[n(d,{variant:"title",className:"flows_basicsV2_floating_checklist_completed_title",children:t.completedTitle}),n(d,{variant:"body",className:"flows_basicsV2_floating_checklist_completed_description",children:t.completedDescription}),t.completedButton?n(p,{variant:"primary",size:"small",action:t.completedButton,className:"flows_basicsV2_floating_checklist_completed_button"}):null]})}):null]}):null]})},le=Ct;import{jsx as _t}from"react/jsx-runtime";var ft=t=>_t(R,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),de=ft;import{jsx as gt}from"react/jsx-runtime";var pt=t=>gt(F,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,position:t.position,size:t.size}),_e=pt;import{jsx as yt}from"react/jsx-runtime";var ht=t=>yt(O,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.close:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton}),ye=ht;export{wt as BasicsV2Card,le as BasicsV2FloatingChecklist,de as BasicsV2Hint,_e as BasicsV2Modal,ye as BasicsV2Tooltip};
"use client"
"use strict";var xt=Object.create;var k=Object.defineProperty,Et=Object.defineProperties,At=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,St=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable;var nt=(t,e,o)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,B=(t,e)=>{for(var o in e||(e={}))X.call(e,o)&&nt(t,o,e[o]);if(L)for(var o of L(e))it.call(e,o)&&nt(t,o,e[o]);return t},st=(t,e)=>Et(t,Rt(e));var F=(t,e)=>{var o={};for(var n in t)X.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&L)for(var n of L(t))e.indexOf(n)<0&&it.call(t,n)&&(o[n]=t[n]);return o};var Dt=(t,e)=>{for(var o in e)k(t,o,{get:e[o],enumerable:!0})},rt=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ft(e))!X.call(t,i)&&i!==o&&k(t,i,{get:()=>e[i],enumerable:!(n=At(e,i))||n.enumerable});return t};var $=(t,e,o)=>(o=t!=null?xt(St(t)):{},rt(e||!t||!t.__esModule?k(o,"default",{value:t,enumerable:!0}):o,t)),kt=t=>rt(k({},"__esModule",{value:!0}),t);var oe={};Dt(oe,{BasicsV2Card:()=>It,BasicsV2Hint:()=>Xt,BasicsV2Modal:()=>Wt,BasicsV2Tooltip:()=>ee});module.exports=kt(oe);var yt=$(require("dompurify"));var q=require("react/jsx-runtime");function N(t){return(0,q.jsx)("svg",st(B({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,q.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var ct=require("react");var lt=require("clsx");var W=require("react/jsx-runtime"),Mt=(t,e)=>{if(e==="_blank")return!1;try{let o=new URL(t);return!1}catch(o){return!0}},at=i=>{var r=i,{className:t,variant:e,size:o="default"}=r,n=F(r,["className","variant","size"]);let s=(0,lt.clsx)("flows_basicsV2_button",`flows_basicsV2_button_${e}`,`flows_basicsV2_button_size_${o}`,t),p=window.__flows_LinkComponent,f=n.href;if(p&&typeof p=="function"&&f&&Mt(f,n.target))return(0,W.jsx)(p,{href:f,className:s,onClick:n.onClick,children:n.children});let P=n.href?"a":"button";return(0,W.jsx)(P,B({type:P==="button"?"button":void 0,className:s},n))};var dt=require("react/jsx-runtime"),_=({action:t,variant:e,size:o,onClick:n,className:i})=>{let r=(0,ct.useCallback)(()=>{var s;n==null||n(),(s=t.callAction)==null||s.call(t)},[t,n]);return(0,dt.jsx)(at,{variant:e,size:o,href:t.url,target:t.openInNew?"_blank":void 0,onClick:r,className:i,children:t.label})};var ut=require("clsx");var mt=require("react/jsx-runtime"),T=o=>{var n=o,{className:t}=n,e=F(n,["className"]);return(0,mt.jsx)("button",B({type:"button",className:(0,ut.clsx)("flows_basicsV2_iconButton",t)},e))};var ft=require("clsx");var _t=require("react/jsx-runtime"),y=n=>{var i=n,{className:t,variant:e}=i,o=F(i,["className","variant"]);return(0,_t.jsx)("p",B({className:(0,ft.clsx)("flows_basicsV2_text",`flows_basicsV2_text_${e}`,t)},o))};var u=require("react/jsx-runtime"),bt=t=>{var n;let e=[];t.primaryButton&&e.push((0,u.jsx)(_,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&e.push((0,u.jsx)(_,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&e.reverse();let o=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return(0,u.jsxs)("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:o},children:[(0,u.jsx)(y,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),(0,u.jsx)(y,{variant:"body",dangerouslySetInnerHTML:{__html:yt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&e.length?(0,u.jsx)("div",{className:"flows_basicsV2_card_footer",children:(0,u.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null,t.tour&&((n=t.dots)!=null?n:e.length)?(0,u.jsxs)("div",{className:"flows_basicsV2_card_footer",children:[t.dots,e.length?(0,u.jsx)("div",{className:"flows_basicsV2_card_buttons_wrapper",children:(0,u.jsx)("div",{className:"flows_basicsV2_card_buttons",children:e})}):null]}):null,t.onClose?(0,u.jsx)(T,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:(0,u.jsx)(N,{})}):null]})};var pt=require("clsx"),wt=require("react"),Q=require("react/jsx-runtime"),V=({count:t,index:e})=>{let o=(0,wt.useMemo)(()=>Array(t).fill(null).map((n,i)=>i),[t]);return(0,Q.jsx)("div",{className:"flows_basicsV2_dots",children:o.map(n=>(0,Q.jsx)("div",{className:(0,pt.clsx)("flows_basicsV2_dots_dot",n===e&&"flows_basicsV2_dots_dot_active")},n))})};var Z=require("react/jsx-runtime"),Ot=t=>{var o,n;let e=t.hideProgress?null:(0,Z.jsx)(V,{count:(o=t.__flows.tourVisibleStepCount)!=null?o:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,Z.jsx)(bt,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:e,onClose:t.dismissible?t.cancel:void 0,tour:!0,width:t.width})},It=Ot;var w=require("@floating-ui/react-dom");var Lt="#22262d",$t="#fff",K="%cFlows%c",J=`color:${$t};background:${Lt};padding:2px 4px;border-radius:4px`,z={error:(t,...e)=>{console.error(`${K} ${t}`,J,"",...e)},warn:(t,...e)=>{console.warn(`${K} ${t}`,J,"",...e)},info:(t,...e)=>{console.info(`${K} ${t}`,J,"",...e)}};var g=require("react"),Ct=$(require("dompurify"));var H=require("react"),U=()=>{let[t,e]=(0,H.useState)(!0);return(0,H.useEffect)(()=>{e(!1)},[]),t};var Y=require("react"),zt=t=>typeof window=="undefined"?null:document.querySelector(t);function G(t){let[e,o]=(0,Y.useState)(t?zt(t):null);return(0,Y.useEffect)(()=>{if(!t){o(null);return}let n=()=>{let r=document.querySelector(t);o(s=>s!==r?r:s)};n();let i=new MutationObserver(r=>{r.some(p=>p.addedNodes.length>0||p.removedNodes.length>0)&&n()});return i.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{i.disconnect()}},[t]),e}var a=require("react/jsx-runtime"),Ht=300,Ut=8,Yt=4,gt=(t,e,o)=>(0,w.autoUpdate)(t,e,o,{animationFrame:!0}),vt=t=>{var S,D,v;let e=U(),[o,n]=(0,g.useState)(!1),[i,r]=(0,g.useState)(!1),s=(0,g.useRef)(null),p=(0,g.useCallback)(()=>{var h;n(!0),r(!1),window.clearTimeout((h=s.current)!=null?h:void 0),s.current=null},[]),f=(0,g.useCallback)(()=>{r(!0),s.current=window.setTimeout(()=>{n(!1),r(!1),s.current=null},Ht)},[]),P=G(t.targetElement),x=(0,w.useFloating)({placement:t.placement,elements:{reference:P},whileElementsMounted:gt,transform:!1}),A=x.refs.floating,C=(0,w.useFloating)({placement:"bottom",elements:{reference:x.refs.floating.current},whileElementsMounted:gt,transform:!1,middleware:[(0,w.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,w.shift)({crossAxis:!0,padding:Ut}),(0,w.offset)(Yt)]}),M=C.refs.floating;if((0,g.useEffect)(()=>{let h=O=>{let R=O.target,l=M.current,I=A.current;if(!l||!R.isConnected)return;!l.contains(R)&&!(I!=null&&I.contains(R))&&f()};return window.addEventListener("click",h),()=>{window.removeEventListener("click",h)}},[f,A,M]),(0,g.useEffect)(()=>{t.targetElement||z.error("Cannot render Hint without target element")},[t.targetElement]),!P||e)return null;let E=[];return t.secondaryButton&&E.push((0,a.jsx)(_,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&E.push((0,a.jsx)(_,{action:t.primaryButton,variant:"primary"},"primary")),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{ref:x.refs.setFloating,style:{left:x.x+((S=t.offsetX)!=null?S:0),top:x.y+((D=t.offsetY)!=null?D:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:o&&!i?f:p}),o?(0,a.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":i?"false":"true",ref:C.refs.setFloating,style:{left:C.x,top:C.y},children:[(0,a.jsx)(y,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,a.jsx)(y,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Ct.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((v=t.dots)!=null?v:E.length)?(0,a.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,E.length?(0,a.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,a.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:E})}):null]}):null,t.onClose?(0,a.jsx)(T,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,a.jsx)(N,{})}):null]}):null]})};var j=require("react/jsx-runtime"),Gt=t=>{var o,n;let e=t.hideProgress?null:(0,j.jsx)(V,{count:(o=t.__flows.tourVisibleStepCount)!=null?o:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,j.jsx)(vt,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:e},t.__flows.id)},Xt=Gt;var ht=require("clsx"),Bt=$(require("dompurify"));var c=require("react/jsx-runtime"),Nt=t=>{let e=t.position||"center",o=t.size||"small",n=[];return t.secondaryButton&&n.push((0,c.jsx)(_,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&n.push((0,c.jsx)(_,{action:t.primaryButton,variant:"primary"},"primary")),(0,c.jsxs)(c.Fragment,{children:[t.overlay?(0,c.jsx)("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,(0,c.jsx)("div",{className:"flows_basicsV2_modal_wrapper",children:(0,c.jsxs)("div",{className:(0,ht.clsx)("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${e}`,`flows_basicsV2_modal_width_${o}`),children:[(0,c.jsx)(y,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),(0,c.jsx)(y,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Bt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?(0,c.jsx)("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,n.length?(0,c.jsx)("div",{className:"flows_basicsV2_modal_footer",children:n}):null,t.onClose?(0,c.jsx)(T,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:(0,c.jsx)(N,{})}):null]})})]})};var tt=require("react/jsx-runtime"),qt=t=>{var o,n;let e=t.hideProgress?null:(0,tt.jsx)(V,{count:(o=t.__flows.tourVisibleStepCount)!=null?o:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,tt.jsx)(Nt,{title:t.title,body:t.body,overlay:!t.hideOverlay,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.cancel:void 0,position:t.position,size:t.size,dots:e})},Wt=qt;var b=require("@floating-ui/react-dom");var et=require("clsx"),m=require("react"),Tt=$(require("dompurify"));var d=require("react/jsx-runtime"),Qt=4,Vt=6,Zt=Qt+Vt,Kt=8,Jt=8,jt=(t,e,o)=>(0,b.autoUpdate)(t,e,o,{animationFrame:!0}),Pt=t=>{var h,O,R;let e=U(),o=(0,m.useRef)(null),n=(0,m.useRef)(null),i=(0,m.useRef)(null),r=G(t.targetElement),{refs:s,middlewareData:p,placement:f,x:P,y:x}=(0,b.useFloating)({placement:t.placement,elements:{reference:r},whileElementsMounted:jt,middleware:[(0,b.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,b.shift)({crossAxis:!0,padding:Kt}),(0,b.arrow)({element:n,padding:Jt}),(0,b.offset)(Zt)]}),[A,C]=(0,m.useState)(!1);(0,m.useEffect)(()=>{r||C(!1)},[r]),(0,m.useEffect)(()=>{if(A)return;let l=s.floating.current;if(!l)return;window.getComputedStyle(l).animationName!=="none"||C(!0)},[A,s.floating]);let M=(0,m.useCallback)(()=>{C(!0)},[]),E=(0,m.useMemo)(()=>f.includes("top")?"bottom":f.includes("bottom")?"top":f.includes("left")?"right":"left",[f]);if((0,m.useEffect)(()=>{t.targetElement||z.error("Cannot render Tooltip without target element")},[t.targetElement]),!r||e)return null;s.floating.current&&(s.floating.current.style.left=`${P}px`,s.floating.current.style.top=`${x}px`);let S=(h=p.arrow)==null?void 0:h.x,D=(O=p.arrow)==null?void 0:O.y;if([n,o].forEach(l=>{l.current&&(l.current.style.left=S!=null?`${S}px`:"",l.current.style.top=D!=null?`${D}px`:"",l.current.style.right="",l.current.style.bottom="",l.current.style[E]=`${-Vt}px`)}),i.current){let l=r.getBoundingClientRect();i.current.style.top=`${l.top}px`,i.current.style.left=`${l.left}px`,i.current.style.width=`${l.width}px`,i.current.style.height=`${l.height}px`}let v=[];return t.secondaryButton&&v.push((0,d.jsx)(_,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&v.push((0,d.jsx)(_,{action:t.primaryButton,variant:"primary"},"primary")),(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_overlay",ref:i}):null,(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip",ref:s.setFloating,"data-open":A?"true":"false",onAnimationEnd:M,children:[(0,d.jsx)(y,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,d.jsx)(y,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Tt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((R=t.dots)!=null?R:v.length)?(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,v.length?(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:v})}):null]}):null,t.onClose?(0,d.jsx)(T,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,d.jsx)(N,{})}):null,(0,d.jsx)("div",{className:(0,et.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:n}),(0,d.jsx)("div",{className:(0,et.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:o})]})]})};var ot=require("react/jsx-runtime"),te=t=>{var o,n;let e=t.hideProgress?null:(0,ot.jsx)(V,{count:(o=t.__flows.tourVisibleStepCount)!=null?o:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,ot.jsx)(Pt,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:e})},ee=te;
"use strict";var xt=Object.create;var M=Object.defineProperty,Rt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptor,St=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,Mt=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable;var nt=(t,o,e)=>o in t?M(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,T=(t,o)=>{for(var e in o||(o={}))X.call(o,e)&&nt(t,e,o[e]);if(L)for(var e of L(o))it.call(o,e)&&nt(t,e,o[e]);return t},st=(t,o)=>Rt(t,St(o));var F=(t,o)=>{var e={};for(var n in t)X.call(t,n)&&o.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&L)for(var n of L(t))o.indexOf(n)<0&&it.call(t,n)&&(e[n]=t[n]);return e};var kt=(t,o)=>{for(var e in o)M(t,e,{get:o[e],enumerable:!0})},rt=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Dt(o))!X.call(t,i)&&i!==e&&M(t,i,{get:()=>o[i],enumerable:!(n=Ft(o,i))||n.enumerable});return t};var $=(t,o,e)=>(e=t!=null?xt(Mt(t)):{},rt(o||!t||!t.__esModule?M(e,"default",{value:t,enumerable:!0}):e,t)),Ot=t=>rt(M({},"__esModule",{value:!0}),t);var io={};kt(io,{BasicsV2Card:()=>$t,BasicsV2Hint:()=>Wt,BasicsV2Modal:()=>Zt,BasicsV2Tooltip:()=>no});module.exports=Ot(io);var yt=$(require("dompurify"));var q=require("react/jsx-runtime");function N(t){return(0,q.jsx)("svg",st(T({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:(0,q.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var ct=require("react");var lt=require("clsx");var W=require("react/jsx-runtime"),It=(t,o)=>{if(o==="_blank")return!1;try{let e=new URL(t);return!1}catch(e){return!0}},at=i=>{var s=i,{className:t,variant:o,size:e="default"}=s,n=F(s,["className","variant","size"]);let r=(0,lt.clsx)("flows_basicsV2_button",`flows_basicsV2_button_${o}`,`flows_basicsV2_button_size_${e}`,t),g=window.__flows_LinkComponent,_=n.href;if(g&&typeof g=="function"&&_&&It(_,n.target))return(0,W.jsx)(g,{href:_,className:r,onClick:n.onClick,children:n.children});let m=n.href?"a":"button";return(0,W.jsx)(m,T({type:m==="button"?"button":void 0,className:r},n))};var dt=require("react/jsx-runtime"),y=({action:t,variant:o,size:e,onClick:n,className:i})=>{let s=(0,ct.useCallback)(()=>{var r;n==null||n(),(r=t.callAction)==null||r.call(t)},[t,n]);return(0,dt.jsx)(at,{variant:o,size:e,href:t.url,target:t.openInNew?"_blank":void 0,onClick:s,className:i,children:t.label})};var ut=require("clsx");var mt=require("react/jsx-runtime"),E=e=>{var n=e,{className:t}=n,o=F(n,["className"]);return(0,mt.jsx)("button",T({type:"button",className:(0,ut.clsx)("flows_basicsV2_iconButton",t)},o))};var ft=require("clsx");var _t=require("react/jsx-runtime"),b=n=>{var i=n,{className:t,variant:o}=i,e=F(i,["className","variant"]);return(0,_t.jsx)("p",T({className:(0,ft.clsx)("flows_basicsV2_text",`flows_basicsV2_text_${o}`,t)},e))};var f=require("react/jsx-runtime"),bt=t=>{var n;let o=[];t.primaryButton&&o.push((0,f.jsx)(y,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&o.push((0,f.jsx)(y,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&o.reverse();let e=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return(0,f.jsxs)("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:e},children:[(0,f.jsx)(b,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),(0,f.jsx)(b,{variant:"body",dangerouslySetInnerHTML:{__html:yt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&o.length?(0,f.jsx)("div",{className:"flows_basicsV2_card_footer",children:(0,f.jsx)("div",{className:"flows_basicsV2_card_buttons",children:o})}):null,t.tour&&((n=t.dots)!=null?n:o.length)?(0,f.jsxs)("div",{className:"flows_basicsV2_card_footer",children:[t.dots,o.length?(0,f.jsx)("div",{className:"flows_basicsV2_card_buttons_wrapper",children:(0,f.jsx)("div",{className:"flows_basicsV2_card_buttons",children:o})}):null]}):null,t.onClose?(0,f.jsx)(E,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:(0,f.jsx)(N,{})}):null]})};var pt=require("clsx"),wt=require("react"),Q=require("react/jsx-runtime"),V=({count:t,index:o})=>{let e=(0,wt.useMemo)(()=>Array(t).fill(null).map((n,i)=>i),[t]);return(0,Q.jsx)("div",{className:"flows_basicsV2_dots",children:e.map(n=>(0,Q.jsx)("div",{className:(0,pt.clsx)("flows_basicsV2_dots_dot",n===o&&"flows_basicsV2_dots_dot_active")},n))})};var Z=require("react/jsx-runtime"),Lt=t=>{var e,n;let o=t.hideProgress?null:(0,Z.jsx)(V,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,Z.jsx)(bt,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:o,onClose:t.dismissible?t.cancel:void 0,tour:!0,width:t.width})},$t=Lt;var v=require("@floating-ui/react-dom");var zt="#22262d",Ht="#fff",K="%cFlows%c",J=`color:${Ht};background:${zt};padding:2px 4px;border-radius:4px`,z={error:(t,...o)=>{console.error(`${K} ${t}`,J,"",...o)},warn:(t,...o)=>{console.warn(`${K} ${t}`,J,"",...o)},info:(t,...o)=>{console.info(`${K} ${t}`,J,"",...o)}};var p=require("react"),Ct=$(require("dompurify"));var H=require("react"),U=()=>{let[t,o]=(0,H.useState)(!0);return(0,H.useEffect)(()=>{o(!1)},[]),t};var Y=require("react"),Ut=t=>typeof window=="undefined"?null:document.querySelector(t);function G(t){let[o,e]=(0,Y.useState)(t?Ut(t):null);return(0,Y.useEffect)(()=>{if(!t){e(null);return}let n=()=>{let s=document.querySelector(t);e(r=>r!==s?s:r)};n();let i=new MutationObserver(s=>{s.some(g=>g.addedNodes.length>0||g.removedNodes.length>0)&&n()});return i.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{i.disconnect()}},[t]),o}var a=require("react/jsx-runtime"),Yt=300,Gt=8,Xt=4,gt="data-flows-hint-target",vt=(t,o,e)=>(0,v.autoUpdate)(t,o,e,{animationFrame:!0}),ht=t=>{var S,D,h;let o=U(),[e,n]=(0,p.useState)(!1),[i,s]=(0,p.useState)(!1),r=(0,p.useRef)(null),g=(0,p.useCallback)(()=>{var B;n(!0),s(!1),window.clearTimeout((B=r.current)!=null?B:void 0),r.current=null},[]),_=(0,p.useCallback)(()=>{s(!0),r.current=window.setTimeout(()=>{n(!1),s(!1),r.current=null},Yt)},[]),m=G(t.targetElement),A=(0,v.useFloating)({placement:t.placement,elements:{reference:m},whileElementsMounted:vt,transform:!1}),x=A.refs.floating,C=(0,v.useFloating)({placement:"bottom",elements:{reference:A.refs.floating.current},whileElementsMounted:vt,transform:!1,middleware:[(0,v.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,v.shift)({crossAxis:!0,padding:Gt}),(0,v.offset)(Xt)]}),k=C.refs.floating;if((0,p.useEffect)(()=>{let B=O=>{let R=O.target,l=k.current,I=x.current;if(!l||!R.isConnected)return;!l.contains(R)&&!(I!=null&&I.contains(R))&&_()};return window.addEventListener("click",B),()=>{window.removeEventListener("click",B)}},[_,x,k]),(0,p.useEffect)(()=>(m==null||m.setAttribute(gt,"true"),()=>{m==null||m.removeAttribute(gt)}),[m]),(0,p.useEffect)(()=>{t.targetElement||z.error("Cannot render Hint without target element")},[t.targetElement]),!m||o)return null;let P=[];return t.secondaryButton&&P.push((0,a.jsx)(y,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&P.push((0,a.jsx)(y,{action:t.primaryButton,variant:"primary"},"primary")),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{ref:A.refs.setFloating,style:{left:A.x+((S=t.offsetX)!=null?S:0),top:A.y+((D=t.offsetY)!=null?D:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:e&&!i?_:g}),e?(0,a.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":i?"false":"true",ref:C.refs.setFloating,style:{left:C.x,top:C.y},children:[(0,a.jsx)(b,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,a.jsx)(b,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Ct.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((h=t.dots)!=null?h:P.length)?(0,a.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,P.length?(0,a.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,a.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:P})}):null]}):null,t.onClose?(0,a.jsx)(E,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,a.jsx)(N,{})}):null]}):null]})};var j=require("react/jsx-runtime"),qt=t=>{var e,n;let o=t.hideProgress?null:(0,j.jsx)(V,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,j.jsx)(ht,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:o},t.__flows.id)},Wt=qt;var Bt=require("clsx"),Tt=$(require("dompurify"));var c=require("react/jsx-runtime"),Nt=t=>{let o=t.position||"center",e=t.size||"small",n=[];return t.secondaryButton&&n.push((0,c.jsx)(y,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&n.push((0,c.jsx)(y,{action:t.primaryButton,variant:"primary"},"primary")),(0,c.jsxs)(c.Fragment,{children:[t.overlay?(0,c.jsx)("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,(0,c.jsx)("div",{className:"flows_basicsV2_modal_wrapper",children:(0,c.jsxs)("div",{className:(0,Bt.clsx)("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${o}`,`flows_basicsV2_modal_width_${e}`),children:[(0,c.jsx)(b,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),(0,c.jsx)(b,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Tt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?(0,c.jsx)("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,n.length?(0,c.jsx)("div",{className:"flows_basicsV2_modal_footer",children:n}):null,t.onClose?(0,c.jsx)(E,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:(0,c.jsx)(N,{})}):null]})})]})};var tt=require("react/jsx-runtime"),Qt=t=>{var e,n;let o=t.hideProgress?null:(0,tt.jsx)(V,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,tt.jsx)(Nt,{title:t.title,body:t.body,overlay:!t.hideOverlay,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.cancel:void 0,position:t.position,size:t.size,dots:o})},Zt=Qt;var w=require("@floating-ui/react-dom");var ot=require("clsx"),u=require("react"),Vt=$(require("dompurify"));var d=require("react/jsx-runtime"),Kt=4,At=6,Jt=Kt+At,jt=8,to=8,Et="data-flows-tooltip-target",oo=(t,o,e)=>(0,w.autoUpdate)(t,o,e,{animationFrame:!0}),Pt=t=>{var B,O,R;let o=U(),e=(0,u.useRef)(null),n=(0,u.useRef)(null),i=(0,u.useRef)(null),s=G(t.targetElement),{refs:r,middlewareData:g,placement:_,x:m,y:A}=(0,w.useFloating)({placement:t.placement,elements:{reference:s},whileElementsMounted:oo,middleware:[(0,w.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,w.shift)({crossAxis:!0,padding:jt}),(0,w.arrow)({element:n,padding:to}),(0,w.offset)(Jt)]}),[x,C]=(0,u.useState)(!1);(0,u.useEffect)(()=>{s||C(!1)},[s]),(0,u.useEffect)(()=>{if(x)return;let l=r.floating.current;if(!l)return;window.getComputedStyle(l).animationName!=="none"||C(!0)},[x,r.floating]);let k=(0,u.useCallback)(()=>{C(!0)},[]),P=(0,u.useMemo)(()=>_.includes("top")?"bottom":_.includes("bottom")?"top":_.includes("left")?"right":"left",[_]);if((0,u.useEffect)(()=>(s==null||s.setAttribute(Et,"true"),()=>{s==null||s.removeAttribute(Et)}),[s]),(0,u.useEffect)(()=>{t.targetElement||z.error("Cannot render Tooltip without target element")},[t.targetElement]),!s||o)return null;r.floating.current&&(r.floating.current.style.left=`${m}px`,r.floating.current.style.top=`${A}px`);let S=(B=g.arrow)==null?void 0:B.x,D=(O=g.arrow)==null?void 0:O.y;if([n,e].forEach(l=>{l.current&&(l.current.style.left=S!=null?`${S}px`:"",l.current.style.top=D!=null?`${D}px`:"",l.current.style.right="",l.current.style.bottom="",l.current.style[P]=`${-At}px`)}),i.current){let l=s.getBoundingClientRect();i.current.style.top=`${l.top}px`,i.current.style.left=`${l.left}px`,i.current.style.width=`${l.width}px`,i.current.style.height=`${l.height}px`}let h=[];return t.secondaryButton&&h.push((0,d.jsx)(y,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&h.push((0,d.jsx)(y,{action:t.primaryButton,variant:"primary"},"primary")),(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_overlay",ref:i}):null,(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_tooltip",ref:r.setFloating,"data-open":x?"true":"false",onAnimationEnd:k,children:[(0,d.jsx)(b,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),(0,d.jsx)(b,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Vt.default.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((R=t.dots)!=null?R:h.length)?(0,d.jsxs)("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,h.length?(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:(0,d.jsx)("div",{className:"flows_basicsV2_tooltip_buttons",children:h})}):null]}):null,t.onClose?(0,d.jsx)(E,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:(0,d.jsx)(N,{})}):null,(0,d.jsx)("div",{className:(0,ot.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:n}),(0,d.jsx)("div",{className:(0,ot.clsx)("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:e})]})]})};var et=require("react/jsx-runtime"),eo=t=>{var e,n;let o=t.hideProgress?null:(0,et.jsx)(V,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(n=t.__flows.tourVisibleStepIndex)!=null?n:0});return(0,et.jsx)(Pt,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:o})},no=eo;
"use client"
import{e as r,f as s,g as l,h as d}from"./chunk-2DU4HBKV.mjs";import{clsx as C}from"clsx";import{useMemo as P}from"react";import{jsx as m}from"react/jsx-runtime";var i=({count:t,index:n})=>{let e=P(()=>Array(t).fill(null).map((o,f)=>f),[t]);return m("div",{className:"flows_basicsV2_dots",children:e.map(o=>m("div",{className:C("flows_basicsV2_dots_dot",o===n&&"flows_basicsV2_dots_dot_active")},o))})};import{jsx as a}from"react/jsx-runtime";var _=t=>{var e,o;let n=t.hideProgress?null:a(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return a(r,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n,onClose:t.dismissible?t.cancel:void 0,tour:!0,width:t.width})},F=_;import{jsx as u}from"react/jsx-runtime";var b=t=>{var e,o;let n=t.hideProgress?null:u(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return u(s,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n},t.__flows.id)},D=b;import{jsx as y}from"react/jsx-runtime";var p=t=>{var e,o;let n=t.hideProgress?null:y(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return y(l,{title:t.title,body:t.body,overlay:!t.hideOverlay,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.cancel:void 0,position:t.position,size:t.size,dots:n})},k=p;import{jsx as c}from"react/jsx-runtime";var B=t=>{var e,o;let n=t.hideProgress?null:c(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return c(d,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n})},q=B;export{F as BasicsV2Card,D as BasicsV2Hint,k as BasicsV2Modal,q as BasicsV2Tooltip};
import{e as r,f as s,g as l,h as d}from"./chunk-L5UHJ6SK.mjs";import{clsx as C}from"clsx";import{useMemo as P}from"react";import{jsx as m}from"react/jsx-runtime";var i=({count:t,index:n})=>{let e=P(()=>Array(t).fill(null).map((o,f)=>f),[t]);return m("div",{className:"flows_basicsV2_dots",children:e.map(o=>m("div",{className:C("flows_basicsV2_dots_dot",o===n&&"flows_basicsV2_dots_dot_active")},o))})};import{jsx as a}from"react/jsx-runtime";var _=t=>{var e,o;let n=t.hideProgress?null:a(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return a(r,{title:t.title,body:t.body,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n,onClose:t.dismissible?t.cancel:void 0,tour:!0,width:t.width})},F=_;import{jsx as u}from"react/jsx-runtime";var b=t=>{var e,o;let n=t.hideProgress?null:u(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return u(s,{title:t.title,body:t.body,targetElement:t.targetElement,offsetX:t.offsetX,offsetY:t.offsetY,placement:t.placement,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n},t.__flows.id)},D=b;import{jsx as y}from"react/jsx-runtime";var p=t=>{var e,o;let n=t.hideProgress?null:y(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return y(l,{title:t.title,body:t.body,overlay:!t.hideOverlay,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,onClose:t.dismissible?t.cancel:void 0,position:t.position,size:t.size,dots:n})},k=p;import{jsx as c}from"react/jsx-runtime";var B=t=>{var e,o;let n=t.hideProgress?null:c(i,{count:(e=t.__flows.tourVisibleStepCount)!=null?e:0,index:(o=t.__flows.tourVisibleStepIndex)!=null?o:0});return c(d,{title:t.title,body:t.body,targetElement:t.targetElement,placement:t.placement,overlay:!t.hideOverlay,onClose:t.dismissible?t.cancel:void 0,primaryButton:t.primaryButton,secondaryButton:t.secondaryButton,dots:n})},q=B;export{F as BasicsV2Card,D as BasicsV2Hint,k as BasicsV2Modal,q as BasicsV2Tooltip};
{
"name": "@flows/react-components",
"version": "2.6.0",
"version": "2.7.0",
"description": "Built-in components for Flows React SDK",

@@ -69,3 +69,2 @@ "keywords": [

"build": "tsup --env.NODE_ENV production",
"lint": "eslint src",
"tsc": "tsc -p tsconfig.json",

@@ -72,0 +71,0 @@ "version": "pnpm version",

"use client"
var it=Object.defineProperty,rt=Object.defineProperties;var at=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var H=(t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w=(t,e)=>{for(var n in e||(e={}))Y.call(e,n)&&H(t,n,e[n]);if(k)for(var n of k(e))G.call(e,n)&&H(t,n,e[n]);return t},q=(t,e)=>rt(t,at(e));var V=(t,e)=>{var n={};for(var o in t)Y.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&k)for(var o of k(t))e.indexOf(o)<0&&G.call(t,o)&&(n[o]=t[o]);return n};import{useCallback as ut}from"react";import{clsx as lt}from"clsx";import{jsx as W}from"react/jsx-runtime";var ct=(t,e)=>{if(e==="_blank")return!1;try{let n=new URL(t);return!1}catch(n){return!0}},X=r=>{var i=r,{className:t,variant:e,size:n="default"}=i,o=V(i,["className","variant","size"]);let s=lt("flows_basicsV2_button",`flows_basicsV2_button_${e}`,`flows_basicsV2_button_size_${n}`,t),d=window.__flows_LinkComponent,l=o.href;if(d&&typeof d=="function"&&l&&ct(l,o.target))return W(d,{href:l,className:s,onClick:o.onClick,children:o.children});let C=o.href?"a":"button";return W(C,w({type:C==="button"?"button":void 0,className:s},o))};import{jsx as dt}from"react/jsx-runtime";var c=({action:t,variant:e,size:n,onClick:o,className:r})=>{let i=ut(()=>{var s;o==null||o(),(s=t.callAction)==null||s.call(t)},[t,o]);return dt(X,{variant:e,size:n,href:t.url,target:t.openInNew?"_blank":void 0,onClick:i,className:r,children:t.label})};import{clsx as mt}from"clsx";import{jsx as ft}from"react/jsx-runtime";var u=o=>{var r=o,{className:t,variant:e}=r,n=V(r,["className","variant"]);return ft("p",w({className:mt("flows_basicsV2_text",`flows_basicsV2_text_${e}`,t)},n))};import bt from"dompurify";import{jsx as Q}from"react/jsx-runtime";function v(t){return Q("svg",q(w({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},t),{children:Q("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}import{clsx as _t}from"clsx";import{jsx as yt}from"react/jsx-runtime";var h=n=>{var o=n,{className:t}=o,e=V(o,["className"]);return yt("button",w({type:"button",className:_t("flows_basicsV2_iconButton",t)},e))};import{jsx as f,jsxs as Z}from"react/jsx-runtime";var Be=t=>{var o;let e=[];t.primaryButton&&e.push(f(c,{action:t.primaryButton,variant:"primary"},"primary")),t.secondaryButton&&e.push(f(c,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.tour&&e.reverse();let n=(()=>{if(Number(t.width)!==0)return Number.isNaN(Number(t.width))?t.width:`${t.width}px`})();return Z("div",{className:"flows_basicsV2_card",style:{width:"100%",maxWidth:n},children:[f(u,{variant:"title",className:"flows_basicsV2_card_title",children:t.title}),f(u,{variant:"body",dangerouslySetInnerHTML:{__html:bt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),!t.tour&&e.length?f("div",{className:"flows_basicsV2_card_footer",children:f("div",{className:"flows_basicsV2_card_buttons",children:e})}):null,t.tour&&((o=t.dots)!=null?o:e.length)?Z("div",{className:"flows_basicsV2_card_footer",children:[t.dots,e.length?f("div",{className:"flows_basicsV2_card_buttons_wrapper",children:f("div",{className:"flows_basicsV2_card_buttons",children:e})}):null]}):null,t.onClose?f(h,{"aria-label":"Close",className:"flows_basicsV2_card_close",onClick:t.onClose,children:f(v,{})}):null]})};import{flip as Bt,autoUpdate as At,offset as Et,shift as Vt,useFloating as K}from"@floating-ui/react-dom";var pt="#22262d",gt="#fff",M="%cFlows%c",L=`color:${gt};background:${pt};padding:2px 4px;border-radius:4px`,S={error:(t,...e)=>{console.error(`${M} ${t}`,L,"",...e)},warn:(t,...e)=>{console.warn(`${M} ${t}`,L,"",...e)},info:(t,...e)=>{console.info(`${M} ${t}`,L,"",...e)}};import{useCallback as J,useEffect as j,useRef as Rt,useState as tt}from"react";import Tt from"dompurify";import{useEffect as wt,useState as vt}from"react";var D=()=>{let[t,e]=vt(!0);return wt(()=>{e(!1)},[]),t};import{useState as ht,useEffect as Ct}from"react";var Nt=t=>typeof window=="undefined"?null:document.querySelector(t);function O(t){let[e,n]=ht(t?Nt(t):null);return Ct(()=>{if(!t){n(null);return}let o=()=>{let i=document.querySelector(t);n(s=>s!==i?i:s)};o();let r=new MutationObserver(i=>{i.some(d=>d.addedNodes.length>0||d.removedNodes.length>0)&&o()});return r.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{r.disconnect()}},[t]),e}import{Fragment as kt,jsx as y,jsxs as I}from"react/jsx-runtime";var xt=300,Ft=8,Pt=4,et=(t,e,n)=>At(t,e,n,{animationFrame:!0}),Ue=t=>{var R,T,p;let e=D(),[n,o]=tt(!1),[r,i]=tt(!1),s=Rt(null),d=J(()=>{var g;o(!0),i(!1),window.clearTimeout((g=s.current)!=null?g:void 0),s.current=null},[]),l=J(()=>{i(!0),s.current=window.setTimeout(()=>{o(!1),i(!1),s.current=null},xt)},[]),C=O(t.targetElement),N=K({placement:t.placement,elements:{reference:C},whileElementsMounted:et,transform:!1}),A=N.refs.floating,b=K({placement:"bottom",elements:{reference:N.refs.floating.current},whileElementsMounted:et,transform:!1,middleware:[Bt({fallbackPlacements:["top","bottom","left","right"]}),Vt({crossAxis:!0,padding:Ft}),Et(Pt)]}),x=b.refs.floating;if(j(()=>{let g=F=>{let E=F.target,a=x.current,P=A.current;if(!a||!E.isConnected)return;!a.contains(E)&&!(P!=null&&P.contains(E))&&l()};return window.addEventListener("click",g),()=>{window.removeEventListener("click",g)}},[l,A,x]),j(()=>{t.targetElement||S.error("Cannot render Hint without target element")},[t.targetElement]),!C||e)return null;let B=[];return t.secondaryButton&&B.push(y(c,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&B.push(y(c,{action:t.primaryButton,variant:"primary"},"primary")),I(kt,{children:[y("button",{ref:N.refs.setFloating,style:{left:N.x+((R=t.offsetX)!=null?R:0),top:N.y+((T=t.offsetY)!=null?T:0)},"aria-label":"Open hint",type:"button",className:"flows_basicsV2_hint_hotspot",onClick:n&&!r?l:d}),n?I("div",{className:"flows_basicsV2_tooltip_tooltip flows_basicsV2_hint_tooltip","data-open":r?"false":"true",ref:b.refs.setFloating,style:{left:b.x,top:b.y},children:[y(u,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),y(u,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:Tt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((p=t.dots)!=null?p:B.length)?I("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,B.length?y("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:y("div",{className:"flows_basicsV2_tooltip_buttons",children:B})}):null]}):null,t.onClose?y(h,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:y(v,{})}):null]}):null]})};import{clsx as St}from"clsx";import Dt from"dompurify";import{Fragment as Ot,jsx as _,jsxs as ot}from"react/jsx-runtime";var Ke=t=>{let e=t.position||"center",n=t.size||"small",o=[];return t.secondaryButton&&o.push(_(c,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&o.push(_(c,{action:t.primaryButton,variant:"primary"},"primary")),ot(Ot,{children:[t.overlay?_("div",{className:"flows_basicsV2_modal_overlay",onClick:t.onClose,"aria-hidden":"true"}):null,_("div",{className:"flows_basicsV2_modal_wrapper",children:ot("div",{className:St("flows_basicsV2_modal_modal",`flows_basicsV2_modal_${e}`,`flows_basicsV2_modal_width_${n}`),children:[_(u,{className:"flows_basicsV2_modal_title",variant:"title",children:t.title}),_(u,{className:"flows_basicsV2_modal_body",variant:"body",dangerouslySetInnerHTML:{__html:Dt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),t.dots?_("div",{className:"flows_basicsV2_modal_dots",children:t.dots}):null,o.length?_("div",{className:"flows_basicsV2_modal_footer",children:o}):null,t.onClose?_(h,{"aria-label":"Close",className:"flows_basicsV2_modal_close",onClick:t.onClose,children:_(v,{})}):null]})})]})};import{arrow as Mt,flip as Lt,autoUpdate as It,offset as $t,shift as zt,useFloating as Ut}from"@floating-ui/react-dom";import{clsx as nt}from"clsx";import{useCallback as Ht,useEffect as $,useMemo as Yt,useRef as z,useState as Gt}from"react";import qt from"dompurify";import{jsx as m,jsxs as U}from"react/jsx-runtime";var Wt=4,st=6,Xt=Wt+st,Qt=8,Zt=8,Kt=(t,e,n)=>It(t,e,n,{animationFrame:!0}),mo=t=>{var g,F,E;let e=D(),n=z(null),o=z(null),r=z(null),i=O(t.targetElement),{refs:s,middlewareData:d,placement:l,x:C,y:N}=Ut({placement:t.placement,elements:{reference:i},whileElementsMounted:Kt,middleware:[Lt({fallbackPlacements:["top","bottom","left","right"]}),zt({crossAxis:!0,padding:Qt}),Mt({element:o,padding:Zt}),$t(Xt)]}),[A,b]=Gt(!1);$(()=>{i||b(!1)},[i]),$(()=>{if(A)return;let a=s.floating.current;if(!a)return;window.getComputedStyle(a).animationName!=="none"||b(!0)},[A,s.floating]);let x=Ht(()=>{b(!0)},[]),B=Yt(()=>l.includes("top")?"bottom":l.includes("bottom")?"top":l.includes("left")?"right":"left",[l]);if($(()=>{t.targetElement||S.error("Cannot render Tooltip without target element")},[t.targetElement]),!i||e)return null;s.floating.current&&(s.floating.current.style.left=`${C}px`,s.floating.current.style.top=`${N}px`);let R=(g=d.arrow)==null?void 0:g.x,T=(F=d.arrow)==null?void 0:F.y;if([o,n].forEach(a=>{a.current&&(a.current.style.left=R!=null?`${R}px`:"",a.current.style.top=T!=null?`${T}px`:"",a.current.style.right="",a.current.style.bottom="",a.current.style[B]=`${-st}px`)}),r.current){let a=i.getBoundingClientRect();r.current.style.top=`${a.top}px`,r.current.style.left=`${a.left}px`,r.current.style.width=`${a.width}px`,r.current.style.height=`${a.height}px`}let p=[];return t.secondaryButton&&p.push(m(c,{action:t.secondaryButton,variant:"secondary"},"secondary")),t.primaryButton&&p.push(m(c,{action:t.primaryButton,variant:"primary"},"primary")),U("div",{className:"flows_basicsV2_tooltip_root",children:[t.overlay?m("div",{className:"flows_basicsV2_tooltip_overlay",ref:r}):null,U("div",{className:"flows_basicsV2_tooltip_tooltip",ref:s.setFloating,"data-open":A?"true":"false",onAnimationEnd:x,children:[m(u,{className:"flows_basicsV2_tooltip_title",variant:"title",children:t.title}),m(u,{variant:"body",className:"flows_basicsV2_tooltip_body",dangerouslySetInnerHTML:{__html:qt.sanitize(t.body,{FORCE_BODY:!0,ADD_ATTR:["target"]})}}),((E=t.dots)!=null?E:p.length)?U("div",{className:"flows_basicsV2_tooltip_footer",children:[t.dots,p.length?m("div",{className:"flows_basicsV2_tooltip_buttons_wrapper",children:m("div",{className:"flows_basicsV2_tooltip_buttons",children:p})}):null]}):null,t.onClose?m(h,{"aria-label":"Close",className:"flows_basicsV2_tooltip_close",onClick:t.onClose,children:m(v,{})}):null,m("div",{className:nt("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-bottom"),ref:o}),m("div",{className:nt("flows_basicsV2_tooltip_arrow","flows_basicsV2_tooltip_arrow-top"),ref:n})]})]})};export{w as a,q as b,c,u as d,Be as e,Ue as f,Ke as g,mo as h};