PageSourceSearch

https://myregimen.ai/_next/static/chunks/2957.8c56e0ef20a65584.js

js myregimen.ai collected 2026-10-05 13:48:01 UTC 9,400 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2957],{17075:function(e,l,a){a.d(l,{A:function(){return u},S:function(){return d}});var n=a(57437),s=a(47051);let t=({children:e,ref:l,as:a})=>(0,n.jsx)(a?s.ai:"h2",{ref:l,className:"text-emphasis text-base font-semibold leading-none",children:e}),i=({children:e,ref:l,as:a})=>(0,n.jsx)(a?s.ai:"h3",{ref:l,className:"text-subtle line-clamp-1 text-sm",children:e}),r=({ref:e,name:l,size:a="md",iconSlot:t})=>(0,n.jsx)("div",{ref:e,className:(0,s.r)("bg-default border-subtle border-subtle flex items-center justify-center border","sm"===a&&"rounded-md p-1","md"===a&&"rounded-[10px] p-1.5"),children:t||(0,n.jsx)(s.R,{name:l,className:(0,s.r)("sm"===a&&"h-4 w-4","md"===a&&"h-6 w-6")})}),d=Object.assign(({children:e,ref:l,className:a})=>{let[t]=(0,s.ah)();return(0,n.jsx)("div",{ref:t,className:(0,s.r)("bg-muted flex flex-col gap-4 rounded-2xl p-4",a),children:e})},{Header:({children:e,ref:l,icon:a,title:s,description:d,iconSlot:c,rawHeading:u})=>(0,n.jsxs)("div",{ref:l,className:"flex items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[a&&!c&&(0,n.jsx)(r,{name:a}),c&&(0,n.jsx)(r,{iconSlot:c}),(0,n.jsxs)("div",{className:"flex flex-col gap-0.5",children:[s&&(0,n.jsx)(t,{children:s}),d&&(0,n.jsx)(i,{children:d}),u&&u]})]}),e]}),Content:({children:e,ref:l})=>(0,n.jsx)("div",{ref:l,className:"flex flex-col gap-4",children:e}),Title:t,Description:i,SubSection:({children:e,ref:l})=>{let[a]=(0,s.ah)();return(0,n.jsx)("div",{ref:a,className:"border-muted bg-default flex flex-col gap-4 roun
1ded-xl border p-3",children:e})},SubSectionHeader:({children:e,ref:l,icon:a,title:t,classNames:i,justify:d="between",labelFor:c})=>(0,n.jsxs)("div",{ref:l,className:(0,s.r)("flex items-center gap-2","between"===d?"justify-between":"justify-start",null==i?void 0:i.container),children:[(0,n.jsxs)("div",{className:(0,s.r)("flex items-center gap-2",null==i?void 0:i.title),children:[a&&(0,n.jsx)(r,{name:a,size:"sm"}),(0,n.jsx)("div",{className:(0,s.r)("flex",null==i?void 0:i.title),children:(0,n.jsx)("h4",{className:"text-default text-sm font-medium leading-none",id:c,children:t})})]}),e]}),SubSectionContent:({children:e,ref:l,invert:a,classNames:t})=>(0,n.jsx)("div",{ref:l,className:(0,s.r)("bg-muted flex flex-col rounded-lg px-[6px] py-1",a&&"bg-default border-subtle border",null==t?void 0:t.container),children:e}),SubSectionNested:({children:e,ref:l})=>(0,n.jsx)("div",{ref:l,className:"bg-default border-subtle flex flex-col gap-2 rounded-xl border p-2",children:e})});function c({appId:e,className:l,returnTo:a,teamId:t,onAppInstallSuccess:i}){let{t:r}=(0,s.w)(),{data:d}=function(e){let{status:l}=s.aj.useSession();return s.ak.viewer.apps.appById.useQuery({appId:e},{enabled:"authenticated"===l})}(e),c=(0,s.v)(null,{returnTo:a,onSuccess:e=>{i(),null!=e&&e.setupPending||(0,s.a3)(r("app_successfully_installed"),"success")},onError:e=>{e instanceof Error&&(0,s.a3)(e.message||r("app_could_not_be_installed"),"error")}});return d?(0,n.jsx)(s.al,{type:d.type,teamsPlanRequired:d.teamsPlanRequired,wrapperClassName:(0,s.r)("[@media(max-width:260px)]:w-full",l),render:({useDefaultComponent:e,...l})=>(e&&(l={...l,onClick:()=>{c.mutate({type:d.type,variant:d.variant,slug:d.slug,...t&&{teamId:t}})}}),(0,n.jsx)(s.B,{loading:c.isPending,color:"secondary",className:"[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center",StartIcon:"plus",...l,children:r("add")}))}):null}function u({app:e,description:l,switchOnClick:a,switchChecked:t,children:i,returnTo:r,teamId:u,disableSwitch:o,switchTooltip:m,hideSettingsIcon:p=!1,hideAppCardOptions:x=!1,onAppInstallSuccess:h}){let{t:f}=(0,s.w)(),[b]=(0,s.ah)(),{setAppData:v,LockedIcon:g,disabled:j}=(0,s.y)(),N=(0,s.am)();return(0,n.jsxs)(d,{className:(0,s.r)(!(null!=e&&e.isInstalled)&&"rounded-xl"),children:[(0,n.jsx)(d.Header,{rawHeading:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex w-full items-center gap-1",children:[(0,n.jsx)(d.Title,{children:null==e?void 0:e.name}),!(null!=e&&e.isInstalled)&&(0,n.jsx)("span",{className:"bg-emphasis ml-1 rounded px-1 py-0.5 text-xs font-medium leading-3 tracking-[0.01em]",children:(null==e?void 0:e.categories[0].charAt(0).toUpperCase())+(null==e?void 0:e.categories[0].slice(1))})]}),(0,n.jsx)(d.Description,{children:null==e?void 0:e.description})]}),iconSlot:(0,n.jsx)(s.an,{href:`/apps/${e.slug}`,className:"flex h-8 w-8 items-center justify-center",children:(0,n.jsx)("img",{className:(0,s.r)((null==e?void 0:e.logo.includes("-dark"))&&"dark:invert","max-h-full max-w-full object-contain"),src:null==e?void 0:e.logo,alt:null==e?void 0:e.name})}),children:(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:null!=e&&e.isInstalled||e.credentialOwner?(0,n.jsx)("div",{className:"ml-auto flex items-center",children:(0,n.jsx)(s.p,{size:"sm",disabled:!e.enabled||j||o,onCheckedChange:e=>{a&&a(e),v("enabled",e)}
1,checked:t,LockedIcon:g,"data-testid":`${e.slug}-app-switch`,tooltip:m})}):(0,n.jsx)(c,{className:"ml-auto flex items-center",appId:e.slug,returnTo:r,teamId:u,onAppInstallSuccess:h})})})}),x?null:(null==e?void 0:e.isInstalled)&&t&&(0,n.jsx)("div",{ref:b,children:void 0===e.isSetupAlready||e.isSetupAlready?(0,n.jsxs)("div",{className:"relative text-sm [&_input]:mb-0 [&_input]:leading-4",children:[!p&&!N&&(0,n.jsx)(s.an,{href:`/apps/${e.slug}/setup`,className:"absolute right-4 top-4",children:(0,n.jsx)(s.R,{name:"settings",className:"text-default h-4 w-4","aria-hidden":"true"})}),i]}):(0,n.jsxs)("div",{className:"flex h-64 w-full flex-col items-center justify-center gap-4 ",children:[(0,n.jsx)("p",{children:f("this_app_is_not_setup_already")}),(0,n.jsx)(s.an,{href:`/apps/${e.slug}/setup`,children:(0,n.jsx)(s.B,{StartIcon:"settings",children:f("setup")})})]})})]})}},62957:function(e,l,a){a.r(l),a.d(l,{default:function(){return d}});var n=a(57437),s=a(47051),t=a(2265),i=a(17075),r=a(70177);let d=function({app:e,eventType:l,onAppInstallSuccess:a}){var d,c;let u=s.x.useSearchParams(),o=s.x.usePathname(),m=(0,t.useMemo)(()=>`${o}${u?`?${u.toString()}`:""}`,[o,u]),{t:p}=(0,s.w)(),{getAppData:x,setAppData:h}=(0,s.y)(),f=x("price"),b=x("currency"),v=x("paymentOption"),g=x("enabled"),[j,N]=(0,t.useState)(r.c.find(e=>e.value===b)),[S,w]=(0,t.useState)((0,r.i)(b)?r.a[b]:""),[y,k]=(0,t.useState)(g),C=(null==(d=s.G)?void 0:d.find(e=>v===e.value))||{label:s.G[0].label,value:s.G[0].value},I=(null==(c=l.recurringEvent)?void 0:c.count)!==void 0;return(0,n.jsx)(i.A,{onAppInstallSuccess:a,returnTo:s.W+m,app:e,switchChecked:y,switchOnClick:e=>{k(e)},description:(0,n.jsx)(n.Fragment,{children:"Add a mock payment to your events"}),children:(0,n.jsx)(n.Fragment,{children:I?(0,n.jsx)(s.J,{className:"mt-2",severity:"warning",title:p("warning_recurring_event_payment")}):y&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mt-2 block items-center sm:flex",children:(0,n.jsx)(s.f,{id:"test-mock-payment-app-price",label:"Price",labelSrOnly:!0,addOnLeading:S,addOnSuffix:b,step:"0.01",min:"0.5",type:"number",required:!0,className:"block w-full rounded-sm pl-2 text-sm",placeholder:"Price",onChange:e=>{h("price",100*Number(e.target.value)),j&&h("currency",j.value)},value:f>0?f/100:void 0})}),(0,n.jsxs)("div",{className:"mt-5 w-60",children:[(0,n.jsx)("label",{className:"text-default mb-1 block text-sm font-medium",htmlFor:"currency",children:p("currency")}),(0,n.jsx)(s.S,{id:"test-mock-payment-app-currency-id",variant:"default",options:r.c,value:j,className:"text-black",defaultValue:j,onChange:e=>{e&&(N(e),w(r.a[e.value]),h("currency",e.value))}})]}),(0,n.jsxs)("div",{className:"mt-4 w-60",children:[(0,n.jsx)("label",{className:"text-default mb-1 block text-sm font-medium",htmlFor:"currency",children:"Payment option"}),(0,n.jsx)(s.S,{defaultValue:C?{...C,label:p(C.label)}:{...s.G[0],label:p(s.G[0].label)},options:s.G.map(e=>({...e,label:p(e.label)||e.label})),onChange:e=>{e&&h("paymentOption",e.value)},className:"mb-1 h-[38px] w-full",isDisabled:!1})]})]})})})}},70177:function(e,l,a){a.d(l,{a:function(){return s},c:function(){return n},i:function(){return t}});let n=[{label:"United States dollar",value:"USD"},{label:"Australian dollar",value:"AUD"},{label:"Brazilian real 2",value:"BRL"},{label:"Canadian dollar",value:"CAD"},{label:"Chinese Renmenbi 3",value:"CNY"},{label:"Czech koruna",value:"CZK"},{label:"Danish krone",value:"DKK"},{label:"Euro",value:"EUR"},{label:"Hong Kong dollar",value:"HKD"},{label:"Hungarian forint 1",value:"HUF"},{label:"Israeli new shekel",value:"ILS"},{label:"Japanese yen 1",value:"JPY"},{label:"Malaysian ringgit 3",value:"MYR"},{label:"Mexican peso",value:"MXN"},{label:"New Taiwan dollar 1",value:"TWD"},{label:"New Zealand dollar",value:"NZD"},{label:"Norwegian krone",value:"NOK"},{label:"Philippine peso",value:"PHP"},{label:"Polish złoty",value:"PLN"},{label:"Pound sterling",value:"GBP"},{label:"Russian ruble",value:"RUB"},{label:"Singapore dollar",value:"SGD"},{label:"Swedish krona",value:"SEK"},{label:"Swiss franc",value:"CHF"},{label:"Thai baht",value:"THB"}],s={USD:"$",AUD:"$",BRL:"R$",CAD:"$",CNY:"\xa5",CZK:"Kč",DKK:"kr",EUR:"€",HKD:"$",HUF:"Ft",ILS:"₪",JPY:"\xa5",MYR:"RM",MXN:"$",TWD:"$",NZD:"$",NOK:"kr",PHP:"₱",PLN:"zł",GBP:"\xa3",RUB:"₽",SGD:"$",SEK:"kr",CHF:"Fr",THB:"฿"};function t(e){return Object.keys(s).includes(e)}}}]);

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.