@fingerly/web-js 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,72 @@
1
- # Temporary Holding Version
1
+ # @fingerly/web-js
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Fingerly browser SDK. It reads the signals a browser exposes, sends them to
4
+ Fingerly, and returns a stable visitor ID with a suspect score, so you can
5
+ recognise returning visitors and spot automation, tampering and abuse.
6
+
7
+ ```
8
+ npm install @fingerly/web-js
9
+ ```
10
+
11
+ Using a framework? The bindings wrap this package:
12
+ [`@fingerly/react`](https://www.npmjs.com/package/@fingerly/react),
13
+ [`@fingerly/vue`](https://www.npmjs.com/package/@fingerly/vue),
14
+ [`@fingerly/next`](https://www.npmjs.com/package/@fingerly/next),
15
+ [`@fingerly/nuxt`](https://www.npmjs.com/package/@fingerly/nuxt),
16
+ [`@fingerly/svelte`](https://www.npmjs.com/package/@fingerly/svelte) and
17
+ [`@fingerly/angular`](https://www.npmjs.com/package/@fingerly/angular).
18
+
19
+ ## Load once, identify when it matters
20
+
21
+ ```ts
22
+ import { load } from '@fingerly/web-js'
23
+
24
+ // A public SDK key from the dashboard. It is scoped to the origins you list,
25
+ // which is what makes it safe to ship in the page.
26
+ const fingerly = await load({ apiKey: 'fly_pk_production_…' })
27
+
28
+ // Later, from your consent tool, or pass consent: 'granted' to load() if you
29
+ // already have consent or another lawful basis.
30
+ fingerly.setConsent('granted')
31
+
32
+ // When the visitor does something worth protecting: sign-up, login, checkout.
33
+ const { requestId, visitorId, suspectScore } = await fingerly.identify({ tag: 'login' })
34
+ ```
35
+
36
+ Loading collects nothing and sends nothing. Consent defaults to `pending`, and
37
+ `identify()` rejects with a `ConsentError` until it is `granted`.
38
+
39
+ Send `requestId` to your server and read the full result there with a secret
40
+ key (see the server SDKs), rather than trusting what the page reports: the page
41
+ runs code the visitor controls.
42
+
43
+ ## Errors
44
+
45
+ - `load()` throws for a configuration mistake, such as a missing `apiKey`.
46
+ - `identify()` rejects with a `ConsentError` while consent is not `granted`,
47
+ and with a `TransportError` when the request cannot be completed. Branch on
48
+ its `status` and `retryable`.
49
+
50
+ ## Without a bundler
51
+
52
+ The package includes a minified script-tag build, `dist/browser.global.js`,
53
+ which defines a global `Fingerly`. Serve it from your own site under a neutral
54
+ name and load it before your code:
55
+
56
+ ```html
57
+ <script src="/assets/app-core.js"></script>
58
+ <script>
59
+ Fingerly.load({ apiKey: 'fly_pk_production_…', consent: 'granted' })
60
+ .then((fingerly) => fingerly.identify({ tag: 'login' }))
61
+ .then((result) => console.log(result.requestId))
62
+ </script>
63
+ ```
64
+
65
+ ## Documentation
66
+
67
+ The full guide, including consent tools, first-party proxies and the server
68
+ side, is at [docs.fingerly.io](https://docs.fingerly.io/docs/sdks/javascript).
69
+
70
+ ## Licence
71
+
72
+ Apache-2.0
@@ -0,0 +1 @@
1
+ "use strict";var Fingerly=(()=>{var G=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var yt=Object.getOwnPropertyNames;var wt=Object.prototype.hasOwnProperty;var vt=(e,t)=>{for(var n in t)G(e,n,{get:t[n],enumerable:!0})},bt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yt(t))!wt.call(e,o)&&o!==n&&G(e,o,{get:()=>t[o],enumerable:!(r=ht(t,o))||r.enumerable});return e};var St=e=>bt(G({},"__esModule",{value:!0}),e);var Kn={};vt(Kn,{ConsentError:()=>I,FingerlyClient:()=>N,SOURCE:()=>u,TransportError:()=>b,browserSources:()=>U,inspectIntegrity:()=>P,load:()=>gt});var _t=["granted","pending","denied"];function Z(e){if(!_t.includes(e))throw new TypeError(`Fingerly consent must be 'granted', 'pending' or 'denied' (received ${JSON.stringify(e)})`)}var I=class extends Error{constructor(e){super(`Fingerly needs consent before it can identify this visitor (consent is ${e})`),this.state=e,this.name="ConsentError",this.code="consent_required"}},u={navigator:"navigator",userAgentData:"user_agent_data",languages:"languages",plugins:"plugins",vendor:"vendor",engine:"engine",math:"math",errors:"errors",screen:"screen",screenFrame:"screen_frame",colorGamut:"color_gamut",mediaQueries:"media_queries",canvas:"canvas",webgl:"webgl",webglExtensions:"webgl_extensions",audio:"audio",audioLatency:"audio_latency",fonts:"fonts",fontPreferences:"font_preferences",intl:"intl",timezone:"timezone",storage:"storage",storageQuota:"storage_quota",storageDurability:"storage_durability",hardware:"hardware",touch:"touch",sensors:"sensors",battery:"battery",mediaDevices:"media_devices",network:"network",speech:"speech",timing:"timing",permissions:"permissions",automation:"automation",shields:"shields",domBlockers:"dom_blockers"};function p(e,t){let n=e.sources[t];return n?.status==="ok"?n.value:void 0}function fe(e,t){return e.sources[t]?.status}function V(e,t){return fe(e,t)==="blocked"}function C(e,t=1){let n=e.reduce((o,a)=>o+a.weight,0)*t,r="low";return n>=2?r="high":n>=1.25&&(r="medium"),{value:n>=1,confidence:r,reasons:[...e].sort((o,a)=>a.weight-o.weight).map(o=>o.reason)}}function X(){return{value:!1,confidence:"low",reasons:[]}}var Et="20030107";function xt(e){let t=[],n=p(e,u.automation),r=p(e,u.navigator),o=p(e,u.permissions),a=p(e,u.engine),i=p(e,u.screen),s=e.integrity;if((n?.webdriver===!0||r?.webdriver===!0)&&t.push({reason:"navigator-webdriver-true",weight:1}),n?.cdp_artifacts&&n.cdp_artifacts.length>0&&t.push({reason:`cdp-artifacts-${n.cdp_artifacts.length}`,weight:1.2}),n?.distinctive_properties&&n.distinctive_properties.length>0&&t.push({reason:`automation-globals-${n.distinctive_properties.join(",")}`,weight:1}),s.patched_natives.length>0){let h=s.patched_natives.slice(0,3).join(",");t.push({reason:`patched-natives-${s.patched_natives.length}-${h}`,weight:Math.min(1.8,.9+.3*s.patched_natives.length)})}let c=s.lies.filter(h=>h.kind==="contradiction"),l=new Set(c.map(h=>h.id)),g=c.length-(l.has("engine-vs-error-shapes")&&l.has("user-agent-vs-error-shapes")?1:0);c.length>0&&t.push({reason:`signal-contradictions-${c.map(h=>h.id).join(",")}`,weight:Math.min(1.5,.5*g)});let y=s.lies.filter(h=>h.kind==="descriptor");return y.length>0&&t.push({reason:`redefined-properties-${y.map(h=>h.id).join(",")}`,weight:Math.min(1.4,.6*y.length)}),a?.agrees===!1&&t.push({reason:`engine-mismatch-claimed-${a.claimed}-observed-${a.observed}`,weight:1.3}),r?.product_sub!==void 0&&a?.observed==="chromium"&&r.product_sub!==Et&&t.push({reason:"product-sub-inconsistent",weight:.8}),o?.inconsistent===!0&&t.push({reason:"notification-permission-inconsistent",weight:1.1}),a?.observed==="chromium"&&r?.plugin_count===0&&r.max_touch_points===0&&t.push({reason:"chromium-desktop-with-no-plugins",weight:.7}),(i?.inner_width===0||i?.inner_height===0)&&t.push({reason:"zero-sized-viewport",weight:.8}),n?.window_external&&/Sequentum/i.test(n.window_external)&&t.push({reason:"window-external-sequentum",weight:1}),C(t)}var Tt=["swiftshader","llvmpipe","softpipe","mesa offscreen","android emulator","generic renderer","apple software renderer","microsoft basic render","virgl","vmware svga","virtualbox","parallels"];function Mt(e){if(!e)return;let t=e.toLowerCase();return Tt.find(n=>t.includes(n))}function kt(e){return e?/Android|iPhone|iPad|iPod|Mobile/i.test(e):!1}function Ct(e){let t=p(e,u.webgl),n=p(e,u.navigator),r=p(e,u.screen),o=p(e,u.touch),a=p(e,u.sensors);if(!t&&!n)return X();let i=[],s=kt(n?.user_agent),c=Mt(t?.unmasked_renderer??t?.renderer);return c&&i.push({reason:`software-renderer-${c.replace(/\s+/g,"-")}`,weight:s?1.5:.7}),s&&o?.max_touch_points===0&&i.push({reason:"mobile-ua-without-touch-points",weight:.9}),s&&o?.pointer_coarse===!1&&o.any_hover===!0&&i.push({reason:"mobile-ua-with-fine-pointer-and-hover",weight:.9}),s&&a?.device_motion===!1&&a.device_orientation===!1&&i.push({reason:"mobile-ua-without-motion-sensors",weight:.7}),s&&r?.device_pixel_ratio===1&&i.push({reason:"mobile-ua-with-dpr-1",weight:.6}),typeof n?.hardware_concurrency=="number"&&n.hardware_concurrency===1&&i.push({reason:"single-core-reported",weight:.4}),s&&r?.width===1080&&r.height===1920&&r.device_pixel_ratio===1&&i.push({reason:"emulator-default-screen-geometry",weight:.5}),C(i)}function Ot(e){let t=p(e,u.navigator),n=p(e,u.fonts),r=p(e,u.mediaDevices),o=p(e,u.webgl),a=p(e,u.screen),i=p(e,u.network);if(!t)return X();let s=[];n?.available&&n.probed&&n.probed>20&&n.available.length/n.probed<.15&&s.push({reason:"font-set-is-platform-default-only",weight:.7}),r&&r.audio_input===0&&r.video_input===0&&r.audio_output===0&&s.push({reason:"no-media-devices-attached",weight:.8});let c=o?.unmasked_renderer??o?.renderer;return c&&/^(generic|google|unknown)\b/i.test(c)&&s.push({reason:"generic-gpu-renderer",weight:.5}),i?.effective_type==="4g"&&i.rtt===0&&i.downlink===10&&s.push({reason:"synthetic-network-information",weight:.4}),t.languages?.length===1&&t.languages[0]==="en-US"&&a?.device_pixel_ratio===1&&s.push({reason:"untouched-locale-defaults",weight:.3}),C(s)}var D=2147483648,pe=10737418240;function Rt(e,t){return e-(t??0)===pe}var me=5;function At(e){let t=p(e,u.shields),n=p(e,u.storage),r=p(e,u.navigator),o=p(e,u.engine),a=p(e,u.canvas),i=[],s=o?.observed==="chromium";return t?.brave===!0&&i.push({reason:"brave-vendor-api",weight:.9}),t?.brave_claimed===!0&&i.push({reason:"brave-named-in-ua-ch-brands",weight:.5}),s&&n?.quota===D&&i.push({reason:"storage-quota-is-brave-constant",weight:1}),s&&typeof r?.plugin_count=="number"&&r.plugin_count>me&&i.push({reason:"plugin-list-padded",weight:.8}),a?.unstable===!0&&i.push({reason:"canvas-noised-per-read",weight:.9}),s&&fe(e,u.network)==="unsupported"&&i.push({reason:"network-information-api-absent",weight:.3}),C(i)}function Dt(e){let t=p(e,u.navigator),n=p(e,u.hardware),r=t?.device_memory??n?.device_memory;if(!(typeof r!="number"||r<=0))return It(e)?void 0:r}function It(e){let t=p(e,u.shields),n=p(e,u.storage),r=p(e,u.navigator),o=p(e,u.canvas);return t?.brave===!0||t?.brave_claimed===!0||t?.canvas_noise===!0||n?.quota===D||typeof r?.plugin_count=="number"&&r.plugin_count>me||o?.unstable===!0}var Nt=1073741824,Pt=.25,Lt=1073741824,Ut=1.3,Bt=5;function Ft(e){return e.quota!==D?e.quota:e.legacy_quota===D?void 0:e.legacy_quota}function Wt(e){let t=p(e,u.storage),n=p(e,u.engine),r=p(e,u.storageDurability);if(!t&&!r)return X();let o=[],a=n?.observed;if((t?.origin_filesystem==="transient"||t?.safari_private===!0)&&o.push({reason:"safari-private-origin-filesystem-refused",weight:1.4}),a==="gecko"&&t?.origin_filesystem==="refused"&&o.push({reason:"firefox-private-origin-filesystem-refused",weight:1.3}),a==="gecko"&&t?.service_worker===!1&&o.push({reason:"firefox-no-service-worker-registration",weight:1.2}),a==="chromium"){r?.honored===!0&&typeof r.ratio=="number"&&typeof r.rounds=="number"&&r.rounds>=Bt&&r.ratio<Ut&&o.push({reason:"chromium-indexeddb-writes-are-not-durable",weight:1.4});let i=t?Ft(t):void 0;if(typeof i=="number"&&!Rt(i,t?.usage)){t?.quota===D&&i<pe&&o.push({reason:"chromium-quota-below-static-pool",weight:1.3}),i<Nt&&o.push({reason:"chromium-storage-quota-capped",weight:1.3});let s=Dt(e);typeof s=="number"&&i/(s*Lt)<Pt&&o.push({reason:"chromium-storage-quota-ratio-capped",weight:1.3})}}return t?.local_storage===!1&&t?.session_storage===!1&&o.push({reason:"web-storage-unavailable",weight:.4}),t?.indexed_db===!1&&o.push({reason:"indexeddb-unavailable",weight:.3}),C(o)}var qt=100;function $t(e,t){return typeof e!="number"||typeof t!="number"||e<=0||t<=0?!1:e%200===0&&t%100===0}function Gt(e){let t=[],n=p(e,u.timing),r=p(e,u.intl),o=p(e,u.screen),a=p(e,u.navigator),i=p(e,u.canvas),s=p(e,u.engine);typeof n?.now_resolution=="number"&&n.now_resolution>=qt&&t.push({reason:"clock-resolution-clamped-to-100ms",weight:1.6}),r?.timezone==="UTC"&&r.timezone_offset===0&&t.push({reason:"timezone-forced-to-utc",weight:.7}),a?.language==="en-US"&&a.languages?.length===1&&t.push({reason:"locale-forced-to-en-us",weight:.5}),a?.hardware_concurrency===2&&t.push({reason:"hardware-concurrency-pinned-to-2",weight:.4}),(V(e,u.canvas)||i?.unstable===!0)&&t.push({reason:"canvas-readback-refused-or-noised",weight:.8}),V(e,u.audio)&&t.push({reason:"audio-readback-refused-or-noised",weight:.5}),$t(o?.inner_width,o?.inner_height)&&t.push({reason:"viewport-letterboxed-to-200x100-grid",weight:.5}),V(e,u.fonts)&&t.push({reason:"font-enumeration-restricted",weight:.5});let c=s?.observed!==void 0&&s.observed!=="gecko";return c&&t.length>0&&t.push({reason:"rfp-tells-on-non-gecko-engine",weight:0}),C(t,c?.35:1)}function ee(e){return{incognito:Wt(e),shields:At(e),tor:Gt(e),emulator:Ct(e),automation:xt(e),farm:Ot(e)}}var f=class extends Error{constructor(e){super(e??"unsupported"),this.reason=e,this.name="UnsupportedSignal"}},E=class extends Error{constructor(e){super(e??"blocked"),this.reason=e,this.name="BlockedSignal"}},R=class extends Error{constructor(e){super(e??"timeout"),this.reason=e,this.name="TimedOutSignal"}};function Vt(e){if(e instanceof f||e instanceof E||e instanceof R)return e.reason;if(e instanceof Error&&typeof e.name=="string"&&e.name!=="Error")return e.name}var x=typeof globalThis.performance?.now=="function"?()=>globalThis.performance.now():()=>Date.now(),H={budgetMs:1200,defaultSourceTimeoutMs:300,concurrency:6};function F(e){return Math.max(0,Math.round(e))}function Ht(e){return e instanceof f?"unsupported":e instanceof E?"blocked":e instanceof R?"timeout":"error"}async function jt(e,t,n,r,o){let a=x(),i=t-a;if(i<=0)return{status:"timeout",ms:0,reason:"budget-exhausted"};let s=Math.min(e.timeoutMs??n,i),c=new AbortController,l=()=>c.abort(new R("aborted"));r?.addEventListener("abort",l,{once:!0});let g=setTimeout(()=>c.abort(new R("source-timeout")),s),y={signal:c.signal,budgetRemainingMs:()=>Math.max(0,t-x()),completed:h=>o[h]};try{let h=await Promise.race([(async()=>e.run(y))(),new Promise((w,_)=>{c.signal.addEventListener("abort",()=>_(c.signal.reason??new R("source-timeout")),{once:!0})})]);return{status:"ok",ms:F(x()-a),value:h}}catch(h){let w=Ht(h),_=Vt(h);return _===void 0?{status:w,ms:F(x()-a)}:{status:w,ms:F(x()-a),reason:_}}finally{clearTimeout(g),r?.removeEventListener("abort",l)}}async function Xt(e,t={}){let n=t.budgetMs??H.budgetMs,r=t.defaultSourceTimeoutMs??H.defaultSourceTimeoutMs,o=Math.max(1,t.concurrency??H.concurrency),a=t.tiers??["fast","deferred"],i=x(),s=i+n,c={},l={...t.completed??{}},g=!1;for(let y of a){let h=e.filter(T=>T.tier===y);if(h.length===0)continue;let w=0,_=async()=>{for(;w<h.length;){let T=h[w++];if(!T)continue;if(x()>=s||t.signal?.aborted){g=!0,c[T.id]={status:"timeout",ms:0,reason:"budget-exhausted"};continue}let $=await jt(T,s,r,t.signal,l);$.status==="timeout"&&(g=!0),c[T.id]=$,l[T.id]=$}};await Promise.all(Array.from({length:Math.min(o,h.length)},_))}return{outcomes:c,elapsedMs:F(x()-i),truncated:g}}function zt(e="v1"){if(!/^v[1-9]\d*$/.test(e)||e.trim()!==e)throw new TypeError('apiVersion must be a version such as "v1" or "v2"');return e}var Qt="https://api.fingerly.io",te="x-api-key",Kt="Idempotency-Key",b=class extends Error{constructor(e,t,n=!1,r){super(e),this.status=t,this.retryable=n,this.code=r,this.name="TransportError"}};async function ne(e){try{let n=(await e.json())?.error?.code;return typeof n=="string"&&n!==""?n:void 0}catch{return}}function re(e,t){return new b(`The server refused the submission (${e.status})`,e.status,Yt(e.status),t)}function Yt(e){return e===404||e===405||e===408||e===425||e===429||e>=500&&e<=599}function ge(e,t){return`${e}/api/${t}/ingest`}function j(e){return ge(Qt,e)}function Jt(e,t){let n=e.trim().replace(/\/+$/,"");if(n===""||n.includes("?")||n.includes("#"))throw new TypeError("A Fingerly endpoint must be a non-empty URL or path without a query or fragment");if(!(n.startsWith("/")||/^https?:\/\//i.test(n)))throw new TypeError("A Fingerly endpoint must be an absolute URL or a root-relative browser path");return/^https?:\/\/[^/]+$/i.test(n)?ge(n,t):n}function oe(e,t){let n=Math.min(2e3,100*2**(e-1));return Math.floor(t()*n)}function Zt(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues=="function"){let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}return`fingerly-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`}var en=class{constructor(e){if(!e.apiKey)throw new b("An SDK key is required to submit a fingerprint");if(e.endpoint!==void 0&&e.endpoints!==void 0)throw new TypeError("Pass endpoints or the deprecated endpoint option, not both");this.apiKey=e.apiKey;let t=zt(e.apiVersion),n=e.endpoints??e.endpoint,r=n===void 0?[j(t)]:Array.isArray(n)?[...n]:[n];if(r.length===0)throw new TypeError("The endpoints array must not be empty");let o=r.map(i=>Jt(i,t));n!==void 0&&e.fallbackToDefaultEndpoint&&(o.includes(j(t))||o.push(j(t))),this.urls=o,this.maxAttempts=Math.max(1,this.urls.length,e.maxAttempts??3),this.requestTimeoutMs=e.requestTimeoutMs??5e3;let a=e.fetchImpl??globalThis.fetch;if(typeof a!="function")throw new b("No fetch implementation is available; pass one as fetchImpl");this.fetchImpl=a.bind(globalThis)}async submit(e,t){let n,r=JSON.stringify(e),o=Zt(),a=0;for(let i=1;i<=this.maxAttempts;i++){if(t?.aborted)throw new b("The submission was cancelled");try{return await this.attempt(this.urls[a],r,o,t)}catch(s){let c=s instanceof b?s:new b(s instanceof Error?s.message:"The submission could not be sent",void 0,!0);if(!c.retryable||i===this.maxAttempts)throw c;n=c,a=Math.min(a+1,this.urls.length-1),await new Promise(l=>setTimeout(l,oe(i,Math.random)))}}throw n??new b("The submission could not be sent")}async submitSupplement(e,t,n){let r=JSON.stringify(t),o,a=0;for(let i=1;i<=this.maxAttempts;i++){if(n?.aborted)throw new b("The supplement was cancelled");try{await this.postJSON(this.urls[a],r,n);return}catch(s){let c=s instanceof b?s:new b(s instanceof Error?s.message:"The supplement could not be sent",void 0,!0);if(!c.retryable||i===this.maxAttempts)throw c;o=c,a=Math.min(a+1,this.urls.length-1),await new Promise(l=>setTimeout(l,oe(i,Math.random)))}}throw o??new b("The supplement could not be sent")}async postJSON(e,t,n){let r=new AbortController,o=()=>r.abort();n?.addEventListener("abort",o,{once:!0});let a=setTimeout(o,this.requestTimeoutMs);try{let i=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[te]:this.apiKey},body:t,credentials:"omit",signal:r.signal});if(!i.ok)throw re(i,await ne(i));return i}finally{clearTimeout(a),n?.removeEventListener("abort",o)}}async attempt(e,t,n,r){let o=new AbortController,a=()=>o.abort();r?.addEventListener("abort",a,{once:!0});let i=setTimeout(a,this.requestTimeoutMs);try{let s=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[te]:this.apiKey,[Kt]:n},body:t,credentials:"omit",signal:o.signal});if(!s.ok)throw re(s,await ne(s));let c=await s.json();if(typeof c?.request_id!="string"||c.request_id==="")throw new b("The server accepted the submission but returned no request_id");return c}finally{clearTimeout(i),r?.removeEventListener("abort",a)}}},ie="0.1.0",tn=1;function ae(e){return e instanceof b&&e.code==="consent_required"?new I("pending"):e}var se={patched_natives:[],lies:[],engine:{}},N=class{constructor(e){this.consentListeners=new Set;let t=e.consent??"pending";Z(t),this.consentState=t,this.options=e,this.platform=e.platform??"web",this.transport=e.transport??new en({...e.apiVersion===void 0?{}:{apiVersion:e.apiVersion},apiKey:e.apiKey,...e.endpoint===void 0?{}:{endpoint:e.endpoint},...e.endpoints===void 0?{}:{endpoints:e.endpoints},...e.fallbackToDefaultEndpoint===void 0?{}:{fallbackToDefaultEndpoint:e.fallbackToDefaultEndpoint}})}get consent(){return this.consentState}setConsent(e){if(Z(e),e!==this.consentState){this.consentState=e;for(let t of[...this.consentListeners])try{t(e)}catch(n){setTimeout(()=>{throw n},0)}}}onConsentChange(e){return this.consentListeners.add(e),()=>{this.consentListeners.delete(e)}}requireConsent(){if(this.consentState!=="granted")throw new I(this.consentState)}consentScope(e){let t=new AbortController,n=()=>t.abort();e?.aborted?n():e?.addEventListener("abort",n,{once:!0});let r=this.onConsentChange(o=>{o!=="granted"&&n()});return{signal:t.signal,close:()=>{r(),e?.removeEventListener("abort",n)}}}async identify(e={}){this.requireConsent();let t=this.consentScope(e.signal);try{return await this.identifyWithConsent(e,t.signal)}finally{t.close()}}async identifyWithConsent(e,t){let n=e.submit!==!1&&e.tiers===void 0,r=await this.collectReport(n?["fast"]:e.tiers??["fast","deferred"],t,n?300:void 0);this.requireConsent();let o=ee(r);if(e.submit===!1)return{requestId:"",visitorId:"",visitorIsNew:!1,visitorConfidence:0,identifiable:!1,duplicate:!1,state:"",reason:"not-submitted",suspectScore:null,suspectLevel:null,triggers:[],verdicts:o,report:r,deferred:Promise.resolve({status:"skipped",reason:"not-submitted"})};let a={sdk:{platform:this.platform,version:ie},consent:this.consentState,signals:r,...e.tag===void 0?{}:{tag:e.tag}},i;try{i=await this.transport.submit(a,t)}catch(c){throw this.requireConsent(),ae(c)}let s={requestId:i.request_id,visitorId:i.visitor_id??"",visitorIsNew:i.visitor_is_new??!1,visitorConfidence:i.visitor_confidence??0,identifiable:i.identifiable??!1,duplicate:i.duplicate??!1,state:i.state??"",reason:i.reason??"",suspectScore:i.suspect_score??null,suspectLevel:i.suspect_level??null,triggers:(i.triggers??[]).map(c=>({signal:c.signal,group:c.group??"",weight:c.weight,confidence:c.confidence??"",reason:c.reason??""})),verdicts:o,report:r,deferred:Promise.resolve({status:"skipped",reason:"explicit-tiers"})};return n?i.duplicate||!i.deferred_token?(s.deferred=Promise.resolve({status:"skipped",reason:i.duplicate?"duplicate":"unsupported-transport"}),s):typeof this.transport.submitSupplement!="function"?(s.deferred=Promise.resolve({status:"skipped",reason:"unsupported-transport"}),s):(s.deferred=this.finishDeferred(r,i.request_id,i.deferred_token,e.signal),s):s}async finishDeferred(e,t,n,r){let o={status:"skipped",reason:"consent-withdrawn"};if(this.consentState!=="granted")return o;let a=this.consentScope(r),i,s,c;try{if(i=await this.collectReport(["deferred"],a.signal,1200,e.sources),this.consentState!=="granted")return o;s={schema:e.schema,budget_ms:e.budget_ms+i.budget_ms,elapsed_ms:e.elapsed_ms+i.elapsed_ms,tiers:["fast","deferred"],sources:{...e.sources,...i.sources},integrity:this.options.integrity?this.options.integrity({sources:{...e.sources,...i.sources}}):se},c=ee(s);let l={sdk:{platform:this.platform,version:ie},consent:this.consentState,signals:i,token:n};return await this.transport.submitSupplement(t,l,a.signal),{status:"submitted",report:i,combinedReport:s,verdicts:c}}catch(l){if(this.consentState!=="granted")return o;let g=ae(l);return{status:"failed",error:g instanceof Error?g:new Error(String(g)),...i===void 0?{}:{report:i},...s===void 0?{}:{combinedReport:s},...c===void 0?{}:{verdicts:c}}}finally{a.close()}}async collect(e={}){this.requireConsent();let t=e.tiers??["fast","deferred"],n=this.consentScope(e.signal);try{let r=await this.collectReport(t,n.signal);return this.requireConsent(),r}finally{n.close()}}async collectReport(e,t,n,r){let o=this.options.sources??[],a={...this.options.schedule,tiers:e,...n===void 0?{}:{budgetMs:n},...t===void 0?{}:{signal:t},...r===void 0?{}:{completed:r}},i=await Xt(o,a),s=this.options.integrity?this.options.integrity({sources:i.outcomes}):se;return{schema:tn,budget_ms:a.budgetMs??1200,elapsed_ms:i.elapsedMs,tiers:e,sources:i.outcomes,integrity:s}}};var A=2654435761,W=2246822519,ce=3266489917,nn=668265263,ue=374761393;function M(e,t){return e<<t|e>>>32-t}function B(e,t){return Math.imul(M(e+Math.imul(t,W)|0,13),A)}function O(e,t){return((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24)>>>0}function rn(e){if(typeof TextEncoder<"u")return new TextEncoder().encode(e);let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(r=(r-55296)*1024+(o-56320)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|r&63):r<65536?t.push(224|r>>12,128|r>>6&63,128|r&63):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function de(e,t){let n=e.length,r=0,o;if(n>=16){let a=t+A+W|0,i=t+W|0,s=t|0,c=t-A|0,l=n-16;do a=B(a,O(e,r)),i=B(i,O(e,r+4)),s=B(s,O(e,r+8)),c=B(c,O(e,r+12)),r+=16;while(r<=l);o=M(a,1)+M(i,7)+M(s,12)+M(c,18)|0}else o=t+ue|0;for(o=o+n|0;r+4<=n;)o=Math.imul(M(o+Math.imul(O(e,r),ce)|0,17),nn),r+=4;for(;r<n;)o=Math.imul(M(o+Math.imul(e[r]??0,ue)|0,11),A),r++;return o^=o>>>15,o=Math.imul(o,W),o^=o>>>13,o=Math.imul(o,ce),o^=o>>>16,o>>>0}function le(e){return e.toString(16).padStart(8,"0")}function k(e){let t=typeof e=="string"?rn(e):e;return le(de(t,0))+le(de(t,A))}function m(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function d(e){try{return e()}catch{return}}function z(){return typeof window>"u"?void 0:window}function v(){let e=z();if(!e)throw new f("no-window");return e}function he(e){throw e instanceof Error&&(e.name==="SecurityError"||e.name==="NotAllowedError"||e.name==="NotSupportedError")?new E(e.name):e}function on(e){return{schema:1,budget_ms:0,elapsed_ms:0,tiers:[],sources:e,integrity:{patched_natives:[],lies:[],engine:{}}}}function an(e){if(e){if(/Windows NT/i.test(e))return"windows";if(/Android/i.test(e))return"android";if(/iPhone|iPad|iPod/i.test(e))return"ios";if(/Mac OS X/i.test(e))return"macos";if(/Linux/i.test(e))return"linux"}}function sn(e){if(!e)return;let t=e.toLowerCase();if(t.includes("direct3d")||t.includes("d3d11")||t.includes("d3d9"))return"windows";if(t.includes("metal")||t.includes("apple"))return"apple";if(t.includes("adreno")||t.includes("mali")||t.includes("powervr"))return"mobile"}function ye(e){let t=on(e),n=[],r=p(t,u.navigator),o=p(t,u.engine),a=p(t,u.errors),i=p(t,u.math),s=p(t,u.webgl),c=p(t,u.touch),l=p(t,u.screen);o?.agrees===!1&&n.push({id:"user-agent-vs-engine",kind:"contradiction",detail:`claimed-${o.claimed}-observed-${o.observed}`}),a?.observed&&o?.observed&&a.observed!==o.observed&&n.push({id:"engine-vs-error-shapes",kind:"contradiction",detail:`engine-${o.observed}-errors-${a.observed}`});let g=o?.claimed;a?.observed&&g&&a.observed!==g&&n.push({id:"user-agent-vs-error-shapes",kind:"contradiction",detail:`claimed-${g}-errors-${a.observed}`}),i?.identities_hold===!1&&n.push({id:"math-identities",kind:"contradiction",detail:"math-builtins-do-not-hold-exact-identities"});let y=an(r?.user_agent),h=sn(s?.unmasked_renderer??s?.renderer);if(y&&h&&(h==="windows"&&y==="windows"||h==="apple"&&(y==="macos"||y==="ios")||h==="mobile"&&(y==="android"||y==="ios")||n.push({id:"user-agent-vs-gpu",kind:"contradiction",detail:`os-${y}-gpu-${h}`})),r?.platform&&y){let w=r.platform.toLowerCase();y==="windows"&&w.startsWith("win")||y==="macos"&&w.startsWith("mac")||y==="ios"&&(w.startsWith("iphone")||w.startsWith("ipad")||w.startsWith("mac"))||y==="android"&&(w.startsWith("linux")||w.startsWith("android"))||y==="linux"&&w.startsWith("linux")||n.push({id:"user-agent-vs-platform",kind:"contradiction",detail:`os-${y}-platform-${r.platform}`})}if(c){let w=c.max_touch_points;typeof w=="number"&&w>0&&c.pointer_coarse===!1&&c.any_hover===!0&&n.push({id:"touch-points-vs-pointer-media",kind:"contradiction",detail:"touch-claimed-with-fine-pointer-and-hover"}),c.touch_event===!0&&typeof w=="number"&&w===0&&n.push({id:"touch-event-vs-touch-points",kind:"contradiction",detail:"ontouchstart-present-with-zero-points"})}return typeof l?.inner_width=="number"&&typeof l.width=="number"&&l.width>0&&l.inner_width>l.width&&n.push({id:"viewport-larger-than-screen",kind:"contradiction",detail:`inner-${l.inner_width}-screen-${l.width}`}),r?.product_sub!==void 0&&(o?.observed==="chromium"||o?.observed==="webkit")&&r.product_sub!=="20030107"&&n.push({id:"product-sub",kind:"contradiction",detail:`expected-20030107-got-${r.product_sub}`}),r?.language&&r.languages&&r.languages.length>0&&r.languages[0]!==r.language&&n.push({id:"language-vs-languages",kind:"contradiction",detail:`language-${r.language}-languages-${r.languages[0]}`}),n}var cn=/\{\s*\[native code\]\s*\}\s*$/,un=[["navigator","webdriver"],["navigator","userAgent"],["navigator","platform"],["navigator","plugins"],["navigator","mimeTypes"],["navigator","languages"],["navigator","language"],["navigator","hardwareConcurrency"],["navigator","deviceMemory"],["navigator","maxTouchPoints"],["navigator","vendor"],["navigator","appVersion"],["navigator","productSub"],["screen","width"],["screen","height"],["screen","availWidth"],["screen","availHeight"],["screen","colorDepth"]];function we(e){let t=[];for(let[o,a]of un){let i=o==="navigator"?e.navigator:e.screen;if(!i)continue;if(d(()=>Object.getOwnPropertyDescriptor(i,a))){t.push({id:`${o}.${a}`,kind:"descriptor",detail:"own-property-shadows-prototype"});continue}let c=d(()=>Object.getPrototypeOf(i));if(!c)continue;let l=d(()=>Object.getOwnPropertyDescriptor(c,a));if(!l?.get)continue;let g=d(()=>Function.prototype.toString.call(l.get));g!==void 0&&!cn.test(g)&&t.push({id:`${o}.${a}.getter`,kind:"descriptor",detail:"getter-is-not-native"})}let n=d(()=>Object.getPrototypeOf(e.navigator));e.Navigator&&n!==void 0&&n!==e.Navigator.prototype&&t.push({id:"navigator",kind:"prototype",detail:"not-Navigator.prototype"});let r=d(()=>Object.getPrototypeOf(e.screen));return e.Screen&&r!==void 0&&r!==e.Screen.prototype&&t.push({id:"screen",kind:"prototype",detail:"not-Screen.prototype"}),t}var ve=/\{\s*\[native code\]\s*\}\s*$/,dn=[["Function.prototype.toString",()=>Function.prototype.toString],["Function.prototype.bind",()=>Function.prototype.bind],["Object.getOwnPropertyDescriptor",()=>Object.getOwnPropertyDescriptor],["Object.defineProperty",()=>Object.defineProperty],["Date.prototype.getTimezoneOffset",()=>Date.prototype.getTimezoneOffset],["Number.prototype.toFixed",()=>Number.prototype.toFixed],["Error.prototype.toString",()=>Error.prototype.toString],["Intl.DateTimeFormat",()=>Intl?.DateTimeFormat],["Navigator.prototype.javaEnabled",e=>e.Navigator?.prototype?.javaEnabled],["Permissions.prototype.query",e=>e.Permissions?.prototype?.query],["MediaDevices.prototype.enumerateDevices",e=>e.MediaDevices?.prototype?.enumerateDevices],["HTMLCanvasElement.prototype.toDataURL",e=>e.HTMLCanvasElement?.prototype?.toDataURL],["CanvasRenderingContext2D.prototype.getImageData",e=>e.CanvasRenderingContext2D?.prototype?.getImageData],["WebGLRenderingContext.prototype.getParameter",e=>e.WebGLRenderingContext?.prototype?.getParameter],["WebGLRenderingContext.prototype.getExtension",e=>e.WebGLRenderingContext?.prototype?.getExtension],["AudioBuffer.prototype.getChannelData",e=>e.AudioBuffer?.prototype?.getChannelData],["Element.prototype.getBoundingClientRect",e=>e.Element?.prototype?.getBoundingClientRect],["Performance.prototype.now",e=>e.Performance?.prototype?.now],["Screen.prototype.constructor",e=>e.Screen]];function ln(){let e=Function.prototype.toString;if(typeof document>"u"||!document.body)return{fn:e,clean:!1};let t=d(()=>{let n=document.createElement("iframe");return n.setAttribute("sandbox","allow-same-origin"),n.style.display="none",document.body.appendChild(n),n});if(!t)return{fn:e,clean:!1};try{let n=d(()=>t.contentWindow?.Function?.prototype?.toString);return n?{fn:n,clean:!0}:{fn:e,clean:!1}}finally{t.remove()}}function be(e){let t=[],n=[],{fn:r,clean:o}=ln(),a=i=>d(()=>r.call(i));for(let[i,s]of dn){let c=d(()=>s(e));if(c==null){n.push({id:i,kind:"missing"});continue}if(typeof c!="function")continue;let l=a(c);l!==void 0&&(ve.test(l)||(t.push(i),n.push({id:i,kind:"not-native"})))}if(o){let i=Function.prototype.toString,s=a(i);s!==void 0&&!ve.test(s)&&(t.includes("Function.prototype.toString")||t.push("Function.prototype.toString"),n.push({id:"Function.prototype.toString",kind:"not-native",detail:"caught-via-fresh-realm"}))}return{patched:t,lies:n}}function P(e){let t=z(),n=ye(e),r=p({schema:1,budget_ms:0,elapsed_ms:0,tiers:[],sources:e,integrity:{patched_natives:[],lies:[],engine:{}}},u.engine),o={...r?.claimed===void 0?{}:{claimed:r.claimed},...r?.observed===void 0?{}:{observed:r.observed},...r?.agrees===void 0?{}:{agrees:r.agrees}};if(!t)return{patched_natives:[],lies:n,engine:o};let a=be(t),i=we(t);return{patched_natives:a.patched,lies:[...a.lies,...i,...n],engine:o}}function fn(){let e=globalThis,t=e.OfflineAudioContext??e.webkitOfflineAudioContext;if(!t)throw new f("no-offline-audio-context");return t}async function Se(e){let t=fn(),n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;let o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);let i=(await new Promise((c,l)=>{e.signal.addEventListener("abort",()=>l(e.signal.reason),{once:!0}),n.oncomplete=g=>c(g.renderedBuffer);try{let g=n.startRendering();g&&typeof g.then=="function"&&g.then(c,l)}catch(g){l(g)}})).getChannelData(0),s=0;for(let c=4500;c<i.length;c++)s+=Math.abs(i[c]??0);return s}var _e={id:u.audio,tier:"deferred",timeoutMs:500,async run(e){let t=await Se(e);if(t===0)throw new E("audio-silent");let n=await Se(e);return m({value:t,unstable:t!==n,sample_rate:44100})}},Ee={id:u.audioLatency,tier:"deferred",timeoutMs:200,run(){let e=globalThis,t=e.AudioContext??e.webkitAudioContext;if(!t)throw new f("no-audio-context");let n=new t;try{return m({base_latency:d(()=>n.baseLatency),sample_rate:d(()=>n.sampleRate),state:d(()=>n.state)})}finally{d(()=>{n.close()})}}};var xe={id:u.hardware,tier:"fast",run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator;return m({hardware_concurrency:d(()=>e.hardwareConcurrency),device_memory:d(()=>e.deviceMemory)})}},Te={id:u.touch,tier:"fast",run(){let e=v();return m({max_touch_points:d(()=>navigator.maxTouchPoints),touch_event:d(()=>"ontouchstart"in e),touch_start:d(()=>(document.createEvent("TouchEvent"),!0)),pointer_coarse:d(()=>e.matchMedia?.("(pointer: coarse)").matches),any_hover:d(()=>e.matchMedia?.("(any-hover: hover)").matches)})}},Me={id:u.sensors,tier:"deferred",timeoutMs:150,async run(e){let t=v(),n="DeviceMotionEvent"in t,r="DeviceOrientationEvent"in t;if(!n&&!r)return m({device_motion:!1,device_orientation:!1});if(typeof document<"u"&&document.visibilityState==="hidden")return m({device_motion:n,device_orientation:r});let o=await new Promise(a=>{let i=!1,s=g=>{i||(i=!0,t.removeEventListener("devicemotion",c),clearTimeout(l),a(g))},c=()=>s(!0),l=setTimeout(()=>s(!1),100);e.signal.addEventListener("abort",()=>s(!1),{once:!0}),t.addEventListener("devicemotion",c,{once:!0})});return m({device_motion:n,device_orientation:r,motion_observed:o})}},ke={id:u.mediaDevices,tier:"deferred",timeoutMs:300,async run(){if(typeof navigator>"u")throw new f("no-navigator");if(typeof navigator.mediaDevices?.enumerateDevices!="function")throw new f("no-media-devices");let e=await navigator.mediaDevices.enumerateDevices();return m({audio_input:e.filter(t=>t.kind==="audioinput").length,audio_output:e.filter(t=>t.kind==="audiooutput").length,video_input:e.filter(t=>t.kind==="videoinput").length,labels_hidden:e.length>0&&e.every(t=>t.label==="")})}},Ce={id:u.network,tier:"fast",run(){let e=navigator.connection;if(!e)throw new f("no-network-information");return m({effective_type:d(()=>e.effectiveType),downlink:d(()=>e.downlink),rtt:d(()=>e.rtt),save_data:d(()=>e.saveData)})}},Oe={id:u.intl,tier:"fast",run(){if(typeof Intl>"u")throw new f("no-intl");let e=d(()=>new Intl.DateTimeFormat().resolvedOptions());return m({timezone:e?.timeZone,timezone_offset:d(()=>new Date().getTimezoneOffset()),locale:e?.locale,calendar:e?.calendar,numbering_system:e?.numberingSystem,formatted:d(()=>new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"full"}).format(new Date(0)))})}},Re={id:u.timezone,tier:"fast",run(){if(typeof Intl>"u")throw new f("no-intl");return m({name:d(()=>new Intl.DateTimeFormat().resolvedOptions().timeZone),offset:d(()=>new Date().getTimezoneOffset())})}},Ae={id:u.battery,tier:"deferred",timeoutMs:250,async run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator.getBattery;if(typeof e!="function")throw new f("no-battery-api");let t=await e.call(navigator),n=r=>r===void 0?void 0:Number.isFinite(r)?r:null;return m({charging:t.charging,charging_time:n(t.chargingTime),discharging_time:n(t.dischargingTime),level:t.level})}},De={id:u.speech,tier:"deferred",timeoutMs:250,async run(e){if(typeof speechSynthesis>"u")throw new f("no-speech-synthesis");let t=speechSynthesis.getVoices();return t.length===0&&(t=await new Promise(n=>{let r=()=>{speechSynthesis.removeEventListener("voiceschanged",o),e.signal.removeEventListener("abort",a),n(speechSynthesis.getVoices())},o=()=>r(),a=()=>r();speechSynthesis.addEventListener("voiceschanged",o,{once:!0}),e.signal.addEventListener("abort",a,{once:!0}),setTimeout(r,Math.min(100,e.budgetRemainingMs()))})),{voices:t.map(n=>({name:n.name,language:n.lang,local_service:n.localService,default:n.default,uri:n.voiceURI}))}}};var Ie={id:u.screen,tier:"fast",run(){let e=v(),t=e.screen;return m({width:d(()=>t.width),height:d(()=>t.height),avail_width:d(()=>t.availWidth),avail_height:d(()=>t.availHeight),color_depth:d(()=>t.colorDepth),pixel_depth:d(()=>t.pixelDepth),device_pixel_ratio:d(()=>e.devicePixelRatio),orientation:d(()=>t.orientation?.type),inner_width:d(()=>e.innerWidth),inner_height:d(()=>e.innerHeight),frame:d(()=>[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null])})}},Q;function pn(e){let t=e.screen;return[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null]}var Ne={id:u.screenFrame,tier:"fast",run(){let e=v(),t=pn(e),n=e.document?.fullscreenElement!=null,r=t.every(o=>o===0||o===null);return!n&&!r&&(Q=t),{frame:n&&Q?[...Q]:t}}};function mn(e,t,n){if(typeof e.matchMedia=="function"){for(let r=0;r<=n;r++)if(e.matchMedia(`(${t}: ${r})`).matches)return r}}function K(e,t){if(typeof e.matchMedia=="function")return t.find(n=>e.matchMedia(n).matches)}var Pe={id:u.mediaQueries,tier:"fast",run(){let e=v();if(typeof e.matchMedia!="function")throw new f("no-match-media");let t=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"]),n=K(e,["(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-contrast: no-preference)"]);return m({color_gamut:t?.match(/color-gamut:\s*(\w+)/)?.[1],inverted_colors:d(()=>e.matchMedia("(inverted-colors: inverted)").matches),forced_colors:d(()=>e.matchMedia("(forced-colors: active)").matches),monochrome:mn(e,"monochrome",10),contrast:n?.match(/prefers-contrast:\s*([\w-]+)/)?.[1],reduced_motion:d(()=>e.matchMedia("(prefers-reduced-motion: reduce)").matches),reduced_transparency:d(()=>e.matchMedia("(prefers-reduced-transparency: reduce)").matches),hdr:d(()=>e.matchMedia("(dynamic-range: high)").matches)})}},Le={id:u.colorGamut,tier:"fast",run(){let e=v();if(typeof e.matchMedia!="function")throw new f("no-match-media");let n=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"])?.match(/color-gamut:\s*(\w+)/)?.[1];return n==="srgb"||n==="p3"||n==="rec2020"?{gamut:n}:{}}};var gn=16384,hn=15,yn=9;var wn=250,Ue=600;function vn(e){return new Promise((t,n)=>{let r=indexedDB.open(e,1);r.onupgradeneeded=()=>r.result.createObjectStore("s"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error??new Error("indexeddb-open-failed")),r.onblocked=()=>n(new Error("indexeddb-open-blocked"))})}function bn(e){try{let t=e.transaction("s","readwrite",{durability:"strict"}),n=t.durability==="strict";return t.abort(),n}catch{return!1}}function q(e,t,n){return new Promise((r,o)=>{let a=performance.now(),i=0,s=()=>{if(i===hn){r(performance.now()-a);return}let c=e.transaction("s","readwrite",{durability:t});c.objectStore("s").put(n,i),i+=1,c.oncomplete=s,c.onerror=c.onabort=()=>o(c.error??new Error("indexeddb-write-failed"))};s()})}var Be={id:u.storageDurability,tier:"deferred",timeoutMs:Ue+400,async run(e){if(v(),typeof indexedDB!="object"||indexedDB===null)throw new f("no-indexeddb");let t=e.completed(u.engine);if((t?.status==="ok"?t.value.observed:void 0)!=="chromium")throw new f("not-chromium");let r=`__fingerly_durability_${Math.random().toString(36).slice(2)}`,o=new Uint8Array(gn),a;try{if(a=await vn(r),!bn(a))return{honored:!1};await q(a,"relaxed",o),await q(a,"strict",o);let i=performance.now(),s=i+Math.min(Ue,Math.max(0,e.budgetRemainingMs()-wn)),c=[];for(;c.length<yn&&!e.signal.aborted;){if(c.length>0){let y=(performance.now()-i)/c.length;if(performance.now()+y>s)break}let l=await q(a,"relaxed",o),g=await q(a,"strict",o);if(l>0)c.push(g/l);else break}return c.length===0?{honored:!0,rounds:0}:(c.sort((l,g)=>l-g),m({ratio:c[c.length>>1],rounds:c.length,honored:!0}))}finally{try{a?.close(),indexedDB.deleteDatabase(r)}catch{}}}};var Fe=[["easylist",".ad_300x250",".textads"],["easylist_germany",".werbung1",".werbeblock"],["easylist_italy",".pubbl",".banner_pubblicita"],["easylist_dutch",".advertentie-container",".reclame"],["easyprivacy",".trackingpixel","#tracking-pixel"],["fanboy_annoyances","#newsletter-signup-modal",".cookie-consent-banner"],["fanboy_social",".social-share-buttons",".facebook-like-box"],["adguard_base","#adsense_widget",".adsbygoogle-container"],["adguard_annoyances",".push-notification-prompt","#app-install-banner"],["listekr","#ad_wrapper_top",".ad_zone"],["liste_fr",".pub_300x250","#pubfooter"],["ro_list",".reclama-mare","#reclama"]],Sn=60;function _n(){return new Promise(e=>{let t=!1,n=()=>{t||(t=!0,e())};setTimeout(n,Sn),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>setTimeout(n,0))})}function We(e){if(e.offsetParent===null||e.offsetHeight===0||e.offsetWidth===0)return!0;let t=getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"}function qe(e,t){let n=e.createElement("div");return t.startsWith("#")?n.id=t.slice(1):n.className=t.slice(1),n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.width="1px",n.style.height="1px",n}var $e={id:u.domBlockers,tier:"deferred",timeoutMs:300,async run(){if(v(),typeof document>"u"||!document.body)throw new f("no-document-body");let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.style.width="1px",e.style.height="1px";let t=qe(document,".fingerly-control-element");e.appendChild(t);let n=Fe.map(([r,...o])=>({name:r,nodes:o.map(a=>{let i=qe(document,a);return e.appendChild(i),i})}));document.body.appendChild(e);try{if(await _n(),We(t))return{};let r=n.filter(({nodes:o})=>o.some(We)).map(({name:o})=>o);return m({blocked:r,probed:Fe.length})}finally{e.remove()}}};function En(){return d(()=>{try{(-1).toFixed(-1)}catch(e){return e instanceof Error?e.message.length:void 0}})}function xn(){return d(()=>eval.toString().length)}function Tn(){return d(()=>{let e=new Error("probe").stack;if(!(typeof e!="string"||e===""))return e.includes(" at ")?"v8":/^@|\n@|^\w*@/m.test(e)?e.includes("global code")?"javascriptcore":"spidermonkey":"unknown"})}function Mn(e,t,n){let r=[];if(e===51?r.push("chromium"):e===43||e===44?r.push("webkit"):e===25&&r.push("gecko"),t===33&&r.push("chromium"),n==="v8"?r.push("chromium"):n==="javascriptcore"?r.push("webkit"):n==="spidermonkey"&&r.push("gecko"),r.length===0)return;let o=new Map;for(let s of r)o.set(s,(o.get(s)??0)+1);let a,i=0;for(let[s,c]of o)c>i&&(i=c,a=s);return a}function kn(e){if(e){if(/Firefox\/|FxiOS/.test(e))return"gecko";if(/Edg\/|OPR\/|Chrome\/|Chromium\//.test(e))return"chromium";if(/Safari\//.test(e))return"webkit"}}var Ge={id:u.engine,tier:"fast",run(){let e=En(),t=xn(),n=Tn(),r=Mn(e,t,n),o=kn(typeof navigator>"u"?void 0:navigator.userAgent);return m({to_fixed_error_length:e,eval_length:t,stack_style:n,observed:r,claimed:o,agrees:r===void 0||o===void 0?void 0:r===o})}},Cn=[["acos",()=>Math.acos(.12312423423423424)],["acosh",()=>Math.acosh(1e308)],["asin",()=>Math.asin(.12312423423423424)],["asinh",()=>Math.asinh(1)],["atan",()=>Math.atan(.5)],["atanh",()=>Math.atanh(.5)],["cbrt",()=>Math.cbrt(100)],["cos",()=>Math.cos(10.000000000123)],["cosh",()=>Math.cosh(1)],["exp",()=>Math.exp(1)],["expm1",()=>Math.expm1(1)],["log",()=>Math.log(10)],["log1p",()=>Math.log1p(10)],["pow",()=>Math.pow(Math.PI,-100)],["sin",()=>Math.sin(1e300)],["sinh",()=>Math.sinh(1)],["sqrt",()=>Math.sqrt(2)],["tan",()=>Math.tan(-1e300)],["tanh",()=>Math.tanh(1)]];function On(){return Object.is(Math.sin(0),0)&&Math.cos(0)===1&&Math.sqrt(4)===2&&Math.log(1)===0&&Math.pow(2,10)===1024}var Ve={id:u.math,tier:"fast",timeoutMs:50,run(){let e=[],t=0,n=new Map;for(let[r,o]of Cn){let a=d(o);typeof a=="number"&&Number.isFinite(a)?(t+=1,n.set(r,a),e.push(`${r}:${a}`)):e.push(`${r}:`)}return m({hash:k(e.join("|")),probed:t,atanh_half:n.get("atanh"),expm1_1:n.get("expm1"),identities_hold:d(On)})}};function L(e){return d(()=>{try{e()}catch(t){return t instanceof EvalError?void 0:t instanceof Error?t.message.length:void 0}})}function Rn(){try{return new Function(""),!0}catch{return!1}}function An(e){let t=[],n=e.own_properties;if(n!==void 0&&(n.includes("sourceURL")?t.push("webkit","webkit"):n.includes("lineNumber")?t.push("gecko","gecko"):n==="message,stack"&&t.push("chromium","chromium")),e.null_property_length===44?t.push("chromium"):e.null_property_length===33&&t.push("gecko"),e.syntax_length===20?t.push("chromium"):e.syntax_length===28&&t.push("gecko"),t.length===0)return;let r=new Map;for(let s of t)r.set(s,(r.get(s)??0)+1);let o,a=0,i=!1;for(let[s,c]of r)c>a?(a=c,o=s,i=!1):c===a&&(i=!0);return i?void 0:o}function Dn(){return d(()=>{try{throw new Error("probe")}catch(e){return Object.getOwnPropertyNames(e).sort().join(",")}})}var He={id:u.errors,tier:"fast",timeoutMs:50,run(){let e=Rn(),t=m({null_property_length:L(()=>null.x),syntax_length:e?L(()=>new Function("!")):void 0,json_parse_length:L(()=>JSON.parse("{")),invalid_array_length:L(()=>{let n=[];n.length=-1}),const_assign_length:e?L(()=>{new Function("const c = 1; c = 2")()}):void 0,own_properties:Dn(),capture_stack_trace:d(()=>typeof Error.captureStackTrace=="function"),stack_trace_limit:d(()=>"stackTraceLimit"in Error)});return m({...t,observed:An(t)})}};var je={id:u.navigator,tier:"fast",run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator;return m({user_agent:d(()=>e.userAgent),platform:d(()=>e.platform),vendor:d(()=>e.vendor),product_sub:d(()=>e.productSub),app_version:d(()=>e.appVersion),hardware_concurrency:d(()=>e.hardwareConcurrency),device_memory:d(()=>e.deviceMemory),max_touch_points:d(()=>e.maxTouchPoints),webdriver:d(()=>e.webdriver),cookie_enabled:d(()=>e.cookieEnabled),pdf_viewer_enabled:d(()=>e.pdfViewerEnabled),do_not_track:d(()=>e.doNotTrack),plugin_count:d(()=>e.plugins?.length),mime_type_count:d(()=>e.mimeTypes?.length),language:d(()=>e.language),languages:d(()=>e.languages?[...e.languages]:void 0)})}},Xe={id:u.languages,tier:"fast",run(){if(typeof navigator>"u")throw new f("no-navigator");return m({primary:d(()=>navigator.language),accepted:d(()=>navigator.languages?[...navigator.languages]:void 0)})}},ze={id:u.vendor,tier:"fast",run(){if(typeof navigator>"u")throw new f("no-navigator");return m({vendor:d(()=>navigator.vendor)})}},Qe={id:u.plugins,tier:"fast",run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator.plugins;if(!e)throw new f("no-plugins");return{plugins:Array.from(e,t=>({name:t.name,filename:t.filename,description:t.description,mime_types:Array.from(t,n=>({type:n.type,suffixes:n.suffixes,description:n.description}))}))}}},Ke={id:u.userAgentData,tier:"deferred",timeoutMs:200,async run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator.userAgentData;if(!e)throw new f("no-user-agent-data");let t=m({brands:e.brands,mobile:e.mobile,platform:e.platform});if(typeof e.getHighEntropyValues!="function")return t;let n=await e.getHighEntropyValues(["architecture","bitness","model","platformVersion","fullVersionList","wow64"]);return{...t,...n}}};function Y(e,t){let n=document.createElement("canvas");n.width=e,n.height=t;let r=n.getContext("2d");if(!r)throw new f("no-2d-context");return[n,r]}function Ye(){let[e,t]=Y(240,60);t.globalCompositeOperation="multiply";for(let[n,r,o]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])t.fillStyle=n,t.beginPath(),t.arc(r,o,40,0,Math.PI*2,!0),t.closePath(),t.fill();return t.fillStyle="#f9c",t.arc(100,50,50,0,Math.PI*2,!0),t.arc(100,50,20,0,Math.PI*2,!0),t.fill("evenodd"),e.toDataURL()}function Je(){let[e,t]=Y(300,60);return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"',t.fillText("Fingerly <canvas> 1.0 \u{1F512}\u0416\u4E2D",2,15),t.font="18pt Arial",t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillText("Fingerly <canvas> 1.0",4,45),e.toDataURL()}function In(){let[,e]=Y(1,1);return e.rect(0,0,10,10),e.rect(2,2,6,6),e.isPointInPath(5,5,"evenodd")===!1}function Nn(e){let t=e.completed(u.timing);if(t?.status!=="ok")return!1;let n=t.value?.now_resolution;return typeof n=="number"&&n>=16}var Ze={id:u.canvas,tier:"deferred",timeoutMs:400,run(e){if(v(),typeof document>"u")throw new f("no-document");if(Nn(e))throw new E("rfp-canvas-prompt-avoided");try{let t=Ye(),n=Ye(),r=Je(),o=Je(),a=t!==n||r!==o;return m({geometry:k(t),text:k(r),winding:d(In),unstable:a})}catch(t){he(t)}}};function et(){if(typeof document>"u")throw new f("no-document");let e=document.createElement("canvas"),t=e.getContext("webgl")??e.getContext("experimental-webgl");if(!t)throw new f("no-webgl-context");return t}var tt={id:u.webgl,tier:"fast",timeoutMs:400,run(){let e=et(),t=d(()=>e.getExtension("WEBGL_debug_renderer_info")),n={};for(let o of["MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"]){let a=e[o];if(typeof a!="number")continue;let i=d(()=>e.getParameter(a));i!=null&&(n[o]=ArrayBuffer.isView(i)?Array.from(i):i)}let r=[];for(let o of[e.VERTEX_SHADER,e.FRAGMENT_SHADER])for(let a of[e.LOW_FLOAT,e.MEDIUM_FLOAT,e.HIGH_FLOAT]){let i=d(()=>e.getShaderPrecisionFormat(o,a));i&&r.push(i.rangeMin,i.rangeMax,i.precision)}return m({vendor:d(()=>e.getParameter(e.VENDOR)),renderer:d(()=>e.getParameter(e.RENDERER)),unmasked_vendor:t?d(()=>e.getParameter(t.UNMASKED_VENDOR_WEBGL)):void 0,unmasked_renderer:t?d(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):void 0,version:d(()=>e.getParameter(e.VERSION)),shading_language_version:d(()=>e.getParameter(e.SHADING_LANGUAGE_VERSION)),max_texture_size:d(()=>e.getParameter(e.MAX_TEXTURE_SIZE)),max_render_buffer_size:d(()=>e.getParameter(e.MAX_RENDERBUFFER_SIZE)),parameters_hash:Object.keys(n).length>0?k(JSON.stringify(n)):void 0,shader_precision_hash:r.length>0?k(r.join(",")):void 0})}},nt={id:u.webglExtensions,tier:"deferred",timeoutMs:200,run(){let t=et().getSupportedExtensions();if(!t)throw new E("extensions-withheld");return[...t].sort()}};function Pn(e){let t=[],n=Date.now()+12;for(;t.length<25&&Date.now()<n;){let r=e(),o=e(),a=0;for(;o===r&&a++<1e5&&Date.now()<n;)o=e();o!==r&&t.push(o-r)}return t.length===0?100:Math.round(Math.min(...t)*1e6)/1e6}var rt={id:u.timing,tier:"fast",timeoutMs:150,run(){let t=v().performance;return typeof t?.now!="function"?m({has_performance:!1}):m({has_performance:!0,now_resolution:Pn(()=>t.now())})}},ot={id:u.permissions,tier:"fast",timeoutMs:200,async run(){let e=v();if(!e.navigator.permissions?.query)throw new f("no-permissions-api");let t=async o=>{try{return(await e.navigator.permissions.query({name:o})).state}catch{return}},n=await t("notifications"),r=d(()=>e.Notification?.permission);return m({notification:n,notification_legacy:r,geolocation:await t("geolocation"),inconsistent:n!==void 0&&r!==void 0?(r==="default"?"prompt":r)!==n:void 0})}},Ln=["__nightmare","_phantom","callPhantom","__phantomas","Buffer","emit","spawn","__selenium_evaluate","__selenium_unwrapped","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_unwrapped","__fxdriver_evaluate","__fxdriver_unwrapped","__driver_evaluate","__driver_unwrapped","_Selenium_IDE_Recorder","domAutomation","domAutomationController","__lastWatirAlert","__playwright","__puppeteer","__pw_manual"],it={id:u.automation,tier:"fast",run(){let e=v(),t=Ln.filter(r=>d(()=>r in e)===!0),n=d(()=>Object.getOwnPropertyNames(e).filter(r=>/^cdc_|^\$cdc_/.test(r)));return m({webdriver:d(()=>navigator.webdriver),cdp_artifacts:n&&n.length>0?n:void 0,distinctive_properties:t.length>0?[...t]:void 0,chrome_object:d(()=>"chrome"in e),window_external:d(()=>{let r=e.external;return r?String(r):void 0})})}};var Un=50,at=Symbol("timed-out");async function Bn(e){if(typeof e.brave?.isBrave=="function")try{let t=await Promise.race([e.brave.isBrave(),new Promise(n=>setTimeout(()=>n(at),Un))]);return t===at?void 0:t===!0}catch{return}}function Fn(e){let t=e.userAgentData?.brands;if(Array.isArray(t))return t.some(n=>n?.brand==="Brave")}var st=[[30,60,90],[210,180,140]],S=8;function Wn(){if(!(typeof document>"u"))try{let e=document.createElement("canvas");e.width=S,e.height=S;let t=e.getContext("2d",{willReadFrequently:!0});if(!t)return;for(let r=0;r<S;r++)for(let o=0;o<S;o++){let[a,i,s]=st[(o+r)%2];t.fillStyle=`rgb(${a}, ${i}, ${s})`,t.fillRect(o,r,1,1)}let n=t.getImageData(0,0,S,S).data;for(let r=0;r<S*S;r++){let o=r%S,a=Math.floor(r/S),[i,s,c]=st[(o+a)%2],l=r*4;if(n[l]!==i||n[l+1]!==s||n[l+2]!==c||n[l+3]!==255)return!0}return!1}catch{return}}var ct={id:u.shields,tier:"fast",timeoutMs:100,async run(){if(typeof navigator>"u")throw new f("no-navigator");let e=navigator;return m({brave:await Bn(e),brave_claimed:Fn(e),canvas_noise:Wn()})}};function ut(e){try{let t=window[e];if(!t)return!1;let n="__fingerly_probe__";return t.setItem(n,"1"),t.removeItem(n),!0}catch{return!1}}function qn(){try{return typeof window.indexedDB=="object"&&window.indexedDB!==null}catch{return!1}}function $n(e){let t=e instanceof Error?e.name:"",n=e instanceof Error?e.message:String(e);return n.includes("unknown transient reason")?"transient":t==="SecurityError"||n.includes("Security error")?"refused":"failed"}var Gn=200;async function Vn(){let e=navigator.storage;if(typeof e?.getDirectory=="function")return Promise.race([e.getDirectory().then(()=>"ok",t=>$n(t)),new Promise(t=>setTimeout(t,Gn))])}var Hn=150;function jn(){let e=navigator.webkitTemporaryStorage;return typeof e?.queryUsageAndQuota!="function"?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=o=>{n||(n=!0,t(o))};setTimeout(()=>r(void 0),Hn);try{e.queryUsageAndQuota((o,a)=>r(typeof a=="number"?a:void 0),()=>r(void 0))}catch{r(void 0)}})}function Xn(){if(window.isSecureContext)return"serviceWorker"in navigator}var dt={id:u.storage,tier:"fast",timeoutMs:250,async run(){v();let e=d(async()=>{if(typeof navigator.storage?.estimate!="function")return;let c=await navigator.storage.estimate();return{quota:c.quota,usage:c.usage}}),t=jn(),n=Vn(),[r,o,a]=await Promise.all([e,t,n]),i=r?.quota,s=navigator.deviceMemory;return m({local_storage:ut("localStorage"),session_storage:ut("sessionStorage"),indexed_db:qn(),quota:i,usage:r?.usage,legacy_quota:o,quota_ratio:typeof i=="number"&&typeof s=="number"&&s>0?i/(s*1024*1024*1024):void 0,origin_filesystem:a,service_worker:Xn()})}},lt={id:u.storageQuota,tier:"fast",run(){if(v(),typeof document>"u")throw new f("no-document");return{partitioned:typeof document.hasStorageAccess=="function"}}};var ft=["monospace","sans-serif","serif"],zn="72px",Qn="mmmmmmmmmmlli WwMmIi 0123",J=["Arial","Arial Black","Calibri","Cambria","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic","Gabriola","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","MS Gothic","MV Boli","Nirmala UI","Palatino Linotype","Segoe UI","Segoe UI Emoji","Sylfaen","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","American Typewriter","Andale Mono","Apple Chancery","Arial Hebrew","Avenir","Avenir Next","Baskerville","Big Caslon","Bodoni 72","Chalkboard","Cochin","Copperplate","Didot","Futura","Geneva","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Lucida Grande","Luminari","Menlo","Monaco","Optima","Papyrus","Phosphate","Rockwell","SF Pro","Skia","Snell Roundhand","Trattatello","Zapfino","Cantarell","DejaVu Sans","DejaVu Serif","FreeSans","Liberation Sans","Liberation Serif","Nimbus Sans","Noto Sans","Ubuntu","Ubuntu Mono","Droid Sans","Roboto","Roboto Condensed","Bahnschrift","Bookshelf Symbol 7","Cascadia Code","Fira Code","HoloLens MDL2 Assets","Inter","JetBrains Mono","MT Extra","Source Code Pro","Wingdings 2","Wingdings 3"],pt={id:u.fonts,tier:"deferred",timeoutMs:700,run(){if(typeof document>"u")throw new f("no-document");let e=document.createElement("div");e.style.cssText="position:absolute;left:-9999px;top:-9999px;visibility:hidden;width:auto;height:auto;margin:0;padding:0;white-space:nowrap;";let t=o=>{let a=document.createElement("span");return a.style.cssText=`position:absolute;font-size:${zn};margin:0;padding:0;font-family:${o};`,a.textContent=Qn,e.appendChild(a),a},n=ft.map(o=>t(o)),r=J.map(o=>ft.map(a=>t(`'${o}',${a}`)));document.body.appendChild(e);try{let o=n.map(s=>s.offsetWidth),a=n.map(s=>s.offsetHeight),i=[];return J.forEach((s,c)=>{let l=r[c];if(!l)return;l.every((y,h)=>{let w=o[h],_=a[h];return y.offsetWidth!==w||y.offsetHeight!==_})&&i.push(s)}),m({available:i,probed:J.length})}finally{e.remove()}}},mt={id:u.fontPreferences,tier:"deferred",timeoutMs:250,run(){if(typeof document>"u"||!document.body)throw new f("no-document-body");let e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;border:0",document.body.appendChild(e);try{let t=e.contentDocument;if(!t?.body)throw new f("no-frame-document");let n="mmMwWLliI0O&1",r={default:"",serif:"serif",sans:"sans-serif",mono:"monospace",system:"system-ui",apple:"-apple-system",min:"Arial, sans-serif"},o={};for(let[a,i]of Object.entries(r)){let s=t.createElement("span");s.textContent=n,s.style.cssText=`font:72px ${i||"initial"};white-space:nowrap;position:absolute`,t.body.appendChild(s),o[a]=Math.round(s.getBoundingClientRect().width*1e3)/1e3}return{widths:o}}finally{e.remove()}}};var U=[Ge,He,Ve,je,Xe,Qe,ze,Ie,Ne,Pe,Le,xe,Te,Ce,Oe,Re,dt,lt,ct,rt,ot,it,tt,Ze,nt,_e,Ee,pt,mt,Ae,De,Me,ke,Ke,$e,Be];function gt(e){return Promise.resolve(new N({...e,platform:"web",sources:e.sources??U,integrity:t=>P(t.sources)}))}return St(Kn);})();