@clerk/shared 3.30.0-snapshot.v20251103041116 → 3.30.0
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/dist/runtime/alternativePhoneCode.d.mts +1 -1
- package/dist/runtime/alternativePhoneCode.d.ts +1 -1
- package/dist/runtime/alternativePhoneCode.js.map +1 -1
- package/dist/runtime/alternativePhoneCode.mjs.map +1 -1
- package/dist/runtime/{apiUrlFromPublishableKey-CY46bNyR.js → apiUrlFromPublishableKey-Bjv-2nJ1.js} +2 -2
- package/dist/runtime/apiUrlFromPublishableKey-Bjv-2nJ1.js.map +1 -0
- package/dist/runtime/{apiUrlFromPublishableKey-BrEJDXM6.mjs → apiUrlFromPublishableKey-DFxUPTKg.mjs} +4 -4
- package/dist/runtime/apiUrlFromPublishableKey-DFxUPTKg.mjs.map +1 -0
- package/dist/runtime/{apiUrlFromPublishableKey-CEUyf_FP.d.ts → apiUrlFromPublishableKey-DOAlYzda.d.ts} +2 -2
- package/dist/runtime/apiUrlFromPublishableKey-DOAlYzda.d.ts.map +1 -0
- package/dist/runtime/{apiUrlFromPublishableKey-mDB2xBW0.d.mts → apiUrlFromPublishableKey-DnRaRFJ_.d.mts} +2 -2
- package/dist/runtime/apiUrlFromPublishableKey-DnRaRFJ_.d.mts.map +1 -0
- package/dist/runtime/apiUrlFromPublishableKey.d.mts +1 -1
- package/dist/runtime/apiUrlFromPublishableKey.d.ts +1 -1
- package/dist/runtime/apiUrlFromPublishableKey.js +2 -2
- package/dist/runtime/apiUrlFromPublishableKey.mjs +5 -5
- package/dist/runtime/authorization-CJB1hjGu.js.map +1 -1
- package/dist/runtime/{authorization-DslZKDr7.mjs → authorization-XX4mKaAz.mjs} +2 -2
- package/dist/runtime/authorization-XX4mKaAz.mjs.map +1 -0
- package/dist/runtime/{authorization-errors-BmyMJ_xr.mjs → authorization-errors-CS1pNy8i.mjs} +2 -2
- package/dist/runtime/authorization-errors-CS1pNy8i.mjs.map +1 -0
- package/dist/runtime/authorization-errors-dSnD6mpz.js.map +1 -1
- package/dist/runtime/authorization-errors.d.mts +1 -1
- package/dist/runtime/authorization-errors.d.mts.map +1 -1
- package/dist/runtime/authorization-errors.d.ts +1 -1
- package/dist/runtime/authorization-errors.d.ts.map +1 -1
- package/dist/runtime/authorization-errors.mjs +1 -1
- package/dist/runtime/authorization.d.mts +1 -1
- package/dist/runtime/authorization.d.mts.map +1 -1
- package/dist/runtime/authorization.d.ts +1 -1
- package/dist/runtime/authorization.d.ts.map +1 -1
- package/dist/runtime/authorization.mjs +1 -1
- package/dist/runtime/{browser-PBKCCO2m.d.mts → browser-BZxfK_h9.d.mts} +2 -2
- package/dist/runtime/{browser-PBKCCO2m.d.mts.map → browser-BZxfK_h9.d.mts.map} +1 -1
- package/dist/runtime/{browser-Dnks5mlF.d.ts → browser-CT1g0w-N.d.ts} +2 -2
- package/dist/runtime/{browser-Dnks5mlF.d.ts.map → browser-CT1g0w-N.d.ts.map} +1 -1
- package/dist/runtime/{browser-Ch5Nzweq.js → browser-DJuTPwze.js} +6 -4
- package/dist/runtime/browser-DJuTPwze.js.map +1 -0
- package/dist/runtime/{browser-CSZli54M.mjs → browser-hvvxjQRr.mjs} +7 -5
- package/dist/runtime/browser-hvvxjQRr.mjs.map +1 -0
- package/dist/runtime/browser.d.mts +1 -1
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/browser.js +1 -1
- package/dist/runtime/browser.mjs +1 -1
- package/dist/runtime/buildAccountsBaseUrl.js +2 -1
- package/dist/runtime/buildAccountsBaseUrl.js.map +1 -1
- package/dist/runtime/buildAccountsBaseUrl.mjs +2 -1
- package/dist/runtime/buildAccountsBaseUrl.mjs.map +1 -1
- package/dist/runtime/{chunk-yMphLNIk.js → chunk-C_dlxeql.js} +1 -3
- package/dist/runtime/clerkEventBus.d.mts +1 -1
- package/dist/runtime/clerkEventBus.d.ts +1 -1
- package/dist/runtime/clerkEventBus.js +1 -1
- package/dist/runtime/clerkEventBus.js.map +1 -1
- package/dist/runtime/clerkEventBus.mjs +1 -1
- package/dist/runtime/clerkEventBus.mjs.map +1 -1
- package/dist/runtime/{color-D19NgqOS.mjs → color-BKHR7Z5r.mjs} +10 -6
- package/dist/runtime/color-BKHR7Z5r.mjs.map +1 -0
- package/dist/runtime/{color-BHugulfx.js → color-CUlAHjgk.js} +9 -5
- package/dist/runtime/color-CUlAHjgk.js.map +1 -0
- package/dist/runtime/{color-Dm3uD4f6.d.ts → color-Dfs0eUif.d.ts} +3 -3
- package/dist/runtime/{color-Dm3uD4f6.d.ts.map → color-Dfs0eUif.d.ts.map} +1 -1
- package/dist/runtime/{color-CzOBZs96.d.mts → color-ig-dxolK.d.mts} +3 -3
- package/dist/runtime/{color-CzOBZs96.d.mts.map → color-ig-dxolK.d.mts.map} +1 -1
- package/dist/runtime/color.d.mts +2 -2
- package/dist/runtime/color.d.ts +2 -2
- package/dist/runtime/color.js +1 -1
- package/dist/runtime/color.mjs +1 -1
- package/dist/runtime/constants-B8tEdUlH.js.map +1 -1
- package/dist/runtime/{constants-Bp0qtelQ.mjs → constants-ByUssRbE.mjs} +2 -2
- package/dist/runtime/constants-ByUssRbE.mjs.map +1 -0
- package/dist/runtime/{constants-BcofaOQm.d.mts → constants-DOglH9d9.d.mts} +2 -2
- package/dist/runtime/{constants-BcofaOQm.d.mts.map → constants-DOglH9d9.d.mts.map} +1 -1
- package/dist/runtime/{constants-Do5-U5wF.d.ts → constants-DP5-fAPw.d.ts} +2 -2
- package/dist/runtime/{constants-Do5-U5wF.d.ts.map → constants-DP5-fAPw.d.ts.map} +1 -1
- package/dist/runtime/constants.d.mts +1 -1
- package/dist/runtime/constants.d.ts +1 -1
- package/dist/runtime/constants.mjs +1 -1
- package/dist/runtime/cookie.js +2 -3
- package/dist/runtime/cookie.js.map +1 -1
- package/dist/runtime/cookie.mjs.map +1 -1
- package/dist/runtime/{createDeferredPromise-Bgc5FoG6.mjs → createDeferredPromise-UKTFg5ib.mjs} +8 -7
- package/dist/runtime/{createDeferredPromise-Bgc5FoG6.mjs.map → createDeferredPromise-UKTFg5ib.mjs.map} +1 -1
- package/dist/runtime/{createDeferredPromise-BgvUcqYv.js → createDeferredPromise-qVNWqG9g.js} +6 -5
- package/dist/runtime/{createDeferredPromise-BgvUcqYv.js.map → createDeferredPromise-qVNWqG9g.js.map} +1 -1
- package/dist/runtime/{date-DSP_ZkyV.mjs → date-B6mK5i-_.mjs} +6 -5
- package/dist/runtime/date-B6mK5i-_.mjs.map +1 -0
- package/dist/runtime/{date-DNGgJHFN.js → date-C3XsmxKq.js} +5 -4
- package/dist/runtime/date-C3XsmxKq.js.map +1 -0
- package/dist/runtime/{date-DwskwSsr.d.ts → date-DDNRUU0r.d.ts} +2 -2
- package/dist/runtime/{date-DwskwSsr.d.ts.map → date-DDNRUU0r.d.ts.map} +1 -1
- package/dist/runtime/{date-DXASI50t.d.mts → date-zJX4Bh-h.d.mts} +2 -2
- package/dist/runtime/{date-DXASI50t.d.mts.map → date-zJX4Bh-h.d.mts.map} +1 -1
- package/dist/runtime/date.d.mts +1 -1
- package/dist/runtime/date.d.ts +1 -1
- package/dist/runtime/date.js +1 -1
- package/dist/runtime/date.mjs +1 -1
- package/dist/runtime/{deprecated-Cu0VCYMa.d.ts → deprecated-BnVl0yxv.d.ts} +2 -2
- package/dist/runtime/{deprecated-Cu0VCYMa.d.ts.map → deprecated-BnVl0yxv.d.ts.map} +1 -1
- package/dist/runtime/{deprecated-5YowWRtd.mjs → deprecated-CFM4jPRM.mjs} +4 -4
- package/dist/runtime/deprecated-CFM4jPRM.mjs.map +1 -0
- package/dist/runtime/{deprecated-B-fX5ZX6.js → deprecated-DXforbxJ.js} +2 -2
- package/dist/runtime/deprecated-DXforbxJ.js.map +1 -0
- package/dist/runtime/{deprecated-Do4C0Ve_.d.mts → deprecated-RhqbBb4P.d.mts} +2 -2
- package/dist/runtime/{deprecated-Do4C0Ve_.d.mts.map → deprecated-RhqbBb4P.d.mts.map} +1 -1
- package/dist/runtime/deprecated.d.mts +1 -1
- package/dist/runtime/deprecated.d.ts +1 -1
- package/dist/runtime/deprecated.js +1 -1
- package/dist/runtime/deprecated.mjs +2 -2
- package/dist/runtime/{deriveState-B0JG4g-j.mjs → deriveState-BwW5Y_o5.mjs} +20 -11
- package/dist/runtime/deriveState-BwW5Y_o5.mjs.map +1 -0
- package/dist/runtime/{deriveState-C6Mqjota.d.ts → deriveState-D-IlGS88.d.mts} +3 -3
- package/dist/runtime/{deriveState-26C8bypM.d.mts.map → deriveState-D-IlGS88.d.mts.map} +1 -1
- package/dist/runtime/{deriveState-26C8bypM.d.mts → deriveState-DI7o97zB.d.ts} +3 -3
- package/dist/runtime/{deriveState-C6Mqjota.d.ts.map → deriveState-DI7o97zB.d.ts.map} +1 -1
- package/dist/runtime/{deriveState-Bsd1S6r4.js → deriveState-Dmgui85U.js} +19 -10
- package/dist/runtime/deriveState-Dmgui85U.js.map +1 -0
- package/dist/runtime/deriveState.d.mts +2 -2
- package/dist/runtime/deriveState.d.ts +2 -2
- package/dist/runtime/deriveState.js +1 -1
- package/dist/runtime/deriveState.mjs +1 -1
- package/dist/runtime/{devBrowser-CZKhXv5v.d.mts → devBrowser-BaOZgb06.d.mts} +2 -2
- package/dist/runtime/{devBrowser-CZKhXv5v.d.mts.map → devBrowser-BaOZgb06.d.mts.map} +1 -1
- package/dist/runtime/{devBrowser-DGSLF_56.js → devBrowser-DwTLFX_-.js} +3 -2
- package/dist/runtime/devBrowser-DwTLFX_-.js.map +1 -0
- package/dist/runtime/{devBrowser-CmraQpMt.d.ts → devBrowser-ezvLE7uo.d.ts} +2 -2
- package/dist/runtime/{devBrowser-CmraQpMt.d.ts.map → devBrowser-ezvLE7uo.d.ts.map} +1 -1
- package/dist/runtime/{devBrowser-CZTqhFrD.mjs → devBrowser-tYnimKYY.mjs} +4 -3
- package/dist/runtime/devBrowser-tYnimKYY.mjs.map +1 -0
- package/dist/runtime/devBrowser.d.mts +1 -1
- package/dist/runtime/devBrowser.d.ts +1 -1
- package/dist/runtime/devBrowser.js +1 -1
- package/dist/runtime/devBrowser.mjs +1 -1
- package/dist/runtime/dom/index.d.mts +1 -1
- package/dist/runtime/dom/index.d.ts +1 -1
- package/dist/runtime/dom/index.mjs +1 -1
- package/dist/runtime/dom/waitForElement.d.mts +1 -1
- package/dist/runtime/dom/waitForElement.d.ts +1 -1
- package/dist/runtime/dom/waitForElement.mjs +1 -1
- package/dist/runtime/{error-Dy2SiVmF.mjs → error-B2RA62bv.mjs} +12 -5
- package/dist/runtime/error-B2RA62bv.mjs.map +1 -0
- package/dist/runtime/{error-DmyHwAOc.js → error-B8rjBHwB.js} +11 -4
- package/dist/runtime/error-B8rjBHwB.js.map +1 -0
- package/dist/runtime/{error-DX6s8CXH.d.mts → error-DjHvv43D.d.mts} +12 -12
- package/dist/runtime/error-DjHvv43D.d.mts.map +1 -0
- package/dist/runtime/{error-C1JsGDzp.d.ts → error-WLSHKIH9.d.ts} +12 -12
- package/dist/runtime/error-WLSHKIH9.d.ts.map +1 -0
- package/dist/runtime/error.d.mts +2 -2
- package/dist/runtime/error.d.ts +2 -2
- package/dist/runtime/error.js +1 -1
- package/dist/runtime/error.mjs +1 -1
- package/dist/runtime/{eventBus-CvrvDGDL.mjs → eventBus-BcGgxxPn.mjs} +5 -5
- package/dist/runtime/{eventBus-CvrvDGDL.mjs.map → eventBus-BcGgxxPn.mjs.map} +1 -1
- package/dist/runtime/{eventBus-DwIqUhlf.js → eventBus-Br28g2jP.js} +4 -4
- package/dist/runtime/{eventBus-DwIqUhlf.js.map → eventBus-Br28g2jP.js.map} +1 -1
- package/dist/runtime/eventBus.d.mts.map +1 -1
- package/dist/runtime/eventBus.d.ts.map +1 -1
- package/dist/runtime/eventBus.js +1 -1
- package/dist/runtime/eventBus.mjs +1 -1
- package/dist/runtime/{file-DdqXckd-.d.ts → file-B_f0oD8h.d.ts} +2 -2
- package/dist/runtime/{file-DdqXckd-.d.ts.map → file-B_f0oD8h.d.ts.map} +1 -1
- package/dist/runtime/{file-BN-3wQc7.mjs → file-C0BFy6W1.mjs} +4 -3
- package/dist/runtime/file-C0BFy6W1.mjs.map +1 -0
- package/dist/runtime/{file-CLbjMOtb.js → file-COwNkc7n.js} +3 -2
- package/dist/runtime/file-COwNkc7n.js.map +1 -0
- package/dist/runtime/{file-CL_6tFT0.d.mts → file-REpQjIf5.d.mts} +2 -2
- package/dist/runtime/{file-CL_6tFT0.d.mts.map → file-REpQjIf5.d.mts.map} +1 -1
- package/dist/runtime/file.d.mts +1 -1
- package/dist/runtime/file.d.ts +1 -1
- package/dist/runtime/file.js +1 -1
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/{getEnvVariable-CGauWqhQ.mjs → getEnvVariable-BSXrgsT3.mjs} +2 -2
- package/dist/runtime/getEnvVariable-BSXrgsT3.mjs.map +1 -0
- package/dist/runtime/{getEnvVariable-hWcrOrGN.d.ts → getEnvVariable-BcT_PqmA.d.ts} +2 -2
- package/dist/runtime/getEnvVariable-BcT_PqmA.d.ts.map +1 -0
- package/dist/runtime/{getEnvVariable-BBmyrE42.js → getEnvVariable-CWQ3x95R.js} +1 -2
- package/dist/runtime/getEnvVariable-CWQ3x95R.js.map +1 -0
- package/dist/runtime/{getEnvVariable-5D5Bn9Xr.d.mts → getEnvVariable-DSWxcBzg.d.mts} +2 -2
- package/dist/runtime/getEnvVariable-DSWxcBzg.d.mts.map +1 -0
- package/dist/runtime/getEnvVariable.d.mts +1 -1
- package/dist/runtime/getEnvVariable.d.ts +1 -1
- package/dist/runtime/getEnvVariable.js +1 -1
- package/dist/runtime/getEnvVariable.mjs +1 -1
- package/dist/runtime/globs.d.mts.map +1 -1
- package/dist/runtime/globs.d.ts.map +1 -1
- package/dist/runtime/globs.js +2 -3
- package/dist/runtime/globs.js.map +1 -1
- package/dist/runtime/globs.mjs.map +1 -1
- package/dist/runtime/{handleValueOrFn-KR1byaCL.js → handleValueOrFn--vEw4xcO.js} +2 -1
- package/dist/runtime/handleValueOrFn--vEw4xcO.js.map +1 -0
- package/dist/runtime/{handleValueOrFn-xtFks4pT.d.ts → handleValueOrFn-BpIDq7Ek.d.ts} +2 -2
- package/dist/runtime/{handleValueOrFn-xtFks4pT.d.ts.map → handleValueOrFn-BpIDq7Ek.d.ts.map} +1 -1
- package/dist/runtime/{handleValueOrFn-BNKfPZXV.mjs → handleValueOrFn-C3bdLKGZ.mjs} +3 -2
- package/dist/runtime/handleValueOrFn-C3bdLKGZ.mjs.map +1 -0
- package/dist/runtime/{handleValueOrFn-miIP9HYO.d.mts → handleValueOrFn-DDzNVpWF.d.mts} +2 -2
- package/dist/runtime/{handleValueOrFn-miIP9HYO.d.mts.map → handleValueOrFn-DDzNVpWF.d.mts.map} +1 -1
- package/dist/runtime/handleValueOrFn.d.mts +3 -3
- package/dist/runtime/handleValueOrFn.d.mts.map +1 -1
- package/dist/runtime/handleValueOrFn.d.ts +3 -3
- package/dist/runtime/handleValueOrFn.d.ts.map +1 -1
- package/dist/runtime/handleValueOrFn.js +3 -3
- package/dist/runtime/handleValueOrFn.js.map +1 -1
- package/dist/runtime/handleValueOrFn.mjs +3 -3
- package/dist/runtime/handleValueOrFn.mjs.map +1 -1
- package/dist/runtime/{index-CQa1qZgJ.d.mts → index-BcEh__ny.d.ts} +2 -2
- package/dist/runtime/index-BcEh__ny.d.ts.map +1 -0
- package/dist/runtime/{index-DPR1fUWZ.d.mts → index-Cc1Hn1M-.d.mts} +2 -2
- package/dist/runtime/{index-DPR1fUWZ.d.mts.map → index-Cc1Hn1M-.d.mts.map} +1 -1
- package/dist/runtime/{index-BWZyc9Ij.d.mts → index-Cq2zCNhv.d.mts} +2 -2
- package/dist/runtime/{index-BWZyc9Ij.d.mts.map → index-Cq2zCNhv.d.mts.map} +1 -1
- package/dist/runtime/{index-hbtcP5V-.d.ts → index-DcfXAwQx.d.ts} +2 -2
- package/dist/runtime/{index-hbtcP5V-.d.ts.map → index-DcfXAwQx.d.ts.map} +1 -1
- package/dist/runtime/{index-C_bsKxan.d.ts → index-amNuj7c6.d.mts} +2 -2
- package/dist/runtime/index-amNuj7c6.d.mts.map +1 -0
- package/dist/runtime/{index-CZ2uCmT-.d.ts → index-z_SguuaJ.d.ts} +2 -2
- package/dist/runtime/{index-CZ2uCmT-.d.ts.map → index-z_SguuaJ.d.ts.map} +1 -1
- package/dist/runtime/index.d.mts +30 -30
- package/dist/runtime/index.d.ts +30 -30
- package/dist/runtime/index.js +24 -24
- package/dist/runtime/index.mjs +35 -35
- package/dist/runtime/instance-CDcvbQik.js.map +1 -1
- package/dist/runtime/{instance-B9sghgF1.mjs → instance-DOysmj3a.mjs} +2 -2
- package/dist/runtime/instance-DOysmj3a.mjs.map +1 -0
- package/dist/runtime/isomorphicAtob-Chnw1Md3.js.map +1 -1
- package/dist/runtime/{isomorphicAtob-Dc_r7YK5.d.mts → isomorphicAtob-CjUFU8Gx.d.mts} +2 -2
- package/dist/runtime/isomorphicAtob-CjUFU8Gx.d.mts.map +1 -0
- package/dist/runtime/{isomorphicAtob-JRA09t0F.d.ts → isomorphicAtob-D61jyCi3.d.ts} +2 -2
- package/dist/runtime/isomorphicAtob-D61jyCi3.d.ts.map +1 -0
- package/dist/runtime/{isomorphicAtob-CYR5fxvZ.mjs → isomorphicAtob-DybBXGFR.mjs} +2 -2
- package/dist/runtime/isomorphicAtob-DybBXGFR.mjs.map +1 -0
- package/dist/runtime/isomorphicAtob.d.mts +1 -1
- package/dist/runtime/isomorphicAtob.d.ts +1 -1
- package/dist/runtime/isomorphicAtob.mjs +1 -1
- package/dist/runtime/{isomorphicBtoa-ZCyCjGVs.d.mts → isomorphicBtoa-CrWZNFLW.d.mts} +2 -2
- package/dist/runtime/isomorphicBtoa-CrWZNFLW.d.mts.map +1 -0
- package/dist/runtime/{isomorphicBtoa-B_bxXEIA.d.ts → isomorphicBtoa-DZZ0MKdz.d.ts} +2 -2
- package/dist/runtime/isomorphicBtoa-DZZ0MKdz.d.ts.map +1 -0
- package/dist/runtime/{isomorphicBtoa-Db71q4D6.mjs → isomorphicBtoa-Dr7WubZv.mjs} +2 -2
- package/dist/runtime/isomorphicBtoa-Dr7WubZv.mjs.map +1 -0
- package/dist/runtime/isomorphicBtoa-oWNvIgSP.js.map +1 -1
- package/dist/runtime/isomorphicBtoa.d.mts +1 -1
- package/dist/runtime/isomorphicBtoa.d.ts +1 -1
- package/dist/runtime/isomorphicBtoa.mjs +1 -1
- package/dist/runtime/jwtPayloadParser.d.mts +1 -1
- package/dist/runtime/jwtPayloadParser.d.ts +1 -1
- package/dist/runtime/jwtPayloadParser.js +4 -2
- package/dist/runtime/jwtPayloadParser.js.map +1 -1
- package/dist/runtime/jwtPayloadParser.mjs +5 -3
- package/dist/runtime/jwtPayloadParser.mjs.map +1 -1
- package/dist/runtime/{keys-G53jgvdc.d.mts → keys-19mU2l8n.d.mts} +3 -3
- package/dist/runtime/{keys-G53jgvdc.d.mts.map → keys-19mU2l8n.d.mts.map} +1 -1
- package/dist/runtime/{keys-B-vj3ArI.d.ts → keys-BBK3UwBd.d.ts} +3 -3
- package/dist/runtime/{keys-B-vj3ArI.d.ts.map → keys-BBK3UwBd.d.ts.map} +1 -1
- package/dist/runtime/{keys-wr08qE7Y.js → keys-CHdYWeEj.js} +11 -6
- package/dist/runtime/keys-CHdYWeEj.js.map +1 -0
- package/dist/runtime/{keys-BGyzAyGu.mjs → keys-Dcilj3cS.mjs} +15 -10
- package/dist/runtime/keys-Dcilj3cS.mjs.map +1 -0
- package/dist/runtime/keys.d.mts +2 -2
- package/dist/runtime/keys.d.ts +2 -2
- package/dist/runtime/keys.js +1 -1
- package/dist/runtime/keys.mjs +4 -4
- package/dist/runtime/{loadClerkJsScript-Bifh0xaY.d.mts → loadClerkJsScript-AhXbYN1K.d.mts} +3 -3
- package/dist/runtime/loadClerkJsScript-AhXbYN1K.d.mts.map +1 -0
- package/dist/runtime/{loadClerkJsScript-BtuUk22T.js → loadClerkJsScript-B93q_7Ur.js} +8 -7
- package/dist/runtime/loadClerkJsScript-B93q_7Ur.js.map +1 -0
- package/dist/runtime/{loadClerkJsScript-BbP0bwey.mjs → loadClerkJsScript-BkGa2mFX.mjs} +10 -9
- package/dist/runtime/loadClerkJsScript-BkGa2mFX.mjs.map +1 -0
- package/dist/runtime/{loadClerkJsScript-BOokryTM.d.ts → loadClerkJsScript-CZWYd9kd.d.ts} +3 -3
- package/dist/runtime/loadClerkJsScript-CZWYd9kd.d.ts.map +1 -0
- package/dist/runtime/loadClerkJsScript.d.mts +2 -2
- package/dist/runtime/loadClerkJsScript.d.ts +2 -2
- package/dist/runtime/loadClerkJsScript.js +6 -6
- package/dist/runtime/loadClerkJsScript.mjs +12 -12
- package/dist/runtime/{loadScript-Cto6wpZS.d.ts → loadScript-BPX0RAWu.d.ts} +2 -2
- package/dist/runtime/{loadScript-Cto6wpZS.d.ts.map → loadScript-BPX0RAWu.d.ts.map} +1 -1
- package/dist/runtime/{loadScript-CWAtpo-p.mjs → loadScript-Bll0Ohcb.mjs} +4 -4
- package/dist/runtime/loadScript-Bll0Ohcb.mjs.map +1 -0
- package/dist/runtime/{loadScript-D8zceEj8.js → loadScript-CRbXHvGF.js} +2 -2
- package/dist/runtime/loadScript-CRbXHvGF.js.map +1 -0
- package/dist/runtime/{loadScript-rqBGOE2l.d.mts → loadScript-pn9tVsQH.d.mts} +2 -2
- package/dist/runtime/{loadScript-rqBGOE2l.d.mts.map → loadScript-pn9tVsQH.d.mts.map} +1 -1
- package/dist/runtime/loadScript.d.mts +1 -1
- package/dist/runtime/loadScript.d.ts +1 -1
- package/dist/runtime/loadScript.js +1 -1
- package/dist/runtime/loadScript.mjs +2 -2
- package/dist/runtime/{localStorageBroadcastChannel-v7zxR26a.d.mts → localStorageBroadcastChannel-6RgxS6Gn.d.mts} +2 -2
- package/dist/runtime/{localStorageBroadcastChannel-v7zxR26a.d.mts.map → localStorageBroadcastChannel-6RgxS6Gn.d.mts.map} +1 -1
- package/dist/runtime/{localStorageBroadcastChannel-Bgbc3aUe.js → localStorageBroadcastChannel-BSJY81in.js} +2 -2
- package/dist/runtime/localStorageBroadcastChannel-BSJY81in.js.map +1 -0
- package/dist/runtime/{localStorageBroadcastChannel-3y9Jbk0V.d.ts → localStorageBroadcastChannel-BSisnDfR.d.ts} +2 -2
- package/dist/runtime/{localStorageBroadcastChannel-3y9Jbk0V.d.ts.map → localStorageBroadcastChannel-BSisnDfR.d.ts.map} +1 -1
- package/dist/runtime/{localStorageBroadcastChannel-DoowNgS3.mjs → localStorageBroadcastChannel-sPutPiqo.mjs} +3 -3
- package/dist/runtime/localStorageBroadcastChannel-sPutPiqo.mjs.map +1 -0
- package/dist/runtime/localStorageBroadcastChannel.d.mts +1 -1
- package/dist/runtime/localStorageBroadcastChannel.d.ts +1 -1
- package/dist/runtime/localStorageBroadcastChannel.js +2 -2
- package/dist/runtime/localStorageBroadcastChannel.mjs +3 -3
- package/dist/runtime/{logger-i7rYANU9.d.ts → logger-CWWjPZMR.d.ts} +2 -2
- package/dist/runtime/logger-CWWjPZMR.d.ts.map +1 -0
- package/dist/runtime/{logger-Dv_S1aDO.js → logger-CcFDMizk.js} +2 -2
- package/dist/runtime/logger-CcFDMizk.js.map +1 -0
- package/dist/runtime/{logger-SMMEBPOB.mjs → logger-DmtxRp_g.mjs} +3 -3
- package/dist/runtime/logger-DmtxRp_g.mjs.map +1 -0
- package/dist/runtime/{logger-Dug9WfZ-.d.mts → logger-Dt3NshH5.d.mts} +2 -2
- package/dist/runtime/logger-Dt3NshH5.d.mts.map +1 -0
- package/dist/runtime/logger.d.mts +1 -1
- package/dist/runtime/logger.d.ts +1 -1
- package/dist/runtime/logger.js +1 -1
- package/dist/runtime/logger.mjs +1 -1
- package/dist/runtime/{netlifyCacheHandler-DibubjcU.d.mts → netlifyCacheHandler-CGIrch8G.d.mts} +2 -2
- package/dist/runtime/netlifyCacheHandler-CGIrch8G.d.mts.map +1 -0
- package/dist/runtime/{netlifyCacheHandler-CGV6jGfB.js → netlifyCacheHandler-D1MSkiyk.js} +4 -3
- package/dist/runtime/netlifyCacheHandler-D1MSkiyk.js.map +1 -0
- package/dist/runtime/{netlifyCacheHandler-BvN9315t.d.ts → netlifyCacheHandler-Di70sUEE.d.ts} +2 -2
- package/dist/runtime/netlifyCacheHandler-Di70sUEE.d.ts.map +1 -0
- package/dist/runtime/{netlifyCacheHandler-BTbE45Yv.mjs → netlifyCacheHandler-Fbxnlay6.mjs} +5 -4
- package/dist/runtime/{netlifyCacheHandler-BTbE45Yv.mjs.map → netlifyCacheHandler-Fbxnlay6.mjs.map} +1 -1
- package/dist/runtime/netlifyCacheHandler.d.mts +1 -1
- package/dist/runtime/netlifyCacheHandler.d.ts +1 -1
- package/dist/runtime/netlifyCacheHandler.js +2 -2
- package/dist/runtime/netlifyCacheHandler.mjs +5 -5
- package/dist/runtime/{noop-D4EW5c4i.mjs → noop-8bk75rVj.mjs} +2 -2
- package/dist/runtime/{noop-D4EW5c4i.mjs.map → noop-8bk75rVj.mjs.map} +1 -1
- package/dist/runtime/noop-Bi5xtB31.js.map +1 -1
- package/dist/runtime/oauth.d.mts +1 -1
- package/dist/runtime/oauth.d.ts +1 -1
- package/dist/runtime/oauth.js.map +1 -1
- package/dist/runtime/oauth.mjs.map +1 -1
- package/dist/runtime/{object-ClRncbvo.d.ts → object-5d8ACLdH.d.ts} +2 -2
- package/dist/runtime/{object-ClRncbvo.d.ts.map → object-5d8ACLdH.d.ts.map} +1 -1
- package/dist/runtime/{object-BS_KT1Ih.mjs → object-Be3MMNTQ.mjs} +2 -2
- package/dist/runtime/object-Be3MMNTQ.mjs.map +1 -0
- package/dist/runtime/object-DrKQtwRq.js.map +1 -1
- package/dist/runtime/{object-DA_yEJmv.d.mts → object-rOX3tIZ7.d.mts} +2 -2
- package/dist/runtime/{object-DA_yEJmv.d.mts.map → object-rOX3tIZ7.d.mts.map} +1 -1
- package/dist/runtime/object.d.mts +1 -1
- package/dist/runtime/object.d.ts +1 -1
- package/dist/runtime/object.mjs +1 -1
- package/dist/runtime/organization-CdNRqdLj.js.map +1 -1
- package/dist/runtime/{organization-CLYKtC4A.mjs → organization-D9SEGukq.mjs} +2 -2
- package/dist/runtime/organization-D9SEGukq.mjs.map +1 -0
- package/dist/runtime/organization.d.mts +1 -1
- package/dist/runtime/organization.d.ts +1 -1
- package/dist/runtime/organization.mjs +1 -1
- package/dist/runtime/{pathMatcher-zrkXHK5L.d.ts → pathMatcher-BT1s_FDj.d.ts} +3 -3
- package/dist/runtime/{pathMatcher-zrkXHK5L.d.ts.map → pathMatcher-BT1s_FDj.d.ts.map} +1 -1
- package/dist/runtime/{pathMatcher-Co1RhryO.js → pathMatcher-BhJ0wlUt.js} +4 -3
- package/dist/runtime/pathMatcher-BhJ0wlUt.js.map +1 -0
- package/dist/runtime/{pathMatcher-BWMTH22C.d.mts → pathMatcher-C4w3rgsH.d.mts} +3 -3
- package/dist/runtime/{pathMatcher-BWMTH22C.d.mts.map → pathMatcher-C4w3rgsH.d.mts.map} +1 -1
- package/dist/runtime/{pathMatcher-COQW187f.mjs → pathMatcher-CD_CcUjS.mjs} +5 -4
- package/dist/runtime/pathMatcher-CD_CcUjS.mjs.map +1 -0
- package/dist/runtime/pathMatcher.d.mts +2 -2
- package/dist/runtime/pathMatcher.d.ts +2 -2
- package/dist/runtime/pathMatcher.js +2 -2
- package/dist/runtime/pathMatcher.mjs +2 -2
- package/dist/runtime/{pathToRegexp-DNM_UlMK.js → pathToRegexp-DqVOlvi0.js} +5 -4
- package/dist/runtime/pathToRegexp-DqVOlvi0.js.map +1 -0
- package/dist/runtime/{pathToRegexp-EuYtsd3y.mjs → pathToRegexp-cujoshIK.mjs} +6 -5
- package/dist/runtime/pathToRegexp-cujoshIK.mjs.map +1 -0
- package/dist/runtime/pathToRegexp.d.mts.map +1 -1
- package/dist/runtime/pathToRegexp.d.ts.map +1 -1
- package/dist/runtime/pathToRegexp.js +1 -1
- package/dist/runtime/pathToRegexp.mjs +1 -1
- package/dist/runtime/{poller-x9-KSCex.d.ts → poller-CIrx6NwR.d.ts} +2 -2
- package/dist/runtime/{poller-x9-KSCex.d.ts.map → poller-CIrx6NwR.d.ts.map} +1 -1
- package/dist/runtime/{poller-BB3eTe-Z.d.mts → poller-Cn-a74Uo.d.mts} +2 -2
- package/dist/runtime/{poller-BB3eTe-Z.d.mts.map → poller-Cn-a74Uo.d.mts.map} +1 -1
- package/dist/runtime/{poller-DjvU24N5.mjs → poller-Co9NmMWr.mjs} +3 -3
- package/dist/runtime/{poller-DjvU24N5.mjs.map → poller-Co9NmMWr.mjs.map} +1 -1
- package/dist/runtime/{poller-CVTUNwuX.js → poller-QBwri4RY.js} +2 -2
- package/dist/runtime/poller-QBwri4RY.js.map +1 -0
- package/dist/runtime/poller.d.mts +1 -1
- package/dist/runtime/poller.d.ts +1 -1
- package/dist/runtime/poller.js +2 -2
- package/dist/runtime/poller.mjs +3 -3
- package/dist/runtime/proxy-B_Yui2Mf.js.map +1 -1
- package/dist/runtime/{proxy-Cw3rAt0M.mjs → proxy-Bq8EHApG.mjs} +2 -2
- package/dist/runtime/proxy-Bq8EHApG.mjs.map +1 -0
- package/dist/runtime/{proxy-Cvn8UjHB.d.ts → proxy-QCdxwhZi.d.ts} +2 -2
- package/dist/runtime/{proxy-Cvn8UjHB.d.ts.map → proxy-QCdxwhZi.d.ts.map} +1 -1
- package/dist/runtime/{proxy-Cc2RAGJI.d.mts → proxy-qCuO73U4.d.mts} +2 -2
- package/dist/runtime/{proxy-Cc2RAGJI.d.mts.map → proxy-qCuO73U4.d.mts.map} +1 -1
- package/dist/runtime/proxy.d.mts +1 -1
- package/dist/runtime/proxy.d.ts +1 -1
- package/dist/runtime/proxy.mjs +1 -1
- package/dist/runtime/react/index.d.mts +30 -30
- package/dist/runtime/react/index.d.mts.map +1 -1
- package/dist/runtime/react/index.d.ts +30 -30
- package/dist/runtime/react/index.d.ts.map +1 -1
- package/dist/runtime/react/index.js +143 -93
- package/dist/runtime/react/index.js.map +1 -1
- package/dist/runtime/react/index.mjs +146 -93
- package/dist/runtime/react/index.mjs.map +1 -1
- package/dist/runtime/{retry-D-2K5OKd.mjs → retry-DAlTROH9.mjs} +2 -2
- package/dist/runtime/retry-DAlTROH9.mjs.map +1 -0
- package/dist/runtime/retry-rhkPbMCS.js.map +1 -1
- package/dist/runtime/retry.mjs +1 -1
- package/dist/runtime/router.d.mts +1 -1
- package/dist/runtime/router.d.mts.map +1 -1
- package/dist/runtime/router.d.ts +1 -1
- package/dist/runtime/router.d.ts.map +1 -1
- package/dist/runtime/router.js +10 -6
- package/dist/runtime/router.js.map +1 -1
- package/dist/runtime/router.mjs +10 -5
- package/dist/runtime/router.mjs.map +1 -1
- package/dist/runtime/runtimeEnvironment-MfBG-86q.js.map +1 -1
- package/dist/runtime/{runtimeEnvironment-CIK_mM28.mjs → runtimeEnvironment-aTp6aZUT.mjs} +2 -2
- package/dist/runtime/{runtimeEnvironment-CIK_mM28.mjs.map → runtimeEnvironment-aTp6aZUT.mjs.map} +1 -1
- package/dist/runtime/saml.d.mts +1 -1
- package/dist/runtime/saml.d.ts +1 -1
- package/dist/runtime/saml.js.map +1 -1
- package/dist/runtime/saml.mjs.map +1 -1
- package/dist/runtime/{telemetry-DKa_Z2f1.js → telemetry-6CzUREWH.js} +17 -10
- package/dist/runtime/telemetry-6CzUREWH.js.map +1 -0
- package/dist/runtime/{telemetry-Co59mYwy.mjs → telemetry-x9LpQpc1.mjs} +19 -12
- package/dist/runtime/telemetry-x9LpQpc1.mjs.map +1 -0
- package/dist/runtime/telemetry.d.mts +3 -3
- package/dist/runtime/telemetry.d.mts.map +1 -1
- package/dist/runtime/telemetry.d.ts +3 -3
- package/dist/runtime/telemetry.d.ts.map +1 -1
- package/dist/runtime/telemetry.js +2 -2
- package/dist/runtime/telemetry.mjs +6 -6
- package/dist/runtime/types/index.d.mts +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/dist/runtime/underscore-C7r5Yoz7.js.map +1 -1
- package/dist/runtime/{underscore-pCLZrwOa.d.ts → underscore-D7jy9HIv.d.ts} +2 -2
- package/dist/runtime/underscore-D7jy9HIv.d.ts.map +1 -0
- package/dist/runtime/{underscore-umF0I_Al.d.mts → underscore-D9zbLnC5.d.mts} +2 -2
- package/dist/runtime/underscore-D9zbLnC5.d.mts.map +1 -0
- package/dist/runtime/{underscore-DlGFLHFx.mjs → underscore-DjQrhefX.mjs} +2 -2
- package/dist/runtime/underscore-DjQrhefX.mjs.map +1 -0
- package/dist/runtime/underscore.d.mts +1 -1
- package/dist/runtime/underscore.d.ts +1 -1
- package/dist/runtime/underscore.mjs +1 -1
- package/dist/runtime/{url-FYx-WNSR.d.mts → url-2rfd29Os.d.mts} +2 -2
- package/dist/runtime/{url-FYx-WNSR.d.mts.map → url-2rfd29Os.d.mts.map} +1 -1
- package/dist/runtime/{url-BbKTKX00.mjs → url-BuzaT2V9.mjs} +6 -5
- package/dist/runtime/url-BuzaT2V9.mjs.map +1 -0
- package/dist/runtime/{url-Clb-n8zC.js → url-DngZvS9Y.js} +3 -2
- package/dist/runtime/url-DngZvS9Y.js.map +1 -0
- package/dist/runtime/{url-h8G1SdMd.d.ts → url-Ms4rigVZ.d.ts} +2 -2
- package/dist/runtime/url-Ms4rigVZ.d.ts.map +1 -0
- package/dist/runtime/url.d.mts +1 -1
- package/dist/runtime/url.d.ts +1 -1
- package/dist/runtime/url.js +1 -1
- package/dist/runtime/url.mjs +3 -3
- package/dist/runtime/utils/index.d.mts +2 -2
- package/dist/runtime/utils/index.d.ts +2 -2
- package/dist/runtime/utils/index.js +2 -2
- package/dist/runtime/utils/index.mjs +6 -6
- package/dist/runtime/{utils-BhWtCGz9.mjs → utils-DFvkL3Ii.mjs} +3 -3
- package/dist/runtime/utils-DFvkL3Ii.mjs.map +1 -0
- package/dist/runtime/utils-H_S828Pv.js.map +1 -1
- package/dist/runtime/{versionSelector-CqPDqa9l.mjs → versionSelector-BmZU_Z0e.mjs} +4 -4
- package/dist/runtime/versionSelector-BmZU_Z0e.mjs.map +1 -0
- package/dist/runtime/{versionSelector-C1NNM7oN.d.ts → versionSelector-CP0JpoAM.d.ts} +2 -2
- package/dist/runtime/versionSelector-CP0JpoAM.d.ts.map +1 -0
- package/dist/runtime/{versionSelector-xoAPlSjp.d.mts → versionSelector-CX1qgO7X.d.mts} +2 -2
- package/dist/runtime/versionSelector-CX1qgO7X.d.mts.map +1 -0
- package/dist/runtime/{versionSelector-D_jIFYHj.js → versionSelector-CfY7eQEC.js} +3 -3
- package/dist/runtime/versionSelector-CfY7eQEC.js.map +1 -0
- package/dist/runtime/versionSelector.d.mts +1 -1
- package/dist/runtime/versionSelector.d.ts +1 -1
- package/dist/runtime/versionSelector.js +1 -1
- package/dist/runtime/versionSelector.mjs +1 -1
- package/dist/runtime/{waitForElement-r2Id_EEt.d.mts → waitForElement-B3tX_z6T.d.mts} +2 -2
- package/dist/runtime/waitForElement-B3tX_z6T.d.mts.map +1 -0
- package/dist/runtime/waitForElement-BUretf0K.js.map +1 -1
- package/dist/runtime/{waitForElement-DCDYqZEF.mjs → waitForElement-Cl1uDYXK.mjs} +2 -2
- package/dist/runtime/waitForElement-Cl1uDYXK.mjs.map +1 -0
- package/dist/runtime/{waitForElement-DefmGXsY.d.ts → waitForElement-DQ2FkEJH.d.ts} +2 -2
- package/dist/runtime/waitForElement-DQ2FkEJH.d.ts.map +1 -0
- package/dist/runtime/web3.d.mts +1 -1
- package/dist/runtime/web3.d.ts +1 -1
- package/dist/runtime/web3.js.map +1 -1
- package/dist/runtime/web3.mjs.map +1 -1
- package/dist/runtime/webauthn.js +1 -1
- package/dist/runtime/webauthn.js.map +1 -1
- package/dist/runtime/webauthn.mjs +1 -1
- package/dist/runtime/webauthn.mjs.map +1 -1
- package/dist/runtime/workerTimers/index.d.mts +1 -1
- package/dist/runtime/workerTimers/index.d.ts +1 -1
- package/dist/runtime/workerTimers/index.js +1 -1
- package/dist/runtime/workerTimers/index.mjs +2 -2
- package/dist/runtime/{workerTimers-0T9WnoJq.js → workerTimers-CyP1YqyG.js} +10 -6
- package/dist/runtime/workerTimers-CyP1YqyG.js.map +1 -0
- package/dist/runtime/{workerTimers-qeFdWxf5.mjs → workerTimers-SDJuCuGo.mjs} +12 -8
- package/dist/runtime/workerTimers-SDJuCuGo.mjs.map +1 -0
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/runtime/apiUrlFromPublishableKey-BrEJDXM6.mjs.map +0 -1
- package/dist/runtime/apiUrlFromPublishableKey-CEUyf_FP.d.ts.map +0 -1
- package/dist/runtime/apiUrlFromPublishableKey-CY46bNyR.js.map +0 -1
- package/dist/runtime/apiUrlFromPublishableKey-mDB2xBW0.d.mts.map +0 -1
- package/dist/runtime/authorization-DslZKDr7.mjs.map +0 -1
- package/dist/runtime/authorization-errors-BmyMJ_xr.mjs.map +0 -1
- package/dist/runtime/browser-CSZli54M.mjs.map +0 -1
- package/dist/runtime/browser-Ch5Nzweq.js.map +0 -1
- package/dist/runtime/color-BHugulfx.js.map +0 -1
- package/dist/runtime/color-D19NgqOS.mjs.map +0 -1
- package/dist/runtime/constants-Bp0qtelQ.mjs.map +0 -1
- package/dist/runtime/date-DNGgJHFN.js.map +0 -1
- package/dist/runtime/date-DSP_ZkyV.mjs.map +0 -1
- package/dist/runtime/deprecated-5YowWRtd.mjs.map +0 -1
- package/dist/runtime/deprecated-B-fX5ZX6.js.map +0 -1
- package/dist/runtime/deriveState-B0JG4g-j.mjs.map +0 -1
- package/dist/runtime/deriveState-Bsd1S6r4.js.map +0 -1
- package/dist/runtime/devBrowser-CZTqhFrD.mjs.map +0 -1
- package/dist/runtime/devBrowser-DGSLF_56.js.map +0 -1
- package/dist/runtime/error-C1JsGDzp.d.ts.map +0 -1
- package/dist/runtime/error-DX6s8CXH.d.mts.map +0 -1
- package/dist/runtime/error-DmyHwAOc.js.map +0 -1
- package/dist/runtime/error-Dy2SiVmF.mjs.map +0 -1
- package/dist/runtime/file-BN-3wQc7.mjs.map +0 -1
- package/dist/runtime/file-CLbjMOtb.js.map +0 -1
- package/dist/runtime/getEnvVariable-5D5Bn9Xr.d.mts.map +0 -1
- package/dist/runtime/getEnvVariable-BBmyrE42.js.map +0 -1
- package/dist/runtime/getEnvVariable-CGauWqhQ.mjs.map +0 -1
- package/dist/runtime/getEnvVariable-hWcrOrGN.d.ts.map +0 -1
- package/dist/runtime/handleValueOrFn-BNKfPZXV.mjs.map +0 -1
- package/dist/runtime/handleValueOrFn-KR1byaCL.js.map +0 -1
- package/dist/runtime/index-CQa1qZgJ.d.mts.map +0 -1
- package/dist/runtime/index-C_bsKxan.d.ts.map +0 -1
- package/dist/runtime/instance-B9sghgF1.mjs.map +0 -1
- package/dist/runtime/isomorphicAtob-CYR5fxvZ.mjs.map +0 -1
- package/dist/runtime/isomorphicAtob-Dc_r7YK5.d.mts.map +0 -1
- package/dist/runtime/isomorphicAtob-JRA09t0F.d.ts.map +0 -1
- package/dist/runtime/isomorphicBtoa-B_bxXEIA.d.ts.map +0 -1
- package/dist/runtime/isomorphicBtoa-Db71q4D6.mjs.map +0 -1
- package/dist/runtime/isomorphicBtoa-ZCyCjGVs.d.mts.map +0 -1
- package/dist/runtime/keys-BGyzAyGu.mjs.map +0 -1
- package/dist/runtime/keys-wr08qE7Y.js.map +0 -1
- package/dist/runtime/loadClerkJsScript-BOokryTM.d.ts.map +0 -1
- package/dist/runtime/loadClerkJsScript-BbP0bwey.mjs.map +0 -1
- package/dist/runtime/loadClerkJsScript-Bifh0xaY.d.mts.map +0 -1
- package/dist/runtime/loadClerkJsScript-BtuUk22T.js.map +0 -1
- package/dist/runtime/loadScript-CWAtpo-p.mjs.map +0 -1
- package/dist/runtime/loadScript-D8zceEj8.js.map +0 -1
- package/dist/runtime/localStorageBroadcastChannel-Bgbc3aUe.js.map +0 -1
- package/dist/runtime/localStorageBroadcastChannel-DoowNgS3.mjs.map +0 -1
- package/dist/runtime/logger-Dug9WfZ-.d.mts.map +0 -1
- package/dist/runtime/logger-Dv_S1aDO.js.map +0 -1
- package/dist/runtime/logger-SMMEBPOB.mjs.map +0 -1
- package/dist/runtime/logger-i7rYANU9.d.ts.map +0 -1
- package/dist/runtime/netlifyCacheHandler-BvN9315t.d.ts.map +0 -1
- package/dist/runtime/netlifyCacheHandler-CGV6jGfB.js.map +0 -1
- package/dist/runtime/netlifyCacheHandler-DibubjcU.d.mts.map +0 -1
- package/dist/runtime/object-BS_KT1Ih.mjs.map +0 -1
- package/dist/runtime/organization-CLYKtC4A.mjs.map +0 -1
- package/dist/runtime/pathMatcher-COQW187f.mjs.map +0 -1
- package/dist/runtime/pathMatcher-Co1RhryO.js.map +0 -1
- package/dist/runtime/pathToRegexp-DNM_UlMK.js.map +0 -1
- package/dist/runtime/pathToRegexp-EuYtsd3y.mjs.map +0 -1
- package/dist/runtime/poller-CVTUNwuX.js.map +0 -1
- package/dist/runtime/proxy-Cw3rAt0M.mjs.map +0 -1
- package/dist/runtime/retry-D-2K5OKd.mjs.map +0 -1
- package/dist/runtime/telemetry-Co59mYwy.mjs.map +0 -1
- package/dist/runtime/telemetry-DKa_Z2f1.js.map +0 -1
- package/dist/runtime/underscore-DlGFLHFx.mjs.map +0 -1
- package/dist/runtime/underscore-pCLZrwOa.d.ts.map +0 -1
- package/dist/runtime/underscore-umF0I_Al.d.mts.map +0 -1
- package/dist/runtime/url-BbKTKX00.mjs.map +0 -1
- package/dist/runtime/url-Clb-n8zC.js.map +0 -1
- package/dist/runtime/url-h8G1SdMd.d.ts.map +0 -1
- package/dist/runtime/utils-BhWtCGz9.mjs.map +0 -1
- package/dist/runtime/versionSelector-C1NNM7oN.d.ts.map +0 -1
- package/dist/runtime/versionSelector-CqPDqa9l.mjs.map +0 -1
- package/dist/runtime/versionSelector-D_jIFYHj.js.map +0 -1
- package/dist/runtime/versionSelector-xoAPlSjp.d.mts.map +0 -1
- package/dist/runtime/waitForElement-DCDYqZEF.mjs.map +0 -1
- package/dist/runtime/waitForElement-DefmGXsY.d.ts.map +0 -1
- package/dist/runtime/waitForElement-r2Id_EEt.d.mts.map +0 -1
- package/dist/runtime/workerTimers-0T9WnoJq.js.map +0 -1
- package/dist/runtime/workerTimers-qeFdWxf5.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alternativePhoneCode.js","names":["ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[]"],"sources":["../../src/alternativePhoneCode.ts"],"sourcesContent":["import type { PhoneCodeChannelData } from './types';\n\nexport const ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[] = [\n {\n channel: 'whatsapp',\n name: 'WhatsApp',\n },\n];\n\nexport const getAlternativePhoneCodeProviderData = (channel?: string): PhoneCodeChannelData | null => {\n if (!channel) {\n return null;\n }\n return ALTERNATIVE_PHONE_CODE_PROVIDERS.find(p => p.channel === channel) || null;\n};\n"],"mappings":";;AAEA,MAAaA,mCAA2D,CACtE;CACE,SAAS;CACT,MAAM;
|
|
1
|
+
{"version":3,"file":"alternativePhoneCode.js","names":["ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[]","channel?: string"],"sources":["../../src/alternativePhoneCode.ts"],"sourcesContent":["import type { PhoneCodeChannelData } from './types';\n\nexport const ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[] = [\n {\n channel: 'whatsapp',\n name: 'WhatsApp',\n },\n];\n\nexport const getAlternativePhoneCodeProviderData = (channel?: string): PhoneCodeChannelData | null => {\n if (!channel) {\n return null;\n }\n return ALTERNATIVE_PHONE_CODE_PROVIDERS.find(p => p.channel === channel) || null;\n};\n"],"mappings":";;AAEA,MAAaA,mCAA2D,CACtE;CACE,SAAS;CACT,MAAM;AACP,CACF;AAED,MAAa,sCAAsC,CAACC,YAAkD;AACpG,MAAK,QACH,QAAO;AAET,QAAO,iCAAiC,KAAK,OAAK,EAAE,YAAY,QAAQ,IAAI;AAC7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alternativePhoneCode.mjs","names":["ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[]"],"sources":["../../src/alternativePhoneCode.ts"],"sourcesContent":["import type { PhoneCodeChannelData } from './types';\n\nexport const ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[] = [\n {\n channel: 'whatsapp',\n name: 'WhatsApp',\n },\n];\n\nexport const getAlternativePhoneCodeProviderData = (channel?: string): PhoneCodeChannelData | null => {\n if (!channel) {\n return null;\n }\n return ALTERNATIVE_PHONE_CODE_PROVIDERS.find(p => p.channel === channel) || null;\n};\n"],"mappings":";AAEA,MAAaA,mCAA2D,CACtE;CACE,SAAS;CACT,MAAM;
|
|
1
|
+
{"version":3,"file":"alternativePhoneCode.mjs","names":["ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[]","channel?: string"],"sources":["../../src/alternativePhoneCode.ts"],"sourcesContent":["import type { PhoneCodeChannelData } from './types';\n\nexport const ALTERNATIVE_PHONE_CODE_PROVIDERS: PhoneCodeChannelData[] = [\n {\n channel: 'whatsapp',\n name: 'WhatsApp',\n },\n];\n\nexport const getAlternativePhoneCodeProviderData = (channel?: string): PhoneCodeChannelData | null => {\n if (!channel) {\n return null;\n }\n return ALTERNATIVE_PHONE_CODE_PROVIDERS.find(p => p.channel === channel) || null;\n};\n"],"mappings":";AAEA,MAAaA,mCAA2D,CACtE;CACE,SAAS;CACT,MAAM;AACP,CACF;AAED,MAAa,sCAAsC,CAACC,YAAkD;AACpG,MAAK,QACH,QAAO;AAET,QAAO,iCAAiC,KAAK,OAAK,EAAE,YAAY,QAAQ,IAAI;AAC7E"}
|
package/dist/runtime/{apiUrlFromPublishableKey-CY46bNyR.js → apiUrlFromPublishableKey-Bjv-2nJ1.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_constants = require('./constants-B8tEdUlH.js');
|
|
2
|
-
const require_keys = require('./keys-
|
|
2
|
+
const require_keys = require('./keys-CHdYWeEj.js');
|
|
3
3
|
|
|
4
4
|
//#region src/apiUrlFromPublishableKey.ts
|
|
5
5
|
/**
|
|
@@ -23,4 +23,4 @@ Object.defineProperty(exports, 'apiUrlFromPublishableKey', {
|
|
|
23
23
|
return apiUrlFromPublishableKey;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
//# sourceMappingURL=apiUrlFromPublishableKey-
|
|
26
|
+
//# sourceMappingURL=apiUrlFromPublishableKey-Bjv-2nJ1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiUrlFromPublishableKey-Bjv-2nJ1.js","names":["publishableKey: string","PROD_API_URL","LOCAL_API_URL","STAGING_API_URL"],"sources":["../../src/apiUrlFromPublishableKey.ts"],"sourcesContent":["import {\n LEGACY_DEV_INSTANCE_SUFFIXES,\n LOCAL_API_URL,\n LOCAL_ENV_SUFFIXES,\n PROD_API_URL,\n STAGING_API_URL,\n STAGING_ENV_SUFFIXES,\n} from './constants';\nimport { parsePublishableKey } from './keys';\n\n/**\n * Get the correct API url based on the publishable key.\n *\n * @param publishableKey - The publishable key to parse.\n * @returns One of Clerk's API URLs.\n */\nexport const apiUrlFromPublishableKey = (publishableKey: string) => {\n const frontendApi = parsePublishableKey(publishableKey)?.frontendApi;\n\n if (frontendApi?.startsWith('clerk.') && LEGACY_DEV_INSTANCE_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return PROD_API_URL;\n }\n\n if (LOCAL_ENV_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return LOCAL_API_URL;\n }\n if (STAGING_ENV_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return STAGING_API_URL;\n }\n return PROD_API_URL;\n};\n"],"mappings":";;;;;;;;;;AAgBA,MAAa,2BAA2B,CAACA,mBAA2B;CAClE,MAAM,cAAc,iCAAoB,eAAe,EAAE;AAEzD,KAAI,aAAa,WAAW,SAAS,IAAI,+CAA6B,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CACjH,QAAOC;AAGT,KAAI,qCAAmB,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CAClE,QAAOC;AAET,KAAI,uCAAqB,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CACpE,QAAOC;AAET,QAAOF;AACR"}
|
package/dist/runtime/{apiUrlFromPublishableKey-BrEJDXM6.mjs → apiUrlFromPublishableKey-DFxUPTKg.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { LEGACY_DEV_INSTANCE_SUFFIXES, LOCAL_API_URL, LOCAL_ENV_SUFFIXES, PROD_API_URL, STAGING_API_URL, STAGING_ENV_SUFFIXES } from "./constants-ByUssRbE.mjs";
|
|
2
|
+
import { parsePublishableKey } from "./keys-Dcilj3cS.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/apiUrlFromPublishableKey.ts
|
|
5
5
|
/**
|
|
@@ -17,5 +17,5 @@ const apiUrlFromPublishableKey = (publishableKey) => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
|
-
export { apiUrlFromPublishableKey
|
|
21
|
-
//# sourceMappingURL=apiUrlFromPublishableKey-
|
|
20
|
+
export { apiUrlFromPublishableKey };
|
|
21
|
+
//# sourceMappingURL=apiUrlFromPublishableKey-DFxUPTKg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiUrlFromPublishableKey-DFxUPTKg.mjs","names":["publishableKey: string"],"sources":["../../src/apiUrlFromPublishableKey.ts"],"sourcesContent":["import {\n LEGACY_DEV_INSTANCE_SUFFIXES,\n LOCAL_API_URL,\n LOCAL_ENV_SUFFIXES,\n PROD_API_URL,\n STAGING_API_URL,\n STAGING_ENV_SUFFIXES,\n} from './constants';\nimport { parsePublishableKey } from './keys';\n\n/**\n * Get the correct API url based on the publishable key.\n *\n * @param publishableKey - The publishable key to parse.\n * @returns One of Clerk's API URLs.\n */\nexport const apiUrlFromPublishableKey = (publishableKey: string) => {\n const frontendApi = parsePublishableKey(publishableKey)?.frontendApi;\n\n if (frontendApi?.startsWith('clerk.') && LEGACY_DEV_INSTANCE_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return PROD_API_URL;\n }\n\n if (LOCAL_ENV_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return LOCAL_API_URL;\n }\n if (STAGING_ENV_SUFFIXES.some(suffix => frontendApi?.endsWith(suffix))) {\n return STAGING_API_URL;\n }\n return PROD_API_URL;\n};\n"],"mappings":";;;;;;;;;;AAgBA,MAAa,2BAA2B,CAACA,mBAA2B;CAClE,MAAM,cAAc,oBAAoB,eAAe,EAAE;AAEzD,KAAI,aAAa,WAAW,SAAS,IAAI,6BAA6B,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CACjH,QAAO;AAGT,KAAI,mBAAmB,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CAClE,QAAO;AAET,KAAI,qBAAqB,KAAK,YAAU,aAAa,SAAS,OAAO,CAAC,CACpE,QAAO;AAET,QAAO;AACR"}
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
declare const apiUrlFromPublishableKey: (publishableKey: string) => "https://api.clerk.com" | "https://api.lclclerk.com" | "https://api.clerkstage.dev";
|
|
9
9
|
//#endregion
|
|
10
|
-
export { apiUrlFromPublishableKey
|
|
11
|
-
//# sourceMappingURL=apiUrlFromPublishableKey-
|
|
10
|
+
export { apiUrlFromPublishableKey };
|
|
11
|
+
//# sourceMappingURL=apiUrlFromPublishableKey-DOAlYzda.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiUrlFromPublishableKey-DOAlYzda.d.ts","names":[],"sources":["../../src/apiUrlFromPublishableKey.ts"],"sourcesContent":[],"mappings":";;AAgBA;;;;;cAAa"}
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
declare const apiUrlFromPublishableKey: (publishableKey: string) => "https://api.clerk.com" | "https://api.lclclerk.com" | "https://api.clerkstage.dev";
|
|
9
9
|
//#endregion
|
|
10
|
-
export { apiUrlFromPublishableKey as
|
|
11
|
-
//# sourceMappingURL=apiUrlFromPublishableKey-
|
|
10
|
+
export { apiUrlFromPublishableKey as apiUrlFromPublishableKey$1 };
|
|
11
|
+
//# sourceMappingURL=apiUrlFromPublishableKey-DnRaRFJ_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiUrlFromPublishableKey-DnRaRFJ_.d.mts","names":[],"sources":["../../src/apiUrlFromPublishableKey.ts"],"sourcesContent":[],"mappings":";;AAgBA;;;;;cAAa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { apiUrlFromPublishableKey$1 as apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-DnRaRFJ_.mjs";
|
|
2
2
|
export { apiUrlFromPublishableKey };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-DOAlYzda.js";
|
|
2
2
|
export { apiUrlFromPublishableKey };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('./constants-B8tEdUlH.js');
|
|
2
2
|
require('./isomorphicAtob-Chnw1Md3.js');
|
|
3
3
|
require('./isomorphicBtoa-oWNvIgSP.js');
|
|
4
|
-
require('./keys-
|
|
5
|
-
const require_apiUrlFromPublishableKey = require('./apiUrlFromPublishableKey-
|
|
4
|
+
require('./keys-CHdYWeEj.js');
|
|
5
|
+
const require_apiUrlFromPublishableKey = require('./apiUrlFromPublishableKey-Bjv-2nJ1.js');
|
|
6
6
|
|
|
7
7
|
exports.apiUrlFromPublishableKey = require_apiUrlFromPublishableKey.apiUrlFromPublishableKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./constants-
|
|
2
|
-
import "./isomorphicAtob-
|
|
3
|
-
import "./isomorphicBtoa-
|
|
4
|
-
import "./keys-
|
|
5
|
-
import {
|
|
1
|
+
import "./constants-ByUssRbE.mjs";
|
|
2
|
+
import "./isomorphicAtob-DybBXGFR.mjs";
|
|
3
|
+
import "./isomorphicBtoa-Dr7WubZv.mjs";
|
|
4
|
+
import "./keys-Dcilj3cS.mjs";
|
|
5
|
+
import { apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-DFxUPTKg.mjs";
|
|
6
6
|
|
|
7
7
|
export { apiUrlFromPublishableKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-CJB1hjGu.js","names":["TYPES_TO_OBJECTS: TypesToConfig","checkOrgAuthorization: CheckOrgAuthorization","checkBillingAuthorization: CheckBillingAuthorization","config","checkReverificationAuthorization: CheckReverificationAuthorization"],"sources":["../../src/authorization.ts"],"sourcesContent":["import type {\n ActClaim,\n CheckAuthorizationWithCustomPermissions,\n GetToken,\n JwtPayload,\n OrganizationCustomPermissionKey,\n OrganizationCustomRoleKey,\n PendingSessionOptions,\n ReverificationConfig,\n SessionStatusClaim,\n SessionVerificationLevel,\n SessionVerificationTypes,\n SignOut,\n UseAuthReturn,\n} from './types';\n\ntype TypesToConfig = Record<SessionVerificationTypes, Exclude<ReverificationConfig, SessionVerificationTypes>>;\ntype AuthorizationOptions = {\n userId: string | null | undefined;\n orgId: string | null | undefined;\n orgRole: string | null | undefined;\n orgPermissions: string[] | null | undefined;\n factorVerificationAge: [number, number] | null;\n features: string | null | undefined;\n plans: string | null | undefined;\n};\n\ntype CheckOrgAuthorization = (\n params: { role?: OrganizationCustomRoleKey; permission?: OrganizationCustomPermissionKey },\n options: Pick<AuthorizationOptions, 'orgId' | 'orgRole' | 'orgPermissions'>,\n) => boolean | null;\n\ntype CheckBillingAuthorization = (\n params: { feature?: string; plan?: string },\n options: Pick<AuthorizationOptions, 'plans' | 'features'>,\n) => boolean | null;\n\ntype CheckReverificationAuthorization = (\n params: {\n reverification?: ReverificationConfig;\n },\n { factorVerificationAge }: AuthorizationOptions,\n) => boolean | null;\n\nconst TYPES_TO_OBJECTS: TypesToConfig = {\n strict_mfa: {\n afterMinutes: 10,\n level: 'multi_factor',\n },\n strict: {\n afterMinutes: 10,\n level: 'second_factor',\n },\n moderate: {\n afterMinutes: 60,\n level: 'second_factor',\n },\n lax: {\n afterMinutes: 1_440,\n level: 'second_factor',\n },\n};\n\nconst ALLOWED_LEVELS = new Set<SessionVerificationLevel>(['first_factor', 'second_factor', 'multi_factor']);\n\nconst ALLOWED_TYPES = new Set<SessionVerificationTypes>(['strict_mfa', 'strict', 'moderate', 'lax']);\n\n// Helper functions\nconst isValidMaxAge = (maxAge: any) => typeof maxAge === 'number' && maxAge > 0;\nconst isValidLevel = (level: any) => ALLOWED_LEVELS.has(level);\nconst isValidVerificationType = (type: any) => ALLOWED_TYPES.has(type);\n\nconst prefixWithOrg = (value: string) => value.replace(/^(org:)*/, 'org:');\n\n/**\n * Checks if a user has the required organization-level authorization.\n * Verifies if the user has the specified role or permission within their organization.\n * @returns null, if unable to determine due to missing data or unspecified role/permission.\n */\nconst checkOrgAuthorization: CheckOrgAuthorization = (params, options) => {\n const { orgId, orgRole, orgPermissions } = options;\n if (!params.role && !params.permission) {\n return null;\n }\n\n if (!orgId || !orgRole || !orgPermissions) {\n return null;\n }\n\n if (params.permission) {\n return orgPermissions.includes(prefixWithOrg(params.permission));\n }\n\n if (params.role) {\n return prefixWithOrg(orgRole) === prefixWithOrg(params.role);\n }\n return null;\n};\n\nconst checkForFeatureOrPlan = (claim: string, featureOrPlan: string) => {\n const { org: orgFeatures, user: userFeatures } = splitByScope(claim);\n const [scope, _id] = featureOrPlan.split(':');\n const id = _id || scope;\n\n if (scope === 'org') {\n return orgFeatures.includes(id);\n } else if (scope === 'user') {\n return userFeatures.includes(id);\n } else {\n // Since org scoped features will not exist if there is not an active org, merging is safe.\n return [...orgFeatures, ...userFeatures].includes(id);\n }\n};\n\nconst checkBillingAuthorization: CheckBillingAuthorization = (params, options) => {\n const { features, plans } = options;\n\n if (params.feature && features) {\n return checkForFeatureOrPlan(features, params.feature);\n }\n\n if (params.plan && plans) {\n return checkForFeatureOrPlan(plans, params.plan);\n }\n return null;\n};\n\nconst splitByScope = (fea: string | null | undefined) => {\n const features = fea ? fea.split(',').map(f => f.trim()) : [];\n\n // TODO: make this more efficient\n return {\n org: features.filter(f => f.split(':')[0].includes('o')).map(f => f.split(':')[1]),\n user: features.filter(f => f.split(':')[0].includes('u')).map(f => f.split(':')[1]),\n };\n};\n\nconst validateReverificationConfig = (config: ReverificationConfig | undefined | null) => {\n if (!config) {\n return false;\n }\n\n const convertConfigToObject = (config: ReverificationConfig) => {\n if (typeof config === 'string') {\n return TYPES_TO_OBJECTS[config];\n }\n return config;\n };\n\n const isValidStringValue = typeof config === 'string' && isValidVerificationType(config);\n const isValidObjectValue =\n typeof config === 'object' && isValidLevel(config.level) && isValidMaxAge(config.afterMinutes);\n\n if (isValidStringValue || isValidObjectValue) {\n return convertConfigToObject.bind(null, config);\n }\n\n return false;\n};\n\n/**\n * Evaluates if the user meets re-verification authentication requirements.\n * Compares the user's factor verification ages against the specified maxAge.\n * Handles different verification levels (first factor, second factor, multi-factor).\n * @returns null, if requirements or verification data are missing.\n */\nconst checkReverificationAuthorization: CheckReverificationAuthorization = (params, { factorVerificationAge }) => {\n if (!params.reverification || !factorVerificationAge) {\n return null;\n }\n\n const isValidReverification = validateReverificationConfig(params.reverification);\n if (!isValidReverification) {\n return null;\n }\n\n const { level, afterMinutes } = isValidReverification();\n const [factor1Age, factor2Age] = factorVerificationAge;\n\n // -1 indicates the factor group (1fa,2fa) is not enabled\n // -1 for 1fa is not a valid scenario, but we need to make sure we handle it properly\n const isValidFactor1 = factor1Age !== -1 ? afterMinutes > factor1Age : null;\n const isValidFactor2 = factor2Age !== -1 ? afterMinutes > factor2Age : null;\n\n switch (level) {\n case 'first_factor':\n return isValidFactor1;\n case 'second_factor':\n return factor2Age !== -1 ? isValidFactor2 : isValidFactor1;\n case 'multi_factor':\n return factor2Age === -1 ? isValidFactor1 : isValidFactor1 && isValidFactor2;\n }\n};\n\n/**\n * Creates a function for comprehensive user authorization checks.\n * Combines organization-level and reverification authentication checks.\n * The returned function authorizes if both checks pass, or if at least one passes\n * when the other is indeterminate. Fails if userId is missing.\n */\nconst createCheckAuthorization = (options: AuthorizationOptions): CheckAuthorizationWithCustomPermissions => {\n return (params): boolean => {\n if (!options.userId) {\n return false;\n }\n\n const billingAuthorization = checkBillingAuthorization(params, options);\n const orgAuthorization = checkOrgAuthorization(params, options);\n const reverificationAuthorization = checkReverificationAuthorization(params, options);\n\n if ([billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === null)) {\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === true);\n }\n\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].every(a => a === true);\n };\n};\n\ntype AuthStateOptions = {\n authObject: {\n userId?: string | null;\n sessionId?: string | null;\n sessionStatus?: SessionStatusClaim | null;\n sessionClaims?: JwtPayload | null;\n actor?: ActClaim | null;\n orgId?: string | null;\n orgRole?: OrganizationCustomRoleKey | null;\n orgSlug?: string | null;\n orgPermissions?: OrganizationCustomPermissionKey[] | null;\n getToken: GetToken;\n signOut: SignOut;\n has: (params: Parameters<CheckAuthorizationWithCustomPermissions>[0]) => boolean;\n };\n options: PendingSessionOptions;\n};\n\n/**\n * Shared utility function that centralizes auth state resolution logic,\n * preventing duplication across different packages.\n * @internal\n */\nconst resolveAuthState = ({\n authObject: {\n sessionId,\n sessionStatus,\n userId,\n actor,\n orgId,\n orgRole,\n orgSlug,\n signOut,\n getToken,\n has,\n sessionClaims,\n },\n options: { treatPendingAsSignedOut = true },\n}: AuthStateOptions): UseAuthReturn | undefined => {\n if (sessionId === undefined && userId === undefined) {\n return {\n isLoaded: false,\n isSignedIn: undefined,\n sessionId,\n sessionClaims: undefined,\n userId,\n actor: undefined,\n orgId: undefined,\n orgRole: undefined,\n orgSlug: undefined,\n has: undefined,\n signOut,\n getToken,\n } as const;\n }\n\n if (sessionId === null && userId === null) {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId,\n userId,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (treatPendingAsSignedOut && sessionStatus === 'pending') {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId: null,\n userId: null,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !!orgId && !!orgRole) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId,\n orgRole,\n orgSlug: orgSlug || null,\n has,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !orgId) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has,\n signOut,\n getToken,\n } as const;\n }\n};\n\nexport { createCheckAuthorization, resolveAuthState, splitByScope, validateReverificationConfig };\n"],"mappings":";;AA4CA,MAAMA,mBAAkC;CACtC,YAAY;EACV,cAAc;EACd,OAAO;EACR;CACD,QAAQ;EACN,cAAc;EACd,OAAO;EACR;CACD,UAAU;EACR,cAAc;EACd,OAAO;EACR;CACD,KAAK;EACH,cAAc;EACd,OAAO;EACR;CACF;AAED,MAAM,iBAAiB,IAAI,IAA8B;CAAC;CAAgB;CAAiB;CAAe,CAAC;AAE3G,MAAM,gBAAgB,IAAI,IAA8B;CAAC;CAAc;CAAU;CAAY;CAAM,CAAC;AAGpG,MAAM,iBAAiB,WAAgB,OAAO,WAAW,YAAY,SAAS;AAC9E,MAAM,gBAAgB,UAAe,eAAe,IAAI,MAAM;AAC9D,MAAM,2BAA2B,SAAc,cAAc,IAAI,KAAK;AAEtE,M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AkB,4BAA4B,CAAC,MAAK,MAAK,MAAM,KAAK;AAGtG,SAAO,CAAC,wBAAwB,kBAAkB,4BAA4B,CAAC,OAAM,MAAK,MAAM,KAAK;;;;;;;;AA2BzG,MAAM,oBAAoB,EACxB,YAAY,EACV,WACA,eACA,QACA,OACA,OACA,SACA,SACA,SACA,UACA,KACA,iBAEF,SAAS,EAAE,0BAA0B,aACY;AACjD,KAAI,cAAc,UAAa,WAAW,OACxC,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA,eAAe;EACf;EACA,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,KAAK;EACL;EACA;EACD;AAGH,KAAI,cAAc,QAAQ,WAAW,KACnC,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX;EACA;EACD;AAGH,KAAI,2BAA2B,kBAAkB,UAC/C,QAAO;EACL,UAAU;EACV,YAAY;EACZ,WAAW;EACX,QAAQ;EACR,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX;EACA;EACD;AAGH,KAAI,CAAC,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,QAC7D,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB;EACA;EACA,SAAS,WAAW;EACpB;EACA;EACA;EACD;AAGH,KAAI,CAAC,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,MACjD,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB,OAAO;EACP,SAAS;EACT,SAAS;EACT;EACA;EACA;EACD"}
|
|
1
|
+
{"version":3,"file":"authorization-CJB1hjGu.js","names":["TYPES_TO_OBJECTS: TypesToConfig","maxAge: any","level: any","type: any","value: string","checkOrgAuthorization: CheckOrgAuthorization","claim: string","featureOrPlan: string","checkBillingAuthorization: CheckBillingAuthorization","fea: string | null | undefined","config: ReverificationConfig | undefined | null","config: ReverificationConfig","config","checkReverificationAuthorization: CheckReverificationAuthorization","options: AuthorizationOptions"],"sources":["../../src/authorization.ts"],"sourcesContent":["import type {\n ActClaim,\n CheckAuthorizationWithCustomPermissions,\n GetToken,\n JwtPayload,\n OrganizationCustomPermissionKey,\n OrganizationCustomRoleKey,\n PendingSessionOptions,\n ReverificationConfig,\n SessionStatusClaim,\n SessionVerificationLevel,\n SessionVerificationTypes,\n SignOut,\n UseAuthReturn,\n} from './types';\n\ntype TypesToConfig = Record<SessionVerificationTypes, Exclude<ReverificationConfig, SessionVerificationTypes>>;\ntype AuthorizationOptions = {\n userId: string | null | undefined;\n orgId: string | null | undefined;\n orgRole: string | null | undefined;\n orgPermissions: string[] | null | undefined;\n factorVerificationAge: [number, number] | null;\n features: string | null | undefined;\n plans: string | null | undefined;\n};\n\ntype CheckOrgAuthorization = (\n params: { role?: OrganizationCustomRoleKey; permission?: OrganizationCustomPermissionKey },\n options: Pick<AuthorizationOptions, 'orgId' | 'orgRole' | 'orgPermissions'>,\n) => boolean | null;\n\ntype CheckBillingAuthorization = (\n params: { feature?: string; plan?: string },\n options: Pick<AuthorizationOptions, 'plans' | 'features'>,\n) => boolean | null;\n\ntype CheckReverificationAuthorization = (\n params: {\n reverification?: ReverificationConfig;\n },\n { factorVerificationAge }: AuthorizationOptions,\n) => boolean | null;\n\nconst TYPES_TO_OBJECTS: TypesToConfig = {\n strict_mfa: {\n afterMinutes: 10,\n level: 'multi_factor',\n },\n strict: {\n afterMinutes: 10,\n level: 'second_factor',\n },\n moderate: {\n afterMinutes: 60,\n level: 'second_factor',\n },\n lax: {\n afterMinutes: 1_440,\n level: 'second_factor',\n },\n};\n\nconst ALLOWED_LEVELS = new Set<SessionVerificationLevel>(['first_factor', 'second_factor', 'multi_factor']);\n\nconst ALLOWED_TYPES = new Set<SessionVerificationTypes>(['strict_mfa', 'strict', 'moderate', 'lax']);\n\n// Helper functions\nconst isValidMaxAge = (maxAge: any) => typeof maxAge === 'number' && maxAge > 0;\nconst isValidLevel = (level: any) => ALLOWED_LEVELS.has(level);\nconst isValidVerificationType = (type: any) => ALLOWED_TYPES.has(type);\n\nconst prefixWithOrg = (value: string) => value.replace(/^(org:)*/, 'org:');\n\n/**\n * Checks if a user has the required organization-level authorization.\n * Verifies if the user has the specified role or permission within their organization.\n * @returns null, if unable to determine due to missing data or unspecified role/permission.\n */\nconst checkOrgAuthorization: CheckOrgAuthorization = (params, options) => {\n const { orgId, orgRole, orgPermissions } = options;\n if (!params.role && !params.permission) {\n return null;\n }\n\n if (!orgId || !orgRole || !orgPermissions) {\n return null;\n }\n\n if (params.permission) {\n return orgPermissions.includes(prefixWithOrg(params.permission));\n }\n\n if (params.role) {\n return prefixWithOrg(orgRole) === prefixWithOrg(params.role);\n }\n return null;\n};\n\nconst checkForFeatureOrPlan = (claim: string, featureOrPlan: string) => {\n const { org: orgFeatures, user: userFeatures } = splitByScope(claim);\n const [scope, _id] = featureOrPlan.split(':');\n const id = _id || scope;\n\n if (scope === 'org') {\n return orgFeatures.includes(id);\n } else if (scope === 'user') {\n return userFeatures.includes(id);\n } else {\n // Since org scoped features will not exist if there is not an active org, merging is safe.\n return [...orgFeatures, ...userFeatures].includes(id);\n }\n};\n\nconst checkBillingAuthorization: CheckBillingAuthorization = (params, options) => {\n const { features, plans } = options;\n\n if (params.feature && features) {\n return checkForFeatureOrPlan(features, params.feature);\n }\n\n if (params.plan && plans) {\n return checkForFeatureOrPlan(plans, params.plan);\n }\n return null;\n};\n\nconst splitByScope = (fea: string | null | undefined) => {\n const features = fea ? fea.split(',').map(f => f.trim()) : [];\n\n // TODO: make this more efficient\n return {\n org: features.filter(f => f.split(':')[0].includes('o')).map(f => f.split(':')[1]),\n user: features.filter(f => f.split(':')[0].includes('u')).map(f => f.split(':')[1]),\n };\n};\n\nconst validateReverificationConfig = (config: ReverificationConfig | undefined | null) => {\n if (!config) {\n return false;\n }\n\n const convertConfigToObject = (config: ReverificationConfig) => {\n if (typeof config === 'string') {\n return TYPES_TO_OBJECTS[config];\n }\n return config;\n };\n\n const isValidStringValue = typeof config === 'string' && isValidVerificationType(config);\n const isValidObjectValue =\n typeof config === 'object' && isValidLevel(config.level) && isValidMaxAge(config.afterMinutes);\n\n if (isValidStringValue || isValidObjectValue) {\n return convertConfigToObject.bind(null, config);\n }\n\n return false;\n};\n\n/**\n * Evaluates if the user meets re-verification authentication requirements.\n * Compares the user's factor verification ages against the specified maxAge.\n * Handles different verification levels (first factor, second factor, multi-factor).\n * @returns null, if requirements or verification data are missing.\n */\nconst checkReverificationAuthorization: CheckReverificationAuthorization = (params, { factorVerificationAge }) => {\n if (!params.reverification || !factorVerificationAge) {\n return null;\n }\n\n const isValidReverification = validateReverificationConfig(params.reverification);\n if (!isValidReverification) {\n return null;\n }\n\n const { level, afterMinutes } = isValidReverification();\n const [factor1Age, factor2Age] = factorVerificationAge;\n\n // -1 indicates the factor group (1fa,2fa) is not enabled\n // -1 for 1fa is not a valid scenario, but we need to make sure we handle it properly\n const isValidFactor1 = factor1Age !== -1 ? afterMinutes > factor1Age : null;\n const isValidFactor2 = factor2Age !== -1 ? afterMinutes > factor2Age : null;\n\n switch (level) {\n case 'first_factor':\n return isValidFactor1;\n case 'second_factor':\n return factor2Age !== -1 ? isValidFactor2 : isValidFactor1;\n case 'multi_factor':\n return factor2Age === -1 ? isValidFactor1 : isValidFactor1 && isValidFactor2;\n }\n};\n\n/**\n * Creates a function for comprehensive user authorization checks.\n * Combines organization-level and reverification authentication checks.\n * The returned function authorizes if both checks pass, or if at least one passes\n * when the other is indeterminate. Fails if userId is missing.\n */\nconst createCheckAuthorization = (options: AuthorizationOptions): CheckAuthorizationWithCustomPermissions => {\n return (params): boolean => {\n if (!options.userId) {\n return false;\n }\n\n const billingAuthorization = checkBillingAuthorization(params, options);\n const orgAuthorization = checkOrgAuthorization(params, options);\n const reverificationAuthorization = checkReverificationAuthorization(params, options);\n\n if ([billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === null)) {\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === true);\n }\n\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].every(a => a === true);\n };\n};\n\ntype AuthStateOptions = {\n authObject: {\n userId?: string | null;\n sessionId?: string | null;\n sessionStatus?: SessionStatusClaim | null;\n sessionClaims?: JwtPayload | null;\n actor?: ActClaim | null;\n orgId?: string | null;\n orgRole?: OrganizationCustomRoleKey | null;\n orgSlug?: string | null;\n orgPermissions?: OrganizationCustomPermissionKey[] | null;\n getToken: GetToken;\n signOut: SignOut;\n has: (params: Parameters<CheckAuthorizationWithCustomPermissions>[0]) => boolean;\n };\n options: PendingSessionOptions;\n};\n\n/**\n * Shared utility function that centralizes auth state resolution logic,\n * preventing duplication across different packages.\n * @internal\n */\nconst resolveAuthState = ({\n authObject: {\n sessionId,\n sessionStatus,\n userId,\n actor,\n orgId,\n orgRole,\n orgSlug,\n signOut,\n getToken,\n has,\n sessionClaims,\n },\n options: { treatPendingAsSignedOut = true },\n}: AuthStateOptions): UseAuthReturn | undefined => {\n if (sessionId === undefined && userId === undefined) {\n return {\n isLoaded: false,\n isSignedIn: undefined,\n sessionId,\n sessionClaims: undefined,\n userId,\n actor: undefined,\n orgId: undefined,\n orgRole: undefined,\n orgSlug: undefined,\n has: undefined,\n signOut,\n getToken,\n } as const;\n }\n\n if (sessionId === null && userId === null) {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId,\n userId,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (treatPendingAsSignedOut && sessionStatus === 'pending') {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId: null,\n userId: null,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !!orgId && !!orgRole) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId,\n orgRole,\n orgSlug: orgSlug || null,\n has,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !orgId) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has,\n signOut,\n getToken,\n } as const;\n }\n};\n\nexport { createCheckAuthorization, resolveAuthState, splitByScope, validateReverificationConfig };\n"],"mappings":";;AA4CA,MAAMA,mBAAkC;CACtC,YAAY;EACV,cAAc;EACd,OAAO;CACR;CACD,QAAQ;EACN,cAAc;EACd,OAAO;CACR;CACD,UAAU;EACR,cAAc;EACd,OAAO;CACR;CACD,KAAK;EACH,cAAc;EACd,OAAO;CACR;AACF;AAED,MAAM,iBAAiB,IAAI,IAA8B;CAAC;CAAgB;CAAiB;AAAe;AAE1G,MAAM,gBAAgB,IAAI,IAA8B;CAAC;CAAc;CAAU;CAAY;AAAM;AAGnG,MAAM,gBAAgB,CAACC,kBAAuB,WAAW,YAAY,SAAS;AAC9E,MAAM,eAAe,CAACC,UAAe,eAAe,IAAI,MAAM;AAC9D,MAAM,0BAA0B,CAACC,SAAc,cAAc,IAAI,KAAK;AAEtE,MAAM,gBAAgB,CAACC,UAAkB,MAAM,QAAQ,YAAY,OAAO;;;;;;AAO1E,MAAMC,wBAA+C,CAAC,QAAQ,YAAY;CACxE,MAAM,EAAE,OAAO,SAAS,gBAAgB,GAAG;AAC3C,MAAK,OAAO,SAAS,OAAO,WAC1B,QAAO;AAGT,MAAK,UAAU,YAAY,eACzB,QAAO;AAGT,KAAI,OAAO,WACT,QAAO,eAAe,SAAS,cAAc,OAAO,WAAW,CAAC;AAGlE,KAAI,OAAO,KACT,QAAO,cAAc,Q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,wBAA2B,kBAC7B,QAAO;EACL,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AAGH,KAAI,cAAc,QAAQ,WAAW,KACnC,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,KAAK,MAAM;EACX;EACA;CACD;AAGH,KAAI,2BAA2B,kBAAkB,UAC/C,QAAO;EACL,UAAU;EACV,YAAY;EACZ,WAAW;EACX,QAAQ;EACR,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,KAAK,MAAM;EACX;EACA;CACD;AAGH,OAAM,eAAe,mBAAmB,YAAY,WAAW,QAC7D,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB;EACA;EACA,SAAS,WAAW;EACpB;EACA;EACA;CACD;AAGH,OAAM,eAAe,mBAAmB,WAAW,MACjD,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB,OAAO;EACP,SAAS;EACT,SAAS;EACT;EACA;EACA;CACD;AAEJ"}
|
|
@@ -192,5 +192,5 @@ const resolveAuthState = ({ authObject: { sessionId, sessionStatus, userId, acto
|
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
//#endregion
|
|
195
|
-
export {
|
|
196
|
-
//# sourceMappingURL=authorization-
|
|
195
|
+
export { createCheckAuthorization, resolveAuthState, splitByScope, validateReverificationConfig };
|
|
196
|
+
//# sourceMappingURL=authorization-XX4mKaAz.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-XX4mKaAz.mjs","names":["TYPES_TO_OBJECTS: TypesToConfig","maxAge: any","level: any","type: any","value: string","checkOrgAuthorization: CheckOrgAuthorization","claim: string","featureOrPlan: string","checkBillingAuthorization: CheckBillingAuthorization","fea: string | null | undefined","config: ReverificationConfig | undefined | null","config: ReverificationConfig","config","checkReverificationAuthorization: CheckReverificationAuthorization","options: AuthorizationOptions"],"sources":["../../src/authorization.ts"],"sourcesContent":["import type {\n ActClaim,\n CheckAuthorizationWithCustomPermissions,\n GetToken,\n JwtPayload,\n OrganizationCustomPermissionKey,\n OrganizationCustomRoleKey,\n PendingSessionOptions,\n ReverificationConfig,\n SessionStatusClaim,\n SessionVerificationLevel,\n SessionVerificationTypes,\n SignOut,\n UseAuthReturn,\n} from './types';\n\ntype TypesToConfig = Record<SessionVerificationTypes, Exclude<ReverificationConfig, SessionVerificationTypes>>;\ntype AuthorizationOptions = {\n userId: string | null | undefined;\n orgId: string | null | undefined;\n orgRole: string | null | undefined;\n orgPermissions: string[] | null | undefined;\n factorVerificationAge: [number, number] | null;\n features: string | null | undefined;\n plans: string | null | undefined;\n};\n\ntype CheckOrgAuthorization = (\n params: { role?: OrganizationCustomRoleKey; permission?: OrganizationCustomPermissionKey },\n options: Pick<AuthorizationOptions, 'orgId' | 'orgRole' | 'orgPermissions'>,\n) => boolean | null;\n\ntype CheckBillingAuthorization = (\n params: { feature?: string; plan?: string },\n options: Pick<AuthorizationOptions, 'plans' | 'features'>,\n) => boolean | null;\n\ntype CheckReverificationAuthorization = (\n params: {\n reverification?: ReverificationConfig;\n },\n { factorVerificationAge }: AuthorizationOptions,\n) => boolean | null;\n\nconst TYPES_TO_OBJECTS: TypesToConfig = {\n strict_mfa: {\n afterMinutes: 10,\n level: 'multi_factor',\n },\n strict: {\n afterMinutes: 10,\n level: 'second_factor',\n },\n moderate: {\n afterMinutes: 60,\n level: 'second_factor',\n },\n lax: {\n afterMinutes: 1_440,\n level: 'second_factor',\n },\n};\n\nconst ALLOWED_LEVELS = new Set<SessionVerificationLevel>(['first_factor', 'second_factor', 'multi_factor']);\n\nconst ALLOWED_TYPES = new Set<SessionVerificationTypes>(['strict_mfa', 'strict', 'moderate', 'lax']);\n\n// Helper functions\nconst isValidMaxAge = (maxAge: any) => typeof maxAge === 'number' && maxAge > 0;\nconst isValidLevel = (level: any) => ALLOWED_LEVELS.has(level);\nconst isValidVerificationType = (type: any) => ALLOWED_TYPES.has(type);\n\nconst prefixWithOrg = (value: string) => value.replace(/^(org:)*/, 'org:');\n\n/**\n * Checks if a user has the required organization-level authorization.\n * Verifies if the user has the specified role or permission within their organization.\n * @returns null, if unable to determine due to missing data or unspecified role/permission.\n */\nconst checkOrgAuthorization: CheckOrgAuthorization = (params, options) => {\n const { orgId, orgRole, orgPermissions } = options;\n if (!params.role && !params.permission) {\n return null;\n }\n\n if (!orgId || !orgRole || !orgPermissions) {\n return null;\n }\n\n if (params.permission) {\n return orgPermissions.includes(prefixWithOrg(params.permission));\n }\n\n if (params.role) {\n return prefixWithOrg(orgRole) === prefixWithOrg(params.role);\n }\n return null;\n};\n\nconst checkForFeatureOrPlan = (claim: string, featureOrPlan: string) => {\n const { org: orgFeatures, user: userFeatures } = splitByScope(claim);\n const [scope, _id] = featureOrPlan.split(':');\n const id = _id || scope;\n\n if (scope === 'org') {\n return orgFeatures.includes(id);\n } else if (scope === 'user') {\n return userFeatures.includes(id);\n } else {\n // Since org scoped features will not exist if there is not an active org, merging is safe.\n return [...orgFeatures, ...userFeatures].includes(id);\n }\n};\n\nconst checkBillingAuthorization: CheckBillingAuthorization = (params, options) => {\n const { features, plans } = options;\n\n if (params.feature && features) {\n return checkForFeatureOrPlan(features, params.feature);\n }\n\n if (params.plan && plans) {\n return checkForFeatureOrPlan(plans, params.plan);\n }\n return null;\n};\n\nconst splitByScope = (fea: string | null | undefined) => {\n const features = fea ? fea.split(',').map(f => f.trim()) : [];\n\n // TODO: make this more efficient\n return {\n org: features.filter(f => f.split(':')[0].includes('o')).map(f => f.split(':')[1]),\n user: features.filter(f => f.split(':')[0].includes('u')).map(f => f.split(':')[1]),\n };\n};\n\nconst validateReverificationConfig = (config: ReverificationConfig | undefined | null) => {\n if (!config) {\n return false;\n }\n\n const convertConfigToObject = (config: ReverificationConfig) => {\n if (typeof config === 'string') {\n return TYPES_TO_OBJECTS[config];\n }\n return config;\n };\n\n const isValidStringValue = typeof config === 'string' && isValidVerificationType(config);\n const isValidObjectValue =\n typeof config === 'object' && isValidLevel(config.level) && isValidMaxAge(config.afterMinutes);\n\n if (isValidStringValue || isValidObjectValue) {\n return convertConfigToObject.bind(null, config);\n }\n\n return false;\n};\n\n/**\n * Evaluates if the user meets re-verification authentication requirements.\n * Compares the user's factor verification ages against the specified maxAge.\n * Handles different verification levels (first factor, second factor, multi-factor).\n * @returns null, if requirements or verification data are missing.\n */\nconst checkReverificationAuthorization: CheckReverificationAuthorization = (params, { factorVerificationAge }) => {\n if (!params.reverification || !factorVerificationAge) {\n return null;\n }\n\n const isValidReverification = validateReverificationConfig(params.reverification);\n if (!isValidReverification) {\n return null;\n }\n\n const { level, afterMinutes } = isValidReverification();\n const [factor1Age, factor2Age] = factorVerificationAge;\n\n // -1 indicates the factor group (1fa,2fa) is not enabled\n // -1 for 1fa is not a valid scenario, but we need to make sure we handle it properly\n const isValidFactor1 = factor1Age !== -1 ? afterMinutes > factor1Age : null;\n const isValidFactor2 = factor2Age !== -1 ? afterMinutes > factor2Age : null;\n\n switch (level) {\n case 'first_factor':\n return isValidFactor1;\n case 'second_factor':\n return factor2Age !== -1 ? isValidFactor2 : isValidFactor1;\n case 'multi_factor':\n return factor2Age === -1 ? isValidFactor1 : isValidFactor1 && isValidFactor2;\n }\n};\n\n/**\n * Creates a function for comprehensive user authorization checks.\n * Combines organization-level and reverification authentication checks.\n * The returned function authorizes if both checks pass, or if at least one passes\n * when the other is indeterminate. Fails if userId is missing.\n */\nconst createCheckAuthorization = (options: AuthorizationOptions): CheckAuthorizationWithCustomPermissions => {\n return (params): boolean => {\n if (!options.userId) {\n return false;\n }\n\n const billingAuthorization = checkBillingAuthorization(params, options);\n const orgAuthorization = checkOrgAuthorization(params, options);\n const reverificationAuthorization = checkReverificationAuthorization(params, options);\n\n if ([billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === null)) {\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].some(a => a === true);\n }\n\n return [billingAuthorization || orgAuthorization, reverificationAuthorization].every(a => a === true);\n };\n};\n\ntype AuthStateOptions = {\n authObject: {\n userId?: string | null;\n sessionId?: string | null;\n sessionStatus?: SessionStatusClaim | null;\n sessionClaims?: JwtPayload | null;\n actor?: ActClaim | null;\n orgId?: string | null;\n orgRole?: OrganizationCustomRoleKey | null;\n orgSlug?: string | null;\n orgPermissions?: OrganizationCustomPermissionKey[] | null;\n getToken: GetToken;\n signOut: SignOut;\n has: (params: Parameters<CheckAuthorizationWithCustomPermissions>[0]) => boolean;\n };\n options: PendingSessionOptions;\n};\n\n/**\n * Shared utility function that centralizes auth state resolution logic,\n * preventing duplication across different packages.\n * @internal\n */\nconst resolveAuthState = ({\n authObject: {\n sessionId,\n sessionStatus,\n userId,\n actor,\n orgId,\n orgRole,\n orgSlug,\n signOut,\n getToken,\n has,\n sessionClaims,\n },\n options: { treatPendingAsSignedOut = true },\n}: AuthStateOptions): UseAuthReturn | undefined => {\n if (sessionId === undefined && userId === undefined) {\n return {\n isLoaded: false,\n isSignedIn: undefined,\n sessionId,\n sessionClaims: undefined,\n userId,\n actor: undefined,\n orgId: undefined,\n orgRole: undefined,\n orgSlug: undefined,\n has: undefined,\n signOut,\n getToken,\n } as const;\n }\n\n if (sessionId === null && userId === null) {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId,\n userId,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (treatPendingAsSignedOut && sessionStatus === 'pending') {\n return {\n isLoaded: true,\n isSignedIn: false,\n sessionId: null,\n userId: null,\n sessionClaims: null,\n actor: null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has: () => false,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !!orgId && !!orgRole) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId,\n orgRole,\n orgSlug: orgSlug || null,\n has,\n signOut,\n getToken,\n } as const;\n }\n\n if (!!sessionId && !!sessionClaims && !!userId && !orgId) {\n return {\n isLoaded: true,\n isSignedIn: true,\n sessionId,\n sessionClaims,\n userId,\n actor: actor || null,\n orgId: null,\n orgRole: null,\n orgSlug: null,\n has,\n signOut,\n getToken,\n } as const;\n }\n};\n\nexport { createCheckAuthorization, resolveAuthState, splitByScope, validateReverificationConfig };\n"],"mappings":";AA4CA,MAAMA,mBAAkC;CACtC,YAAY;EACV,cAAc;EACd,OAAO;CACR;CACD,QAAQ;EACN,cAAc;EACd,OAAO;CACR;CACD,UAAU;EACR,cAAc;EACd,OAAO;CACR;CACD,KAAK;EACH,cAAc;EACd,OAAO;CACR;AACF;AAED,MAAM,iBAAiB,IAAI,IAA8B;CAAC;CAAgB;CAAiB;AAAe;AAE1G,MAAM,gBAAgB,IAAI,IAA8B;CAAC;CAAc;CAAU;CAAY;AAAM;AAGnG,MAAM,gBAAgB,CAACC,kBAAuB,WAAW,YAAY,SAAS;AAC9E,MAAM,eAAe,CAACC,UAAe,eAAe,IAAI,MAAM;AAC9D,MAAM,0BAA0B,CAACC,SAAc,cAAc,IAAI,KAAK;AAEtE,MAAM,gBAAgB,CAACC,UAAkB,MAAM,QAAQ,YAAY,OAAO;;;;;;AAO1E,MAAMC,wBAA+C,CAAC,QAAQ,YAAY;CACxE,MAAM,EAAE,OAAO,SAAS,gBAAgB,GAAG;AAC3C,MAAK,OAAO,SAAS,OAAO,WAC1B,QAAO;AAGT,MAAK,UAAU,YAAY,eACzB,QAAO;AAGT,KAAI,OAAO,WACT,QAAO,eAAe,SAAS,cAAc,OAAO,WAAW,CAAC;AAGlE,KAAI,OAAO,KACT,QAAO,cAAc,QAAQ,KAAK,cAAc,OAAO,KAAK;AAE9D,QAAO;AACR;AAED,MAAM,wBAAwB,CAACC,OAAeC,kBAA0B;CACtE,MAAM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AAI,cAAc,QAAQ,WAAW,KACnC,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,KAAK,MAAM;EACX;EACA;CACD;AAGH,KAAI,2BAA2B,kBAAkB,UAC/C,QAAO;EACL,UAAU;EACV,YAAY;EACZ,WAAW;EACX,QAAQ;EACR,eAAe;EACf,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,KAAK,MAAM;EACX;EACA;CACD;AAGH,OAAM,eAAe,mBAAmB,YAAY,WAAW,QAC7D,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB;EACA;EACA,SAAS,WAAW;EACpB;EACA;EACA;CACD;AAGH,OAAM,eAAe,mBAAmB,WAAW,MACjD,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA,OAAO,SAAS;EAChB,OAAO;EACP,SAAS;EACT,SAAS;EACT;EACA;EACA;CACD;AAEJ"}
|
package/dist/runtime/{authorization-errors-BmyMJ_xr.mjs → authorization-errors-CS1pNy8i.mjs}
RENAMED
|
@@ -11,5 +11,5 @@ const isReverificationHint = (result) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
|
-
export { reverificationError
|
|
15
|
-
//# sourceMappingURL=authorization-errors-
|
|
14
|
+
export { isReverificationHint, reverificationError, reverificationErrorResponse };
|
|
15
|
+
//# sourceMappingURL=authorization-errors-CS1pNy8i.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-errors-CS1pNy8i.mjs","names":["missingConfig?: MC","result: any"],"sources":["../../src/authorization-errors.ts"],"sourcesContent":["import type { ReverificationConfig } from './types';\n\ntype ClerkError<T> = {\n clerk_error: T;\n};\n\nconst REVERIFICATION_REASON = 'reverification-error';\n\ntype ReverificationError<M extends { metadata?: any } = { metadata: unknown }> = ClerkError<\n {\n type: 'forbidden';\n reason: typeof REVERIFICATION_REASON;\n } & M\n>;\n\nconst reverificationError = <MC extends ReverificationConfig>(\n missingConfig?: MC,\n): ReverificationError<{\n metadata?: {\n reverification?: MC;\n };\n}> => ({\n clerk_error: {\n type: 'forbidden',\n reason: REVERIFICATION_REASON,\n metadata: {\n reverification: missingConfig,\n },\n },\n});\n\nconst reverificationErrorResponse = (...args: Parameters<typeof reverificationError>) =>\n new Response(JSON.stringify(reverificationError(...args)), {\n status: 403,\n });\n\nconst isReverificationHint = (result: any): result is ReturnType<typeof reverificationError> => {\n return (\n result &&\n typeof result === 'object' &&\n 'clerk_error' in result &&\n result.clerk_error?.type === 'forbidden' &&\n result.clerk_error?.reason === REVERIFICATION_REASON\n );\n};\n\nexport { isReverificationHint, reverificationError, reverificationErrorResponse };\n"],"mappings":";AAMA,MAAM,wBAAwB;AAS9B,MAAM,sBAAsB,CAC1BA,mBAKK,EACL,aAAa;CACX,MAAM;CACN,QAAQ;CACR,UAAU,EACR,gBAAgB,cACjB;AACF,EACF;AAED,MAAM,8BAA8B,CAAC,GAAG,SACtC,IAAI,SAAS,KAAK,UAAU,oBAAoB,GAAG,KAAK,CAAC,EAAE,EACzD,QAAQ,IACT;AAEH,MAAM,uBAAuB,CAACC,WAAkE;AAC9F,QACE,iBACO,WAAW,YAClB,iBAAiB,UACjB,OAAO,aAAa,SAAS,eAC7B,OAAO,aAAa,WAAW;AAElC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-errors-dSnD6mpz.js","names":[],"sources":["../../src/authorization-errors.ts"],"sourcesContent":["import type { ReverificationConfig } from './types';\n\ntype ClerkError<T> = {\n clerk_error: T;\n};\n\nconst REVERIFICATION_REASON = 'reverification-error';\n\ntype ReverificationError<M extends { metadata?: any } = { metadata: unknown }> = ClerkError<\n {\n type: 'forbidden';\n reason: typeof REVERIFICATION_REASON;\n } & M\n>;\n\nconst reverificationError = <MC extends ReverificationConfig>(\n missingConfig?: MC,\n): ReverificationError<{\n metadata?: {\n reverification?: MC;\n };\n}> => ({\n clerk_error: {\n type: 'forbidden',\n reason: REVERIFICATION_REASON,\n metadata: {\n reverification: missingConfig,\n },\n },\n});\n\nconst reverificationErrorResponse = (...args: Parameters<typeof reverificationError>) =>\n new Response(JSON.stringify(reverificationError(...args)), {\n status: 403,\n });\n\nconst isReverificationHint = (result: any): result is ReturnType<typeof reverificationError> => {\n return (\n result &&\n typeof result === 'object' &&\n 'clerk_error' in result &&\n result.clerk_error?.type === 'forbidden' &&\n result.clerk_error?.reason === REVERIFICATION_REASON\n );\n};\n\nexport { isReverificationHint, reverificationError, reverificationErrorResponse };\n"],"mappings":";;AAMA,MAAM,wBAAwB;AAS9B,MAAM,
|
|
1
|
+
{"version":3,"file":"authorization-errors-dSnD6mpz.js","names":["missingConfig?: MC","result: any"],"sources":["../../src/authorization-errors.ts"],"sourcesContent":["import type { ReverificationConfig } from './types';\n\ntype ClerkError<T> = {\n clerk_error: T;\n};\n\nconst REVERIFICATION_REASON = 'reverification-error';\n\ntype ReverificationError<M extends { metadata?: any } = { metadata: unknown }> = ClerkError<\n {\n type: 'forbidden';\n reason: typeof REVERIFICATION_REASON;\n } & M\n>;\n\nconst reverificationError = <MC extends ReverificationConfig>(\n missingConfig?: MC,\n): ReverificationError<{\n metadata?: {\n reverification?: MC;\n };\n}> => ({\n clerk_error: {\n type: 'forbidden',\n reason: REVERIFICATION_REASON,\n metadata: {\n reverification: missingConfig,\n },\n },\n});\n\nconst reverificationErrorResponse = (...args: Parameters<typeof reverificationError>) =>\n new Response(JSON.stringify(reverificationError(...args)), {\n status: 403,\n });\n\nconst isReverificationHint = (result: any): result is ReturnType<typeof reverificationError> => {\n return (\n result &&\n typeof result === 'object' &&\n 'clerk_error' in result &&\n result.clerk_error?.type === 'forbidden' &&\n result.clerk_error?.reason === REVERIFICATION_REASON\n );\n};\n\nexport { isReverificationHint, reverificationError, reverificationErrorResponse };\n"],"mappings":";;AAMA,MAAM,wBAAwB;AAS9B,MAAM,sBAAsB,CAC1BA,mBAKK,EACL,aAAa;CACX,MAAM;CACN,QAAQ;CACR,UAAU,EACR,gBAAgB,cACjB;AACF,EACF;AAED,MAAM,8BAA8B,CAAC,GAAG,SACtC,IAAI,SAAS,KAAK,UAAU,oBAAoB,GAAG,KAAK,CAAC,EAAE,EACzD,QAAQ,IACT;AAEH,MAAM,uBAAuB,CAACC,WAAkE;AAC9F,QACE,iBACO,WAAW,YAClB,iBAAiB,UACjB,OAAO,aAAa,SAAS,eAC7B,OAAO,aAAa,WAAW;AAElC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-errors.d.mts","names":[],"sources":["../../src/authorization-errors.ts"],"sourcesContent":[],"mappings":";;;KAEK;eACU;AAHqC,CAAA;AAGpC,cAGV,qBAAA,GAAqB,sBAAA;AAAA,KAEtB,mBAAA,CAAA,UAAmB;EAGL,QAAA,CAAA,EAAA,GAAA;CACb,GAAA;EAJ2E,QAAA,EAAA,OAAA;
|
|
1
|
+
{"version":3,"file":"authorization-errors.d.mts","names":[],"sources":["../../src/authorization-errors.ts"],"sourcesContent":[],"mappings":";;;KAEK;eACU;AAHqC,CAAA;AAGpC,cAGV,qBAAA,GAAqB,sBAAA;AAAA,KAEtB,mBAAA,CAAA,UAAmB;EAGL,QAAA,CAAA,EAAA,GAAA;CACb,GAAA;EAJ2E,QAAA,EAAA,OAAA;AAAU,CAAA,CAAA,GAAV,UAAU,CAAA;EAOrF,IAAA,EAAA,WAAA;EAAkC,MAAA,EAAA,OAJrB,qBAIqB;CACtB,GAJZ,CAIY,CAAA;cADZ,mBAIe,EAAA,CAAA,WAJmB,oBAInB,CAAA,CAAA,aAAA,CAAA,EAHH,EAGG,EAAA,GAFlB,mBAEkB,CAAA;EAFlB,QAAA,CAAA,EAAA;IAAmB,cAAA,CAAA,EAED,EAFC;EAchB,CAAA;CAA0D,CAAA;cAA1D,2BAAwC,EAAA,CAAA,GAAA,IAAA,EAAA,UAAA,CAAA,OAAkB,mBAAlB,CAAA,EAAA,GAAsC,QAAtC;cAKxC,oBAL8E,EAAA,CAAA,MAAA,EAAA,GAAA,EAAA,GAAA,MAAA,IAK9B,UAL8B,CAAA,OAKZ,mBALY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-errors.d.ts","names":[],"sources":["../../src/authorization-errors.ts"],"sourcesContent":[],"mappings":";;;KAEK;eACU;AAHqC,CAAA;AAGpC,cAGV,qBAAA,GAAqB,sBAAA;AAAA,KAEtB,mBAAA,CAAA,UAAmB;EAGL,QAAA,CAAA,EAAA,GAAA;CACb,GAAA;EAJ2E,QAAA,EAAA,OAAA;
|
|
1
|
+
{"version":3,"file":"authorization-errors.d.ts","names":[],"sources":["../../src/authorization-errors.ts"],"sourcesContent":[],"mappings":";;;KAEK;eACU;AAHqC,CAAA;AAGpC,cAGV,qBAAA,GAAqB,sBAAA;AAAA,KAEtB,mBAAA,CAAA,UAAmB;EAGL,QAAA,CAAA,EAAA,GAAA;CACb,GAAA;EAJ2E,QAAA,EAAA,OAAA;AAAU,CAAA,CAAA,GAAV,UAAU,CAAA;EAOrF,IAAA,EAAA,WAAA;EAAkC,MAAA,EAAA,OAJrB,qBAIqB;CACtB,GAJZ,CAIY,CAAA;cADZ,mBAIe,EAAA,CAAA,WAJmB,oBAInB,CAAA,CAAA,aAAA,CAAA,EAHH,EAGG,EAAA,GAFlB,mBAEkB,CAAA;EAFlB,QAAA,CAAA,EAAA;IAAmB,cAAA,CAAA,EAED,EAFC;EAchB,CAAA;CAA0D,CAAA;cAA1D,2BAAwC,EAAA,CAAA,GAAA,IAAA,EAAA,UAAA,CAAA,OAAkB,mBAAlB,CAAA,EAAA,GAAsC,QAAtC;cAKxC,oBAL8E,EAAA,CAAA,MAAA,EAAA,GAAA,EAAA,GAAA,MAAA,IAK9B,UAL8B,CAAA,OAKZ,mBALY,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isReverificationHint, reverificationError, reverificationErrorResponse } from "./authorization-errors-CS1pNy8i.mjs";
|
|
2
2
|
|
|
3
3
|
export { isReverificationHint, reverificationError, reverificationErrorResponse };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActClaim, CheckAuthorizationWithCustomPermissions, GetToken, JwtPayload, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, PendingSessionOptions, ReverificationConfig, SessionStatusClaim, SessionVerificationAfterMinutes, SessionVerificationLevel, SignOut, UseAuthReturn } from "./index-amNuj7c6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/authorization.d.ts
|
|
4
4
|
type AuthorizationOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.d.mts","names":[],"sources":["../../src/authorization.ts"],"sourcesContent":[],"mappings":";;;KAiBK,oBAAA;;EAAA,KAAA,EAAA,MAAA,GAAA,IAAA,GAAoB,SAAA;EA8GnB,OAAA,EAAA,MAQL,GAAA,IAAA,GAAA,SAAA;EAEK,cAAA,EAAA,MAAA,EAAA,GAAA,IAqBL,GAAA,SAAA;EArB6C,qBAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,GAAA,IAAA;;;;cAVxC,YAyEA,EAAA,CAAA,GAgBL,EAAA,MAAA,GAhB0C,IAAA,GAAA,SAAA,EAAA,GAAA;EAkBtC,GAAA,EAAA,MAAA,EAAA;EAIe,IAAA,EAAA,MAAA,EAAA;CACA;cAtFd,4BAuFM,EAAA,CAAA,MAAA,EAvFkC,oBAuFlC,GAAA,SAAA,GAAA,IAAA,EAAA,GAAA,KAAA,GAAA,CAAA,GAAA,GAAA;EAEE,KAAA,0BAAA;EAEO,YAAA,iCAAA;CACP,CAAA
|
|
1
|
+
{"version":3,"file":"authorization.d.mts","names":[],"sources":["../../src/authorization.ts"],"sourcesContent":[],"mappings":";;;KAiBK,oBAAA;;EAAA,KAAA,EAAA,MAAA,GAAA,IAAA,GAAoB,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;GAeH,qBAAmB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActClaim, CheckAuthorizationWithCustomPermissions, GetToken, JwtPayload, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, PendingSessionOptions, ReverificationConfig, SessionStatusClaim, SessionVerificationAfterMinutes, SessionVerificationLevel, SignOut, UseAuthReturn } from "./index-BcEh__ny.js";
|
|
2
2
|
|
|
3
3
|
//#region src/authorization.d.ts
|
|
4
4
|
type AuthorizationOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.d.ts","names":[],"sources":["../../src/authorization.ts"],"sourcesContent":[],"mappings":";;;KAiBK,oBAAA;;EAAA,KAAA,EAAA,MAAA,GAAA,IAAA,GAAoB,SAAA;EA8GnB,OAAA,EAAA,MAQL,GAAA,IAAA,GAAA,SAAA;EAEK,cAAA,EAAA,MAAA,EAAA,GAAA,IAqBL,GAAA,SAAA;EArB6C,qBAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,GAAA,IAAA;;;;cAVxC,YAyEA,EAAA,CAAA,GAgBL,EAAA,MAAA,GAhB0C,IAAA,GAAA,SAAA,EAAA,GAAA;EAkBtC,GAAA,EAAA,MAAA,EAAA;EAIe,IAAA,EAAA,MAAA,EAAA;CACA;cAtFd,4BAuFM,EAAA,CAAA,MAAA,EAvFkC,oBAuFlC,GAAA,SAAA,GAAA,IAAA,EAAA,GAAA,KAAA,GAAA,CAAA,GAAA,GAAA;EAEE,KAAA,0BAAA;EAEO,YAAA,iCAAA;CACP,CAAA
|
|
1
|
+
{"version":3,"file":"authorization.d.ts","names":[],"sources":["../../src/authorization.ts"],"sourcesContent":[],"mappings":";;;KAiBK,oBAAA;;EAAA,KAAA,EAAA,MAAA,GAAA,IAAA,GAAoB,SAAA;EA8GnB,OAAA,EAAA,MAQL,GAAA,IAAA,GAAA,SAAA;EAEK,cAAA,EAAA,MAAA,EAAA,GAAA,IAqBL,GAAA,S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verificationConfig } from "./authorization-XX4mKaAz.mjs";
|
|
2
2
|
|
|
3
3
|
export { createCheckAuthorization, resolveAuthState, splitByScope, validateReverificationConfig };
|
|
@@ -26,5 +26,5 @@ declare function isBrowserOnline(): boolean;
|
|
|
26
26
|
*/
|
|
27
27
|
declare function isValidBrowserOnline(): boolean;
|
|
28
28
|
//#endregion
|
|
29
|
-
export {
|
|
30
|
-
//# sourceMappingURL=browser-
|
|
29
|
+
export { inBrowser as inBrowser$1, isBrowserOnline as isBrowserOnline$1, isValidBrowser as isValidBrowser$1, isValidBrowserOnline as isValidBrowserOnline$1, userAgentIsRobot as userAgentIsRobot$1 };
|
|
30
|
+
//# sourceMappingURL=browser-BZxfK_h9.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-
|
|
1
|
+
{"version":3,"file":"browser-BZxfK_h9.d.mts","names":[],"sources":["../../src/browser.ts"],"sourcesContent":[],"mappings":";;AAIA;AAyCA;AAQA;AAYgB,iBA7DA,SAAA,CAAA,CA6De,EAAA,OAAA;AAmB/B;;;;;iBAvCgB,gBAAA;;;;;iBAQA,cAAA,CAAA;;;;;iBAYA,eAAA,CAAA;;;;;iBAmBA,oBAAA,CAAA"}
|
|
@@ -26,5 +26,5 @@ declare function isBrowserOnline(): boolean;
|
|
|
26
26
|
*/
|
|
27
27
|
declare function isValidBrowserOnline(): boolean;
|
|
28
28
|
//#endregion
|
|
29
|
-
export {
|
|
30
|
-
//# sourceMappingURL=browser-
|
|
29
|
+
export { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot };
|
|
30
|
+
//# sourceMappingURL=browser-CT1g0w-N.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-
|
|
1
|
+
{"version":3,"file":"browser-CT1g0w-N.d.ts","names":[],"sources":["../../src/browser.ts"],"sourcesContent":[],"mappings":";;AAIA;AAyCA;AAQA;AAYgB,iBA7DA,SAAA,CAAA,CA6De,EAAA,OAAA;AAmB/B;;;;;iBAvCgB,gBAAA;;;;;iBAQA,cAAA,CAAA;;;;;iBAYA,eAAA,CAAA;;;;;iBAmBA,oBAAA,CAAA"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
function inBrowser() {
|
|
8
8
|
return typeof window !== "undefined";
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const botAgents = [
|
|
11
11
|
"bot",
|
|
12
12
|
"spider",
|
|
13
13
|
"crawl",
|
|
@@ -36,7 +36,8 @@ const botAgentRegex = new RegExp([
|
|
|
36
36
|
"whatsapp",
|
|
37
37
|
"youtube",
|
|
38
38
|
"semrush"
|
|
39
|
-
]
|
|
39
|
+
];
|
|
40
|
+
const botAgentRegex = new RegExp(botAgents.join("|"), "i");
|
|
40
41
|
/**
|
|
41
42
|
* Checks if the user agent is a bot.
|
|
42
43
|
* @param userAgent - Any user agent string
|
|
@@ -62,7 +63,8 @@ function isBrowserOnline() {
|
|
|
62
63
|
const navigator = inBrowser() ? window?.navigator : null;
|
|
63
64
|
if (!navigator) return false;
|
|
64
65
|
const isNavigatorOnline = navigator?.onLine;
|
|
65
|
-
|
|
66
|
+
const isExperimentalConnectionOnline = navigator?.connection?.rtt !== 0 && navigator?.connection?.downlink !== 0;
|
|
67
|
+
return isExperimentalConnectionOnline && isNavigatorOnline;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* Runs `isBrowserOnline` and `isValidBrowser` to check if the current environment is a valid browser and if the navigator is online.
|
|
@@ -103,4 +105,4 @@ Object.defineProperty(exports, 'userAgentIsRobot', {
|
|
|
103
105
|
return userAgentIsRobot;
|
|
104
106
|
}
|
|
105
107
|
});
|
|
106
|
-
//# sourceMappingURL=browser-
|
|
108
|
+
//# sourceMappingURL=browser-DJuTPwze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-DJuTPwze.js","names":["userAgent: string"],"sources":["../../src/browser.ts"],"sourcesContent":["/**\n * Checks if the window object is defined. You can also use this to check if something is happening on the client side.\n * @returns {boolean}\n */\nexport function inBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nconst botAgents = [\n 'bot',\n 'spider',\n 'crawl',\n 'APIs-Google',\n 'AdsBot',\n 'Googlebot',\n 'mediapartners',\n 'Google Favicon',\n 'FeedFetcher',\n 'Google-Read-Aloud',\n 'DuplexWeb-Google',\n 'googleweblight',\n 'bing',\n 'yandex',\n 'baidu',\n 'duckduck',\n 'yahoo',\n 'ecosia',\n 'ia_archiver',\n 'facebook',\n 'instagram',\n 'pinterest',\n 'reddit',\n 'slack',\n 'twitter',\n 'whatsapp',\n 'youtube',\n 'semrush',\n];\nconst botAgentRegex = new RegExp(botAgents.join('|'), 'i');\n\n/**\n * Checks if the user agent is a bot.\n * @param userAgent - Any user agent string\n * @returns {boolean}\n */\nexport function userAgentIsRobot(userAgent: string): boolean {\n return !userAgent ? false : botAgentRegex.test(userAgent);\n}\n\n/**\n * Checks if the current environment is a browser and the user agent is not a bot.\n * @returns {boolean}\n */\nexport function isValidBrowser(): boolean {\n const navigator = inBrowser() ? window?.navigator : null;\n if (!navigator) {\n return false;\n }\n return !userAgentIsRobot(navigator?.userAgent) && !navigator?.webdriver;\n}\n\n/**\n * Checks if the current environment is a browser and if the navigator is online.\n * @returns {boolean}\n */\nexport function isBrowserOnline(): boolean {\n const navigator = inBrowser() ? window?.navigator : null;\n if (!navigator) {\n return false;\n }\n\n const isNavigatorOnline = navigator?.onLine;\n\n // Being extra safe with the experimental `connection` property, as it is not defined in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection#browser_compatibility\n // @ts-ignore\n const isExperimentalConnectionOnline = navigator?.connection?.rtt !== 0 && navigator?.connection?.downlink !== 0;\n return isExperimentalConnectionOnline && isNavigatorOnline;\n}\n\n/**\n * Runs `isBrowserOnline` and `isValidBrowser` to check if the current environment is a valid browser and if the navigator is online.\n * @returns {boolean}\n */\nexport function isValidBrowserOnline(): boolean {\n return isBrowserOnline() && isValidBrowser();\n}\n"],"mappings":";;;;;;AAIA,SAAgB,YAAqB;AACnC,eAAc,WAAW;AAC1B;AAED,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACD,MAAM,gBAAgB,IAAI,OAAO,UAAU,KAAK,IAAI,EAAE;;;;;;AAOtD,SAAgB,iBAAiBA,WAA4B;AAC3D,SAAQ,YAAY,QAAQ,cAAc,KAAK,UAAU;AAC1D;;;;;AAMD,SAAgB,iBAA0B;CACxC,MAAM,YAAY,WAAW,GAAG,QAAQ,YAAY;AACpD,MAAK,UACH,QAAO;AAET,SAAQ,iBAAiB,WAAW,UAAU,KAAK,WAAW;AAC/D;;;;;AAMD,SAAgB,kBAA2B;CACzC,MAAM,YAAY,WAAW,GAAG,QAAQ,YAAY;AACpD,MAAK,UACH,QAAO;CAGT,MAAM,oBAAoB,WAAW;CAKrC,MAAM,iCAAiC,WAAW,YAAY,QAAQ,KAAK,WAAW,YAAY,aAAa;AAC/G,QAAO,kCAAkC;AAC1C;;;;;AAMD,SAAgB,uBAAgC;AAC9C,QAAO,iBAAiB,IAAI,gBAAgB;AAC7C"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function inBrowser() {
|
|
7
7
|
return typeof window !== "undefined";
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const botAgents = [
|
|
10
10
|
"bot",
|
|
11
11
|
"spider",
|
|
12
12
|
"crawl",
|
|
@@ -35,7 +35,8 @@ const botAgentRegex = new RegExp([
|
|
|
35
35
|
"whatsapp",
|
|
36
36
|
"youtube",
|
|
37
37
|
"semrush"
|
|
38
|
-
]
|
|
38
|
+
];
|
|
39
|
+
const botAgentRegex = new RegExp(botAgents.join("|"), "i");
|
|
39
40
|
/**
|
|
40
41
|
* Checks if the user agent is a bot.
|
|
41
42
|
* @param userAgent - Any user agent string
|
|
@@ -61,7 +62,8 @@ function isBrowserOnline() {
|
|
|
61
62
|
const navigator = inBrowser() ? window?.navigator : null;
|
|
62
63
|
if (!navigator) return false;
|
|
63
64
|
const isNavigatorOnline = navigator?.onLine;
|
|
64
|
-
|
|
65
|
+
const isExperimentalConnectionOnline = navigator?.connection?.rtt !== 0 && navigator?.connection?.downlink !== 0;
|
|
66
|
+
return isExperimentalConnectionOnline && isNavigatorOnline;
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
67
69
|
* Runs `isBrowserOnline` and `isValidBrowser` to check if the current environment is a valid browser and if the navigator is online.
|
|
@@ -72,5 +74,5 @@ function isValidBrowserOnline() {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
//#endregion
|
|
75
|
-
export {
|
|
76
|
-
//# sourceMappingURL=browser-
|
|
77
|
+
export { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot };
|
|
78
|
+
//# sourceMappingURL=browser-hvvxjQRr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-hvvxjQRr.mjs","names":["userAgent: string"],"sources":["../../src/browser.ts"],"sourcesContent":["/**\n * Checks if the window object is defined. You can also use this to check if something is happening on the client side.\n * @returns {boolean}\n */\nexport function inBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nconst botAgents = [\n 'bot',\n 'spider',\n 'crawl',\n 'APIs-Google',\n 'AdsBot',\n 'Googlebot',\n 'mediapartners',\n 'Google Favicon',\n 'FeedFetcher',\n 'Google-Read-Aloud',\n 'DuplexWeb-Google',\n 'googleweblight',\n 'bing',\n 'yandex',\n 'baidu',\n 'duckduck',\n 'yahoo',\n 'ecosia',\n 'ia_archiver',\n 'facebook',\n 'instagram',\n 'pinterest',\n 'reddit',\n 'slack',\n 'twitter',\n 'whatsapp',\n 'youtube',\n 'semrush',\n];\nconst botAgentRegex = new RegExp(botAgents.join('|'), 'i');\n\n/**\n * Checks if the user agent is a bot.\n * @param userAgent - Any user agent string\n * @returns {boolean}\n */\nexport function userAgentIsRobot(userAgent: string): boolean {\n return !userAgent ? false : botAgentRegex.test(userAgent);\n}\n\n/**\n * Checks if the current environment is a browser and the user agent is not a bot.\n * @returns {boolean}\n */\nexport function isValidBrowser(): boolean {\n const navigator = inBrowser() ? window?.navigator : null;\n if (!navigator) {\n return false;\n }\n return !userAgentIsRobot(navigator?.userAgent) && !navigator?.webdriver;\n}\n\n/**\n * Checks if the current environment is a browser and if the navigator is online.\n * @returns {boolean}\n */\nexport function isBrowserOnline(): boolean {\n const navigator = inBrowser() ? window?.navigator : null;\n if (!navigator) {\n return false;\n }\n\n const isNavigatorOnline = navigator?.onLine;\n\n // Being extra safe with the experimental `connection` property, as it is not defined in all browsers\n // https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection#browser_compatibility\n // @ts-ignore\n const isExperimentalConnectionOnline = navigator?.connection?.rtt !== 0 && navigator?.connection?.downlink !== 0;\n return isExperimentalConnectionOnline && isNavigatorOnline;\n}\n\n/**\n * Runs `isBrowserOnline` and `isValidBrowser` to check if the current environment is a valid browser and if the navigator is online.\n * @returns {boolean}\n */\nexport function isValidBrowserOnline(): boolean {\n return isBrowserOnline() && isValidBrowser();\n}\n"],"mappings":";;;;;AAIA,SAAgB,YAAqB;AACnC,eAAc,WAAW;AAC1B;AAED,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACD,MAAM,gBAAgB,IAAI,OAAO,UAAU,KAAK,IAAI,EAAE;;;;;;AAOtD,SAAgB,iBAAiBA,WAA4B;AAC3D,SAAQ,YAAY,QAAQ,cAAc,KAAK,UAAU;AAC1D;;;;;AAMD,SAAgB,iBAA0B;CACxC,MAAM,YAAY,WAAW,GAAG,QAAQ,YAAY;AACpD,MAAK,UACH,QAAO;AAET,SAAQ,iBAAiB,WAAW,UAAU,KAAK,WAAW;AAC/D;;;;;AAMD,SAAgB,kBAA2B;CACzC,MAAM,YAAY,WAAW,GAAG,QAAQ,YAAY;AACpD,MAAK,UACH,QAAO;CAGT,MAAM,oBAAoB,WAAW;CAKrC,MAAM,iCAAiC,WAAW,YAAY,QAAQ,KAAK,WAAW,YAAY,aAAa;AAC/G,QAAO,kCAAkC;AAC1C;;;;;AAMD,SAAgB,uBAAgC;AAC9C,QAAO,iBAAiB,IAAI,gBAAgB;AAC7C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inBrowser$1 as inBrowser, isBrowserOnline$1 as isBrowserOnline, isValidBrowser$1 as isValidBrowser, isValidBrowserOnline$1 as isValidBrowserOnline, userAgentIsRobot$1 as userAgentIsRobot } from "./browser-BZxfK_h9.mjs";
|
|
2
2
|
export { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot } from "./browser-CT1g0w-N.js";
|
|
2
2
|
export { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot };
|
package/dist/runtime/browser.js
CHANGED
package/dist/runtime/browser.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot } from "./browser-hvvxjQRr.mjs";
|
|
2
2
|
|
|
3
3
|
export { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot };
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
function buildAccountsBaseUrl(frontendApi) {
|
|
7
7
|
if (!frontendApi) return "";
|
|
8
|
-
|
|
8
|
+
const accountsBaseUrl = frontendApi.replace(/clerk\.accountsstage\./, "accountsstage.").replace(/clerk\.accounts\.|clerk\./, "accounts.");
|
|
9
|
+
return `https://${accountsBaseUrl}`;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAccountsBaseUrl.js","names":[],"sources":["../../src/buildAccountsBaseUrl.ts"],"sourcesContent":["/**\n * Builds a full origin string pointing to the Account Portal for the given frontend API.\n */\nexport function buildAccountsBaseUrl(frontendApi?: string): string {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi\n // staging accounts\n .replace(/clerk\\.accountsstage\\./, 'accountsstage.')\n .replace(/clerk\\.accounts\\.|clerk\\./, 'accounts.');\n return `https://${accountsBaseUrl}`;\n}\n"],"mappings":";;;;;AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"buildAccountsBaseUrl.js","names":["frontendApi?: string"],"sources":["../../src/buildAccountsBaseUrl.ts"],"sourcesContent":["/**\n * Builds a full origin string pointing to the Account Portal for the given frontend API.\n */\nexport function buildAccountsBaseUrl(frontendApi?: string): string {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi\n // staging accounts\n .replace(/clerk\\.accountsstage\\./, 'accountsstage.')\n .replace(/clerk\\.accounts\\.|clerk\\./, 'accounts.');\n return `https://${accountsBaseUrl}`;\n}\n"],"mappings":";;;;;AAGA,SAAgB,qBAAqBA,aAA8B;AACjE,MAAK,YACH,QAAO;CAIT,MAAM,kBAAkB,YAErB,QAAQ,0BAA0B,iBAAiB,CACnD,QAAQ,6BAA6B,YAAY;AACpD,SAAQ,UAAU,gBAAgB;AACnC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
function buildAccountsBaseUrl(frontendApi) {
|
|
6
6
|
if (!frontendApi) return "";
|
|
7
|
-
|
|
7
|
+
const accountsBaseUrl = frontendApi.replace(/clerk\.accountsstage\./, "accountsstage.").replace(/clerk\.accounts\.|clerk\./, "accounts.");
|
|
8
|
+
return `https://${accountsBaseUrl}`;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAccountsBaseUrl.mjs","names":[],"sources":["../../src/buildAccountsBaseUrl.ts"],"sourcesContent":["/**\n * Builds a full origin string pointing to the Account Portal for the given frontend API.\n */\nexport function buildAccountsBaseUrl(frontendApi?: string): string {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi\n // staging accounts\n .replace(/clerk\\.accountsstage\\./, 'accountsstage.')\n .replace(/clerk\\.accounts\\.|clerk\\./, 'accounts.');\n return `https://${accountsBaseUrl}`;\n}\n"],"mappings":";;;;AAGA,SAAgB,
|
|
1
|
+
{"version":3,"file":"buildAccountsBaseUrl.mjs","names":["frontendApi?: string"],"sources":["../../src/buildAccountsBaseUrl.ts"],"sourcesContent":["/**\n * Builds a full origin string pointing to the Account Portal for the given frontend API.\n */\nexport function buildAccountsBaseUrl(frontendApi?: string): string {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi\n // staging accounts\n .replace(/clerk\\.accountsstage\\./, 'accountsstage.')\n .replace(/clerk\\.accounts\\.|clerk\\./, 'accounts.');\n return `https://${accountsBaseUrl}`;\n}\n"],"mappings":";;;;AAGA,SAAgB,qBAAqBA,aAA8B;AACjE,MAAK,YACH,QAAO;CAIT,MAAM,kBAAkB,YAErB,QAAQ,0BAA0B,iBAAiB,CACnD,QAAQ,6BAA6B,YAAY;AACpD,SAAQ,UAAU,gBAAgB;AACnC"}
|
|
@@ -5,13 +5,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (all) => {
|
|
9
|
-
let target = {};
|
|
8
|
+
var __export = (target, all) => {
|
|
10
9
|
for (var name in all) __defProp(target, name, {
|
|
11
10
|
get: all[name],
|
|
12
11
|
enumerable: true
|
|
13
12
|
});
|
|
14
|
-
return target;
|
|
15
13
|
};
|
|
16
14
|
var __copyProps = (to, from, except, desc) => {
|
|
17
15
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|