jb-core 0.27.2 → 0.29.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.
Files changed (57) hide show
  1. package/README.md +4 -3
  2. package/configs/tsconfig-react.json +7 -10
  3. package/configs/tsconfig-web-component.json +8 -11
  4. package/dist/index.cjs.js +109 -1
  5. package/dist/index.cjs.js.br +0 -0
  6. package/dist/index.cjs.js.gz +0 -0
  7. package/dist/index.cjs.js.map +1 -1
  8. package/dist/index.js +119 -1
  9. package/dist/index.js.br +0 -0
  10. package/dist/index.js.gz +0 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.umd.js +113 -1
  13. package/dist/index.umd.js.br +0 -0
  14. package/dist/index.umd.js.gz +0 -0
  15. package/dist/index.umd.js.map +1 -1
  16. package/dist/utils.d.ts +4 -0
  17. package/dist/utils.d.ts.map +1 -1
  18. package/i18n/README.md +7 -2
  19. package/i18n/dist/index.cjs.js +61 -1
  20. package/i18n/dist/index.cjs.js.br +0 -0
  21. package/i18n/dist/index.cjs.js.gz +0 -0
  22. package/i18n/dist/index.cjs.js.map +1 -1
  23. package/i18n/dist/index.js +61 -1
  24. package/i18n/dist/index.js.br +0 -0
  25. package/i18n/dist/index.js.gz +0 -0
  26. package/i18n/dist/index.js.map +1 -1
  27. package/i18n/dist/index.umd.js +65 -1
  28. package/i18n/dist/index.umd.js.br +0 -0
  29. package/i18n/dist/index.umd.js.gz +0 -0
  30. package/i18n/dist/index.umd.js.map +1 -1
  31. package/i18n/tsconfig.json +1 -1
  32. package/lib/utils.ts +19 -4
  33. package/package.json +26 -3
  34. package/react/README.md +10 -1
  35. package/react/dist/index.cjs.js +29 -1
  36. package/react/dist/index.cjs.js.map +1 -1
  37. package/react/dist/index.js +29 -1
  38. package/react/dist/index.js.map +1 -1
  39. package/react/dist/index.umd.js +31 -1
  40. package/react/dist/index.umd.js.map +1 -1
  41. package/react/tsconfig.json +1 -1
  42. package/theme/dist/index.cjs.js +212 -1
  43. package/theme/dist/index.cjs.js.br +0 -0
  44. package/theme/dist/index.cjs.js.gz +0 -0
  45. package/theme/dist/index.cjs.js.map +1 -1
  46. package/theme/dist/index.js +214 -1
  47. package/theme/dist/index.js.br +0 -0
  48. package/theme/dist/index.js.gz +0 -0
  49. package/theme/dist/index.js.map +1 -1
  50. package/theme/dist/index.umd.js +216 -1
  51. package/theme/dist/index.umd.js.br +0 -0
  52. package/theme/dist/index.umd.js.gz +0 -0
  53. package/theme/dist/index.umd.js.map +1 -1
  54. package/theme/stories/colors.mdx +1 -1
  55. package/theme/stories/sizes.mdx +1 -1
  56. package/theme/tsconfig.json +1 -1
  57. package/styles/medias.scss +0 -38
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "theme",
16
16
  "event"
17
17
  ],
18
- "version": "0.27.2",
18
+ "version": "0.29.0",
19
19
  "bugs": "https://github.com/javadbat/jb-core/issues",
20
20
  "license": "MIT",
21
21
  "files": [
@@ -23,7 +23,6 @@
23
23
  "README.md",
24
24
  "lib/",
25
25
  "dist/",
26
- "styles/",
27
26
  "configs/",
28
27
  "theme/",
29
28
  "i18n/",
@@ -33,9 +32,33 @@
33
32
  "main": "index.js",
34
33
  "module": "index.js",
35
34
  "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./index.js"
39
+ },
40
+ "./react": {
41
+ "types": "./react/dist/index.d.ts",
42
+ "default": "./react/index.js"
43
+ },
44
+ "./i18n": {
45
+ "types": "./i18n/dist/index.d.ts",
46
+ "default": "./i18n/dist/index.js"
47
+ },
48
+ "./theme": {
49
+ "types": "./theme/dist/index.d.ts",
50
+ "default": "./theme/dist/index.js"
51
+ },
52
+ "./configs/global": {
53
+ "types": "./configs/global.d.ts",
54
+ "default": "./configs/global.d.ts"
55
+ },
56
+ "./configs/*": "./configs/*",
57
+ "./*": "./*"
58
+ },
36
59
  "repository": {
37
60
  "type": "git",
38
61
  "url": "git@github.com:javadbat/jb-core.git"
39
62
  },
40
63
  "dependencies": {}
41
- }
64
+ }
package/react/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # jb-core react modules
2
2
 
3
+ [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/jb-core)
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://raw.githubusercontent.com/javadbat/jb-core/main/LICENSE)
5
+ [![NPM Version](https://img.shields.io/npm/v/jb-core-react)](https://www.npmjs.com/package/jb-core-react)
6
+ ![GitHub Created At](https://img.shields.io/github/created-at/javadbat/jb-core)
7
+
3
8
  ## useEvent
4
9
 
5
10
  used to bind web-component events to react component event prop
@@ -38,4 +43,8 @@ function YourComponent(){
38
43
  return <div>{instance.prop1}</div>
39
44
 
40
45
  }
41
- ```
46
+ ```
47
+
48
+ ## Shared Documentation
49
+
50
+ For web-component behavior, events, slots, and CSS variables, see [`jb-core`](https://github.com/javadbat/jb-core).
@@ -1,2 +1,30 @@
1
- let e,t;var r=Object.create,n=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;const a=(t=null!=(e=require("react"))?r(o(e)):{},((e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var a,s=c(t),f=0,p=s.length;f<p;f++)a=s[f],l.call(e,a)||void 0===a||n(e,a,{get:(e=>t[e]).bind(null,a),enumerable:!(o=u(t,a))||o.enumerable});return e})(e&&e.__esModule?t:n(t,"default",{value:e,enumerable:!0}),e)),s=e=>{let t=(0,a.useRef)(null);return null===t.current&&(t.current=e()),t};exports.useEvent=function(e,t,r,n=!1){let u=(0,a.useCallback)(t=>{e.current&&"function"==typeof r&&r(t)},[e,r]);(0,a.useEffect)(()=>{let r=e.current;return r&&r.addEventListener(t,u,{passive:n,capture:!1}),function(){r&&r.removeEventListener(t,u,{passive:n,capture:!1})}},[e,t,r,n])},exports.useInstance=(e,t)=>s(()=>new e(...t)).current,exports.useLazyRef=s;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let e = require("react");
3
+ const t = (t) => {
4
+ let r = (0, e.useRef)(null);
5
+ return null === r.current && (r.current = t()), r;
6
+ };
7
+ exports.useEvent = function(t, r, n, u = !1) {
8
+ let c = (0, e.useCallback)((e) => {
9
+ t.current && "function" == typeof n && n(e);
10
+ }, [t, n]);
11
+ (0, e.useEffect)(() => {
12
+ let e = t.current;
13
+ return e && e.addEventListener(r, c, {
14
+ passive: u,
15
+ capture: !1
16
+ }), function() {
17
+ e && e.removeEventListener(r, c, {
18
+ passive: u,
19
+ capture: !1
20
+ });
21
+ };
22
+ }, [
23
+ t,
24
+ r,
25
+ n,
26
+ u
27
+ ]);
28
+ }, exports.useInstance = (e, r) => t(() => new e(...r)).current, exports.useLazyRef = t;
29
+
2
30
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","names":[],"sources":["../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/use-event.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useLazyRef.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useInstance.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAgB,SAA+D,KAAU,OAAc,SAA2B,UAAU,OAAK;CAC/I,MAAM,kBAAkB,uBAAY,CAAC,MAAS;AAC5C,MAAG,IAAI,kBAAkB,WAAW,WAClC,SAAQ,EAAE;CAEb,GAAC,CACF,KACE;sBAEE,MAAA;QACA,MAAI,IAAA;AACN,MAAA,IAEA,KAAO,iBAAgB,OAAA,iBAAA;GAClB;GACD,SAAI;EACN,EAAA;AAGN,SAAA,SAAA,UAAA;;;;;;;;;;;;;;;;AClBA,MAAa,aAAa,CAAI,gBAAyB;CACrD,MAAM,MAAwB,kBAAO,KAAK;AAC1C,KAAI,IAAI,YAAY,KAClB,KAAI,UAAU,aAAa;AAE7B,QAAO;AACR;;;;;;;;;;CCMD,MAAO,KAAM,WAAW,MAAsC,IAAQ,MAAE,GAAA,cAAkD;AACxH,QAAM,GAAE"}
1
+ {"version":3,"file":"index.cjs.js","names":[],"sources":["../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/use-event.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useLazyRef.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useInstance.ts"],"mappings":""}
@@ -1,2 +1,30 @@
1
- import{useCallback as e,useEffect as t,useRef as n}from"react";function r(n,u,c,l=!1){let o=e(e=>{n.current&&"function"==typeof c&&c(e)},[n,c]);t(()=>{let e=n.current;return e&&e.addEventListener(u,o,{passive:l,capture:!1}),function(){e&&e.removeEventListener(u,o,{passive:l,capture:!1})}},[n,u,c,l])}let u=e=>{let t=n(null);return null===t.current&&(t.current=e()),t},c=(e,t)=>u(()=>new e(...t)).current;export{r as useEvent,c as useInstance,u as useLazyRef};
1
+ import { useCallback as e, useEffect as t, useRef as n } from "react";
2
+ function r(n, u, c, l = !1) {
3
+ let o = e((e) => {
4
+ n.current && "function" == typeof c && c(e);
5
+ }, [n, c]);
6
+ t(() => {
7
+ let e = n.current;
8
+ return e && e.addEventListener(u, o, {
9
+ passive: l,
10
+ capture: !1
11
+ }), function() {
12
+ e && e.removeEventListener(u, o, {
13
+ passive: l,
14
+ capture: !1
15
+ });
16
+ };
17
+ }, [
18
+ n,
19
+ u,
20
+ c,
21
+ l
22
+ ]);
23
+ }
24
+ let u = (e) => {
25
+ let t = n(null);
26
+ return null === t.current && (t.current = e()), t;
27
+ }, c = (e, t) => u(() => new e(...t)).current;
28
+ export { r as useEvent, c as useInstance, u as useLazyRef };
29
+
2
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/use-event.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useLazyRef.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useInstance.ts"],"sourcesContent":[],"mappings":";;;AAEA,SAAgB,SAA+D,KAAU,OAAc,SAA2B,UAAU,OAAK;CAC/I,MAAM,kBAAkB,YAAY,CAAC,MAAS;AAC5C,MAAG,IAAI,kBAAkB,WAAW,WAClC,SAAQ,EAAE;CAEb,GAAC,CACF,KACE;WAEE,MAAA;QACA,MAAI,IAAA;AACN,MAAA,IAEA,KAAO,iBAAgB,OAAA,iBAAA;GAClB;GACD,SAAI;EACN,EAAA;AAGN,SAAA,SAAA,UAAA;;;;;;;;;;;;;;;;AClBA,MAAa,aAAa,CAAI,gBAAyB;CACrD,MAAM,MAAwB,OAAO,KAAK;AAC1C,KAAI,IAAI,YAAY,KAClB,KAAI,UAAU,aAAa;AAE7B,QAAO;AACR;;;;;;;;;;CCMD,MAAO,KAAM,WAAW,MAAsC,IAAQ,MAAE,GAAA,cAAkD;AACxH,QAAM,GAAE"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/use-event.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useLazyRef.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useInstance.ts"],"mappings":""}
@@ -1,2 +1,32 @@
1
- var e,t;e=this,t=function(e,t){let r,n;var u=Object.create,o=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,f=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty;n=null!=(r=t)?u(f(r)):{},t=((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var u,f=l(t),i=0,p=f.length;i<p;i++)u=f[i],a.call(e,u)||void 0===u||o(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(n=c(t,u))||n.enumerable});return e})(r&&r.__esModule?n:o(n,"default",{value:r,enumerable:!0}),r);let i=e=>{let r=(0,t.useRef)(null);return null===r.current&&(r.current=e()),r};e.useEvent=function(e,r,n,u=!1){let o=(0,t.useCallback)(t=>{e.current&&"function"==typeof n&&n(t)},[e,n]);(0,t.useEffect)(()=>{let t=e.current;return t&&t.addEventListener(r,o,{passive:u,capture:!1}),function(){t&&t.removeEventListener(r,o,{passive:u,capture:!1})}},[e,r,n,u])},e.useInstance=(e,t)=>i(()=>new e(...t)).current,e.useLazyRef=i},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JBCoreReact={},e.React);
1
+ var e = this, t = function(e, t) {
2
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
3
+ let n = (e) => {
4
+ let n = (0, t.useRef)(null);
5
+ return null === n.current && (n.current = e()), n;
6
+ };
7
+ e.useEvent = function(e, n, r, u = !1) {
8
+ let o = (0, t.useCallback)((t) => {
9
+ e.current && "function" == typeof r && r(t);
10
+ }, [e, r]);
11
+ (0, t.useEffect)(() => {
12
+ let t = e.current;
13
+ return t && t.addEventListener(n, o, {
14
+ passive: u,
15
+ capture: !1
16
+ }), function() {
17
+ t && t.removeEventListener(n, o, {
18
+ passive: u,
19
+ capture: !1
20
+ });
21
+ };
22
+ }, [
23
+ e,
24
+ n,
25
+ r,
26
+ u
27
+ ]);
28
+ }, e.useInstance = (e, t) => n(() => new e(...t)).current, e.useLazyRef = n;
29
+ };
30
+ "object" == typeof exports && "undefined" != typeof module ? t(exports, require("react")) : "function" == typeof define && define.amd ? define(["exports", "react"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).JBCoreReact = {}, e.React);
31
+
2
32
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","names":[],"sources":["../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/use-event.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useLazyRef.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/react/lib/hooks/useInstance.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAgB,SAA+D,KAAU,OAAc,SAA2B,UAAU,OAAK;CAC/I,MAAM,kBAAkB,uBAAY,CAAC,MAAS;AAC5C,MAAG,IAAI,kBAAkB,WAAW,WAClC,SAAQ,EAAE;CAEb,GAAC,CACF,KACE;sBAEE,MAAA;QACA,MAAI,IAAA;AACN,MAAA,IAEA,KAAO,iBAAgB,OAAA,iBAAA;GAClB;GACD,SAAI;EACN,EAAA;AAGN,SAAA,SAAA,UAAA;;;;;;;;;;;;;;;;AClBA,MAAa,aAAa,CAAI,gBAAyB;CACrD,MAAM,MAAwB,kBAAO,KAAK;AAC1C,KAAI,IAAI,YAAY,KAClB,KAAI,UAAU,aAAa;AAE7B,QAAO;AACR;;;;;;;;;;CCMD,MAAO,KAAM,WAAW,MAAsC,IAAQ,MAAE,GAAA,cAAkD;AACxH,QAAM,GAAE"}
1
+ {"version":3,"file":"index.umd.js","names":[],"sources":["../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/use-event.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useLazyRef.ts","../lib/hooks/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/react/lib/hooks/useInstance.ts"],"mappings":""}
@@ -13,4 +13,4 @@
13
13
  "dist",
14
14
  ],
15
15
  "extends":"../configs/tsconfig-react.json"
16
- }
16
+ }
@@ -1,2 +1,213 @@
1
- var e=class{get value(){return`oklch(${this.lightness} ${this.chroma} ${this.hue})`}constructor(e,t){this.variableName=t,this.lightness=e.lightness,this.chroma=e.chroma,this.hue=e.hue}};function t(t){return new e({lightness:6*(3+1.3*t)*.01,chroma:.001*(14+.09*t),hue:258.36},`--jb-neutral-${t}`)}function r(t){return new e({lightness:t.lightness+.07,chroma:t.chroma+.07,hue:t.hue},`${t.variableName}-hover`)}function n(t){return new e({lightness:t.lightness-.1,chroma:t.chroma-.05,hue:t.hue},`${t.variableName}-pressed`)}function s(t){const r=Math.min(t.lightness+.12*(1-t.lightness),.985),n=t.chroma*(1-.15*(r-t.lightness));return new e({lightness:r,chroma:Number(n.toFixed(3)),hue:t.hue},`${t.variableName}-l`)}function a(t){const r=Math.max(t.lightness-.12*t.lightness,.02),n=t.chroma*(1-.15*(r-t.lightness));return new e({lightness:r,chroma:n,hue:t.hue},`${t.variableName}-d`)}function o(t){const r=Math.min(t.lightness+.65*(1-t.lightness),.93),n=.55*t.chroma*(1-.08*(r-t.lightness)),s=t.hue>=70&&t.hue<=162?5:-3,a=t.hue+s;return new e({lightness:r,chroma:Number(n.toFixed(3)),hue:a},`${t.variableName}-subtle`)}function i(t){const r=Math.max(t.lightness-.35,.22),n=Math.min(1.6*t.chroma,.28);return new e({lightness:Number(r.toFixed(3)),chroma:Number(n.toFixed(3)),hue:t.hue},`${t.variableName}-contrast`)}function l(e){return{main:e,hover:r(e),pressed:n(e),light:s(e),dark:a(e),subtle:o(e),contrast:i(e)}}const h=new e({lightness:.6,chroma:.26,hue:256},"--jb-primary"),u=new e({lightness:.6,chroma:.26,hue:286},"--jb-secondary"),c=new e({lightness:.75,chroma:.18,hue:70},"--jb-yellow"),m=new e({lightness:.68,chroma:.1484,hue:162.1},"--jb-green"),g=new e({lightness:.6,chroma:.22,hue:23.21},"--jb-red"),p={single:{black:new e({lightness:.14,chroma:0,hue:0},"--jb-black"),white:new e({lightness:1,chroma:0,hue:0},"--jb-white"),highlight:new e({lightness:.93,chroma:.2302,hue:125.18},"--jb-highlight")},neutral:[t(0),t(1),t(2),t(3),t(4),t(5),t(6),t(7),t(8),t(9),t(10)],primary:l(h),secondary:l(u),yellow:l(c),green:l(m),red:l(g)};function d(e){try{const{value:t,...r}=e;"function"==typeof window.CSS.registerProperty&&window.CSS.registerProperty({...r}),b(e.name,t)}catch(e){}}function b(e,t){try{t&&(document.documentElement.style.getPropertyValue(e)||document.documentElement.style.setProperty(e,t))}catch(e){}}function x(e=""){return crypto?.randomUUID?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2)}`}function y(e,t){d({name:t??e.variableName??`--${x()}`,syntax:"<color>",inherits:!0,initialValue:e.value})}function w(e){y(e.main),y(e.dark),y(e.light),y(e.contrast),y(e.hover),y(e.pressed),y(e.subtle)}function f(){var e;!function(e){y(e.neutral[0],"--jb-neutral"),w(e.primary),w(e.secondary),w(e.red),w(e.red),w(e.green),w(e.yellow),y(e.single.black),y(e.single.white),y(e.single.highlight);for(let t=1;t<=10;t++)y(e.neutral[t])}(p),y((e=p).single.black,"--jb-text-primary"),y(e.neutral[7],"--jb-text-secondary"),y(e.single.white,"--jb-text-contrast")}function v(){d({name:"--jb-radius",inherits:!0,value:"1rem",initialValue:"16px",syntax:"<length-percentage>"}),d({name:"--jb-radius-xs",inherits:!0,value:"0.5rem",initialValue:"8px",syntax:"<length-percentage>"}),d({name:"--jb-radius-sm",inherits:!0,value:"0.75rem",initialValue:"12px",syntax:"<length-percentage>"}),d({name:"--jb-radius-lg",inherits:!0,value:"1.25rem",initialValue:"20px",syntax:"<length-percentage>"}),d({name:"--jb-radius-xl",inherits:!0,value:"1.5rem",initialValue:"24px",syntax:"<length-percentage>"})}exports.JBColor=e,exports.createColorGroup=l,exports.createThemeColor=function(t){const r={};return Object.keys(t).forEach(n=>{const s=l(new e(t[n],`---jb-${n}`));r[n]=s}),r},exports.defaultColors=p,exports.defineColors=f,exports.defineSizes=v,exports.getContrastColor=i,exports.getDarkerColor=a,exports.getHoverColor=r,exports.getLighterColor=s,exports.getNeutralColor=t,exports.getPressedColor=n,exports.getSubtleColor=o,exports.registerCssProperty=d,exports.registerDefaultVariables=function(){v(),f()},exports.setColors=function(e){function t(e){document.documentElement.style.setProperty(e.variableName,e.value)}function r(e){t(e.main),t(e.light),t(e.dark),t(e.contrast),t(e.subtle),t(e.hover),t(e.pressed)}e.primary&&r(e.primary),e.secondary&&r(e.secondary),e.green&&r(e.green),e.red&&r(e.red),e.yellow&&r(e.yellow)},exports.setCssProperty=b;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ var e = class {
3
+ get value() {
4
+ return `oklch(${this.lightness} ${this.chroma} ${this.hue})`;
5
+ }
6
+ constructor(e, t) {
7
+ this.variableName = t, this.lightness = e.lightness, this.chroma = e.chroma, this.hue = e.hue;
8
+ }
9
+ };
10
+ function t(t) {
11
+ return new e({
12
+ lightness: 6 * (3 + 1.3 * t) * .01,
13
+ chroma: .001 * (14 + .09 * t),
14
+ hue: 258.36
15
+ }, `--jb-neutral-${t}`);
16
+ }
17
+ function r(t) {
18
+ return new e({
19
+ lightness: t.lightness + .07,
20
+ chroma: t.chroma + .07,
21
+ hue: t.hue
22
+ }, `${t.variableName}-hover`);
23
+ }
24
+ function n(t) {
25
+ return new e({
26
+ lightness: t.lightness - .1,
27
+ chroma: t.chroma - .05,
28
+ hue: t.hue
29
+ }, `${t.variableName}-pressed`);
30
+ }
31
+ function s(t) {
32
+ const r = Math.min(t.lightness + .12 * (1 - t.lightness), .985), n = t.chroma * (1 - .15 * (r - t.lightness));
33
+ return new e({
34
+ lightness: r,
35
+ chroma: Number(n.toFixed(3)),
36
+ hue: t.hue
37
+ }, `${t.variableName}-l`);
38
+ }
39
+ function a(t) {
40
+ const r = Math.max(t.lightness - .12 * t.lightness, .02);
41
+ return new e({
42
+ lightness: r,
43
+ chroma: t.chroma * (1 - .15 * (r - t.lightness)),
44
+ hue: t.hue
45
+ }, `${t.variableName}-d`);
46
+ }
47
+ function o(t) {
48
+ const r = Math.min(t.lightness + .65 * (1 - t.lightness), .93), n = .55 * t.chroma * (1 - .08 * (r - t.lightness)), s = t.hue >= 70 && t.hue <= 162 ? 5 : -3, a = t.hue + s;
49
+ return new e({
50
+ lightness: r,
51
+ chroma: Number(n.toFixed(3)),
52
+ hue: a
53
+ }, `${t.variableName}-subtle`);
54
+ }
55
+ function i(t) {
56
+ const r = Math.max(t.lightness - .35, .22), n = Math.min(1.6 * t.chroma, .28);
57
+ return new e({
58
+ lightness: Number(r.toFixed(3)),
59
+ chroma: Number(n.toFixed(3)),
60
+ hue: t.hue
61
+ }, `${t.variableName}-contrast`);
62
+ }
63
+ function l(e) {
64
+ return {
65
+ main: e,
66
+ hover: r(e),
67
+ pressed: n(e),
68
+ light: s(e),
69
+ dark: a(e),
70
+ subtle: o(e),
71
+ contrast: i(e)
72
+ };
73
+ }
74
+ const h = new e({
75
+ lightness: .6,
76
+ chroma: .26,
77
+ hue: 256
78
+ }, "--jb-primary"), u = new e({
79
+ lightness: .6,
80
+ chroma: .26,
81
+ hue: 286
82
+ }, "--jb-secondary"), c = new e({
83
+ lightness: .75,
84
+ chroma: .18,
85
+ hue: 70
86
+ }, "--jb-yellow"), g = new e({
87
+ lightness: .68,
88
+ chroma: .1484,
89
+ hue: 162.1
90
+ }, "--jb-green"), m = new e({
91
+ lightness: .6,
92
+ chroma: .22,
93
+ hue: 23.21
94
+ }, "--jb-red"), p = {
95
+ single: {
96
+ black: new e({
97
+ lightness: .14,
98
+ chroma: 0,
99
+ hue: 0
100
+ }, "--jb-black"),
101
+ white: new e({
102
+ lightness: 1,
103
+ chroma: 0,
104
+ hue: 0
105
+ }, "--jb-white"),
106
+ highlight: new e({
107
+ lightness: .93,
108
+ chroma: .2302,
109
+ hue: 125.18
110
+ }, "--jb-highlight")
111
+ },
112
+ neutral: [
113
+ t(0),
114
+ t(1),
115
+ t(2),
116
+ t(3),
117
+ t(4),
118
+ t(5),
119
+ t(6),
120
+ t(7),
121
+ t(8),
122
+ t(9),
123
+ t(10)
124
+ ],
125
+ primary: l(h),
126
+ secondary: l(u),
127
+ yellow: l(c),
128
+ green: l(g),
129
+ red: l(m)
130
+ };
131
+ function d(e) {
132
+ try {
133
+ const { value: t, ...r } = e;
134
+ "function" == typeof window.CSS.registerProperty && window.CSS.registerProperty({ ...r }), b(e.name, t);
135
+ } catch (e) {}
136
+ }
137
+ function b(e, t) {
138
+ try {
139
+ t && (document.documentElement.style.getPropertyValue(e) || document.documentElement.style.setProperty(e, t));
140
+ } catch (e) {}
141
+ }
142
+ function y(e = "") {
143
+ return crypto?.randomUUID ? `${e}-${crypto.randomUUID()}` : `${e}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
144
+ }
145
+ function x(e, t) {
146
+ d({
147
+ name: t ?? e.variableName ?? `--${y()}`,
148
+ syntax: "<color>",
149
+ inherits: !0,
150
+ initialValue: e.value
151
+ });
152
+ }
153
+ function f(e) {
154
+ x(e.main), x(e.dark), x(e.light), x(e.contrast), x(e.hover), x(e.pressed), x(e.subtle);
155
+ }
156
+ function w() {
157
+ var e;
158
+ (function(e) {
159
+ x(e.neutral[0], "--jb-neutral"), f(e.primary), f(e.secondary), f(e.red), f(e.red), f(e.green), f(e.yellow), x(e.single.black), x(e.single.white), x(e.single.highlight);
160
+ for (let t = 1; t <= 10; t++) x(e.neutral[t]);
161
+ })(p), x((e = p).single.black, "--jb-text-primary"), x(e.neutral[7], "--jb-text-secondary"), x(e.single.white, "--jb-text-contrast");
162
+ }
163
+ function v() {
164
+ d({
165
+ name: "--jb-radius",
166
+ inherits: !0,
167
+ value: "1rem",
168
+ initialValue: "16px",
169
+ syntax: "<length-percentage>"
170
+ }), d({
171
+ name: "--jb-radius-xs",
172
+ inherits: !0,
173
+ value: "0.5rem",
174
+ initialValue: "8px",
175
+ syntax: "<length-percentage>"
176
+ }), d({
177
+ name: "--jb-radius-sm",
178
+ inherits: !0,
179
+ value: "0.75rem",
180
+ initialValue: "12px",
181
+ syntax: "<length-percentage>"
182
+ }), d({
183
+ name: "--jb-radius-lg",
184
+ inherits: !0,
185
+ value: "1.25rem",
186
+ initialValue: "20px",
187
+ syntax: "<length-percentage>"
188
+ }), d({
189
+ name: "--jb-radius-xl",
190
+ inherits: !0,
191
+ value: "1.5rem",
192
+ initialValue: "24px",
193
+ syntax: "<length-percentage>"
194
+ });
195
+ }
196
+ exports.JBColor = e, exports.createColorGroup = l, exports.createThemeColor = function(t) {
197
+ const r = {};
198
+ return Object.keys(t).forEach((n) => {
199
+ r[n] = l(new e(t[n], `---jb-${n}`));
200
+ }), r;
201
+ }, exports.defaultColors = p, exports.defineColors = w, exports.defineSizes = v, exports.getContrastColor = i, exports.getDarkerColor = a, exports.getHoverColor = r, exports.getLighterColor = s, exports.getNeutralColor = t, exports.getPressedColor = n, exports.getSubtleColor = o, exports.registerCssProperty = d, exports.registerDefaultVariables = function() {
202
+ v(), w();
203
+ }, exports.setColors = function(e) {
204
+ function t(e) {
205
+ document.documentElement.style.setProperty(e.variableName, e.value);
206
+ }
207
+ function r(e) {
208
+ t(e.main), t(e.light), t(e.dark), t(e.contrast), t(e.subtle), t(e.hover), t(e.pressed);
209
+ }
210
+ e.primary && r(e.primary), e.secondary && r(e.secondary), e.green && r(e.green), e.red && r(e.red), e.yellow && r(e.yellow);
211
+ }, exports.setCssProperty = b;
212
+
2
213
  //# sourceMappingURL=index.cjs.js.map
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","names":[],"sources":["../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/color/jb-color.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/color/utils.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/color/constants.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/utils.ts","../../dist/index.js","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/color/define-colors.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/color/index.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/sizes/index.ts","../../../../../../../../../../../../Home/NeveshtAfzar/work/Azad/source/design-system/design-system/web-component/jb-core/theme/lib/theme.ts"],"sourcesContent":["function e(e,t,o,i={}){document.addEventListener(t,t=>{t.composedPath().includes(e)&&(t.stopPropagation(),t.stopImmediatePropagation(),o(t))},{capture:!0,...i})}function t(e,t,o){const i={altKey:t.altKey,bubbles:t.bubbles,cancelable:t.cancelable,code:t.code,composed:t.composed,ctrlKey:t.ctrlKey,detail:t.detail,isComposing:t.isComposing,key:t.key,location:t.location,metaKey:t.metaKey,repeat:t.repeat,shiftKey:t.shiftKey,view:t.view,charCode:t.charCode,keyCode:t.keyCode,which:t.which,...o};return new KeyboardEvent(e,i)}function o(e,t,o){const i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:t.detail,isComposing:t.isComposing,view:t.view,which:t.which,data:t.data,dataTransfer:t.dataTransfer,inputType:t.inputType,targetRanges:\"function\"==typeof t.getTargetRanges?t.getTargetRanges():[],...o};return new InputEvent(e,i)}function i(e,t,o){const i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:t.detail,view:t.view,which:t.which,altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,movementX:t.movementX,movementY:t.movementY,screenX:t.screenX,screenY:t.screenY,relatedTarget:t.relatedTarget,modifierAltGraph:t.getModifierState(\"AltGraph\"),modifierCapsLock:t.getModifierState(\"CapsLock\"),modifierFn:t.getModifierState(\"Fn\"),modifierFnLock:t.getModifierState(\"FnLock\"),modifierHyper:t.getModifierState(\"Hyper\"),modifierNumLock:t.getModifierState(\"NumLock\"),modifierScrollLock:t.getModifierState(\"ScrollLock\"),modifierSuper:t.getModifierState(\"Super\"),modifierSymbol:t.getModifierState(\"Symbol\"),modifierSymbolLock:t.getModifierState(\"SymbolLock\"),...o};return new MouseEvent(e,i)}function n(e,t,o){const i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:t.detail,view:t.view,which:t.which,relatedTarget:t.relatedTarget,...o};return new FocusEvent(e,i)}const r=()=>/Mobi/i.test(window.navigator.userAgent);function a(e){if(\"string\"!=typeof e)return\"\";return e.replace(/[۰-۹]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-1728)})}function c(e){if(\"string\"!=typeof e&&isNaN(e))return\"\";return e.toString().replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+1728)})}function d(e,t=document){const o=new CSSStyleSheet;return o.replaceSync(e),t.adoptedStyleSheets.push(o),o}function l(e=\"\"){return crypto?.randomUUID?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2)}`}export{n as createFocusEvent,o as createInputEvent,t as createKeyboardEvent,i as createMouseEvent,c as enToFaDigits,a as faToEnDigits,d as injectCss,r as isMobile,e as listenAndSilentEvent,l as uniqueId};\n//# sourceMappingURL=index.js.map"],"mappings":"AAEA,IAAa,EAAb,MAKE,SAAI,GACF,MAAA,SAAgB,KAAK,aAAa,KAAK,UAAU,KAAK,MACvD,CACD,WAAA,CAAY,E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AAO,MAAO,qBACjC,EAAY,EAAO,QAAQ,GAAI,uBAC/B,EAAY,EAAO,OAAO,MAAO,qBC1BlC,CCbD,SAAgB,IAKd,EAAoB,CAClB,KAAK,cACL,UAAS,EACT,MAAM,OACN,aAAa,OACb,OAAO,wBAET,EAAoB,CAClB,KAAK,iBACL,UAAS,EACT,MAAA,SACA,aAAa,MACb,OAAO,wBAET,EAAoB,CAClB,KAAK,iBACL,UAAS,EACT,MAAA,UACA,aAAa,OACb,OAAO,wBAET,EAAoB,CAClB,KAAK,iBACL,UAAS,EACT,MAAA,UACA,aAAa,OACb,OAAO,wBAET,EAAoB,CAClB,KAAK,iBACL,UAAS,EACT,MAAA,SACA,aAAa,OACb,OAAO,uBApCV,uEDqCD,SAAiC,GAC/B,MAAM,EAAsC,CAAE,EAM9C,OALA,OAAO,KAAK,GAAW,QAAS,IAC9B,MACM,EAAa,EADD,IAAI,EAAQ,EAAU,GAAA,SAAkC,MAE1E,EAAY,GAAyB,IAEhC,CACR,yTE9CD,WACE,IACA,GACD,oBFaD,SAA0B,GACxB,SAAS,EAAS,GAChB,SAAS,gBAAgB,MAAM,YAAY,EAAM,aAAwB,EAAM,MAChF,CACD,SAAS,EAAc,GACrB,EAAS,EAAM,MACf,EAAS,EAAM,OACf,EAAS,EAAM,MACf,EAAS,EAAM,UACf,EAAS,EAAM,QACf,EAAS,EAAM,OACf,EAAS,EAAM,QAChB,CACD,EAAO,SAAW,EAAc,EAAO,SACvC,EAAO,WAAa,EAAc,EAAO,WACzC,EAAO,OAAS,EAAc,EAAO,OACrC,EAAO,KAAO,EAAc,EAAO,KACnC,EAAO,QAAU,EAAc,EAAO,OACvC"}
1
+ {"version":3,"file":"index.cjs.js","names":[],"sources":["../lib/color/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/color/jb-color.ts","../lib/color/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/color/utils.ts","../lib/color/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/color/constants.ts","../lib/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/utils.ts","../../dist/index.js","../lib/color/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/color/define-colors.ts","../lib/color/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/color/index.ts","../lib/sizes/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/sizes/index.ts","../lib/file:/A:/Home/NeveshtAfzar/work/Azad/source/design-system/design-system/modules/jb-core/theme/lib/theme.ts"],"sourcesContent":[null,null,null,null,"function e(e, t, o, n = {}) {\n\tdocument.addEventListener(t, (t) => {\n\t\tt.composedPath().includes(e) && (t.stopPropagation(), t.stopImmediatePropagation(), o(t));\n\t}, {\n\t\tcapture: !0,\n\t\t...n\n\t});\n}\nfunction t(e, t, o) {\n\tconst n = {\n\t\taltKey: t.altKey,\n\t\tbubbles: t.bubbles,\n\t\tcancelable: t.cancelable,\n\t\tcode: t.code,\n\t\tcomposed: t.composed,\n\t\tctrlKey: t.ctrlKey,\n\t\tdetail: t.detail,\n\t\tisComposing: t.isComposing,\n\t\tkey: t.key,\n\t\tlocation: t.location,\n\t\tmetaKey: t.metaKey,\n\t\trepeat: t.repeat,\n\t\tshiftKey: t.shiftKey,\n\t\tview: t.view,\n\t\tcharCode: t.charCode,\n\t\tkeyCode: t.keyCode,\n\t\twhich: t.which,\n\t\t...o\n\t};\n\treturn new KeyboardEvent(e, n);\n}\nfunction o(e, t, o) {\n\tconst n = {\n\t\tbubbles: t.bubbles,\n\t\tcancelable: t.cancelable,\n\t\tcomposed: t.composed,\n\t\tdetail: t.detail,\n\t\tisComposing: t.isComposing,\n\t\tview: t.view,\n\t\twhich: t.which,\n\t\tdata: t.data,\n\t\tdataTransfer: t.dataTransfer,\n\t\tinputType: t.inputType,\n\t\ttargetRanges: \"function\" == typeof t.getTargetRanges ? t.getTargetRanges() : [],\n\t\t...o\n\t};\n\treturn new InputEvent(e, n);\n}\nfunction n(e, t, o) {\n\tconst n = {\n\t\tbubbles: t.bubbles,\n\t\tcancelable: t.cancelable,\n\t\tcomposed: t.composed,\n\t\tdetail: t.detail,\n\t\tview: t.view,\n\t\twhich: t.which,\n\t\taltKey: t.altKey,\n\t\tbutton: t.button,\n\t\tbuttons: t.buttons,\n\t\tclientX: t.clientX,\n\t\tclientY: t.clientY,\n\t\tctrlKey: t.ctrlKey,\n\t\tmetaKey: t.metaKey,\n\t\tshiftKey: t.shiftKey,\n\t\tmovementX: t.movementX,\n\t\tmovementY: t.movementY,\n\t\tscreenX: t.screenX,\n\t\tscreenY: t.screenY,\n\t\trelatedTarget: t.relatedTarget,\n\t\tmodifierAltGraph: t.getModifierState(\"AltGraph\"),\n\t\tmodifierCapsLock: t.getModifierState(\"CapsLock\"),\n\t\tmodifierFn: t.getModifierState(\"Fn\"),\n\t\tmodifierFnLock: t.getModifierState(\"FnLock\"),\n\t\tmodifierHyper: t.getModifierState(\"Hyper\"),\n\t\tmodifierNumLock: t.getModifierState(\"NumLock\"),\n\t\tmodifierScrollLock: t.getModifierState(\"ScrollLock\"),\n\t\tmodifierSuper: t.getModifierState(\"Super\"),\n\t\tmodifierSymbol: t.getModifierState(\"Symbol\"),\n\t\tmodifierSymbolLock: t.getModifierState(\"SymbolLock\"),\n\t\t...o\n\t};\n\treturn new MouseEvent(e, n);\n}\nfunction i(e, t, o) {\n\tconst n = {\n\t\tbubbles: t.bubbles,\n\t\tcancelable: t.cancelable,\n\t\tcomposed: t.composed,\n\t\tdetail: t.detail,\n\t\tview: t.view,\n\t\twhich: t.which,\n\t\trelatedTarget: t.relatedTarget,\n\t\t...o\n\t};\n\treturn new FocusEvent(e, n);\n}\nconst r = () => /Mobi/i.test(window.navigator.userAgent);\nfunction a(e) {\n\treturn \"string\" != typeof e ? \"\" : e.replace(/[۰-۹]/g, function(e) {\n\t\treturn String.fromCharCode(e.charCodeAt(0) - 1728);\n\t});\n}\nfunction c(e) {\n\treturn \"string\" != typeof e && isNaN(e) ? \"\" : e.toString().replace(/[0-9]/g, function(e) {\n\t\treturn String.fromCharCode(e.charCodeAt(0) + 1728);\n\t});\n}\nfunction l(e, t = document) {\n\tconst o = new CSSStyleSheet();\n\treturn o.replaceSync(e), t.adoptedStyleSheets.push(o), o;\n}\nfunction d(e = \"\") {\n\treturn crypto?.randomUUID ? `${e}-${crypto.randomUUID()}` : `${e}-${Date.now()}-${Math.random().toString(36).slice(2)}`;\n}\nfunction s(e, t = !1) {\n\treturn null === e ? t : \"\" === e || \"true\" === e.toLowerCase() || \"false\" !== e.toLowerCase() && Boolean(e);\n}\nexport { i as createFocusEvent, o as createInputEvent, t as createKeyboardEvent, n as createMouseEvent, c as enToFaDigits, a as faToEnDigits, l as injectCss, r as isMobile, e as listenAndSilentEvent, s as parseBooleanAttribute, d as uniqueId };\n\n//# sourceMappingURL=index.js.map",null,null,null,null],"mappings":";AAEA,IAAa,IAAb,MAAA;CAKE,IAAA,QAAI;EACF,OAAO,SAAS,KAAK,UAAA,GAAa,KAAK,OAAA,GAAU,KAAK,IAAA;CACxD;CACA,YAAY,GAAyB,GAAA;EACnC,KAAK,eAAe,GACpB,KAAK,YAAY,EAAY,WAC7B,KAAK,SAAS,EAAY,QAC1B,KAAK,MAAM,EAAY;CACzB;AAAA;ACTF,SAAgB,EAAgB,GAAA;CAC9B,OAAO,IAAI,EAAQ;EAAE,WAAY,KAAK,IAAY,MAAR,KAAgB;EAAM,QAAgC,QAAvB,KAAc,MAAR;EAAwB,KAAK;CAAA,GAAU,gBAAgB,GAAA;AACxI;AACA,SAAgB,EAAc,GAAA;CAC5B,OAAO,IAAI,EAAQ;EAAE,WAAW,EAAM,YAAY;EAAM,QAAQ,EAAM,SAAS;EAAM,KAAK,EAAM;CAAA,GAAQ,GAAG,EAAM,aAAA,OAAA;AAC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