@solomei-ai/intent 1.9.2 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,7 +43,7 @@ initIntent({
43
43
  geo: false, // Optional: Enable/disable geolocation (default: false)
44
44
  baseUrl: 'https://...', // Optional: Custom API endpoint (default: 'https://intent.callimacus.ai')
45
45
  ip: '192.0.2.1', // Optional: Client IP address
46
- sidMaxAgeSeconds: 86400, // Optional: Session cookie max-age in seconds (default: 30 days)
46
+ sidMaxAgeSeconds: 2592000, // Optional: Session cookie max-age in seconds (default: 30 days = 2592000 seconds)
47
47
  debug: false, // Optional: Enable debug logging for timing information (default: false)
48
48
  });
49
49
  ```
@@ -92,7 +92,36 @@ Once loaded, access the module from the global `window.Intent` namespace:
92
92
 
93
93
 
94
94
  ## Managing consent & geolocation flags
95
- You can pass flags to `initIntent` or toggle them at runtime with setFlag:
95
+
96
+ ### Recommended: Type-Safe Functions (v1.9.4+)
97
+
98
+ Use the dedicated helper functions for better type safety and IDE support:
99
+
100
+ ```ts
101
+ import {setConsent, setGeo, setDebug} from '@solomei-ai/intent';
102
+
103
+ // Grant or revoke consent
104
+ setConsent(true); // granted
105
+ setConsent(false); // disabled
106
+
107
+ // Enable or disable device geolocation capture
108
+ setGeo(true); // enabled
109
+ setGeo(false); // disabled
110
+
111
+ // Enable or disable debug logging
112
+ setDebug(true); // enabled
113
+ setDebug(false); // disabled
114
+ ```
115
+
116
+ **Benefits of type-safe functions:**
117
+ - Clear, self-documenting API
118
+ - Better IDE autocomplete and type checking
119
+ - Prevents typos in flag names
120
+ - Explicit boolean-only parameters
121
+
122
+ ### Alternative: Generic setFlag Function (Deprecated)
123
+
124
+ The `setFlag` function remains available for backwards compatibility:
96
125
 
97
126
  ```ts
98
127
  import {setFlag} from '@solomei-ai/intent';
@@ -109,8 +138,79 @@ setFlag('intent:geo', false); // disabled
109
138
  setFlag('intent:debug', true); // enabled
110
139
  setFlag('intent:debug', false); // disabled
111
140
  ```
141
+
142
+ > **⚠️ URGENT DEPRECATION WARNING:** The **entire `setFlag` function will be removed in v2.0.0 (February 2026 - approximately 2 months)**. All users must migrate to the type-safe functions (`setConsent`, `setGeo`, `setDebug`) before upgrading to v2.0.0. See the Migration Guide below for details.
143
+
144
+ ---
145
+
146
+ **Behavior:**
112
147
  - When consent is granted, the tracker maintains a first-party cookie `intent_sid`.
113
148
  - If consent is revoked, the tracker clears `intent_sid` and stops sending events.
149
+
150
+ ### Migration Guide
151
+
152
+ **Upgrading from v1.9.3 and earlier:**
153
+
154
+ The new type-safe functions are recommended but optional. Your existing code using `setFlag` will continue to work without any changes:
155
+
156
+ ```ts
157
+ // ✅ This still works (backwards compatible)
158
+ setFlag('intent:consent', true);
159
+
160
+ // ✅ Recommended: Migrate to type-safe functions for better DX
161
+ setConsent(true);
162
+ ```
163
+
164
+ No breaking changes - all existing code remains functional.
165
+
166
+ **⚠️ URGENT: Deprecation Timeline**
167
+
168
+ - **v1.9.4 (Current - December 2025)**: `setFlag` function is deprecated but still supported
169
+ - **v2.0.0 (February 2026 - ~2 months)**: `setFlag` function will be **completely removed**
170
+
171
+ **⚠️ You have approximately 2 months to complete migration before v2.0.0**
172
+
173
+ **Migration Required Before v2.0.0:**
174
+
175
+ All code using `setFlag` must be migrated to the type-safe alternatives:
176
+
177
+ ```ts
178
+ // ❌ Will NOT work in v2.0.0 - setFlag will be removed
179
+ setFlag('intent:consent', true);
180
+ setFlag('intent:consent', 'granted');
181
+ setFlag('intent:geo', false);
182
+ setFlag('intent:debug', true);
183
+
184
+ // ✅ REQUIRED migration for v2.0.0
185
+ setConsent(true); // replaces setFlag('intent:consent', true)
186
+ setGeo(false); // replaces setFlag('intent:geo', false)
187
+ setDebug(true); // replaces setFlag('intent:debug', true)
188
+ ```
189
+
190
+ **Migration Steps:**
191
+
192
+ 1. Find all uses of `setFlag` in your codebase
193
+ 2. Replace each call with the appropriate type-safe function:
194
+ - `setFlag('intent:consent', ...)` → `setConsent(...)`
195
+ - `setFlag('intent:geo', ...)` → `setGeo(...)`
196
+ - `setFlag('intent:debug', ...)` → `setDebug(...)`
197
+ 3. If you were using custom flag names, you'll need to find an alternative solution or open an issue to discuss your use case
198
+
199
+ **Search & Replace Examples:**
200
+
201
+ ```bash
202
+ # Find all uses of setFlag
203
+ grep -r "setFlag" your-codebase/
204
+
205
+ # Example replacements:
206
+ setFlag('intent:consent', true) → setConsent(true)
207
+ setFlag('intent:consent', false) → setConsent(false)
208
+ setFlag('intent:geo', true) → setGeo(true)
209
+ setFlag('intent:geo', false) → setGeo(false)
210
+ setFlag('intent:debug', true) → setDebug(true)
211
+ setFlag('intent:debug', false) → setDebug(false)
212
+ ```
213
+
114
214
  ---
115
215
 
116
216
  ## Debug Logging
@@ -130,12 +230,17 @@ initIntent({
130
230
  Or toggle debug logging at runtime:
131
231
 
132
232
  ```ts
133
- import {setFlag} from '@solomei-ai/intent';
233
+ import {setDebug} from '@solomei-ai/intent';
134
234
 
135
- // Enable debug logging
136
- setFlag('intent:debug', true);
235
+ // Enable debug logging (recommended - type-safe)
236
+ setDebug(true);
137
237
 
138
238
  // Disable debug logging
239
+ setDebug(false);
240
+
241
+ // Backwards compatible: using setFlag still works
242
+ import {setFlag} from '@solomei-ai/intent';
243
+ setFlag('intent:debug', true);
139
244
  setFlag('intent:debug', false);
140
245
  ```
141
246
 
@@ -214,6 +319,7 @@ When consent is granted, the Intent SDK automatically collects the following dat
214
319
  - Optional IP address (`ip`)
215
320
  - Consent status (`intent:consent`)
216
321
  - Geolocation preference (`intent:geo`)
322
+ - Debug logging preference (`intent:debug`)
217
323
  - Session max-age setting
218
324
 
219
325
  ### Built-in Redaction
@@ -252,7 +358,7 @@ Redacted fields are replaced with placeholder text like `<Password>`, `<Email>`,
252
358
 
253
359
  **Local Storage:**
254
360
  - The SDK stores configuration and preferences in browser `localStorage`
255
- - Keys used: `intent:consent`, `intent:geo`, `intent:data-client-id`, `intent:data-base-url`, `intent:data-ip`, `intent:data-sid-max-age`
361
+ - Keys used: `intent:consent`, `intent:geo`, `intent:debug`, `intent:data-client-id`, `intent:data-base-url`, `intent:data-ip`, `intent:data-sid-max-age`
256
362
  - localStorage data persists until explicitly cleared by the user or your application
257
363
 
258
364
  **Cookies:**
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © 2025 Solomei AI SRL. Proprietary and confidential.
3
3
  */
4
- import t from"html2canvas-pro";import e from"js-cookie";function n(){const t=["number","height","PWA: ","entryType","maxTouchPoints","round","padStart","fine","saveData","isSecureContext","reclined","(pointer: fine)","deviceorientation","encodedBodySize","Viewport: ","browser API","Local time: ","version"," Mbps","undefined","isFinite","toFixed","flat","(pointer: coarse)","downlink","colorDepth","downlinkMbps","x (avail ","yes","DeviceOrientationEvent","push","type","369596BEMXlt","(display-mode: standalone)","Pointer/Touch: ","join","Platform: ","Device geolocation: disabled","UA brands: ","setTimeout","getBattery","; DNT: ","getEntriesByType","Tilt: ","effectiveType","hardwareConcurrency","duration","CPU: ","intent:geo","TTFB","max","14210HYpWBT","charging","level","resolvedOptions","width","getItem","removeEventListener","filter","-bit)","5303493GwoFGk","floor","gamma"," (β ","toString","5320NNbLrh","Referrer: ","devicePixelRatio","mobile","find","brand","beta","SW-controlled","coarse","referrer","°, γ ","platform","7TOwiOp","DateTimeFormat","CookiesEnabled: ","responseStart","function","userAgentData","TTFB ~","serviceWorker","orientation"," cores"," (mobile)","Screen: ","length","connection","doNotTrack","upright","rtt","rttMs","isArray",", display-mode standalone: ","3582696pMLoIV","matches","1140630wEpJUM"," | ","911008RXiMcX","Languages: ","onLine","3397359Fpyrxn","availWidth"," (UTC","not charging","enabled"," ms","addEventListener","timeZone","transferSize","requestStart","abs","controller","navigation"];return(n=function(){return t})()}async function o(){const t=a,e=[];let n=t(208);if("connection"in(o=navigator)&&void 0!==o[a(283)]){const n=navigator.connection;n?.[t(237)]&&e.push(n.effectiveType),typeof n?.[t(217)]===t(193)&&e[t(223)]("~"+n[t(217)]+t(211)),typeof n?.rtt===t(193)&&e.push(n[t(286)]+t(185)),n?.[t(201)]&&e[t(223)](t(201))}else{const o=function(t=20){const e=a,n=performance[e(235)]("navigation")[e(262)](t=>"navigation"===t.entryType),o=n?Math.max(0,n.responseStart-n[e(189)]):void 0,i=performance[e(235)]("resource")[e(251)](t=>"resource"===t[e(196)]);let r=0,c=0;for(const n of i.slice(0,Math.max(0,t))){const t=n[e(206)]>0?n[e(206)]:n.transferSize>0?n[e(188)]:0,o=n[e(239)];t>0&&o>0&&Number.isFinite(o)&&(r+=t,c+=o)}const s=c>0?8*r/c:void 0;return{downlinkMbps:"number"==typeof s?s/1e3:void 0,rttMs:o}}();typeof o[t(219)]===t(193)&&e[t(223)]("~"+o[t(219)][t(214)](1)+t(211)),"number"==typeof o[t(287)]&&e[t(223)](t(276)+Math[t(198)](o[t(287)])+t(185)),n="inferred"}var o;const i=performance.getEntriesByType(t(192)).find(e=>e[t(196)]===t(192));if(i){const n=Math[t(243)](0,i[t(273)]-i[t(189)]);!e.some(e=>e.startsWith(t(242)))&&e.push(t(276)+Math[t(198)](n)+t(185))}return e[t(282)]?"Network: "+e[t(228)](", ")+" ("+n+")":void 0}function i(){const t=a;if(!function(t){const e=a;return"userAgentData"in t&&typeof t[e(275)]!==e(212)}(navigator))return;const e=navigator.userAgentData,n=Array[t(288)](e.brands)?e.brands.map(e=>e[t(263)]+" "+e[t(210)]).join(", "):void 0,o=e.platform?""+e[t(269)]+(e[t(261)]?t(280):""):void 0;return[n&&t(231)+n,o&&t(229)+o][t(251)](Boolean)[t(228)](t(293))||void 0}function a(t,e){t-=185;return n()[t]}async function r(t=400){const e=a;if(e(222)in window&&window[e(202)])return new Promise(n=>{const o=e;let i=!1;const r=t=>{const e=a,o=typeof t.beta===e(193)?t[e(264)]:void 0,c=typeof t[e(255)]===e(193)?t[e(255)]:void 0;if(void 0===o||void 0===c)return;if(i)return;i=!0,window[e(250)](e(205),r);const s=function(t,e){const n=a,o=Math[n(190)](t),i=Math.abs(e);return n(o<15&&i<15?215:o>=60?285:203)}(o,c);n(e(236)+s+e(256)+Math[e(198)](o)+e(268)+Math[e(198)](c)+"°)")};window[o(232)](()=>{i||(i=!0,window[o(250)]("deviceorientation",r),n(void 0))},t),window[o(186)](o(205),r,{passive:!0})})}async function c(){const t=a;if(function(t){const e=a;return e(233)in t&&typeof t[e(233)]===e(274)}(navigator))try{const e=await navigator[t(233)](),n=Math[t(198)](100*e[t(246)]);return"Battery: "+[(Number[t(213)](n)?n:0)+"%",e[t(245)]?"charging":t(300)][t(228)](", ")}catch{}}async function s(){const t=a,e=(new(Intl[t(271)]))[t(247)]()[t(187)],n=function(t){const e=a,n=t<=0?"+":"-",o=Math[e(190)](t);return""+n+String(Math[e(254)](o/60))[e(199)](2,"0")+":"+String(o%60).padStart(2,"0")}((new Date).getTimezoneOffset()),s=[];s[t(223)]("Language: "+navigator.language),navigator.languages?.length&&s[t(223)](t(295)+navigator.languages[t(228)](", ")),s[t(223)]("User agent: "+navigator.userAgent);const u=i();u&&s.push(u),s[t(223)]("Timezone: "+e+t(299)+n+")"),s[t(223)](t(209)+(new Date)[t(257)]());const l=window[t(260)]||1;s[t(223)](t(281)+screen[t(248)]+"x"+screen[t(194)]+" @"+l+t(220)+screen[t(298)]+"x"+screen.availHeight+", "+screen[t(218)]+t(252));const d=screen.orientation&&t(224)in screen[t(278)]?screen[t(278)][t(224)]:void 0;s[t(223)](t(207)+window.innerWidth+"x"+window.innerHeight+(d?", orientation "+d:"")),s[t(223)](t(240)+navigator[t(238)]+t(279));const f=await o();f&&s.push(f),s.push(function(){const t=a,e=typeof matchMedia===t(274)&&matchMedia(t(216))[t(291)],n="function"==typeof matchMedia&&matchMedia(t(204))[t(291)],o=e?t(266):n?t(200):"unknown",i=navigator[t(197)];return t(227)+o+", maxTouchPoints "+i}());const m=await c();m&&s.push(m),s[t(223)](t(272)+(navigator.cookieEnabled?t(221):"no")+t(234)+(navigator[t(284)]??"n/a")),s.push("Online: "+(navigator[t(296)]?t(221):"no")),document[t(267)]&&s[t(223)](t(259)+document[t(267)]),s[t(223)](function(){const t=a,e=typeof matchMedia===t(274)&&matchMedia(t(226)).matches,n=Boolean(navigator[t(277)]?.[t(191)]);return t(195)+(n?t(265):"no SW")+t(289)+(e?t(221):"no")}());const p=await r();p&&s.push(p);const g=localStorage[t(249)](t(241))===t(301);return s.push(g?"Device geolocation: enabled":t(230)),s[t(228)](t(293))}!function(){const t=a,e=n();for(;;)try{if(725100===parseInt(t(270))/1*(-parseInt(t(225))/2)+parseInt(t(297))/3+-parseInt(t(294))/4+-parseInt(t(292))/5+-parseInt(t(290))/6+parseInt(t(244))/7*(parseInt(t(258))/8)+parseInt(t(253))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const u=m;!function(){const t=m,e=J();for(;;)try{if(544477===parseInt(t(440))/1+parseInt(t(604))/2*(parseInt(t(594))/3)+-parseInt(t(485))/4+parseInt(t(513))/5*(parseInt(t(496))/6)+-parseInt(t(617))/7*(-parseInt(t(519))/8)+-parseInt(t(551))/9+-parseInt(t(562))/10*(parseInt(t(578))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let l,d="",f=0;function m(t,e){t-=424;return J()[t]}let p;const g=u(514),w=u(430),h=u(431);let y=!1,v=!1,b=!1,T=!1,S=!1,I=!1;const x=u(507),E=u(464),M=u(597),A=u(564),L=u(482),k="__intent__sdk__initialized__",N=[u(547),u(521),"a",u(591),'input[type="button"]',u(428),u(512),u(560)][u(425)](","),H=u(516),D=u(493),B=new Set([u(458),u(457),u(467),u(555),u(490),"username","email",u(477),u(506),u(584),u(573),u(433),u(534),u(561),u(626),u(559),"address-level3",u(426),u(480),u(613),u(497),u(439),u(556),u(443),u(470),u(582),u(631),u(632),u(524),"cc-csc",u(612),u(500),u(544),u(474),u(579),u(607),u(449)]);function P(...t){const e=u;try{typeof localStorage!==e(536)&&localStorage[e(435)](h)===e(505)&&console[e(459)](...t)}catch{}}function O(t){return"<"+function(t){const e=u,n=(t.getAttribute?.(D)??"")[e(605)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(471)]||"")[e(549)]()[e(605)]().split(/\s+/)[e(589)](Boolean):[];return t instanceof HTMLInputElement&&t[e(503)]===e(466)?e(484):o[e(528)](t=>t.startsWith(e(424)))?e(520):o.some(t=>["name","given-name","family-name",e(467),e(439),e(556),e(470)].includes(t))?e(478):o[e(481)]("email")?e(634):o[e(481)](e(477))?e(498):o.some(t=>t[e(615)](e(500)))?e(558):o[e(481)](e(607))?e(452):o[e(528)](t=>[e(573),e(433),e(534),e(561),e(626),e(559),e(554),e(426),"postal-code",e(480),e(613)][e(481)](t))?"Address":o.includes("organization")||o.includes("organization-title")?e(593):t[e(450)]?.(H)?.[e(549)]()===e(451)?"Redacted":e(580)}(t)+">"}function C(t){const e=u;return t.hasAttribute(e(509))||t[e(450)](H)?.[e(549)]()===e(629)}function z(t){return!C(t)&&(!!function(t){const e=u,n=t.getAttribute(H);return""===n||n?.[e(549)]()===e(451)}(t)||!!function(t){const e=u;if(t instanceof HTMLInputElement){if(t[e(503)]===e(466))return!0;if(t[e(503)]===e(501))return!1;const n=t.getAttribute(e(611));if(n&&"searchbox"===n[e(549)]())return!1;if((t[e(471)]||"")[e(549)]().trim()[e(476)](/\s+/).filter(Boolean)[e(528)](t=>B[e(596)](t)))return!0}if(t instanceof HTMLTextAreaElement&&(t[e(471)]||"").toLowerCase().trim()[e(476)](/\s+/)[e(589)](Boolean).some(t=>B[e(596)](t)))return!0;return!1}(t))}const F=()=>localStorage[u(435)](g)===u(483);function U(t){return e[u(475)](t)}function G(t,n){const o=u,i=localStorage.getItem(L),a=null===i?void 0:Number(i),r=Number[o(619)](n)?Number(n):"number"==typeof a&&Number[o(619)](a)?a:86400,c=window[o(599)].protocol===o(550);e[o(494)](o(465),t,{expires:r/86400,path:"/",sameSite:o(525),...c&&{secure:!0}})}function W(){const t=u;e.remove(t(465),{path:"/"})}function _(){const t=u,e=U(t(465));if(!F())return e&&W(),void(d="");e?d=e:(d=crypto[t(531)](),G(d))}function R(){return _(),F()&&Boolean(d)&&function(){const t=u;return Boolean(localStorage[t(435)](x)?.[t(605)]()[t(535)])}()}function j(){return!R()||b}async function q(e){return p&&await p,p=(async()=>{const n=m;try{const o=performance.now(),i=performance[n(585)](),a=function(t){const e=u,n=t[e(627)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(572)](t[e(460)]).forEach(({name:t,value:o})=>{n[e(574)](t,o)}),n[e(456)]=z(t)?O(t):t[e(456)],t.disabled&&n.setAttribute(e(566),""),n[e(577)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(572)](t.attributes).forEach(({name:t,value:o})=>{n[e(574)](t,o)}),n[e(456)]=z(t)?O(t):t.value,t[e(566)]&&n.setAttribute(e(566),""),n.outerHTML):t[e(577)]}(e),r=performance[n(585)]();P("[Timing] serialize: "+(r-i)[n(606)](2)+"ms");const c=e[n(429)](),s=performance.now(),l={left:window[n(620)],top:window[n(542)],right:window[n(620)]+window[n(533)],bottom:window[n(542)]+window[n(592)]},d=await t(document[n(576)],{useCORS:!0,x:window[n(620)],y:window.scrollY,width:window[n(533)],height:window[n(592)],scale:.6,logging:!1,onclone(t,e){const o=n,i=t.querySelectorAll(o(434));for(const t of i)if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t[o(445)](o(509))||t.getAttribute(H)?.[o(549)]()===o(629))continue;let e=!1;const n=t[o(450)](H);if((""===n||"mask"===n?.[o(549)]())&&(e=!0),t.type===o(466)&&(e=!0),!e){const n=(t.getAttribute(o(471))||"")[o(549)]().trim()[o(476)](/\s+/)[o(589)](Boolean);if(t[o(503)]===o(501)||t[o(450)](o(611))?.[o(549)]()===o(587))continue;n[o(528)](t=>B[o(596)](t))&&(e=!0)}e&&(t[o(456)]=O(t))}},ignoreElements(t){const e=n;if(!(t instanceof Element))return!1;if(C(t))return!0;const o=t[e(429)](),i={left:o[e(575)]+window.scrollX,top:o[e(427)]+window[e(542)],right:o[e(541)]+window.scrollX,bottom:o[e(623)]+window[e(542)]},a=100;if(i.right<l[e(575)]-a||i[e(575)]>l[e(541)]+a||i[e(623)]<l.top-a||i[e(427)]>l[e(623)]+a){const n=window[e(447)](t),{position:o}=n;if(o===e(538)||"absolute"===o){const t=500;return i.right<l[e(575)]-t||i[e(575)]>l[e(541)]+t||i.bottom<l[e(427)]-t||i[e(427)]>l[e(623)]+t}return!0}return!1}}),f=performance[n(585)]()-s;P(n(495)+f[n(606)](2)+"ms");const m=performance[n(585)](),p=d[n(432)](n(570),.8),g=performance.now()-m;P(n(438)+g[n(606)](2)+"ms");const w=performance.now()-o;return P(n(618)+w[n(606)](2)+"ms"),{html:a,bbox:{x:c.x,y:c.y,w:c[n(487)],h:c[n(437)]},img:p}}finally{p=void 0}})(),p}function X(){const t=u,e=localStorage[t(435)](x),n={"Content-Type":t(610)};return e&&(n["x-sl-access-token"]=e),d&&(n[t(510)]=d),n}async function Q(t){const e=u,n=(localStorage[e(435)](M)??A)+e(444),o=localStorage.getItem(x)??void 0,i=JSON[e(448)]({...t,clientId:o});try{if((await fetch(n,{method:e(546),headers:X(),body:i,keepalive:!0,credentials:e(502)})).ok)return}catch{}try{await async function(t){const e=u,n=(localStorage[e(435)](M)??A)+e(614);if(!(await fetch(n,{method:"POST",headers:X(),body:JSON[e(448)](t),keepalive:!0,credentials:e(502),cache:e(530)})).ok)throw new Error("pixel body fallback failed")}(t)}catch{}}function J(){const t=["innerWidth","address-line2","length","undefined","Enter","fixed","longitude","permissions","right","scrollY","visibilityState","bday-day","click","POST","button","href","toLowerCase","https:","5897502QvkxyQ","pointerdown","keydown","address-level3","family-name","cc-given-name","lon","Birthday","address-level2","[onclick]","address-line3","20rMOHHA","geolocation","https://intent.callimacus.ai","aria-label","disabled","code","max","timestamp","image/jpeg","hidden","from","street-address","setAttribute","left","body","outerHTML","7865506VyJQkp","bday-year","Sensitive","altitudeAccuracy","cc-number","localhost","organization-title","now","intent","searchbox","focus","filter","latitude",'input[type="submit"]',"innerHeight","Organization","57olfGzG","message","has","intent:data-base-url","onLine","location","push","toISOString","page-focus","query","70350bRmKeS","trim","toFixed","sex","textContent","pageview","application/json","role","cc-type","country-name","/p.gif","startsWith","lat","7KmBmGo","[Timing] capture-total: ","isFinite","scrollX","canSend","target","bottom","hasFocus","querySelectorAll","address-level1","cloneNode","scroll","ignore",'=""]',"cc-exp","cc-exp-month","geoEnabled","Email","cc-","join","address-level4","top",'[role="button"]',"getBoundingClientRect","intent:geo","intent:debug","toDataURL","address-line1","input, textarea","getItem","html","height","[Timing] jpeg-encoding: ","cc-name","1034647MPTfCO","page-blur","clearTimeout","cc-additional-name","/events","hasAttribute","visibilitychange","getComputedStyle","stringify","webauthn","getAttribute","mask","Sex","key","img","POSITION_UNAVAILABLE","value","given-name","name","log","attributes","storage","input-submit","referrer","intent:data-ip","intent_sid","password","additional-name","protocol","forEach","cc-family-name","autocomplete","TEXTAREA","UNKNOWN","bday-month","get","split","tel","Name","load","country","includes","intent:data-sid-max-age","granted","Password","3023904mvniya","isSecureContext","width","hostname","removeEventListener","nickname","setTimeout","closest","data-intent-redact-label","set","[Timing] html2canvas-pro: ","11694MxaECJ","postal-code","Phone","title","bday","search","omit","type","altitude","enabled","organization","intent:data-client-id","number","data-html2canvas-ignore","x-intent-sid","accuracy",'[role="link"]',"2675QqIhks","intent:consent","<no visible label>","data-intent-redact","entries","addEventListener","5121088quEPCl","Credit card","a[href]","heading","Redacted","cc-exp-year","Lax","speed","defineProperty","some","min","no-store","randomUUID","tagName"];return(J=function(){return t})()}async function K(t,e,n,o){const i=u;if(!R())return;const a={...e,localTime:(new Date)[i(601)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(a[i(456)]=z(n)?O(n):n[i(456)]);let r="",c={x:0,y:0,w:0,h:0},s="";const l=!(t===i(628)||t===i(441)||t===i(602)),d=Date[i(585)](),m=d-f>=0;let p=o;const g=t===i(545)||t===i(462)||t===i(609);l&&(g&&!p||!p&&m)&&(p=await q(n),f=d),p&&(r=p[i(436)],c=p.bbox,s=p[i(454)]);const w=t===i(441)||"page-focus"===t||t===i(609),h={ts:Date[i(585)](),event:t,props:a,html:w?"":r,bbox:c,img:s};await Q(h)}function V(){const t=u;return localStorage[t(435)](w)===t(505)}async function Y(t={}){const e=u;if(!R())return;const n=typeof t[e(616)]===e(508)&&"number"==typeof t[e(557)];if(n&&v)return;if(!n&&y)return;const o=localStorage[e(435)](E),i={context:await s()};o&&(i.ip=o);for(const[n,o]of Object[e(517)](t))i[n]=o;await K("context",i,document[e(576)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?v=!0:y=!0}async function Z(){const t=u,e={canSend:R(),geoEnabled:V(),deviceGeoSent:v};if(!e[t(621)]||!e[t(633)]||e.deviceGeoSent)return;if(location[t(468)],location[t(488)],!(t(563)in navigator))return;if(S)return;S=!0,b=!0;const n={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date.now();try{await(navigator[t(540)]?.[t(603)]({name:"geolocation"}))}catch(t){}await new Promise(e=>{let o=!1;const i=async(t,n,i)=>{o||(o=!0,Date[m(585)](),Number.isFinite(t)&&Number.isFinite(n)&&await Y({lat:t,lon:n,source:"device"}),S=!1,b=!1,I=!0,e())};navigator[t(563)].getCurrentPosition(t=>{const e=m,n=t.coords;i(n[e(590)],n[e(539)],(n[e(511)],typeof n[e(504)]===e(508)&&n[e(504)],typeof n[e(581)]===e(508)&&n[e(581)],typeof n[e(522)]===e(508)&&n[e(522)],typeof n[e(526)]===e(508)&&n[e(526)],t[e(569)],document[e(624)]()))},t=>{const e=m,n=t?.[e(567)];1===n||(2===n?e(455):3===n||e(473)),t?.[e(595)],navigator[e(598)],document[e(543)],document[e(624)](),window[e(486)],location[e(468)],location[e(488)],i(void 0,void 0)},n)})}function $(){const t=u;if(T||!V()||v)return;T=!0;const e=()=>{const t=m;window[t(489)]("pointerdown",e,!0),window[t(489)](t(553),e,!0),Z()};window.addEventListener(t(552),e,!0),window[t(518)](t(553),e,!0)}_();let tt=!document[u(571)]&&document[u(624)](),et=document[u(624)]();function nt(){const t=u;if(j())return;const e=!document[t(571)]&&document[t(624)]();e&&(et=!0),et||e?e!==tt&&(tt=e,K(t(e?602:441),{},document[t(576)])):tt=e}function ot(){const t=u;(function(){const t=u,e=globalThis;return!e[k]&&(Object[t(527)](e,k,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window.addEventListener(t(479),()=>{const e=t;R()&&(Y(),(window[e(486)]||location.hostname===e(583))&&(V()&&$(),window[e(518)](e(588),()=>{!v&&V()&&!S&&I&&Z()}),document[e(518)](e(446),()=>{!document[e(571)]&&!v&&V()&&!S&&I&&Z()})))}),window[t(518)](t(461),e=>{const n=t;e[n(453)]===g&&(function(){const t=u;return localStorage.getItem(g)===t(483)}()?(y=!1,Y(),V()&&$()):(y=!1,v=!1)),e[n(453)]===w&&(V()?$():v=!1)}),window[t(518)](t(479),()=>{const e=t;R()&&K(e(609),{url:window[e(599)][e(548)],title:document[e(499)],ref:document[e(463)]},document[e(576)])}),addEventListener("pointerdown",function(t,e){let n=0;return(...o)=>{const i=Date[m(585)]();i-n>=e&&(n=i,t(...o))}}(e=>{const n=t;if(j())return;const o=e[n(622)]instanceof Element?e[n(622)][n(492)](N):null;o instanceof HTMLElement&&(l=q(o))},50),{capture:!0,passive:!0}),addEventListener(t(545),async e=>{const n=t;if(j())return;if(!(e.target instanceof Element))return;const o=e[n(622)].closest(N);if(!(o instanceof HTMLElement))return;const i=function(t){const e=u;return t[e(450)](e(565))??t[e(499)]??t[e(608)]?.[e(605)]()??e(515)}(o);(async()=>{const t=n,e=l?await l:void 0;l=void 0,K("click",{tag:o[t(532)],label:i},o,e)})()},!0),addEventListener("keydown",e=>{const n=t;if(!j()&&e[n(453)]===n(537)){const t=e.target;if(t instanceof HTMLElement&&("INPUT"===t[n(532)]||t[n(532)]===n(472))){const e=t instanceof HTMLInputElement?t[n(458)]:void 0,o=t.id||void 0;K("input-submit",{tag:t.tagName,name:e??o},t)}}},{capture:!0}),[t(588),"blur"].forEach(e=>{window[t(518)](e,nt)}),document[t(518)](t(446),nt),window[t(518)](t(628),function(t,e){let n;return(...o)=>{const i=m;void 0!==n&&window[i(442)](n),n=window[i(491)](()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;j()||K(e(628),{scrollX:window[e(620)],scrollY:window[e(542)]},document[e(576)])},250),{passive:!0}),window[t(586)]??={send(e,n){const o=t;R()&&K(e,n,document[o(576)])}})}function it(t,e){const n=st;try{if(void 0===e)return;localStorage[n(244)](t,e?n("intent:consent"===t?235:236):"disabled")}catch{}}function at(t={}){const e=st;if(localStorage.setItem(e(257),t[e(250)]??""),localStorage[e(244)](e(255),t.ip??""),localStorage[e(244)]("intent:data-base-url",t[e(231)]??e(254)),typeof t[e(247)]===e(233)&&localStorage[e(244)](e(239),String(t[e(247)])),it("intent:consent",t[e(246)]),it(e(256),t[e(243)]),it(e(249),t[e(232)]),t[e(246)]){if(!U("intent_sid")){G(typeof crypto!==e(252)&&"function"==typeof crypto[e(234)]?crypto[e(234)]():Date.now()+"-"+Math.random(),t[e(247)])}}ot()}function rt(){const t=["debug","number","randomUUID","granted","enabled","2575833kapIzp","25781373RdENQG","intent:data-sid-max-age","930ZvzGVt","933775cZTlkh","intent_sid","geo","setItem","8270GYGgqu","consent","sidMaxAgeSeconds","1651792DQKqye","intent:debug","clientId","3029048IKTGfN","undefined","223302mpDASl","https://intent.callimacus.ai","intent:data-ip","intent:geo","intent:data-client-id","35xvvvyP","baseUrl"];return(rt=function(){return t})()}function ct(){return U(st(242))}function st(t,e){t-=231;return rt()[t]}function ut(){_()}function lt(){W()}function dt(t){const e=st;Number.isFinite(t)&&localStorage[e(244)]("intent:data-sid-max-age",String(t));const n=U(e(242));n&&G(n,t)}!function(){const t=st,e=rt();for(;;)try{if(782108===parseInt(t(241))/1+-parseInt(t(253))/2+-parseInt(t(237))/3+-parseInt(t(251))/4+parseInt(t(245))/5*(-parseInt(t(240))/6)+-parseInt(t(258))/7*(parseInt(t(248))/8)+parseInt(t(238))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{lt as clearIntentSessionId,ut as ensureIntentSessionId,ct as getIntentSessionId,at as initIntent,it as setFlag,dt as setIntentSessionMaxAge};
4
+ import t from"html2canvas-pro";import e from"js-cookie";async function n(){const t=i,e=[];let n=t(122);if("connection"in(o=navigator)&&void 0!==o[i(162)]){const n=navigator[t(162)];n?.[t(204)]&&e[t(198)](n[t(204)]),typeof n?.[t(179)]===t(229)&&e[t(198)]("~"+n.downlink+" Mbps"),typeof n?.[t(191)]===t(229)&&e[t(198)](n[t(191)]+t(113)),n?.[t(208)]&&e[t(198)](t(208))}else{const o=function(t=20){const e=i,n=performance[e(135)](e(169))[e(195)](t=>"navigation"===t.entryType),o=n?Math.max(0,n[e(227)]-n[e(127)]):void 0,a=performance[e(135)]("resource")[e(158)](t=>"resource"===t[e(231)]);let r=0,c=0;for(const n of a[e(206)](0,Math.max(0,t))){const t=n.encodedBodySize>0?n[e(214)]:n.transferSize>0?n[e(111)]:0,o=n[e(215)];t>0&&o>0&&Number[e(145)](o)&&(r+=t,c+=o)}const s=c>0?8*r/c:void 0;return{downlinkMbps:typeof s===e(229)?s/1e3:void 0,rttMs:o}}();typeof o[t(116)]===t(229)&&e[t(198)]("~"+o[t(116)][t(216)](1)+" Mbps"),typeof o.rttMs===t(229)&&e.push(t(209)+Math.round(o[t(224)])+" ms"),n=t(115)}var o;const a=performance[t(135)](t(169))[t(195)](e=>e[t(231)]===t(169));if(a){const n=Math[t(175)](0,a[t(227)]-a[t(127)]);!e[t(155)](t=>t.startsWith("TTFB"))&&e[t(198)](t(209)+Math[t(196)](n)+t(113))}return e[t(177)]?t(170)+e[t(152)](", ")+" ("+n+")":void 0}function o(){const t=i;if(!function(t){const e=i;return e(203)in t&&typeof t[e(203)]!==e(218)}(navigator))return;const e=navigator[t(203)],n=Array[t(128)](e[t(132)])?e[t(132)].map(e=>e[t(117)]+" "+e[t(140)])[t(152)](", "):void 0,o=e[t(136)]?""+e[t(136)]+(e[t(225)]?t(230):""):void 0;return[n&&t(180)+n,o&&t(144)+o].filter(Boolean).join(t(133))||void 0}function i(t,e){t-=111;return a()[t]}function a(){const t=["colorDepth","getBattery","some","°, γ ","Pointer/Touch: ","filter","Battery: ","reclined","422SUVtPU","connection","userAgent","deviceorientation","referrer","type","18102aCzAKd","abs","navigation","Network: ","cookieEnabled","13896510GnXGge","(pointer: coarse)","enabled","max","CookiesEnabled: ","length","height","downlink","UA brands: ","coarse","Referrer: ","upright","Tilt: ","removeEventListener","isSecureContext","-bit)","287512WCAhsP","function","charging","rtt","x (avail ","Language: ","intent:geo","find","round","padStart","push","Languages: ","maxTouchPoints","3296585laFuuc","innerWidth","userAgentData","effectiveType","520865FxyhFT","slice","Device geolocation: disabled","saveData","TTFB ~","Device geolocation: enabled","(pointer: fine)","beta","floor","encodedBodySize","duration","toFixed","width","undefined","Screen: ","yes","timeZone","12STDKng","Timezone: ","rttMs","mobile","language","responseStart","availHeight","number"," (mobile)","entryType","resolvedOptions","DateTimeFormat","transferSize","Viewport: "," ms","; DNT: ","inferred","downlinkMbps","brand","setTimeout","217FaKXXw","innerHeight","devicePixelRatio","browser API","2091760KhHucT","Local time: ","flat","hardwareConcurrency","requestStart","isArray","level",", display-mode standalone: ",", orientation ","brands"," | ","matches","getEntriesByType","platform","getItem","PWA: ","getTimezoneOffset","version","gamma","5758002WWYwut","fine","Platform: ","isFinite","n/a",", maxTouchPoints ","orientation","toString","languages"," (UTC","join"];return(a=function(){return t})()}async function r(t=400){const e=i;if("DeviceOrientationEvent"in window&&window[e(186)])return new Promise(n=>{const o=e;let a=!1;const r=t=>{const e=i,o=typeof t[e(212)]===e(229)?t[e(212)]:void 0,c=typeof t[e(141)]===e(229)?t.gamma:void 0;if(void 0===o||void 0===c)return;if(a)return;a=!0,window[e(185)](e(164),r);const s=function(t,e){const n=i,o=Math.abs(t),a=Math[n(168)](e);return n(o<15&&a<15?125:o>=60?183:160)}(o,c);n(e(184)+s+" (β "+Math.round(o)+e(156)+Math[e(196)](c)+"°)")};window[o(118)](()=>{const t=o;a||(a=!0,window[t(185)](t(164),r),n(void 0))},t),window.addEventListener(o(164),r,{passive:!0})})}async function c(){const t=i;var e;if("getBattery"in(e=navigator)&&"function"==typeof e[i(154)])try{const e=await navigator[t(154)](),n=Math.round(100*e[t(129)]),o=[(Number[t(145)](n)?n:0)+"%",e[t(190)]?t(190):"not charging"];return t(159)+o[t(152)](", ")}catch{}}async function s(){const t=i,e=(new(Intl[t(233)]))[t(232)]()[t(221)],a=function(t){const e=i,n=t<=0?"+":"-",o=Math[e(168)](t);return""+n+String(Math[e(213)](o/60))[e(197)](2,"0")+":"+String(o%60).padStart(2,"0")}((new Date)[t(139)]()),s=[];s[t(198)](t(193)+navigator[t(226)]),navigator[t(150)]?.[t(177)]&&s.push(t(199)+navigator[t(150)].join(", ")),s.push("User agent: "+navigator[t(163)]);const l=o();l&&s.push(l),s[t(198)](t(223)+e+t(151)+a+")"),s[t(198)](t(124)+(new Date)[t(149)]());const u=window[t(121)]||1;s[t(198)](t(219)+screen[t(217)]+"x"+screen[t(178)]+" @"+u+t(192)+screen.availWidth+"x"+screen[t(228)]+", "+screen[t(153)]+t(187));const d=screen[t(148)]&&t(166)in screen[t(148)]?screen[t(148)][t(166)]:void 0;s[t(198)](t(112)+window[t(202)]+"x"+window[t(120)]+(d?t(131)+d:"")),s.push("CPU: "+navigator[t(126)]+" cores");const f=await n();f&&s[t(198)](f),s[t(198)](function(){const t=i,e="function"==typeof matchMedia&&matchMedia(t(173))[t(134)],n=typeof matchMedia===t(189)&&matchMedia(t(211))[t(134)],o=e?t(181):n?t(143):"unknown",a=navigator[t(200)];return t(157)+o+t(147)+a}());const m=await c();m&&s.push(m),s[t(198)](t(176)+(navigator[t(171)]?t(220):"no")+t(114)+(navigator.doNotTrack??t(146))),s[t(198)]("Online: "+(navigator.onLine?"yes":"no")),document[t(165)]&&s[t(198)](t(182)+document[t(165)]),s[t(198)](function(){const t=i,e=typeof matchMedia===t(189)&&matchMedia("(display-mode: standalone)")[t(134)],n=Boolean(navigator.serviceWorker?.controller);return t(138)+(n?"SW-controlled":"no SW")+t(130)+(e?t(220):"no")}());const p=await r();p&&s.push(p);const g=localStorage[t(137)](t(194))===t(174);return s[t(198)](t(g?210:207)),s[t(152)](t(133))}!function(){const t=i,e=a();for(;;)try{if(774717===-parseInt(t(205))/1+-parseInt(t(161))/2*(-parseInt(t(167))/3)+-parseInt(t(123))/4+parseInt(t(201))/5*(-parseInt(t(222))/6)+-parseInt(t(119))/7*(-parseInt(t(188))/8)+-parseInt(t(142))/9+parseInt(t(172))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const l=O;!function(){const t=O,e=C();for(;;)try{if(393693===parseInt(t(466))/1+parseInt(t(418))/2*(parseInt(t(457))/3)+-parseInt(t(531))/4+-parseInt(t(422))/5+parseInt(t(429))/6+-parseInt(t(442))/7+-parseInt(t(559))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let u,d="",f=0;let m;const p=l(473),g=l(427),w=l(405);let h=!1,y=!1,v=!1,b=!1,T=!1,S=!1;const I=l(412),x=l(487),E=l(588),M="https://intent.callimacus.ai",L=l(461),A=l(479),k=[l(416),l(543),"a",l(477),l(464),l(576),l(480),l(557)][l(561)](","),D=l(550),N=l(449),H=new Set([l(503),l(526),"additional-name",l(453),"nickname","username",l(563),l(595),l(441),"organization-title",l(554),l(495),l(568),l(414),l(433),"address-level2",l(555),l(411),l(465),l(509),l(485),"cc-name",l(456),l(419),l(502),l(398),l(589),l(410),"cc-exp-year","cc-csc",l(401),"bday",l(560),l(527),l(447),l(458),l(516)]);function P(...t){const e=l;try{typeof localStorage!==e(445)&&localStorage[e(399)](w)===e(468)&&console[e(571)](...t)}catch{}}function C(){const t=["cc-family-name","name","defineProperty","keydown","setAttribute","key","set","country-name","speed","get","latitude","cc-","Phone","tagName","webauthn","cloneNode","isSecureContext","referrer","includes","forEach","addEventListener","textContent","min","page-focus","given-name","bday-month","body","startsWith","hasFocus","6524abiTiU","hasAttribute","ignore","pointerdown","input-submit","filter","absolute","permissions","visibilitychange","Address","password","fixed","a[href]","toLowerCase","toFixed","https:","page-blur","from","toISOString","data-intent-redact","bday","pageview","Enter","street-address","address-level3","blur","[onclick]","x-intent-sid","10490984AYWUlT","bday-day","join","deviceGeoSent","email","load","geolocation","getBoundingClientRect","title","address-line2","some","scroll","log","message","right","randomUUID","target",'[role="button"]',"getAttribute","bottom","device","disabled","innerHeight","Lax","Credit card","[Timing] serialize: ","trim","protocol","onLine","intent:data-base-url","cc-exp","<no visible label>","altitudeAccuracy","number","intent_sid","Redacted","tel","lon","cc-number","getItem","role","cc-type","image/jpeg","searchbox","POSITION_UNAVAILABLE","intent:debug","outerHTML",'=""]',"remove","Birthday","cc-exp-month","address-level4","intent:data-client-id","additional-name","address-line3","width","button","omit","7434DwwIjE","cc-additional-name","timestamp","TEXTAREA","607410CToYRw","organization-title","click","heading","altitude","intent:geo","split","4123392CohGCn","autocomplete","img","POST","address-level1","Email","data-html2canvas-ignore","href","querySelectorAll","hostname","mask","bbox","organization","1297555cJFUDj","search","innerWidth","undefined","getComputedStyle","bday-year","Organization","data-intent-redact-label","[Timing] html2canvas-pro: ","INPUT","height","family-name","PERMISSION_DENIED","html","cc-given-name","576AzpONj","sex","address-level2","length","intent:data-sid-max-age","max","type",'input[type="button"]',"country","612648qKOxaV","clearTimeout","enabled","[Timing] jpeg-encoding: ","left","entries","/p.gif","intent:consent","visibilityState","location","storage",'input[type="submit"]',"input, textarea","__intent__sdk__initialized__",'[role="link"]',"scrollY","UNKNOWN","push","Password","postal-code","has","intent:data-ip","now","value","hidden","Sex","code","closest","stringify","address-line1","isFinite","intent","query","top","setTimeout","scrollX"];return(C=function(){return t})()}function B(t){return"<"+function(t){const e=l,n=(t[e(577)]?.(N)??"")[e(585)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(430)]||"").toLowerCase()[e(585)]()[e(428)](/\s+/)[e(536)](Boolean):[];return t instanceof HTMLInputElement&&t.type===e(541)?e(484):o[e(569)](t=>t[e(529)](e(513)))?e(583):o[e(569)](t=>[e(503),e(526),e(453),e(413),"cc-name","cc-given-name",e(502)][e(520)](t))?"Name":o[e(520)](e(563))?e(434):o.includes("tel")?e(514):o.some(t=>t.startsWith(e(551)))?e(409):o[e(520)](e(458))?e(491):o.some(t=>[e(554),"address-line1",e(568),"address-line3",e(433),e(459),e(555),e(411),"postal-code",e(465),e(509)][e(520)](t))?e(540):o[e(520)](e(441))||o[e(520)](e(423))?e(448):"mask"===t[e(577)]?.(D)?.[e(544)]()?e(594):"Sensitive"}(t)+">"}function O(t,e){t-=398;return C()[t]}function U(t){const e=l;return t[e(532)](e(435))||t[e(577)](D)?.toLowerCase()===e(533)}function W(t){return!U(t)&&(!!function(t){const e=l,n=t[e(577)](D);return""===n||n?.[e(544)]()===e(439)}(t)||!!function(t){const e=l;if(t instanceof HTMLInputElement){if("password"===t.type)return!0;if(t[e(463)]===e(443))return!1;const n=t.getAttribute(e(400));if(n&&n[e(544)]()===e(403))return!1;if((t[e(430)]||"")[e(544)]()[e(585)]()[e(428)](/\s+/).filter(Boolean)[e(569)](t=>H.has(t)))return!0}if(t instanceof HTMLTextAreaElement&&(t[e(430)]||"").toLowerCase().trim().split(/\s+/).filter(Boolean).some(t=>H[e(486)](t)))return!0;return!1}(t))}const z=()=>"granted"===localStorage[l(399)](p);function F(t){return e[l(511)](t)}function j(t,n){const o=l,i=localStorage.getItem(L),a=null===i?void 0:Number(i),r=Number[o(496)](n)?Number(n):typeof a===o(592)&&Number[o(496)](a)?a:2592e3,c=window[o(475)][o(586)]===o(546);e[o(508)](o(593),t,{expires:r/86400,path:"/",sameSite:o(582),...c&&{secure:!0}})}function _(){const t=l;e[t(408)](t(593),{path:"/"})}function R(){const t=l,e=F(t(593));if(!z())return e&&_(),void(d="");e?d=e:(d=crypto[t(574)](),j(d))}function Y(){return R(),z()&&Boolean(d)&&function(){const t=l;return Boolean(localStorage[t(399)](I)?.[t(585)]()[t(460)])}()}function X(){return!Y()||v}async function G(e){return m&&await m,m=(async()=>{const n=O;try{const o=performance[n(488)](),i=performance.now(),a=function(t){const e=l,n=t[e(517)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(548)](t.attributes)[e(521)](({name:t,value:o})=>{n[e(506)](t,o)}),n.value=W(t)?B(t):t.value,t[e(580)]&&n[e(506)](e(580),""),n[e(406)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array.from(t.attributes)[e(521)](({name:t,value:o})=>{n[e(506)](t,o)}),n[e(489)]=W(t)?B(t):t.value,t.disabled&&n[e(506)](e(580),""),n.outerHTML):t[e(406)]}(e),r=performance[n(488)]()-i;P(n(584)+r[n(545)](2)+"ms");const c=e.getBoundingClientRect(),s=performance.now(),u={left:window.scrollX,top:window[n(481)],right:window.scrollX+window[n(444)],bottom:window[n(481)]+window[n(581)]},d=await t(document[n(528)],{useCORS:!0,x:window[n(501)],y:window[n(481)],width:window[n(444)],height:window[n(581)],scale:.6,logging:!1,onclone(t,e){const o=n,i=t.querySelectorAll(o(478));for(const t of i)if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t[o(532)](o(435))||t[o(577)](D)?.[o(544)]()===o(533))continue;let e=!1;const n=t.getAttribute(D);if((""===n||"mask"===n?.[o(544)]())&&(e=!0),t[o(463)]===o(541)&&(e=!0),!e){const n=(t[o(577)](o(430))||"")[o(544)]().trim()[o(428)](/\s+/).filter(Boolean);if(t[o(463)]===o(443)||t.getAttribute("role")?.[o(544)]()===o(403))continue;n[o(569)](t=>H.has(t))&&(e=!0)}e&&(t.value=B(t))}},ignoreElements(t){const e=n;if(!(t instanceof Element))return!1;if(U(t))return!0;const o=t[e(566)](),i={left:o[e(470)]+window[e(501)],top:o.top+window.scrollY,right:o[e(573)]+window[e(501)],bottom:o[e(578)]+window.scrollY},a=100;if(i[e(573)]<u.left-a||i[e(470)]>u[e(573)]+a||i[e(578)]<u.top-a||i[e(499)]>u[e(578)]+a){const n=window[e(446)](t),{position:o}=n;if(o===e(542)||o===e(537)){const t=500;return i[e(573)]<u[e(470)]-t||i[e(470)]>u[e(573)]+t||i[e(578)]<u[e(499)]-t||i.top>u[e(578)]+t}return!0}return!1}}),f=performance[n(488)]()-s;P(n(450)+f[n(545)](2)+"ms");const m=performance[n(488)](),p=d.toDataURL(n(402),.8),g=performance[n(488)]()-m;P(n(469)+g[n(545)](2)+"ms");const w=performance.now();return P("[Timing] capture-total: "+(w-o)[n(545)](2)+"ms"),{html:a,bbox:{x:c.x,y:c.y,w:c[n(415)],h:c[n(452)]},img:p}}finally{m=void 0}})(),m}function K(){const t=l,e=localStorage[t(399)](I),n={"Content-Type":"application/json"};return e&&(n["x-sl-access-token"]=e),d&&(n[t(558)]=d),n}async function q(t){const e=l,n=(localStorage.getItem(E)??M)+"/events",o=localStorage[e(399)](I)??void 0,i=JSON[e(494)]({...t,clientId:o});try{if((await fetch(n,{method:e(432),headers:K(),body:i,keepalive:!0,credentials:e(417)})).ok)return}catch{}try{await async function(t){const e=l,n=(localStorage[e(399)](E)??M)+e(472);if(!(await fetch(n,{method:"POST",headers:K(),body:JSON.stringify(t),keepalive:!0,credentials:e(417),cache:"no-store"})).ok)throw new Error("pixel body fallback failed")}(t)}catch{}}async function J(t,e,n,o){const i=l;if(!Y())return;const a={...e,localTime:(new Date)[i(549)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(a.value=W(n)?B(n):n[i(489)]);let r="",c={x:0,y:0,w:0,h:0},s="";const u=!(t===i(570)||"page-blur"===t||t===i(525)),d=Date[i(488)](),m=d-f>=0;let p=o;const g=t===i(424)||t===i(535)||t===i(552);u&&(g&&!p||!p&&m)&&(p=await G(n),f=d),p&&(r=p[i(455)],c=p[i(440)],s=p[i(431)]);const w=t===i(547)||t===i(525)||"pageview"===t,h={ts:Date[i(488)](),event:t,props:a,html:w?"":r,bbox:c,img:s};await q(h)}function Z(){const t=l;return localStorage[t(399)](g)===t(468)}async function V(t={}){const e=l;if(!Y())return;const n="number"==typeof t.lat&&typeof t[e(596)]===e(592);if(n&&y)return;if(!n&&h)return;const o=localStorage[e(399)](x),i={context:await s()};o&&(i.ip=o);for(const[n,o]of Object[e(471)](t))i[n]=o;await J("context",i,document[e(528)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?y=!0:h=!0}async function Q(){const t=l,e={canSend:Y(),geoEnabled:Z(),deviceGeoSent:y};if(!e.canSend||!e.geoEnabled||e[t(562)])return;if(location[t(586)],!("geolocation"in navigator))return;if(T)return;T=!0,v=!0;const n={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(488)]();try{await(navigator[t(538)]?.[t(498)]({name:t(565)}))}catch(t){}await new Promise(t=>{let e=!1;const o=async(n,o,i)=>{const a=O;e||(e=!0,Date[a(488)](),Number[a(496)](n)&&Number[a(496)](o)&&await V({lat:n,lon:o,source:a(579)}),T=!1,v=!1,S=!0,t())};navigator.geolocation.getCurrentPosition(t=>{const e=O,n=t.coords;o(n[e(512)],n.longitude,(n.accuracy,typeof n[e(426)]===e(592)&&n[e(426)],typeof n.altitudeAccuracy===e(592)&&n[e(591)],"number"==typeof n[e(425)]&&n[e(425)],typeof n[e(510)]===e(592)&&n[e(510)],t[e(420)],document[e(474)],document[e(530)]()))},t=>{const e=O,n=t?.[e(492)];1===n?e(454):2===n?e(404):3===n||e(482),t?.[e(572)],navigator[e(587)],document.hasFocus(),window[e(518)],location[e(586)],location[e(438)],o(void 0,void 0)},n)})}function $(){const t=l;if(b||!Z()||y)return;b=!0;const e=()=>{const t=O;window.removeEventListener("pointerdown",e,!0),window.removeEventListener(t(505),e,!0),Q()};window[t(522)]("pointerdown",e,!0),window.addEventListener(t(505),e,!0)}R();let tt=!document[l(490)]&&document[l(530)](),et=document[l(530)]();function nt(){const t=l;if(X())return;const e=!document[t(490)]&&document[t(530)]();e&&(et=!0),et||e?e!==tt&&(tt=e,J(t(e?525:547),{},document.body)):tt=e}function ot(){const t=l;(function(){const t=l,e=globalThis;return!e[A]&&(Object[t(504)](e,A,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window[t(522)](t(564),()=>{const e=t;Y()&&(V(),(window[e(518)]||"localhost"===location[e(438)])&&(Z()&&$(),window[e(522)]("focus",()=>{!y&&Z()&&!T&&S&&Q()}),document[e(522)](e(539),()=>{!document.hidden&&!y&&Z()&&!T&&S&&Q()})))}),window[t(522)](t(476),e=>{const n=t;e[n(507)]===p&&("granted"===localStorage.getItem(p)?(h=!1,V(),Z()&&$()):(h=!1,y=!1)),e[n(507)]===g&&(Z()?$():y=!1)}),window.addEventListener(t(564),()=>{const e=t;Y()&&J(e(552),{url:window[e(475)][e(436)],title:document[e(567)],ref:document[e(519)]},document[e(528)])}),addEventListener(t(534),function(t,e){let n=0;return(...o)=>{const i=Date[O(488)]();i-n>=e&&(n=i,t(...o))}}(e=>{const n=t;if(X())return;const o=e[n(575)]instanceof Element?e[n(575)][n(493)](k):null;o instanceof HTMLElement&&(u=G(o))},50),{capture:!0,passive:!0}),addEventListener(t(424),async e=>{const n=t;if(X())return;if(!(e[n(575)]instanceof Element))return;const o=e[n(575)][n(493)](k);if(!(o instanceof HTMLElement))return;const i=function(t){const e=l;return t[e(577)]("aria-label")??t[e(567)]??t[e(523)]?.[e(585)]()??e(590)}(o);(async()=>{const t=n,e=u?await u:void 0;u=void 0,J(t(424),{tag:o[t(515)],label:i},o,e)})()},!0),addEventListener(t(505),e=>{const n=t;if(!X()&&e[n(507)]===n(553)){const t=e[n(575)];if(t instanceof HTMLElement&&(t.tagName===n(451)||t.tagName===n(421))){const e=t instanceof HTMLInputElement?t[n(503)]:void 0,o=t.id||void 0;J("input-submit",{tag:t[n(515)],name:e??o},t)}}},{capture:!0}),["focus",t(556)].forEach(e=>{window[t(522)](e,nt)}),document.addEventListener(t(539),nt),window[t(522)](t(570),function(t,e){let n;return(...o)=>{const i=O;void 0!==n&&window[i(467)](n),n=window[i(500)](()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;X()||J("scroll",{scrollX:window[e(501)],scrollY:window[e(481)]},document[e(528)])},250),{passive:!0}),window[t(497)]??={send(e,n){const o=t;Y()&&J(e,n,document[o(528)])}})}function it(t,e){t-=235;return at()[t]}function at(){const t=["intent_sid","https://intent.callimacus.ai","disabled","undefined","enabled","626hirskl","sidMaxAgeSeconds","intent:debug","baseUrl","setItem","intent:data-ip","3152lzNckL","5938158GncBbi","8HPZbfP","debug","now","number","249zYoDWT","randomUUID","clientId","intent:consent","consent","27248SkfBao","9988812aPDYEu","intent:data-client-id","2257955DODUiJ","8215634laExZn","granted","3264920JLYLyH","intent:data-sid-max-age","function","intent:geo","geo","intent:data-base-url","random","11FfZWZd"];return(at=function(){return t})()}function rt(t,e){const n=it;try{if(void 0===e)return;localStorage[n(243)](t,e?t===n(254)?n(261):n(238):n(236))}catch{}}function ct(t){rt(it(254),t)}function st(t){rt("intent:geo",t)}function lt(t){rt(it(241),t)}function ut(t={}){const e=it;if(localStorage.setItem(e(258),t[e(253)]??""),localStorage.setItem(e(244),t.ip??""),localStorage[e(243)](e(267),t[e(242)]??e(235)),typeof t[e(240)]===e(250)&&localStorage[e(243)](e(263),String(t[e(240)])),rt("intent:consent",t[e(255)]),rt(e(265),t[e(266)]),rt(e(241),t[e(248)]),t[e(255)]){if(!F("intent_sid")){j(typeof crypto!==e(237)&&typeof crypto[e(252)]===e(264)?crypto[e(252)]():Date[e(249)]()+"-"+Math[e(268)](),t[e(240)])}}ot()}function dt(){return F(it(270))}function ft(){R()}function mt(){_()}function pt(t){const e=it;Number.isFinite(t)&&localStorage.setItem(e(263),String(t));const n=F(e(270));n&&j(n,t)}!function(){const t=it,e=at();for(;;)try{if(751172===parseInt(t(239))/1*(parseInt(t(245))/2)+-parseInt(t(251))/3*(-parseInt(t(256))/4)+parseInt(t(259))/5+-parseInt(t(246))/6+parseInt(t(260))/7+parseInt(t(247))/8*(-parseInt(t(257))/9)+-parseInt(t(262))/10*(parseInt(t(269))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{mt as clearIntentSessionId,ft as ensureIntentSessionId,dt as getIntentSessionId,ut as initIntent,ct as setConsent,lt as setDebug,rt as setFlag,st as setGeo,pt as setIntentSessionMaxAge};