PageSourceSearch

https://digitalhabits.org/_next/static/chunks/9664-13332c2c45479ec…?dpl=8ec604bb-b6df-4bb5-92c3-e00b64e13236

js digitalhabits.org collected 2026-09-24 10:07:35 UTC 81,688 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9664,8074],{50764:function(e,t,r){Promise.resolve().then(r.bind(r,48282))},48282:function(e,t,r){"use strict";r.d(t,{default:function(){return eR}});var s=r(83890),a=r(34651),l=r(85354),o=r(41901),i=r(58496),n=r(88779),d=r(56060),c=r(33200),u=r(17140),g=r(71597);function m(e){let{editSidebarContent:t,strategySidebarContent:r,editorTab:a="tools",setEditorTab:l}=e;return(0,s.jsx)(c.DD,{className:"z-[51] !top-16 !bottom-[calc(1.5rem+2.5rem+5px)] !h-auto",variant:"floating",children:(0,s.jsxs)(c.TZ,{children:[l?(0,s.jsx)("div",{className:"p-4 pb-0",children:(0,s.jsxs)("div",{className:"flex rounded-md border p-0.5 text-xs",children:[(0,s.jsx)("button",{type:"button",className:(0,g.cn)("flex-1 rounded-sm px-2 py-1 text-center transition-colors","tools"===a?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),onClick:()=>l("tools"),children:"Tools"}),(0,s.jsx)("button",{type:"button",className:(0,g.cn)("flex-1 rounded-sm px-2 py-1 text-center transition-colors","strategies"===a?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),onClick:()=>l("strategies"),children:"Strategies"})]})}):null,"strategies"===a&&r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{}),r]}):t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{}),t]}):null]})})}var h=r(4329);let f={"logo-redd2fa.png":"logo-phonefree2fa.svg","logo-redd2fa.svg":"logo-phonefree2fa.svg","logo-phonefree2fa-navy.svg":"logo-phonefree2fa.svg","logo-reddfocus.png":"logo-reddfocus.svg","logo-reddtodo.png":"logo-enkelt.svg","logo-reddtodo.svg":"logo-enkelt.svg","logo-reddblock.png":"logo-reddblocker-shield.svg","logo-reddblock-shield.svg":"logo-reddblocker-shield.svg","logo-fristed.svg":"logo-reddblocker-shield.svg","logo-reddblocker.svg":"logo-reddblocker-shield.svg"};function p(e,t){var r,s;if(!t)return;let a=e.find(e=>e.id===t);return a&&function(e){let t=e.storage_key.replace(/^\/+/,"");return"logo"===e.asset_kind&&t.startsWith("images/tool-logos/")&&!t.startsWith("digital-focus-tools/")}(a)&&null!==(s=null===(r=function(e,t){let r=function(e){let t=new Set,r=e=>{if(!e)return;let r=e.toLowerCase();t.add(r);let s=f[r];s&&t.add(s.toLowerCase())};return r(e.original_filename),r(e.storage_key.split("/").pop()),t}(t),s=e.filter(e=>"logo"===e.asset_kind&&e.storage_key.replace(/^\/+/,"").startsWith("digital-focus-tools/logos/"));for(let e of s){var a;let t=null===(a=e.original_filename)||void 0===a?void 0:a.toLowerCase();if(t&&r.has(t))return e}for(let e of Array.from(r)){let t="digital-focus-tools/logos/".concat(e),r=s.find(e=>e.storage_key.replace(/^\/+/,"")===t);if(r)return r}for(let e of Array.from(r)){let t=s.find(t=>t.storage_key.endsWith("/".concat(e))||t.storage_key.includes("-".concat(e)));if(t)return t}return null}(e,a))||void 0===r?void 0:r.id)&&void 0!==s?s:t}var x=r(30376),v=r(19083),y=r(25607),b=r(44482),w=r(23505),j=r(46609),k=r(28403),_=r(37317),N=r(59897),S=r(96009),C=r(84520);let D=(0,C.Z)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),E=(0,C.Z)("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);var T=r(40401),M=r(21971),F=r(99460),A=r(51202),I=r(39202),B=r(27263),R=r
1(86250),L=r(41593),P=r(79481),O=r(98705),Z=r(28268),z=r(98295),W=r(5963),V=r(23820),H=r(22566),U=r(84693);let G={en:{search:"Search...",rows_per_page:"Rows per page:",page:"Page",of:"of",rows:"rows",all:"All",no_results:"No results.",go_to_first:"Go to first page",go_to_previous:"Go to previous page",go_to_next:"Go to next page",go_to_last:"Go to last page",columns_title:"Columns",search_columns:"Search columns...",no_columns:"No columns found.",hidden:"hidden",unselect_all:"Unselect All Columns",select_all:"Select All Columns",columns:{title:"Title",devices:"Devices",price:"Price",what:"What",strategy:"Strategy",category:"Category"},price_free:"Free",price_freemium:"Free + Paid",price_paid:"Paid",redd_team:"By Centre for Digital Habits"},da:{search:"S\xf8g...",rows_per_page:"R\xe6kker pr. side:",page:"Side",of:"af",rows:"r\xe6kker",all:"Alle",no_results:"Ingen resultater.",go_to_first:"G\xe5 til f\xf8rste side",go_to_previous:"G\xe5 til forrige side",go_to_next:"G\xe5 til n\xe6ste side",go_to_last:"G\xe5 til sidste side",columns_title:"Kolonner",search_columns:"S\xf8g i kolonner...",no_columns:"Ingen kolonner fundet.",hidden:"skjult",unselect_all:"Frav\xe6lg alle kolonner",select_all:"V\xe6lg alle kolonner",columns:{title:"Titel",devices:"Enheder",price:"Pris",what:"Hvad",strategy:"Strategi",category:"Kategori"},price_free:"Gratis",price_freemium:"Gratis + Betalt",price_paid:"Betalt",redd_team:"Af Center for Digitale Vaner"}};function K(e){if(e)return e.startsWith("/")||e.startsWith("http://")||e.startsWith("https://")?e:"/images/strategy-icons/".concat(e)}let J={mac:"icon-mac.svg",pc:"icon-windows.svg",linux:"icon-linux.svg",ios:"icon-ios.svg",android:"icon-android.svg",chrome:"icon-chrome.svg",firefox:"icon-firefox.svg",safari:"icon-safari.svg",edge:"icon-edge.svg"},q={"Understand your device use":"bg-[#DEAB77]","Track yourself":"bg-[#DEAB77]","Set digital boundaries":"bg-[#BB4C38]","Make your goals motivating":"bg-[#93B77F]","Keep your goals in mind":"bg-[#285FA0]"},X={"Understand your device use":"#DEAB77","Track yourself":"#DEAB77","Set digital boundaries":"#BB4C38","Make your goals motivating":"#93B77F","Keep your goals in mind":"#285FA0"};function Y(e){let{table:t,totalRows:r,t:a}=e,l="h-7 w-7 p-0 bg-white hover:bg-reddCreamDark hover:text-foreground";return(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-end gap-3 sm:gap-6",children:[(0,s.jsxs)("div",{className:"text-sm font-medium italic text-gray-600",children:[a.page," ",t.getState().pagination.pageIndex+1," ",a.of," ",t.getPageCount()," (",t.getState().pagination.pageIndex*t.getState().pagination.pageSize+1,"-",Math.min((t.getState().pagination.pageIndex+1)*t.getState().pagination.pageSize,r)," ",a.of," ",r," ",a.rows,")"]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)(v.z,{variant:"outline",className:"hidden lg:flex ".concat(l),onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:a.go_to_first}),(0,s.jsx)(Z.Z,{})]}),(0,s.jsxs)(v.z,{variant:"outline",className:l,onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:a.go_to_previous}),(0,s.jsx)(z.Z,{})]}),(0,s.jsxs)(v.z,{variant:"outline",className:l,onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:a.go_to_next}),(0,s.jsx)(j.Z,{})]}),(0,s.jsxs)(v.z,{variant:"outline",className:"hidden lg:flex ".concat(l),onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),children:[(0,s.jsx)("span",{className:"sr-only",children:a.go_to_last}),(0,s.jsx)(W.Z,{})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("p",{className:"text-sm font-medium italic text-gray-600",children:a.rows_per_page}),(0,s.jsxs)(V.Ph,{value:t.getState().pagination.pageSize>=r?"all":t.getState().pagination.pageSize.toString(),onValueChange:e=>{let s="all"===e?r:Number(e);t.setPageSize(s)},children:[(0,s.jsx)(V.i4,{className:"h-7 w-[70px] bg-white focus:ring-primary",children:(0,s.jsx)(V.ki,{})}),(0,s.jsxs)(V.Bw,{side:"top",children:[(0,s.jsx)(V.Ql,{value:"5",className:"focus:bg-reddCreamDark focus:text-foreground data-[highlighted]:bg-reddCreamDark data-[highlighted]:text-foreground",children:"5"}),(0,s.jsx)(V.Ql,{value:"10",className:"focus:bg-reddCreamDark focus:text-foreground data-[highlighted]:bg-reddCreamDark data-[highlighted]:text-foreground",children:"10"}),(0,s.jsx)(V.Ql,{value:"15",className:"focus:bg-reddCreamDark focus:text-foreground data-[highlighted]:bg-reddCreamDark data-[highlighted]:text-foreground",children:"15"}),(0,s.jsx)(V.Ql,{value:"all",className:"focus:bg-reddCreamDark focus:text-foreground data-[highlighted]:bg-reddCreamDark data-[highlighted]:text-foreground",children:a.all})]})]})]})]})}function $(e){var t;
1let{tools:r,strategyTypes:a,onShowDetails:l,locale:o="en"}=e,n=G[o],[c,u]=(0,i.useState)([]),[g,m]=(0,i.useState)([]),[f,p]=(0,i.useState)([]),[x,v]=(0,i.useState)([]),[y,b]=(0,i.useState)(""),[w,j]=(0,i.useState)({}),[k,_]=(0,i.useState)(0),[N,S]=(0,i.useState)(10),C=(0,i.useMemo)(()=>Array.from(new Set(r.map(e=>{let t=a.find(t=>t.strategy.toLowerCase()===e.actual_strategy.toLowerCase());return(null==t?void 0:t.display_category)||(null==t?void 0:t.category)||"Unknown"}))).map(e=>{let t=a.find(t=>t.display_category===e||t.category===e),r=(null==t?void 0:t.category)||e;return{value:e,label:e,color:X[r]||"gray"}}),[r,a]),D=(0,i.useMemo)(()=>Array.from(new Set(r.map(e=>e.actual_strategy||"Unknown"))).map(e=>{let t=a.find(t=>t.strategy===e),r=(null==t?void 0:t.display_strategy)||e;return{value:e,label:r,icon:K(null==t?void 0:t.illustration),color:(null==t?void 0:t.category)?X[t.category]:void 0}}),[r,a]),E=(0,i.useMemo)(()=>{let e=Array.from(new Set(r.map(e=>e.price_label).filter(Boolean)));return["free","freemium","paid"].filter(t=>e.includes(t)).map(e=>({value:e,label:"free"===e?n.price_free:"freemium"===e?n.price_freemium:"paid"===e?n.price_paid:e}))},[r,n]),T=(0,i.useMemo)(()=>r.filter(e=>{let t=a.find(t=>t.strategy.toLowerCase()===e.actual_strategy.toLowerCase()),r=(null==t?void 0:t.display_category)||(null==t?void 0:t.category)||"Unknown",s=0===c.length||c.includes(r),l=0===g.length||g.includes(e.actual_strategy),o=0===f.length||e.price_label&&f.includes(e.price_label);return s&&l&&o}),[r,a,c,g,f]),M=(0,i.useMemo)(()=>{let e=T;return y&&(e=e.filter(e=>Object.values(e).some(e=>null!=e&&String(e).toLowerCase().includes(y.toLowerCase())))),x.length&&(e=[...e].sort((e,t)=>{for(let r of x){let{id:s,desc:a}=r,l=e[s],o=t[s];if("price_label"===s){let e={free:1,freemium:2,paid:3},t=e[l]||99,r=e[o]||99;if(t!==r)return a?r-t:t-r;continue}if(l!==o){if(null==l)return 1;if(null==o)return -1;if("string"==typeof l&&"string"==typeof o){let e=l.localeCompare(o,void 0,{sensitivity:"base"});return a?-e:e}{let e=l>o?1:l<o?-1:0;return a?-e:e}}}return 0})),e},[T,y,x]),F=(0,i.useMemo)(()=>[{id:"title",header:n.columns.title,accessorKey:"title",meta:{width:"15%"},cell:e=>{let{row:t,getValue:r}=e,a=t.original;return(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[a.logo&&(0,s.jsx)(O.ExternalAssetImage,{src:(0,h.G)(a.logo,"logo"),alt:"".concat(a.title," logo"),width:32,height:32,className:"h-8 w-8 rounded-sm object-contain"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"font-medium text-gray-900 leading-tight",children:r()}),(0,U.AX)(a)&&(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[0.6rem] font-semibold tracking-wide bg-[#1e2d3e] text-white/90 shadow-sm whitespace-nowrap",children:[(0,s.jsx)("span",{className:"text-[#d4605a] text-xs",children:"♥"})," ",n.redd_team]})})]})]})}},{id:"devices",header:n.columns.devices,accessorKey:"devices",meta:{width:"10%"},cell:e=>{let{getValue:t}=e,r=(0,H.Jn)(t().split(" ").map(e=>e.trim().toLowerCase()).filter(Boolean));return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:r.map((e,t)=>{let r=J[e];return r?(0,s.jsx)(d.default,{src:"/images/icons-device/".concat(r),alt:e,width:20,height:20,className:"rounded-sm"},t):(0,s.jsx)("span",{className:"text-xs",children:e},t)})})}},{id:"one_line",header:n.columns.what,accessorKey:"one_line",meta:{width:"30%"},cell:e=>{let{getValue:t}=e,r=t();return r?(0,s.jsx)(A.U,{className:"text-gray-700 text-sm",components:{a:e=>{let{href:t,children:r}=e;return(0,s.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-gray-700 underline hover:no-underline",children:r})}},children:r}):null}},{id:"price_label",header:n.columns.price,accessorKey:"price_label",meta:{width:"8%"},cell:e=>{let{getValue:t}=e,r=t();return r?(0,s.jsx)("span",{className:"inline-flex items-center px-2 rounded-full text-[0.65rem] font-medium bg-gray-100 text-gray-700 border border-gray-200 shadow-sm",children:"free"===r?n.price_free:"freemium"===r?n.price_freemium:"paid"===r?n.price_paid:r}):null}},{header:n.columns.strategy,accessorKey:"actual_strategy",meta:{width:"14%"},cell:e=>{let{row:t,getValue:r}=e,l=t.original,o=a.find(e=>e.strategy.toLowerCase()===l.actual_strategy.toLowerCase()),i=(null==o?void 0:o.illustration)||"",n=(null==o?void 0:o.illustration_alt_text)||"".concat(l.actual_strategy," icon"),c=(null==o?void 0:o.display_strategy)||r();return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[i&&(0,s.jsx)(d.default,{src:K(i)||"",alt:n,width:24,height:24,className:"rounded-sm"}),(0,s.jsx)("span",{children:c})]})}},{id:"category",header:n.columns.category,accessorFn:e=>{let t=a.find(t=>t.strategy.toLowerCase()===e.actual_strategy.toLowerCase());return(null==t?void 0:t.display_category)||(null==t?void 0:t.category)||"Unknown"},meta:{width:"11%"},cell:e=>{let{getValue:t,row:r}=e,l=t(),o=r.original,i=a.find(e=>e.strategy.toLowerCase()===o.actual_strategy.toLowerCase()),n=q[(null==i?void 0:i.category)||"Unknown"]||"bg-gray-400";return(0,s.jsx)("div",{className:"rounded-sm px-2 py-1 text-white text-center ".concat(n),children:l})}}],[a,n]),Z=F.map(e=>{let t;if("id"in e&&"string"==typeof e.id?t=e.id:"accessorKey"in e&&"string"==typeof e.accessorKey&&(t=e.accessorKey),t)switch(t){case"category":return{...e,id:t,header:()=>(0,s.jsx)(R.D,{title:n.columns.category,options:C,selectedValues:c,setSelectedValues:u})};case"actual_strategy":return{...e,id:t,header:()=>(0,s.jsx)(R.D,{title:n.columns.strategy,options:D,selectedValues:g,setSelectedValues:m})};case"price_label":return{...e,id:t,header:()=>(0,s.jsx)(R.D,{title:n.columns.price,options:E,selectedValues:f,setSelectedValues:p})}}return e}),z=(0,I.b7)({data:M.slice(k*N,(k+1)*N),columns:Z,state:{sorting:x,globalFilter:y,columnVisibility:w,pagination:{pageIndex:k,pageSize:N}},onSortingChange:v,onGlobalFilterChange:b,onColumnVisibilityChange:j,onPaginationChange:e=>{let t="function"==typeof e?e(z.getState().pagination):e;_(t.pageIndex),S(t.pageSize)},getCoreRowModel:(0,B.sC)(),getSortedRowModel:(0,B.tj)(),getPaginationRowModel:(0,B.G_)(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,pageCount:Math.ceil(M.length/N),enableRowSelection:!1}),W=(e,t)=>{let r=e.target;!(r.closest("button")||r.closest(".filter-dropdown")||r.closest("input")||r.closest("select")||r.closest("div[role='dialog']"))&&t.getCanSort()&&t.toggleSorting()};return(0,s.jsxs)("div",{className:"min-w-0 max-w-full",children:[(0,s.jsxs)("div",{className:"mb-4 flex w-full min-w-0 flex-wrap items-end gap-2",children:[(0,s.jsx)("input",{id:"tools-table-search",type:"text",value:y,onChange:e=>b(e.target.value),placeholder:n.search,className:"h-9 min-w-0 flex-1 basis-full rounded border border-input p-2 text-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary sm:basis-auto sm:flex-none"}),(0,s.jsx)("div",{className:"shrink-0",children:(0,s.jsx)(P.x,{title:n.columns_title,columns:z.getAllColumns().filter(e=>e.getCanHide()),selectedColumns:z.getAllColumns().filter(e=>e.getCanHide()).filter(e=>e.getIsVisible()).map(e=>e.id),setSelectedColumns:e=>{let t="function"==typeof e?e([]):e;z.getAllColumns().filter(e=>
1e.getCanHide()).forEach(e=>{e.toggleVisibility(t.includes(e.id))})},t:n})})]}),(0,s.jsx)("div",{className:"w-full min-w-0 overflow-x-auto rounded-md border max-h-[85vh]",children:(0,s.jsxs)(L.iA,{className:"min-w-[640px]",children:[(0,s.jsx)(L.xD,{className:"sticky top-0 z-[10] bg-white",children:z.getHeaderGroups().map(e=>(0,s.jsx)(L.SC,{children:e.headers.map(e=>{var t,r;return(0,s.jsx)(L.ss,{onClick:t=>W(t,e.column),className:e.column.getCanSort()?"cursor-pointer select-none":"",style:{width:(null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.width)||"auto"},children:e.isPlaceholder?null:(0,s.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,I.ie)(e.column.columnDef.header,e.getContext()),null!==(r=({asc:"↑",desc:"↓"})[e.column.getIsSorted()])&&void 0!==r?r:null]})},e.id)})},e.id))}),(0,s.jsx)(L.RM,{children:(null===(t=z.getRowModel().rows)||void 0===t?void 0:t.length)?z.getRowModel().rows.map((e,t)=>(0,s.jsx)(L.SC,{className:"max-h-32 overflow-y-auto ".concat(t%2==0?"bg-[#faf8f5] hover:bg-[#f8f6f2]":"bg-white hover:bg-[#faf8f5]"," cursor-pointer transition-colors"),onClick:t=>{t.target.closest("button")||(console.log("Row clicked for",e.original.title),l(e.original))},children:e.getVisibleCells().map(e=>(0,s.jsx)(L.pj,{className:"max-h-32 overflow-y-auto",children:(0,s.jsx)("div",{className:"max-h-32 overflow-y-auto",children:(0,I.ie)(e.column.columnDef.cell,e.getContext())})},e.id))},e.id)):(0,s.jsx)(L.SC,{children:(0,s.jsx)(L.pj,{colSpan:F.length,className:"h-24 text-center",children:n.no_results})})})]})}),(0,s.jsx)("div",{className:"my-6 min-w-0 max-w-full",children:(0,s.jsx)(Y,{table:z,totalRows:M.length,t:n})})]})}let Q={"Understand your device use":"#DEAB77","Track yourself":"#DEAB77","Set digital boundaries":"#BB4C38","Make your goals motivating":"#93B77F","Keep your goals in mind":"#285FA0"};function ee(e){var t,r;let{strategy:a,isVisible:l,onHideClick:o,hideLabel:i="Hide tools"}=e;if(!a)return null;let n=(t=a.strategy)?t.toLowerCase().replace(/[^\w\s]/g,"").replace(/\s+/g,"_"):"",c=Q[a.category]||"#e5e7eb";return(0,s.jsx)("div",{className:"\n        sticky top-[var(--tools-toolbar-height,3.5rem)] z-20 bg-background transition-all duration-300 mt-[-50px]\n        ".concat(l?"opacity-100 visible h-auto":"opacity-0 h-auto invisible","\n      "),children:(0,s.jsxs)("div",{className:"flex items-center justify-between no-underline border-b-2 pb-2 strategy-heading-sticky-border",style:{borderColor:c},children:[(0,s.jsxs)("a",{href:"#".concat(n),className:"flex items-center",children:[a.illustration&&(0,s.jsx)(d.default,{src:(r=a.illustration).startsWith("/")||r.startsWith("http://")||r.startsWith("https://")?r:"/images/strategy-icons/".concat(r),alt:a.illustration_alt_text||"",width:28,height:28,className:"mr-3"}),(0,s.jsx)("h2",{className:"hidden md:inline text-lg font-semibold text-gray-800 truncate",children:a.display_strategy})]}),(0,s.jsxs)(v.z,{variant:"secondary",size:"sm",className:"px-2 py-1 gap-1 border border-border bg-reddCreamDark font-semibold text-foreground shadow-none hover:bg-[#e8e4de]",onClick:o,children:[i,(0,s.jsx)(w.Z,{className:"inline-block h-4 w-4"})]})]})})}var et=r(71962),er=r(6070),es=r(18308),ea=r(50402);function el(e){let{checkedDevices:t,setCheckedDevices:r,rememberDeviceSettings:a,setRememberDeviceSettings:o,locale:n="en"}=e,c=H.R[n],[u,g]=(0,i.useState)(!1),[m,h]=(0,i.useState)(!1),f=0===t.length,p=e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},x="".concat(H.xV," mr-3");return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)("p",{className:"text-base text-muted-foreground",children:c.filter_hint}),(0,s.jsx)("button",{type:"button",onClick:()=>r(f?H.GM:[]),className:"shrink-0 text-base font-medium text-reddTeal hover:underline",children:f?c.select_all:c.clear_all})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center py-0.5",children:[(0,s.jsx)(ea.X,{checked:a,onCheckedChange:e=>{let t=!0===e;o(t),localStorage.setItem("rememberDeviceSettings",t.toString()),t||localStorage.removeItem("checkedDevices")},className:x}),(0,s.jsx)("span",{className:"text-base",children:c.remember_settings})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4",children:[H.vV.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2.5 text-sm font-semibold uppercase tracking-[0.06em] text-muted-foreground",children:c[e.labelKey]}),(0,s.jsx)("ul",{className:"space-y-2",children:e.items.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center py-0.5 leading-snug",children:[(0,s.jsx)(ea.X,{checked:t.includes(e),onCheckedChange:()=>p(e),className:x}),"Chrome / Edge"===e?(0,s.jsxs)("div",{className:"mr-1.5 flex -sp
1ace-x-1",children:[(0,s.jsx)(d.default,{src:H.yJ["Chrome / Edge"],alt:"Chrome",width:24,height:24,className:"h-6 w-6"}),(0,s.jsx)(d.default,{src:"/images/icons-device/icon-edge.svg",alt:"Edge",width:24,height:24,className:"h-6 w-6"})]}):(0,s.jsx)(d.default,{src:H.yJ[e]||"/placeholder.svg",alt:e,width:24,height:24,className:"mr-1.5 h-6 w-6"}),(0,s.jsx)("span",{className:"text-base",children:e})]})},e))})]},e.labelKey)),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2.5 text-sm font-semibold uppercase tracking-[0.06em] text-muted-foreground",children:c.technical_notes}),(0,s.jsxs)("ul",{className:"space-y-2",children:[(0,s.jsx)("li",{children:(0,s.jsx)(l.pn,{delayDuration:0,children:(0,s.jsxs)(l.u,{open:u,onOpenChange:g,children:[(0,s.jsx)(l.aJ,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"flex items-center py-0.5 text-left text-base text-foreground leading-snug",onClick:()=>g(e=>!e),children:[(0,s.jsx)(_.Z,{className:"mr-2.5 h-5 w-5 shrink-0"}),c.edge_brave_users]})}),(0,s.jsx)(l._v,{side:"bottom",className:"max-w-xs rounded-md border border-border bg-[#faf8f5] p-3 text-sm text-foreground shadow-lg",children:c.edge_brave_tooltip})]})})}),(0,s.jsx)("li",{children:(0,s.jsx)(l.pn,{delayDuration:0,children:(0,s.jsxs)(l.u,{open:m,onOpenChange:h,children:[(0,s.jsx)(l.aJ,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"flex items-center py-0.5 text-left text-base text-foreground leading-snug",onClick:()=>h(e=>!e),children:[(0,s.jsx)(_.Z,{className:"mr-2.5 h-5 w-5 shrink-0"}),c.android_users]})}),(0,s.jsxs)(l._v,{side:"bottom",className:"max-w-xs rounded-md border border-border bg-[#faf8f5] p-3 text-sm text-foreground shadow-lg",children:[c.android_tooltip_prefix," ",(0,s.jsx)("a",{href:"https://play.google.com/store/apps/details?id=org.mozilla.firefox&hl=en",target:"_blank",className:"text-foreground underline hover:text-foreground",rel:"noreferrer",children:"Firefox"})," ",c.android_tooltip_suffix]})]})})})]})]})]})]})}var eo=r(38904);function ei(e){let{item:t}=e;return"Chrome / Edge"===t?(0,s.jsxs)("div",{className:"flex -space-x-1",children:[(0,s.jsx)(d.default,{src:H.yJ["Chrome / Edge"],alt:"Chrome",width:22,height:22,className:"h-[22px] w-[22px]"}),(0,s.jsx)(d.default,{src:"/images/icons-device/icon-edge.svg",alt:"Edge",width:22,height:22,className:"h-[22px] w-[22px]"})]}):(0,s.jsx)(d.default,{src:H.yJ[t]||"/placeholder.svg",alt:t,width:22,height:22,className:"h-[22px] w-[22px]"})}function en(e){let{open:t,onOpenChange:r,checkedDevices:a,setCheckedDevices:l,locale:o="en"}=e,i=H.R[o],n=0===a.length,d=e=>{l(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return(0,s.jsx)(eo.dy,{open:t,onOpenChange:r,shouldScaleBackground:!1,children:(0,s.jsxs)(eo.sc,{className:"max-h-[88vh] rounded-t-2xl border-border/60 bg-background px-0 pb-0",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border/60 px-5 pb-4 pt-1",children:[(0,s.jsx)(eo.iI,{className:"font-serif text-xl font-bold text-foreground",children:i.filter_by_device}),(0,s.jsx)("button",{type:"button",onClick:()=>l(n?H.GM:[]),className:"text-sm font-medium text-muted-foreground hover:text-foreground",children:n?i.select_all:i.clear_all})]}),(0,s.jsx)("div",{className:"overflow-y-auto px-5 py-4",children:(0,s.jsx)("div",{className:"space-y-6",children:H.vV.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-3 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",children:i[e.labelKey]}),(0,s.jsx)("ul",{className:"space-y-1",children:e.items.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 rounded-lg py-2.5",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[#ece8e2]",children:(0,s.jsx)(ei,{item:e})}),(0,s.jsx)("span",{className:"flex-1 text-base text-foreground",children:e}),(0,s.jsx)(ea.X,{checked:a.includes(e),onCheckedChange:()=>d(e),className:H.xV})]})},e))})]},e.labelKey))})}),(0,s.jsx)(eo.ze,{className:"border-t border-border/60 bg-background px-5 pb-6 pt-4",children:(0,s.jsx)(eo.uh,{asChild:!0,children:(0,s.jsx)(v.z,{className:"h-12 w-full rounded-xl bg-reddTeal text-base font-semibold text-white hover:bg-reddTeal/90",children:i.show}
1)})})]})})}let ed=(0,C.Z)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),ec=(0,C.Z)("fullscreen",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]]);var eu=r(52087);let eg=[{date:"2026-08-07",logo:"/images/tool-logos/logo-reddfocus.svg",body:"**Digital Habits: Focus** added as a tool for **'Delay distracting apps and websites'** — Delay any website and remind yourself of your intention online"},{date:"2026-08-07",logo:"/images/tool-logos/logo-reddfocus.svg",body:"**Digital Habits: Focus** added as a tool for **'Redirect yourself away from distractions'** — Redirect yourself to a specific website page or another website altogether"},{date:"2026-07-21",body:"**Greyscale for Windows** added as a tool for **'Go grey scale'** — Turn your whole computer greyscale to make it less enticing and toggle greyscale with a keyboard shortcut"},{date:"2026-07-21",logo:"/images/tool-logos/logo-reddfocus.svg",body:"**Digital Habits: Focus Web** added as a tool for **'Go grey scale'** — Turn any website greyscale to make it less enticing"},{date:"2026-07-21",logo:"fullscreen",body:"Combined **Distraction-Free Mode - Google Docs & Slides** and **MS Word Focus Mode** into **Hide distractions in Word, Google Docs, Chrome, etc.**"},{date:"2026-07-21",logo:"/images/tool-logos/logo-blockalicious.jpeg",body:"**Blockalicious removed** — App no longer listed on the app store and developer's website links no longer work."},{date:"2026-07-21",body:"**Chomper removed** — The project was archived in December 2024 and many issues have been reported since its archival."},{date:"2026-07-17",logo:"/images/tool-logos/logo-stay-free.png",body:"**StayFree removed** — The app's main business model is to sell potentially sensitive user data, which does not meet our privacy standards."},{date:"2026-07-17",logo:"/images/tool-logos/logo-authenticatorcc.svg",body:"**authenticator.cc removed** — Developer status is unclear and there has not been any activity in the code since August 2024."}],em=[{id:"effectiveness",label:"Effectiveness",description:"We prioritise tools that are evidence-based, in daily use by thousands of people, receive favourable public ratings and reviews, and/or consistently receive positive feedback from participants in our training sessions."},{id:"safety-reliability",label:"Safety & reliability",description:"We prioritise tools that are built-in to users' operating systems, open-source so their code can be audited, and created by trusted developers with transparent and fair business models."},{id:"affordability-value",label:"Affordability and value",description:"We analyse the value and only include tools with a fair and transparent pricing model. We try to ensure that tools which are free to the user are available for all strategies, but note that paid options can be required to meet our effectiveness and safety standards."}];var eh=r(15095);let ef="toolsChangelogSeenRevision",ep=new Intl.DateTimeFormat("en-GB",{month:"long",year:"numeric"});function ex(e){let{after:t}=e,[r,a]=(0,i.useState)(!1),[l,o]=(0,i.useState)(!1),[n,d]=(0,i.useState)(!1),[c,u]=(0,i.useState)(void 0),m=(0,i.useRef)(null),h=function(e){let t=[],r=new Map;for(let a of e){let e=function(e){let t=new Date("".concat(e,"T12:00:00"));return"".concat(t.getFullYear(),"-").concat(String(t.getMonth()+1).padStart(2,"0"))}(a.date),l=r.get(e);if(void 0===l){var s;r.set(e,t.length),t.push({key:e,label:(s=a.date,ep.format(new Date("".concat(s,"T12:00:00")))),entries:[a]})}else t[l].entries.push(a)}return t}(eg);return(0,i.useEffect)(()=>{let e=()=>d(function(){try{return localStorage.getItem(ef)!==String(3)}catch(e){return!0}}());return e(),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[]),(0,i.useLayoutEffect)(()=>
1{if(!r)return;let e=()=>{m.current&&u(function(e){let t=e.closest("[data-tools-toolbar-row]"),r=(null!=t?t:e).getBoundingClientRect().left,s=e.getBoundingClientRect().right;return Math.min(34*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),Math.max(0,s-r))}(m.current))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[r]),(0,s.jsxs)(eu.J2,{open:r,onOpenChange:e=>{a(e),e||o(!1)},children:[(0,s.jsx)(eu.tW,{asChild:!0,children:(0,s.jsxs)("div",{ref:m,className:"flex shrink-0 items-center gap-0.5 sm:gap-3",children:[(0,s.jsx)(eu.xo,{asChild:!0,children:(0,s.jsxs)(v.z,{type:"button",variant:"ghost",size:"icon","aria-label":"Tool list updates","aria-expanded":r,className:(0,g.cn)("relative h-8 w-8 shrink-0 rounded-lg border border-border bg-white text-foreground hover:bg-reddCreamDark hover:text-foreground sm:h-9 sm:w-9",r&&"bg-reddCreamDark"),children:[(0,s.jsx)(ed,{className:"!h-4 !w-4 sm:!h-5 sm:!w-5"}),n?(0,s.jsx)("span",{className:"absolute -right-1 -top-1 block h-[11px] w-[11px] shrink-0 rounded-full bg-redd","aria-hidden":!0}):null]})}),t]})}),(0,s.jsxs)(eu.yk,{align:"end",sideOffset:8,className:"flex max-h-[var(--radix-popover-content-available-height)] flex-col overflow-hidden rounded-lg border border-border p-0 shadow-lg",style:null!=c?{width:c}:{width:"".concat(34,"rem")},onOpenAutoFocus:()=>{(function(){try{localStorage.setItem(ef,String(3))}catch(e){}})(),d(!1)},children:[(0,s.jsxs)("header",{className:"shrink-0 bg-reddNavy px-4 py-3.5",children:[(0,s.jsx)("h2",{className:"text-lg font-bold text-white font-[family-name:var(--font-geist-sans)]",children:"Tool list updates"}),(0,s.jsx)("p",{className:"mt-1 text-sm leading-snug text-white/75 font-[family-name:var(--font-inter)]",children:"Changes made to the curated list of tools as our team reviews them"})]}),(0,s.jsx)("div",{className:"min-h-0 max-h-[min(15rem,40vh)] shrink overflow-y-auto bg-white px-4 py-3",children:0===h.length?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No updates yet."}):(0,s.jsx)("div",{className:"space-y-5",children:h.map(e=>(0,s.jsxs)("section",{children:[(0,s.jsx)("p",{className:(0,g.cn)(eh.ax,"mb-1.5"),children:e.label}),(0,s.jsx)("ul",{className:"relative space-y-2",children:e.entries.map((t,r)=>{let a=r===e.entries.length-1;return(0,s.jsxs)("li",{className:"relative flex gap-3 overflow-visible",children:[(0,s.jsxs)("div",{className:"relative flex shrink-0 flex-col items-center self-stretch",style:{width:20},children:[a?null:(0,s.jsx)("span",{className:"absolute left-1/2 w-px -translate-x-1/2 bg-border",style:{top:10,bottom:"calc(-0.5rem - ".concat(10,"px)")},"aria-hidden":!0}),"fullscreen"===t.logo?(0,s.jsx)("span",{className:"relative z-10 flex h-5 w-5 translate-x-[0.25px] items-center justify-center bg-white","aria-hidden":!0,children:(0,s.jsx)(ec,{className:"h-5 w-5 text-reddNavy"})}):t.logo?(0,s.jsx)(O.ExternalAssetImage,{src:t.logo,alt:"",width:20,height:20,className:"relative z-10 h-5 w-5 translate-x-[0.25px] rounded-sm object-contain"}):(0,s.jsx)("span",{className:"relative z-10 flex h-5 w-5 translate-x-[0.25px] items-center justify-center","aria-hidden":!0,children:(0,s.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full bg-reddNavy"})})]}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 -mt-[2px]",children:[(0,s.jsx)(A.U,{className:"text-sm leading-relaxed text-foreground [&>p]:m-0 [&_strong]:font-semibold [&_a]:text-reddTeal [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:text-reddTeal [&_a]:hover:no-underline",children:t.body}),t.link?(0,s.jsx)("a",{href:t.link.href,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-block text-sm text-reddTeal underline underline-offset-2 hover:text-reddTeal hover:no-underline",children:t.link.label}):null]})]},"".concat(t.date,"-").concat(r))})})]},e.key))})}),(0,s.jsxs)("footer",{className:(0,g.cn)("flex flex-col border-t border-border bg-white",l&&"min-h-0 flex-1 overflow-hidden"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),"aria-expanded":l,className:"flex w-full shrink-0 items-center gap-1 px-4 py-3 text-left text-sm text-foreground transition-colors hover:text-foreground
1/80",children:[(0,s.jsx)("span",{children:"How we choose tools to include"}),(0,s.jsx)(j.Z,{className:(0,g.cn)("h-4 w-4 shrink-0 transition-transform",l&&"rotate-90")})]}),l?(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4",children:[(0,s.jsx)("p",{className:"text-sm leading-snug text-muted-foreground",children:"The tools included are carefully evaluated based on these data and other criteria:"}),(0,s.jsx)("ol",{className:"mt-3 space-y-3",children:em.map((e,t)=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("p",{className:"text-left text-[0.65rem] font-semibold uppercase tracking-wide text-foreground",children:[t+1,". ",e.label]}),(0,s.jsx)("p",{className:"mt-0.5 text-sm leading-snug text-muted-foreground",children:e.description})]},e.id))})]}):null]})]})]})}var ev=r(70794),ey=r(52376),eb=r(73359),ew=r(58523),ej=r(93652);let ek={en:"Digital Focus Tools | ReDD",da:"Redskaber mod digital distraktion | ReDD"},e_={en:{title:"Digital Focus Tools",disclaimer:"The tools below are a curated selection based on our research. Note that changing system settings or installing tools can carry risks, e.g., missing notifications or blocking social media apps at the wrong time. If in doubt, ask your facilitator or come to the Help! Caf\xe9. Use the below instructions at your own risk.",show_tools:"Show tools",hide_tools:"Hide tools",no_tools:"No tools found for",show_details:"Show details",link_copied:"Link copied!",what_can_do:"What it can do",at_a_glance:"At a glance:",demo:"Demo:",how_to:"How-to:",price:"Price",try_yourself:"Try it yourself",how_to_setup:"How to set it up",watch:"Watch",demo_video:"Demo video",setup_guide_video:"Setup guide video",share_tool:"Share tool",share:"Share",back_to_tools:"Tools",instructions:"Instructions",close:"Close",price_free:"Free",price_freemium:"Free + Paid",price_paid:"Paid",redd_team:"By Centre for Digital Habits",edge_chrome_note:"Using Edge? You can install extensions from the Chrome Web Store.",cards:"Cards",table:"Table",filter_by_device:"Filter by device"},da:{title:"Digitale fokusredskaber",disclaimer:"Redskaberne nedenfor er et udvalg baseret p\xe5 vores forskning. Bem\xe6rk, at \xe6ndring af systemindstillinger eller installation af redskaber kan medf\xf8re risici, f.eks. at g\xe5 glip af notifikationer eller at blokere sociale medier-apps p\xe5 det forkerte tidspunkt. Hvis du er i tvivl, s\xe5 sp\xf8rg din workshop-facilitator eller kom til n\xe6ste Help! Caf\xe9. Brug nedenst\xe5ende instruktioner p\xe5 eget ansvar.",show_tools:"Vis redskaber",hide_tools:"Skjul redskaber",no_tools:"Ingen redskaber fundet til",show_details:"Vis detaljer",link_copied:"Link kopieret!",what_can_do:"Hvad kan det bruges til?",at_a_glance:"Kort sagt:",demo:"Demo:",how_to:"S\xe5dan g\xf8r du:",price:"Hvad koster det?",try_yourself:"Pr\xf8v det selv",how_to_setup:"S\xe5dan s\xe6tter du det op",watch:"Se",demo_video:"Demo-video",setup_guide_video:"Ops\xe6tningsvideo",share_tool:"Del redskab",share:"Del",back_to_tools:"Redskaber",instructions:"Instruktioner",close:"Luk",price_free:"Gratis",price_freemium:"Gratis + Betalt",price_paid:"Betalt",redd_team:"Af Center for Digitale Vaner",edge_chrome_note:"Bruger du Edge? Du kan installere udvidelser fra Chrome Webshop.",cards:"Kort",table:"Tabel",filter_by_device:"Filtrer efter enhed"}},eN={"See how you spend your time":"understand","Understand how you use your devices":"understand","Out of sight, out of mind":"sight","Block distracting websites or apps":"block","Hide distracting features on websites or apps":"hide","Limit notifications":"notifications","Declutter your home screen & desktop":"declutter","Focus in bursts with a timer":"timer","Add reward / reinforcement":"reward","Go grey scale":"greyscale","Delay distracting apps and websites":"delay","Keep your goals in sight":"goals","Redirect yourself away from distractions":"redirect"};function eS(e){if(!e)return"";let t=eN[e];return t?t.toLowerCase():e.split(" ")[0].toLowerCase()}function eC(e){return e?e.toLowerCase().replace(/[^\w\s]/g,"").replace(/\s+/g,"_"):""}function eD(e){let t=(e.title_en||e.title).trim();if("Digital Habits: Focus"===t||"Digital Habits: Focus Web"===t){let t=eS(e.actual_strategy);return t?"focus-".concat(t):"focus-hide"}if("Digital Habits: Focus Android (Preview)"===t)return"focus-android";if("Digital Habits: Blocker"===t)return"blocker";if("Digital Habits: To-Do"===t)return"to-do";if("Digital Habits: Phone-Free 2FA"===t)return"phone-free-2fa";if("Digital Habits: Mail"===t)return"mail";let r=eS(e.actual_strategy);return"".concat(r,"-").concat(eC(t))}let eE={2:"guide-2fa-on-computer",3:"guide-block-distracting-apps",4:"guide-hide-distracting-features",5:"guide
1-limit-notifications"},eT={"Understand your device use":"#DEAB77","Track yourself":"#DEAB77","Set digital boundaries":"#BB4C38","Make your goals motivating":"#93B77F","Keep your goals in mind":"#285FA0"},eM={"Understand your device use":"bg-[#DEAB77]","Track yourself":"bg-[#DEAB77]","Set digital boundaries":"bg-[#BB4C38]","Make your goals motivating":"bg-[#93B77F]","Keep your goals in mind":"bg-[#285FA0]"};function eF(e){let{tools:t,selectedTool:r,setSelectedTool:a,dialogOpen:l,setDialogOpen:o,editMode:n,t:d}=e,[c,u]=(0,i.useState)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ew.Z,{tools:t,labels:d,getToolId:eD,onOpenDetails:function(e){a(e),o(!0)},onEnlargeScreenshot:u}),(0,s.jsx)(ej.Z,{src:c,onClose:()=>u(null)}),n&&l&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>{o(!1),a(null)}}),(0,s.jsx)(T.Vq,{open:l,onOpenChange:e=>{e||(o(!1),a(null))},modal:!n,children:(0,s.jsx)(T.cZ,{className:(0,g.cn)("gap-0 overflow-x-hidden overflow-y-auto border-0 bg-background p-0","inset-0 h-[100dvh] max-h-[100dvh] w-full max-w-none translate-x-0 translate-y-0 rounded-none","sm:inset-auto sm:left-[50%] sm:top-[50%] sm:h-auto sm:max-h-[95vh] sm:w-full sm:max-w-[1020px] sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg sm:border"),hideCloseButton:!0,style:n?{left:"calc(50% + 200px)",maxWidth:"calc(100vw - 400px - 2rem)"}:void 0,hideOverlay:n,onPointerDownOutside:n?e=>e.preventDefault():void 0,onInteractOutside:n?e=>e.preventDefault():void 0,children:r&&(0,s.jsx)(eb.nl,{tool:r,t:d})})})]})}function eA(e){let{strategy:t,allTools:r,isExpanded:a,isStickyHeaderVisible:l,selectedTool:o,setSelectedTool:i,dialogOpen:n,setDialogOpen:d,toggleStrategyExpand:c,editMode:u,t:g}=e;if(!a)return null;let m=r.filter(e=>e.actual_strategy===t.strategy).sort((e,t)=>{let r=e.rank?parseInt(e.rank):1/0,s=t.rank?parseInt(t.rank):1/0;return r===1/0&&s===1/0?0:r-s});return(0,s.jsxs)("div",{children:[(0,s.jsx)(ee,{strategy:t,isVisible:l,onHideClick:()=>c(t.strategy),hideLabel:g.hide_tools}),0===m.length?(0,s.jsxs)("div",{className:"border border-gray-300 p-4 mt-3 italic",children:[g.no_tools," “",t.display_strategy,"”"]}):(0,s.jsx)("div",{className:"rounded-md md:p-4 mt-0",children:(0,s.jsx)(eF,{tools:m,selectedTool:o,setSelectedTool:i,dialogOpen:n,setDialogOpen:d,editMode:u,t:g})})]})}let eI=(0,i.forwardRef)((e,t)=>{let{strategy:r,isExpanded:a,greyOut:n,toggleStrategyExpand:c,t:u,highlightCandidate:g,guideIndex:m,hasExplored:h}=e,f=eC(r.strategy),p="".concat("".concat(window.location.origin).concat(window.location.pathname.split(/[?#]/)[0]),"#").concat(f),[k,_]=(0,i.useState)(!1),N=eT[r.category]||"#78716c",S=a?N:"rgb(229, 229, 229)",C=a?"rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, ".concat(N," 0px 2px 4px 0px, ").concat(N," 0px 2px 4px -1px"):"rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px -1px";return(0,s.jsxs)(x.Zb,{ref:t,id:f,onClick:()=>c(r.strategy),className:"bg-white md:p-6 md:pt-4 md:pr-4 p-4 pb-6 transition-opacity relative ".concat(a?"border-[3px]":"border"," ").concat(n?"opacity-50":""," ").concat(g?"ring-4 ring-emerald-400 ring-offset-2":""),style:{borderColor:S,boxShadow:C},children:[g&&(0,s.jsx)("div",{className:"absolute bottom-1 right-1 md:bottom-2 md:right-2 z-10",children:(0,s.jsx)("div",{className:"bg-emerald-500 rounded-full p-1 shadow-md",children:(0,s.jsx)(y.Z,{className:"w-5 h-5 md:w-6 md:h-6 text-white",strokeWidth:2.5})})}),h&&m&&m>=2&&m<=5&&eE[m]&&(0,s.jsxs)("a",{href:"/".concat(eE[m]),target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"absolute top-1 left-1 md:top-2 md:left-2 z-10 flex items-center gap-1 bg-gray-100 hover:bg-gray-200 text-gray-700 text-xs font-semibold px-2 py-1 rounded-md shadow-sm border border-gray-200 transition-colors",title:"Download guide",children:["GUIDE",(0,s.jsx)(b.Z,{className:"w-3 h-3"})]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)(l.pn,{children:(0,s.jsxs)(l.u,{open:k,children:[(0,s.jsx)(l.aJ,{asChild:!0,children:(0,s.jsx)("button",{className:"absolute top-0 right-0 text-gray-500 hover:text-gray-700 p-0",onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(p),_(!0),setTimeout(()=>_(!1),2e3)},children:(0,s.jsx)(o.Z,{size:16})})}),(0,s.jsx)(l._v,{side:"top",children:u.link_copied})]})})}),r.illustration&&(0,s.jsx)("div",{className:"mb-2 text-center",children:(0,s.jsx)(d.default,{src:function(e){if(e)return e.startsWith("/")||e.startsWith("http://")||e.startsWith("https://")?e:"/images/strategy-icons/".concat(e)}(r.illustration)||"",alt:r.illustration_alt_text||r.strategy,width:80,height:80,className:"mx-auto"})}),(0,s.jsx)(x.Ol,{className:"md:p-1 relative",children:(0,s.jsx)(x.ll,{className:"text-left p-0 break-words hyphens-auto",children:"Out of sight, out of mind"===r.strategy?(0,s.jsxs)(s.Fragment,{children:[r.display_strategy," ",(0,s.jsx)("span",{className:"font-normal",children:"(incl. 2FA on computer)"})]}):r.display_strategy})}),(0,s.jsx)(x.aY,{className:"md:p-1 md:pt-4 text-sm text-gray-700 text-left",children:r.description}),(0,s.jsx)("div",{className:"text-center mt-4",children:(0,s.jsx)(v.z,{className:"px-2 py-1 gap-1 border border-border bg-reddCreamDark text-foreground shadow-none hover:bg-[#e8e4de] ".concat(a?"font-semibold":"font-medium"," whitespace-normal leading-none"),variant:"secondary",onClick:e=>{e.stopPropagation(),c(r.strategy)},children:a?(0,s.jsxs)(s.Fragment,{children:[u.hide_tools," ",(0,s.jsx)(w.Z,{className:"inline-block"})]}):(0,s.jsxs)(s.Fragment,{children:[u.show_tools," ",(0,s.jsx)(j.Z,{className:"inline-block"})]})})})]},r.strategy)});function eB(e){let t=document.documentElement,r=document.body,s=t.style.scrollBehavior,a=r.style.scrollBehavior;t.style.scrollBehavior="auto",r.style.scrollBehavior="auto",window.scrollTo(0,e),t.style.scrollBehavior=s,r.style.scrollBehavior=a}function eR(e){var t;let{initialStrategies:r,initialTools:l,initialMediaAssets:o,canEdit:d=!1,editorEnabled:u=!1,locale:f="en",tryNowHighlight:x=!0}=e,{getLink:y,isDanishDomain:b}=(0,er.b)(),C=(0,n.usePathname)(),A=(0,ey.Xs)(C),I=d&&u,[B,R]=(0,i.useState)(f),L=e_[B],P=(0,n.use
1SearchParams)(),O=(0,n.useRouter)(),{user:Z}=(0,a.aF)(),[z,W]=(0,i.useState)(r),[V,H]=(0,i.useState)(l),[U,G]=(0,i.useState)({}),[K,J]=(0,i.useState)(o),[q,X]=(0,i.useState)(null),[Y,Q]=(0,i.useState)("tools"),[ee,ea]=(0,i.useState)(null),[eo,ei]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[eu,eg]=(0,i.useState)({}),[em,eh]=(0,i.useState)(!1),[ef,ep]=(0,i.useState)(null),[ew,ej]=(0,i.useState)(null),eN=(0,i.useMemo)(()=>z.map(e=>e.id&&eu[e.id]?eu[e.id]:e),[z,eu]),[eS,eE]=(0,i.useState)(null),[eF,eR]=(0,i.useState)(null),[eL,eP]=(0,i.useState)(!1),[eO,eZ]=(0,i.useState)("card"),[ez,eW]=(0,i.useState)(!1),[eV,eH]=(0,i.useState)(["Mac","PC","Linux","Android","iPhone/iPad","Chrome / Edge","Firefox","Safari"]),[eU,eG]=(0,i.useState)(!0),[eK,eJ]=(0,i.useState)([]),[eq,eX]=(0,i.useState)(!1),[eY,e$]=(0,i.useState)(null),eQ=(0,i.useRef)({}),e0=(0,i.useRef)({en:"en"===f?{strategies:r,tools:l}:null,da:"da"===f?{strategies:r,tools:l}:null});Object.keys(eQ.current).length!==eN.length&&eN.forEach(e=>{eQ.current[e.strategy]=eQ.current[e.strategy]||(0,i.createRef)()});let e1=function(e){let[t,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let s=window.matchMedia(e);s.matches!==t&&r(s.matches);let a=()=>r(s.matches);return s.addEventListener("change",a),()=>s.removeEventListener("change",a)},[t,e]),t}("(max-width: 767px)"),e2=(0,i.useRef)(null),e5=(0,i.useRef)(null),e4=(0,i.useRef)(0),e8=(0,i.useRef)(null),e3=(0,i.useRef)(!1),[e6,e7]=(0,i.useState)(56);(0,i.useEffect)(()=>{let e=e2.current;if(!e)return;let t=()=>{let t=Math.ceil(e.getBoundingClientRect().height);e7(t),document.documentElement.style.setProperty("--tools-toolbar-height","".concat(t,"px"))};t();let r=new ResizeObserver(t);return r.observe(e),()=>{r.disconnect(),document.documentElement.style.removeProperty("--tools-toolbar-height")}},[ez,e1,eO]);let e9=(0,i.useCallback)(e=>{let t=e5.current;if(!t)return;let r=Math.max(0,t.getBoundingClientRect().top+window.scrollY-e6-8);void 0!==e&&(r=Math.min(e,r)),eB(r)}
1,[e6]);(0,i.useLayoutEffect)(()=>{let e=e8.current;if(e){if(e8.current=null,"table-top"===e){if(e9(e4.current),e3.current){var t;e3.current=!1,null===(t=document.getElementById("tools-table-search"))||void 0===t||t.focus()}}else"restore-cards"===e&&eB(e4.current)}},[eO,e9]);let[te,tt]=(0,i.useState)(null),[tr,ts]=(0,i.useState)(null),[ta,tl]=(0,i.useState)(10),[to,ti]=(0,i.useState)(()=>Date.now()),tn=(0,i.useRef)(0);function td(){return Date.now()+tn.current}let tc=i.useRef(!1);i.useEffect(()=>{0===K.length||tc.current||(tc.current=!0,H(e=>{let t=e.map(e=>(function(e,t){let r=p(t,e.logo_asset_id);if(!r||r===e.logo_asset_id)return e;let s=t.find(e=>e.id===r);return{...e,logo_asset_id:r,logo:(0,h.T)(null==s?void 0:s.public_url,null==s?void 0:s.storage_key,"logo")||e.logo}})(e,K));return t.some((t,r)=>{var s;return t.logo_asset_id!==(null===(s=e[r])||void 0===s?void 0:s.logo_asset_id)})?t:e}))},[K]);let tu=(0,i.useMemo)(()=>V.map(e=>U[e.id]||e),[U,V]),tg=(0,i.useMemo)(()=>tu.filter(e=>"n"!==e.include),[tu]),tm=(0,i.useMemo)(()=>q&&tu.find(e=>e.id===q)||null,[q,tu]),th=(0,i.useMemo)(()=>q&&V.find(e=>e.id===q)||null,[q,V]),tf=!!(q&&U[q]),tp=(0,i.useCallback)(e=>{if(tf&&e!==q){if(!window.confirm("You have unsaved changes. Switch tool and lose them?"))return;q&&G(e=>{let t={...e};return delete t[q],t})}X(e)},[tf,q]),tx=(0,i.useCallback)(e=>{let t=b?y("/tools"):"da"===e?"/da/tools":"/tools",r=new URLSearchParams;q&&r.set("editTool",q),ed&&r.set("editStrategy",ed);let s=q||(null==eF?void 0:eF.id);s?r.set("openTool",s):!ed&&eS&&r.set("strategy",eS);let a=r.size>0?"".concat(t,"?").concat(r):t;window.history.replaceState(window.history.state,"",a)},[eS,y,b,ed,q,eF]),tv=(0,i.useCallback)(async e=>{if(e===B||eq){tx(e);return}if((tf||ed&&eu[ed])&&!window.confirm("You have unsaved changes. Switch language and lose them?"))return;e0.current[B]={strategies:z,tools:V};let t=t=>{R(e),W(t.strategies),H(t.tools),G({}),eg({}),ea(null),ej(null),tx(e),document.title=ek[e]},r=e0.current[e];if(r){t(r);return}eX(!0);try{let r=new URLSearchParams({locale:e}),s=await fetch("/api/tools-page-data?".concat(r),{cache:"no-store"}),a=await s.json();if(!s.ok)throw Error((null==a?void 0:a.error)||"Failed to load locale data");let l={strategies:Array.isArray(null==a?void 0:a.strategies)?a.strategies:[],tools:Array.isArray(null==a?void 0:a.tools)?a.tools:[]};e0.current[e]=l,t(l)}catch(e){console.error("Failed to switch tools locale:",e)}finally{eX(!1)}},[B,eu,tf,eq,V,tx,ed,z]);(0,i.useEffect)(()=>{let e=P.get("editTool");e&&d&&u&&l.some(t=>t.id===e)&&(X(e),Q("tools"));let t=P.get("editStrategy");t&&d&&u&&r.some(e=>e.id===t)&&(ec(t),Q("strategies"));let s=P.get("openTool"),a=!1;if(s){let e=l.find(e=>e.id===s);e&&(a=!0,eE(e.actual_strategy),eR(e),eP(!0),setTimeout(()=>{let t=document.getElementById(eD(e));t&&t.scrollIntoView({behavior:"smooth",block:"start"})},150))}let o=P.get("strategy");if(o&&!a&&(eE(o),setTimeout(()=>{let e=eC(o),t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"start"})},150)),e||s||o){let e=window.location.pathname+window.location.hash;window.history.replaceState({},"",e)}},[]),(0,i.useEffect)(()=>{let e=localStorage.getItem("rememberDeviceSettings"),t=null===e||"true"===e;if(eG(t),t){let e=localStorage.getItem("checkedDevices");e&&eH(JSON.parse(e))}},[]),(0,i.useEffect)(()=>{function e(){var e,t;tt(null!==(t=null===(e=(0,et.vL)())||void 0===e?void 0:e.workshopCode)&&void 0!==t?t:null)}return e(),window.addEventListener("storage",e),window.addEventListener("focus",e),()=>{window.removeEventListener("storage",e),window.removeEventListener("focus",e)}},[]),(0,i.useEffect)(()=>{if(!x)return;let e=P.get("selected"),t=e?e.split(",").filter(Boolean):(function(e){var t;let r=(0,et.vL)(),s=localStorage.getItem((0,et.G6)(e));if(!r||!s)return[];let a=(0,et.NX)(localStorage.getItem((0,et.TK)(e,s,(0,et.o7)(r)))),l=(null==a?void 0:a.updatedAt)?new Date(a.updatedAt).getTime():NaN,o=(Date.now()-l)/864e5;return!Number.isFinite(o)||o>7?[]:Object.entries(null!==(t=null==a?void 0:a.choices)&&void 0!==t?t:{}).filter(e=>{let[,t]=e;return"try_now"===t}).map(e=>{let[t]=e;return t})})(B).map(e=>{var t;let r=z.find(t=>t.strategy===e);return(null==r?void 0:null===(t=r.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||eC(e)});if(eJ(t),0===t.length||!(e||"1"===P.get("fromCardSorting")))return;let r=0,s=setInterval(()=>{var e;let a=Object.keys(eT).flatMap(e=>z.filter(t=>t.category===e)).find(e=>{var r;return t.includes((null===(r=e.illustration)||void 0===r?void 0:r.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"")}),l=a?null===(e=eQ.current[a.strategy])||void 0===e?void 0:e.current:null;l&&window.scrollTo({top:window.scrollY+l.getBoundingClientRect().top-15,behavior:"smooth"}),(l||++r>20)&&clearInterval(s)},150);return()=>clearInterval(s)},[x,B,P,z]),(0,i.useEffect)(()=>{eU&&localStorage.setItem("checkedDevices",JSON.stringify(eV))},[eV,eU]),(0,i.useEffect)(()=>{let e=()=>
1{if(!eS){null!==eY&&e$(null);return}let e=eQ.current[eS];if(e&&e.current){let t=e.current.getBoundingClientRect(),r=e6+(e1?8:10);t.bottom<r?eY!==eS&&e$(eS):eY===eS&&e$(null)}};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[eS,eY,e1,e6]);let ty=eV.map(e=>e.toLowerCase().replace("iphone/ipad","ios").replace("chrome / edge","chrome")),tb=tg.filter(e=>{let t=e.devices?e.devices.split(" ").map(e=>e.trim().toLowerCase()):[];return!!(0===t.length||t.includes("none"))||t.some(e=>ty.includes(e))});(0,i.useEffect)(()=>{if(0===z.length||0===tg.length)return;let e=window.location.hash.substring(1),t="focus"===e?"focus-hide":e;if(e){let e=z.find(e=>eC(e.strategy)===t),r=tg.find(e=>eD(e)===t);e&&(eE(e.strategy),setTimeout(()=>{let e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100)),r&&(eE(r.actual_strategy),setTimeout(()=>{let e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100),setTimeout(()=>{eR(r),eP(!0)},800))}},[z,tg]),(0,i.useEffect)(()=>{if(!eF)return;let e=tg.find(e=>e.id===eF.id);e&&eR(e)},[tg,eF]),(0,i.useEffect)(()=>{I&&(null==eF?void 0:eF.id)&&X(eF.id)},[I,eF]),(0,i.useEffect)(()=>{if(!I||!eL||!q)return;let e=tg.find(e=>e.id===q);e&&e.id!==(null==eF?void 0:eF.id)&&eR(e)},[I,tg,q]);let tw=(0,i.useMemo)(()=>{let e=Object.keys(eT),t=Array.from(new Set(eN.map(e=>e.category))).filter(t=>t&&!e.includes(t));return[...e,...t]},[eN]),tj=(0,i.useMemo)(()=>tw.reduce((e,t)=>(e[t]=eN.filter(e=>e.category===t),e),{}),[tw,eN]),tk=(0,i.useMemo)(()=>new Set(eK),[eK]),t_=(0,i.useMemo)(()=>eN.some(e=>{var t;let r=(null===(t=e.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"";return r.length>0&&tk.has(r)}),[eN,tk]),tN="1"===P.get("fromCardSorting"),tS="string"==typeof te&&te.length>0&&(tN||t_);(0,i.useEffect)(()=>{if(!tS){ts(null);return}async function e(){try{var e;let t=await fetch("/api/workshop-events-during/get-explore-timer?workshop_id=".concat(encodeURIComponent(te)));if(!t.ok)throw Error("Failed to fetch explore timer.");let r=await t.json();e=r.serverNow,"string"==typeof e&&e.length>0&&(tn.current=new Date(e).getTime()-Date.now()),"string"==typeof(null==r?void 0:r.timerStartedAt)&&r.timerStartedAt.length>0&&ts(r.timerStartedAt),"number"==typeof(null==r?void 0:r.timerDurationMinutes)&&tl(r.timerDurationMinutes)}catch(e){console.error("Failed to fetch explore timer:",e)}}e();let t=window.setInterval(()=>{e()},5e3);return()=>window.clearInterval(t)},[tS,te]),(0,i.useEffect)(()=>{if(!tr)return;ti(td());let e=window.setInterval(()=>{ti(td())},1e3);return()=>window.clearInterval(e)},[tr]);let tC=(0,i.useMemo)(()=>{let e=new Map,t=1;return tw.forEach(r=>{eN.filter(e=>e.category===r).forEach(r=>{var s;let a=(null===(s=r.illustration)||void 0===s?void 0:s.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"";a&&e.set(a,t),t++})}),e},[tw,eN]);function tD(e){let t=eS===e,r=null!==eS&&eS!==e;if(eE(t=>t===e?null:e),t){let t=eQ.current[e];t&&t.current&&setTimeout(()=>{t.current&&t.current.scrollIntoView({behavior:"smooth",block:"start"})},50);return}if(r||!eS){let t=eQ.current[e];t&&t.current&&setTimeout(()=>{t.current&&t.current.scrollIntoView({behavior:"smooth",block:"start"})},50)}}let tE=null!==(t=null==q?void 0:q.startsWith("new-"))&&void 0!==t&&t,tT=async()=>{if(!q)return;let e=U[q];if(e){ei(!0),ea(null);try{let t=tE?{...e,id:null}:e,r=await fetch("/api/hub/tools/update",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:t,locale:B,updated_by_clerk_user_id:null==Z?void 0:Z.id})}),s=await r.json();if(!r.ok)throw Error((null==s?void 0:s.error)||"Failed to save tool");let a=s.tool;tE?(H(e=>e.map(e=>e.id===q?a:e)),G(e=>{let t={...e};return delete t[q],t}),X(a.id)):(H(e=>e.map(e=>e.id===a.id?a:e)),G(e=>{let t={...e};return delete t[q],t})),eR(a)}catch(e){ea(e instanceof Error?e.message:"Failed to save tool")}finally{ei(!1)}}},tM=async(e,t)=>{let r=await fetch("/api/hub/tools/reorder",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy_id:e,tool_ids:t,updated_by_clerk_user_id:null==Z?void 0:Z.id})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error((null==e?void 0:e.message)||"Failed to reorder tools")}H(e=>{let r=[...e];for(let e=0;e<t.length;e++){let s=r.findIndex(r=>
1r.id===t[e]);-1!==s&&(r[s]={...r[s],rank:String((e+1)*10)})}return r}),G(e=>{let r={...e};for(let e=0;e<t.length;e++)r[t[e]]&&(r[t[e]]={...r[t[e]],rank:String((e+1)*10)});return r})},tF=e=>{if(J(t=>[...t,e]),"strategy-illustration"===e.asset_kind&&ed){eg(t=>{let r=t[ed]||z.find(e=>e.id===ed);return r?{...t,[ed]:{...r,illustration_asset_id:e.id,illustration:e.public_url}}:t});return}q&&G(t=>{let r=t[q]||V.find(e=>e.id===q);if(!r)return t;let s={...r};if("logo"===e.asset_kind){var a;let t=p(K,e.id)||e.id,r=null!==(a=K.find(e=>e.id===t))&&void 0!==a?a:e;s.logo_asset_id=t,s.logo=(0,h.T)(r.public_url,r.storage_key,"logo")||void 0}else"screenshot"===e.asset_kind&&(s.screenshot_asset_id=e.id,s.illustration=(0,h.T)(e.public_url,e.storage_key,"screenshot")||void 0);return{...t,[q]:s}})},tA=(0,i.useMemo)(()=>ed&&eN.find(e=>e.id===ed)||null,[ed,eN]),tI=(0,i.useMemo)(()=>ed&&z.find(e=>e.id===ed)||null,[ed,z]),tB=!!(ed&&eu[ed]),tR=tf||tB;(0,i.useEffect)(()=>{if(!tR)return;let e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[tR]),(0,i.useEffect)(()=>{if(!tR)return;let e=e=>{let t=e.target.closest("a[href]");if(!t)return;let r=t.getAttribute("href");!r||r.startsWith("#")||r.startsWith("javascript:")||r.startsWith("http")&&!r.startsWith(window.location.origin)||new URL(r,window.location.origin).pathname===window.location.pathname||(e.preventDefault(),e.stopPropagation(),ep(r))};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[tR]);let tL=(0,i.useCallback)(e=>{if(tB&&e!==ed){if(!window.confirm("You have unsaved changes. Switch strategy and lose them?"))return;ed&&eg(e=>{let t={...e};return delete t[ed],t})}ec(e)},[tB,ed]),tP=async()=>{if(!ed)return;let e=eu[ed];if(e){eh(!0),ej(null);try{let t=await fetch("/api/hub/strategies/update",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:e,locale:B,updated_by_clerk_user_id:null==Z?void 0:Z.id})}),r=await t.json();if(!t.ok)throw Error((null==r?void 0:r.message)||"Failed to save strategy");let s=r.strategy;W(e=>e.map(e=>e.id===s.id?s:e)),eg(e=>{let t={...e};return delete t[ed],t})}catch(e){ej(e instanceof Error?e.message:"Failed to save strategy")}finally{eh(!1)}}},tO=d&&u?(0,s.jsx)(ev.o,{locale:B,strategies:eN,mediaAssets:K,selectedStrategyId:ed,onSelectStrategy:tL,draftStrategy:tA,originalStrategy:tI,isDirty:tB,isSaving:em,saveError:ew,onFieldChange:(e,t)=>
1{ed&&eg(r=>{let s=r[ed]||z.find(e=>e.id===ed);if(!s)return r;let a={...s,[e]:t};if("illustration_asset_id"===e){let e=K.find(e=>e.id===t);a.illustration=(null==e?void 0:e.public_url)||void 0}if(JSON.stringify(a)===JSON.stringify(s)){let e={...r};return delete e[ed],e}return{...r,[ed]:a}})},onSave:tP,onReset:()=>{ed&&(eg(e=>{let t={...e};return delete t[ed],t}),ej(null))},onLocaleChange:e=>{tv(e)},onAssetUploaded:tF}):null,tZ=d&&u?(0,s.jsx)(es.M,{locale:B,tools:tu,strategies:eN,mediaAssets:K,selectedToolId:q,onSelectTool:tp,draftTool:tm,originalTool:th,isDirty:tf,isSaving:eo,saveError:ee,onFieldChange:(e,t)=>{q&&G(r=>{let s=r[q]||V.find(e=>e.id===q);if(!s)return r;let a={...s,[e]:t};if("logo_asset_id"===e&&"string"==typeof t){let e=p(K,t)||t,r=K.find(t=>t.id===e);a.logo_asset_id=e,a.logo=(0,h.T)(null==r?void 0:r.public_url,null==r?void 0:r.storage_key,"logo")||void 0}if("screenshot_asset_id"===e&&"string"==typeof t){let e=K.find(e=>e.id===t);a.illustration=(0,h.T)(null==e?void 0:e.public_url,null==e?void 0:e.storage_key,"screenshot")||void 0}if(JSON.stringify(a)===JSON.stringify(s)){let e={...r};return delete e[q],e}return{...r,[q]:a}})},onSave:tT,onReset:()=>{if(q){if(tE){H(e=>e.filter(e=>e.id!==q)),G(e=>{let t={...e};return delete t[q],t});let e=V.find(e=>e.id!==q);X((null==e?void 0:e.id)||null)}else G(e=>{let t={...e};return delete t[q],t});ea(null)}},onAssetUploaded:tF,onLocaleChange:e=>{tv(e)},onSaveOrder:tM,onReorder:(e,t)=>{H(e=>{let r=[...e];for(let e=0;e<t.length;e++){let s=r.findIndex(r=>
1r.id===t[e]);-1!==s&&(r[s]={...r[s],rank:String((e+1)*10)})}return r}),G(e=>{let r={...e};for(let e=0;e<t.length;e++)r[t[e]]&&(r[t[e]]={...r[t[e]],rank:String((e+1)*10)});return r})},onAddTool:()=>{let e="new-".concat(crypto.randomUUID()),t=z[0],r={id:e,slug:"",strategy_id:null==t?void 0:t.id,actual_strategy:(null==t?void 0:t.strategy)||"",title:"",devices:"",include:"y"};H(e=>[...e,r]),G(t=>({...t,[e]:r})),X(e),ea(null)}}):null,tz=tr?new Date(tr).getTime()+6e4*ta:null,tW=null!=tz&&Number.isFinite(tz)?Math.max(0,tz-to):null,tV=null!==tW&&tW>0,tH=tS&&tV?(0,s.jsx)("div",{className:"sticky top-0 z-[100] h-0",children:(0,s.jsx)("div",{className:"w-full pr-1 pt-3 md:pr-4",children:(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full bg-stone-300/90 px-3 py-1 text-xs font-medium text-stone-700",children:[(0,s.jsx)(k.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:null===tW?"--:--":function(e){let t=Math.max(0,Math.ceil(e/1e3));return"".concat(String(Math.floor(t/60)).padStart(2,"0"),":").concat(String(t%60).padStart(2,"0"))}(tW)})]})})})}):null,tU=(0,s.jsxs)(M.bZ,{className:"flex w-full items-start gap-3 bg-white text-left [&>svg+div]:translate-y-0 [&>svg]:static [&>svg]:float-none [&>svg]:m-0 [&>svg~*]:pl-0 min-[500px]:[&>svg]:left-auto min-[500px]:[&>svg]:top-auto",children:[(0,s.jsx)("div",{className:"flex h-5 shrink-0 items-center text-foreground",children:(0,s.jsx)(_.Z,{className:"h-4 w-4"})}),(0,s.jsx)(M.X,{children:L.disclaimer})]}),tG=e=>{if(e!==eO){if("table"===e){e4.current=window.scrollY,e8.current="table-top",eZ("table");return}e8.current="restore-cards",eZ("card")}},tK="pt-4",tJ=(0,s.jsxs)("div",{ref:e2,className:(0,g.cn)("sticky top-0 z-30 -mx-4 bg-background px-4 py-2 md:-mx-6 md:px-6",!e1&&ez&&"max-h-[calc(100dvh-0.5rem)] overflow-y-auto"),children:[(0,s.jsxs)("div",{className:"flex flex-nowrap items-center justify-between gap-2 sm:gap-3","data-tools-toolbar-row":!0,children:[(0,s.jsxs)("button",{type:"button",onClick:()=>eW(e=>!e),"aria-expanded":ez,className:"inline-flex shrink-0 items-center gap-1.5 rounded-lg border border-border bg-white px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-reddCreamDark sm:gap-2 sm:px-4",children:[(0,s.jsx)(N.Z,{className:"h-4 w-4 shrink-0"}),(0,s.jsx)("span",{className:"whitespace-nowrap",children:L.filter_by_device}),ez?(0,s.jsx)(w.Z,{className:"h-4 w-4 shrink-0 transition-transform"}):(0,s.jsx)(j.Z,{className:"h-4 w-4 shrink-0 transition-transform"})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-3",children:[(0,s.jsx)(v.z,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 rounded-lg border border-border bg-white text-foreground hover:bg-reddCreamDark hover:text-foreground sm:h-9 sm:w-9",onClick:()=>{if("table"===eO){e9(),setTimeout(()=>{var e;return null===(e=document.getElementById("tools-table-search"))||void 0===e?void 0:e.focus()},0);return}e4.current=window.scrollY,e8.current="table-top",e3.current=!0,eZ("table")},children:(0,s.jsx)(S.Z,{className:"!h-4 !w-4 sm:!h-5 sm:!w-5"})}),(0,s.jsx)(ex,{after:(0,s.jsxs)("div",{className:"inline-flex rounded-lg border border-border bg-white p-0.5 text-sm font-medium sm:p-1",children:[(0,s.jsxs)("button",{type:"button",className:(0,g.cn)("inline-flex items-center gap-1.5 rounded-lg px-2 py-1.5 transition-colors sm:px-4","card"===eO?"bg-foreground text-background":"text-foreground hover:bg-reddCreamDark"),onClick:()=>tG("card"),"aria-label":L.cards,children:[(0,s.jsx)(D,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:L.cards})]}),(0,s.jsxs)("button",{type:"button",className:(0,g.cn)("inline-flex items-center gap-1.5 rounded-lg px-2 py-1.5 transition-colors sm:px-4","table"===eO?"bg-foreground text-background":"text-foreground hover:bg-reddCreamDark"),onClick:()=>tG("table"),"aria-label":L.table,children:[(0,s.jsx)(E,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:L.table})]})]})})]})]}),!e1&&ez?(0,s.jsx)("div",{className:"border-b-2 border-border pb-4 pt-4",children:(0,s.jsx)(el,{checkedDevices:eV,setCheckedDevices:eH,rememberDeviceSettings:eU,setRememberDeviceSettings:eG,locale:B})}):null]}),tq=(e,t)=>
1{let r=(0,s.jsxs)(s.Fragment,{children:[tH,(0,s.jsx)("div",{className:(0,g.cn)("container mx-auto flex min-w-0 w-full max-w-[1200px] px-4 md:px-6",A?"pt-8 md:pt-6":"pt-6 md:pt-4"),children:(0,s.jsx)("div",{className:"min-w-0 flex-1",children:e})}),t]});return I?(0,s.jsxs)(c.Hn,{defaultOpen:!1,className:"[&_.peer>div:first-child]:!w-0",children:[(0,s.jsx)(m,{editSidebarContent:tZ,strategySidebarContent:tO,editorTab:Y,setEditorTab:Q}),(0,s.jsx)(c.kV,{children:r}),(0,s.jsx)(c.vP,{className:(0,g.cn)("fixed z-[170] h-10 w-10 rounded-lg border border-border bg-background shadow-md hover:bg-reddCreamDark hover:text-foreground transition-colors",A?"top-3 right-4":"top-[4.75rem] right-4 md:right-6")})]}):r};return(0,s.jsxs)(s.Fragment,{children:[e1?(0,s.jsx)(en,{open:ez,onOpenChange:eW,checkedDevices:eV,setCheckedDevices:eH,locale:B}):null,(0,s.jsx)(F.aR,{open:!!ef,onOpenChange:e=>{e||ep(null)},children:(0,s.jsxs)(F._T,{children:[(0,s.jsxs)(F.fY,{children:[(0,s.jsx)(F.f$,{children:"Unsaved changes"}),(0,s.jsxs)(F.yT,{children:["You have unsaved edits to the current ",tf?"tool":"strategy",". If you leave now, your changes will be lost."]})]}),(0,s.jsxs)(F.xo,{children:[(0,s.jsx)(F.le,{children:"Stay & keep editing"}),(0,s.jsx)(F.OL,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{ep(null),q&&G(e=>{let t={...e};return delete t[q],t}),ed&&eg(e=>{let t={...e};return delete t[ed],t}),ef&&O.push(ef)},children:"Discard changes & leave"})]})]})}),(0,s.jsx)("div",{className:"mb-20",children:"card"===eO?tq((0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h1",{className:"mb-4 text-3xl",children:L.title}),tU]}),d&&!u?(0,s.jsxs)(M.bZ,{className:"mb-6",children:[(0,s.jsx)(_.Z,{className:"h-4 w-4 text-primary"}),(0,s.jsx)(M.X,{children:"The editor will appear after the tools data has been imported into Postgres."})]}):null,tJ,(0,s.jsx)("div",{className:tK,children:tw.map(e=>{let t=tj[e]||[];return t.length?(0,s.jsx)("div",{className:"mb-16",children:e1?function(e,t,r,a,l,o,n,d,c,u,g,m,h,f,p,x,v){var y;let b=t.some(e=>e.strategy===r),w=e.replace(/\\s+/g,"_");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{id:w,className:"text-2xl rounded-sm font-bold text-white px-4 py-2 mb-4 font-[family-name:var(--font-geist-sans)] ".concat(eM[e]||"bg-stone-500"),children:t[0].display_category}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map(e=>{var t;let x=(null===(t=e.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"",y=m.has(x),w=p?h.get(x):void 0;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(eI,{ref:g.current[e.strategy],strategy:e,isExpanded:r===e.strategy,greyOut:b&&r!==e.strategy,toggleStrategyExpand:a,t:f,highlightCandidate:y,guideIndex:w,hasExplored:p}),r===e.strategy&&(0,s.jsx)("div",{className:"col-span-full",children:(0,s.jsx)(eA,{strategy:e,allTools:l,isExpanded:!0,isStickyHeaderVisible:u===e.strategy,selectedTool:o,setSelectedTool:n,dialogOpen:d,setDialogOpen:c,toggleStrategyExpand:a,editMode:v,t:f})})]},e.strategy)})})]})}(e,t,eS,tD,tb,eF,eR,eL,eP,eY,eQ,tk,tC,L,tk.size>0,0,I):"Set digital boundaries"===e?function(e,t,r,a,l,o,i,n,d,c,u,g,m,h,f,p,x){var v;let y=t.slice(0,3),b=t.slice(3),w=t.some(e=>e.strategy===r),j=e.replace(/\s+/g,"_");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{id:j,className:"text-2xl rounded-sm font-bold text-white px-4 py-2 mb-4 font-[family-name:var(--font-geist-sans)] ".concat(eM[e]||"bg-stone-500"),children:t[0].display_category}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:[y.map(e=>{var t;let l=(null===(t=e.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"",o=g.has(l),i=f?m.get(l):void 0;return(0,s.jsx)(eI,{ref:u.current[e.strategy],strategy:e,isExpanded:r===e.strategy,greyOut:w&&r!==e.strategy,toggleStrategyExpand:a,t:h,highlightCandidate:o,guideIndex:i,hasExplored:f},e.strategy)}),3===y.length&&(0,s.jsx)("div",{})]}),y.map(e=>(0,s.jsx)(eA,{strategy:e,allTools:l,isExpanded:r===e.strategy,isStickyHeaderVisible:c===e.strategy,selectedTool:o,setSelectedTool:i,dialogOpen:n,setDialogOpen:d,toggleStrategyExpand:a,editMode:x,t:h},e.strategy)),(0,s.jsxs)("div",{className:"mt-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:[b.map(e=>{var t;let l=(null===(t=e.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"",o=g.has(l),i=f?m.get(l):void 0;return(0,s.jsx)(eI,{ref:u.current[e.strategy],strategy:e,isExpanded:r===e.strategy,greyOut:w&&r!==e.strategy,toggleStrategyExpand:a,t:h,highlightCandidate:o,guideIndex:i,hasExplored:f},e.strategy)}),2===b.length&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{}),(0,s.jsx)("div",{})]})]}),b.map(e=>(0,s.jsx)(eA,{strategy:e,allTools:l,isExpanded:r===e.strategy,isStickyHeaderVisible:c===e.strategy,selectedTool:o,setSelectedTool:i,dialogOpen:n,setDialogOpen:d,toggleStrategyExpand:a,editMode:x,t:h},e.strategy))]})}(e,t,eS,tD,tb,eF,eR,eL,eP,eY,eQ,tk,tC,L,tk.size>0,0,I):function(e,t,r,a,l,o,i,n,d,c,u,g,m,h,f,p,x){var v;let y=t.some(e=>e.strategy===r),b=e.replace(/\s+/g,"_");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{id:b,className:"text-2xl rounded-sm font-bold text-white px-4 py-2 mb-4 font-[family-name:var
1(--font-geist-sans)] ".concat(eM[e]||"bg-stone-500"),children:t[0].display_category}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map(e=>{var t;let l=(null===(t=e.illustration)||void 0===t?void 0:t.replace(/\.(svg|png|jpe?g|webp)$/i,""))||"",o=g.has(l),i=f?m.get(l):void 0;return(0,s.jsx)(eI,{ref:u.current[e.strategy],strategy:e,isExpanded:r===e.strategy,greyOut:y&&r!==e.strategy,toggleStrategyExpand:a,t:h,highlightCandidate:o,guideIndex:i,hasExplored:f},e.strategy)})}),t.map(e=>(0,s.jsx)(eA,{strategy:e,allTools:l,isExpanded:r===e.strategy,isStickyHeaderVisible:c===e.strategy,selectedTool:o,setSelectedTool:i,dialogOpen:n,setDialogOpen:d,toggleStrategyExpand:a,editMode:x,t:h},e.strategy))]})}(e,t,eS,tD,tb,eF,eR,eL,eP,eY,eQ,tk,tC,L,tk.size>0,0,I)},e):null})})]})):tq((0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h1",{className:"mb-4 text-3xl",children:L.title}),tU]}),d&&!u?(0,s.jsxs)(M.bZ,{className:"mb-6",children:[(0,s.jsx)(_.Z,{className:"h-4 w-4 text-primary"}),(0,s.jsx)(M.X,{children:"The editor will appear after the tools data has been imported into Postgres."})]}):null,tJ,(0,s.jsx)("div",{ref:e5,className:tK,children:(0,s.jsx)($,{tools:tb,strategyTypes:eN,onShowDetails:e=>{eR(e),eP(!0)},locale:B})})]}),(0,s.jsxs)(s.Fragment,{children:[I&&eL&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>{eP(!1),eR(null)}}),(0,s.jsx)(T.Vq,{open:eL,onOpenChange:e=>{e||(eP(!1),eR(null))},modal:!I,children:(0,s.jsx)(T.cZ,{className:(0,g.cn)("gap-0 overflow-x-hidden overflow-y-auto border-0 bg-background p-0","inset-0 h-[100dvh] max-h-[100dvh] w-full max-w-none translate-x-0 translate-y-0 rounded-none","sm:inset-auto sm:left-[50%] sm:top-[50%] sm:h-auto sm:max-h-[95vh] sm:w-full sm:max-w-[920px] sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg sm:border"),hideCloseButton:!0,style:I?{left:"calc(50% + 200px)",maxWidth:"calc(100vw - 400px - 2rem)"}:void 0,hideOverlay:I,onPointerDownOutside:I?e=>e.preventDefault():void 0,onInteractOutside:I?e=>e.preventDefault():void 0,children:eF&&(0,s.jsx)(eb.nl,{tool:eF,t:L})})})]}))})]})}eI.displayName="StrategyCard"},58523:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var s=r(83890),a=r(56060),l=r(51202),o=r(85034),i=r(19083),n=r(98705),d=r(71597),c=r(4329),u=r(22566),g=r(84693);let m={mac:"icon-mac.svg",pc:"icon-windows.svg",linux:"icon-linux.svg",ios:"icon-ios.svg",android:"icon-android.svg",chrome:"icon-chrome.svg",firefox:"icon-firefox.svg",safari:"icon-safari.svg"};function h(e){let{tools:t,labels:r,onOpenDetails:h,onEnlargeScreenshot:f,getToolId:p,getIsStarred:x,onToggleStar:v,isStarDisabled:y,className:b}=e,w=!!(v&&x);return(0,s.jsx)("div",{className:(0,d.cn)("mt-4 grid grid-cols-1 gap-10 md:grid-cols-2",b),children:t.map(e=>{var t,b,j,k,_;let N=null!==(t=null==p?void 0:p(e))&&void 0!==t?t:e.slug||e.id||e.title.toLowerCase().replace(/[^\w]+/g,"-"),S=e.devices?(0,u.Jn)(e.devices.split(" ").map(e=>e.trim().toLowerCase()).filter(Boolean)):[],C=e.logo?(0,c.G)(e.logo,"logo"):void 0,D=e.illustration?(0,c.G)(e.illustration,"screenshot"):void 0,E=null!==(b=null==x?void 0:x(e))&&void 0!==b&&b,T=null!==(j=null==y?void 0:y(e))&&void 0!==j&&j;return(0,s.jsxs)("div",{id:N,onClick:w?void 0:()=>h(e),className:(0,d.cn)("relative flex h-full flex-col rounded-md border bg-white p-4 shadow",!w&&"cursor-pointer"),children:[(0,s.jsxs)("div",{className:"absolute -top-3 right-5 flex items-center gap-2",children:[(0,g.AX)(e)&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-[#1e2d3e] px-2.5 py-0.5 text-[0.6rem] font-semibold tracking-wide text-white/90 shadow-sm",children:[(0,s.jsx)("span",{className:"text-xs text-[#d4605a]",children:"♥"})," ",r.redd_team]}),e.price_label&&(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-gray-200 bg-gray-100 px-2 py-0.5 text-[0.65rem] font-medium text-gray-700 shadow-sm",children:"free"===e.price_label?r.price_free:"freemium"===e.price_label?r.price_freemium:"paid"===e.price_label?r.price_paid:""})]}),(0,s.jsxs)("div",{className:"flex flex-col items-start gap-4 md:flex-row",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-start gap-2 sm:items-center",children:[C&&
1(0,s.jsx)(n.ExternalAssetImage,{src:C,alt:"".concat(e.title," logo"),width:32,height:32,className:"h-6 w-auto rounded-sm object-contain"}),(0,s.jsx)("h2",{className:"text-lg font-semibold",style:{fontFamily:"var(--font-inter), Arial, Helvetica, sans-serif"},children:e.title})]}),e.one_line&&(0,s.jsx)(l.U,{className:"text-sm text-gray-700",children:e.one_line.replace(/\.+$/,"")}),S.length>0&&(0,s.jsx)("div",{className:"mt-2 flex max-w-[150px] flex-wrap justify-start gap-1 md:max-w-none",children:S.map(e=>{let t=m[e];return t?"chrome"===e?(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)(a.default,{src:"/images/icons-device/".concat(m.chrome),alt:"Chrome",width:20,height:20,className:"h-6 w-6"}),(0,s.jsx)(a.default,{src:"/images/icons-device/icon-edge.svg",alt:"Edge",width:20,height:20,className:"h-6 w-6"})]},e):(0,s.jsx)(a.default,{src:"/images/icons-device/".concat(t),alt:e,width:20,height:20,className:"h-6 w-6"},e):null})})]}),D&&(0,s.jsx)("div",{className:"md:w-1/3",children:(0,s.jsx)("img",{src:D,alt:e.illustration_alt_text||e.title,width:150,height:150,className:"mx-auto h-auto max-h-[180px] w-auto max-w-full cursor-zoom-in rounded-sm object-contain pt-4",onClick:e=>{e.stopPropagation(),null==f||f(D)}})})]}),(0,s.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2 pt-6",children:w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),(!T||E)&&(null==v||v(e))},disabled:T&&!E,"aria-pressed":E,className:(0,d.cn)("inline-flex items-center justify-center gap-1.5 rounded-md border px-4 py-2 text-sm font-semibold transition-colors",E?"border-reddTeal bg-reddTeal text-white":"border-reddTeal bg-white text-reddTeal hover:bg-reddTeal/5",T&&!E&&"cursor-not-allowed opacity-40"),children:[(0,s.jsx)(o.Z,{className:(0,d.cn)("h-4 w-4",E&&"fill-white"),strokeWidth:2}),E?null!==(k=r.on_try_list)&&void 0!==k?k:"On my try-list":null!==(_=r.add_to_try_list)&&void 0!==_?_:"Add to try-list"]}),(0,s.jsx)(i.z,{variant:"outline",onClick:t=>{t.stopPropagation(),h(e)},children:r.show_details})]}):(0,s.jsx)(i.z,{variant:"default",onClick:t=>{t.stopPropagation(),h(e)},children:r.show_details})})]},N)})})}},21971:function(e,t,r){"use strict";r.d(t,{X:function(){return d},bZ:function(){return n}});var s=r(83890),a=r(58496),l=r(88898),o=r(71597);let i=(0,l.j)("relative w-full overflow-hidden rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:float-right [&>svg]:ml-2 [&>svg]:mb-1 [&>svg]:mt-0 [&>svg]:text-foreground min-[500px]:[&>svg]:float-none min-[500px]:[&>svg]:absolute min-[500px]:[&>svg]:left-4 min-[500px]:[&>svg]:top-3 min-[500px]:[&>svg]:ml-0 min-[500px]:[&>svg]:mb-0 min-[500px]:[&>svg]:mt-0 [&>svg~*]:pl-0 min-[500px]:[&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef((e,t)=>{let{className:r,variant:a,...l}=e;return(0,s.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(i({variant:a}),r),...l})});n.displayName="Alert",a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",r),...a})}).displayName="AlertTitle";let d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",r),...a})});d.displayName="AlertDescription"},52376:function(e,t,r){"use strict";r.d(t,{BD:function(){return o},Fl:function(){return f},Lq:function(){return d},Wi:function(){return u},Wt:function(){return a},Xs:function(){return i},YL:function(){return g},bi:function(){return c},cp:function(){return m},eX:function(){return s},jG:function(){return l},mi:function(){return h},rI:function(){return n}});let s=!0,a="studio_participant";function l(e){return"/studio"===e||"/da/studio"===e}function o(e){return"/studio/progress"===e||"/da/studio/progress"===e}function i(e){return!!e&&("/studio"===e||e.startsWith("/studio/")||"/da/studio"===e||e.startsWith("/da/studio/"))}function n(e){return!!e&&("/studio/tools"===e||"/da/studio/tools"===e)}function d(e){return!!e&&("/studio/workshop"===e||e.startsWith("/studio/workshop/")||"/da/studio/workshop"===e||e.startsWith("/da/studio/workshop/"))}function c(e){return!!e&&("/studio/reminders"===e||"/da/studio/reminders"===e)}function u(e){return e.startsWith("/da")?"/da/studio":"/studio"}function g(e){return e.startsWith("/da")?"/da/studio/tools":"/studio/tools"}function m(e){return e.startsWith("/da")?"/da/studio/workshop":"/studio/workshop"}function h(e,t,r){var s,a;let l="".concat(m(e),"/").concat(t),o=new URLSearchParams("string"==typeof(null==r?void 0:r.query)?r.query:null!==(a=null==r?void 0:null===(s=r.query)||void 0===s?void 0:s.toString())&&void 0!==a?a:"");(null==r?void 0:r.part)?o.set("part",r.part):o.delete("part");let i=o.toString();return i?"".concat(l,"?").concat(i):l}function f(e){return e.startsWith("/da")?"/da/studio/reminders":"/studio/reminders"}},87824:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},23505:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},46609:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},25607:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},37317:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},12045:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},25655:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]])},78074:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(84520).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},52320:function(e,t,r){"use strict";r.d(t,{B:function(){return n}});var s=r(58496),a=r(6340),l=r(68075),o=r(59955),i=r(83890);function n(e){let t=e+"CollectionProvider",[r,n]=(0,a.b)(t),[d,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:t,children:r}=e,a=s.useRef(null),l=s.useRef(new Map).current;return(0,i.jsx)(d,{scope:t,itemMap:l,collectionRef:a,children:r})};u.displayName=t;let g=e+"CollectionSlot",m=s.forwardRef((e,t)=>
1{let{scope:r,children:s}=e,a=c(g,r),n=(0,l.e)(t,a.collectionRef);return(0,i.jsx)(o.g7,{ref:n,children:s})});m.displayName=g;let h=e+"CollectionItemSlot",f="data-radix-collection-item",p=s.forwardRef((e,t)=>{let{scope:r,children:a,...n}=e,d=s.useRef(null),u=(0,l.e)(t,d),g=c(h,r);return s.useEffect(()=>(g.itemMap.set(d,{ref:d,...n}),()=>void g.itemMap.delete(d))),(0,i.jsx)(o.g7,{[f]:"",ref:u,children:a})});return p.displayName=h,[{Provider:u,Slot:m,ItemSlot:p},function(t){let r=c(e+"CollectionConsumer",t);return s.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(f,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}},98981:function(e,t,r){"use strict";r.d(t,{gm:function(){return l}});var s=r(58496);r(83890);var a=s.createContext(void 0);function l(e){let t=s.useContext(a);return e||t||"ltr"}}}]);

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.