sales-frontend-components 0.0.173 → 0.0.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1575 -1566
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +19 -2
- package/dist/index.esm.js +1575 -1567
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -59,1674 +59,1680 @@ const FormCheckbox = ({
|
|
|
59
59
|
return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Checkbox, { ...props, ...field, id: field.name, checked: field.value, onChange: field.onChange, children });
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
const FormDatePicker = ({
|
|
63
|
-
name,
|
|
64
|
-
control,
|
|
65
|
-
disabled,
|
|
66
|
-
defaultValue,
|
|
67
|
-
...props
|
|
68
|
-
}) => {
|
|
69
|
-
const { field, fieldState } = reactHookForm.useController({ name, control, disabled, defaultValue });
|
|
70
|
-
const [selected, setSelected] = React.useState();
|
|
71
|
-
React.useEffect(() => {
|
|
72
|
-
if (salesFrontendDesignSystem.isDate(field.value) && field.value !== selected) {
|
|
73
|
-
setSelected(field.value);
|
|
74
|
-
}
|
|
75
|
-
}, [field.value]);
|
|
76
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
-
salesFrontendDesignSystem.DatePicker,
|
|
78
|
-
{
|
|
79
|
-
tabIndex: 0,
|
|
80
|
-
...{
|
|
81
|
-
...props,
|
|
82
|
-
...field,
|
|
83
|
-
id: field.name,
|
|
84
|
-
defaultValue: selected,
|
|
85
|
-
error: fieldState.invalid,
|
|
86
|
-
onValueChange: field.onChange
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const FormDateRangePicker = ({
|
|
93
|
-
name,
|
|
94
|
-
control,
|
|
95
|
-
disabled,
|
|
96
|
-
defaultValue,
|
|
97
|
-
...props
|
|
98
|
-
}) => {
|
|
99
|
-
const { field, fieldState } = reactHookForm.useController({
|
|
100
|
-
name,
|
|
101
|
-
control,
|
|
102
|
-
disabled,
|
|
103
|
-
defaultValue
|
|
104
|
-
});
|
|
105
|
-
const [selected, setSelected] = React.useState();
|
|
106
|
-
React.useEffect(() => {
|
|
107
|
-
const fieldValue = field.value;
|
|
108
|
-
if (!fieldValue) {
|
|
109
|
-
setSelected(void 0);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const isStartDateDifferent = fieldValue.startDate?.getTime() !== selected?.startDate?.getTime();
|
|
113
|
-
const isEndDateDifferent = fieldValue.endDate?.getTime() !== selected?.endDate?.getTime();
|
|
114
|
-
if (!selected || isStartDateDifferent || isEndDateDifferent) {
|
|
115
|
-
setSelected(fieldValue);
|
|
116
|
-
}
|
|
117
|
-
}, [field.value]);
|
|
118
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
-
salesFrontendDesignSystem.DateRangePicker,
|
|
120
|
-
{
|
|
121
|
-
tabIndex: 0,
|
|
122
|
-
...{
|
|
123
|
-
...props,
|
|
124
|
-
...field,
|
|
125
|
-
id: field.name,
|
|
126
|
-
defaultValue: selected,
|
|
127
|
-
error: fieldState.invalid,
|
|
128
|
-
onValueChange: field.onChange
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
62
|
function getDefaultExportFromCjs (x) {
|
|
135
63
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
136
64
|
}
|
|
137
65
|
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
/*!
|
|
141
|
-
Copyright (c) 2018 Jed Watson.
|
|
142
|
-
Licensed under the MIT License (MIT), see
|
|
143
|
-
http://jedwatson.github.io/classnames
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
var hasRequiredBind;
|
|
147
|
-
|
|
148
|
-
function requireBind () {
|
|
149
|
-
if (hasRequiredBind) return bind.exports;
|
|
150
|
-
hasRequiredBind = 1;
|
|
151
|
-
(function (module) {
|
|
152
|
-
/* global define */
|
|
153
|
-
|
|
154
|
-
(function () {
|
|
155
|
-
|
|
156
|
-
var hasOwn = {}.hasOwnProperty;
|
|
157
|
-
|
|
158
|
-
function classNames () {
|
|
159
|
-
var classes = '';
|
|
160
|
-
|
|
161
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
162
|
-
var arg = arguments[i];
|
|
163
|
-
if (arg) {
|
|
164
|
-
classes = appendClass(classes, parseValue.call(this, arg));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return classes;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function parseValue (arg) {
|
|
172
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
173
|
-
return this && this[arg] || arg;
|
|
174
|
-
}
|
|
66
|
+
var dayjs_min$1 = {exports: {}};
|
|
175
67
|
|
|
176
|
-
|
|
177
|
-
return '';
|
|
178
|
-
}
|
|
68
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
179
69
|
|
|
180
|
-
|
|
181
|
-
return classNames.apply(this, arg);
|
|
182
|
-
}
|
|
70
|
+
var hasRequiredDayjs_min;
|
|
183
71
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
72
|
+
function requireDayjs_min () {
|
|
73
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
74
|
+
hasRequiredDayjs_min = 1;
|
|
75
|
+
(function (module, exports) {
|
|
76
|
+
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
77
|
+
} (dayjs_min$1));
|
|
78
|
+
return dayjs_min$1.exports;
|
|
79
|
+
}
|
|
187
80
|
|
|
188
|
-
|
|
81
|
+
var dayjs_minExports = requireDayjs_min();
|
|
82
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
189
83
|
|
|
190
|
-
|
|
191
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
192
|
-
classes = appendClass(classes, this && this[key] || key);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
84
|
+
var customParseFormat$2 = {exports: {}};
|
|
195
85
|
|
|
196
|
-
|
|
197
|
-
}
|
|
86
|
+
var customParseFormat$1 = customParseFormat$2.exports;
|
|
198
87
|
|
|
199
|
-
|
|
200
|
-
if (!newClass) {
|
|
201
|
-
return value;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (value) {
|
|
205
|
-
return value + ' ' + newClass;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return value + newClass;
|
|
209
|
-
}
|
|
88
|
+
var hasRequiredCustomParseFormat;
|
|
210
89
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
} (bind));
|
|
219
|
-
return bind.exports;
|
|
90
|
+
function requireCustomParseFormat () {
|
|
91
|
+
if (hasRequiredCustomParseFormat) return customParseFormat$2.exports;
|
|
92
|
+
hasRequiredCustomParseFormat = 1;
|
|
93
|
+
(function (module, exports) {
|
|
94
|
+
!function(e,t){module.exports=t();}(customParseFormat$1,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,false);}],a:[o,function(e){this.afternoon=d(e,true);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=true,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=true===o[2],h=true===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&true!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
|
|
95
|
+
} (customParseFormat$2));
|
|
96
|
+
return customParseFormat$2.exports;
|
|
220
97
|
}
|
|
221
98
|
|
|
222
|
-
var
|
|
223
|
-
var
|
|
99
|
+
var customParseFormatExports = requireCustomParseFormat();
|
|
100
|
+
var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
|
|
224
101
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
for (let i = 0; i < splitText.length; i++) {
|
|
232
|
-
replacedText.push(splitText[i] || "");
|
|
233
|
-
if (i < splitText.length - 1) {
|
|
234
|
-
replacedText.push(
|
|
235
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: targetString }, `search-keyword-highlight-${i}-${Math.random()}`)
|
|
236
|
-
);
|
|
237
|
-
}
|
|
102
|
+
var __defProp = Object.defineProperty;
|
|
103
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
104
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
105
|
+
var getCookie = (name) => {
|
|
106
|
+
if (typeof document === "undefined") {
|
|
107
|
+
return "";
|
|
238
108
|
}
|
|
239
|
-
|
|
109
|
+
const match = document.cookie.match(new RegExp(`(^|; *)${name}=([^;]*)`));
|
|
110
|
+
return match ? decodeURIComponent(match[2] || "") : "";
|
|
240
111
|
};
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
return "\uC5EC\uC131";
|
|
249
|
-
default:
|
|
250
|
-
return "";
|
|
112
|
+
var getSubdomain = (hostname) => {
|
|
113
|
+
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") {
|
|
114
|
+
return "";
|
|
115
|
+
}
|
|
116
|
+
const parts = hostname.split(".");
|
|
117
|
+
if (parts.length < 3) {
|
|
118
|
+
return "";
|
|
251
119
|
}
|
|
120
|
+
return parts[0] ?? "";
|
|
252
121
|
};
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
122
|
+
var getEnvironmentFromHostname = (hostname) => {
|
|
123
|
+
const debugModeEnv = getCookie("dsp-debug-mode-env")?.toLowerCase();
|
|
124
|
+
if (debugModeEnv) {
|
|
125
|
+
return debugModeEnv;
|
|
126
|
+
}
|
|
127
|
+
const subDomain = getSubdomain(hostname);
|
|
128
|
+
if (hostname === "localhost" || hostname === "127.0.0.1" || hostname.startsWith("localhost")) {
|
|
129
|
+
return "local";
|
|
130
|
+
}
|
|
131
|
+
if (subDomain.includes(`dev`)) {
|
|
132
|
+
return "dev";
|
|
133
|
+
}
|
|
134
|
+
if (subDomain.includes("stg")) {
|
|
135
|
+
return "stg";
|
|
136
|
+
}
|
|
137
|
+
return "prd";
|
|
268
138
|
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("divider") }),
|
|
291
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("address-info"), children: [
|
|
292
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("address"), children: highlightOnSearchKeyword(
|
|
293
|
-
`${item.roadNameBaseAddress} ${item.roadNameDetailAddress} ${item.mainBuildingName}`,
|
|
294
|
-
searchKeyword
|
|
295
|
-
) }),
|
|
296
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("old-address"), children: highlightOnSearchKeyword(
|
|
297
|
-
`${item.landNumberBaseAddress} ${item.landNumberDetailAddress}`,
|
|
298
|
-
searchKeyword
|
|
299
|
-
) })
|
|
300
|
-
] })
|
|
301
|
-
] }),
|
|
302
|
-
id: JSON.stringify(item)
|
|
303
|
-
};
|
|
304
|
-
}),
|
|
305
|
-
className: cx$k("radio-group"),
|
|
306
|
-
name: "address-search",
|
|
307
|
-
size: "medium",
|
|
308
|
-
defaultValue: "",
|
|
309
|
-
onChange
|
|
139
|
+
var _MessageEventManager = class _MessageEventManager2 {
|
|
140
|
+
constructor() {
|
|
141
|
+
__publicField(this, "handlers", /* @__PURE__ */ new Map());
|
|
142
|
+
window.addEventListener("message", this.handleMessage.bind(this));
|
|
143
|
+
}
|
|
144
|
+
static getInstance() {
|
|
145
|
+
if (!_MessageEventManager2.instance) {
|
|
146
|
+
_MessageEventManager2.instance = new _MessageEventManager2();
|
|
147
|
+
}
|
|
148
|
+
return _MessageEventManager2.instance;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @param event
|
|
153
|
+
*/
|
|
154
|
+
handleMessage(event) {
|
|
155
|
+
for (const [key, handler] of this.handlers) {
|
|
156
|
+
try {
|
|
157
|
+
handler(event);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
console.error(`Message handler ${key} error:`, error);
|
|
310
160
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* 이벤트 헨들러 함수를 등록합니다.
|
|
165
|
+
* @param key
|
|
166
|
+
* @param handler
|
|
167
|
+
*/
|
|
168
|
+
registerHandler(key, handler) {
|
|
169
|
+
this.handlers.set(key, handler);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 이벤트 핸들러 함수를 삭제합니다.
|
|
173
|
+
* @param key
|
|
174
|
+
*/
|
|
175
|
+
unregisterHandler(key) {
|
|
176
|
+
this.handlers.delete(key);
|
|
177
|
+
}
|
|
318
178
|
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
179
|
+
__publicField(_MessageEventManager, "instance");
|
|
180
|
+
var MessageEventManager = _MessageEventManager;
|
|
181
|
+
function base64ToBlob(base64String, contentType = "") {
|
|
182
|
+
const regex = /^data:([a-zA-Z0-9/+.-]+);base64,/;
|
|
183
|
+
const matches = base64String.match(regex);
|
|
184
|
+
if (matches === null) {
|
|
185
|
+
throw new Error("Invalid base64 string");
|
|
186
|
+
}
|
|
187
|
+
const contentTypeFinal = contentType || matches[1];
|
|
188
|
+
const byteCharacters = atob(base64String.replace(regex, ""));
|
|
189
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
190
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
191
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
192
|
+
}
|
|
193
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
194
|
+
return new Blob([byteArray], { type: contentTypeFinal });
|
|
195
|
+
}
|
|
196
|
+
function base64ToFile(base64String, fileName, contentType = "") {
|
|
197
|
+
const blob = base64ToBlob(base64String, contentType);
|
|
198
|
+
if (!blob) {
|
|
199
|
+
throw new Error("Invalid base64 string");
|
|
200
|
+
}
|
|
201
|
+
return blobToFile(blob, fileName);
|
|
202
|
+
}
|
|
203
|
+
function blobToFile(blob, fileName) {
|
|
204
|
+
return new File([blob], fileName, {
|
|
205
|
+
type: blob.type,
|
|
206
|
+
lastModified: Date.now()
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
async function fileToBase64(file) {
|
|
210
|
+
return new Promise((resolve, reject) => {
|
|
211
|
+
const reader = new FileReader();
|
|
212
|
+
reader.onload = () => {
|
|
213
|
+
if (typeof reader.result === "string") {
|
|
214
|
+
resolve(reader.result);
|
|
215
|
+
} else {
|
|
216
|
+
reject(new Error("Invalid file type"));
|
|
356
217
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
{
|
|
363
|
-
rootProps: {
|
|
364
|
-
style: {
|
|
365
|
-
display: "flex",
|
|
366
|
-
flex: 1
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
|
|
370
|
-
onChange: onDetailChange,
|
|
371
|
-
size: "small",
|
|
372
|
-
value: detailAddressInput,
|
|
373
|
-
...step === "detail-input" && { autoFocus: true }
|
|
374
|
-
}
|
|
375
|
-
)
|
|
376
|
-
] })
|
|
377
|
-
] });
|
|
378
|
-
};
|
|
379
|
-
function AddressComponent({ isOpen, onClose, setValue }) {
|
|
380
|
-
const {
|
|
381
|
-
onAddressSearchClear,
|
|
382
|
-
addressSearchKeyword,
|
|
383
|
-
addressSearchStep,
|
|
384
|
-
onAddressSearchNext,
|
|
385
|
-
nextButtonDisabled,
|
|
386
|
-
detailAddressInput,
|
|
387
|
-
addressSearchList,
|
|
388
|
-
onSearch,
|
|
389
|
-
onKeyUp,
|
|
390
|
-
onSelectChange,
|
|
391
|
-
setDetail,
|
|
392
|
-
search,
|
|
393
|
-
searchInput,
|
|
394
|
-
selectedAddress,
|
|
395
|
-
onStandardizationChange,
|
|
396
|
-
selectedStandardizationAddress,
|
|
397
|
-
isLoading
|
|
398
|
-
} = useSearchAddress({
|
|
399
|
-
setValue,
|
|
400
|
-
onClose,
|
|
401
|
-
isOpen
|
|
218
|
+
};
|
|
219
|
+
reader.onerror = (error) => {
|
|
220
|
+
reject(error);
|
|
221
|
+
};
|
|
222
|
+
reader.readAsDataURL(file);
|
|
402
223
|
});
|
|
403
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
|
|
404
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
405
|
-
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
406
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
|
|
407
|
-
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
408
|
-
/* @__PURE__ */ jsxRuntime.jsx(InputBox$4, { clearable: true, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: onAddressSearchClear, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
409
|
-
Input$4,
|
|
410
|
-
{
|
|
411
|
-
...addressSearchStep !== "detail-input" && { autoFocus: true },
|
|
412
|
-
onChange: onSearch,
|
|
413
|
-
onKeyUp,
|
|
414
|
-
value: searchInput,
|
|
415
|
-
placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
|
|
416
|
-
size: "large"
|
|
417
|
-
}
|
|
418
|
-
) }),
|
|
419
|
-
addressSearchStep === "initial" && /* @__PURE__ */ jsxRuntime.jsx(AddressSearchInitialText, {}),
|
|
420
|
-
!isLoading && addressSearchStep === "search-result" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
421
|
-
AddressSearchResult,
|
|
422
|
-
{
|
|
423
|
-
onChange: onSelectChange,
|
|
424
|
-
addressSearchList,
|
|
425
|
-
searchKeyword: addressSearchKeyword,
|
|
426
|
-
selectedAddress
|
|
427
|
-
}
|
|
428
|
-
),
|
|
429
|
-
!isLoading && addressSearchStep === "detail-input" && selectedAddress && selectedStandardizationAddress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
430
|
-
AddressSearchDetailInput,
|
|
431
|
-
{
|
|
432
|
-
selectedStandardizationAddress,
|
|
433
|
-
onStandardizationChange,
|
|
434
|
-
onDetailChange: setDetail,
|
|
435
|
-
step: addressSearchStep,
|
|
436
|
-
detailAddressInput
|
|
437
|
-
}
|
|
438
|
-
)
|
|
439
|
-
] }),
|
|
440
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
441
|
-
salesFrontendDesignSystem.Button,
|
|
442
|
-
{
|
|
443
|
-
onClick: onAddressSearchNext,
|
|
444
|
-
variant: "primary",
|
|
445
|
-
size: "medium",
|
|
446
|
-
appearance: "filled",
|
|
447
|
-
width: "full",
|
|
448
|
-
children: [
|
|
449
|
-
addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
|
|
450
|
-
addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
|
|
451
|
-
]
|
|
452
|
-
}
|
|
453
|
-
) })
|
|
454
|
-
] })
|
|
455
|
-
] }) });
|
|
456
224
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
})
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
);
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
);
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
const
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
"\uC8FC\uC18C\uB97C \uC120\uD0DD\uD558\uC9C0 \uC54A\uC73C\uBA74 \uB2E4\uC74C \uB2E8\uACC4\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC8FC\uC18C\uB97C \uC120\uD0DD\uD55C \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.",
|
|
490
|
-
|
|
491
|
-
|
|
225
|
+
function getExt(data) {
|
|
226
|
+
if (typeof data === "string") {
|
|
227
|
+
return data.split(".").pop();
|
|
228
|
+
}
|
|
229
|
+
if (data instanceof File) {
|
|
230
|
+
return data.name.split(".").pop();
|
|
231
|
+
}
|
|
232
|
+
if (data instanceof Blob) {
|
|
233
|
+
return data.type.split("/").pop();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function downloadBlob(blob, filename) {
|
|
237
|
+
const url = URL.createObjectURL(blob);
|
|
238
|
+
const link = document.createElement("a");
|
|
239
|
+
link.style.display = "none";
|
|
240
|
+
link.href = url;
|
|
241
|
+
link.download = `${filename}.${getExt(blob)}`;
|
|
242
|
+
document.body.appendChild(link);
|
|
243
|
+
link.click();
|
|
244
|
+
document.body.removeChild(link);
|
|
245
|
+
URL.revokeObjectURL(url);
|
|
246
|
+
}
|
|
247
|
+
async function imageUrlToFile(imageUrl) {
|
|
248
|
+
const headers = new Headers();
|
|
249
|
+
headers.append("cache-control", "no-cache");
|
|
250
|
+
const resImage = await fetch(imageUrl, { headers });
|
|
251
|
+
const blob = await resImage.blob();
|
|
252
|
+
const { type } = blob;
|
|
253
|
+
const name = type.split("/").join(".");
|
|
254
|
+
const file = new File([blob], name, { type });
|
|
255
|
+
return file;
|
|
256
|
+
}
|
|
257
|
+
var astx2_min_default = "/* eslint-disable */\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 32070 $ */\nvar $ASTX2_CONST = {\n ERROR_SUCCESS: 0,\n ERROR_FAILED: 101,\n ERROR_NOINIT: 102,\n ERROR_NOTINST: 103,\n ERROR_NOTSUPPORTED: 104,\n ERROR_NOCONNECT: 105,\n ERROR_NCK: 106,\n ERROR_ERR: 107,\n ERROR_NSP: 108,\n ERROR_PARAM: 109,\n ERROR_EXCESS: 110,\n ERROR_NEEDUPDATE: 111,\n OPTION_NONE2E: 1,\n OPTION_AUTOFOCUS: 2,\n OPTION_AUTOSETTEXT: 4,\n OPTION_E2EFORM: 8,\n OPTION_E2EFORM_NOENC: 16,\n OPTION_E2EFORM_ALLTRIP: 32,\n OPTION_E2EFORM_ONLY: 64,\n OPTION_E2EFORM_TAGSET: 128,\n OPTION_NONE2E_ALG: 256,\n OPTION_NOSPTDUMMY: 512,\n OPTION_FIXEDTYPE: 1024,\n PROTECT_AK: 1,\n PROTECT_FW: 2,\n PROTECT_PB: 4,\n PROTECT_PCS: 8,\n SERVICE_AK: 1,\n REQUEST_JSONP: 1,\n REQUEST_AJAX: 2,\n DEBUG_NOALIVE: 1,\n INTERVAL_ALIVE: 5e3,\n E2ETYPE_EXCLUDE: -1,\n E2ETYPE_NONE: 0,\n E2ETYPE_CERT1: 1,\n E2ETYPE_CERT2: 2,\n E2ETYPE_SDK: 11,\n E2ETYPE_PLAIN1: 21,\n E2ETYPE_PLAIN2: 22,\n E2ETYPE_WIZVERA: 31,\n PAGEID: '',\n BROWSER_TYPE: '',\n BROWSER_VER: '',\n E2EFORM_TAIL: !0,\n E2EFORM_INIT: '_e2e_forminit',\n E2EFORM_TAG1: '_e2e_1__',\n E2EFORM_TAG2: '_e2e_2__',\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\n getErrno: function (a) {\n return 'NCK' == a ? this.ERROR_NCK : 'ERR' == a ? this.ERROR_ERR : 'NSP' == a ? this.ERROR_NSP : this.ERROR_FAILED;\n },\n _get_browser_version: function (a) {\n var b = 0;\n if (0 <= a.indexOf('Edge/') && ((b = parseInt(a.split('Edge/')[1])), 0 < b)) return 'EG' + b;\n if (0 <= a.indexOf('MSIE')) {\n if (((b = parseInt(a.split('MSIE')[1])), 0 < b)) return 'IE' + b;\n } else if (\n 0 <= a.indexOf('Trident') &&\n (0 <= a.indexOf('rv:')\n ? (b = parseInt(a.split('rv:')[1]))\n : 0 <= a.indexOf('IE') && (b = parseInt(a.split('IE')[1])),\n 0 < b)\n )\n return 'IE' + b;\n return 0 <= a.indexOf('OPR/') && ((b = parseInt(a.split('OPR/')[1])), 0 < b)\n ? 'OP' + b\n : 0 <= a.indexOf('Firefox/') && ((b = parseInt(a.split('Firefox/')[1])), 0 < b)\n ? 'FF' + b\n : 0 <= a.indexOf('Chrome/') && ((b = parseInt(a.split('Chrome/')[1])), 0 < b)\n ? 'CR' + b\n : 0 <= a.indexOf('AppleWebKit') &&\n 0 <= a.indexOf('Version/') &&\n ((b = parseInt(a.split('Version/')[1])), 0 < b)\n ? 'SF' + b\n : 'OT0';\n },\n init: function () {\n this.PAGEID = new Date().getTime();\n this.PAGEID -= Math.floor(100 * Math.random());\n this.BROWSER_VER = this._get_browser_version(navigator.userAgent);\n this.BROWSER_TYPE = this.BROWSER_VER.substring(0, 2);\n }\n};\n$ASTX2_CONST.init();\nvar $ASTX2_COMM = {\n mLocalServerURL: '',\n mClientPublicKey: '',\n mErrorAbortFlag: !1,\n mDegugFlags: 0,\n setDegugFlags: function (a) {\n this.mDegugFlags |= a;\n },\n getDegugFlags: function () {\n return this.mDegugFlags;\n },\n isEnable: function () {\n return 0 < this.mLocalServerURL.length ? !0 : !1;\n },\n uninit: function () {\n this.mLocalServerURL = '';\n },\n errorAbort: function (a) {\n 1 != this.mErrorAbortFlag && ((this.mErrorAbortFlag = !0), $ASTX2_CUST.errorAbort(a));\n }\n },\n $_astxu = {\n mJsonpSequence: 0,\n jsonQstr: function (a) {\n var b = [],\n c;\n for (c in a) a.hasOwnProperty(c) && b.push(encodeURIComponent(c) + '=' + encodeURIComponent(a[c]));\n return b.join('&');\n },\n jsonParse: function (a) {\n var b = a.indexOf('{'),\n c = a.indexOf('}');\n if (-1 == b || -1 == c) return {};\n a = a.substring(b, c + 1);\n return 'object' == typeof window.JSON && 'function' == typeof window.JSON.parse\n ? window.JSON.parse(a)\n : 'function' == typeof jQuery && 'function' == typeof jQuery.parseJSON\n ? jQuery.parseJSON(a)\n : eval('(' + a + ')');\n },\n _send_jsonp_jquery: function (a) {\n try {\n jQuery.ajax({\n url: a.src,\n timeout: a.timeout,\n cache: !1,\n crossDomain: !0,\n dataType: 'jsonp',\n contentType: 'application/javascript',\n success: function (b, d, e) {\n a.onSuccess(b);\n },\n error: function (b, d, e) {\n if (200 == b.status && 1 == a.nocallback) a.onSuccess();\n else a.onFailure();\n },\n complete: function (a, b) {}\n });\n } catch (b) {\n a.onFailure();\n }\n },\n _send_jsonp_dom: function (a) {\n var b = document.createElement('script');\n b.type = 'text/javascript';\n b.id = a.callback;\n b.async = a.async;\n b.src = a.src;\n var c = document.getElementsByTagName('body')[0];\n if (null == c && ((c = document.getElementsByTagName('head')[0]), null == c)) {\n a.onFailure();\n return;\n }\n var d = window.setTimeout(function () {\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && ((b.onerror = function () {}), c.removeChild(b));\n } catch (d) {}\n a.onFailure();\n }, a.timeout);\n 0 == a.nocallback\n ? (window[a.callback] = function (b) {\n window.clearTimeout(d);\n try {\n var f = document.getElementById(a.callback);\n f && c.removeChild(f);\n } catch (g) {}\n a.onSuccess(b);\n })\n : (b.onload = function () {\n window.clearTimeout(d);\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onSuccess();\n });\n b.onerror = function () {\n window.clearTimeout(d);\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onFailure();\n };\n c.appendChild(b);\n },\n sendJsonp: function (a) {\n null == a.data && (a.data = {});\n null == a.callback && (a.callback = 'jsonpCallback' + $_astxu.rnd());\n null == a.nocallback && (a.nocallback = !1);\n null == a.timeout && (a.timeout = 5e3);\n null == a.async && (a.async = !0);\n null == a.seq && (a.seq = !1);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function () {});\n a.src = 1 == $ASTX2.mUseJQuery ? a.url + '?v=3' : a.url + '?v=2&callback=' + a.callback;\n if (1 == a.seq) {\n var b = ++this.mJsonpSequence;\n a.src += '&seq=' + b;\n 2147483647 <= this.mJsonpSequence && (this.mJsonpSequence = 0);\n }\n b = this.jsonQstr(a.data);\n 0 < b.length && (a.src += '&' + b);\n 1 == $ASTX2.mUseJQuery ? this._send_jsonp_jquery(a) : this._send_jsonp_dom(a);\n },\n _get_xhr_object: function () {\n if ('undefined' !== typeof XMLHttpRequest)\n try {\n return new XMLHttpRequest();\n } catch (a) {}\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch (b) {}\n return null;\n },\n sendAjax: function (a) {\n var b = this._get_xhr_object();\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.send(c);\n }\n },\n sendAuthAjax: function (a) {\n var b = this._get_xhr_object();\n const stored = JSON.parse(sessionStorage.getItem('cust-mgmt-auth') || '{}');\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.setRequestHeader('Authorization', stored.key);\n b.withCredentials = true;\n b.send(c);\n }\n },\n isACK: function (a) {\n return a && 'ACK' == a ? !0 : !1;\n },\n isWinOS: function () {\n return -1 != navigator.platform.indexOf('Win32') || -1 != navigator.platform.indexOf('Win64') ? !0 : !1;\n },\n isMacOS: function () {\n return -1 != navigator.platform.indexOf('Mac') ? !0 : !1;\n },\n isLinuxOS: function () {\n return -1 != navigator.platform.indexOf('Linux') ? !0 : !1;\n },\n isMacLinuxOS: function () {\n return 1 == this.isMacOS() || 1 == this.isLinuxOS() ? !0 : !1;\n },\n hasFocused: function () {\n var a = !1;\n try {\n a = document.hasFocus();\n } catch (b) {}\n return a;\n },\n addEvent: function (a, b, c) {\n a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent('on' + b, c);\n },\n removeEvent: function (a, b, c) {\n a.removeEventListener ? a.removeEventListener(b, c) : a.detachEvent('on' + b, c);\n },\n getCreatedFormValue: function (a, b, c) {\n null == c && (c = !1);\n c = 1 == c ? document.getElementsByTagName('input') : a.getElementsByTagName('input');\n for (var d = 0; d < c.length; d++) {\n var e = c[d];\n if (e && this.getnc(e.name) == b) return e;\n }\n c = document.createElement('input');\n c.name = b;\n c.type = 'hidden';\n if ('function' === typeof $ASTX2_CUST.onCreatedFormValue) $ASTX2_CUST.onCreatedFormValue(c, b);\n a.appendChild(c);\n return c;\n },\n getHostPath: function () {\n var a = window.location.protocol + '//' + window.location.hostname;\n return (a += window.location.port ? ':' + window.location.port : '');\n },\n getnc: function (a, b) {\n null == b && (b = '');\n return null == a ? b : a;\n },\n getint: function (a, b) {\n null == b && (b = 0);\n return parseInt(a) || b;\n },\n rnd: function () {\n var a = new Date().getTime();\n return (a += new String(Math.floor(100 * Math.random())));\n },\n getKeyCode: function (a) {\n var b = null;\n a && (b = a.keyCode ? a.keyCode : a.which);\n return b;\n },\n xorEncode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n xorDecode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n ltrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(0, 1) == b; ) a = a.substring(1, a.length);\n return a;\n },\n rtrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(a.length - 1, a.length) == b; ) a = a.substring(0, a.length - 1);\n return a;\n },\n alltrim: function (a, b) {\n return this.ltrim(this.rtrim(a, b), b);\n },\n setInputFocus: function () {\n try {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (c && 'hidden' != c.type) {\n c.focus();\n break;\n }\n }\n } catch (d) {}\n },\n log: function (a) {\n 'object' === typeof debuger && 'function' === typeof debuger.write\n ? debuger.write(a)\n : 'object' === typeof window.console && 'function' === typeof console.log && console.log(a);\n },\n msg: function (a) {\n this.log(a);\n }\n },\n $ASTX2_E2E = (function () {\n var a = null,\n b = function (a) {\n function b(a) {\n var c = a.target;\n null == c && (c = a.srcElement);\n return c;\n }\n function e(a) {\n if (null == a) return null;\n var b = a.getAttribute('e2e_inputid');\n if (null == b || 0 >= b) return null;\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c) return null;\n var d = a.getAttribute('e2e_inputtype');\n if (null == d || 0 >= d) d = '';\n var e = a.getAttribute('wizvera_key');\n null == e && (e = '');\n var f = {};\n f.e2e_inputid = b;\n f.e2e_type = c;\n f.e2e_inputtype = d;\n f.name = $_astxu.getnc(a.name);\n f.form = a.form ? $_astxu.getnc(a.form.name) : '';\n f.wizvera_key = e;\n return f;\n }\n function f(a) {\n var b = e(a);\n if (null == b) return null;\n b.type = $_astxu.getnc(a.type);\n b.maxlength = $_astxu.getnc(a.getAttribute('maxlength'));\n b.txtmsk = $_astxu.getnc(a.getAttribute('e2e_txtmsk'));\n return b;\n }\n function g(a, b) {\n a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 && (a.readOnly = b);\n }\n function h(a, b, c, d, e) {\n 1 == n && q(a, b, c, d, e);\n }\n function q(b, s, d, e, f) {\n var g = {};\n g.pageid = $ASTX2_CONST.PAGEID;\n if (null != s) for (var h in s) s.hasOwnProperty(h) && (g[h] = s[h]);\n a.send_e2e_cmd(b, g, d, e, f);\n }\n function l(a, b) {\n var c = '';\n return (c = 0 == $ASTX2_CONST.E2EFORM_TAIL ? b + a : a + b);\n }\n function m(a, b) {\n var c = '';\n return (c =\n 'password' == a.type\n ? b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2_PWD)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1_PWD)\n : b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1));\n }\n function C() {\n if (0 != D)\n for (var a = document.getElementsByTagName('form'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (null != c) {\n var d = !1;\n if (k & $ASTX2_CONST.OPTION_E2EFORM_TAGSET) {\n var e = c.getAttribute(E.e2eform_tagset);\n if (null == e || 0 >= e) d = !0;\n } else if (k & $ASTX2_CONST.OPTION_E2EFORM_ONLY) {\n if (null == c) e = !1;\n else\n for (var e = !1, f = c.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = h.getAttribute('e2e_type')), null != h && 0 < h)) {\n e = !0;\n break;\n }\n }\n 0 == e && (d = !0);\n }\n if (1 != d) {\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG1))))\n d.value = F;\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG2))))\n d.value = G;\n }\n }\n }\n }\n function V(a) {\n var b = 0;\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b = 1);\n a = {\n ver: $_astxu.getint(a.ver),\n alg: $_astxu.getint(a.alg),\n svr: $_astxu.getnc(a.svr),\n norsa: $_astxu.getint(a.norsa),\n uniq: $_astxu.getnc(a.uniq),\n utime: $_astxu.getint(a.utime),\n ncert: $_astxu.getnc(a.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n noenc: b\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/e2e_forminit',\n data: a,\n onSuccess: function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n 0 == $_astxu.isACK(b)\n ? $_astxu.msg('[e2e_forminit] result=' + b)\n : ((D = !0), (F = $_astxu.getnc(a.e2e_form1)), (G = $_astxu.getnc(a.e2e_form2)), C());\n },\n onFailure: function () {\n $_astxu.msg('[e2e_forminit] failure.');\n }\n });\n }\n function W() {\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (a) {\n var b = $_astxu.jsonParse(a);\n a = $_astxu.getnc(b ? b.result : '');\n 0 == $_astxu.isACK(a)\n ? $_astxu.msg('[_init_e2eform] result=' + a)\n : $ASTX2.set_cert(\n function () {\n V(b);\n },\n function () {\n $_astxu.msg('[_init_e2eform] set_cert() failure');\n },\n b\n );\n },\n onFailure: function (a) {\n $_astxu.msg('[_init_e2eform] failure');\n }\n });\n }\n function H(a) {\n var b = $_astxu.getHostPath() + $_astxu.getnc(window.location.pathname),\n c = 0;\n k & $ASTX2_CONST.OPTION_NOSPTDUMMY && (c = 1);\n q(\n 'e2e_start',\n { browser: $ASTX2_CONST.BROWSER_VER, ver: a.ver, svr: a.svr, valg: a.valg, url: b, custcode: w, nospt: c },\n 5e3,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n if ($_astxu.isACK(b)) {\n n = 1;\n I = $_astxu.getint(a.call_settext);\n t = $_astxu.getint(a.call_gettext);\n J = $_astxu.getint(a.vm_env);\n K = $_astxu.getint(a.ak_drv);\n try {\n var c = document.activeElement;\n c && x(c, !1);\n } catch (aa) {}\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (3 > $_astxu.getint(a.stsvr) ? $ASTX2_COMM.errorAbort($ASTX2_CONST.ERROR_NEEDUPDATE) : W());\n if (k & $ASTX2_CONST.OPTION_AUTOSETTEXT)\n for (var d in u) (a = u[d]), null != a && (0 >= $_astxu.getnc(a.value).length || y(a));\n } else n = 2;\n },\n function () {\n n = 2;\n }\n );\n }\n function L(a) {\n if (0 == $_astxu.hasFocused()) return !1;\n if (0 == n) return !0;\n if (1 == n) {\n if (!1 === a) return;\n try {\n var b = document.activeElement;\n b && x(b, !1);\n } catch (c) {}\n return !0;\n }\n n = 0;\n k & $ASTX2_CONST.OPTION_NONE2E\n ? ((a = 0),\n k & $ASTX2_CONST.OPTION_NONE2E_ALG && (a = $ASTX2.mOptionStrings.none2e_alg),\n H({ ver: 1, svr: '_none2e', valg: a }))\n : $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_INIT),\n onSuccess: function (a) {\n a = $_astxu.jsonParse(a);\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b) ? H(a) : (n = -1);\n },\n onFailure: function (a) {\n n = -1;\n }\n });\n return !0;\n }\n function r(a) {\n if (null != a && (a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 || 0 != t)) {\n try {\n if (a != document.activeElement) return;\n } catch (b) {}\n 'number' == typeof a.selectionStart\n ? (a.selectionStart = a.selectionEnd = a.value.length)\n : 'undefined' != typeof a.createTextRange && ((a = a.createTextRange()), a.collapse(!1), a.select());\n }\n }\n function x(a, b) {\n v = !1;\n if (k & $ASTX2_CONST.OPTION_FIXEDTYPE && a) {\n var c = a.getAttribute('e2e_inputid');\n null != c && 0 < c && z[c] != a.type && (a.type = z[c]);\n }\n c = f(a);\n null != c &&\n (!0 === b && L(!1),\n h(\n 'e2e_focus',\n c,\n null,\n function (b) {\n g(a, !1);\n window.setTimeout(function () {\n r(a);\n }, 1);\n },\n function () {}\n ));\n }\n function M(a) {\n var c = b(a);\n if (null != c) {\n if ('function' === typeof $ASTX2_CUST.onHandlerPreFocus) $ASTX2_CUST.onHandlerPreFocus(c, a);\n x(c, !0);\n }\n }\n function N(a) {\n a = b(a);\n if (null != a) {\n var c = e(a);\n if (null != c) {\n try {\n if (document.hasFocus() && a === document.activeElement) return;\n } catch (f) {}\n g(a, !0);\n h('e2e_blur', c);\n }\n }\n }\n function O(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function y(a, b) {\n var c = f(a);\n if (null != c) {\n var d = $_astxu.getnc(a.value);\n c.text = d;\n k & $ASTX2_CONST.OPTION_E2EFORM && (c.e2eform = 1);\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (c.noenc = 1);\n h(\n 'e2e_settext',\n c,\n null,\n function (d) {\n var e = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(e)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n var e = m(a, c.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((e = $_astxu.getCreatedFormValue(a.form, e, f))) e.value = $_astxu.getnc(d.e2e_data);\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n }\n function A(a) {\n 'function' === typeof a.stopPropagation && a.stopPropagation();\n 'function' === typeof a.preventDefault ? a.preventDefault() : (a.returnValue = !1);\n }\n function X(a, b, c) {\n h(\n 'e2e_gettext',\n b,\n null,\n function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d)\n ? ((b = $_astxu.getnc(b.text)), (a.value = b), c && c($ASTX2_CONST.ERROR_SUCCESS))\n : c && c($ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c && c($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n function Y(a, b) {\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b.noenc = 1);\n h(\n 'e2e_formget',\n b,\n null,\n function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n if (0 == $_astxu.isACK(d)) $_astxu.msg('[e2e_formget] ' + b.name + ',result=' + d);\n else if (((d = a.form), null != d)) {\n var e = m(a, b.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((d = $_astxu.getCreatedFormValue(d, e, f))) d.value = $_astxu.getnc(c.e2e_data);\n }\n },\n function () {}\n );\n }\n function P(a) {\n var c = b(a);\n if (null != c) {\n var e = f(c);\n if (null != e) {\n r(c);\n var p = $_astxu.getKeyCode(a);\n 17 == p && (v = !0);\n if (1 == v)\n return (\n 86 == p &&\n h(\n 'e2e_clear',\n e,\n null,\n function (a) {\n c.value = '';\n },\n function () {}\n ),\n A(a),\n !1\n );\n if (1 == (16 == p || 17 == p || 18 == p ? !0 : !1)) return !0;\n var g = !0;\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n ((e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT1 && e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT2) || Y(c, e));\n 'function' === typeof $ASTX2_CUST.onHandlerKeyDown &&\n 0 == $ASTX2_CUST.onHandlerKeyDown(c, a) &&\n (A(a), (g = !1));\n 1 != t ||\n ('password' == c.type && e.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1) ||\n 0 != J ||\n (1 == g &&\n X(c, e, function () {\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1));\n }),\n 0 == (8 == p || 9 == p || 13 == p || 20 == p ? !0 : !1) && (A(a), (g = !1)));\n return g;\n }\n }\n }\n function Q(a) {\n var c = b(a);\n null != c &&\n (17 == $_astxu.getKeyCode(a) && (v = !1),\n 1 == I\n ? y(c)\n : 0 == t &&\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1)),\n window.setTimeout(function () {\n r(c);\n }, 1));\n }\n function R(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function S(a) {\n if ('IE' == $ASTX2_CONST.BROWSER_TYPE || 'EG' == $ASTX2_CONST.BROWSER_TYPE) {\n var c = b(a);\n null != c &&\n '' != c.value &&\n setTimeout(function () {\n if ('' == c.value) {\n var a = e(c);\n null != a && h('e2e_clear', a);\n }\n }, 1);\n }\n }\n function T(a) {\n var c = b(a);\n null != c &&\n ('number' == typeof c.selectionStart\n ? (c.selectionStart < c.value.length || c.selectionEnd < c.value.length) &&\n window.setTimeout(function () {\n r(c);\n }, 1)\n : 'undefined' != typeof c.createTextRange &&\n document.selection &&\n ((a = document.selection.createRange()),\n a.moveStart('character', -c.value.length),\n a.text.length <= c.value.length &&\n window.setTimeout(function () {\n r(c);\n }, 1)));\n }\n function Z(a) {}\n function U(a) {\n h('e2e_unload');\n }\n var k = 0,\n E = [],\n $ = 0,\n B = !1,\n w = 0,\n n = -1,\n I = 0,\n t = 0,\n J = 0,\n K = 1,\n v = !1,\n u = [],\n z = [],\n D = !1,\n F = '',\n G = '';\n this.setOption = function (a) {\n k |= a;\n };\n this.setOptionStrings = function (a) {\n E = a;\n };\n this.attach = function (a, b) {\n null != a && (w = a);\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && (u = []);\n k & $ASTX2_CONST.OPTION_E2EFORM && C();\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var e = c[d];\n null != e && this.addObject(e);\n }\n q(\n 'e2e_init',\n null,\n null,\n function (a) {\n L();\n $_astxu.addEvent(window, 'blur', Z);\n $_astxu.addEvent(window, 'unload', U);\n $_astxu.addEvent(window, 'beforeunload', U);\n b && b(!0);\n },\n function () {\n b && b(!1);\n }\n );\n B = !0;\n };\n this.addObject = function (a) {\n if (null != a) {\n var b = a.getAttribute('e2e_inputid');\n if (!(null != b && 0 < b)) {\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c)\n if (((c = a.getAttribute('e2e')), 'true' == c || 'on' == c))\n (c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c);\n else {\n c = $ASTX2_CONST.E2ETYPE_NONE;\n try {\n if (\n ('function' === typeof $ASTX2_CUST.isE2EObject &&\n 1 == $ASTX2_CUST.isE2EObject(a) &&\n ((c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c)),\n 'function' === typeof $ASTX2_CUST.getE2Etype)\n ) {\n var d = $ASTX2_CUST.getE2Etype(a);\n d && ((c = d), a.setAttribute('e2e_type', c));\n }\n } catch (e) {}\n if (c == $ASTX2_CONST.E2ETYPE_NONE) return;\n }\n b = ++$;\n a.setAttribute('e2e_inputid', b);\n d = !0;\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && 0 < a.value.length && ((d = !1), u.push(a));\n 1 == d && (a.value = '');\n a.setAttribute('autocomplete', 'off');\n g(a, !0);\n z[b] = a.type;\n $_astxu.addEvent(a, 'focus', M);\n $_astxu.addEvent(a, 'blur', N);\n $_astxu.addEvent(a, 'click', O);\n $_astxu.addEvent(a, 'keyup', Q);\n $_astxu.addEvent(a, 'keydown', P);\n $_astxu.addEvent(a, 'select', T);\n $_astxu.addEvent(a, 'mouseup', S);\n $_astxu.addEvent(a, 'mousedown', R);\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (c == $ASTX2_CONST.E2ETYPE_CERT1 || c == $ASTX2_CONST.E2ETYPE_CERT2) &&\n ((b = a.form),\n null != b &&\n ((a = m(a, c)),\n (c = !1),\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (c = !0),\n $_astxu.getCreatedFormValue(b, a, c)));\n }\n }\n };\n this.subObject = function (a) {\n var b = e(a);\n if (null != b) {\n $_astxu.removeEvent(a, 'focus', M);\n $_astxu.removeEvent(a, 'blur', N);\n $_astxu.removeEvent(a, 'click', O);\n $_astxu.removeEvent(a, 'keyup', Q);\n $_astxu.removeEvent(a, 'keydown', P);\n $_astxu.removeEvent(a, 'select', T);\n $_astxu.removeEvent(a, 'mouseup', S);\n $_astxu.removeEvent(a, 'mousedown', R);\n try {\n a == document.activeElement && h('e2e_blur', b);\n } catch (c) {}\n a.value = '';\n a.setAttribute('e2e_inputid', -1);\n a.setAttribute('e2e_type', -1);\n g(a, !1);\n }\n };\n this.getE2EHash = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gethash',\n c,\n null,\n function (a) {\n var c = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(c)\n ? b($_astxu.getnc(a.hash), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getEncText = function (a, b, c) {\n var d = e(a);\n d.customcode = w;\n d.random = b;\n null == d\n ? c(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'sdk_getenctext',\n d,\n null,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b)\n ? c(d.name, $_astxu.getnc(a.getenctext), $ASTX2_CONST.ERROR_SUCCESS)\n : c(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getE2EText = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : c.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 && c.e2e_type != $ASTX2_CONST.E2ETYPE_WIZVERA\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gettext',\n c,\n null,\n function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d)\n ? b(c.name, $_astxu.getnc(a.text), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.setE2EText = function (a, b) {\n y(a, b);\n };\n this.clearE2EText = function (a, b) {\n var c = e(a);\n null != c &&\n h(\n 'e2e_clear',\n c,\n null,\n function (d) {\n d = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(d)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n a.value = '';\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n d = m(a, c.e2e_type);\n var e = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (e = !0);\n if ((d = $_astxu.getCreatedFormValue(a.form, d, e))) d.value = '';\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.dettach = function () {\n h('e2e_uninit');\n B = !1;\n };\n this.isAttached = function () {\n return B;\n };\n this.isStarted = function () {\n return 1 == n ? !0 : !1;\n };\n this.checkService = function (a) {\n var b = {};\n b.service = $ASTX2_CONST.SERVICE_AK;\n b.result = $ASTX2_CONST.ERROR_SUCCESS;\n if (0 >= n) {\n var c = this;\n window.setTimeout(function () {\n c.checkService(a);\n }, 300);\n } else\n 1 == n && 0 == K\n ? (b.result = $ASTX2_CONST.ERROR_FAILED)\n : 2 == n && (b.result = $ASTX2_CONST.ERROR_FAILED),\n a(b);\n };\n this.getE2EelmsForm = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = e(h)), null != h && h.e2e_type == d)) {\n var k = !1;\n null == a ? (k = !0) : $_astxu.getnc(a.name) == h.form && (k = !0);\n 0 != k && (b.push(h.e2e_inputid), c.push(h.name));\n }\n }\n };\n this.getE2EelmsID = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h) {\n var k = e(h);\n if (null != k && k.e2e_type == d) {\n for (var l = !1, h = $_astxu.getnc(h.id).toLowerCase(), m = 0; m < a.length; m++)\n if (a[m].toLowerCase() == h) {\n l = !0;\n break;\n }\n 0 != l && (b.push(k.e2e_inputid), c.push(k.name));\n }\n }\n }\n };\n this.resetE2Evalues = function (a, b) {\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var f = c[d];\n if (null != f) {\n var g = e(f);\n null != g &&\n g.form == a &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1 &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 &&\n (f.value = b);\n }\n }\n };\n this.getE2Eattribute = function (a) {\n return e(a);\n };\n };\n return {\n getInstance: function (c) {\n null === a && (a = new b(c));\n return a;\n }\n };\n })(),\n $ASTX2 = {\n mUseJQuery: !0,\n mUseAjaxHello: !1,\n mUseAutoStart: !0,\n mOption: 0,\n mOptionStrings: [],\n mE2EInst: null,\n mLastError: $ASTX2_CONST.ERROR_SUCCESS,\n send_e2e_cmd: function (a, b, c, d, e, f) {\n if ('object' == typeof $ASTX2_COMM && 0 != $ASTX2_COMM.isEnable()) {\n var g = this;\n null == f && (f = 1);\n var h = !1;\n if ('e2e_focus' == a || 'e2e_blur' == a || 'e2e_gettext' == a || 'e2e_settext' == a) h = !0;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/' + a,\n data: b,\n timeout: c || 5e3,\n async: !1,\n seq: h,\n onSuccess: function (a) {\n d && d(a);\n },\n onFailure: function () {\n 3 > f ? g.send_e2e_cmd(a, b, c, d, e, f + 1) : e && e();\n }\n });\n }\n },\n _send_alive: function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/alive', data: a });\n },\n send_alive_run: function () {\n if (!($ASTX2_COMM.getDegugFlags() & $ASTX2_CONST.DEBUG_NOALIVE)) {\n var a = this;\n setInterval(function () {\n a._send_alive();\n }, $ASTX2_CONST.INTERVAL_ALIVE);\n }\n },\n _hello_local_server: function (a, b, c, d, e) {\n var f = this;\n if (d >= c.length)\n f.setLastError($ASTX2_CONST.ERROR_NOTINST),\n 1 == $_astxu.isWinOS() &&\n 1 == f.mUseAutoStart &&\n ((f.mUseAutoStart = !1),\n 'IE' != $ASTX2_CONST.BROWSER_TYPE &&\n 'EG' != $ASTX2_CONST.BROWSER_TYPE &&\n (window.location.href = 'astx://start')),\n b();\n else {\n var g = e[d],\n h = c[d],\n q = 'https://' + (1 == $_astxu.isMacOS() ? 'lx.astxsvc.com' : '127.0.0.1') + ':' + h + '/ASTX2',\n h = '',\n l = document.getElementsByTagName('script');\n if (l) for (var m = 0; m < l.length; m++) l[m].src && 0 <= l[m].src.indexOf('astx2.min.js') && (h = l[m].src);\n l = '$Revision: 32070 $';\n l = l.substr(11, l.length - 13);\n m = !1;\n 0 == $ASTX2.mUseAjaxHello && 1 == d % 2 && (m = !0);\n 'IE' == $ASTX2_CONST.BROWSER_TYPE &&\n 'IE10' != $ASTX2_CONST.BROWSER_VER &&\n 'IE11' != $ASTX2_CONST.BROWSER_VER &&\n ((m = !0), 2e3 < g && (g = 2e3));\n d++;\n 1 == m\n ? $_astxu.sendJsonp({\n url: q + '/hello',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n c = $_astxu.getnc(c ? c.client_public_key : '');\n $_astxu.isACK(d)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = c), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n })\n : $_astxu.sendAjax({\n url: q + '/hello?',\n type: 'POST',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.jsonParse(c);\n c = $_astxu.getnc(d ? d.result : '');\n d = $_astxu.getnc(d ? d.client_public_key : '');\n $_astxu.isACK(c)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = d), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n });\n }\n },\n setOption: function (a) {\n if (null != a) {\n !0 === a.autofocus && (this.mOption |= $ASTX2_CONST.OPTION_AUTOFOCUS);\n !0 === a.e2eform && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM);\n !1 === a.e2eform_enc && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_NOENC);\n !0 === a.e2eform_alltrip && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP);\n !0 === a.e2eform_only && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ONLY);\n !0 === a.autosettext && (this.mOption |= $ASTX2_CONST.OPTION_AUTOSETTEXT);\n !0 === a.nospt && (this.mOption |= $ASTX2_CONST.OPTION_NOSPTDUMMY);\n !0 === a.fixedtype && (this.mOption |= $ASTX2_CONST.OPTION_FIXEDTYPE);\n var b = $_astxu.getnc(a.e2eform_tagset);\n 0 < b.length &&\n ((this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_TAGSET), (this.mOptionStrings.e2eform_tagset = b));\n b = $_astxu.getint(a.none2e_alg);\n 0 < b && ((this.mOption |= $ASTX2_CONST.OPTION_NONE2E_ALG), (this.mOptionStrings.none2e_alg = b));\n }\n },\n _get_custom_value: function () {\n 'undefined' !== typeof $ASTX2_CUST.mUseJQuery && ($ASTX2.mUseJQuery = $ASTX2_CUST.mUseJQuery);\n 'undefined' !== typeof $ASTX2_CUST.mUseAjaxHello && ($ASTX2.mUseAjaxHello = $ASTX2_CUST.mUseAjaxHello);\n 'undefined' !== typeof $ASTX2_CUST.mUseAutoStart &&\n ($ASTX2.mUseAutoStart = 1 == $ASTX2.mUseAutoStart ? $ASTX2_CUST.mUseAutoStart : !1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAIL && ($ASTX2_CONST.E2EFORM_TAIL = $ASTX2_CUST.E2EFORM_TAIL);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_INIT && ($ASTX2_CONST.E2EFORM_INIT = $ASTX2_CUST.E2EFORM_INIT);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1 && ($ASTX2_CONST.E2EFORM_TAG1 = $ASTX2_CUST.E2EFORM_TAG1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2 && ($ASTX2_CONST.E2EFORM_TAG2 = $ASTX2_CUST.E2EFORM_TAG2);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG1_PWD = $ASTX2_CUST.E2EFORM_TAG1_PWD);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG2_PWD = $ASTX2_CUST.E2EFORM_TAG2_PWD);\n },\n init: function (a, b, c, d) {\n function e() {\n a();\n if (1 == $_astxu.isMacLinuxOS()) {\n f.send_alive_run();\n try {\n $ASTX2_MLi.init();\n } catch (b) {}\n }\n }\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (1 == $ASTX2_COMM.isEnable()) a();\n else {\n this._get_custom_value();\n null != d && ($ASTX2.mUseAutoStart = 1 == d ? $ASTX2.mUseAutoStart : !1);\n 1 == $ASTX2.mUseJQuery && 'undefined' === typeof jQuery && ($ASTX2.mUseJQuery = !1);\n var f = this;\n this.mE2EInst = $ASTX2_E2E.getInstance(this);\n this.mE2EInst.setOption(this.mOption);\n this.mE2EInst.setOptionStrings(this.mOptionStrings);\n var g = [],\n h = [];\n null != c\n ? ((g = [55920, 55920, 55921, 55922]), (h = [c, c, c, c]))\n : ((g = [55920, 55920, 55921, 55922]), (h = [1e4, 1500, 750, 250]));\n setTimeout(function () {\n f._hello_local_server(e, b, g, 0, h);\n }, 200);\n }\n },\n _check_local_server_chk_stamp: function (a, b, c, d) {\n var e = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_CHK_STAMP),\n data: d,\n onSuccess: function (c) {\n c = $_astxu.jsonParse(c);\n c = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(c) ? a() : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function (a) {\n b();\n }\n });\n },\n _check_local_server: function (a, b, c, d) {\n var e = this;\n null == d && (d = 1);\n 3 < d\n ? (e.setLastError($ASTX2_CONST.ERROR_NOCONNECT), b())\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/check',\n data: { method: c, url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_STAMP), rnd: $_astxu.rnd() },\n onSuccess: function (f) {\n var g = $_astxu.getnc(f ? f.result : '');\n $_astxu.isACK(g)\n ? ((f.rnd = $_astxu.rnd()), e._check_local_server_chk_stamp(a, b, c, f))\n : e._check_local_server(a, b, c, d + 1);\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n e._check_local_server(a, b, c, d + 1);\n }\n });\n },\n checkServer: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), b())\n : (0 == $_astxu.isWinOS() ? (c = 1) : null == c && (c = 1), this._check_local_server(a, b, c));\n },\n _e2e_enable: function () {\n return 0 == $_astxu.isWinOS()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOTSUPPORTED), !1)\n : 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), !1)\n : !0;\n },\n resetE2E: function (a, b) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) return !1;\n var c = this;\n window.setTimeout(function () {\n c.mE2EInst.attach(a, b);\n }, 100);\n return !0;\n },\n initE2E: function (a, b) {\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n resetNonE2E: function (a, b) {\n return this.initNonE2E(a, b);\n },\n initNonE2E: function (a, b) {\n this.mE2EInst.setOption($ASTX2_CONST.OPTION_NONE2E);\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n uninitE2E: function () {\n 1 == $_astxu.isWinOS() && 1 == $ASTX2_COMM.isEnable() && this.mE2EInst.dettach();\n },\n uninitNonE2E: function () {\n this.uninitE2E();\n },\n set_cert: function (a, b, c, d) {\n null == d && (d = 1);\n var e = new String($_astxu.getnc(c['cert' + d]));\n if (0 == e.length) 0 < d ? a() : b();\n else {\n var f = this;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_cert',\n data: { step: d, cert: e, pageid: $ASTX2_CONST.PAGEID },\n onSuccess: function (e) {\n setTimeout(function () {\n f.set_cert(a, b, c, d + 1);\n }, 250);\n },\n onFailure: function () {\n b();\n }\n });\n }\n },\n _e2edata_get: function (a, b, c, d) {\n var e = this;\n a = {\n ver: $_astxu.getint(d.ver),\n alg: $_astxu.getint(d.alg),\n svr: $_astxu.getnc(d.svr),\n norsa: $_astxu.getint(d.norsa),\n uniq: $_astxu.getnc(d.uniq),\n utime: $_astxu.getint(d.utime),\n ncert: $_astxu.getnc(d.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n ids1: a.ids1,\n names1: a.names1,\n ids2: a.ids2,\n names2: a.names2\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_data',\n data: a,\n timeout: 1e4,\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b(a) : (e.setLastError($ASTX2_CONST.ERROR_NCK), c());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n _e2edata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), c())\n : d.set_cert(\n function () {\n d._e2edata_get(a, b, c, f);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n c();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n getE2EData: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsForm(a, d, e, 1);\n this.mE2EInst.getE2EelmsForm(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n getE2EDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getE2EData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getE2EDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n getE2EDataIDs: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n null == a && (that.setLastError($ASTX2_CONST.ERROR_PARAM), c());\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsID(a, d, e, 1);\n this.mE2EInst.getE2EelmsID(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n setE2EData: function (a, b, c, d) {\n null == c && (c = !0);\n null == d && (d = '');\n var e = $_astxu.getnc(b.e2e_data1);\n 0 < e.length && ($_astxu.getCreatedFormValue(a, 'e2e_data1').value = e);\n b = $_astxu.getnc(b.e2e_data2);\n 0 < b.length && ($_astxu.getCreatedFormValue(a, 'e2e_data2').value = b);\n 1 == c && this.mE2EInst.resetE2Evalues($_astxu.getnc(a.name), d);\n },\n getE2EPageID: function () {\n return $ASTX2_CONST.PAGEID;\n },\n getE2EInputID: function (a) {\n a = this.mE2EInst.getE2Eattribute(a);\n return null == a ? null : a.e2e_inputid;\n },\n getE2EHash: function (a, b) {\n this.mE2EInst.getE2EHash(a, function (a, d) {\n b(a, d);\n });\n },\n getEncText: function (a, b, c) {\n this.mE2EInst.getEncText(a, b, function (a, b, f) {\n c(b, f);\n });\n },\n getE2EText: function (a, b) {\n this.mE2EInst.getE2EText(a, function (a, d, e) {\n b(d, e);\n });\n },\n getE2ETextS: function (a, b) {\n for (var c = 0, d = 0, e = [], f = 0; f < a.length; f++) {\n var g = a[f];\n null != g && ((g = g.getAttribute('e2e_type')), null != g && g == $ASTX2_CONST.E2ETYPE_PLAIN2 && c++);\n }\n if (0 == c || c != a.length) b(e, $ASTX2_CONST.ERROR_PARAM);\n else\n for (f = 0; f < a.length; f++)\n this.mE2EInst.getE2EText(a[f], function (a, f, g) {\n d >= c || (0 == g ? (e[a] = f) : (d = c), ++d >= c && b(e, g));\n });\n },\n setE2EText: function (a, b) {\n this.mE2EInst.setE2EText(a, b);\n },\n clearE2EText: function (a, b) {\n this.mE2EInst.clearE2EText(a, b);\n },\n clearE2EForm: function (a) {\n for (var b = document.getElementsByTagName('input'), c = 0; c < b.length; c++) {\n var d = b[c];\n null != d &&\n d.form.name == a &&\n 0 != ('text' == d.type || 'password' == d.type) &&\n null != d.getAttribute('e2e_type') &&\n this.mE2EInst.clearE2EText(d);\n }\n },\n addE2EObject: function (a, b) {\n null == b && (b = $ASTX2_CONST.E2ETYPE_CERT1);\n !a || ('text' != a.type && 'password' != a.type) || (a.setAttribute('e2e_type', b), this.mE2EInst.addObject(a));\n },\n subE2EObject: function (a) {\n a && this.mE2EInst.subObject(a);\n },\n setE2EAllExceptInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c &&\n 0 != ('text' == c.type || 'password' == c.type) &&\n null == c.getAttribute('e2e_type') &&\n c.setAttribute('e2e_type', $ASTX2_CONST.E2ETYPE_NONE);\n }\n },\n killFocusE2EAllInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c && 0 != ('text' == c.type || 'password' == c.type) && 0 < c.getAttribute('e2e_type') && c.blur();\n }\n },\n _pclogdata_get: function (a, b, c, d) {\n var e = this;\n c = {\n ver: $_astxu.getint(c.ver),\n alg: $_astxu.getint(c.alg),\n svr: $_astxu.getnc(c.svr),\n norsa: $_astxu.getint(c.norsa),\n uniq: $_astxu.getnc(c.uniq),\n utime: $_astxu.getint(c.utime),\n nlog: $_astxu.getnc(c.nlog),\n ipaddr: $_astxu.getnc(c.ipaddr),\n s2c_alg: $_astxu.getnc(c.s2c_alg),\n s2c_key: $_astxu.getnc(c.s2c_key),\n s2c_salt: $_astxu.getnc(c.s2c_salt),\n browser: $ASTX2_CONST.BROWSER_VER,\n pageid: $ASTX2_CONST.PAGEID,\n opt: d\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_pclog',\n data: c,\n timeout: 1e4,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(d) ? a(c) : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n _pclogdata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n data: { pclog: 1, client_public_key: $ASTX2_COMM.mClientPublicKey },\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), b())\n : d.set_cert(\n function () {\n d._pclogdata_get(a, b, f, c);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n b();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n getPCLOGData: function (a, b, c, d) {\n null == d && (d = '');\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable() ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), c()) : this._pclogdata(b, c, d);\n },\n getPCLOGDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getPCLOGData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getPCLOGDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n setPCLOGData: function (a, b) {\n var c = $_astxu.getnc(b.pclog_data);\n 0 < c.length && ($_astxu.getCreatedFormValue(a, 'pclog_data').value = c);\n },\n isVmEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isVmRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n checkService: function (a, b) {\n a == $ASTX2_CONST.SERVICE_AK && this.mE2EInst.checkService(b);\n },\n setProtect: function (a, b) {\n if (0 == $ASTX2_COMM.isEnable()) b && b($ASTX2_CONST.ERROR_NOINIT);\n else {\n var c = {\n customerid: $_astxu.getnc($ASTX2_CUST.mCustomerID),\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : -1,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : -1,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : -1,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : -1\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_protect',\n data: c,\n onSuccess: function (a) {\n a = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(a) ? b && b($ASTX2_CONST.ERROR_SUCCESS) : b && b($ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n });\n }\n },\n isNotSupportOS: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? b && b(null, $ASTX2_CONST.ERROR_NOINIT)\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_not_support_os',\n data: {\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : 0,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : 0,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : 0,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : 0\n },\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b && b(a, $ASTX2_CONST.ERROR_SUCCESS) : b && b(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n });\n },\n isAccessible: function (a, b, c, d, e) {\n null == e && (e = 750);\n if (a == $ASTX2_CONST.REQUEST_JSONP)\n $_astxu.sendJsonp({\n url: b,\n nocallback: !0,\n timeout: e,\n onSuccess: function () {\n c && c(b);\n },\n onFailure: function () {\n d && d(b);\n }\n });\n else {\n if (\n 0 != b.indexOf(window.location.protocol + '//' + window.location.host) &&\n 'IE' == $ASTX2_CONST.BROWSER_TYPE\n ) {\n if ('IE10' != $ASTX2_CONST.BROWSER_VER && 'IE11' != $ASTX2_CONST.BROWSER_VER) {\n d && d(b, 'CORS, not allowed browser');\n return;\n }\n if (0 != b.indexOf('http:') && 0 != b.indexOf('https:')) {\n d && d(b, 'CORS, not allowed protocol');\n return;\n }\n }\n $_astxu.sendAjax({\n url: b,\n type: 'GET',\n timeout: e,\n onSuccess: function (a) {\n c && c(b);\n },\n onFailure: function (a) {\n d && d(b, a);\n }\n });\n }\n },\n uninit: function () {\n this.uninitE2E();\n $ASTX2_COMM.uninit();\n },\n setLastError: function (a) {\n this.mLastError = a;\n },\n getLastError: function () {\n return this.mLastError;\n }\n };\n$ASTX2_MLi = {\n init: function () {\n setTimeout(function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/initForML', timeout: 1e3, data: a });\n }, 200);\n }\n};\n\nwindow.$ASTX2 = {\n ...$ASTX2,\n $ASTX2_COMM,\n $_astxu,\n $ASTX2_E2E,\n $ASTX2_MLi\n};\n\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\nconst getSubdomain = (hostname) => {\n if (!hostname || hostname === 'localhost' || hostname === '127.0.0.1') {\n return '';\n }\n\n const parts = hostname.split('.');\n\n // \uCD5C\uC18C 3\uAC1C \uBD80\uBD84\uC774 \uC788\uC5B4\uC57C \uC11C\uBE0C\uB3C4\uBA54\uC778 \uC874\uC7AC (subdomain.domain.com)\n if (parts.length < 3) {\n return '';\n }\n\n // \uCCAB \uBC88\uC9F8 \uBD80\uBD84\uC774 \uC11C\uBE0C\uB3C4\uBA54\uC778\n return parts[0] ?? '';\n};\n\n/**\n * \uD638\uC2A4\uD2B8\uBA85\uC744 \uAE30\uBC18\uC73C\uB85C \uD658\uACBD\uC744 \uD310\uB2E8\uD569\uB2C8\uB2E4.\n * @param hostname \uD638\uC2A4\uD2B8\uBA85\n * @returns \uD658\uACBD \uAD6C\uBD84 \uBB38\uC790\uC5F4 ('local' | 'dev' | 'stg' | 'prd')\n */\nconst getEnvironmentFromHostname = (hostname) => {\n const subDomain = getSubdomain(hostname);\n\n // localhost \uD310\uB2E8\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('localhost:')) {\n return 'local';\n }\n\n // dev \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes(`dev`)) {\n return 'dev';\n }\n\n // stg \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes('stg')) {\n return 'stg';\n }\n\n // \uAE30\uBCF8 \uC6B4\uC601\n return 'prd';\n};\n\nconst getServicePath = () => {\n if (typeof window.isStorybookEnv === 'boolean') {\n return '';\n } else {\n return `/${location.pathname.split('/')[1]}`;\n }\n};\n";
|
|
258
|
+
var astx2_custom_default = "/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\r\n/* eslint-disable */\r\n\r\nlet $ASTX2_CUST = {\r\n // Customer option\r\n /*\r\n mUseJQuery: false, // Whether to use JQuery. \r\n mUseAjaxHello: false,\r\n mUseAutoStart: false, \r\n E2EFORM_TAIL: true,\r\n E2EFORM_INIT: '_e2e_forminit',\r\n E2EFORM_TAG1: '_e2e_1__',\r\n E2EFORM_TAG2: '_e2e_2__',\r\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\r\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\r\n */\r\n\r\n mCustomerID: null, // Customer ID for setProtect.\r\n\r\n // ASTX2_CUST defined values\r\n URL_GET_INIT: 101,\r\n URL_GET_CERT: 102,\r\n URL_GET_STAMP: 103,\r\n URL_CHK_STAMP: 104,\r\n\r\n setCustomerID(customerID) {\r\n if (customerID !== null && customerID !== 'undefined') {\r\n this.mCustomerID = customerID;\r\n }\r\n },\r\n\r\n getURL(type) {\r\n let result = '';\r\n const timestamp = new Date().getTime();\r\n\r\n switch (type) {\r\n case this.URL_GET_INIT:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/init/get`;\r\n break;\r\n case this.URL_GET_CERT:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/cert/get?v=${timestamp}`; // WAF \uCC28\uB2E8 \uBC29\uC9C0 (post \uC694\uCCAD \uC2DC \uAC12\uC774 \uC5C6\uB294 \uACBD\uC6B0 \uCC28\uB2E8)\r\n break;\r\n case this.URL_GET_STAMP:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/stamp/get`;\r\n break;\r\n case this.URL_CHK_STAMP:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/stamp-chk/post`;\r\n break;\r\n } // end of switch\r\n\r\n return result;\r\n },\r\n\r\n isE2EObject(obj) {\r\n return false;\r\n },\r\n\r\n getE2Etype(obj) {\r\n return null;\r\n },\r\n\r\n onCreatedFormValue(obj, obj_name) {},\r\n\r\n onHandlerPreFocus(obj, event) {},\r\n\r\n onHandlerKeyDown(obj, event) {\r\n return true;\r\n },\r\n\r\n getErrorMessage(errno) {\r\n let message = '[ASTx] ';\r\n\r\n switch (errno) {\r\n case $ASTX2_CONST.ERROR_FAILED:\r\n message += '\uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOINIT:\r\n message += '\uCD08\uAE30\uD654\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTINST:\r\n message += '\uC124\uCE58\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTSUPPORTED:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 OS\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOCONNECT:\r\n message += '\uC11C\uBC84(Web) \uD1B5\uC2E0 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NCK:\r\n message += '\uC11C\uBC84(Local) \uC751\uB2F5 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_ERR:\r\n message += '\uC11C\uBC84(Local) \uB0B4\uBD80 \uC624\uB958\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NSP:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uB418\uC9C0 \uC54A\uB294 \uD658\uACBD\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_PARAM:\r\n message += '\uC798\uBABB\uB41C \uC778\uC790\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_EXCESS:\r\n message += '\uC7AC\uC2DC\uB3C4 \uD68C\uC218\uB97C \uCD08\uACFC \uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NEEDUPDATE:\r\n message += '\uC81C\uD488 \uC5C5\uB370\uC774\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n default:\r\n message += `errno=${errno}`;\r\n break;\r\n } // end of switch\r\n\r\n return message;\r\n },\r\n\r\n errorAbort(errno) {\r\n alert(this.getErrorMessage(errno));\r\n }\r\n};\r\n";
|
|
259
|
+
function addE2EObject(el, e2e_type) {
|
|
260
|
+
if (window.$ASTX2) {
|
|
261
|
+
window.$ASTX2.addE2EObject(el, e2e_type);
|
|
262
|
+
window.$ASTX2.resetE2E();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
var loadScript = (callback) => {
|
|
266
|
+
if (!window.$ASTX2) {
|
|
267
|
+
console.log("dynamic load");
|
|
268
|
+
const script = document.createElement("script");
|
|
269
|
+
script.innerHTML = `
|
|
270
|
+
${astx2_min_default}
|
|
271
|
+
${astx2_custom_default}
|
|
272
|
+
`;
|
|
273
|
+
document.head.appendChild(script);
|
|
274
|
+
script.onload = () => {
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
var init = ({
|
|
279
|
+
initSuccess = () => {
|
|
280
|
+
},
|
|
281
|
+
initFailure = () => {
|
|
282
|
+
},
|
|
283
|
+
checkServerSuccess = () => {
|
|
284
|
+
},
|
|
285
|
+
checkServerFailure = () => {
|
|
286
|
+
}
|
|
287
|
+
} = {}) => {
|
|
288
|
+
window.$ASTX2.init(
|
|
289
|
+
() => {
|
|
290
|
+
window.$ASTX2.initE2E();
|
|
291
|
+
window.$ASTX2.checkServer(
|
|
292
|
+
() => {
|
|
293
|
+
checkServerSuccess();
|
|
294
|
+
},
|
|
295
|
+
() => {
|
|
296
|
+
checkServerFailure();
|
|
297
|
+
console.error(`ASTX.checkServer() onFailure: errno=${window.$ASTX2.getLastError()}`);
|
|
298
|
+
}
|
|
492
299
|
);
|
|
493
|
-
|
|
300
|
+
initSuccess();
|
|
301
|
+
},
|
|
302
|
+
() => {
|
|
303
|
+
initFailure();
|
|
304
|
+
if (window.$ASTX2.getLastError() === 103) {
|
|
305
|
+
console.error("AhnLab Safe Transaction \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC124\uCE58\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
|
|
306
|
+
} else {
|
|
307
|
+
console.error(`$ASTX2.init() onFailure: errno=${window.$ASTX2.getLastError()}`);
|
|
308
|
+
}
|
|
494
309
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
310
|
+
);
|
|
311
|
+
};
|
|
312
|
+
var initASTX2 = ({
|
|
313
|
+
initSuccess = () => {
|
|
314
|
+
},
|
|
315
|
+
initFailure = () => {
|
|
316
|
+
},
|
|
317
|
+
checkServerSuccess = () => {
|
|
318
|
+
},
|
|
319
|
+
checkServerFailure = () => {
|
|
320
|
+
}
|
|
321
|
+
} = {}) => {
|
|
322
|
+
if (window.$ASTX2) {
|
|
323
|
+
init({
|
|
324
|
+
initSuccess,
|
|
325
|
+
initFailure,
|
|
326
|
+
checkServerSuccess,
|
|
327
|
+
checkServerFailure
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
function getE2EDataIDs(ids, onSuccess, onFailure = () => {
|
|
332
|
+
}) {
|
|
333
|
+
if (window.$ASTX2) {
|
|
334
|
+
window.$ASTX2.getE2EDataIDs(
|
|
335
|
+
ids,
|
|
336
|
+
async (astx_data) => {
|
|
337
|
+
onSuccess(astx_data);
|
|
338
|
+
},
|
|
339
|
+
() => {
|
|
340
|
+
onFailure();
|
|
341
|
+
console.log(`ASTX.getE2EData() onFailure: errno=${window.$ASTX2.getLastError()}`);
|
|
506
342
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
dayjs.locale("ko");
|
|
347
|
+
dayjs.extend(customParseFormat);
|
|
348
|
+
var convertDateString = ({ dateString, fromFormat, toFormat }) => {
|
|
349
|
+
return dayjs(dateString, fromFormat).format(toFormat);
|
|
350
|
+
};
|
|
351
|
+
var isDate = (value) => {
|
|
352
|
+
return value instanceof Date && !isNaN(+value);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const FormDatePicker = ({
|
|
356
|
+
name,
|
|
357
|
+
control,
|
|
358
|
+
disabled,
|
|
359
|
+
defaultValue,
|
|
360
|
+
...props
|
|
361
|
+
}) => {
|
|
362
|
+
const { field, fieldState } = reactHookForm.useController({ name, control, disabled, defaultValue });
|
|
363
|
+
const [selected, setSelected] = React.useState();
|
|
364
|
+
React.useEffect(() => {
|
|
365
|
+
if (isDate(field.value) && field.value !== selected) {
|
|
366
|
+
setSelected(field.value);
|
|
513
367
|
}
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
368
|
+
}, [field.value]);
|
|
369
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
370
|
+
salesFrontendDesignSystem.DatePicker,
|
|
371
|
+
{
|
|
372
|
+
tabIndex: 0,
|
|
373
|
+
...{
|
|
374
|
+
...props,
|
|
375
|
+
...field,
|
|
376
|
+
id: field.name,
|
|
377
|
+
defaultValue: selected,
|
|
378
|
+
error: fieldState.invalid,
|
|
379
|
+
onValueChange: field.onChange
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const FormDateRangePicker = ({
|
|
386
|
+
name,
|
|
387
|
+
control,
|
|
388
|
+
disabled,
|
|
389
|
+
defaultValue,
|
|
390
|
+
...props
|
|
391
|
+
}) => {
|
|
392
|
+
const { field, fieldState } = reactHookForm.useController({
|
|
393
|
+
name,
|
|
394
|
+
control,
|
|
395
|
+
disabled,
|
|
396
|
+
defaultValue
|
|
397
|
+
});
|
|
398
|
+
const [selected, setSelected] = React.useState();
|
|
399
|
+
React.useEffect(() => {
|
|
400
|
+
const fieldValue = field.value;
|
|
401
|
+
if (!fieldValue) {
|
|
402
|
+
setSelected(void 0);
|
|
522
403
|
return;
|
|
523
404
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
setStep("search-result");
|
|
529
|
-
setSelectedAddress(void 0);
|
|
530
|
-
setDetailAddressInput("");
|
|
531
|
-
setNextButtonDisabled(true);
|
|
405
|
+
const isStartDateDifferent = fieldValue.startDate?.getTime() !== selected?.startDate?.getTime();
|
|
406
|
+
const isEndDateDifferent = fieldValue.endDate?.getTime() !== selected?.endDate?.getTime();
|
|
407
|
+
if (!selected || isStartDateDifferent || isEndDateDifferent) {
|
|
408
|
+
setSelected(fieldValue);
|
|
532
409
|
}
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
410
|
+
}, [field.value]);
|
|
411
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
412
|
+
salesFrontendDesignSystem.DateRangePicker,
|
|
413
|
+
{
|
|
414
|
+
tabIndex: 0,
|
|
415
|
+
...{
|
|
416
|
+
...props,
|
|
417
|
+
...field,
|
|
418
|
+
id: field.name,
|
|
419
|
+
defaultValue: selected,
|
|
420
|
+
error: fieldState.invalid,
|
|
421
|
+
onValueChange: field.onChange
|
|
422
|
+
}
|
|
537
423
|
}
|
|
538
|
-
|
|
539
|
-
const onSelectChange = (e) => {
|
|
540
|
-
const selected = e.target.value;
|
|
541
|
-
if (selected) {
|
|
542
|
-
setSelectedAddress(JSON.parse(selected));
|
|
543
|
-
setNextButtonDisabled(false);
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
const onStandardizationChange = (e) => {
|
|
547
|
-
const selected = e.target.value;
|
|
548
|
-
if (selected) {
|
|
549
|
-
setSelectedStandardizationAddress(JSON.parse(selected));
|
|
550
|
-
setNextButtonDisabled(false);
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
const onClear = React.useCallback(() => {
|
|
554
|
-
setSearchKeyword("");
|
|
555
|
-
setSearchInput("");
|
|
556
|
-
setSelectedAddress(void 0);
|
|
557
|
-
setDetailAddressInput("");
|
|
558
|
-
setStep("initial");
|
|
559
|
-
}, []);
|
|
560
|
-
const setDetail = (e) => {
|
|
561
|
-
const detail = e.target.value;
|
|
562
|
-
setDetailAddressInput(detail);
|
|
563
|
-
if (detail) {
|
|
564
|
-
setNextButtonDisabled(false);
|
|
565
|
-
} else {
|
|
566
|
-
setNextButtonDisabled(true);
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
React.useEffect(() => {
|
|
570
|
-
if (searchType === "address" && addressData?.data?.addressList) {
|
|
571
|
-
setDisplayList(addressData.data.addressList);
|
|
572
|
-
} else if (searchType === "postalcode" && postalData?.data?.postalCodeList) {
|
|
573
|
-
console.log("transformedList", postalData.data.postalCodeList);
|
|
574
|
-
const transformedList = postalData.data.postalCodeList.map((p) => ({
|
|
575
|
-
firstPostalCode: p.originalNumber1PostalCode,
|
|
576
|
-
secondPostalCode: p.originalNumber2PostalCode,
|
|
577
|
-
roadNameBaseAddress: p.roadNameBaseAddress,
|
|
578
|
-
roadNameDetailAddress: p.roadNameDetailAddress,
|
|
579
|
-
landNumberBaseAddress: p.landNumberBaseAddress,
|
|
580
|
-
landNumberDetailAddress: p.landNumberDetailAddress,
|
|
581
|
-
mainBuildingName: p.mainBuildingName
|
|
582
|
-
}));
|
|
583
|
-
setDisplayList(transformedList);
|
|
584
|
-
}
|
|
585
|
-
}, [addressData, postalData, searchType]);
|
|
586
|
-
React.useEffect(() => {
|
|
587
|
-
if (isOpen) {
|
|
588
|
-
setSelectedAddress(void 0);
|
|
589
|
-
setDetailAddressInput("");
|
|
590
|
-
setStep("initial");
|
|
591
|
-
setSearchKeyword("");
|
|
592
|
-
}
|
|
593
|
-
}, [isOpen]);
|
|
594
|
-
React.useEffect(() => {
|
|
595
|
-
const road = standardizedData?.data?.addressStandardizationList[1];
|
|
596
|
-
const land = standardizedData?.data?.addressStandardizationList[2];
|
|
597
|
-
if (road && land) {
|
|
598
|
-
setSelectedStandardizationAddress({
|
|
599
|
-
land,
|
|
600
|
-
road
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
}, [standardizedData]);
|
|
604
|
-
return {
|
|
605
|
-
selectedStandardizationAddress,
|
|
606
|
-
onStandardizationChange,
|
|
607
|
-
onAddressSearchClear: onClear,
|
|
608
|
-
onAddressSearchNext: onNext,
|
|
609
|
-
addressSearchKeyword: searchKeyword,
|
|
610
|
-
addressSearchList: displayList,
|
|
611
|
-
addressSearchStep: step,
|
|
612
|
-
selectedAddress,
|
|
613
|
-
addressSearchOnValueChange: onSelectChange,
|
|
614
|
-
nextButtonDisabled,
|
|
615
|
-
detailAddressInput,
|
|
616
|
-
onSearch,
|
|
617
|
-
onKeyUp,
|
|
618
|
-
onSelectChange,
|
|
619
|
-
setDetail,
|
|
620
|
-
search,
|
|
621
|
-
searchInput,
|
|
622
|
-
isLoading: isLoadingAddress || isLoadingPostalCode
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
const useAddressComponent = () => {
|
|
626
|
-
const [fullAddress, setFullAddress] = React.useState();
|
|
627
|
-
const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
|
|
628
|
-
const AddressSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
|
|
629
|
-
return {
|
|
630
|
-
fullAddress,
|
|
631
|
-
openModal,
|
|
632
|
-
AddressSearchComponent
|
|
633
|
-
};
|
|
424
|
+
);
|
|
634
425
|
};
|
|
635
426
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
427
|
+
var bind = {exports: {}};
|
|
428
|
+
|
|
429
|
+
/*!
|
|
430
|
+
Copyright (c) 2018 Jed Watson.
|
|
431
|
+
Licensed under the MIT License (MIT), see
|
|
432
|
+
http://jedwatson.github.io/classnames
|
|
433
|
+
*/
|
|
434
|
+
|
|
435
|
+
var hasRequiredBind;
|
|
436
|
+
|
|
437
|
+
function requireBind () {
|
|
438
|
+
if (hasRequiredBind) return bind.exports;
|
|
439
|
+
hasRequiredBind = 1;
|
|
440
|
+
(function (module) {
|
|
441
|
+
/* global define */
|
|
442
|
+
|
|
443
|
+
(function () {
|
|
444
|
+
|
|
445
|
+
var hasOwn = {}.hasOwnProperty;
|
|
446
|
+
|
|
447
|
+
function classNames () {
|
|
448
|
+
var classes = '';
|
|
449
|
+
|
|
450
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
451
|
+
var arg = arguments[i];
|
|
452
|
+
if (arg) {
|
|
453
|
+
classes = appendClass(classes, parseValue.call(this, arg));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
return classes;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function parseValue (arg) {
|
|
461
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
462
|
+
return this && this[arg] || arg;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (typeof arg !== 'object') {
|
|
466
|
+
return '';
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (Array.isArray(arg)) {
|
|
470
|
+
return classNames.apply(this, arg);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
474
|
+
return arg.toString();
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
var classes = '';
|
|
478
|
+
|
|
479
|
+
for (var key in arg) {
|
|
480
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
481
|
+
classes = appendClass(classes, this && this[key] || key);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
return classes;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
function appendClass (value, newClass) {
|
|
489
|
+
if (!newClass) {
|
|
490
|
+
return value;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (value) {
|
|
494
|
+
return value + ' ' + newClass;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return value + newClass;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
if (module.exports) {
|
|
501
|
+
classNames.default = classNames;
|
|
502
|
+
module.exports = classNames;
|
|
503
|
+
} else {
|
|
504
|
+
window.classNames = classNames;
|
|
505
|
+
}
|
|
506
|
+
}());
|
|
507
|
+
} (bind));
|
|
508
|
+
return bind.exports;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
var bindExports = requireBind();
|
|
512
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(bindExports);
|
|
513
|
+
|
|
514
|
+
const highlightOnSearchKeyword = (originalText, targetString) => {
|
|
515
|
+
if (!targetString || !originalText?.includes(targetString)) {
|
|
516
|
+
return originalText;
|
|
644
517
|
}
|
|
645
|
-
];
|
|
646
|
-
const
|
|
647
|
-
{
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
codeVal: "003",
|
|
655
|
-
codeName: "\uAE30\uC5C5\uC740\uD589",
|
|
656
|
-
replaceName: "\uAE30\uC5C5",
|
|
657
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKiup, {})
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
codeVal: "004",
|
|
661
|
-
codeName: "\uAD6D\uBBFC\uC740\uD589",
|
|
662
|
-
replaceName: "\uAD6D\uBBFC",
|
|
663
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKukmin, {})
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
codeVal: "007",
|
|
667
|
-
codeName: "\uC218\uD611\uC740\uD589",
|
|
668
|
-
replaceName: "\uC218\uD611",
|
|
669
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSuhyeop, {})
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
codeVal: "009",
|
|
673
|
-
codeName: "\uC7A5\uAE30\uC2E0\uC6A9\uC740\uD589",
|
|
674
|
-
replaceName: "\uC7A5\uAE30\uC2E0\uC6A9",
|
|
675
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJangGiSinYong, {})
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
codeVal: "011",
|
|
679
|
-
codeName: "\uB18D\uD611\uC740\uD589",
|
|
680
|
-
replaceName: "NH\uB18D\uD611",
|
|
681
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankNhNonghyeop, {})
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
codeVal: "012",
|
|
685
|
-
codeName: "\uB18D\uC870",
|
|
686
|
-
replaceName: "\uC9C0\uC5ED\uB18D\uD611",
|
|
687
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJiyeokNonghyeop, {})
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
codeVal: "020",
|
|
691
|
-
codeName: "\uC6B0\uB9AC\uC740\uD589",
|
|
692
|
-
replaceName: "\uC6B0\uB9AC",
|
|
693
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankWoori, {})
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
codeVal: "023",
|
|
697
|
-
codeName: "\uC2A4\uD0E0\uB2E4\uB4DC\uCC28\uD0C0\uB4DC",
|
|
698
|
-
replaceName: "SC\uC81C\uC77C",
|
|
699
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankScJeil, {})
|
|
700
|
-
},
|
|
701
|
-
{
|
|
702
|
-
codeVal: "026",
|
|
703
|
-
codeName: "(\uAD6C)\uC2E0\uD55C\uC740\uD589",
|
|
704
|
-
replaceName: "\uC2E0\uD55C",
|
|
705
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhan, {})
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
codeVal: "027",
|
|
709
|
-
codeName: "\uD55C\uAD6D\uC528\uD2F0\uC740\uD589",
|
|
710
|
-
replaceName: "\uD55C\uAD6D\uC528\uD2F0",
|
|
711
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankHankookCity, {})
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
codeVal: "031",
|
|
715
|
-
codeName: "iM(\uB300\uAD6C)\uBC45\uD06C",
|
|
716
|
-
replaceName: "\uB300\uAD6C",
|
|
717
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankDaegu, {})
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
codeVal: "032",
|
|
721
|
-
codeName: "\uBD80\uC0B0\uC740\uD589",
|
|
722
|
-
replaceName: "\uBD80\uC0B0",
|
|
723
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankBusan, {})
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
codeVal: "034",
|
|
727
|
-
codeName: "\uAD11\uC8FC\uC740\uD589",
|
|
728
|
-
replaceName: "\uAD11\uC8FC",
|
|
729
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankGwangju, {})
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
codeVal: "035",
|
|
733
|
-
codeName: "\uC81C\uC8FC\uC740\uD589",
|
|
734
|
-
replaceName: "\uC81C\uC8FC",
|
|
735
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeju, {})
|
|
736
|
-
},
|
|
737
|
-
{
|
|
738
|
-
codeVal: "037",
|
|
739
|
-
codeName: "\uC804\uBD81\uC740\uD589",
|
|
740
|
-
replaceName: "\uC804\uBD81",
|
|
741
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeonbuk, {})
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
codeVal: "039",
|
|
745
|
-
codeName: "\uACBD\uB0A8\uC740\uD589",
|
|
746
|
-
replaceName: "\uACBD\uB0A8",
|
|
747
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankGyeongnam, {})
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
codeVal: "045",
|
|
751
|
-
codeName: "\uC0C8\uB9C8\uC744\uAE08\uACE0\uC911\uC559\uD68C",
|
|
752
|
-
replaceName: "\uC0C8\uB9C8\uC744\uAE08\uACE0",
|
|
753
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSaemaulGeumgo, {})
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
codeVal: "048",
|
|
757
|
-
codeName: "\uC2E0\uD611",
|
|
758
|
-
replaceName: "\uC2E0\uD611",
|
|
759
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhyeop, {})
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
codeVal: "050",
|
|
763
|
-
codeName: "\uC800\uCD95\uC740\uD589",
|
|
764
|
-
replaceName: "\uC800\uCD95",
|
|
765
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeochuk, {})
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
codeVal: "054",
|
|
769
|
-
codeName: "HSBC\uC740\uD589",
|
|
770
|
-
replaceName: "HSBC",
|
|
771
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankHsbc, {})
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
codeVal: "056",
|
|
775
|
-
codeName: "\uC5D0\uC774\uBE44\uC5D4\uC554\uB85C\uC740\uD589",
|
|
776
|
-
replaceName: "\uC5D0\uC774\uBE44\uC5D4\uC554\uB85C",
|
|
777
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankABNAMRO, {})
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
codeVal: "064",
|
|
781
|
-
codeName: "\uC0B0\uB9BC\uC870\uD569\uC911\uC559\uD68C",
|
|
782
|
-
replaceName: "\uC0B0\uB9BC\uC870\uD569",
|
|
783
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSanlim, {})
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
codeVal: "071",
|
|
787
|
-
codeName: "\uC6B0\uCCB4\uAD6D",
|
|
788
|
-
replaceName: "\uC6B0\uCCB4\uAD6D",
|
|
789
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankPost, {})
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
codeVal: "081",
|
|
793
|
-
codeName: "KEB\uD558\uB098\uC740\uD589",
|
|
794
|
-
replaceName: "KEB\uD558\uB098",
|
|
795
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKebHana, {})
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
codeVal: "088",
|
|
799
|
-
codeName: "\uC2E0\uD55C\uC740\uD589",
|
|
800
|
-
replaceName: "\uC2E0\uD55C",
|
|
801
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhan, {})
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
codeVal: "089",
|
|
805
|
-
codeName: "\uCF00\uC774\uBC45\uD06C",
|
|
806
|
-
replaceName: "\uCF00\uC774\uBC45\uD06C",
|
|
807
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKBank, {})
|
|
808
|
-
},
|
|
809
|
-
{
|
|
810
|
-
codeVal: "090",
|
|
811
|
-
codeName: "\uCE74\uCE74\uC624\uBC45\uD06C",
|
|
812
|
-
replaceName: "\uCE74\uCE74\uC624\uBC45\uD06C",
|
|
813
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKakaoBank, {})
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
codeVal: "092",
|
|
817
|
-
codeName: "\uD1A0\uC2A4\uBC45\uD06C",
|
|
818
|
-
replaceName: "\uD1A0\uC2A4\uBC45\uD06C",
|
|
819
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankTossBank, {})
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
codeVal: "209",
|
|
823
|
-
codeName: "\uC720\uC548\uD0C0\uC99D\uAD8C",
|
|
824
|
-
replaceName: "\uC720\uC548\uD0C0\uC99D\uAD8C",
|
|
825
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockYuantaJeungkwon, {})
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
codeVal: "218",
|
|
829
|
-
codeName: "KB\uC99D\uAD8C",
|
|
830
|
-
replaceName: "KB\uC99D\uAD8C",
|
|
831
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKbJeungkwon, {})
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
codeVal: "230",
|
|
835
|
-
codeName: "\uBBF8\uB798\uC5D0\uC14B\uC99D\uAD8C",
|
|
836
|
-
replaceName: "\uBBF8\uB798\uC5D0\uC14B\uC99D\uAD8C",
|
|
837
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMiraeAssetJeungkwon, {})
|
|
838
|
-
},
|
|
839
|
-
{
|
|
840
|
-
codeVal: "238",
|
|
841
|
-
codeName: "\uB300\uC6B0\uC99D\uAD8C",
|
|
842
|
-
replaceName: "\uB300\uC6B0\uC99D\uAD8C",
|
|
843
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMiraeAssetJeungkwon, {})
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
codeVal: "240",
|
|
847
|
-
codeName: "\uC0BC\uC131\uC99D\uAD8C",
|
|
848
|
-
replaceName: "\uC0BC\uC131\uC99D\uAD8C",
|
|
849
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSamsungJeungkwon, {})
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
codeVal: "243",
|
|
853
|
-
codeName: "\uD55C\uAD6D\uD22C\uC790\uC99D\uAD8C",
|
|
854
|
-
replaceName: "\uD55C\uAD6D\uD22C\uC790\uC99D\uAD8C",
|
|
855
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHankookTujajeungkwon, {})
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
codeVal: "247",
|
|
859
|
-
codeName: "\uC6B0\uB9AC\uD22C\uC790\uC99D\uAD8C",
|
|
860
|
-
replaceName: "NH(\uC6B0\uB9AC)\uD22C\uC790\uC99D\uAD8C",
|
|
861
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockNhWooriTujajeungkwon, {})
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
codeVal: "261",
|
|
865
|
-
codeName: "\uAD50\uBCF4\uC99D\uAD8C",
|
|
866
|
-
replaceName: "\uAD50\uBCF4\uC99D\uAD8C",
|
|
867
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockGyoboJeungkwon, {})
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
codeVal: "262",
|
|
871
|
-
codeName: "\uD558\uC774\uD22C\uC790\uC99D\uAD8C",
|
|
872
|
-
replaceName: "\uD558\uC774\uD22C\uC790\uC99D\uAD8C",
|
|
873
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHiTujajeungkwon, {})
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
codeVal: "263",
|
|
877
|
-
codeName: "\uD604\uB300\uCC28\uD22C\uC790\uC99D\uAD8C",
|
|
878
|
-
replaceName: "\uD604\uB300\uCC28\uC99D\uAD8C",
|
|
879
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHyundaiChaJeungkwon, {})
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
codeVal: "264",
|
|
883
|
-
codeName: "\uD0A4\uC6C0\uC99D\uAD8C",
|
|
884
|
-
replaceName: "\uD0A4\uC6C0\uC99D\uAD8C",
|
|
885
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKiwoomJeungkwon, {})
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
codeVal: "266",
|
|
889
|
-
codeName: "SK\uC99D\uAD8C",
|
|
890
|
-
replaceName: "SK\uC99D\uAD8C",
|
|
891
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSkJeungkwon, {})
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
codeVal: "267",
|
|
895
|
-
codeName: "\uB300\uC2E0\uC99D\uAD8C",
|
|
896
|
-
replaceName: "\uB300\uC2E0\uC99D\uAD8C",
|
|
897
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockDaesinJeungkwon, {})
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
codeVal: "269",
|
|
901
|
-
codeName: "\uD55C\uD654\uC99D\uAD8C",
|
|
902
|
-
replaceName: "\uD55C\uD654\uD22C\uC790\uC99D\uAD8C",
|
|
903
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHanwhaTujajeungkwon, {})
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
codeVal: "270",
|
|
907
|
-
codeName: "\uD558\uB098\uB300\uD22C\uC99D\uAD8C",
|
|
908
|
-
replaceName: "\uD558\uB098\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
909
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHanaGeumyungTujajeungkwon, {})
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
codeVal: "278",
|
|
913
|
-
codeName: "\uC2E0\uD55C\uAE08\uC735\uD22C\uC790",
|
|
914
|
-
replaceName: "\uC2E0\uD55C\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
915
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSinhanTujajeungkwon, {})
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
codeVal: "279",
|
|
919
|
-
codeName: "\uB3D9\uBD80\uC99D\uAD8C",
|
|
920
|
-
replaceName: "DB\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
921
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockDbGeumyungTujajeungkwon, {})
|
|
922
|
-
},
|
|
923
|
-
{
|
|
924
|
-
codeVal: "280",
|
|
925
|
-
codeName: "\uC720\uC9C4\uD22C\uC790\uC99D\uAD8C",
|
|
926
|
-
replaceName: "\uC720\uC9C4\uD22C\uC790\uC99D\uAD8C",
|
|
927
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockYujinTujajeungkwon, {})
|
|
928
|
-
},
|
|
929
|
-
{
|
|
930
|
-
codeVal: "287",
|
|
931
|
-
codeName: "\uBA54\uB9AC\uCE20\uC99D\uAD8C",
|
|
932
|
-
replaceName: "\uBA54\uB9AC\uCE20\uC99D\uAD8C",
|
|
933
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMeritzJeungkwon, {})
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
codeVal: "288",
|
|
937
|
-
codeName: "\uCE74\uCE74\uC624\uD398\uC774\uC99D\uAD8C",
|
|
938
|
-
replaceName: "\uCE74\uCE74\uC624\uD398\uC774\uC99D\uAD8C",
|
|
939
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKakaoPayJeungkwon, {})
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
codeVal: "289",
|
|
943
|
-
codeName: "NH\uD22C\uC790\uC99D\uAD8C",
|
|
944
|
-
replaceName: "NH\uD22C\uC790\uC99D\uAD8C",
|
|
945
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockNhTujajeungkwon, {})
|
|
946
|
-
},
|
|
947
|
-
{
|
|
948
|
-
codeVal: "290",
|
|
949
|
-
codeName: "\uBD80\uAD6D\uC99D\uAD8C",
|
|
950
|
-
replaceName: "\uBD80\uAD6D\uC99D\uAD8C",
|
|
951
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockBugukJeungkwon, {})
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
codeVal: "291",
|
|
955
|
-
codeName: "\uC2E0\uC601\uC99D\uAD8C",
|
|
956
|
-
replaceName: "\uC2E0\uC601\uC99D\uAD8C",
|
|
957
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSinyeongJeungkwon, {})
|
|
518
|
+
const replacedText = [];
|
|
519
|
+
const splitText = originalText.split(targetString);
|
|
520
|
+
for (let i = 0; i < splitText.length; i++) {
|
|
521
|
+
replacedText.push(splitText[i] || "");
|
|
522
|
+
if (i < splitText.length - 1) {
|
|
523
|
+
replacedText.push(
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: targetString }, `search-keyword-highlight-${i}-${Math.random()}`)
|
|
525
|
+
);
|
|
526
|
+
}
|
|
958
527
|
}
|
|
959
|
-
|
|
528
|
+
return replacedText;
|
|
529
|
+
};
|
|
530
|
+
const getGenderName = (genderCode) => {
|
|
531
|
+
switch (genderCode) {
|
|
532
|
+
case "1":
|
|
533
|
+
case "3":
|
|
534
|
+
return "\uB0A8\uC131";
|
|
535
|
+
case "2":
|
|
536
|
+
case "4":
|
|
537
|
+
return "\uC5EC\uC131";
|
|
538
|
+
default:
|
|
539
|
+
return "";
|
|
540
|
+
}
|
|
541
|
+
};
|
|
960
542
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
543
|
+
const cx$k = classNames.bind(styles);
|
|
544
|
+
const { InputBox: InputBox$4, Input: Input$4 } = salesFrontendDesignSystem.FormCore;
|
|
545
|
+
const AddressSearchInitialText = () => {
|
|
546
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$k("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
|
|
548
|
+
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$k("guide"), children: [
|
|
549
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
|
|
550
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
|
|
551
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
|
|
552
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) \uC5EC\uC758\uB3C4\uB3D9, \uC5ED\uC0BC\uB3D9" }),
|
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC6B0\uD3B8\uBC88\uD638 \uB2E4\uC12F\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
|
|
554
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 07345, 06232" })
|
|
555
|
+
] })
|
|
556
|
+
] });
|
|
557
|
+
};
|
|
558
|
+
const AddressSearchResult = ({
|
|
559
|
+
addressSearchList,
|
|
560
|
+
onChange,
|
|
561
|
+
searchKeyword,
|
|
562
|
+
selectedAddress
|
|
563
|
+
}) => {
|
|
564
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
|
|
565
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$k("guide-title"), children: [
|
|
566
|
+
"\uCD1D ",
|
|
567
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: addressSearchList.length }),
|
|
568
|
+
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
569
|
+
] }),
|
|
570
|
+
addressSearchList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
571
|
+
salesFrontendDesignSystem.RadioGroup,
|
|
572
|
+
{
|
|
573
|
+
items: addressSearchList.map((item) => {
|
|
574
|
+
return {
|
|
575
|
+
value: JSON.stringify(item),
|
|
576
|
+
select: item.roadNameBaseAddress === selectedAddress?.roadNameBaseAddress && item.roadNameDetailAddress === selectedAddress?.roadNameDetailAddress && item.mainBuildingName === selectedAddress?.mainBuildingName,
|
|
577
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result"), children: [
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("zipcode"), children: highlightOnSearchKeyword(`${item.firstPostalCode}${item.secondPostalCode}`, searchKeyword) }),
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("divider") }),
|
|
580
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("address-info"), children: [
|
|
581
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("address"), children: highlightOnSearchKeyword(
|
|
582
|
+
`${item.roadNameBaseAddress} ${item.roadNameDetailAddress} ${item.mainBuildingName}`,
|
|
583
|
+
searchKeyword
|
|
584
|
+
) }),
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("old-address"), children: highlightOnSearchKeyword(
|
|
586
|
+
`${item.landNumberBaseAddress} ${item.landNumberDetailAddress}`,
|
|
587
|
+
searchKeyword
|
|
588
|
+
) })
|
|
589
|
+
] })
|
|
590
|
+
] }),
|
|
591
|
+
id: JSON.stringify(item)
|
|
592
|
+
};
|
|
593
|
+
}),
|
|
594
|
+
className: cx$k("radio-group"),
|
|
595
|
+
name: "address-search",
|
|
596
|
+
size: "medium",
|
|
597
|
+
defaultValue: "",
|
|
598
|
+
onChange
|
|
599
|
+
}
|
|
600
|
+
),
|
|
601
|
+
addressSearchList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
602
|
+
"`",
|
|
603
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
604
|
+
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
605
|
+
] })
|
|
606
|
+
] });
|
|
607
|
+
};
|
|
608
|
+
const AddressSearchDetailInput = ({
|
|
609
|
+
selectedStandardizationAddress,
|
|
610
|
+
onDetailChange,
|
|
611
|
+
step,
|
|
612
|
+
onStandardizationChange,
|
|
613
|
+
detailAddressInput
|
|
614
|
+
}) => {
|
|
615
|
+
const { land, road } = selectedStandardizationAddress;
|
|
616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
|
|
617
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
618
|
+
salesFrontendDesignSystem.Radio.Root,
|
|
619
|
+
{
|
|
620
|
+
name: "address-search-standardization",
|
|
621
|
+
size: "medium",
|
|
622
|
+
defaultValue: JSON.stringify(selectedStandardizationAddress),
|
|
623
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
624
|
+
salesFrontendDesignSystem.Radio.Item,
|
|
625
|
+
{
|
|
626
|
+
className: cx$k("radio-group"),
|
|
627
|
+
value: JSON.stringify(selectedStandardizationAddress),
|
|
628
|
+
onChange: onStandardizationChange,
|
|
629
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result"), children: [
|
|
630
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
631
|
+
"div",
|
|
632
|
+
{
|
|
633
|
+
className: cx$k("zipcode"),
|
|
634
|
+
children: `${selectedStandardizationAddress.land?.firstPostalCode}${land?.secondPostalCode}`
|
|
635
|
+
}
|
|
636
|
+
),
|
|
637
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("divider") }),
|
|
638
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("address-info"), children: [
|
|
639
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("address"), children: `${road?.baseAddress} ${road?.detailAddress}` }),
|
|
640
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("old-address"), children: `${land?.baseAddress} ${land?.detailAddress}` })
|
|
641
|
+
] })
|
|
642
|
+
] })
|
|
643
|
+
}
|
|
644
|
+
)
|
|
645
|
+
}
|
|
646
|
+
),
|
|
647
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "d-flex gap-medium items-center", children: [
|
|
648
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { id: "detail", style: { width: "90px" }, children: "\uC0C1\uC138\uC8FC\uC18C" }),
|
|
649
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
650
|
+
salesFrontendDesignSystem.FormField.TextField,
|
|
651
|
+
{
|
|
652
|
+
rootProps: {
|
|
653
|
+
style: {
|
|
654
|
+
display: "flex",
|
|
655
|
+
flex: 1
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
|
|
659
|
+
onChange: onDetailChange,
|
|
660
|
+
size: "small",
|
|
661
|
+
value: detailAddressInput,
|
|
662
|
+
...step === "detail-input" && { autoFocus: true }
|
|
663
|
+
}
|
|
664
|
+
)
|
|
665
|
+
] })
|
|
666
|
+
] });
|
|
667
|
+
};
|
|
668
|
+
function AddressComponent({ isOpen, onClose, setValue }) {
|
|
669
|
+
const {
|
|
670
|
+
onAddressSearchClear,
|
|
671
|
+
addressSearchKeyword,
|
|
672
|
+
addressSearchStep,
|
|
673
|
+
onAddressSearchNext,
|
|
674
|
+
nextButtonDisabled,
|
|
675
|
+
detailAddressInput,
|
|
676
|
+
addressSearchList,
|
|
677
|
+
onSearch,
|
|
678
|
+
onKeyUp,
|
|
679
|
+
onSelectChange,
|
|
680
|
+
setDetail,
|
|
681
|
+
search,
|
|
682
|
+
searchInput,
|
|
683
|
+
selectedAddress,
|
|
684
|
+
onStandardizationChange,
|
|
685
|
+
selectedStandardizationAddress,
|
|
686
|
+
isLoading
|
|
687
|
+
} = useSearchAddress({
|
|
688
|
+
setValue,
|
|
689
|
+
onClose,
|
|
690
|
+
isOpen
|
|
691
|
+
});
|
|
692
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
|
|
693
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
694
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
695
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
|
|
696
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
697
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputBox$4, { clearable: true, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: onAddressSearchClear, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
698
|
+
Input$4,
|
|
699
|
+
{
|
|
700
|
+
...addressSearchStep !== "detail-input" && { autoFocus: true },
|
|
701
|
+
onChange: onSearch,
|
|
702
|
+
onKeyUp,
|
|
703
|
+
value: searchInput,
|
|
704
|
+
placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
|
|
705
|
+
size: "large"
|
|
706
|
+
}
|
|
707
|
+
) }),
|
|
708
|
+
addressSearchStep === "initial" && /* @__PURE__ */ jsxRuntime.jsx(AddressSearchInitialText, {}),
|
|
709
|
+
!isLoading && addressSearchStep === "search-result" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
710
|
+
AddressSearchResult,
|
|
711
|
+
{
|
|
712
|
+
onChange: onSelectChange,
|
|
713
|
+
addressSearchList,
|
|
714
|
+
searchKeyword: addressSearchKeyword,
|
|
715
|
+
selectedAddress
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
!isLoading && addressSearchStep === "detail-input" && selectedAddress && selectedStandardizationAddress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
719
|
+
AddressSearchDetailInput,
|
|
720
|
+
{
|
|
721
|
+
selectedStandardizationAddress,
|
|
722
|
+
onStandardizationChange,
|
|
723
|
+
onDetailChange: setDetail,
|
|
724
|
+
step: addressSearchStep,
|
|
725
|
+
detailAddressInput
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
] }),
|
|
729
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
730
|
+
salesFrontendDesignSystem.Button,
|
|
731
|
+
{
|
|
732
|
+
onClick: onAddressSearchNext,
|
|
733
|
+
variant: "primary",
|
|
734
|
+
size: "medium",
|
|
735
|
+
appearance: "filled",
|
|
736
|
+
width: "full",
|
|
737
|
+
children: [
|
|
738
|
+
addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
|
|
739
|
+
addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
|
|
740
|
+
]
|
|
741
|
+
}
|
|
742
|
+
) })
|
|
743
|
+
] })
|
|
744
|
+
] }) });
|
|
974
745
|
}
|
|
975
746
|
|
|
976
|
-
function
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
const
|
|
981
|
-
|
|
747
|
+
function useSearchAddress({ setValue, onClose, isOpen }) {
|
|
748
|
+
const [searchKeyword, setSearchKeyword] = React.useState("");
|
|
749
|
+
const [step, setStep] = React.useState("initial");
|
|
750
|
+
const [selectedAddress, setSelectedAddress] = React.useState();
|
|
751
|
+
const [selectedStandardizationAddress, setSelectedStandardizationAddress] = React.useState();
|
|
752
|
+
const [searchInput, setSearchInput] = React.useState("");
|
|
753
|
+
const [detailAddressInput, setDetailAddressInput] = React.useState("");
|
|
754
|
+
const [displayList, setDisplayList] = React.useState([]);
|
|
755
|
+
const [searchType, setSearchType] = React.useState("address");
|
|
756
|
+
const [standardizationParams, setStandardizationParams] = React.useState({
|
|
757
|
+
firstPostalCode: "",
|
|
758
|
+
secondPostalCode: "",
|
|
759
|
+
baseAddress: "",
|
|
760
|
+
detailAddress: "",
|
|
761
|
+
roadNameYn: "Y"
|
|
982
762
|
});
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
763
|
+
const { data: addressData, isLoading: isLoadingAddress } = method.useSearchAddressQuery(
|
|
764
|
+
{ searchKeyWord: searchKeyword },
|
|
765
|
+
{ enabled: !!searchKeyword && searchType === "address" }
|
|
766
|
+
);
|
|
767
|
+
const { data: postalData, isLoading: isLoadingPostalCode } = method.useSearchPostalCodeQuery(
|
|
768
|
+
{ searchWordName: searchKeyword },
|
|
769
|
+
{ enabled: !!searchKeyword && searchType === "postalcode" }
|
|
770
|
+
);
|
|
771
|
+
const { data: standardizedData } = method.useSearchAddressStandardizationQuery(standardizationParams, {
|
|
772
|
+
enabled: !!standardizationParams?.baseAddress
|
|
773
|
+
});
|
|
774
|
+
const [nextButtonDisabled, setNextButtonDisabled] = React.useState(false);
|
|
775
|
+
const onNext = () => {
|
|
776
|
+
if (step === "search-result" && nextButtonDisabled) {
|
|
777
|
+
salesFrontendDesignSystem.ModalUtils.alert(
|
|
778
|
+
"\uC8FC\uC18C\uB97C \uC120\uD0DD\uD558\uC9C0 \uC54A\uC73C\uBA74 \uB2E4\uC74C \uB2E8\uACC4\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC8FC\uC18C\uB97C \uC120\uD0DD\uD55C \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.",
|
|
779
|
+
"\uC120\uD0DD \uC8FC\uC18C \uC5C6\uC74C",
|
|
780
|
+
{ modalId: "search-modal-address-no-selected" }
|
|
781
|
+
);
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
if (step === "search-result") {
|
|
785
|
+
setStep("detail-input");
|
|
786
|
+
setNextButtonDisabled(true);
|
|
787
|
+
if (selectedAddress) {
|
|
788
|
+
setStandardizationParams({
|
|
789
|
+
firstPostalCode: selectedAddress.firstPostalCode,
|
|
790
|
+
secondPostalCode: selectedAddress.secondPostalCode,
|
|
791
|
+
baseAddress: selectedAddress.roadNameBaseAddress,
|
|
792
|
+
detailAddress: selectedAddress.roadNameDetailAddress,
|
|
793
|
+
roadNameYn: "Y"
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
} else {
|
|
797
|
+
selectedStandardizationAddress && setValue({
|
|
798
|
+
...selectedStandardizationAddress,
|
|
799
|
+
detailAddressInput
|
|
800
|
+
});
|
|
801
|
+
onClose();
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
const onSearch = (e) => {
|
|
805
|
+
const typeStr = e.target.value;
|
|
806
|
+
setSearchInput(typeStr);
|
|
1002
807
|
};
|
|
1003
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: open, onClose, modalSize: "full-screen", children: [
|
|
1004
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1005
|
-
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1006
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC740\uD589/\uC99D\uAD8C\uC0AC \uC120\uD0DD", showCloseButton: true }),
|
|
1007
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.container, children: [
|
|
1008
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.section, children: [
|
|
1009
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$1["section-title"], children: "\uC740\uD589\uC0AC" }),
|
|
1010
|
-
renderItems(bankList || [])
|
|
1011
|
-
] }),
|
|
1012
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.section, children: [
|
|
1013
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$1["section-title"], children: "\uC99D\uAD8C\uC0AC" }),
|
|
1014
|
-
renderItems(stockList || [])
|
|
1015
|
-
] })
|
|
1016
|
-
] }) })
|
|
1017
|
-
] })
|
|
1018
|
-
] });
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
const useCustomerSearch = (onSelect) => {
|
|
1022
|
-
const { triggerRef, isOpen, setIsOpen, DropDown } = salesFrontendDesignSystem.useDropDown();
|
|
1023
|
-
const [searchKeyword, setSearchKeyword] = React.useState("");
|
|
1024
|
-
const [searchInput, setSearchInput] = React.useState("");
|
|
1025
|
-
const [customerList, setCustomerList] = React.useState([]);
|
|
1026
|
-
const [selectedCustomer, setSelectedCustomer] = React.useState(null);
|
|
1027
|
-
const { data } = method.useSearchCustomerListQuery({ customerName: searchKeyword });
|
|
1028
808
|
const search = () => {
|
|
1029
|
-
if (searchInput
|
|
809
|
+
if (searchInput === "") {
|
|
810
|
+
onClear();
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (searchInput && searchInput.length > 1) {
|
|
814
|
+
const isNumeric = /^[0-9]+$/.test(searchInput);
|
|
815
|
+
setSearchType(isNumeric ? "postalcode" : "address");
|
|
1030
816
|
setSearchKeyword(searchInput);
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
setIsOpen(false);
|
|
817
|
+
setStep("search-result");
|
|
818
|
+
setSelectedAddress(void 0);
|
|
819
|
+
setDetailAddressInput("");
|
|
820
|
+
setNextButtonDisabled(true);
|
|
1036
821
|
}
|
|
1037
822
|
};
|
|
1038
823
|
const onKeyUp = (e) => {
|
|
1039
|
-
|
|
1040
|
-
if (currentValue.length === 0 || currentValue.slice(-1).normalize("NFD").length > 1 && currentValue.length > 1) {
|
|
824
|
+
if (e.key === "Enter") {
|
|
1041
825
|
search();
|
|
1042
826
|
}
|
|
1043
827
|
};
|
|
1044
|
-
const
|
|
1045
|
-
|
|
828
|
+
const onSelectChange = (e) => {
|
|
829
|
+
const selected = e.target.value;
|
|
830
|
+
if (selected) {
|
|
831
|
+
setSelectedAddress(JSON.parse(selected));
|
|
832
|
+
setNextButtonDisabled(false);
|
|
833
|
+
}
|
|
1046
834
|
};
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
835
|
+
const onStandardizationChange = (e) => {
|
|
836
|
+
const selected = e.target.value;
|
|
837
|
+
if (selected) {
|
|
838
|
+
setSelectedStandardizationAddress(JSON.parse(selected));
|
|
839
|
+
setNextButtonDisabled(false);
|
|
840
|
+
}
|
|
1053
841
|
};
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
setSearchInput(
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
842
|
+
const onClear = React.useCallback(() => {
|
|
843
|
+
setSearchKeyword("");
|
|
844
|
+
setSearchInput("");
|
|
845
|
+
setSelectedAddress(void 0);
|
|
846
|
+
setDetailAddressInput("");
|
|
847
|
+
setStep("initial");
|
|
848
|
+
}, []);
|
|
849
|
+
const setDetail = (e) => {
|
|
850
|
+
const detail = e.target.value;
|
|
851
|
+
setDetailAddressInput(detail);
|
|
852
|
+
if (detail) {
|
|
853
|
+
setNextButtonDisabled(false);
|
|
854
|
+
} else {
|
|
855
|
+
setNextButtonDisabled(true);
|
|
1061
856
|
}
|
|
1062
857
|
};
|
|
1063
858
|
React.useEffect(() => {
|
|
1064
|
-
|
|
1065
|
-
(
|
|
1066
|
-
)
|
|
1067
|
-
|
|
1068
|
-
|
|
859
|
+
if (searchType === "address" && addressData?.data?.addressList) {
|
|
860
|
+
setDisplayList(addressData.data.addressList);
|
|
861
|
+
} else if (searchType === "postalcode" && postalData?.data?.postalCodeList) {
|
|
862
|
+
console.log("transformedList", postalData.data.postalCodeList);
|
|
863
|
+
const transformedList = postalData.data.postalCodeList.map((p) => ({
|
|
864
|
+
firstPostalCode: p.originalNumber1PostalCode,
|
|
865
|
+
secondPostalCode: p.originalNumber2PostalCode,
|
|
866
|
+
roadNameBaseAddress: p.roadNameBaseAddress,
|
|
867
|
+
roadNameDetailAddress: p.roadNameDetailAddress,
|
|
868
|
+
landNumberBaseAddress: p.landNumberBaseAddress,
|
|
869
|
+
landNumberDetailAddress: p.landNumberDetailAddress,
|
|
870
|
+
mainBuildingName: p.mainBuildingName
|
|
871
|
+
}));
|
|
872
|
+
setDisplayList(transformedList);
|
|
873
|
+
}
|
|
874
|
+
}, [addressData, postalData, searchType]);
|
|
875
|
+
React.useEffect(() => {
|
|
876
|
+
if (isOpen) {
|
|
877
|
+
setSelectedAddress(void 0);
|
|
878
|
+
setDetailAddressInput("");
|
|
879
|
+
setStep("initial");
|
|
880
|
+
setSearchKeyword("");
|
|
881
|
+
}
|
|
882
|
+
}, [isOpen]);
|
|
883
|
+
React.useEffect(() => {
|
|
884
|
+
const road = standardizedData?.data?.addressStandardizationList[1];
|
|
885
|
+
const land = standardizedData?.data?.addressStandardizationList[2];
|
|
886
|
+
if (road && land) {
|
|
887
|
+
setSelectedStandardizationAddress({
|
|
888
|
+
land,
|
|
889
|
+
road
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
}, [standardizedData]);
|
|
1069
893
|
return {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
setSearchInput,
|
|
1083
|
-
setCustomerList,
|
|
1084
|
-
setSearchKeyword,
|
|
1085
|
-
setIsOpen
|
|
1086
|
-
};
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
const cx$j = classNames.bind(styles$2);
|
|
1090
|
-
const { InputBox: InputBox$3, Input: Input$3 } = salesFrontendDesignSystem.FormCore;
|
|
1091
|
-
const CustomerSearch = ({
|
|
1092
|
-
onSelectCustomer,
|
|
1093
|
-
onSearchClear,
|
|
1094
|
-
placeholder,
|
|
1095
|
-
rootProps,
|
|
1096
|
-
size = "large",
|
|
1097
|
-
...props
|
|
1098
|
-
}) => {
|
|
1099
|
-
const {
|
|
1100
|
-
triggerRef,
|
|
1101
|
-
isOpen,
|
|
1102
|
-
DropDown,
|
|
1103
|
-
searchInput,
|
|
1104
|
-
customerList,
|
|
1105
|
-
searchKeyword,
|
|
1106
|
-
onSearchInputChange,
|
|
1107
|
-
onKeyUp,
|
|
1108
|
-
search,
|
|
1109
|
-
onClear,
|
|
1110
|
-
handleSelectItem
|
|
1111
|
-
} = useCustomerSearch(onSelectCustomer);
|
|
1112
|
-
const handleClear = () => {
|
|
1113
|
-
onClear();
|
|
1114
|
-
onSearchClear?.();
|
|
1115
|
-
};
|
|
1116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("container"), children: [
|
|
1117
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1118
|
-
InputBox$3,
|
|
1119
|
-
{
|
|
1120
|
-
...rootProps,
|
|
1121
|
-
endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { Click: search, style: { width: "20px", height: "20px" } }),
|
|
1122
|
-
onClear: handleClear,
|
|
1123
|
-
clearable: true,
|
|
1124
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1125
|
-
Input$3,
|
|
1126
|
-
{
|
|
1127
|
-
...props,
|
|
1128
|
-
onChange: onSearchInputChange,
|
|
1129
|
-
onKeyUp,
|
|
1130
|
-
value: searchInput,
|
|
1131
|
-
placeholder: placeholder || "\uACE0\uAC1D\uBA85\uC744 \uB450 \uAE00\uC790 \uC774\uC0C1 \uC785\uB825\uD574\uC8FC\uC138\uC694.",
|
|
1132
|
-
size,
|
|
1133
|
-
ref: triggerRef
|
|
1134
|
-
}
|
|
1135
|
-
)
|
|
1136
|
-
}
|
|
1137
|
-
) }),
|
|
1138
|
-
isOpen && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(DropDown, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("result-container"), children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { children: customerList.map((customer, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
|
-
salesFrontendDesignSystem.ListItem,
|
|
1140
|
-
{
|
|
1141
|
-
onClick: () => handleSelectItem(customer),
|
|
1142
|
-
selectable: true,
|
|
1143
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("customer-item"), children: [
|
|
1144
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1145
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("details"), children: [
|
|
1146
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate && salesFrontendDesignSystem.convertDateString({
|
|
1147
|
-
dateString: customer.birthDate,
|
|
1148
|
-
fromFormat: "YYYYMMDD",
|
|
1149
|
-
toFormat: "YYYY.MM.DD"
|
|
1150
|
-
}) }),
|
|
1151
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
|
|
1152
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1153
|
-
customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1154
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
|
|
1155
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
|
|
1156
|
-
] })
|
|
1157
|
-
] })
|
|
1158
|
-
] })
|
|
1159
|
-
},
|
|
1160
|
-
`cust-item-${customer.customerId}-${index}`
|
|
1161
|
-
)) }) }) })
|
|
1162
|
-
] });
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
|
-
const cx$i = classNames.bind(styles$2);
|
|
1166
|
-
const { InputBox: InputBox$2, Input: Input$2 } = salesFrontendDesignSystem.FormCore;
|
|
1167
|
-
function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear }) {
|
|
1168
|
-
const {
|
|
1169
|
-
triggerRef,
|
|
1170
|
-
searchInput,
|
|
1171
|
-
customerList,
|
|
1172
|
-
searchKeyword,
|
|
1173
|
-
onSearchInputChange,
|
|
1174
|
-
setSearchKeyword,
|
|
1175
|
-
setSearchInput,
|
|
1176
|
-
setCustomerList,
|
|
894
|
+
selectedStandardizationAddress,
|
|
895
|
+
onStandardizationChange,
|
|
896
|
+
onAddressSearchClear: onClear,
|
|
897
|
+
onAddressSearchNext: onNext,
|
|
898
|
+
addressSearchKeyword: searchKeyword,
|
|
899
|
+
addressSearchList: displayList,
|
|
900
|
+
addressSearchStep: step,
|
|
901
|
+
selectedAddress,
|
|
902
|
+
addressSearchOnValueChange: onSelectChange,
|
|
903
|
+
nextButtonDisabled,
|
|
904
|
+
detailAddressInput,
|
|
905
|
+
onSearch,
|
|
1177
906
|
onKeyUp,
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
onClear();
|
|
1184
|
-
onSearchClear?.();
|
|
907
|
+
onSelectChange,
|
|
908
|
+
setDetail,
|
|
909
|
+
search,
|
|
910
|
+
searchInput,
|
|
911
|
+
isLoading: isLoadingAddress || isLoadingPostalCode
|
|
1185
912
|
};
|
|
1186
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "full-screen", children: [
|
|
1187
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1188
|
-
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1189
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uACE0\uAC1D \uAC80\uC0C9", showCloseButton: true }),
|
|
1190
|
-
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
1191
|
-
/* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: handleClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1192
|
-
Input$2,
|
|
1193
|
-
{
|
|
1194
|
-
onChange: onSearchInputChange,
|
|
1195
|
-
onKeyUp,
|
|
1196
|
-
value: searchInput,
|
|
1197
|
-
placeholder: "\uACE0\uAC1D\uBA85\uC744 \uB450 \uAE00\uC790 \uC774\uC0C1 \uC785\uB825\uD574\uC8FC\uC138\uC694.",
|
|
1198
|
-
size: "large",
|
|
1199
|
-
ref: triggerRef
|
|
1200
|
-
}
|
|
1201
|
-
) }),
|
|
1202
|
-
searchKeyword && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$i("result-count"), children: [
|
|
1203
|
-
"\uCD1D ",
|
|
1204
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: customerList.length }),
|
|
1205
|
-
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1206
|
-
] }),
|
|
1207
|
-
searchKeyword && customerList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("search-result"), children: [
|
|
1208
|
-
"`",
|
|
1209
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
1210
|
-
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
1211
|
-
] }),
|
|
1212
|
-
searchKeyword && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { rootProps: { style: { width: "100%" } }, children: customerList.map((customer, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1213
|
-
salesFrontendDesignSystem.ListItem,
|
|
1214
|
-
{
|
|
1215
|
-
onClick: () => {
|
|
1216
|
-
handleSelectItem(customer);
|
|
1217
|
-
setSearchKeyword("");
|
|
1218
|
-
setSearchInput("");
|
|
1219
|
-
setCustomerList([]);
|
|
1220
|
-
closeModal();
|
|
1221
|
-
},
|
|
1222
|
-
selectable: true,
|
|
1223
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("customer-item", "modal"), children: [
|
|
1224
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1225
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("details", "modal"), children: [
|
|
1226
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate && salesFrontendDesignSystem.convertDateString({
|
|
1227
|
-
dateString: customer.birthDate,
|
|
1228
|
-
fromFormat: "YYYYMMDD",
|
|
1229
|
-
toFormat: "YYYY.MM.DD"
|
|
1230
|
-
}) }),
|
|
1231
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
|
|
1232
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1233
|
-
customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1234
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
|
|
1235
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
|
|
1236
|
-
] })
|
|
1237
|
-
] })
|
|
1238
|
-
] })
|
|
1239
|
-
},
|
|
1240
|
-
`cust-item-${customer.customerId}-${index}`
|
|
1241
|
-
)) }) })
|
|
1242
|
-
] })
|
|
1243
|
-
] })
|
|
1244
|
-
] });
|
|
1245
913
|
}
|
|
914
|
+
const useAddressComponent = () => {
|
|
915
|
+
const [fullAddress, setFullAddress] = React.useState();
|
|
916
|
+
const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
|
|
917
|
+
const AddressSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
|
|
918
|
+
return {
|
|
919
|
+
fullAddress,
|
|
920
|
+
openModal,
|
|
921
|
+
AddressSearchComponent
|
|
922
|
+
};
|
|
923
|
+
};
|
|
1246
924
|
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
|
|
925
|
+
const BANK_STOCK_SEARCH_MODAL_TABS = [
|
|
926
|
+
{
|
|
927
|
+
value: "bank",
|
|
928
|
+
label: "\uC740\uD589"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
value: "stock",
|
|
932
|
+
label: "\uC99D\uAD8C\uC0AC"
|
|
933
|
+
}
|
|
934
|
+
];
|
|
935
|
+
const BANK_STOCK_ICON_LIST = [
|
|
936
|
+
{
|
|
937
|
+
codeVal: "002",
|
|
938
|
+
codeName: "\uC0B0\uC5C5\uC740\uD589",
|
|
939
|
+
replaceName: "\uC0B0\uC5C5",
|
|
940
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSaneop, {})
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
codeVal: "003",
|
|
944
|
+
codeName: "\uAE30\uC5C5\uC740\uD589",
|
|
945
|
+
replaceName: "\uAE30\uC5C5",
|
|
946
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKiup, {})
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
codeVal: "004",
|
|
950
|
+
codeName: "\uAD6D\uBBFC\uC740\uD589",
|
|
951
|
+
replaceName: "\uAD6D\uBBFC",
|
|
952
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKukmin, {})
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
codeVal: "007",
|
|
956
|
+
codeName: "\uC218\uD611\uC740\uD589",
|
|
957
|
+
replaceName: "\uC218\uD611",
|
|
958
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSuhyeop, {})
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
codeVal: "009",
|
|
962
|
+
codeName: "\uC7A5\uAE30\uC2E0\uC6A9\uC740\uD589",
|
|
963
|
+
replaceName: "\uC7A5\uAE30\uC2E0\uC6A9",
|
|
964
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJangGiSinYong, {})
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
codeVal: "011",
|
|
968
|
+
codeName: "\uB18D\uD611\uC740\uD589",
|
|
969
|
+
replaceName: "NH\uB18D\uD611",
|
|
970
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankNhNonghyeop, {})
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
codeVal: "012",
|
|
974
|
+
codeName: "\uB18D\uC870",
|
|
975
|
+
replaceName: "\uC9C0\uC5ED\uB18D\uD611",
|
|
976
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJiyeokNonghyeop, {})
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
codeVal: "020",
|
|
980
|
+
codeName: "\uC6B0\uB9AC\uC740\uD589",
|
|
981
|
+
replaceName: "\uC6B0\uB9AC",
|
|
982
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankWoori, {})
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
codeVal: "023",
|
|
986
|
+
codeName: "\uC2A4\uD0E0\uB2E4\uB4DC\uCC28\uD0C0\uB4DC",
|
|
987
|
+
replaceName: "SC\uC81C\uC77C",
|
|
988
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankScJeil, {})
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
codeVal: "026",
|
|
992
|
+
codeName: "(\uAD6C)\uC2E0\uD55C\uC740\uD589",
|
|
993
|
+
replaceName: "\uC2E0\uD55C",
|
|
994
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhan, {})
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
codeVal: "027",
|
|
998
|
+
codeName: "\uD55C\uAD6D\uC528\uD2F0\uC740\uD589",
|
|
999
|
+
replaceName: "\uD55C\uAD6D\uC528\uD2F0",
|
|
1000
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankHankookCity, {})
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
codeVal: "031",
|
|
1004
|
+
codeName: "iM(\uB300\uAD6C)\uBC45\uD06C",
|
|
1005
|
+
replaceName: "\uB300\uAD6C",
|
|
1006
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankDaegu, {})
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
codeVal: "032",
|
|
1010
|
+
codeName: "\uBD80\uC0B0\uC740\uD589",
|
|
1011
|
+
replaceName: "\uBD80\uC0B0",
|
|
1012
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankBusan, {})
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
codeVal: "034",
|
|
1016
|
+
codeName: "\uAD11\uC8FC\uC740\uD589",
|
|
1017
|
+
replaceName: "\uAD11\uC8FC",
|
|
1018
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankGwangju, {})
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
codeVal: "035",
|
|
1022
|
+
codeName: "\uC81C\uC8FC\uC740\uD589",
|
|
1023
|
+
replaceName: "\uC81C\uC8FC",
|
|
1024
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeju, {})
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
codeVal: "037",
|
|
1028
|
+
codeName: "\uC804\uBD81\uC740\uD589",
|
|
1029
|
+
replaceName: "\uC804\uBD81",
|
|
1030
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeonbuk, {})
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
codeVal: "039",
|
|
1034
|
+
codeName: "\uACBD\uB0A8\uC740\uD589",
|
|
1035
|
+
replaceName: "\uACBD\uB0A8",
|
|
1036
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankGyeongnam, {})
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
codeVal: "045",
|
|
1040
|
+
codeName: "\uC0C8\uB9C8\uC744\uAE08\uACE0\uC911\uC559\uD68C",
|
|
1041
|
+
replaceName: "\uC0C8\uB9C8\uC744\uAE08\uACE0",
|
|
1042
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSaemaulGeumgo, {})
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
codeVal: "048",
|
|
1046
|
+
codeName: "\uC2E0\uD611",
|
|
1047
|
+
replaceName: "\uC2E0\uD611",
|
|
1048
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhyeop, {})
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
codeVal: "050",
|
|
1052
|
+
codeName: "\uC800\uCD95\uC740\uD589",
|
|
1053
|
+
replaceName: "\uC800\uCD95",
|
|
1054
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankJeochuk, {})
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
codeVal: "054",
|
|
1058
|
+
codeName: "HSBC\uC740\uD589",
|
|
1059
|
+
replaceName: "HSBC",
|
|
1060
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankHsbc, {})
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
codeVal: "056",
|
|
1064
|
+
codeName: "\uC5D0\uC774\uBE44\uC5D4\uC554\uB85C\uC740\uD589",
|
|
1065
|
+
replaceName: "\uC5D0\uC774\uBE44\uC5D4\uC554\uB85C",
|
|
1066
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankABNAMRO, {})
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
codeVal: "064",
|
|
1070
|
+
codeName: "\uC0B0\uB9BC\uC870\uD569\uC911\uC559\uD68C",
|
|
1071
|
+
replaceName: "\uC0B0\uB9BC\uC870\uD569",
|
|
1072
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSanlim, {})
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
codeVal: "071",
|
|
1076
|
+
codeName: "\uC6B0\uCCB4\uAD6D",
|
|
1077
|
+
replaceName: "\uC6B0\uCCB4\uAD6D",
|
|
1078
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankPost, {})
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
codeVal: "081",
|
|
1082
|
+
codeName: "KEB\uD558\uB098\uC740\uD589",
|
|
1083
|
+
replaceName: "KEB\uD558\uB098",
|
|
1084
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKebHana, {})
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
codeVal: "088",
|
|
1088
|
+
codeName: "\uC2E0\uD55C\uC740\uD589",
|
|
1089
|
+
replaceName: "\uC2E0\uD55C",
|
|
1090
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankSinhan, {})
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
codeVal: "089",
|
|
1094
|
+
codeName: "\uCF00\uC774\uBC45\uD06C",
|
|
1095
|
+
replaceName: "\uCF00\uC774\uBC45\uD06C",
|
|
1096
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKBank, {})
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
codeVal: "090",
|
|
1100
|
+
codeName: "\uCE74\uCE74\uC624\uBC45\uD06C",
|
|
1101
|
+
replaceName: "\uCE74\uCE74\uC624\uBC45\uD06C",
|
|
1102
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankKakaoBank, {})
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
codeVal: "092",
|
|
1106
|
+
codeName: "\uD1A0\uC2A4\uBC45\uD06C",
|
|
1107
|
+
replaceName: "\uD1A0\uC2A4\uBC45\uD06C",
|
|
1108
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsBankTossBank, {})
|
|
1109
|
+
},
|
|
1250
1110
|
{
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1111
|
+
codeVal: "209",
|
|
1112
|
+
codeName: "\uC720\uC548\uD0C0\uC99D\uAD8C",
|
|
1113
|
+
replaceName: "\uC720\uC548\uD0C0\uC99D\uAD8C",
|
|
1114
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockYuantaJeungkwon, {})
|
|
1255
1115
|
},
|
|
1256
1116
|
{
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1117
|
+
codeVal: "218",
|
|
1118
|
+
codeName: "KB\uC99D\uAD8C",
|
|
1119
|
+
replaceName: "KB\uC99D\uAD8C",
|
|
1120
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKbJeungkwon, {})
|
|
1261
1121
|
},
|
|
1262
1122
|
{
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1123
|
+
codeVal: "230",
|
|
1124
|
+
codeName: "\uBBF8\uB798\uC5D0\uC14B\uC99D\uAD8C",
|
|
1125
|
+
replaceName: "\uBBF8\uB798\uC5D0\uC14B\uC99D\uAD8C",
|
|
1126
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMiraeAssetJeungkwon, {})
|
|
1267
1127
|
},
|
|
1268
1128
|
{
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1129
|
+
codeVal: "238",
|
|
1130
|
+
codeName: "\uB300\uC6B0\uC99D\uAD8C",
|
|
1131
|
+
replaceName: "\uB300\uC6B0\uC99D\uAD8C",
|
|
1132
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMiraeAssetJeungkwon, {})
|
|
1273
1133
|
},
|
|
1274
1134
|
{
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1135
|
+
codeVal: "240",
|
|
1136
|
+
codeName: "\uC0BC\uC131\uC99D\uAD8C",
|
|
1137
|
+
replaceName: "\uC0BC\uC131\uC99D\uAD8C",
|
|
1138
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSamsungJeungkwon, {})
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
codeVal: "243",
|
|
1142
|
+
codeName: "\uD55C\uAD6D\uD22C\uC790\uC99D\uAD8C",
|
|
1143
|
+
replaceName: "\uD55C\uAD6D\uD22C\uC790\uC99D\uAD8C",
|
|
1144
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHankookTujajeungkwon, {})
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
codeVal: "247",
|
|
1148
|
+
codeName: "\uC6B0\uB9AC\uD22C\uC790\uC99D\uAD8C",
|
|
1149
|
+
replaceName: "NH(\uC6B0\uB9AC)\uD22C\uC790\uC99D\uAD8C",
|
|
1150
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockNhWooriTujajeungkwon, {})
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
codeVal: "261",
|
|
1154
|
+
codeName: "\uAD50\uBCF4\uC99D\uAD8C",
|
|
1155
|
+
replaceName: "\uAD50\uBCF4\uC99D\uAD8C",
|
|
1156
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockGyoboJeungkwon, {})
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
codeVal: "262",
|
|
1160
|
+
codeName: "\uD558\uC774\uD22C\uC790\uC99D\uAD8C",
|
|
1161
|
+
replaceName: "\uD558\uC774\uD22C\uC790\uC99D\uAD8C",
|
|
1162
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHiTujajeungkwon, {})
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
codeVal: "263",
|
|
1166
|
+
codeName: "\uD604\uB300\uCC28\uD22C\uC790\uC99D\uAD8C",
|
|
1167
|
+
replaceName: "\uD604\uB300\uCC28\uC99D\uAD8C",
|
|
1168
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHyundaiChaJeungkwon, {})
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
codeVal: "264",
|
|
1172
|
+
codeName: "\uD0A4\uC6C0\uC99D\uAD8C",
|
|
1173
|
+
replaceName: "\uD0A4\uC6C0\uC99D\uAD8C",
|
|
1174
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKiwoomJeungkwon, {})
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
codeVal: "266",
|
|
1178
|
+
codeName: "SK\uC99D\uAD8C",
|
|
1179
|
+
replaceName: "SK\uC99D\uAD8C",
|
|
1180
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSkJeungkwon, {})
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
codeVal: "267",
|
|
1184
|
+
codeName: "\uB300\uC2E0\uC99D\uAD8C",
|
|
1185
|
+
replaceName: "\uB300\uC2E0\uC99D\uAD8C",
|
|
1186
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockDaesinJeungkwon, {})
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
codeVal: "269",
|
|
1190
|
+
codeName: "\uD55C\uD654\uC99D\uAD8C",
|
|
1191
|
+
replaceName: "\uD55C\uD654\uD22C\uC790\uC99D\uAD8C",
|
|
1192
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHanwhaTujajeungkwon, {})
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
codeVal: "270",
|
|
1196
|
+
codeName: "\uD558\uB098\uB300\uD22C\uC99D\uAD8C",
|
|
1197
|
+
replaceName: "\uD558\uB098\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
1198
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHanaGeumyungTujajeungkwon, {})
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
codeVal: "278",
|
|
1202
|
+
codeName: "\uC2E0\uD55C\uAE08\uC735\uD22C\uC790",
|
|
1203
|
+
replaceName: "\uC2E0\uD55C\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
1204
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSinhanTujajeungkwon, {})
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
codeVal: "279",
|
|
1208
|
+
codeName: "\uB3D9\uBD80\uC99D\uAD8C",
|
|
1209
|
+
replaceName: "DB\uAE08\uC735\uD22C\uC790\uC99D\uAD8C",
|
|
1210
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockDbGeumyungTujajeungkwon, {})
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
codeVal: "280",
|
|
1214
|
+
codeName: "\uC720\uC9C4\uD22C\uC790\uC99D\uAD8C",
|
|
1215
|
+
replaceName: "\uC720\uC9C4\uD22C\uC790\uC99D\uAD8C",
|
|
1216
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockYujinTujajeungkwon, {})
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
codeVal: "287",
|
|
1220
|
+
codeName: "\uBA54\uB9AC\uCE20\uC99D\uAD8C",
|
|
1221
|
+
replaceName: "\uBA54\uB9AC\uCE20\uC99D\uAD8C",
|
|
1222
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockMeritzJeungkwon, {})
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
codeVal: "288",
|
|
1226
|
+
codeName: "\uCE74\uCE74\uC624\uD398\uC774\uC99D\uAD8C",
|
|
1227
|
+
replaceName: "\uCE74\uCE74\uC624\uD398\uC774\uC99D\uAD8C",
|
|
1228
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockKakaoPayJeungkwon, {})
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
codeVal: "289",
|
|
1232
|
+
codeName: "NH\uD22C\uC790\uC99D\uAD8C",
|
|
1233
|
+
replaceName: "NH\uD22C\uC790\uC99D\uAD8C",
|
|
1234
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockNhTujajeungkwon, {})
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
codeVal: "290",
|
|
1238
|
+
codeName: "\uBD80\uAD6D\uC99D\uAD8C",
|
|
1239
|
+
replaceName: "\uBD80\uAD6D\uC99D\uAD8C",
|
|
1240
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockBugukJeungkwon, {})
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
codeVal: "291",
|
|
1244
|
+
codeName: "\uC2E0\uC601\uC99D\uAD8C",
|
|
1245
|
+
replaceName: "\uC2E0\uC601\uC99D\uAD8C",
|
|
1246
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockSinyeongJeungkwon, {})
|
|
1279
1247
|
}
|
|
1280
1248
|
];
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
setSearchKeyword(keyword);
|
|
1249
|
+
|
|
1250
|
+
function useBankStockSearch({ onSelect }) {
|
|
1251
|
+
const { data } = method.useSearchCommonCodeQuery({ commonCodeId: "BANK_ORGN_DVSN_CODE" });
|
|
1252
|
+
const bankStockList = data?.data?.commonCodeList?.[0]?.codeList;
|
|
1253
|
+
const handleSelect = (item) => {
|
|
1254
|
+
onSelect(item);
|
|
1288
1255
|
};
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1305
|
-
] }),
|
|
1306
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$h("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
|
|
1307
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => {
|
|
1308
|
-
onSelect(item.nationalityCodeName);
|
|
1309
|
-
onConfirm();
|
|
1310
|
-
}, children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
|
|
1311
|
-
}) }),
|
|
1312
|
-
filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$h("search-result"), children: [
|
|
1313
|
-
"`",
|
|
1314
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyWord }),
|
|
1315
|
-
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
1316
|
-
] })
|
|
1317
|
-
] });
|
|
1318
|
-
};
|
|
1319
|
-
function NationalityComponent({ isOpen, onClose, setValue, onConfirm }) {
|
|
1320
|
-
const {
|
|
1321
|
-
search,
|
|
1322
|
-
onClear,
|
|
1323
|
-
searchKeyWord,
|
|
1324
|
-
onKeyUp,
|
|
1325
|
-
onSearch,
|
|
1326
|
-
searchList,
|
|
1327
|
-
searchInput,
|
|
1328
|
-
onSelect,
|
|
1329
|
-
setSearchInput,
|
|
1330
|
-
setSearchKeyword
|
|
1331
|
-
} = useSearchNationality({
|
|
1332
|
-
setValue,
|
|
1333
|
-
onClose,
|
|
1334
|
-
isOpen
|
|
1256
|
+
const bankList = bankStockList?.filter((bank) => bank.codeVal?.startsWith("0"));
|
|
1257
|
+
const stockList = bankStockList?.filter((stock) => stock.codeVal?.startsWith("2"));
|
|
1258
|
+
return {
|
|
1259
|
+
bankList,
|
|
1260
|
+
stockList,
|
|
1261
|
+
handleSelect
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
function chunk(array, size) {
|
|
1266
|
+
return Array.from({ length: Math.ceil(array.length / size) }, (v, i) => array.slice(i * size, i * size + size));
|
|
1267
|
+
}
|
|
1268
|
+
function BankStockSearchModal({ open, onClose, onSelect }) {
|
|
1269
|
+
const { bankList, stockList, handleSelect } = useBankStockSearch({
|
|
1270
|
+
onSelect
|
|
1335
1271
|
});
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1272
|
+
const renderItems = (list) => {
|
|
1273
|
+
const chunkedList = chunk(list, 5);
|
|
1274
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1["list-container"], children: chunkedList.map((chunk2, chunkIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.row, children: [
|
|
1275
|
+
chunk2.map((item) => {
|
|
1276
|
+
const findItem = BANK_STOCK_ICON_LIST.find((icon) => icon.codeVal === item.codeVal);
|
|
1277
|
+
const convertedItem = findItem ? findItem : {
|
|
1278
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHochulEopsum, {}),
|
|
1279
|
+
replaceName: item.codeName
|
|
1280
|
+
};
|
|
1281
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.item, onClick: () => handleSelect(item), children: [
|
|
1282
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1["icon-wrapper"], children: convertedItem?.icon }),
|
|
1283
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1284
|
+
" ",
|
|
1285
|
+
convertedItem?.replaceName
|
|
1286
|
+
] })
|
|
1287
|
+
] }, `${item.codeVal}-${chunkIndex}`);
|
|
1288
|
+
}),
|
|
1289
|
+
chunk2.length < 5 && Array.from({ length: 5 - chunk2.length }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1.item, style: { visibility: "hidden" } }, `placeholder-${chunkIndex}-${i}`))
|
|
1290
|
+
] }, chunkIndex)) });
|
|
1291
|
+
};
|
|
1292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: open, onClose, modalSize: "full-screen", children: [
|
|
1293
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1294
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1295
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC740\uD589/\uC99D\uAD8C\uC0AC \uC120\uD0DD", showCloseButton: true }),
|
|
1296
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.container, children: [
|
|
1297
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.section, children: [
|
|
1298
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$1["section-title"], children: "\uC740\uD589\uC0AC" }),
|
|
1299
|
+
renderItems(bankList || [])
|
|
1300
|
+
] }),
|
|
1301
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.section, children: [
|
|
1302
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$1["section-title"], children: "\uC99D\uAD8C\uC0AC" }),
|
|
1303
|
+
renderItems(stockList || [])
|
|
1304
|
+
] })
|
|
1305
|
+
] }) })
|
|
1363
1306
|
] })
|
|
1364
|
-
] })
|
|
1307
|
+
] });
|
|
1365
1308
|
}
|
|
1366
1309
|
|
|
1367
|
-
|
|
1368
|
-
const
|
|
1369
|
-
const [
|
|
1310
|
+
const useCustomerSearch = (onSelect) => {
|
|
1311
|
+
const { triggerRef, isOpen, setIsOpen, DropDown } = salesFrontendDesignSystem.useDropDown();
|
|
1312
|
+
const [searchKeyword, setSearchKeyword] = React.useState("");
|
|
1370
1313
|
const [searchInput, setSearchInput] = React.useState("");
|
|
1371
|
-
const
|
|
1372
|
-
const
|
|
1373
|
-
const
|
|
1374
|
-
const typeStr = e.target.value;
|
|
1375
|
-
setSearchInput(typeStr);
|
|
1376
|
-
};
|
|
1314
|
+
const [customerList, setCustomerList] = React.useState([]);
|
|
1315
|
+
const [selectedCustomer, setSelectedCustomer] = React.useState(null);
|
|
1316
|
+
const { data } = method.useSearchCustomerListQuery({ customerName: searchKeyword });
|
|
1377
1317
|
const search = () => {
|
|
1378
|
-
if (searchInput
|
|
1379
|
-
onClear();
|
|
1380
|
-
return;
|
|
1381
|
-
}
|
|
1382
|
-
if (searchInput && searchInput.length > 0) {
|
|
1318
|
+
if (searchInput.length >= 2) {
|
|
1383
1319
|
setSearchKeyword(searchInput);
|
|
1384
|
-
|
|
1320
|
+
setIsOpen(true);
|
|
1321
|
+
} else {
|
|
1322
|
+
setCustomerList([]);
|
|
1323
|
+
setSearchKeyword("");
|
|
1324
|
+
setIsOpen(false);
|
|
1385
1325
|
}
|
|
1386
1326
|
};
|
|
1387
1327
|
const onKeyUp = (e) => {
|
|
1388
1328
|
const currentValue = e.target.value;
|
|
1389
|
-
if (currentValue.length === 0 || currentValue.slice(-1).normalize("NFD").length > 1) {
|
|
1329
|
+
if (currentValue.length === 0 || currentValue.slice(-1).normalize("NFD").length > 1 && currentValue.length > 1) {
|
|
1390
1330
|
search();
|
|
1391
1331
|
}
|
|
1392
1332
|
};
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1333
|
+
const onSearchInputChange = (e) => {
|
|
1334
|
+
setSearchInput(e.target.value);
|
|
1335
|
+
};
|
|
1336
|
+
const onClear = () => {
|
|
1395
1337
|
setSearchInput("");
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
const value = searchList.find((item) => item.nationalityCodeName === nationality);
|
|
1401
|
-
value && setValue(value);
|
|
1402
|
-
onClose();
|
|
1338
|
+
setSearchKeyword("");
|
|
1339
|
+
setCustomerList([]);
|
|
1340
|
+
setSelectedCustomer(null);
|
|
1341
|
+
setIsOpen(false);
|
|
1403
1342
|
};
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1343
|
+
const handleSelectItem = (customer) => {
|
|
1344
|
+
setSelectedCustomer(customer);
|
|
1345
|
+
setSearchInput(customer.customerName || "");
|
|
1346
|
+
setCustomerList([]);
|
|
1347
|
+
setIsOpen(false);
|
|
1348
|
+
if (onSelect) {
|
|
1349
|
+
onSelect(customer);
|
|
1408
1350
|
}
|
|
1409
|
-
}, [isOpen]);
|
|
1410
|
-
return {
|
|
1411
|
-
onClear,
|
|
1412
|
-
searchKeyWord,
|
|
1413
|
-
searchList,
|
|
1414
|
-
selectedNationality,
|
|
1415
|
-
onSearch,
|
|
1416
|
-
onKeyUp,
|
|
1417
|
-
search,
|
|
1418
|
-
searchInput,
|
|
1419
|
-
onSelect,
|
|
1420
|
-
setSearchKeyword,
|
|
1421
|
-
setSearchInput
|
|
1422
|
-
};
|
|
1423
|
-
}
|
|
1424
|
-
const useNationalityComponent = () => {
|
|
1425
|
-
const [nationality, setNationality] = React.useState();
|
|
1426
|
-
const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
|
|
1427
|
-
const [isConfirmed, setIsConfirmed] = React.useState(false);
|
|
1428
|
-
const onConfirm = () => {
|
|
1429
|
-
setIsConfirmed(true);
|
|
1430
|
-
};
|
|
1431
|
-
const openInitModal = () => {
|
|
1432
|
-
setIsConfirmed(false);
|
|
1433
|
-
openModal();
|
|
1434
1351
|
};
|
|
1435
|
-
|
|
1352
|
+
React.useEffect(() => {
|
|
1353
|
+
const filtered = data?.data?.custList?.filter(
|
|
1354
|
+
(c) => c.customerName?.toLowerCase().includes(searchInput.toLowerCase())
|
|
1355
|
+
);
|
|
1356
|
+
setCustomerList(filtered || []);
|
|
1357
|
+
}, [data, searchInput]);
|
|
1436
1358
|
return {
|
|
1359
|
+
triggerRef,
|
|
1437
1360
|
isOpen,
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
function requireDayjs_min () {
|
|
1455
|
-
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
1456
|
-
hasRequiredDayjs_min = 1;
|
|
1457
|
-
(function (module, exports) {
|
|
1458
|
-
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
1459
|
-
} (dayjs_min$1));
|
|
1460
|
-
return dayjs_min$1.exports;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
var dayjs_minExports = requireDayjs_min();
|
|
1464
|
-
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
1465
|
-
|
|
1466
|
-
var customParseFormat$2 = {exports: {}};
|
|
1467
|
-
|
|
1468
|
-
var customParseFormat$1 = customParseFormat$2.exports;
|
|
1469
|
-
|
|
1470
|
-
var hasRequiredCustomParseFormat;
|
|
1471
|
-
|
|
1472
|
-
function requireCustomParseFormat () {
|
|
1473
|
-
if (hasRequiredCustomParseFormat) return customParseFormat$2.exports;
|
|
1474
|
-
hasRequiredCustomParseFormat = 1;
|
|
1475
|
-
(function (module, exports) {
|
|
1476
|
-
!function(e,t){module.exports=t();}(customParseFormat$1,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,false);}],a:[o,function(e){this.afternoon=d(e,true);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=true,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=true===o[2],h=true===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&true!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
|
|
1477
|
-
} (customParseFormat$2));
|
|
1478
|
-
return customParseFormat$2.exports;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
var customParseFormatExports = requireCustomParseFormat();
|
|
1482
|
-
var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
|
|
1483
|
-
|
|
1484
|
-
var __defProp = Object.defineProperty;
|
|
1485
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1486
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1487
|
-
var getCookie = (name) => {
|
|
1488
|
-
if (typeof document === "undefined") {
|
|
1489
|
-
return "";
|
|
1490
|
-
}
|
|
1491
|
-
const match = document.cookie.match(new RegExp(`(^|; *)${name}=([^;]*)`));
|
|
1492
|
-
return match ? decodeURIComponent(match[2] || "") : "";
|
|
1493
|
-
};
|
|
1494
|
-
var getSubdomain = (hostname) => {
|
|
1495
|
-
if (!hostname || hostname === "localhost" || hostname === "127.0.0.1") {
|
|
1496
|
-
return "";
|
|
1497
|
-
}
|
|
1498
|
-
const parts = hostname.split(".");
|
|
1499
|
-
if (parts.length < 3) {
|
|
1500
|
-
return "";
|
|
1501
|
-
}
|
|
1502
|
-
return parts[0] ?? "";
|
|
1503
|
-
};
|
|
1504
|
-
var getEnvironmentFromHostname = (hostname) => {
|
|
1505
|
-
const debugModeEnv = getCookie("dsp-debug-mode-env")?.toLowerCase();
|
|
1506
|
-
if (debugModeEnv) {
|
|
1507
|
-
return debugModeEnv;
|
|
1508
|
-
}
|
|
1509
|
-
const subDomain = getSubdomain(hostname);
|
|
1510
|
-
if (hostname === "localhost" || hostname === "127.0.0.1" || hostname.startsWith("localhost")) {
|
|
1511
|
-
return "local";
|
|
1512
|
-
}
|
|
1513
|
-
if (subDomain.includes(`dev`)) {
|
|
1514
|
-
return "dev";
|
|
1515
|
-
}
|
|
1516
|
-
if (subDomain.includes("stg")) {
|
|
1517
|
-
return "stg";
|
|
1518
|
-
}
|
|
1519
|
-
return "prd";
|
|
1520
|
-
};
|
|
1521
|
-
var _MessageEventManager = class _MessageEventManager2 {
|
|
1522
|
-
constructor() {
|
|
1523
|
-
__publicField(this, "handlers", /* @__PURE__ */ new Map());
|
|
1524
|
-
window.addEventListener("message", this.handleMessage.bind(this));
|
|
1525
|
-
}
|
|
1526
|
-
static getInstance() {
|
|
1527
|
-
if (!_MessageEventManager2.instance) {
|
|
1528
|
-
_MessageEventManager2.instance = new _MessageEventManager2();
|
|
1529
|
-
}
|
|
1530
|
-
return _MessageEventManager2.instance;
|
|
1531
|
-
}
|
|
1532
|
-
/**
|
|
1533
|
-
*
|
|
1534
|
-
* @param event
|
|
1535
|
-
*/
|
|
1536
|
-
handleMessage(event) {
|
|
1537
|
-
for (const [key, handler] of this.handlers) {
|
|
1538
|
-
try {
|
|
1539
|
-
handler(event);
|
|
1540
|
-
} catch (error) {
|
|
1541
|
-
console.error(`Message handler ${key} error:`, error);
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
/**
|
|
1546
|
-
* 이벤트 헨들러 함수를 등록합니다.
|
|
1547
|
-
* @param key
|
|
1548
|
-
* @param handler
|
|
1549
|
-
*/
|
|
1550
|
-
registerHandler(key, handler) {
|
|
1551
|
-
this.handlers.set(key, handler);
|
|
1552
|
-
}
|
|
1553
|
-
/**
|
|
1554
|
-
* 이벤트 핸들러 함수를 삭제합니다.
|
|
1555
|
-
* @param key
|
|
1556
|
-
*/
|
|
1557
|
-
unregisterHandler(key) {
|
|
1558
|
-
this.handlers.delete(key);
|
|
1559
|
-
}
|
|
1361
|
+
DropDown,
|
|
1362
|
+
searchInput,
|
|
1363
|
+
customerList,
|
|
1364
|
+
searchKeyword,
|
|
1365
|
+
onSearchInputChange,
|
|
1366
|
+
onKeyUp,
|
|
1367
|
+
search,
|
|
1368
|
+
onClear,
|
|
1369
|
+
handleSelectItem,
|
|
1370
|
+
selectedCustomer,
|
|
1371
|
+
setSearchInput,
|
|
1372
|
+
setCustomerList,
|
|
1373
|
+
setSearchKeyword,
|
|
1374
|
+
setIsOpen
|
|
1375
|
+
};
|
|
1560
1376
|
};
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1377
|
+
|
|
1378
|
+
const cx$j = classNames.bind(styles$2);
|
|
1379
|
+
const { InputBox: InputBox$3, Input: Input$3 } = salesFrontendDesignSystem.FormCore;
|
|
1380
|
+
const CustomerSearch = ({
|
|
1381
|
+
onSelectCustomer,
|
|
1382
|
+
onSearchClear,
|
|
1383
|
+
placeholder,
|
|
1384
|
+
rootProps,
|
|
1385
|
+
size = "large",
|
|
1386
|
+
...props
|
|
1387
|
+
}) => {
|
|
1388
|
+
const {
|
|
1389
|
+
triggerRef,
|
|
1390
|
+
isOpen,
|
|
1391
|
+
DropDown,
|
|
1392
|
+
searchInput,
|
|
1393
|
+
customerList,
|
|
1394
|
+
searchKeyword,
|
|
1395
|
+
onSearchInputChange,
|
|
1396
|
+
onKeyUp,
|
|
1397
|
+
search,
|
|
1398
|
+
onClear,
|
|
1399
|
+
handleSelectItem
|
|
1400
|
+
} = useCustomerSearch(onSelectCustomer);
|
|
1401
|
+
const handleClear = () => {
|
|
1402
|
+
onClear();
|
|
1403
|
+
onSearchClear?.();
|
|
1404
|
+
};
|
|
1405
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("container"), children: [
|
|
1406
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1407
|
+
InputBox$3,
|
|
1408
|
+
{
|
|
1409
|
+
...rootProps,
|
|
1410
|
+
endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { Click: search, style: { width: "20px", height: "20px" } }),
|
|
1411
|
+
onClear: handleClear,
|
|
1412
|
+
clearable: true,
|
|
1413
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1414
|
+
Input$3,
|
|
1415
|
+
{
|
|
1416
|
+
...props,
|
|
1417
|
+
onChange: onSearchInputChange,
|
|
1418
|
+
onKeyUp,
|
|
1419
|
+
value: searchInput,
|
|
1420
|
+
placeholder: placeholder || "\uACE0\uAC1D\uBA85\uC744 \uB450 \uAE00\uC790 \uC774\uC0C1 \uC785\uB825\uD574\uC8FC\uC138\uC694.",
|
|
1421
|
+
size,
|
|
1422
|
+
ref: triggerRef
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1599
1425
|
}
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
document.body.removeChild(link);
|
|
1627
|
-
URL.revokeObjectURL(url);
|
|
1628
|
-
}
|
|
1629
|
-
async function imageUrlToFile(imageUrl) {
|
|
1630
|
-
const headers = new Headers();
|
|
1631
|
-
headers.append("cache-control", "no-cache");
|
|
1632
|
-
const resImage = await fetch(imageUrl, { headers });
|
|
1633
|
-
const blob = await resImage.blob();
|
|
1634
|
-
const { type } = blob;
|
|
1635
|
-
const name = type.split("/").join(".");
|
|
1636
|
-
const file = new File([blob], name, { type });
|
|
1637
|
-
return file;
|
|
1638
|
-
}
|
|
1639
|
-
var astx2_min_default = "/* eslint-disable */\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 32070 $ */\nvar $ASTX2_CONST = {\n ERROR_SUCCESS: 0,\n ERROR_FAILED: 101,\n ERROR_NOINIT: 102,\n ERROR_NOTINST: 103,\n ERROR_NOTSUPPORTED: 104,\n ERROR_NOCONNECT: 105,\n ERROR_NCK: 106,\n ERROR_ERR: 107,\n ERROR_NSP: 108,\n ERROR_PARAM: 109,\n ERROR_EXCESS: 110,\n ERROR_NEEDUPDATE: 111,\n OPTION_NONE2E: 1,\n OPTION_AUTOFOCUS: 2,\n OPTION_AUTOSETTEXT: 4,\n OPTION_E2EFORM: 8,\n OPTION_E2EFORM_NOENC: 16,\n OPTION_E2EFORM_ALLTRIP: 32,\n OPTION_E2EFORM_ONLY: 64,\n OPTION_E2EFORM_TAGSET: 128,\n OPTION_NONE2E_ALG: 256,\n OPTION_NOSPTDUMMY: 512,\n OPTION_FIXEDTYPE: 1024,\n PROTECT_AK: 1,\n PROTECT_FW: 2,\n PROTECT_PB: 4,\n PROTECT_PCS: 8,\n SERVICE_AK: 1,\n REQUEST_JSONP: 1,\n REQUEST_AJAX: 2,\n DEBUG_NOALIVE: 1,\n INTERVAL_ALIVE: 5e3,\n E2ETYPE_EXCLUDE: -1,\n E2ETYPE_NONE: 0,\n E2ETYPE_CERT1: 1,\n E2ETYPE_CERT2: 2,\n E2ETYPE_SDK: 11,\n E2ETYPE_PLAIN1: 21,\n E2ETYPE_PLAIN2: 22,\n E2ETYPE_WIZVERA: 31,\n PAGEID: '',\n BROWSER_TYPE: '',\n BROWSER_VER: '',\n E2EFORM_TAIL: !0,\n E2EFORM_INIT: '_e2e_forminit',\n E2EFORM_TAG1: '_e2e_1__',\n E2EFORM_TAG2: '_e2e_2__',\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\n getErrno: function (a) {\n return 'NCK' == a ? this.ERROR_NCK : 'ERR' == a ? this.ERROR_ERR : 'NSP' == a ? this.ERROR_NSP : this.ERROR_FAILED;\n },\n _get_browser_version: function (a) {\n var b = 0;\n if (0 <= a.indexOf('Edge/') && ((b = parseInt(a.split('Edge/')[1])), 0 < b)) return 'EG' + b;\n if (0 <= a.indexOf('MSIE')) {\n if (((b = parseInt(a.split('MSIE')[1])), 0 < b)) return 'IE' + b;\n } else if (\n 0 <= a.indexOf('Trident') &&\n (0 <= a.indexOf('rv:')\n ? (b = parseInt(a.split('rv:')[1]))\n : 0 <= a.indexOf('IE') && (b = parseInt(a.split('IE')[1])),\n 0 < b)\n )\n return 'IE' + b;\n return 0 <= a.indexOf('OPR/') && ((b = parseInt(a.split('OPR/')[1])), 0 < b)\n ? 'OP' + b\n : 0 <= a.indexOf('Firefox/') && ((b = parseInt(a.split('Firefox/')[1])), 0 < b)\n ? 'FF' + b\n : 0 <= a.indexOf('Chrome/') && ((b = parseInt(a.split('Chrome/')[1])), 0 < b)\n ? 'CR' + b\n : 0 <= a.indexOf('AppleWebKit') &&\n 0 <= a.indexOf('Version/') &&\n ((b = parseInt(a.split('Version/')[1])), 0 < b)\n ? 'SF' + b\n : 'OT0';\n },\n init: function () {\n this.PAGEID = new Date().getTime();\n this.PAGEID -= Math.floor(100 * Math.random());\n this.BROWSER_VER = this._get_browser_version(navigator.userAgent);\n this.BROWSER_TYPE = this.BROWSER_VER.substring(0, 2);\n }\n};\n$ASTX2_CONST.init();\nvar $ASTX2_COMM = {\n mLocalServerURL: '',\n mClientPublicKey: '',\n mErrorAbortFlag: !1,\n mDegugFlags: 0,\n setDegugFlags: function (a) {\n this.mDegugFlags |= a;\n },\n getDegugFlags: function () {\n return this.mDegugFlags;\n },\n isEnable: function () {\n return 0 < this.mLocalServerURL.length ? !0 : !1;\n },\n uninit: function () {\n this.mLocalServerURL = '';\n },\n errorAbort: function (a) {\n 1 != this.mErrorAbortFlag && ((this.mErrorAbortFlag = !0), $ASTX2_CUST.errorAbort(a));\n }\n },\n $_astxu = {\n mJsonpSequence: 0,\n jsonQstr: function (a) {\n var b = [],\n c;\n for (c in a) a.hasOwnProperty(c) && b.push(encodeURIComponent(c) + '=' + encodeURIComponent(a[c]));\n return b.join('&');\n },\n jsonParse: function (a) {\n var b = a.indexOf('{'),\n c = a.indexOf('}');\n if (-1 == b || -1 == c) return {};\n a = a.substring(b, c + 1);\n return 'object' == typeof window.JSON && 'function' == typeof window.JSON.parse\n ? window.JSON.parse(a)\n : 'function' == typeof jQuery && 'function' == typeof jQuery.parseJSON\n ? jQuery.parseJSON(a)\n : eval('(' + a + ')');\n },\n _send_jsonp_jquery: function (a) {\n try {\n jQuery.ajax({\n url: a.src,\n timeout: a.timeout,\n cache: !1,\n crossDomain: !0,\n dataType: 'jsonp',\n contentType: 'application/javascript',\n success: function (b, d, e) {\n a.onSuccess(b);\n },\n error: function (b, d, e) {\n if (200 == b.status && 1 == a.nocallback) a.onSuccess();\n else a.onFailure();\n },\n complete: function (a, b) {}\n });\n } catch (b) {\n a.onFailure();\n }\n },\n _send_jsonp_dom: function (a) {\n var b = document.createElement('script');\n b.type = 'text/javascript';\n b.id = a.callback;\n b.async = a.async;\n b.src = a.src;\n var c = document.getElementsByTagName('body')[0];\n if (null == c && ((c = document.getElementsByTagName('head')[0]), null == c)) {\n a.onFailure();\n return;\n }\n var d = window.setTimeout(function () {\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && ((b.onerror = function () {}), c.removeChild(b));\n } catch (d) {}\n a.onFailure();\n }, a.timeout);\n 0 == a.nocallback\n ? (window[a.callback] = function (b) {\n window.clearTimeout(d);\n try {\n var f = document.getElementById(a.callback);\n f && c.removeChild(f);\n } catch (g) {}\n a.onSuccess(b);\n })\n : (b.onload = function () {\n window.clearTimeout(d);\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onSuccess();\n });\n b.onerror = function () {\n window.clearTimeout(d);\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onFailure();\n };\n c.appendChild(b);\n },\n sendJsonp: function (a) {\n null == a.data && (a.data = {});\n null == a.callback && (a.callback = 'jsonpCallback' + $_astxu.rnd());\n null == a.nocallback && (a.nocallback = !1);\n null == a.timeout && (a.timeout = 5e3);\n null == a.async && (a.async = !0);\n null == a.seq && (a.seq = !1);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function () {});\n a.src = 1 == $ASTX2.mUseJQuery ? a.url + '?v=3' : a.url + '?v=2&callback=' + a.callback;\n if (1 == a.seq) {\n var b = ++this.mJsonpSequence;\n a.src += '&seq=' + b;\n 2147483647 <= this.mJsonpSequence && (this.mJsonpSequence = 0);\n }\n b = this.jsonQstr(a.data);\n 0 < b.length && (a.src += '&' + b);\n 1 == $ASTX2.mUseJQuery ? this._send_jsonp_jquery(a) : this._send_jsonp_dom(a);\n },\n _get_xhr_object: function () {\n if ('undefined' !== typeof XMLHttpRequest)\n try {\n return new XMLHttpRequest();\n } catch (a) {}\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch (b) {}\n return null;\n },\n sendAjax: function (a) {\n var b = this._get_xhr_object();\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.send(c);\n }\n },\n sendAuthAjax: function (a) {\n var b = this._get_xhr_object();\n const stored = JSON.parse(sessionStorage.getItem('cust-mgmt-auth') || '{}');\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.setRequestHeader('Authorization', stored.key);\n b.withCredentials = true;\n b.send(c);\n }\n },\n isACK: function (a) {\n return a && 'ACK' == a ? !0 : !1;\n },\n isWinOS: function () {\n return -1 != navigator.platform.indexOf('Win32') || -1 != navigator.platform.indexOf('Win64') ? !0 : !1;\n },\n isMacOS: function () {\n return -1 != navigator.platform.indexOf('Mac') ? !0 : !1;\n },\n isLinuxOS: function () {\n return -1 != navigator.platform.indexOf('Linux') ? !0 : !1;\n },\n isMacLinuxOS: function () {\n return 1 == this.isMacOS() || 1 == this.isLinuxOS() ? !0 : !1;\n },\n hasFocused: function () {\n var a = !1;\n try {\n a = document.hasFocus();\n } catch (b) {}\n return a;\n },\n addEvent: function (a, b, c) {\n a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent('on' + b, c);\n },\n removeEvent: function (a, b, c) {\n a.removeEventListener ? a.removeEventListener(b, c) : a.detachEvent('on' + b, c);\n },\n getCreatedFormValue: function (a, b, c) {\n null == c && (c = !1);\n c = 1 == c ? document.getElementsByTagName('input') : a.getElementsByTagName('input');\n for (var d = 0; d < c.length; d++) {\n var e = c[d];\n if (e && this.getnc(e.name) == b) return e;\n }\n c = document.createElement('input');\n c.name = b;\n c.type = 'hidden';\n if ('function' === typeof $ASTX2_CUST.onCreatedFormValue) $ASTX2_CUST.onCreatedFormValue(c, b);\n a.appendChild(c);\n return c;\n },\n getHostPath: function () {\n var a = window.location.protocol + '//' + window.location.hostname;\n return (a += window.location.port ? ':' + window.location.port : '');\n },\n getnc: function (a, b) {\n null == b && (b = '');\n return null == a ? b : a;\n },\n getint: function (a, b) {\n null == b && (b = 0);\n return parseInt(a) || b;\n },\n rnd: function () {\n var a = new Date().getTime();\n return (a += new String(Math.floor(100 * Math.random())));\n },\n getKeyCode: function (a) {\n var b = null;\n a && (b = a.keyCode ? a.keyCode : a.which);\n return b;\n },\n xorEncode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n xorDecode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n ltrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(0, 1) == b; ) a = a.substring(1, a.length);\n return a;\n },\n rtrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(a.length - 1, a.length) == b; ) a = a.substring(0, a.length - 1);\n return a;\n },\n alltrim: function (a, b) {\n return this.ltrim(this.rtrim(a, b), b);\n },\n setInputFocus: function () {\n try {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (c && 'hidden' != c.type) {\n c.focus();\n break;\n }\n }\n } catch (d) {}\n },\n log: function (a) {\n 'object' === typeof debuger && 'function' === typeof debuger.write\n ? debuger.write(a)\n : 'object' === typeof window.console && 'function' === typeof console.log && console.log(a);\n },\n msg: function (a) {\n this.log(a);\n }\n },\n $ASTX2_E2E = (function () {\n var a = null,\n b = function (a) {\n function b(a) {\n var c = a.target;\n null == c && (c = a.srcElement);\n return c;\n }\n function e(a) {\n if (null == a) return null;\n var b = a.getAttribute('e2e_inputid');\n if (null == b || 0 >= b) return null;\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c) return null;\n var d = a.getAttribute('e2e_inputtype');\n if (null == d || 0 >= d) d = '';\n var e = a.getAttribute('wizvera_key');\n null == e && (e = '');\n var f = {};\n f.e2e_inputid = b;\n f.e2e_type = c;\n f.e2e_inputtype = d;\n f.name = $_astxu.getnc(a.name);\n f.form = a.form ? $_astxu.getnc(a.form.name) : '';\n f.wizvera_key = e;\n return f;\n }\n function f(a) {\n var b = e(a);\n if (null == b) return null;\n b.type = $_astxu.getnc(a.type);\n b.maxlength = $_astxu.getnc(a.getAttribute('maxlength'));\n b.txtmsk = $_astxu.getnc(a.getAttribute('e2e_txtmsk'));\n return b;\n }\n function g(a, b) {\n a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 && (a.readOnly = b);\n }\n function h(a, b, c, d, e) {\n 1 == n && q(a, b, c, d, e);\n }\n function q(b, s, d, e, f) {\n var g = {};\n g.pageid = $ASTX2_CONST.PAGEID;\n if (null != s) for (var h in s) s.hasOwnProperty(h) && (g[h] = s[h]);\n a.send_e2e_cmd(b, g, d, e, f);\n }\n function l(a, b) {\n var c = '';\n return (c = 0 == $ASTX2_CONST.E2EFORM_TAIL ? b + a : a + b);\n }\n function m(a, b) {\n var c = '';\n return (c =\n 'password' == a.type\n ? b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2_PWD)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1_PWD)\n : b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1));\n }\n function C() {\n if (0 != D)\n for (var a = document.getElementsByTagName('form'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (null != c) {\n var d = !1;\n if (k & $ASTX2_CONST.OPTION_E2EFORM_TAGSET) {\n var e = c.getAttribute(E.e2eform_tagset);\n if (null == e || 0 >= e) d = !0;\n } else if (k & $ASTX2_CONST.OPTION_E2EFORM_ONLY) {\n if (null == c) e = !1;\n else\n for (var e = !1, f = c.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = h.getAttribute('e2e_type')), null != h && 0 < h)) {\n e = !0;\n break;\n }\n }\n 0 == e && (d = !0);\n }\n if (1 != d) {\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG1))))\n d.value = F;\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG2))))\n d.value = G;\n }\n }\n }\n }\n function V(a) {\n var b = 0;\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b = 1);\n a = {\n ver: $_astxu.getint(a.ver),\n alg: $_astxu.getint(a.alg),\n svr: $_astxu.getnc(a.svr),\n norsa: $_astxu.getint(a.norsa),\n uniq: $_astxu.getnc(a.uniq),\n utime: $_astxu.getint(a.utime),\n ncert: $_astxu.getnc(a.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n noenc: b\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/e2e_forminit',\n data: a,\n onSuccess: function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n 0 == $_astxu.isACK(b)\n ? $_astxu.msg('[e2e_forminit] result=' + b)\n : ((D = !0), (F = $_astxu.getnc(a.e2e_form1)), (G = $_astxu.getnc(a.e2e_form2)), C());\n },\n onFailure: function () {\n $_astxu.msg('[e2e_forminit] failure.');\n }\n });\n }\n function W() {\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (a) {\n var b = $_astxu.jsonParse(a);\n a = $_astxu.getnc(b ? b.result : '');\n 0 == $_astxu.isACK(a)\n ? $_astxu.msg('[_init_e2eform] result=' + a)\n : $ASTX2.set_cert(\n function () {\n V(b);\n },\n function () {\n $_astxu.msg('[_init_e2eform] set_cert() failure');\n },\n b\n );\n },\n onFailure: function (a) {\n $_astxu.msg('[_init_e2eform] failure');\n }\n });\n }\n function H(a) {\n var b = $_astxu.getHostPath() + $_astxu.getnc(window.location.pathname),\n c = 0;\n k & $ASTX2_CONST.OPTION_NOSPTDUMMY && (c = 1);\n q(\n 'e2e_start',\n { browser: $ASTX2_CONST.BROWSER_VER, ver: a.ver, svr: a.svr, valg: a.valg, url: b, custcode: w, nospt: c },\n 5e3,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n if ($_astxu.isACK(b)) {\n n = 1;\n I = $_astxu.getint(a.call_settext);\n t = $_astxu.getint(a.call_gettext);\n J = $_astxu.getint(a.vm_env);\n K = $_astxu.getint(a.ak_drv);\n try {\n var c = document.activeElement;\n c && x(c, !1);\n } catch (aa) {}\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (3 > $_astxu.getint(a.stsvr) ? $ASTX2_COMM.errorAbort($ASTX2_CONST.ERROR_NEEDUPDATE) : W());\n if (k & $ASTX2_CONST.OPTION_AUTOSETTEXT)\n for (var d in u) (a = u[d]), null != a && (0 >= $_astxu.getnc(a.value).length || y(a));\n } else n = 2;\n },\n function () {\n n = 2;\n }\n );\n }\n function L(a) {\n if (0 == $_astxu.hasFocused()) return !1;\n if (0 == n) return !0;\n if (1 == n) {\n if (!1 === a) return;\n try {\n var b = document.activeElement;\n b && x(b, !1);\n } catch (c) {}\n return !0;\n }\n n = 0;\n k & $ASTX2_CONST.OPTION_NONE2E\n ? ((a = 0),\n k & $ASTX2_CONST.OPTION_NONE2E_ALG && (a = $ASTX2.mOptionStrings.none2e_alg),\n H({ ver: 1, svr: '_none2e', valg: a }))\n : $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_INIT),\n onSuccess: function (a) {\n a = $_astxu.jsonParse(a);\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b) ? H(a) : (n = -1);\n },\n onFailure: function (a) {\n n = -1;\n }\n });\n return !0;\n }\n function r(a) {\n if (null != a && (a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 || 0 != t)) {\n try {\n if (a != document.activeElement) return;\n } catch (b) {}\n 'number' == typeof a.selectionStart\n ? (a.selectionStart = a.selectionEnd = a.value.length)\n : 'undefined' != typeof a.createTextRange && ((a = a.createTextRange()), a.collapse(!1), a.select());\n }\n }\n function x(a, b) {\n v = !1;\n if (k & $ASTX2_CONST.OPTION_FIXEDTYPE && a) {\n var c = a.getAttribute('e2e_inputid');\n null != c && 0 < c && z[c] != a.type && (a.type = z[c]);\n }\n c = f(a);\n null != c &&\n (!0 === b && L(!1),\n h(\n 'e2e_focus',\n c,\n null,\n function (b) {\n g(a, !1);\n window.setTimeout(function () {\n r(a);\n }, 1);\n },\n function () {}\n ));\n }\n function M(a) {\n var c = b(a);\n if (null != c) {\n if ('function' === typeof $ASTX2_CUST.onHandlerPreFocus) $ASTX2_CUST.onHandlerPreFocus(c, a);\n x(c, !0);\n }\n }\n function N(a) {\n a = b(a);\n if (null != a) {\n var c = e(a);\n if (null != c) {\n try {\n if (document.hasFocus() && a === document.activeElement) return;\n } catch (f) {}\n g(a, !0);\n h('e2e_blur', c);\n }\n }\n }\n function O(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function y(a, b) {\n var c = f(a);\n if (null != c) {\n var d = $_astxu.getnc(a.value);\n c.text = d;\n k & $ASTX2_CONST.OPTION_E2EFORM && (c.e2eform = 1);\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (c.noenc = 1);\n h(\n 'e2e_settext',\n c,\n null,\n function (d) {\n var e = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(e)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n var e = m(a, c.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((e = $_astxu.getCreatedFormValue(a.form, e, f))) e.value = $_astxu.getnc(d.e2e_data);\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n }\n function A(a) {\n 'function' === typeof a.stopPropagation && a.stopPropagation();\n 'function' === typeof a.preventDefault ? a.preventDefault() : (a.returnValue = !1);\n }\n function X(a, b, c) {\n h(\n 'e2e_gettext',\n b,\n null,\n function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d)\n ? ((b = $_astxu.getnc(b.text)), (a.value = b), c && c($ASTX2_CONST.ERROR_SUCCESS))\n : c && c($ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c && c($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n function Y(a, b) {\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b.noenc = 1);\n h(\n 'e2e_formget',\n b,\n null,\n function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n if (0 == $_astxu.isACK(d)) $_astxu.msg('[e2e_formget] ' + b.name + ',result=' + d);\n else if (((d = a.form), null != d)) {\n var e = m(a, b.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((d = $_astxu.getCreatedFormValue(d, e, f))) d.value = $_astxu.getnc(c.e2e_data);\n }\n },\n function () {}\n );\n }\n function P(a) {\n var c = b(a);\n if (null != c) {\n var e = f(c);\n if (null != e) {\n r(c);\n var p = $_astxu.getKeyCode(a);\n 17 == p && (v = !0);\n if (1 == v)\n return (\n 86 == p &&\n h(\n 'e2e_clear',\n e,\n null,\n function (a) {\n c.value = '';\n },\n function () {}\n ),\n A(a),\n !1\n );\n if (1 == (16 == p || 17 == p || 18 == p ? !0 : !1)) return !0;\n var g = !0;\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n ((e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT1 && e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT2) || Y(c, e));\n 'function' === typeof $ASTX2_CUST.onHandlerKeyDown &&\n 0 == $ASTX2_CUST.onHandlerKeyDown(c, a) &&\n (A(a), (g = !1));\n 1 != t ||\n ('password' == c.type && e.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1) ||\n 0 != J ||\n (1 == g &&\n X(c, e, function () {\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1));\n }),\n 0 == (8 == p || 9 == p || 13 == p || 20 == p ? !0 : !1) && (A(a), (g = !1)));\n return g;\n }\n }\n }\n function Q(a) {\n var c = b(a);\n null != c &&\n (17 == $_astxu.getKeyCode(a) && (v = !1),\n 1 == I\n ? y(c)\n : 0 == t &&\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1)),\n window.setTimeout(function () {\n r(c);\n }, 1));\n }\n function R(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function S(a) {\n if ('IE' == $ASTX2_CONST.BROWSER_TYPE || 'EG' == $ASTX2_CONST.BROWSER_TYPE) {\n var c = b(a);\n null != c &&\n '' != c.value &&\n setTimeout(function () {\n if ('' == c.value) {\n var a = e(c);\n null != a && h('e2e_clear', a);\n }\n }, 1);\n }\n }\n function T(a) {\n var c = b(a);\n null != c &&\n ('number' == typeof c.selectionStart\n ? (c.selectionStart < c.value.length || c.selectionEnd < c.value.length) &&\n window.setTimeout(function () {\n r(c);\n }, 1)\n : 'undefined' != typeof c.createTextRange &&\n document.selection &&\n ((a = document.selection.createRange()),\n a.moveStart('character', -c.value.length),\n a.text.length <= c.value.length &&\n window.setTimeout(function () {\n r(c);\n }, 1)));\n }\n function Z(a) {}\n function U(a) {\n h('e2e_unload');\n }\n var k = 0,\n E = [],\n $ = 0,\n B = !1,\n w = 0,\n n = -1,\n I = 0,\n t = 0,\n J = 0,\n K = 1,\n v = !1,\n u = [],\n z = [],\n D = !1,\n F = '',\n G = '';\n this.setOption = function (a) {\n k |= a;\n };\n this.setOptionStrings = function (a) {\n E = a;\n };\n this.attach = function (a, b) {\n null != a && (w = a);\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && (u = []);\n k & $ASTX2_CONST.OPTION_E2EFORM && C();\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var e = c[d];\n null != e && this.addObject(e);\n }\n q(\n 'e2e_init',\n null,\n null,\n function (a) {\n L();\n $_astxu.addEvent(window, 'blur', Z);\n $_astxu.addEvent(window, 'unload', U);\n $_astxu.addEvent(window, 'beforeunload', U);\n b && b(!0);\n },\n function () {\n b && b(!1);\n }\n );\n B = !0;\n };\n this.addObject = function (a) {\n if (null != a) {\n var b = a.getAttribute('e2e_inputid');\n if (!(null != b && 0 < b)) {\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c)\n if (((c = a.getAttribute('e2e')), 'true' == c || 'on' == c))\n (c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c);\n else {\n c = $ASTX2_CONST.E2ETYPE_NONE;\n try {\n if (\n ('function' === typeof $ASTX2_CUST.isE2EObject &&\n 1 == $ASTX2_CUST.isE2EObject(a) &&\n ((c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c)),\n 'function' === typeof $ASTX2_CUST.getE2Etype)\n ) {\n var d = $ASTX2_CUST.getE2Etype(a);\n d && ((c = d), a.setAttribute('e2e_type', c));\n }\n } catch (e) {}\n if (c == $ASTX2_CONST.E2ETYPE_NONE) return;\n }\n b = ++$;\n a.setAttribute('e2e_inputid', b);\n d = !0;\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && 0 < a.value.length && ((d = !1), u.push(a));\n 1 == d && (a.value = '');\n a.setAttribute('autocomplete', 'off');\n g(a, !0);\n z[b] = a.type;\n $_astxu.addEvent(a, 'focus', M);\n $_astxu.addEvent(a, 'blur', N);\n $_astxu.addEvent(a, 'click', O);\n $_astxu.addEvent(a, 'keyup', Q);\n $_astxu.addEvent(a, 'keydown', P);\n $_astxu.addEvent(a, 'select', T);\n $_astxu.addEvent(a, 'mouseup', S);\n $_astxu.addEvent(a, 'mousedown', R);\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (c == $ASTX2_CONST.E2ETYPE_CERT1 || c == $ASTX2_CONST.E2ETYPE_CERT2) &&\n ((b = a.form),\n null != b &&\n ((a = m(a, c)),\n (c = !1),\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (c = !0),\n $_astxu.getCreatedFormValue(b, a, c)));\n }\n }\n };\n this.subObject = function (a) {\n var b = e(a);\n if (null != b) {\n $_astxu.removeEvent(a, 'focus', M);\n $_astxu.removeEvent(a, 'blur', N);\n $_astxu.removeEvent(a, 'click', O);\n $_astxu.removeEvent(a, 'keyup', Q);\n $_astxu.removeEvent(a, 'keydown', P);\n $_astxu.removeEvent(a, 'select', T);\n $_astxu.removeEvent(a, 'mouseup', S);\n $_astxu.removeEvent(a, 'mousedown', R);\n try {\n a == document.activeElement && h('e2e_blur', b);\n } catch (c) {}\n a.value = '';\n a.setAttribute('e2e_inputid', -1);\n a.setAttribute('e2e_type', -1);\n g(a, !1);\n }\n };\n this.getE2EHash = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gethash',\n c,\n null,\n function (a) {\n var c = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(c)\n ? b($_astxu.getnc(a.hash), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getEncText = function (a, b, c) {\n var d = e(a);\n d.customcode = w;\n d.random = b;\n null == d\n ? c(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'sdk_getenctext',\n d,\n null,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b)\n ? c(d.name, $_astxu.getnc(a.getenctext), $ASTX2_CONST.ERROR_SUCCESS)\n : c(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getE2EText = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : c.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 && c.e2e_type != $ASTX2_CONST.E2ETYPE_WIZVERA\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gettext',\n c,\n null,\n function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d)\n ? b(c.name, $_astxu.getnc(a.text), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.setE2EText = function (a, b) {\n y(a, b);\n };\n this.clearE2EText = function (a, b) {\n var c = e(a);\n null != c &&\n h(\n 'e2e_clear',\n c,\n null,\n function (d) {\n d = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(d)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n a.value = '';\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n d = m(a, c.e2e_type);\n var e = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (e = !0);\n if ((d = $_astxu.getCreatedFormValue(a.form, d, e))) d.value = '';\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.dettach = function () {\n h('e2e_uninit');\n B = !1;\n };\n this.isAttached = function () {\n return B;\n };\n this.isStarted = function () {\n return 1 == n ? !0 : !1;\n };\n this.checkService = function (a) {\n var b = {};\n b.service = $ASTX2_CONST.SERVICE_AK;\n b.result = $ASTX2_CONST.ERROR_SUCCESS;\n if (0 >= n) {\n var c = this;\n window.setTimeout(function () {\n c.checkService(a);\n }, 300);\n } else\n 1 == n && 0 == K\n ? (b.result = $ASTX2_CONST.ERROR_FAILED)\n : 2 == n && (b.result = $ASTX2_CONST.ERROR_FAILED),\n a(b);\n };\n this.getE2EelmsForm = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = e(h)), null != h && h.e2e_type == d)) {\n var k = !1;\n null == a ? (k = !0) : $_astxu.getnc(a.name) == h.form && (k = !0);\n 0 != k && (b.push(h.e2e_inputid), c.push(h.name));\n }\n }\n };\n this.getE2EelmsID = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h) {\n var k = e(h);\n if (null != k && k.e2e_type == d) {\n for (var l = !1, h = $_astxu.getnc(h.id).toLowerCase(), m = 0; m < a.length; m++)\n if (a[m].toLowerCase() == h) {\n l = !0;\n break;\n }\n 0 != l && (b.push(k.e2e_inputid), c.push(k.name));\n }\n }\n }\n };\n this.resetE2Evalues = function (a, b) {\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var f = c[d];\n if (null != f) {\n var g = e(f);\n null != g &&\n g.form == a &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1 &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 &&\n (f.value = b);\n }\n }\n };\n this.getE2Eattribute = function (a) {\n return e(a);\n };\n };\n return {\n getInstance: function (c) {\n null === a && (a = new b(c));\n return a;\n }\n };\n })(),\n $ASTX2 = {\n mUseJQuery: !0,\n mUseAjaxHello: !1,\n mUseAutoStart: !0,\n mOption: 0,\n mOptionStrings: [],\n mE2EInst: null,\n mLastError: $ASTX2_CONST.ERROR_SUCCESS,\n send_e2e_cmd: function (a, b, c, d, e, f) {\n if ('object' == typeof $ASTX2_COMM && 0 != $ASTX2_COMM.isEnable()) {\n var g = this;\n null == f && (f = 1);\n var h = !1;\n if ('e2e_focus' == a || 'e2e_blur' == a || 'e2e_gettext' == a || 'e2e_settext' == a) h = !0;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/' + a,\n data: b,\n timeout: c || 5e3,\n async: !1,\n seq: h,\n onSuccess: function (a) {\n d && d(a);\n },\n onFailure: function () {\n 3 > f ? g.send_e2e_cmd(a, b, c, d, e, f + 1) : e && e();\n }\n });\n }\n },\n _send_alive: function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/alive', data: a });\n },\n send_alive_run: function () {\n if (!($ASTX2_COMM.getDegugFlags() & $ASTX2_CONST.DEBUG_NOALIVE)) {\n var a = this;\n setInterval(function () {\n a._send_alive();\n }, $ASTX2_CONST.INTERVAL_ALIVE);\n }\n },\n _hello_local_server: function (a, b, c, d, e) {\n var f = this;\n if (d >= c.length)\n f.setLastError($ASTX2_CONST.ERROR_NOTINST),\n 1 == $_astxu.isWinOS() &&\n 1 == f.mUseAutoStart &&\n ((f.mUseAutoStart = !1),\n 'IE' != $ASTX2_CONST.BROWSER_TYPE &&\n 'EG' != $ASTX2_CONST.BROWSER_TYPE &&\n (window.location.href = 'astx://start')),\n b();\n else {\n var g = e[d],\n h = c[d],\n q = 'https://' + (1 == $_astxu.isMacOS() ? 'lx.astxsvc.com' : '127.0.0.1') + ':' + h + '/ASTX2',\n h = '',\n l = document.getElementsByTagName('script');\n if (l) for (var m = 0; m < l.length; m++) l[m].src && 0 <= l[m].src.indexOf('astx2.min.js') && (h = l[m].src);\n l = '$Revision: 32070 $';\n l = l.substr(11, l.length - 13);\n m = !1;\n 0 == $ASTX2.mUseAjaxHello && 1 == d % 2 && (m = !0);\n 'IE' == $ASTX2_CONST.BROWSER_TYPE &&\n 'IE10' != $ASTX2_CONST.BROWSER_VER &&\n 'IE11' != $ASTX2_CONST.BROWSER_VER &&\n ((m = !0), 2e3 < g && (g = 2e3));\n d++;\n 1 == m\n ? $_astxu.sendJsonp({\n url: q + '/hello',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n c = $_astxu.getnc(c ? c.client_public_key : '');\n $_astxu.isACK(d)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = c), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n })\n : $_astxu.sendAjax({\n url: q + '/hello?',\n type: 'POST',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.jsonParse(c);\n c = $_astxu.getnc(d ? d.result : '');\n d = $_astxu.getnc(d ? d.client_public_key : '');\n $_astxu.isACK(c)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = d), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n });\n }\n },\n setOption: function (a) {\n if (null != a) {\n !0 === a.autofocus && (this.mOption |= $ASTX2_CONST.OPTION_AUTOFOCUS);\n !0 === a.e2eform && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM);\n !1 === a.e2eform_enc && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_NOENC);\n !0 === a.e2eform_alltrip && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP);\n !0 === a.e2eform_only && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ONLY);\n !0 === a.autosettext && (this.mOption |= $ASTX2_CONST.OPTION_AUTOSETTEXT);\n !0 === a.nospt && (this.mOption |= $ASTX2_CONST.OPTION_NOSPTDUMMY);\n !0 === a.fixedtype && (this.mOption |= $ASTX2_CONST.OPTION_FIXEDTYPE);\n var b = $_astxu.getnc(a.e2eform_tagset);\n 0 < b.length &&\n ((this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_TAGSET), (this.mOptionStrings.e2eform_tagset = b));\n b = $_astxu.getint(a.none2e_alg);\n 0 < b && ((this.mOption |= $ASTX2_CONST.OPTION_NONE2E_ALG), (this.mOptionStrings.none2e_alg = b));\n }\n },\n _get_custom_value: function () {\n 'undefined' !== typeof $ASTX2_CUST.mUseJQuery && ($ASTX2.mUseJQuery = $ASTX2_CUST.mUseJQuery);\n 'undefined' !== typeof $ASTX2_CUST.mUseAjaxHello && ($ASTX2.mUseAjaxHello = $ASTX2_CUST.mUseAjaxHello);\n 'undefined' !== typeof $ASTX2_CUST.mUseAutoStart &&\n ($ASTX2.mUseAutoStart = 1 == $ASTX2.mUseAutoStart ? $ASTX2_CUST.mUseAutoStart : !1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAIL && ($ASTX2_CONST.E2EFORM_TAIL = $ASTX2_CUST.E2EFORM_TAIL);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_INIT && ($ASTX2_CONST.E2EFORM_INIT = $ASTX2_CUST.E2EFORM_INIT);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1 && ($ASTX2_CONST.E2EFORM_TAG1 = $ASTX2_CUST.E2EFORM_TAG1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2 && ($ASTX2_CONST.E2EFORM_TAG2 = $ASTX2_CUST.E2EFORM_TAG2);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG1_PWD = $ASTX2_CUST.E2EFORM_TAG1_PWD);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG2_PWD = $ASTX2_CUST.E2EFORM_TAG2_PWD);\n },\n init: function (a, b, c, d) {\n function e() {\n a();\n if (1 == $_astxu.isMacLinuxOS()) {\n f.send_alive_run();\n try {\n $ASTX2_MLi.init();\n } catch (b) {}\n }\n }\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (1 == $ASTX2_COMM.isEnable()) a();\n else {\n this._get_custom_value();\n null != d && ($ASTX2.mUseAutoStart = 1 == d ? $ASTX2.mUseAutoStart : !1);\n 1 == $ASTX2.mUseJQuery && 'undefined' === typeof jQuery && ($ASTX2.mUseJQuery = !1);\n var f = this;\n this.mE2EInst = $ASTX2_E2E.getInstance(this);\n this.mE2EInst.setOption(this.mOption);\n this.mE2EInst.setOptionStrings(this.mOptionStrings);\n var g = [],\n h = [];\n null != c\n ? ((g = [55920, 55920, 55921, 55922]), (h = [c, c, c, c]))\n : ((g = [55920, 55920, 55921, 55922]), (h = [1e4, 1500, 750, 250]));\n setTimeout(function () {\n f._hello_local_server(e, b, g, 0, h);\n }, 200);\n }\n },\n _check_local_server_chk_stamp: function (a, b, c, d) {\n var e = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_CHK_STAMP),\n data: d,\n onSuccess: function (c) {\n c = $_astxu.jsonParse(c);\n c = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(c) ? a() : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function (a) {\n b();\n }\n });\n },\n _check_local_server: function (a, b, c, d) {\n var e = this;\n null == d && (d = 1);\n 3 < d\n ? (e.setLastError($ASTX2_CONST.ERROR_NOCONNECT), b())\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/check',\n data: { method: c, url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_STAMP), rnd: $_astxu.rnd() },\n onSuccess: function (f) {\n var g = $_astxu.getnc(f ? f.result : '');\n $_astxu.isACK(g)\n ? ((f.rnd = $_astxu.rnd()), e._check_local_server_chk_stamp(a, b, c, f))\n : e._check_local_server(a, b, c, d + 1);\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n e._check_local_server(a, b, c, d + 1);\n }\n });\n },\n checkServer: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), b())\n : (0 == $_astxu.isWinOS() ? (c = 1) : null == c && (c = 1), this._check_local_server(a, b, c));\n },\n _e2e_enable: function () {\n return 0 == $_astxu.isWinOS()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOTSUPPORTED), !1)\n : 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), !1)\n : !0;\n },\n resetE2E: function (a, b) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) return !1;\n var c = this;\n window.setTimeout(function () {\n c.mE2EInst.attach(a, b);\n }, 100);\n return !0;\n },\n initE2E: function (a, b) {\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n resetNonE2E: function (a, b) {\n return this.initNonE2E(a, b);\n },\n initNonE2E: function (a, b) {\n this.mE2EInst.setOption($ASTX2_CONST.OPTION_NONE2E);\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n uninitE2E: function () {\n 1 == $_astxu.isWinOS() && 1 == $ASTX2_COMM.isEnable() && this.mE2EInst.dettach();\n },\n uninitNonE2E: function () {\n this.uninitE2E();\n },\n set_cert: function (a, b, c, d) {\n null == d && (d = 1);\n var e = new String($_astxu.getnc(c['cert' + d]));\n if (0 == e.length) 0 < d ? a() : b();\n else {\n var f = this;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_cert',\n data: { step: d, cert: e, pageid: $ASTX2_CONST.PAGEID },\n onSuccess: function (e) {\n setTimeout(function () {\n f.set_cert(a, b, c, d + 1);\n }, 250);\n },\n onFailure: function () {\n b();\n }\n });\n }\n },\n _e2edata_get: function (a, b, c, d) {\n var e = this;\n a = {\n ver: $_astxu.getint(d.ver),\n alg: $_astxu.getint(d.alg),\n svr: $_astxu.getnc(d.svr),\n norsa: $_astxu.getint(d.norsa),\n uniq: $_astxu.getnc(d.uniq),\n utime: $_astxu.getint(d.utime),\n ncert: $_astxu.getnc(d.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n ids1: a.ids1,\n names1: a.names1,\n ids2: a.ids2,\n names2: a.names2\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_data',\n data: a,\n timeout: 1e4,\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b(a) : (e.setLastError($ASTX2_CONST.ERROR_NCK), c());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n _e2edata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), c())\n : d.set_cert(\n function () {\n d._e2edata_get(a, b, c, f);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n c();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n getE2EData: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsForm(a, d, e, 1);\n this.mE2EInst.getE2EelmsForm(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n getE2EDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getE2EData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getE2EDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n getE2EDataIDs: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n null == a && (that.setLastError($ASTX2_CONST.ERROR_PARAM), c());\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsID(a, d, e, 1);\n this.mE2EInst.getE2EelmsID(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n setE2EData: function (a, b, c, d) {\n null == c && (c = !0);\n null == d && (d = '');\n var e = $_astxu.getnc(b.e2e_data1);\n 0 < e.length && ($_astxu.getCreatedFormValue(a, 'e2e_data1').value = e);\n b = $_astxu.getnc(b.e2e_data2);\n 0 < b.length && ($_astxu.getCreatedFormValue(a, 'e2e_data2').value = b);\n 1 == c && this.mE2EInst.resetE2Evalues($_astxu.getnc(a.name), d);\n },\n getE2EPageID: function () {\n return $ASTX2_CONST.PAGEID;\n },\n getE2EInputID: function (a) {\n a = this.mE2EInst.getE2Eattribute(a);\n return null == a ? null : a.e2e_inputid;\n },\n getE2EHash: function (a, b) {\n this.mE2EInst.getE2EHash(a, function (a, d) {\n b(a, d);\n });\n },\n getEncText: function (a, b, c) {\n this.mE2EInst.getEncText(a, b, function (a, b, f) {\n c(b, f);\n });\n },\n getE2EText: function (a, b) {\n this.mE2EInst.getE2EText(a, function (a, d, e) {\n b(d, e);\n });\n },\n getE2ETextS: function (a, b) {\n for (var c = 0, d = 0, e = [], f = 0; f < a.length; f++) {\n var g = a[f];\n null != g && ((g = g.getAttribute('e2e_type')), null != g && g == $ASTX2_CONST.E2ETYPE_PLAIN2 && c++);\n }\n if (0 == c || c != a.length) b(e, $ASTX2_CONST.ERROR_PARAM);\n else\n for (f = 0; f < a.length; f++)\n this.mE2EInst.getE2EText(a[f], function (a, f, g) {\n d >= c || (0 == g ? (e[a] = f) : (d = c), ++d >= c && b(e, g));\n });\n },\n setE2EText: function (a, b) {\n this.mE2EInst.setE2EText(a, b);\n },\n clearE2EText: function (a, b) {\n this.mE2EInst.clearE2EText(a, b);\n },\n clearE2EForm: function (a) {\n for (var b = document.getElementsByTagName('input'), c = 0; c < b.length; c++) {\n var d = b[c];\n null != d &&\n d.form.name == a &&\n 0 != ('text' == d.type || 'password' == d.type) &&\n null != d.getAttribute('e2e_type') &&\n this.mE2EInst.clearE2EText(d);\n }\n },\n addE2EObject: function (a, b) {\n null == b && (b = $ASTX2_CONST.E2ETYPE_CERT1);\n !a || ('text' != a.type && 'password' != a.type) || (a.setAttribute('e2e_type', b), this.mE2EInst.addObject(a));\n },\n subE2EObject: function (a) {\n a && this.mE2EInst.subObject(a);\n },\n setE2EAllExceptInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c &&\n 0 != ('text' == c.type || 'password' == c.type) &&\n null == c.getAttribute('e2e_type') &&\n c.setAttribute('e2e_type', $ASTX2_CONST.E2ETYPE_NONE);\n }\n },\n killFocusE2EAllInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c && 0 != ('text' == c.type || 'password' == c.type) && 0 < c.getAttribute('e2e_type') && c.blur();\n }\n },\n _pclogdata_get: function (a, b, c, d) {\n var e = this;\n c = {\n ver: $_astxu.getint(c.ver),\n alg: $_astxu.getint(c.alg),\n svr: $_astxu.getnc(c.svr),\n norsa: $_astxu.getint(c.norsa),\n uniq: $_astxu.getnc(c.uniq),\n utime: $_astxu.getint(c.utime),\n nlog: $_astxu.getnc(c.nlog),\n ipaddr: $_astxu.getnc(c.ipaddr),\n s2c_alg: $_astxu.getnc(c.s2c_alg),\n s2c_key: $_astxu.getnc(c.s2c_key),\n s2c_salt: $_astxu.getnc(c.s2c_salt),\n browser: $ASTX2_CONST.BROWSER_VER,\n pageid: $ASTX2_CONST.PAGEID,\n opt: d\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_pclog',\n data: c,\n timeout: 1e4,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(d) ? a(c) : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n _pclogdata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n data: { pclog: 1, client_public_key: $ASTX2_COMM.mClientPublicKey },\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), b())\n : d.set_cert(\n function () {\n d._pclogdata_get(a, b, f, c);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n b();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n getPCLOGData: function (a, b, c, d) {\n null == d && (d = '');\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable() ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), c()) : this._pclogdata(b, c, d);\n },\n getPCLOGDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getPCLOGData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getPCLOGDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n setPCLOGData: function (a, b) {\n var c = $_astxu.getnc(b.pclog_data);\n 0 < c.length && ($_astxu.getCreatedFormValue(a, 'pclog_data').value = c);\n },\n isVmEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isVmRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n checkService: function (a, b) {\n a == $ASTX2_CONST.SERVICE_AK && this.mE2EInst.checkService(b);\n },\n setProtect: function (a, b) {\n if (0 == $ASTX2_COMM.isEnable()) b && b($ASTX2_CONST.ERROR_NOINIT);\n else {\n var c = {\n customerid: $_astxu.getnc($ASTX2_CUST.mCustomerID),\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : -1,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : -1,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : -1,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : -1\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_protect',\n data: c,\n onSuccess: function (a) {\n a = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(a) ? b && b($ASTX2_CONST.ERROR_SUCCESS) : b && b($ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n });\n }\n },\n isNotSupportOS: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? b && b(null, $ASTX2_CONST.ERROR_NOINIT)\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_not_support_os',\n data: {\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : 0,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : 0,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : 0,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : 0\n },\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b && b(a, $ASTX2_CONST.ERROR_SUCCESS) : b && b(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n });\n },\n isAccessible: function (a, b, c, d, e) {\n null == e && (e = 750);\n if (a == $ASTX2_CONST.REQUEST_JSONP)\n $_astxu.sendJsonp({\n url: b,\n nocallback: !0,\n timeout: e,\n onSuccess: function () {\n c && c(b);\n },\n onFailure: function () {\n d && d(b);\n }\n });\n else {\n if (\n 0 != b.indexOf(window.location.protocol + '//' + window.location.host) &&\n 'IE' == $ASTX2_CONST.BROWSER_TYPE\n ) {\n if ('IE10' != $ASTX2_CONST.BROWSER_VER && 'IE11' != $ASTX2_CONST.BROWSER_VER) {\n d && d(b, 'CORS, not allowed browser');\n return;\n }\n if (0 != b.indexOf('http:') && 0 != b.indexOf('https:')) {\n d && d(b, 'CORS, not allowed protocol');\n return;\n }\n }\n $_astxu.sendAjax({\n url: b,\n type: 'GET',\n timeout: e,\n onSuccess: function (a) {\n c && c(b);\n },\n onFailure: function (a) {\n d && d(b, a);\n }\n });\n }\n },\n uninit: function () {\n this.uninitE2E();\n $ASTX2_COMM.uninit();\n },\n setLastError: function (a) {\n this.mLastError = a;\n },\n getLastError: function () {\n return this.mLastError;\n }\n };\n$ASTX2_MLi = {\n init: function () {\n setTimeout(function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/initForML', timeout: 1e3, data: a });\n }, 200);\n }\n};\n\nwindow.$ASTX2 = {\n ...$ASTX2,\n $ASTX2_COMM,\n $_astxu,\n $ASTX2_E2E,\n $ASTX2_MLi\n};\n\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\nconst getSubdomain = (hostname) => {\n if (!hostname || hostname === 'localhost' || hostname === '127.0.0.1') {\n return '';\n }\n\n const parts = hostname.split('.');\n\n // \uCD5C\uC18C 3\uAC1C \uBD80\uBD84\uC774 \uC788\uC5B4\uC57C \uC11C\uBE0C\uB3C4\uBA54\uC778 \uC874\uC7AC (subdomain.domain.com)\n if (parts.length < 3) {\n return '';\n }\n\n // \uCCAB \uBC88\uC9F8 \uBD80\uBD84\uC774 \uC11C\uBE0C\uB3C4\uBA54\uC778\n return parts[0] ?? '';\n};\n\n/**\n * \uD638\uC2A4\uD2B8\uBA85\uC744 \uAE30\uBC18\uC73C\uB85C \uD658\uACBD\uC744 \uD310\uB2E8\uD569\uB2C8\uB2E4.\n * @param hostname \uD638\uC2A4\uD2B8\uBA85\n * @returns \uD658\uACBD \uAD6C\uBD84 \uBB38\uC790\uC5F4 ('local' | 'dev' | 'stg' | 'prd')\n */\nconst getEnvironmentFromHostname = (hostname) => {\n const subDomain = getSubdomain(hostname);\n\n // localhost \uD310\uB2E8\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('localhost:')) {\n return 'local';\n }\n\n // dev \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes(`dev`)) {\n return 'dev';\n }\n\n // stg \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes('stg')) {\n return 'stg';\n }\n\n // \uAE30\uBCF8 \uC6B4\uC601\n return 'prd';\n};\n\nconst getServicePath = () => {\n if (typeof window.isStorybookEnv === 'boolean') {\n return '';\n } else {\n return `/${location.pathname.split('/')[1]}`;\n }\n};\n";
|
|
1640
|
-
var astx2_custom_default = "/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\r\n/* eslint-disable */\r\n\r\nlet $ASTX2_CUST = {\r\n // Customer option\r\n /*\r\n mUseJQuery: false, // Whether to use JQuery. \r\n mUseAjaxHello: false,\r\n mUseAutoStart: false, \r\n E2EFORM_TAIL: true,\r\n E2EFORM_INIT: '_e2e_forminit',\r\n E2EFORM_TAG1: '_e2e_1__',\r\n E2EFORM_TAG2: '_e2e_2__',\r\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\r\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\r\n */\r\n\r\n mCustomerID: null, // Customer ID for setProtect.\r\n\r\n // ASTX2_CUST defined values\r\n URL_GET_INIT: 101,\r\n URL_GET_CERT: 102,\r\n URL_GET_STAMP: 103,\r\n URL_CHK_STAMP: 104,\r\n\r\n setCustomerID(customerID) {\r\n if (customerID !== null && customerID !== 'undefined') {\r\n this.mCustomerID = customerID;\r\n }\r\n },\r\n\r\n getURL(type) {\r\n let result = '';\r\n const timestamp = new Date().getTime();\r\n\r\n switch (type) {\r\n case this.URL_GET_INIT:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/init/get`;\r\n break;\r\n case this.URL_GET_CERT:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/cert/get?v=${timestamp}`; // WAF \uCC28\uB2E8 \uBC29\uC9C0 (post \uC694\uCCAD \uC2DC \uAC12\uC774 \uC5C6\uB294 \uACBD\uC6B0 \uCC28\uB2E8)\r\n break;\r\n case this.URL_GET_STAMP:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/stamp/get`;\r\n break;\r\n case this.URL_CHK_STAMP:\r\n result = `${getServicePath()}/api/dea/sltn/astx2/stamp-chk/post`;\r\n break;\r\n } // end of switch\r\n\r\n return result;\r\n },\r\n\r\n isE2EObject(obj) {\r\n return false;\r\n },\r\n\r\n getE2Etype(obj) {\r\n return null;\r\n },\r\n\r\n onCreatedFormValue(obj, obj_name) {},\r\n\r\n onHandlerPreFocus(obj, event) {},\r\n\r\n onHandlerKeyDown(obj, event) {\r\n return true;\r\n },\r\n\r\n getErrorMessage(errno) {\r\n let message = '[ASTx] ';\r\n\r\n switch (errno) {\r\n case $ASTX2_CONST.ERROR_FAILED:\r\n message += '\uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOINIT:\r\n message += '\uCD08\uAE30\uD654\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTINST:\r\n message += '\uC124\uCE58\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTSUPPORTED:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 OS\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOCONNECT:\r\n message += '\uC11C\uBC84(Web) \uD1B5\uC2E0 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NCK:\r\n message += '\uC11C\uBC84(Local) \uC751\uB2F5 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_ERR:\r\n message += '\uC11C\uBC84(Local) \uB0B4\uBD80 \uC624\uB958\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NSP:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uB418\uC9C0 \uC54A\uB294 \uD658\uACBD\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_PARAM:\r\n message += '\uC798\uBABB\uB41C \uC778\uC790\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_EXCESS:\r\n message += '\uC7AC\uC2DC\uB3C4 \uD68C\uC218\uB97C \uCD08\uACFC \uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NEEDUPDATE:\r\n message += '\uC81C\uD488 \uC5C5\uB370\uC774\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n default:\r\n message += `errno=${errno}`;\r\n break;\r\n } // end of switch\r\n\r\n return message;\r\n },\r\n\r\n errorAbort(errno) {\r\n alert(this.getErrorMessage(errno));\r\n }\r\n};\r\n";
|
|
1641
|
-
function addE2EObject(el, e2e_type) {
|
|
1642
|
-
if (window.$ASTX2) {
|
|
1643
|
-
window.$ASTX2.addE2EObject(el, e2e_type);
|
|
1644
|
-
window.$ASTX2.resetE2E();
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
var loadScript = (callback) => {
|
|
1648
|
-
if (!window.$ASTX2) {
|
|
1649
|
-
console.log("dynamic load");
|
|
1650
|
-
const script = document.createElement("script");
|
|
1651
|
-
script.innerHTML = `
|
|
1652
|
-
${astx2_min_default}
|
|
1653
|
-
${astx2_custom_default}
|
|
1654
|
-
`;
|
|
1655
|
-
document.head.appendChild(script);
|
|
1656
|
-
script.onload = () => {
|
|
1657
|
-
};
|
|
1658
|
-
}
|
|
1426
|
+
) }),
|
|
1427
|
+
isOpen && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(DropDown, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("result-container"), children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { children: customerList.map((customer, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
+
salesFrontendDesignSystem.ListItem,
|
|
1429
|
+
{
|
|
1430
|
+
onClick: () => handleSelectItem(customer),
|
|
1431
|
+
selectable: true,
|
|
1432
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("customer-item"), children: [
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1434
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("details"), children: [
|
|
1435
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate && convertDateString({
|
|
1436
|
+
dateString: customer.birthDate,
|
|
1437
|
+
fromFormat: "YYYYMMDD",
|
|
1438
|
+
toFormat: "YYYY.MM.DD"
|
|
1439
|
+
}) }),
|
|
1440
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
|
|
1441
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1442
|
+
customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1443
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
|
|
1444
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
|
|
1445
|
+
] })
|
|
1446
|
+
] })
|
|
1447
|
+
] })
|
|
1448
|
+
},
|
|
1449
|
+
`cust-item-${customer.customerId}-${index}`
|
|
1450
|
+
)) }) }) })
|
|
1451
|
+
] });
|
|
1659
1452
|
};
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1453
|
+
|
|
1454
|
+
const cx$i = classNames.bind(styles$2);
|
|
1455
|
+
const { InputBox: InputBox$2, Input: Input$2 } = salesFrontendDesignSystem.FormCore;
|
|
1456
|
+
function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear }) {
|
|
1457
|
+
const {
|
|
1458
|
+
triggerRef,
|
|
1459
|
+
searchInput,
|
|
1460
|
+
customerList,
|
|
1461
|
+
searchKeyword,
|
|
1462
|
+
onSearchInputChange,
|
|
1463
|
+
setSearchKeyword,
|
|
1464
|
+
setSearchInput,
|
|
1465
|
+
setCustomerList,
|
|
1466
|
+
onKeyUp,
|
|
1467
|
+
search,
|
|
1468
|
+
onClear,
|
|
1469
|
+
handleSelectItem
|
|
1470
|
+
} = useCustomerSearch(onSelect);
|
|
1471
|
+
const handleClear = () => {
|
|
1472
|
+
onClear();
|
|
1473
|
+
onSearchClear?.();
|
|
1474
|
+
};
|
|
1475
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "full-screen", children: [
|
|
1476
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1477
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1478
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uACE0\uAC1D \uAC80\uC0C9", showCloseButton: true }),
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
1480
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: handleClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1481
|
+
Input$2,
|
|
1482
|
+
{
|
|
1483
|
+
onChange: onSearchInputChange,
|
|
1484
|
+
onKeyUp,
|
|
1485
|
+
value: searchInput,
|
|
1486
|
+
placeholder: "\uACE0\uAC1D\uBA85\uC744 \uB450 \uAE00\uC790 \uC774\uC0C1 \uC785\uB825\uD574\uC8FC\uC138\uC694.",
|
|
1487
|
+
size: "large",
|
|
1488
|
+
ref: triggerRef
|
|
1489
|
+
}
|
|
1490
|
+
) }),
|
|
1491
|
+
searchKeyword && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$i("result-count"), children: [
|
|
1492
|
+
"\uCD1D ",
|
|
1493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: customerList.length }),
|
|
1494
|
+
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1495
|
+
] }),
|
|
1496
|
+
searchKeyword && customerList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("search-result"), children: [
|
|
1497
|
+
"`",
|
|
1498
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
1499
|
+
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
1500
|
+
] }),
|
|
1501
|
+
searchKeyword && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { rootProps: { style: { width: "100%" } }, children: customerList.map((customer, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1502
|
+
salesFrontendDesignSystem.ListItem,
|
|
1503
|
+
{
|
|
1504
|
+
onClick: () => {
|
|
1505
|
+
handleSelectItem(customer);
|
|
1506
|
+
setSearchKeyword("");
|
|
1507
|
+
setSearchInput("");
|
|
1508
|
+
setCustomerList([]);
|
|
1509
|
+
closeModal();
|
|
1510
|
+
},
|
|
1511
|
+
selectable: true,
|
|
1512
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("customer-item", "modal"), children: [
|
|
1513
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1514
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("details", "modal"), children: [
|
|
1515
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate && convertDateString({
|
|
1516
|
+
dateString: customer.birthDate,
|
|
1517
|
+
fromFormat: "YYYYMMDD",
|
|
1518
|
+
toFormat: "YYYY.MM.DD"
|
|
1519
|
+
}) }),
|
|
1520
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
|
|
1521
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1522
|
+
customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1523
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
|
|
1524
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
|
|
1525
|
+
] })
|
|
1526
|
+
] })
|
|
1527
|
+
] })
|
|
1528
|
+
},
|
|
1529
|
+
`cust-item-${customer.customerId}-${index}`
|
|
1530
|
+
)) }) })
|
|
1531
|
+
] })
|
|
1532
|
+
] })
|
|
1533
|
+
] });
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
const cx$h = classNames.bind(styles$3);
|
|
1537
|
+
const { InputBox: InputBox$1, Input: Input$1 } = salesFrontendDesignSystem.FormCore;
|
|
1538
|
+
const favoriteList = [
|
|
1539
|
+
{
|
|
1540
|
+
nationalityCode: "KR",
|
|
1541
|
+
nationalityCodeName: "\uB300\uD55C\uBBFC\uAD6D",
|
|
1542
|
+
isoNumberNationalityCode: "410",
|
|
1543
|
+
nationalityEnglishAbbreviationName: "KOR"
|
|
1666
1544
|
},
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
window.$ASTX2.initE2E();
|
|
1673
|
-
window.$ASTX2.checkServer(
|
|
1674
|
-
() => {
|
|
1675
|
-
checkServerSuccess();
|
|
1676
|
-
},
|
|
1677
|
-
() => {
|
|
1678
|
-
checkServerFailure();
|
|
1679
|
-
console.error(`ASTX.checkServer() onFailure: errno=${window.$ASTX2.getLastError()}`);
|
|
1680
|
-
}
|
|
1681
|
-
);
|
|
1682
|
-
initSuccess();
|
|
1683
|
-
},
|
|
1684
|
-
() => {
|
|
1685
|
-
initFailure();
|
|
1686
|
-
if (window.$ASTX2.getLastError() === 103) {
|
|
1687
|
-
console.error("AhnLab Safe Transaction \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC124\uCE58\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
|
|
1688
|
-
} else {
|
|
1689
|
-
console.error(`$ASTX2.init() onFailure: errno=${window.$ASTX2.getLastError()}`);
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1692
|
-
);
|
|
1693
|
-
};
|
|
1694
|
-
var initASTX2 = ({
|
|
1695
|
-
initSuccess = () => {
|
|
1545
|
+
{
|
|
1546
|
+
nationalityCode: "CN",
|
|
1547
|
+
nationalityCodeName: "\uC911\uAD6D",
|
|
1548
|
+
isoNumberNationalityCode: "156",
|
|
1549
|
+
nationalityEnglishAbbreviationName: "CHN"
|
|
1696
1550
|
},
|
|
1697
|
-
|
|
1551
|
+
{
|
|
1552
|
+
nationalityCode: "VN",
|
|
1553
|
+
nationalityCodeName: "\uBCA0\uD2B8\uB0A8",
|
|
1554
|
+
isoNumberNationalityCode: "704",
|
|
1555
|
+
nationalityEnglishAbbreviationName: "VNM"
|
|
1698
1556
|
},
|
|
1699
|
-
|
|
1557
|
+
{
|
|
1558
|
+
nationalityCode: "US",
|
|
1559
|
+
nationalityCodeName: "\uBBF8\uAD6D",
|
|
1560
|
+
isoNumberNationalityCode: "840",
|
|
1561
|
+
nationalityEnglishAbbreviationName: "USA"
|
|
1700
1562
|
},
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
initSuccess,
|
|
1707
|
-
initFailure,
|
|
1708
|
-
checkServerSuccess,
|
|
1709
|
-
checkServerFailure
|
|
1710
|
-
});
|
|
1563
|
+
{
|
|
1564
|
+
nationalityCode: "RU",
|
|
1565
|
+
nationalityCodeName: "\uB7EC\uC2DC\uC544",
|
|
1566
|
+
isoNumberNationalityCode: "643",
|
|
1567
|
+
nationalityEnglishAbbreviationName: "RUS"
|
|
1711
1568
|
}
|
|
1569
|
+
];
|
|
1570
|
+
const NationalitySearchInitialText = ({
|
|
1571
|
+
setSearchInput,
|
|
1572
|
+
setSearchKeyword
|
|
1573
|
+
}) => {
|
|
1574
|
+
const set = (keyword) => {
|
|
1575
|
+
setSearchInput(keyword);
|
|
1576
|
+
setSearchKeyword(keyword);
|
|
1577
|
+
};
|
|
1578
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$h("favorite-container"), children: [
|
|
1579
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$h("favorite-title"), children: "\uB9CE\uC774 \uCC3E\uB294 \uAD6D\uC801" }),
|
|
1580
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$h("favorite"), children: favoriteList.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => set(item.nationalityCodeName), children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: item.nationalityCodeName }) }, `${item.nationalityCode}-${index}`)) })
|
|
1581
|
+
] });
|
|
1712
1582
|
};
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
)
|
|
1726
|
-
|
|
1583
|
+
const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect, onConfirm }) => {
|
|
1584
|
+
const [filterList, setFilterList] = React.useState([]);
|
|
1585
|
+
React.useEffect(() => {
|
|
1586
|
+
const filterList2 = nationalityList.filter((item) => item.nationalityCodeName.includes(searchKeyWord)) || [];
|
|
1587
|
+
setFilterList(filterList2);
|
|
1588
|
+
}, [nationalityList, searchKeyWord]);
|
|
1589
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4", children: [
|
|
1590
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$h("favorite-title"), children: [
|
|
1591
|
+
"\uCD1D ",
|
|
1592
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filterList.length }),
|
|
1593
|
+
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1594
|
+
] }),
|
|
1595
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$h("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
|
|
1596
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => {
|
|
1597
|
+
onSelect(item.nationalityCodeName);
|
|
1598
|
+
onConfirm();
|
|
1599
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
|
|
1600
|
+
}) }),
|
|
1601
|
+
filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$h("search-result"), children: [
|
|
1602
|
+
"`",
|
|
1603
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyWord }),
|
|
1604
|
+
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
1605
|
+
] })
|
|
1606
|
+
] });
|
|
1607
|
+
};
|
|
1608
|
+
function NationalityComponent({ isOpen, onClose, setValue, onConfirm }) {
|
|
1609
|
+
const {
|
|
1610
|
+
search,
|
|
1611
|
+
onClear,
|
|
1612
|
+
searchKeyWord,
|
|
1613
|
+
onKeyUp,
|
|
1614
|
+
onSearch,
|
|
1615
|
+
searchList,
|
|
1616
|
+
searchInput,
|
|
1617
|
+
onSelect,
|
|
1618
|
+
setSearchInput,
|
|
1619
|
+
setSearchKeyword
|
|
1620
|
+
} = useSearchNationality({
|
|
1621
|
+
setValue,
|
|
1622
|
+
onClose,
|
|
1623
|
+
isOpen
|
|
1624
|
+
});
|
|
1625
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
|
|
1626
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1627
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1628
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uAD6D\uC801 \uAC80\uC0C9", showCloseButton: true }),
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
1630
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1631
|
+
InputBox$1,
|
|
1632
|
+
{
|
|
1633
|
+
clearable: true,
|
|
1634
|
+
endElement: /* @__PURE__ */ jsxRuntime.jsx("button", { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }) }),
|
|
1635
|
+
onClear,
|
|
1636
|
+
className: cx$h("search-input"),
|
|
1637
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1638
|
+
Input$1,
|
|
1639
|
+
{
|
|
1640
|
+
onChange: onSearch,
|
|
1641
|
+
onKeyUp,
|
|
1642
|
+
placeholder: "\uAD6D\uC801 \uC785\uB825",
|
|
1643
|
+
size: "large",
|
|
1644
|
+
value: searchInput
|
|
1645
|
+
}
|
|
1646
|
+
)
|
|
1647
|
+
}
|
|
1648
|
+
),
|
|
1649
|
+
!searchKeyWord && /* @__PURE__ */ jsxRuntime.jsx(NationalitySearchInitialText, { setSearchInput, setSearchKeyword }),
|
|
1650
|
+
searchKeyWord && /* @__PURE__ */ jsxRuntime.jsx(NationalitySearchResult, { nationalityList: searchList, searchKeyWord, onSelect, onConfirm })
|
|
1651
|
+
] })
|
|
1652
|
+
] })
|
|
1653
|
+
] }) });
|
|
1727
1654
|
}
|
|
1728
|
-
|
|
1729
|
-
|
|
1655
|
+
|
|
1656
|
+
function useSearchNationality({ setValue, onClose, isOpen }) {
|
|
1657
|
+
const [searchKeyWord, setSearchKeyword] = React.useState("");
|
|
1658
|
+
const [selectedNationality, setSelectedNationality] = React.useState();
|
|
1659
|
+
const [searchInput, setSearchInput] = React.useState("");
|
|
1660
|
+
const { data } = method.useSearchNationalityQuery({ searchKeyWord });
|
|
1661
|
+
const searchList = data?.data.nationalityList || [];
|
|
1662
|
+
const onSearch = (e) => {
|
|
1663
|
+
const typeStr = e.target.value;
|
|
1664
|
+
setSearchInput(typeStr);
|
|
1665
|
+
};
|
|
1666
|
+
const search = () => {
|
|
1667
|
+
if (searchInput === "") {
|
|
1668
|
+
onClear();
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
if (searchInput && searchInput.length > 0) {
|
|
1672
|
+
setSearchKeyword(searchInput);
|
|
1673
|
+
setSelectedNationality("");
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
const onKeyUp = (e) => {
|
|
1677
|
+
const currentValue = e.target.value;
|
|
1678
|
+
if (currentValue.length === 0 || currentValue.slice(-1).normalize("NFD").length > 1) {
|
|
1679
|
+
search();
|
|
1680
|
+
}
|
|
1681
|
+
};
|
|
1682
|
+
const onClear = React.useCallback(() => {
|
|
1683
|
+
setSearchKeyword("");
|
|
1684
|
+
setSearchInput("");
|
|
1685
|
+
setSelectedNationality("");
|
|
1686
|
+
}, []);
|
|
1687
|
+
const onSelect = (nationality) => {
|
|
1688
|
+
setSelectedNationality(nationality);
|
|
1689
|
+
const value = searchList.find((item) => item.nationalityCodeName === nationality);
|
|
1690
|
+
value && setValue(value);
|
|
1691
|
+
onClose();
|
|
1692
|
+
};
|
|
1693
|
+
React.useEffect(() => {
|
|
1694
|
+
if (isOpen) {
|
|
1695
|
+
setSelectedNationality("");
|
|
1696
|
+
setSearchKeyword("");
|
|
1697
|
+
}
|
|
1698
|
+
}, [isOpen]);
|
|
1699
|
+
return {
|
|
1700
|
+
onClear,
|
|
1701
|
+
searchKeyWord,
|
|
1702
|
+
searchList,
|
|
1703
|
+
selectedNationality,
|
|
1704
|
+
onSearch,
|
|
1705
|
+
onKeyUp,
|
|
1706
|
+
search,
|
|
1707
|
+
searchInput,
|
|
1708
|
+
onSelect,
|
|
1709
|
+
setSearchKeyword,
|
|
1710
|
+
setSearchInput
|
|
1711
|
+
};
|
|
1712
|
+
}
|
|
1713
|
+
const useNationalityComponent = () => {
|
|
1714
|
+
const [nationality, setNationality] = React.useState();
|
|
1715
|
+
const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
|
|
1716
|
+
const [isConfirmed, setIsConfirmed] = React.useState(false);
|
|
1717
|
+
const onConfirm = () => {
|
|
1718
|
+
setIsConfirmed(true);
|
|
1719
|
+
};
|
|
1720
|
+
const openInitModal = () => {
|
|
1721
|
+
setIsConfirmed(false);
|
|
1722
|
+
openModal();
|
|
1723
|
+
};
|
|
1724
|
+
const NationalitySearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality, onConfirm });
|
|
1725
|
+
return {
|
|
1726
|
+
isOpen,
|
|
1727
|
+
closeModal,
|
|
1728
|
+
setNationality,
|
|
1729
|
+
nationality,
|
|
1730
|
+
openModal: openInitModal,
|
|
1731
|
+
NationalitySearchComponent,
|
|
1732
|
+
isConfirmed,
|
|
1733
|
+
setIsConfirmed
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1730
1736
|
|
|
1731
1737
|
const CODES = {
|
|
1732
1738
|
appInit: {
|
|
@@ -3133,6 +3139,7 @@ function useJobVehicleSearchModal() {
|
|
|
3133
3139
|
JobSearch,
|
|
3134
3140
|
VehicleSearch,
|
|
3135
3141
|
riskGrade,
|
|
3142
|
+
riskGradeCode,
|
|
3136
3143
|
hospitalizationGrade,
|
|
3137
3144
|
resetJobVehicleSearch,
|
|
3138
3145
|
selectedJobDetail
|
|
@@ -3171,6 +3178,7 @@ function useJobVehicleSearchModal() {
|
|
|
3171
3178
|
selectedJobDetail,
|
|
3172
3179
|
selectedVehicle,
|
|
3173
3180
|
riskGrade,
|
|
3181
|
+
riskGradeCode,
|
|
3174
3182
|
hospitalizationGrade,
|
|
3175
3183
|
isOpenJobVehicleModal: isOpen,
|
|
3176
3184
|
isConfirmed,
|
|
@@ -4578,6 +4586,7 @@ exports.useCanvasPaint = useCanvasPaint;
|
|
|
4578
4586
|
exports.useCustomerSearch = useCustomerSearch;
|
|
4579
4587
|
exports.useDownloader = useDownloader;
|
|
4580
4588
|
exports.useJobSearchModal = useJobSearchModal;
|
|
4589
|
+
exports.useJobVehicleSearch = useJobVehicleSearch;
|
|
4581
4590
|
exports.useJobVehicleSearchModal = useJobVehicleSearchModal;
|
|
4582
4591
|
exports.useNationalityComponent = useNationalityComponent;
|
|
4583
4592
|
exports.useNxlOneModal = useNxlOneModal;
|