domquery-com 1.0.4 → 1.0.5

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/src/select.js CHANGED
@@ -1,21 +1,29 @@
1
- function rgbToRgba(x, l = .5) {
2
- if (!x || x.startsWith("rgba")) return x;
3
- var I = x.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
4
- if (I) {
5
- const [, q, y, n] = I;
6
- return `rgba(${q}, ${y}, ${n}, ${l})`
1
+ function rgbToRgba(w, l = .5) {
2
+ if (!w || w.startsWith("rgba")) return w;
3
+ var H = w.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
4
+ if (H) {
5
+ const [, m, A, p] = H;
6
+ return `rgba(${m}, ${A}, ${p}, ${l})`
7
7
  }
8
- if (I = x.match(/^#([a-fA-F0-9]{6})$/)) {
9
- var p = I[1];
10
- x = parseInt(p.substr(0, 2), 16);
11
- I = parseInt(p.substr(2, 2), 16);
12
- p = parseInt(p.substr(4, 2), 16);
13
- return `rgba(${x}, ${I}, ${p}, ${l})`
8
+ if (H = w.match(/^#([a-fA-F0-9]{6})$/)) {
9
+ var x = H[1];
10
+ w = parseInt(x.substr(0, 2), 16);
11
+ H = parseInt(x.substr(2, 2), 16);
12
+ x = parseInt(x.substr(4, 2), 16);
13
+ return `rgba(${w}, ${H}, ${x}, ${l})`
14
14
  }
15
- return (I = x.match(/^#([a-fA-F0-9]{3})$/)) ? (p = I[1], x = parseInt(p[0] + p[0], 16), I = parseInt(p[1] + p[1], 16), p = parseInt(p[2] + p[2], 16), `rgba(${x}, ${I}, ${p}, ${l})`) : x
15
+ return (H = w.match(/^#([a-fA-F0-9]{3})$/)) ? (x = H[1], w = parseInt(x[0] + x[0], 16), H = parseInt(x[1] + x[1], 16), x = parseInt(x[2] + x[2], 16), `rgba(${w}, ${H}, ${x}, ${l})`) : w
16
16
  }
17
- $.select = function(x, l, I) {
18
- function p() {
17
+ $.select = function(w, l, H) {
18
+ function x(g, B) {
19
+ let z;
20
+ return function() {
21
+ const q = arguments;
22
+ z || (g.apply(this, q), z = !0, setTimeout(() => z = !1, B))
23
+ }
24
+ }
25
+
26
+ function m() {
19
27
  var g = "undefined" !== typeof $ && $.isMobile ? $.isMobile() : {
20
28
  isMobile: !1,
21
29
  isTablet: !1,
@@ -24,63 +32,64 @@ $.select = function(x, l, I) {
24
32
  return !0 === g.isMobile
25
33
  }
26
34
 
27
- function q(g) {
28
- const C = document.createElement("div");
29
- C.innerHTML = g;
30
- return C.textContent || C.innerText || ""
35
+ function A(g) {
36
+ const B = document.createElement("div");
37
+ B.innerHTML = g;
38
+ return B.textContent || B.innerText || ""
31
39
  }
32
40
 
33
- function y(g, C = 0) {
34
- return 1 === C ? g.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : g.replace(/\x3c!--(.*?)--\x3e/g, "$1")
41
+ function p(g, B = 0) {
42
+ return 1 === B ? g.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : g.replace(/\x3c!--(.*?)--\x3e/g, "$1")
35
43
  }
36
44
 
37
- function n(g, C) {
45
+ function R(g,
46
+ B) {
38
47
  g = $(g);
39
- C = g.find("option, li").eq(C);
40
- if (!C.length) return {
48
+ B = g.find("option, li").eq(B);
49
+ if (!B.length) return {
41
50
  text: g.find("option, li").first().text().trim(),
42
51
  tag: null
43
52
  };
44
- var A = C.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
45
- const t = [];
46
- var G = C;
47
- for (t.unshift(A); G.length;) {
53
+ var z = B.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
54
+ const q = [];
55
+ var G = B;
56
+ for (q.unshift(z); G.length;) {
48
57
  var e = G.attr("class")?.split(" ") || [];
49
- A = !1;
50
- for (const T of e)
51
- if (e = g.find(`[group="${T}"]`), e.length) {
58
+ z = !1;
59
+ for (const S of e)
60
+ if (e = g.find(`[group="${S}"]`), e.length) {
52
61
  G = e.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
53
- t.unshift(G);
62
+ q.unshift(G);
54
63
  G = e;
55
- A = !0;
64
+ z = !0;
56
65
  break
57
- } if (!A) break
66
+ } if (!z) break
58
67
  }
59
68
  return {
60
- text: t.join(" > "),
61
- tag: C.attr("tag")
69
+ text: q.join(" > "),
70
+ tag: B.attr("tag")
62
71
  }
63
72
  }
64
73
 
65
- function O(g, C) {
66
- C = parseInt(C?.radioSize || "16") / 2;
67
- return `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${C}px; height: ${C}px; background-color: ${g}; border-radius: 50%;"></div>`
74
+ function O(g, B) {
75
+ B = parseInt(B?.radioSize ||
76
+ "16") / 2;
77
+ return `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${B}px; height: ${B}px; background-color: ${g}; border-radius: 50%;"></div>`
68
78
  }
69
79
 
70
- function V(g) {
80
+ function E(g) {
71
81
  g = parseInt(g);
72
82
  return `<span style="\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\twidth: ${.3*g}px;\n\t\t\theight: ${.6*g}px;\n\t\t\tborder: solid white;\n\t\t\tborder-width: 0 ${.12*g}px ${.12*g}px 0;\n\t\t\ttransform: translate(-50%, -65%) rotate(45deg);\n\t\t\tdisplay: block;\n\t\t"></span>`
73
83
  }
74
84
 
75
- function H(g, C = "16px") {
76
- return `<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: ${Math.max(.7*
77
- parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webkit-font-smoothing: antialiased; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: transparent;">${g}</div>`
85
+ function ja(g, B = "16px") {
86
+ return `<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: ${Math.max(.7*parseInt(B),10)}px; font-weight: bold; line-height: 1; text-align: center; -webkit-font-smoothing: antialiased; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: transparent;">${g}</div>`
78
87
  }
79
88
 
80
- function da(g = "50%", C = "10px") {
89
+ function W(g = "50%", B = "10px") {
81
90
  return {
82
91
  position: "absolute",
83
- right: C,
92
+ right: B,
84
93
  top: g,
85
94
  transform: "translateY(-50%)",
86
95
  width: "16px",
@@ -88,25 +97,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
88
97
  }
89
98
  }
90
99
 
91
- function ea(g) {
92
- let C = g.groupArrowStyle?.size || g.arrowSize,
93
- A = g.arrowRight || da().right,
94
- t = g.groupArrowColor || g.arrowColor;
95
- if ("checkbox" ===
96
- g.pointer || g.pointer?.startsWith("checkbox_")) {
100
+ function aa(g) {
101
+ let B = g.groupArrowStyle?.size || g.arrowSize,
102
+ z = g.arrowRight || W().right,
103
+ q = g.groupArrowColor || g.arrowColor;
104
+ if ("checkbox" === g.pointer || g.pointer?.startsWith("checkbox_")) {
97
105
  if (!g.groupArrowStyle?.size && g.checkboxSize) {
98
106
  var G = parseFloat(g.checkboxSize);
99
- isNaN(G) || (C = `${.6*G}px`)
100
- }!g.groupArrowColor && g.checkboxColor && (t = g.checkboxColor)
101
- } else "radio" === g.pointer ? (!g.groupArrowStyle?.size && g.radioSize && (G = parseFloat(g.radioSize), isNaN(G) || (C = `${.6*G}px`)), !g.groupArrowColor && g.radioColor && (t = g.radioColor)) : g.pointer && g.pointer.startsWith("question_") && !g.groupArrowColor && g.questionColor && (t = g.questionColor);
107
+ isNaN(G) || (B = `${.6*G}px`)
108
+ }!g.groupArrowColor && g.checkboxColor && (q = g.checkboxColor)
109
+ } else "radio" === g.pointer ? (!g.groupArrowStyle?.size && g.radioSize && (G = parseFloat(g.radioSize),
110
+ isNaN(G) || (B = `${.6*G}px`)), !g.groupArrowColor && g.radioColor && (q = g.radioColor)) : g.pointer && g.pointer.startsWith("question_") && !g.groupArrowColor && g.questionColor && (q = g.questionColor);
102
111
  return {
103
- arrowSizeValue: C,
104
- arrowRightValue: A,
105
- arrowColorValue: t
112
+ arrowSizeValue: B,
113
+ arrowRightValue: z,
114
+ arrowColorValue: q
106
115
  }
107
116
  }
108
117
 
109
- function Y(g) {
118
+ function T(g) {
110
119
  return {
111
120
  wrapperClass: g + "-wrapper",
112
121
  triggerClass: g + "-trigger",
@@ -116,76 +125,75 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
116
125
  }
117
126
  }
118
127
 
119
- function R(g) {
128
+ function Y(g) {
120
129
  return {
121
130
  border: `2px solid ${g||"#ccc"}`,
122
131
  backgroundColor: "#fff"
123
132
  }
124
133
  }
125
134
 
126
- function P(g) {
127
- wa && ((g = g.find("select").first()[0]) && g._selectId && (g = window._gong_tea_yun_0.get(g._selectId + "_close")) && g.call(this, wa), wa = 0)
135
+ function y(g) {
136
+ wa && ((g = g.find("select").first()[0]) &&
137
+ g._selectId && (g = window._gong_tea_yun_0.get(g._selectId + "_close")) && g.call(this, wa), wa = 0)
128
138
  }
129
139
 
130
- function D(g, C, A) {
131
- const t = g.closest('[class*="-wrapper"]');
140
+ function M(g, B, z) {
141
+ const q = g.closest('[class*="-wrapper"]');
132
142
  g.find("div").first().css({
133
- "background-color": A.optionsStyle.background ||
134
- "#fff"
143
+ "background-color": z.optionsStyle.background || "#fff"
135
144
  });
136
- P(t);
137
- C ? (A.slideToggle ? g.css("opacity", A.opacity || 0) : g.css("opacity", ""), g.slideUp(C, {
138
- easing: A.easing,
145
+ y(q);
146
+ B ? (z.slideToggle ? g.css("opacity", z.opacity || 0) : g.css("opacity", ""), g.slideUp(B, {
147
+ easing: z.easing,
139
148
  complete: domqueryFocus
140
149
  })) : (g.hide(), domqueryFocus())
141
150
  }
142
151
 
143
- function M(g, C, A, t) {
144
- if (!xa) {
145
- xa = !0;
152
+ function I(g, B, z, q) {
153
+ if (!ya) {
154
+ ya = !0;
146
155
  var G = g.closest('[class*="-wrapper"]');
147
- P(G);
148
- A.css({
156
+ y(G);
157
+ z.css({
149
158
  "background-color": "rgba(0, 0, 0, 0)"
150
159
  });
151
160
  var e = G.find("select").first()[0]._selectId;
152
161
  setTimeout(() => {
153
162
  e && domquery(this).historyOff("select-" + e);
154
- xa = !1
155
- }, C + 300);
156
- g.slideUp(C, {
157
- easing: t.easing,
163
+ ya = !1
164
+ }, B + 300);
165
+ g.slideUp(B, {
166
+ easing: q.easing,
158
167
  complete: function() {
159
- A.hide();
168
+ z.hide();
160
169
  domqueryFocus()
161
170
  }
162
171
  })
163
172
  }
164
173
  }
165
174
 
166
- function z(g, C, A, t,
167
- G) {
168
- if (!xa) {
169
- xa = !0;
170
- P(t);
171
- t.data("upHTMe10Running", !0);
172
- A.css({
175
+ function U(g, B, z, q, G) {
176
+ if (!ya) {
177
+ ya = !0;
178
+ y(q);
179
+ q.data("upHTMe10Running", !0);
180
+ z.css({
173
181
  "background-color": "rgba(0, 0, 0, 0)",
174
182
  opacity: ""
175
183
  });
176
- var e = t.find("select").first()[0]._selectId;
184
+ var e = q.find("select").first()[0]._selectId;
177
185
  setTimeout(() => {
178
- !t.data("groupClicked") && e && domquery(this).historyOff("select-" + e);
179
- xa = !1
180
- }, C + 300);
181
- g.css("opacity", "").slideUp(C, {
186
+ !q.data("groupClicked") && e && domquery(this).historyOff("select-" + e);
187
+ ya = !1
188
+ }, B + 300);
189
+ g.css("opacity", "").slideUp(B, {
182
190
  easing: G.easing,
183
191
  complete: function() {
184
- A.css("pointer-events", "none").hide();
185
- t.removeClass(G.openClass);
186
- t.attr("data-state", "closed");
192
+ z.css("pointer-events", "none").hide();
193
+ q.removeClass(G.openClass);
194
+ q.attr("data-state", "closed");
187
195
  setTimeout(() => {
188
- A.css("pointer-events", "")
196
+ z.css("pointer-events", "")
189
197
  }, 100);
190
198
  domqueryFocus()
191
199
  }
@@ -193,28 +201,27 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
193
201
  }
194
202
  }
195
203
 
196
- function W(g, C) {
197
- var A =
198
- p(),
199
- t = g.data("settings");
200
- if (!A) {
204
+ function Z(g, B) {
205
+ var z = m(),
206
+ q = g.data("settings");
207
+ if (!z) {
201
208
  const G = g[0].getBoundingClientRect(),
202
209
  e = window.innerHeight;
203
- C = C.find("div").first();
204
- const T = t && t.height,
205
- U = T || `${.6*e}px`;
206
- A = e - G.bottom;
207
- const aa = G.top;
208
- if (t.parentView) return g = {
210
+ B = B.find("div").first();
211
+ const S = q && q.height,
212
+ V = S || `${.6*e}px`;
213
+ z = e - G.bottom;
214
+ const ca = G.top;
215
+ if (q.parentView) return g = {
209
216
  position: "fixed",
210
217
  left: G.left + "px",
211
218
  width: G.width + "px",
212
219
  zIndex: 1E3,
213
- height: U,
220
+ height: V,
214
221
  overflowY: "auto",
215
222
  overflowX: "hidden"
216
- }, aa > A && A < C[0].scrollHeight ? (g.bottom = e - G.top + "px", g.top = "auto", g.borderRadius = "4px 4px 0 0") : (g.top = G.bottom + "px", g.bottom = "auto", g.borderRadius = "0 0 4px 4px"), g;
217
- if (T) return {
223
+ }, ca > z && z < B[0].scrollHeight ? (g.bottom = e - G.top + "px", g.top = "auto", g.borderRadius = "4px 4px 0 0") : (g.top = G.bottom + "px", g.bottom = "auto", g.borderRadius = "0 0 4px 4px"), g;
224
+ if (S) return {
218
225
  top: "100%",
219
226
  bottom: "auto",
220
227
  borderRadius: "0 0 4px 4px",
@@ -222,28 +229,29 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
222
229
  borderBottom: "1px solid #ccc"
223
230
  };
224
231
  g = g.find("select").first();
225
- g = (g.length ? parseInt(g.height() || g.css("height")) : null) || C[0].scrollHeight;
226
- t = {
232
+ g = (g.length ? parseInt(g.height() || g.css("height")) : null) || B[0].scrollHeight;
233
+ q = {
227
234
  top: "100%",
228
235
  bottom: "auto",
229
236
  borderRadius: "0 0 4px 4px",
230
237
  borderTop: "none",
231
238
  borderBottom: "1px solid #ccc"
232
239
  };
233
- A < g && aa > A ? (t = {
234
- top: "auto",
235
- bottom: "100%",
236
- borderRadius: "4px 4px 0 0",
237
- borderBottom: "1px solid #ccc",
238
- borderTop: "none"
239
- }, aa < g && C.css({
240
- maxHeight: `${aa-10}px`,
241
- overflowY: "auto"
242
- })) : A < g && C.css({
243
- maxHeight: `${A-10}px`,
244
- overflowY: "auto"
245
- });
246
- return t
240
+ z < g &&
241
+ ca > z ? (q = {
242
+ top: "auto",
243
+ bottom: "100%",
244
+ borderRadius: "4px 4px 0 0",
245
+ borderBottom: "1px solid #ccc",
246
+ borderTop: "none"
247
+ }, ca < g && B.css({
248
+ maxHeight: `${ca-10}px`,
249
+ overflowY: "auto"
250
+ })) : z < g && B.css({
251
+ maxHeight: `${z-10}px`,
252
+ overflowY: "auto"
253
+ });
254
+ return q
247
255
  }
248
256
  return {
249
257
  position: "fixed",
@@ -251,52 +259,51 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
251
259
  right: "0",
252
260
  bottom: "0",
253
261
  top: "auto",
254
- borderRadius: t.MborderRadius || "4px 4px 0 0",
262
+ borderRadius: q.MborderRadius || "4px 4px 0 0",
255
263
  width: "100%",
256
- Mheight: t.Mheight || "60vh",
257
- height: t.height || "auto",
258
- minHeight: t.minHeight || "auto",
259
- maxHeight: t.maxHeight || (A ? t.Mheight || "60vh" : t.height || "300px"),
264
+ Mheight: q.Mheight || "60vh",
265
+ height: q.height || "auto",
266
+ minHeight: q.minHeight || "auto",
267
+ maxHeight: q.maxHeight || (z ? q.Mheight || "60vh" : q.height || "300px"),
260
268
  overflowY: "auto",
261
269
  zIndex: "1000"
262
270
  }
263
271
  }
264
272
 
265
- function Z(g) {
273
+ function ma(g) {
266
274
  g.css({
267
275
  "pointer-events": "none",
268
276
  opacity: "0.6"
269
277
  })
270
278
  }
271
279
 
272
- function ka(g, C) {
273
- C && g && Object.entries(C).forEach(([A, t]) => {
280
+ function fa(g, B) {
281
+ B && g && Object.entries(B).forEach(([z, q]) => {
274
282
  try {
275
- g.style[A] = t
283
+ g.style[z] = q
276
284
  } catch (G) {
277
- console.warn("Style application failed for property:",
278
- A)
285
+ console.warn("Style application failed for property:", z)
279
286
  }
280
287
  })
281
288
  }
282
289
 
283
- function ja(g, C) {
284
- if (C.scrollColor) try {
290
+ function Ba(g, B) {
291
+ if (B.scrollColor) try {
285
292
  g.find('[class*="-options"]');
286
- const A = C.optionsStyle.background || "#fff",
287
- t = C.optionStyle.borderBottomColor || "#ddd",
293
+ const z = B.optionsStyle.background || "#fff",
294
+ q = B.optionStyle.borderBottomColor || "#ddd",
288
295
  G = `scrollbar-${g.attr("id")||Math.random().toString(36).substr(2,9)}`;
289
296
  $(`#${G}`).remove();
290
297
  const e = document.createElement("style");
291
298
  e.id = G;
292
- e.textContent = `\n\t\t\t\t#${g.attr("id")} .${C.optionsClass}::-webkit-scrollbar,\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} div::-webkit-scrollbar {\n\t\t\t\t\twidth: 8px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${C.optionsClass}::-webkit-scrollbar-track,\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} div::-webkit-scrollbar-track {\n\t\t\t\t\tbackground: ${A};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${C.optionsClass}::-webkit-scrollbar-thumb,\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} div::-webkit-scrollbar-thumb {\n\t\t\t\t\tbackground: ${t};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tborder: 1px solid ${A};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${C.optionsClass}::-webkit-scrollbar-thumb:hover,\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} div::-webkit-scrollbar-thumb:hover {\n\t\t\t\t\tbackground: ${t};\n\t\t\t\t\topacity: 0.8;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${t} ${A};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${C.optionsClass} div {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${t} ${A};\n\t\t\t\t}\n\t\t\t`;
299
+ e.textContent = `\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar {\n\t\t\t\t\twidth: 8px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-track,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-track {\n\t\t\t\t\tbackground: ${z};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-thumb,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-thumb {\n\t\t\t\t\tbackground: ${q};\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\tborder: 1px solid ${z};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass}::-webkit-scrollbar-thumb:hover,\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div::-webkit-scrollbar-thumb:hover {\n\t\t\t\t\tbackground: ${q};\n\t\t\t\t\topacity: 0.8;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${q} ${z};\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#${g.attr("id")} .${B.optionsClass} div {\n\t\t\t\t\tscrollbar-width: thin;\n\t\t\t\t\tscrollbar-color: ${q} ${z};\n\t\t\t\t}\n\t\t\t`;
293
300
  document.head.appendChild(e);
294
301
  g.data("scrollbarStyleId", G)
295
- } catch (A) {
296
- console.warn("\uc2a4\ud06c\ub864\ubc14 \uc0c9\uc0c1 \uc801\uc6a9 \uc911 \uc624\ub958:", A)
302
+ } catch (z) {
303
+ console.warn("\uc2a4\ud06c\ub864\ubc14 \uc0c9\uc0c1 \uc801\uc6a9 \uc911 \uc624\ub958:", z)
297
304
  }
298
305
  }
299
- let xa = !1,
306
+ let ya = !1,
300
307
  wa = 0;
301
308
  window._isMouseDown_gong = !1;
302
309
  window._isGroupClick = !1;
@@ -306,7 +313,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
306
313
  g.tagName && "TEXTAREA" !== g.tagName && "true" !== g.getAttribute("contenteditable") || (window._selectPreviousFocus = g, void 0 !== g.selectionStart && (window._selectPreviousFocusPosition = g.selectionStart))
307
314
  });
308
315
  window.domqueryFocus = function() {
309
- if (p()) try {
316
+ if (m()) try {
310
317
  window._selectPreviousFocus && document.body.contains(window._selectPreviousFocus) ? setTimeout(() => {
311
318
  try {
312
319
  if (window._selectPreviousFocus.focus(), "INPUT" === window._selectPreviousFocus.tagName || "TEXTAREA" === window._selectPreviousFocus.tagName) {
@@ -328,26 +335,26 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
328
335
  g.textContent = "\n\t\t\t.group-option {\n\t\t\t\tposition: relative;\n\t\t\t\tpadding-right: 30px !important;\n\t\t\t\tfont-style: italic;\n\t\t\t\tcolor: #666;\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\t\t\t.child-option {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t\n\t\t";
329
336
  document.head.appendChild(g)
330
337
  }
331
- "function" === typeof x ? (I = x, l = {}, x = 0) : "function" === typeof l ? "object" === typeof x ? (I = l, l = x, x = 0) : (I = l, l = {}) : "object" === typeof x && (l = x, x = 0);
338
+ "function" === typeof w ? (H = w, l = {}, w = 0) : "function" === typeof l ? "object" === typeof w ? (H = l, l = w, w = 0) : (H = l, l = {}) : "object" === typeof w && (l = w, w = 0);
332
339
  l = l || {};
333
- x = parseInt(x) || 0;
340
+ w = parseInt(w) || 0;
334
341
  this.elements.forEach(g => {
335
- function C(c) {
342
+ function B(c) {
336
343
  if (!c) return "10px";
337
344
  c = c.split(" ").filter(b => b.trim());
338
345
  return 1 === c.length ? c[0] : 2 === c.length ? c[1] : 4 === c.length ? c[3] : "10px"
339
346
  }
340
347
  if (g._selectId) {
341
- var A = $(g).parent();
342
- if (A.length && A[0].className && "string" === typeof A[0].className && A[0].className.includes("-wrapper")) return
348
+ var z = $(g).parent();
349
+ if (z.length && z[0].className && "string" === typeof z[0].className && z[0].className.includes("-wrapper")) return
343
350
  }
344
- var t = Math.random().toString(36).substr(2,
351
+ var q = Math.random().toString(36).substr(2,
345
352
  9);
346
- A = Y("select-" + t);
347
- var G = p();
353
+ z = T("select-" + q);
354
+ var G = m();
348
355
  G = "auto" === l.slideToggle ? G ? !1 : !0 : l.slideToggle || !1;
349
356
  let e = {
350
- ...A,
357
+ ...z,
351
358
  height: l.height,
352
359
  defaultText: "Select an option",
353
360
  allowHTML: !0,
@@ -433,6 +440,9 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
433
440
  borderRadius: "0 0 4px 4px",
434
441
  boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
435
442
  zIndex: "1",
443
+ maxHeight: "280px",
444
+ overflowY: "auto",
445
+ overflowX: "hidden",
436
446
  WebkitOverflowScrolling: "touch",
437
447
  WebkitTapHighlightColor: "transparent",
438
448
  touchAction: "manipulation"
@@ -462,8 +472,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
462
472
  textDecoration: "line-through"
463
473
  },
464
474
  questionStyle: {
465
- ...da(),
466
- ...R(l.buttonColor),
475
+ ...W(),
476
+ ...Y(l.buttonColor),
467
477
  borderRadius: "50%",
468
478
  display: "flex",
469
479
  alignItems: "center",
@@ -475,8 +485,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
475
485
  height: l.questionSize || "16px"
476
486
  },
477
487
  checkboxStyle: {
478
- ...da(),
479
- ...R(l.buttonColor),
488
+ ...W(),
489
+ ...Y(l.buttonColor),
480
490
  borderRadius: "3px",
481
491
  zIndex: "1",
482
492
  display: "block"
@@ -498,8 +508,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
498
508
  }
499
509
  },
500
510
  radioStyle: {
501
- ...da(),
502
- ...R(l.buttonColor),
511
+ ...W(),
512
+ ...Y(l.buttonColor),
503
513
  borderRadius: "50%"
504
514
  },
505
515
  radioSelectedStyle: {
@@ -542,8 +552,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
542
552
  defaultColor: "#333333",
543
553
  defaultBorderColor: "#cccccc",
544
554
  triggerHoverBgColor: l.triggerHoverBgColor || "#f5f5f5",
545
- triggerHoverColor: l.triggerHoverColor ||
546
- "#000000",
555
+ triggerHoverColor: l.triggerHoverColor || "#000000",
547
556
  triggerHoverBorderColor: l.triggerHoverBorderColor || "#999999",
548
557
  radioColor: l.radioColor || "#007bff",
549
558
  checkboxColor: l.checkboxColor || "#007bff",
@@ -551,13 +560,14 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
551
560
  buttonColor: l.buttonColor || "#ccc",
552
561
  dotColor: l.dotColor || "#007bff",
553
562
  ...l,
554
- ...A,
563
+ ...z,
555
564
  slideToggle: G
556
565
  };
557
566
  ("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_")) && setTimeout(() => {
558
567
  const c = $(g),
559
568
  b = c.find("option[selected]").filter(function() {
560
- return "" !== $(this).val().trim() && !$(this).is(":disabled")
569
+ return "" !==
570
+ $(this).val().trim() && !$(this).is(":disabled")
561
571
  }).map(function() {
562
572
  return {
563
573
  value: $(this).val(),
@@ -574,83 +584,84 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
574
584
  width: e.checkboxSize,
575
585
  height: e.checkboxSize
576
586
  });
577
- 0 < b && h.html(H(b, e.checkboxSize));
587
+ 0 < b && h.html(ja(b, e.checkboxSize));
578
588
  a.find('[class*="-option"]').each(function() {
579
- const d = $(this);
589
+ const d =
590
+ $(this);
580
591
  var k = d.attr("data-value"),
581
- v = c.find(`option[value="${k}"]`);
582
- k = v.is("[selected]") &&
583
- "" !== k.trim();
584
- v = v.is(":disabled");
585
- const m = d.find(".custom-checkbox");
586
- m.length && (m.css({
592
+ u = c.find(`option[value="${k}"]`);
593
+ k = u.is("[selected]") && "" !== k.trim();
594
+ u = u.is(":disabled");
595
+ const n = d.find(".custom-checkbox");
596
+ n.length && (n.css({
587
597
  border: `2px solid ${k?e.checkboxColor:e.buttonColor}`,
588
- backgroundColor: k ? e.checkboxColor : v ? "#f5f5f5" : "#fff",
598
+ backgroundColor: k ? e.checkboxColor : u ? "#f5f5f5" : "#fff",
589
599
  width: e.checkboxSize,
590
600
  height: e.checkboxSize
591
- }), k && m.html(V(e.checkboxSize)), d.attr("data-checked", k ? "true" : "false"))
601
+ }), k && n.html(E(e.checkboxSize)), d.attr("data-checked", k ? "true" : "false"))
592
602
  })
593
603
  }, 0);
594
- g._selectId || (g._selectId = t);
595
- I && window._gong_tea_yun_0.set(g._selectId + "_callback", I);
596
- l.onSelect && window._gong_tea_yun_0.set(g._selectId + "_onSelect", l.onSelect);
597
- l.open && window._gong_tea_yun_0.set(g._selectId +
598
- "_open", l.open);
604
+ g._selectId || (g._selectId = q);
605
+ H && window._gong_tea_yun_0.set(g._selectId + "_callback", H);
606
+ l.onSelect &&
607
+ window._gong_tea_yun_0.set(g._selectId + "_onSelect", l.onSelect);
608
+ l.open && window._gong_tea_yun_0.set(g._selectId + "_open", l.open);
599
609
  l.close && window._gong_tea_yun_0.set(g._selectId + "_close", l.close);
600
- A = "select" === g.tagName.toLowerCase();
610
+ z = "select" === g.tagName.toLowerCase();
601
611
  G = "ul" === g.tagName.toLowerCase();
602
- if (A || G) {
612
+ if (z || G) {
603
613
  if (G) {
604
- var T = document.createElement("select");
605
- T.className = g.className;
606
- (A = g.getAttribute("onchange")) && T.setAttribute("onchange", A);
614
+ var S = document.createElement("select");
615
+ S.className = g.className;
616
+ (z = g.getAttribute("onchange")) && S.setAttribute("onchange", z);
607
617
  const c = new Set;
608
618
 
609
619
  function b(a, h = 0) {
610
620
  Array.from(a).forEach(d => {
611
621
  if (!c.has(d))
612
622
  if (c.add(d), d.hasAttribute("group")) {
613
- var k = d.getAttribute("group");
614
- const v = document.createElement("option");
615
- v.innerHTML = d.innerHTML;
616
- v.setAttribute("group",
617
- k);
618
- v.setAttribute("data-is-group", "true");
619
- v.setAttribute("data-level", h);
620
- d.className && (v.className = d.className);
621
- T.appendChild(v);
622
- const m = d.getAttribute("group");
623
- d = Array.from(g.children).filter(L => L.classList.contains(m));
623
+ var k =
624
+ d.getAttribute("group");
625
+ const u = document.createElement("option");
626
+ u.innerHTML = d.innerHTML;
627
+ u.setAttribute("group", k);
628
+ u.setAttribute("data-is-group", "true");
629
+ u.setAttribute("data-level", h);
630
+ d.className && (u.className = d.className);
631
+ S.appendChild(u);
632
+ const n = d.getAttribute("group");
633
+ d = Array.from(g.children).filter(L => L.classList.contains(n));
624
634
  b(d, h + 1)
625
- } else k = document.createElement("option"), k.value = d.getAttribute("value") || "", k.innerHTML = d.innerHTML, d.hasAttribute("img") && k.setAttribute("img", d.getAttribute("img")), d.getAttribute("tag") && k.setAttribute("tag", d.getAttribute("tag")), d.hasAttribute("disabled") && (k.disabled = !0), d.hasAttribute("selected") && (k.selected = !0), d.className && (k.className = d.className), k.setAttribute("data-level", h), T.appendChild(k)
635
+ } else k = document.createElement("option"), k.value = d.getAttribute("value") || "", k.innerHTML = d.innerHTML, d.hasAttribute("img") && k.setAttribute("img", d.getAttribute("img")),
636
+ d.getAttribute("tag") && k.setAttribute("tag", d.getAttribute("tag")), d.hasAttribute("disabled") && (k.disabled = !0), d.hasAttribute("selected") && (k.selected = !0), d.className && (k.className = d.className), k.setAttribute("data-level", h), S.appendChild(k)
626
637
  })
627
638
  }
628
639
  b(g.children);
629
- g.parentNode.replaceChild(T, g)
630
- } else T = g;
631
- T._selectId = g._selectId;
632
- var U = document.createElement("div");
633
- U.className = e.wrapperClass;
634
- U.setAttribute("data-state", "closed");
635
- U.setAttribute("tabindex", "0");
636
- U.setAttribute("data-selected-index", "-1");
637
- U.setAttribute("data-previous-index", "-1");
638
- $(U).data("settings", e);
639
- l.width && (U.style.width = l.width, U.style.boxSizing =
640
- "border-box");
641
- (A = T.querySelector("option:checked")) && A.value && (U.setAttribute("data-selected-value", A.value), A = Array.from(T.options).indexOf(A), U.setAttribute("data-selected-index", A));
642
- ka(U, e.wrapperStyle);
643
- A = document.createElement("div");
644
- A.style.position = "relative";
645
- var aa = document.createElement("div");
646
- aa.className = e.triggerClass;
647
- aa.setAttribute("tabindex", "-1");
648
- ka(aa, {
640
+ g.parentNode.replaceChild(S, g)
641
+ } else S = g;
642
+ S._selectId = g._selectId;
643
+ var V = document.createElement("div");
644
+ V.className = e.wrapperClass;
645
+ V.setAttribute("data-state", "closed");
646
+ V.setAttribute("tabindex", "0");
647
+ V.setAttribute("data-selected-index", "-1");
648
+ V.setAttribute("data-previous-index",
649
+ "-1");
650
+ $(V).data("settings", e);
651
+ l.width && (V.style.width = l.width, V.style.boxSizing = "border-box");
652
+ (z = S.querySelector("option:checked")) && z.value && (V.setAttribute("data-selected-value", z.value), z = Array.from(S.options).indexOf(z), V.setAttribute("data-selected-index", z));
653
+ fa(V, e.wrapperStyle);
654
+ z = document.createElement("div");
655
+ z.style.position = "relative";
656
+ var ca = document.createElement("div");
657
+ ca.className = e.triggerClass;
658
+ ca.setAttribute("tabindex", "-1");
659
+ fa(ca, {
649
660
  padding: e.defaultPadding || "10px",
650
- paddingRight: e.defaultPaddingRight || "40px",
661
+ paddingRight: e.defaultPaddingRight ||
662
+ "40px",
651
663
  margin: e.defaultMargin || "0",
652
- border: `${e.defaultBorderWidth||
653
- "1px"} solid ${e.defaultBorderColor||"#ccc"}`,
664
+ border: `${e.defaultBorderWidth||"1px"} solid ${e.defaultBorderColor||"#ccc"}`,
654
665
  borderRadius: e.defaultBorderRadius || "4px",
655
666
  cursor: "pointer",
656
667
  backgroundColor: e.defaultBgColor,
@@ -659,77 +670,79 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
659
670
  width: "100%",
660
671
  boxSizing: "border-box"
661
672
  });
662
- $(aa).on({
673
+ $(ca).on({
663
674
  mouseenter: function(c) {
664
- window._isMouseDown_gong || (c = $(this).closest(`.${e.wrapperClass}`).data("settings")) && c.triggerHoverBgColor && (this.style.backgroundColor = c.triggerHoverBgColor, this.style.color = c.triggerHoverColor || c.defaultColor, this.style.borderColor = c.triggerHoverBorderColor ||
665
- c.defaultBorderColor)
675
+ window._isMouseDown_gong || (c = $(this).closest(`.${e.wrapperClass}`).data("settings")) && c.triggerHoverBgColor && (this.style.backgroundColor = c.triggerHoverBgColor, this.style.color = c.triggerHoverColor ||
676
+ c.defaultColor, this.style.borderColor = c.triggerHoverBorderColor || c.defaultBorderColor)
666
677
  },
667
678
  mouseleave: function() {
668
679
  const c = $(this).closest(`.${e.wrapperClass}`).data("settings");
669
680
  c && (this.style.backgroundColor = c.defaultBgColor, this.style.color = c.defaultColor, this.style.borderColor = c.defaultBorderColor)
670
681
  }
671
682
  });
672
- var oa = G = null;
673
- e.triggerStyle && (e.triggerStyle.width ? G = e.triggerStyle.width : e.triggerStyle.maxWidth ? G = e.triggerStyle.maxWidth : e.triggerStyle.minWidth && (G = e.triggerStyle.minWidth), e.triggerStyle.height ? oa = e.triggerStyle.height : e.triggerStyle.maxHeight ? oa = e.triggerStyle.maxHeight :
674
- e.triggerStyle.minHeight && (oa = e.triggerStyle.minHeight));
675
- G || (G = T.style.width, !G && T.style.maxWidth && (G = T.style.maxWidth), !G && T.style.minWidth && (G = T.style.minWidth));
676
- oa || (oa = T.style.height, !oa && T.style.maxHeight && (oa = T.style.maxHeight), !oa && T.style.minHeight && (oa = T.style.minHeight));
677
- ka(aa, e.triggerStyle);
678
- aa.style.whiteSpace = "nowrap";
679
- aa.style.overflow = "hidden";
680
- aa.style.textOverflow = "ellipsis";
681
- aa.style.paddingRight = e.defaultPaddingRight || "40px";
682
- aa.style.height = "auto";
683
+ var pa = G = null;
684
+ e.triggerStyle && (e.triggerStyle.width ? G = e.triggerStyle.width : e.triggerStyle.maxWidth ? G = e.triggerStyle.maxWidth : e.triggerStyle.minWidth && (G = e.triggerStyle.minWidth), e.triggerStyle.height ?
685
+ pa = e.triggerStyle.height : e.triggerStyle.maxHeight ? pa = e.triggerStyle.maxHeight : e.triggerStyle.minHeight && (pa = e.triggerStyle.minHeight));
686
+ G || (G = S.style.width, !G && S.style.maxWidth && (G = S.style.maxWidth), !G && S.style.minWidth && (G = S.style.minWidth));
687
+ pa || (pa = S.style.height, !pa && S.style.maxHeight && (pa = S.style.maxHeight), !pa && S.style.minHeight && (pa = S.style.minHeight));
688
+ fa(ca, e.triggerStyle);
689
+ ca.style.whiteSpace = "nowrap";
690
+ ca.style.overflow = "hidden";
691
+ ca.style.textOverflow = "ellipsis";
692
+ ca.style.paddingRight = e.defaultPaddingRight ||
693
+ "40px";
694
+ ca.style.height = "auto";
683
695
  var ha = e.defaultText,
684
- za = T.querySelector("option:checked");
696
+ za = S.querySelector("option:checked");
685
697
  if (za) {
686
- var ba = Array.from(T.options);
687
- "checkbox" === e.pointer || e.pointer?.startsWith("checkbox_") ? (ba = ba.find(c => "" === c.value)) && (ha = e.allowHTML ? ba.innerHTML : ba.textContent) : (ha = ba.indexOf(za), ha = n(T, ha).text, T._needsExpandGroup = !0)
688
- }!e.showArrow || "radio" === e.pointer || "checkbox" === e.pointer || e.pointer && (e.pointer.startsWith("question_") || e.pointer.startsWith("checkbox_")) || (t = "custom-select-arrow-style-" + t, document.getElementById(t) || (ba = document.createElement("style"), ba.id = t, ba.textContent = `\n\t\t\t\t\t.${e.triggerClass}::after {\n\t\t\t\t\t content: '';\n\t\t\t\t\t position: absolute;\n\t\t\t\t\t right: ${e.arrowRight};\n\t\t\t\t\t top: ${e.arrowTop}; \n\t\t\t\t\t transform: translateY(-50%);\n\t\t\t\t\t width: 0;\n\t\t\t\t\t height: 0;\n\t\t\t\t\t border-left: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-right: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-top: ${e.arrowSize} solid ${e.arrowColor};\n\t\t\t\t\t transition: transform 0.3s ease;\n\t\t\t\t\t z-index: 1;\n\t\t\t\t\t}\n\t\t\t\t\t.${e.wrapperClass}.${e.openClass} .${e.triggerClass}::after {\n\t\t\t\t\t transform: translateY(-50%) rotate(180deg);\n\t\t\t\t\t z-index: 1; \n\t\t\t\t\t}\n\t\t\t\t\t.${e.triggerClass} {\n\t\t\t\t\t position: relative;\n\t\t\t\t\t z-index: 0;\n\t\t\t\t\t}\n\t\t\t\t`,
689
- document.head.appendChild(ba)));
698
+ var da = Array.from(S.options);
699
+ "checkbox" === e.pointer || e.pointer?.startsWith("checkbox_") ? (da = da.find(c => "" === c.value)) && (ha = e.allowHTML ? da.innerHTML : da.textContent) : (ha = da.indexOf(za), ha = R(S, ha).text, S._needsExpandGroup = !0)
700
+ }!e.showArrow || "radio" === e.pointer || "checkbox" === e.pointer || e.pointer && (e.pointer.startsWith("question_") || e.pointer.startsWith("checkbox_")) || (q = "custom-select-arrow-style-" + q, document.getElementById(q) ||
701
+ (da = document.createElement("style"), da.id = q, da.textContent = `\n\t\t\t\t\t.${e.triggerClass}::after {\n\t\t\t\t\t content: '';\n\t\t\t\t\t position: absolute;\n\t\t\t\t\t right: ${e.arrowRight};\n\t\t\t\t\t top: ${e.arrowTop}; \n\t\t\t\t\t transform: translateY(-50%);\n\t\t\t\t\t width: 0;\n\t\t\t\t\t height: 0;\n\t\t\t\t\t border-left: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-right: ${e.arrowSize} solid transparent;\n\t\t\t\t\t border-top: ${e.arrowSize} solid ${e.arrowColor};\n\t\t\t\t\t transition: transform 0.3s ease;\n\t\t\t\t\t z-index: 1;\n\t\t\t\t\t}\n\t\t\t\t\t.${e.wrapperClass}.${e.openClass} .${e.triggerClass}::after {\n\t\t\t\t\t transform: translateY(-50%) rotate(180deg);\n\t\t\t\t\t z-index: 1; \n\t\t\t\t\t}\n\t\t\t\t\t.${e.triggerClass} {\n\t\t\t\t\t position: relative;\n\t\t\t\t\t z-index: 0;\n\t\t\t\t\t}\n\t\t\t\t`,
702
+ document.head.appendChild(da)));
690
703
  if (e.allowHTML) {
691
- aa.innerHTML = ha;
692
- if (!e.pointer?.startsWith("question_") && !e.pointer?.startsWith("checkbox_") && "checkbox" !== e.pointer && (t = T.querySelector("option:checked"), !0 === e.tag && t && t.getAttribute("tag"))) {
693
- t = t.getAttribute("tag");
704
+ ca.innerHTML = ha;
705
+ if (!e.pointer?.startsWith("question_") && !e.pointer?.startsWith("checkbox_") && "checkbox" !== e.pointer && (q = S.querySelector("option:checked"), !0 === e.tag && q && q.getAttribute("tag"))) {
706
+ q = q.getAttribute("tag");
694
707
  ha = document.createElement("span");
695
- ba = e.tagStyle || {};
708
+ da = e.tagStyle || {};
696
709
  var na = e.tagMap || {},
697
- la = {
710
+ ka = {
698
711
  position: "absolute",
699
712
  right: "radio" === e.pointer ? "40px" : "30px",
700
713
  top: "50%",
701
714
  transform: "translateY(-50%)",
702
- color: ba.color || e.tagColor || "#666",
703
- fontSize: ba.fontSize || "12px",
715
+ color: da.color || e.tagColor || "#666",
716
+ fontSize: da.fontSize || "12px",
704
717
  margin: e.tagMargin
705
718
  };
706
- ba.padding && (la.padding = ba.padding);
707
- ba.borderRadius && (la.borderRadius = ba.borderRadius);
708
- ba.fontWeight && (la.fontWeight = ba.fontWeight);
709
- na[t] && (la.backgroundColor = na[t]);
710
- Object.assign(ha.style, la);
711
- ha.innerHTML = t;
712
- aa.appendChild(ha)
719
+ da.padding && (ka.padding = da.padding);
720
+ da.borderRadius && (ka.borderRadius = da.borderRadius);
721
+ da.fontWeight && (ka.fontWeight = da.fontWeight);
722
+ na[q] && (ka.backgroundColor = na[q]);
723
+ Object.assign(ha.style, ka);
724
+ ha.innerHTML = q;
725
+ ca.appendChild(ha)
713
726
  }
714
727
  if (e.pointer && e.pointer.startsWith("question_")) {
715
- t = document.createElement("div");
716
- t.className = "custom-question trigger-question";
717
- Object.assign(t.style, {
728
+ q = document.createElement("div");
729
+ q.className = "custom-question trigger-question";
730
+ Object.assign(q.style, {
718
731
  ...e.questionStyle,
719
732
  width: e.questionSize,
720
733
  height: e.questionSize
721
734
  });
722
- if (ha = T.querySelector("option[selected]")) {
723
- Object.assign(t.style, {
735
+ if (ha = S.querySelector("option[selected]")) {
736
+ Object.assign(q.style, {
724
737
  border: `2px solid ${e.questionColor}`,
725
738
  backgroundColor: e.questionColor
726
739
  });
727
- t.innerHTML = `<span style="color: white; font-size: calc(${e.questionSize} * 0.6);">\u2713</span>`;
740
+ q.innerHTML = `<span style="color: white; font-size: calc(${e.questionSize} * 0.6);">\u2713</span>`;
728
741
  ha = ha.getAttribute("tag");
729
742
  if (!0 === e.tag && ha) {
730
- ba = document.createElement("span");
743
+ da = document.createElement("span");
731
744
  na = e.tagStyle || {};
732
- la = e.tagMap || {};
745
+ ka = e.tagMap || {};
733
746
  const c = {
734
747
  position: "absolute",
735
748
  right: "40px",
@@ -741,17 +754,17 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
741
754
  na.padding && (c.padding = na.padding);
742
755
  na.borderRadius && (c.borderRadius = na.borderRadius);
743
756
  na.fontWeight && (c.fontWeight = na.fontWeight);
744
- la[ha] && (c.backgroundColor = la[ha]);
745
- Object.assign(ba.style, c);
746
- ba.textContent = ha;
747
- aa.appendChild(ba)
757
+ ka[ha] && (c.backgroundColor = ka[ha]);
758
+ Object.assign(da.style, c);
759
+ da.textContent = ha;
760
+ ca.appendChild(da)
748
761
  }
749
- U.setAttribute("data-aun", "true")
750
- } else t.innerHTML = `<span style="font-size: calc(${e.questionSize} * 0.6);">?</span>`;
751
- aa.appendChild(t)
762
+ V.setAttribute("data-aun", "true")
763
+ } else q.innerHTML = `<span style="font-size: calc(${e.questionSize} * 0.6);">?</span>`;
764
+ ca.appendChild(q)
752
765
  }
753
- if ("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_")) aa.style.position = "relative", aa.style.paddingRight = "40px", t = document.createElement("div"), t.className = "custom-checkbox trigger-checkbox", Object.assign(t.style, {
754
- ...da(),
766
+ if ("checkbox" === e.pointer || e.pointer?.startsWith("checkbox_")) ca.style.position = "relative", ca.style.paddingRight = "40px", q = document.createElement("div"), q.className = "custom-checkbox trigger-checkbox", Object.assign(q.style, {
767
+ ...W(),
755
768
  border: `2px solid ${e.buttonColor}`,
756
769
  borderRadius: "3px",
757
770
  backgroundColor: "#fff",
@@ -759,55 +772,55 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
759
772
  display: "block",
760
773
  width: e.checkboxSize,
761
774
  height: e.checkboxSize
762
- }), aa.appendChild(t);
763
- "radio" === e.pointer && (aa.style.position = "relative", aa.style.paddingRight = "40px", t = document.createElement("div"), t.className = "custom-radio trigger-radio", Object.assign(t.style, {
764
- ...da(),
775
+ }), ca.appendChild(q);
776
+ "radio" === e.pointer && (ca.style.position = "relative", ca.style.paddingRight = "40px", q = document.createElement("div"), q.className = "custom-radio trigger-radio", Object.assign(q.style, {
777
+ ...W(),
765
778
  border: `2px solid ${e.buttonColor}`,
766
779
  borderRadius: "50%",
767
780
  backgroundColor: "#fff",
768
781
  width: e.radioSize,
769
782
  height: e.radioSize
770
- }), (ha = T.querySelector("option:checked")) &&
771
- ha.value && "" !== ha.value && (Object.assign(t.style, {
783
+ }), (ha = S.querySelector("option:checked")) &&
784
+ ha.value && "" !== ha.value && (Object.assign(q.style, {
772
785
  border: `2px solid ${e.radioColor}`
773
- }), t.innerHTML = O(e.radioColor, e)), aa.appendChild(t))
774
- } else aa.textContent = ha, e.pointer?.startsWith("question_") || e.pointer?.startsWith("checkbox_") || "checkbox" === e.pointer || (t = T.querySelector("option:checked"), !0 === e.tag && t && t.getAttribute("tag") && (t = t.getAttribute("tag"), ha = document.createElement("span"), ba = e.tagStyle || {}, na = e.tagMap || {}, la = {
786
+ }), q.innerHTML = O(e.radioColor, e)), ca.appendChild(q))
787
+ } else ca.textContent = ha, e.pointer?.startsWith("question_") || e.pointer?.startsWith("checkbox_") || "checkbox" === e.pointer || (q = S.querySelector("option:checked"), !0 === e.tag && q && q.getAttribute("tag") && (q = q.getAttribute("tag"), ha = document.createElement("span"), da = e.tagStyle || {}, na = e.tagMap || {}, ka = {
775
788
  position: "absolute",
776
789
  right: "radio" === e.pointer ? "40px" : "30px",
777
790
  top: "50%",
778
791
  transform: "translateY(-50%)",
779
- color: ba.color || e.tagColor || "#666",
780
- fontSize: ba.fontSize || "12px",
792
+ color: da.color || e.tagColor || "#666",
793
+ fontSize: da.fontSize || "12px",
781
794
  margin: e.tagMargin
782
- }, ba.padding && (la.padding = ba.padding), ba.borderRadius && (la.borderRadius = ba.borderRadius), ba.fontWeight && (la.fontWeight = ba.fontWeight), na[t] && (la.backgroundColor = na[t]), Object.assign(ha.style, la), ha.textContent = t, aa.appendChild(ha)));
783
- var ra = document.createElement("div");
784
- ra.className = e.optionsClass;
785
- ra.style.display = "none";
786
- ra.style.width = "100%";
787
- ra.style.boxSizing = "border-box";
788
- "100%" === G ? (U.style.width = G, U.style.boxSizing =
789
- "border-box", setTimeout(() => {
790
- const c = parseInt(window.getComputedStyle(U).paddingLeft) + parseInt(window.getComputedStyle(U).paddingRight);
791
- aa.style.width = `calc(100% - ${c}px)`;
792
- ra.style.width = `calc(100% - ${c}px)`
793
- }, 0)) : G && (U.style.width = G);
795
+ }, da.padding && (ka.padding = da.padding), da.borderRadius && (ka.borderRadius = da.borderRadius), da.fontWeight && (ka.fontWeight = da.fontWeight), na[q] && (ka.backgroundColor = na[q]), Object.assign(ha.style, ka), ha.textContent = q, ca.appendChild(ha)));
794
796
  var sa = document.createElement("div");
795
- sa.style.overflowY = "auto";
796
- sa.style.overflowX = "hidden";
797
+ sa.className = e.optionsClass;
798
+ sa.style.display = "none";
797
799
  sa.style.width = "100%";
798
- sa.addEventListener("touchmove", function(c) {
800
+ sa.style.boxSizing = "border-box";
801
+ "100%" === G ? (V.style.width = G, V.style.boxSizing =
802
+ "border-box", setTimeout(() => {
803
+ const c = parseInt(window.getComputedStyle(V).paddingLeft) + parseInt(window.getComputedStyle(V).paddingRight);
804
+ ca.style.width = `calc(100% - ${c}px)`;
805
+ sa.style.width = `calc(100% - ${c}px)`
806
+ }, 0)) : G && (V.style.width = G);
807
+ var ta = document.createElement("div");
808
+ ta.style.overflowY = "auto";
809
+ ta.style.overflowX = "hidden";
810
+ ta.style.width = "100%";
811
+ ta.addEventListener("touchmove", function(c) {
799
812
  c.stopPropagation()
800
813
  }, {
801
814
  passive: !0
802
815
  });
803
- Object.assign(sa.style, {
816
+ Object.assign(ta.style, {
804
817
  userSelect: "none",
805
818
  webkitUserSelect: "none",
806
819
  mozUserSelect: "none",
807
820
  msUserSelect: "none",
808
821
  WebkitTouchCallout: "none"
809
822
  });
810
- Object.assign(aa.style, {
823
+ Object.assign(ca.style, {
811
824
  whiteSpace: "nowrap",
812
825
  overflow: "hidden",
813
826
  textOverflow: "ellipsis",
@@ -819,37 +832,40 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
819
832
  msUserSelect: "none",
820
833
  WebkitTouchCallout: "none"
821
834
  });
822
- oa && (sa.style.maxHeight = oa);
823
- ra.appendChild(sa);
824
- G = p() && !e.slideToggle;
825
- ka(ra, {
835
+ pa && (ta.style.maxHeight = pa);
836
+ sa.appendChild(ta);
837
+ G = m() && !e.slideToggle;
838
+ pa = e.slideToggle ? {} : {
839
+ top: "-9999px",
840
+ left: "-9999px",
841
+ visibility: "hidden"
842
+ };
843
+ e._hasBeenShown = !1;
844
+ fa(sa, {
826
845
  ...e.optionsStyle,
827
- position: e.slideToggle ? "static" : "absolute",
846
+ position: e.slideToggle ?
847
+ "static" : "absolute",
828
848
  zIndex: G ? "10000" : "1000",
829
- ...(e.slideToggle ? {} : {
830
- top: "-9999px",
831
- left: "-9999px",
832
- visibility: "hidden"
833
- })
849
+ ...pa
834
850
  });
835
851
  var ua = {},
836
- f = e.optionStyle?.padding ? C(e.optionStyle.padding) : "10px";
837
- Array.from(T.options || g.children).forEach((c, b) => {
852
+ f = e.optionStyle?.padding ? B(e.optionStyle.padding) : "10px";
853
+ Array.from(S.options || g.children).forEach((c, b) => {
838
854
  const a = document.createElement("div");
839
855
  a.className = e.optionClass;
840
- var h = function(m) {
856
+ var h = function(n) {
841
857
  let L = 0;
842
- const J = m.className ? m.className.split(" ") : [];
858
+ const J = n.className ? n.className.split(" ") : [];
843
859
  if (0 === J.length) return L;
844
- let E = J[0],
860
+ let D = J[0],
845
861
  r = !0;
846
- for (; r;) r = !1, Array.from(T.options || m.children).forEach(F => {
847
- F.hasAttribute("group") && F.getAttribute("group") === E && (L++, F.className && (E = F.className.split(" ")[0], r = !0))
862
+ for (; r;) r = !1, Array.from(S.options || n.children).forEach(F => {
863
+ F.hasAttribute("group") && F.getAttribute("group") === D && (L++, F.className && (D = F.className.split(" ")[0],
864
+ r = !0))
848
865
  });
849
866
  return L
850
867
  }(c);
851
- a.setAttribute("data-level",
852
- h);
868
+ a.setAttribute("data-level", h);
853
869
  h = c.getAttribute("group");
854
870
  var d = c.className;
855
871
  if (c.hasAttribute("group") || "true" === c.getAttribute("data-is-group")) {
@@ -857,15 +873,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
857
873
  a.setAttribute("data-group", h);
858
874
  var k = f;
859
875
  if (d) {
860
- var v = d.split(" ")[0];
861
- ua[v] && (v = parseFloat(ua[v]), isNaN(v) || (k = v + 10 + "px"))
876
+ var u = d.split(" ")[0];
877
+ ua[u] && (u = parseFloat(ua[u]), isNaN(u) || (k = u + 10 + "px"))
862
878
  }
863
879
  h && (ua[h] = k);
864
880
  k = document.createElement("div");
865
881
  k.className = "custom-group-arrow";
866
- v = ea(e);
867
- let m = v.arrowSizeValue,
868
- L = v.arrowRightValue;
882
+ u = aa(e);
883
+ let n = u.arrowSizeValue,
884
+ L = u.arrowRightValue;
869
885
  Object.assign(k.style, {
870
886
  position: "absolute",
871
887
  right: L,
@@ -873,16 +889,16 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
873
889
  transform: "translateY(-50%) rotate(0deg)",
874
890
  width: "0",
875
891
  height: "0",
876
- borderLeft: `${m} solid transparent`,
877
- borderRight: `${m} solid transparent`,
878
- borderTop: `${m} solid ${v.arrowColorValue}`,
892
+ borderLeft: `${n} solid transparent`,
893
+ borderRight: `${n} solid transparent`,
894
+ borderTop: `${n} solid ${u.arrowColorValue}`,
879
895
  transition: "all 0.3s ease"
880
896
  });
881
897
  a.appendChild(k);
882
898
  k = () => {
883
- const J = parseFloat(m),
884
- E = parseFloat(L);
885
- isNaN(J) || isNaN(E) || a.style.setProperty("padding-right", `${2*J+E+10}px`, "important")
899
+ const J = parseFloat(n),
900
+ D = parseFloat(L);
901
+ isNaN(J) || isNaN(D) || a.style.setProperty("padding-right", `${2*J+D+10}px`, "important")
886
902
  };
887
903
  k();
888
904
  a._updateGroupPadding = k;
@@ -890,52 +906,52 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
890
906
  a.style.overflow = "hidden";
891
907
  a.style.textOverflow = "ellipsis"
892
908
  }
893
- d && d.split(" ").forEach(m => {
894
- m && m.trim() && (a.classList.add("child-option"),
895
- a.classList.add(m))
909
+ d && d.split(" ").forEach(n => {
910
+ n &&
911
+ n.trim() && (a.classList.add("child-option"), a.classList.add(n))
896
912
  });
897
913
  a.setAttribute("data-value", c.value || c.getAttribute("value") || "");
898
914
  k = {
899
915
  ...e.optionStyle
900
916
  };
901
- if ((v = a.classList.contains("child-option")) && k.padding) {
902
- const m = k.padding.split(" ");
903
- 2 === m.length ? (k.paddingTop = m[0], k.paddingBottom = m[0], k.paddingRight = m[1], delete k.padding) : 4 === m.length && (k.paddingTop = m[0], k.paddingRight = m[1], k.paddingBottom = m[2], delete k.padding)
917
+ if ((u = a.classList.contains("child-option")) && k.padding) {
918
+ const n = k.padding.split(" ");
919
+ 2 === n.length ? (k.paddingTop = n[0], k.paddingBottom = n[0], k.paddingRight = n[1], delete k.padding) : 4 === n.length && (k.paddingTop = n[0], k.paddingRight = n[1], k.paddingBottom = n[2], delete k.padding)
904
920
  }
905
- ka(a, {
921
+ fa(a, {
906
922
  ...k,
907
923
  position: "relative",
908
924
  paddingRight: c.getAttribute("tag") ? "100px" : "40px"
909
925
  });
910
- a.classList.contains("group-option") && h &&
911
- ua[h] && a.style.setProperty("padding-left", ua[h], "important");
912
- v && !a.classList.contains("group-option") && d && (k = d.split(" ")[0], d = f, ua[k] && (k = parseFloat(ua[k]), isNaN(k) || (d = k + 10 + "px")), a.style.setProperty("padding-left", d, "important"));
926
+ a.classList.contains("group-option") && h && ua[h] && a.style.setProperty("padding-left", ua[h], "important");
927
+ u && !a.classList.contains("group-option") && d && (k = d.split(" ")[0], d = f, ua[k] && (k = parseFloat(ua[k]), isNaN(k) || (d = k + 10 + "px")), a.style.setProperty("padding-left", d, "important"));
913
928
  a.classList.contains("group-option") && a._updateGroupPadding && a._updateGroupPadding();
914
929
  a.style.whiteSpace = "nowrap";
915
930
  a.style.overflow = "hidden";
916
931
  a.style.textOverflow = "ellipsis";
917
- b === T.options.length - 1 && (a.style.borderBottom = "none");
918
- !e.dot || e.pointer?.startsWith("question_") ||
919
- c.hasAttribute("group") || c.getAttribute("data-is-group") || a.querySelector(".custom-dot") || (b = document.createElement("div"), b.className = "custom-dot", Object.assign(b.style, e.dotStyle), (c.selected || c.hasAttribute("selected")) && Object.assign(b.style, e.dotSelectedStyle), e.pointer && (b.style.right = "40px"), a.appendChild(b));
932
+ b === S.options.length - 1 && (a.style.borderBottom = "none");
933
+ !e.dot ||
934
+ e.pointer?.startsWith("question_") || c.hasAttribute("group") || c.getAttribute("data-is-group") || a.querySelector(".custom-dot") || (b = document.createElement("div"), b.className = "custom-dot", Object.assign(b.style, e.dotStyle), (c.selected || c.hasAttribute("selected")) && Object.assign(b.style, e.dotSelectedStyle), e.pointer && (b.style.right = "40px"), a.appendChild(b));
920
935
  c.hasAttribute("img") && (b = c.getAttribute("img"), Object.assign(a.style, {
921
- backgroundImage: `url(${b})`,
922
- backgroundRepeat: "no-repeat"
923
- }), b = new ResizeObserver(m => {
924
- const L = m[0].contentRect.height;
925
- if (0 < L) {
926
- var J = $(m[0].target);
927
- J.hasClass("child-option") ? (J = 20 * (parseInt(J.attr("data-level")) || 1), m[0].target.style.setProperty("--image-size", L + 8 + "px"), Object.assign(m[0].target.style, {
928
- backgroundSize: `${L}px`,
929
- backgroundPosition: `${J}px center`,
930
- paddingLeft: `${J+1.5*L}px`
931
- })) : Object.assign(m[0].target.style, {
932
- backgroundSize: `${L}px`,
933
- backgroundPosition: "15px center",
934
- paddingLeft: `${2*L}px`
935
- })
936
- }
937
- }), b.observe(a), window._resizeObservers || (window._resizeObservers = new WeakMap), window._resizeObservers.set(a, b));
938
- if (b = c.getAttribute("tag")) d = e.tagStyle || {}, k = e.tagMap || {}, v = {
936
+ backgroundImage: `url(${b})`,
937
+ backgroundRepeat: "no-repeat"
938
+ }), b = new ResizeObserver(n => {
939
+ const L = n[0].contentRect.height;
940
+ if (0 < L) {
941
+ var J = $(n[0].target);
942
+ J.hasClass("child-option") ? (J = 20 * (parseInt(J.attr("data-level")) || 1), n[0].target.style.setProperty("--image-size", L + 8 + "px"), Object.assign(n[0].target.style, {
943
+ backgroundSize: `${L}px`,
944
+ backgroundPosition: `${J}px center`,
945
+ paddingLeft: `${J+1.5*L}px`
946
+ })) : Object.assign(n[0].target.style, {
947
+ backgroundSize: `${L}px`,
948
+ backgroundPosition: "15px center",
949
+ paddingLeft: `${2*L}px`
950
+ })
951
+ }
952
+ }), b.observe(a), window._resizeObservers || (window._resizeObservers = new WeakMap),
953
+ window._resizeObservers.set(a, b));
954
+ if (b = c.getAttribute("tag")) d = e.tagStyle || {}, k = e.tagMap || {}, u = {
939
955
  position: "absolute",
940
956
  right: e.pointer ? "40px" : "30px",
941
957
  top: "50%",
@@ -943,91 +959,92 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
943
959
  color: d.color || e.tagColor || "#666",
944
960
  fontSize: d.fontSize || "12px",
945
961
  margin: e.tagMargin
946
- }, d.padding && (v.padding = d.padding), d.borderRadius && (v.borderRadius = d.borderRadius), d.fontWeight && (v.fontWeight = d.fontWeight), k[b] && (v.backgroundColor = k[b]), d = $("<span>").css(v), e.allowHTML ? d.html(b) : d.text(b), a.appendChild(d[0]);
947
- "checkbox" !== e.pointer && !e.pointer?.startsWith("checkbox_") ||
948
- c.hasAttribute("group") || "true" === c.getAttribute("data-is-group") || a.classList.contains("group-option") || (a.style.position = "relative", a.style.paddingRight = "40px", b = c.selected || c.hasAttribute("selected"), a.setAttribute("data-checked", b ? "true" : "false"), d = document.createElement("div"), d.className = "custom-checkbox option-checkbox", Object.assign(d.style, {
949
- ...da(),
950
- border: b ? `2px solid ${e.checkboxColor}` : `2px solid ${e.buttonColor}`,
951
- borderRadius: "3px",
952
- backgroundColor: b ? e.checkboxColor : "#fff",
953
- zIndex: "2",
954
- display: "block",
955
- width: e.checkboxSize,
956
- height: e.checkboxSize
957
- }), b && (d.innerHTML = V(e.checkboxSize)), a.appendChild(d));
958
- "radio" !== e.pointer || h || (a.style.position = "relative", a.style.paddingRight = "40px", b = document.createElement("div"), b.className = "custom-radio", Object.assign(b.style, {
959
- ...da(),
960
- border: `2px solid ${e.buttonColor}`,
961
- borderRadius: "50%",
962
- backgroundColor: "#fff",
962
+ }, d.padding && (u.padding = d.padding), d.borderRadius && (u.borderRadius = d.borderRadius), d.fontWeight && (u.fontWeight = d.fontWeight), k[b] && (u.backgroundColor = k[b]), d = $("<span>").css(u), e.allowHTML ? d.html(b) : d.text(b), a.appendChild(d[0]);
963
+ "checkbox" !==
964
+ e.pointer && !e.pointer?.startsWith("checkbox_") || c.hasAttribute("group") || "true" === c.getAttribute("data-is-group") || a.classList.contains("group-option") || (a.style.position = "relative", a.style.paddingRight = "40px", b = c.selected || c.hasAttribute("selected"), a.setAttribute("data-checked", b ? "true" : "false"), d = document.createElement("div"), d.className = "custom-checkbox option-checkbox", Object.assign(d.style, {
965
+ ...W(),
966
+ border: b ? `2px solid ${e.checkboxColor}` : `2px solid ${e.buttonColor}`,
967
+ borderRadius: "3px",
968
+ backgroundColor: b ?
969
+ e.checkboxColor : "#fff",
963
970
  zIndex: "2",
964
- width: e.radioSize,
965
- height: e.radioSize
966
- }), (c.selected || c.hasAttribute("selected")) && (c.value || c.getAttribute("value")) && (Object.assign(b.style, {
971
+ display: "block",
972
+ width: e.checkboxSize,
973
+ height: e.checkboxSize
974
+ }), b && (d.innerHTML = E(e.checkboxSize)), a.appendChild(d));
975
+ "radio" !== e.pointer || h || (a.style.position = "relative", a.style.paddingRight = "40px", b = document.createElement("div"), b.className = "custom-radio", Object.assign(b.style, {
976
+ ...W(),
977
+ border: `2px solid ${e.buttonColor}`,
978
+ borderRadius: "50%",
979
+ backgroundColor: "#fff",
980
+ zIndex: "2",
981
+ width: e.radioSize,
982
+ height: e.radioSize
983
+ }), (c.selected || c.hasAttribute("selected")) && (c.value || c.getAttribute("value")) &&
984
+ (Object.assign(b.style, {
967
985
  border: `2px solid ${e.radioColor}`
968
- }),
969
- b.innerHTML = O(e.radioColor, e)), (c.disabled || c.hasAttribute("disabled")) && Object.assign(b.style, {
970
- border: `2px solid ${e.buttonColor}`,
971
- backgroundColor: "#f5f5f5",
972
- cursor: "not-allowed"
973
- }), a.appendChild(b));
986
+ }), b.innerHTML = O(e.radioColor, e)), (c.disabled || c.hasAttribute("disabled")) && Object.assign(b.style, {
987
+ border: `2px solid ${e.buttonColor}`,
988
+ backgroundColor: "#f5f5f5",
989
+ cursor: "not-allowed"
990
+ }), a.appendChild(b));
974
991
  e.pointer && e.pointer.startsWith("question_") && !h && (b = document.createElement("div"), b.className = "custom-question option-question", Object.assign(b.style, e.questionStyle), b.innerHTML = "?", a.appendChild(b));
975
- e.allowHTML ? (b = c.innerHTML, b = b.replace(/\x3c!--([\s\S]*?)--\x3e/g, (m, L) => L.trim()), a.insertAdjacentHTML("afterbegin",
976
- b)) : a.insertAdjacentText("afterbegin", c.textContent);
977
- !c.disabled && !c.hasAttribute("disabled") || h || (a.classList.add("disabled"), ka(a, e.disabledStyle));
978
- !c.selected && !c.hasAttribute("selected") || h || (a.classList.add("selected"), ka(a, e.selectedOptionStyle));
979
- sa.appendChild(a)
992
+ e.allowHTML ? (b = c.innerHTML, b = b.replace(/\x3c!--([\s\S]*?)--\x3e/g,
993
+ (n, L) => L.trim()), a.insertAdjacentHTML("afterbegin", b)) : a.insertAdjacentText("afterbegin", c.textContent);
994
+ !c.disabled && !c.hasAttribute("disabled") || h || (a.classList.add("disabled"), fa(a, e.disabledStyle));
995
+ !c.selected && !c.hasAttribute("selected") || h || (a.classList.add("selected"), fa(a, e.selectedOptionStyle));
996
+ ta.appendChild(a)
980
997
  });
981
- A.appendChild(aa);
982
- U.appendChild(A);
983
- U.appendChild(ra);
984
- e.scrollColor && (U.id || (U.id = "select-scroll-" + Math.random().toString(36).substr(2, 9)), ja($(U), e));
985
- A = T.parentNode;
986
- G = T.nextSibling;
987
- T.style.display = "none";
988
- U.insertBefore(T, U.firstChild);
989
- G ? A.insertBefore(U, G) : A.appendChild(U);
990
- T._needsExpandGroup && (setTimeout(() => {
991
- if ($(U).find(`[class*="-option"][data-value="${za.value}"]`).length) {
998
+ z.appendChild(ca);
999
+ V.appendChild(z);
1000
+ V.appendChild(sa);
1001
+ e.scrollColor && (V.id || (V.id = "select-scroll-" + Math.random().toString(36).substr(2, 9)), Ba($(V), e));
1002
+ z = S.parentNode;
1003
+ G = S.nextSibling;
1004
+ S.style.display = "none";
1005
+ V.insertBefore(S, V.firstChild);
1006
+ G ? z.insertBefore(V, G) : z.appendChild(V);
1007
+ S._needsExpandGroup && (setTimeout(() => {
1008
+ if ($(V).find(`[class*="-option"][data-value="${za.value}"]`).length) {
992
1009
  const c = za.className?.split(" ") || [],
993
1010
  b = new Set;
994
1011
 
995
1012
  function a(h) {
996
1013
  if (h && !b.has(h)) {
997
1014
  b.add(h);
998
- var d = $(U).find(`[data-group="${h}"]`);
999
- d.length && (d.addClass("expanded"), d.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), $(U).find(`.${h}`).show(), (d.attr("class")?.split(" ") || []).forEach(k => {
1015
+ var d = $(V).find(`[data-group="${h}"]`);
1016
+ d.length && (d.addClass("expanded"), d.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), $(V).find(`.${h}`).show(), (d.attr("class")?.split(" ") || []).forEach(k => {
1000
1017
  "group-option" !== k && "expanded" !== k && a(k)
1001
1018
  }))
1002
1019
  }
1003
1020
  }
1004
1021
  c.forEach(h => a(h))
1005
1022
  }
1006
- }, 0), delete T._needsExpandGroup);
1007
- $(U).data("isTriggeredOnce", !1);
1023
+ }, 0), delete S._needsExpandGroup);
1024
+ $(V).data("isTriggeredOnce", !1);
1008
1025
  !0 === e.onclick && setTimeout(() => {
1009
- const c = $(U).find(`.${e.triggerClass}`);
1010
- $(U).data("isInitialOpen", !0);
1026
+ const c = $(V).find(`.${e.triggerClass}`);
1027
+ $(V).data("isInitialOpen", !0);
1011
1028
  c.trigger("click")
1012
1029
  }, 0);
1013
- U.setAttribute("data-duration", x);
1014
- U.setAttribute("data-slide-toggle", e.slideToggle)
1030
+ V.setAttribute("data-duration", w);
1031
+ V.setAttribute("data-slide-toggle", e.slideToggle)
1015
1032
  }
1016
1033
  });
1017
1034
  if (!window._gong_tea_yun_2) {
1018
1035
  window._gong_tea_yun_2 = !0;
1019
1036
  let g = !1,
1020
- C = !1,
1021
- A = !1,
1022
- t = !1,
1037
+ B = !1,
1038
+ z = !1,
1039
+ q = !1,
1023
1040
  G = null,
1024
1041
  e = !1,
1025
- T = !1;
1042
+ S = !1;
1026
1043
  $(document).on("mousedown", '[class*="-wrapper"], [class*="-trigger"], [class*="-options"], [class*="-option"]',
1027
1044
  function(f) {
1028
1045
  f.stopPropagation();
1029
- A = C = !0;
1030
- U = !1;
1046
+ z = B = !0;
1047
+ V = !1;
1031
1048
  e = !0;
1032
1049
  window._isMouseDown_gong = !0;
1033
1050
  f = $(this).closest('[class*="-wrapper"]');
@@ -1035,13 +1052,13 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1035
1052
  });
1036
1053
  $(document).on("mouseup", function(f) {
1037
1054
  window._isMouseDown_gong = !1;
1038
- if (C) {
1039
- var c = A,
1055
+ if (B) {
1056
+ var c = z,
1040
1057
  b = 0 < $(f.target).closest('[class*="-wrapper"]').length;
1041
- A = C = !1;
1042
- c && T && b && (f.stopPropagation(), f.preventDefault(), $(f.target).closest('[class*="-wrapper"]'));
1058
+ z = B = !1;
1059
+ c && S && b && (f.stopPropagation(), f.preventDefault(), $(f.target).closest('[class*="-wrapper"]'));
1043
1060
  window._gong_tea_yun_3 = null;
1044
- T = !1;
1061
+ S = !1;
1045
1062
  setTimeout(() => {
1046
1063
  e = !1
1047
1064
  }, 300)
@@ -1082,12 +1099,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1082
1099
  k.outerHeight();
1083
1100
  c.find(`.${b.optionClass}`).removeClass(b.highlightedClass);
1084
1101
  c.find(`.${b.optionClass}`).each(function() {
1085
- const v = $(this);
1086
- if (v.hasClass("selected") && b.selectedBg) {
1087
- var m = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) : b.selectedBg;
1088
- v.attr("style", (v.attr("style") || "") + `; background-color: ${m} !important;`);
1089
- v.css("opacity", "1")
1090
- } else m = (v.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), v.attr("style", m)
1102
+ const u = $(this);
1103
+ if (u.hasClass("selected") && b.selectedBg) {
1104
+ var n = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) : b.selectedBg;
1105
+ u.attr("style", (u.attr("style") || "") + `; background-color: ${n} !important;`);
1106
+ u.css("opacity", "1")
1107
+ } else n = (u.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), u.attr("style", n)
1091
1108
  });
1092
1109
  k.length ? (c = d.index(k),
1093
1110
  k = f ? d.eq(Math.max(0, c - 1)) : c < d.length - 1 ? d.eq(c + 1) : k) : k = d.first();
@@ -1128,15 +1145,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1128
1145
  }, 0)))
1129
1146
  }
1130
1147
  });
1131
- let U = !1;
1148
+ let V = !1;
1132
1149
  $(document).on("mousemove", '[class*="-wrapper"]', function(f) {
1133
- C && A && (U = !0)
1150
+ B && z && (V = !0)
1134
1151
  });
1135
- let aa = null;
1152
+ let ca = null;
1136
1153
  $(document).on("touchstart", '[class*="-option"]', function(f) {
1137
- aa && clearTimeout(aa);
1154
+ ca && clearTimeout(ca);
1138
1155
  const c = $(this);
1139
- t = !0;
1156
+ q = !0;
1140
1157
  if (c.hasClass("disabled")) G = null;
1141
1158
  else {
1142
1159
  var b = c.closest('[class*="-wrapper"]'),
@@ -1148,7 +1165,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1148
1165
  var d = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
1149
1166
  h.attr("style", (h.attr("style") || "") + `; background-color: ${d} !important;`)
1150
1167
  } else d = (h.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), h.attr("style", d)
1151
- }), aa = setTimeout(() => {
1168
+ }), ca = setTimeout(() => {
1152
1169
  if (G === this)
1153
1170
  if (c.hasClass("selected") && a.selectedBg) c.css("opacity", "0.7");
1154
1171
  else if (c.addClass(a.highlightedClass),
@@ -1160,7 +1177,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1160
1177
  }
1161
1178
  });
1162
1179
  $(document).on("touchend", function() {
1163
- if (t) {
1180
+ if (q) {
1164
1181
  if (G) {
1165
1182
  const f = $(G).closest('[class*="-wrapper"]'),
1166
1183
  c = f.data("settings");
@@ -1173,7 +1190,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1173
1190
  } else a = (b.attr("style") || "").replace(/background-color:[^;]+;?/g, ""), b.attr("style", a)
1174
1191
  }))
1175
1192
  }
1176
- t = !1;
1193
+ q = !1;
1177
1194
  G = null
1178
1195
  }
1179
1196
  });
@@ -1183,18 +1200,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1183
1200
  });
1184
1201
  $(document).on("click", "[data-group]", function(f) {
1185
1202
  function c(r) {
1186
- function F(w) {
1203
+ function F(v) {
1187
1204
  a.find("." +
1188
- w).each(function() {
1189
- var B = $(this);
1190
- u.add(this);
1191
- if (B.attr("group") || B.data("group")) B = B.attr("group") || B.data("group"), F(B)
1205
+ v).each(function() {
1206
+ var C = $(this);
1207
+ t.add(this);
1208
+ if (C.attr("group") || C.data("group")) C = C.attr("group") || C.data("group"), F(C)
1192
1209
  })
1193
1210
  }
1194
- const u = new Set;
1211
+ const t = new Set;
1195
1212
  r = r.data("group");
1196
1213
  F(r);
1197
- return u
1214
+ return t
1198
1215
  }
1199
1216
  f.preventDefault();
1200
1217
  f.stopPropagation();
@@ -1204,8 +1221,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1204
1221
  h = a.find("div").first(),
1205
1222
  d = b.data("settings"),
1206
1223
  k = parseInt(b.attr("data-duration")),
1207
- v = p() ? a : h,
1208
- m = p() ? v.scrollTop() : null,
1224
+ u = m() ? a : h,
1225
+ n = m() ? u.scrollTop() : null,
1209
1226
  L = () => {
1210
1227
  window._heightCache || (window._heightCache = new Map);
1211
1228
  let r = 0;
@@ -1213,25 +1230,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1213
1230
  a.find("li, option").each(function() {
1214
1231
  "none" !== $(this).css("display") && F.push(this)
1215
1232
  });
1216
- F.forEach(u => {
1217
- const w = $(u);
1218
- var B = u.id || w.data("height-id");
1219
- u = window._heightCache.get(B);
1220
- u || (u = w.outerHeight(!0), B ? window._heightCache.set(B, u) : (B = "height-" + Math.random().toString(36).substr(2, 9), w.data("height-id", B), window._heightCache.set(B, u)));
1221
- r += u
1233
+ F.forEach(t => {
1234
+ const v = $(t);
1235
+ var C = t.id || v.data("height-id");
1236
+ t = window._heightCache.get(C);
1237
+ t || (t = v.outerHeight(!0), C ? window._heightCache.set(C, t) : (C = "height-" + Math.random().toString(36).substr(2, 9), v.data("height-id", C), window._heightCache.set(C, t)));
1238
+ r += t
1222
1239
  });
1223
1240
  requestAnimationFrame(() => {
1224
- const u = Math.min(r, d.Mheight),
1225
- w = d.optionsStyle.background || "#fff";
1241
+ const t = Math.min(r, d.Mheight),
1242
+ v = d.optionsStyle.background || "#fff";
1226
1243
  h.css({
1227
- height: u,
1244
+ height: t,
1228
1245
  overflowY: "auto",
1229
1246
  WebkitOverflowScrolling: "touch",
1230
- backgroundColor: w
1247
+ backgroundColor: v
1231
1248
  });
1232
1249
  a.css({
1233
- height: u,
1234
- backgroundColor: w
1250
+ height: t,
1251
+ backgroundColor: v
1235
1252
  })
1236
1253
  });
1237
1254
  1E3 < window._heightCache.size && window._heightCache.clear()
@@ -1239,39 +1256,39 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1239
1256
  J = $(this).data("group");
1240
1257
  f = $(this).hasClass("expanded");
1241
1258
  $(this).toggleClass("expanded");
1242
- var E = $(this).find(".custom-group-arrow");
1259
+ var D = $(this).find(".custom-group-arrow");
1243
1260
  if (f) {
1244
- E.css("transform", "translateY(-50%) rotate(0deg)");
1261
+ D.css("transform", "translateY(-50%) rotate(0deg)");
1245
1262
  f = c($(this));
1246
1263
  const r = {};
1247
- f.forEach(w => {
1248
- w = $(w);
1249
- const B = w.attr("group") || w.data("group");
1250
- B && B !== J && (r[B] = w.hasClass("expanded"))
1264
+ f.forEach(v => {
1265
+ v = $(v);
1266
+ const C = v.attr("group") || v.data("group");
1267
+ C && C !== J && (r[C] = v.hasClass("expanded"))
1251
1268
  });
1252
1269
  $(this).data("childStates", r);
1253
1270
  const F = new Set(f);
1254
- f.forEach(w => {
1255
- w = $(w);
1256
- const B = w.attr("group") || w.data("group");
1257
- B && B !== J && a.find("." + B).filter(function() {
1258
- const X = $(this);
1259
- return (X.attr("group") || X.data("group")) !== B
1271
+ f.forEach(v => {
1272
+ v = $(v);
1273
+ const C = v.attr("group") || v.data("group");
1274
+ C && C !== J && a.find("." + C).filter(function() {
1275
+ const ba = $(this);
1276
+ return (ba.attr("group") || ba.data("group")) !== C
1260
1277
  }).each(function() {
1261
1278
  F.add(this)
1262
1279
  })
1263
1280
  });
1264
- const u = Array.from(F);
1265
- u.forEach(w => {
1266
- w = $(w);
1267
- if (w.attr("group") || w.data("group")) w.removeClass("expanded"), w.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)");
1268
- w.css("opacity", "0.1")
1281
+ const t = Array.from(F);
1282
+ t.forEach(v => {
1283
+ v = $(v);
1284
+ if (v.attr("group") || v.data("group")) v.removeClass("expanded"), v.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)");
1285
+ v.css("opacity", "0.1")
1269
1286
  });
1270
- 0 < u.length && $(u).slideUp(k, {
1287
+ 0 < t.length && $(t).slideUp(k, {
1271
1288
  useQueue: !1
1272
1289
  }, function() {
1273
- u.forEach(w => {
1274
- $(w).css({
1290
+ t.forEach(v => {
1291
+ $(v).css({
1275
1292
  opacity: "1",
1276
1293
  display: "none"
1277
1294
  })
@@ -1279,30 +1296,30 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1279
1296
  L()
1280
1297
  })
1281
1298
  } else {
1282
- E.css("transform",
1299
+ D.css("transform",
1283
1300
  "translateY(-50%) rotate(180deg)");
1284
- E = a.find("." + J);
1301
+ D = a.find("." + J);
1285
1302
  f = !$(this).closest("li").hasClass(J);
1286
1303
  const r = $(this).data("childStates"),
1287
1304
  F = [];
1288
- E = E.filter(function() {
1289
- const u = $(this),
1290
- w = u.attr("group") || u.data("group");
1291
- return w && w !== J ? (F.push({
1292
- $element: u,
1293
- groupName: w,
1294
- wasExpanded: r && r[w] || !1
1305
+ D = D.filter(function() {
1306
+ const t = $(this),
1307
+ v = t.attr("group") || t.data("group");
1308
+ return v && v !== J ? (F.push({
1309
+ $element: t,
1310
+ groupName: v,
1311
+ wasExpanded: r && r[v] || !1
1295
1312
  }), !1) : !0
1296
1313
  });
1297
- F.forEach(function(u) {
1298
- u = u.$element;
1299
- u.show();
1300
- u.css("opacity", "1");
1301
- u[0] && u[0].style && u[0].style.setProperty("opacity", "1", "important")
1314
+ F.forEach(function(t) {
1315
+ t = t.$element;
1316
+ t.show();
1317
+ t.css("opacity", "1");
1318
+ t[0] && t[0].style && t[0].style.setProperty("opacity", "1", "important")
1302
1319
  });
1303
- E.show();
1304
- E.hide();
1305
- 0 < E.length && E.css("opacity", "0.1").slideDown(k, {
1320
+ D.show();
1321
+ D.hide();
1322
+ 0 < D.length && D.css("opacity", "0.1").slideDown(k, {
1306
1323
  useQueue: !1
1307
1324
  }, function() {
1308
1325
  $(this).css("opacity",
@@ -1310,32 +1327,33 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1310
1327
  this.style && this.style.setProperty("opacity", "1", "important");
1311
1328
  L()
1312
1329
  });
1313
- f && !p() ? (f = 0 < E.length ? E.first().outerHeight() : 0, E = v[0] || v, v.animate && "function" === typeof v.animate ? v.animate({
1330
+ f && !m() ? (f = 0 < D.length ? D.first().outerHeight() : 0, D = u[0] || u, u.animate && "function" === typeof u.animate ? u.animate({
1314
1331
  scrollTop: f
1315
- }, k) : E && "function" === typeof E.scrollTo ? E.scrollTo({
1332
+ }, k) : D && "function" === typeof D.scrollTo ? D.scrollTo({
1316
1333
  top: f,
1317
1334
  behavior: "smooth"
1318
- }) : E && (E.scrollTop = f)) : f && p() && null !== m && setTimeout(() => {
1319
- v.scrollTop(m)
1335
+ }) : D && (D.scrollTop = f)) : f && m() && null !== n && setTimeout(() => {
1336
+ u.scrollTop(n)
1320
1337
  }, k + 50);
1321
- F.forEach(function(u) {
1322
- const w = u.$element,
1323
- B = u.groupName;
1324
- u = u.wasExpanded;
1325
- w.css("opacity", "1");
1326
- w[0] && w[0].style && w[0].style.setProperty("opacity", "1", "important");
1327
- u ? (w.addClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), a.find("." + B).filter(function() {
1328
- const X = $(this);
1329
- return (X.attr("group") || X.data("group")) !== B
1338
+ F.forEach(function(t) {
1339
+ const v = t.$element,
1340
+ C = t.groupName;
1341
+ t = t.wasExpanded;
1342
+ v.css("opacity", "1");
1343
+ v[0] && v[0].style && v[0].style.setProperty("opacity", "1", "important");
1344
+ t ? (v.addClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), a.find("." + C).filter(function() {
1345
+ const ba = $(this);
1346
+ return (ba.attr("group") || ba.data("group")) !== C
1330
1347
  }).css("opacity", "0.1").slideDown(k, {
1331
1348
  useQueue: !1
1332
1349
  }, function() {
1333
1350
  $(this).css("opacity", "1");
1334
1351
  this.style && this.style.setProperty("opacity", "1", "important");
1335
1352
  L()
1336
- })) : (w.removeClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)"), a.find("." + B).filter(function() {
1337
- const X = $(this);
1338
- return (X.attr("group") || X.data("group")) !== B
1353
+ })) : (v.removeClass("expanded").find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(0deg)"), a.find("." + C).filter(function() {
1354
+ const ba =
1355
+ $(this);
1356
+ return (ba.attr("group") || ba.data("group")) !== C
1339
1357
  }).hide())
1340
1358
  })
1341
1359
  }
@@ -1346,7 +1364,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1346
1364
  return !1
1347
1365
  });
1348
1366
 
1349
- function oa(f, c, b, a) {
1367
+ function pa(f, c, b, a) {
1350
1368
  const h = b.pointer.split("_")[1],
1351
1369
  d = h + "_return";
1352
1370
  if ("function" === typeof window[h]) {
@@ -1354,76 +1372,76 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1354
1372
  a = f.find("select, ul").first();
1355
1373
  c = c.index();
1356
1374
  var k = a.find("option").eq(c);
1357
- const v = k.val(),
1358
- m = y(k.html(), 1),
1359
- L = y(k.html());
1375
+ const u = k.val(),
1376
+ n = p(k.html(), 1),
1377
+ L = p(k.html());
1360
1378
  k = k.attr("tag");
1361
- a = q(n(a[0], c).text);
1379
+ a = A(R(a[0], c).text);
1362
1380
  window[h]({
1363
- value: v,
1364
- text: m,
1381
+ value: u,
1382
+ text: n,
1365
1383
  html: L,
1366
1384
  tag: k,
1367
1385
  group: a,
1368
1386
  index: c
1369
1387
  });
1370
- window[h + "_close"] =
1371
- function() {
1372
- const J = $('[data-state="opened"][data-aun="true"]').filter(function() {
1373
- const B = $(this).data("settings");
1374
- return B && B.pointer === `question_${h}`
1375
- });
1376
- if (!J.length) return !1;
1377
- const E = J.data("settings"),
1378
- r = J.find(`.${E.optionsClass}`),
1379
- F = parseInt(J.attr("data-duration")),
1380
- u = p(),
1381
- w = $(".select-overlay");
1382
- w.css("background-color", "rgba(0, 0, 0, 0)");
1383
- setTimeout(() => {
1384
- w.hide()
1385
- }, F);
1386
- J[0].removeAttribute("data-aun");
1387
- J.removeClass(E.openClass);
1388
- J.attr("data-state", "closed");
1389
- u && !E.slideToggle ? M(r, F, w, E) : D(r, F, E);
1390
- return !0
1391
- };
1392
- window[d] = function(J, E, r) {
1388
+ window[h + "_close"] = function() {
1389
+ const J = $('[data-state="opened"][data-aun="true"]').filter(function() {
1390
+ const C = $(this).data("settings");
1391
+ return C && C.pointer === `question_${h}`
1392
+ });
1393
+ if (!J.length) return !1;
1394
+ const D = J.data("settings"),
1395
+ r = J.find(`.${D.optionsClass}`),
1396
+ F = parseInt(J.attr("data-duration")),
1397
+ t = m(),
1398
+ v = $(".select-overlay");
1399
+ v.css("background-color", "rgba(0, 0, 0, 0)");
1400
+ setTimeout(() => {
1401
+ v.hide()
1402
+ }, F);
1403
+ J[0].removeAttribute("data-aun");
1404
+ J.removeClass(D.openClass);
1405
+ J.attr("data-state", "closed");
1406
+ t && !D.slideToggle ? I(r,
1407
+ F, v, D) : M(r, F, D);
1408
+ return !0
1409
+ };
1410
+ window[d] = function(J, D, r) {
1393
1411
  f.data("forcedClose", !0);
1394
1412
  const F = f.find(`.${b.triggerClass}`),
1395
- u = f.find(`.${b.optionsClass}`),
1396
- w = parseInt(f.attr("data-duration")),
1397
- B = p(),
1398
- X = $(".select-overlay");
1399
- X.css("background-color", "rgba(0, 0, 0, 0)");
1413
+ t = f.find(`.${b.optionsClass}`),
1414
+ v = parseInt(f.attr("data-duration")),
1415
+ C = m(),
1416
+ ba = $(".select-overlay");
1417
+ ba.css("background-color", "rgba(0, 0, 0, 0)");
1400
1418
  setTimeout(() => {
1401
- X.hide()
1402
- }, w);
1419
+ ba.hide()
1420
+ }, v);
1403
1421
  var K = "";
1404
- let Q = null;
1405
- "function" === typeof E ? Q = E : (K = E, Q = r);
1406
- E = J.split(": ")[1];
1407
- E = f.find("select, ul").first().find(`option[value="${E}"]`);
1408
- K = K || E.attr("tag");
1422
+ let P = null;
1423
+ "function" === typeof D ? P = D : (K = D, P = r);
1424
+ D = J.split(": ")[1];
1425
+ D = f.find("select, ul").first().find(`option[value="${D}"]`);
1426
+ K = K || D.attr("tag");
1409
1427
  if (b.allowHTML)
1410
1428
  if (!0 === b.tag && K) {
1411
- E = b.tagStyle || {};
1429
+ D = b.tagStyle || {};
1412
1430
  r = b.tagMap || {};
1413
- const pa = {
1431
+ const qa = {
1414
1432
  position: "absolute",
1415
1433
  top: "50%",
1416
1434
  transform: "translateY(-50%)",
1417
- color: E.color || b.tagColor || "#666",
1418
- fontSize: E.fontSize || "12px",
1435
+ color: D.color || b.tagColor || "#666",
1436
+ fontSize: D.fontSize || "12px",
1419
1437
  right: "radio" === b.pointer || b.pointer.includes("question_") ? "40px" : "30px",
1420
1438
  margin: b.tagMargin
1421
1439
  };
1422
- E.padding && (pa.padding = E.padding);
1423
- E.borderRadius && (pa.borderRadius = E.borderRadius);
1424
- E.fontWeight && (pa.fontWeight = E.fontWeight);
1425
- r[K] && (pa.backgroundColor = r[K]);
1426
- K = $("<span>").css(pa).html(K);
1440
+ D.padding && (qa.padding = D.padding);
1441
+ D.borderRadius && (qa.borderRadius = D.borderRadius);
1442
+ D.fontWeight && (qa.fontWeight = D.fontWeight);
1443
+ r[K] && (qa.backgroundColor = r[K]);
1444
+ K = $("<span>").css(qa).html(K);
1427
1445
  F.html(J).append(K)
1428
1446
  } else F.html(J);
1429
1447
  else F.text(J);
@@ -1438,10 +1456,10 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1438
1456
  F.append(J);
1439
1457
  f.removeClass(b.openClass);
1440
1458
  f.attr("data-state", "closed");
1441
- B && !b.slideToggle ? M(u, w, X, b) : u.slideUp(w, {
1459
+ C && !b.slideToggle ? I(t, v, ba, b) : t.slideUp(v, {
1442
1460
  easing: b.easing
1443
1461
  });
1444
- "function" === typeof Q && Q();
1462
+ "function" === typeof P && P();
1445
1463
  delete window[d];
1446
1464
  return !0
1447
1465
  }
@@ -1459,55 +1477,55 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1459
1477
  let h = c.find(".custom-checkbox");
1460
1478
  const d = c[0].getBoundingClientRect(),
1461
1479
  k = a.clientX || a.originalEvent?.touches?.[0]?.clientX,
1462
- v = a.clientY || a.originalEvent?.touches?.[0]?.clientY,
1463
- m = c.hasClass("group-option") || c.attr("data-group") || c.data("group");
1464
- if (!(h.length && h[0] || m)) {
1480
+ u = a.clientY || a.originalEvent?.touches?.[0]?.clientY,
1481
+ n = c.hasClass("group-option") || c.attr("data-group") || c.data("group");
1482
+ if (!(h.length && h[0] || n)) {
1465
1483
  c.css({
1466
1484
  position: "relative",
1467
1485
  paddingRight: "40px"
1468
1486
  });
1469
1487
  const K = document.createElement("div");
1470
1488
  K.className = "custom-checkbox option-checkbox";
1471
- const Q = "true" === c.attr("data-checked");
1489
+ const P = "true" === c.attr("data-checked");
1472
1490
  Object.assign(K.style, {
1473
- ...da(),
1474
- border: Q ? `2px solid ${b.checkboxColor}` : `2px solid ${b.buttonColor}`,
1491
+ ...W(),
1492
+ border: P ? `2px solid ${b.checkboxColor}` : `2px solid ${b.buttonColor}`,
1475
1493
  borderRadius: "3px",
1476
- backgroundColor: Q ? b.checkboxColor : "#fff",
1494
+ backgroundColor: P ? b.checkboxColor : "#fff",
1477
1495
  zIndex: "2",
1478
1496
  display: "block",
1479
1497
  width: b.checkboxSize,
1480
1498
  height: b.checkboxSize
1481
1499
  });
1482
- Q && (K.innerHTML = V(b.checkboxSize));
1500
+ P && (K.innerHTML = E(b.checkboxSize));
1483
1501
  c.append(K);
1484
1502
  h = c.find(".custom-checkbox")
1485
1503
  }
1486
- if (!(k >= d.left - 1 && k <= d.right + 1 && v >= d.top - 1 && v <= d.bottom + 1)) return c.data("processing", !1), !1;
1504
+ if (!(k >= d.left - 1 && k <= d.right + 1 && u >= d.top - 1 && u <= d.bottom + 1)) return c.data("processing", !1), !1;
1487
1505
  const L = "true" === c.attr("data-checked"),
1488
1506
  J = f.find('[data-checked="true"]').get(),
1489
- E = (a = !L) ? J.length + 1 : J.length - 1,
1507
+ D = (a = !L) ? J.length + 1 : J.length - 1,
1490
1508
  r = f.find("select").first(),
1491
1509
  F = c.index(),
1492
- u = r.find("option").eq(F),
1493
- w = {
1494
- value: u.val(),
1495
- text: y(u.html(), 1),
1496
- html: y(u.html()),
1497
- tag: u.attr("tag"),
1510
+ t = r.find("option").eq(F),
1511
+ v = {
1512
+ value: t.val(),
1513
+ text: p(t.html(), 1),
1514
+ html: p(t.html()),
1515
+ tag: t.attr("tag"),
1498
1516
  checked: a,
1499
1517
  index: F,
1500
- count: E,
1501
- group: q(n(r[0], F).text)
1518
+ count: D,
1519
+ group: A(R(r[0], F).text)
1502
1520
  };
1503
1521
  if (b.pointer?.startsWith("checkbox_")) {
1504
1522
  const K = b.pointer.split("checkbox_")[1];
1505
- if ("function" === typeof window[K] && !1 === window[K](w)) return c.data("processing", !1), !1
1523
+ if ("function" === typeof window[K] && !1 === window[K](v)) return c.data("processing", !1), !1
1506
1524
  }
1507
1525
  c.attr("data-checked", a.toString());
1508
- f.attr("data-check-count", E);
1526
+ f.attr("data-check-count", D);
1509
1527
 
1510
- function B(K, Q, pa) {
1528
+ function C(K, P, qa) {
1511
1529
  return {
1512
1530
  position: "absolute",
1513
1531
  right: "10px",
@@ -1516,8 +1534,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1516
1534
  width: `calc(${K} + ${4}px)`,
1517
1535
  height: `calc(${K} + ${4}px)`,
1518
1536
  borderRadius: "3px",
1519
- border: `${2}px solid ${pa?Q:b.buttonColor}`,
1520
- backgroundColor: pa ? Q : "#fff",
1537
+ border: `${2}px solid ${qa?P:b.buttonColor}`,
1538
+ backgroundColor: qa ? P : "#fff",
1521
1539
  WebkitTapHighlightColor: "transparent",
1522
1540
  display: "block",
1523
1541
  zIndex: "2",
@@ -1525,7 +1543,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1525
1543
  padding: "0"
1526
1544
  }
1527
1545
  }
1528
- if (!(h.length && h[0] || m)) {
1546
+ if (!(h.length && h[0] || n)) {
1529
1547
  c.css({
1530
1548
  position: "relative",
1531
1549
  paddingRight: "40px"
@@ -1533,7 +1551,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1533
1551
  const K = document.createElement("div");
1534
1552
  K.className = "custom-checkbox option-checkbox";
1535
1553
  Object.assign(K.style, {
1536
- ...da(),
1554
+ ...W(),
1537
1555
  borderRadius: "3px",
1538
1556
  zIndex: "2",
1539
1557
  display: "block",
@@ -1543,19 +1561,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1543
1561
  c.append(K);
1544
1562
  h = c.find(".custom-checkbox")
1545
1563
  }
1546
- const X = f.find(`.${b.triggerClass}`).find(".custom-checkbox");
1547
- a ? (h.css(B(b.checkboxSize, b.checkboxColor, !0)).html(V(b.checkboxSize)), 0 < E && X.css(B(b.checkboxSize, b.checkboxColor, !0)).html(H(E, b.checkboxSize))) : (h.css(B(b.checkboxSize, b.buttonColor, !1)).empty(), 0 === E ? X.css(B(b.checkboxSize, b.buttonColor, !1)).empty() : X.css(B(b.checkboxSize, b.checkboxColor, !0)).html(H(E, b.checkboxSize)));
1564
+ const ba = f.find(`.${b.triggerClass}`).find(".custom-checkbox");
1565
+ a ? (h.css(C(b.checkboxSize, b.checkboxColor, !0)).html(E(b.checkboxSize)), 0 < D && ba.css(C(b.checkboxSize, b.checkboxColor, !0)).html(ja(D, b.checkboxSize))) : (h.css(C(b.checkboxSize, b.buttonColor, !1)).empty(), 0 === D ? ba.css(C(b.checkboxSize, b.buttonColor, !1)).empty() : ba.css(C(b.checkboxSize, b.checkboxColor, !0)).html(ja(D, b.checkboxSize)));
1548
1566
  if (b.selectedBg) {
1549
- const K = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) :
1550
- b.selectedBg;
1567
+ const K = !0 === b.selectedBg ? rgbToRgba(b.activeBackground, .5) : b.selectedBg;
1551
1568
  $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${K} !important; }</style>`);
1552
1569
  f.find(`.${b.optionClass}`).each(function() {
1553
- const Q = $(this);
1554
- "true" === Q.attr("data-checked") ? (Q.addClass("selected").addClass("selected-bg-active"), Q[0].style.setProperty("background-color", K, "important")) : (Q.removeClass("selected").removeClass("selected-bg-active"), Q[0].style.removeProperty("background-color"));
1555
- Q.css("font-weight",
1556
- "normal")
1570
+ const P = $(this);
1571
+ "true" === P.attr("data-checked") ? (P.addClass("selected").addClass("selected-bg-active"), P[0].style.setProperty("background-color", K, "important")) : (P.removeClass("selected").removeClass("selected-bg-active"), P[0].style.removeProperty("background-color"));
1572
+ P.css("font-weight", "normal")
1557
1573
  })
1558
- } else a ? (c.addClass("selected"), c.css("font-weight", "bold")) : (c.removeClass("selected"), c.css("font-weight", "normal"));
1574
+ } else a ?
1575
+ (c.addClass("selected"), c.css("font-weight", "bold")) : (c.removeClass("selected"), c.css("font-weight", "normal"));
1559
1576
  if (b.closeBox) {
1560
1577
  const K = $(".select-overlay");
1561
1578
  K.css("pointer-events", "none").hide();
@@ -1565,18 +1582,18 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1565
1582
  }, 50)
1566
1583
  } else {
1567
1584
  const K = parseInt(f.attr("data-duration")),
1568
- Q = f.find(`.${b.optionsClass}`),
1569
- pa = p(),
1570
- ya = $(".select-overlay");
1571
- pa && !b.slideToggle ? z(Q, K, ya, f, b) : (f.removeClass(b.openClass), ya.css("pointer-events", "none").hide(), K ? Q.slideUp(K, {
1585
+ P = f.find(`.${b.optionsClass}`),
1586
+ qa = m(),
1587
+ xa = $(".select-overlay");
1588
+ qa && !b.slideToggle ? U(P, K, xa, f, b) : (f.removeClass(b.openClass), xa.css("pointer-events", "none").hide(), K ? P.slideUp(K, {
1572
1589
  easing: b.easing,
1573
1590
  complete: () => {
1574
1591
  setTimeout(() => {
1575
- ya.css("pointer-events", "");
1592
+ xa.css("pointer-events", "");
1576
1593
  c.data("processing", !1)
1577
1594
  }, 50)
1578
1595
  }
1579
- }) : (Q.hide(), ya.css("pointer-events", ""), setTimeout(() => {
1596
+ }) : (P.hide(), xa.css("pointer-events", ""), setTimeout(() => {
1580
1597
  c.data("processing", !1)
1581
1598
  }, 50)))
1582
1599
  }
@@ -1591,13 +1608,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1591
1608
  }
1592
1609
 
1593
1610
  function za(f, c, b) {
1594
- const a =
1595
- f.find(`.${b.triggerClass}`),
1611
+ const a = f.find(`.${b.triggerClass}`),
1596
1612
  h = parseInt(f.attr("data-selected-index"));
1597
1613
  let d = a.find(".custom-radio");
1598
1614
  d.length ? d = d[0] : (d = document.createElement("div"), d.className = "custom-radio trigger-radio");
1599
1615
  Object.assign(d.style, {
1600
- ...da(),
1616
+ ...W(),
1601
1617
  border: void 0 !== c ? `2px solid ${b.radioColor}` : `2px solid ${b.buttonColor}`,
1602
1618
  borderRadius: "50%",
1603
1619
  backgroundColor: "#fff",
@@ -1606,26 +1622,26 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1606
1622
  });
1607
1623
  d.innerHTML = void 0 !== c ? O(b.radioColor, b) : "";
1608
1624
  f.find(".custom-radio").not(".trigger-radio").each(function() {
1609
- const v = $(this).closest('[class*="-option"]');
1610
- var m = v.attr("data-value");
1611
- const L = v.index();
1612
- m = m === c && L === h;
1625
+ const u = $(this).closest('[class*="-option"]');
1626
+ var n = u.attr("data-value");
1627
+ const L = u.index();
1628
+ n = n === c && L === h;
1613
1629
  Object.assign(this.style, {
1614
- border: m ? `2px solid ${b.radioColor}` : `2px solid ${b.buttonColor}`,
1630
+ border: n ? `2px solid ${b.radioColor}` : `2px solid ${b.buttonColor}`,
1615
1631
  backgroundColor: "#fff"
1616
1632
  });
1617
- m ? (this.innerHTML = O(b.radioColor, b), v.addClass("selected"), b.selectedBg || v.css("font-weight", "bold")) : (this.innerHTML = "", v.removeClass("selected").css("font-weight", "normal"))
1633
+ n ? (this.innerHTML = O(b.radioColor, b), u.addClass("selected"), b.selectedBg || u.css("font-weight", "bold")) : (this.innerHTML = "", u.removeClass("selected").css("font-weight", "normal"))
1618
1634
  });
1619
1635
  a.find(".custom-radio").remove();
1620
1636
  a.append(d);
1621
1637
  var k = f.find("select").first();
1622
1638
  f = k.find("option").eq(h);
1623
- f.length && (k = n(k[0], h), f.html().replace(/\x3c!--(.*?)--\x3e/g,
1639
+ f.length && (k = R(k[0], h), f.html().replace(/\x3c!--(.*?)--\x3e/g,
1624
1640
  "$1").trim(), a.html(k.text + d.outerHTML));
1625
1641
  domqueryFocus()
1626
1642
  }
1627
1643
 
1628
- function ba(f, c) {
1644
+ function da(f, c) {
1629
1645
  f.attr("data-selected-value", "");
1630
1646
  f.attr("data-selected-index", "-1");
1631
1647
  const b = f.find(`.${c.triggerClass}`),
@@ -1636,7 +1652,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1636
1652
  const d = document.createElement("div");
1637
1653
  d.className = "custom-radio trigger-radio";
1638
1654
  Object.assign(d.style, {
1639
- ...da(),
1655
+ ...W(),
1640
1656
  border: `2px solid ${c.buttonColor}`,
1641
1657
  borderRadius: "50%",
1642
1658
  backgroundColor: "#fff",
@@ -1654,7 +1670,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1654
1670
  c.selectedBg && k.removeClass("selected-bg-active").css("background-color", "")
1655
1671
  });
1656
1672
  a.find("option").prop("selected", !1);
1657
- la(f)
1673
+ ka(f)
1658
1674
  }
1659
1675
 
1660
1676
  function na(f, c) {
@@ -1672,10 +1688,10 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1672
1688
  }).empty();
1673
1689
  c.selectedBg && b.removeClass("selected-bg-active").css("background-color", "")
1674
1690
  });
1675
- la(f)
1691
+ ka(f)
1676
1692
  }
1677
1693
 
1678
- function la(f) {
1694
+ function ka(f) {
1679
1695
  const c = f.find('[class*="-options"]');
1680
1696
  parseInt(f.attr("data-duration"));
1681
1697
  c.find("[data-group]").each(function() {
@@ -1691,7 +1707,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1691
1707
  })
1692
1708
  }
1693
1709
 
1694
- function ra(f, c) {
1710
+ function sa(f, c) {
1695
1711
  const b = ["custom-checkbox", "custom-radio", "custom-question", "custom-dot"];
1696
1712
  Array.from(f.childNodes).forEach(h => {
1697
1713
  (h.nodeType === Node.TEXT_NODE || h.nodeType === Node.ELEMENT_NODE &&
@@ -1702,7 +1718,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1702
1718
  a ? f.insertBefore(c, a) : f.appendChild(c)
1703
1719
  }
1704
1720
 
1705
- function sa(f, c) {
1721
+ function ta(f, c) {
1706
1722
  const b = f.find(`.${c.triggerClass}`),
1707
1723
  a = f.find("select, ul").first().find("li, option").first().html(),
1708
1724
  h = "checkbox" === c.pointer || c.pointer?.startsWith("checkbox_");
@@ -1719,11 +1735,11 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1719
1735
  const d = window._triggerResizeObservers.get(b[0]);
1720
1736
  d && (d.disconnect(), window._triggerResizeObservers.delete(b[0]))
1721
1737
  }
1722
- h ? ra(b[0], a) : b.html(a);
1738
+ h ? sa(b[0], a) : b.html(a);
1723
1739
  c.selectedBg && f.find(`.${c.optionClass}`).each(function() {
1724
1740
  $(this).removeClass("selected-bg-active").css("background-color", "")
1725
1741
  });
1726
- la(f)
1742
+ ka(f)
1727
1743
  }
1728
1744
 
1729
1745
  function ua(f, c, b) {
@@ -1735,7 +1751,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1735
1751
  else {
1736
1752
  b = f.attr("data-selected-value");
1737
1753
  const h = parseInt(f.attr("data-selected-index"));
1738
- 0 < a.find("option[group]").length ? -1 === h && void 0 === b || 0 === h && (!b || "" === b) ? (c.hide(), la(f)) : c.show() : (-1 !== h || b && "" !== b) && (0 !== h || b && "" !== b) ? c.show() : c.hide()
1754
+ 0 < a.find("option[group]").length ? -1 === h && void 0 === b || 0 === h && (!b || "" === b) ? (c.hide(), ka(f)) : c.show() : (-1 !== h || b && "" !== b) && (0 !== h || b && "" !== b) ? c.show() : c.hide()
1739
1755
  }
1740
1756
  }
1741
1757
  $(document).on("click", '[class*="-option"]', function(f) {
@@ -1758,24 +1774,24 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1758
1774
  b.attr("data-current-index", k);
1759
1775
  if ((c.attr("group") || c.attr("data-group")) && !c.attr("value")) return f.preventDefault(), b.data("groupClicked", !0), !1;
1760
1776
  b.data("groupClicked", !1);
1761
- "undefined" !== typeof U && U && (U = !1);
1762
- U = !1;
1777
+ "undefined" !== typeof V && V && (V = !1);
1778
+ V = !1;
1763
1779
  if ("undefined" !== typeof g && g) f.preventDefault(), f.stopPropagation(), b.removeData("optionClickProcessing");
1764
1780
  else {
1765
1781
  if (c.hasClass("disabled")) return f.preventDefault(),
1766
1782
  b.removeData("optionClickProcessing"), !1;
1767
- if (a.pointer && a.pointer.startsWith("question_") && (f.preventDefault(), f.stopPropagation(), !1 === oa(b, c, a, f))) return b.removeData("optionClickProcessing"), !1;
1783
+ if (a.pointer && a.pointer.startsWith("question_") && (f.preventDefault(), f.stopPropagation(), !1 === pa(b, c, a, f))) return b.removeData("optionClickProcessing"), !1;
1768
1784
  if (0 === c.index() || "" === c.attr("data-value") || !c.attr("data-value")) switch (a.pointer) {
1769
1785
  case "radio":
1770
- ba(b, a);
1786
+ da(b, a);
1771
1787
  break;
1772
1788
  case "checkbox":
1773
1789
  na(b, a);
1774
1790
  break;
1775
1791
  default:
1776
- sa(b, a)
1792
+ ta(b, a)
1777
1793
  }
1778
- 0 < h.find("option[group]").length && 0 === k && (!d || "" === d) && la(b);
1794
+ 0 < h.find("option[group]").length && 0 === k && (!d || "" === d) && ka(b);
1779
1795
  if ("radio" !== a.pointer || 0 !== k && d && "" !== d) {
1780
1796
  if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) return f.preventDefault(),
1781
1797
  f.stopPropagation(), f.stopImmediatePropagation(), d = ha(b, c, a, f), b.removeData("optionClickProcessing"), d;
@@ -1785,16 +1801,16 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1785
1801
  try {
1786
1802
  b.attr("data-selected-value", "");
1787
1803
  b.attr("data-selected-index", "-1");
1788
- var v = h[0];
1789
- const B = h.find("li, option").first().html();
1790
- var m = h.find("option").eq(0);
1791
- const X = b.find(`.${a.triggerClass}`);
1804
+ var u = h[0];
1805
+ const C = h.find("li, option").first().html();
1806
+ var n = h.find("option").eq(0);
1807
+ const ba = b.find(`.${a.triggerClass}`);
1792
1808
  if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) {
1793
- const K = a.allowHTML ? B : h.find("li, option").first().text();
1794
- ra(X[0], K)
1795
- } else a.allowHTML ? X.html(B) : X.text(h.find("li, option").first().text());
1809
+ const K = a.allowHTML ? C : h.find("li, option").first().text();
1810
+ sa(ba[0], K)
1811
+ } else a.allowHTML ? ba.html(C) : ba.text(h.find("li, option").first().text());
1796
1812
  h.find("option, li").prop("selected", !1);
1797
- B && h.find("option").eq(0).prop("selected", !0);
1813
+ C && h.find("option").eq(0).prop("selected", !0);
1798
1814
  b.find('[class*="-option"]').removeClass("selected").removeClass(a.highlightedClass).css("font-weight", "normal");
1799
1815
  a.dot && b.find(".custom-dot").each(function() {
1800
1816
  Object.assign(this.style, {
@@ -1803,16 +1819,15 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1803
1819
  backgroundColor: "#fff"
1804
1820
  })
1805
1821
  });
1806
- if (v._selectId) {
1807
- m.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
1808
- k = function(K,
1809
- Q = 0) {
1810
- return 1 === Q ? K.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : K.replace(/\x3c!--(.*?)--\x3e/g, "$1")
1822
+ if (u._selectId) {
1823
+ n.html().replace(/\x3c!--(.*?)--\x3e/g, "$1").trim();
1824
+ k = function(K, P = 0) {
1825
+ return 1 === P ? K.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<[^>]*>/g, "") : K.replace(/\x3c!--(.*?)--\x3e/g, "$1")
1811
1826
  };
1812
1827
  d = "";
1813
1828
  try {
1814
- if ("function" === typeof n) {
1815
- const K = n(v, 0);
1829
+ if ("function" === typeof R) {
1830
+ const K = R(u, 0);
1816
1831
  K && (d = K.text)
1817
1832
  }
1818
1833
  } catch (K) {
@@ -1820,27 +1835,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1820
1835
  }
1821
1836
  var L = {
1822
1837
  value: "",
1823
- text: k(m.html(), 1),
1824
- html: k(m.html()),
1825
- tag: m.attr("tag"),
1826
- element: m[0],
1827
- select: v,
1838
+ text: k(n.html(), 1),
1839
+ html: k(n.html()),
1840
+ tag: n.attr("tag"),
1841
+ element: n[0],
1842
+ select: u,
1828
1843
  index: 0,
1829
1844
  group: function(K) {
1830
- const Q = document.createElement("div");
1831
- Q.innerHTML = K;
1832
- return Q.textContent || Q.innerText || ""
1845
+ const P = document.createElement("div");
1846
+ P.innerHTML = K;
1847
+ return P.textContent || P.innerText || ""
1833
1848
  }(d)
1834
1849
  },
1835
- J = window._gong_tea_yun_0.get(v._selectId + "_callback");
1850
+ J = window._gong_tea_yun_0.get(u._selectId +
1851
+ "_callback");
1836
1852
  J && J.call(this, L);
1837
- var E = window._gong_tea_yun_0.get(v._selectId + "_onSelect");
1838
- E && E.call(this, L);
1853
+ var D = window._gong_tea_yun_0.get(u._selectId + "_onSelect");
1854
+ D && D.call(this, L);
1839
1855
  h.trigger("change")
1840
1856
  }
1841
1857
  var r = parseInt(b.attr("data-duration")) || 0,
1842
1858
  F = b.find(`.${a.optionsClass}`);
1843
- p() && !a.slideToggle ? z(F, r, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), F.slideUp(r, {
1859
+ m() && !a.slideToggle ? U(F, r, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), F.slideUp(r, {
1844
1860
  easing: a.easing,
1845
1861
  complete: function() {
1846
1862
  setTimeout(() => {
@@ -1848,27 +1864,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1848
1864
  }, 100)
1849
1865
  }
1850
1866
  }))
1851
- } catch (B) {
1852
- console.error("Reset error:", B), b.removeData("processingReset")
1867
+ } catch (C) {
1868
+ console.error("Reset error:", C), b.removeData("processingReset")
1853
1869
  }
1854
1870
  return !1
1855
1871
  }
1856
- v = b.find("select").first()[0];
1857
- b.find('[class*="-option"]').each(function(B) {
1858
- B = $(this);
1859
- B.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
1872
+ u =
1873
+ b.find("select").first()[0];
1874
+ b.find('[class*="-option"]').each(function(C) {
1875
+ C = $(this);
1876
+ C.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
1860
1877
  this.classList.remove("selected");
1861
1878
  this.classList.remove(a.highlightedClass);
1862
1879
  this.classList.remove("selected-bg-active");
1863
1880
  a.selectedBg && this.style.removeProperty("background-color");
1864
- "radio" === a.pointer && B.find(".custom-radio").removeClass("selected")
1881
+ "radio" === a.pointer && C.find(".custom-radio").removeClass("selected")
1865
1882
  });
1866
1883
  c.addClass("selected").addClass(a.highlightedClass);
1867
- a.selectedBg ? (c.addClass("selected-bg-active"),
1868
- m = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${m} !important; }</style>`), c[0].style.setProperty("background-color", m, "important"), c.css("font-weight", "normal")) : c.css("font-weight", "bold");
1884
+ a.selectedBg ? (c.addClass("selected-bg-active"), n = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${n} !important; }</style>`), c[0].style.setProperty("background-color", n, "important"), c.css("font-weight", "normal")) : c.css("font-weight", "bold");
1869
1885
  "radio" === a.pointer && c.find(".custom-radio").addClass("selected");
1870
1886
  a.dot && (b.find(".custom-dot").each(function() {
1871
- Object.assign(this.style, a.dotStyle)
1887
+ Object.assign(this.style,
1888
+ a.dotStyle)
1872
1889
  }), c.find(".custom-dot").css(a.dotSelectedStyle));
1873
1890
  (d || "" === d) && b.attr({
1874
1891
  "data-selected-value": d,
@@ -1877,81 +1894,82 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1877
1894
  h.find("option").prop("selected", !1);
1878
1895
  h.find("option").eq(k).prop("selected", !0);
1879
1896
  h.trigger("change");
1880
- if (v._selectId) {
1897
+ if (u._selectId) {
1881
1898
  h = h.find("option").eq(k);
1882
- c = n(v, k);
1883
- m = b.find(`.${a.triggerClass}`);
1884
- m.empty();
1885
- if (h.attr("img")) r = h.attr("img"), Object.assign(m[0].style, {
1899
+ c = R(u, k);
1900
+ n = b.find(`.${a.triggerClass}`);
1901
+ n.empty();
1902
+ if (h.attr("img")) r = h.attr("img"), Object.assign(n[0].style, {
1886
1903
  backgroundImage: `url(${r})`,
1887
1904
  backgroundRepeat: "no-repeat"
1888
- }), r = new ResizeObserver(B => {
1889
- const X = B[0].contentRect.height;
1890
- 0 < X && Object.assign(B[0].target.style, {
1891
- backgroundSize: `${X}px`,
1892
- backgroundPosition: `${X/
1893
- 2}px center`,
1894
- paddingLeft: `calc(${2*X}px)`
1895
- })
1896
- }), r.observe(m[0]), window._triggerResizeObservers || (window._triggerResizeObservers = new WeakMap), (F = window._triggerResizeObservers.get(m[0])) && F.disconnect(), window._triggerResizeObservers.set(m[0], r);
1897
- else if (Object.assign(m[0].style, {
1905
+ }), r = new ResizeObserver(C => {
1906
+ const ba = C[0].contentRect.height;
1907
+ 0 <
1908
+ ba && Object.assign(C[0].target.style, {
1909
+ backgroundSize: `${ba}px`,
1910
+ backgroundPosition: `${ba/2}px center`,
1911
+ paddingLeft: `calc(${2*ba}px)`
1912
+ })
1913
+ }), r.observe(n[0]), window._triggerResizeObservers || (window._triggerResizeObservers = new WeakMap), (F = window._triggerResizeObservers.get(n[0])) && F.disconnect(), window._triggerResizeObservers.set(n[0], r);
1914
+ else if (Object.assign(n[0].style, {
1898
1915
  backgroundImage: "none",
1899
1916
  backgroundPosition: "initial",
1900
1917
  backgroundSize: "initial",
1901
1918
  paddingLeft: a.defaultPadding || "10px"
1902
- }), window._triggerResizeObservers && (r = window._triggerResizeObservers.get(m[0]))) r.disconnect(), window._triggerResizeObservers.delete(m[0]);
1903
- a.allowHTML ? m.html(c.text) : m.text(c.text);
1919
+ }), window._triggerResizeObservers &&
1920
+ (r = window._triggerResizeObservers.get(n[0]))) r.disconnect(), window._triggerResizeObservers.delete(n[0]);
1921
+ a.allowHTML ? n.html(c.text) : n.text(c.text);
1904
1922
  "radio" === a.pointer && (b.attr({
1905
1923
  "data-selected-value": d,
1906
1924
  "data-selected-index": k
1907
1925
  }), za(b, d, a));
1908
1926
  r = h.attr("tag") || "";
1909
- !0 === a.tag && r && (F = document.createElement("span"), L = a.tagStyle || {}, J = a.tagMap || {}, E = {
1910
- position: "absolute",
1911
- top: "50%",
1912
- transform: "translateY(-50%)",
1913
- color: L.color || a.tagColor || "#666",
1914
- fontSize: L.fontSize || "12px",
1915
- right: "radio" === a.pointer ? "40px" : "30px",
1916
- margin: a.tagMargin
1917
- }, L.padding && (E.padding = L.padding), L.borderRadius && (E.borderRadius = L.borderRadius), L.fontWeight &&
1918
- (E.fontWeight = L.fontWeight), J[r] && (E.backgroundColor = J[r]), Object.assign(F.style, E), a.allowHTML ? F.innerHTML = r : F.textContent = r, m.append(F));
1927
+ !0 === a.tag && r && (F = document.createElement("span"), L = a.tagStyle || {}, J = a.tagMap || {}, D = {
1928
+ position: "absolute",
1929
+ top: "50%",
1930
+ transform: "translateY(-50%)",
1931
+ color: L.color || a.tagColor || "#666",
1932
+ fontSize: L.fontSize || "12px",
1933
+ right: "radio" === a.pointer ? "40px" : "30px",
1934
+ margin: a.tagMargin
1935
+ }, L.padding && (D.padding = L.padding), L.borderRadius && (D.borderRadius = L.borderRadius), L.fontWeight && (D.fontWeight = L.fontWeight), J[r] && (D.backgroundColor = J[r]), Object.assign(F.style, D), a.allowHTML ? F.innerHTML = r : F.textContent = r, n.append(F));
1919
1936
  d = {
1920
1937
  value: d,
1921
- text: y(h.html(), 1),
1922
- html: y(h.html()),
1938
+ text: p(h.html(), 1),
1939
+ html: p(h.html()),
1923
1940
  tag: r,
1924
1941
  element: h[0],
1925
- select: v,
1942
+ select: u,
1926
1943
  index: k,
1927
- group: q(c.text)
1944
+ group: A(c.text)
1928
1945
  };
1929
- (k = window._gong_tea_yun_0.get(v._selectId + "_callback")) && k.call(this, d);
1930
- (k = window._gong_tea_yun_0.get(v._selectId + "_onSelect")) && k.call(this, d)
1946
+ (k = window._gong_tea_yun_0.get(u._selectId + "_callback")) && k.call(this, d);
1947
+ (k = window._gong_tea_yun_0.get(u._selectId + "_onSelect")) && k.call(this, d)
1931
1948
  }
1932
1949
  b.removeData("optionClickProcessing");
1933
1950
  d = parseInt(b.attr("data-duration")) || 0;
1934
1951
  k = b.find(`.${a.optionsClass}`);
1935
- var u = $(".select-overlay"),
1936
- w = function() {
1952
+ var t = $(".select-overlay"),
1953
+ v = function() {
1937
1954
  b.find('[class*="-option"]').removeClass("selected");
1938
- [50, 100, 200].forEach(B => {
1955
+ [50, 100, 200].forEach(C => {
1939
1956
  setTimeout(() => {
1940
- const X = b.find('[class*="-option"].selected');
1941
- 0 < X.length && X.removeClass("selected")
1942
- }, B)
1957
+ const ba = b.find('[class*="-option"].selected');
1958
+ 0 < ba.length && ba.removeClass("selected")
1959
+ }, C)
1943
1960
  })
1944
1961
  };
1945
- p() && !a.slideToggle ? (z(k, d, u, b, a), w()) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), u.css("background-color", "rgba(0, 0, 0, 0)"), a.slideToggle && void 0 !== a.opacity ? k.css("opacity", a.opacity || 0) : k.css("opacity", ""), k.slideUp(d, {
1962
+ m() && !a.slideToggle ? (U(k, d, t, b, a), v()) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), t.css("background-color", "rgba(0, 0, 0, 0)"), a.slideToggle && void 0 !== a.opacity ? k.css("opacity", a.opacity ||
1963
+ 0) : k.css("opacity", ""), k.slideUp(d, {
1946
1964
  easing: a.easing,
1947
1965
  complete: function() {
1948
- u.hide();
1949
- P(b);
1966
+ t.hide();
1967
+ y(b);
1950
1968
  domqueryFocus();
1951
- w()
1969
+ v()
1952
1970
  }
1953
1971
  }))
1954
- } else ba(b, a), d = parseInt(b.attr("data-duration")) || 0, k = b.find(`.${a.optionsClass}`), p() && !a.slideToggle ? z(k, d, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), k.slideUp(d, {
1972
+ } else da(b, a), d = parseInt(b.attr("data-duration")) || 0, k = b.find(`.${a.optionsClass}`), m() && !a.slideToggle ? U(k, d, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), k.slideUp(d, {
1955
1973
  easing: a.easing
1956
1974
  })), b.removeData("optionClickProcessing")
1957
1975
  }
@@ -1960,184 +1978,190 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
1960
1978
  $(document).on("click", '[class*="-trigger"]', function(f) {
1961
1979
  function c(r) {
1962
1980
  function F() {
1963
- E || (E = !0, b.data("isInitialOpen") && b.removeData("isInitialOpen"), a.trigger && domquery(a.trigger).trigger("click"), a.triggerOnce && !b.data("isTriggeredOnce") && (domquery(a.triggerOnce).trigger("click"),
1964
- b.data("isTriggeredOnce", !0)))
1981
+ D || (D = !0, b.data("isInitialOpen") && b.removeData("isInitialOpen"), a.trigger &&
1982
+ domquery(a.trigger).trigger("click"), a.triggerOnce && !b.data("isTriggeredOnce") && (domquery(a.triggerOnce).trigger("click"), b.data("isTriggeredOnce", !0)))
1965
1983
  }
1966
- r = p();
1967
- var u = b.find("select").first()[0];
1968
- u._selectId && (u = window._gong_tea_yun_0.get(u._selectId + "_open")) && u.call(this);
1984
+ r = m();
1985
+ var t = b.find("select").first()[0];
1986
+ t._selectId && (t = window._gong_tea_yun_0.get(t._selectId + "_open")) && t.call(this);
1969
1987
  ua(b, d, a);
1970
- const w = parseInt(b.attr("data-selected-index")),
1971
- B = b.attr("data-selected-value");
1972
- u = B;
1973
- let X = w;
1988
+ const v = parseInt(b.attr("data-selected-index")),
1989
+ C = b.attr("data-selected-value");
1990
+ t = C;
1991
+ let ba = v;
1974
1992
  const K = b.find('[class*="-option"].selected').first();
1975
- K.length && !u && 0 >= X && (u = K.attr("value") || K.attr("data-value"), X = K.index());
1976
- if (0 < X || u) {
1977
- var Q;
1978
- u ? Q = d.find(`[value="${u}"], [data-value="${u}"]`) : 0 < X && (Q = d.find(`.${a.optionClass}`).eq(X));
1979
- if (Q && Q.length &&
1980
- (Q = (Q.attr("class")?.split(" ") || []).filter(N => N !== a.optionClass && "selected" !== N && N !== a.highlightedClass), 0 < Q.length)) {
1993
+ K.length && !t && 0 >= ba && (t = K.attr("value") || K.attr("data-value"), ba = K.index());
1994
+ if (0 < ba || t) {
1995
+ var P;
1996
+ t ? P = d.find(`[value="${t}"], [data-value="${t}"]`) : 0 < ba && (P = d.find(`.${a.optionClass}`).eq(ba));
1997
+ if (P && P.length && (P = (P.attr("class")?.split(" ") || []).filter(N => N !== a.optionClass && "selected" !== N && N !== a.highlightedClass), 0 < P.length)) {
1981
1998
  const N = new Set,
1982
- S = fa => {
1983
- if (fa && !N.has(fa)) {
1984
- N.add(fa);
1985
- var ca = d.find(`[data-group="${fa}"]`);
1986
- ca.length && (ca.addClass("expanded"), ca.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${fa}`).show(), (ca.attr("class")?.split(" ") || []).forEach(ta => {
1987
- "group-option" !== ta && "expanded" !== ta && S(ta)
1999
+ Q = ea => {
2000
+ if (ea && !N.has(ea)) {
2001
+ N.add(ea);
2002
+ var X = d.find(`[data-group="${ea}"]`);
2003
+ X.length && (X.addClass("expanded"), X.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ea}`).show(), (X.attr("class")?.split(" ") || []).forEach(oa => {
2004
+ "group-option" !== oa && "expanded" !== oa && Q(oa)
1988
2005
  }))
1989
2006
  }
1990
2007
  };
1991
- Q.forEach(fa => S(fa));
1992
- Q = d.css("display");
1993
- d.css("display",
1994
- "block");
2008
+ P.forEach(ea => Q(ea));
2009
+ P = d.css("display");
2010
+ d.css("display", "block");
1995
2011
  d.outerHeight(!0);
1996
- d.css("display", Q)
2012
+ d.css("display", P)
1997
2013
  }
1998
2014
  }
1999
- const pa = () => {
2015
+ const qa = () => {
2000
2016
  if (("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) && a.selectedBg) {
2001
2017
  const N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
2002
2018
  $("#dynamic-selected-bg-style").length || $("head").append(`<style id="dynamic-selected-bg-style">.selected-bg-active { background-color: ${N} !important; }</style>`);
2003
2019
  b.find('[data-checked="true"]').each(function() {
2004
- const S = $(this);
2005
- S.addClass("selected").addClass("selected-bg-active");
2006
- S[0].style.setProperty("background-color",
2007
- N, "important");
2008
- S.css("font-weight", "normal")
2020
+ const Q =
2021
+ $(this);
2022
+ Q.addClass("selected").addClass("selected-bg-active");
2023
+ Q[0].style.setProperty("background-color", N, "important");
2024
+ Q.css("font-weight", "normal")
2009
2025
  });
2010
2026
  b.find(`.${a.optionClass}`).not('[data-checked="true"]').each(function() {
2011
- const S = $(this);
2012
- S.removeClass("selected").removeClass("selected-bg-active");
2013
- S[0].style.removeProperty("background-color");
2014
- S.css("font-weight", "normal")
2027
+ const Q = $(this);
2028
+ Q.removeClass("selected").removeClass("selected-bg-active");
2029
+ Q[0].style.removeProperty("background-color");
2030
+ Q.css("font-weight", "normal")
2015
2031
  })
2016
2032
  }
2017
2033
  },
2018
- ya = () => {
2019
- var N = B;
2020
- let S = w;
2021
- const fa = b.find('[class*="-option"].selected').first();
2022
- fa.length && !N && 0 >= S && (N = fa.attr("value") || fa.attr("data-value"), S = fa.index(), (N || 0 < S) && b.attr({
2023
- "data-selected-value": N || "",
2024
- "data-selected-index": S
2025
- }));
2034
+ xa = () => {
2035
+ var N = C;
2036
+ let Q = v;
2037
+ const ea = b.find('[class*="-option"].selected').first();
2038
+ ea.length && !N && 0 >= Q && (N = ea.attr("value") ||
2039
+ ea.attr("data-value"), Q = ea.index(), (N || 0 < Q) && b.attr({
2040
+ "data-selected-value": N || "",
2041
+ "data-selected-index": Q
2042
+ }));
2026
2043
  b.find('[class*="-option"]').each(function() {
2027
- const ca = $(this);
2028
- ca.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
2029
- a.selectedBg && ca[0].style.removeProperty("background-color");
2044
+ const X = $(this);
2045
+ X.removeClass("selected").removeClass(a.highlightedClass).removeClass("selected-bg-active").css("font-weight", "normal");
2046
+ a.selectedBg && X[0].style.removeProperty("background-color");
2030
2047
  this.classList.remove("selected");
2031
2048
  this.classList.remove(a.highlightedClass);
2032
2049
  this.classList.remove("selected-bg-active")
2033
2050
  });
2034
- if (0 < S || N) {
2035
- let ca;
2036
- N ? ca = d.find(`[value="${N}"], [data-value="${N}"]`) : 0 < S && (ca = d.find(`.${a.optionClass}`).eq(S));
2037
- if (ca && ca.length) {
2038
- N = (ca.attr("class")?.split(" ") || []).filter(ia => ia !== a.optionClass && "selected" !== ia && ia !== a.highlightedClass);
2039
- const ta = new Set,
2051
+ if (0 < Q || N) {
2052
+ let X;
2053
+ N ? X = d.find(`[value="${N}"], [data-value="${N}"]`) :
2054
+ 0 < Q && (X = d.find(`.${a.optionClass}`).eq(Q));
2055
+ if (X && X.length) {
2056
+ N = (X.attr("class")?.split(" ") || []).filter(ia => ia !== a.optionClass && "selected" !== ia && ia !== a.highlightedClass);
2057
+ const oa = new Set,
2040
2058
  Aa = ia => {
2041
- if (ia && !ta.has(ia)) {
2042
- ta.add(ia);
2059
+ if (ia && !oa.has(ia)) {
2060
+ oa.add(ia);
2043
2061
  var va = d.find(`[data-group="${ia}"]`);
2044
- va.length && (va.addClass("expanded"), va.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ia}`).show(), (va.attr("class")?.split(" ") || []).forEach(ma => {
2045
- "group-option" !== ma && "expanded" !== ma && Aa(ma)
2062
+ va.length && (va.addClass("expanded"), va.find(".custom-group-arrow").css("transform", "translateY(-50%) rotate(180deg)"), d.find(`.${ia}`).show(), (va.attr("class")?.split(" ") || []).forEach(la => {
2063
+ "group-option" !== la && "expanded" !== la && Aa(la)
2046
2064
  }))
2047
2065
  }
2048
2066
  };
2049
2067
  N.forEach(ia => Aa(ia));
2050
- ca.addClass("selected").addClass(a.highlightedClass);
2051
- ca[0].classList.add("selected");
2052
- ca[0].classList.add(a.highlightedClass);
2053
- a.selectedBg ? (N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, ca.attr("style", (ca.attr("style") || "") + `; background-color: ${N} !important;`)) : ca.css("font-weight", "bold");
2068
+ X.addClass("selected").addClass(a.highlightedClass);
2069
+ X[0].classList.add("selected");
2070
+ X[0].classList.add(a.highlightedClass);
2071
+ a.selectedBg ? (N = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, X.attr("style", (X.attr("style") || "") + `; background-color: ${N} !important;`)) : X.css("font-weight", "bold");
2054
2072
  if (a.selectedBg) {
2055
2073
  const ia = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg;
2056
2074
  setTimeout(() => {
2057
- ca.attr("style", (ca.attr("style") || "") + `; background-color: ${ia} !important;`)
2058
- }, 50);
2059
- setTimeout(() => {
2060
- ca.attr("style", (ca.attr("style") || "") + `; background-color: ${ia} !important;`)
2075
+ X.attr("style", (X.attr("style") || "") + `; background-color: ${ia} !important;`)
2061
2076
  },
2062
- 200)
2077
+ 50);
2078
+ setTimeout(() => {
2079
+ X.attr("style", (X.attr("style") || "") + `; background-color: ${ia} !important;`)
2080
+ }, 200)
2063
2081
  }
2064
2082
  void 0 !== a.autoScrollToSelected && a.autoScrollToSelected && (N = parseInt(b.attr("data-duration")) || 300, setTimeout(() => {
2065
- d.find("div").first().length && ca.length && ca[0] && "function" === typeof ca[0].scrollIntoView && ca[0].scrollIntoView({
2083
+ d.find("div").first().length && X.length && X[0] && "function" === typeof X[0].scrollIntoView && X[0].scrollIntoView({
2066
2084
  block: "center",
2067
2085
  behavior: "smooth"
2068
2086
  })
2069
2087
  }, N))
2070
- } else pa()
2088
+ } else qa()
2071
2089
  }
2072
- pa()
2090
+ qa()
2073
2091
  };
2074
2092
  window.requestAnimationFrame ? requestAnimationFrame(() => {
2075
- requestAnimationFrame(ya)
2076
- }) : setTimeout(ya, 0);
2077
- "radio" === a.pointer && (Q = b.find(".trigger-radio"), Q.length && (Object.assign(Q[0].style, {
2078
- border: `2px solid ${a.buttonColor}`,
2079
- backgroundColor: "#fff",
2080
- width: a.radioSize,
2081
- height: a.radioSize
2082
- }), Q[0].innerHTML = ""));
2093
+ requestAnimationFrame(xa)
2094
+ }) : setTimeout(xa, 0);
2095
+ "radio" === a.pointer &&
2096
+ (P = b.find(".trigger-radio"), P.length && (Object.assign(P[0].style, {
2097
+ border: `2px solid ${a.buttonColor}`,
2098
+ backgroundColor: "#fff",
2099
+ width: a.radioSize,
2100
+ height: a.radioSize
2101
+ }), P[0].innerHTML = ""));
2083
2102
  $('[class*="-wrapper"]').not(b).each(function() {
2084
2103
  const N = $(this),
2085
- S = N.data("settings");
2086
- if (S) {
2087
- if (S.pointer && S.pointer.startsWith("question_") && "true" === N.attr("data-aun")) {
2088
- var fa = S.pointer.split("_")[1];
2089
- if ("function" === typeof window[fa + "_close"]) return window[fa + "_close"](), domqueryFocus(), !1
2104
+ Q = N.data("settings");
2105
+ if (Q) {
2106
+ if (Q.pointer && Q.pointer.startsWith("question_") && "true" === N.attr("data-aun")) {
2107
+ var ea = Q.pointer.split("_")[1];
2108
+ if ("function" === typeof window[ea + "_close"]) return window[ea + "_close"](), domqueryFocus(), !1
2090
2109
  }
2091
- fa = N.find(`.${S.optionsClass}`);
2092
- if (fa.is(":visible")) {
2093
- const ca = parseInt(N.attr("data-duration"));
2094
- N.removeClass(S.openClass).attr("data-state",
2095
- "closed");
2096
- ca ? S.slideToggle ? fa.css("opacity", S.opacity || 0).slideUp(ca, {
2110
+ ea = N.find(`.${Q.optionsClass}`);
2111
+ if (ea.is(":visible")) {
2112
+ const X = parseInt(N.attr("data-duration"));
2113
+ N.removeClass(Q.openClass).attr("data-state", "closed");
2114
+ X ? Q.slideToggle ? ea.css("opacity", Q.opacity || 0).slideUp(X, {
2097
2115
  easing: a.easing
2098
- }) : fa.slideUp(ca, {
2116
+ }) : ea.slideUp(X, {
2099
2117
  easing: a.easing
2100
- }) : (S.slideToggle && fa.css("opacity", S.opacity || 0), fa.hide())
2118
+ }) : (Q.slideToggle && ea.css("opacity", Q.opacity || 0), ea.hide())
2101
2119
  }
2102
2120
  }
2103
2121
  });
2104
2122
  b.addClass(a.openClass);
2105
2123
  b.attr("data-state", "opened");
2106
- Z(b.find('[class*="-option"]'));
2107
- Q = !0 === a.slideToggle;
2108
- if (!Q && (u = W(b, d), d.css(u), !r)) {
2124
+ ma(b.find('[class*="-option"]'));
2125
+ P = !0 === a.slideToggle;
2126
+ if (!P && (t = Z(b, d), d.css(t), a._hasBeenShown = !0, !r)) {
2109
2127
  let N = null;
2110
- $(window).off("scroll.select").on("scroll.select", function() {
2111
- d.is(":visible") ? (N && cancelAnimationFrame(N), N = requestAnimationFrame(function() {
2112
- const S = W(b, d);
2113
- d.css({
2114
- top: S.top,
2115
- bottom: S.bottom,
2116
- left: S.left
2117
- })
2118
- })) : (N && (cancelAnimationFrame(N), N = null), $(window).off("scroll.select"))
2119
- })
2128
+ const Q = "scroll.select-" + (b.find("select").first()[0]._selectId ||
2129
+ "default"),
2130
+ ea = x(function() {
2131
+ d.is(":visible") ? (N && cancelAnimationFrame(N), N = requestAnimationFrame(function() {
2132
+ const X = Z(b, d),
2133
+ oa = {};
2134
+ void 0 !== X.top && (oa.top = X.top);
2135
+ void 0 !== X.bottom && (oa.bottom = X.bottom);
2136
+ void 0 !== X.left && (oa.left = X.left);
2137
+ 0 < Object.keys(oa).length && d.css(oa)
2138
+ })) : (N && (cancelAnimationFrame(N), N = null), ea.cancel && ea.cancel(), $(window).off(Q))
2139
+ }, 16);
2140
+ $(window).off(Q).on(Q, ea)
2120
2141
  }
2121
- Q ? (r = a.optionStyle.backgroundColor || a.optionsStyle.background, d.css({
2142
+ P ? (r = a.optionStyle.backgroundColor || a.optionsStyle.background, d.css({
2122
2143
  opacity: a.opacity || 0,
2123
2144
  "background-color": r
2124
- }), d.find("div").first().css("background-color", r), d.find(`.${a.optionClass}`).css("background-color", r), d.slideDown(k, {
2145
+ }), d.find("div").first().css("background-color",
2146
+ r), d.find(`.${a.optionClass}`).css("background-color", r), d.css("will-change", "height, opacity"), d.slideDown(k, {
2125
2147
  easing: a.easing,
2126
- complete: F
2148
+ complete: function() {
2149
+ d.css("will-change", "");
2150
+ F()
2151
+ }
2127
2152
  })) : (() => new Promise(N => {
2128
- const S = b.parent();
2129
- S.find(".select-overlay").length ? N(S.find(".select-overlay")) : (S.append('<div class="select-overlay"></div>'),
2130
- setTimeout(() => {
2131
- const fa = S.find(".select-overlay");
2132
- N(fa)
2133
- }, 0))
2153
+ const Q = b.parent();
2154
+ Q.find(".select-overlay").length ? N(Q.find(".select-overlay")) : (Q.append('<div class="select-overlay"></div>'), setTimeout(() => {
2155
+ const ea = Q.find(".select-overlay");
2156
+ N(ea)
2157
+ }, 0))
2134
2158
  }))().then(N => {
2135
2159
  window._selectCloseTimer && clearTimeout(window._selectCloseTimer);
2136
2160
  g = !0;
2137
2161
  N.off("click.selectOverlay");
2138
2162
  if (!b.data("groupClicked")) {
2139
- var S = b.find("select, ul").first()[0]._selectId;
2140
- S && p() && !a.slideToggle && domquery(this).historyOn("select-" + S, ia => {
2163
+ var Q = b.find("select, ul").first()[0]._selectId;
2164
+ Q && m() && !a.slideToggle && domquery(this).historyOn("select-" + Q, ia => {
2141
2165
  wa = 2;
2142
2166
  if (0 === ia) {
2143
2167
  wa = 1;
@@ -2145,38 +2169,37 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2145
2169
  isMobile: !1
2146
2170
  };
2147
2171
  ia = $('[class*="-wrapper"][class*="open"]').filter(function() {
2148
- const ma = $(this).data("settings");
2149
- return ma && !ma.slideToggle && !0 === va.isMobile
2172
+ const la = $(this).data("settings");
2173
+ return la && !la.slideToggle && !0 === va.isMobile
2150
2174
  });
2151
2175
  ia.length && ia.each(function() {
2152
- const ma = $(this),
2153
- qa = ma.data("settings"),
2154
- Da = ma.find(`.${qa.optionsClass}`),
2155
- Ea = parseInt(ma.attr("data-duration")),
2156
- Ba = $(".select-overlay");
2157
- P(ma);
2158
- if ("radio" === qa.pointer) {
2159
- const Fa = ma.attr("data-selected-value"),
2160
- Ga = parseInt(ma.attr("data-selected-index")),
2161
- Ca = ma.find(".trigger-radio");
2162
- void 0 !== Fa && 0 <= Ga && (Object.assign(Ca[0].style, {
2163
- border: `2px solid ${qa.radioColor}`,
2164
- backgroundColor: "#fff",
2165
- width: qa.radioSize,
2166
- height: qa.radioSize
2167
- }),
2168
- Ca.html(O(qa.radioColor, qa)))
2176
+ const la = $(this),
2177
+ ra = la.data("settings"),
2178
+ Ea = la.find(`.${ra.optionsClass}`),
2179
+ Fa = parseInt(la.attr("data-duration")),
2180
+ Ca = $(".select-overlay");
2181
+ y(la);
2182
+ if ("radio" === ra.pointer) {
2183
+ const Ga = la.attr("data-selected-value"),
2184
+ Ha = parseInt(la.attr("data-selected-index")),
2185
+ Da = la.find(".trigger-radio");
2186
+ void 0 !== Ga && 0 <= Ha && (Object.assign(Da[0].style, {
2187
+ border: `2px solid ${ra.radioColor}`,
2188
+ backgroundColor: "#fff",
2189
+ width: ra.radioSize,
2190
+ height: ra.radioSize
2191
+ }), Da.html(O(ra.radioColor, ra)))
2169
2192
  }
2170
- Ba.css({
2193
+ Ca.css({
2171
2194
  "background-color": "rgba(0, 0, 0, 0)"
2172
2195
  });
2173
- Da.slideUp(Ea, {
2174
- easing: qa.easing,
2196
+ Ea.slideUp(Fa, {
2197
+ easing: ra.easing,
2175
2198
  complete: function() {
2176
- Ba.hide();
2199
+ Ca.hide();
2177
2200
  domqueryFocus();
2178
- ma.removeClass(qa.openClass);
2179
- ma.attr("data-state", "closed")
2201
+ la.removeClass(ra.openClass);
2202
+ la.attr("data-state", "closed")
2180
2203
  }
2181
2204
  })
2182
2205
  })
@@ -2187,8 +2210,8 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2187
2210
  visibility: "visible",
2188
2211
  opacity: 0
2189
2212
  });
2190
- var fa = W(b, d);
2191
- S = a.optionsStyle.background || "#fff";
2213
+ var ea = Z(b, d);
2214
+ Q = a.optionsStyle.background || "#fff";
2192
2215
  N.css({
2193
2216
  position: "fixed",
2194
2217
  top: 0,
@@ -2207,28 +2230,28 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2207
2230
  WebkitUserSelect: "none",
2208
2231
  userSelect: "none"
2209
2232
  });
2210
- const ca = g && !a.slideToggle ? 1E4 : 1E3;
2211
- fa = {
2212
- ...fa
2233
+ const X = g && !a.slideToggle ? 1E4 : 1E3;
2234
+ ea = {
2235
+ ...ea
2213
2236
  };
2214
- fa.hasOwnProperty("left") || (fa.left = "");
2237
+ ea.hasOwnProperty("left") || (ea.left =
2238
+ "");
2215
2239
  d.css({
2216
- ...fa,
2240
+ ...ea,
2217
2241
  opacity: 1,
2218
2242
  display: "none",
2219
- backgroundColor: S,
2243
+ backgroundColor: Q,
2220
2244
  height: a.height || "auto",
2221
2245
  Mheight: a.Mheight || "60vh",
2222
2246
  minHeight: a.minHeight || "auto",
2223
2247
  maxHeight: a.maxHeight || (g ? a.Mheight || "60vh" : a.height || "300px"),
2224
2248
  overflowY: "auto",
2225
- zIndex: ca
2249
+ zIndex: X
2226
2250
  });
2227
- "" === fa.left && d.css("left", "");
2228
- d.find("div").first().css("background-color", S);
2229
- d.find(`.${a.optionClass}`).css("background-color",
2230
- S);
2231
- let ta = !1,
2251
+ "" === ea.left && d.css("left", "");
2252
+ d.find("div").first().css("background-color", Q);
2253
+ d.find(`.${a.optionClass}`).css("background-color", Q);
2254
+ let oa = !1,
2232
2255
  Aa = !0;
2233
2256
  domquery(d).slideDown(k, {
2234
2257
  easing: a.easing,
@@ -2238,28 +2261,29 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2238
2261
  }
2239
2262
  });
2240
2263
  setTimeout(() => {
2241
- N.css("background-color", "rgba(0, 0, 0, 0)")
2242
- }, 0);
2264
+ N.css("background-color", "rgba(0, 0, 0, 0)")
2265
+ },
2266
+ 0);
2243
2267
  N.on("click.selectOverlay", function(ia) {
2244
- if (ta || Aa) return !1;
2268
+ if (oa || Aa) return !1;
2245
2269
  wa = 2;
2246
2270
  const va = b.find(`.${a.triggerClass}`);
2247
2271
  va.css("pointer-events", "none");
2248
- ta = !0;
2272
+ oa = !0;
2249
2273
  ia.preventDefault();
2250
2274
  ia.stopPropagation();
2251
2275
  N.off("click.selectOverlay");
2252
2276
  if ("radio" === a.pointer) {
2253
2277
  ia = b.attr("data-selected-value");
2254
- const ma = parseInt(b.attr("data-selected-index")),
2255
- qa = b.find(".trigger-radio");
2256
- void 0 ===
2257
- ia && -1 === ma ? qa.css({
2278
+ const la = parseInt(b.attr("data-selected-index")),
2279
+ ra = b.find(".trigger-radio");
2280
+ void 0 === ia && -1 === la ? ra.css({
2258
2281
  border: `2px solid ${a.buttonColor}`,
2259
2282
  backgroundColor: "#fff",
2260
2283
  width: a.radioSize,
2261
2284
  height: a.radioSize
2262
- }).html("") : void 0 !== ia && 0 <= ma && qa.css({
2285
+ }).html("") : void 0 !== ia && 0 <= la &&
2286
+ ra.css({
2263
2287
  border: `2px solid ${a.radioColor}`,
2264
2288
  backgroundColor: "#fff",
2265
2289
  width: a.radioSize,
@@ -2278,7 +2302,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2278
2302
  b.removeClass(a.openClass);
2279
2303
  b.attr("data-state", "closed");
2280
2304
  b.data("groupClicked", !1);
2281
- e = ta = g = !1;
2305
+ e = oa = g = !1;
2282
2306
  setTimeout(() => {
2283
2307
  va.css("pointer-events", "auto")
2284
2308
  }, 0)
@@ -2289,7 +2313,7 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2289
2313
  }, k)
2290
2314
  });
2291
2315
  setTimeout(function() {
2292
- v.css({
2316
+ u.css({
2293
2317
  "pointer-events": "",
2294
2318
  opacity: ""
2295
2319
  })
@@ -2304,128 +2328,137 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2304
2328
  var d = b.find(`.${a.optionsClass}`),
2305
2329
  k = parseInt(b.attr("data-duration"));
2306
2330
  h = d.is(":visible");
2307
- var v = $('[class*="-option"]'),
2308
- m = $('[class*="-wrapper"]').not(b).filter(function() {
2331
+ var u = $('[class*="-option"]'),
2332
+ n = $('[class*="-wrapper"]').not(b).filter(function() {
2309
2333
  return $(this).find('[class*="-options"]').is(":visible")
2310
2334
  });
2311
2335
  if (h && !a.offclick) {
2312
- h = parseInt(b.attr("data-duration"));
2336
+ h =
2337
+ parseInt(b.attr("data-duration"));
2313
2338
  if ("radio" === a.pointer) {
2314
- m = b.attr("data-selected-value");
2339
+ n = b.attr("data-selected-value");
2315
2340
  var L = parseInt(b.attr("data-selected-index")),
2316
2341
  J = b.find(".trigger-radio");
2317
- void 0 !== m && 0 <= L && (Object.assign(J[0].style, {
2342
+ void 0 !== n && 0 <= L && (Object.assign(J[0].style, {
2318
2343
  border: `2px solid ${a.radioColor}`,
2319
2344
  backgroundColor: "#fff",
2320
2345
  width: a.radioSize,
2321
2346
  height: a.radioSize
2322
2347
  }), J.html(O(a.radioColor, a)))
2323
2348
  }
2324
- p() && !a.slideToggle ? z(d, h, $(".select-overlay"),
2325
- b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), h ? a.slideToggle ? d.css("opacity", a.opacity || 0).slideUp(h, {
2349
+ m() && !a.slideToggle ? U(d, h, $(".select-overlay"), b, a) : (b.removeClass(a.openClass), b.attr("data-state", "closed"), h ? a.slideToggle ? d.css({
2350
+ opacity: a.opacity || 0,
2351
+ "will-change": "height, opacity"
2352
+ }).slideUp(h, {
2326
2353
  easing: a.easing,
2327
- complete: domqueryFocus
2328
- }) : d.slideUp(h, {
2354
+ complete: function() {
2355
+ d.css("will-change", "");
2356
+ domqueryFocus()
2357
+ }
2358
+ }) : d.css("will-change", "height, opacity").slideUp(h, {
2329
2359
  easing: a.easing,
2330
- complete: domqueryFocus
2360
+ complete: function() {
2361
+ d.css("will-change", "");
2362
+ domqueryFocus()
2363
+ }
2331
2364
  }) : (d.hide(), domqueryFocus()));
2332
2365
  return !1
2333
2366
  }
2334
- if (0 < m.length) return m.each(function() {
2367
+ if (0 < n.length) return n.each(function() {
2335
2368
  const r = $(this),
2336
2369
  F = r.data("settings");
2337
2370
  if (F) {
2338
- var u = r.find(`.${F.optionsClass}`),
2339
- w = parseInt(r.attr("data-duration"));
2371
+ var t = r.find(`.${F.optionsClass}`),
2372
+ v = parseInt(r.attr("data-duration"));
2340
2373
  r.removeClass(F.openClass).attr("data-state", "closed");
2341
- p() && !F.slideToggle ? z(u, w || 0, $(".select-overlay"),
2342
- r, F) : w ? F.slideToggle ? u.css("opacity", F.opacity || 0).slideUp(w, {
2374
+ m() && !F.slideToggle ? U(t, v || 0, $(".select-overlay"),
2375
+ r, F) : v ? F.slideToggle ? t.css("opacity", F.opacity || 0).slideUp(v, {
2343
2376
  easing: F.easing
2344
- }) : u.slideUp(w, {
2377
+ }) : t.slideUp(v, {
2345
2378
  easing: F.easing
2346
- }) : u.hide()
2379
+ }) : t.hide()
2347
2380
  }
2348
2381
  }), !1;
2349
2382
  if (a.pointer && a.pointer.startsWith("question_")) {
2350
- m = a.pointer.split("_")[1];
2383
+ n = a.pointer.split("_")[1];
2351
2384
  L = b[0].hasAttribute("data-aun");
2352
2385
  J = b.find("select").first();
2353
2386
  const r = parseInt(b.attr("data-current-index")),
2354
2387
  F = J.find("option").eq(r);
2355
2388
  J = {
2356
2389
  value: F.val(),
2357
- text: y(F.html(), 1),
2358
- html: y(F.html()),
2390
+ text: p(F.html(), 1),
2391
+ html: p(F.html()),
2359
2392
  tag: F.attr("tag"),
2360
- group: q(n(J[0], r).text),
2393
+ group: A(R(J[0], r).text),
2361
2394
  index: r
2362
2395
  };
2363
- if (L && (f.preventDefault(), f.stopPropagation(), "function" === typeof window[m +
2364
- "_cancel"])) return window[m + "_reset"] = function() {
2365
- const u = b.find(`.${a.triggerClass}`);
2366
- var w = b.find("select, ul").first();
2367
- w.find("option, li").first().prop("selected", !0);
2368
- w = w.find("option, li").first().text();
2369
- u.text(w);
2370
- w = document.createElement("div");
2371
- w.className = "custom-question trigger-question";
2372
- Object.assign(w.style, {
2396
+ if (L && (f.preventDefault(), f.stopPropagation(), "function" === typeof window[n +
2397
+ "_cancel"])) return window[n + "_reset"] = function() {
2398
+ const t = b.find(`.${a.triggerClass}`);
2399
+ var v = b.find("select, ul").first();
2400
+ v.find("option, li").first().prop("selected", !0);
2401
+ v = v.find("option, li").first().text();
2402
+ t.text(v);
2403
+ v = document.createElement("div");
2404
+ v.className = "custom-question trigger-question";
2405
+ Object.assign(v.style, {
2373
2406
  ...a.questionStyle,
2374
2407
  width: a.questionSize,
2375
2408
  height: a.questionSize,
2376
2409
  fontSize: `calc(${a.questionSize} * 0.6)`
2377
2410
  });
2378
- w.innerHTML = "?";
2379
- u.append(w);
2411
+ v.innerHTML = "?";
2412
+ t.append(v);
2380
2413
  b.removeClass(a.openClass);
2381
2414
  b[0].removeAttribute("data-aun")
2382
2415
  },
2383
- window[m + "_cancel"](J), !1;
2416
+ window[n + "_cancel"](J), !1;
2384
2417
  b.find(`.${a.optionClass}`).each(function() {
2385
- const u = $(this);
2386
- u.find(".custom-question, .custom-group-arrow").remove();
2387
- if (u.hasClass("group-option")) {
2388
- var w = document.createElement("div");
2389
- w.className = "custom-group-arrow";
2390
- const X = ea(a);
2391
- let K = X.arrowSizeValue;
2392
- var B = X.arrowRightValue;
2393
- Object.assign(w.style, {
2418
+ const t = $(this);
2419
+ t.find(".custom-question, .custom-group-arrow").remove();
2420
+ if (t.hasClass("group-option")) {
2421
+ var v = document.createElement("div");
2422
+ v.className = "custom-group-arrow";
2423
+ const ba = aa(a);
2424
+ let K = ba.arrowSizeValue;
2425
+ var C = ba.arrowRightValue;
2426
+ Object.assign(v.style, {
2394
2427
  position: "absolute",
2395
- right: B,
2428
+ right: C,
2396
2429
  top: "50%",
2397
2430
  transform: "translateY(-50%) rotate(0deg)",
2398
2431
  width: "0",
2399
2432
  height: "0",
2400
2433
  borderLeft: `${K} solid transparent`,
2401
2434
  borderRight: `${K} solid transparent`,
2402
- borderTop: `${K} solid ${X.arrowColorValue}`,
2435
+ borderTop: `${K} solid ${ba.arrowColorValue}`,
2403
2436
  transition: "all 0.3s ease"
2404
2437
  });
2405
- u.append(w);
2406
- w = parseFloat(K);
2407
- B = parseFloat(B);
2408
- isNaN(w) || isNaN(B) || u[0].style.setProperty("padding-right", `${2*w+B+10}px`, "important")
2409
- } else B = document.createElement("div"), B.className = "custom-question option-question", Object.assign(B.style, a.questionStyle), B.innerHTML = `<span style="font-size: calc(${a.questionSize} * 0.6);">?</span>`, u.append(B)
2438
+ t.append(v);
2439
+ v = parseFloat(K);
2440
+ C = parseFloat(C);
2441
+ isNaN(v) || isNaN(C) || t[0].style.setProperty("padding-right", `${2*v+C+10}px`, "important")
2442
+ } else C = document.createElement("div"), C.className = "custom-question option-question", Object.assign(C.style, a.questionStyle), C.innerHTML = `<span style="font-size: calc(${a.questionSize} * 0.6);">?</span>`, t.append(C)
2410
2443
  })
2411
2444
  }
2412
- m = $('[class*="-wrapper"][class*="open"]').filter(function() {
2445
+ n = $('[class*="-wrapper"][class*="open"]').filter(function() {
2413
2446
  const r = $(this).data("settings");
2414
2447
  return r && r.pointer && r.pointer.startsWith("question_") && "true" === $(this).attr("data-aun")
2415
2448
  });
2416
- if (m.length) h = m.data("settings").pointer.split("_")[1], "function" === typeof window[h + "_close"] && (window[h + "_close"](), domqueryFocus());
2449
+ if (n.length) h = n.data("settings").pointer.split("_")[1], "function" === typeof window[h + "_close"] && (window[h + "_close"](), domqueryFocus());
2417
2450
  else {
2418
- if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) m = b.find(`.${a.triggerClass}`), b.find(`.${a.optionClass}`).each(function() {
2451
+ if ("checkbox" === a.pointer || a.pointer?.startsWith("checkbox_")) n = b.find(`.${a.triggerClass}`), b.find(`.${a.optionClass}`).each(function() {
2419
2452
  const r = $(this);
2420
2453
  if (r.hasClass("group-option") || r.attr("data-group") || r.data("group")) r.find(".custom-checkbox").remove();
2421
2454
  else {
2422
2455
  var F = "true" ===
2423
2456
  r.attr("data-checked");
2424
2457
  r.find(".custom-checkbox").remove();
2425
- const u = document.createElement("div");
2426
- u.className = "custom-checkbox option-checkbox";
2427
- Object.assign(u.style, {
2428
- ...da(),
2458
+ const t = document.createElement("div");
2459
+ t.className = "custom-checkbox option-checkbox";
2460
+ Object.assign(t.style, {
2461
+ ...W(),
2429
2462
  border: F ? `2px solid ${a.checkboxColor}` : `2px solid ${a.buttonColor}`,
2430
2463
  borderRadius: "3px",
2431
2464
  backgroundColor: F ? a.checkboxColor : "#fff",
@@ -2434,12 +2467,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2434
2467
  width: a.checkboxSize,
2435
2468
  height: a.checkboxSize
2436
2469
  });
2437
- F ? (u.innerHTML = V(a.checkboxSize), a.selectedBg && (F = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, r.addClass("selected").addClass("selected-bg-active"),
2470
+ F ? (t.innerHTML = E(a.checkboxSize), a.selectedBg && (F = !0 === a.selectedBg ? rgbToRgba(a.activeBackground, .5) : a.selectedBg, r.addClass("selected").addClass("selected-bg-active"),
2438
2471
  r[0].style.setProperty("background-color", F, "important"), r.css("font-weight", "normal"))) : a.selectedBg && (r.removeClass("selected").removeClass("selected-bg-active"), r[0].style.removeProperty("background-color"), r.css("font-weight", "normal"));
2439
- r.append(u)
2472
+ r.append(t)
2440
2473
  }
2441
- }), m.find(".custom-checkbox").length || (L = document.createElement("div"), L.className = "custom-checkbox trigger-checkbox", J = parseInt(b.attr("data-check-count")) || 0, Object.assign(L.style, {
2442
- ...da(),
2474
+ }), n.find(".custom-checkbox").length || (L = document.createElement("div"), L.className = "custom-checkbox trigger-checkbox", J = parseInt(b.attr("data-check-count")) || 0, Object.assign(L.style, {
2475
+ ...W(),
2443
2476
  position: "absolute",
2444
2477
  right: "10px",
2445
2478
  top: "50%",
@@ -2451,24 +2484,24 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2451
2484
  display: "block",
2452
2485
  width: a.checkboxSize,
2453
2486
  height: a.checkboxSize
2454
- }), 0 < J && (L.innerHTML = H(J, a.checkboxSize)), m.append(L));
2487
+ }), 0 < J && (L.innerHTML = ja(J, a.checkboxSize)), n.append(L));
2455
2488
  if (!a.offclick || !b.hasClass(a.openClass)) {
2456
- var E = !1;
2457
- if (h) b.removeClass(a.openClass), b.attr("data-state", "closed"), Z(v), v.removeClass(a.highlightedClass), v.each(function() {
2489
+ var D = !1;
2490
+ if (h) b.removeClass(a.openClass), b.attr("data-state", "closed"), ma(u), u.removeClass(a.highlightedClass), u.each(function() {
2458
2491
  const r = $(this);
2459
2492
  r.hasClass("selected") && a.selectedBg ? (r.addClass("selected-bg-active"),
2460
2493
  r.css("opacity", "1")) : r.removeClass("selected-bg-active")
2461
- }), "radio" === a.pointer && (h = b.attr("data-selected-value"), m = b.find(".trigger-radio"), m.length && (void 0 !== h ? (Object.assign(m[0].style, {
2494
+ }), "radio" === a.pointer && (h = b.attr("data-selected-value"), n = b.find(".trigger-radio"), n.length && (void 0 !== h ? (Object.assign(n[0].style, {
2462
2495
  border: `2px solid ${a.radioColor}`,
2463
2496
  backgroundColor: "#fff",
2464
2497
  width: a.radioSize,
2465
2498
  height: a.radioSize
2466
- }), m[0].innerHTML = void 0 !== h ? O(a.radioColor, a) : "") : (Object.assign(m[0].style, {
2499
+ }), n[0].innerHTML = void 0 !== h ? O(a.radioColor, a) : "") : (Object.assign(n[0].style, {
2467
2500
  border: `2px solid ${a.buttonColor}`,
2468
2501
  backgroundColor: "#fff",
2469
2502
  width: a.radioSize,
2470
2503
  height: a.radioSize
2471
- }), m[0].innerHTML = ""))), D(d, k, a);
2504
+ }), n[0].innerHTML = ""))), M(d, k, a);
2472
2505
  else {
2473
2506
  if (a.delay &&
2474
2507
  0 < parseInt(a.delay)) {
@@ -2502,25 +2535,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2502
2535
  if (h && !0 !== h.offclick && (!h.pointer || !h.pointer.startsWith("question_") || "true" !== a.attr("data-aun"))) {
2503
2536
  var d = a.find(`.${h.optionsClass}`),
2504
2537
  k = parseInt(a.attr("data-duration")),
2505
- v = function() {
2538
+ u = function() {
2506
2539
  a.find('[class*="-option"]').removeClass("selected");
2507
- [50, 100, 200].forEach(m => {
2540
+ [50, 100, 200].forEach(n => {
2508
2541
  setTimeout(() => {
2509
2542
  const L = a.find('[class*="-option"].selected');
2510
2543
  0 < L.length && L.removeClass("selected")
2511
- }, m)
2544
+ }, n)
2512
2545
  })
2513
2546
  };
2514
- if (p() && !h.slideToggle) z(d,
2515
- k, $(".select-overlay"), a, h), v();
2547
+ if (m() && !h.slideToggle) U(d,
2548
+ k, $(".select-overlay"), a, h), u();
2516
2549
  else {
2517
2550
  a.removeClass(h.openClass);
2518
2551
  a.attr("data-state", "closed");
2519
2552
  if ("radio" === h.pointer) {
2520
- const m = a.attr("data-selected-value"),
2553
+ const n = a.attr("data-selected-value"),
2521
2554
  L = parseInt(a.attr("data-selected-index")),
2522
2555
  J = a.find(".trigger-radio");
2523
- void 0 !== m && 0 <= L && (Object.assign(J[0].style, {
2556
+ void 0 !== n && 0 <= L && (Object.assign(J[0].style, {
2524
2557
  border: `2px solid ${h.radioColor}`,
2525
2558
  backgroundColor: "#fff",
2526
2559
  width: h.radioSize,
@@ -2530,12 +2563,12 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2530
2563
  k ? (h.slideToggle && d.css("opacity", h.opacity || 0), d.slideUp(k, {
2531
2564
  easing: h.easing,
2532
2565
  complete: function() {
2533
- P(a);
2534
- v();
2566
+ y(a);
2567
+ u();
2535
2568
  domqueryFocus()
2536
2569
  }
2537
2570
  })) :
2538
- (v(), d.hide(), P(a), domqueryFocus())
2571
+ (u(), d.hide(), y(a), domqueryFocus())
2539
2572
  }
2540
2573
  }
2541
2574
  }))
@@ -2551,34 +2584,40 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2551
2584
  if (a && !0 !== a.offclick && (!a.pointer || !a.pointer.startsWith("question_") || "true" !== b.attr("data-aun"))) {
2552
2585
  var h = b.find(`.${a.optionsClass}`),
2553
2586
  d = parseInt(b.attr("data-duration"));
2554
- if (p() && !a.slideToggle) z(h, d, $(".select-overlay"), b, a);
2587
+ if (m() && !a.slideToggle) U(h, d, $(".select-overlay"), b, a);
2555
2588
  else {
2556
2589
  b.removeClass(a.openClass);
2557
2590
  b.attr("data-state", "closed");
2558
2591
  if ("radio" === a.pointer) {
2559
2592
  const k = b.attr("data-selected-value"),
2560
- v = parseInt(b.attr("data-selected-index")),
2561
- m = b.find(".trigger-radio");
2562
- void 0 !== k && 0 <= v && (Object.assign(m[0].style, {
2593
+ u = parseInt(b.attr("data-selected-index")),
2594
+ n = b.find(".trigger-radio");
2595
+ void 0 !== k && 0 <= u && (Object.assign(n[0].style, {
2563
2596
  border: `2px solid ${a.radioColor}`,
2564
2597
  backgroundColor: "#fff",
2565
2598
  width: a.radioSize,
2566
2599
  height: a.radioSize
2567
- }), m.html(O(a.radioColor, a)))
2600
+ }), n.html(O(a.radioColor, a)))
2568
2601
  }
2569
- d ? a.slideToggle ? h.css("opacity", a.opacity || 0).slideUp(d, {
2602
+ d ? a.slideToggle ? h.css({
2603
+ opacity: a.opacity || 0,
2604
+ "will-change": "height, opacity"
2605
+ }).slideUp(d, {
2570
2606
  easing: a.easing,
2571
2607
  complete: function() {
2572
- P(b);
2608
+ h.css("will-change",
2609
+ "");
2610
+ y(b);
2573
2611
  domqueryFocus()
2574
2612
  }
2575
- }) : h.slideUp(d, {
2613
+ }) : h.css("will-change", "height, opacity").slideUp(d, {
2576
2614
  easing: a.easing,
2577
2615
  complete: function() {
2578
- P(b);
2616
+ h.css("will-change", "");
2617
+ y(b);
2579
2618
  domqueryFocus()
2580
2619
  }
2581
- }) : (h.hide(), P(b), domqueryFocus())
2620
+ }) : (h.hide(), y(b), domqueryFocus())
2582
2621
  }
2583
2622
  }
2584
2623
  }
@@ -2588,24 +2627,25 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2588
2627
  const c = $(this),
2589
2628
  b = c.data("settings");
2590
2629
  b && !0 !== b.offclick && setTimeout(() => {
2591
- if ($('[class*="-wrapper"][class*="open"]').length && !(0 < $(document.activeElement).closest('[class*="-wrapper"]').length || b.pointer && b.pointer.startsWith("question_") && "true" === c.attr("data-aun"))) {
2630
+ if ($('[class*="-wrapper"][class*="open"]').length && !(0 < $(document.activeElement).closest('[class*="-wrapper"]').length || b.pointer && b.pointer.startsWith("question_") && "true" ===
2631
+ c.attr("data-aun"))) {
2592
2632
  var a = c.find(`.${b.optionsClass}`),
2593
2633
  h = parseInt(c.attr("data-duration"));
2594
- if (p() && !b.slideToggle) z(a,
2595
- h, $(".select-overlay"), c, b);
2634
+ if (m() && !b.slideToggle) U(a, h, $(".select-overlay"), c, b);
2596
2635
  else {
2597
2636
  c.removeClass(b.openClass);
2598
2637
  c.attr("data-state", "closed");
2599
2638
  if ("radio" === b.pointer) {
2600
2639
  const d = c.attr("data-selected-value"),
2601
2640
  k = parseInt(c.attr("data-selected-index")),
2602
- v = c.find(".trigger-radio");
2603
- void 0 !== d && 0 <= k && (Object.assign(v[0].style, {
2641
+ u = c.find(".trigger-radio");
2642
+ void 0 !== d && 0 <= k && (Object.assign(u[0].style, {
2604
2643
  border: `2px solid ${b.radioColor}`,
2605
2644
  backgroundColor: "#fff",
2606
2645
  width: b.radioSize,
2607
2646
  height: b.radioSize
2608
- }), v.html(O(b.radioColor, b)))
2647
+ }), u.html(O(b.radioColor,
2648
+ b)))
2609
2649
  }
2610
2650
  h ? (b.slideToggle && a.css("opacity", b.opacity || 0), a.slideUp(h, {
2611
2651
  easing: b.easing
@@ -2614,579 +2654,578 @@ parseInt(C),10)}px; font-weight: bold; line-height: 1; text-align: center; -webk
2614
2654
  }
2615
2655
  }, 0)
2616
2656
  });
2617
- $(window).on("resize",
2618
- function() {
2619
- $('[class*="-wrapper"][class*="open"]').each(function() {
2620
- var f = $(this),
2621
- c = f.data("settings");
2622
- c && !0 !== c.slideToggle && (c = f.find(`.${c.optionsClass}`), f = W(f, c), c.css(f))
2623
- })
2657
+ $(window).on("resize", function() {
2658
+ $('[class*="-wrapper"][class*="open"]').each(function() {
2659
+ var f = $(this),
2660
+ c = f.data("settings");
2661
+ c && !0 !== c.slideToggle && (c = f.find(`.${c.optionsClass}`), f = Z(f, c), c.css(f))
2624
2662
  })
2663
+ })
2625
2664
  }
2626
2665
  return this
2627
2666
  };
2628
- $.fn.select = function(x, l, I) {
2629
- const p = function(q, y, n) {
2630
- if (n) {
2631
- var O = y.val();
2632
- n.pointer ? "radio" === n.pointer ? q.find(".custom-radio").each(function() {
2633
- const V = $(this).closest('[class*="-option"]').attr("data-value") === O;
2667
+ $.fn.select = function(w, l, H) {
2668
+ const x = function(m, A, p) {
2669
+ if (p) {
2670
+ var R = A.val();
2671
+ p.pointer ? "radio" === p.pointer ? m.find(".custom-radio").each(function() {
2672
+ const O = $(this).closest('[class*="-option"]').attr("data-value") === R;
2634
2673
  $(this).css({
2635
- border: V ? `2px solid ${n.radioColor}` : `2px solid ${n.buttonColor}`,
2674
+ border: O ? `2px solid ${p.radioColor}` : `2px solid ${p.buttonColor}`,
2636
2675
  backgroundColor: "#fff"
2637
- }).html(V ? upHTMe(n.radioColor, n) : "")
2638
- }) : "checkbox" === n.pointer ? q.find(".custom-checkbox").each(function() {
2639
- const V = $(this).closest('[class*="-option"]').attr("data-value") === O,
2640
- H = n.checkboxColor ||
2676
+ }).html(O ? upHTMe(p.radioColor, p) : "")
2677
+ }) : "checkbox" === p.pointer ? m.find(".custom-checkbox").each(function() {
2678
+ const O = $(this).closest('[class*="-option"]').attr("data-value") === R,
2679
+ E = p.checkboxColor ||
2641
2680
  "#2196F3",
2642
- da = n.checkboxSize || "16px";
2643
- V ? $(this).css({
2644
- border: `2px solid ${H}`,
2645
- backgroundColor: H
2646
- }).html(upHTMe2(da)) : $(this).css({
2647
- border: `2px solid ${n.buttonColor||"#ccc"}`,
2681
+ ja = p.checkboxSize || "16px";
2682
+ O ? $(this).css({
2683
+ border: `2px solid ${E}`,
2684
+ backgroundColor: E
2685
+ }).html(upHTMe2(ja)) : $(this).css({
2686
+ border: `2px solid ${p.buttonColor||"#ccc"}`,
2648
2687
  backgroundColor: "#fff"
2649
2688
  }).html("")
2650
- }) : n.pointer.startsWith("question_") && q.find(".custom-question").each(function() {
2651
- $(this).closest('[class*="-option"]').attr("data-value") === O ? $(this).addClass("active") : $(this).removeClass("active")
2652
- }) : n.dot && q.find(".custom-dot").each(function() {
2689
+ }) : p.pointer.startsWith("question_") && m.find(".custom-question").each(function() {
2690
+ $(this).closest('[class*="-option"]').attr("data-value") === R ? $(this).addClass("active") : $(this).removeClass("active")
2691
+ }) : p.dot && m.find(".custom-dot").each(function() {
2653
2692
  $(this).closest('[class*="-option"]').attr("data-value") ===
2654
- O ? $(this).css(n.dotSelectedStyle || {}) : $(this).css(n.dotStyle || {})
2693
+ R ? $(this).css(p.dotSelectedStyle || {}) : $(this).css(p.dotStyle || {})
2655
2694
  })
2656
2695
  }
2657
2696
  };
2658
- if ("string" === typeof x) {
2659
- if ("value" === x) return "" === l || null === l || void 0 === l ? this.each(function() {
2660
- const q = $(this).find('option[value=""]');
2661
- if (q.length) return $(this).select("index", q.index())
2697
+ if ("string" === typeof w) {
2698
+ if ("value" === w) return "" === l || null === l || void 0 === l ? this.each(function() {
2699
+ const m = $(this).find('option[value=""]');
2700
+ if (m.length) return $(this).select("index", m.index())
2662
2701
  }) : this.each(function() {
2663
- const q = $(this);
2702
+ const m = $(this);
2664
2703
  if (this._selectId) {
2665
- var y = q.find(`option[value="${l}"]`);
2666
- if (y.length) {
2667
- var n = $(".select-" + (this._selectId + "-wrapper"));
2668
- const V = n.data("settings");
2669
- q.find("option").prop("selected", !1);
2670
- y.prop("selected", !0);
2671
- n.attr({
2672
- "data-selected-value": y.val(),
2673
- "data-selected-index": y.index()
2704
+ var A = m.find(`option[value="${l}"]`);
2705
+ if (A.length) {
2706
+ var p = $(".select-" + (this._selectId + "-wrapper"));
2707
+ const O = p.data("settings");
2708
+ m.find("option").prop("selected", !1);
2709
+ A.prop("selected", !0);
2710
+ p.attr({
2711
+ "data-selected-value": A.val(),
2712
+ "data-selected-index": A.index()
2674
2713
  });
2675
- var O = n.find('[class*="-option"]');
2676
- O.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2677
- V.selectedBg && O.each(function() {
2678
- const Y = $(this),
2679
- R = (Y.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2680
- Y.attr("style", R)
2714
+ var R = p.find('[class*="-option"]');
2715
+ R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2716
+ O.selectedBg && R.each(function() {
2717
+ const aa = $(this),
2718
+ T = (aa.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2719
+ aa.attr("style", T)
2681
2720
  });
2682
- const H = n.find(`[data-value="${y.val()}"]`);
2683
- if (H.length) {
2721
+ const E = p.find(`[data-value="${A.val()}"]`);
2722
+ if (E.length) {
2684
2723
  setTimeout(() => {
2685
- H.addClass("selected");
2686
- V.selectedBg ? (H.addClass("selected-bg-active"), H[0].style.setProperty("background-color",
2687
- !0 === V.selectedBg ? rgbToRgba(V.activeBackground, .5) : V.selectedBg, "important"), H.css("font-weight", "normal")) : H.css("font-weight", "bold")
2724
+ E.addClass("selected");
2725
+ O.selectedBg ? (E.addClass("selected-bg-active"), E[0].style.setProperty("background-color",
2726
+ !0 === O.selectedBg ? rgbToRgba(O.activeBackground, .5) : O.selectedBg, "important"), E.css("font-weight", "normal")) : E.css("font-weight", "bold")
2688
2727
  }, 300);
2689
- const Y = n.find('[class*="-options"]');
2690
- if (Y.length) {
2691
- O = (H.attr("class")?.split(" ") || []).filter(R => R !== V.optionClass && "selected" !== R && R !== V.highlightedClass && !R.includes("wrapper") && !R.includes("options"));
2692
- if (0 < O.length) {
2693
- const R = new Set,
2694
- P = D => {
2695
- if (D && !R.has(D)) {
2696
- R.add(D);
2697
- var M = Y.find(`[data-group="${D}"]`);
2728
+ const aa = p.find('[class*="-options"]');
2729
+ if (aa.length) {
2730
+ R = (E.attr("class")?.split(" ") || []).filter(T => T !== O.optionClass && "selected" !== T && T !== O.highlightedClass && !T.includes("wrapper") && !T.includes("options"));
2731
+ if (0 < R.length) {
2732
+ const T = new Set,
2733
+ Y = y => {
2734
+ if (y && !T.has(y)) {
2735
+ T.add(y);
2736
+ var M = aa.find(`[data-group="${y}"]`);
2698
2737
  M.length && (M.addClass("expanded"), M.find(".custom-group-arrow").css("transform",
2699
- "translateY(-50%) rotate(180deg)"), Y.find(`.${D}`).show(), (M.attr("class")?.split(" ") || []).forEach(z => {
2700
- "group-option" !== z && "expanded" !== z && P(z)
2738
+ "translateY(-50%) rotate(180deg)"), aa.find(`.${y}`).show(), (M.attr("class")?.split(" ") || []).forEach(I => {
2739
+ "group-option" !== I && "expanded" !== I && Y(I)
2701
2740
  }))
2702
2741
  }
2703
2742
  };
2704
- O.forEach(D => P(D))
2743
+ R.forEach(y => Y(y))
2705
2744
  }
2706
- void 0 !== V.autoScrollToSelected && V.autoScrollToSelected && (O = parseInt(n.attr("data-duration")) || 300, setTimeout(() => {
2707
- Y.find("div").first().length && H.length && H[0] && "function" === typeof H[0].scrollIntoView && H[0].scrollIntoView({
2745
+ void 0 !== O.autoScrollToSelected && O.autoScrollToSelected && (R = parseInt(p.attr("data-duration")) || 300, setTimeout(() => {
2746
+ aa.find("div").first().length && E.length && E[0] && "function" === typeof E[0].scrollIntoView && E[0].scrollIntoView({
2708
2747
  block: "center",
2709
2748
  behavior: "smooth"
2710
2749
  })
2711
- }, O))
2750
+ }, R))
2712
2751
  }
2713
2752
  }
2714
- p(n, y, V);
2715
- n = n.find('[class*="-trigger"]');
2753
+ x(p, A, O);
2754
+ p = p.find('[class*="-trigger"]');
2716
2755
 
2717
- function da(Y, R) {
2718
- var P = R.attr("class");
2719
- if (!P) return R.text();
2720
- const D = [];
2721
- P = P.split(" ");
2722
- for (let z = 0; z < P.length; z++) {
2723
- var M = Y.find(`option[group="${P[z]}"]`);
2724
- if (M.length && (D.push(M.text()), M = M.attr("class"))) {
2756
+ function ja(aa, T) {
2757
+ var Y = T.attr("class");
2758
+ if (!Y) return T.text();
2759
+ const y = [];
2760
+ Y = Y.split(" ");
2761
+ for (let I = 0; I < Y.length; I++) {
2762
+ var M = aa.find(`option[group="${Y[I]}"]`);
2763
+ if (M.length && (y.push(M.text()), M = M.attr("class"))) {
2725
2764
  M = M.split(" ");
2726
- for (let W = 0; W < M.length; W++) {
2727
- const Z = Y.find(`option[group="${M[W]}"]`);
2728
- Z.length && D.unshift(Z.text())
2765
+ for (let U = 0; U < M.length; U++) {
2766
+ const Z = aa.find(`option[group="${M[U]}"]`);
2767
+ Z.length && y.unshift(Z.text())
2729
2768
  }
2730
2769
  }
2731
2770
  }
2732
- D.push(R.text());
2733
- return [...(new Set(D))].join(" > ")
2771
+ y.push(T.text());
2772
+ return [...(new Set(y))].join(" > ")
2734
2773
  }
2735
- let ea;
2736
- if (q.find("option[group]").length) try {
2737
- ea = "function" === typeof findGroupPath ? findGroupPath(this, y.index()).text : da(q, y)
2738
- } catch (Y) {
2774
+ let W;
2775
+ if (m.find("option[group]").length) try {
2776
+ W = "function" === typeof findGroupPath ? findGroupPath(this, A.index()).text : ja(m, A)
2777
+ } catch (aa) {
2739
2778
  console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:",
2740
- Y), ea = y.text()
2741
- } else ea = y.text();
2742
- y = n.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2743
- O = n.find('span[style*="position: absolute"]').clone();
2744
- V && V.allowHTML ? n.html(ea) : n.text(ea);
2745
- y.length && n.append(y);
2746
- O.length && n.append(O);
2747
- q.val(l)
2779
+ aa), W = A.text()
2780
+ } else W = A.text();
2781
+ A = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2782
+ R = p.find('span[style*="position: absolute"]').clone();
2783
+ O && O.allowHTML ? p.html(W) : p.text(W);
2784
+ A.length && p.append(A);
2785
+ R.length && p.append(R);
2786
+ m.val(l)
2748
2787
  }
2749
2788
  } else console.warn("Select element was not initialized with $.select() method")
2750
2789
  });
2751
- if ("index" === x && "number" === typeof l) return this.each(function() {
2752
- var q = $(this);
2790
+ if ("index" === w && "number" === typeof l) return this.each(function() {
2791
+ var m = $(this);
2753
2792
  if (this._selectId) {
2754
- var y = q.find("option").eq(l);
2755
- if (y.length) {
2756
- var n = $(".select-" + (this._selectId +
2793
+ var A = m.find("option").eq(l);
2794
+ if (A.length) {
2795
+ var p = $(".select-" + (this._selectId +
2757
2796
  "-wrapper"));
2758
- const V = n.data("settings");
2759
- q.find("option").prop("selected", !1);
2760
- y.prop("selected", !0);
2761
- n.attr({
2762
- "data-selected-value": y.val(),
2797
+ const O = p.data("settings");
2798
+ m.find("option").prop("selected", !1);
2799
+ A.prop("selected", !0);
2800
+ p.attr({
2801
+ "data-selected-value": A.val(),
2763
2802
  "data-selected-index": l
2764
2803
  });
2765
- var O = n.find('[class*="-option"]');
2766
- O.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2767
- V.selectedBg && O.each(function() {
2768
- const Y = $(this),
2769
- R = (Y.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2770
- Y.attr("style", R)
2804
+ var R = p.find('[class*="-option"]');
2805
+ R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2806
+ O.selectedBg && R.each(function() {
2807
+ const aa = $(this),
2808
+ T = (aa.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2809
+ aa.attr("style", T)
2771
2810
  });
2772
- const H = n.find(`[data-value="${y.val()}"]`);
2773
- H.length && setTimeout(() => {
2774
- H.addClass("selected");
2775
- V.selectedBg ? (H.addClass("selected-bg-active"), H[0].style.setProperty("background-color", V.selectedBg, "important"), H.css("font-weight", "normal")) : H.css("font-weight", "bold")
2811
+ const E = p.find(`[data-value="${A.val()}"]`);
2812
+ E.length && setTimeout(() => {
2813
+ E.addClass("selected");
2814
+ O.selectedBg ? (E.addClass("selected-bg-active"), E[0].style.setProperty("background-color", O.selectedBg, "important"), E.css("font-weight", "normal")) : E.css("font-weight", "bold")
2776
2815
  }, 300);
2777
- p(n, y, V);
2778
- n = n.find('[class*="-trigger"]');
2816
+ x(p, A, O);
2817
+ p = p.find('[class*="-trigger"]');
2779
2818
 
2780
- function da(Y, R) {
2781
- var P = R.attr("class");
2782
- if (!P) return R.text();
2783
- const D = [];
2784
- P = P.split(" ");
2785
- for (let z = 0; z < P.length; z++) {
2786
- var M = Y.find(`option[group="${P[z]}"]`);
2787
- if (M.length && (D.push(M.text()), M = M.attr("class"))) {
2819
+ function ja(aa, T) {
2820
+ var Y = T.attr("class");
2821
+ if (!Y) return T.text();
2822
+ const y = [];
2823
+ Y = Y.split(" ");
2824
+ for (let I = 0; I < Y.length; I++) {
2825
+ var M = aa.find(`option[group="${Y[I]}"]`);
2826
+ if (M.length && (y.push(M.text()), M = M.attr("class"))) {
2788
2827
  M = M.split(" ");
2789
- for (let W = 0; W < M.length; W++) {
2790
- const Z = Y.find(`option[group="${M[W]}"]`);
2791
- Z.length && D.unshift(Z.text())
2828
+ for (let U = 0; U < M.length; U++) {
2829
+ const Z = aa.find(`option[group="${M[U]}"]`);
2830
+ Z.length && y.unshift(Z.text())
2792
2831
  }
2793
2832
  }
2794
2833
  }
2795
- D.push(R.text());
2796
- return [...(new Set(D))].join(" > ")
2834
+ y.push(T.text());
2835
+ return [...(new Set(y))].join(" > ")
2797
2836
  }
2798
- let ea;
2799
- if (q.find("option[group]").length) try {
2800
- ea = "function" === typeof findGroupPath ? findGroupPath(this, l).text : da(q, y)
2801
- } catch (Y) {
2802
- console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:", Y), ea = y.text()
2803
- } else ea = y.text();
2804
- q = n.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2805
- O = n.find('span[style*="position: absolute"]').clone();
2806
- V && V.allowHTML ? n.html(ea) : n.text(ea);
2807
- q.length && n.append(q);
2808
- O.length && n.append(O);
2809
- "function" === typeof I && I.call(this, {
2837
+ let W;
2838
+ if (m.find("option[group]").length) try {
2839
+ W = "function" === typeof findGroupPath ? findGroupPath(this, l).text : ja(m, A)
2840
+ } catch (aa) {
2841
+ console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:", aa), W = A.text()
2842
+ } else W = A.text();
2843
+ m = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2844
+ R = p.find('span[style*="position: absolute"]').clone();
2845
+ O && O.allowHTML ? p.html(W) : p.text(W);
2846
+ m.length && p.append(m);
2847
+ R.length && p.append(R);
2848
+ "function" === typeof H && H.call(this, {
2810
2849
  index: l,
2811
- value: y.val(),
2812
- text: y.text(),
2813
- path: ea
2850
+ value: A.val(),
2851
+ text: A.text(),
2852
+ path: W
2814
2853
  })
2815
2854
  }
2816
2855
  } else console.warn("Select element was not initialized with $.select() method")
2817
2856
  });
2818
- if ("value" === x) return this.each(function() {
2819
- var q = $(this);
2857
+ if ("value" === w) return this.each(function() {
2858
+ var m = $(this);
2820
2859
  if (this._selectId) {
2821
- var y = q.find(`option[value="${l}"]`);
2822
- if (y.length) {
2823
- var n = $(".select-" + (this._selectId + "-wrapper"));
2824
- const V = y.index(),
2825
- H = n.data("settings");
2826
- q.find("option").prop("selected", !1);
2827
- y.prop("selected", !0);
2828
- n.attr({
2860
+ var A = m.find(`option[value="${l}"]`);
2861
+ if (A.length) {
2862
+ var p = $(".select-" + (this._selectId + "-wrapper"));
2863
+ const O = A.index(),
2864
+ E = p.data("settings");
2865
+ m.find("option").prop("selected", !1);
2866
+ A.prop("selected", !0);
2867
+ p.attr({
2829
2868
  "data-selected-value": l,
2830
- "data-selected-index": V
2869
+ "data-selected-index": O
2831
2870
  });
2832
- var O = n.find('[class*="-option"]');
2833
- O.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2834
- H.selectedBg && O.each(function() {
2835
- const R = $(this),
2836
- P = (R.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2837
- R.attr("style", P)
2871
+ var R = p.find('[class*="-option"]');
2872
+ R.removeClass("selected").removeClass("selected-bg-active").css("font-weight", "normal");
2873
+ E.selectedBg && R.each(function() {
2874
+ const T = $(this),
2875
+ Y = (T.attr("style") || "").replace(/background-color:[^;]+;?/g, "");
2876
+ T.attr("style", Y)
2838
2877
  });
2839
- const da = n.find(`[data-value="${l}"]`);
2840
- da.length && setTimeout(() => {
2841
- da.addClass("selected");
2842
- H.selectedBg ? (da.addClass("selected-bg-active"), da[0].style.setProperty("background-color", H.selectedBg, "important"), da.css("font-weight",
2843
- "normal")) : da.css("font-weight", "bold")
2878
+ const ja = p.find(`[data-value="${l}"]`);
2879
+ ja.length && setTimeout(() => {
2880
+ ja.addClass("selected");
2881
+ E.selectedBg ? (ja.addClass("selected-bg-active"), ja[0].style.setProperty("background-color", E.selectedBg, "important"), ja.css("font-weight",
2882
+ "normal")) : ja.css("font-weight", "bold")
2844
2883
  }, 300);
2845
- H && H.pointer ? "radio" === H.pointer ? n.find(".custom-radio").each(function() {
2846
- const R = $(this).closest('[class*="-option"]').attr("data-value") === l;
2884
+ E && E.pointer ? "radio" === E.pointer ? p.find(".custom-radio").each(function() {
2885
+ const T = $(this).closest('[class*="-option"]').attr("data-value") === l;
2847
2886
  $(this).css({
2848
- border: R ? `2px solid ${H.radioColor}` : `2px solid ${H.buttonColor}`,
2887
+ border: T ? `2px solid ${E.radioColor}` : `2px solid ${E.buttonColor}`,
2849
2888
  backgroundColor: "#fff"
2850
- }).html(R ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(H.radioSize)/2}px; height: ${parseInt(H.radioSize)/2}px; background-color: ${H.radioColor}; border-radius: 50%;"></div>` :
2889
+ }).html(T ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(E.radioSize)/2}px; height: ${parseInt(E.radioSize)/2}px; background-color: ${E.radioColor}; border-radius: 50%;"></div>` :
2851
2890
  "")
2852
- }) : "checkbox" === H.pointer ? n.find(".custom-checkbox").each(function() {
2853
- const R = $(this).closest('[class*="-option"]').attr("data-value") === l,
2854
- P = H.checkboxColor || "#2196F3";
2855
- R ? $(this).css({
2856
- border: `2px solid ${P}`,
2857
- backgroundColor: P
2891
+ }) : "checkbox" === E.pointer ? p.find(".custom-checkbox").each(function() {
2892
+ const T = $(this).closest('[class*="-option"]').attr("data-value") === l,
2893
+ Y = E.checkboxColor || "#2196F3";
2894
+ T ? $(this).css({
2895
+ border: `2px solid ${Y}`,
2896
+ backgroundColor: Y
2858
2897
  }).html('<svg viewBox="0 0 24 24" style="fill: white; width: 90%; height: 90%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></svg>') : $(this).css({
2859
- border: `2px solid ${H.buttonColor||
2898
+ border: `2px solid ${E.buttonColor||
2860
2899
  "#ccc"}`,
2861
2900
  backgroundColor: "#fff"
2862
2901
  }).html("")
2863
- }) : H.pointer.startsWith("question_") && n.find(".custom-question").each(function() {
2902
+ }) : E.pointer.startsWith("question_") && p.find(".custom-question").each(function() {
2864
2903
  $(this).closest('[class*="-option"]').attr("data-value") === l ? $(this).addClass("active") : $(this).removeClass("active")
2865
- }) : H && H.dot && n.find(".custom-dot").each(function() {
2866
- const R = $(this).closest('[class*="-option"]').attr("data-value") === l;
2904
+ }) : E && E.dot && p.find(".custom-dot").each(function() {
2905
+ const T = $(this).closest('[class*="-option"]').attr("data-value") === l;
2867
2906
  $(this).css({
2868
- border: R ? `2px solid ${H.dotColor}` : `2px solid ${H.buttonColor}`,
2869
- backgroundColor: R ? H.dotColor : "#fff"
2907
+ border: T ? `2px solid ${E.dotColor}` : `2px solid ${E.buttonColor}`,
2908
+ backgroundColor: T ? E.dotColor : "#fff"
2870
2909
  })
2871
2910
  });
2872
- n = n.find('[class*="-trigger"]');
2911
+ p = p.find('[class*="-trigger"]');
2873
2912
 
2874
- function ea(R, P) {
2875
- var D = P.attr("class");
2876
- if (!D) return P.text();
2913
+ function W(T, Y) {
2914
+ var y = Y.attr("class");
2915
+ if (!y) return Y.text();
2877
2916
  const M = [];
2878
- D = D.split(" ");
2879
- for (let W = 0; W < D.length; W++) {
2880
- var z = R.find(`option[group="${D[W]}"]`);
2881
- if (z.length && (M.push(z.text()), z = z.attr("class"))) {
2882
- z = z.split(" ");
2883
- for (let Z = 0; Z < z.length; Z++) {
2884
- const ka = R.find(`option[group="${z[Z]}"]`);
2885
- ka.length && M.unshift(ka.text())
2917
+ y = y.split(" ");
2918
+ for (let U = 0; U < y.length; U++) {
2919
+ var I = T.find(`option[group="${y[U]}"]`);
2920
+ if (I.length && (M.push(I.text()), I = I.attr("class"))) {
2921
+ I = I.split(" ");
2922
+ for (let Z = 0; Z < I.length; Z++) {
2923
+ const ma = T.find(`option[group="${I[Z]}"]`);
2924
+ ma.length && M.unshift(ma.text())
2886
2925
  }
2887
2926
  }
2888
2927
  }
2889
- M.push(P.text());
2928
+ M.push(Y.text());
2890
2929
  return [...(new Set(M))].join(" > ")
2891
2930
  }
2892
- let Y;
2893
- if (q.find("option[group]").length) try {
2894
- Y = "function" === typeof findGroupPath ? findGroupPath(this, V).text : ea(q, y)
2895
- } catch (R) {
2931
+ let aa;
2932
+ if (m.find("option[group]").length) try {
2933
+ aa = "function" === typeof findGroupPath ? findGroupPath(this, O).text : W(m, A)
2934
+ } catch (T) {
2896
2935
  console.warn("\uadf8\ub8f9 \uacbd\ub85c \uad6c\uc131 \uc911 \uc624\ub958 \ubc1c\uc0dd:",
2897
- R), Y = y.text()
2898
- } else Y = y.text();
2899
- q = n.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2900
- O = n.find('span[style*="position: absolute"]').clone();
2901
- H && H.allowHTML ? n.html(Y) : n.text(Y);
2902
- q.length && n.append(q);
2903
- O.length && n.append(O);
2904
- "function" === typeof I && I.call(this, {
2905
- index: V,
2936
+ T), aa = A.text()
2937
+ } else aa = A.text();
2938
+ m = p.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
2939
+ R = p.find('span[style*="position: absolute"]').clone();
2940
+ E && E.allowHTML ? p.html(aa) : p.text(aa);
2941
+ m.length && p.append(m);
2942
+ R.length && p.append(R);
2943
+ "function" === typeof H && H.call(this, {
2944
+ index: O,
2906
2945
  value: l,
2907
- text: y.text(),
2908
- path: Y
2946
+ text: A.text(),
2947
+ path: aa
2909
2948
  })
2910
2949
  }
2911
2950
  } else console.warn("Select element was not initialized with $.select() method")
2912
2951
  })
2913
2952
  }
2914
- return $.select.call(this, x, l, I)
2953
+ return $.select.call(this, w, l, H)
2915
2954
  };
2916
- $.fn.selectSet = function(x, l, I) {
2955
+ $.fn.selectSet = function(w, l, H) {
2917
2956
  return this.each(function() {
2918
- function p(D, M, z) {
2919
- const [W, Z] = M.split(":");
2920
- if ("selected" === W) "selected" === Z && (q.find("option").prop("selected", !1), D.prop("selected", !0), O(H, q, D), q.trigger("change"));
2921
- else if ("val" === W)
2922
- if (M = D.val(), D.val(Z), z) {
2923
- const ja = D.attr("group");
2924
- D.attr("group", Z);
2925
- q.find(`option.${ja}`).each(function() {
2926
- $(this).removeClass(ja).addClass(Z)
2957
+ function x(y, M, I) {
2958
+ const [U, Z] = M.split(":");
2959
+ if ("selected" === U) "selected" === Z && (m.find("option").prop("selected", !1), y.prop("selected", !0), R(E, m, y), m.trigger("change"));
2960
+ else if ("val" === U)
2961
+ if (M = y.val(), y.val(Z), I) {
2962
+ const fa = y.attr("group");
2963
+ y.attr("group", Z);
2964
+ m.find(`option.${fa}`).each(function() {
2965
+ $(this).removeClass(fa).addClass(Z)
2927
2966
  });
2928
- D = H.find(`[data-group="${ja}"]`);
2929
- D.length && (D.attr("data-group", Z), H.find(`.${ja}`).each(function() {
2930
- $(this).removeClass(ja).addClass(Z)
2967
+ y = E.find(`[data-group="${fa}"]`);
2968
+ y.length && (y.attr("data-group", Z), E.find(`.${fa}`).each(function() {
2969
+ $(this).removeClass(fa).addClass(Z)
2931
2970
  }))
2932
- } else z =
2933
- H.find(`[data-value="${M}"]`), z.length && z.attr("data-value", Z), D.prop("selected") && V(H, y);
2934
- else if ("text" === W)
2935
- if (D.text(Z), z) {
2936
- z = D.attr("group");
2937
- z = H.find(`[data-group="${z}"]`);
2938
- if (z.length) {
2939
- M = z.find(".custom-group-arrow").clone();
2940
- var ka = z.contents().filter(function() {
2971
+ } else I =
2972
+ E.find(`[data-value="${M}"]`), I.length && I.attr("data-value", Z), y.prop("selected") && O(E, A);
2973
+ else if ("text" === U)
2974
+ if (y.text(Z), I) {
2975
+ I = y.attr("group");
2976
+ I = E.find(`[data-group="${I}"]`);
2977
+ if (I.length) {
2978
+ M = I.find(".custom-group-arrow").clone();
2979
+ var ma = I.contents().filter(function() {
2941
2980
  return 3 === this.nodeType
2942
2981
  });
2943
- ka.length ? ka[0].nodeValue = Z : (da && da.allowHTML ? z.html(Z) : z.text(Z), M.length && z.append(M))
2982
+ ma.length ? ma[0].nodeValue = Z : (ja && ja.allowHTML ? I.html(Z) : I.text(Z), M.length && I.append(M))
2944
2983
  }
2945
- D = D.attr("group");
2946
- q.find(`option.${D}`).filter(function() {
2984
+ y = y.attr("group");
2985
+ m.find(`option.${y}`).filter(function() {
2947
2986
  return $(this).prop("selected")
2948
- }).length && V(H, y)
2987
+ }).length && O(E, A)
2949
2988
  } else {
2950
- z = D.val();
2951
- z = H.find(`[data-value="${z}"]`);
2952
- if (z.length) {
2953
- M = z.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot, .custom-group-arrow").clone();
2954
- ka = z.find('span[style*="position: absolute"]').clone();
2955
- let ja = z.contents().filter(function() {
2989
+ I = y.val();
2990
+ I = E.find(`[data-value="${I}"]`);
2991
+ if (I.length) {
2992
+ M = I.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot, .custom-group-arrow").clone();
2993
+ ma = I.find('span[style*="position: absolute"]').clone();
2994
+ let fa = I.contents().filter(function() {
2956
2995
  return 3 === this.nodeType
2957
2996
  });
2958
- ja.length ? ja[0].nodeValue = Z : (da && da.allowHTML ? z.html(Z) : z.text(Z), M.length && z.append(M), ka.length && z.append(ka))
2997
+ fa.length ? fa[0].nodeValue = Z : (ja && ja.allowHTML ? I.html(Z) : I.text(Z), M.length && I.append(M), ma.length && I.append(ma))
2959
2998
  }
2960
- D.prop("selected") && V(H, y)
2999
+ y.prop("selected") && O(E, A)
2961
3000
  }
2962
3001
  }
2963
- const q = $(this),
2964
- y = this;
2965
- var n = this._selectId;
2966
- if (n) {
2967
- var O = function(D, M, z) {
2968
- const W = D.data("settings"),
2969
- Z = z.val();
2970
- z = z.index();
2971
- D.attr({
3002
+ const m = $(this),
3003
+ A = this;
3004
+ var p = this._selectId;
3005
+ if (p) {
3006
+ var R = function(y, M, I) {
3007
+ const U = y.data("settings"),
3008
+ Z = I.val();
3009
+ I = I.index();
3010
+ y.attr({
2972
3011
  "data-selected-value": Z,
2973
- "data-selected-index": z
3012
+ "data-selected-index": I
2974
3013
  });
2975
- D.find('[class*="-option"]').removeClass("selected").css("font-weight", "normal");
2976
- const ka = D.find(`[data-value="${Z}"]`);
2977
- ka.length && setTimeout(() => {
2978
- ka.addClass("selected");
2979
- W.selectedBg || ka.css("font-weight", "bold")
3014
+ y.find('[class*="-option"]').removeClass("selected").css("font-weight", "normal");
3015
+ const ma = y.find(`[data-value="${Z}"]`);
3016
+ ma.length && setTimeout(() => {
3017
+ ma.addClass("selected");
3018
+ U.selectedBg || ma.css("font-weight", "bold")
2980
3019
  }, 300);
2981
- "radio" === W.pointer ? D.find(".custom-radio").each(function() {
2982
- const ja = $(this).closest('[class*="-option"]').attr("data-value") === Z;
3020
+ "radio" === U.pointer ? y.find(".custom-radio").each(function() {
3021
+ const fa = $(this).closest('[class*="-option"]').attr("data-value") === Z;
2983
3022
  $(this).css({
2984
- border: ja ? `2px solid ${W.radioColor}` : `2px solid ${W.buttonColor}`,
3023
+ border: fa ? `2px solid ${U.radioColor}` : `2px solid ${U.buttonColor}`,
2985
3024
  backgroundColor: "#fff"
2986
- }).html(ja ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(W.radioSize)/2}px; height: ${parseInt(W.radioSize)/2}px; background-color: ${W.radioColor}; border-radius: 50%;"></div>` : "")
2987
- }) : W.dot && D.find(".custom-dot").each(function() {
2988
- const ja = $(this).closest('[class*="-option"]').attr("data-value") === Z;
3025
+ }).html(fa ? `<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(U.radioSize)/2}px; height: ${parseInt(U.radioSize)/2}px; background-color: ${U.radioColor}; border-radius: 50%;"></div>` : "")
3026
+ }) : U.dot && y.find(".custom-dot").each(function() {
3027
+ const fa = $(this).closest('[class*="-option"]').attr("data-value") === Z;
2989
3028
  $(this).css({
2990
- border: ja ? `2px solid ${W.dotColor}` : `2px solid ${W.buttonColor}`,
2991
- backgroundColor: ja ? W.dotColor : "#fff"
3029
+ border: fa ? `2px solid ${U.dotColor}` : `2px solid ${U.buttonColor}`,
3030
+ backgroundColor: fa ? U.dotColor : "#fff"
2992
3031
  })
2993
3032
  });
2994
- V(D,
3033
+ O(y,
2995
3034
  M[0])
2996
3035
  },
2997
- V = function(D, M) {
2998
- const z = D.data("settings");
2999
- D = D.find('[class*="-trigger"]');
3000
- var W = $(M);
3001
- const Z = W.find("option:selected");
3036
+ O = function(y, M) {
3037
+ const I = y.data("settings");
3038
+ y = y.find('[class*="-trigger"]');
3039
+ var U = $(M);
3040
+ const Z = U.find("option:selected");
3002
3041
  if (Z.length) {
3003
- var ka = Z.index();
3004
- if (W.find("option[group]").length && "function" === typeof findGroupPath) try {
3005
- var ja = findGroupPath(M, ka).text
3006
- } catch (xa) {
3007
- console.warn("Error getting group path:", xa), ja = Z.text()
3008
- } else ja = Z.text();
3009
- M = D.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
3010
- W = D.find('span[style*="position: absolute"]').clone();
3011
- z && z.allowHTML ? D.html(ja) :
3012
- D.text(ja);
3013
- M.length && D.append(M);
3014
- W.length && D.append(W);
3015
- "radio" === z.pointer && (ja = D.find(".custom-radio"), ja.length && ja.css({
3016
- border: `2px solid ${z.radioColor}`,
3042
+ var ma = Z.index();
3043
+ if (U.find("option[group]").length && "function" === typeof findGroupPath) try {
3044
+ var fa = findGroupPath(M, ma).text
3045
+ } catch (Ba) {
3046
+ console.warn("Error getting group path:", Ba), fa = Z.text()
3047
+ } else fa = Z.text();
3048
+ M = y.find(".custom-radio, .custom-checkbox, .custom-question, .custom-dot").clone();
3049
+ U = y.find('span[style*="position: absolute"]').clone();
3050
+ I && I.allowHTML ? y.html(fa) :
3051
+ y.text(fa);
3052
+ M.length && y.append(M);
3053
+ U.length && y.append(U);
3054
+ "radio" === I.pointer && (fa = y.find(".custom-radio"), fa.length && fa.css({
3055
+ border: `2px solid ${I.radioColor}`,
3017
3056
  backgroundColor: "#fff"
3018
- }).html(`<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(z.radioSize)/2}px; height: ${parseInt(z.radioSize)/2}px; background-color: ${z.radioColor}; border-radius: 50%;"></div>`))
3057
+ }).html(`<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${parseInt(I.radioSize)/2}px; height: ${parseInt(I.radioSize)/2}px; background-color: ${I.radioColor}; border-radius: 50%;"></div>`))
3019
3058
  }
3020
3059
  },
3021
- H = $(".select-" + (n + "-wrapper")),
3022
- da = H.data("settings");
3023
- n = !1;
3024
- if ("string" === typeof x &&
3025
- x.startsWith("group:")) {
3026
- n = !0;
3027
- var ea = x.substring(6);
3028
- ea = q.find(`option[group="${ea}"]`)
3029
- } else "number" !== typeof x && isNaN(parseInt(x)) ? "string" === typeof x && (ea = q.find(`option[value="${x}"]`)) : (ea = parseInt(x), ea = q.find("option").eq(ea), ea.attr("group") && (n = !0));
3030
- if (ea.length) {
3060
+ E = $(".select-" + (p + "-wrapper")),
3061
+ ja = E.data("settings");
3062
+ p = !1;
3063
+ if ("string" === typeof w &&
3064
+ w.startsWith("group:")) {
3065
+ p = !0;
3066
+ var W = w.substring(6);
3067
+ W = m.find(`option[group="${W}"]`)
3068
+ } else "number" !== typeof w && isNaN(parseInt(w)) ? "string" === typeof w && (W = m.find(`option[value="${w}"]`)) : (W = parseInt(w), W = m.find("option").eq(W), W.attr("group") && (p = !0));
3069
+ if (W.length) {
3031
3070
  if ("string" === typeof l && l.startsWith("{") && l.endsWith("}")) {
3032
- var Y = l.match(/\{([^}]+)\}/g);
3033
- if (Y)
3034
- for (var R of Y) Y = R.substring(1, R.length - 1), p(ea, Y, n)
3035
- } else "string" === typeof l && p(ea, l, n);
3036
- if ("function" === typeof I) {
3037
- var P = q.find("option:selected");
3038
- R = P.index();
3039
- n = P.val();
3040
- ea = P.text();
3041
- Y = "";
3042
- if (P.length && P.attr("class")) {
3043
- P = P.attr("class").split(" ");
3044
- for (const D of P)
3045
- if (P = q.find(`option[group="${D}"]`), P.length) {
3046
- Y = P.text();
3071
+ var aa = l.match(/\{([^}]+)\}/g);
3072
+ if (aa)
3073
+ for (var T of aa) aa = T.substring(1, T.length - 1), x(W, aa, p)
3074
+ } else "string" === typeof l && x(W, l, p);
3075
+ if ("function" === typeof H) {
3076
+ var Y = m.find("option:selected");
3077
+ T = Y.index();
3078
+ p = Y.val();
3079
+ W = Y.text();
3080
+ aa = "";
3081
+ if (Y.length && Y.attr("class")) {
3082
+ Y = Y.attr("class").split(" ");
3083
+ for (const y of Y)
3084
+ if (Y = m.find(`option[group="${y}"]`), Y.length) {
3085
+ aa = Y.text();
3047
3086
  break
3048
3087
  }
3049
3088
  }
3050
- I.call(this, {
3051
- index: R,
3052
- value: n,
3053
- text: ea,
3054
- group: Y
3089
+ H.call(this, {
3090
+ index: T,
3091
+ value: p,
3092
+ text: W,
3093
+ group: aa
3055
3094
  })
3056
3095
  }
3057
- } else console.warn(`Target option not found: ${x}`)
3096
+ } else console.warn(`Target option not found: ${w}`)
3058
3097
  } else console.warn("Select element was not initialized with $.select() method")
3059
3098
  })
3060
3099
  };
3061
- $.fn.selectGet = function(x) {
3100
+ $.fn.selectGet = function(w) {
3062
3101
  var l = $(this);
3063
- if ("number" === typeof x) return l = l.find("option").eq(x), l.length ? l : $();
3064
- if ("string" === typeof x && !["val", "value", "text", "index", "group"].includes(x)) {
3065
- var I = l.find(`option[value="${x}"]`);
3066
- if (I.length) return I;
3102
+ if ("number" === typeof w) return l = l.find("option").eq(w), l.length ? l : $();
3103
+ if ("string" === typeof w && !["val", "value", "text", "index", "group"].includes(w)) {
3104
+ var H = l.find(`option[value="${w}"]`);
3105
+ if (H.length) return H;
3067
3106
  l = l.find("option").filter(function() {
3068
- return $(this).text() === x
3107
+ return $(this).text() === w
3069
3108
  });
3070
3109
  return l.length ? l : $()
3071
3110
  }
3072
- var p = l.find("option:selected");
3073
- if (!p.length) return $();
3074
- if (x && "val" !== x && "value" !== x) {
3075
- if ("text" === x) return p.text();
3076
- if ("index" === x) return p.index();
3077
- if ("group" === x) {
3078
- I = "";
3111
+ var x = l.find("option:selected");
3112
+ if (!x.length) return $();
3113
+ if (w && "val" !== w && "value" !== w) {
3114
+ if ("text" === w) return x.text();
3115
+ if ("index" === w) return x.index();
3116
+ if ("group" === w) {
3117
+ H = "";
3079
3118
  try {
3080
- if (p.attr("class")) {
3081
- const q = p.attr("class").split(" ");
3082
- p = [];
3083
- for (const y of q) {
3084
- const n = l.find(`option[group="${y}"]`);
3085
- if (n.length && (p.unshift(n.text()), n.attr("class"))) {
3086
- const O = n.attr("class").split(" ");
3087
- for (const V of O) {
3088
- const H = l.find(`option[group="${V}"]`);
3089
- H.length && p.unshift(H.text())
3119
+ if (x.attr("class")) {
3120
+ const m = x.attr("class").split(" ");
3121
+ x = [];
3122
+ for (const A of m) {
3123
+ const p = l.find(`option[group="${A}"]`);
3124
+ if (p.length && (x.unshift(p.text()), p.attr("class"))) {
3125
+ const R = p.attr("class").split(" ");
3126
+ for (const O of R) {
3127
+ const E = l.find(`option[group="${O}"]`);
3128
+ E.length && x.unshift(E.text())
3090
3129
  }
3091
3130
  }
3092
3131
  }
3093
- I = p.join(" > ")
3132
+ H = x.join(" > ")
3094
3133
  }
3095
- } catch (q) {
3096
- console.warn("Error finding group path:", q)
3134
+ } catch (m) {
3135
+ console.warn("Error finding group path:", m)
3097
3136
  }
3098
- return I
3137
+ return H
3099
3138
  }
3100
- } else return p.val();
3101
- return p
3139
+ } else return x.val();
3140
+ return x
3102
3141
  };
3103
3142
 
3104
- function createParser(x, l, I, p = {}) {
3143
+ function createParser(w, l, H, x = {}) {
3105
3144
  return {
3106
- prefix: x,
3145
+ prefix: w,
3107
3146
  minParts: l,
3108
- fields: I,
3109
- optionalFields: p,
3110
- parse: function(q) {
3111
- if (q.length < this.minParts) return null;
3112
- const y = {};
3113
- this.fields.forEach((n, O) => {
3114
- y[n] = q[O + 1] || ""
3147
+ fields: H,
3148
+ optionalFields: x,
3149
+ parse: function(m) {
3150
+ if (m.length < this.minParts) return null;
3151
+ const A = {};
3152
+ this.fields.forEach((p, R) => {
3153
+ A[p] = m[R + 1] || ""
3115
3154
  });
3116
- Object.entries(this.optionalFields).forEach(([n, O]) => {
3117
- n = parseInt(n);
3118
- q[n] && q[n].trim() && (y[O] = q[n])
3155
+ Object.entries(this.optionalFields).forEach(([p, R]) => {
3156
+ p = parseInt(p);
3157
+ m[p] && m[p].trim() && (A[R] = m[p])
3119
3158
  });
3120
- return y
3159
+ return A
3121
3160
  }
3122
3161
  }
3123
3162
  }
3124
- $.fn.selectAdd = function(x, l) {
3163
+ $.fn.selectAdd = function(w, l) {
3125
3164
  return this.each(function() {
3126
- const I = $(this);
3165
+ const H = $(this);
3127
3166
  if (this._selectId) {
3128
- var p;
3129
- if ("string" === typeof x) {
3167
+ var x;
3168
+ if ("string" === typeof w) {
3130
3169
  window._selectParsers || (window._selectParsers = [], window._selectParsers.push(createParser("group:", 3, ["group", "text"])), window._selectParsers.push(createParser("option:", 4, ["value", "text", "groupClass"], {
3131
3170
  4: "tag",
3132
3171
  5: "img"
3133
3172
  })));
3134
- var q = window._selectParsers,
3135
- y = x.split(":");
3136
- (q = q.find(n => x.startsWith(n.prefix))) && (p = q.parse(y));
3137
- p || (p = x)
3138
- } else p = x;
3139
- p.group ? (y = document.createElement("option"),
3140
- y.setAttribute("group", p.group), y.textContent = p.text || "", p.parentGroup && (y.className = p.parentGroup), I[0].appendChild(y)) : (y = document.createElement("option"), y.value = p.value || "", y.textContent = p.text || "", p.groupClass && (y.className = p.groupClass), p.tag && y.setAttribute("tag", p.tag), p.img && y.setAttribute("img", p.img), p.groupClass ? (q = Array.from(I[0].querySelectorAll(`.${p.groupClass}`)), 0 < q.length ? (q = q[q.length - 1], q.nextSibling ? I[0].insertBefore(y, q.nextSibling) : I[0].appendChild(y)) : (q = I[0].querySelector(`option[group="${p.groupClass}"]`)) &&
3141
- q.nextSibling ? I[0].insertBefore(y, q.nextSibling) : I[0].appendChild(y)) : I[0].appendChild(y));
3142
- refreshSelectUI(I);
3173
+ var m = window._selectParsers,
3174
+ A = w.split(":");
3175
+ (m = m.find(p => w.startsWith(p.prefix))) && (x = m.parse(A));
3176
+ x || (x = w)
3177
+ } else x = w;
3178
+ x.group ? (A = document.createElement("option"),
3179
+ A.setAttribute("group", x.group), A.textContent = x.text || "", x.parentGroup && (A.className = x.parentGroup), H[0].appendChild(A)) : (A = document.createElement("option"), A.value = x.value || "", A.textContent = x.text || "", x.groupClass && (A.className = x.groupClass), x.tag && A.setAttribute("tag", x.tag), x.img && A.setAttribute("img", x.img), x.groupClass ? (m = Array.from(H[0].querySelectorAll(`.${x.groupClass}`)), 0 < m.length ? (m = m[m.length - 1], m.nextSibling ? H[0].insertBefore(A, m.nextSibling) : H[0].appendChild(A)) : (m = H[0].querySelector(`option[group="${x.groupClass}"]`)) &&
3180
+ m.nextSibling ? H[0].insertBefore(A, m.nextSibling) : H[0].appendChild(A)) : H[0].appendChild(A));
3181
+ refreshSelectUI(H);
3143
3182
  "function" === typeof l && l.call(this, {
3144
- type: p.group ? "group" : "option",
3145
- group: p.group || p.groupClass,
3146
- value: p.value,
3147
- text: p.text
3183
+ type: x.group ? "group" : "option",
3184
+ group: x.group || x.groupClass,
3185
+ value: x.value,
3186
+ text: x.text
3148
3187
  })
3149
3188
  } else console.warn("Select element was not initialized with $.select() method")
3150
3189
  })
3151
3190
  };
3152
3191
 
3153
- function refreshSelectUI(x) {
3154
- var l = x.closest('[class*="-wrapper"]');
3155
- let I = null;
3156
- l.length && (I = l.data("settings"));
3192
+ function refreshSelectUI(w) {
3193
+ var l = w.closest('[class*="-wrapper"]');
3194
+ let H = null;
3195
+ l.length && (H = l.data("settings"));
3157
3196
  if (l.length) {
3158
- const p = l[0].parentNode,
3159
- q = l[0].nextSibling;
3160
- x[0].style.display = "";
3161
- q ? p.insertBefore(x[0], q) : p.appendChild(x[0]);
3197
+ const x = l[0].parentNode,
3198
+ m = l[0].nextSibling;
3199
+ w[0].style.display = "";
3200
+ m ? x.insertBefore(w[0], m) : x.appendChild(w[0]);
3162
3201
  l.remove()
3163
3202
  }
3164
3203
  l = {
3165
3204
  duration: 300,
3166
3205
  opacity: 1
3167
3206
  };
3168
- I ? (void 0 !== I.slideToggle && (l.slideToggle = I.slideToggle), void 0 !== I.width && (l.width = I.width), void 0 !== I.defaultBgColor && (l.defaultBgColor = I.defaultBgColor), void 0 !== I.defaultColor && (l.defaultColor = I.defaultColor)) : l.slideToggle = !0;
3169
- x.select(300, l)
3207
+ H ? (void 0 !== H.slideToggle && (l.slideToggle = H.slideToggle), void 0 !== H.width && (l.width = H.width), void 0 !== H.defaultBgColor && (l.defaultBgColor = H.defaultBgColor), void 0 !== H.defaultColor && (l.defaultColor = H.defaultColor)) : l.slideToggle = !0;
3208
+ w.select(300, l)
3170
3209
  }
3171
- $.fn.selectAdd.registerParser = function(x, l, I, p) {
3210
+ $.fn.selectAdd.registerParser = function(w, l, H, x) {
3172
3211
  window._selectParsers || (window._selectParsers = []);
3173
- window._selectParsers.push(createParser(x, l, I, p))
3212
+ window._selectParsers.push(createParser(w, l, H, x))
3174
3213
  };
3175
- $.fn.selectRemove = function(x, l) {
3214
+ $.fn.selectRemove = function(w, l) {
3176
3215
  return this.each(function() {
3177
- const I = $(this);
3216
+ const H = $(this);
3178
3217
  if (this._selectId) {
3179
- var p = "";
3180
- if ("string" === typeof x)
3181
- if (x.startsWith("group:")) {
3182
- var q = x.substring(6);
3183
- q = I.find(`option[group="${q}"], option.${q}`);
3184
- p = "group"
3185
- } else x.startsWith("value:") ? (q = x.substring(6), q = I.find(`option[value="${q}"]`)) : x.startsWith("index:") ? (q = parseInt(x.substring(6)), q = I.find("option").eq(q)) : q = I.find(`option[value="${x}"]`), p = "option";
3186
- q && 0 < q.length && (p = {
3187
- type: p,
3188
- count: q.length,
3189
- items: q.map(function() {
3218
+ var x = "";
3219
+ if ("string" === typeof w)
3220
+ if (w.startsWith("group:")) {
3221
+ var m = w.substring(6);
3222
+ m = H.find(`option[group="${m}"], option.${m}`);
3223
+ x = "group"
3224
+ } else w.startsWith("value:") ? (m = w.substring(6), m = H.find(`option[value="${m}"]`)) : w.startsWith("index:") ? (m = parseInt(w.substring(6)), m = H.find("option").eq(m)) : m = H.find(`option[value="${w}"]`), x = "option";
3225
+ m && 0 < m.length && (x = {
3226
+ type: x,
3227
+ count: m.length,
3228
+ items: m.map(function() {
3190
3229
  return {
3191
3230
  value: $(this).val(),
3192
3231
  text: $(this).text(),
@@ -3194,7 +3233,7 @@ $.fn.selectRemove = function(x, l) {
3194
3233
  groupName: $(this).attr("group") || $(this).attr("class")
3195
3234
  }
3196
3235
  }).get()
3197
- }, q.remove(), refreshSelectUI(I), "function" === typeof l && l.call(this, p))
3236
+ }, m.remove(), refreshSelectUI(H), "function" === typeof l && l.call(this, x))
3198
3237
  } else console.warn("Select element was not initialized with $.select() method")
3199
3238
  })
3200
3239
  };