@useago/sdk 1.0.5 → 1.0.7

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.
Files changed (36) hide show
  1. package/README.md +53 -0
  2. package/dist/angular.d.cts +2 -0
  3. package/dist/angular.d.ts +2 -0
  4. package/dist/{createConversationSession-lJWANT6T.cjs → createConversationSession-BuMXp0Ia.cjs} +1 -1
  5. package/dist/{createConversationSession-Boi0PjDU.js → createConversationSession-CCT1hCf8.js} +1 -1
  6. package/dist/createFormCollector-BwM7qTrp.js +276 -0
  7. package/dist/createFormCollector-DWzGKDwO.cjs +1 -0
  8. package/dist/devtools.d.cts +2 -0
  9. package/dist/devtools.d.ts +2 -0
  10. package/dist/{functions-C1-5vadY.js → functions-CApuQZ2b.js} +50 -43
  11. package/dist/{functions-DsmzgHjC.cjs → functions-Djnq-JAo.cjs} +1 -1
  12. package/dist/helpers.cjs +1 -1
  13. package/dist/helpers.js +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.cts +19 -0
  16. package/dist/index.d.ts +19 -0
  17. package/dist/index.js +35 -35
  18. package/dist/react.cjs +3 -31
  19. package/dist/react.d.cts +19 -0
  20. package/dist/react.d.ts +19 -0
  21. package/dist/react.js +603 -8158
  22. package/dist/rolldown-runtime-16Nf8qvH.cjs +1 -0
  23. package/dist/testing.d.cts +2 -0
  24. package/dist/testing.d.ts +2 -0
  25. package/dist/vue.cjs +1 -1
  26. package/dist/vue.d.cts +2 -0
  27. package/dist/vue.d.ts +2 -0
  28. package/dist/widget.cjs +4 -4
  29. package/dist/widget.d.cts +22 -0
  30. package/dist/widget.d.ts +22 -0
  31. package/dist/widget.js +347 -297
  32. package/package.json +3 -3
  33. package/dist/createFormCollector-BUqSA2Qw.js +0 -257
  34. package/dist/createFormCollector-CSG5ioym.cjs +0 -1
  35. package/dist/rolldown-runtime-CaekUdDJ.cjs +0 -1
  36. package/dist/rolldown-runtime-DxmricAu.js +0 -25
package/README.md CHANGED
@@ -81,6 +81,59 @@ guards, auth and layouts keep working exactly as they do today.
81
81
  `react-router-dom` here is *your* router, not an SDK dependency:
82
82
  `useAgoNavigation` accepts any `(path: string) => void` function.
83
83
 
84
+ ## Turn a JavaScript function into an agent tool
85
+
86
+ Keep your application logic as a regular JavaScript function, then describe its
87
+ arguments with `defineFunction`. The description and JSON Schema tell the agent
88
+ when and how to call it:
89
+
90
+ ```js
91
+ import { defineFunction } from "@useago/sdk";
92
+
93
+ async function getOrderStatus({ orderId }) {
94
+ const response = await fetch(`/api/orders/${orderId}`);
95
+ if (!response.ok) throw new Error("Order not found");
96
+
97
+ const order = await response.json();
98
+
99
+ return { orderId, status: order.status };
100
+ }
101
+
102
+ export const getOrderStatusTool = defineFunction({
103
+ name: "getOrderStatus",
104
+ description: "Get the current status of an order from its ID.",
105
+ parameters: {
106
+ type: "object",
107
+ properties: {
108
+ orderId: {
109
+ type: "string",
110
+ description: "The order ID shown to the user",
111
+ },
112
+ },
113
+ required: ["orderId"],
114
+ },
115
+ handler: getOrderStatus,
116
+ });
117
+ ```
118
+
119
+ Register the definition once to expose it to the agent. In React, pass it to
120
+ the provider:
121
+
122
+ ```tsx
123
+ <AgoProvider
124
+ baseUrl="https://api.example.com"
125
+ agent="support-agent"
126
+ tools={[getOrderStatusTool]}
127
+ >
128
+ <ChatWidget />
129
+ </AgoProvider>
130
+ ```
131
+
132
+ With the core client, use `client.registerFunction(getOrderStatusTool)`.
133
+ Whenever the agent calls the tool, the SDK runs your handler in the browser
134
+ with the generated arguments and sends its return value back to the agent. Keep
135
+ the return value small and structured so the agent can use it reliably.
136
+
84
137
  ## Show the source docs the agent retrieved
85
138
 
86
139
  Each assistant message carries the knowledge sources it used in `m.sources`
@@ -544,6 +544,8 @@ declare interface FormCollectorDefinition<V = Record<string, unknown>> {
544
544
  schema: FormCollectorSchema;
545
545
  /** Server-stored submit target, if any. Absent means collect-only. */
546
546
  submit?: SubmitConfig<V>;
547
+ /** Server-stored default for auto-submitting once the form is complete. */
548
+ autoSubmit?: boolean;
547
549
  }
548
550
 
549
551
  /**
package/dist/angular.d.ts CHANGED
@@ -544,6 +544,8 @@ declare interface FormCollectorDefinition<V = Record<string, unknown>> {
544
544
  schema: FormCollectorSchema;
545
545
  /** Server-stored submit target, if any. Absent means collect-only. */
546
546
  submit?: SubmitConfig<V>;
547
+ /** Server-stored default for auto-submitting once the form is complete. */
548
+ autoSubmit?: boolean;
547
549
  }
548
550
 
549
551
  /**
@@ -1 +1 @@
1
- const d=require("./createFormCollector-CSG5ioym.cjs");var f="ago_widget_id",g="ago_last_thread",y=7200*1e3;function v(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.floor(Math.random()*16);return(e==="x"?r:r&3|8).toString(16)})}function _(e={}){const r=e.key??f,i=e.threadKey??g,u=e.ttlMs??y,l=e.storage??(typeof localStorage<"u"?localStorage:void 0);let n=e.widgetId??"";if(!n&&l)try{n=l.getItem(r)??""}catch{}if(n||(n=v()),l)try{l.setItem(r,n)}catch{}const o=d.createStore({value:null,lastMessageAt:null},{key:i,storage:l}),c=o.get();c.value!==null&&s(c.lastMessageAt)&&o.set({value:null,lastMessageAt:null});function s(t){return t===null?!0:Number.isFinite(u)?Date.now()-t>u:!1}return{widgetId:n,key:r,getLastActiveThread(){const{value:t,lastMessageAt:a}=o.get();return t===null||s(a)?null:t},setActiveThread(t,a){const x=a==null?null:a instanceof Date?a.getTime():a;o.set({value:t,lastMessageAt:x})},clear(){o.set({value:null,lastMessageAt:null})}}}Object.defineProperty(exports,"createConversationSession",{enumerable:!0,get:function(){return _}});
1
+ const d=require("./createFormCollector-DWzGKDwO.cjs");var f="ago_widget_id",g="ago_last_thread",y=7200*1e3;function v(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.floor(Math.random()*16);return(e==="x"?r:r&3|8).toString(16)})}function _(e={}){const r=e.key??f,i=e.threadKey??g,u=e.ttlMs??y,l=e.storage??(typeof localStorage<"u"?localStorage:void 0);let n=e.widgetId??"";if(!n&&l)try{n=l.getItem(r)??""}catch{}if(n||(n=v()),l)try{l.setItem(r,n)}catch{}const o=d.createStore({value:null,lastMessageAt:null},{key:i,storage:l}),c=o.get();c.value!==null&&s(c.lastMessageAt)&&o.set({value:null,lastMessageAt:null});function s(t){return t===null?!0:Number.isFinite(u)?Date.now()-t>u:!1}return{widgetId:n,key:r,getLastActiveThread(){const{value:t,lastMessageAt:a}=o.get();return t===null||s(a)?null:t},setActiveThread(t,a){const x=a==null?null:a instanceof Date?a.getTime():a;o.set({value:t,lastMessageAt:x})},clear(){o.set({value:null,lastMessageAt:null})}}}Object.defineProperty(exports,"createConversationSession",{enumerable:!0,get:function(){return _}});
@@ -1,4 +1,4 @@
1
- import { i as d } from "./createFormCollector-BUqSA2Qw.js";
1
+ import { i as d } from "./createFormCollector-BwM7qTrp.js";
2
2
  var f = "ago_widget_id", g = "ago_last_thread", y = 7200 * 1e3;
3
3
  function v() {
4
4
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
@@ -0,0 +1,276 @@
1
+ import { c as N } from "./AgoClient-DYdIe_R4.js";
2
+ function W(n, e) {
3
+ const a = e ? e.storage ?? (typeof localStorage < "u" ? localStorage : void 0) : void 0;
4
+ let s = n;
5
+ if (e && a) try {
6
+ const f = a.getItem(e.key);
7
+ f != null && (s = JSON.parse(f));
8
+ } catch {
9
+ }
10
+ const i = /* @__PURE__ */ new Set(), c = () => i.forEach((f) => f(s));
11
+ function b() {
12
+ if (e && a) try {
13
+ a.setItem(e.key, JSON.stringify(s));
14
+ } catch {
15
+ }
16
+ }
17
+ return {
18
+ get: () => s,
19
+ set: (f) => {
20
+ s = f, b(), c();
21
+ },
22
+ subscribe: (f) => (i.add(f), () => {
23
+ i.delete(f);
24
+ })
25
+ };
26
+ }
27
+ var T = /^[a-zA-Z0-9_-]{1,40}$/, E = (n) => n == null || n === "";
28
+ function O(n, e) {
29
+ const a = e[n.property];
30
+ if (E(a)) return !1;
31
+ if (Array.isArray(n.value)) return n.value.some((c) => String(a) === String(c));
32
+ if (!n.op) return String(a) === String(n.value);
33
+ const s = Number(a), i = Number(n.value);
34
+ if (Number.isNaN(s) || Number.isNaN(i)) return !1;
35
+ switch (n.op) {
36
+ case ">=":
37
+ return s >= i;
38
+ case "<=":
39
+ return s <= i;
40
+ case ">":
41
+ return s > i;
42
+ case "<":
43
+ return s < i;
44
+ default:
45
+ return N.warn(`Unknown requiredWhen op "${n.op}"; treating as not required.`), !1;
46
+ }
47
+ }
48
+ function p(n, e) {
49
+ const a = n.properties ?? {}, s = /* @__PURE__ */ new Set();
50
+ for (const c of n.required ?? []) {
51
+ const b = a[c]?.requiredWhen;
52
+ (!b || O(b, e)) && s.add(c);
53
+ }
54
+ for (const [c, b] of Object.entries(a)) b.requiredWhen && O(b.requiredWhen, e) && s.add(c);
55
+ const i = [...s].filter((c) => E(e[c]));
56
+ return {
57
+ missing: i,
58
+ complete: i.length === 0
59
+ };
60
+ }
61
+ function j(n) {
62
+ const e = {};
63
+ for (const [a, s] of Object.entries(n.properties ?? {})) e[a] = {
64
+ type: s.type,
65
+ ...s.description != null && { description: s.description },
66
+ ...s.enum && { enum: s.enum },
67
+ ...s.default !== void 0 && { default: s.default }
68
+ };
69
+ return {
70
+ type: "object",
71
+ properties: e,
72
+ required: []
73
+ };
74
+ }
75
+ function I(n) {
76
+ const { name: e, description: a, schema: s } = n;
77
+ if (!T.test(e)) throw new Error(`Invalid form collector name "${e}": must match ${T} (it becomes the update_/submit_ function names).`);
78
+ const i = typeof n.submit == "string" ? n.submit ? {
79
+ via: "client",
80
+ url: n.submit
81
+ } : !1 : n.submit ?? !1;
82
+ n.autoSubmit === !0 && !i && N.warn(`FormCollector "${e}": autoSubmit is ignored because no submit target is configured.`);
83
+ const c = (n.autoSubmit ?? !0) && !!i, b = s.properties ?? {}, f = (t) => {
84
+ const r = {};
85
+ for (const [u, o] of Object.entries(t)) {
86
+ const l = b[u];
87
+ if (l)
88
+ if (o == null) r[u] = o;
89
+ else if (l.type === "number" || l.type === "integer") {
90
+ const d = typeof o == "number" ? o : Number(o);
91
+ r[u] = Number.isNaN(d) ? o : d;
92
+ } else l.type === "boolean" ? r[u] = typeof o == "boolean" ? o : o === "true" ? !0 : o === "false" ? !1 : !!o : r[u] = o;
93
+ }
94
+ return r;
95
+ }, y = n.initialValues ?? {}, m = W({
96
+ values: y,
97
+ submitted: !1
98
+ }), $ = (t) => {
99
+ const r = m.get(), u = {
100
+ ...r,
101
+ values: {
102
+ ...r.values,
103
+ ...t
104
+ }
105
+ };
106
+ return m.set(u), u;
107
+ };
108
+ let h = null;
109
+ const v = async () => {
110
+ const { values: t } = m.get(), { complete: r, missing: u } = p(s, t);
111
+ if (!r) return {
112
+ ok: !1,
113
+ missing: u
114
+ };
115
+ if (!i) return {
116
+ ok: !1,
117
+ error: "No submit target configured for this form collector."
118
+ };
119
+ const o = t;
120
+ try {
121
+ let l;
122
+ if (i.via === "client") if ("handler" in i) l = await i.handler(o);
123
+ else {
124
+ const d = await fetch(i.url, {
125
+ method: "POST",
126
+ headers: { "Content-Type": "application/json" },
127
+ credentials: "include",
128
+ body: JSON.stringify(o)
129
+ });
130
+ if (!d.ok) return {
131
+ ok: !1,
132
+ error: `Submit failed: HTTP ${d.status}`
133
+ };
134
+ l = await d.json().catch(() => {
135
+ });
136
+ }
137
+ else {
138
+ if (!h) return {
139
+ ok: !1,
140
+ error: "Backend submit requires install(client) (or useFormCollector) first."
141
+ };
142
+ l = await h.submitFormCollector(e, o);
143
+ }
144
+ return m.set({
145
+ ...m.get(),
146
+ submitted: !0,
147
+ submitResult: l
148
+ }), {
149
+ ok: !0,
150
+ result: l
151
+ };
152
+ } catch (l) {
153
+ const d = l instanceof Error ? l.message : "Submit failed";
154
+ return N.error(`FormCollector "${e}" submit failed:`, l), {
155
+ ok: !1,
156
+ error: d
157
+ };
158
+ }
159
+ }, w = async () => {
160
+ if (!c || !i) return null;
161
+ const { values: t, submitted: r } = m.get();
162
+ return r || !p(s, t).complete ? null : v();
163
+ }, C = {
164
+ name: `update_${e}`,
165
+ description: `Fill or update fields of the "${e}" form. ${a} Pass any subset of fields; call it repeatedly to fill the form as the user provides information. Returns the current values and which required fields are still missing.`,
166
+ parameters: j(s),
167
+ handler: async (t) => {
168
+ const r = $(f(t)), { missing: u } = p(s, r.values), o = await w();
169
+ return o ? o.ok ? {
170
+ ok: !0,
171
+ values: r.values,
172
+ missing: u,
173
+ submitted: !0
174
+ } : {
175
+ ok: !0,
176
+ values: r.values,
177
+ missing: u,
178
+ submitted: !1,
179
+ submitError: o.error
180
+ } : {
181
+ ok: !0,
182
+ values: r.values,
183
+ missing: u
184
+ };
185
+ }
186
+ }, g = [C];
187
+ i && !c && g.push({
188
+ name: `submit_${e}`,
189
+ description: `Submit the completed "${e}" form. Only call this once every required field is collected and the user has confirmed. If fields are missing it returns them instead of submitting.`,
190
+ parameters: {
191
+ type: "object",
192
+ properties: {}
193
+ },
194
+ handler: () => v()
195
+ });
196
+ const x = "client__", k = i ? `submit_${e}` : null, P = (t) => {
197
+ const r = t.functionName ?? t.toolName;
198
+ if (r)
199
+ return r.startsWith(x) ? r.slice(8) : r;
200
+ }, F = (t) => {
201
+ let r = { ...y }, u = !1;
202
+ for (const o of t) {
203
+ const l = P(o);
204
+ l === C.name ? o.arguments && (r = {
205
+ ...r,
206
+ ...f(o.arguments)
207
+ }) : k && l === k && o.status?.toLowerCase() === "done" && (u = !0);
208
+ }
209
+ m.set({
210
+ values: r,
211
+ submitted: u
212
+ });
213
+ }, S = `form:${e}`, q = () => {
214
+ const { values: t, submitted: r } = m.get(), { missing: u, complete: o } = p(s, t), l = i ? c ? " The form is submitted automatically as soon as every required field is filled, so there is no submit function to call." : ` When nothing is missing and the user confirms, call submit_${e}.` : "", d = r ? `The "${e}" form has been submitted.` : `You are currently collecting information from the user to fill the "${e}" form.`;
215
+ return {
216
+ name: `Form: ${e}`,
217
+ description: `${d} ${a} There are conditionnals questions/values to collected, you can find this information with the requiredWhen field in the form. The form schema is the following: ${JSON.stringify(s)}. Data collected so far: ${JSON.stringify(t)}. Call update_${e} with any fields the user provides; ask only for what is still missing.${l}`,
218
+ data: {
219
+ values: t,
220
+ missing: u,
221
+ complete: o,
222
+ submitted: r
223
+ }
224
+ };
225
+ }, _ = (t) => {
226
+ F((t.messages ?? []).flatMap((r) => r.toolCalls ?? []));
227
+ };
228
+ return {
229
+ name: e,
230
+ store: m,
231
+ functions: g,
232
+ contextKey: S,
233
+ contextProvider: q,
234
+ install: (t) => {
235
+ h = t;
236
+ for (const u of g) t.register(u);
237
+ t.addDynamicContext(S, q);
238
+ const r = m.subscribe(() => t.notifyContextChanged());
239
+ return t.on("conversation:loaded", _), () => {
240
+ r();
241
+ for (const u of g) t.unregisterFunction(u.name);
242
+ t.removeDynamicContext(S), t.off("conversation:loaded", _), h === t && (h = null);
243
+ };
244
+ },
245
+ hydrate: F,
246
+ submit: v,
247
+ getValues: () => m.get().values,
248
+ setValues: (t) => {
249
+ $(f(t)), w();
250
+ },
251
+ reset: () => {
252
+ m.set({
253
+ values: y,
254
+ submitted: !1
255
+ });
256
+ },
257
+ getStatus: () => p(s, m.get().values)
258
+ };
259
+ }
260
+ async function J(n, e) {
261
+ const a = await n.getFormCollector(e.name);
262
+ return I({
263
+ name: a.name,
264
+ description: e.description ?? a.description,
265
+ schema: e.schema ?? a.schema,
266
+ submit: e.submit ?? a.submit,
267
+ initialValues: e.initialValues,
268
+ autoSubmit: e.autoSubmit ?? a.autoSubmit
269
+ });
270
+ }
271
+ export {
272
+ W as i,
273
+ p as n,
274
+ J as r,
275
+ I as t
276
+ };
@@ -0,0 +1 @@
1
+ const N=require("./AgoClient--y10UXUV.cjs");function T(s,e){const a=e?e.storage??(typeof localStorage<"u"?localStorage:void 0):void 0;let n=s;if(e&&a)try{const f=a.getItem(e.key);f!=null&&(n=JSON.parse(f))}catch{}const i=new Set,c=()=>i.forEach(f=>f(n));function b(){if(e&&a)try{a.setItem(e.key,JSON.stringify(n))}catch{}}return{get:()=>n,set:f=>{n=f,b(),c()},subscribe:f=>(i.add(f),()=>{i.delete(f)})}}var _=/^[a-zA-Z0-9_-]{1,40}$/,j=s=>s==null||s==="";function P(s,e){const a=e[s.property];if(j(a))return!1;if(Array.isArray(s.value))return s.value.some(c=>String(a)===String(c));if(!s.op)return String(a)===String(s.value);const n=Number(a),i=Number(s.value);if(Number.isNaN(n)||Number.isNaN(i))return!1;switch(s.op){case">=":return n>=i;case"<=":return n<=i;case">":return n>i;case"<":return n<i;default:return N.logger.warn(`Unknown requiredWhen op "${s.op}"; treating as not required.`),!1}}function g(s,e){const a=s.properties??{},n=new Set;for(const c of s.required??[]){const b=a[c]?.requiredWhen;(!b||P(b,e))&&n.add(c)}for(const[c,b]of Object.entries(a))b.requiredWhen&&P(b.requiredWhen,e)&&n.add(c);const i=[...n].filter(c=>j(e[c]));return{missing:i,complete:i.length===0}}function A(s){const e={};for(const[a,n]of Object.entries(s.properties??{}))e[a]={type:n.type,...n.description!=null&&{description:n.description},...n.enum&&{enum:n.enum},...n.default!==void 0&&{default:n.default}};return{type:"object",properties:e,required:[]}}function E(s){const{name:e,description:a,schema:n}=s;if(!_.test(e))throw new Error(`Invalid form collector name "${e}": must match ${_} (it becomes the update_/submit_ function names).`);const i=typeof s.submit=="string"?s.submit?{via:"client",url:s.submit}:!1:s.submit??!1;s.autoSubmit===!0&&!i&&N.logger.warn(`FormCollector "${e}": autoSubmit is ignored because no submit target is configured.`);const c=(s.autoSubmit??!0)&&!!i,b=n.properties??{},f=t=>{const r={};for(const[u,o]of Object.entries(t)){const l=b[u];if(l)if(o==null)r[u]=o;else if(l.type==="number"||l.type==="integer"){const d=typeof o=="number"?o:Number(o);r[u]=Number.isNaN(d)?o:d}else l.type==="boolean"?r[u]=typeof o=="boolean"?o:o==="true"?!0:o==="false"?!1:!!o:r[u]=o}return r},y=s.initialValues??{},m=T({values:y,submitted:!1}),C=t=>{const r=m.get(),u={...r,values:{...r.values,...t}};return m.set(u),u};let h=null;const v=async()=>{const{values:t}=m.get(),{complete:r,missing:u}=g(n,t);if(!r)return{ok:!1,missing:u};if(!i)return{ok:!1,error:"No submit target configured for this form collector."};const o=t;try{let l;if(i.via==="client")if("handler"in i)l=await i.handler(o);else{const d=await fetch(i.url,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(o)});if(!d.ok)return{ok:!1,error:`Submit failed: HTTP ${d.status}`};l=await d.json().catch(()=>{})}else{if(!h)return{ok:!1,error:"Backend submit requires install(client) (or useFormCollector) first."};l=await h.submitFormCollector(e,o)}return m.set({...m.get(),submitted:!0,submitResult:l}),{ok:!0,result:l}}catch(l){const d=l instanceof Error?l.message:"Submit failed";return N.logger.error(`FormCollector "${e}" submit failed:`,l),{ok:!1,error:d}}},$=async()=>{if(!c||!i)return null;const{values:t,submitted:r}=m.get();return r||!g(n,t).complete?null:v()},w={name:`update_${e}`,description:`Fill or update fields of the "${e}" form. ${a} Pass any subset of fields; call it repeatedly to fill the form as the user provides information. Returns the current values and which required fields are still missing.`,parameters:A(n),handler:async t=>{const r=C(f(t)),{missing:u}=g(n,r.values),o=await $();return o?o.ok?{ok:!0,values:r.values,missing:u,submitted:!0}:{ok:!0,values:r.values,missing:u,submitted:!1,submitError:o.error}:{ok:!0,values:r.values,missing:u}}},p=[w];i&&!c&&p.push({name:`submit_${e}`,description:`Submit the completed "${e}" form. Only call this once every required field is collected and the user has confirmed. If fields are missing it returns them instead of submitting.`,parameters:{type:"object",properties:{}},handler:()=>v()});const W="client__",k=i?`submit_${e}`:null,x=t=>{const r=t.functionName??t.toolName;if(r)return r.startsWith(W)?r.slice(8):r},F=t=>{let r={...y},u=!1;for(const o of t){const l=x(o);l===w.name?o.arguments&&(r={...r,...f(o.arguments)}):k&&l===k&&o.status?.toLowerCase()==="done"&&(u=!0)}m.set({values:r,submitted:u})},S=`form:${e}`,q=()=>{const{values:t,submitted:r}=m.get(),{missing:u,complete:o}=g(n,t),l=i?c?" The form is submitted automatically as soon as every required field is filled, so there is no submit function to call.":` When nothing is missing and the user confirms, call submit_${e}.`:"",d=r?`The "${e}" form has been submitted.`:`You are currently collecting information from the user to fill the "${e}" form.`;return{name:`Form: ${e}`,description:`${d} ${a} There are conditionnals questions/values to collected, you can find this information with the requiredWhen field in the form. The form schema is the following: ${JSON.stringify(n)}. Data collected so far: ${JSON.stringify(t)}. Call update_${e} with any fields the user provides; ask only for what is still missing.${l}`,data:{values:t,missing:u,complete:o,submitted:r}}},O=t=>{F((t.messages??[]).flatMap(r=>r.toolCalls??[]))};return{name:e,store:m,functions:p,contextKey:S,contextProvider:q,install:t=>{h=t;for(const u of p)t.register(u);t.addDynamicContext(S,q);const r=m.subscribe(()=>t.notifyContextChanged());return t.on("conversation:loaded",O),()=>{r();for(const u of p)t.unregisterFunction(u.name);t.removeDynamicContext(S),t.off("conversation:loaded",O),h===t&&(h=null)}},hydrate:F,submit:v,getValues:()=>m.get().values,setValues:t=>{C(f(t)),$()},reset:()=>{m.set({values:y,submitted:!1})},getStatus:()=>g(n,m.get().values)}}async function I(s,e){const a=await s.getFormCollector(e.name);return E({name:a.name,description:e.description??a.description,schema:e.schema??a.schema,submit:e.submit??a.submit,initialValues:e.initialValues,autoSubmit:e.autoSubmit??a.autoSubmit})}Object.defineProperty(exports,"createFormCollector",{enumerable:!0,get:function(){return E}});Object.defineProperty(exports,"createStore",{enumerable:!0,get:function(){return T}});Object.defineProperty(exports,"deriveFormStatus",{enumerable:!0,get:function(){return g}});Object.defineProperty(exports,"loadFormCollector",{enumerable:!0,get:function(){return I}});
@@ -467,6 +467,8 @@ declare interface FormCollectorDefinition<V = Record<string, unknown>> {
467
467
  schema: FormCollectorSchema;
468
468
  /** Server-stored submit target, if any. Absent means collect-only. */
469
469
  submit?: SubmitConfig<V>;
470
+ /** Server-stored default for auto-submitting once the form is complete. */
471
+ autoSubmit?: boolean;
470
472
  }
471
473
 
472
474
  /**
@@ -467,6 +467,8 @@ declare interface FormCollectorDefinition<V = Record<string, unknown>> {
467
467
  schema: FormCollectorSchema;
468
468
  /** Server-stored submit target, if any. Absent means collect-only. */
469
469
  submit?: SubmitConfig<V>;
470
+ /** Server-stored default for auto-submitting once the form is complete. */
471
+ autoSubmit?: boolean;
470
472
  }
471
473
 
472
474
  /**
@@ -1,19 +1,26 @@
1
- import { n as s } from "./rolldown-runtime-DxmricAu.js";
2
- var S = /* @__PURE__ */ s({
3
- copyToClipboard: () => p,
4
- getLocalStorage: () => f,
5
- getUserLocation: () => m,
6
- highlightElement: () => g,
7
- openUrl: () => l,
8
- scrollToElement: () => h,
9
- setLocalStorage: () => y,
10
- setTheme: () => d,
11
- showConfirmDialog: () => u,
12
- showNotification: () => c,
13
- showToast: () => a,
14
- submitForm: () => v,
15
- trackEvent: () => b
16
- }), a = {
1
+ var n = Object.defineProperty, a = (e, t) => {
2
+ let r = {};
3
+ for (var o in e)
4
+ n(r, o, {
5
+ get: e[o],
6
+ enumerable: !0
7
+ });
8
+ return t || n(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ }, S = /* @__PURE__ */ a({
10
+ copyToClipboard: () => d,
11
+ getLocalStorage: () => g,
12
+ getUserLocation: () => h,
13
+ highlightElement: () => v,
14
+ openUrl: () => p,
15
+ scrollToElement: () => y,
16
+ setLocalStorage: () => f,
17
+ setTheme: () => u,
18
+ showConfirmDialog: () => m,
19
+ showNotification: () => l,
20
+ showToast: () => c,
21
+ submitForm: () => b,
22
+ trackEvent: () => w
23
+ }), c = {
17
24
  name: "showToast",
18
25
  description: "Show a toast notification to the user. Use this to confirm actions or display brief messages.",
19
26
  parameters: {
@@ -44,7 +51,7 @@ var S = /* @__PURE__ */ s({
44
51
  shown: !1,
45
52
  error: "No toast handler configured"
46
53
  })
47
- }, c = {
54
+ }, l = {
48
55
  name: "showNotification",
49
56
  description: "Show a browser notification to the user. Useful for important alerts even when the tab is not focused.",
50
57
  parameters: {
@@ -71,7 +78,7 @@ var S = /* @__PURE__ */ s({
71
78
  shown: !1,
72
79
  error: "Permission not granted"
73
80
  })
74
- }, l = {
81
+ }, p = {
75
82
  name: "openUrl",
76
83
  description: "Open a URL in a new browser tab.",
77
84
  parameters: {
@@ -83,7 +90,7 @@ var S = /* @__PURE__ */ s({
83
90
  required: ["url"]
84
91
  },
85
92
  handler: async (e) => (window.open(e.url, "_blank", "noopener,noreferrer"), { opened: !0 })
86
- }, p = {
93
+ }, d = {
87
94
  name: "copyToClipboard",
88
95
  description: "Copy text to the user's clipboard.",
89
96
  parameters: {
@@ -95,7 +102,7 @@ var S = /* @__PURE__ */ s({
95
102
  required: ["text"]
96
103
  },
97
104
  handler: async (e) => (await navigator.clipboard.writeText(e.text), { copied: !0 })
98
- }, d = {
105
+ }, u = {
99
106
  name: "setTheme",
100
107
  description: "Change the application's color theme. Sets a data-theme attribute on the document element.",
101
108
  parameters: {
@@ -118,7 +125,7 @@ var S = /* @__PURE__ */ s({
118
125
  applied: !0
119
126
  };
120
127
  }
121
- }, u = {
128
+ }, m = {
122
129
  name: "showConfirmDialog",
123
130
  description: "Show a confirmation dialog to the user and return their choice (true/false).",
124
131
  parameters: {
@@ -130,7 +137,7 @@ var S = /* @__PURE__ */ s({
130
137
  required: ["message"]
131
138
  },
132
139
  handler: async (e) => ({ confirmed: window.confirm(e.message) })
133
- }, m = {
140
+ }, h = {
134
141
  name: "getUserLocation",
135
142
  description: "Get the user's current geographic location (requires permission).",
136
143
  parameters: {
@@ -144,7 +151,7 @@ var S = /* @__PURE__ */ s({
144
151
  accuracy: t.coords.accuracy
145
152
  }), (t) => e({ error: t.message }));
146
153
  }) : { error: "Geolocation not supported" }
147
- }, h = {
154
+ }, y = {
148
155
  name: "scrollToElement",
149
156
  description: "Scroll the page to a specific element identified by CSS selector.",
150
157
  parameters: {
@@ -169,7 +176,7 @@ var S = /* @__PURE__ */ s({
169
176
  error: `Element not found: ${e.selector}`
170
177
  };
171
178
  }
172
- }, y = {
179
+ }, f = {
173
180
  name: "setLocalStorage",
174
181
  description: "Store a value in the browser's localStorage.",
175
182
  parameters: {
@@ -187,7 +194,7 @@ var S = /* @__PURE__ */ s({
187
194
  required: ["key", "value"]
188
195
  },
189
196
  handler: async (e) => (localStorage.setItem(e.key, e.value), { stored: !0 })
190
- }, f = {
197
+ }, g = {
191
198
  name: "getLocalStorage",
192
199
  description: "Retrieve a value from the browser's localStorage.",
193
200
  parameters: {
@@ -206,7 +213,7 @@ var S = /* @__PURE__ */ s({
206
213
  found: t !== null
207
214
  };
208
215
  }
209
- }, g = {
216
+ }, v = {
210
217
  name: "highlightElement",
211
218
  description: "Highlight a DOM element to draw the user's attention (e.g. for onboarding).",
212
219
  parameters: {
@@ -237,7 +244,7 @@ var S = /* @__PURE__ */ s({
237
244
  t.style.outline = r, t.style.outlineOffset = "";
238
245
  }, 3e3), { highlighted: !0 };
239
246
  }
240
- }, v = {
247
+ }, b = {
241
248
  name: "submitForm",
242
249
  description: "Fill and submit an HTML form on the page. Pass field values as key-value pairs.",
243
250
  parameters: {
@@ -262,14 +269,14 @@ var S = /* @__PURE__ */ s({
262
269
  };
263
270
  if (e.values) {
264
271
  const r = JSON.parse(e.values);
265
- for (const [o, n] of Object.entries(r)) {
272
+ for (const [o, s] of Object.entries(r)) {
266
273
  const i = t.elements.namedItem(o);
267
- i && (i.value = n);
274
+ i && (i.value = s);
268
275
  }
269
276
  }
270
277
  return t.requestSubmit(), { submitted: !0 };
271
278
  }
272
- }, b = {
279
+ }, w = {
273
280
  name: "trackEvent",
274
281
  description: "Track a custom analytics event. Override the handler to wire up your analytics provider.",
275
282
  parameters: {
@@ -295,18 +302,18 @@ var S = /* @__PURE__ */ s({
295
302
  }
296
303
  };
297
304
  export {
298
- g as a,
299
- y as c,
300
- c as d,
301
- a as f,
302
- m as i,
303
- d as l,
304
- b as m,
305
+ v as a,
306
+ f as c,
307
+ l as d,
308
+ c as f,
309
+ h as i,
310
+ u as l,
311
+ w as m,
305
312
  S as n,
306
- l as o,
307
- v as p,
308
- f as r,
309
- h as s,
310
- p as t,
311
- u
313
+ p as o,
314
+ b as p,
315
+ g as r,
316
+ y as s,
317
+ d as t,
318
+ m as u
312
319
  };
@@ -1 +1 @@
1
- const v=require("./rolldown-runtime-CaekUdDJ.cjs");var w=v.__exportAll({copyToClipboard:()=>c,getLocalStorage:()=>f,getUserLocation:()=>p,highlightElement:()=>h,openUrl:()=>a,scrollToElement:()=>d,setLocalStorage:()=>m,setTheme:()=>l,showConfirmDialog:()=>u,showNotification:()=>s,showToast:()=>i,submitForm:()=>y,trackEvent:()=>g}),i={name:"showToast",description:"Show a toast notification to the user. Use this to confirm actions or display brief messages.",parameters:{type:"object",properties:{message:{type:"string",description:"The message to display"},type:{type:"string",description:"Toast type",enum:["success","error","warning","info"]},duration:{type:"number",description:"Duration in milliseconds (default 3000)"}},required:["message"]},handler:async()=>({shown:!1,error:"No toast handler configured"})},s={name:"showNotification",description:"Show a browser notification to the user. Useful for important alerts even when the tab is not focused.",parameters:{type:"object",properties:{title:{type:"string",description:"Notification title"},body:{type:"string",description:"Notification body text"}},required:["title"]},handler:async e=>typeof Notification>"u"?{shown:!1,error:"Notifications not supported"}:Notification.permission==="denied"?{shown:!1,error:"Notification permission denied"}:(Notification.permission!=="granted"&&await Notification.requestPermission(),Notification.permission==="granted"?(new Notification(e.title,{body:e.body}),{shown:!0}):{shown:!1,error:"Permission not granted"})},a={name:"openUrl",description:"Open a URL in a new browser tab.",parameters:{type:"object",properties:{url:{type:"string",description:"The URL to open"}},required:["url"]},handler:async e=>(window.open(e.url,"_blank","noopener,noreferrer"),{opened:!0})},c={name:"copyToClipboard",description:"Copy text to the user's clipboard.",parameters:{type:"object",properties:{text:{type:"string",description:"The text to copy"}},required:["text"]},handler:async e=>(await navigator.clipboard.writeText(e.text),{copied:!0})},l={name:"setTheme",description:"Change the application's color theme. Sets a data-theme attribute on the document element.",parameters:{type:"object",properties:{theme:{type:"string",description:"Theme to apply",enum:["light","dark","system"]}},required:["theme"]},handler:async e=>{const t=e.theme;return document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),{theme:t,applied:!0}}},u={name:"showConfirmDialog",description:"Show a confirmation dialog to the user and return their choice (true/false).",parameters:{type:"object",properties:{message:{type:"string",description:"The confirmation message to display"}},required:["message"]},handler:async e=>({confirmed:window.confirm(e.message)})},p={name:"getUserLocation",description:"Get the user's current geographic location (requires permission).",parameters:{type:"object",properties:{}},handler:async()=>navigator.geolocation?new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>e({latitude:t.coords.latitude,longitude:t.coords.longitude,accuracy:t.coords.accuracy}),t=>e({error:t.message}))}):{error:"Geolocation not supported"}},d={name:"scrollToElement",description:"Scroll the page to a specific element identified by CSS selector.",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the element to scroll to (e.g. '#section-pricing')"},behavior:{type:"string",description:"Scroll behavior",enum:["smooth","instant"]}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);return t?(t.scrollIntoView({behavior:e.behavior||"smooth"}),{scrolled:!0}):{scrolled:!1,error:`Element not found: ${e.selector}`}}},m={name:"setLocalStorage",description:"Store a value in the browser's localStorage.",parameters:{type:"object",properties:{key:{type:"string",description:"Storage key"},value:{type:"string",description:"Value to store"}},required:["key","value"]},handler:async e=>(localStorage.setItem(e.key,e.value),{stored:!0})},f={name:"getLocalStorage",description:"Retrieve a value from the browser's localStorage.",parameters:{type:"object",properties:{key:{type:"string",description:"Storage key"}},required:["key"]},handler:async e=>{const t=localStorage.getItem(e.key);return{key:e.key,value:t,found:t!==null}}},h={name:"highlightElement",description:"Highlight a DOM element to draw the user's attention (e.g. for onboarding).",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the element to highlight"},color:{type:"string",description:"Highlight border color (default: #3b82f6)"}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);if(!t)return{highlighted:!1,error:`Element not found: ${e.selector}`};const r=t.style.outline,o=e.color||"#3b82f6";return t.style.outline=`3px solid ${o}`,t.style.outlineOffset="2px",t.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{t.style.outline=r,t.style.outlineOffset=""},3e3),{highlighted:!0}}},y={name:"submitForm",description:"Fill and submit an HTML form on the page. Pass field values as key-value pairs.",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the form element"},values:{type:"string",description:"JSON string of field name → value pairs"}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);if(!t)return{submitted:!1,error:`Form not found: ${e.selector}`};if(e.values){const r=JSON.parse(e.values);for(const[o,b]of Object.entries(r)){const n=t.elements.namedItem(o);n&&(n.value=b)}}return t.requestSubmit(),{submitted:!0}}},g={name:"trackEvent",description:"Track a custom analytics event. Override the handler to wire up your analytics provider.",parameters:{type:"object",properties:{event:{type:"string",description:"Event name"},properties:{type:"string",description:"JSON string of event properties"}},required:["event"]},handler:async e=>{const t=e.properties?JSON.parse(e.properties):{};return console.log(`[AGO Analytics] ${e.event}`,t),{tracked:!0,event:e.event}}};Object.defineProperty(exports,"copyToClipboard",{enumerable:!0,get:function(){return c}});Object.defineProperty(exports,"functions_exports",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"getLocalStorage",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"getUserLocation",{enumerable:!0,get:function(){return p}});Object.defineProperty(exports,"highlightElement",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"openUrl",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"scrollToElement",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"setLocalStorage",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"setTheme",{enumerable:!0,get:function(){return l}});Object.defineProperty(exports,"showConfirmDialog",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"showNotification",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"showToast",{enumerable:!0,get:function(){return i}});Object.defineProperty(exports,"submitForm",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"trackEvent",{enumerable:!0,get:function(){return g}});
1
+ const v=require("./rolldown-runtime-16Nf8qvH.cjs");var w=v.__exportAll({copyToClipboard:()=>c,getLocalStorage:()=>f,getUserLocation:()=>p,highlightElement:()=>h,openUrl:()=>a,scrollToElement:()=>d,setLocalStorage:()=>m,setTheme:()=>l,showConfirmDialog:()=>u,showNotification:()=>s,showToast:()=>i,submitForm:()=>y,trackEvent:()=>g}),i={name:"showToast",description:"Show a toast notification to the user. Use this to confirm actions or display brief messages.",parameters:{type:"object",properties:{message:{type:"string",description:"The message to display"},type:{type:"string",description:"Toast type",enum:["success","error","warning","info"]},duration:{type:"number",description:"Duration in milliseconds (default 3000)"}},required:["message"]},handler:async()=>({shown:!1,error:"No toast handler configured"})},s={name:"showNotification",description:"Show a browser notification to the user. Useful for important alerts even when the tab is not focused.",parameters:{type:"object",properties:{title:{type:"string",description:"Notification title"},body:{type:"string",description:"Notification body text"}},required:["title"]},handler:async e=>typeof Notification>"u"?{shown:!1,error:"Notifications not supported"}:Notification.permission==="denied"?{shown:!1,error:"Notification permission denied"}:(Notification.permission!=="granted"&&await Notification.requestPermission(),Notification.permission==="granted"?(new Notification(e.title,{body:e.body}),{shown:!0}):{shown:!1,error:"Permission not granted"})},a={name:"openUrl",description:"Open a URL in a new browser tab.",parameters:{type:"object",properties:{url:{type:"string",description:"The URL to open"}},required:["url"]},handler:async e=>(window.open(e.url,"_blank","noopener,noreferrer"),{opened:!0})},c={name:"copyToClipboard",description:"Copy text to the user's clipboard.",parameters:{type:"object",properties:{text:{type:"string",description:"The text to copy"}},required:["text"]},handler:async e=>(await navigator.clipboard.writeText(e.text),{copied:!0})},l={name:"setTheme",description:"Change the application's color theme. Sets a data-theme attribute on the document element.",parameters:{type:"object",properties:{theme:{type:"string",description:"Theme to apply",enum:["light","dark","system"]}},required:["theme"]},handler:async e=>{const t=e.theme;return document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),{theme:t,applied:!0}}},u={name:"showConfirmDialog",description:"Show a confirmation dialog to the user and return their choice (true/false).",parameters:{type:"object",properties:{message:{type:"string",description:"The confirmation message to display"}},required:["message"]},handler:async e=>({confirmed:window.confirm(e.message)})},p={name:"getUserLocation",description:"Get the user's current geographic location (requires permission).",parameters:{type:"object",properties:{}},handler:async()=>navigator.geolocation?new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>e({latitude:t.coords.latitude,longitude:t.coords.longitude,accuracy:t.coords.accuracy}),t=>e({error:t.message}))}):{error:"Geolocation not supported"}},d={name:"scrollToElement",description:"Scroll the page to a specific element identified by CSS selector.",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the element to scroll to (e.g. '#section-pricing')"},behavior:{type:"string",description:"Scroll behavior",enum:["smooth","instant"]}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);return t?(t.scrollIntoView({behavior:e.behavior||"smooth"}),{scrolled:!0}):{scrolled:!1,error:`Element not found: ${e.selector}`}}},m={name:"setLocalStorage",description:"Store a value in the browser's localStorage.",parameters:{type:"object",properties:{key:{type:"string",description:"Storage key"},value:{type:"string",description:"Value to store"}},required:["key","value"]},handler:async e=>(localStorage.setItem(e.key,e.value),{stored:!0})},f={name:"getLocalStorage",description:"Retrieve a value from the browser's localStorage.",parameters:{type:"object",properties:{key:{type:"string",description:"Storage key"}},required:["key"]},handler:async e=>{const t=localStorage.getItem(e.key);return{key:e.key,value:t,found:t!==null}}},h={name:"highlightElement",description:"Highlight a DOM element to draw the user's attention (e.g. for onboarding).",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the element to highlight"},color:{type:"string",description:"Highlight border color (default: #3b82f6)"}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);if(!t)return{highlighted:!1,error:`Element not found: ${e.selector}`};const r=t.style.outline,o=e.color||"#3b82f6";return t.style.outline=`3px solid ${o}`,t.style.outlineOffset="2px",t.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{t.style.outline=r,t.style.outlineOffset=""},3e3),{highlighted:!0}}},y={name:"submitForm",description:"Fill and submit an HTML form on the page. Pass field values as key-value pairs.",parameters:{type:"object",properties:{selector:{type:"string",description:"CSS selector of the form element"},values:{type:"string",description:"JSON string of field name → value pairs"}},required:["selector"]},handler:async e=>{const t=document.querySelector(e.selector);if(!t)return{submitted:!1,error:`Form not found: ${e.selector}`};if(e.values){const r=JSON.parse(e.values);for(const[o,b]of Object.entries(r)){const n=t.elements.namedItem(o);n&&(n.value=b)}}return t.requestSubmit(),{submitted:!0}}},g={name:"trackEvent",description:"Track a custom analytics event. Override the handler to wire up your analytics provider.",parameters:{type:"object",properties:{event:{type:"string",description:"Event name"},properties:{type:"string",description:"JSON string of event properties"}},required:["event"]},handler:async e=>{const t=e.properties?JSON.parse(e.properties):{};return console.log(`[AGO Analytics] ${e.event}`,t),{tracked:!0,event:e.event}}};Object.defineProperty(exports,"copyToClipboard",{enumerable:!0,get:function(){return c}});Object.defineProperty(exports,"functions_exports",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"getLocalStorage",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"getUserLocation",{enumerable:!0,get:function(){return p}});Object.defineProperty(exports,"highlightElement",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"openUrl",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"scrollToElement",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"setLocalStorage",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"setTheme",{enumerable:!0,get:function(){return l}});Object.defineProperty(exports,"showConfirmDialog",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"showNotification",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"showToast",{enumerable:!0,get:function(){return i}});Object.defineProperty(exports,"submitForm",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"trackEvent",{enumerable:!0,get:function(){return g}});
package/dist/helpers.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./functions-DsmzgHjC.cjs");exports.copyToClipboard=o.copyToClipboard;exports.getLocalStorage=o.getLocalStorage;exports.getUserLocation=o.getUserLocation;exports.highlightElement=o.highlightElement;exports.openUrl=o.openUrl;exports.scrollToElement=o.scrollToElement;exports.setLocalStorage=o.setLocalStorage;exports.setTheme=o.setTheme;exports.showConfirmDialog=o.showConfirmDialog;exports.showNotification=o.showNotification;exports.showToast=o.showToast;exports.submitForm=o.submitForm;exports.trackEvent=o.trackEvent;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./functions-Djnq-JAo.cjs");exports.copyToClipboard=o.copyToClipboard;exports.getLocalStorage=o.getLocalStorage;exports.getUserLocation=o.getUserLocation;exports.highlightElement=o.highlightElement;exports.openUrl=o.openUrl;exports.scrollToElement=o.scrollToElement;exports.setLocalStorage=o.setLocalStorage;exports.setTheme=o.setTheme;exports.showConfirmDialog=o.showConfirmDialog;exports.showNotification=o.showNotification;exports.showToast=o.showToast;exports.submitForm=o.submitForm;exports.trackEvent=o.trackEvent;
package/dist/helpers.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, c as s, d as t, f as e, i as r, l as i, m as l, o as m, p as c, r as g, s as h, t as n, u as p } from "./functions-C1-5vadY.js";
1
+ import { a, c as s, d as t, f as e, i as r, l as i, m as l, o as m, p as c, r as g, s as h, t as n, u as p } from "./functions-CApuQZ2b.js";
2
2
  export {
3
3
  n as copyToClipboard,
4
4
  g as getLocalStorage,