1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{20778:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,41290,23)),Promise.resolve().then(a.bind(a,92898)),Promise.resolve().then(a.bind(a,28567)),Promise.resolve().then(a.bind(a,94908)),Promise.resolve().then(a.bind(a,24109)),Promise.resolve().then(a.bind(a,85851)),Promise.resolve().then(a.bind(a,39966)),Promise.resolve().then(a.bind(a,97687)),Promise.resolve().then(a.bind(a,93691)),Promise.resolve().then(a.bind(a,58558)),Promise.resolve().then(a.bind(a,28713)),Promise.resolve().then(a.bind(a,5379)),Promise.resolve().then(a.bind(a,24437)),Promise.resolve().then(a.bind(a,36552))},24109:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d});var r=a(61975),s=a(71450),o=a(72857),n=a(20063),i=a(12115),c=null,l=function(){return(0,r._)(function(){var e;return(0,s.YH)(this,function(t){switch(t.label){case 0:if(window.Tally)return[2];if(!c)return[3,2];return[4,c];case 1:return t.sent(),[2];case 2:c=new Promise(function(e,t){var a=document.querySelector('script[data-tally-embed="true"]');if(a){a.addEventListener("load",function(){return e()},{once:!0}),a.addEventListener("error",function(){return t(Error("Failed to load Tally script"))},{once:!0});return}var r=document.createElement("script");r.src="https://tally.so/widgets/embed.js",r.async=!0,r.dataset.tallyEmbed="true",r.onload=function(){return e()},r.onerror=function(){return t(Error("Failed to load Tally script"))},document.head.appendChild(r)}),t.label=3;case 3:return t.trys.push([3,5,,6]),[4,c];case 4:return t.sent(),[3,6];case 5:throw e=t.sent(),c=null,e;case 6:return[2]}})})()};let d=function(){var e=(0,n.usePathname)(),t=(0,i.useRef)(new Set),a=(0,i.useRef)([]),c=(0,i.useCallback)(function(e,t){return(0,r._)(function(){var a;return(0,s.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,l()];case 1:return r.sent(),null==(a=window.Tally)||a.openPopup("VLEaz6",{hiddenFields:{source:t,reason:e}}),[2,!0];case 2:return console.error("Failed to open feedback popup",r.sent()),[2,!1];case 3:return[2]}})})()},[]),d=(0,i.useCallback)(function(e,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!((0,o.lV)(e)&&t.current.has(e))){(0,o.lV)(e)&&t.current.add(e);var n=window.setTimeout(function(){c(e,r).then(function(a){(0,o.lV)(e)&&t.current.delete(e),a&&((0,o.lV)(e)&&(0,o.MH)(e),"generation_failure"===e&&(0,o.Np)())})},s);a.current.push(n)}},[c]);return(0,i.useEffect)(function(){var e=function(e){var t,a,r,s,n=e,i=null==(t=n.detail)?void 0:t.reason,c=null==(a=n.detail)?void 0:a.source;i&&c&&(!(0,o.lV)(i)||(0,o.Qx)(i))&&d(i,c,null!=(s=null==(r=n.detail)?void 0:r.delayMs)?s:0)};return window.addEventListener((0,o.QF)(),e),function(){window.removeEventListener((0,o.QF)(),e)}},[d]),(0,i.useEffect)(function(){return function(){a.current.forEach(function(e){window.clearTimeout(e)}),t.current.clear(),a.current=[]}},[]),(0,i.useEffect)(function(){!(0,o.a9)(e)&&(0,o.Rk)()&&(0,o.Qx)("generation_failure")&&(0,o.X_)("generation_failure",{delayMs:4e3,source:"canvas_generation_failure"})},[e]),null}},28567:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>u});var r=a(61975),s=a(22043),o=a(71450),n=a(73229),i=a(33050),c=a(20063),l=a(12115),d=null,m=function(e){var t=(0,s._)((0,l.useState)(!1),2),a=t[0],r=t[1];return(0,l.useEffect)(function(){if(!a){var t=function(){"requestIdleCallback"in window?window.requestIdleCallback(function(){return r(!0)}):r(!0)},s="number"==typeof e?window.setTimeout(t,e):null;return window.addEventListener("pointerdown",t,{once:!0}),window.addEventListener("keydown",t,{once:!0}),window.addEventListener("scroll",t,{once:!0,passive:!0}),function(){null!==s&&window.clearTimeout(s),window.removeEventListener("pointerdown",t),window.removeEventListener("keydown",t),window.removeEventListener("scroll",t)}}},[a,e]),a},h=function(){return(0,r._)(function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:if(!d)return[3,2];return[4,d];case 1:return t.sent(),[2];case 2:d=new Promise(function(e,t){var a=document.querySelector('script[data-crisp-chat="true"]');if(a)return"true"===a.dataset.loaded?void e():(a.addEventListener("load",function(){return e()},{once:!0}),void a.addEventListener("error",function(){return t(Error("Failed to load Crisp script"))},{once:!0}));var r=document.createElement("script");r.src="https://client.crisp.chat/l.js",r.async=!0,r.dataset.crispChat="true",r.onload=function(){r.dataset.loaded="true",e()},r.onerror=function(){return t(Error("Failed to load Crisp script"))},document.head.appendChild(r)}),t.label=3;case 3:return t.trys.push([3,5,,6]),[4,d];case 4:return t.sent(),[3,6];case 5:throw e=t.sent(),d=null,e;case 6:return[2]}})})()};let u=function(){var e=(0,c.usePathname)(),t=null!=e?e:"/",a=m(((0,i.fF)(t,n.IB),4e3)),r=!(t.startsWith("/canvas")||n.IB.some(function(e){return t==="/".concat(e,"/canvas")||t.startsWith("/".concat(e,"/canvas/"))}));return(0,l.useEffect)(function(){var e;r&&a&&(window.$crisp=null!=(e=window.$crisp)?e:[],window.CRISP_WEBSITE_ID="25b4fcf4-d22c-4f02-941d-9123a32b4e31",window.$crisp.push(["do","chat:show"]),h().catch(function(e){console.error("Failed to initialize Crisp",e)}))},[a,r]),(0,l.useEffect)(function(){window.$crisp&&(r?window.$crisp.push(["do","chat:show"]):window.$crisp.push(["do","chat:hide"]))},[e,r]),null}},39966:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>h});var r=a(61975),s=a(22043),o=a(45377),n=a(71450),i=a(95155),c=a(68321),l=a(29523),d=a(20063),m=function(){return(0,r._)(function(){var e,t,a,r;return(0,n.YH)(this,function(s){switch(s.label){case 0:return t=btoa((e=String).fromCharCode.apply(e,(0,o._)(crypto.getRandomValues(new Uint8Array(32))))),a=new TextEncoder().encode(t),[4,crypto.subtle.digest("SHA-256",a)];case 1:return r=Array.from(new Uint8Array(s.sent())).map(function(e){return e.toString(16).padStart(2,"0")}).join(""),[2,[t,r]]}})})()};let h=function(){var e=(0,l.U)(),t=(0,d.useRouter)(),a=function(){return(0,r._)(function(){var a,o,i,c,l,d,h,u;return(0,n.YH)(this,function(f){switch(f.label){case 0:return a="258348387603-pi2elmui0t40rcm9n24lm317qc00ano9.apps.googleusercontent.com",[4,m()];case 1:return i=(o=s._.apply(void 0,[f.sent(),2]))[0],c=o[1],[4,e.auth.getSession()];case 2:if(d=(l=f.sent()).data,(h=l.error)&&console.error("Error getting session",h),d.session)return[2];return u={client_id:a,nonce:c,callback:function(a){return(0,r._)(function(){var r,s,o;return(0,n.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.auth.signInWithIdToken({provider:"google",token:a.credential,nonce:i})];case 1:if(s=(r=n.sent()).data,o=r.error)throw o;return t.push("/"),[3,3];case 2:return console.error("Error logging in with Google One Tap",n.sent()),[3,3];case 3:return[2]}})})()},use_fedcm_for_prompt:!0},google.accounts.id.initialize(u),google.accounts.id.prompt(),[2]}})})()},o=function(){a()};return(0,i.jsx)(c.default,{onReady:o,src:"https://accounts.google.com/gsi/client"})}},41290:()=>{},44703:(e,t,a)=>{"use strict";a.d(t,{H:()=>h});var r=a(22043),s=a(95155),o=a(97003),n=a(7220),i=a(59427),c=a(37494),l=a(40887),d=a(5379),m=a(12115),h=function(){var e=(0,r._)((0,m.useState)(!1),2),t=e[0],a=e[1],h=(0,d.D)(),u=h.theme,f=h.setTheme;if((0,m.useEffect)(function(){a(!0)},[]),!t)return null;var g=16;return(0,s.jsxs)(n.rI,{children:[(0,s.jsx)(n.ty,{asChild:!0,children:(0,s.jsx)(o.$,{variant:"ghost",size:"sm",className:"focus-visible:ring-0 focus-visible:ring-offset-0","aria-label":"Open theme menu",title:"Open theme menu",children:"light"===u?(0,s.jsx)(i.A,{size:g,className:"text-muted-foreground","aria-hidden":"true"},"light"):"dark"===u?(0,s.jsx)(c.A,{size:g,className:"text-muted-foreground","aria-hidden":"true"},"dark"):(0,s.jsx)(l.A,{size:g,className:"text-muted-foreground","aria-hidden":"true"},"system")})}),(0,s.jsx)(n.SQ,{className:"w-content",align:"start",children:(0,s.jsxs)(n.Hr,{value:u,onValueChange:function(e){return f(e)},children:[(0,s.jsxs)(n.Ht,{className:"flex gap-2",value:"light",children:[(0,s.jsx)(i.A,{size:g,className:"text-muted-foreground"})," ",(0,s.jsx)("span",{children:"Light"})]}),(0,s.jsxs)(n.Ht,{className:"flex gap-2",value:"dark",children:[(0,s.jsx)(c.A,{size:g,className:"text-muted-foreground"})," ",(0,s.jsx)("span",{children:"Dark"})]}),(0,s.jsxs)(n.Ht,{className:"flex gap-2",value:"system",children:[(0,s.jsx)(l.A,{size:g,className:"text-muted-foreground"})," ",(0,s.jsx)("span",{children:"System"})]})]})})]})}},47126:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Zu:()=>GA_TRACKING_ID,sx:()=>trackEvent});var process=__webpack_require__(87358),GA_TRACKING_ID="G-86HY4PH66S",ANALYTICS_PROVIDER="gtag",isBrowser=null,serverUmamiClient=null,serverUmamiInitTried=!1,get
1ServerUmamiClient=function(){if(isBrowser)return null;if(serverUmamiClient||serverUmamiInitTried)return serverUmamiClient;serverUmamiInitTried=!0;var websiteId=process.env.UMAMI_WEBSITE_ID||process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID,hostUrl=process.env.UMAMI_HOST_URL||process.env.UMAMI_URL||process.env.NEXT_PUBLIC_UMAMI_HOST_URL;if(!websiteId||!hostUrl)return null;try{var _umamiModule_default,umamiModule=eval("require")("@umami/node"),umami=null!=(_umamiModule_default=umamiModule.default)?_umamiModule_default:umamiModule;umami.init({websiteId:websiteId,hostUrl:hostUrl}),serverUmamiClient=umami}catch(error){console.error("Umami: Failed to init server tracker",error)}return serverUmamiClient},trackWithUmami=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.log("trackWithUmami params=",e,isBrowser,window.umami),isBrowser){if(!window.umami)return;try{window.umami.track(e,t)}catch(t){console.error('Umami: Error tracking event "'.concat(e,'"'),t)}return}var a=getServerUmamiClient();if(a)try{a.track({name:e,url:t.page_path||t.url||t.api_endpoint||"server",data:t})}catch(t){console.error('Umami: Error tracking event "'.concat(e,'"'),t)}},trackWithGtag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(isBrowser){if(!window.gtag||!GA_TRACKING_ID)return;try{window.gtag("event",e,_object_spread_props(_object_spread({},t),{timestamp:new Date().toISOString()}))}catch(t){console.error('GA4: Error tracking event "'.concat(e,'"'),t)}}},trackEvent=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]},trackError=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};trackEvent("error_occurred",_object_spread({error_type:e,error_message:t},a))}},54679:(e,t,a)=>{"use strict";a.d(t,{Cf:()=>g,Es:()=>w,L3:()=>b,c7:()=>p,lG:()=>m,rr:()=>x,zM:()=>h});var r=a(82732),s=a(45849),o=a(17389),n=a(95155),i=a(12115),c=a(48496),l=a(65229),d=a(25016),m=c.bL,h=c.l9,u=c.ZL;c.bm;var f=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.hJ,(0,r._)({ref:t,className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a)},s))});f.displayName=c.hJ.displayName;var g=i.forwardRef(function(e,t){var a=e.className,i=e.children,m=(0,o._)(e,["className","children"]);return(0,n.jsxs)(u,{children:[(0,n.jsx)(f,{}),(0,n.jsxs)(c.UC,(0,s._)((0,r._)({ref:t,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a)},m),{children:[i,(0,n.jsxs)(c.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,n.jsx)(l.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})});g.displayName=c.UC.displayName;var p=function(e){var t=e.className,a=(0,o._)(e,["className"]);return(0,n.jsx)("div",(0,r._)({className:(0,d.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t)},a))};p.displayName="DialogHeader";var w=function(e){var t=e.className,a=(0,o._)(e,["className"]);return(0,n.jsx)("div",(0,r._)({className:(0,d.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},a))};w.displayName="DialogFooter";var b=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.hE,(0,r._)({ref:t,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",a)},s))});b.displayName=c.hE.displayName;var x=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.VY,(0,r._)({ref:t,className:(0,d.cn)("text-sm text-muted-foreground",a)},s))});x.displayName=c.VY.displayName},68122:(e,t,a)=>{"use strict";a.d(t,{E:()=>i});var r=a(82732),s=a(17389),o=a(95155),n=a(25016);function i(e){var t=e.className,a=(0,s._)(e,["className"]);return(0,o.jsx)("div",(0,r._)({className:(0,n.cn)("animate-pulse rounded-md bg-muted",t)},a))}},72857:(e,t,a)=>{"use strict";a.d(t,{MH:()=>h,Np:()=>g,QF:()=>d,Qx:()=>m,Rk:()=>f,X_:()=>l,a9:()=>p,lV:()=>w,xx:()=>u});var r=a(45377),s="chatflowchart:feedback-request",o=864e5,n={generation_success:"feedback-auto-generation-success-at",generation_failure:"feedback-auto-generation-failure-at"},i=["feedback-auto-export-success-at"],c="feedback-pending-generation-failure",l=function(e,t){var a;window.dispatchEvent(new CustomEvent(s,{detail:{reason:e,source:null!=(a=null==t?void 0:t.source)?a:b(e),delayMs:null==t?void 0:t.delayMs}}))},d=function(){return s},m=function(e){var t=("generation_success"===e?[n[e]].concat((0,r._)(i)):[n[e]]).reduce(function(e,t){var a=localStorage.getItem(t);if(!a)return e;var r=Number.parseInt(a,10);return Number.isNaN(r)?e:null===e||r>e?r:e},null);return null===t||Date.now()-t>o},h=function(e){localStorage.setItem(n[e],Date.now().toString())},u=function(){m("generation_failure")&&localStorage.setItem(c,"true")},f=function(){return"true"===localStorage.getItem(c)},g=function(){localStorage.removeItem(c)},p=function(e){return"canvas"===e.split("/").filter(Boolean).at(-1)},w=function(e){return"generation_success"===e||"generation_failure"===e},b=function(e){switch(e){case"generation_success":return"canvas_generation_success";case"generation_failure":return"canvas_generation_failure";default:return"header_feedback_button"}}},82180:(e,t,a)=>{"use strict";a.d(t,{Bc:()=>m,ZI:()=>f,k$:()=>u,m_:()=>h});var r=a(93682),s=a(65024),o=a(82732),n=a(45849),i=a(17389),c=a(95155),l=a(33210);a(12115);var d=a(25016);function m(e){var t=e.delayDuration,a=void 0===t?0:t,r=(0,i._)(e,["delayDuration"]);return(0,c.jsx)(l.Kq,(0,o._)({"data-slot":"tooltip-provider",delayDuration:a},r))}function h(e){var t=(0,r._)({},(0,s._)(e));return(0,c.jsx)(l.bL,(0,o._)({"data-slot":"tooltip"},t))}function u(e){var t=(0,r._)({},(0,s._)(e));return(0,c.jsx)(l.l9,(0,o._)({"data-slot":"tooltip-trigger"},t))}function f(e){var t=e.className,a=e.sideOffset,r=void 0===a?0:a,s=e.children,m=(0,i._)(e,["className","sideOffset","children"]);return(0,c.jsx)(l.ZL,{children:(0,c.jsxs)(l.UC,(0,n._)((0,o._)({"data-slot":"tooltip-content",sideOffset:r,className:(0,d.cn)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[100] w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t)},m),{children:[s,(0,c.jsx)(l.i3,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})}},85851:(e,t,a)=>{"use strict";a.d(t,{LayoutWrapper:()=>eM});var r=a(95155),s=a(20063),o=a(61975),n=a(22043),i=a(71450),c=a(67812),l=a(82180),d=a(92816),m=a(52619),h=a.n(m),u=a(97003),f=a(44703),g=a(73229),p=a(7220);function w(){var e=(0,g.rd)(),t=(0,g.a8)(),a=(0,s.useParams)().locale,o=g.nD.find(function(e){return e.code===a}),n=g.HH[(null==o?void 0:o.flag)||0],i=function(a){e.push(t,{locale:a})};return(0,r.jsxs)(p.rI,{children:[(0,r.jsx)(p.ty,{asChild:!0,children:(0,r.jsxs)(u.$,{variant:"ghost",size:"icon",className:"h-9 w-9","aria-label":"Change language",title:"Change language",children:[(0,r.jsx)(n,{className:"h-4 w-4","aria-hidden":"true"}),(0,r.jsx)("span",{className:"sr-only",children:"忢è¯è¨"})]})}),(0,r.jsx)(p.SQ,{align:"end",children:g.nD.map(function(e){var t=g.HH[e.flag];return(0,r.jsxs)(p._2,{onClick:function(){return i(e.code)},className:"flex items-center gap-2 cursor-pointer",children:[(0,r.jsx)(t,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.name})]},e.code)})})]})}var b=a(33050);function x(e){var t=e.locale,a=void 0===t?g.q:t;return(0,r.jsxs)(h(),{href:(0,b.KO)("/",a),className:"flex items-center gap-1 hover:opacity-90 transition-opacity",children:[(0,r.jsx)("img",{src:"/favicon.ico",alt:"logo",className:"w-6 h-6 dark:invert"}),(0,r.jsx)("span",{className:"font-bold text-lg",children:"ChatFlowchart"})]})}var v=a(82732),y=a(45849),_=a(17389),j=a(12115),N=a(48496),k=a(83101),I=a(65229),T=a(25016),C=N.bL,A=N.l9,S=N.bm,P=N.ZL,E=j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(N.hJ,(0,y._)((0,v._)({className:(0,T.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a)},s),{ref:t}))});E.displayName=N.hJ.displayName;var F=(0,k.F)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),M=j.forwardRef(function(e,t){var a=e.side,s=void 0===a?"right":a,o=e.className,n=e.children,i=e.hideCloseButton,c=void 0!==i&&i,l=(0,_._)(e,["side","className","children","hideCloseButton"]);return(0,r.jsxs)(P,{children:[(0,r.jsx)(E,{}),(0,r.jsxs)(N.UC,(0,y._)((0,v._)({ref:t,className:(0,T.cn)(F({side:s}),o)},l),{children:[n,!c&&(0,r.jsxs)(N.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,r.jsx)(I.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})});M.displayName=N.UC.displayName;var z=function(e){var t=e.className,a=(0,_._)(e,["className"]);return(0,r.jsx)("div",(0,v._)({className:(0,T.cn)("flex flex-col space-y-2 text-center sm:text-left",t)},a))};z.displayName="SheetHeader";var L=j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(N.hE,(0,v._)({ref:t,className:(0,T.cn)("text-lg font-semibold text-foreground",a)},s))});L.displayName=N.hE.displayName,j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(N.VY,(0,v._)({ref:t,className:(0,T.cn)("text-sm text-muted-foreground",a)},s))}).displayName=N.VY.displayName;var O=a(9540),U=a(20508),R=a(15870),D=a(84926),H=a(29523),W=a(95604),B=a(15239),q=a(6092);function V(e){var t,a,s,n=e.items,l=e.user,d=e.loading,m=void 0!==d&&d,g=e.canvasHref,p=e.hasActiveSubscription,b=(e.handleSubscribeClick,e.onOpenSignInModal),x=e.onOpenAccountSettings,v=(0,W.useTranslations)("Navigation"),y=(0,H.U)(),_=(0,j.useRef)(null),N=function(){var e;null==(e=_.current)||e.click(),setTimeout(function(){b()},300)},k=function(){return(0,o._)(function(){return(0,i.YH)(this,function(e){switch(e.label){case 0:return[4,y.auth.signOut()];case 1:return e.sent(),window.location.reload(),[2]}})})()},I=function(){var e;null==(e=_.current)||e.click(),setTimeout(function(){x()},300)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(C,{children:[(0,r.jsx)(A,{asChild:!0,children:(0,r.jsx)("div",{className:"relative md:hidden",children:(0,r.jsxs)(u.$,{variant:"ghost",size:"icon",className:"border border-border bg-background shadow-sm hover:bg-accent",children:[(0,r.jsx)(O.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"sr-only",children:"Toggle menu"})]})})}),(0,r.jsxs)(M,{side:"left",className:"flex flex-col",children:[(0,r.jsx)(z,{children:(0,r.jsx)(L,{children:"Navigation"})}),(0,r.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[(0,r.jsx)(f.H,{}),(0,r.jsx)(w,{})]}),(0,r.jsxs)("nav",{className:"flex flex-col gap-4 mt-4",children:[n.map(function(e){return(0,r.jsx)(S,{asChild:!0,children:(0,r.jsx)(h(),{href:e.href,className:"text-sm font-medium text-muted-foreground transition-colors hover:text-primary",children:e.label},e.href)},"sheet-".concat(e.href))}),(0,r.jsx)(S,{asChild:!0,children:(0,r.jsx)(h(),{href:g,className:"text-sm font-medium text-muted-foreground transition-colors hover:text-primary",children:"Open Canvas"})}),(0,r.jsx)(S,{asChild:!0,children:(0,r.jsxs)(h(),{href:"https://discord.gg/Rp6C3Jcfjc",target:"_blank",rel:"noopener noreferrer nofollow",className:"flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-primary",children:[(0,r.jsx)(q.QmS,{className:"h-4 w-4 flex-shrink-0"}),(0,r.jsx)("span",{children:"Join Discord"})]})})]}),(0,r.jsx)("div",{className:"mt-auto pt-4 border-t",children:m?(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("div",{className:"h-10 w-10 rounded-full bg-gray-200 animate-pulse dark:bg-gray-700"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-200 rounded animate-pulse dark:bg-gray-700 mb-2"}),(0,r.jsx)("div",{className:"h-3 bg-gray-200 rounded animate-pulse dark:bg-gray-700 w-2/3"})]})]}):l?(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 pb-3 border-b border-gray-200 dark:border-gray-700",children:[(null==(t=l.user_metadata)?void 0:t.avatar_url)?(0,r.jsx)("div",{className:"relative h-10 w-10 flex-shrink-0",children:(0,r.jsx)(B.default,{src:l.user_metadata.avatar_url,alt:(null==(a=l.user_metadata)?void 0:a.full_name)||l.email||"user avatar",fill:!0,sizes:"40px",className:"rounded-full border-2 border-gray-200 object-cover dark:border-gray-700"})}):(0,r.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 dark:bg-gray-700 flex-shrink-0",children:(0,r.jsx)(U.A,{className:"h-6 w-6 text-gray-600 dark:text-gray-400"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate flex items-center gap-2",children:[(null==(s=l.user_metadata)?void 0:s.full_name)||"User",(0,r.jsx)(c.E,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-5 ".concat(p?"bg-teal-500 text-white":"bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"),children:p?"PRO":"Free"})]}),(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:l.email})]})]}),(0,r.jsx)(S,{asChild:!0,children:(0,r.jsxs)("button",{onClick:I,className:"flex w-full cursor-pointer items-center gap-2 px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",tabIndex:0,children:[(0,r.jsx)(R.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:"Setting"})]})}),(0,r.jsxs)(u.$,{type:"button",variant:"outline",className:"w-full",onClick:k,children:[(0,r.jsx)(D.A,{className:"h-4 w-4 mr-2"}),v("SignOut")]})]}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:(0,r.jsx)(u.$,{variant:"outline",className:"w-full",onClick:N,children:v("SignIn")})})}),(0,r.jsx)(S,{ref:_,className:"hidden"})]})]})})}var $=a(35070),Y=a(81839),K=a(66506),G=a(67694),J=a(54679),Q=a(68122),Z=a(7870),X=j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(Z.bL,(0,v._)({ref:t,className:(0,T.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a)},s))});X.displayName=Z.bL.displayName;var ee=j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(Z._V,(0,v._)({ref:t,className:(0,T.cn)("aspect-square h-full w-full",a)},s))});ee.displayName=Z._V.displayName;var et=j.forwardRef(function(e,t){var a=e.className,s=(0,_._)(e,["className"]);return(0,r.jsx)(Z.H4,(0,v._)({ref:t,className:(0,T.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",a)},s))});et.displayName=Z.H4.displayName;var ea=a(99265);function er(e){var t=e.name,a=e.image,s=(0,_._)(e,["name","image"]),o=a&&""!==a.trim()?a:void 0;return(0,r.jsxs)(X,(0,y._)((0,v._)({}
1,s),{children:[(0,r.jsx)(ee,{alt:t,title:t,src:o}),(0,r.jsxs)(et,{children:[(0,r.jsx)("span",{className:"sr-only",children:t}),(0,r.jsx)(ea.A,{className:"size-4"})]})]}))}var es="pro-30-day-pass",eo=function(e){return e===es},en=a(26989),ei=a(23664),ec=a(78519),el=a(95740),ed=a(6132),em=a(35299),eh=function(e){return -1===e?"Unlimited":e.toLocaleString("en-US")},eu=function(e){if(!e)return"Unavailable";var t=new Date(e);return Number.isNaN(t.getTime())?"Unavailable":new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"numeric"}).format(t)},ef=function(e){return(null==e?void 0:e.plan_name)?e.plan_name:(null==e?void 0:e.plan_type)===G.OL.ADVANCED?"Advanced Plan":(null==e?void 0:e.plan_type)===G.OL.PRO?"Pro Plan":"Subscription Active"};function eg(e){var t,a,s,l,d,m,h=e.open,f=e.onOpenChange,g=e.user,p=e.remainingCredits,w=e.hasActiveSubscription,b=e.subscription,x=e.limits,v=e.onUpgrade,y=(0,n._)((0,j.useState)(!1),2),_=y[0],N=y[1],k=(0,n._)((0,j.useState)(null),2),I=k[0],T=k[1],C=null===p,A=(null==b?void 0:b.status)==="canceled",S=eo(null==b?void 0:b.plan_key),P=(null==g||null==(t=g.user_metadata)?void 0:t.full_name)||(null==g?void 0:g.email)||"User",E=(null==g?void 0:g.email)||"Unavailable",F=(0,j.useMemo)(function(){if(!p)return"Unavailable";if(w||"Unlimited"===p)return"â / â";if(!x)return p;var e=x.maxChatLimit+x.payCreditNum+x.bonusCreditNum;return"".concat(p," / ").concat(e)},[w,x,p]),M=function(){return(0,o._)(function(){var e,t,a,r;return(0,i.YH)(this,function(s){switch(s.label){case 0:if(s.trys.push([0,6,7,8]),N(!0),T(null),!((null==b?void 0:b.provider)==="paypal"&&b.provider_subscription_id))return[3,3];return[4,fetch("/api/paypal/subscriptions/".concat(b.provider_subscription_id,"/cancel"),{method:"POST"})];case 1:return[4,(e=s.sent()).json()];case 2:if(t=s.sent(),!e.ok||!(null==t?void 0:t.canceled))return T("Unable to cancel your subscription. Please try again later."),[2];return window.location.reload(),[2];case 3:return[4,fetch("/api/billing/portal/cancel-url",{method:"POST"})];case 4:return[4,(a=s.sent()).json()];case 5:if(r=s.sent(),!a.ok)return T((null==r?void 0:r.error)==="No active subscription found"?"You don't have an active subscription.":(null==r?void 0:r.error)==="Cancel subscription URL not found"?"Unable to open cancellation page. Please contact support.":"Unable to open subscription management. Please try again later."),[2];if(!(null==r?void 0:r.url))return T("Unable to open cancellation page. Please contact support."),[2];return window.open(r.url,"_blank"),[3,8];case 6:return console.error("[AccountSettingsDialog] cancelSubscription.failed",s.sent()),T("Unable to open subscription management. Please try again later."),[3,8];case 7:return N(!1),[7];case 8:return[2]}})})()};return(0,r.jsx)(J.lG,{open:h,onOpenChange:f,children:(0,r.jsx)(J.Cf,{className:"w-[min(100vw-24px,720px)] max-w-[720px] rounded-3xl border border-black/10 bg-white p-0 shadow-[0_24px_80px_rgba(15,23,42,0.16)] dark:border-white/10 dark:bg-zinc-950",children:(0,r.jsxs)("div",{className:"max-h-[85vh] overflow-y-auto",children:[(0,r.jsx)(J.c7,{className:"border-b border-black/5 px-6 py-5 text-left dark:border-white/10 sm:px-7",children:(0,r.jsxs)(J.L3,{className:"flex items-center gap-2 text-xl font-semibold text-zinc-950 dark:text-white",children:[(0,r.jsx)(en.A,{className:"h-5 w-5 text-teal-600 dark:text-teal-400"}),(0,r.jsx)("span",{children:"Account Settings"})]})}),(0,r.jsxs)("div",{className:"space-y-6 px-6 py-6 sm:px-7",children:[(0,r.jsxs)("section",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"User Info"}),(0,r.jsx)("div",{className:"rounded-2xl border border-black/5 bg-zinc-50/80 p-4 dark:border-white/10 dark:bg-white/5",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(er,{name:P,image:null==g||null==(a=g.user_metadata)?void 0:a.avatar_url,className:"h-11 w-11 overflow-hidden border border-black/5 dark:border-white/10"}),(0,r.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,r.jsx)("div",{className:"truncate text-sm font-semibold text-zinc-950 dark:text-white",children:P}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[(0,r.jsx)(ei.A,{className:"h-4 w-4 flex-shrink-0"}),(0,r.jsx)("span",{className:"truncate",children:E})]})]})]})})]}),(C||!w)&&(0,r.jsxs)("section",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Current Usage"}),(0,r.jsx)("div",{className:"rounded-2xl border border-black/5 bg-zinc-50/80 p-4 dark:border-white/10 dark:bg-white/5",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-300",children:[(0,r.jsx)(ec.A,{className:"h-4 w-4 flex-shrink-0 text-zinc-500 dark:text-zinc-400"}),(0,r.jsx)("span",{children:"Remaining Credits"})]}),(0,r.jsx)("div",{className:"text-sm font-semibold text-zinc-950 dark:text-white",children:C?(0,r.jsx)(Q.E,{className:"h-5 w-24"}):F})]})})]}),(0,r.jsxs)("section",{className:"space-y-3",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Subscription"}),(0,r.jsx)("div",{className:"rounded-3xl border border-black/5 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5",children:C?(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(Q.E,{className:"h-4 w-24"}),(0,r.jsx)(Q.E,{className:"h-8 w-40"})]}),(0,r.jsx)(Q.E,{className:"h-6 w-16 rounded-full"})]}),(0,r.jsx)("div",{className:"grid gap-4",children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(Q.E,{className:"h-4 w-28"}),(0,r.jsx)(Q.E,{className:"h-6 w-36"})]})}),(0,r.jsx)("div",{className:"grid gap-3 rounded-2xl border border-black/5 bg-zinc-50/80 p-4 dark:border-white/10 dark:bg-black/10",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(el.A,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-teal-600 dar
1k:text-teal-400"}),(0,r.jsxs)("div",{className:"w-full space-y-2",children:[(0,r.jsx)(Q.E,{className:"h-4 w-44"}),(0,r.jsx)(Q.E,{className:"h-4 w-52"})]})]})})]}):w?(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("div",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Current Plan"}),(0,r.jsx)("div",{className:"text-2xl font-semibold tracking-tight text-zinc-950 dark:text-white",children:ef(b)})]}),(0,r.jsx)(c.E,{className:A?"rounded-full bg-amber-100 px-2.5 py-1 text-xs font-medium text-amber-700 hover:bg-amber-100 dark:bg-amber-500/15 dark:text-amber-200":"rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-medium text-emerald-700 hover:bg-emerald-100 dark:bg-emerald-500/15 dark:text-emerald-200",children:A?"Ends Soon":"Active"})]}),(0,r.jsx)("div",{className:"grid gap-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:A||S?"Access Ends":"Next Billing Date"}),(0,r.jsx)("div",{className:"mt-1 text-lg font-semibold text-zinc-950 dark:text-white",children:eu(null!=(m=null==b?void 0:b.next_billed_at)?m:null)})]})}),I&&(0,r.jsx)("div",{className:"rounded-2xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700 dark:border-red-500/20 dark:bg-red-500/10 dark:text-red-200",children:I}),!A&&!S&&(0,r.jsx)(u.$,{type:"button",onClick:M,disabled:_,variant:"ghost",className:"h-auto w-fit px-0 py-0 text-sm text-zinc-500 hover:bg-transparent hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-100",children:_?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(em.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):"Cancel Subscription"})]}):(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("div",{className:"text-2xl font-semibold tracking-tight text-zinc-950 dark:text-white",children:"Free Plan"}),(0,r.jsxs)("div",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:["Up to ",eh(null!=(s=null==x?void 0:x.maxChatLimit)?s:0)," credits / month"]})]}),(0,r.jsx)(c.E,{className:"rounded-full bg-slate-500 px-2.5 py-1 text-xs font-medium text-white hover:bg-slate-500",children:"Free"})]}),(0,r.jsx)("div",{className:"grid gap-3 rounded-2xl border border-black/5 bg-zinc-50/80 p-4 dark:border-white/10 dark:bg-black/10",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(el.A,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-teal-600 dark:text-teal-400"}),(0,r.jsxs)("div",{className:"space-y-1 text-sm text-zinc-600 dark:text-zinc-300",children:[(0,r.jsxs)("div",{children:["Monthly Credits: ",eh(null!=(l=null==x?void 0:x.maxChatLimit)?l:0)]}),(0,r.jsxs)("div",{children:["Max Characters Per Chat: ",eh(null!=(d=null==x?void 0:x.maxCharactersPerChat)?d:0)]})]})]})}),(0,r.jsxs)("div",{className:"flex items-start gap-3 rounded-2xl border border-teal-100 bg-teal-50/80 p-4 text-sm text-teal-900 dark:border-teal-500/20 dark:bg-teal-500/10 dark:text-teal-100",children:[(0,r.jsx)(ed.A,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),(0,r.jsx)("span",{children:"Upgrade to unlock higher limits and a smoother experience."})]}),(0,r.jsx)(u.$,{type:"button",onClick:v,className:"h-11 rounded-xl bg-indigo-600 px-5 text-sm font-semibold text-white hover:bg-indigo-500",children:"Upgrade to Pro"})]})})]})]})]})})})}function ep(){var e,t,a,m,p=(0,s.usePathname)();(0,s.useRouter)(),null==p||p.startsWith("/dashboard/");var v=(0,n._)((0,j.useState)(!1),2),y=v[0],_=v[1],N=(0,n._)((0,j.useState)(!1),2),k=N[0],I=N[1],T=(0,j.useRef)(null),C=(0,d.R)(),A=C.subscription,S=C.hasActiveSubscription,P=(0,n._)((0,j.useState)(!1),2),E=P[0],F=P[1],M=(0,n._)((0,j.useState)(!1),2),z=M[0],L=M[1],O=(0,n._)((0,j.useState)(null),2),B=O[0],J=O[1],Q=(0,n._)((0,j.useState)(null),2),Z=Q[0],X=Q[1],ee=(0,Y.J)(),et=ee.user,ea=ee.loading,es=(0,W.useTranslations)("Navigation"),eo=(0,H.U)(),en=(0,s.useParams)(),ei=null==en?void 0:en.locale,ec="string"==typeof ei?ei:Array.isArray(ei)?ei[0]:g.q,el=p&&p.replace(/\/$/,"")||"/",ed=(0,b.KO)("/canvas",ec).replace(/\/$/,"")||"/",em=(0,b.KO)("/chat",ec).replace(/\/$/,"")||"/",eh=el===ed||el.startsWith("".concat(ed,"/"))||el===em||el.startsWith("".concat(em,"/")),eu=(0,b.fF)(p||"/",g.IB),ef=[{label:"Use Cases",href:(0,b.KO)("/use-cases",ec)},{label:"Templates",href:(0,b.KO)("/templates",ec)},{label:"Pricing",href:(0,b.KO)("/pricing",ec)},{label:"Tools",href:(0,b.KO)("/tools",ec)},{label:"Blog",href:(0,b.KO)("/blog",ec)},{label:"Feedback",href:"https://chatflowchart.makethisbetter.dev"}],ep=[{label:"Home",href:(0,b.KO)("/",ec)},{label:"Use Cases",href:(0,b.KO)("/use-cases",ec)},{label:"Templates",href:(0,b.KO)("/templates",ec)},{label:"Pricing",href:(0,b.KO)("/pricing",ec)},{label:"Blog",href:(0,b.KO)("/blog",ec)},{label:"Feedback",href:"https://chatflowchart.makethisbetter.dev"}];(0,j.useEffect)(function(){var e=function(e){T.current&&!T.current.contains(e.target)&&I(!1)},t=function(e){"Escape"===e.key&&I(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[]),(0,j.useEffect)(function(){var e=!0;return function(){(0,o._)(function(){var t,a,r,s,o,n,c;return(0,i.YH)(this,function(i){switch(i.label){case 0:if(!et)return e&&(J(null),X(null)),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,G.Dv.getUserLimits()];case 2:return a=(t=i.sent()).limits,r=t.currentUsage,s=t.payCreditNum,o=t.bonusCreditNum,n=-1===a.maxChatLimit?"Unlimited":String(Math.max(a.maxChatLimit-r,0)+s+o),e&&(J(n),X({status:a.accountType,maxChatLimit:a.maxChatLimit,maxCharactersPerChat:a.maxCharactersPerChat,currentUsage:r,payCreditNum:s,bonusCreditNum:o})),[3,4];case 3:return c=i.sent(),e&&(J(null),X(null)),console.error("[header] loadUserCredits.failed",c),[3,4];case 4:return[2]}})})()}(),function(){e=!1}},[S,et]);var ew=function(){_(!0)},eb=function(){_(!1)},ex=function(e){e.stopPropagation(),I(!k)},ev=function(){return(0,o._)(function(){return(0,i.YH)(this,function(e){switch(e.label){case 0:return[4,eo.auth.signOut()];case 1:return e.sent(),window.location.reload(),[2]}})})()},ey=function(){I(!1),L(!1),F(!0)},e_=function(){I(!1),L(!0)},ej=eu?ef:ep;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:(0,r.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 md:gap-8",children:[eh?null:(0,r.jsx)(x,{locale:ec}),eh?null:(0,r.jsx)("nav",{className:"hidden md:flex items-center gap-6",children:ej.map(function(e){return(0,r.jsx)(h(),{href:e.href,className:"text-sm font-medium text-muted-foreground transition-colors hover:text-primary",children:e.label},e.href)})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"hidden md:block",children:(0,r.jsx)(f.H,{})}),(0,r.jsx)("div",{className:"hidden md:block",children:(0,r.jsx)(w,{})}),(0,r.jsx)(u.$,{asChild:!0,size:"sm",variant:"outline",className:"hidden h-9 rounded-lg border-primary/20 bg-primary/5 px-2.5 text-foreground shadow-sm transition-all hover:bg-primary/10 hover:text-foreground sm:px-3 md:inline-flex",children:(0,r.jsx)(h(),{href:(0,b.KO)("/canvas",ec),"aria-label":"Canvas",title:"Canvas",children:(0,r.jsx)("span",{className:"whitespace-nowrap",children:"Open Canvas"})})}),(0,r.jsx)(h(),{href:"https://discord.gg/Rp6C3Jcfjc",target:"_blank",rel:"noopener noreferrer nofollow",className:"hidden md:inline-flex items-center gap-2 rounded-lg bg-[#5865F2] px-2 py-2 text-sm font-medium text-white transition-all hover:bg-[#47
152C4] shadow-sm hover:shadow-md focus:outline-none focus:ring-2 focus:ring-[#5865F2] focus:ring-offset-2 dark:focus:ring-offset-gray-900 lg:px-3","aria-label":"Join our Discord",title:"Join our Discord",children:(0,r.jsx)(q.QmS,{className:"h-4 w-4 flex-shrink-0"})}),ea?(0,r.jsx)("div",{className:"hidden md:flex items-center gap-2",children:(0,r.jsx)("div",{className:"h-10 w-10 rounded-full bg-gray-200 animate-pulse dark:bg-gray-700"})}):et?(0,r.jsx)("div",{className:"hidden md:flex items-center gap-2",children:(0,r.jsxs)("div",{className:"relative",ref:T,children:[(0,r.jsx)("button",{onClick:ex,className:"flex items-center gap-2 rounded-full focus:outline-none focus:ring-1 focus:ring-teal-500 focus:ring-offset-1","aria-label":"User menu","aria-expanded":k,"aria-haspopup":"true",children:(null==(e=et.user_metadata)?void 0:e.avatar_url)?(0,r.jsxs)("div",{className:"relative h-10 w-10",children:[(0,r.jsx)(er,{name:null==(t=et.user_metadata)?void 0:t.full_name,image:null==et||null==(a=et.user_metadata)?void 0:a.avatar_url,className:"rounded-full border-2 border-gray-200 object-cover transition-all hover:border-gray-300 dark:border-gray-700 dark:hover:border-gray-600"}),(0,r.jsx)(l.Bc,{children:(0,r.jsxs)(l.m_,{children:[(0,r.jsx)(l.k$,{asChild:!0,children:(0,r.jsx)(c.E,{variant:"secondary",className:"absolute -top-1 -right-2 z-10 h-4 px-1 text-[10px] rounded-md border-[1.5px] border-white dark:border-gray-900 ".concat(S?"bg-gradient-to-r from-teal-400 to-teal-600 text-white shadow-sm":"bg-gray-200 text-gray-500 dark:bg-gray-700 dark:text-gray-400"),children:S?"PRO":"Free"})}),(0,r.jsx)(l.ZI,{children:(0,r.jsx)("p",{children:S?"Pro":"Free"})})]})})]}):(0,r.jsxs)("div",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 dark:bg-gray-700",children:[(0,r.jsx)(U.A,{className:"h-6 w-6 text-gray-600 dark:text-gray-400"}),(0,r.jsx)(l.Bc,{children:(0,r.jsxs)(l.m_,{children:[(0,r.jsx)(l.k$,{asChild:!0,children:(0,r.jsx)(c.E,{variant:"secondary",className:"absolute -top-1 -right-2 z-10 h-4 px-1 text-[10px] rounded-md border-[1.5px] border-white dark:border-gray-900 ".concat(S?"bg-gradient-to-r from-teal-400 to-teal-600 text-white shadow-sm":"bg-gray-200 text-gray-500 dark:bg-gray-700 dark:text-gray-400"),children:S?"PRO":"Free"})}),(0,r.jsx)(l.ZI,{children:(0,r.jsx)("p",{children:S?"Pro":"Free"})})]})})]})}),k&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 dark:bg-gray-800 focus:outline-none z-50",children:[(0,r.jsxs)("div",{id:"user-info",className:"border-b border-gray-100 px-4 py-2 dark:border-gray-700",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:(null==(m=et.user_metadata)?void 0:m.full_name)||"user"}),(0,r.jsx)("p",{className:"truncate text-xs text-gray-500 dark:text-gray-400",children:et.email})]}),(0,r.jsxs)("button",{onClick:e_,className:"flex w-full cursor-pointer items-center gap-2 px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",tabIndex:0,children:[(0,r.jsx)(R.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:"Setting"})]}),(0,r.jsxs)("button",{onClick:ev,className:"flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",tabIndex:0,children:[(0,r.jsx)(D.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:es("SignOut")})]})]})]})}):(0,r.jsx)("div",{className:"hidden md:flex gap-2",children:(0,r.jsx)(u.$,{size:"sm",variant:"outline",onClick:ew,children:es("SignIn")})}),eh?null:(0,r.jsx)(V,{items:ej,user:et,loading:ea,hasActiveSubscription:S,handleSubscribeClick:ey,onOpenSignInModal:ew,onOpenAccountSettings:e_,canvasHref:ed})]})]})}),(0,r.jsx)($.A,{isOpen:y,onClose:eb}),(0,r.jsx)(K.k,{title:es("Subscription"),isOpen:E,onClose:function(){return F(!1)}}),(0,r.jsx)(eg,{open:z,onOpenChange:L,user:et,remainingCredits:B,hasActiveSubscription:S,subscription:A,limits:Z,onUpgrade:ey})]})}var ew=a(87078),eb=a(88661),ex=a.n(eb),ev=156,ey=32,e_="h-8 w-auto grayscale opacity-80 transition-all duration-300 group-hover:grayscale-0 group-hover:opacity-100";function ej(e){var t=e.src,a=e.alt,s=e.className,o=e.title,n=e.width,i=void 0===n?ev:n,c=e.height,l=void 0===c?ey:c;return(0,r.jsx)("img",{src:t,alt:a,title:o,width:i,height:l,loading:"lazy",fetchPriority:"low",decoding:"async",className:s})}function eN(e){var t=e.width,a=void 0===t?ev:t,r=e.height,s=void 0===r?ey:r,o=e.className,n=void 0===o?e_:o,i=(0,_._)(e,["width","height","className"]);return(0,y._)((0,v._)({},i),{width:a,height:s,className:n})}function ek(e){return e?"".concat(e," noopener noreferrer"):"noopener noreferrer"}var eI=[eN({href:"https://twelve.tools",src:"https://twelve.tools/badge0-white.svg",alt:"Featured on Twelve Tools"}),eN({href:"https://fazier.com/launches/chatflowchart.com",src:"https://fazier.com/api/v1//public/badges/launch_badges.svg?badge_type=featured&theme=neutral",alt:"Fazier badge"}),eN({href:"https://startupfa.me/s/chatflowchart?utm_source=chatflowchart.com",src:"https://startupfa.me/badges/featured/default.webp",alt:"ChatFlowchart - Featured on Startup Fame"}),eN({href:"https://toolfame.com/item/chatflowchart",src:"https://toolfame.com/badge-light.svg",alt:"Featured on toolfame.com"}),eN({href:"https://aidirs.org/item/chatflowchart",src:"https://cdn.chatflowchart.com/images/media/badge-aidirs.svg",alt:"Listed on AIDirs"}),eN({href:"https://tinytoolhub.com",src:"https://tinytoolhub.com/assets/images/badge.png",alt:"Tiny Tool Hub"}),eN({href:"https://launchigniter.com/product/chatflowchart?ref=badge-chatflowchart",src:"https://launchigniter.com/api/badge/chatflowchart?theme=light",alt:"Featured on LaunchIgniter"}),eN({href:"https://turbo0.com/item/chatflowchart",src:"https://img.turbo0.com/badge-listed-light.svg",alt:"Listed on Turbo0"}),eN({href:"https://code.market?code.market=verified",src:"https://code.market/assets/manage-product/featured-logo-bright.svg",alt:"ai tools code.market",title:"ai tools code.market"}),eN({href:"https://findly.tools/chatflowchart?utm_source=chatflowchart",src:"https://findly.tools/badges/findly-tools-badge-light.svg",alt:"Featured on findly.tools"}),eN({href:"https://aiagentsdirectory.com/agent/chatflowchart?utm_source=badge&utm_medium=referral&utm_campaign=free_listing&utm_content=chatflowchart",src:"https://aiagentsdirectory.com/featured-badge.svg?v=2024",alt:"ChatFlowchart - Featured AI Agent on AI Agents Directory"}),eN({href:"https://submitaitools.org",src:"https://submitaitools.org/static_submitaitools/images/submitaitools.png",alt:"Submit AI Tools é³?The ultimate platform to discover, submit, and explore the best AI tools across various categories."}),eN({href:"https://dang.ai/",src:"https://cdn.prod.website-files.com/63d8afd87da01fb58ea3fbcb/6487e2868c6c8f93b4828827_dang-badge.png",alt:"Dang.ai"}),eN({href:"https://goodaitools.com",src:"https://goodaitools.com/assets/images/badge.png",alt:"Good AI Tools"}
1),eN({href:"https://www.goodfirms.co/",src:"https://cdn.chatflowchart.com/images/media/gf-logo-horizontal-dark.svg",alt:"Goodfirms Partner"}),eN({href:"https://auraplusplus.com/projects/chatflowchart-ai",src:"https://auraplusplus.com/images/badges/featured-on-light.svg",alt:"Featured on Aura++"}),eN({href:"https://wired.business",src:"https://wired.business/badge0-white.svg",alt:"Featured on Wired Business"}),eN({href:"https://trylaunch.ai/launch/chatflowchart",src:"https://trylaunch.ai/badges/badge-color.svg",alt:"Launch",width:156,height:42,rel:"dofollow",className:"h-8 w-auto transition-all duration-300"}),eN({href:"https://showmebest.ai",src:"https://showmebest.ai/badge/feature-badge-white.webp",alt:"Featured on ShowMeBest"}),eN({href:"https://aiwget.com",src:"https://aiwget.com/aiwget_badge.png",alt:"Featured on AIWget"}),eN({href:"https://directoryhunt.org/",src:"https://directoryhunt.org/assets/Badges/featured.svg",alt:"Featured on DirectoryHunt.org"}),eN({href:"https://dofollow.tools",src:"https://dofollow.tools/badge/badge_light.svg",alt:"Featured on Dofollow.Tools"}),eN({href:"https://firstlook.tools",src:"https://firstlook.tools/badge/badge_light.svg",alt:"Featured on First Look"}),eN({href:"https://gets.tools",src:"https://gets.tools/badge/badge_light.svg",alt:"Featured on Gets.Tools"}),eN({href:"https://aiboom.tools",src:"https://aiboom.tools/badge/badge_light.svg",alt:"Featured on AIBoom.Tools"}),eN({href:"https://tooldirs.com",src:"https://tooldirs.com/badge/badge_light.svg",alt:"Featured on ToolDirs"}),eN({href:"https://www.freeai.run",src:"https://www.freeai.run/badge/badge_light.svg",alt:"Featured on FreeAI"}),eN({href:"https://super-launch.app",src:"https://super-launch.app/badge/badge_light.svg",alt:"Featured on Super Launch"}),eN({href:"https://startupfa.st",src:"https://startupfa.st/images/badges/powered-by-light.svg",alt:"Powered by Startup Fast",title:"Powered by Startup Fast"}),eN({href:"https://newtool.site/item/chatflowchart",src:"https://newtool.site/badges/newtool-light.svg",alt:"Featured on NewTool.site"}),eN({href:"https://marketingdb.live",src:"https://marketingdb.live/badge-light.svg",alt:"Listed on MarketingDB"}),eN({href:"https://aihuntlist.com/tool/chatflowchart",src:"https://aihuntlist.com/badge-light.svg",alt:"Featured on aihuntlist.com"}),eN({href:"https://aijustbetter.com/item/chatflowchart.com",src:"https://cdn.aijustbetter.com/badges/badge-light.svg",alt:"Featured on AIJustBetter.com"}),eN({href:"https://aidirs.best",src:"https://aidirs.best/light.svg",alt:"Featured on Aidirs"}),eN({href:"https://www.justsimple.tools",src:"https://www.justsimple.tools/badge.svg",alt:"Listed on JustSimple Tools"}),eN({href:"https://domainrank.app",src:"https://domainrank.app/api/badge/chatflowchart.com",alt:"chatflowchart.com Domain Rating"}),eN({href:"https://bestsky.tools?utm_source=badge",src:"https://assets.bestsky.tools/badges/featured-light.svg",alt:"Featured on BestskyTools"}),eN({href:"https://imglab.dev/item/chatflowchart",src:"https://imglab.dev/svg/badge.svg",alt:"Featured on ImgLab"}),eN({href:"https://www.launchvault.dev/projects/chatflowchart",src:"https://www.launchvault.dev/images/badges/top2.png",alt:"Launch Vault Top 2 Daily Winner"}),eN({href:"https://artificin.com",src:"https://artificin.com/badges/Artificin-badge.png",alt:"Featured on Artificin"}),eN({href:"https://www.toolpilot.ai",src:"https://www.toolpilot.ai/cdn/shop/files/f-w_690x151_crop_center.png",alt:"Featured on ToolPilot"}),eN({href:"https://wavel.com",src:"https://wavel.com/Wavel-embed-badge-with-light-bg.webp",alt:"Featured on Wavel"}),eN({href:"https://www.nxgntools.com/tools/chatflowchart?utm_source=chatflowchart",src:"https://www.nxgntools.com/api/embed/chatflowchart?type=FEATURED_ON&hideUpvotes=true",alt:"Featured on NextGen Tools"}),eN({href:"https://aitoolfame.com/item/chatflowchart",src:"https://aitoolfame.com/badge-light.svg",alt:"Featured on aitoolfame.com"}),eN({href:"https://saasfame.com/item/chatflowchart",src:"https://saasfame.com/badge-light.svg",alt:"Featured on saasfame.com"}),eN({href:"https://lovableapp.org",src:"https://lovableapp.org/lovable-app-badge.svg",alt:"Lovable App Badge"}),eN({href:"https://navfolders.com",src:"https://navfolders.com/badge/nav_light.svg",alt:"NavFolders"}),eN({href:"https://curateclick.com?utm_source=embed-badge&utm_medium=embed&utm_campaign=embed-badge",src:"https://curateclick.com/featured-badge.svg",alt:"Featured on CurateClick"})],eT=[eI,eI];function eC(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{id:"back-links","aria-label":"Featured partner badges",className:"jsx-86806e781feec9aa border-t border-border/60 bg-muted/20",children:(0,r.jsxs)("div",{className:"jsx-86806e781feec9aa relative overflow-hidden py-4",children:[(0,r.jsx)("div",{className:"jsx-86806e781feec9aa pointer-events-none absolute inset-y-0 left-0 z-10 w-12 bg-gradient-to-r from-background via-background/85 to-transparent md:w-24"}),(0,r.jsx)("div",{className:"jsx-86806e781feec9aa pointer-events-none absolute inset-y-0 right-0 z-10 w-12 bg-gradient-to-l from-background via-background/85 to-transparent md:w-24"}),(0,r.jsx)("div",{className:"jsx-86806e781feec9aa footer-marquee-track flex min-w-max items-center gap-4 px-4 md:gap-5 md:px-6",children:eT.map(function(e,t){return(0,r.jsx)("div",{"aria-hidden":1===t,className:"jsx-86806e781feec9aa flex shrink-0 items-center gap-4 md:gap-5",children:e.map(function(e){var a;return(0,r.jsx)("a",{href:e.href,target:"_blank",rel:ek(e.rel),tabIndex:1===t?-1:void 0,title:null!=(a=e.title)?a:e.alt,className:"jsx-86806e781feec9aa group flex h-14 min-w-[11rem] shrink-0 items-center justify-center rounded-full border border-border/60 bg-background/90 px-5 shadow-sm shadow-black/5 backdrop-blur transition-all duration-300 hover:-translate-y-0.5 hover:border-primary/40 hover:bg-background md:px-6",children:(0,r.jsx)(ej,{src:e.src,alt:e.alt,title:e.title,width:e.width,height:e.height,className:e.className})},"".concat(t,"-").concat(e.href))})},"track-".concat(t))})})]})}),(0,r.jsx)(ex(),{id:"86806e781feec9aa",children:".footer-marquee-track.jsx-86806e781feec9aa{width:max-content;animation:footer-marquee 80s linear infinite;will-change:transform}.footer-marquee-track.jsx-86806e781feec9aa:hover{animation-play-state:paused}
1@keyframes footer-marquee{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}@media(prefers-reduced-motion:reduce){.footer-marquee-track.jsx-86806e781feec9aa{animation:none}}"})]})}var eA={jpg:"JPG",pdf:"PDF",png:"PNG",sop:"SOP",drawio:"Drawio (Draw.io)"};function eS(e){var t=e.split("-").map(function(e){var t;return null!=(t=eA[e])?t:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}).join(" ");return e.endsWith("drawio")?"".concat(t," Converter"):t}function eP(e){var t=e.useCases;e.templates;var a=(0,s.usePathname)(),o=(0,s.useParams)(),n=null==o?void 0:o.locale,i="string"==typeof n?n:Array.isArray(n)?n[0]:g.q;null==a||a.startsWith("/dashboard");var c=(0,W.useTranslations)("Index"),l=(0,W.useTranslations)("AIQuestion"),d=t.filter(function(e){return e.slug.endsWith("-maker")}),m=t.filter(function(e){return!e.slug.endsWith("-maker")}),u=[{title:"Friends",links:[{label:"MossAI Tools",href:"https://mossai.org"},{label:"AI Nav Site",href:"https://navs.site"},{label:"See What New AI",href:"https://www.seewhatnewai.com"},{label:"Property Photo to Video",href:"https://propertyphotovideo.com"},{label:"All in AI Tools",href:"https://allinai.tools"},{label:"AI Hustle Tools",href:"https://aihustle.tools"},{label:"FluentDictation",href:"https://fluentdictation.com/"},{label:"Okei AI Tools",href:"https://okeiai.com"},{label:"AI Toolz Dir",href:"https://www.aitoolzdir.com"},{label:"SongFromShort",href:"https://songfromshort.org"},{label:"Z-Image",href:"https://z-image.net"},{label:"Image to Editable",href:"https://imagetoeditable.com/"},{label:"ShowMySites",href:"https://www.showmysites.com"},{label:"WebBulkTranslator",href:"https://webbulktranslator.com/"},{label:"Directory Website Promote",href:"https://www.promotebusinessdirectory.com"}]},{title:"Diagram Types",links:d.map(function(e){return{label:e.name,href:"/use-cases/".concat(e.slug)}})},{title:"Use Cases",links:m.map(function(e){return{label:e.name,href:"/use-cases/".concat(e.slug)}})},{title:"Tools",links:ew.o.flatMap(function(e){return e.tools.map(function(e){return{label:eS(e.slug),href:e.href}})})},{title:"Legal",links:[{label:"Privacy Policy",href:"/privacy"},{label:"Terms and Conditions",href:"/terms"},{label:"Refund Policy",href:"/refund"},{label:"Contact Us",href:"mailto:[email protected]"}]}];return(0,r.jsxs)("footer",{className:"border-t",children:[(0,r.jsx)("div",{className:"container px-4 py-8 md:py-12",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-8 md:grid-cols-4 lg:grid-cols-6",children:[(0,r.jsxs)("div",{className:"col-span-full lg:col-span-2",children:[(0,r.jsx)(x,{locale:i}),(0,r.jsx)("p",{className:"mt-4 text-sm text-muted-foreground",children:c("description")}),(0,r.jsxs)("div",{className:"mt-8 space-y-3 border-t border-gray-100 pt-8 dark:border-gray-800",children:[(0,r.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider text-gray-600 dark:text-gray-300",children:l("askAITitle")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:[{name:"Gemini",icon:"https://cdn.chatflowchart.com/images/ais/gemini.svg",baseUrl:"https://www.google.com/search?udm=50&aep=11&q="},{name:"ChatGPT",icon:"https://cdn.chatflowchart.com/images/ais/chatgpt.svg",baseUrl:"https://chatgpt.com/?prompt="},{name:"Perplexity",icon:"https://cdn.chatflowchart.com/images/ais/perplexity.svg",baseUrl:"https://www.perplexity.ai/search/new?q="},{name:"Claude",icon:"https://cdn.chatflowchart.com/images/ais/claude.svg",baseUrl:"https://claude.ai/new?q="},{name:"Grok",icon:"https://cdn.chatflowchart.com/images/ais/grok-xai.svg",baseUrl:"https://x.com/i/grok?text="}].map(function(e){return(0,r.jsx)(h(),{href:"".concat(e.baseUrl).concat(encodeURIComponent(l("content"))),target:"_blank",rel:"noopener noreferrer",title:l("askAITooltip",{tool:e.name}),className:"group inline-flex items-center justify-center rounded-xl border border-gray-100 bg-gray-50 p-2 transition-all duration-200 hover:border-blue-400 hover:bg-white hover:shadow-sm dark:border-gray-700/50 dark:bg-gray-800/30 dark:hover:border-blue-500 dark:hover:bg-gray-800",children:(0,r.jsx)("div",{className:"relative h-5 w-5 grayscale transition-all duration-200 group-hover:grayscale-0",children:(0,r.jsx)(B.default,{src:e.icon,alt:e.name,fill:!0,className:"object-contain"})})},e.name)})})]})]}),(0,r.jsx)("div",{className:"col-span-full grid grid-cols-2 gap-8 sm:grid-cols-3 md:grid-cols-5 lg:col-span-4",children:u.map(function(e){return(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-sm font-medium",children:e.title}),(0,r.jsx)("nav",{className:"flex flex-col gap-2",children:e.links.map(function(t){return(0,r.jsx)(h(),{href:t.href,className:"text-sm text-muted-foreground transition-colors hover:text-primary",children:t.label},"".concat(e.title,"-").concat(t.label))})})]},e.title)})})]})}),(0,r.jsx)(eC,{})]})}let eE=function(){var e=(0,s.useParams)(),t=null==e?void 0:e.locale,r="string"==typeof t?t:Array.isArray(t)?t[0]:"en";return(0,j.useEffect)(function(){var e=!0;return a.e(6208).then(a.bind(a,59237)).then(function(t){var a=t.MakeThisBetter;e&&a.init({projectKey:"mtb_proj_V8UJ3n2wWt1uqjAbzL_C9GIdNo_W1Iym",locale:r,position:"right",tabColor:"#0d9488",brandColors:{active:"#0d9488",hover:"#0d9488",onPrimary:"#ffffff",primary:"#0d9488"},theme:"auto"})}),function(){e=!1,a.e(6208).then(a.bind(a,59237)).then(function(e){e.MakeThisBetter.destroy()})}},[r]),null};var eF=["/chat","/canvas"];function eM(e){var t=e.children,a=e.useCases,o=e.templates,n=(0,s.usePathname)(),i=!eF.some(function(e){return null==n?void 0:n.includes(e)}),c=(0,b.fF)(n||"/",g.IB),l=i&&c;return(0,r.jsxs)("div",{className:"relative min-h-screen",children:[(0,r.jsx)(eE,{}),i&&(0,r.jsx)(ep,{}),(0,r.jsx)("main",{className:"flex-1",children:t}),l&&(0,r.jsx)(eP,{useCases:a,templates:o})]})}},87078:(e,t,a)=>{"use strict";function r(e){return{slug:e,href:"/".concat(e)}}a.d(t,{i:()=>s,o:()=>o});var s={title:"Featured converters",description:"Start with the highest-intent converters for rebuilding editable diagrams from images, PDFs, and mixed sources.",tools:[r("image-to-flowchart"),r("image-to-editable-diagram"),r("image-to-drawio"),r("image-to-mermaid")]},o=[s,{title:"Input sources",description:"Pick the source format that matches the file you already have, from screenshots and whiteboards to SOPs and compressed images.",tools:[r("screenshot-to-flowchart"),r("whiteboard-to-flowchart"),r("hand-drawn-flowchart-to-digital"),r("sop-to-flowchart"),r("png-to-drawio"),r("jpg-to-drawio"),r("flowchart-image-to-drawio"),r("screenshot-to-drawio")]},{title:"Export formats",description:"Open format-specific workflows when your final diagram needs to fit Draw.io, Mermaid, or Excalidraw-style editing.",tools:[r("image-to-excalidraw"),r("pdf-to-mermaid"),r("pdf-to-flowchart"),r("pdf-to-drawio")]}]},92898:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>u});var r=a(95155),s=a(68321),o=a(20063),n=a(92816),i=a(73229);let c=JSON.parse('{"B":[{"slug":"image-to-flowchart","pageType":"core","sourceType":"image","targetType":"flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/image-to-flowchart/","ogImage":"https://cdn.chatflowchart.com/images/media/image_to_flowchart_demo.webp","toolIntentMode":"image_to_flowchart","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-3.webp"}]},{"slug":"image-to-drawio","pageType":"format","sourceType":"image","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/image-to-drawio/","ogImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp","toolIntentMode":"image_to_drawio","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"/images/chart_type_modern.webp"}]},{"slug":"screenshot-to-drawio","pageType":"input-source","sourceType":"screenshot","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/screenshot-to-drawio/","ogImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","toolIntentMode":"image_to_drawio","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"/images/chart_type_modern.webp"}]},{"slug":"png-to-drawio","pageType":"input-source","sourceType":"png","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/png-to-drawio/","ogImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","toolIntentMode":"image_to_drawio","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/result-flowchart-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp"}]},{"slug":"jpg-to-drawio","pageType":"input-source","sourceType":"jpg","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/jpg-to-drawio/","ogImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","toolIntentMode":"image_to_drawio","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/result-flowchart-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"/images/chart_type_modern.webp"}]},{"slug":"flowchart-image-to-drawio","pageType":"input-source","sourceType":"flowchart_image","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/flowchart-image-to-drawio/","ogImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","toolIntentMode":"image_to_drawio","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"/images/chart_type_modern.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp"}]},{"slug":"image-to-excalidraw","pageType":"format","sourceType":"image","targetType":"excalidraw","defaultOutputMode":"sketch_style_canvas","schemaType":"WebApplication","canonicalPath":"/image-to-excalidraw/","ogImage":"/images/chart_type_sketch.webp","toolIntentMode":"image_to_excalidraw","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_images01_excalidraw.png"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-3.webp"}]},{"slug":"screenshot-to-flowchart","pageType":"input-source","sourceType":"screenshot","targetType":"flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/screenshot-to-flowchart/","ogImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","toolIntentMode":"screenshot_to_flowchart","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/result-flowchart-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"}]},{"slug":"whiteboard-to-flowchart","pageType":"input-source","sourceType":"whiteboard","targetType":"flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/whiteboard-to-flowchart/","ogImage":"https://cdn.chatflowchart.com/images/media/image_to_flowchart_demo.webp","toolIntentMode":"whiteboard_to_flowchart","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image_whiteboard.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"/images/chart_type_sketch.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-1.webp"}]},{"slug":"hand-drawn-flowchart-to-digital","pageType":"input-source","sourceType":"hand_drawn_flowchart","targetType":"digital_flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/hand-drawn-flowchart-to-digital/","ogImage":"/images/chart_type_sketch.webp","toolIntentMode":"hand_drawn_flowchart_to_digital","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image_handdraw.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-3.webp"}]},{"slug":"pdf-to-flowchart","pageType":"input-source","sourceType":"pdf","targetType":"flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/pdf-to-flowchart/","ogImage":"https://cdn.chatflowchart.com/images/media/image_to_flowchart_demo.webp","toolIntentMode":"pdf_to_flowchart","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image_pdf.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"}]},{"slug":"sop-to-flowchart","pageType":"input-source","sourceType":"sop","targetType":"flowchart","defaultOutputMode":"editable_flowchart","schemaType":"WebApplication","canonicalPath":"/sop-to-flowchart/","ogImage":"https://cdn.chatflowchart.com/images/media/image_to_flowchart_demo.webp","toolIntentMode":"pdf_to_flowchart","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"}]},{"slug":"pdf-to-drawio","pageType":"input-source","sourceType":"pdf","targetType":"drawio","defaultOutputMode":"drawio_compatible_canvas","schemaType":"WebApplication","canonicalPath":"/pdf-to-drawio/","ogImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp","toolIntentMode":"pdf_to_drawio","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"modern","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"/images/chart_type_modern.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/result-flowchart-1.webp"}]},{"slug":"pdf-to-mermaid","pageType":"input-source","sourceType":"pdf","targetType":"mermaid","defaultOutputMode":"mermaid_code","schemaType":"SoftwareApplication","canonicalPath":"/pdf-to-mermaid/","ogImage":"/images/chart_type_modern.webp","toolIntentMode":"image_to_mermaid","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-1.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"}]},{"slug":"image-to-mermaid","pageType":"format","sourceType":"image","targetType":"mermaid","defaultOutputMode":"mermaid_code","schemaType":"SoftwareApplication","canonicalPath":"/image-to-mermaid/","ogImage":"/images/chart_type_modern.webp","toolIntentMode":"image_to_mermaid","coreAiMode":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-2.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/final-result-2.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"/images/chart_type_modern.webp"}]},{"slug":"image-to-editable-diagram","pageType":"hub","sourceType":"image_pdf_screenshot","targetType":"editable_diagram","defaultOutputMode":"editable_diagram","schemaType":"WebApplication","canonicalPath":"/image-to-editable-diagram/","ogImage":"https://cdn.chatflowchart.com/images/media/image_to_flowchart_demo.webp","toolIntentMode":"image_to_editable_diagram","coreAiMo
1de":"image_to_flowchart","defaultCanvasStyle":"sketch","examples":[{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_input_image1.webp","afterImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/flowchart_output_image01_drawio.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/upload-screenshot.webp","afterImage":"https://cdn.chatflowchart.com/images/media/home_hero_canvas.webp"},{"beforeImage":"https://cdn.chatflowchart.com/flowchart-image-blog-images/screenshot-input-3.webp","afterImage":"/images/chart_type_sketch.webp"}]}]}');var l=["/blog","/canvas","/templates","/use-cases","/tools"],d=function(e){var t=e||"/",a=t.length>1?t.replace(/\/+$/,""):t,r=i.IB.find(function(e){return a==="/".concat(e)||a.startsWith("/".concat(e,"/"))});return r?a.slice(r.length+1)||"/":a},m=c.B.map(function(e){return d(e.canonicalPath)}),h=function(e){var t=d(e);return!!("/"===t||m.includes(t))||l.some(function(e){return t===e||t.startsWith("".concat(e,"/"))})};let u=function(){var e=(0,o.usePathname)(),t=(0,n.R)(),a=t.hasActiveSubscription;return t.isReady&&h(e)&&!a?(0,r.jsxs)("div",{children:[(0,r.jsx)(s.default,{src:"https://pl29427410.profitablecpmratenetwork.com/1c69a6e3ba5480f6833dd85f10b18241/invoke.js",async:!0,strategy:"lazyOnload","data-cfasync":"false"}),(0,r.jsx)("div",{id:"container-1c69a6e3ba5480f6833dd85f10b18241"}),(0,r.jsx)(s.default,{src:"https://pl30256559.effectivecpmnetwork.com/22/c4/e3/22c4e334f075ab6a0e6190e458f08875.js",strategy:"lazyOnload","data-cfasync":"false"}),(0,r.jsx)(s.default,{id:"at-options-script","data-cfasync":"false",dangerouslySetInnerHTML:{__html:"\n atOptions = {\n 'key' : '67681ccd7c187bd7d5aabab61b597e8c',\n 'format' : 'iframe',\n 'height' : 50,\n 'width' : 320,\n 'params' : {}\n };\n "},strategy:"afterInteractive"}),(0,r.jsx)(s.default,{"data-cfasync":"false",src:"https://www.highperformanceformat.com/67681ccd7c187bd7d5aabab61b597e8c/invoke.js"}),(0,r.jsx)(s.default,{src:"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9625126052904435",strategy:"lazyOnload",crossOrigin:"anonymous"})]}):null}},94908:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>u});var r=a(22043),s=a(95155),o=a(73229),n=a(33050),i=a(12115),c=a(68321),l=a(47126);let d=function(){return(0,s.jsx)(s.Fragment,{children:l.Zu?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.default,{strategy:"afterInteractive",src:"https://www.googletagmanager.com/gtag/js?id=".concat(l.Zu)}),(0,s.jsx)(c.default,{id:"gtag-init",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(l.Zu,"', {\n page_path: window.location.pathname,\n });\n ")}})]}):(0,s.jsx)(s.Fragment,{})})};var m=a(20063),h=function(e){var t=(0,r._)((0,i.useState)(!1),2),a=t[0],s=t[1];return(0,i.useEffect)(function(){if(!a){var t=function(){a||("requestIdleCallback"in window?window.requestIdleCallback(function(){return s(!0)}):s(!0))},r="number"==typeof e?window.setTimeout(t,e):null;return window.addEventListener("pointerdown",t,{once:!0}),window.addEventListener("keydown",t,{once:!0}),window.addEventListener("scroll",t,{once:!0,passive:!0}),function(){null!==r&&window.clearTimeout(r),window.removeEventListener("pointerdown",t),window.removeEventListener("keydown",t),window.removeEventListener("scroll",t)}}},[a,e]),a};let u=function(){var e=(0,m.usePathname)();return h((0,n.fF)(null!=e?e:"/",o.IB)?void 0:3e3)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.default,{id:"clarity-primary",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:'(function(c,l,a,r,i,t,y){\n c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\n t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;\n y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\n })(window, document, "clarity", "script", "u1r816q2ei");'}}),(0,s.jsx)(c.default,{id:"pageview",src:"https://app.pageview.app/js/script.
1js","data-domain":"chatflowchart.com",strategy:"afterInteractive"}),(0,s.jsx)(d,{})]}):null}},97687:(e,t,a)=>{"use strict";a.d(t,{Toaster:()=>v});var r=a(82732),s=a(45849),o=a(17389),n=a(95155),i=a(12115),c=a(15116),l=a(83101),d=a(65229),m=a(25016),h=c.Kq,u=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.LM,(0,r._)({ref:t,className:(0,m.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",a)},s))});u.displayName=c.LM.displayName;var f=(0,l.F)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),g=i.forwardRef(function(e,t){var a=e.className,s=e.variant,i=(0,o._)(e,["className","variant"]);return(0,n.jsx)(c.bL,(0,r._)({ref:t,className:(0,m.cn)(f({variant:s}),a)},i))});g.displayName=c.bL.displayName,i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.rc,(0,r._)({ref:t,className:(0,m.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a)},s))}).displayName=c.rc.displayName;var p=i.forwardRef(function(e,t){var a=e.className,i=(0,o._)(e,["className"]);return(0,n.jsx)(c.bm,(0,s._)((0,r._)({ref:t,className:(0,m.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":""},i),{children:(0,n.jsx)(d.A,{className:"h-4 w-4"})}))});p.displayName=c.bm.displayName;var w=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.hE,(0,r._)({ref:t,className:(0,m.cn)("text-sm font-semibold",a)},s))});w.displayName=c.hE.displayName;var b=i.forwardRef(function(e,t){var a=e.className,s=(0,o._)(e,["className"]);return(0,n.jsx)(c.VY,(0,r._)({ref:t,className:(0,m.cn)("text-sm opacity-90",a)},s))});b.displayName=c.VY.displayName;var x=a(28171);function v(){var e=(0,x.dj)().toasts;return(0,n.jsxs)(h,{children:[e.map(function(e){var t=e.id,a=e.title,i=e.description,c=e.action,l=(0,o._)(e,["id","title","description","action"]);return(0,n.jsxs)(g,(0,s._)((0,r._)({},l),{children:[(0,n.jsxs)("div",{className:"grid gap-1",children:[a&&(0,n.jsx)(w,{children:a}),i&&(0,n.jsx)(b,{children:i})]}),c,(0,n.jsx)(p,{})]}),t)}),(0,n.jsx)(u,{})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[1741,8465,8087,4121,4909,1356,5604,9194,1029,1600,2471,905,8386,8496,7499,2797,4534,2893,326,8441,9342,1255,7358],()=>t(20778)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.