@solomei-ai/intent 1.1.2 → 1.3.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 +109 -0
- package/dist/esm/index.js +1 -1
- package/dist/intent.umd.min.js +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Intent Integration
|
|
2
|
+
|
|
3
|
+
The **Intent** tracker collects consented client context and sends events to **Callimacus**.
|
|
4
|
+
It can be easily integrated into modern applications (React, Vite, Next.js, etc.) via npm or directly via a script tag.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 📦 Installation
|
|
9
|
+
|
|
10
|
+
### Using npm (recommended)
|
|
11
|
+
|
|
12
|
+
Install the package from npm:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @solomei-ai/intent
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## ⚙️ Usage
|
|
21
|
+
|
|
22
|
+
Initialize **Intent** in your app entry point:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// app entry
|
|
26
|
+
import { initIntent } from '@solomei-ai/intent';
|
|
27
|
+
|
|
28
|
+
initIntent({
|
|
29
|
+
clientId: 'cal-pk-...', // your Callimacus Client ID
|
|
30
|
+
consent: true, // can be toggled later
|
|
31
|
+
geo: true, // can be toggled later
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🌐 CDN Usage
|
|
38
|
+
|
|
39
|
+
If you prefer not to use npm, include the package via a `<script>` tag:
|
|
40
|
+
|
|
41
|
+
### Option 1: jsDelivr
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/@solomei-ai/intent/dist/intent.umd.min.js"></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Option 2: unpkg
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<script src="https://unpkg.com/@solomei-ai/intent/dist/intent.umd.min.js"></script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Once loaded, access the module from the global `window.Intent` namespace:
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<script>
|
|
57
|
+
const { initIntent } = window.Intent;
|
|
58
|
+
|
|
59
|
+
initIntent({
|
|
60
|
+
clientId: 'cal-pk-...',
|
|
61
|
+
consent: true,
|
|
62
|
+
geo: false,
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 📘 More Information
|
|
70
|
+
|
|
71
|
+
* npm: [@solomei-ai/intent](https://www.npmjs.com/package/@solomei-ai/intent)
|
|
72
|
+
* jsDelivr: [https://www.jsdelivr.com/package/npm/@solomei-ai/intent](https://www.jsdelivr.com/package/npm/@solomei-ai/intent)
|
|
73
|
+
* unpkg: [https://unpkg.com/@solomei-ai/intent](https://unpkg.com/@solomei-ai/intent)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## Managing consent & geolocation flags
|
|
79
|
+
You can pass flags to `initIntent` or toggle them at runtime with setFlag:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import {setFlag} from '@solomei-ai/intent';
|
|
83
|
+
|
|
84
|
+
// Grant or revoke consent
|
|
85
|
+
setFlag('intent:consent', true); // granted
|
|
86
|
+
setFlag('intent:consent', false); // disabled
|
|
87
|
+
|
|
88
|
+
// Enable or disable device geolocation capture
|
|
89
|
+
setFlag('intent:geo', true); // enabled
|
|
90
|
+
setFlag('intent:geo', false); // 'disabled
|
|
91
|
+
```
|
|
92
|
+
- When consent is granted, the tracker maintains a first-party cookie `intent_sid`.
|
|
93
|
+
- If consent is revoked, the tracker clears `intent_sid` and stops sending events.
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Using `intent_sid`
|
|
97
|
+
|
|
98
|
+
Use these utilities to read or manage the session cookie from your app:
|
|
99
|
+
```ts
|
|
100
|
+
import {
|
|
101
|
+
getIntentSessionId,
|
|
102
|
+
clearIntentSessionId,
|
|
103
|
+
ensureIntentSessionId,
|
|
104
|
+
} from '@solomei-ai/intent';
|
|
105
|
+
|
|
106
|
+
const sid = getIntentSessionId(); // string | undefined, can be sent to backend
|
|
107
|
+
clearIntentSessionId(); // deletes cookie
|
|
108
|
+
ensureIntentSessionId(); // creates cookie if missing
|
|
109
|
+
```
|
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";function e(){const t=[" (UTC","upright","height","6ndIMvO","timeZone","innerWidth","maxTouchPoints","enabled","random","267260uhLDcc","Battery: ","padStart","level","requestStart","SW-controlled","getEntriesByType"," | ","colorDepth","380tCYZPL","44168135vfFLJE","PWA: ","availWidth","cookieEnabled","version","includes","addEventListener","Local time: ","Tilt: ",", orientation ","/speedtest.bin","map","21BwmCiV","Screen: ",", display-mode standalone: ","fetch","onLine","mobile","reclined","width","downlink","charging","availHeight"," Mbps","DateTimeFormat","round","deviceorientation","not charging","2068678LruPtM","isSecureContext"," ms","hardwareConcurrency","TTFB ~","isArray","Referrer: ","read"," (mobile)","coarse","177102qfFnty","join","12kLiVGD","1283395VtJYZG","; DNT: ","yes","Online: ","toFixed","connection","cors","2571256UimnmN","push","9IuoEVu","Pointer/Touch: ","no-store","type","616498rRkFqS","x (avail ","rtt","number","flat","n/a","platform","referrer"," (active test)","Device geolocation: enabled","Device geolocation: disabled","slice","orientation","devicePixelRatio","language","abort","CPU: ","saveData","innerHeight","Network: ","Viewport: ","CookiesEnabled: ","getBattery","languages","function","signal","byteLength","resolvedOptions","Timezone: ","body","toString","cb=","navigation","now","responseStart","intent:geo","effectiveType","entryType","removeEventListener","abs","no SW","Platform: ","all","isFinite","(pointer: fine)","Language: ","beta","max","gamma","User agent: ","find","doNotTrack"," cores","length","userAgent"];return(e=function(){return t})()}function n(t,o){const a=e();return(n=function(t,e){return a[t-=280]})(t,o)}async function o(){const t=n,e=[];if(function(t){const e=n;return e(324)in t&&void 0!==t[e(324)]}(navigator)){const n=navigator[t(324)];n?.[t(368)]&&e[t(327)](n.effectiveType),typeof n?.[t(298)]===t(335)&&e[t(327)](n[t(298)]+t(301)),typeof n?.rtt===t(335)&&e[t(327)](n[t(334)]+t(308)),n?.saveData&&e[t(327)](t(349))}const o=await async function(t,e=3e3,o=8,a=150){const i=n;if(!(i(293)in window)||!("ReadableStream"in window))return;const r=performance[i(365)]();let c,s=0;await Promise[i(374)](Array.from({length:o},async()=>{const n=i;for(;performance[n(365)]()-r<e+a;){const o=new AbortController,i=(t[n(283)]("?")?"&":"?")+n(363)+Math[n(395)]().toString(36)[n(343)](2);try{const d=await fetch(t+i,{cache:n(330),signal:o[n(357)],mode:n(325)}),u=d[n(361)]?.getReader();if(!u)break;for(;;){const t=performance[n(365)]();if(t-r>=e+a){o[n(347)]();break}const{done:i,value:d}=await u[n(313)]();if(i)break;c??=t,t-(c??t)>=a&&(s+=d[n(358)])}}catch{}}}));const d=(c??r)+a,u=Math[i(379)](1,performance[i(365)]()-d),l=8*s/(u/1e3)/1e6;return Number[i(375)](l)&&l>0?l:void 0}(t(288),3e3,8,150),a=performance[t(402)](t(364))[t(382)](e=>e[t(369)]===t(364));let i;if(a){const e=Math.max(0,a[t(366)]-a[t(400)]);i=t(310)+Math[t(303)](e)+" ms"}const r=[];if(typeof o===t(335)&&r[t(327)]("~"+o[t(323)](1)+t(301)),i&&r.push(i),e.length&&r[t(327)]("hint: "+e[t(317)](", ")),r[t(385)])return t(351)+r[t(317)](", ")+t(340)}async function a(t=400){const e=n;if("DeviceOrientationEvent"in window&&window[e(307)])return new Promise(o=>{const a=e;let i=!1;const r=t=>{const e=n,a=typeof t[e(378)]===e(335)?t.beta:void 0,c=typeof t[e(380)]===e(335)?t[e(380)]:void 0;if(void 0===a||void 0===c)return;if(i)return;i=!0,window[e(370)](e(304),r);const s=function(t,e){const o=n,a=Math[o(371)](t),i=Math[o(371)](e);return o(a<15&&i<15?336:a>=60?388:296)}(a,c);o(e(286)+s+" (β "+Math[e(303)](a)+"°, γ "+Math.round(c)+"°)")};window.setTimeout(()=>{i||(i=!0,window[n(370)]("deviceorientation",r),o(void 0))},t),window[a(284)](a(304),r,{passive:!0})})}async function i(){const t=n;if(function(t){const e=n;return e(354)in t&&typeof t.getBattery===e(356)}(navigator))try{const e=await navigator.getBattery(),n=Math.round(100*e[t(399)]),o=[(Number[t(375)](n)?n:0)+"%",e.charging?t(299):t(305)];return t(397)+o[t(317)](", ")}catch{return}}async function r(){const t=n,e=(new(Intl[t(302)]))[t(359)]()[t(391)],r=function(t){const e=n,o=t<=0?"+":"-",a=Math.abs(t);return""+o+String(Math.floor(a/60))[e(398)](2,"0")+":"+String(a%60)[e(398)](2,"0")}((new Date).getTimezoneOffset()),c=[];c[t(327)](t(377)+navigator[t(346)]),navigator[t(355)]?.[t(385)]&&c[t(327)]("Languages: "+navigator[t(355)][t(317)](", ")),c[t(327)](t(381)+navigator[t(386)]);const s=function(){const t=n;if(!("userAgentData"in(e=navigator))||void 0===e.userAgentData)return;var e;const o=navigator.userAgentData,a=Array[t(311)](o.brands)?o.brands[t(289)](e=>e.brand+" "+e[t(282)])[t(317)](", "):void 0,i=o[t(338)]?""+o[t(338)]+(o[t(295)]?t(314):""):void 0;return[a&&"UA brands: "+a,i&&t(373)+i].filter(Boolean)[t(317)](t(403))||void 0}();s&&c[t(327)](s),c[t(327)](t(360)+e+t(387)+r+")"),c[t(327)](t(285)+(new Date)[t(362)]());const d=window[t(345)]||1;c[t(327)](t(291)+screen[t(297)]+"x"+screen[t(389)]+" @"+d+t(333)+screen[t(280)]+"x"+screen[t(300)]+", "+screen[t(404)]+"-bit)");const u=screen[t(344)]&&t(331)in screen.orientation?screen[t(344)][t(331)]:void 0;c[t(327)](t(352)+window[t(392)]+"x"+window[t(350)]+(u?t(287)+u:"")),c[t(327)](t(348)+navigator[t(309)]+t(384));const l=await o();l&&c[t(327)](l),c[t(327)](function(){const t=n,e="function"==typeof matchMedia&&matchMedia("(pointer: coarse)").matches,o=typeof matchMedia===t(356)&&matchMedia(t(376)).matches,a=e?t(315):o?"fine":"unknown",i=typeof navigator[t(393)]===t(335)?navigator.maxTouchPoints:0;return t(329)+a+", maxTouchPoints "+i}());const f=await i();f&&c[t(327)](f),c.push(t(353)+(navigator[t(281)]?"yes":"no")+t(320)+(navigator[t(383)]??t(337))),c[t(327)](t(322)+(navigator[t(294)]?t(321):"no")),document[t(339)]&&c[t(327)](t(312)+document.referrer),c[t(327)](function(){const t=n,e="function"==typeof matchMedia&&matchMedia("(display-mode: standalone)").matches,o=Boolean(navigator.serviceWorker?.controller);return t(407)+t(o?401:372)+t(292)+(e?"yes":"no")}());const m=await a();m&&c[t(327)](m);const p="undefined"!=typeof localStorage&&localStorage.getItem(t(367))===t(394);return c.push(t(p?341:342)),c[t(317)](t(403))}!function(){const t=n,o=e();for(;;)try{if(596229===-parseInt(t(332))/1+-parseInt(t(306))/2+-parseInt(t(328))/3*(-parseInt(t(396))/4)+parseInt(t(319))/5*(-parseInt(t(390))/6)+-parseInt(t(290))/7*(parseInt(t(326))/8)+parseInt(t(316))/9*(-parseInt(t(405))/10)+-parseInt(t(406))/11*(-parseInt(t(318))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}();const c=D;!function(){const t=D,e=J();for(;;)try{if(574984===-parseInt(t(597))/1+parseInt(t(379))/2+parseInt(t(476))/3*(-parseInt(t(477))/4)+-parseInt(t(504))/5*(parseInt(t(592))/6)+-parseInt(t(569))/7*(parseInt(t(554))/8)+parseInt(t(414))/9*(-parseInt(t(493))/10)+parseInt(t(465))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let s,d="",u=0;const l=c(590),f="intent:geo";let m=!1,p=!1,h=!1,g=!1,w=!1,y=!1;const v="intent:data-client-id",b=c(467),M=c(481),x=c(567),I=c(530),S=[c(551),c(468),"a",c(584),c(491),c(423),c(381),c(440)][c(507)](","),E=c(432),L=c(595),T=new Set([c(392),c(492),c(596),"family-name",c(572),c(582),c(508),c(397),c(388),c(407),c(539),c(593),c(395),"address-line3","address-level1",c(442),c(416),c(501),"country","country-name",c(560),"cc-name",c(565),c(603),c(497),c(385),c(478),"cc-exp-month","cc-exp-year","cc-csc","cc-type",c(443),c(568),c(391),c(463),c(556),"webauthn"]);function k(t){return"<"+A(t)+">"}function A(t){const e=c,n=(t[e(461)]?.(L)??"")[e(382)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(417)]||"")[e(486)]()[e(382)]().split(/\s+/).filter(Boolean):[];return t instanceof HTMLInputElement&&t[e(424)]===e(383)?"Password":o[e(604)](t=>t[e(419)](e(387)))?e(405):o.some(t=>[e(392),e(492),e(547),e(596),e(545),"cc-given-name",e(497)][e(601)](t))?e(587):o[e(601)](e(508))?e(535):o[e(601)]("tel")?e(577):o.some(t=>t[e(419)]("bday"))?e(585):o[e(601)](e(556))?"Sex":o.some(t=>[e(539),e(593),e(395),e(513),"address-level1","address-level2","address-level3",e(501),e(560),e(380),e(502)][e(601)](t))?e(579):o[e(601)](e(388))||o[e(601)](e(407))?"Organization":t[e(461)]?.(E)?.[e(486)]()===e(558)?e(511):e(437)}function D(t,e){const n=J();return(D=function(t,e){return n[t-=377]})(t,e)}function N(t){const e=c;return t[e(516)](e(413))||t[e(461)](E)?.toLowerCase()===e(489)}function H(t){const e=c,n=t[e(461)](E);return""===n||n?.[e(486)]()===e(558)}function C(t){const e=c;if(t instanceof HTMLInputElement){if(t[e(424)]===e(383))return!0;if(t[e(424)]===e(390))return!1;const n=t[e(461)](e(588));if(n&&n[e(486)]()===e(428))return!1;if((t.autocomplete||"")[e(486)]()[e(382)]()[e(594)](/\s+/)[e(439)](Boolean).some(t=>T[e(519)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t[e(417)]||"")[e(486)]()[e(382)]()[e(594)](/\s+/)[e(439)](Boolean)[e(604)](t=>T.has(t)))return!0}return!1}function P(t){return!!H(t)||!!C(t)}function U(){const t=c,e=[],n=t=>{const e=D,n=t[e(602)]();if(n[e(482)]<=0||n.height<=0)return;const o=Math[e(420)](0,n[e(455)]),a=Math.max(0,n[e(521)]),i=Math[e(420)](0,Math[e(451)](n.right,window[e(453)])-o),r=Math[e(420)](0,Math.min(n[e(561)],window[e(523)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document.querySelectorAll("["+E+t(479)+E+t(474))[t(528)](o=>{const a=t,i=n(o);if(!i)return;const r=A(o)||a(511);e[a(536)]({...i,label:r})});return document.querySelectorAll("input, textarea")[t(528)](o=>{const a=t;if(!H(i=o)&&!C(i))return;var i;if(N(o))return;const r=n(o);if(!r)return;const c=A(o);e[a(536)]({...r,label:c})}),e}const R=()=>localStorage[c(562)](l)===c(436);function B(t){const e=c,n=encodeURIComponent(t)+"=",o=document.cookie[e(594)]("; ");for(const t of o)if(t.startsWith(n))return decodeURIComponent(t[e(450)](n[e(566)]))}function F(t,e){const n=c,o=localStorage[n(562)](I),a=null==o?void 0:Number(o),i=Number[n(546)](e)?Number(e):"number"==typeof a&&Number[n(546)](a)?a:86400,r="https:"===window[n(549)][n(418)],s=["intent_sid="+encodeURIComponent(t),n(447)+i,n(581),n(532)];r&&s[n(536)](n(540)),document.cookie=s.join("; ")}function O(){const t=c,e=window.location[t(418)]===t(518);document.cookie=t(500)+(e?t(435):"")}function W(){const t=c,e=B(t(425));if(!R())return e&&O(),void(d="");if(e)return void(d=e);const n="undefined"!=typeof crypto&&"function"==typeof crypto[t(411)]?crypto[t(411)]():Date[t(488)]()+"-"+Math[t(462)]();d=n,F(d)}function j(){return W(),R()&&Boolean(d)&&(()=>{const t=c,e=localStorage[t(562)](v);return"string"==typeof e&&e[t(382)]()[t(566)]>0})()}function q(){return!j()||h}function J(){const t=["granted","Sensitive","screenshot","filter","[onclick]","height","address-level2","bday","cloneNode","geoEnabled","removeEventListener","Max-Age=","/events","page-focus","slice","min","bbox","innerWidth","message","left","pixel body fallback failed","drawImage","no-store","speed","focus","getAttribute","random","bday-year","pageview","23584440Wqdlpr","POST","intent:data-ip","a[href]","<no visible label>","altitudeAccuracy","fillStyle","key","globalAlpha",'=""]',"middle","6EasXQs","1854992XxKtzW","cc-exp",'="mask"], [',"click","intent:data-base-url","width","capturePhase","body","context","toLowerCase","fillRect","now","ignore","setTimeout",'input[type="button"]',"given-name","10mqeQEK","isSecureContext","host","outerHTML","cc-family-name","floor","getContext","intent_sid=; Max-Age=0; Path=/; SameSite=Lax","address-level4","country-name","FileReader error","5ILbULx","toDataURL","x-sl-access-token","join","email","deviceGeoSent","stringify","Redacted","localhost","address-line3","omit","application/json","hasAttribute","hostname","https:","has","aria-label","top","passive","innerHeight","intent","string","timestamp","accuracy","forEach","altitude","intent:data-sid-max-age","hasFocus","SameSite=Lax","storage","#9ca3af","Email","push","toISOString","textAlign","street-address","Secure","getCurrentPosition","value","pointerdown","#e5e7eb","cc-name","isFinite","family-name","scrollY","location","target","button","fillText","PERMISSION_DENIED","5816NDaubz","/p.gif","sex","scroll","mask","disabled","postal-code","bottom","getItem","closest","latitude","cc-given-name","length","https://intent.callimacus.ai","bday-day","665lLJfAo","keydown","TEXTAREA","nickname","attributes","title","props","from","Phone","error","Address","heading","Path=/","username","#374151",'input[type="submit"]',"Birthday","code","Name","role","tagName","intent:consent","center","1068906OcWVje","address-line1","split","data-intent-redact-label","additional-name","579724kQLeXk","visibilitychange","textBaseline","geolocation","includes","getBoundingClientRect","cc-additional-name","some","result","strokeRect","addEventListener","1533692NXHeac","country",'[role="link"]',"trim","password","UNKNOWN","cc-number","label","cc-","organization","clearTimeout","search","bday-month","name","scrollX","function","address-line2","onerror","tel","longitude","setAttribute","input-submit","onload","load","query","Enter","Credit card","readAsDataURL","organization-title","image/jpeg","round","blur","randomUUID","visibilityState","data-html2canvas-ignore","5233194AxsGRq","number","address-level3","autocomplete","protocol","startsWith","max","INPUT","createElement",'[role="button"]',"type","intent_sid","hidden","permissions","searchbox","Unexpected FileReader result type","device","font","data-intent-redact","page-blur","px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","; Secure"];return(J=function(){return t})()}async function z(e){const n=c,o=function(t){const e=c,n=t[e(444)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(576)](t.attributes).forEach(({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(542)]=P(t)?k(t):t.value,t[e(559)]&&n.setAttribute(e(559),""),n[e(496)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(576)](t[e(573)]).forEach(({name:t,value:o})=>{n[e(399)](t,o)}),n[e(542)]=P(t)?k(t):t.value,t[e(559)]&&n[e(399)](e(559),""),n[e(496)]):t[e(496)]}(e),a=e.getBoundingClientRect(),i={useCORS:!0,...{x:window[n(393)],y:window[n(548)],width:window[n(453)],height:window.innerHeight,scale:1},ignoreElements:t=>t instanceof Element&&N(t)},r=await t(document.body,i),s=r.width,d=r[n(441)],u=Math[n(420)](s,d),l=.8*Math.max(window[n(453)],window.innerHeight),f=Math.min(1,l/u),m=12/(a[n(441)]||1),p=Math.min(1,Math[n(420)](f,m)),h=Math[n(409)](s*p),g=Math[n(409)](d*p),w=document[n(422)]("canvas");w[n(482)]=h,w[n(441)]=g;const y=w[n(499)]("2d");y[n(457)](r,0,0,s,d,0,0,h,g);const v=U();if(v[n(566)]){y.save(),y[n(473)]=1;for(const t of v){const e=Math[n(409)](t.x*p),o=Math.round(t.y*p),a=Math[n(409)](t.w*p),i=Math[n(409)](t.h*p);y[n(471)]=n(544),y[n(487)](e,o,a,i),y.strokeStyle=n(534),y.lineWidth=Math[n(420)](1,Math[n(498)](.02*Math.min(a,i))),y[n(377)](e,o,a,i);const r=Math[n(420)](10,Math.min(22,Math[n(498)](.35*i)));y[n(431)]=r+n(434),y.fillStyle=n(583),y[n(538)]=n(591),y[n(599)]=n(475);const c="<"+(t[n(386)]?.trim()[n(566)]?t[n(386)]:n(437))+">";y[n(552)](c,e+a/2,o+i/2,a-6)}y.restore()}const b=w[n(505)](n(408),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a.width,h:a.height},img:b}}function Q(){const t=c,e=localStorage[t(562)](v),n={"Content-Type":t(515)};return e&&(n[t(506)]=e),d&&(n["x-intent-sid"]=d),n}async function X(t,e){const n=c,o=(localStorage[n(562)](M)??x)+n(448),a=JSON.stringify(t);try{if((await fetch(o,{method:n(466),headers:Q(),body:a,keepalive:e,credentials:n(514)})).ok)return}catch{}try{await async function(t,e=!1){const n=c,o=(localStorage.getItem(M)??x)+n(555);if(!(await fetch(o,{method:n(466),headers:Q(),body:JSON[n(510)](t),keepalive:e,credentials:"omit",cache:n(458)})).ok)throw new Error(n(456))}(t,e)}catch{}}async function G(t,e,n,o){const a=c;if(!j())return;const i={...e,localTime:(new Date)[a(537)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i.value=P(n)?k(n):n[a(542)]);let r="",s={x:0,y:0,w:0,h:0},d="";const l=!(t===a(557)||t===a(433)||t===a(449)),f=Date[a(488)](),m=f-u>=5e3;let p=o;const h=t===a(480)||t===a(400)||t===a(464);l&&!p&&(h||m)&&(p=await z(n),u=f),p&&(r=p.html,s=p[a(452)],d=p.img);const g={ts:Date[a(488)](),event:t,props:i,html:t===a(433)||t===a(449)?"":r,bbox:s,img:d},w=document[a(412)]===a(426)||"page-blur"===t;await X(g,w)}function V(){return"enabled"===localStorage[c(562)](f)}async function Y(t={}){const e=c;if(!j())return;const n=typeof t.lat===e(415)&&"number"==typeof t.lon;if(n&&p)return;if(!n&&m)return;const o=localStorage[e(562)](b),a={context:await r()};o&&(a.ip=o);for(const[e,n]of Object.entries(t))a[e]=n;await G(e(485),a,document[e(484)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?p=!0:m=!0}async function _(){const t=c,e={canSend:j(),geoEnabled:V(),deviceGeoSent:p};if(!e.canSend||!e[t(445)]||e[t(509)])return;const n={secure:window[t(494)],proto:location[t(418)],host:location[t(517)]};if(n.secure||(t(495),t(512)),!("geolocation"in navigator))return;if(w)return;w=!0,h=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date.now();try{await(navigator[t(427)]?.[t(403)]({name:t(600)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=D;a||(a=!0,Date[i(488)](),Number[i(546)](t)&&Number[i(546)](n)&&await Y({lat:t,lon:n,source:i(430)}),w=!1,h=!1,y=!0,e())};navigator[n(600)][n(541)](t=>{const e=D,n=t.coords;i(n[e(564)],n[e(398)],(n[e(527)],typeof n[e(529)]===e(415)&&n.altitude,"number"==typeof n[e(470)]&&n[e(470)],typeof n[e(580)]===e(415)&&n[e(580)],typeof n[e(459)]===e(415)&&n[e(459)],t[e(526)],document[e(412)],document.hasFocus()))},t=>{const e=D,n=t?.[e(586)];1===n?e(553):2===n||(3===n||e(384)),t?.[e(454)],document[e(531)](),window[e(494)],location[e(418)],location[e(517)],i(void 0,void 0)},o)})}function K(){const t=c;if(g||!V()||p)return;g=!0;const e=()=>{const t=D;window[t(446)](t(543),e,!0),window[t(446)](t(570),e,!0),_()};window[t(378)](t(543),e,!0),window.addEventListener(t(570),e,!0)}W(),window[c(378)](c(402),()=>{const t=c;j()&&(Y(),(window.isSecureContext||"localhost"===location.hostname)&&(V()&&K(),window.addEventListener(t(460),()=>{!p&&V()&&!w&&y&&_()}),document.addEventListener(t(598),()=>{!document[t(426)]&&!p&&V()&&!w&&y&&_()})))}),window[c(378)](c(533),t=>{const e=c;t.key===l&&(function(){const t=c;return localStorage[t(562)](l)===t(436)}()?(m=!1,Y(),V()&&K()):(m=!1,p=!1)),t[e(472)]===f&&(V()?K():p=!1)}),window[c(378)](c(402),()=>{const t=c;j()&&G(t(464),{url:window[t(549)].href,title:document[t(574)],ref:document.referrer},document.body)}),addEventListener(c(543),function(t,e){let n=0;return(...o)=>{const a=Date[D(488)]();a-n>=e&&(n=a,t(...o))}}(t=>{const e=c;if(q())return;const n=t.target instanceof Element?t[e(550)].closest(S):null;n instanceof HTMLElement&&(s=z(n))},50),{capture:!0,passive:!0}),addEventListener(c(480),async t=>{const e=c;if(q())return;const n=t[e(550)]instanceof Element?t.target[e(563)](S):null;if(!(n instanceof HTMLElement))return;const o=function(t){const e=c;return t[e(461)](e(520))??t[e(574)]??t.textContent?.trim()??e(469)}(n),a=s?await s:void 0;s=void 0,await G(e(480),{tag:n.tagName,label:o},n,a)},!0),addEventListener("keydown",t=>{const e=c;if(!q()&&t[e(472)]===e(404)){const n=t[e(550)];if(n instanceof HTMLElement&&(n[e(589)]===e(421)||n[e(589)]===e(571))){const t=n instanceof HTMLInputElement?n.name:void 0,o=n.id||void 0;G(e(400),{tag:n.tagName,name:t??o},n)}}},{capture:!0});let Z=!document[c(426)]&&document[c(531)](),$=document[c(531)]();const tt=()=>{const t=c;if(q())return;const e=!document[t(426)]&&document[t(531)]();e&&($=!0),$||e?e!==Z&&(Z=e,G(t(e?449:433),{},document.body)):Z=e};function et(){const t=["data-ip","354681ypQmjG","2rUFaHI","27129384khQHld","function","getAttribute","https://intent.callimacus.ai","7303338BKxLMi","setItem","now","consent","number","currentScript","sidMaxAgeSeconds","intent:data-ip","granted","random","intent_sid","1497910oCoknt","2194448gBikjY","intent:data-client-id","disabled","28BJJQQp","clientId","undefined","668369ioflbh","baseUrl","6762204WgFPIJ","intent:consent","intent:data-base-url","intent:data-sid-max-age","randomUUID","geo"];return(et=function(){return t})()}function nt(t,e){const n=at;try{if(void 0===e)return;localStorage.setItem(t,e?t===n(135)?n(122):"enabled":n(128))}catch{}}function ot(t={}){const e=at;if(localStorage[e(115)](e(127),t[e(130)]??""),localStorage[e(115)](e(121),t.ip??""),localStorage[e(115)](e(136),t[e(133)]??e(113)),typeof t[e(120)]===e(118)&&localStorage[e(115)]("intent:data-sid-max-age",String(t.sidMaxAgeSeconds)),nt(e(135),t.consent),nt("intent:geo",t[e(139)]),t[e(117)]){if(!B(e(124))){F(typeof crypto!==e(131)&&typeof crypto.randomUUID===e(144)?crypto[e(138)]():Date[e(116)]()+"-"+Math[e(123)](),t[e(120)])}}}function at(t,e){const n=et();return(at=function(t,e){return n[t-=112]})(t,e)}function it(){return B(at(124))}function rt(){W()}function ct(){O()}function st(t){const e=at;Number.isFinite(t)&&localStorage.setItem(e(137),String(t));const n=B(e(124));n&&F(n,t)}[c(460),c(410)].forEach(t=>{window[c(378)](t,tt)}),document[c(378)]("visibilitychange",tt),window[c(378)](c(557),function(t,e){let n;return(...o)=>{const a=D;void 0!==n&&window[a(389)](n),n=window[a(490)](()=>{n=void 0,t(...o)},e)}}(()=>{const t=c;q()||G(t(557),{scrollX:window[t(393)],scrollY:window[t(548)]},document[t(484)])},250),{passive:!0}),window[c(524)]??={send(t,e){j()&&G(t,e,document.body)},define(t,e){const n=c,{type:o}=e,{selector:a}=e,i=e[n(522)]??!0,r=Boolean(e[n(483)]),s=e[n(575)];addEventListener(o,async o=>{const i=n;if(q())return;let r=document[i(484)];if(typeof a===i(525)&&a[i(566)]){const t=o.target instanceof Element?o[i(550)][i(563)](a):void 0;t instanceof HTMLElement&&(r=t)}const c=typeof s===i(394)?s(o,r):s??{};let d;e[i(438)]&&(d=await z(r),u=Date[i(488)]()),await G(t,c,r,d)},{capture:r,passive:i})}},function(){const t=at,e=et();for(;;)try{if(626674===-parseInt(t(132))/1*(-parseInt(t(142))/2)+-parseInt(t(141))/3*(-parseInt(t(129))/4)+-parseInt(t(125))/5+parseInt(t(134))/6+parseInt(t(114))/7+parseInt(t(126))/8+-parseInt(t(143))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(){const t=at;try{const e=document[t(119)];if(!e)return;const n=e[t(112)]("data-customer-id")||void 0,o=e[t(112)](t(140))||void 0;(n||o)&&ot({clientId:n,ip:o})}catch{}}();export{ct as clearIntentSessionId,rt as ensureIntentSessionId,it as getIntentSessionId,ot as initIntent,nt as setFlag,st as setIntentSessionMaxAge};
|
|
4
|
+
import t from"html2canvas-pro";async function e(){const t=i,e=[];if(function(t){const e=i;return"connection"in t&&typeof t[e(314)]!==e(319)}(navigator)){const n=navigator.connection;n?.[t(401)]&&e[t(309)](n[t(401)]),typeof n?.[t(322)]===t(388)&&e[t(309)](n[t(322)]+t(361)),"number"==typeof n?.[t(404)]&&e[t(309)](n.rtt+" ms"),n?.[t(302)]&&e.push(t(302))}const n=await async function(t,e=3e3,n=8,o=150){const a=i;if(!(a(358)in window)||!("ReadableStream"in window))return;const r=performance[a(374)]();let c,s=0;await Promise[a(328)](Array.from({length:n},async()=>{const n=a;for(;performance[n(374)]()-r<e+o;){const a=new AbortController,i=(t.includes("?")?"&":"?")+n(357)+Math.random().toString(36).slice(2);try{const u=await fetch(t+i,{cache:n(363),signal:a[n(370)],mode:"cors"}),d=u[n(394)]?.[n(297)]();if(!d)break;for(;;){const t=performance[n(374)]();if(t-r>=e+o){a[n(305)]();break}const{done:i,value:u}=await d[n(338)]();if(i)break;c??=t,t-(c??t)>=o&&(s+=u[n(377)])}}catch{}}}));const u=(c??r)+o,d=Math[a(311)](1,performance[a(374)]()-u),l=8*s/(d/1e3)/1e6;return Number.isFinite(l)&&l>0?l:void 0}("/speedtest.bin",3e3,8,150),o=performance[t(323)](t(382))[t(336)](e=>e[t(334)]===t(382));let a;if(o){const e=Math.max(0,o[t(356)]-o[t(395)]);a=t(306)+Math[t(324)](e)+t(398)}const r=[];if("number"==typeof n&&r[t(309)]("~"+n[t(372)](1)+t(361)),a&&r[t(309)](a),e[t(408)]&&r.push(t(405)+e.join(", ")),r[t(408)])return t(349)+r[t(308)](", ")+" (active test)"}function n(){const t=i;if(!function(t){const e=i;return e(390)in t&&void 0!==t[e(390)]}(navigator))return;const e=navigator[t(390)],n=Array.isArray(e[t(317)])?e.brands[t(343)](e=>e[t(400)]+" "+e.version)[t(308)](", "):void 0,o=e.platform?e[t(301)]+(e[t(327)]?" (mobile)":""):void 0;return[n&&"UA brands: "+n,o&&"Platform: "+o][t(307)](Boolean)[t(308)](t(331))||void 0}async function o(t=400){const e=i;if("DeviceOrientationEvent"in window&&window[e(333)])return new Promise(n=>{const o=e;let a=!1;const r=t=>{const e=i,o=typeof t[e(399)]===e(388)?t[e(399)]:void 0,c="number"==typeof t[e(352)]?t.gamma:void 0;if(void 0===o||void 0===c)return;if(a)return;a=!0,window.removeEventListener("deviceorientation",r);const s=function(t,e){const n=i,o=Math.abs(t),a=Math[n(353)](e);return o<15&&a<15?n(298):o>=60?"upright":n(397)}(o,c);n(e(378)+s+e(379)+Math[e(324)](o)+e(344)+Math[e(324)](c)+"°)")};window.setTimeout(()=>{const t=i;a||(a=!0,window[t(347)](t(355),r),n(void 0))},t),window[o(313)](o(355),r,{passive:!0})})}async function a(){const t=i;if(function(t){const e=i;return"getBattery"in t&&typeof t[e(384)]===e(345)}(navigator))try{const e=await navigator.getBattery(),n=Math[t(324)](100*e[t(310)]);return"Battery: "+[(Number.isFinite(n)?n:0)+"%",e[t(303)]?t(303):t(367)][t(308)](", ")}catch{return}}function i(t,e){const n=r();return(i=function(t,e){return n[t-=292]})(t,e)}function r(){const t=["Device geolocation: enabled","now","toString","width","byteLength","Tilt: "," (β ","25571940pshIdz","Local time: ","navigation","cookieEnabled","getBattery","intent:geo","hardwareConcurrency","PWA: ","number","languages","userAgentData","language","8XrzNuK","coarse","body","requestStart","colorDepth","reclined"," ms","beta","brand","effectiveType","fine","getItem","rtt","hint: ","availHeight"," (UTC","length","3786632NpgFTW","12592935FDdwUR","controller","1266677lkepGY","5fJepXg","maxTouchPoints","getReader","flat","x (avail ","no SW","platform","saveData","charging","devicePixelRatio","abort","TTFB ~","filter","join","push","level","max","SW-controlled","addEventListener","connection"," cores","(display-mode: standalone)","brands","innerWidth","undefined","Pointer/Touch: ","Screen: ","downlink","getEntriesByType","round","Referrer: ",", maxTouchPoints ","mobile","all","; DNT: ","resolvedOptions"," | ","orientation","isSecureContext","entryType","Viewport: ","find","Language: ","read","enabled","CPU: ","Device geolocation: disabled","getTimezoneOffset","map","°, γ ","function","matches","removeEventListener","referrer","Network: ","onLine","-bit)","gamma","abs","86suyKsV","deviceorientation","responseStart","cb=","fetch","267450cGfeax","44556OkQeiG"," Mbps",", display-mode standalone: ","no-store","Timezone: ","type","availWidth","not charging","yes","3315361olJEkk","signal","Languages: ","toFixed"];return(r=function(){return t})()}async function c(){const t=i,r=(new Intl.DateTimeFormat)[t(330)]().timeZone,c=function(t){const e=t<=0?"+":"-",n=Math.abs(t);return""+e+String(Math.floor(n/60)).padStart(2,"0")+":"+String(n%60).padStart(2,"0")}((new Date)[t(342)]()),s=[];s[t(309)](t(337)+navigator[t(391)]),navigator[t(389)]?.[t(408)]&&s[t(309)](t(371)+navigator.languages.join(", ")),s[t(309)]("User agent: "+navigator.userAgent);const u=n();u&&s[t(309)](u),s[t(309)](t(364)+r+t(407)+c+")"),s.push(t(381)+(new Date)[t(375)]());const d=window[t(304)]||1;s.push(t(321)+screen[t(376)]+"x"+screen.height+" @"+d+t(299)+screen[t(366)]+"x"+screen[t(406)]+", "+screen[t(396)]+t(351));const l=screen.orientation&&t(365)in screen[t(332)]?screen[t(332)][t(365)]:void 0;s[t(309)](t(335)+window[t(318)]+"x"+window.innerHeight+(l?", orientation "+l:"")),s.push(t(340)+navigator[t(386)]+t(315));const f=await e();f&&s[t(309)](f),s[t(309)](function(){const t=i,e=typeof matchMedia===t(345)&&matchMedia("(pointer: coarse)")[t(346)],n=typeof matchMedia===t(345)&&matchMedia("(pointer: fine)")[t(346)],o=e?t(393):n?t(402):"unknown",a=typeof navigator.maxTouchPoints===t(388)?navigator[t(296)]:0;return t(320)+o+t(326)+a}());const m=await a();m&&s[t(309)](m),s[t(309)]("CookiesEnabled: "+(navigator[t(383)]?t(368):"no")+t(329)+(navigator.doNotTrack??"n/a")),s[t(309)]("Online: "+(navigator[t(350)]?"yes":"no")),document[t(348)]&&s.push(t(325)+document.referrer),s[t(309)](function(){const t=i,e=typeof matchMedia===t(345)&&matchMedia(t(316))[t(346)],n=Boolean(navigator.serviceWorker?.[t(293)]);return t(387)+t(n?312:300)+t(362)+(e?t(368):"no")}());const p=await o();p&&s.push(p);const g="undefined"!=typeof localStorage&&localStorage[t(403)](t(385))===t(339);return s[t(309)](t(g?373:341)),s[t(308)](t(331))}!function(){const t=i,e=r();for(;;)try{if(717522===-parseInt(t(294))/1+-parseInt(t(354))/2*(parseInt(t(360))/3)+parseInt(t(409))/4+parseInt(t(295))/5*(parseInt(t(359))/6)+parseInt(t(369))/7*(parseInt(t(392))/8)+-parseInt(t(292))/9+parseInt(t(380))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const s=u;function u(t,e){const n=j();return(u=function(t,e){return n[t-=416]})(t,e)}!function(){const t=u,e=j();for(;;)try{if(147395===-parseInt(t(434))/1*(parseInt(t(420))/2)+-parseInt(t(586))/3*(-parseInt(t(530))/4)+parseInt(t(567))/5+-parseInt(t(493))/6*(-parseInt(t(498))/7)+-parseInt(t(430))/8+parseInt(t(623))/9*(-parseInt(t(568))/10)+-parseInt(t(500))/11*(-parseInt(t(521))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let d,l="",f=0;const m=s(615),p=s(517);let g=!1,h=!1,w=!1,y=!1,b=!1,v=!1;const M=s(460),x=s(426),I=s(536),S=s(491),T=s(590),E=[s(470),s(611),"a",'input[type="submit"]',s(565),'[role="button"]',s(550),"[onclick]"].join(","),A="data-intent-redact",L=s(486),k=new Set([s(424),s(608),s(524),"family-name",s(431),"username",s(562),s(482),"organization","organization-title",s(526),s(512),s(476),s(625),"address-level1",s(560),s(607),s(613),s(514),s(507),s(547),"cc-name","cc-given-name",s(520),s(584),s(609),s(443),s(519),s(450),"cc-csc","cc-type","bday",s(559),s(449),"bday-year",s(569),s(628)]);function N(t){return"<"+C(t)+">"}function C(t){const e=s,n=(t.getAttribute?.(L)??"")[e(444)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(454)]||"")[e(585)]()[e(444)]()[e(457)](/\s+/)[e(416)](Boolean):[];return t instanceof HTMLInputElement&&t[e(478)]===e(556)?e(497):o[e(492)](t=>t[e(619)](e(516)))?e(630):o[e(492)](t=>[e(424),"given-name","family-name",e(524),e(616),e(554),e(584)][e(594)](t))?e(509):o.includes(e(562))?e(574):o.includes("tel")?"Phone":o[e(492)](t=>t.startsWith("bday"))?e(603):o.includes(e(569))?"Sex":o[e(492)](t=>["street-address",e(512),e(476),e(625),e(599),e(560),"address-level3","address-level4","postal-code",e(514),"country-name"][e(594)](t))?"Address":o.includes(e(548))||o[e(594)]("organization-title")?e(503):t.getAttribute?.(A)?.[e(585)]()===e(422)?e(581):"Sensitive"}function D(t){const e=s;return t.hasAttribute(e(456))||"ignore"===t[e(475)](A)?.[e(585)]()}function H(t){const e=s,n=t[e(475)](A);return""===n||n?.toLowerCase()===e(422)}function P(t){const e=s;if(t instanceof HTMLInputElement){if(t.type===e(556))return!0;if(t[e(478)]===e(570))return!1;const n=t[e(475)]("role");if(n&&"searchbox"===n[e(585)]())return!1;if((t[e(454)]||"").toLowerCase()[e(444)]().split(/\s+/)[e(416)](Boolean)[e(492)](t=>k[e(499)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t.autocomplete||"").toLowerCase()[e(444)]()[e(457)](/\s+/)[e(416)](Boolean)[e(492)](t=>k[e(499)](t)))return!0}return!1}function R(t){return!!H(t)||!!P(t)}function U(){const t=s,e=[],n=t=>{const e=u,n=t.getBoundingClientRect();if(n[e(462)]<=0||n[e(587)]<=0)return;const o=Math[e(528)](0,n[e(617)]),a=Math[e(528)](0,n[e(551)]),i=Math[e(528)](0,Math.min(n[e(578)],window.innerWidth)-o),r=Math[e(528)](0,Math[e(508)](n[e(592)],window[e(629)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document[t(479)]("["+A+t(605)+A+t(484))[t(463)](o=>{const a=t,i=n(o);if(!i)return;const r=C(o)||a(581);e.push({...i,label:r})});return document[t(479)](t(419))[t(463)](o=>{const a=t;if(!H(i=o)&&!P(i))return;var i;if(D(o))return;const r=n(o);if(!r)return;const c=C(o);e[a(425)]({...r,label:c})}),e}const B=()=>localStorage[s(452)](m)===s(610);function O(t){const e=s,n=encodeURIComponent(t)+"=",o=document[e(455)].split("; ");for(const t of o)if(t.startsWith(n))return decodeURIComponent(t.slice(n[e(489)]))}function z(t,e){const n=s,o=localStorage.getItem(S),a=null==o?void 0:Number(o),i=Number[n(545)](e)?Number(e):"number"==typeof a&&Number.isFinite(a)?a:86400,r="https:"===window[n(453)][n(557)],c=[n(552)+encodeURIComponent(t),"Max-Age="+i,n(435),n(601)];r&&c.push(n(441)),document.cookie=c.join("; ")}function W(){const t=s,e=window[t(453)][t(557)]===t(537);document[t(455)]="intent_sid=; Max-Age=0; Path=/; SameSite=Lax"+(e?t(583):"")}function F(){const t=s,e=O("intent_sid");if(!B())return e&&W(),void(l="");if(e)return void(l=e);const n=typeof crypto!==t(571)&&typeof crypto[t(440)]===t(600)?crypto[t(440)]():Date.now()+"-"+Math[t(553)]();l=n,z(l)}function _(){return F(),B()&&Boolean(l)&&(()=>{const t=s,e=localStorage[t(452)](M);return typeof e===t(582)&&e[t(444)]()[t(489)]>0})()}function j(){const t=["INPUT","length","onload","intent:data-sid-max-age","some","367272CdeNqo","tagName","target","intent","Password","7JHQjnk","has","143ZaQRyH","#e5e7eb","getContext","Organization","removeEventListener","secure","toISOString","country-name","min","Name","timestamp","readAsDataURL","address-line1","attributes","country","setAttribute","cc-","intent:geo","page-blur","cc-exp-month","cc-additional-name","342396tUzNcz","key","getCurrentPosition","additional-name","visibilityState","street-address","application/json","max","result","4124qVauDt","textAlign","fillText","fillStyle","latitude","error","https://intent.callimacus.ai","https:","geolocation","speed","cloneNode","setTimeout","round","altitude","middle","isFinite","innerWidth","postal-code","organization","createElement",'[role="link"]',"top","intent_sid=","random","cc-given-name","disabled","password","protocol","keydown","bday-day","address-level2","getBoundingClientRect","email","body","strokeRect",'input[type="button"]',"hidden","227345sezans","10TKcEVY","sex","search","undefined","label","permissions","Email","scrollY","onLine","number","right","<no visible label>","globalAlpha","Redacted","string","; Secure","cc-family-name","toLowerCase","609TAeBJR","height","onerror","floor","__intent__sdk__initialized__","lon","bottom","now","includes","localhost","scroll","omit","accuracy","address-level1","function","SameSite=Lax","longitude","Birthday","storage",'="mask"], [',"hasFocus","address-level3","given-name","cc-number","granted","a[href]","host","address-level4","img","intent:consent","cc-name","left","title","startsWith","PERMISSION_DENIED","pixel body fallback failed","scrollX","2270862lCGTxw","center","address-line3","x-sl-access-token","UNKNOWN","webauthn","innerHeight","Credit card","filter","href","code","input, textarea","8098gKpPho","isSecureContext","mask","closest","name","push","intent:data-base-url","pageview","textContent","html","1358152zIzjLf","nickname","#374151","stringify","29dLqoGL","Path=/","hostname","altitudeAccuracy","heading","defineProperty","randomUUID","Secure","Sensitive","cc-exp","trim","textBaseline","load","blur","referrer","bday-month","cc-exp-year","toDataURL","getItem","location","autocomplete","cookie","data-html2canvas-ignore","split","lat","visibilitychange","intent:data-client-id","image/jpeg","width","forEach","TEXTAREA","value","POST","focus","/events","click","button","/p.gif","addEventListener","slice","canvas","getAttribute","address-line2","enabled","type","querySelectorAll","page-focus","outerHTML","tel","Unexpected FileReader result type",'=""]',"pointerdown","data-intent-redact-label","deviceGeoSent"];return(j=function(){return t})()}function q(){return!_()||w}async function G(e){const n=s,o=function(t){const e=s,n=t[e(540)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array.from(t[e(513)])[e(463)](({name:t,value:e})=>{n.setAttribute(t,e)}),n.value=R(t)?N(t):t[e(465)],t[e(555)]&&n[e(515)](e(555),""),n[e(481)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array.from(t.attributes)[e(463)](({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(465)]=R(t)?N(t):t[e(465)],t.disabled&&n.setAttribute(e(555),""),n[e(481)]):t[e(481)]}(e),a=e[n(561)](),i={useCORS:!0,...{x:window[n(622)],y:window.scrollY,width:window[n(546)],height:window.innerHeight,scale:1},ignoreElements:t=>t instanceof Element&&D(t)},r=await t(document[n(563)],i),c=r[n(462)],u=r.height,d=Math[n(528)](c,u),l=.8*Math[n(528)](window[n(546)],window[n(629)]),f=Math.min(1,l/d),m=12/(a[n(587)]||1),p=Math[n(508)](1,Math[n(528)](f,m)),g=Math[n(542)](c*p),h=Math[n(542)](u*p),w=document[n(549)](n(474));w[n(462)]=g,w.height=h;const y=w[n(502)]("2d");y.drawImage(r,0,0,c,u,0,0,g,h);const b=U();if(b[n(489)]){y.save(),y[n(580)]=1;for(const t of b){const e=Math[n(542)](t.x*p),o=Math[n(542)](t.y*p),a=Math.round(t.w*p),i=Math[n(542)](t.h*p);y[n(533)]=n(501),y.fillRect(e,o,a,i),y.strokeStyle="#9ca3af",y.lineWidth=Math[n(528)](1,Math[n(589)](.02*Math[n(508)](a,i))),y[n(564)](e,o,a,i);const r=Math[n(528)](10,Math[n(508)](22,Math.floor(.35*i)));y.font=r+"px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",y[n(533)]=n(432),y[n(531)]=n(624),y[n(445)]=n(544);const c="<"+(t[n(572)]?.[n(444)]().length?t.label:n(442))+">";y[n(532)](c,e+a/2,o+i/2,a-6)}y.restore()}const v=w[n(451)](n(461),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a[n(462)],h:a[n(587)]},img:v}}function J(){const t=s,e=localStorage[t(452)](M),n={"Content-Type":t(527)};return e&&(n[t(626)]=e),l&&(n["x-intent-sid"]=l),n}async function K(t,e){const n=s,o=(localStorage.getItem(x)??I)+n(468),a=JSON[n(433)](t);try{if((await fetch(o,{method:n(466),headers:J(),body:a,keepalive:e,credentials:n(597)})).ok)return}catch{}try{await async function(t,e=!1){const n=s,o=(localStorage[n(452)](x)??I)+n(471);if(!(await fetch(o,{method:n(466),headers:J(),body:JSON.stringify(t),keepalive:e,credentials:n(597),cache:"no-store"})).ok)throw new Error(n(621))}(t,e)}catch{}}async function V(t,e,n,o){const a=s;if(!_())return;const i={...e,localTime:(new Date)[a(506)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i[a(465)]=R(n)?N(n):n[a(465)]);let r="",c={x:0,y:0,w:0,h:0},u="";const d=!("scroll"===t||t===a(518)||t===a(480)),l=Date.now(),m=l-f>=5e3;let p=o;const g=t===a(469)||"input-submit"===t||t===a(427);d&&!p&&(g||m)&&(p=await G(n),f=l),p&&(r=p[a(429)],c=p.bbox,u=p[a(614)]);const h={ts:Date[a(593)](),event:t,props:i,html:t===a(518)||"page-focus"===t?"":r,bbox:c,img:u},w="hidden"===document[a(525)]||t===a(518);await K(h,w)}function X(){const t=s;return localStorage[t(452)](p)===t(477)}async function Y(t={}){const e=s;if(!_())return;const n=typeof t[e(458)]===e(577)&&"number"==typeof t[e(591)];if(n&&h)return;if(!n&&g)return;const o=localStorage.getItem("intent:data-ip"),a={context:await c()};o&&(a.ip=o);for(const[e,n]of Object.entries(t))a[e]=n;await V("context",a,document.body,{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?h=!0:g=!0}async function Q(){const t=s,e={canSend:_(),geoEnabled:X(),deviceGeoSent:h};if(!e.canSend||!e.geoEnabled||e[t(487)])return;const n={secure:window[t(421)],proto:location[t(557)],host:location[t(436)]};if(n[t(505)]||(t(612),t(595)),!(t(538)in navigator))return;if(b)return;b=!0,w=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};try{await(navigator[t(573)]?.query({name:t(538)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=u;a||(a=!0,Number[i(545)](t)&&Number[i(545)](n)&&await Y({lat:t,lon:n,source:"device"}),b=!1,w=!1,v=!0,e())};navigator[n(538)][n(523)](t=>{const e=u,n=t.coords;i(n[e(534)],n[e(602)],(n[e(598)],typeof n[e(543)]===e(577)&&n[e(543)],typeof n[e(437)]===e(577)&&n.altitudeAccuracy,typeof n[e(438)]===e(577)&&n[e(438)],typeof n[e(539)]===e(577)&&n[e(539)],t[e(510)],document[e(525)],document[e(606)]()))},t=>{const e=u,n=t?.[e(418)];1===n?e(620):2===n||(3===n||e(627)),navigator[e(576)],document[e(525)],document[e(606)](),window[e(421)],location[e(557)],location[e(436)],i(void 0,void 0)},o)})}function Z(){const t=s;if(y||!X()||h)return;y=!0;const e=()=>{const t=u;window[t(504)](t(485),e,!0),window.removeEventListener(t(558),e,!0),Q()};window[t(472)]("pointerdown",e,!0),window[t(472)](t(558),e,!0)}F();let $=!document[s(566)]&&document[s(606)](),tt=document.hasFocus();const et=()=>{const t=s;if(q())return;const e=!document[t(566)]&&document[t(606)]();e&&(tt=!0),tt||e?e!==$&&($=e,V(e?"page-focus":"page-blur",{},document[t(563)])):$=e};function nt(){const t=s;(function(){const t=s,e=globalThis;return!e[T]&&(Object[t(439)](e,T,{value:!0,configurable:!1,enumerable:!1,writable:!1}),!0)})()&&(window[t(472)](t(446),()=>{const e=t;_()&&(Y(),(window[e(421)]||"localhost"===location.hostname)&&(X()&&Z(),window[e(472)]("focus",()=>{!h&&X()&&!b&&v&&Q()}),document[e(472)](e(459),()=>{!document.hidden&&!h&&X()&&!b&&v&&Q()})))}),window.addEventListener(t(604),e=>{e[t(522)]===m&&(function(){const t=s;return localStorage[t(452)](m)===t(610)}()?(g=!1,Y(),X()&&Z()):(g=!1,h=!1)),e.key===p&&(X()?Z():h=!1)}),window[t(472)]("load",()=>{const e=t;_()&&V("pageview",{url:window[e(453)][e(417)],title:document[e(618)],ref:document[e(448)]},document.body)}),addEventListener(t(485),function(t,e){let n=0;return(...o)=>{const a=Date[u(593)]();a-n>=e&&(n=a,t(...o))}}(e=>{const n=t;if(q())return;const o=e[n(495)]instanceof Element?e.target[n(423)](E):null;o instanceof HTMLElement&&(d=G(o))},50),{capture:!0,passive:!0}),addEventListener(t(469),async e=>{const n=t;if(q())return;const o=e.target instanceof Element?e.target.closest(E):null;if(!(o instanceof HTMLElement))return;const a=function(t){const e=s;return t[e(475)]("aria-label")??t[e(618)]??t[e(428)]?.[e(444)]()??e(579)}(o),i=d?await d:void 0;d=void 0,await V(n(469),{tag:o[n(494)],label:a},o,i)},!0),addEventListener(t(558),e=>{const n=t;if(!q()&&"Enter"===e[n(522)]){const t=e.target;if(t instanceof HTMLElement&&(t[n(494)]===n(488)||t.tagName===n(464))){const e=t instanceof HTMLInputElement?t[n(424)]:void 0,o=t.id||void 0;V("input-submit",{tag:t[n(494)],name:e??o},t)}}},{capture:!0}),[t(467),t(447)][t(463)](e=>{window[t(472)](e,et)}),document[t(472)](t(459),et),window[t(472)](t(596),function(t,e){let n;return(...o)=>{const a=u;void 0!==n&&window.clearTimeout(n),n=window[a(541)](()=>{n=void 0,t(...o)},e)}}(()=>{const e=t;q()||V(e(596),{scrollX:window[e(622)],scrollY:window[e(575)]},document[e(563)])},250),{passive:!0}),window[t(496)]??={send(e,n){const o=t;_()&&V(e,n,document[o(563)])}})}function ot(t,e){const n=ut;try{if(void 0===e)return;localStorage[n(390)](t,e?"intent:consent"===t?n(374):"enabled":n(386))}catch{}}function at(){const t=["granted","30xbtOby","sidMaxAgeSeconds","isFinite","321796PvPjVs","now","clientId","intent:consent","3734mBaITA","intent:geo","consent","number","disabled","1091754MhwCWx","undefined","intent:data-base-url","setItem","66rOuigJ","randomUUID","1134354aKCgRU","function","baseUrl","10lSDGqI","362872Aqqgea","484765rsAskh","intent_sid","random","intent:data-ip","2693425dJlscq","https://intent.callimacus.ai"];return(at=function(){return t})()}function it(t={}){const e=ut;if(localStorage[e(390)]("intent:data-client-id",t[e(380)]??""),localStorage[e(390)](e(371),t.ip??""),localStorage[e(390)](e(389),t[e(395)]??e(373)),typeof t.sidMaxAgeSeconds===e(385)&&localStorage.setItem("intent:data-sid-max-age",String(t[e(376)])),ot(e(381),t[e(384)]),ot(e(383),t.geo),t[e(384)]){if(!O(e(369))){z(typeof crypto!==e(388)&&typeof crypto[e(392)]===e(394)?crypto.randomUUID():Date[e(379)]()+"-"+Math[e(370)](),t.sidMaxAgeSeconds)}}nt()}function rt(){return O(ut(369))}function ct(){F()}function st(){W()}function ut(t,e){const n=at();return(ut=function(t,e){return n[t-=369]})(t,e)}function dt(t){const e=ut;Number[e(377)](t)&&localStorage[e(390)]("intent:data-sid-max-age",String(t));const n=O(e(369));n&&z(n,t)}!function(){const t=ut,e=at();for(;;)try{if(287804===-parseInt(t(398))/1+parseInt(t(382))/2*(parseInt(t(391))/3)+parseInt(t(378))/4*(-parseInt(t(396))/5)+parseInt(t(393))/6+parseInt(t(372))/7+-parseInt(t(397))/8+-parseInt(t(387))/9*(-parseInt(t(375))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();export{st as clearIntentSessionId,ct as ensureIntentSessionId,rt as getIntentSessionId,it as initIntent,ot as setFlag,dt as setIntentSessionMaxAge};
|