@onequery/cli 0.1.49-alpha.1-win32-arm64 → 0.1.49-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/onequery.js +266 -0
- package/bin/package-constants.d.ts +75 -0
- package/bin/package-constants.js +160 -0
- package/package.json +22 -15
- package/runtime-bundle.json +57 -0
- package/vendor/aarch64-pc-windows-msvc/onequery/onequery.exe +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260327065242_curious_nightmare.sql +0 -403
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260403103652_slippery_hellfire_club.sql +0 -8
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260403112219_gigantic_namora.sql +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420071232_previous_justin_hammer.sql +0 -141
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +0 -29
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260420101631_even_ogun.sql +0 -5
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260425110519_smart_amazoness.sql +0 -8
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +0 -36
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260327065242_snapshot.json +0 -2817
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260403103652_snapshot.json +0 -2864
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260403112219_snapshot.json +0 -2870
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420071232_snapshot.json +0 -3879
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420093157_snapshot.json +0 -4088
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260420101631_snapshot.json +0 -3250
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260425110519_snapshot.json +0 -3250
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/20260428033542_snapshot.json +0 -3250
- package/vendor/aarch64-pc-windows-msvc/runtime/migrations/meta/_journal.json +0 -62
- package/vendor/aarch64-pc-windows-msvc/runtime/pglite/initdb.wasm +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/pglite/pglite.data +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/pglite/pglite.wasm +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/sql-parser/sql_parser_wasm_bg.wasm +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/CompositeItem-BczSyMtT.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/CompositeList-FRTEqUDK.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/DialogTitle-XJoEl7im.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconArrowRight-DsOD7mDl.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconCheck-Gc24xPT2.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconChevronDown-B-39MA7-.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconCoins-C7Nn0L6R.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconHistory-BqAd-xl2.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconLoader2-B3B6M8nQ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconPlus-C3-kRhGX.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/IconX-BQkA009b.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/Separator-CHfSrIVw.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/_authenticated-CWIbs-C9.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/_org_slug-CknLp7vH.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/alert-CgZYtErJ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/api-base-url-DIb6qukm.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/api-client-B2Cc7TWF.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/api-paths-DM-NAvAZ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/app-routes-CnJncMlZ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/audit-BusA9tVb.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/auth-bootstrap-query-B7dkGOfQ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/auth-client-DF1BsKzX.js +0 -3
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/avatar-BJ8wGO2c.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/badge-CwG2ykXV.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/budget-BHaHi4Ta.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/callback-CKwuXq25.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/card-BWqhQk-T.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/checkbox-BRqndHHY.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/compiler-runtime-DCc3R3Xn.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/connect-database-cblAefi9.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/create-org-BrGpRbwI.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/createReactComponent-_L2mp4Ui.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/data-source-connection-form-BuQAF1Ew.js +0 -173
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/device-ZrN18fkI.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/dist-TeLLf3Fl.js +0 -3
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/dropdown-menu-CD1w2p82.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/empty-nwzd6339.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/format-date-Ctrh7my1.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/getDisabledMountTransitionStyles-Co-5TcgR.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/getPseudoElementBounds-BefWKytd.js +0 -12
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/home-DBohjohZ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/index-BBPJeil4.css +0 -2
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/index-DefoCtD4.js +0 -10
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/input-CG_cIxvO.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/integrations-Ck1I0Lcz.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/invite._invitationId-I6ktUCMx.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/jsx-runtime-DG_AJzB_.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/label-DDLGZnWP.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/link-Cgvqhh5w.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/matchContext-CDajBC0L.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/organization-permissions-BQQ5PJbI.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/organization-query-keys-DwLucsD_.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/query-timing-LGzitMXx.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/queryOptions-BHw87wTZ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/removable-BfDesq3B.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/routes-BMjqzzhN.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/schemas-n4sxh6jF.js +0 -39
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/select--f8ikhXw.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/separator-C6uGWs7e.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/settings-DbZya6GZ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/signin-CCn-yW0m.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/src-DCIPwIx0.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/table-Bzsu823v.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/team-DDjwdOl0.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/textarea-DeFlZYve.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/theme-toggle-DrtO5ON3.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/use-optimistic-mutation-CrovtKU_.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useBaseQuery-DsHrqVxr.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useBaseUiId-BLFGpnYJ.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useCompositeItem-C3Tz1oAb.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useControlled-B8q0aJoo.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useQuery-8xe0Ctrs.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useRender-B2c9_UYd.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useRouterState-DpT8luFk.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useSuspenseQuery-CUebzdcR.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/useValueChanged-C3CBkPge.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/utils-C8DGLIgm.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/xstate-react.esm-U3P0kbzA.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/zod-Ch0Zejov.js +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/favicon.ico +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/amplitude/step1_settings_sidebar.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/amplitude/step2_projects.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/amplitude/step3_project_keys.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/amplitude/step4_api_keys.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/bigquery/step1_service_accounts.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/bigquery/step2_bigquery_roles.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/bigquery/step3_add_key_menu.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/bigquery/step4_create_json_key.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/ga4/step1_service_accounts.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/ga4/step2_create_json_key.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/ga4/step3_add_user_viewer.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/ga4/step4_property_details.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/github-token-guide/step1_signin.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/github-token-guide/step4_token_created_sanitized.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/mixpanel/step1_service_accounts.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/mixpanel/step2_create_service_account.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/mixpanel/step3_credentials.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/mixpanel/step4_project_settings.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/postgresql/step1_create_user.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/postgresql/step2_connection.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/posthog/step1_project_settings.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/posthog/step2_personal_api_keys.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/posthog/step3_create_key_modal.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/rds/step1_connect.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/rds/step2_create_user.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/rds/step3_grant.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/rds/step4_info.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/sentry/step1_personal_tokens.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/sentry/step2_create_token_permissions.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/sentry/step3_organization_slug.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/images/sentry/step4_project_slug.png +0 -0
- package/vendor/aarch64-pc-windows-msvc/runtime/web/index.html +0 -47
- package/vendor/aarch64-pc-windows-msvc/runtime/web/linear.svg +0 -1
- package/vendor/aarch64-pc-windows-msvc/runtime/web/onequery.svg +0 -44
- package/vendor/aarch64-pc-windows-msvc/server/onequery-server.mjs +0 -270419
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{a as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{P as a,S as o,a as s,f as c,p as l,x as u,y as d}from"./createReactComponent-_L2mp4Ui.js";import{t as f}from"./utils-C8DGLIgm.js";import{d as p,n as m,t as h}from"./useBaseUiId-BLFGpnYJ.js";import{t as g}from"./useControlled-B8q0aJoo.js";var _=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),v={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},y={valid(e){return e===null?null:e?{[_.valid]:``}:{[_.invalid]:``}}},b=e(t()),x=b.createContext({invalid:void 0,name:void 0,validityData:{state:v,errors:[],error:``,value:``,initialValue:null},setValidityData:l,disabled:void 0,touched:!1,setTouched:l,dirty:!1,setDirty:l,filled:!1,setFilled:l,focused:!1,setFocused:l,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=c)=>e,getInputValidationProps:(e=c)=>e,inputRef:{current:null},commit:async()=>{}}});function S(e=!0){let t=b.useContext(x);if(t.setValidityData===l&&!e)throw Error(d(28));return t}var C=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:l,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function w(){return b.useContext(C)}var T=b.createContext({controlId:void 0,setControlId:l,labelId:void 0,setLabelId:l,messageIds:[],setMessageIds:l,getDescriptionProps:e=>e});function E(){return b.useContext(T)}function D(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function O(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:o}=E(),s=h(t);return u(()=>{if(!(!n&&!t||o===l)){if(n){let e=r?.current;a(e)&&e.closest(`label`)!=null?o(t??null):o(i??s)}else t&&o(t);return()=>{t&&o(void 0)}}},[t,r,i,o,n,s]),i??s}var k=e(r());function A(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:s}=e,{formRef:c}=w(),{invalid:l,markedDirtyRef:d,validityData:f,setValidityData:p}=S(),m=o(e.getValue);u(()=>{if(!t)return;let e=n;e===void 0&&(e=m()),f.initialValue===null&&e!==null&&p(t=>({...t,initialValue:e}))},[t,p,n,f.initialValue,m]),u(()=>{!t||!r||c.current.fields.set(r,{getValue:m,name:i,controlRef:a,validityData:D(f,l),validate(e=!0){let t=n;t===void 0&&(t=m()),d.current=!0,e?k.flushSync(()=>s(t)):s(t)}})},[s,a,t,c,m,r,l,d,i,f,n]),u(()=>{let e=c.current.fields;return()=>{r&&e.delete(r)}},[c,r])}var j=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:c,disabled:l=!1,onValueChange:d,defaultValue:f,...h}=e,{state:_,name:v,disabled:x}=S(),C=x||l,w=v??a,T=b.useMemo(()=>({..._,disabled:C}),[_,C]),{setTouched:D,setDirty:k,validityData:j,setFocused:M,setFilled:N,validationMode:P,validation:F}=S(),{labelId:I}=E(),L=O({id:i});u(()=>{let e=c!=null;F.inputRef.current?.value||e&&c!==``?N(!0):e&&c===``&&N(!1)},[F.inputRef,N,c]);let[R,z]=g({controlled:c,default:f,name:`FieldControl`,state:`value`}),B=c!==void 0,V=o((e,t)=>{d?.(e,t),!t.isCanceled&&z(e)});return A({id:L,name:w,commit:F.commit,value:R,getValue:()=>F.inputRef.current?.value,controlRef:F.inputRef}),s(`input`,e,{ref:t,state:T,props:[{id:L,disabled:C,name:w,ref:F.inputRef,"aria-labelledby":I,...B?{value:R}:{defaultValue:f},onChange(e){let t=e.currentTarget.value;V(t,m(p,e.nativeEvent)),k(t!==j.initialValue),N(t!==``)},onFocus(){M(!0)},onBlur(e){D(!0),M(!1),P===`onBlur`&&F.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(D(!0),F.commit(e.currentTarget.value))}},F.getInputValidationProps(),h],stateAttributesMapping:y})}),M=n(),N=b.forwardRef(function(e,t){return(0,M.jsx)(j,{ref:t,...e})}),P=i();function F(e){let t=(0,P.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=f(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,M.jsx)(N,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}export{w as a,E as i,A as n,S as o,O as r,y as s,F as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{t as r}from"./compiler-runtime-DCc3R3Xn.js";import{a as i}from"./api-base-url-DIb6qukm.js";import{S as a,a as o,n as s,t as c,x as l,y as u}from"./createReactComponent-_L2mp4Ui.js";import{t as d}from"./utils-C8DGLIgm.js";import{d as f,n as p,r as m,t as h}from"./dropdown-menu-CD1w2p82.js";import{c as g,o as _,s as v}from"./select--f8ikhXw.js";import{n as y,r as b,t as x}from"./checkbox-BRqndHHY.js";import{t as S}from"./IconLoader2-B3B6M8nQ.js";import{t as C}from"./IconPlus-C3-kRhGX.js";import{a as w,c as T,i as E,l as D,n as O,o as ee,r as k,s as A,u as j}from"./use-optimistic-mutation-CrovtKU_.js";import{t as M}from"./useQuery-8xe0Ctrs.js";import{t as N}from"./useSuspenseQuery-CUebzdcR.js";import{t as P}from"./queryOptions-BHw87wTZ.js";import{Ct as F,Et as I,ct as L,i as R}from"./getDisabledMountTransitionStyles-Co-5TcgR.js";import{t as te}from"./useBaseUiId-BLFGpnYJ.js";import{t as ne}from"./api-client-B2Cc7TWF.js";import{G as re,I as ie,J as z,R as ae,_ as oe,g as B,v as se,w as V}from"./index-DefoCtD4.js";import{t as ce}from"./input-CG_cIxvO.js";import{t as le}from"./format-date-Ctrh7my1.js";import{n as H,r as U,t as W}from"./alert-CgZYtErJ.js";import{t as ue}from"./badge-CwG2ykXV.js";import{a as de,n as fe,o as G,r as pe,t as me}from"./card-BWqhQk-T.js";import{a as he,i as ge,n as K,o as _e,r as ve,t as q}from"./data-source-connection-form-BuQAF1Ew.js";var ye=c(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]);function J(e){return e}var be=r(),Y=e(t(),1),X=n();function Z(e){let t=(0,be.c)(13),[n,r]=(0,Y.useState)(!1),i;t[0]===e?i=t[1]:(i=t=>{e.onSuccess?.(t),r(!1)},t[0]=e,t[1]=i);let a=i,o;t[2]===e.children?o=t[3]:(o=(0,X.jsx)(D,{render:e.children}),t[2]=e.children,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsxs)(A,{children:[(0,X.jsx)(T,{children:`Add Data Source`}),(0,X.jsx)(w,{children:`Connect a data source so OneQuery can query your workspace data.`})]}),t[4]=s):s=t[4];let c;t[5]!==a||t[6]!==e.initialProvider||t[7]!==e.organizationId?(c=(0,X.jsxs)(E,{className:`sm:max-w-[720px] max-h-[85vh] overflow-y-auto overflow-x-hidden`,children:[s,(0,X.jsx)(q,{organizationId:e.organizationId,onSuccess:a,className:`py-4`,initialProvider:e.initialProvider})]}),t[5]=a,t[6]=e.initialProvider,t[7]=e.organizationId,t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==o||t[11]!==c?(l=(0,X.jsxs)(k,{open:n,onOpenChange:r,children:[o,c]}),t[9]=n,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}var Q=180,$=/\b(api[-_ ]?key|authorization|bearer|cookie|password|secret|token)\b|-----BEGIN/i;function xe(e,t){let n=t?.replaceAll(/\s+/g,` `).trim();if(n&&n!==e)return n.length>Q||$.test(n)?`Review the data source settings and try again.`:n}function Se(e){let t=xe(e.title,e.description);return ie.error(e.title,{action:e.action,className:`max-w-[34rem]`,closeButton:!0,description:t,descriptionClassName:`whitespace-pre-wrap break-words`,duration:t?12e3:8e3,position:`top-center`,richColors:!0})}var Ce=ne();async function we(e,t){let n=await Ce.api[`data-sources`][`:id`][`github-repositories`].$get({param:{id:t},query:{organizationId:e}});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(V(e,`Failed to fetch GitHub repositories`))}return n.json()}function Te(e,t){return P({queryFn:async()=>we(e,t),queryKey:[`github-repositories`,t]})}async function Ee(e,t,n){let r=await Ce.api[`data-sources`][`:id`][`github-repositories`].$post({json:{repositories:n},param:{id:t},query:{organizationId:e}});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(V(e,`Failed to update GitHub repositories`))}return r.json()}function De({queryClient:e,organizationId:t,dataSourceId:n,onSuccess:r,onError:i}){let a=Te(t,n);return J({mutationFn:async e=>Ee(t,n,e.repositories),mutationKey:[`github-repositories`,n,`update`],onError:i,onSuccess:(t,n)=>{e.setQueryData(a.queryKey,e=>e&&{...e,selected:t.repositories}),r?.(t,n)}})}var Oe=Y.createContext(void 0);function ke(){let e=Y.useContext(Oe);if(e===void 0)throw Error(u(53));return e}var Ae=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function je(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var Me=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),Ne=function(e){return e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),Pe={hasOverflowX:e=>e?{[Ne.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[Ne.hasOverflowY]:``}:null,overflowXStart:e=>e?{[Ne.overflowXStart]:``}:null,overflowXEnd:e=>e?{[Ne.overflowXEnd]:``}:null,overflowYStart:e=>e?{[Ne.overflowYStart]:``}:null,overflowYEnd:e=>e?{[Ne.overflowYEnd]:``}:null,cornerHidden:()=>null},Fe={x:0,y:0},Ie={width:0,height:0},Le={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Re={x:!1,y:!1,corner:!1},ze=Y.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,...s}=e,c=Be(i),l=te(),u=I(),d=I(),{nonce:f,disableStyleElements:p}=_(),[m,h]=Y.useState(!1),[v,y]=Y.useState(!1),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),[w,T]=Y.useState(Ie),[E,D]=Y.useState(Ie),[O,ee]=Y.useState(Le),[k,A]=Y.useState(Re),j=Y.useRef(null),M=Y.useRef(null),N=Y.useRef(null),P=Y.useRef(null),F=Y.useRef(null),R=Y.useRef(null),ne=Y.useRef(null),re=Y.useRef(!1),ie=Y.useRef(0),z=Y.useRef(0),ae=Y.useRef(0),oe=Y.useRef(0),B=Y.useRef(`vertical`),se=Y.useRef(Fe),V=a(e=>{let t=e.x-se.current.x,n=e.y-se.current.y;se.current=e,n!==0&&(x(!0),u.start(500,()=>{x(!1)})),t!==0&&(y(!0),d.start(500,()=>{y(!1)}))}),ce=a(e=>{e.button===0&&(re.current=!0,ie.current=e.clientY,z.current=e.clientX,B.current=e.currentTarget.getAttribute(Me.orientation),M.current&&(ae.current=M.current.scrollTop,oe.current=M.current.scrollLeft),F.current&&B.current===`vertical`&&F.current.setPointerCapture(e.pointerId),R.current&&B.current===`horizontal`&&R.current.setPointerCapture(e.pointerId))}),le=a(e=>{if(!re.current)return;let t=e.clientY-ie.current,n=e.clientX-z.current;if(M.current){let r=M.current.scrollHeight,i=M.current.clientHeight,a=M.current.scrollWidth,o=M.current.clientWidth;if(F.current&&N.current&&B.current===`vertical`){let n=je(N.current,`padding`,`y`),a=je(F.current,`margin`,`y`),o=F.current.offsetHeight,s=t/(N.current.offsetHeight-o-n-a);M.current.scrollTop=ae.current+s*(r-i),e.preventDefault(),x(!0),u.start(500,()=>{x(!1)})}if(R.current&&P.current&&B.current===`horizontal`){let t=je(P.current,`padding`,`x`),r=je(R.current,`margin`,`x`),i=R.current.offsetWidth,s=n/(P.current.offsetWidth-i-t-r);M.current.scrollLeft=oe.current+s*(a-o),e.preventDefault(),y(!0),d.start(500,()=>{y(!1)})}}}),H=a(e=>{re.current=!1,F.current&&B.current===`vertical`&&F.current.releasePointerCapture(e.pointerId),R.current&&B.current===`horizontal`&&R.current.releasePointerCapture(e.pointerId)});function U(e){C(e.pointerType===`touch`)}function W(e){U(e),e.pointerType!==`touch`&&h(L(j.current,e.target))}let ue=Y.useMemo(()=>({hasOverflowX:!k.x,hasOverflowY:!k.y,overflowXStart:O.xStart,overflowXEnd:O.xEnd,overflowYStart:O.yStart,overflowYEnd:O.yEnd,cornerHidden:k.corner}),[k.x,k.y,k.corner,O]),de={role:`presentation`,onPointerEnter:W,onPointerMove:W,onPointerDown:U,onPointerLeave(){h(!1)},style:{position:`relative`,[Ae.scrollAreaCornerHeight]:`${w.height}px`,[Ae.scrollAreaCornerWidth]:`${w.width}px`}},fe=o(`div`,e,{state:ue,ref:[t,j],props:[de,s],stateAttributesMapping:Pe}),G=Y.useMemo(()=>({handlePointerDown:ce,handlePointerMove:le,handlePointerUp:H,handleScroll:V,cornerSize:w,setCornerSize:T,thumbSize:E,setThumbSize:D,touchModality:S,cornerRef:ne,scrollingX:v,setScrollingX:y,scrollingY:b,setScrollingY:x,hovering:m,setHovering:h,viewportRef:M,rootRef:j,scrollbarYRef:N,scrollbarXRef:P,thumbYRef:F,thumbXRef:R,rootId:l,hiddenState:k,setHiddenState:A,overflowEdges:O,setOverflowEdges:ee,viewportState:ue,overflowEdgeThreshold:c}),[ce,le,H,V,w,E,S,v,y,b,x,m,h,l,k,O,ue,c]);return(0,X.jsxs)(Oe.Provider,{value:G,children:[!p&&g.getElement(f),fe]})});function Be(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var Ve=Y.createContext(void 0);function He(e,t){if(typeof IntersectionObserver>`u`)return()=>{};let n=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>0&&(t(),n.disconnect())})});return n.observe(e),()=>{n.disconnect()}}var Ue=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({}),We=!1;function Ge(){We||F||(typeof CSS<`u`&&`registerProperty`in CSS&&[Ue.scrollAreaOverflowXStart,Ue.scrollAreaOverflowXEnd,Ue.scrollAreaOverflowYStart,Ue.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),We=!0)}var Ke=Y.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{viewportRef:s,scrollbarYRef:c,scrollbarXRef:u,thumbYRef:d,thumbXRef:f,cornerRef:p,cornerSize:m,setCornerSize:h,setThumbSize:_,rootId:y,setHiddenState:b,hiddenState:x,handleScroll:S,setHovering:C,setOverflowEdges:w,overflowEdges:T,overflowEdgeThreshold:E}=ke(),D=R(),O=Y.useRef(!0),ee=I(),k=I(),A=a(()=>{let e=s.current,t=c.current,n=u.current,r=d.current,i=f.current,a=p.current;if(!e)return;let o=e.scrollHeight,l=e.scrollWidth,g=e.clientHeight,y=e.clientWidth,x=e.scrollTop,S=e.scrollLeft;if(o===0||l===0)return;let C=g>=o,T=y>=l,O=y/l,ee=g/o,k=Math.max(0,l-y),A=Math.max(0,o-g),j=0,M=0;T||(j=v(D===`rtl`?-S:S,0,k),M=k-j);let N=C?0:v(x,0,A),P=C?0:A-N,F=T?0:y,I=C?0:g,L=0,R=0;!T&&!C&&(L=t?.offsetWidth||0,R=n?.offsetHeight||0);let te=m.width===0&&m.height===0,ne=te?L:0,re=te?R:0,ie=je(n,`padding`,`x`),z=je(t,`padding`,`y`),ae=je(i,`margin`,`x`),oe=je(r,`margin`,`y`),B=F-ie-ae,se=I-z-oe,V=n?Math.min(n.offsetWidth-ne,B):B,ce=t?Math.min(t.offsetHeight-re,se):se,le=Math.max(16,V*O),H=Math.max(16,ce*ee);if(_(e=>e.height===H&&e.width===le?e:{width:le,height:H}),t&&r){let e=t.offsetHeight-H-z-oe,n=o-g,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-le-ie-ae,t=l-y,r=t===0?0:S/t,a=D===`rtl`?v(r*e,-e,0):v(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let U=v(j,0,k),W=v(M,0,k),ue=v(N,0,A),de=v(P,0,A),fe=[[Ue.scrollAreaOverflowXStart,U],[Ue.scrollAreaOverflowXEnd,W],[Ue.scrollAreaOverflowYStart,ue],[Ue.scrollAreaOverflowYEnd,de]];for(let[t,n]of fe)e.style.setProperty(t,`${n}px`);a&&(T||C?h({width:0,height:0}):!T&&!C&&h({width:L,height:R})),b(e=>{let t=C||T;return e.y===C&&e.x===T&&e.corner===t?e:{y:C,x:T,corner:t}});let G={xStart:!T&&U>E.xStart,xEnd:!T&&W>E.xEnd,yStart:!C&&ue>E.yStart,yEnd:!C&&de>E.yEnd};w(e=>e.xStart===G.xStart&&e.xEnd===G.xEnd&&e.yStart===G.yStart&&e.yEnd===G.yEnd?e:G)});l(()=>{if(!s.current)return;Ge();let e=!1;return He(s.current,()=>{if(!e){e=!0;return}A()})},[A,s]),l(()=>{queueMicrotask(A)},[A,x,D]),l(()=>{s.current?.matches(`:hover`)&&C(!0)},[s,C]),Y.useEffect(()=>{let e=s.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;return}A()});return n.observe(e),k.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.all(t.map(e=>e.finished)).then(A).catch(()=>{})}),()=>{n.disconnect(),k.clear()}},[A,s,k]);function j(){O.current=!1}let M={role:`presentation`,...y&&{"data-id":`${y}-viewport`},...(!x.x||!x.y)&&{tabIndex:0},className:g.className,style:{overflow:`scroll`},onScroll(){s.current&&(A(),O.current||S({x:s.current.scrollLeft,y:s.current.scrollTop}),ee.start(100,()=>{O.current=!0}))},onWheel:j,onTouchMove:j,onPointerMove:j,onPointerEnter:j,onKeyDown:j},N=Y.useMemo(()=>({hasOverflowX:!x.x,hasOverflowY:!x.y,overflowXStart:T.xStart,overflowXEnd:T.xEnd,overflowYStart:T.yStart,overflowYEnd:T.yEnd,cornerHidden:x.corner}),[x.x,x.y,x.corner,T]),P=o(`div`,e,{ref:[t,s],state:N,props:[M,i],stateAttributesMapping:Pe}),F=Y.useMemo(()=>({computeThumbPosition:A}),[A]);return(0,X.jsx)(Ve.Provider,{value:F,children:P})}),qe=Y.createContext(void 0);function Je(){let e=Y.useContext(qe);if(e===void 0)throw Error(u(54));return e}var Ye=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),Xe=Y.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,overflowEdges:f,scrollbarYRef:p,scrollbarXRef:m,viewportRef:h,thumbYRef:g,thumbXRef:_,handlePointerDown:v,handlePointerUp:y,rootId:b,thumbSize:x}=ke(),S=Y.useMemo(()=>({hovering:c,scrolling:{horizontal:l,vertical:u}[i],orientation:i,hasOverflowX:!d.x,hasOverflowY:!d.y,overflowXStart:f.xStart,overflowXEnd:f.xEnd,overflowYStart:f.yStart,overflowYEnd:f.yEnd,cornerHidden:d.corner}),[c,l,u,i,d,f]),C=R();Y.useEffect(()=>{let e=h.current,t=i===`vertical`?p.current:m.current;if(!t)return;function n(n){if(!(!e||!t||n.ctrlKey)){if(n.preventDefault(),i===`vertical`){if(e.scrollTop===0&&n.deltaY<0)return}else if(e.scrollLeft===0&&n.deltaX<0)return;if(i===`vertical`){if(e.scrollTop===e.scrollHeight-e.clientHeight&&n.deltaY>0)return}else if(e.scrollLeft===e.scrollWidth-e.clientWidth&&n.deltaX>0)return;i===`vertical`?e.scrollTop+=n.deltaY:e.scrollLeft+=n.deltaX}}return t.addEventListener(`wheel`,n,{passive:!1}),()=>{t.removeEventListener(`wheel`,n)}},[i,m,p,h]);let w={...b&&{"data-id":`${b}-scrollbar`},onPointerDown(e){if(e.button===0&&e.currentTarget===e.target&&h.current){if(g.current&&p.current&&i===`vertical`){let t=je(g.current,`margin`,`y`),n=je(p.current,`padding`,`y`),r=g.current.offsetHeight,i=p.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=h.current.scrollHeight,s=h.current.clientHeight,c=a/(p.current.offsetHeight-r-n-t)*(o-s);h.current.scrollTop=c}if(_.current&&m.current&&i===`horizontal`){let t=je(_.current,`margin`,`x`),n=je(m.current,`padding`,`x`),r=_.current.offsetWidth,i=m.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=h.current.scrollWidth,s=h.current.clientWidth,c=a/(m.current.offsetWidth-r-n-t),l;C===`rtl`?(l=(1-c)*(o-s),h.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),h.current.scrollLeft=l}v(e)}},onPointerUp:y,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,...i===`vertical`&&{top:0,bottom:`var(${Ae.scrollAreaCornerHeight})`,insetInlineEnd:0,[Ye.scrollAreaThumbHeight]:`${x.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${Ae.scrollAreaCornerWidth})`,bottom:0,[Ye.scrollAreaThumbWidth]:`${x.width}px`}}},T=o(`div`,e,{ref:[t,i===`vertical`?p:m],state:S,props:[w,s],stateAttributesMapping:Pe}),E=Y.useMemo(()=>({orientation:i}),[i]),D=i===`vertical`?d.y:d.x;return a||!D?(0,X.jsx)(qe.Provider,{value:E,children:T}):null}),Ze=Y.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{thumbYRef:a,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:d,setScrollingY:f}=ke(),{orientation:p}=Je(),m=Y.useMemo(()=>({orientation:p}),[p]);return o(`div`,e,{ref:[t,p===`vertical`?a:s],state:m,props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){p===`vertical`&&f(!1),p===`horizontal`&&d(!1),u(e)},style:{...p===`vertical`&&{height:`var(${Ye.scrollAreaThumbHeight})`},...p===`horizontal`&&{width:`var(${Ye.scrollAreaThumbWidth})`}}},i]})}),Qe=Y.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{cornerRef:a,cornerSize:s,hiddenState:c}=ke(),l=o(`div`,e,{ref:[t,a],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},i]});return c.corner?null:l});function $e(e){let t=(0,be.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=d(`relative`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,X.jsx)(Ke,{"data-slot":`scroll-area-viewport`,className:`focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1`,children:n}),t[6]=n,t[7]=o);let s,c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(et,{}),c=(0,X.jsx)(Qe,{}),t[8]=s,t[9]=c):(s=t[8],c=t[9]);let l;return t[10]!==i||t[11]!==a||t[12]!==o?(l=(0,X.jsxs)(ze,{"data-slot":`scroll-area`,className:a,...i,children:[o,s,c]}),t[10]=i,t[11]=a,t[12]=o,t[13]=l):l=t[13],l}function et(e){let t=(0,be.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]===n?o=t[5]:(o=d(`data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(Ze,{"data-slot":`scroll-area-thumb`,className:`rounded-full bg-border relative flex-1`}),t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==r||t[9]!==o?(c=(0,X.jsx)(Xe,{"data-slot":`scroll-area-scrollbar`,"data-orientation":a,orientation:a,className:o,...r,children:s}),t[7]=a,t[8]=r,t[9]=o,t[10]=c):c=t[10],c}function tt(e,t){if(e.length!==t.length)return!0;let n=new Set(e);return t.some(e=>!n.has(e))}function nt(e){let t=(0,be.c)(94),[n,r]=(0,Y.useState)(``),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],t[0]=i):i=t[0];let[a,o]=(0,Y.useState)(i),c=(0,Y.useRef)(!1),l=ae(),u;t[1]!==e.dataSourceId||t[2]!==e.organizationId?(u=Te(e.organizationId,e.dataSourceId),t[1]=e.dataSourceId,t[2]=e.organizationId,t[3]=u):u=t[3];let d;t[4]!==e.open||t[5]!==u?(d={...u,enabled:e.open},t[4]=e.open,t[5]=u,t[6]=d):d=t[6];let f=M(d),p;t[7]===f.data?.repositories?p=t[8]:(p=f.data?.repositories??[],t[7]=f.data?.repositories,t[8]=p);let m=p,h;t[9]===f.data?.selected?h=t[10]:(h=f.data?.selected??[],t[9]=f.data?.selected,t[10]=h);let g=h,_,v;t[11]!==g||t[12]!==e.open||t[13]!==f.data?(_=()=>{if(!e.open){c.current=!1,r(``);return}f.data&&(c.current||=(o(g),!0))},v=[g,e.open,f.data],t[11]=g,t[12]=e.open,t[13]=f.data,t[14]=_,t[15]=v):(_=t[14],v=t[15]),(0,Y.useEffect)(_,v);let y;if(t[16]!==m||t[17]!==n){bb0:{let e=n.trim().toLowerCase();if(!e){y=m;break bb0}y=m.filter(t=>{let n=t.owner.toLowerCase(),r=t.name.toLowerCase(),i=t.fullName.toLowerCase();return n.includes(e)||r.includes(e)||i.includes(e)})}t[16]=m,t[17]=n,t[18]=y}else y=t[18];let b=y,C;t[19]!==g||t[20]!==a?(C=tt(a,g),t[19]=g,t[20]=a,t[21]=C):C=t[21];let D=C,O;t[22]===e?O=t[23]:(O=()=>{ie.success(`GitHub repositories updated`),e.onOpenChange(!1)},t[22]=e,t[23]=O);let N;t[24]!==e.dataSourceId||t[25]!==e.organizationId||t[26]!==l||t[27]!==O?(N=De({dataSourceId:e.dataSourceId,onError:it,onSuccess:O,organizationId:e.organizationId,queryClient:l}),t[24]=e.dataSourceId,t[25]=e.organizationId,t[26]=l,t[27]=O,t[28]=N):N=t[28];let P=j(N),F;t[29]===a?F=t[30]:(F=new Set(a),t[29]=a,t[30]=F);let I=F,L;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(L=function(e){o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[31]=L):L=t[31];let R=L,te;t[32]===b?te=t[33]:(te=function(){let e=b.map(rt);o(t=>[...new Set([...t,...e])])},t[32]=b,t[33]=te);let ne=te,re;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(re=function(){o([])},t[34]=re):re=t[34];let z=re,oe=f.isLoading,B=f.isError,se=D&&!P.isPending,V;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,X.jsxs)(A,{children:[(0,X.jsx)(T,{children:`Select GitHub Repositories`}),(0,X.jsx)(w,{children:`Choose repositories to use for this data source. We only read from the repositories your saved token can access and that you select here.`})]}),t[35]=V):V=t[35];let le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,X.jsx)(ye,{size:16,className:`absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground`}),t[36]=le):le=t[36];let H;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>r(e.target.value),t[37]=H):H=t[37];let U;t[38]===n?U=t[39]:(U=(0,X.jsxs)(`div`,{className:`relative flex-1`,children:[le,(0,X.jsx)(ce,{value:n,onChange:H,placeholder:`Search repositories...`,className:`pl-9`})]}),t[38]=n,t[39]=U);let W=b.length===0,de;t[40]!==ne||t[41]!==W?(de=(0,X.jsx)(s,{variant:`outline`,size:`sm`,onClick:ne,disabled:W,children:`Select visible`}),t[40]=ne,t[41]=W,t[42]=de):de=t[42];let fe=a.length===0,G;t[43]===fe?G=t[44]:(G=(0,X.jsx)(s,{variant:`ghost`,size:`sm`,onClick:z,disabled:fe,children:`Clear`}),t[43]=fe,t[44]=G);let pe;t[45]!==U||t[46]!==de||t[47]!==G?(pe=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[U,de,G]}),t[45]=U,t[46]=de,t[47]=G,t[48]=pe):pe=t[48];let me=m.length>0?` • ${m.length} available`:``,he;t[49]!==a.length||t[50]!==me?(he=(0,X.jsxs)(`span`,{children:[a.length,` selected`,me]}),t[49]=a.length,t[50]=me,t[51]=he):he=t[51];let ge;t[52]===D?ge=t[53]:(ge=D?(0,X.jsx)(ue,{variant:`outline`,children:`Unsaved`}):null,t[52]=D,t[53]=ge);let K;t[54]!==he||t[55]!==ge?(K=(0,X.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[he,ge]}),t[54]=he,t[55]=ge,t[56]=K):K=t[56];let _e;t[57]===oe?_e=t[58]:(_e=oe?(0,X.jsx)(`div`,{className:`flex items-center justify-center py-12 text-muted-foreground`,children:(0,X.jsx)(S,{size:24,className:`animate-spin`})}):null,t[57]=oe,t[58]=_e);let ve;t[59]===B?ve=t[60]:(ve=B?(0,X.jsx)(`p`,{className:`text-sm text-destructive`,children:`Unable to load repositories. Please try again.`}):null,t[59]=B,t[60]=ve);let q;t[61]!==b||t[62]!==B||t[63]!==oe||t[64]!==I?(q=!oe&&!B?(0,X.jsx)($e,{className:`h-[320px] rounded-md border`,children:(0,X.jsxs)(`div`,{className:`p-2 space-y-1`,children:[b.length===0?(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground px-3 py-6 text-center`,children:`No repositories found.`}):null,b.map(e=>(0,X.jsxs)(`button`,{type:`button`,className:`w-full flex items-center gap-3 rounded-md px-3 py-2 hover:bg-accent transition-colors text-left`,onClick:t=>{let n=t.target;n instanceof HTMLElement&&(n.closest(`[data-slot="checkbox"]`)||R(e.fullName))},children:[(0,X.jsx)(x,{checked:I.has(e.fullName),onCheckedChange:()=>R(e.fullName)}),(0,X.jsxs)(`div`,{className:`flex-1`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:e.fullName}),e.private?(0,X.jsx)(ue,{variant:`secondary`,children:`Private`}):null]}),(0,X.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`Owner: `,e.owner]})]})]},e.id))]})}):null,t[61]=b,t[62]=B,t[63]=oe,t[64]=I,t[65]=q):q=t[65];let J;t[66]!==pe||t[67]!==K||t[68]!==_e||t[69]!==ve||t[70]!==q?(J=(0,X.jsxs)(`div`,{className:`space-y-3`,children:[pe,K,_e,ve,q]}),t[66]=pe,t[67]=K,t[68]=_e,t[69]=ve,t[70]=q,t[71]=J):J=t[71];let Z;t[72]===e?Z=t[73]:(Z=()=>e.onOpenChange(!1),t[72]=e,t[73]=Z);let Q;t[74]!==Z||t[75]!==P.isPending?(Q=(0,X.jsx)(s,{variant:`outline`,onClick:Z,disabled:P.isPending,children:`Cancel`}),t[74]=Z,t[75]=P.isPending,t[76]=Q):Q=t[76];let $;t[77]!==a||t[78]!==P?($=()=>P.mutate({repositories:a}),t[77]=a,t[78]=P,t[79]=$):$=t[79];let xe=!se,Se=P.isPending?`Saving...`:`Save`,Ce;t[80]!==$||t[81]!==xe||t[82]!==Se?(Ce=(0,X.jsx)(s,{onClick:$,disabled:xe,children:Se}),t[80]=$,t[81]=xe,t[82]=Se,t[83]=Ce):Ce=t[83];let we;t[84]!==Q||t[85]!==Ce?(we=(0,X.jsxs)(ee,{children:[Q,Ce]}),t[84]=Q,t[85]=Ce,t[86]=we):we=t[86];let Ee;t[87]!==J||t[88]!==we?(Ee=(0,X.jsxs)(E,{className:`sm:max-w-[680px]`,children:[V,J,we]}),t[87]=J,t[88]=we,t[89]=Ee):Ee=t[89];let Oe;return t[90]!==e.onOpenChange||t[91]!==e.open||t[92]!==Ee?(Oe=(0,X.jsx)(k,{open:e.open,onOpenChange:e.onOpenChange,children:Ee}),t[90]=e.onOpenChange,t[91]=e.open,t[92]=Ee,t[93]=Oe):Oe=t[93],Oe}function rt(e){return e.fullName}function it(e){Se({title:`Failed to update GitHub repositories`,description:e.message})}function at(e){switch(e){case`active`:return`default`;case`error`:return`destructive`;case`disconnected`:return`secondary`;default:return`outline`}}function ot(e){let t=(0,be.c)(4);if(!e.errorMessage)return null;let n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(z,{className:`size-4`}),r=(0,X.jsx)(U,{children:`Connection needs attention`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e.errorMessage?i=t[3]:(i=(0,X.jsxs)(W,{variant:`destructive`,className:`mt-3 border-destructive/30 bg-destructive/5`,children:[n,r,(0,X.jsx)(H,{className:`max-h-32 overflow-y-auto whitespace-pre-wrap break-words pr-1`,children:e.errorMessage})]}),t[2]=e.errorMessage,t[3]=i),i}function st(e){let t=(0,be.c)(81),{dataSource:n,organizationId:r,openGitHubRepositories:i}=e,a;t[0]===r?a=t[1]:(a=B(r),t[0]=r,t[1]=a);let o=a.queryKey,[c,l]=(0,Y.useState)(!1),u=(0,Y.useRef)(!1),d,g;t[2]!==n.provider||t[3]!==i?(d=()=>{u.current||i&&n.provider===`github`&&(l(!0),u.current=!0)},g=[n.provider,i],t[2]=n.provider,t[3]=i,t[4]=d,t[5]=g):(d=t[4],g=t[5]),(0,Y.useEffect)(d,g);let _;t[6]!==n.id||t[7]!==r?(_=async()=>se(n.id,r),t[6]=n.id,t[7]=r,t[8]=_):_=t[8];let v;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=[`data-sources`],t[9]=v):v=t[9];let x;t[10]===_?x=t[11]:(x={mutationFn:_,mutationKey:v,onError:lt,onSuccess:ct},t[10]=_,t[11]=x);let S=j(x),C;t[12]!==n.id||t[13]!==r?(C=async()=>oe(n.id,r),t[12]=n.id,t[13]=r,t[14]=C):C=t[14];let w;t[15]!==n.id||t[16]!==o||t[17]!==C?(w={errorMessage:`Failed to delete data source`,itemId:n.id,mutationFn:C,queryKey:o,successMessage:`Data source deleted`},t[15]=n.id,t[16]=o,t[17]=C,t[18]=w):w=t[18];let T=O(w),E;t[19]===n.provider?E=t[20]:(E=_e(n.provider),t[19]=n.provider,t[20]=E);let D=E,ee;t[21]===n.provider?ee=t[22]:(ee=ge(n.provider),t[21]=n.provider,t[22]=ee);let k=ee,A=k?`Test Connection`:`Test Connection (Unsupported)`,M;t[23]===n.name?M=t[24]:(M=(0,X.jsx)(G,{className:`text-lg`,children:n.name}),t[23]=n.name,t[24]=M);let N;t[25]===D?N=t[26]:(N=(0,X.jsx)(D,{className:`h-4.5 w-4.5`}),t[25]=D,t[26]=N);let P;t[27]===n.provider?P=t[28]:(P=ve(n.provider),t[27]=n.provider,t[28]=P);let F;t[29]!==N||t[30]!==P?(F=(0,X.jsxs)(pe,{className:`flex items-center gap-1.5 mt-0.5`,children:[N,P]}),t[29]=N,t[30]=P,t[31]=F):F=t[31];let I;t[32]!==M||t[33]!==F?(I=(0,X.jsxs)(`div`,{children:[M,F]}),t[32]=M,t[33]=F,t[34]=I):I=t[34];let L;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,X.jsx)(f,{children:(0,X.jsx)(s,{variant:`ghost`,size:`icon-sm`,children:(0,X.jsx)(b,{size:16,stroke:2})})}),t[35]=L):L=t[35];let R;t[36]===S?R=t[37]:(R=()=>S.mutate(),t[36]=S,t[37]=R);let te=S.isPending||!k,ne;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,X.jsx)(re,{size:16,stroke:2}),t[38]=ne):ne=t[38];let ie=S.isPending?`Testing...`:A,z;t[39]!==R||t[40]!==te||t[41]!==ie?(z=(0,X.jsxs)(m,{onClick:R,disabled:te,children:[ne,ie]}),t[39]=R,t[40]=te,t[41]=ie,t[42]=z):z=t[42];let ae;t[43]===n.provider?ae=t[44]:(ae=n.provider===`github`?(0,X.jsxs)(m,{onClick:()=>l(!0),children:[(0,X.jsx)(he,{size:16,stroke:`2`}),`Select Repositories`]}):null,t[43]=n.provider,t[44]=ae);let V;t[45]===T?V=t[46]:(V=()=>T.mutate(),t[45]=T,t[46]=V);let ce;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,X.jsx)(y,{size:16,stroke:2}),t[47]=ce):ce=t[47];let H=T.isPending?`Deleting...`:`Delete`,U;t[48]!==T.isPending||t[49]!==V||t[50]!==H?(U=(0,X.jsxs)(m,{onClick:V,disabled:T.isPending,className:`text-destructive focus:text-destructive`,children:[ce,H]}),t[48]=T.isPending,t[49]=V,t[50]=H,t[51]=U):U=t[51];let W;t[52]!==z||t[53]!==ae||t[54]!==U?(W=(0,X.jsxs)(h,{children:[L,(0,X.jsxs)(p,{align:`end`,className:`min-w-40`,children:[z,ae,U]})]}),t[52]=z,t[53]=ae,t[54]=U,t[55]=W):W=t[55];let K;t[56]!==I||t[57]!==W?(K=(0,X.jsxs)(de,{className:`flex flex-row items-start justify-between space-y-0 pb-2`,children:[I,W]}),t[56]=I,t[57]=W,t[58]=K):K=t[58];let q;t[59]===n.status?q=t[60]:(q=at(n.status),t[59]=n.status,t[60]=q);let ye;t[61]!==n.status||t[62]!==q?(ye=(0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,X.jsx)(ue,{variant:q,children:n.status})}),t[61]=n.status,t[62]=q,t[63]=ye):ye=t[63];let J;t[64]===n.lastUsedAt?J=t[65]:(J=n.lastUsedAt&&(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:[`Last used: `,le(n.lastUsedAt)]}),t[64]=n.lastUsedAt,t[65]=J);let Z;t[66]===n.errorMessage?Z=t[67]:(Z=(0,X.jsx)(ot,{errorMessage:n.errorMessage}),t[66]=n.errorMessage,t[67]=Z);let Q;t[68]!==ye||t[69]!==J||t[70]!==Z?(Q=(0,X.jsxs)(fe,{children:[ye,J,Z]}),t[68]=ye,t[69]=J,t[70]=Z,t[71]=Q):Q=t[71];let $;t[72]!==n.id||t[73]!==n.provider||t[74]!==r||t[75]!==c?($=n.provider===`github`?(0,X.jsx)(nt,{organizationId:r,dataSourceId:n.id,open:c,onOpenChange:l}):null,t[72]=n.id,t[73]=n.provider,t[74]=r,t[75]=c,t[76]=$):$=t[76];let xe;return t[77]!==K||t[78]!==Q||t[79]!==$?(xe=(0,X.jsxs)(me,{children:[K,Q,$]}),t[77]=K,t[78]=Q,t[79]=$,t[80]=xe):xe=t[80],xe}function ct(e){if(e.kind===`unsupported`){ie.info(e.message);return}if(e.result.success){ie.success(`Data source test successful`);return}Se({title:`Data source test failed`,description:e.result.error??e.result.message??`Unknown error`})}function lt(e){return Se({title:`Failed to test data source`,description:e.message})}function ut(e){return e}function dt(e){let t=(0,be.c)(18),n;t[0]===e.provider?n=t[1]:(n=_e(e.provider),t[0]=e.provider,t[1]=n);let r=n,i;t[2]===r?i=t[3]:(i=(0,X.jsx)(r,{className:`h-5 w-5 text-muted-foreground shrink-0`}),t[2]=r,t[3]=i);let a;t[4]===e.provider?a=t[5]:(a=ve(e.provider),t[4]=e.provider,t[5]=a);let o;t[6]===a?o=t[7]:(o=(0,X.jsx)(`p`,{className:`font-medium truncate`,children:a}),t[6]=a,t[7]=o);let c;t[8]!==i||t[9]!==o?(c=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[i,o]}),t[8]=i,t[9]=o,t[10]=c):c=t[10];let l;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(s,{variant:`secondary`,size:`sm`,children:`Connect`}),t[11]=l):l=t[11];let u;t[12]!==e.organizationId||t[13]!==e.provider?(u=(0,X.jsx)(Z,{organizationId:e.organizationId,initialProvider:e.provider,children:l}),t[12]=e.organizationId,t[13]=e.provider,t[14]=u):u=t[14];let d;return t[15]!==c||t[16]!==u?(d=(0,X.jsx)(me,{className:`border-dashed`,children:(0,X.jsx)(fe,{className:`p-4`,children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[c,u]})})}),t[15]=c,t[16]=u,t[17]=d):d=t[17],d}function ft(e){let t=(0,be.c)(35),{organizationId:n,openGitHubDataSourceId:r}=e,i;t[0]===n?i=t[1]:(i=B(n),t[0]=n,t[1]=i);let{data:a}=N(i),o,c,l,u,d,f,p,m;if(t[2]!==a||t[3]!==r||t[4]!==n){let e=ut(a),i=new Set(e.map(pt)),h=K.filter(e=>!i.has(e)),g=e.length>0;d=`space-y-8`;let _;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Connected`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Data sources already connected to your workspace.`})]}),t[13]=_):_=t[13];let v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsxs)(s,{children:[(0,X.jsx)(C,{size:16,stroke:2}),`Add Data Source`]}),t[14]=v):v=t[14],t[15]===n?f=t[16]:(f=(0,X.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between`,children:[_,(0,X.jsx)(Z,{organizationId:n,children:v})]}),t[15]=n,t[16]=f),t[17]===g?p=t[18]:(p=g?null:(0,X.jsxs)(`div`,{className:`text-center py-12`,children:[(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`No connected data sources yet.`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Connect one below or add a new data source to get started.`})]}),t[17]=g,t[18]=p),m=g?(0,X.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3`,children:e.map(e=>(0,X.jsx)(st,{dataSource:e,organizationId:n,openGitHubRepositories:r===e.id},e.id))}):null,l=`space-y-4`,t[19]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Not connected`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Available data sources you can connect next.`})]}),t[19]=u):u=t[19],o=`grid gap-4 md:grid-cols-2 lg:grid-cols-3`;let y;t[20]===n?y=t[21]:(y=e=>(0,X.jsx)(dt,{provider:e,organizationId:n},e),t[20]=n,t[21]=y),c=h.map(y),t[2]=a,t[3]=r,t[4]=n,t[5]=o,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m}else o=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12];let h;t[22]!==o||t[23]!==c?(h=(0,X.jsx)(`div`,{className:o,children:c}),t[22]=o,t[23]=c,t[24]=h):h=t[24];let g;t[25]!==h||t[26]!==l||t[27]!==u?(g=(0,X.jsxs)(`div`,{className:l,children:[u,h]}),t[25]=h,t[26]=l,t[27]=u,t[28]=g):g=t[28];let _;return t[29]!==g||t[30]!==d||t[31]!==f||t[32]!==p||t[33]!==m?(_=(0,X.jsxs)(`div`,{className:d,children:[f,p,m,g]}),t[29]=g,t[30]=d,t[31]=f,t[32]=p,t[33]=m,t[34]=_):_=t[34],_}function pt(e){return e.provider}var mt=i(`/_authenticated/$org_slug/integrations`);function ht(){let e=(0,be.c)(4),{organizationId:t}=mt.useRouteContext(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`section`,{children:(0,X.jsxs)(`div`,{className:`mb-6`,children:[(0,X.jsx)(`h1`,{className:`text-3xl font-bold`,children:`Integrations`}),(0,X.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`Manage the data sources connected to your workspace.`})]})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsxs)(`div`,{className:`mb-4`,children:[(0,X.jsx)(`h2`,{className:`text-xl font-semibold`,children:`Data Sources`}),(0,X.jsx)(`p`,{className:`text-muted-foreground text-sm mt-1`,children:`Connect databases, analytics platforms, and other services to provide data for your agents.`})]}),e[1]=r):r=e[1];let i;return e[2]===t?i=e[3]:(i=(0,X.jsxs)(`div`,{className:`p-8 space-y-12`,children:[n,(0,X.jsxs)(`section`,{children:[r,(0,X.jsx)(ft,{organizationId:t})]})]}),e[2]=t,e[3]=i),i}var gt=ht;export{gt as component};
|
|
Binary file
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2
DELETED
|
Binary file
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2
DELETED
|
Binary file
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2
DELETED
|
Binary file
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2
DELETED
|
Binary file
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{t as r}from"./compiler-runtime-DCc3R3Xn.js";import{a as i,o as a}from"./api-base-url-DIb6qukm.js";import{n as o}from"./createReactComponent-_L2mp4Ui.js";import{t as s}from"./IconCheck-Gc24xPT2.js";import{t as c}from"./IconLoader2-B3B6M8nQ.js";import{t as l}from"./IconX-BQkA009b.js";import{t as u}from"./auth-client-DF1BsKzX.js";import{a as d,i as f}from"./app-routes-CnJncMlZ.js";import{D as p,O as m,R as h}from"./index-DefoCtD4.js";import{a as g,i as _,n as v,o as y,r as b,t as x}from"./card-BWqhQk-T.js";import{a as S,i as C,n as w,o as T}from"./xstate-react.esm-U3P0kbzA.js";import{n as E,t as D}from"./dist-TeLLf3Fl.js";var O=r(),k=e(t(),1),A=i(f),j=`Failed to accept invitation`,M=`Failed to navigate. Try again from home.`,N=1500,P={kind:`home`},F={ACCEPT:`inviteAccept/accept`,ACCEPT_FAILED:`inviteAccept/acceptFailed`,ACCEPT_SUCCEEDED:`inviteAccept/acceptSucceeded`,DECLINE:`inviteAccept/decline`,GO_HOME:`inviteAccept/goHome`,NAVIGATION_COMPLETED:`inviteAccept/navigationCompleted`,NAVIGATION_FAILED:`inviteAccept/navigationFailed`,NAVIGATION_STARTED:`inviteAccept/navigationStarted`,REDIRECT_RESOLUTION_FAILED:`inviteAccept/redirectResolutionFailed`,REDIRECT_RESOLVED:`inviteAccept/redirectResolved`},I={ACCEPTING:`accepting`,ERROR:`error`,NAVIGATING:`navigating`,READY:`ready`,REFRESHING_ORGANIZATIONS:`refreshingOrganizations`,SUCCESS_PENDING_REDIRECT:`successPendingRedirect`},L=class extends E(`InviteAcceptRequestError`)(){},R=class extends E(`InviteRedirectResolutionError`)(){};function z(){return{kind:`idle`}}function B(e){return{kind:`accepted`,organizationId:e}}function ee(e){return{kind:`error`,message:e}}function V(){return{navigation:null,nextNavigationId:1,nextRequestId:1,outcome:z(),pendingAcceptRequest:null,pendingRedirectResolution:null,redirectTarget:null}}function H(e){return{...V(),nextNavigationId:e.nextNavigationId,nextRequestId:e.nextRequestId}}function U(e,t){return{...H(e),outcome:ee(t)}}function W(e,t){return{navigation:{id:e.nextNavigationId,phase:`pending`,target:t},nextNavigationId:e.nextNavigationId+1}}function G(e){return e.redirectTarget??P}async function K(e){let t=await D.tryPromise({try:()=>u.acceptInvitation({invitationId:e}),catch:e=>new L({cause:e,message:j,reason:`request_failed`})});if(t.isErr())return D.err(t.error);let n=t.value;return n.error?D.err(new L({message:Y(n.error.message,j),reason:`response_failed`})):D.ok({acceptedOrganizationId:n.data.member.organizationId})}async function q(e){let t=await D.tryPromise({try:()=>e.refetchSession(),catch:t=>new R({acceptedOrganizationId:e.acceptedOrganizationId,cause:t,message:`Failed to refresh organizations after accepting invitation`,reason:`session_refresh_failed`,...e.userId?{userId:e.userId}:{}})});if(t.isErr())return X(t.error),D.err(t.error);let n=await D.tryPromise({try:()=>e.queryClient.fetchQuery({...p(e.userId),staleTime:0}),catch:t=>new R({acceptedOrganizationId:e.acceptedOrganizationId,cause:t,message:`Failed to refresh organizations after accepting invitation`,reason:`organization_list_failed`,...e.userId?{userId:e.userId}:{}})});if(n.isErr())return X(n.error),D.err(n.error);let r=n.value.find(t=>t.id===e.acceptedOrganizationId);if(r)return D.ok({kind:`organization`,organizationSlug:m(r)});let i=await D.tryPromise({try:()=>u.getFullOrganization({query:{organizationId:e.acceptedOrganizationId}}),catch:t=>new R({acceptedOrganizationId:e.acceptedOrganizationId,cause:t,message:`Failed to load accepted organization details`,reason:`organization_lookup_failed`,...e.userId?{userId:e.userId}:{}})});if(i.isErr())return X(i.error),D.err(i.error);if(i.value.data?.slug)return D.ok({kind:`organization`,organizationSlug:i.value.data.slug});let a=new R({acceptedOrganizationId:e.acceptedOrganizationId,message:`Accepted invitation but organization was not found`,reason:`organization_missing`,...e.userId?{userId:e.userId}:{}});return X(a),D.err(a)}function J(e,t){if(!(e instanceof Error))return t;let n=e.message.trim();return n.length===0?t:n}function Y(e,t){let n=e?.trim()??``;return n.length>0?n:t}function X(e){if(e.reason===`organization_missing`){console.error(`[invite] accepted invitation but organization was not found`,{acceptedOrganizationId:e.acceptedOrganizationId,userId:e.userId});return}console.error(`[invite] accepted invitation but failed to refresh orgs`,{acceptedOrganizationId:e.acceptedOrganizationId,error:e.cause??e.message,reason:e.reason,userId:e.userId})}function Z(e={}){let t=e.successRedirectDelayMs??N;return S({actions:{markNavigationRunning:T(({context:e,event:t})=>(C(t,F.NAVIGATION_STARTED),e.navigation?.id===t.id?{navigation:{...e.navigation,phase:`running`}}:{})),queueHomeNavigation:T(({context:e})=>W(e,P)),queueResolvedNavigation:T(({context:e})=>W(e,G(e))),resetFlow:T(({context:e,event:t})=>(C(t,F.NAVIGATION_COMPLETED),e.navigation?.id===t.id?H(e):{})),stageAcceptRequest:T(({context:e})=>({nextRequestId:e.nextRequestId+1,outcome:z(),pendingAcceptRequest:{requestId:e.nextRequestId},redirectTarget:null})),stageRedirectResolution:T(({context:e,event:t})=>(C(t,F.ACCEPT_SUCCEEDED),e.pendingAcceptRequest?.requestId===t.requestId?{nextRequestId:e.nextRequestId+1,pendingAcceptRequest:null,pendingRedirectResolution:{acceptedOrganizationId:t.acceptedOrganizationId,requestId:e.nextRequestId}}:{})),storeAcceptError:T(({context:e,event:t})=>(C(t,F.ACCEPT_FAILED),e.pendingAcceptRequest?.requestId===t.requestId?U(e,t.message):{})),storeAcceptedOrganizationId:T(({context:e,event:t})=>(C(t,F.ACCEPT_SUCCEEDED),e.pendingAcceptRequest?.requestId===t.requestId?{outcome:B(t.acceptedOrganizationId),redirectTarget:null}:{})),storeHomeRedirectTarget:T(({context:e,event:t})=>(C(t,F.REDIRECT_RESOLUTION_FAILED),e.pendingRedirectResolution?.requestId===t.requestId?{pendingRedirectResolution:null,redirectTarget:P}:{})),storeNavigationError:T(({context:e,event:t})=>(C(t,F.NAVIGATION_FAILED),e.navigation?.id===t.id?U(e,t.message):{})),storeResolvedRedirectTarget:T(({context:e,event:t})=>(C(t,F.REDIRECT_RESOLVED),e.pendingRedirectResolution?.requestId===t.requestId?{pendingRedirectResolution:null,redirectTarget:t.redirectTarget}:{}))},guards:{matchesPendingAcceptRequest:({context:e,event:t})=>t.type!==F.ACCEPT_FAILED&&t.type!==F.ACCEPT_SUCCEEDED?!1:e.pendingAcceptRequest?.requestId===t.requestId,matchesPendingRedirectResolution:({context:e,event:t})=>t.type!==F.REDIRECT_RESOLUTION_FAILED&&t.type!==F.REDIRECT_RESOLVED?!1:e.pendingRedirectResolution?.requestId===t.requestId},types:{}}).createMachine({context:V(),id:`inviteAccept`,initial:I.READY,states:{[I.READY]:{on:{[F.ACCEPT]:{actions:`stageAcceptRequest`,target:I.ACCEPTING},[F.DECLINE]:{actions:`queueHomeNavigation`,target:I.NAVIGATING}}},[I.ACCEPTING]:{on:{[F.ACCEPT_SUCCEEDED]:{actions:[`storeAcceptedOrganizationId`,`stageRedirectResolution`],guard:`matchesPendingAcceptRequest`,target:I.REFRESHING_ORGANIZATIONS},[F.ACCEPT_FAILED]:{actions:`storeAcceptError`,guard:`matchesPendingAcceptRequest`,target:I.ERROR}}},[I.REFRESHING_ORGANIZATIONS]:{on:{[F.REDIRECT_RESOLVED]:{actions:`storeResolvedRedirectTarget`,guard:`matchesPendingRedirectResolution`,target:I.SUCCESS_PENDING_REDIRECT},[F.REDIRECT_RESOLUTION_FAILED]:{actions:`storeHomeRedirectTarget`,guard:`matchesPendingRedirectResolution`,target:I.SUCCESS_PENDING_REDIRECT}}},[I.SUCCESS_PENDING_REDIRECT]:{after:{[t]:{actions:`queueResolvedNavigation`,target:I.NAVIGATING}}},[I.NAVIGATING]:{on:{[F.NAVIGATION_COMPLETED]:{actions:`resetFlow`,target:I.READY},[F.NAVIGATION_FAILED]:{actions:`storeNavigationError`,target:I.ERROR},[F.NAVIGATION_STARTED]:{actions:`markNavigationRunning`}}},[I.ERROR]:{on:{[F.GO_HOME]:{actions:`queueHomeNavigation`,target:I.NAVIGATING}}}}})}var Q=Z();function te(e){return e.matches(I.ACCEPTING)?`accepting`:e.matches(I.ERROR)||e.matches(I.NAVIGATING)&&e.context.outcome.kind===`error`?`error`:e.matches(I.REFRESHING_ORGANIZATIONS)||e.matches(I.SUCCESS_PENDING_REDIRECT)||e.matches(I.NAVIGATING)&&e.context.outcome.kind===`accepted`?`success`:`ready`}function ne(e){return e.context.outcome.kind===`error`?e.context.outcome.message:null}function re(e){return J(e,M)}function ie(){let e=(0,O.c)(42),t=a(),n=h(),{invitationId:r}=A.useParams(),{auth:i,refetchSession:o}=A.useRouteContext(),s=i.session?.user.id,c;e[0]===r?c=e[1]:(c=()=>K(r),e[0]=r,e[1]=c);let l=c,u;e[2]!==n||e[3]!==o||e[4]!==s?(u=e=>q({acceptedOrganizationId:e,queryClient:n,refetchSession:o,userId:s}),e[2]=n,e[3]=o,e[4]=s,e[5]=u):u=e[5];let f=u,[p,m]=w(Q),g=p.context.navigation,_=p.context.pendingAcceptRequest,v=p.context.pendingRedirectResolution,y;e[6]===p?y=e[7]:(y=p.matches(I.ACCEPTING),e[6]=p,e[7]=y);let b=y,x;e[8]===p?x=e[9]:(x=p.matches(I.REFRESHING_ORGANIZATIONS),e[8]=p,e[9]=x);let S=x,C,T;e[10]!==l||e[11]!==b||e[12]!==_||e[13]!==m?(C=()=>{if(!b||_===null)return;let e=!1;return l().then(t=>{if(!e){if(t.isErr()){m({message:t.error.message,requestId:_.requestId,type:F.ACCEPT_FAILED});return}m({acceptedOrganizationId:t.value.acceptedOrganizationId,requestId:_.requestId,type:F.ACCEPT_SUCCEEDED})}}),()=>{e=!0}},T=[l,b,_,m],e[10]=l,e[11]=b,e[12]=_,e[13]=m,e[14]=C,e[15]=T):(C=e[14],T=e[15]),(0,k.useEffect)(C,T);let E,D;e[16]!==S||e[17]!==v||e[18]!==f||e[19]!==m?(E=()=>{if(!S||v===null)return;let e=!1;return f(v.acceptedOrganizationId).then(t=>{if(!e){if(t.isErr()){m({requestId:v.requestId,type:F.REDIRECT_RESOLUTION_FAILED});return}m({redirectTarget:t.value,requestId:v.requestId,type:F.REDIRECT_RESOLVED})}}),()=>{e=!0}},D=[S,v,f,m],e[16]=S,e[17]=v,e[18]=f,e[19]=m,e[20]=E,e[21]=D):(E=e[20],D=e[21]),(0,k.useEffect)(E,D);let j,M;e[22]!==t||e[23]!==g||e[24]!==m?(j=()=>{g===null||g.phase!==`pending`||(m({id:g.id,type:F.NAVIGATION_STARTED}),(g.target.kind===`home`?t({to:`/`}):t({params:{org_slug:g.target.organizationSlug},to:d})).then(()=>{m({id:g.id,type:F.NAVIGATION_COMPLETED})}).catch(e=>{console.error(`[invite] failed to navigate after accepting invitation`,{error:e,navigation:g}),m({id:g.id,message:re(e),type:F.NAVIGATION_FAILED})}))},M=[t,g,m],e[22]=t,e[23]=g,e[24]=m,e[25]=j,e[26]=M):(j=e[25],M=e[26]),(0,k.useEffect)(j,M);let N,P;e[27]===m?(N=e[28],P=e[29]):(N=()=>{m({type:F.ACCEPT})},P=()=>{m({type:F.DECLINE})},e[27]=m,e[28]=N,e[29]=P);let L;e[30]===p?L=e[31]:(L=ne(p),e[30]=p,e[31]=L);let R;e[32]===m?R=e[33]:(R=()=>{m({type:F.GO_HOME})},e[32]=m,e[33]=R);let z;e[34]===p?z=e[35]:(z=te(p),e[34]=p,e[35]=z);let B;return e[36]!==N||e[37]!==P||e[38]!==L||e[39]!==R||e[40]!==z?(B={accept:N,decline:P,errorMessage:L,goHome:R,status:z},e[36]=N,e[37]=P,e[38]=L,e[39]=R,e[40]=z,e[41]=B):B=e[41],B}var $=n();function ae(){let e=(0,O.c)(28),{accept:t,decline:n,errorMessage:r,goHome:i,status:a}=ie(),u;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsxs)(g,{className:`text-center`,children:[(0,$.jsx)(y,{className:`text-2xl`,children:`Organization Invitation`}),(0,$.jsx)(b,{children:`You've been invited to join an organization`})]}),e[0]=u):u=e[0];let d;e[1]===a?d=e[2]:(d=a===`ready`&&(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center`,children:[(0,$.jsx)(`div`,{className:`rounded-full bg-primary/10 p-4`,children:(0,$.jsx)(s,{size:48,className:`text-primary`})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`font-medium`,children:`Ready to join`}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Click the button below to accept the invitation and join the organization.`})]})]}),e[1]=a,e[2]=d);let f;e[3]===a?f=e[4]:(f=a===`accepting`&&(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,$.jsx)(c,{size:48,className:`animate-spin text-primary`}),(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`Accepting invitation...`})]}),e[3]=a,e[4]=f);let p;e[5]===a?p=e[6]:(p=a===`success`&&(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center`,children:[(0,$.jsx)(`div`,{className:`rounded-full bg-green-500/10 p-4`,children:(0,$.jsx)(s,{size:48,className:`text-green-500`})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`font-medium text-green-600`,children:`Successfully joined!`}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Redirecting to your dashboard...`})]})]}),e[5]=a,e[6]=p);let m;e[7]!==r||e[8]!==a?(m=a===`error`&&(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-4 text-center`,children:[(0,$.jsx)(`div`,{className:`rounded-full bg-destructive/10 p-4`,children:(0,$.jsx)(l,{size:48,className:`text-destructive`})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{className:`font-medium text-destructive`,children:`Failed to accept invitation`}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:r||`The invitation may have expired or already been used.`})]})]}),e[7]=r,e[8]=a,e[9]=m):m=e[9];let h;e[10]!==d||e[11]!==f||e[12]!==p||e[13]!==m?(h=(0,$.jsxs)(v,{className:`flex justify-center py-8`,children:[d,f,p,m]}),e[10]=d,e[11]=f,e[12]=p,e[13]=m,e[14]=h):h=e[14];let S;e[15]!==t||e[16]!==n||e[17]!==a?(S=a===`ready`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(o,{variant:`outline`,onClick:n,children:`Decline`}),(0,$.jsx)(o,{onClick:t,children:`Accept Invitation`})]}),e[15]=t,e[16]=n,e[17]=a,e[18]=S):S=e[18];let C;e[19]!==i||e[20]!==a?(C=a===`error`&&(0,$.jsx)(o,{variant:`outline`,onClick:i,children:`Go to Home`}),e[19]=i,e[20]=a,e[21]=C):C=e[21];let w;e[22]!==S||e[23]!==C?(w=(0,$.jsxs)(_,{className:`flex justify-center gap-4`,children:[S,C]}),e[22]=S,e[23]=C,e[24]=w):w=e[24];let T;return e[25]!==h||e[26]!==w?(T=(0,$.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-4`,children:(0,$.jsxs)(x,{className:`w-full max-w-md`,children:[u,h,w]})}),e[25]=h,e[26]=w,e[27]=T):T=e[27],T}var oe=ae;export{oe as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.3`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=o(((e,t)=>{t.exports=d()}));export{c as i,u as n,o as r,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./jsx-runtime-DG_AJzB_.js";import{t as n}from"./compiler-runtime-DCc3R3Xn.js";import{t as r}from"./utils-C8DGLIgm.js";var i=n();e();var a=t();function o(e){let t=(0,i.c)(8),n,o;t[0]===e?(n=t[1],o=t[2]):({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o);let s;t[3]===n?s=t[4]:(s=r(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,n),t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`label`,{"data-slot":`label`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./jsx-runtime-DG_AJzB_.js";import{E as i,O as a,c as o,d as s,k as c,n as l,t as u}from"./useRouterState-DpT8luFk.js";var d=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.3`})),f=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),ee=`Error preloading route! ☝️`,p=e(t(),1),m=p.use,h=typeof window<`u`?p.useLayoutEffect:p.useEffect;function g(e){let t=p.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function _(e,t,n={},r={}){p.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function v(e){let t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}r();var y=e(f(),1);function b(e,t){let n=l(),[r,d]=p.useState(!1),f=p.useRef(!1),m=v(t),{activeProps:h,inactiveProps:g,activeOptions:b,to:w,preload:se,preloadDelay:ce,hashScrollIntoView:le,replace:T,startTransition:E,resetScroll:ue,viewTransition:de,children:D,target:O,disabled:k,style:A,className:j,onClick:M,onFocus:N,onMouseEnter:P,onMouseLeave:F,onTouchStart:I,ignoreBlocker:L,params:fe,search:pe,hash:me,state:he,mask:ge,reloadDocument:_e,unsafeRelative:ve,from:ye,_fromLocation:be,...R}=e,z=u({select:e=>e.location.search,structuralSharing:!0}),B=e.from,V=p.useMemo(()=>({...e,from:B}),[n,z,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),H=p.useMemo(()=>n.buildLocation({...V}),[n,V]),U=p.useMemo(()=>{if(k)return;let e=H.maskedLocation?H.maskedLocation.url.href:H.url.href,t=!1;return n.origin&&(e.startsWith(n.origin)?e=n.history.createHref(e.replace(n.origin,``))||`/`:t=!0),{href:e,external:t}},[k,H.maskedLocation,H.url,n.origin,n.history]),W=p.useMemo(()=>{if(U?.external)return c(U.href)?void 0:U.href;try{return new URL(w),c(w)?void 0:w}catch{}},[w,U]),G=e.reloadDocument||W?!1:se??n.options.defaultPreload,K=ce??n.options.defaultPreloadDelay??0,q=u({select:e=>{if(W)return!1;if(b?.exact){if(!o(e.location.pathname,H.pathname,n.basepath))return!1}else{let t=s(e.location.pathname,n.basepath),r=s(H.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(b?.includeSearch??!0)&&!i(e.location.search,H.search,{partial:!b?.exact,ignoreUndefined:!b?.explicitUndefined})?!1:b?.includeHash?e.location.hash===H.hash:!0}}),J=p.useCallback(()=>{n.preloadRoute({...V}).catch(e=>{console.warn(e),console.warn(ee)})},[n,V]);_(m,p.useCallback(e=>{e?.isIntersecting&&J()},[J]),ae,{disabled:!!k||G!==`viewport`}),p.useEffect(()=>{f.current||!k&&G===`render`&&(J(),f.current=!0)},[k,J,G]);let xe=e=>{let t=e.currentTarget.getAttribute(`target`),r=O===void 0?t:O;if(!k&&!oe(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,y.flushSync)(()=>{d(!0)});let t=n.subscribe(`onResolved`,()=>{t(),d(!1)});n.navigate({...V,replace:T,resetScroll:ue,hashScrollIntoView:le,startTransition:E,viewTransition:de,ignoreBlocker:L})}};if(W)return{...R,ref:m,href:W,...D&&{children:D},...O&&{target:O},...k&&{disabled:k},...A&&{style:A},...j&&{className:j},...M&&{onClick:M},...N&&{onFocus:N},...P&&{onMouseEnter:P},...F&&{onMouseLeave:F},...I&&{onTouchStart:I}};let Y=e=>{k||G&&J()},Se=Y,Ce=e=>{if(!(k||!G))if(!K)J();else{let t=e.target;if(S.has(t))return;let n=setTimeout(()=>{S.delete(t),J()},K);S.set(t,n)}},we=e=>{if(k||!G||!K)return;let t=e.target,n=S.get(t);n&&(clearTimeout(n),S.delete(t))},X=q?a(h,{})??te:x,Z=q?x:a(g,{})??x,Q=[j,X.className,Z.className].filter(Boolean).join(` `),$=(A||X.style||Z.style)&&{...A,...X.style,...Z.style};return{...R,...X,...Z,href:U?.href,ref:m,onClick:C([M,xe]),onFocus:C([N,Y]),onMouseEnter:C([P,Ce]),onMouseLeave:C([F,we]),onTouchStart:C([I,Se]),disabled:!!k,target:O,...$&&{style:$},...Q&&{className:Q},...k&&ne,...q&&re,...r&&ie}}var x={},te={className:`active`},ne={role:`link`,"aria-disabled":!0},re={"data-status":`active`,"aria-current":`page`},ie={"data-transitioning":`transitioning`},S=new WeakMap,ae={rootMargin:`100px`},C=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}},w=p.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,ref:a,...o}=b(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;return n===void 0&&delete o.disabled,p.createElement(n||`a`,{...o,ref:a},s)});function oe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{f as a,g as i,m as n,h as r,w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t}from"./jsx-runtime-DG_AJzB_.js";import{C as n,k as r}from"./useRouterState-DpT8luFk.js";function i(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function a(e){return!!e?.isNotFound}var o=`__root__`;function s(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href==`string`&&r(e.href))throw Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${n.join(`, `)} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let i=new Response(null,{status:e.statusCode,headers:t});if(i.options=e,e.throw)throw i;return i}function c(e){return e instanceof Response&&!!e.options}var l=e(t(),1),u=l.createContext(void 0),d=l.createContext(void 0);export{o as a,s as i,u as n,a as o,c as r,i as s,d as t};
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/organization-permissions-BQQ5PJbI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=[`owner`,`admin`,`member`],t=`,`,n=new Set([`owner`,`admin`]),r={invitationCancel:n,invitationCreate:n,memberDelete:n,memberUpdate:n,organizationUpdate:n},i=new Set(e);function a(e){return i.has(e)}function o(e){let n=Array.isArray(e)?e:typeof e==`string`?e.split(t):[],r=[],i=new Set;for(let e of n){let t=e.trim();!a(t)||i.has(t)||(i.add(t),r.push(t))}return r}function s(n){let r=new Set(o(n));return e.filter(e=>r.has(e)).join(t)}function c(e){let t=r[e.permission];return o(e.rawRole).some(e=>t.has(e))}function l(e){return o(e.rawRole).includes(e.roleName)}function u(e){return c({permission:`organizationUpdate`,rawRole:e.rawRole})}export{s as a,o as i,c as n,l as r,u as t};
|
package/vendor/aarch64-pc-windows-msvc/runtime/web/assets/organization-query-keys-DwLucsD_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return e??`anonymous`}var t={all:t=>[`organization`,e(t)],audit:(e,n,r)=>[...t.all(e),`audit`,n,r],bySlug:(e,n)=>[...t.all(e),`bySlug`,n],list:e=>[...t.all(e),`list`],pendingInvitations:e=>[...t.all(e),`pendingInvitations`]};export{e as n,t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=1e3,t=e*60,n=t*60,r=e*30,i=t,a=t*5,o=t*5,s=n*24;export{r as a,s as i,a as n,o as r,i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return e}export{e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},n=new class{#e=t;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function r(e){setTimeout(e,0)}var i=typeof window>`u`||`Deno`in globalThis;function a(){}function o(e,t){return typeof e==`function`?e(t):e}function s(e){return typeof e==`number`&&e>=0&&e!==1/0}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return typeof e==`function`?e(t):e}function u(e,t){return typeof e==`function`?e(t):e}function d(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==p(o,t.options))return!1}else if(!h(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function f(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(m(t.options.mutationKey)!==m(a))return!1}else if(!h(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function p(e,t){return(t?.queryKeyHashFn||m)(e)}function m(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function h(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>h(e[n],t[n])):!1}var g=Object.prototype.hasOwnProperty;function _(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=y(e)&&y(t);if(!r&&!(b(e)&&b(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:g.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=_(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!x(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!x(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function x(e){return Object.prototype.toString.call(e)===`[object Object]`}function S(e){return new Promise(t=>{n.setTimeout(t,e)})}function C(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:_(e,t)}function w(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function T(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var E=Symbol();function D(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===E?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function O(e,t){return typeof e==`function`?e(...t):!!e}function k(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var A=new class extends e{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!i&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function j(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var M=r;function N(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=M,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=N(),F=new class extends e{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!i&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function I(e){return Math.min(1e3*2**e,3e4)}function L(e){return(e??`online`)===`online`?F.isOnline():!0}var R=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function z(e){let t=!1,n=0,r,a=j(),o=()=>a.status!==`pending`,s=t=>{if(!o()){let n=new R(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>A.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),d=()=>L(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),a.resolve(e))},p=e=>{o()||(r?.(),a.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,a=n===0?e.initialPromise:void 0;try{r=a??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let a=e.retry??(i?0:3),s=e.retryDelay??I,c=typeof s==`function`?s(n,r):s,l=a===!0||typeof a==`number`&&n<a||typeof a==`function`&&a(n,r);if(t||!l){p(r);return}n++,e.onFail?.(n,r),S(c).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r?.(),a),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),a)}}var B=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),s(this.gcTime)&&(this.#e=n.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(n.clearTimeout(this.#e),void 0)}};export{e as A,u as C,E as D,O as E,c as O,C as S,v as T,s as _,F as a,a as b,A as c,T as d,D as f,i as g,p as h,z as i,n as k,k as l,m,R as n,P as o,o as p,L as r,j as s,B as t,w as u,f as v,l as w,h as x,d as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DG_AJzB_.js";import{t}from"./link-Cgvqhh5w.js";import{t as n}from"./compiler-runtime-DCc3R3Xn.js";import{r,t as i}from"./createReactComponent-_L2mp4Ui.js";import{t as a}from"./utils-C8DGLIgm.js";import{t as o}from"./theme-toggle-DrtO5ON3.js";import{o as s}from"./app-routes-CnJncMlZ.js";import{G as c}from"./index-DefoCtD4.js";var l=i(`outline`,`git-compare`,`GitCompare`,[[`path`,{d:`M4 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M11 6h5a2 2 0 0 1 2 2v8`,key:`svg-2`}],[`path`,{d:`M14 9l-3 -3l3 -3`,key:`svg-3`}],[`path`,{d:`M13 18h-5a2 2 0 0 1 -2 -2v-8`,key:`svg-4`}],[`path`,{d:`M10 15l3 3l-3 3`,key:`svg-5`}]]),u=i(`outline`,`robot`,`Robot`,[[`path`,{d:`M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4`,key:`svg-0`}],[`path`,{d:`M12 2v2`,key:`svg-1`}],[`path`,{d:`M9 12v9`,key:`svg-2`}],[`path`,{d:`M15 12v9`,key:`svg-3`}],[`path`,{d:`M5 16l4 -2`,key:`svg-4`}],[`path`,{d:`M15 14l4 2`,key:`svg-5`}],[`path`,{d:`M9 18h6`,key:`svg-6`}],[`path`,{d:`M10 8v.01`,key:`svg-7`}],[`path`,{d:`M14 8v.01`,key:`svg-8`}]]),d=n(),f=e();function p(){let e=(0,d.c)(3),n,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight sm:text-3xl`,children:`Get started in minutes`}),i=(0,f.jsx)(`p`,{className:`mt-4 max-w-lg text-sm leading-6 text-muted-foreground sm:text-base`,children:`Self-host for free with a single command, or try the managed cloud version.`}),e[0]=n,e[1]=i):(n=e[0],i=e[1]);let o;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,f.jsx)(`section`,{className:`border-t border-border`,children:(0,f.jsx)(`div`,{className:`mx-auto max-w-6xl px-4 py-14 sm:px-6 sm:py-20`,children:(0,f.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[n,i,(0,f.jsx)(t,{to:s,className:a(r({size:`lg`}),`mt-7 px-8 sm:mt-8`),children:`Start Free`})]})})}),e[2]=o):o=e[2],o}var m=[{description:`Connect databases, analytics tools, and connectors without stitching together a custom control plane.`,icon:u,title:`Unified Access`},{description:`Run consistent workflows across databases, analytics, GitHub, and more from the same workspace.`,icon:l,title:`Cross-Source Coverage`},{description:`Manage data source connectivity, budgets, and team access from a single operational surface.`,icon:c,title:`Operational Control`}];function h(){let e=(0,d.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsxs)(`div`,{className:`text-center`,children:[(0,f.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight sm:text-3xl`,children:`One workspace for connected data`}),(0,f.jsx)(`p`,{className:`mx-auto mt-4 max-w-2xl text-sm leading-6 text-muted-foreground sm:text-base`,children:`Replace scattered setup steps with a single, consistent control plane.`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsx)(`section`,{className:`border-t border-border`,children:(0,f.jsxs)(`div`,{className:`mx-auto max-w-6xl px-4 py-14 sm:px-6 sm:py-20`,children:[t,(0,f.jsx)(`div`,{className:`mt-10 grid gap-5 sm:mt-16 sm:gap-8 md:grid-cols-3`,children:m.map(g)})]})}),e[1]=n):n=e[1],n}function g(e){return(0,f.jsxs)(`div`,{className:`flex flex-col rounded-lg border border-border p-5 sm:p-6`,children:[(0,f.jsx)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-md bg-muted`,children:(0,f.jsx)(e.icon,{size:20,stroke:1.5,className:`size-5`})}),(0,f.jsx)(`h3`,{className:`mt-4 text-base font-semibold`,children:e.title}),(0,f.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-muted-foreground`,children:e.description})]},e.title)}function _(){let e=(0,d.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(`footer`,{className:`border-t border-border`,children:(0,f.jsx)(`div`,{className:`mx-auto flex max-w-6xl items-center justify-center px-6 py-8`,children:(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded bg-foreground text-background text-xs font-bold`,children:`V`}),(0,f.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`OneQuery - Autonomous Data Workspace`})]})})}),e[0]=t):t=e[0],t}function v(){let e=(0,d.c)(3),n,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsx)(`h1`,{className:`max-w-4xl text-3xl font-bold leading-tight tracking-tight sm:text-5xl md:text-6xl`,children:`Your autonomous data workspace`}),i=(0,f.jsx)(`p`,{className:`mt-5 max-w-2xl text-base leading-7 text-muted-foreground sm:mt-6 sm:text-lg md:text-xl`,children:`Connect your data sources, query them from one place, and keep your team aligned on the systems that matter. OneQuery gives you a clean control plane for operating your data access.`}),e[0]=n,e[1]=i):(n=e[0],i=e[1]);let o;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,f.jsx)(`section`,{className:`mx-auto max-w-6xl px-4 py-14 sm:px-6 sm:py-20 md:py-28`,children:(0,f.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[n,i,(0,f.jsx)(t,{to:s,className:a(r({size:`lg`}),`mt-8 px-8 sm:mt-10`),children:`Get Started`})]})}),e[2]=o):o=e[2],o}var y=[`PostgreSQL`,`MySQL`,`BigQuery`,`Google Analytics`,`Amplitude`,`Mixpanel`,`PostHog`,`GitHub`,`Linear`];function b(){let e=(0,d.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsxs)(`div`,{className:`text-center`,children:[(0,f.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight sm:text-3xl`,children:`Connect your stack`}),(0,f.jsx)(`p`,{className:`mx-auto mt-4 max-w-xl text-sm leading-6 text-muted-foreground sm:text-base`,children:`OneQuery integrates with the tools you already use.`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsx)(`section`,{className:`border-t border-border`,children:(0,f.jsxs)(`div`,{className:`mx-auto max-w-6xl px-4 py-14 sm:px-6 sm:py-20`,children:[t,(0,f.jsx)(`div`,{className:`mt-10 flex flex-wrap items-center justify-center gap-x-6 gap-y-4 sm:mt-12 sm:gap-x-8`,children:y.map(x)})]})}),e[1]=n):n=e[1],n}function x(e){return(0,f.jsx)(`div`,{className:`text-sm font-medium text-muted-foreground`,children:e},e)}function S(){let e=(0,d.c)(4),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsxs)(t,{to:`/`,className:`flex items-center gap-2`,children:[(0,f.jsx)(`img`,{src:`/onequery.svg`,alt:`OneQuery`,className:`h-8 w-8`}),(0,f.jsx)(`span`,{className:`font-semibold text-base sm:text-lg`,children:`OneQuery`})]}),e[0]=n):n=e[0];let i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,f.jsx)(o,{}),e[1]=i):i=e[1];let c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,f.jsx)(t,{to:s,className:a(r({size:`sm`,variant:`ghost`}),`hidden sm:inline-flex`),children:`Sign in`}),e[2]=c):c=e[2];let l;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,f.jsx)(`header`,{className:`sticky top-0 z-50 w-full border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:(0,f.jsxs)(`div`,{className:`mx-auto flex h-14 max-w-6xl items-center justify-between px-4 sm:px-6`,children:[n,(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i,c,(0,f.jsx)(t,{to:s,className:r({size:`sm`,variant:`default`}),children:`Get Started`})]})]})}),e[3]=l):l=e[3],l}function C(){let e=(0,d.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(S,{}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,f.jsxs)(`div`,{className:`flex h-screen flex-col overflow-y-auto`,children:[t,(0,f.jsxs)(`main`,{className:`flex-1`,children:[(0,f.jsx)(v,{}),(0,f.jsx)(h,{}),(0,f.jsx)(b,{}),(0,f.jsx)(p,{})]}),(0,f.jsx)(_,{})]}),e[1]=n):n=e[1],n}var w=C;export{w as component};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Object.freeze({status:`aborted`});function e(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var t=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},n=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},r={};function i(e){return e&&Object.assign(r,e),r}function a(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function o(e,t){return typeof t==`bigint`?t.toString():t}function s(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function c(e){return e==null}function l(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function u(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var d=Symbol(`evaluating`);function f(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==d)return r===void 0&&(r=d,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function p(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function m(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ee(e){return JSON.stringify(e)}function te(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ne=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function h(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var re=s(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function g(e){if(h(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(h(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ie(e){return g(e)?{...e}:Array.isArray(e)?[...e]:e}var ae=new Set([`string`,`number`,`symbol`]);function _(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function v(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function y(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function oe(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var se={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return v(e,m(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return p(this,`shape`,e),e},checks:[]}))}function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return v(e,m(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return p(this,`shape`,r),r},checks:[]}))}function ue(e,t){if(!g(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return v(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p(this,`shape`,n),n}}))}function de(e,t){if(!g(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return v(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p(this,`shape`,n),n}}))}function fe(e,t){return v(e,m(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return p(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function pe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return v(t,m(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return p(this,`shape`,i),i},checks:[]}))}function me(e,t,n){return v(t,m(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return p(this,`shape`,i),i}}))}function b(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function he(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function x(e){return typeof e==`string`?e:e?.message}function S(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=x(e.inst?._zod.def?.error?.(e))??x(t?.error?.(e))??x(n.customError?.(e))??x(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function C(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function w(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var ge=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,o,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},T=e(`$ZodError`,ge),E=e(`$ZodError`,ge,{Parent:Error});function _e(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ve(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var D=e=>(n,r,a,o)=>{let s=a?Object.assign(a,{async:!1}):{async:!1},c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new t;if(c.issues.length){let t=new(o?.Err??e)(c.issues.map(e=>S(e,s,i())));throw ne(t,o?.callee),t}return c.value},ye=D(E),O=e=>async(t,n,r,a)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new(a?.Err??e)(s.issues.map(e=>S(e,o,i())));throw ne(t,a?.callee),t}return s.value},be=O(E),k=e=>(n,r,a)=>{let o=a?{...a,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new t;return s.issues.length?{success:!1,error:new(e??T)(s.issues.map(e=>S(e,o,i())))}:{success:!0,data:s.value}},xe=k(E),A=e=>async(t,n,r)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>S(e,a,i())))}:{success:!0,data:o.value}},Se=A(E),Ce=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return D(e)(t,n,i)},we=e=>(t,n,r)=>D(e)(t,n,r),Te=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return O(e)(t,n,i)},Ee=e=>async(t,n,r)=>O(e)(t,n,r),De=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return k(e)(t,n,i)},Oe=e=>(t,n,r)=>k(e)(t,n,r),ke=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return A(e)(t,n,i)},Ae=e=>async(t,n,r)=>A(e)(t,n,r),je=/^[cC][^\s-]{8,}$/,Me=/^[0-9a-z]+$/,Ne=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pe=/^[0-9a-vA-V]{20}$/,Fe=/^[A-Za-z0-9]{27}$/,Ie=/^[a-zA-Z0-9_-]{21}$/,Le=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Re=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ze=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Be=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ve=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function He(){return new RegExp(Ve,`u`)}var Ue=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,We=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ke=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Je=/^[A-Za-z0-9_-]*$/,Ye=/^\+[1-9]\d{6,14}$/,Xe=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Ze=RegExp(`^${Xe}$`);function Qe(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $e(e){return RegExp(`^${Qe(e)}$`)}function et(e){let t=Qe({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Xe}T(?:${r})$`)}var tt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},nt=/^-?\d+$/,rt=/^-?\d+(?:\.\d+)?$/,it=/^(?:true|false)$/i,at=/^[^A-Z]*$/,ot=/^[^a-z]*$/,j=e(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),st={number:`number`,bigint:`bigint`,object:`date`},ct=e(`$ZodCheckLessThan`,(e,t)=>{j.init(e,t);let n=st[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lt=e(`$ZodCheckGreaterThan`,(e,t)=>{j.init(e,t);let n=st[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ut=e(`$ZodCheckMultipleOf`,(e,t)=>{j.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):u(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dt=e(`$ZodCheckNumberFormat`,(e,t)=>{j.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=se[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=nt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ft=e(`$ZodCheckMaxLength`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!c(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=C(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pt=e(`$ZodCheckMinLength`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!c(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=C(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mt=e(`$ZodCheckLengthEquals`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!c(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=C(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),M=e(`$ZodCheckStringFormat`,(e,t)=>{var n,r;j.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ht=e(`$ZodCheckRegex`,(e,t)=>{M.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gt=e(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=at,M.init(e,t)}),_t=e(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ot,M.init(e,t)}),vt=e(`$ZodCheckIncludes`,(e,t)=>{j.init(e,t);let n=_(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),yt=e(`$ZodCheckStartsWith`,(e,t)=>{j.init(e,t);let n=RegExp(`^${_(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),bt=e(`$ZodCheckEndsWith`,(e,t)=>{j.init(e,t);let n=RegExp(`.*${_(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),xt=e(`$ZodCheckOverwrite`,(e,t)=>{j.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),St=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}},Ct={major:4,minor:3,patch:5},N=e(`$ZodType`,(e,n)=>{var r;e??={},e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=Ct;let i=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&i.unshift(e);for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(e,n,r)=>{let i=b(e),a;for(let o of n){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(i)continue;let n=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&r?.async===!1)throw new t;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,e.issues.length!==n&&(i||=b(e,n))});else{if(e.issues.length===n)continue;i||=b(e,n)}}return a?a.then(()=>e):e},r=(r,a,o)=>{if(b(r))return r.aborted=!0,r;let s=n(a,i,o);if(s instanceof Promise){if(o.async===!1)throw new t;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction===`backward`){let t=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,a,o)):r(t,a,o)}let s=e._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new t;return s.then(e=>n(e,i,o))}return n(s,i,o)}}f(e,`~standard`,()=>({validate:t=>{try{let n=xe(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Se(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),P=e(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??tt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=e(`$ZodStringFormat`,(e,t)=>{M.init(e,t),P.init(e,t)}),wt=e(`$ZodGUID`,(e,t)=>{t.pattern??=Re,F.init(e,t)}),Tt=e(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ze(e)}else t.pattern??=ze();F.init(e,t)}),Et=e(`$ZodEmail`,(e,t)=>{t.pattern??=Be,F.init(e,t)}),Dt=e(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Ot=e(`$ZodEmoji`,(e,t)=>{t.pattern??=He(),F.init(e,t)}),kt=e(`$ZodNanoID`,(e,t)=>{t.pattern??=Ie,F.init(e,t)}),At=e(`$ZodCUID`,(e,t)=>{t.pattern??=je,F.init(e,t)}),jt=e(`$ZodCUID2`,(e,t)=>{t.pattern??=Me,F.init(e,t)}),Mt=e(`$ZodULID`,(e,t)=>{t.pattern??=Ne,F.init(e,t)}),Nt=e(`$ZodXID`,(e,t)=>{t.pattern??=Pe,F.init(e,t)}),Pt=e(`$ZodKSUID`,(e,t)=>{t.pattern??=Fe,F.init(e,t)}),Ft=e(`$ZodISODateTime`,(e,t)=>{t.pattern??=et(t),F.init(e,t)}),It=e(`$ZodISODate`,(e,t)=>{t.pattern??=Ze,F.init(e,t)}),Lt=e(`$ZodISOTime`,(e,t)=>{t.pattern??=$e(t),F.init(e,t)}),Rt=e(`$ZodISODuration`,(e,t)=>{t.pattern??=Le,F.init(e,t)}),zt=e(`$ZodIPv4`,(e,t)=>{t.pattern??=Ue,F.init(e,t),e._zod.bag.format=`ipv4`}),Bt=e(`$ZodIPv6`,(e,t)=>{t.pattern??=We,F.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Vt=e(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ge,F.init(e,t)}),Ht=e(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ke,F.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Ut(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Wt=e(`$ZodBase64`,(e,t)=>{t.pattern??=qe,F.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ut(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Gt(e){if(!Je.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ut(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Kt=e(`$ZodBase64URL`,(e,t)=>{t.pattern??=Je,F.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Gt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),qt=e(`$ZodE164`,(e,t)=>{t.pattern??=Ye,F.init(e,t)});function Jt(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Yt=e(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{Jt(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Xt=e(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??rt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Zt=e(`$ZodNumberFormat`,(e,t)=>{dt.init(e,t),Xt.init(e,t)}),Qt=e(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=it,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),$t=e(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),en=e(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function tn(e,t,n){e.issues.length&&t.issues.push(...he(n,e.issues)),t.value[n]=e.value}var nn=e(`$ZodArray`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>tn(t,n,e))):tn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function I(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...he(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function rn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=oe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function an(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>I(e,n,i,t,u))):I(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var on=e(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=s(()=>rn(t));f(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=h,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>I(n,t,e,s,r))):I(i,t,e,s,r)}return i?an(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),sn=e(`$ZodObjectJIT`,(e,t)=>{on.init(e,t);let n=e._zod.parse,i=s(()=>rn(t)),a=e=>{let t=new St([`shape`,`payload`,`ctx`]),n=i.value,r=e=>{let t=ee(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let i of n.keys){let n=a[i],o=ee(i),s=e[i]?._zod?.optout===`optional`;t.write(`const ${n} = ${r(i)};`),s?t.write(`
|
|
4
|
-
if (${n}.issues.length) {
|
|
5
|
-
if (${o} in input) {
|
|
6
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (${n}.value === undefined) {
|
|
14
|
-
if (${o} in input) {
|
|
15
|
-
newResult[${o}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${o}] = ${n}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`):t.write(`
|
|
22
|
-
if (${n}.issues.length) {
|
|
23
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
-
...iss,
|
|
25
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
-
})));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (${n}.value === undefined) {
|
|
30
|
-
if (${o} in input) {
|
|
31
|
-
newResult[${o}] = undefined;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
newResult[${o}] = ${n}.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},o,c=h,l=!r.jitless,u=l&&re.value,d=t.catchall,f;e._zod.parse=(r,s)=>{f??=i.value;let p=r.value;return c(p)?l&&u&&s?.async===!1&&s.jitless!==!0?(o||=a(t.shape),r=o(r,s),d?an([],p,r,s,f,e):r):n(r,s):(r.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),r)}});function cn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let a=e.filter(e=>!b(e));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>S(e,r,i())))}),t)}var ln=e(`$ZodUnion`,(e,t)=>{N.init(e,t),f(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),f(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),f(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),f(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>l(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>cn(t,i,e,a)):cn(s,i,e,a)}}),un=e(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,ln.init(e,t);let n=e._zod.parse;f(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=s(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!h(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),dn=e(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>fn(e,t,n)):fn(e,i,a)}});function L(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(g(e)&&g(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=L(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=L(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),b(e))return e;let o=L(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var pn=e(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=a(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ae.has(typeof e)).map(e=>typeof e==`string`?_(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mn=e(`$ZodLiteral`,(e,t)=>{if(N.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?_(e):e?_(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hn=e(`$ZodTransform`,(e,r)=>{N.init(e,r),e._zod.parse=(i,a)=>{if(a.direction===`backward`)throw new n(e.constructor.name);let o=r.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(i.value=e,i));if(o instanceof Promise)throw new t;return i.value=o,i}});function gn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var _n=e(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${l(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>gn(t,e.value)):gn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),vn=e(`$ZodExactOptional`,(e,t)=>{_n.init(e,t),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yn=e(`$ZodNullable`,(e,t)=>{N.init(e,t),f(e._zod,`optin`,()=>t.innerType._zod.optin),f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${l(e.source)}|null)$`):void 0}),f(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),bn=e(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xn(e,t)):xn(r,t)}});function xn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Sn=e(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Cn=e(`$ZodNonOptional`,(e,t)=>{N.init(e,t),f(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wn(t,e)):wn(i,e)}});function wn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Tn=e(`$ZodCatch`,(e,t)=>{N.init(e,t),f(e._zod,`optin`,()=>t.innerType._zod.optin),f(e._zod,`optout`,()=>t.innerType._zod.optout),f(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,i()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,i()))},input:e.value}),e.issues=[]),e)}}),En=e(`$ZodPipe`,(e,t)=>{N.init(e,t),f(e._zod,`values`,()=>t.in._zod.values),f(e._zod,`optin`,()=>t.in._zod.optin),f(e._zod,`optout`,()=>t.out._zod.optout),f(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>R(e,t.in,n)):R(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>R(e,t.out,n)):R(r,t.out,n)}});function R(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Dn=e(`$ZodReadonly`,(e,t)=>{N.init(e,t),f(e._zod,`propValues`,()=>t.innerType._zod.propValues),f(e._zod,`values`,()=>t.innerType._zod.values),f(e._zod,`optin`,()=>t.innerType?._zod?.optin),f(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(On):On(r)}});function On(e){return e.value=Object.freeze(e.value),e}var kn=e(`$ZodCustom`,(e,t)=>{j.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>An(t,n,r,e));An(i,n,r,e)}});function An(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(w(e))}}var jn,Mn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Nn(){return new Mn}(jn=globalThis).__zod_globalRegistry??(jn.__zod_globalRegistry=Nn());var z=globalThis.__zod_globalRegistry;function Pn(e,t){return new e({type:`string`,...y(t)})}function Fn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...y(t)})}function In(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...y(t)})}function Ln(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...y(t)})}function Rn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...y(t)})}function zn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...y(t)})}function Bn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...y(t)})}function Vn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...y(t)})}function Hn(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...y(t)})}function Un(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...y(t)})}function Wn(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...y(t)})}function Gn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...y(t)})}function Kn(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...y(t)})}function qn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...y(t)})}function Jn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...y(t)})}function Yn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...y(t)})}function Xn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...y(t)})}function Zn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...y(t)})}function Qn(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...y(t)})}function $n(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...y(t)})}function er(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...y(t)})}function tr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...y(t)})}function nr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...y(t)})}function rr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...y(t)})}function ir(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...y(t)})}function ar(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...y(t)})}function or(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...y(t)})}function sr(e,t){return new e({type:`number`,checks:[],...y(t)})}function cr(e,t){return new e({type:`number`,coerce:!0,checks:[],...y(t)})}function lr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...y(t)})}function ur(e,t){return new e({type:`boolean`,...y(t)})}function dr(e){return new e({type:`unknown`})}function fr(e,t){return new e({type:`never`,...y(t)})}function pr(e,t){return new ct({check:`less_than`,...y(t),value:e,inclusive:!1})}function B(e,t){return new ct({check:`less_than`,...y(t),value:e,inclusive:!0})}function mr(e,t){return new lt({check:`greater_than`,...y(t),value:e,inclusive:!1})}function V(e,t){return new lt({check:`greater_than`,...y(t),value:e,inclusive:!0})}function hr(e,t){return new ut({check:`multiple_of`,...y(t),value:e})}function gr(e,t){return new ft({check:`max_length`,...y(t),maximum:e})}function H(e,t){return new pt({check:`min_length`,...y(t),minimum:e})}function _r(e,t){return new mt({check:`length_equals`,...y(t),length:e})}function vr(e,t){return new ht({check:`string_format`,format:`regex`,...y(t),pattern:e})}function yr(e){return new gt({check:`string_format`,format:`lowercase`,...y(e)})}function br(e){return new _t({check:`string_format`,format:`uppercase`,...y(e)})}function xr(e,t){return new vt({check:`string_format`,format:`includes`,...y(t),includes:e})}function Sr(e,t){return new yt({check:`string_format`,format:`starts_with`,...y(t),prefix:e})}function Cr(e,t){return new bt({check:`string_format`,format:`ends_with`,...y(t),suffix:e})}function U(e){return new xt({check:`overwrite`,tx:e})}function wr(e){return U(t=>t.normalize(e))}function Tr(){return U(e=>e.trim())}function Er(){return U(e=>e.toLowerCase())}function Dr(){return U(e=>e.toUpperCase())}function Or(){return U(e=>te(e))}function kr(e,t,n){return new e({type:`array`,element:t,...y(n)})}function Ar(e,t,n){let r=y(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function jr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...y(n)})}function Mr(e){let t=Nr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(w(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(w(r))}},e(n.value,n)));return t}function Nr(e,t){let n=new j({check:`custom`,...y(t)});return n._zod.check=e,n}function Pr(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??z,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function W(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,W(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&G(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Fr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
38
|
-
|
|
39
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Ir(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:K(t,`input`,e.processors),output:K(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function G(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return G(r.element,n);if(r.type===`set`)return G(r.valueType,n);if(r.type===`lazy`)return G(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return G(r.innerType,n);if(r.type===`intersection`)return G(r.left,n)||G(r.right,n);if(r.type===`record`||r.type===`map`)return G(r.keyType,n)||G(r.valueType,n);if(r.type===`pipe`)return G(r.in,n)||G(r.out,n);if(r.type===`object`){for(let e in r.shape)if(G(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(G(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(G(e,n))return!0;return!!(r.rest&&G(r.rest,n))}return!1}var Lr=(e,t={})=>n=>{let r=Pr({...n,processors:t});return W(e,r),Fr(r,e),Ir(r,e)},K=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Pr({...i??{},target:a,io:t,processors:n});return W(e,o),Fr(o,e),Ir(o,e)},Rr={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},zr=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Rr[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Br=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Vr=(e,t,n,r)=>{n.type=`boolean`},Hr=(e,t,n,r)=>{n.not={}},Ur=(e,t,n,r)=>{let i=e._zod.def,o=a(i.entries);o.every(e=>typeof e==`number`)&&(n.type=`number`),o.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=o},Wr=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Gr=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Kr=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},qr=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=W(a.element,t,{...r,path:[...r.path,`items`]})},Jr=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=W(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=W(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Yr=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>W(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Xr=(e,t,n,r)=>{let i=e._zod.def,a=W(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=W(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Zr=(e,t,n,r)=>{let i=e._zod.def,a=W(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Qr=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$r=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ei=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ti=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ni=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;W(a,t,r);let o=t.seen.get(e);o.ref=a},ri=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ii=(e,t,n,r)=>{let i=e._zod.def;W(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ai=e(`ZodISODateTime`,(e,t)=>{Ft.init(e,t),Y.init(e,t)});function oi(e){return rr(ai,e)}var si=e(`ZodISODate`,(e,t)=>{It.init(e,t),Y.init(e,t)});function ci(e){return ir(si,e)}var li=e(`ZodISOTime`,(e,t)=>{Lt.init(e,t),Y.init(e,t)});function ui(e){return ar(li,e)}var di=e(`ZodISODuration`,(e,t)=>{Rt.init(e,t),Y.init(e,t)});function fi(e){return or(di,e)}var pi=(e,t)=>{T.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ve(e,t)},flatten:{value:t=>_e(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,o,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,o,2)}},isEmpty:{get(){return e.issues.length===0}}})};e(`ZodError`,pi);var q=e(`ZodError`,pi,{Parent:Error}),mi=D(q),hi=O(q),gi=k(q),_i=A(q),vi=Ce(q),yi=we(q),bi=Te(q),xi=Ee(q),Si=De(q),Ci=Oe(q),wi=ke(q),Ti=Ae(q),J=e(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:K(e,`input`),output:K(e,`output`)}}),e.toJSONSchema=Lr(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(m(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>v(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>mi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>gi(e,t,n),e.parseAsync=async(t,n)=>hi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>_i(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>vi(e,t,n),e.decode=(t,n)=>yi(e,t,n),e.encodeAsync=async(t,n)=>bi(e,t,n),e.decodeAsync=async(t,n)=>xi(e,t,n),e.safeEncode=(t,n)=>Si(e,t,n),e.safeDecode=(t,n)=>Ci(e,t,n),e.safeEncodeAsync=async(t,n)=>wi(e,t,n),e.safeDecodeAsync=async(t,n)=>Ti(e,t,n),e.refine=(t,n)=>e.check(Ra(t,n)),e.superRefine=t=>e.check(za(t)),e.overwrite=t=>e.check(U(t)),e.optional=()=>ba(e),e.exactOptional=()=>Sa(e),e.nullable=()=>wa(e),e.nullish=()=>ba(wa(e)),e.nonoptional=t=>Aa(e,t),e.array=()=>aa(e),e.or=t=>la([e,t]),e.and=t=>pa(e,t),e.transform=t=>$(e,va(t)),e.default=t=>Ea(e,t),e.prefault=t=>Oa(e,t),e.catch=t=>Ma(e,t),e.pipe=t=>$(e,t),e.readonly=()=>Fa(e),e.describe=t=>{let n=e.clone();return z.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return z.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return z.get(e);let n=e.clone();return z.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ei=e(`_ZodString`,(e,t)=>{P.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zr(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(vr(...t)),e.includes=(...t)=>e.check(xr(...t)),e.startsWith=(...t)=>e.check(Sr(...t)),e.endsWith=(...t)=>e.check(Cr(...t)),e.min=(...t)=>e.check(H(...t)),e.max=(...t)=>e.check(gr(...t)),e.length=(...t)=>e.check(_r(...t)),e.nonempty=(...t)=>e.check(H(1,...t)),e.lowercase=t=>e.check(yr(t)),e.uppercase=t=>e.check(br(t)),e.trim=()=>e.check(Tr()),e.normalize=(...t)=>e.check(wr(...t)),e.toLowerCase=()=>e.check(Er()),e.toUpperCase=()=>e.check(Dr()),e.slugify=()=>e.check(Or())}),Di=e(`ZodString`,(e,t)=>{P.init(e,t),Ei.init(e,t),e.email=t=>e.check(Fn(ki,t)),e.url=t=>e.check(Vn(Mi,t)),e.jwt=t=>e.check(nr(Ji,t)),e.emoji=t=>e.check(Hn(Pi,t)),e.guid=t=>e.check(In(ji,t)),e.uuid=t=>e.check(Ln(X,t)),e.uuidv4=t=>e.check(Rn(X,t)),e.uuidv6=t=>e.check(zn(X,t)),e.uuidv7=t=>e.check(Bn(X,t)),e.nanoid=t=>e.check(Un(Fi,t)),e.guid=t=>e.check(In(ji,t)),e.cuid=t=>e.check(Wn(Ii,t)),e.cuid2=t=>e.check(Gn(Li,t)),e.ulid=t=>e.check(Kn(Ri,t)),e.base64=t=>e.check($n(Gi,t)),e.base64url=t=>e.check(er(Ki,t)),e.xid=t=>e.check(qn(zi,t)),e.ksuid=t=>e.check(Jn(Bi,t)),e.ipv4=t=>e.check(Yn(Vi,t)),e.ipv6=t=>e.check(Xn(Hi,t)),e.cidrv4=t=>e.check(Zn(Ui,t)),e.cidrv6=t=>e.check(Qn(Wi,t)),e.e164=t=>e.check(tr(qi,t)),e.datetime=t=>e.check(oi(t)),e.date=t=>e.check(ci(t)),e.time=t=>e.check(ui(t)),e.duration=t=>e.check(fi(t))});function Oi(e){return Pn(Di,e)}var Y=e(`ZodStringFormat`,(e,t)=>{F.init(e,t),Ei.init(e,t)}),ki=e(`ZodEmail`,(e,t)=>{Et.init(e,t),Y.init(e,t)});function Ai(e){return Fn(ki,e)}var ji=e(`ZodGUID`,(e,t)=>{wt.init(e,t),Y.init(e,t)}),X=e(`ZodUUID`,(e,t)=>{Tt.init(e,t),Y.init(e,t)}),Mi=e(`ZodURL`,(e,t)=>{Dt.init(e,t),Y.init(e,t)});function Ni(e){return Vn(Mi,e)}var Pi=e(`ZodEmoji`,(e,t)=>{Ot.init(e,t),Y.init(e,t)}),Fi=e(`ZodNanoID`,(e,t)=>{kt.init(e,t),Y.init(e,t)}),Ii=e(`ZodCUID`,(e,t)=>{At.init(e,t),Y.init(e,t)}),Li=e(`ZodCUID2`,(e,t)=>{jt.init(e,t),Y.init(e,t)}),Ri=e(`ZodULID`,(e,t)=>{Mt.init(e,t),Y.init(e,t)}),zi=e(`ZodXID`,(e,t)=>{Nt.init(e,t),Y.init(e,t)}),Bi=e(`ZodKSUID`,(e,t)=>{Pt.init(e,t),Y.init(e,t)}),Vi=e(`ZodIPv4`,(e,t)=>{zt.init(e,t),Y.init(e,t)}),Hi=e(`ZodIPv6`,(e,t)=>{Bt.init(e,t),Y.init(e,t)}),Ui=e(`ZodCIDRv4`,(e,t)=>{Vt.init(e,t),Y.init(e,t)}),Wi=e(`ZodCIDRv6`,(e,t)=>{Ht.init(e,t),Y.init(e,t)}),Gi=e(`ZodBase64`,(e,t)=>{Wt.init(e,t),Y.init(e,t)}),Ki=e(`ZodBase64URL`,(e,t)=>{Kt.init(e,t),Y.init(e,t)}),qi=e(`ZodE164`,(e,t)=>{qt.init(e,t),Y.init(e,t)}),Ji=e(`ZodJWT`,(e,t)=>{Yt.init(e,t),Y.init(e,t)}),Z=e(`ZodNumber`,(e,t)=>{Xt.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Br(e,t,n,r),e.gt=(t,n)=>e.check(mr(t,n)),e.gte=(t,n)=>e.check(V(t,n)),e.min=(t,n)=>e.check(V(t,n)),e.lt=(t,n)=>e.check(pr(t,n)),e.lte=(t,n)=>e.check(B(t,n)),e.max=(t,n)=>e.check(B(t,n)),e.int=t=>e.check(Zi(t)),e.safe=t=>e.check(Zi(t)),e.positive=t=>e.check(mr(0,t)),e.nonnegative=t=>e.check(V(0,t)),e.negative=t=>e.check(pr(0,t)),e.nonpositive=t=>e.check(B(0,t)),e.multipleOf=(t,n)=>e.check(hr(t,n)),e.step=(t,n)=>e.check(hr(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Yi(e){return sr(Z,e)}var Xi=e(`ZodNumberFormat`,(e,t)=>{Zt.init(e,t),Z.init(e,t)});function Zi(e){return lr(Xi,e)}var Qi=e(`ZodBoolean`,(e,t)=>{Qt.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,n,r)});function $i(e){return ur(Qi,e)}var ea=e(`ZodUnknown`,(e,t)=>{$t.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ta(){return dr(ea)}var na=e(`ZodNever`,(e,t)=>{en.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hr(e,t,n,r)});function ra(e){return fr(na,e)}var ia=e(`ZodArray`,(e,t)=>{nn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qr(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(H(t,n)),e.nonempty=t=>e.check(H(1,t)),e.max=(t,n)=>e.check(gr(t,n)),e.length=(t,n)=>e.check(_r(t,n)),e.unwrap=()=>e.element});function aa(e,t){return kr(ia,e,t)}var oa=e(`ZodObject`,(e,t)=>{sn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jr(e,t,n,r),f(e,`shape`,()=>t.shape),e.keyof=()=>ma(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ta()}),e.loose=()=>e.clone({...e._zod.def,catchall:ta()}),e.strict=()=>e.clone({...e._zod.def,catchall:ra()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ue(e,t),e.safeExtend=t=>de(e,t),e.merge=t=>fe(e,t),e.pick=t=>ce(e,t),e.omit=t=>le(e,t),e.partial=(...t)=>pe(ya,e,t[0]),e.required=(...t)=>me(ka,e,t[0])});function sa(e,t){return new oa({type:`object`,shape:e??{},...y(t)})}var ca=e(`ZodUnion`,(e,t)=>{ln.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,n,r),e.options=t.options});function la(e,t){return new ca({type:`union`,options:e,...y(t)})}var ua=e(`ZodDiscriminatedUnion`,(e,t)=>{ca.init(e,t),un.init(e,t)});function da(e,t,n){return new ua({type:`union`,options:t,discriminator:e,...y(n)})}var fa=e(`ZodIntersection`,(e,t)=>{dn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xr(e,t,n,r)});function pa(e,t){return new fa({type:`intersection`,left:e,right:t})}var Q=e(`ZodEnum`,(e,t)=>{pn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ur(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Q({...t,checks:[],...y(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Q({...t,checks:[],...y(r),entries:i})}});function ma(e,t){return new Q({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...y(t)})}var ha=e(`ZodLiteral`,(e,t)=>{mn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wr(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ga(e,t){return new ha({type:`literal`,values:Array.isArray(e)?e:[e],...y(t)})}var _a=e(`ZodTransform`,(e,t)=>{hn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kr(e,t,n,r),e._zod.parse=(r,i)=>{if(i.direction===`backward`)throw new n(e.constructor.name);r.addIssue=n=>{if(typeof n==`string`)r.issues.push(w(n,r.value,t));else{let t=n;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=r.value,t.inst??=e,r.issues.push(w(t))}};let a=t.transform(r.value,r);return a instanceof Promise?a.then(e=>(r.value=e,r)):(r.value=a,r)}});function va(e){return new _a({type:`transform`,transform:e})}var ya=e(`ZodOptional`,(e,t)=>{_n.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ba(e){return new ya({type:`optional`,innerType:e})}var xa=e(`ZodExactOptional`,(e,t)=>{vn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sa(e){return new xa({type:`optional`,innerType:e})}var Ca=e(`ZodNullable`,(e,t)=>{yn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wa(e){return new Ca({type:`nullable`,innerType:e})}var Ta=e(`ZodDefault`,(e,t)=>{bn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$r(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ea(e,t){return new Ta({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var Da=e(`ZodPrefault`,(e,t)=>{Sn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Oa(e,t){return new Da({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var ka=e(`ZodNonOptional`,(e,t)=>{Cn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Aa(e,t){return new ka({type:`nonoptional`,innerType:e,...y(t)})}var ja=e(`ZodCatch`,(e,t)=>{Tn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ma(e,t){return new ja({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Na=e(`ZodPipe`,(e,t)=>{En.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r),e.in=t.in,e.out=t.out});function $(e,t){return new Na({type:`pipe`,in:e,out:t})}var Pa=e(`ZodReadonly`,(e,t)=>{Dn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fa(e){return new Pa({type:`readonly`,innerType:e})}var Ia=e(`ZodCustom`,(e,t)=>{kn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gr(e,t,n,r)});function La(e,t){return Ar(Ia,e??(()=>!0),t)}function Ra(e,t={}){return jr(Ia,e,t)}function za(e){return Mr(e)}function Ba(e,t){return $(va(e),t)}export{ye as _,La as a,ga as c,Ba as d,Oi as f,cr as g,oi as h,$i as i,Yi as l,Ni as m,ma as n,da as o,la as p,aa as r,Ai as s,Z as t,sa as u,be as v,T as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{a as r}from"./link-Cgvqhh5w.js";import{t as i}from"./compiler-runtime-DCc3R3Xn.js";import{C as a,M as o,S as s,a as c,b as l,c as u,d,f,g as p,h as m,t as h,x as g,y as _}from"./createReactComponent-_L2mp4Ui.js";import{t as v}from"./utils-C8DGLIgm.js";import{t as y}from"./IconCheck-Gc24xPT2.js";import{t as b}from"./IconChevronDown-B-39MA7-.js";import{C as x,Ct as S,E as C,Et as w,F as ee,I as T,M as E,O as D,P as O,T as k,b as A,c as j,ct as M,d as te,l as N,n as P,o as F,s as I,t as ne,ut as re,w as L,wt as R,x as z,y as ie}from"./getDisabledMountTransitionStyles-Co-5TcgR.js";import{d as ae,i as B,n as V,r as H,t as U}from"./CompositeList-FRTEqUDK.js";import{_ as oe,d as se,l as W,n as ce,r as G}from"./useBaseUiId-BLFGpnYJ.js";import{a as K,c as le,i as q,l as ue,n as de,o as fe,r as J,s as pe,t as me}from"./getPseudoElementBounds-BefWKytd.js";import{a as he,i as ge,n as _e,o as ve,r as ye,s as be}from"./input-CG_cIxvO.js";import{t as xe}from"./useControlled-B8q0aJoo.js";import{t as Se}from"./useValueChanged-C3CBkPge.js";var Ce=h(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),we=h(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),Y=e(t());function Te(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var Ee=Y.createContext(null),De=Y.createContext(null);function X(){let e=Y.useContext(Ee);if(e===null)throw Error(_(60));return e}function Oe(){let e=Y.useContext(De);if(e===null)throw Error(_(61));return e}var ke=(e,t)=>Object.is(e,t);function Ae(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function je(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Ae(e,t,n))}function Me(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Ae(e,t,n))}function Ne(e,t,n){return e.filter(e=>!Ae(e,t,n))}function Pe(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Z=n();function Fe(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Ie(e){if(!Array.isArray(e))return e!=null&&!(`null`in e);if(Fe(e)){for(let t of e)for(let e of t.items)if(e&&e.value==null&&e.label!=null)return!0;return!1}for(let t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function Le(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Pe(e)}function Re(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Pe(e.value):Pe(e)}function ze(e,t,n){function r(){return Le(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=Fe(t)?t.flatMap(e=>e.items):t;if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Be(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Z.jsx)(Y.Fragment,{children:ze(r,t,n)},i)),e),[])}var Q={id:k(e=>e.id),modal:k(e=>e.modal),multiple:k(e=>e.multiple),items:k(e=>e.items),itemToStringLabel:k(e=>e.itemToStringLabel),itemToStringValue:k(e=>e.itemToStringValue),isItemEqualToValue:k(e=>e.isItemEqualToValue),value:k(e=>e.value),hasSelectedValue:k(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Re(t,r)!==``}),hasNullItemLabel:k((e,t)=>t?Ie(e.items):!1),open:k(e=>e.open),mounted:k(e=>e.mounted),forceMount:k(e=>e.forceMount),transitionStatus:k(e=>e.transitionStatus),openMethod:k(e=>e.openMethod),activeIndex:k(e=>e.activeIndex),selectedIndex:k(e=>e.selectedIndex),isActive:k((e,t)=>e.activeIndex===t),isSelected:k((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Ae(e,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Ae(i,n,r)}),isSelectedByFocus:k((e,t)=>e.selectedIndex===t),popupProps:k(e=>e.popupProps),triggerProps:k(e=>e.triggerProps),triggerElement:k(e=>e.triggerElement),positionerElement:k(e=>e.positionerElement),listElement:k(e=>e.listElement),scrollUpArrowVisible:k(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:k(e=>e.scrollDownArrowVisible),hasScrollArrows:k(e=>e.hasScrollArrows)};function Ve(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:c=!1,onOpenChange:u,name:p,disabled:h=!1,readOnly:_=!1,required:v=!1,modal:y=!0,actionsRef:b,inputRef:S,onOpenChangeComplete:w,items:E,multiple:D=!1,itemToStringLabel:O,itemToStringValue:k,isItemEqualToValue:A=ke,highlightItemOnHover:j=!0,children:M}=e,{clearErrors:P}=he(),{setDirty:F,setTouched:I,setFocused:ne,shouldValidateOnChange:re,validityData:ae,setFilled:B,name:V,disabled:H,validation:U,validationMode:oe}=ve(),W=ye({id:t}),G=H||h,K=V??p,[q,ue]=xe({controlled:n,default:D?r??d:r,name:`Select`,state:`value`}),[J,me]=xe({controlled:o,default:c,name:`Select`,state:`open`}),ge=Y.useRef([]),be=Y.useRef([]),Ce=Y.useRef(null),we=Y.useRef(null),X=Y.useRef(0),Oe=Y.useRef(null),Ae=Y.useRef([]),je=Y.useRef(!1),Ne=Y.useRef(!1),Pe=Y.useRef(null),Fe=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ie=Y.useRef(!1),{mounted:Le,setMounted:ze,transitionStatus:Be}=z(J),{openMethod:Ve,triggerProps:He,reset:Ue}=de(J),$=a(()=>new x({id:W,modal:y,multiple:D,itemToStringLabel:O,itemToStringValue:k,isItemEqualToValue:A,value:q,open:J,mounted:Le,transitionStatus:Be,items:E,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,We=L($,Q.activeIndex),Ge=L($,Q.selectedIndex),Ke=L($,Q.triggerElement),qe=L($,Q.positionerElement),Je=Y.useMemo(()=>D&&Array.isArray(q)&&q.length===0?``:Re(q,k),[D,q,k]),Ye=Y.useMemo(()=>D&&Array.isArray(q)?q.map(e=>Re(e,k)):Re(q,k),[D,q,k]),Xe=R($.state.triggerElement);_e({id:W,commit:U.commit,value:q,controlRef:Xe,name:K,getValue:()=>Ye});let Ze=Y.useRef(q);g(()=>{q!==Ze.current&&$.set(`forceMount`,!0)},[$,q]),g(()=>{B(D?Array.isArray(q)&&q.length>0:q!=null)},[D,q,B]),g(function(){if(J)return;let e=Ae.current;if(D){let t=Array.isArray(q)?q:[];if(t.length===0){$.set(`selectedIndex`,null);return}let n=t[t.length-1],r=Me(e,n,A);$.set(`selectedIndex`,r===-1?null:r);return}let t=Me(e,q,A);$.set(`selectedIndex`,t===-1?null:t)},[D,J,q,Ae,A,$]),Se(q,()=>{P(K),F(q!==ae.initialValue),re()?U.commit(q):U.commit(q,!0)});let Qe=s((e,t)=>{if(u?.(e,t),!t.isCanceled&&(me(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(I(!0),ne(!1),oe===`onBlur`&&U.commit(q)),!e&&$.state.activeIndex!==null)){let e=ge.current[$.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),$e=s(()=>{ze(!1),$.set(`activeIndex`,null),Ue(),w?.(!1)});ie({enabled:!b,open:J,ref:Ce,onComplete(){J||$e()}}),Y.useImperativeHandle(b,()=>({unmount:$e}),[$e]);let et=s((e,t)=>{i?.(e,t),!t.isCanceled&&ue(e)}),tt=s(()=>{let e=$.state.listElement||Ce.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;$.state.scrollUpArrowVisible!==r&&$.set(`scrollUpArrowVisible`,r),$.state.scrollDownArrowVisible!==i&&$.set(`scrollDownArrowVisible`,i)}),nt=te({open:J,onOpenChange:Qe,elements:{reference:Ke,floating:qe}}),{getReferenceProps:rt,getFloatingProps:it,getItemProps:at}=N([le(nt,{enabled:!_&&!G,event:`mousedown`}),C(nt,{bubbles:!1}),pe(nt,{enabled:!_&&!G,listRef:ge,activeIndex:We,selectedIndex:Ge,disabledIndices:d,onNavigate(e){e===null&&!J||$.set(`activeIndex`,e)},focusItemOnHover:!1}),fe(nt,{enabled:!_&&!G&&(J||!D),listRef:be,activeIndex:We,selectedIndex:Ge,onMatch(e){J?$.set(`activeIndex`,e):et(Ae.current[e],ce(`none`))},onTypingChange(e){je.current=e}})]),ot=Y.useMemo(()=>l(rt(),He,W?{id:W}:f),[rt,He,W]);Te(()=>{$.update({popupProps:it(),triggerProps:ot})}),g(()=>{$.update({id:W,modal:y,multiple:D,value:q,open:J,mounted:Le,transitionStatus:Be,popupProps:it(),triggerProps:ot,items:E,itemToStringLabel:O,itemToStringValue:k,isItemEqualToValue:A,openMethod:Ve})},[$,W,y,D,q,J,Le,Be,it,ot,E,O,k,A,Ve]);let st=Y.useMemo(()=>({store:$,name:K,required:v,disabled:G,readOnly:_,multiple:D,itemToStringLabel:O,itemToStringValue:k,highlightItemOnHover:j,setValue:et,setOpen:Qe,listRef:ge,popupRef:Ce,scrollHandlerRef:we,handleScrollArrowVisibility:tt,scrollArrowsMountedCountRef:X,getItemProps:at,events:nt.context.events,valueRef:Oe,valuesRef:Ae,labelsRef:be,typingRef:je,selectionRef:Fe,selectedItemTextRef:Pe,validation:U,onOpenChangeComplete:w,keyboardActiveRef:Ne,alignItemWithTriggerActiveRef:Ie,initialValueRef:Ze}),[$,K,v,G,_,D,O,k,j,et,Qe,at,nt.context.events,U,w,tt]),ct=m(S,U.inputRef),lt=D&&Array.isArray(q)&&q.length>0,ut=Y.useMemo(()=>!D||!Array.isArray(q)||!K?null:q.map(e=>{let t=Re(e,k);return(0,Z.jsx)(`input`,{type:`hidden`,name:K,value:t},t)}),[D,q,K,k]);return(0,Z.jsx)(Ee.Provider,{value:st,children:(0,Z.jsxs)(De.Provider,{value:nt,children:[M,(0,Z.jsx)(`input`,{...U.getInputValidationProps({onFocus(){$.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=ce(se,e.nativeEvent);function r(){if(D)return;let e=Ae.current.find(e=>Re(e,k).toLowerCase()===t.toLowerCase());e!=null&&(F(e!==ae.initialValue),et(e,n),re()&&U.commit(e))}$.set(`forceMount`,!0),queueMicrotask(r)}}),name:D?void 0:K,value:Je,disabled:G,required:v&&!lt,readOnly:_,ref:ct,style:K?T:ee,tabIndex:-1,"aria-hidden":!0}),ut]})})}var He=2,Ue=400,$=200,We={...I,...be,value:()=>null},Ge=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...u}=e,{setTouched:d,setFocused:f,validationMode:h,state:g,disabled:_}=ve(),{labelId:v}=ge(),{store:y,setOpen:b,selectionRef:x,validation:S,readOnly:C,required:ee,alignItemWithTriggerActiveRef:T,disabled:D,keyboardActiveRef:O}=X(),k=_||D||a,A=L(y,Q.open),j=L(y,Q.value),te=L(y,Q.triggerProps),N=L(y,Q.positionerElement),P=L(y,Q.listElement),F=L(y,Q.id),I=L(y,Q.hasSelectedValue),ne=!I&&A,z=L(y,Q.hasNullItemLabel,ne),ie=i??F;ye({id:ie});let ae=R(N),B=Y.useRef(null),{getButtonProps:V,buttonRef:H}=p({disabled:k,native:o}),U=m(t,B,H,s(e=>{y.set(`triggerElement`,e)})),oe=w(),W=w(),K=w(),le=w();Y.useEffect(()=>{if(A)return I||z?le.start($,()=>{x.current.allowUnselectedMouseUp=!0,K.start($,()=>{x.current.allowSelectedMouseUp=!0})}):K.start(Ue,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}),()=>{K.clear(),le.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},W.clear()},[A,I,z,x,W,K,le]);let q=Y.useMemo(()=>P?.id??re(N)?.id,[P,N]),ue=l(te,{id:ie,role:`combobox`,"aria-expanded":A?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":A?q:void 0,"aria-labelledby":v,"aria-readonly":C||void 0,"aria-required":ee||void 0,tabIndex:k?-1:0,ref:U,onFocus(e){f(!0),A&&T.current&&b(!1,ce(se,e.nativeEvent)),oe.start(0,()=>{y.set(`forceMount`,!0)})},onBlur(e){M(N,e.relatedTarget)||(d(!0),f(!1),h===`onBlur`&&S.commit(j))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(e){if(A)return;let t=E(e.currentTarget);function n(e){if(!B.current)return;let t=e.target;if(M(B.current,t)||M(ae.current,t)||t===B.current)return;let n=me(B.current);e.clientX>=n.left-He&&e.clientX<=n.right+He&&e.clientY>=n.top-He&&e.clientY<=n.bottom+He||b(!1,ce(G,e))}W.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},S.getValidationProps,u,V);ue.role=`combobox`;let de=Y.useMemo(()=>({...g,open:A,disabled:k,value:j,readOnly:C,placeholder:!I}),[g,A,k,j,C,I]);return c(`button`,e,{ref:[t,B],state:de,stateAttributesMapping:We,props:ue})}),Ke={value:()=>null},qe=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:l}=X(),u=L(s,Q.value),d=L(s,Q.items),f=L(s,Q.itemToStringLabel),p=L(s,Q.hasSelectedValue),m=!p&&a!=null&&i==null,h=L(s,Q.hasNullItemLabel,m),g=Y.useMemo(()=>({value:u,placeholder:!p}),[u,p]),_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?Be(u,d,f):ze(u,d,f)),c(`span`,e,{state:g,ref:[t,l],props:[{children:_},o],stateAttributesMapping:Ke})}),Je=Y.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=X(),o=L(a,Q.open);return c(`span`,e,{state:Y.useMemo(()=>({open:o}),[o]),ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:j})}),Ye=Y.createContext(void 0),Xe=Y.forwardRef(function(e,t){let{store:n}=X(),r=L(n,Q.mounted),i=L(n,Q.forceMount);return r||i?(0,Z.jsx)(Ye.Provider,{value:!0,children:(0,Z.jsx)(D,{ref:t,...e})}):null}),Ze=Y.createContext(void 0);function Qe(){let e=Y.useContext(Ze);if(!e)throw Error(_(59));return e}function $e(e,t){e&&Object.assign(e.style,t)}var et={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},tt={position:`fixed`},nt=Y.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:l=`center`,sideOffset:d=0,alignOffset:f=0,collisionBoundary:p=`clipping-ancestors`,collisionPadding:m,arrowPadding:h=5,sticky:_=!1,disableAnchorTracking:v,alignItemWithTrigger:y=!0,collisionAvoidance:b=u,...x}=e,{store:S,listRef:C,labelsRef:w,alignItemWithTriggerActiveRef:ee,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:O,setValue:k}=X(),A=Oe(),j=L(S,Q.open),M=L(S,Q.mounted),te=L(S,Q.modal),N=L(S,Q.value),I=L(S,Q.openMethod),ne=L(S,Q.positionerElement),re=L(S,Q.triggerElement),R=L(S,Q.isItemEqualToValue),z=Y.useRef(null),ie=Y.useRef(null),[ae,B]=Y.useState(y),V=M&&ae&&I!==`touch`;!M&&ae!==y&&B(y),g(()=>{M||(Q.scrollUpArrowVisible(S.state)&&S.set(`scrollUpArrowVisible`,!1),Q.scrollDownArrowVisible(S.state)&&S.set(`scrollDownArrowVisible`,!1))},[S,M]),Y.useImperativeHandle(ee,()=>V),J((V||te)&&j&&I!==`touch`,re);let H=P({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:o,sideOffset:d,align:l,alignOffset:f,arrowPadding:h,collisionBoundary:p,collisionPadding:m,sticky:_,disableAnchorTracking:v??V,collisionAvoidance:b,keepMounted:!0}),oe=V?`none`:H.side,W=V?tt:H.positionerStyles,G=Y.useMemo(()=>{let e={};return j||(e.pointerEvents=`none`),{role:`presentation`,hidden:!M,style:{...W,...e}}},[j,M,W]),le=Y.useMemo(()=>({open:j,side:oe,align:H.align,anchorHidden:H.anchorHidden}),[j,oe,H.align,H.anchorHidden]),ue=c(`div`,e,{ref:[t,s(e=>{S.set(`positionerElement`,e)})],state:le,stateAttributesMapping:F,props:[G,x]}),de=Y.useRef(0),fe=s(e=>{if(e.size===0&&de.current===0||E.current.length===0)return;let t=de.current;if(de.current=e.size,e.size===t)return;let n=ce(se);if(t!==0&&!S.state.multiple&&N!==null&&Me(E.current,N,R)===-1){let e=D.current,t=e!=null&&je(E.current,e,R)?e:null;k(t,n),t===null&&(S.set(`selectedIndex`,null),T.current=null)}if(t!==0&&S.state.multiple&&Array.isArray(N)){let e=N.filter(e=>je(E.current,e,R));(e.length!==N.length||e.some(e=>!je(N,e,R)))&&(k(e,n),e.length===0&&(S.set(`selectedIndex`,null),T.current=null))}if(j&&V){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};$e(ne,e),$e(O.current,e)}}),pe=Y.useMemo(()=>({...H,side:oe,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:B,scrollUpArrowRef:z,scrollDownArrowRef:ie}),[H,oe,V,B]);return(0,Z.jsx)(U,{elementsRef:C,labelsRef:w,onMapChange:fe,children:(0,Z.jsxs)(Ze.Provider,{value:pe,children:[M&&te&&(0,Z.jsx)(q,{inert:K(!j),cutout:re}),ue]})})});function rt(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var it=`base-ui-disable-scrollbar`,at={className:it,getElement(e){return(0,Z.jsx)(`style`,{nonce:e,href:it,precedence:`base-ui:low`,children:`.${it}{scrollbar-width:none}.${it}::-webkit-scrollbar{display:none}`})}};function ot(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var st=Y.createContext(void 0),ct={disableStyleElements:!1};function lt(){return Y.useContext(st)??ct}var ut=e(r()),dt={...F,...A},ft=Y.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:a,popupRef:l,onOpenChangeComplete:u,setOpen:d,valueRef:f,selectedItemTextRef:p,keyboardActiveRef:m,multiple:h,handleScrollArrowVisibility:_,scrollHandlerRef:v,highlightItemOnHover:y}=X(),{side:b,align:x,alignItemWithTriggerActive:C,setControlledAlignItemWithTrigger:ee,scrollDownArrowRef:T,scrollUpArrowRef:D}=Qe(),k=V(!0)!=null,A=Oe(),{nonce:j,disableStyleElements:M}=lt(),te=w(),N=L(a,Q.id),P=L(a,Q.open),F=L(a,Q.mounted),I=L(a,Q.popupProps),re=L(a,Q.transitionStatus),R=L(a,Q.triggerElement),z=L(a,Q.positionerElement),B=L(a,Q.listElement),H=Y.useRef(0),U=Y.useRef(!1),se=Y.useRef(0),W=Y.useRef(!1),G=Y.useRef({}),K=O(),le=s(e=>{if(!z||!l.current||!W.current)return;if(U.current||!C){_();return}let t=z.style.top===`0px`,n=z.style.bottom===`0px`,r=z.getBoundingClientRect().height,i=E(z),a=getComputedStyle(z),o=parseFloat(a.marginTop),s=parseFloat(a.marginBottom),c=pt(getComputedStyle(l.current)),u=i.documentElement.clientHeight-o-s,d=e.scrollTop,f=e.scrollHeight-e.clientHeight,p=0,m=null,h=!1;if(t){let e=r+(f-d),t=Math.min(e,u);p=t,t===u?h=!0:m=f}else if(n){let e=d-0,t=r+e,n=Math.min(t,u),i=t-u;p=n,n===u?(h=!0,d<f&&(m=d-(e-i))):m=0}p!==0&&(z.style.height=`${p}px`),m!=null&&(e.scrollTop=m),(h||p>=c)&&(U.current=!0),_()});Y.useImperativeHandle(v,()=>le,[le]),ie({open:P,ref:l,onComplete(){P&&u?.(!0)}});let q=Y.useMemo(()=>({open:P,transitionStatus:re,side:b,align:x}),[P,re,b,x]);g(()=>{!z||!l.current||Object.keys(G.current).length||(G.current={top:z.style.top||`0`,left:z.style.left||`0`,right:z.style.right,height:z.style.height,bottom:z.style.bottom,minHeight:z.style.minHeight,maxHeight:z.style.maxHeight,marginTop:z.style.marginTop,marginBottom:z.style.marginBottom})},[l,z]),g(()=>{P||C||(W.current=!1,U.current=!1,H.current=0,se.current=0,$e(z,G.current))},[P,C,z,l]),g(()=>{let e=l.current;if(!(!P||!R||!z||!e||a.state.transitionStatus===`ending`)){if(!C){W.current=!0,K.request(_),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=gt(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(z),n=getComputedStyle(e),r=E(R),i=o(z),a=R.getBoundingClientRect(),s=z.getBoundingClientRect(),c=a.left,l=a.height,u=B||e,d=u.scrollHeight,m=parseFloat(n.borderBottomWidth),h=parseFloat(t.marginTop)||10,g=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=pt(n),b=r.documentElement.clientHeight-h-g,x=r.documentElement.clientWidth,C=b-a.bottom+l,w=p.current,T=f.current,D,O=0,k=0;if(w&&T){let e=T.getBoundingClientRect();D=w.getBoundingClientRect();let t=e.left-c,n=D.left-s.left,r=e.top-a.top+e.height/2,i=D.top-s.top+D.height/2;O=t-n,k=i-r}let A=C+k+g+m,j=Math.min(b,A),M=b-h-g,te=A-j,N=Math.max(5,c+O),P=x-5,F=Math.max(0,N+s.width-P);z.style.left=`${N-F}px`,z.style.height=`${j}px`,z.style.maxHeight=`auto`,z.style.marginTop=`${h}px`,z.style.marginBottom=`${g}px`,e.style.height=`100%`;let I=u.scrollHeight-u.clientHeight,ne=te>=I;ne&&(j=Math.min(b,s.height)-(te-I));let re=a.top<20||a.bottom>b-20||j<Math.min(d,v),L=(i.visualViewport?.scale??1)!==1&&S;if(re||L){W.current=!0,$e(z,G.current),ut.flushSync(()=>ee(!1));return}if(ne){let e=Math.max(0,b-A);z.style.top=s.height>=M?`0`:`${e}px`,z.style.height=`${j}px`,u.scrollTop=u.scrollHeight-u.clientHeight,H.current=Math.max(v,j)}else z.style.bottom=`0`,H.current=Math.max(v,j),u.scrollTop=te;if(D){let t=s.top,n=s.height,r=D.top+D.height/2,i=ot(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(H.current===b||j>=y)&&(U.current=!0),_(),setTimeout(()=>{W.current=!0})}finally{t()}})}},[a,P,z,R,f,p,l,_,C,ee,K,T,D,B]),Y.useEffect(()=>{if(!C||!z||!P)return;let e=o(z);function t(e){d(!1,ce(oe,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[d,C,z,P]);let de={...B?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${N}-list`},onKeyDown(e){m.current=!0,k&&ae.has(e.key)&&e.stopPropagation()},onMouseMove(){m.current=!1},onPointerLeave(e){if(!y||rt(e)||e.pointerType===`touch`)return;let t=e.currentTarget;te.start(0,()=>{a.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){B||v.current?.(e.currentTarget)},...C&&{style:B?{height:`100%`}:et}},fe=c(`div`,e,{ref:[t,l],state:q,stateAttributesMapping:dt,props:[I,de,ne(re),{className:!B&&C?at.className:void 0},i]});return(0,Z.jsxs)(Y.Fragment,{children:[!M&&at.getElement(j),(0,Z.jsx)(ue,{context:A,modal:!1,disabled:!F,restoreFocus:!0,children:fe})]})});function pt(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}var mt={transform:`none`,scale:`1`,translate:`0 0`};function ht(e,t,n){n?e.setProperty(t,n):e.removeProperty(t)}function gt(e){let{style:t}=e,n={},r=Object.keys(mt);for(let e of r)n[e]=t.getPropertyValue(e),t.setProperty(e,mt[e]);return()=>{for(let e of r)ht(t,e,n[e])}}var _t=Y.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=X(),{alignItemWithTriggerActive:l}=Qe(),u=L(a,Q.hasScrollArrows),d=L(a,Q.openMethod),f=L(a,Q.multiple),p={id:`${L(a,Q.id)}-list`,role:`listbox`,"aria-multiselectable":f||void 0,onScroll(e){o.current?.(e.currentTarget)},...l&&{style:et},className:u&&d!==`touch`?at.className:void 0};return c(`div`,e,{ref:[t,s(e=>{a.set(`listElement`,e)})],props:[p,i]})}),vt=Y.createContext(void 0);function yt(){let e=Y.useContext(vt);if(!e)throw Error(_(57));return e}var bt=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...l}=e,u=Y.useRef(null),d=B({label:a,textRef:u,indexGuessBehavior:H.GuessFromOrder}),{store:f,getItemProps:m,setOpen:h,setValue:_,selectionRef:v,typingRef:y,valuesRef:b,keyboardActiveRef:x,multiple:S,highlightItemOnHover:C}=X(),ee=w(),T=L(f,Q.isActive,d.index),E=L(f,Q.isSelected,d.index,i),D=L(f,Q.isSelectedByFocus,d.index),O=L(f,Q.isItemEqualToValue),k=d.index,A=k!==-1,j=Y.useRef(null),M=R(k);g(()=>{if(!A)return;let e=b.current;return e[k]=i,()=>{delete e[k]}},[A,k,i,b]),g(()=>{if(!A)return;let e=f.state.value,t=e;S&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Ae(t,i,O)&&f.set(`selectedIndex`,k)},[A,k,S,O,f,i]);let te=Y.useMemo(()=>({disabled:o,selected:E,highlighted:T}),[o,E,T]),N=m({active:T,selected:E});N.onFocus=void 0,N.id=void 0;let P=Y.useRef(null),F=Y.useRef(`mouse`),I=Y.useRef(!1),{getButtonProps:ne,buttonRef:re}=p({disabled:o,focusableWhenDisabled:!0,native:s});function z(e){let t=f.state.value;if(S){let n=Array.isArray(t)?t:[];_(E?Ne(n,i,O):[...n,i],ce(W,e))}else _(i,ce(W,e)),h(!1,ce(W,e))}let ie={role:`option`,"aria-selected":E,tabIndex:T?0:-1,onFocus(){f.set(`activeIndex`,k)},onMouseEnter(){!x.current&&f.state.selectedIndex===null&&f.set(`activeIndex`,k)},onMouseMove(){C&&f.set(`activeIndex`,k)},onMouseLeave(e){!C||x.current||rt(e)||ee.start(0,()=>{f.state.activeIndex===k&&f.set(`activeIndex`,null)})},onTouchStart(){v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){P.current=e.key,f.set(`activeIndex`,k)},onClick(e){I.current=!1,!(e.type===`keydown`&&P.current===null)&&(o||P.current===` `&&y.current||F.current!==`touch`&&!T||(P.current=null,z(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerDown(e){F.current=e.pointerType,I.current=!0},onMouseUp(e){if(o)return;if(I.current){I.current=!1;return}let t=!v.current.allowSelectedMouseUp&&E,n=!v.current.allowUnselectedMouseUp&&!E;t||n||F.current!==`touch`&&!T||z(e.nativeEvent)}},ae=c(`div`,e,{ref:[re,t,d.ref,j],state:te,props:[N,ie,l,ne]}),V=Y.useMemo(()=>({selected:E,indexRef:M,textRef:u,selectedByFocus:D,hasRegistered:A}),[E,M,u,D,A]);return(0,Z.jsx)(vt.Provider,{value:V,children:ae})})),xt=Y.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=yt();return n||r?(0,Z.jsx)(St,{...e,ref:t}):null}),St=Y.memo(Y.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=yt(),s=Y.useRef(null),{transitionStatus:l,setMounted:u}=z(o),d=Y.useMemo(()=>({selected:o,transitionStatus:l}),[o,l]),f=c(`span`,e,{ref:[t,s],state:d,props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:A});return ie({open:o,ref:s,onComplete(){o||u(!1)}}),f})),Ct=Y.memo(Y.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=yt(),{selectedItemTextRef:o}=X(),{className:s,render:l,...u}=e;return c(`div`,e,{ref:[Y.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:u})})),wt=Y.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:l,listRef:u,handleScrollArrowVisibility:d,scrollArrowsMountedCountRef:f}=X(),{side:p,scrollDownArrowRef:m,scrollUpArrowRef:h}=Qe(),_=L(s,i===`up`?Q.scrollUpArrowVisible:Q.scrollDownArrowVisible),v=L(s,Q.openMethod),y=_&&v!==`touch`,b=w(),x=i===`up`?h:m,{transitionStatus:S,setMounted:C}=z(y);g(()=>(f.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{f.current=Math.max(0,f.current-1),f.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,f]),ie({open:y,ref:x,onComplete(){y||C(!1)}});let ee=Y.useMemo(()=>({direction:i,visible:y,side:p,transitionStatus:S}),[i,y,p,S]),T=c(`div`,e,{ref:[t,x],state:ee,props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??l.current;if(!e)return;s.set(`activeIndex`,null),d();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(u.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){b.clear();return}if((s.state.listElement||l.current)&&u.current&&u.current.length>0){let t=u.current,n=x.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},o]});return y||a?T:null}),Tt=Y.forwardRef(function(e,t){return(0,Z.jsx)(wt,{...e,ref:t,direction:`down`})}),Et=Y.forwardRef(function(e,t){return(0,Z.jsx)(wt,{...e,ref:t,direction:`up`})}),Dt=i(),Ot=Ve;function kt(e){let t=(0,Dt.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`flex flex-1 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(qe,{"data-slot":`select-value`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function At(e){let t=(0,Dt.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,size:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===r?s=t[6]:(s=v(`border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Je,{render:(0,Z.jsx)(we,{className:`text-muted-foreground size-4 pointer-events-none`})}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,Z.jsxs)(Ge,{"data-slot":`select-trigger`,"data-size":o,className:s,...i,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function jt(e){let t=(0,Dt.c)(26),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({className:r,children:n,side:a,sideOffset:o,align:s,alignOffset:c,alignItemWithTrigger:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=a===void 0?`bottom`:a,d=o===void 0?4:o,f=s===void 0?`center`:s,p=c===void 0?0:c,m=l===void 0?!0:l,h;t[9]===r?h=t[10]:(h=v(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-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 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto`,r),t[9]=r,t[10]=h);let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(Nt,{}),t[11]=g):g=t[11];let _;t[12]===n?_=t[13]:(_=(0,Z.jsx)(_t,{children:n}),t[12]=n,t[13]=_);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(Pt,{}),t[14]=y):y=t[14];let b;t[15]!==i||t[16]!==h||t[17]!==_?(b=(0,Z.jsxs)(ft,{"data-slot":`select-content`,className:h,...i,children:[g,_,y]}),t[15]=i,t[16]=h,t[17]=_,t[18]=b):b=t[18];let x;return t[19]!==f||t[20]!==m||t[21]!==p||t[22]!==u||t[23]!==d||t[24]!==b?(x=(0,Z.jsx)(Xe,{children:(0,Z.jsx)(nt,{side:u,sideOffset:d,align:f,alignOffset:p,alignItemWithTrigger:m,className:`isolate z-50`,children:b})}),t[19]=f,t[20]=m,t[21]=p,t[22]=u,t[23]=d,t[24]=b,t[25]=x):x=t[25],x}function Mt(e){let t=(0,Dt.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=v(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,Z.jsx)(Ct,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:n}),t[6]=n,t[7]=o);let s;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(xt,{render:(0,Z.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Z.jsx)(y,{className:`pointer-events-none`})}),t[8]=s):s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Z.jsxs)(bt,{"data-slot":`select-item`,className:a,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Nt(e){let t=(0,Dt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Ce,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Z.jsx)(Et,{"data-slot":`select-scroll-up-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Pt(e){let t=(0,Dt.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(b,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Z.jsx)(Tt,{"data-slot":`select-scroll-down-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}export{kt as a,at as c,At as i,jt as n,lt as o,Mt as r,ot as s,Ot as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DG_AJzB_.js";import{t}from"./compiler-runtime-DCc3R3Xn.js";import{t as n}from"./utils-C8DGLIgm.js";import{t as r}from"./Separator-CHfSrIVw.js";var i=t(),a=e();function o(e){let t=(0,i.c)(10),o,s,c;t[0]===e?(o=t[1],s=t[2],c=t[3]):({className:o,orientation:c,...s}=e,t[0]=e,t[1]=o,t[2]=s,t[3]=c);let l=c===void 0?`horizontal`:c,u;t[4]===o?u=t[5]:(u=n(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,o),t[4]=o,t[5]=u);let d;return t[6]!==l||t[7]!==s||t[8]!==u?(d=(0,a.jsx)(r,{"data-slot":`separator`,orientation:l,className:u,...s}),t[6]=l,t[7]=s,t[8]=u,t[9]=d):d=t[9],d}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DG_AJzB_.js";import{t}from"./compiler-runtime-DCc3R3Xn.js";import{a as n,n as r,o as i,r as a,t as o}from"./card-BWqhQk-T.js";var s=t(),c=e();function l(){let e=(0,s.c)(6),t,l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(`h1`,{className:`text-2xl font-bold`,children:`Settings`}),l=(0,c.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`Manage your organization settings`}),e[0]=t,e[1]=l):(t=e[0],l=e[1]);let u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,c.jsxs)(n,{children:[(0,c.jsx)(i,{children:`Coming soon`}),(0,c.jsx)(a,{children:`Additional organization settings will be available soon.`})]}),e[2]=u):u=e[2];let d;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,c.jsxs)(o,{children:[u,(0,c.jsx)(r,{children:(0,c.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Organization settings now focus on billing, access, and data source controls.`})})]}),e[3]=d):d=e[3];let f;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,c.jsxs)(n,{children:[(0,c.jsx)(i,{children:`Organization deletion`}),(0,c.jsx)(a,{children:`Self-serve organization deletion is disabled.`})]}),e[4]=f):f=e[4];let p;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,c.jsxs)(`div`,{className:`p-8 max-w-2xl`,children:[t,l,(0,c.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[d,(0,c.jsxs)(o,{children:[f,(0,c.jsxs)(r,{children:[(0,c.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Owners cannot delete organizations in-app. If an organization needs to be removed, contact your deployment operator for a reviewed hard-delete request.`}),(0,c.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:`This protects memberships, connectors, data sources, and other org-owned records from accidental cascade deletion.`})]})]})]})]}),e[5]=p):p=e[5],p}export{l as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-DG_AJzB_.js";import{t as r}from"./link-Cgvqhh5w.js";import{n as i}from"./useRouterState-DpT8luFk.js";import{a,o,t as s}from"./api-base-url-DIb6qukm.js";import{n as c}from"./createReactComponent-_L2mp4Ui.js";import{t as l}from"./theme-toggle-DrtO5ON3.js";import{i as u,n as d}from"./auth-client-DF1BsKzX.js";import{t as f}from"./useQuery-8xe0Ctrs.js";import{f as p,s as m,u as h}from"./schemas-n4sxh6jF.js";import{R as g,U as _,V as v,W as y}from"./index-DefoCtD4.js";import{t as b}from"./input-CG_cIxvO.js";import{t as x}from"./label-DDLGZnWP.js";import{a as S,n as C,o as w,r as T,t as E}from"./card-BWqhQk-T.js";import{n as D,t as O}from"./zod-Ch0Zejov.js";import{t as k}from"./auth-bootstrap-query-B7dkGOfQ.js";var A=e(t(),1),j=n(),M=h({email:m(`Please enter a valid email`),password:p().min(8,`Password must be at least 8 characters`)}),N=h({email:m(`Please enter a valid email`),name:p().min(2,`Name must be at least 2 characters`),password:p().min(8,`Password must be at least 8 characters`)}),P=N.extend({organizationName:p().min(2,`Organization name must be at least 2 characters`),organizationSlug:p().min(2,`Organization slug must be at least 2 characters`).regex(/^[a-z0-9-]+$/,`Organization slug can only contain lowercase letters, numbers, and hyphens`)}),F=a(`/signin`);function I(e){return e.toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-|-$/g,``)}function L(e,t){if(!(e instanceof Error))return t;let n=e.message.trim();return n.length>0?n:t}async function R(e){let t=await e.json().catch(()=>null),n=h({error:p().optional(),message:p().optional()}).safeParse(t);return n.data?.error??n.data?.message??`Failed to complete bootstrap`}function z(){let e=o(),t=g(),n=i(),[a,m]=(0,A.useState)(`signin`),[z,B]=(0,A.useState)(!1),{redirect:V}=F.useSearch(),H=y(V),U=f(k()).data,W=U?.signupMode===`first-user`,G=W?`signup`:a,K=D({defaultValues:{email:``,password:``},resolver:O(M)}),q=D({defaultValues:{name:``,email:``,password:``},resolver:O(N)}),J=D({defaultValues:{email:``,name:``,organizationName:``,organizationSlug:``,password:``},resolver:O(P)}),Y=typeof window>`u`?`your-host`:window.location.host;async function X(t){B(!0);try{let r=await d.email({email:t.email,password:t.password});if(r.error){console.error(`[auth] sign-in failed`,{error:r.error}),K.setError(`root`,{message:r.error.message??`Invalid email or password`}),B(!1);return}await n.invalidate(),await e({to:H.path})}catch(e){console.error(`[auth] sign-in failed`,{error:e}),K.setError(`root`,{message:L(e,`Couldn't sign in right now. Try again.`)}),B(!1)}}async function Z(t){B(!0);try{let n=await u.email({email:t.email,name:t.name,password:t.password});if(n.error){console.error(`[auth] sign-up failed`,{error:n.error}),q.setError(`root`,{message:n.error.message??`Failed to create account`}),B(!1);return}await e({to:v(V)})}catch(e){console.error(`[auth] sign-up failed`,{error:e}),q.setError(`root`,{message:L(e,`Couldn't create your account right now. Try again.`)}),B(!1)}}async function Q(r){B(!0);try{let i=await fetch(`${s()}/api/bootstrap/complete`,{body:JSON.stringify(r),credentials:`include`,headers:{"content-type":`application/json`},method:`POST`});if(!i.ok){J.setError(`root`,{message:await R(i)}),B(!1);return}let a=h({bootstrap:h({organizationId:p().min(1)})}).safeParse(await i.json().catch(()=>null));if(!a.success){J.setError(`root`,{message:`Bootstrap completed, but the response was invalid`}),B(!1);return}let o=_({organizationId:a.data.bootstrap.organizationId,redirectPath:V});await t.invalidateQueries({queryKey:k().queryKey}),await n.invalidate({sync:!0}),await e({to:v(o)})}catch(e){console.error(`[auth] bootstrap failed`,{error:e}),J.setError(`root`,{message:L(e,`Couldn't finish setup right now. Try again.`)}),B(!1)}}function $(){W||(m(a===`signin`?`signup`:`signin`),K.reset(),q.reset())}let ee=J.watch(`organizationName`);return(0,j.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,j.jsxs)(`header`,{className:`flex h-14 items-center justify-between px-4 sm:px-6`,children:[(0,j.jsxs)(r,{to:`/`,className:`flex items-center gap-2`,children:[(0,j.jsx)(`div`,{className:`flex h-8 w-8 items-center justify-center rounded-md bg-foreground text-background font-bold`,children:`V`}),(0,j.jsx)(`span`,{className:`font-semibold text-base sm:text-lg`,children:`OneQuery`})]}),(0,j.jsx)(l,{})]}),(0,j.jsx)(`main`,{className:`flex flex-1 items-start justify-center px-4 pb-10 pt-12 sm:items-center sm:px-6 sm:py-6`,children:(0,j.jsxs)(E,{className:`w-full max-w-sm`,children:[(0,j.jsxs)(S,{className:`text-center`,children:[(0,j.jsx)(w,{className:`text-xl`,children:G===`signin`?`Sign in to OneQuery`:W?`Create the initial owner account`:`Create an account`}),(0,j.jsx)(T,{children:G===`signin`?`Enter your email and password to continue`:W?`Finish the first-run bootstrap by creating the owner account for this self-hosted server.`:U?.signupMode===`invite-only`?`Use the email address that received an invitation from your OneQuery admin.`:`Enter your details to get started`})]}),(0,j.jsx)(C,{children:G===`signin`?(0,j.jsxs)(`form`,{onSubmit:K.handleSubmit(X),className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`email`,children:`Email`}),(0,j.jsx)(b,{id:`email`,type:`email`,placeholder:`user@example.com`,autoComplete:`email`,...K.register(`email`)}),K.formState.errors.email&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:K.formState.errors.email.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`password`,children:`Password`}),(0,j.jsx)(b,{id:`password`,type:`password`,placeholder:`Enter your password`,autoComplete:`current-password`,...K.register(`password`)}),K.formState.errors.password&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:K.formState.errors.password.message})]}),K.formState.errors.root&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:K.formState.errors.root.message}),(0,j.jsx)(c,{type:`submit`,className:`w-full`,disabled:z,children:z?`Signing in...`:`Sign in`}),(0,j.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[U?.signupMode===`invite-only`?`Need an account? Ask an admin for an invitation, then use the invited email to sign up.`:`Don't have an account? `,U?.signupMode===`invite-only`?(0,j.jsx)(`button`,{type:`button`,onClick:$,className:`text-foreground underline underline-offset-4 hover:text-foreground/80`,children:`I have an invitation`}):(0,j.jsx)(`button`,{type:`button`,onClick:$,className:`text-foreground underline underline-offset-4 hover:text-foreground/80`,children:`Sign up`})]})]}):W?(0,j.jsxs)(`form`,{onSubmit:J.handleSubmit(Q),className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`bootstrap-name`,children:`Your name`}),(0,j.jsx)(b,{id:`bootstrap-name`,type:`text`,placeholder:`Jane Doe`,autoComplete:`name`,...J.register(`name`)}),J.formState.errors.name&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.name.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`bootstrap-email`,children:`Email`}),(0,j.jsx)(b,{id:`bootstrap-email`,type:`email`,placeholder:`owner@example.com`,autoComplete:`email`,...J.register(`email`)}),J.formState.errors.email&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.email.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`bootstrap-organization-name`,children:`Organization name`}),(0,j.jsx)(b,{id:`bootstrap-organization-name`,type:`text`,placeholder:`Acme Inc.`,...J.register(`organizationName`,{onChange:e=>{J.setValue(`organizationSlug`,I(e.target.value))}})}),J.formState.errors.organizationName&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.organizationName.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`bootstrap-organization-slug`,children:`URL slug`}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[Y,`/`]}),(0,j.jsx)(b,{id:`bootstrap-organization-slug`,placeholder:`acme`,...J.register(`organizationSlug`),className:`flex-1`})]}),J.formState.errors.organizationSlug&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.organizationSlug.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`bootstrap-password`,children:`Password`}),(0,j.jsx)(b,{id:`bootstrap-password`,type:`password`,placeholder:`Create a password`,autoComplete:`new-password`,...J.register(`password`)}),J.formState.errors.password&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.password.message})]}),J.formState.errors.root&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:J.formState.errors.root.message}),(0,j.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This setup screen is only available until the first owner account is created.`}),(0,j.jsx)(c,{type:`submit`,className:`w-full`,disabled:z||ee.trim().length===0,children:z?`Creating owner...`:`Create owner account`})]}):(0,j.jsxs)(`form`,{onSubmit:q.handleSubmit(Z),className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`name`,children:`Name`}),(0,j.jsx)(b,{id:`name`,type:`text`,placeholder:`John Doe`,autoComplete:`name`,...q.register(`name`)}),q.formState.errors.name&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:q.formState.errors.name.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`signup-email`,children:`Email`}),(0,j.jsx)(b,{id:`signup-email`,type:`email`,placeholder:`user@example.com`,autoComplete:`email`,...q.register(`email`)}),q.formState.errors.email&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:q.formState.errors.email.message})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(x,{htmlFor:`signup-password`,children:`Password`}),(0,j.jsx)(b,{id:`signup-password`,type:`password`,placeholder:`Create a password`,autoComplete:`new-password`,...q.register(`password`)}),q.formState.errors.password&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:q.formState.errors.password.message})]}),q.formState.errors.root&&(0,j.jsx)(`p`,{className:`text-sm text-destructive`,children:q.formState.errors.root.message}),U?.signupMode===`invite-only`?(0,j.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Account creation is limited to email addresses with a pending organization invitation.`}):null,(0,j.jsx)(c,{type:`submit`,className:`w-full`,disabled:z,children:z?`Creating account...`:W?`Create owner account`:`Create account`}),W?null:(0,j.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Already have an account?`,` `,(0,j.jsx)(`button`,{type:`button`,onClick:$,className:`text-foreground underline underline-offset-4 hover:text-foreground/80`,children:`Sign in`})]})]})})]})})]})}var B=z;export{B as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=10080*60*1e3;function t(t=new Date){let n=t.getTime();if(!Number.isFinite(n))throw Error(`Reference date must be valid`);return new Date(n+e)}var n=e=>typeof e==`object`&&!!e&&!Array.isArray(e);export{t as n,n as t};
|