@dckj-npm/dc-material 0.1.6 → 0.1.8

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 (136) hide show
  1. package/build/index.js +12 -19
  2. package/build/lowcode/assets-daily.json +67 -0
  3. package/build/lowcode/assets-dev.json +67 -0
  4. package/build/lowcode/assets-prod.json +67 -0
  5. package/build/lowcode/designer.html +302 -0
  6. package/build/lowcode/index.html +304 -0
  7. package/build/lowcode/index.js +1 -0
  8. package/build/lowcode/meta.js +1 -0
  9. package/build/lowcode/preview.css +1 -0
  10. package/build/lowcode/preview.html +33 -0
  11. package/build/lowcode/preview.js +308 -0
  12. package/build/lowcode/render/default/view.css +1 -0
  13. package/build/lowcode/render/default/view.js +295 -0
  14. package/build/lowcode/view.css +1 -0
  15. package/build/lowcode/view.js +295 -0
  16. package/dist/BizComps.css +1 -1
  17. package/dist/BizComps.js +5 -5
  18. package/dist/BizComps.js.map +1 -1
  19. package/es/components/bottom-navigation/bottom-navigation.d.ts +13 -13
  20. package/es/components/bottom-navigation/index.d.ts +3 -3
  21. package/es/components/colorful-button/colorful-button.d.ts +12 -12
  22. package/es/components/colorful-button/index.d.ts +3 -3
  23. package/es/components/colorful-input/colorful-input.d.ts +8 -8
  24. package/es/components/colorful-input/index.d.ts +3 -3
  25. package/es/components/dc-slider/index.d.ts +3 -3
  26. package/es/components/dc-slider/slider.d.ts +32 -32
  27. package/es/components/menu-list/index.d.ts +6 -0
  28. package/es/components/menu-list/index.js +6 -0
  29. package/es/components/menu-list/index.scss +16 -0
  30. package/es/components/menu-list/menu-list-item.d.ts +5 -0
  31. package/es/components/menu-list/menu-list-item.js +32 -0
  32. package/es/components/menu-list/menu-list-item.scss +49 -0
  33. package/es/components/menu-list/menu-list.d.ts +5 -0
  34. package/es/components/menu-list/menu-list.js +25 -0
  35. package/es/components/menu-list/types.d.ts +23 -0
  36. package/es/components/menu-list/types.js +1 -0
  37. package/es/components/teletext-list/index.d.ts +6 -6
  38. package/es/components/teletext-list/index.js +2 -2
  39. package/es/components/teletext-list/index.scss +16 -16
  40. package/es/components/teletext-list/teletext-list-item.d.ts +42 -42
  41. package/es/components/teletext-list/teletext-list-item.js +2 -2
  42. package/es/components/teletext-list/teletext-list-item.scss +74 -74
  43. package/es/components/teletext-list/teletext-list.d.ts +53 -53
  44. package/es/components/teletext-list/teletext-list.js +2 -2
  45. package/es/components/title/index.d.ts +8 -8
  46. package/es/components/title/index.js +2 -2
  47. package/es/components/title/title-1.d.ts +10 -10
  48. package/es/components/title/title-1.scss +26 -26
  49. package/es/components/title/title-2.d.ts +18 -18
  50. package/es/components/title/title-2.scss +22 -22
  51. package/es/index.d.ts +14 -12
  52. package/es/index.js +1 -0
  53. package/es/index.scss +3 -3
  54. package/es/variables.d.ts +2 -2
  55. package/lib/components/bottom-navigation/bottom-navigation.d.ts +13 -13
  56. package/lib/components/bottom-navigation/index.d.ts +3 -3
  57. package/lib/components/colorful-button/colorful-button.d.ts +12 -12
  58. package/lib/components/colorful-button/index.d.ts +3 -3
  59. package/lib/components/colorful-input/colorful-input.d.ts +8 -8
  60. package/lib/components/colorful-input/index.d.ts +3 -3
  61. package/lib/components/dc-slider/index.d.ts +3 -3
  62. package/lib/components/dc-slider/slider.d.ts +32 -32
  63. package/lib/components/menu-list/index.d.ts +6 -0
  64. package/lib/components/{position → menu-list}/index.js +5 -2
  65. package/lib/components/menu-list/index.scss +16 -0
  66. package/lib/components/menu-list/menu-list-item.d.ts +5 -0
  67. package/lib/components/menu-list/menu-list-item.js +37 -0
  68. package/lib/components/menu-list/menu-list-item.scss +49 -0
  69. package/lib/components/menu-list/menu-list.d.ts +5 -0
  70. package/lib/components/menu-list/menu-list.js +30 -0
  71. package/lib/components/menu-list/types.d.ts +23 -0
  72. package/lib/components/menu-list/types.js +3 -0
  73. package/lib/components/teletext-list/index.d.ts +6 -6
  74. package/lib/components/teletext-list/index.js +2 -2
  75. package/lib/components/teletext-list/index.scss +16 -16
  76. package/lib/components/teletext-list/teletext-list-item.d.ts +42 -42
  77. package/lib/components/teletext-list/teletext-list-item.js +2 -2
  78. package/lib/components/teletext-list/teletext-list-item.scss +74 -74
  79. package/lib/components/teletext-list/teletext-list.d.ts +53 -53
  80. package/lib/components/teletext-list/teletext-list.js +2 -2
  81. package/lib/components/title/index.d.ts +8 -8
  82. package/lib/components/title/title-1.d.ts +10 -10
  83. package/lib/components/title/title-1.scss +26 -26
  84. package/lib/components/title/title-2.d.ts +18 -18
  85. package/lib/components/title/title-2.scss +22 -22
  86. package/lib/index.d.ts +14 -12
  87. package/lib/index.js +3 -1
  88. package/lib/index.scss +3 -3
  89. package/lib/variables.d.ts +2 -2
  90. package/lowcode/d-c-slider/meta.ts +1 -1
  91. package/lowcode/d-c-slider/snippets.ts +42 -42
  92. package/lowcode/menu-list/meta.ts +147 -0
  93. package/lowcode/navigation/meta.ts +1 -1
  94. package/lowcode/teletext-list/meta.ts +300 -300
  95. package/lowcode/title1/meta.ts +59 -59
  96. package/lowcode/title2/meta.ts +93 -93
  97. package/lowcode_es/d-c-slider/meta.d.ts +140 -140
  98. package/lowcode_es/d-c-slider/meta.js +1 -1
  99. package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
  100. package/lowcode_es/menu-list/meta.d.ts +22 -0
  101. package/lowcode_es/menu-list/meta.js +128 -0
  102. package/lowcode_es/meta.js +8 -7
  103. package/lowcode_es/navigation/meta.d.ts +22 -22
  104. package/lowcode_es/navigation/meta.js +1 -1
  105. package/lowcode_es/teletext-list/meta.d.ts +22 -22
  106. package/lowcode_es/teletext-list/meta.js +8 -3
  107. package/lowcode_es/title1/meta.d.ts +22 -22
  108. package/lowcode_es/title1/meta.js +2 -1
  109. package/lowcode_es/title2/meta.d.ts +22 -22
  110. package/lowcode_es/title2/meta.js +2 -1
  111. package/lowcode_es/view.js +3 -3
  112. package/lowcode_lib/d-c-slider/meta.d.ts +140 -140
  113. package/lowcode_lib/d-c-slider/meta.js +1 -1
  114. package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
  115. package/lowcode_lib/menu-list/meta.d.ts +22 -0
  116. package/lowcode_lib/menu-list/meta.js +133 -0
  117. package/lowcode_lib/meta.js +8 -7
  118. package/lowcode_lib/navigation/meta.d.ts +22 -22
  119. package/lowcode_lib/navigation/meta.js +1 -1
  120. package/lowcode_lib/teletext-list/meta.d.ts +22 -22
  121. package/lowcode_lib/teletext-list/meta.js +8 -3
  122. package/lowcode_lib/title1/meta.d.ts +22 -22
  123. package/lowcode_lib/title1/meta.js +2 -1
  124. package/lowcode_lib/title2/meta.d.ts +22 -22
  125. package/lowcode_lib/title2/meta.js +2 -1
  126. package/lowcode_lib/view.js +2 -2
  127. package/package.json +4 -4
  128. package/es/components/position/index.d.ts +0 -3
  129. package/es/components/position/index.js +0 -2
  130. package/es/components/position/index.scss +0 -16
  131. package/es/components/position/position.d.ts +0 -13
  132. package/es/components/position/position.js +0 -39
  133. package/lib/components/position/index.d.ts +0 -3
  134. package/lib/components/position/index.scss +0 -16
  135. package/lib/components/position/position.d.ts +0 -13
  136. package/lib/components/position/position.js +0 -46
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@dckj-npm/dc-material",
5
+ "version": "0.1.8",
6
+ "library": "BizComps",
7
+ "urls": [
8
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.js",
9
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/view.js",
13
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.js",
18
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "DckjNpmDcMaterialMeta",
27
+ "npm": {
28
+ "package": "@dckj-npm/dc-material",
29
+ "version": "0.1.8"
30
+ },
31
+ "url": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js",
32
+ "urls": {
33
+ "default": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@dckj-npm/dc-material",
5
+ "version": "0.1.8",
6
+ "library": "BizComps",
7
+ "urls": [
8
+ "./render/default/view.js",
9
+ "./render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "./view.js",
13
+ "./view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "./render/default/view.js",
18
+ "./render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "DckjNpmDcMaterialMeta",
27
+ "npm": {
28
+ "package": "@dckj-npm/dc-material",
29
+ "version": "0.1.8"
30
+ },
31
+ "url": "./meta.js",
32
+ "urls": {
33
+ "default": "./meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "./meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@dckj-npm/dc-material",
5
+ "version": "0.1.8",
6
+ "library": "BizComps",
7
+ "urls": [
8
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.js",
9
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/view.js",
13
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.js",
18
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "DckjNpmDcMaterialMeta",
27
+ "npm": {
28
+ "package": "@dckj-npm/dc-material",
29
+ "version": "0.1.8"
30
+ },
31
+ "url": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js",
32
+ "urls": {
33
+ "default": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,302 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
+ <title>DEMO 预览</title>
8
+ <style>
9
+ body {
10
+ font-family: PingFangSC-Regular, Roboto, Helvetica Neue, Helvetica, Tahoma, Arial,
11
+ PingFang SC-Light, Microsoft YaHei;
12
+ font-size: 12px;
13
+
14
+ * {
15
+ box-sizing: border-box;
16
+ }
17
+ }
18
+
19
+ body,
20
+ #lce-container {
21
+ position: fixed;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ top: 0;
26
+ box-sizing: border-box;
27
+ padding: 0;
28
+ margin: 0;
29
+ overflow: hidden;
30
+ text-rendering: optimizeLegibility;
31
+ -webkit-user-select: none;
32
+ -webkit-user-drag: none;
33
+ -webkit-text-size-adjust: none;
34
+ -webkit-touch-callout: none;
35
+ -webkit-font-smoothing: antialiased;
36
+ }
37
+
38
+ html {
39
+ min-width: 1024px;
40
+ }
41
+ </style>
42
+ </head>
43
+
44
+ <body>
45
+ <link rel="stylesheet" href="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.7-beta.11/dist/css/engine-core.css" />
46
+ <link rel="stylesheet" href="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6-beta.25/dist/css/engine-ext.css" />
47
+ <link rel="stylesheet" href="https://alifd.alicdn.com/npm/@alilc/lowcode-preset-plugin@0.1.2/dist/lowcode-preset-plugin.css" />
48
+ <link href="https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css" rel="stylesheet" />
49
+ <link href="https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css" rel="stylesheet" />
50
+ <div id="lce-container"></div>
51
+ <script src="https://g.alicdn.com/code/lib/rax/1.1.0/rax.umd.min.js"></script>
52
+ <script src="https://g.alicdn.com/code/lib/react/16.9.0/umd/react.development.js"></script>
53
+ <script src="https://g.alicdn.com/code/lib/react-dom/16.9.0/umd/react-dom.development.js"></script>
54
+ <script src="https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js"></script>
55
+ <script>
56
+ React.PropTypes = PropTypes;
57
+ </script>
58
+ <script src="https://g.alicdn.com/platform/c/??react15-polyfill/0.0.1/dist/index.js,lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js,natty-storage/2.0.2/dist/natty-storage.min.js,natty-fetch/2.6.0/dist/natty-fetch.pc.min.js,tinymce/4.2.5/tinymce-full.js"></script>
59
+ <script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
60
+ <script src="https://g.alicdn.com/code/lib/alifd__next/1.23.20/next-with-locales.min.js"></script>
61
+ <script crossorigin="anonymous" src="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.7-beta.11/dist/js/engine-core.js"></script>
62
+ <script crossorigin="anonymous" src="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6-beta.25/dist/js/engine-ext.js"></script>
63
+ <script>
64
+ if (!window.AliLowCodeEngine.common) {
65
+ window.AliLowCodeEngine.common = {
66
+ designerCabin: window.AliLowCodeEngine.designerCabin,
67
+ editorCabin: window.AliLowCodeEngine.editorCabin,
68
+ skeletonCabin: window.AliLowCodeEngine.skeletonCabin,
69
+ utils: window.AliLowCodeEngine.utils,
70
+ };
71
+ }
72
+ </script>
73
+ <script src="https://alifd.alicdn.com/npm/@alilc/lowcode-preset-plugin@0.1.2/dist/lowcode-preset-plugin.js"></script>
74
+ <script type="text/javascript" charset="utf-8" src="./index.js"></script>
75
+ <script>
76
+ (function (factory) {
77
+ if (typeof define === 'function' && define.amd) {
78
+ define([], factory);
79
+ } else if (typeof module === 'object' && module.exports) {
80
+ module.exports = factory();
81
+ } else {
82
+ window.idleCallbackShim = factory();
83
+ }
84
+ })(function () {
85
+ 'use strict';
86
+ var scheduleStart, throttleDelay, lazytimer, lazyraf;
87
+ var root =
88
+ typeof window != 'undefined' ? window : typeof global != undefined ? global : this || {};
89
+ var requestAnimationFrame =
90
+ (root.cancelRequestAnimationFrame && root.requestAnimationFrame) || setTimeout;
91
+ var cancelRequestAnimationFrame = root.cancelRequestAnimationFrame || clearTimeout;
92
+ var tasks = [];
93
+ var runAttempts = 0;
94
+ var isRunning = false;
95
+ var remainingTime = 7;
96
+ var minThrottle = 35;
97
+ var throttle = 125;
98
+ var index = 0;
99
+ var taskStart = 0;
100
+ var tasklength = 0;
101
+ var IdleDeadline = {
102
+ get didTimeout() {
103
+ return false;
104
+ },
105
+ timeRemaining: function () {
106
+ var timeRemaining = remainingTime - (Date.now() - taskStart);
107
+ return Math.max(0, timeRemaining);
108
+ },
109
+ };
110
+ var setInactive = debounce(function () {
111
+ remainingTime = 22;
112
+ throttle = 66;
113
+ minThrottle = 0;
114
+ });
115
+
116
+ function debounce(fn) {
117
+ var id, timestamp;
118
+ var wait = 99;
119
+ var check = function () {
120
+ var last = Date.now() - timestamp;
121
+
122
+ if (last < wait) {
123
+ id = setTimeout(check, wait - last);
124
+ } else {
125
+ id = null;
126
+ fn();
127
+ }
128
+ };
129
+ return function () {
130
+ timestamp = Date.now();
131
+ if (!id) {
132
+ id = setTimeout(check, wait);
133
+ }
134
+ };
135
+ }
136
+
137
+ function abortRunning() {
138
+ if (isRunning) {
139
+ if (lazyraf) {
140
+ cancelRequestAnimationFrame(lazyraf);
141
+ }
142
+ if (lazytimer) {
143
+ clearTimeout(lazytimer);
144
+ }
145
+ isRunning = false;
146
+ }
147
+ }
148
+
149
+ function onInputorMutation() {
150
+ if (throttle != 125) {
151
+ remainingTime = 7;
152
+ throttle = 125;
153
+ minThrottle = 35;
154
+
155
+ if (isRunning) {
156
+ abortRunning();
157
+ scheduleLazy();
158
+ }
159
+ }
160
+ setInactive();
161
+ }
162
+
163
+ function scheduleAfterRaf() {
164
+ lazyraf = null;
165
+ lazytimer = setTimeout(runTasks, 0);
166
+ }
167
+
168
+ function scheduleRaf() {
169
+ lazytimer = null;
170
+ requestAnimationFrame(scheduleAfterRaf);
171
+ }
172
+
173
+ function scheduleLazy() {
174
+ if (isRunning) {
175
+ return;
176
+ }
177
+ throttleDelay = throttle - (Date.now() - taskStart);
178
+
179
+ scheduleStart = Date.now();
180
+
181
+ isRunning = true;
182
+
183
+ if (minThrottle && throttleDelay < minThrottle) {
184
+ throttleDelay = minThrottle;
185
+ }
186
+
187
+ if (throttleDelay > 9) {
188
+ lazytimer = setTimeout(scheduleRaf, throttleDelay);
189
+ } else {
190
+ throttleDelay = 0;
191
+ scheduleRaf();
192
+ }
193
+ }
194
+
195
+ function runTasks() {
196
+ var task, i, len;
197
+ var timeThreshold = remainingTime > 9 ? 9 : 1;
198
+ taskStart = Date.now();
199
+ isRunning = false;
200
+
201
+ lazytimer = null;
202
+
203
+ if (runAttempts > 2 || taskStart - throttleDelay - 50 < scheduleStart) {
204
+ for (
205
+ i = 0, len = tasks.length;
206
+ i < len && IdleDeadline.timeRemaining() > timeThreshold;
207
+ i++
208
+ ) {
209
+ task = tasks.shift();
210
+ tasklength++;
211
+ if (task) {
212
+ task(IdleDeadline);
213
+ }
214
+ }
215
+ }
216
+
217
+ if (tasks.length) {
218
+ scheduleLazy();
219
+ } else {
220
+ runAttempts = 0;
221
+ }
222
+ }
223
+
224
+ function requestIdleCallbackShim(task) {
225
+ index++;
226
+ tasks.push(task);
227
+ scheduleLazy();
228
+ return index;
229
+ }
230
+
231
+ function cancelIdleCallbackShim(id) {
232
+ var index = id - 1 - tasklength;
233
+ if (tasks[index]) {
234
+ tasks[index] = null;
235
+ }
236
+ }
237
+
238
+ if (!root.requestIdleCallback || !root.cancelIdleCallback) {
239
+ root.requestIdleCallback = requestIdleCallbackShim;
240
+ root.cancelIdleCallback = cancelIdleCallbackShim;
241
+
242
+ if (root.document && document.addEventListener) {
243
+ root.addEventListener('scroll', onInputorMutation, true);
244
+ root.addEventListener('resize', onInputorMutation);
245
+
246
+ document.addEventListener('focus', onInputorMutation, true);
247
+ document.addEventListener('mouseover', onInputorMutation, true);
248
+ ['click', 'keypress', 'touchstart', 'mousedown'].forEach(function (name) {
249
+ document.addEventListener(name, onInputorMutation, { capture: true, passive: true });
250
+ });
251
+
252
+ if (root.MutationObserver) {
253
+ new MutationObserver(onInputorMutation).observe(document.documentElement, {
254
+ childList: true,
255
+ subtree: true,
256
+ attributes: true,
257
+ });
258
+ }
259
+ }
260
+ } else {
261
+ try {
262
+ root.requestIdleCallback(function () {}, { timeout: 0 });
263
+ } catch (e) {
264
+ (function (rIC) {
265
+ var timeRemainingProto, timeRemaining;
266
+ root.requestIdleCallback = function (fn, timeout) {
267
+ if (timeout && typeof timeout.timeout == 'number') {
268
+ return rIC(fn, timeout.timeout);
269
+ }
270
+ return rIC(fn);
271
+ };
272
+ if (
273
+ root.IdleCallbackDeadline &&
274
+ (timeRemainingProto = IdleCallbackDeadline.prototype)
275
+ ) {
276
+ timeRemaining = Object.getOwnPropertyDescriptor(
277
+ timeRemainingProto,
278
+ 'timeRemaining',
279
+ );
280
+ if (!timeRemaining || !timeRemaining.configurable || !timeRemaining.get) {
281
+ return;
282
+ }
283
+ Object.defineProperty(timeRemainingProto, 'timeRemaining', {
284
+ value: function () {
285
+ return timeRemaining.get.call(this);
286
+ },
287
+ enumerable: true,
288
+ configurable: true,
289
+ });
290
+ }
291
+ })(root.requestIdleCallback);
292
+ }
293
+ }
294
+
295
+ return {
296
+ request: requestIdleCallbackShim,
297
+ cancel: cancelIdleCallbackShim,
298
+ };
299
+ });
300
+ </script>
301
+ </body>
302
+ </html>