@recombine-ai/platform 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/agent/voice-route.d.ts +0 -1
- package/build/agent/voice-route.d.ts.map +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BX1Y1U5K.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BX1Y1U5K.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BX1Y1U5K.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CfhWyN9h.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CfhWyN9h.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/CfhWyN9h.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{Di_V74uz.js → DZIyPttD.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DZIyPttD.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DZIyPttD.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/{BLNWnpEF.js → Dwp5kNrq.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dwp5kNrq.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Dwp5kNrq.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/QLBK9zEP.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/QLBK9zEP.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/QLBK9zEP.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/{app.CMAfr07P.js → app.Bn8iyYw5.js} +2 -2
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.Bn8iyYw5.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.Bn8iyYw5.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.BXhnC3PL.js +1 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.BXhnC3PL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.BXhnC3PL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{0.QR_Oo_bL.js → 0.Cbt5HWTn.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.Cbt5HWTn.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.Cbt5HWTn.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{1.ix_ewIRm.js → 1.B0G8ukBj.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.B0G8ukBj.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.B0G8ukBj.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{10.Bct9oucE.js → 10.BmJqz59f.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BmJqz59f.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.BmJqz59f.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{17.Ceocy3uk.js → 17.BsSabDEr.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.BsSabDEr.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.BsSabDEr.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{18.CEP4wIdC.js → 18.bLpA16Az.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.bLpA16Az.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.bLpA16Az.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{2.CNykZHfs.js → 2.CnB25-WL.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.CnB25-WL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.CnB25-WL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{3.PcCC3SI1.js → 3.DR6l0Ccm.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.DR6l0Ccm.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.DR6l0Ccm.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{4.9ms4x43v.js → 4.D17Vm3kn.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.D17Vm3kn.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.D17Vm3kn.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{5.DUArEOcf.js → 5.D6OZsUc8.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.D6OZsUc8.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.D6OZsUc8.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{6.DGAt7yC4.js → 6.CFu7Qg5G.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.CFu7Qg5G.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.CFu7Qg5G.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{8.D6P_mwCv.js → 8.CBmY9cgL.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CBmY9cgL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.CBmY9cgL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/{9.CJG0E_uZ.js → 9.Dl1FvS4O.js} +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.Dl1FvS4O.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.Dl1FvS4O.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/version.json +1 -1
- package/build/bosun-app/frontend/client/_app/version.json.br +0 -0
- package/build/bosun-app/frontend/client/_app/version.json.gz +0 -0
- package/build/bosun-app/frontend/handler.js +4 -4
- package/build/bosun-app/frontend/index.js +4 -4
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-DldTXN32.js → internal.js-DxZKY68b.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/chunks/{internal.js-DldTXN32.js.map → internal.js-DxZKY68b.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{handler-ByJuJCqw.js → handler-Nviq9afq.js} +3 -3
- package/build/bosun-app/frontend/server/chunks/{handler-ByJuJCqw.js.map → handler-Nviq9afq.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{index.js-D14fJLN0.js → index.js-BPQND3TN.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/{index.js-D14fJLN0.js.map → index.js-BPQND3TN.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/{manifest.js-IVKewP_e.js → manifest.js-KnxjpQDv.js} +14 -14
- package/build/bosun-app/frontend/server/chunks/{manifest.js-IVKewP_e.js.map → manifest.js-KnxjpQDv.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{0.js-Re3pvV59.js → 0.js-ByqPPsZv.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{0.js-Re3pvV59.js.map → 0.js-ByqPPsZv.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{1.js-aPubMLev.js → 1.js-CKlaDwxu.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{1.js-aPubMLev.js.map → 1.js-CKlaDwxu.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{10.js-D9na8JkG.js → 10.js-DNcPzymK.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{10.js-D9na8JkG.js.map → 10.js-DNcPzymK.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{17.js-CSR8I9P3.js → 17.js-BOBNHSvh.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{17.js-CSR8I9P3.js.map → 17.js-BOBNHSvh.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{18.js-BY5_O5nR.js → 18.js-Dda77acF.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{18.js-BY5_O5nR.js.map → 18.js-Dda77acF.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{2.js-DkDUPCMU.js → 2.js-CrM-fRjV.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{2.js-DkDUPCMU.js.map → 2.js-CrM-fRjV.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{3.js-zv82ZvVR.js → 3.js-Cdp_Lsh6.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{3.js-zv82ZvVR.js.map → 3.js-Cdp_Lsh6.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{4.js-BwcTHk9h.js → 4.js-BgsSGZ0M.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{4.js-BwcTHk9h.js.map → 4.js-BgsSGZ0M.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{5.js-BcUg5_51.js → 5.js-hfwz1yxU.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{5.js-BcUg5_51.js.map → 5.js-hfwz1yxU.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{6.js-CFQoJVKc.js → 6.js-BSOIrThL.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{6.js-CFQoJVKc.js.map → 6.js-BSOIrThL.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{8.js-Dvnivav4.js → 8.js-Bzk6c4uy.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{8.js-Dvnivav4.js.map → 8.js-Bzk6c4uy.js.map} +1 -1
- package/build/bosun-app/frontend/server/chunks/nodes/{9.js-DYI6IgGp.js → 9.js-DsSIA_fB.js} +2 -2
- package/build/bosun-app/frontend/server/chunks/nodes/{9.js-DYI6IgGp.js.map → 9.js-DsSIA_fB.js.map} +1 -1
- package/build/voice-agent-api/voice-http.js +1 -1
- package/build/voice-agent-api/voice-router.d.ts +1 -2
- package/build/voice-agent-api/voice-router.d.ts.map +1 -1
- package/build/voice-agent-api/voice-router.js +13 -29
- package/package.json +1 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BLNWnpEF.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BLNWnpEF.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BmALNv_v.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BmALNv_v.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/BmALNv_v.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DBAf6hth.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DBAf6hth.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/DBAf6hth.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Di_V74uz.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/Di_V74uz.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/_4CM6wpT.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/chunks/_4CM6wpT.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/chunks/_4CM6wpT.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.CMAfr07P.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/app.CMAfr07P.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.c2zU3eca.js +0 -1
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.c2zU3eca.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/entry/start.c2zU3eca.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.QR_Oo_bL.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/0.QR_Oo_bL.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.ix_ewIRm.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/1.ix_ewIRm.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.Bct9oucE.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/10.Bct9oucE.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.Ceocy3uk.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/17.Ceocy3uk.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CEP4wIdC.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/18.CEP4wIdC.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.CNykZHfs.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/2.CNykZHfs.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.PcCC3SI1.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/3.PcCC3SI1.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.9ms4x43v.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/4.9ms4x43v.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.DUArEOcf.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/5.DUArEOcf.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.DGAt7yC4.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/6.DGAt7yC4.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.D6P_mwCv.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/8.D6P_mwCv.js.gz +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.CJG0E_uZ.js.br +0 -0
- package/build/bosun-app/frontend/client/_app/immutable/nodes/9.CJG0E_uZ.js.gz +0 -0
|
@@ -302,7 +302,7 @@ export function voiceHttpConnect({ router, telescope, callControl, onStart, host
|
|
|
302
302
|
await prewarmDNS();
|
|
303
303
|
}
|
|
304
304
|
function getAgent(req) {
|
|
305
|
-
return router.resolve(req.agentName, req.callId
|
|
305
|
+
return router.resolve(req.agentName, req.callId);
|
|
306
306
|
}
|
|
307
307
|
function failToResolve(res, err) {
|
|
308
308
|
const status = err instanceof UnknownVoiceRouteError ? 404 : 400;
|
|
@@ -5,14 +5,13 @@ export interface VoiceRouterOptions<TMeta> {
|
|
|
5
5
|
getRoutes: () => Promise<readonly VoiceRoute<TMeta>[]>;
|
|
6
6
|
calls?: ContextCache<{
|
|
7
7
|
agentName: string;
|
|
8
|
-
region?: string;
|
|
9
8
|
}>;
|
|
10
9
|
logger: Logger;
|
|
11
10
|
random?: () => number;
|
|
12
11
|
}
|
|
13
12
|
export interface VoiceRouter<TMeta> {
|
|
14
13
|
start(): Promise<readonly VoiceRoute<TMeta>[]>;
|
|
15
|
-
resolve(routeName: string, callId: string
|
|
14
|
+
resolve(routeName: string, callId: string): Promise<VoiceAgent<TMeta>>;
|
|
16
15
|
release(callId: string): Promise<void>;
|
|
17
16
|
}
|
|
18
17
|
export declare class UnknownVoiceRouteError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-router.d.ts","sourceRoot":"","sources":["../../src/voice-agent-api/voice-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,WAAW,kBAAkB,CAAC,KAAK;IAErC,SAAS,EAAE,MAAM,OAAO,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAKtD,KAAK,CAAC,EAAE,YAAY,CAAC;QAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"voice-router.d.ts","sourceRoot":"","sources":["../../src/voice-agent-api/voice-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,WAAW,kBAAkB,CAAC,KAAK;IAErC,SAAS,EAAE,MAAM,OAAO,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAKtD,KAAK,CAAC,EAAE,YAAY,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,WAAW,CAAC,KAAK;IAE9B,KAAK,IAAI,OAAO,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAE9C,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;IAEtE,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzC;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,SAAS,EAAE,MAAM;CAIhC;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,EACrC,SAAS,EACT,KAA6B,EAC7B,MAAM,EACN,MAAoB,GACvB,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAwFhD"}
|
|
@@ -32,7 +32,7 @@ export function createVoiceRouter({ getRoutes, calls = createInMemoryCache(), lo
|
|
|
32
32
|
byName = index;
|
|
33
33
|
return routes;
|
|
34
34
|
}
|
|
35
|
-
async function resolve(routeName, callId
|
|
35
|
+
async function resolve(routeName, callId) {
|
|
36
36
|
if (!byName) {
|
|
37
37
|
throw new Error('The voice router is not started');
|
|
38
38
|
}
|
|
@@ -43,47 +43,31 @@ export function createVoiceRouter({ getRoutes, calls = createInMemoryCache(), lo
|
|
|
43
43
|
if (!isRandomizedVoiceRoute(route)) {
|
|
44
44
|
return route.agent;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (picking.get(callId) === done)
|
|
54
|
-
picking.delete(callId);
|
|
55
|
-
});
|
|
46
|
+
let pending = picking.get(callId);
|
|
47
|
+
if (!pending) {
|
|
48
|
+
pending = keepOrPick(route, callId);
|
|
49
|
+
picking.set(callId, pending);
|
|
50
|
+
const done = () => picking.delete(callId);
|
|
51
|
+
pending.then(done, done);
|
|
52
|
+
}
|
|
56
53
|
return pending;
|
|
57
54
|
}
|
|
58
|
-
async function keepOrPick(route, callId
|
|
55
|
+
async function keepOrPick(route, callId) {
|
|
59
56
|
const kept = await calls.getContext(callId);
|
|
60
|
-
const
|
|
61
|
-
const eligible = route.agents.filter(({ regions }) => regions === undefined ||
|
|
62
|
-
(resolvedRegion !== undefined && regions.includes(resolvedRegion)));
|
|
63
|
-
const keptAgent = kept && eligible.find(({ agent }) => agent.name === kept.agentName);
|
|
57
|
+
const keptAgent = kept && route.agents.find(({ agent }) => agent.name === kept.agentName);
|
|
64
58
|
if (keptAgent) {
|
|
65
59
|
return keptAgent.agent;
|
|
66
60
|
}
|
|
67
|
-
const agent = pick(
|
|
68
|
-
|
|
69
|
-
return agent;
|
|
70
|
-
}
|
|
71
|
-
await calls.setContext(callId, { agentName: agent.name, region: resolvedRegion });
|
|
61
|
+
const agent = pick(route);
|
|
62
|
+
await calls.setContext(callId, { agentName: agent.name });
|
|
72
63
|
logger.log('Picked the agent of the call', {
|
|
73
64
|
routeName: route.name,
|
|
74
65
|
callId,
|
|
75
66
|
agentName: agent.name,
|
|
76
|
-
region: resolvedRegion,
|
|
77
67
|
});
|
|
78
68
|
return agent;
|
|
79
69
|
}
|
|
80
70
|
function pick(route) {
|
|
81
|
-
const positive = route.agents.filter(({ weight }) => weight > 0);
|
|
82
|
-
if (positive.length === 0) {
|
|
83
|
-
throw new Error(`Route ${route.name}: no agent is available for the call region`);
|
|
84
|
-
}
|
|
85
|
-
if (positive.length === 1)
|
|
86
|
-
return positive[0].agent;
|
|
87
71
|
const total = route.agents.reduce((sum, { weight }) => sum + weight, 0);
|
|
88
72
|
let selected = random() * total;
|
|
89
73
|
for (const { agent, weight } of route.agents) {
|
|
@@ -92,7 +76,7 @@ export function createVoiceRouter({ getRoutes, calls = createInMemoryCache(), lo
|
|
|
92
76
|
}
|
|
93
77
|
selected -= weight;
|
|
94
78
|
}
|
|
95
|
-
return
|
|
79
|
+
return route.agents.filter(({ weight }) => weight > 0).at(-1).agent;
|
|
96
80
|
}
|
|
97
81
|
function release(callId) {
|
|
98
82
|
return calls.clearContext(callId);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recombine-ai/platform",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "The Recombine platform: engine, telescope, dockyard, call control, the voice agent API, and the Bosun bindings in one package",
|
|
6
6
|
"license": "EULA",
|
|
7
7
|
"author": "recombine.ai",
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const A=globalThis.__sveltekit_gdx4r5.env;var re=Object.create,U=Object.defineProperty,te=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,v=(r,e)=>function(){return e||(0,r[K(r)[0]])((e={exports:{}}).exports,e),e.exports},ie=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=K(e),i=0,u=n.length,s;i<u;i++)s=n[i],!oe.call(r,s)&&s!==t&&U(r,s,{get:(c=>e[c]).bind(null,s),enumerable:!(o=te(e,s))||o.enumerable});return r},p=(r,e,t)=>(t=r!=null?re(ne(r)):{},ie(e||!r||!r.__esModule?U(t,"default",{value:r,enumerable:!0}):t,r)),z=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(r,e){function t(o){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}),se=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(r,e){var t=z().default;function o(n,i){if(t(n)!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var s=u.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),ue=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(r,e){var t=z().default,o=se();function n(i){var u=o(i,"string");return t(u)=="symbol"?u:u+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),_=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(r,e){var t=ue();function o(n,i,u){return(i=t(i))in n?Object.defineProperty(n,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[i]=u,n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),y=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(r,e){var t=_();function o(i,u){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);u&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),s.push.apply(s,c)}return s}function n(i){for(var u=1;u<arguments.length;u++){var s=arguments[u]!=null?arguments[u]:{};u%2?o(Object(s),!0).forEach(function(c){t(i,c,s[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(s,c))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}});function k(r){const e={subscribe(t){let o=null,n=!1,i=!1,u=!1;function s(){if(o===null){u=!0;return}i||(i=!0,typeof o=="function"?o():o&&o.unsubscribe())}return o=r({next(c){var a;n||(a=t.next)===null||a===void 0||a.call(t,c)},error(c){var a;n||(n=!0,(a=t.error)===null||a===void 0||a.call(t,c),s())},complete(){var c;n||(n=!0,(c=t.complete)===null||c===void 0||c.call(t),s())}}),u&&s(),{unsubscribe:s}},pipe(...t){return t.reduce(ce,e)}};return e}function ce(r,e){return e(r)}function ae(r){const e=new AbortController;return new Promise((o,n)=>{let i=!1;function u(){i||(i=!0,s.unsubscribe())}e.signal.addEventListener("abort",()=>{n(e.signal.reason)});const s=r.subscribe({next(c){i=!0,o(c),u()},error(c){n(c)},complete(){e.abort(),u()}})})}function le(r){return e=>{let t=0,o=null;const n=[];function i(){o||(o=e.subscribe({next(s){for(const a of n){var c;(c=a.next)===null||c===void 0||c.call(a,s)}},error(s){for(const a of n){var c;(c=a.error)===null||c===void 0||c.call(a,s)}},complete(){for(const c of n){var s;(s=c.complete)===null||s===void 0||s.call(c)}}}))}function u(){if(t===0&&o){const s=o;o=null,s.unsubscribe()}}return k(s=>(t++,n.push(s),i(),{unsubscribe(){t--,u();const c=n.findIndex(a=>a===s);c>-1&&n.splice(c,1)}}))}}function pe(r){let e=r;const t=[],o=u=>{e!==void 0&&u.next(e),t.push(u)},n=u=>{t.splice(t.indexOf(u),1)},i=k(u=>(o(u),()=>{n(u)}));return i.next=u=>{if(e!==u){e=u;for(const s of t)s.next(u)}},i.get=()=>e,i}function fe(r){return k(e=>{function t(n=0,i=r.op){const u=r.links[n];if(!u)throw new Error("No more links to execute - did you forget to add an ending link?");return u({op:i,next(c){return t(n+1,c)}})}return t().subscribe(e)})}function w(r){return!!r&&!Array.isArray(r)&&typeof r=="object"}function de(){return Object.create(null)}var ye=Object.create,F=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyNames,be=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty,g=(r,e)=>function(){return e||(0,r[B(r)[0]])((e={exports:{}}).exports,e),e.exports},he=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=B(e),i=0,u=n.length,s;i<u;i++)s=n[i],!me.call(r,s)&&s!==t&&F(r,s,{get:(c=>e[c]).bind(null,s),enumerable:!(o=ve(e,s))||o.enumerable});return r},q=(r,e,t)=>(t=r!=null?ye(be(r)):{},he(F(t,"default",{value:r,enumerable:!0}),r));const J=()=>{},H=r=>{Object.freeze&&Object.freeze(r)};function Y(r,e,t){var o;const n=e.join(".");return(o=t[n])!==null&&o!==void 0||(t[n]=new Proxy(J,{get(i,u){if(!(typeof u!="string"||u==="then"))return Y(r,[...e,u],t)},apply(i,u,s){const c=e[e.length-1];if(c==="valueOf"||c==="toString"||c==="toJSON")return`tRPC.proxy(${e.slice(0,-1).join(".")})`;let a={args:s,path:e};return c==="call"?a={args:s.length>=2?[s[1]]:[],path:e.slice(0,-1)}:c==="apply"&&(a={args:s.length>=2?s[1]:[],path:e.slice(0,-1)}),H(a.args),H(a.path),r(a)}})),t[n]}const xe=r=>Y(r,[],de()),_e=r=>new Proxy(J,{get(e,t){if(t!=="then")return r(t)}});var Q=g({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(r,e){function t(o){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}),Pe=g({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(r,e){var t=Q().default;function o(n,i){if(t(n)!="object"||!n)return n;var u=n[Symbol.toPrimitive];if(u!==void 0){var s=u.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),Oe=g({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(r,e){var t=Q().default,o=Pe();function n(i){var u=o(i,"string");return t(u)=="symbol"?u:u+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),X=g({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(r,e){var t=Oe();function o(n,i,u){return(i=t(i))in n?Object.defineProperty(n,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[i]=u,n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),L=g({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(r,e){var t=X();function o(i,u){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);u&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),s.push.apply(s,c)}return s}function n(i){for(var u=1;u<arguments.length;u++){var s=arguments[u]!=null?arguments[u]:{};u%2?o(Object(s),!0).forEach(function(c){t(i,c,s[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(s,c))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}});q(L());q(X());var S=q(L());function je(r,e){if("error"in r){const o=e.deserialize(r.error);return{ok:!1,error:(0,S.default)((0,S.default)({},r),{},{error:o})}}return{ok:!0,result:(0,S.default)((0,S.default)({},r.result),(!r.result.type||r.result.type==="data")&&{type:"data",data:e.deserialize(r.result.data)})}}var I=class extends Error{constructor(){super("Unable to transform response from server")}};function we(r,e){let t;try{t=je(r,e)}catch{throw new I}if(!t.ok&&(!w(t.error.error)||typeof t.error.error.code!="number"))throw new I;if(t.ok&&!w(t.result))throw new I;return t}q(L());var T=p(_(),1),P=p(y(),1);function ge(r){return r instanceof C}function Se(r){return w(r)&&w(r.error)&&typeof r.error.code=="number"&&typeof r.error.message=="string"}function Te(r,e){return typeof r=="string"?r:w(r)&&typeof r.message=="string"?r.message:e}var C=class E extends Error{constructor(e,t){var o,n;const i=t==null?void 0:t.cause;super(e,{cause:i}),(0,T.default)(this,"cause",void 0),(0,T.default)(this,"shape",void 0),(0,T.default)(this,"data",void 0),(0,T.default)(this,"meta",void 0),this.meta=t==null?void 0:t.meta,this.cause=i,this.shape=t==null||(o=t.result)===null||o===void 0?void 0:o.error,this.data=t==null||(n=t.result)===null||n===void 0?void 0:n.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,E.prototype)}static from(e,t={}){const o=e;return ge(o)?(t.meta&&(o.meta=(0,P.default)((0,P.default)({},o.meta),t.meta)),o):Se(o)?new E(o.error.message,(0,P.default)((0,P.default)({},t),{},{result:o,cause:t.cause})):new E(Te(o,"Unknown error"),(0,P.default)((0,P.default)({},t),{},{cause:o}))}};function Ee(r){const e=r;return e?"input"in e?e:{input:e,output:e}:{input:{serialize:t=>t,deserialize:t=>t},output:{serialize:t=>t,deserialize:t=>t}}}const W=r=>typeof r=="function";function Ce(r){if(r)return r;if(typeof window<"u"&&W(window.fetch))return window.fetch;if(typeof globalThis<"u"&&W(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var j=p(y());function ke(r){return{url:r.url.toString(),fetch:r.fetch,transformer:Ee(r.transformer),methodOverride:r.methodOverride}}function qe(r){const e={};for(let t=0;t<r.length;t++){const o=r[t];e[t]=o}return e}const Ae={query:"GET",mutation:"POST",subscription:"PATCH"};function Z(r){return"input"in r?r.transformer.input.serialize(r.input):qe(r.inputs.map(e=>r.transformer.input.serialize(e)))}const R=r=>{const e=r.url.split("?");let o=e[0].replace(/\/$/,"")+"/"+r.path;const n=[];if(e[1]&&n.push(e[1]),"inputs"in r&&n.push("batch=1"),r.type==="query"||r.type==="subscription"){const i=Z(r);i!==void 0&&r.methodOverride!=="POST"&&n.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return n.length&&(o+="?"+n.join("&")),o},Ie=r=>{if(r.type==="query"&&r.methodOverride!=="POST")return;const e=Z(r);return e!==void 0?JSON.stringify(e):void 0},Me=r=>D((0,j.default)((0,j.default)({},r),{},{contentTypeHeader:"application/json",getUrl:R,getBody:Ie}));var Re=class extends Error{constructor(){const r="AbortError";super(r),this.name=r,this.message=r}};const De=r=>{var e;if(r!=null&&r.aborted)throw(e=r.throwIfAborted)===null||e===void 0||e.call(r),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Re};async function Ne(r){var e,t;De(r.signal);const o=r.getUrl(r),n=r.getBody(r),i=(e=r.methodOverride)!==null&&e!==void 0?e:Ae[r.type],u=await(async()=>{const c=await r.headers();return Symbol.iterator in c?Object.fromEntries(c):c})(),s=(0,j.default)((0,j.default)((0,j.default)({},r.contentTypeHeader&&i!=="GET"?{"content-type":r.contentTypeHeader}:{}),r.trpcAcceptHeader?{[(t=r.trpcAcceptHeaderKey)!==null&&t!==void 0?t:"trpc-accept"]:r.trpcAcceptHeader}:void 0),u);return Ce(r.fetch)(o,{method:i,signal:r.signal,body:n,headers:s})}async function D(r){const e={},t=await Ne(r);e.response=t;const o=await t.json();return e.responseJSON=o,{json:o,meta:e}}function Le(r){return r instanceof Uint8Array||r instanceof Blob}function $e(r){return r instanceof FormData}var O=p(y(),1);const He=r=>{if("input"in r){const{input:e}=r;if($e(e)){if(r.type!=="mutation"&&r.methodOverride!=="POST")throw new Error("FormData is only supported for mutations");return D((0,O.default)((0,O.default)({},r),{},{contentTypeHeader:void 0,getUrl:R,getBody:()=>e}))}if(Le(e)){if(r.type!=="mutation"&&r.methodOverride!=="POST")throw new Error("Octet type input is only supported for mutations");return D((0,O.default)((0,O.default)({},r),{},{contentTypeHeader:"application/octet-stream",getUrl:R,getBody:()=>e}))}}return Me(r)};function We(r){const e=ke(r);return()=>t=>{const{op:o}=t;return k(n=>{const{path:i,input:u,type:s}=o;/* istanbul ignore if -- @preserve */if(s==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const c=He((0,O.default)((0,O.default)({},e),{},{type:s,path:i,input:u,signal:o.signal,headers(){return r.headers?typeof r.headers=="function"?r.headers({op:o}):r.headers:{}}}));let a;return c.then(l=>{a=l.meta;const f=we(l.json,e.transformer.output);if(!f.ok){n.error(C.from(f.error,{meta:a}));return}n.next({context:l.meta,result:f.result}),n.complete()}).catch(l=>{n.error(C.from(l,{meta:a}))}),()=>{}})}}p(y(),1);p(y(),1);const V=(r,...e)=>typeof r=="function"?r(...e):r;p(_(),1);function Ge(){let r,e;return{promise:new Promise((o,n)=>{r=o,e=n}),resolve:r,reject:e}}async function Ue(r){const e=await V(r.url);if(!r.connectionParams)return e;const o=`${e.includes("?")?"&":"?"}connectionParams=1`;return e+o}async function Ke(r,e){const t={method:"connectionParams",data:await V(r)};return e.encode(t)}p(_(),1);var h=p(_(),1);function ze(r){const{promise:e,resolve:t,reject:o}=Ge();return r.addEventListener("open",()=>{r.removeEventListener("error",o),t()}),r.addEventListener("error",o),e}function Fe(r,{intervalMs:e,pongTimeoutMs:t}){let o,n;function i(){o=setTimeout(()=>{r.send("PING"),n=setTimeout(()=>{r.close()},t)},e)}function u(){clearTimeout(o),i()}function s(){clearTimeout(n),u()}r.addEventListener("open",i),r.addEventListener("message",({data:c})=>{clearTimeout(o),i(),c==="PONG"&&s()}),r.addEventListener("close",()=>{clearTimeout(o),clearTimeout(n)})}var Be=class N{constructor(e){var t;if((0,h.default)(this,"id",++N.connectCount),(0,h.default)(this,"WebSocketPonyfill",void 0),(0,h.default)(this,"urlOptions",void 0),(0,h.default)(this,"keepAliveOpts",void 0),(0,h.default)(this,"encoder",void 0),(0,h.default)(this,"wsObservable",pe(null)),(0,h.default)(this,"openPromise",null),this.WebSocketPonyfill=(t=e.WebSocketPonyfill)!==null&&t!==void 0?t:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=e.urlOptions,this.keepAliveOpts=e.keepAlive,this.encoder=e.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var e=this;if(e.openPromise)return e.openPromise;e.id=++N.connectCount;const t=Ue(e.urlOptions).then(o=>new e.WebSocketPonyfill(o));e.openPromise=t.then(async o=>{e.ws=o,o.binaryType="arraybuffer",o.addEventListener("message",function({data:n}){n==="PING"&&this.send("PONG")}),e.keepAliveOpts.enabled&&Fe(o,e.keepAliveOpts),o.addEventListener("close",()=>{e.ws===o&&(e.ws=null)}),await ze(o),e.urlOptions.connectionParams&&o.send(await Ke(e.urlOptions.connectionParams,e.encoder))});try{await e.openPromise}finally{e.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)===null||t===void 0||t.close()}}};(0,h.default)(Be,"connectCount",0);p(_(),1);p(y(),1);var M=p(_(),1),G=p(y(),1),Je=class{constructor(r){(0,M.default)(this,"links",void 0),(0,M.default)(this,"runtime",void 0),(0,M.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=r.links.map(e=>e(this.runtime))}$request(r){var e;return fe({links:this.links,op:(0,G.default)((0,G.default)({},r),{},{context:(e=r.context)!==null&&e!==void 0?e:{},id:++this.requestId})}).pipe(le())}async requestAsPromise(r){var e=this;try{const t=e.$request(r);return(await ae(t)).result.data}catch(t){throw C.from(t)}}query(r,e,t){return this.requestAsPromise({type:"query",path:r,input:e,context:t==null?void 0:t.context,signal:t==null?void 0:t.signal})}mutation(r,e,t){return this.requestAsPromise({type:"mutation",path:r,input:e,context:t==null?void 0:t.context,signal:t==null?void 0:t.signal})}subscription(r,e,t){return this.$request({type:"subscription",path:r,input:e,context:t.context,signal:t.signal}).subscribe({next(n){switch(n.result.type){case"state":{var i;(i=t.onConnectionStateChange)===null||i===void 0||i.call(t,n.result);break}case"started":{var u;(u=t.onStarted)===null||u===void 0||u.call(t,{context:n.context});break}case"stopped":{var s;(s=t.onStopped)===null||s===void 0||s.call(t);break}case"data":case void 0:{var c;(c=t.onData)===null||c===void 0||c.call(t,n.result.data);break}}},error(n){var i;(i=t.onError)===null||i===void 0||i.call(t,n)},complete(){var n;(n=t.onComplete)===null||n===void 0||n.call(t)}})}};const Ye=Symbol.for("trpc_untypedClient"),Qe={query:"query",mutate:"mutation",subscribe:"subscription"},Xe=r=>Qe[r];function Ze(r){const e=xe(({path:t,args:o})=>{const n=[...t],i=Xe(n.pop()),u=n.join(".");return r[i](u,...o)});return _e(t=>t===Ye?r:e[t])}function Ve(r){const e=new Je(r);return Ze(e)}p(y(),1);p(y(),1);var er=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(r,e){function t(n){var i,u,s,c=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,s=Symbol.iterator);c--;){if(u&&(i=n[u])!=null)return i.call(n);if(s&&(i=n[s])!=null)return new o(i.call(n));u="@@asyncIterator",s="@@iterator"}throw new TypeError("Object is not async iterable")}function o(n){function i(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var s=u.done;return Promise.resolve(u.value).then(function(c){return{value:c,done:s}})}return o=function(s){this.s=s,this.n=s.next},o.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(s){var c=this.s.return;return c===void 0?Promise.resolve({value:s,done:!0}):i(c.apply(this.s,arguments))},throw:function(s){var c=this.s.return;return c===void 0?Promise.reject(s):i(c.apply(this.s,arguments))}},new o(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}});p(er(),1);p(y(),1);var rr=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(r,e){function t(){var o=typeof SuppressedError=="function"?SuppressedError:function(s,c){var a=Error();return a.name="SuppressedError",a.error=s,a.suppressed=c,a},n={},i=[];function u(s,c){if(c!=null){if(Object(c)!==c)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(s)var a=c[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(a===void 0&&(a=c[Symbol.dispose||Symbol.for("Symbol.dispose")],s))var l=a;if(typeof a!="function")throw new TypeError("Object is not disposable.");l&&(a=function(){try{l.call(c)}catch(b){return Promise.reject(b)}}),i.push({v:c,d:a,a:s})}else s&&i.push({d:c,a:s});return c}return{e:n,u:u.bind(null,!1),a:u.bind(null,!0),d:function(){var c,a=this.e,l=0;function f(){for(;c=i.pop();)try{if(!c.a&&l===1)return l=0,i.push(c),Promise.resolve().then(f);if(c.d){var d=c.d.call(c.v);if(c.a)return l|=2,Promise.resolve(d).then(f,b)}else l|=1}catch(x){return b(x)}if(l===1)return a!==n?Promise.reject(a):Promise.resolve();if(a!==n)throw a}function b(d){return a=a!==n?new o(d,a):d,f()}return f()}}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}),ee=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(r,e){function t(o,n){this.v=o,this.k=n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}),tr=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(r,e){var t=ee();function o(n){return new t(n,0)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}}),nr=v({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(r,e){var t=ee();function o(i){return function(){return new n(i.apply(this,arguments))}}function n(i){var u,s;function c(l,f){try{var b=i[l](f),d=b.value,x=d instanceof t;Promise.resolve(x?d.v:d).then(function(m){if(x){var $=l==="return"?"return":"next";if(!d.k||m.done)return c($,m);m=i[$](m).value}a(b.done?"return":"normal",m)},function(m){c("throw",m)})}catch(m){a("throw",m)}}function a(l,f){switch(l){case"return":u.resolve({value:f,done:!0});break;case"throw":u.reject(f);break;default:u.resolve({value:f,done:!1})}(u=u.next)?c(u.key,u.arg):s=null}this._invoke=function(l,f){return new Promise(function(b,d){var x={key:l,arg:f,resolve:b,reject:d,next:null};s?s=s.next=x:(u=s=x,c(l,f))})},typeof i.return!="function"&&(this.return=void 0)}n.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},n.prototype.next=function(i){return this._invoke("next",i)},n.prototype.throw=function(i){return this._invoke("throw",i)},n.prototype.return=function(i){return this._invoke("return",i)},e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}});p(rr(),1);p(tr(),1);p(nr(),1);p(y(),1);const or=A.PUBLIC_TRPC_URL??`http://${A.PUBLIC_TRPC_HOSTNAME??"localhost"}:${A.PUBLIC_TRPC_PORT??"2022"}`,ir=Ve({links:[We({url:or})]});export{A as e,ir as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var N=t=>{throw TypeError(t)};var W=(t,e,n)=>e.has(t)||N("Cannot "+n);var i=(t,e,n)=>(W(t,e,"read from private field"),n?n.call(t):e.get(t)),u=(t,e,n)=>e.has(t)?N("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{o as x}from"./DDNwAeLw.js";import{w as f,j as d,y as h}from"./Dq641zi7.js";import{w as q}from"./CkFRFCXj.js";import{b as X}from"./B0XwC4Ot.js";const z="1792577807355";var j;const M=((j=globalThis.__sveltekit_gdx4r5)==null?void 0:j.base)??"";var V;const F=((V=globalThis.__sveltekit_gdx4r5)==null?void 0:V.assets)??M??"";new URL("sveltekit-internal://");function ce(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ue(t){return t.split("%25").map(decodeURI).join("%25")}function fe(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function de({href:t}){return t.split("#")[0]}function he(t,e,n,r=!1){const s=new URL(t);Object.defineProperty(s,"searchParams",{value:new Proxy(s.searchParams,{get(o,a){if(a==="get"||a==="getAll"||a==="has")return(E,...J)=>(n(E),o[a](E,...J));e();const c=Reflect.get(o,a);return typeof c=="function"?c.bind(o):c}}),enumerable:!0,configurable:!0});const l=["href","pathname","search","toString","toJSON"];r&&l.push("hash");for(const o of l)Object.defineProperty(s,o,{get(){return e(),t[o]},enumerable:!0,configurable:!0});return s}function Q(){}function Z(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let s=r.length;for(;s;)e=e*33^r[--s]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const ee=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&_.delete(O(t)),ee(t,e));const _=new Map;function ge(t,e){const n=O(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:s,...l}=JSON.parse(r.textContent);r.getAttribute("data-b64")!==null&&(s=X(s));const a=r.getAttribute("data-ttl");return a&&_.set(n,{body:s,init:l,ttl:1e3*Number(a)}),Promise.resolve(new Response(s,l))}return window.fetch(t,e)}function _e(t,e,n){if(_.size>0){const r=O(t,n),s=_.get(r);if(s){if(performance.now()<s.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(s.body,s.init);_.delete(r)}}return window.fetch(e,n)}function O(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const s=[];e.headers&&s.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&s.push(e.body),r+=`[data-hash="${Z(...s)}"]`}return r}const be="sveltekit:snapshot",pe="sveltekit:scroll",me="sveltekit:states",we="sveltekit:pageurl",ve="sveltekit:history",ye="sveltekit:navigation",I={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},H=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...H];const te=new Set([...H]);[...te];const K=location.origin;function Re(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Se(){return{x:pageXOffset,y:pageYOffset}}function g(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const L={...I,"":I.hover};function B(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function Ae(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=B(t)}}function ke(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const a=location.hash.split("#")[1]||"/";r.hash=`#${a}${r.hash}`}}catch{}const s=t instanceof SVGAElement?t.target.baseVal:t.target,l=!r||!!s||ne(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===K&&t.hasAttribute("download");return{url:r,external:l,target:s,download:o}}function Ee(t){let e=null,n=null,r=null,s=null,l=null,o=null,a=t;for(;a&&a!==document.documentElement;)r===null&&(r=g(a,"preload-code")),s===null&&(s=g(a,"preload-data")),e===null&&(e=g(a,"keepfocus")),n===null&&(n=g(a,"noscroll")),l===null&&(l=g(a,"reload")),o===null&&(o=g(a,"replacestate")),a=B(a);function c(E){switch(E){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:L[r??"off"],preload_data:L[s??"off"],keepfocus:c(e),noscroll:c(n),reload:c(l),replace_state:c(o)}}function Te(t){const e=q(t);let n=!0;function r(){n=!0,e.update(o=>o)}function s(o){n=!1,e.set(o)}function l(o){let a;return e.subscribe(c=>{(a===void 0||n&&c!==a)&&o(a=c)})}return{notify:r,set:s,subscribe:l}}const D={v:Q};function Ue(){const{set:t,subscribe:e}=q(!1);let n;async function r(){clearTimeout(n);try{const s=await fetch(`${F}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!s.ok)return!1;const o=(await s.json()).version!==z;return o&&(t(!0),D.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function ne(t,e,n){return t.origin!==K||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Oe(t){}let U,P,T;const re=x.toString().includes("$$")||/function \w+\(\) \{\}/.test(x.toString()),$="a:";var b,p,m,w,v,y,R,S,C,A,G,k,Y;re?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL($)},P={current:null},T={current:!1}):(U=new(C=class{constructor(){u(this,b,f({}));u(this,p,f(null));u(this,m,f(null));u(this,w,f({}));u(this,v,f({id:null}));u(this,y,f({}));u(this,R,f(-1));u(this,S,f(new URL($)))}get data(){return d(i(this,b))}set data(e){h(i(this,b),e)}get form(){return d(i(this,p))}set form(e){h(i(this,p),e)}get error(){return d(i(this,m))}set error(e){h(i(this,m),e)}get params(){return d(i(this,w))}set params(e){h(i(this,w),e)}get route(){return d(i(this,v))}set route(e){h(i(this,v),e)}get state(){return d(i(this,y))}set state(e){h(i(this,y),e)}get status(){return d(i(this,R))}set status(e){h(i(this,R),e)}get url(){return d(i(this,S))}set url(e){h(i(this,S),e)}},b=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,v=new WeakMap,y=new WeakMap,R=new WeakMap,S=new WeakMap,C),P=new(G=class{constructor(){u(this,A,f(null))}get current(){return d(i(this,A))}set current(e){h(i(this,A),e)}},A=new WeakMap,G),T=new(Y=class{constructor(){u(this,k,f(!1))}get current(){return d(i(this,k))}set current(e){h(i(this,k),e)}},k=new WeakMap,Y),D.v=()=>T.current=!0);function Le(t){Object.assign(U,t)}export{ve as H,ye as N,we as P,me as S,P as a,M as b,Ee as c,de as d,fe as e,Ae as f,ke as g,ce as h,ne as i,Ue as j,Te as k,I as l,he as m,Q as n,K as o,U as p,ue as q,Re as r,Se as s,be as t,Le as u,_e as v,ge as w,pe as x,Oe as y};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as tt,h as fe,by as ue}from"./Dq641zi7.js";import{w as de}from"./CkFRFCXj.js";import{H as kt,S as St,R as xt}from"./-UyI9lYi.js";import{r as ft,o as Bt,H as j,N as F,n as T,i as Rt,b as L,s as $,a as wt,f as Vt,g as vt,c as et,d as mt,S as Lt,P as Yt,p as R,e as he,m as pe,h as me,u as zt,j as ge,k as Nt,l as B,q as _e,t as Gt,v as we,w as ve,x as Wt}from"./DBAf6hth.js";import"./B0XwC4Ot.js";const ye=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,be=/^\/\((?:[^)]+)\)$/;function Ee(t){const n=[];return{pattern:t==="/"||be.test(t)?/^\/$/:new RegExp(`^${Se(t).map(o=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(o);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(o);if(s)return n.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!o)return;const r=o.split(/\[(.+?)\](?!\])/);return"/"+r.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return gt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return gt(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const u=ye.exec(l),[,p,_,d,m]=u;return n.push({name:d,matcher:m,optional:!!p,rest:!!_,chained:_?c===1&&r[0]==="":!1}),_?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return gt(l)}).join("")}).join("")}/?$`),params:n}}function ke(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Se(t){return t.slice(1).split("/").filter(ke)}function xe(t,n,e){const o={},a=t.slice(1),s=a.filter(i=>i!==void 0);let r=0;for(let i=0;i<n.length;i+=1){const l=n[i];let c=a[i-r];if(l.chained&&l.rest&&r&&(c=a.slice(i-r,i+1).filter(u=>u).join("/"),r=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||e[l.matcher](c)){o[l.name]=c;const u=n[i+1],p=a[i+1];u&&!u.rest&&u.optional&&p&&l.chained&&(r=0),!u&&!p&&Object.keys(o).length===s.length&&(r=0);continue}if(l.optional&&l.chained){r++;continue}return}if(!r)return o}function gt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Re({nodes:t,server_loads:n,dictionary:e,matchers:o}){const a=new Set(n);return Object.entries(e).map(([i,[l,c,u]])=>{const{pattern:p,params:_}=Ee(i),d={id:i,exec:m=>{const f=p.exec(m);if(f)return xe(f,_,o)},errors:[1,...u||[]].map(m=>t[m]),layouts:[0,...c||[]].map(r),leaf:s(l)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function s(i){const l=i<0;return l&&(i=~i),[l,t[i]]}function r(i){return i===void 0?i:[a.has(i),t[i]]}}function Jt(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function Dt(t,n,e=JSON.stringify){const o=e(n);try{sessionStorage[t]=o}catch{}}function Le(t){return t.filter(n=>n!=null)}function Q(t,n){return t+"/"+n}function Pt(t){return t instanceof kt||t instanceof St?t.status:500}function Pe(t){return t instanceof St?t.text:"Internal Error"}const qt={spanContext(){return Ae},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ae={traceId:"",spanId:"",traceFlags:0},Ue=fe??(t=>t()),Te=new Set(["icon","shortcut icon","apple-touch-icon"]);let V=null;const C=Jt(Wt)??{},G=Jt(Gt)??{},I={url:Nt({}),page:Nt({}),navigating:de(null),updated:ge()};function At(t){C[t]=$()}function Ie(t,n){let e=t+1;for(;C[e];)delete C[e],e+=1;for(e=n+1;G[e];)delete G[e],e+=1}function W(t,n=!1){return n?location.replace(t.href):location.href=t.href,new Promise(T)}async function Xt(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(L||"/");t&&await t.update()}}let Ut,yt,nt,P,bt,b;const at=[],rt=[];let v=null;function ot(){var t;(t=v==null?void 0:v.fork)==null||t.then(n=>n==null?void 0:n.discard()),v=null,D={element:void 0,href:void 0}}const Z=new Map,Qt=new Set,Ce=new Set,z=new Set;let w={branch:[],error:null,url:null},Zt=!1,it=!1,Ft=!0,J=!1,Y=!1,te=!1,Tt=!1,It,E,x,U;const st=new Set,Ht=new Map,Kt=new Map;async function tn(t,n,e){var s,r,i,l;if(globalThis.__sveltekit_gdx4r5.data){const{q:c={},p:u={},l:p={},f:_={}}=globalThis.__sveltekit_gdx4r5.data;for(const d in c)c[d];for(const d in p)p[d];for(const d in _)_[d];for(const d in u)u[d]}document.URL!==location.href&&(location.href=location.href),b=t,await((r=(s=t.hooks).init)==null?void 0:r.call(s)),Ut=Re(t),P=document.documentElement,bt=n,yt=t.nodes[0],nt=t.nodes[1],yt(),nt(),E=(i=history.state)==null?void 0:i[j],x=(l=history.state)==null?void 0:l[F],E||(E=x=Date.now(),history.replaceState({...history.state,[j]:E,[F]:x},""));const o=C[E];function a(){o&&(history.scrollRestoration="manual",scrollTo(o.x,o.y))}e?(a(),await Ve(bt,e)):(await q({type:"enter",url:ft(b.hash?Ge(new URL(location.href)):location.href),replace_state:!0}),a()),Be()}function Oe(){at.length=0,Tt=!1}function ee(t){rt.some(n=>n==null?void 0:n.snapshot)&&(G[t]=rt.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function ne(t){var n;(n=G[t])==null||n.forEach((e,o)=>{var a,s;(s=(a=rt[o])==null?void 0:a.snapshot)==null||s.restore(e)})}function Mt(){At(E),Dt(Wt,C),ee(x),Dt(Gt,G)}async function ae(t,n,e,o){let a,s;n.invalidateAll&&ot(),await q({type:"goto",url:ft(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:o,accept:()=>{var r;if(n.invalidateAll){Tt=!0,a=new Set;for(const[i,l]of Ht)for(const[c,u]of l)(r=u.resource)==null||r.reset(),a.add(Q(i,c));s=new Set;for(const[i,l]of Kt)for(const c of l.keys())s.add(Q(i,c))}n.invalidate&&n.invalidate.forEach(Me)}}),n.invalidateAll&&tt().then(tt).then(()=>{for(const[r,i]of Ht)for(const[l,{resource:c}]of i)a!=null&&a.has(Q(r,l))&&c.start();for(const[r,i]of Kt)for(const[l,{resource:c}]of i)s!=null&&s.has(Q(r,l))&&c.reconnect()})}async function je(t){if(t.id!==(v==null?void 0:v.id)){ot();const n={};st.add(n),v={id:t.id,token:n,promise:ie({...t,preload:n}).then(e=>(st.delete(n),e.type==="loaded"&&e.state.error&&ot(),e)),fork:null}}return v.promise}async function _t(t){var e;const n=(e=await ut(t,!1))==null?void 0:e.route;n&&await Promise.all([...n.layouts,n.leaf].filter(Boolean).map(o=>o[1]()))}async function re(t,n,e){var a;const o={params:w.params,route:{id:((a=w.route)==null?void 0:a.id)??null},url:new URL(location.href)};if(w={...t.state,nav:o},zt(t.props.page),It=new b.root({target:n,props:{...t.props,stores:I,components:rt},hydrate:e,sync:!1,transformError:void 0}),await Promise.resolve(),e){const s={from:null,to:{...o,scroll:C[E]??$()},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(r=>r(s))}ne(x),it=!0}async function lt({url:t,params:n,branch:e,errors:o,status:a,error:s,route:r,form:i}){let l="never";if(L&&(t.pathname===L||t.pathname===L+"/"))l="always";else for(const m of e)(m==null?void 0:m.slash)!==void 0&&(l=m.slash);t.pathname=me(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:s,route:r},props:{constructors:Le(e).map(m=>m.node.component),page:dt(R)}};i!==void 0&&(c.props.form=i);let u={},p=!R,_=0;for(let m=0;m<Math.max(e.length,w.branch.length);m+=1){const f=e[m],h=w.branch[m];(f==null?void 0:f.data)!==(h==null?void 0:h.data)&&(p=!0),f&&(u={...u,...f.data},p&&(c.props[`data_${_}`]=u),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==s||i!==void 0&&i!==R.form||p)&&(c.props.page={error:s,params:n,route:{id:(r==null?void 0:r.id)??null},state:{},status:a,url:new URL(t),form:i??null,data:p?u:R.data}),c}async function Ct({loader:t,parent:n,url:e,params:o,route:a,server_data_node:s}){var u,p,_;let r=null,i=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((u=c.universal)!=null&&u.load){let d=function(...f){for(const h of f){const{href:g}=new URL(h,e);l.dependencies.add(g)}};const m={tracing:{enabled:!1,root:qt,current:qt},route:new Proxy(a,{get:(f,h)=>(i&&(l.route=!0),f[h])}),params:new Proxy(o,{get:(f,h)=>(i&&l.params.add(h),f[h])}),data:(s==null?void 0:s.data)??null,url:pe(e,()=>{i&&(l.url=!0)},f=>{i&&l.search_params.add(f)},b.hash),async fetch(f,h){f instanceof Request&&(h={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...h});const{resolved:g,promise:y}=oe(f,h,e);return i&&d(g.href),y},setHeaders:T,depends:d,parent(){return i&&(l.parent=!0),n()},untrack(f){i=!1;try{return f()}finally{i=!0}}};r=await c.universal.load.call(null,m)??null}return{node:c,loader:t,server:s,universal:(p=c.universal)!=null&&p.load?{type:"data",data:r,uses:l}:null,data:r??(s==null?void 0:s.data)??null,slash:((_=c.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function oe(t,n,e){let o=t instanceof Request?t.url:t;const a=new URL(o,e);a.origin===e.origin&&(o=a.href.slice(e.origin.length));const s=it?we(o,a.href,n):ve(o,n);return{resolved:a,promise:s}}function $e(t,n,e,o,a,s){if(Tt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&n||a.url&&e)return!0;for(const r of a.search_params)if(o.has(r))return!0;for(const r of a.params)if(s[r]!==w.params[r])return!0;for(const r of a.dependencies)if(at.some(i=>i(new URL(r))))return!0;return!1}function Ot(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function Ne(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const o of e){const a=t.searchParams.getAll(o),s=n.searchParams.getAll(o);a.every(r=>s.includes(r))&&s.every(r=>a.includes(r))&&e.delete(o)}return e}function De({error:t,url:n,route:e,params:o}){return{type:"loaded",state:{error:t,url:n,route:e,params:o,branch:[]},props:{page:dt(R),constructors:[]}}}async function ie({id:t,invalidating:n,url:e,params:o,route:a,preload:s}){if((v==null?void 0:v.id)===t)return st.delete(v.token),v.promise;const{errors:r,layouts:i,leaf:l}=a,c=[...i,l];r.forEach(h=>h==null?void 0:h().catch(T)),c.forEach(h=>h==null?void 0:h[1]().catch(T));const u=w.url?t!==ct(w.url):!1,p=w.route?a.id!==w.route.id:!1,_=Ne(w.url,e);let d=!1;const m=c.map(async(h,g)=>{var A;if(!h)return;const y=w.branch[g];return h[1]===(y==null?void 0:y.loader)&&!$e(d,p,u,_,(A=y.universal)==null?void 0:A.uses,o)?y:(d=!0,Ct({loader:h[1],url:e,params:o,route:a,parent:async()=>{var X;const O={};for(let N=0;N<g;N+=1)Object.assign(O,(X=await m[N])==null?void 0:X.data);return O},server_data_node:Ot(h[0]?{type:"skip"}:null,h[0]?y==null?void 0:y.server:void 0)}))});for(const h of m)h.catch(T);const f=[];for(let h=0;h<c.length;h+=1)if(c[h])try{f.push(await m[h])}catch(g){if(g instanceof xt)return{type:"redirect",location:g.location};if(s&&st.has(s))return De({error:await H(g,{params:o,url:e,route:{id:a.id}}),url:e,params:o,route:a});let y=Pt(g),S;if(g instanceof kt)S=g.body;else{if(await I.updated.check())return await Xt(),await W(e);S=await H(g,{params:o,url:e,route:{id:a.id}})}const A=await qe(h,f,r);return A?lt({url:e,params:o,branch:f.slice(0,A.idx).concat(A.node),errors:r,status:y,error:S,route:a}):await le(e,{id:a.id},S,y)}else f.push(void 0);return lt({url:e,params:o,branch:f,errors:r,status:200,error:null,route:a,form:n?void 0:null})}async function qe(t,n,e){for(;t--;)if(e[t]){let o=t;for(;!n[o];)o-=1;try{return{idx:o+1,node:{node:await e[t](),loader:e[t],data:{},server:null,universal:null}}}catch{continue}}}async function jt({status:t,error:n,url:e,route:o}){const a={};let s=null;try{const r=await Ct({loader:yt,url:e,params:a,route:o,parent:()=>Promise.resolve({}),server_data_node:Ot(s)}),i={node:await nt(),loader:nt,universal:null,server:null,data:null};return lt({url:e,params:a,branch:[r,i],status:t,error:n,errors:[],route:null})}catch(r){if(r instanceof xt){await ae(new URL(r.location,location.href),{},0);return}const i=await b.get_error_template(),l=await H(r,{url:e,params:a,route:o}),c=String((l==null?void 0:l.message)??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),u=i({status:t,message:c}),p=new DOMParser().parseFromString(u,"text/html");throw document.documentElement.replaceChild(document.adoptNode(p.head),document.head),document.documentElement.replaceChild(document.adoptNode(p.body),document.body),r}}async function Fe(t){const n=t.href;if(Z.has(n))return Z.get(n);let e;try{const o=(async()=>{let a=await b.hooks.reroute({url:new URL(t),fetch:async(s,r)=>oe(s,r,t).promise})??t;if(typeof a=="string"){const s=new URL(t);b.hash?s.hash=a:s.pathname=a,a=s}return a})();Z.set(n,o),e=await o}catch{Z.delete(n);return}return e}async function ut(t,n){if(t&&!Rt(t,L,b.hash)){const e=await Fe(t);if(!e)return;const o=He(e);for(const a of Ut){const s=a.exec(o);if(s)return{id:ct(t),invalidating:n,route:a,params:he(s),url:t}}}}function He(t){return _e(b.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(L.length))||"/"}function ct(t){return(b.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function se({url:t,type:n,intent:e,delta:o,event:a,scroll:s}){let r=!1;const i=$t(w,e,t,n,s??null);o!==void 0&&(i.navigation.delta=o),a!==void 0&&(i.navigation.event=a);const l={...i.navigation,cancel:()=>{r=!0,i.reject(new Error("navigation cancelled"))}};return J||Qt.forEach(c=>c(l)),r?null:i}async function q({type:t,url:n,popped:e,keepfocus:o,noscroll:a,replace_state:s,state:r={},redirect_count:i=0,nav_token:l={},accept:c=T,block:u=T,event:p}){var N;const _=U;U=l;const d=await ut(n,!1),m=t==="enter"?$t(w,d,n,t):se({url:n,type:t,delta:e==null?void 0:e.delta,intent:d,scroll:e==null?void 0:e.scroll,event:p});if(!m){u(),U===l&&(U=_);return}const f=E,h=x;c(),J=!0,it&&m.navigation.type!=="enter"&&I.navigating.set(wt.current=m.navigation);let g=d&&await ie(d);if(!g){if(Rt(n,L,b.hash))return await W(n,s);g=await le(n,{id:null},await H(new St(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,s)}if(n=(d==null?void 0:d.url)||n,U!==l){m.reject(new Error("navigation aborted"));return}if(!g)return;if(g.type==="redirect"){if(i<20){await q({type:t,url:new URL(g.location,n),popped:e,keepfocus:o,noscroll:a,replace_state:s,state:r,redirect_count:i+1,nav_token:l}),m.fulfil(void 0);return}if(g=await jt({status:500,error:await H(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}}),!g)return}else if(g.props.page.status>=400&&await I.updated.check())return await Xt(),await W(n,s);if(Oe(),At(f),ee(h),g.props.page.url.pathname!==n.pathname&&(n.pathname=g.props.page.url.pathname),r=e?e.state:r,!e){const k=s?0:1,K={[j]:E+=k,[F]:x+=k,[Lt]:r};(s?history.replaceState:history.pushState).call(history,K,"",n),s||Ie(E,x)}const y=d&&(v==null?void 0:v.id)===d.id?v.fork:null;v!=null&&v.fork&&!y?ot():(v=null,D={element:void 0,href:void 0}),g.props.page.state=r;let S;if(it){const k=(await Promise.all(Array.from(Ce,M=>M(m.navigation)))).filter(M=>typeof M=="function");if(k.length>0){let M=function(){k.forEach(pt=>{z.delete(pt)})};k.push(M),k.forEach(pt=>{z.add(pt)})}const K=m.navigation.to;w={...g.state,nav:{params:K.params,route:K.route,url:K.url}},g.props.page&&(g.props.page.url=n),!o&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const ht=y&&await y;ht?S=ht.commit():(V=null,It.$set(g.props),V&&Object.assign(g.props.page,V),zt(g.props.page),S=(N=ue)==null?void 0:N()),te=!0}else await re(g,bt,!1);const{activeElement:A}=document;if(await S,await tt(),await tt(),U!==l){m.reject(new Error("navigation aborted"));return}g.props.page&&V&&Object.assign(g.props.page,V);let O=null;if(Ft){const k=e?e.scroll:a?$():null;k?scrollTo(k.x,k.y):(O=n.hash&&document.getElementById(ce(n)))?O.scrollIntoView():scrollTo(0,0)}const X=document.activeElement!==A&&document.activeElement!==document.body;!o&&!X&&ze(n,!O),Ft=!0,J=!1,m.fulfil(void 0),m.navigation.to&&(m.navigation.to.scroll=$()),z.forEach(k=>k(m.navigation)),t==="popstate"&&ne(x),I.navigating.set(wt.current=null)}async function le(t,n,e,o,a){return t.origin===Bt&&t.pathname===location.pathname&&!Zt?await jt({status:o,error:e,url:t,route:n}):await W(t,a)}let D={element:void 0,href:void 0};function Ke(){let t,n;P.addEventListener("mousemove",r=>{const i=r.target;clearTimeout(t),t=setTimeout(()=>{a(i,B.hover)},20)});function e(r){r.defaultPrevented||a(r.composedPath()[0],B.tap)}P.addEventListener("mousedown",e),P.addEventListener("touchstart",e,{passive:!0});const o=new IntersectionObserver(r=>{for(const i of r)i.isIntersecting&&(_t(new URL(i.target.href)),o.unobserve(i.target))},{threshold:0});async function a(r,i){const l=Vt(r,P),c=l===D.element&&(l==null?void 0:l.href)===D.href&&i>=n;if(!l||c)return;const{url:u,external:p,download:_}=vt(l,L,b.hash);if(p||_)return;const d=et(l),m=u&&ct(w.url)===ct(u);if(!(d.reload||m))if(i<=d.preload_data){D={element:l,href:l.href},n=B.tap;const f=await ut(u,!1);if(!f)return;je(f)}else i<=d.preload_code&&(D={element:l,href:l.href},n=i,_t(u))}function s(){o.disconnect();for(const r of P.querySelectorAll("a")){const{url:i,external:l,download:c}=vt(r,L,b.hash);if(l||c)continue;const u=et(r);u.reload||(u.preload_code===B.viewport&&o.observe(r),u.preload_code===B.eager&&_t(i))}}z.add(s),s()}function H(t,n){if(t instanceof kt)return t.body;const e=Pt(t),o=Pe(t);return b.hooks.handleError({error:t,event:n,status:e,message:o})??{message:o}}function en(t,n={}){return t=new URL(ft(t)),t.origin!==Bt?Promise.reject(new Error("goto: invalid URL")):ae(t,n,0)}function Me(t){if(typeof t=="function")at.push(t);else{const{href:n}=new URL(t,location.href);at.push(e=>e.href===n)}}function nn(t,n){const e={[j]:E,[F]:x,[Yt]:R.url.href,[Lt]:n};history.replaceState(e,"",ft(t)),R.state=n,It.$set({page:Ue(()=>dt(R))})}function Be(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let o=!1;if(Mt(),!J){const a=$t(w,void 0,null,"leave"),s={...a.navigation,cancel:()=>{o=!0,a.reject(new Error("navigation cancelled"))}};Qt.forEach(r=>r(s))}o?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Mt()}),(n=navigator.connection)!=null&&n.saveData||Ke(),P.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const o=Vt(e.composedPath()[0],P);if(!o)return;const{url:a,external:s,target:r,download:i}=vt(o,L,b.hash);if(!a)return;if(r==="_parent"||r==="_top"){if(window.parent!==window)return}else if(r&&r!=="_self")return;const l=et(o);if(!(o instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[u,p]=(b.hash?a.hash.replace(/^#/,""):a.href).split("#"),_=u===mt(location);if(s||l.reload&&(!_||!p)){se({url:a,type:"link",event:e})?J=!0:e.preventDefault();return}if(p!==void 0&&_){const[,d]=w.url.href.split("#");if(d===p){if(e.preventDefault(),p===""||p==="top"&&o.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const m=o.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(Y=!0,At(E),t(a),!l.replace_state)return;Y=!1}e.preventDefault(),await new Promise(d=>{requestAnimationFrame(()=>{setTimeout(d,0)}),setTimeout(d,100)}),await q({type:"link",url:a,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??a.href===location.href,event:e})}),P.addEventListener("submit",e=>{if(e.defaultPrevented)return;const o=HTMLFormElement.prototype.cloneNode.call(e.target),a=e.submitter;if(((a==null?void 0:a.formTarget)||o.target)==="_blank"||((a==null?void 0:a.formMethod)||o.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||o.action);if(Rt(i,L,!1))return;const l=e.target,c=et(l);if(c.reload)return;e.preventDefault(),e.stopPropagation();const u=new FormData(l,a);i.search=new URLSearchParams(u).toString(),q({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:e})}),addEventListener("popstate",async e=>{var o;if(!Et){if((o=e.state)!=null&&o[j]){const a=e.state[j];if(U={},a===E)return;const s=C[a],r=e.state[Lt]??{},i=new URL(e.state[Yt]??location.href),l=e.state[F],c=w.url?mt(location)===mt(w.url):!1;if(l===x&&(te||c)){r!==R.state&&(R.state=r),t(i),C[E]=$(),s&&scrollTo(s.x,s.y),E=a;return}const p=a-E;await q({type:"popstate",url:i,popped:{state:r,scroll:s,delta:p},accept:()=>{E=a,x=l},block:()=>{history.go(-p)},nav_token:U,event:e})}else if(!Y){const a=new URL(location.href);t(a),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[j]:++E,[F]:x},"",location.href))});for(const e of document.querySelectorAll("link"))Te.has(e.rel)&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&I.navigating.set(wt.current=null)});function t(e){w.url=R.url=e,I.page.set(dt(R)),I.page.notify()}}async function Ve(t,{status:n=200,error:e,node_ids:o,params:a,route:s,server_route:r,data:i,form:l}){Zt=!0;const c=new URL(location.href);let u;({params:a={},route:s={id:null}}=await ut(c,!1)||{}),u=Ut.find(({id:d})=>d===s.id);let p,_=!0;try{const d=o.map(async(f,h)=>{const g=i[h];return g!=null&&g.uses&&(g.uses=Ye(g.uses)),Ct({loader:b.nodes[f],url:c,params:a,route:s,parent:async()=>{const y={};for(let S=0;S<h;S+=1)Object.assign(y,(await d[S]).data);return y},server_data_node:Ot(g)})}),m=await Promise.all(d);if(u){const f=u.layouts;for(let h=0;h<f.length;h++)f[h]||m.splice(h,0,void 0)}p=await lt({url:c,params:a,branch:m,status:n,error:e,errors:u==null?void 0:u.errors,form:l,route:u??null})}catch(d){if(d instanceof xt)return await W(new URL(d.location,location.href));p=await jt({status:Pt(d),error:await H(d,{url:c,params:a,route:s}),url:c,route:s}),t.textContent="",_=!1}p&&(p.props.page&&(p.props.page.state={}),await re(p,t,_))}function Ye(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Et=!1;function ze(t,n=!0){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const o=ce(t);if(o&&document.getElementById(o)){const{x:s,y:r}=$();setTimeout(()=>{const i=history.state;Et=!0,location.replace(new URL(`#${o}`,location.href)),history.replaceState(i,"",t),n&&scrollTo(s,r),Et=!1})}else{const s=document.body,r=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),r!==null?s.setAttribute("tabindex",r):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let r=0;r<a.rangeCount;r+=1)s.push(a.getRangeAt(r));setTimeout(()=>{if(a.rangeCount===s.length){for(let r=0;r<a.rangeCount;r+=1){const i=s[r],l=a.getRangeAt(r);if(i.commonAncestorContainer!==l.commonAncestorContainer||i.startContainer!==l.startContainer||i.endContainer!==l.endContainer||i.startOffset!==l.startOffset||i.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function $t(t,n,e,o,a=null){var c,u;let s,r;const i=new Promise((p,_)=>{s=p,r=_});return i.catch(T),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:$()},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((u=n==null?void 0:n.route)==null?void 0:u.id)??null},url:e,scroll:a},willUnload:!n,type:o,complete:i},fulfil:s,reject:r}}function dt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Ge(t){const n=new URL(t);return n.hash=decodeURIComponent(t.hash),n}function ce(t){let n;if(b.hash){const[,,e]=t.hash.split("#",3);n=e??""}else n=t.hash.slice(1);return decodeURIComponent(n)}export{tn as a,en as g,nn as r,I as s};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"../chunks/_4CM6wpT.js";import{y as t}from"../chunks/DBAf6hth.js";export{t as load_css,r as start};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|