se-design 1.0.75 → 1.0.76-dev1
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/dist/assets/style.css +1 -1
- package/dist/components/AccessibleDiv/index.d.ts +24 -0
- package/dist/components/Checkbox/index.d.ts +12 -0
- package/dist/components/CustomAccordion/index.d.ts +1 -0
- package/dist/components/CustomModal/index.d.ts +15 -12
- package/dist/components/DatePicker/useDatePickerA11y.d.ts +50 -0
- package/dist/components/Dropdown/index.d.ts +13 -0
- package/dist/components/Icon/index.d.ts +8 -2
- package/dist/components/InputWithIcon/index.d.ts +9 -1
- package/dist/components/LabelChip/index.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/PhoneInput/index.d.ts +13 -5
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/SidebarOverlay/index.d.ts +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +144 -133
- package/dist/index.js.map +1 -1
- package/dist/index10.js +23 -59
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +2 -2
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +2 -2
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +2 -2
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +2 -2
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +2 -2
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +70 -63
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +2 -2
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +2 -2
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +71 -34
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +2 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +2 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -2
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +2 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +1 -1
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +50 -14
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +2 -2
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +1 -1
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +1 -1
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +15 -9
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +2 -2
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +2 -2
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +2 -2
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +2 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +10 -218
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +2 -2
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +2 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +2 -2
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +220 -60
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +60 -99
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +2 -2
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +2 -2
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +95 -282
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +2 -2
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +2 -2
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +2 -2
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +317 -16
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +2 -149
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -9
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +2 -6
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +2 -5
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +2 -40
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -59
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -23
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +152 -0
- package/dist/index197.js.map +1 -0
- package/dist/index198.js +12 -0
- package/dist/index198.js.map +1 -0
- package/dist/index199.js +5 -23
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +15 -31
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +8 -0
- package/dist/index200.js.map +1 -0
- package/dist/index201.js +36 -80
- package/dist/index201.js.map +1 -1
- package/dist/index206.js +26 -0
- package/dist/index206.js.map +1 -0
- package/dist/index207.js +71 -0
- package/dist/index207.js.map +1 -0
- package/dist/index21.js +33 -61
- package/dist/index21.js.map +1 -1
- package/dist/{index210.js → index215.js} +1 -1
- package/dist/{index210.js.map → index215.js.map} +1 -1
- package/dist/index22.js +57 -76
- package/dist/index22.js.map +1 -1
- package/dist/{index218.js → index223.js} +1 -1
- package/dist/{index218.js.map → index223.js.map} +1 -1
- package/dist/{index221.js → index226.js} +2 -2
- package/dist/{index221.js.map → index226.js.map} +1 -1
- package/dist/index23.js +83 -21
- package/dist/index23.js.map +1 -1
- package/dist/index235.js +171 -8
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +3 -9
- package/dist/index236.js.map +1 -1
- package/dist/index238.js +18 -169
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +10 -11
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +20 -222
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +8 -4
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +4 -5
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +168 -36
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -7
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +5 -326
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +36 -48
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +2 -2
- package/dist/index248.js +7 -75
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -74
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +289 -43
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +45 -47
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -8
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +75 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +89 -48
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +52 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +8 -2
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -0
- package/dist/index256.js.map +1 -0
- package/dist/index257.js +55 -0
- package/dist/index257.js.map +1 -0
- package/dist/index258.js +5 -0
- package/dist/index258.js.map +1 -0
- package/dist/index259.js +5 -0
- package/dist/index259.js.map +1 -0
- package/dist/index26.js +48 -23
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +21 -81
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +101 -138
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +139 -128
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +57 -98
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +133 -69
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +67 -96
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +96 -71
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +70 -38
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +40 -71
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +67 -82
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +99 -54
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +53 -280
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +281 -70
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +69 -80
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +102 -42
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +82 -32
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +26 -44
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +45 -67
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +65 -49
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +53 -139
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +132 -179
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +194 -35
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +34 -29
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +31 -145
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +131 -70
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +40 -315
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +80 -371
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +451 -91
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +98 -38
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +35 -35
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +35 -90
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +89 -159
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +157 -143
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +149 -33
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +33 -86
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +80 -113
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +323 -43
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +114 -62
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +62 -147
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +146 -312
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +317 -44
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +44 -143
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +145 -12
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +10 -44
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +42 -15
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +76 -48
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +18 -58
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +44 -51
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +66 -5
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +25 -7
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +105 -0
- package/dist/index72.js.map +1 -0
- package/dist/index73.js +62 -2
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +21 -2
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +5 -2
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +54 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +24 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +9 -2
- package/dist/index78.js.map +1 -1
- package/dist/index8.js +48 -85
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +2 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +2 -2
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +1 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +2 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +91 -27
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/index230.js +0 -7
- package/dist/index230.js.map +0 -1
- package/dist/index232.js +0 -25
- package/dist/index232.js.map +0 -1
- package/dist/index233.js +0 -57
- package/dist/index233.js.map +0 -1
- package/dist/index234.js +0 -22
- package/dist/index234.js.map +0 -1
- package/dist/index237.js +0 -8
- package/dist/index237.js.map +0 -1
- package/dist/index79.js +0 -5
- package/dist/index79.js.map +0 -1
package/dist/index63.js
CHANGED
|
@@ -1,48 +1,321 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import F, { useState as ot, useRef as X, useEffect as $ } from "react";
|
|
2
|
+
import { createPortal as nt } from "react-dom";
|
|
3
|
+
import { Icon as it } from "./index6.js";
|
|
4
|
+
import { Button as rt } from "./index4.js";
|
|
5
|
+
import { debounce as lt } from "./index215.js";
|
|
6
|
+
const q = 500, S = 50, U = 150, st = {
|
|
7
|
+
"top-left": {
|
|
8
|
+
rotate: "315",
|
|
9
|
+
class: "-top-5 left-0"
|
|
10
|
+
},
|
|
11
|
+
"top-right": {
|
|
12
|
+
rotate: "45",
|
|
13
|
+
class: "-top-5 right-0"
|
|
14
|
+
},
|
|
15
|
+
"bottom-left": {
|
|
16
|
+
rotate: "225",
|
|
17
|
+
class: "-bottom-5 left-0"
|
|
18
|
+
},
|
|
19
|
+
"bottom-right": {
|
|
20
|
+
rotate: "135",
|
|
21
|
+
class: "-bottom-5 right-0"
|
|
22
|
+
}
|
|
23
|
+
}, V = (s) => {
|
|
24
|
+
const d = document.querySelector(s);
|
|
25
|
+
if (!d)
|
|
26
|
+
return console.warn(`Iframe not found: ${s}`), null;
|
|
27
|
+
try {
|
|
28
|
+
return d.contentDocument || d.contentWindow?.document || null;
|
|
29
|
+
} catch (u) {
|
|
30
|
+
return console.error("Cannot access iframe document:", u), null;
|
|
31
|
+
}
|
|
32
|
+
}, C = (s, d) => {
|
|
33
|
+
if (!d)
|
|
34
|
+
return document.querySelector(s);
|
|
35
|
+
const u = V(d);
|
|
36
|
+
return u ? u.querySelector(s) : null;
|
|
37
|
+
}, j = (s, d) => {
|
|
38
|
+
const u = s.getBoundingClientRect();
|
|
39
|
+
if (!d)
|
|
40
|
+
return u;
|
|
41
|
+
const h = document.querySelector(d);
|
|
42
|
+
if (!h)
|
|
43
|
+
return u;
|
|
44
|
+
const E = h.getBoundingClientRect(), x = h.clientLeft || 0, y = h.clientTop || 0;
|
|
45
|
+
return new DOMRect(u.left + E.left + x, u.top + E.top + y, u.width, u.height);
|
|
46
|
+
}, ct = (s) => {
|
|
47
|
+
switch (s) {
|
|
48
|
+
case "left-bottom":
|
|
49
|
+
case "left-center":
|
|
50
|
+
case "bottom-left":
|
|
51
|
+
return "top-right";
|
|
52
|
+
case "right-bottom":
|
|
53
|
+
case "right-center":
|
|
54
|
+
case "bottom-right":
|
|
55
|
+
case "bottom-center":
|
|
56
|
+
return "top-left";
|
|
57
|
+
case "top-left":
|
|
58
|
+
case "left-top":
|
|
59
|
+
return "bottom-right";
|
|
60
|
+
case "top-right":
|
|
61
|
+
case "top-center":
|
|
62
|
+
case "right-top":
|
|
63
|
+
return "bottom-left";
|
|
64
|
+
default:
|
|
65
|
+
return "top-left";
|
|
66
|
+
}
|
|
67
|
+
}, z = () => ({
|
|
68
|
+
x: window.scrollX || window.pageXOffset,
|
|
69
|
+
y: window.scrollY || window.pageYOffset
|
|
70
|
+
}), at = (s, d, u) => {
|
|
71
|
+
let h;
|
|
72
|
+
const E = () => {
|
|
73
|
+
const x = C(s, u);
|
|
74
|
+
x ? d(x) : h = requestAnimationFrame(E);
|
|
75
|
+
};
|
|
76
|
+
return h = requestAnimationFrame(E), () => {
|
|
77
|
+
h && cancelAnimationFrame(h);
|
|
78
|
+
};
|
|
79
|
+
}, pt = ({
|
|
80
|
+
steps: s,
|
|
81
|
+
screenBaseElementSelector: d,
|
|
82
|
+
onClose: u,
|
|
83
|
+
tooltipBackgroundColor: h = "#E04E05",
|
|
84
|
+
tooltipTextColor: E = "var(--color-white)",
|
|
85
|
+
maxWidth: x = 350
|
|
86
|
+
}) => {
|
|
87
|
+
const [y, W] = ot(0), g = X(null), M = X(null), Y = () => {
|
|
88
|
+
y < s.length - 1 ? W(y + 1) : u?.();
|
|
89
|
+
}, H = () => {
|
|
90
|
+
Y();
|
|
91
|
+
};
|
|
92
|
+
if ($(() => {
|
|
93
|
+
const r = s[y], c = (b) => {
|
|
94
|
+
const v = b.target, w = C(r?.targetElementSelector, r?.iframeSelector), T = M.current;
|
|
95
|
+
if (!(T && T.contains(v)) && w && !w.contains(v)) {
|
|
96
|
+
if (r?.isDropdownStep) {
|
|
97
|
+
Y();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const P = s[s.length - 1], A = C(P.targetElementSelector, P.iframeSelector);
|
|
101
|
+
A && A.contains(v) && u();
|
|
102
|
+
}
|
|
103
|
+
}, m = setTimeout(() => {
|
|
104
|
+
document.body.addEventListener("mousedown", c, !0);
|
|
105
|
+
}, q + U);
|
|
106
|
+
return () => {
|
|
107
|
+
clearTimeout(m), document.body.removeEventListener("mousedown", c, !0);
|
|
108
|
+
};
|
|
109
|
+
}, [y, s, u]), $(() => {
|
|
110
|
+
W(0), g.current = null;
|
|
111
|
+
const r = M.current;
|
|
112
|
+
r && (r.style.maxWidth = `${x}px`, r.style.backgroundColor = h, r.style.color = E);
|
|
113
|
+
}, [x, h, E]), $(() => {
|
|
114
|
+
const r = s[y];
|
|
115
|
+
if (!r?.targetElementSelector) {
|
|
116
|
+
u?.();
|
|
117
|
+
return;
|
|
9
118
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
y.
|
|
119
|
+
const c = d ? document.querySelector(d) : null, m = M.current;
|
|
120
|
+
if (!m) return;
|
|
121
|
+
let b = null, v = null, w = null;
|
|
122
|
+
const T = !!(c && c.scrollHeight > c.clientHeight), P = {
|
|
123
|
+
height: c?.clientHeight || window.innerHeight,
|
|
124
|
+
width: c?.clientWidth || window.innerWidth
|
|
125
|
+
}, A = (D) => {
|
|
126
|
+
b = D, b.addEventListener("click", H);
|
|
127
|
+
const I = (t, o, f, e) => {
|
|
128
|
+
const p = r.tooltipPosition || "bottom-center", n = r.tooltipPositionOffset?.vertical || 0, i = r.tooltipPositionOffset?.horizontal || 0;
|
|
129
|
+
let l = 0, a = 0;
|
|
130
|
+
switch (p) {
|
|
131
|
+
case "bottom-center":
|
|
132
|
+
l = t.bottom + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
133
|
+
break;
|
|
134
|
+
case "bottom-left":
|
|
135
|
+
l = t.bottom + e.y + n, a = t.left + e.x - o + i;
|
|
136
|
+
break;
|
|
137
|
+
case "bottom-right":
|
|
138
|
+
l = t.bottom + e.y + n, a = t.right + e.x + i;
|
|
139
|
+
break;
|
|
140
|
+
case "top-center":
|
|
141
|
+
l = t.top - f + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
142
|
+
break;
|
|
143
|
+
case "top-left":
|
|
144
|
+
l = t.top - f + e.y + n, a = t.left + e.x - o + i;
|
|
145
|
+
break;
|
|
146
|
+
case "top-right":
|
|
147
|
+
l = t.top - f + e.y + n, a = t.right + e.x + i;
|
|
148
|
+
break;
|
|
149
|
+
case "left-top":
|
|
150
|
+
l = t.top - f + e.y + n, a = t.left + e.x - o + i;
|
|
151
|
+
break;
|
|
152
|
+
case "left-center":
|
|
153
|
+
l = t.top + e.y + t.height / 2 + n, a = t.left + e.x - o + i;
|
|
154
|
+
break;
|
|
155
|
+
case "left-bottom":
|
|
156
|
+
l = t.bottom + e.y + n, a = t.left + e.x - o + i;
|
|
157
|
+
break;
|
|
158
|
+
case "right-top":
|
|
159
|
+
l = t.top - f + e.y + n, a = t.right + e.x + i;
|
|
160
|
+
break;
|
|
161
|
+
case "right-center":
|
|
162
|
+
l = t.top + e.y + t.height / 2 + n, a = t.right + e.x + i;
|
|
163
|
+
break;
|
|
164
|
+
case "right-bottom":
|
|
165
|
+
l = t.bottom + e.y + n, a = t.right + e.x + i;
|
|
166
|
+
break;
|
|
167
|
+
default:
|
|
168
|
+
l = t.bottom + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
top: l,
|
|
173
|
+
left: a
|
|
174
|
+
};
|
|
175
|
+
}, N = (t, o) => {
|
|
176
|
+
m.style.position = "absolute";
|
|
177
|
+
const f = () => {
|
|
178
|
+
m.style.top = `${t.top}px`, m.style.left = `${t.left}px`;
|
|
179
|
+
};
|
|
180
|
+
o && g.current ? (m.style.transition = `top ${q}ms ease-in-out, left ${q}ms ease-in-out`, f(), g.current = t) : (f(), g.current = t);
|
|
181
|
+
}, B = () => {
|
|
182
|
+
if (!m || !b) return;
|
|
183
|
+
const t = {
|
|
184
|
+
width: m.offsetWidth || 0,
|
|
185
|
+
height: m.offsetHeight || 0
|
|
186
|
+
};
|
|
187
|
+
if (t.width === 0 && t.height === 0) {
|
|
188
|
+
requestAnimationFrame(B);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const o = j(b, r.iframeSelector), f = z(), e = I(o, t.width, t.height, f), p = g.current !== null;
|
|
192
|
+
N(e, p);
|
|
193
|
+
};
|
|
194
|
+
w = lt(() => {
|
|
195
|
+
if (!b || !m) return;
|
|
196
|
+
const t = {
|
|
197
|
+
top: parseFloat(m.style.top) || 0,
|
|
198
|
+
left: parseFloat(m.style.left) || 0
|
|
199
|
+
};
|
|
200
|
+
!g.current && (t.top !== 0 || t.left !== 0) && (g.current = t), B(), g.current && setTimeout(() => {
|
|
201
|
+
const o = {
|
|
202
|
+
top: parseFloat(m.style.top) || 0,
|
|
203
|
+
left: parseFloat(m.style.left) || 0
|
|
204
|
+
};
|
|
205
|
+
(o.top !== 0 || o.left !== 0) && (g.current = o);
|
|
206
|
+
}, q);
|
|
207
|
+
}, U);
|
|
208
|
+
const K = (t, o, f, e, p) => {
|
|
209
|
+
const n = {
|
|
210
|
+
top: Math.min(t.top, o),
|
|
211
|
+
bottom: Math.max(t.bottom, o + p),
|
|
212
|
+
left: Math.min(t.left, f),
|
|
213
|
+
right: Math.max(t.right, f + e)
|
|
214
|
+
};
|
|
215
|
+
if (c) {
|
|
216
|
+
const i = c.getBoundingClientRect();
|
|
217
|
+
return n.top >= i.top + S && n.bottom <= i.top + i.height - S && n.left >= i.left + S && n.right <= i.left + i.width - S && t.width > 0 && t.height > 0;
|
|
218
|
+
}
|
|
219
|
+
return n.top >= S && n.bottom <= P.height - S && n.left >= S && n.right <= P.width - S && t.width > 0 && t.height > 0;
|
|
220
|
+
}, Q = (t, o, f) => {
|
|
221
|
+
const e = Math.min(t.top, o), p = Math.max(t.bottom, o + f), n = p - e, i = !!(c && T), l = i ? c.getBoundingClientRect() : null, a = i ? l.height : window.innerHeight, O = i ? c.scrollTop : z().y, R = i ? c.scrollHeight - c.clientHeight : document.documentElement.scrollHeight - window.innerHeight, tt = a - 2 * S;
|
|
222
|
+
let _;
|
|
223
|
+
if (n > tt) {
|
|
224
|
+
const L = (t.top + t.bottom) / 2;
|
|
225
|
+
_ = i ? L - l.top + O : L + O;
|
|
226
|
+
} else {
|
|
227
|
+
const L = (e + p) / 2;
|
|
228
|
+
_ = i ? L - l.top + O : L + O;
|
|
229
|
+
}
|
|
230
|
+
const et = _ - a / 2;
|
|
231
|
+
return Math.max(0, Math.min(et, R));
|
|
232
|
+
}, Z = () => {
|
|
233
|
+
if (!m || !b) return;
|
|
234
|
+
const t = () => {
|
|
235
|
+
if (!m || !b) return;
|
|
236
|
+
const o = {
|
|
237
|
+
width: m.offsetWidth || 0,
|
|
238
|
+
height: m.offsetHeight || 0
|
|
239
|
+
};
|
|
240
|
+
if (o.width === 0 && o.height === 0) {
|
|
241
|
+
requestAnimationFrame(t);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const f = j(b, r.iframeSelector), e = z(), p = I(f, o.width, o.height, e), n = {
|
|
245
|
+
top: p.top - e.y,
|
|
246
|
+
left: p.left - e.x
|
|
247
|
+
};
|
|
248
|
+
if (K(f, n.top, n.left, o.width, o.height)) {
|
|
249
|
+
const l = g.current !== null;
|
|
250
|
+
N(p, l);
|
|
251
|
+
} else {
|
|
252
|
+
const l = Q(f, n.top, o.height);
|
|
253
|
+
if (l !== null)
|
|
254
|
+
(T && c ? c : window).scrollTo({
|
|
255
|
+
top: l,
|
|
256
|
+
behavior: "auto"
|
|
257
|
+
}), requestAnimationFrame(() => B());
|
|
258
|
+
else {
|
|
259
|
+
const a = g.current !== null;
|
|
260
|
+
N(p, a);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
t();
|
|
265
|
+
};
|
|
266
|
+
if (window.addEventListener("scroll", w, {
|
|
267
|
+
passive: !0
|
|
268
|
+
}), T && c && c.addEventListener("scroll", w, {
|
|
269
|
+
passive: !0
|
|
270
|
+
}), r.iframeSelector) {
|
|
271
|
+
const o = V(r.iframeSelector)?.defaultView;
|
|
272
|
+
o && o.addEventListener("scroll", w, {
|
|
273
|
+
passive: !0
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
Z();
|
|
277
|
+
};
|
|
278
|
+
if (r.waitForElement)
|
|
279
|
+
v = at(r.targetElementSelector, A, r.iframeSelector);
|
|
280
|
+
else {
|
|
281
|
+
const D = C(r.targetElementSelector, r.iframeSelector);
|
|
282
|
+
if (!D) return;
|
|
283
|
+
A(D);
|
|
284
|
+
}
|
|
285
|
+
return () => {
|
|
286
|
+
if (v && v(), b && b.removeEventListener("click", H), w) {
|
|
287
|
+
if (window.removeEventListener("scroll", w), T && c && c.removeEventListener("scroll", w), r.iframeSelector) {
|
|
288
|
+
const I = V(r.iframeSelector)?.defaultView;
|
|
289
|
+
I && I.removeEventListener("scroll", w);
|
|
290
|
+
}
|
|
291
|
+
w.cancel();
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
}, [y, s, u, d, x]), y >= s.length)
|
|
295
|
+
return null;
|
|
296
|
+
const k = s[y], J = ct(k?.tooltipPosition), G = st[J];
|
|
297
|
+
return /* @__PURE__ */ nt(/* @__PURE__ */ F.createElement("div", {
|
|
298
|
+
ref: M,
|
|
299
|
+
className: "guided-tour-tooltip relative rounded-md p-1",
|
|
300
|
+
"data-automation-id": `${k?.automationId || "guided-tour"}-tooltip`,
|
|
301
|
+
style: {
|
|
302
|
+
zIndex: k?.zIndex || 1300
|
|
303
|
+
}
|
|
304
|
+
}, /* @__PURE__ */ F.createElement(it, {
|
|
305
|
+
name: "arrow-head",
|
|
306
|
+
fill: h,
|
|
307
|
+
rotation: G.rotate,
|
|
308
|
+
className: `guided-tour-tooltip-arrow absolute ${G.class}`
|
|
309
|
+
}), /* @__PURE__ */ F.createElement("div", {
|
|
310
|
+
className: "guided-tour-tooltip-content flex flex-col gap-2"
|
|
311
|
+
}, /* @__PURE__ */ F.createElement("p", null, k?.content), k?.isOptionalStep && /* @__PURE__ */ F.createElement(rt, {
|
|
312
|
+
type: "link",
|
|
313
|
+
label: "Got it",
|
|
314
|
+
className: "!text-white !underline",
|
|
315
|
+
onClick: H
|
|
316
|
+
}))), document.body);
|
|
317
|
+
};
|
|
45
318
|
export {
|
|
46
|
-
|
|
319
|
+
pt as GuidedTour
|
|
47
320
|
};
|
|
48
321
|
//# sourceMappingURL=index63.js.map
|
package/dist/index63.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index63.js","sources":["../src/components/Link/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { getA11yNameAttributes } from '../../utils/a11y';\nimport './style.scss';\n\n/**\n * Allows native anchor attributes (aria-*, data-*, etc.) to be passed through,\n * but keeps our own href/onClick/aria-label/aria-labelledby/aria-describedby typing.\n */\ntype NativeAnchorProps = Omit<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n 'href' | 'onClick' | 'target' | 'rel' | 'aria-label' | 'aria-labelledby' | 'aria-describedby'\n>;\n\nexport interface LinkProps extends NativeAnchorProps {\n /**\n * URL to navigate to (required for actual links)\n */\n href: string;\n /**\n * Link text content (string only)\n */\n label: string;\n /**\n * If true, automatically adds target=\"_blank\" and rel=\"noopener noreferrer\"\n * Also appends \" (opens in a new tab)\" to aria-label for screen readers\n */\n external?: boolean;\n /**\n * Accessible name for the link. Use when link text is generic or unclear.\n * Prefer ariaLabelledBy when a visible label exists.\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label this link.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this link.\n * Provides additional context announced after the accessible name.\n */\n ariaDescribedBy?: string;\n /**\n * Click handler (e.g., for analytics tracking)\n */\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n /**\n * Override target (if you need something other than \"_blank\" for external links).\n * Note: If external={true} and target is provided, the provided target will be used.\n */\n target?: string;\n /**\n * Override rel (if you need something other than \"noopener noreferrer\" for external links).\n * Note: If external={true} and rel is provided, the provided rel will be used.\n */\n rel?: string;\n}\n\nconst EXTERNAL_LINK_ARIA_SUFFIX = ' (opens in a new tab)';\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n href,\n label,\n external = false,\n className = '',\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n onClick,\n target,\n rel,\n ...props\n },\n ref\n ) => {\n // Handle external link attributes\n // If external={true}, default to target=\"_blank\" and rel=\"noopener noreferrer\"\n // Explicit target/rel props can override these defaults\n const targetAttr = external ? (target ?? '_blank') : target;\n const relAttr = external ? (rel ?? 'noopener noreferrer') : rel;\n\n // Compute accessible name/description props with correct precedence\n // Precedence: ariaLabelledBy > ariaLabel > visible text content\n const accessibleNameProps = getA11yNameAttributes({\n // External link aria-label enhancement for screen readers:\n // When external={true}, always append \"(opens in a new tab)\"\n ariaLabel:\n external ? `${ariaLabel ?? label}${EXTERNAL_LINK_ARIA_SUFFIX}` : ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n });\n\n const linkClassName = ['se-design-link', 'focus-outline', 'focus-visible:underline', className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <a\n ref={ref}\n href={href}\n target={targetAttr}\n rel={relAttr}\n className={linkClassName}\n data-automation-id={automationId}\n onClick={onClick}\n {...props}\n {...accessibleNameProps}\n >\n {label}\n </a>\n );\n }\n);\n\nLink.displayName = 'Link';\n"],"names":["EXTERNAL_LINK_ARIA_SUFFIX","Link","href","label","external","className","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","onClick","target","rel","props","ref","targetAttr","relAttr","accessibleNameProps","getA11yNameAttributes","linkClassName","filter","Boolean","join","React","createElement","_extends","displayName"],"mappings":";;;;;;;;;;;;AAkEA,MAAMA,IAA4B,yBAErBC,sBACX,CACE;AAAA,EACEC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACA,GAAGC;AACL,GACAC,MACG;AAIGC,QAAAA,IAAaX,IAAYO,KAAU,WAAYA,GAC/CK,IAAUZ,IAAYQ,KAAO,wBAAyBA,GAItDK,IAAsBC,EAAsB;AAAA;AAAA;AAAA,IAGhDX,WACEH,IAAW,GAAGG,KAAaJ,CAAK,GAAGH,CAAyB,KAAKO;AAAAA,IACnEC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,EAAAA,CACD,GAEKU,IAAgB,CAAC,kBAAkB,iBAAiB,2BAA2Bd,CAAS,EAC3Fe,OAAOC,OAAO,EACdC,KAAK,GAAG;AAGTC,SAAAA,gBAAAA,EAAAC,cAAA,KAAAC,EAAA;AAAA,IACEX,KAAAA;AAAAA,IACAZ,MAAAA;AAAAA,IACAS,QAAQI;AAAAA,IACRH,KAAKI;AAAAA,IACLX,WAAWc;AAAAA,IACX,sBAAoBb;AAAAA,IACpBI,SAAAA;AAAAA,EACIG,GAAAA,GACAI,CAAmB,GAEtBd,CACA;AAEP,CACF;AAEAF,EAAKyB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index63.js","sources":["../src/components/GuidedTour/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Icon, RotationTypes } from '../Icon';\nimport { Button } from '../Button';\nimport { debounce } from 'src/utils/debounce';\n\n// Constants\nconst ANIMATION_DURATION_MS = 500;\nconst VIEWPORT_MARGIN_PX = 50;\nconst SCROLL_DEBOUNCE_MS = 150;\n\nconst ARROW_STYLES = {\n 'top-left': { rotate: '315', class: '-top-5 left-0' },\n 'top-right': { rotate: '45', class: '-top-5 right-0' },\n 'bottom-left': { rotate: '225', class: '-bottom-5 left-0' },\n 'bottom-right': { rotate: '135', class: '-bottom-5 right-0' }\n};\n\nexport type TooltipArrowPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport interface GuidedTourStep {\n targetElementSelector: string;\n iframeSelector?: string;\n content: string;\n tooltipPosition?:\n | 'top-left'\n | 'top-right'\n | 'top-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-center'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n tooltipPositionOffset?: {\n horizontal?: number;\n vertical?: number;\n };\n isOptionalStep?: boolean;\n automationId?: string;\n waitForElement?: boolean;\n zIndex?: number;\n isDropdownStep?: boolean;\n}\n\nexport interface GuidedTourProps {\n steps: GuidedTourStep[];\n screenBaseElementSelector?: string;\n onClose: () => void;\n tooltipBackgroundColor?: string;\n tooltipTextColor?: string;\n maxWidth?: number;\n automationId?: string;\n}\n\ninterface TooltipPosition {\n top: number;\n left: number;\n}\n\n// Helper to get the iframe's content document\nconst getIframeDocument = (iframeSelector: string): Document | null => {\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n console.warn(`Iframe not found: ${iframeSelector}`);\n return null;\n }\n\n try {\n return iframe.contentDocument || iframe.contentWindow?.document || null;\n } catch (error) {\n console.error('Cannot access iframe document:', error);\n return null;\n }\n};\n\n// Helper to get target element from main document or iframe\nconst getTargetElement = (selector: string, iframeSelector?: string): HTMLElement | null => {\n if (!iframeSelector) {\n return document.querySelector(selector);\n }\n\n const iframeDoc = getIframeDocument(iframeSelector);\n return iframeDoc ? iframeDoc.querySelector(selector) : null;\n};\n\n// Helper to get adjusted bounding rect accounting for iframe position\nconst getAdjustedBoundingRect = (element: HTMLElement, iframeSelector?: string): DOMRect => {\n const rect = element.getBoundingClientRect();\n\n if (!iframeSelector) {\n return rect;\n }\n\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n return rect;\n }\n\n const iframeRect = iframe.getBoundingClientRect();\n\n // Get iframe's computed styles to account for borders\n const borderLeft = iframe.clientLeft || 0;\n const borderTop = iframe.clientTop || 0;\n\n // Adjust coordinates relative to the main document\n return new DOMRect(\n rect.left + iframeRect.left + borderLeft,\n rect.top + iframeRect.top + borderTop,\n rect.width,\n rect.height\n );\n};\n\n// Determines the arrow position based on the tooltip position\nconst getArrowPosition = (position?: GuidedTourStep['tooltipPosition']): TooltipArrowPosition => {\n switch (position) {\n case 'left-bottom':\n case 'left-center':\n case 'bottom-left':\n return 'top-right';\n case 'right-bottom':\n case 'right-center':\n case 'bottom-right':\n case 'bottom-center':\n return 'top-left';\n case 'top-left':\n case 'left-top':\n return 'bottom-right';\n case 'top-right':\n case 'top-center':\n case 'right-top':\n return 'bottom-left';\n default:\n return 'top-left';\n }\n};\n\n// Gets current scroll position for window or container\nconst getScrollPosition = (): { x: number; y: number } => ({\n x: window.scrollX || window.pageXOffset,\n y: window.scrollY || window.pageYOffset\n});\n\n// Helper to wait for an element to appear using requestAnimationFrame\nconst waitForElement = (\n selector: string,\n callback: (element: HTMLElement) => void,\n iframeSelector?: string\n): (() => void) => {\n let rafId: number;\n\n const checkElement = () => {\n const element = getTargetElement(selector, iframeSelector);\n if (element) {\n callback(element);\n } else {\n rafId = requestAnimationFrame(checkElement);\n }\n };\n\n rafId = requestAnimationFrame(checkElement);\n\n // Return cleanup function\n return () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n };\n};\n\nexport const GuidedTour: FC<GuidedTourProps> = ({\n steps,\n screenBaseElementSelector,\n onClose,\n tooltipBackgroundColor = '#E04E05',\n tooltipTextColor = 'var(--color-white)',\n maxWidth = 350\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState<number>(0);\n const previousTooltipPositionRef = useRef<TooltipPosition | null>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n\n // To handle navigation to the next step\n const navigateToNextStep = () => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex(currentStepIndex + 1);\n } else {\n onClose?.();\n }\n };\n\n const handleTargetElementClick = () => {\n navigateToNextStep();\n };\n\n // To handle clicks outside current target\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n const handleBodyClick = (event: MouseEvent) => {\n const target = event.target as Node;\n const currentTargetElement = getTargetElement(currentStep?.targetElementSelector, currentStep?.iframeSelector);\n const tooltipElement = tooltipRef.current;\n\n // Ignore clicks on the tooltip itself\n if (tooltipElement && tooltipElement.contains(target)) {\n return;\n }\n\n // Check if click is outside current target element\n if (currentTargetElement && !currentTargetElement.contains(target)) {\n // If dropdown step, go to next step on any outside click\n if (currentStep?.isDropdownStep) {\n navigateToNextStep();\n return;\n }\n\n // Otherwise, check if click is on last step's target to close tour\n const lastStep = steps[steps.length - 1];\n const lastStepTargetElement = getTargetElement(lastStep.targetElementSelector, lastStep.iframeSelector);\n\n if (lastStepTargetElement && lastStepTargetElement.contains(target)) {\n onClose();\n }\n }\n };\n\n // Wait for tooltip positioning animation to complete before listening\n const timeoutId = setTimeout(() => {\n document.body.addEventListener('mousedown', handleBodyClick, true);\n }, ANIMATION_DURATION_MS + SCROLL_DEBOUNCE_MS);\n\n return () => {\n clearTimeout(timeoutId);\n document.body.removeEventListener('mousedown', handleBodyClick, true);\n };\n }, [currentStepIndex, steps, onClose]);\n\n // Initialize tooltip styles\n useEffect(() => {\n setCurrentStepIndex(0);\n previousTooltipPositionRef.current = null;\n\n const tooltipElement = tooltipRef.current;\n if (tooltipElement) {\n tooltipElement.style.maxWidth = `${maxWidth}px`;\n tooltipElement.style.backgroundColor = tooltipBackgroundColor;\n tooltipElement.style.color = tooltipTextColor;\n }\n }, [maxWidth, tooltipBackgroundColor, tooltipTextColor]);\n\n // To position and manage the current step\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n if (!currentStep?.targetElementSelector) {\n onClose?.();\n return;\n }\n\n const scrollableContainer = screenBaseElementSelector\n ? (document.querySelector(screenBaseElementSelector) as HTMLElement)\n : null;\n\n const tooltipElement = tooltipRef.current;\n if (!tooltipElement) return;\n\n let targetElement: HTMLElement | null = null;\n let cleanupWait: (() => void) | null = null;\n let handleScroll: (ReturnType<typeof debounce> & (() => void)) | null = null;\n\n const hasScrollableContainer = Boolean(\n scrollableContainer && scrollableContainer.scrollHeight > scrollableContainer.clientHeight\n );\n\n const viewportDimensions = {\n height: scrollableContainer?.clientHeight || window.innerHeight,\n width: scrollableContainer?.clientWidth || window.innerWidth\n };\n\n const initializeStep = (element: HTMLElement) => {\n targetElement = element;\n targetElement.addEventListener('click', handleTargetElementClick);\n\n // To calculate the tooltip position relative to the target element\n const calculateTooltipPosition = (\n targetRect: DOMRect,\n tooltipWidth: number,\n tooltipHeight: number,\n scroll: { x: number; y: number }\n ): TooltipPosition => {\n const position = currentStep.tooltipPosition || 'bottom-center';\n const offsetVertical = currentStep.tooltipPositionOffset?.vertical || 0;\n const offsetHorizontal = currentStep.tooltipPositionOffset?.horizontal || 0;\n\n let top = 0;\n let left = 0;\n\n // To calculate the position based on the tooltip position prop and the offset\n switch (position) {\n case 'bottom-center':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'bottom-left':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'bottom-right':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'top-center':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'top-left':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'top-right':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'left-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'right-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n default:\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n }\n\n return { top, left };\n };\n\n // To apply the position to the tooltip with optional animation\n const applyTooltipPosition = (position: TooltipPosition, shouldAnimate: boolean) => {\n tooltipElement.style.position = 'absolute';\n\n const applyStyles = () => {\n tooltipElement.style.top = `${position.top}px`;\n tooltipElement.style.left = `${position.left}px`;\n };\n\n if (shouldAnimate && previousTooltipPositionRef.current) {\n // Animate to new position immediately\n tooltipElement.style.transition = `top ${ANIMATION_DURATION_MS}ms ease-in-out, left ${ANIMATION_DURATION_MS}ms ease-in-out`;\n applyStyles();\n previousTooltipPositionRef.current = position;\n } else {\n // Direct positioning without animation for first time\n applyStyles();\n previousTooltipPositionRef.current = position;\n }\n };\n\n const positionTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n // Wait for tooltip to be rendered with valid dimensions\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(positionTooltip);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n const position = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(position, shouldAnimate);\n };\n\n // To handle scroll events with debouncing to prevent excessive repositioning\n handleScroll = debounce(() => {\n if (!targetElement || !tooltipElement) return;\n\n // Preserve current position for animation\n const currentPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n\n if (!previousTooltipPositionRef.current && (currentPosition.top !== 0 || currentPosition.left !== 0)) {\n previousTooltipPositionRef.current = currentPosition;\n }\n\n positionTooltip();\n\n // Update reference after animation completes\n if (previousTooltipPositionRef.current) {\n setTimeout(() => {\n const finalPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n if (finalPosition.top !== 0 || finalPosition.left !== 0) {\n previousTooltipPositionRef.current = finalPosition;\n }\n }, ANIMATION_DURATION_MS);\n }\n }, SCROLL_DEBOUNCE_MS);\n\n // Checks if both target and tooltip are fully visible in viewport\n const areElementsVisible = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipLeftViewport: number,\n tooltipWidth: number,\n tooltipHeight: number\n ): boolean => {\n const combinedBoundingBox = {\n top: Math.min(targetRect.top, tooltipTopViewport),\n bottom: Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight),\n left: Math.min(targetRect.left, tooltipLeftViewport),\n right: Math.max(targetRect.right, tooltipLeftViewport + tooltipWidth)\n };\n\n if (scrollableContainer) {\n const containerRect = scrollableContainer.getBoundingClientRect();\n return (\n combinedBoundingBox.top >= containerRect.top + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= containerRect.top + containerRect.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= containerRect.left + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= containerRect.left + containerRect.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n }\n\n return (\n combinedBoundingBox.top >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= viewportDimensions.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= viewportDimensions.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n };\n\n // Calculates the scroll position needed to make both target and tooltip in viewport\n const calculateScrollToCenter = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipHeight: number\n ): number | null => {\n const combinedTop = Math.min(targetRect.top, tooltipTopViewport);\n const combinedBottom = Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight);\n const combinedHeight = combinedBottom - combinedTop;\n\n // Determine scroll context (container or window)\n const isContainer = Boolean(scrollableContainer && hasScrollableContainer);\n const containerRect = isContainer ? scrollableContainer!.getBoundingClientRect() : null;\n\n const viewportHeight = isContainer ? containerRect!.height : window.innerHeight;\n const currentScroll = isContainer ? scrollableContainer!.scrollTop : getScrollPosition().y;\n const maxScroll = isContainer\n ? scrollableContainer!.scrollHeight - scrollableContainer!.clientHeight\n : document.documentElement.scrollHeight - window.innerHeight;\n\n const availableHeight = viewportHeight - 2 * VIEWPORT_MARGIN_PX;\n\n // To calculate the center point\n let centerPoint: number;\n\n if (combinedHeight > availableHeight) {\n // Combined area too tall - center the target element only\n const targetCenter = (targetRect.top + targetRect.bottom) / 2;\n centerPoint = isContainer ? targetCenter - containerRect!.top + currentScroll : targetCenter + currentScroll;\n } else {\n // Center the combined area (target + tooltip)\n const combinedCenter = (combinedTop + combinedBottom) / 2;\n centerPoint = isContainer\n ? combinedCenter - containerRect!.top + currentScroll\n : combinedCenter + currentScroll;\n }\n\n // Calculate final scroll position and clamp to valid range\n const scrollPosition = centerPoint - viewportHeight / 2;\n return Math.max(0, Math.min(scrollPosition, maxScroll));\n };\n\n // To initialize the tooltip positioning and handle scrolling if needed\n const initializeTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n const waitForDimensions = () => {\n if (!tooltipElement || !targetElement) return;\n\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(waitForDimensions);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n\n // Calculate tooltip position in absolute coordinates\n const tooltipAbsolutePosition = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n // Convert to viewport coordinates for visibility check\n const tooltipViewportPosition = {\n top: tooltipAbsolutePosition.top - scroll.y,\n left: tooltipAbsolutePosition.left - scroll.x\n };\n\n // Check if both elements are visible\n const isVisible = areElementsVisible(\n targetRect,\n tooltipViewportPosition.top,\n tooltipViewportPosition.left,\n tooltipDimensions.width,\n tooltipDimensions.height\n );\n\n if (!isVisible) {\n // Calculate scroll needed to make both visible\n const requiredScrollY = calculateScrollToCenter(\n targetRect,\n tooltipViewportPosition.top,\n tooltipDimensions.height\n );\n\n if (requiredScrollY !== null) {\n const scrollElement = hasScrollableContainer && scrollableContainer ? scrollableContainer : window;\n scrollElement.scrollTo({ top: requiredScrollY, behavior: 'auto' });\n\n // Position tooltip immediately after instant scroll\n requestAnimationFrame(() => positionTooltip());\n } else {\n // Cannot fit with scrolling, position anyway\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n } else {\n // Both are visible, position tooltip\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n };\n\n waitForDimensions();\n };\n\n window.addEventListener('scroll', handleScroll, { passive: true });\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.addEventListener('scroll', handleScroll, { passive: true });\n }\n\n // Add scroll listener for iframe if target is inside iframe\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.addEventListener('scroll', handleScroll, { passive: true });\n }\n }\n\n initializeTooltip();\n };\n\n // Check if we need to wait for the element or get it immediately\n if (currentStep.waitForElement) {\n // Wait for element to appear\n cleanupWait = waitForElement(currentStep.targetElementSelector, initializeStep, currentStep.iframeSelector);\n } else {\n const element = getTargetElement(currentStep.targetElementSelector, currentStep.iframeSelector);\n if (!element) return;\n initializeStep(element);\n }\n\n return () => {\n if (cleanupWait) {\n cleanupWait();\n }\n if (targetElement) {\n targetElement.removeEventListener('click', handleTargetElementClick);\n }\n if (handleScroll) {\n window.removeEventListener('scroll', handleScroll);\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.removeEventListener('scroll', handleScroll);\n }\n // Clean up iframe scroll listener\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.removeEventListener('scroll', handleScroll);\n }\n }\n // Cancel any pending debounced calls\n (handleScroll as ReturnType<typeof debounce> & (() => void)).cancel();\n }\n };\n }, [currentStepIndex, steps, onClose, screenBaseElementSelector, maxWidth]);\n\n // Don't render if all steps completed\n if (currentStepIndex >= steps.length) {\n return null;\n }\n\n const currentStep = steps[currentStepIndex];\n const arrowPosition = getArrowPosition(currentStep?.tooltipPosition);\n const arrowStyle = ARROW_STYLES[arrowPosition];\n\n return createPortal(\n <div\n ref={tooltipRef}\n className={`guided-tour-tooltip relative rounded-md p-1`}\n data-automation-id={`${currentStep?.automationId || 'guided-tour'}-tooltip`}\n style={{ zIndex: currentStep?.zIndex || 1300 }}\n >\n <Icon\n name=\"arrow-head\"\n fill={tooltipBackgroundColor}\n rotation={arrowStyle.rotate as RotationTypes}\n className={`guided-tour-tooltip-arrow absolute ${arrowStyle.class}`}\n />\n <div className=\"guided-tour-tooltip-content flex flex-col gap-2\">\n <p>{currentStep?.content}</p>\n {currentStep?.isOptionalStep && (\n <Button type=\"link\" label=\"Got it\" className=\"!text-white !underline\" onClick={handleTargetElementClick} />\n )}\n </div>\n </div>,\n document.body\n );\n};\n"],"names":["ANIMATION_DURATION_MS","VIEWPORT_MARGIN_PX","SCROLL_DEBOUNCE_MS","ARROW_STYLES","rotate","class","getIframeDocument","iframeSelector","iframe","document","querySelector","console","warn","contentDocument","contentWindow","error","getTargetElement","selector","iframeDoc","getAdjustedBoundingRect","element","rect","getBoundingClientRect","iframeRect","borderLeft","clientLeft","borderTop","clientTop","DOMRect","left","top","width","height","getArrowPosition","position","getScrollPosition","x","window","scrollX","pageXOffset","y","scrollY","pageYOffset","waitForElement","callback","rafId","checkElement","requestAnimationFrame","cancelAnimationFrame","GuidedTour","steps","screenBaseElementSelector","onClose","tooltipBackgroundColor","tooltipTextColor","maxWidth","currentStepIndex","setCurrentStepIndex","useState","previousTooltipPositionRef","useRef","tooltipRef","navigateToNextStep","length","handleTargetElementClick","useEffect","currentStep","handleBodyClick","event","target","currentTargetElement","targetElementSelector","tooltipElement","current","contains","isDropdownStep","lastStep","lastStepTargetElement","timeoutId","setTimeout","body","addEventListener","clearTimeout","removeEventListener","style","backgroundColor","color","scrollableContainer","targetElement","cleanupWait","handleScroll","hasScrollableContainer","Boolean","scrollHeight","clientHeight","viewportDimensions","innerHeight","clientWidth","innerWidth","initializeStep","calculateTooltipPosition","targetRect","tooltipWidth","tooltipHeight","scroll","tooltipPosition","offsetVertical","tooltipPositionOffset","vertical","offsetHorizontal","horizontal","bottom","right","applyTooltipPosition","shouldAnimate","applyStyles","transition","positionTooltip","tooltipDimensions","offsetWidth","offsetHeight","debounce","currentPosition","parseFloat","finalPosition","areElementsVisible","tooltipTopViewport","tooltipLeftViewport","combinedBoundingBox","Math","min","max","containerRect","calculateScrollToCenter","combinedTop","combinedBottom","combinedHeight","isContainer","viewportHeight","currentScroll","scrollTop","maxScroll","documentElement","availableHeight","centerPoint","targetCenter","combinedCenter","scrollPosition","initializeTooltip","waitForDimensions","tooltipAbsolutePosition","tooltipViewportPosition","requiredScrollY","scrollElement","scrollTo","behavior","passive","iframeWindow","defaultView","cancel","arrowPosition","arrowStyle","createPortal","React","createElement","ref","className","automationId","zIndex","Icon","name","fill","rotation","content","isOptionalStep","Button","type","label","onClick"],"mappings":";;;;;AAOA,MAAMA,IAAwB,KACxBC,IAAqB,IACrBC,IAAqB,KAErBC,KAAe;AAAA,EACnB,YAAY;AAAA,IAAEC,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAAA,EACpC,aAAa;AAAA,IAAED,QAAQ;AAAA,IAAMC,OAAO;AAAA,EAAA;AAAA,EACpC,eAAe;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAAA,EACvC,gBAAgB;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAC1C,GAgDMC,IAAoBA,CAACC,MAA4C;AACrE,QAAMC,IAASC,SAASC,cAAcH,CAAc;AACpD,MAAI,CAACC;AACHG,mBAAQC,KAAK,qBAAqBL,CAAc,EAAE,GAC3C;AAGT,MAAI;AACF,WAAOC,EAAOK,mBAAmBL,EAAOM,eAAeL,YAAY;AAAA,EACrE,SAASM,GAAO;AACdJ,mBAAQI,MAAM,kCAAkCA,CAAK,GAC9C;AAAA,EACT;AACF,GAGMC,IAAmBA,CAACC,GAAkBV,MAAgD;AAC1F,MAAI,CAACA;AACH,WAAOE,SAASC,cAAcO,CAAQ;AAGxC,QAAMC,IAAYZ,EAAkBC,CAAc;AAClD,SAAOW,IAAYA,EAAUR,cAAcO,CAAQ,IAAI;AACzD,GAGME,IAA0BA,CAACC,GAAsBb,MAAqC;AAC1F,QAAMc,IAAOD,EAAQE,sBAAAA;AAErB,MAAI,CAACf;AACH,WAAOc;AAGT,QAAMb,IAASC,SAASC,cAAcH,CAAc;AACpD,MAAI,CAACC;AACH,WAAOa;AAGT,QAAME,IAAaf,EAAOc,sBAAAA,GAGpBE,IAAahB,EAAOi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