@choiceform/os-client-core 3.6.56 → 3.6.57

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/web-core.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see web-core.js.LICENSE.txt */
2
- (()=>{var e={2183:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i="undefined"!=typeof self?self:window,o=0,a=1,s=2,u=3,c="closed",l="errored",d="joined",f="joining",p="leaving",h="phx_close",m="phx_error",g="phx_join",v="phx_reply",y="phx_leave",w=[h,m,g,v,y],_="longpoll",b="websocket",x=function(e){return"function"==typeof e?e:function(){return e}},T=function(){function e(t,r,i,o){n(this,e),this.channel=t,this.event=r,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return r(e,[{key:"resend",value:function(e){this.timeout=e,this.reset(),this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"reset",value:function(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref,this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout)}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),k=e.Channel=function(){function e(t,r,i){var o=this;n(this,e),this.state=c,this.topic=t,this.params=x(r||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new T(this,g,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new E((function(){return o.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){o.state=d,o.rejoinTimer.reset(),o.pushBuffer.forEach((function(e){return e.send()})),o.pushBuffer=[]})),this.onClose((function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=c,o.socket.remove(o)})),this.onError((function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=l,o.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){o.isJoining()&&(o.socket.log("channel","timeout "+o.topic+" ("+o.joinRef()+")",o.joinPush.timeout),new T(o,y,x({}),o.timeout).send(),o.state=l,o.joinPush.reset(),o.rejoinTimer.scheduleTimeout())})),this.on(v,(function(e,t){o.trigger(o.replyEventName(t),e)}))}return r(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(h,e)}},{key:"onError",value:function(e){return this.on(m,(function(t){return e(t)}))}},{key:"on",value:function(e,t){var n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}},{key:"off",value:function(e,t){this.bindings=this.bindings.filter((function(n){return!(n.event===e&&(void 0===t||t===n.ref))}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new T(this,e,(function(){return t}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=p;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(h,"leave")},r=new T(this,y,x({}),t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e,t,n,r){if(this.topic!==e)return!1;var i=w.indexOf(t)>=0;return!r||!i||r===this.joinRef()||(this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1)}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=f,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n,r){var i=this,o=this.onMessage(e,t,n,r);if(t&&!o)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(o,n,r||i.joinRef())}))}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===c}},{key:"isErrored",value:function(){return this.state===l}},{key:"isJoined",value:function(){return this.state===d}},{key:"isJoining",value:function(){return this.state===f}},{key:"isLeaving",value:function(){return this.state===p}}]),e}(),S={encode:function(e,t){var n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))},decode:function(e,t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(JSON.parse(e),5);return t({join_ref:n[0],ref:n[1],topic:n[2],event:n[3],payload:n[4]})}},I=(e.Socket=function(){function e(t){var r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=o.timeout||1e4,this.transport=o.transport||i.WebSocket||I,this.defaultEncoder=S.encode,this.defaultDecoder=S.decode,this.transport!==I?(this.encode=o.encode||this.defaultEncoder,this.decode=o.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),this.heartbeatIntervalMs=o.heartbeatIntervalMs||3e4,this.reconnectAfterMs=o.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=o.logger||function(){},this.longpollerTimeout=o.longpollerTimeout||2e4,this.params=x(o.params||{}),this.endPoint=t+"/"+b,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new E((function(){r.teardown((function(){return r.connect()}))}),this.reconnectAfterMs)}return r(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=O.appendParams(O.appendParams(this.endPoint,this.params()),{vsn:"2.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.reconnectTimer.reset(),this.teardown(e,t,n)}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=x(e)),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL()),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"teardown",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),e&&1e3!==e.code&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(m)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case o:return"connecting";case a:return"open";case s:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=new k(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},this);return this.channels.push(t),t}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,i=e.payload,o=e.ref,a=e.join_ref,s=function(){t.encode(e,(function(e){t.conn.send(e)}))};this.log("push",n+" "+r+" ("+a+", "+o+")",i),this.isConnected()?s():this.sendBuffer.push(s)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.conn.close(1e3,"hearbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,(function(e){var n=e.topic,r=e.event,i=e.payload,o=e.ref,a=e.join_ref;o&&o===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.log("receive",(i.status||"")+" "+n+" "+r+" "+(o&&"("+o+")"||""),i),t.channels.filter((function(e){return e.isMember(n,r,i,a)})).forEach((function(e){return e.trigger(r,i,o,a)})),t.stateChangeCallbacks.message.forEach((function(t){return t(e)}))}))}}]),e}(),e.LongPoll=function(){function e(t){n(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=o,this.poll()}return r(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+b),"$1/"+_)}},{key:"endpointURL",value:function(){return O.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=o}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==a&&this.readyState!==o||O.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,i=t.messages;e.token=r}else n=0;switch(n){case 200:i.forEach((function(t){return e.onmessage({data:t})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=a,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;O.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(e&&e.status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=u,this.onclose()}}]),e}()),O=e.Ajax=function(){function e(){n(this,e)}return r(e,null,[{key:"request",value:function(e,t,n,r,o,a,s){if(i.XDomainRequest){var u=new XDomainRequest;this.xdomainRequest(u,e,t,r,o,a,s)}else{var c=i.XMLHttpRequest?new i.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(c,e,t,n,r,o,a,s)}}},{key:"xdomainRequest",value:function(e,t,n,r,i,o,a){var s=this;e.timeout=i,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);a&&a(t)},o&&(e.ontimeout=o),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,i,o,a,s){var u=this;e.open(t,n,!0),e.timeout=o,e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===u.states.complete&&s){var t=u.parseJSON(e.responseText);s(t)}},a&&(e.ontimeout=a),e.send(i)}},{key:"parseJSON",value:function(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}},{key:"serialize",value:function(e,n){var r=[];for(var i in e)if(e.hasOwnProperty(i)){var o=n?n+"["+i+"]":i,a=e[i];"object"===(void 0===a?"undefined":t(a))?r.push(this.serialize(a,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(a))}return r.join("&")}},{key:"appendParams",value:function(e,t){return 0===Object.keys(t).length?e:e+(e.match(/\?/)?"&":"?")+this.serialize(t)}}]),e}();O.states={complete:4},e.Presence=function(){function e(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e);var o=i.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(o.state,(function(t){var n=r.caller,i=n.onJoin,o=n.onLeave,a=n.onSync;r.joinRef=r.channel.joinRef(),r.state=e.syncState(r.state,t,i,o),r.pendingDiffs.forEach((function(t){r.state=e.syncDiff(r.state,t,i,o)})),r.pendingDiffs=[],a()})),this.channel.on(o.diff,(function(t){var n=r.caller,i=n.onJoin,o=n.onLeave,a=n.onSync;r.inPendingSyncState()?r.pendingDiffs.push(t):(r.state=e.syncDiff(r.state,t,i,o),a())}))}return r(e,[{key:"onJoin",value:function(e){this.caller.onJoin=e}},{key:"onLeave",value:function(e){this.caller.onLeave=e}},{key:"onSync",value:function(e){this.caller.onSync=e}},{key:"list",value:function(t){return e.list(this.state,t)}},{key:"inPendingSyncState",value:function(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}}],[{key:"syncState",value:function(e,t,n,r){var i=this,o=this.clone(e),a={},s={};return this.map(o,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=o[e];if(n){var r=t.metas.map((function(e){return e.phx_ref})),u=n.metas.map((function(e){return e.phx_ref})),c=t.metas.filter((function(e){return u.indexOf(e.phx_ref)<0})),l=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));c.length>0&&(a[e]=t,a[e].metas=c),l.length>0&&(s[e]=i.clone(n),s[e].metas=l)}else a[e]=t})),this.syncDiff(o,{joins:a,leaves:s},n,r)}},{key:"syncDiff",value:function(e,t,n,r){var i=t.joins,o=t.leaves,a=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(i,(function(e,t){var r=a[e];if(a[e]=t,r){var i,o=a[e].metas.map((function(e){return e.phx_ref})),s=r.metas.filter((function(e){return o.indexOf(e.phx_ref)<0}));(i=a[e].metas).unshift.apply(i,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(s))}n(e,r,t)})),this.map(o,(function(e,t){var n=a[e];if(n){var i=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return i.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete a[e]}})),a}},{key:"list",value:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))}},{key:"map",value:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}}]),e}();var E=function(){function e(t,r){n(this,e),this.callback=t,this.timerCalc=r,this.timer=null,this.tries=0}return r(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()})?n.apply(t,[t]):n)||(e.exports=r)},9141:(e,t,n)=>{"use strict";var r=n(9591),i=n(9575),o=":CF_PD:",a={inflateBase64:function(e){return e=i.Base64.atob(e),(0,r.inflate)(e,{to:"string"})},deflateBase64:function(e){return e=(0,r.deflate)(e,{to:"string"}),i.Base64.btoa(e)},inflatePrefix:function(e){return e=e.substr(o.length),(0,r.inflate)(e,{to:"string"})},deflatePrefix:function(e){return e=(0,r.deflate)(e,{to:"string"}),o+e},langTable:[{locale:"ar_sa",value:"العربية",bdCode:"ara",direction:"rtl",comment:"阿拉伯语"},{locale:"az_az",value:"azərbaycan",bdCode:"aze",comment:"阿塞拜疆语"},{locale:"be_by",value:"беларуская",bdCode:"bel",comment:"白俄罗斯语"},{locale:"bg_bg",value:"български",bdCode:"bul",comment:"保加利亚语"},{locale:"bn_bd",value:"বাংলা",bdCode:"ben",comment:"孟加拉语"},{locale:"cs_cz",value:"čeština",bdCode:"cs",comment:"捷克语"},{locale:"da_dk",value:"dansk",bdCode:"dan",comment:"丹麦语"},{locale:"de_de",value:"Deutsch",bdCode:"de",comment:"德语"},{locale:"el_gr",value:"Ελληνικά",bdCode:"el",comment:"希腊语"},{locale:"en_us",value:"English",bdCode:"en",comment:"英语"},{locale:"es_es",value:"español",bdCode:"spa",comment:"西班牙语"},{locale:"et_ee",value:"eesti",bdCode:"est",comment:"爱沙尼亚语"},{locale:"fa_ir",value:"فارسی",bdCode:"per",direction:"rtl",comment:"波斯语"},{locale:"fi_fi",value:"suomi",bdCode:"fin",comment:"芬兰语"},{locale:"fil_ph",value:"Filipino",bdCode:"fil",comment:"菲律宾语"},{locale:"fr_fr",value:"français",bdCode:"fra",comment:"法语"},{locale:"he_il",value:"עברית",bdCode:"heb",direction:"rtl",comment:"希伯来语"},{locale:"hi_in",value:"हिन्दी",bdCode:"hi",comment:"印地语"},{locale:"hu_hu",value:"magyar",bdCode:"hu",comment:"匈牙利语"},{locale:"hy_am",value:"հայերեն",bdCode:"arm",comment:"亚美尼亚语"},{locale:"id_id",value:"Indonesia",comment:"印度尼西亚语"},{locale:"it_it",value:"italiano",bdCode:"it",comment:"意大利语"},{locale:"ja_jp",value:"日本語",bdCode:"jp",comment:"日本语"},{locale:"kk_kz",value:"қазақ тілі",comment:"哈萨克语"},{locale:"km_kh",value:"ខ្មែរ",bdCode:"hkm",comment:"高棉语"},{locale:"ko_kr",value:"한국어",bdCode:"kor",comment:"韩语"},{locale:"ky_kg",value:"кыргызча",comment:"柯尔克孜语"},{locale:"lo_la",value:"ລາວ",bdCode:"lao",comment:"老挝语"},{locale:"mg_mg",value:"Malagasy",bdCode:"mg",comment:"马达加斯加语"},{locale:"mn_mn",value:"монгол",comment:"蒙古语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"pl_pl",value:"polski",bdCode:"pl",comment:"波兰语"},{locale:"ps_af",value:"پښتو",bdCode:"pus",comment:"普什图语",direction:"rtl"},{locale:"pt_pt",value:"português",bdCode:"pt",comment:"葡萄牙语"},{locale:"ro_ro",value:"română",bdCode:"rom",comment:"罗马尼亚语"},{locale:"ru_ru",value:"русский",bdCode:"ru",comment:"俄语"},{locale:"rw_rw",value:"Kinyarwanda",bdCode:"kin",comment:"卢旺达语"},{locale:"so_so",value:"Soomaali",bdCode:"som",comment:"索马里语"},{locale:"sr_rs",value:"српски",bdCode:"srp",comment:"塞尔维亚语"},{locale:"sv_se",value:"svenska",bdCode:"swe",comment:"瑞典语"},{locale:"sw_ke",value:"Kiswahili",bdCode:"swa",comment:"斯瓦希里语"},{locale:"tg_tj",value:"тоҷикӣ",bdCode:"tgk",comment:"塔吉克语"},{locale:"th_th",value:"ไทย",bdCode:"th",comment:"泰语"},{locale:"tr_tr",value:"Türkçe",bdCode:"tr",comment:"土耳其语"},{locale:"uk_ua",value:"українська",bdCode:"ukr",comment:"乌克兰语"},{locale:"ur_pk",value:"اردو",bdCode:"urd",direction:"rtl",comment:"乌尔都语"},{locale:"uz_uz",value:"ўзбекча",comment:"乌兹别克语"},{locale:"zh_cn",bdCode:"zh",value:"简体中文",comment:"中文"},{locale:"zh_tw",bdCode:"cht",value:"繁體中文",comment:"中文"},{locale:"vi_vn",value:"Tiếng Việt",bdCode:"vie",comment:"越南语"}]};t.Z=a},5159:(e,t,n)=>{"use strict";n.d(t,{bn:()=>o,BH:()=>c,zH:()=>s,tV:()=>a,i_:()=>u});const r={zh_cn:{upload:{name:"上传",amountLimit:"最少上传{min}个文件,最多上传{max}个文件",amountLimitMin:"最少上传{min}个文件",amountLimitMax:"最多上传{max}个文件",fileSizeLimit:"文件大小不能超过{size}。",invalidImage:"图片已破损或无法识别。",uploadRequired:"上传项必须完成上传"},verify:{name:"验证",invalidFailed:"输入内容无效,验证失败。",failed:"验证失败。",sendSuccess:"短信发送成功",sendFailed:"短信发送失败,请稍后再试.",tooFrequent:"操作太过频繁,请稍后再试。"},region:{name:"地域"},locate:{name:"定位",required:"必须定位后才能继续。"},weight:{name:"权重",total:"权重总值{total}",relax:"各项打分之和可以小于权重总值",strict:"各项打分之和必须等于权重总值",totalLimitMin:"各项分值总和不能小于{min}分"},previewBookmark:{existed:"该书签已经存在",importSuccess:"导入成功",importFailure:"导入失败",importFailed:"导入书签失败:"},previewTime:{uploadSuccess:"上传回复时间成功",uploadFailed:"上传回复时间失败"},lottery:{congratulation:"恭喜你",pity:"很遗憾",goal:"获得了",fail:"没有中奖,谢谢您的参与!"},icon:{name:"图标题"},imageSelect:{name:"图片选择题"},site:{name:"范围定位题"},hotSpot:{name:"图片框选题",tips:"请在图片上选择你感兴趣的区域。"},heatMap:{name:"图片热力题"},maxDiff:{name:"MaxDiff问题",all:"请完成所有任务的作答"},cascade:{name:"级联菜单",selectSome:"选择{amount}项",selectBetween:"选择{min}到{max}项"},menu:{name:"菜单",clickToSelect:"请点击选择...",required:"{text}: 列表中必须选择。",inputRule:"{text}:{rule}",inputReq:"{text}: 必须填写内容。",requiredBetween:"{text}: 列表中必须选择{min}到{max}项。",topList:"顶层列表",listItem:"列表项",limitMax:"{text}:最多只能选中{max}项"},select:{single:"单选",multi:"多选",limitBetween:"最少选择{min}项,最多选择{max}项。",limitMax:"最多选择{max}项",limitMin:"最少选择{min}项"},slideRate:{name:"连续评价题"},fill:{name:"填空 ",itemsLimit:"请输入{min}到{max}个项目",charsLimit:"请输入{min}到{max}个字",inputDecimal:"请输入小数",inputDecimalDigits:"请输入小数位数为{scale}的数字",inputInteger:"请输入整数",valueLimit:"请输入{min}到{max}之间的数值",needEmail:"请输入有效的Email",needPhoneNumber:"请输入有效的手机号码",needZipCode:"请输入有效的邮编。",needUrl:"请输入有效的网址。",itemInputRequired:"该项必须填写。",inputRequired:"输入项中必须完成填写",inputLimitMin:"至少输入{min}项。",onlyAllow:"仅限:{text}",number:"数字",alphabet:"英文字母",chinese:"中文",atcpLabelOnly:"只能输入提示的标签"},rank:{name:"排序",limitMin:"必须排出前{min}项的顺序。",limitAll:"必须排出所有选项的顺序。",tips:"将项目拖放到您喜欢的顺序中。"},mark:{graph:"打分",value:"打分"},matrix:{single:"单选矩阵",multi:"多选矩阵",multiRow:"行多选矩阵",multiCol:"列多选矩阵",singleRow:"行单选矩阵",singleCol:"列单选矩阵",singleRowCol:"行列单选矩阵",eachRowOne:"每行选择一项",eachColOne:"每列选择一项",eachRowColOne:"每行每列选择一项",rowLimitBetween:"每行最少选择{min}项,最多选择{max}项。",colLimitBetween:"每列最少选择{min}项,最多选择{max}项。",rowLimitMax:"每行最多选择{max}项。",colLimitMax:"每列最多选择{max}项。",rowLimitMin:"每行最少选择{min}项。",colLimitMin:"每列最少选择{min}项。"},preview:{noMessage:"预览模式下不提供验证服务",noLink:"预览模式不进行链接跳转。"},video:{watchAll:"请认真观看完视频。"},reward:{get:"领取奖励",yuan:"元",weChatName:"微信名称示例"},global:{invalidReward:"分享的链接无法获取奖励",upgrade:"数据版本发生变化,到设计端重新保存后才能继续访问。",timeOver:"问卷回复时长超时,未能按时完成答题!",answerRequired:"必答题,答题后继续。",antiAgain:"不允许再次回复",authFailed:"授权失败",downloadError:"下载数据失败,请确保网络良好后再重试。",start:"开始",next:"下一题",previous:"上一题",go:"前往",done:"完成",notTarget:"抱歉,您暂时不符合当前调查的条件。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",backTest:"返回测试",invalidUrl:"不是有效问卷地址",tryAgain:"操作失败,请稍后重试。",clientError:"问卷指定的调研终端与本终端不一致,请确认你的链接地址是否正确。"},memory:{title:"记录恢复",message:"检测到未完成的回复记录,是否恢复记录?",sure:"恢复记录",deny:"重新开始"},langResume:{title:"正在切换语言,请稍候..."},backEnd:{response_overflow:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",collector_full:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",survey_not_exist:"抱歉,这个调查可能已经关闭、重命名或删除。",response_status_error:"操作被拒绝",quota_not_match:"配额失败",internal_server_error:"服务器未知错误",survey_offline:"本次调查可能已经结束并关闭,感谢您的参与。",diagram_has_errors:"部分逻辑存在错误,请修正后再发布调查问卷。",interviewee_missing_error:"渠道不匹配",interviewee_invalid_error:"该渠道下不允许回复,请使用微信打开链接。",multi_responses_error:"您已参与过本次调研活动,无法再次回复。感谢您的参与。",api_rate_limit_error:"API 连接过于频繁",response_already_examined:"抱歉,您不符合这项调查的条件。我们真诚地感谢您为此付出的时间,并期望您继续参与我们的在线调查活动!",question_missing_error:"没找到验证对象",gen_validation_error:"获取验证码图片失败",invalid_phone_number_error:"提供的电话号码格式不正确。",sms_gateway_error:"短信发送失败",invalid_code_error:"输入内容无效,验证失败。",quota_full:"抱歉,这个调查问卷的配额已经达到最大设定数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",reward_type_error:"无效的奖励类型",already_been_verificated:"奖品已核销,不可再次使用",red_envelope_duplicated:"您已参与过本活动,不能重复领取。感谢您的参与。",red_envelope_expired:"奖励码超时过期。",red_envelope_received_by_yourself:"不能重复扫码领取奖励。",red_envelope_received_by_others:"不能扫取他人奖励码。",red_envelope_intercepted:"微信账号可能存在异常导致红包发放操作失败。",red_envelope_send_error:"微信账号可能存在异常。",oauth_error:"授权失败"}},en_us:{upload:{name:"Upload",amountLimit:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} } and maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMin:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMax:"Upload maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",fileSizeLimit:"File size cannot exceed {size}。",invalidImage:"The picture is damaged or unrecognized.",uploadRequired:"Upload items must be completed"},verify:{name:"Verification",invalidFailed:"Invalid input",failed:"verification failed",sendSuccess:"Successful message sending",sendFailed:"Message sending failed, please try again later",tooFrequent:"The operation is too frequent, please try again later"},region:{name:"District"},locate:{name:"Location",required:"Continue after positioned"},weight:{name:"Weight Slider",total:"Total Weight: {total}",relax:"Sum of scores may be less than the total weight",strict:"Sum of scores must be equal to the total weight",totalLimitMin:"Sum of scores should not be less than {min, plural, =0 { no points} one {# point} other {# points} }"},previewBookmark:{existed:"This bookmark already exists",importFailed:"Failed to import bookmark:",importSuccess:"Import successfully",importFailure:"Import failed"},previewTime:{uploadSuccess:"Upload success",uploadFailed:"Upload failed"},lottery:{congratulation:"Congratulations!",pity:"It's a pity",goal:"You got it",fail:"Did not win. Thanks for your participation!"},icon:{name:"Icon"},imageSelect:{name:"Image Choice"},site:{name:"Site Location"},hotSpot:{name:"Picture Selection",tips:"Please select the picture of your choice"},heatMap:{name:"Heat Map"},maxDiff:{name:"MaxDiff question",all:"Please complete all tasks"},cascade:{name:"Cascade Menu",selectSome:"Please select {amount, plural, =0 {no options} one {# option} other {# options} }",selectBetween:"Please select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} }"},menu:{name:"Dropdown menu",clickToSelect:"Click to select...",required:"{text}: Requires selection",inputRule:"{text}:{rule}",inputReq:"{text}: Requires input",requiredBetween:"{text}: Please select minimum {min, plural, =0 {no items} one {# item} other {# items} } maximum {max, plural, =0 {no items} one {# item} other {# items} }",topList:"Top list",listItem:"List item",limitMax:"{text}:Please select maximum {max, plural, =0 {no items} one {# item} other {# items} }"},select:{single:"Single Answer",multi:"Multiple Answer",limitBetween:" Please answer minimum {min, plural, one {# choice} other {# choices} } maximum {max, plural, one {# choice} other {# choices} }",limitMax:"Maximum selection {max, plural, one {# choice may be answered.} other {# choices may be answered.} }",limitMin:"Minimum selection {min, plural, one {# choice.} other {# choices.} }"},slideRate:{name:"Slide Rating"},fill:{name:"Text Entry",itemsLimit:"Please enter item between {min} and {max}.",charsLimit:"Please enter text between {min} and {max}.",inputDecimal:"Please enter decimal",inputDecimalDigits:"Please enter decimal number with {scale} digits",inputInteger:"Please enter integer",valueLimit:"Please enter a number between {min} and {max}.",needEmail:"Please enter a valid email address.",needPhoneNumber:"Please enter a valid mobile phone number.",needZipCode:"Please enter a valid postcode.",needUrl:"Please enter valid a URL address.",itemInputRequired:"Please answer this question",inputRequired:"Answer required",inputLimitMin:"Please enter at least {min, plural, one {# item} other {# items} }",onlyAllow:"Please enter a valid {text}",number:"number",alphabet:"alphabet",chinese:"chinese character",atcpLabelOnly:"Can only input pop up label"},rank:{name:"Ranking",limitMin:"Please rank at least {min, plural, one {# choice.} other {# choices.} }",limitAll:"Please rank all options",tips:"Drag and drop items into you preferred order."},mark:{graph:"Rating",value:"Slider"},matrix:{single:"Single Choice Matrix",multi:"Multiple Choice Matrix",multiRow:"Multiple Row Choice Matrix",multiCol:"Multiple Column Choice Matrix",singleRow:"Single Row Choice Matrix",singleCol:"Single Column Choice Matrix",singleRowCol:"Single Row Column Choice Matrix",eachRowOne:"Must select one option in each row",eachColOne:"Must select one option in each column",eachRowColOne:"Must select one option in each row & column",rowLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each column"},preview:{noMessage:"No message service in preview mode",noLink:"No linking in preview mode"},video:{watchAll:"Please watch the video completely"},reward:{get:"Get Reward",yuan:"yuan",weChatName:"WeChat demo name"},global:{invalidReward:"Can not access gift via shared link",upgrade:"Data version changed, can continue to access it only after the design side saves it again.",timeOver:"Exceeded time limit",answerRequired:"This question requires an answer.",antiAgain:"You have already taken this survey.",authFailed:"Authorization failed",downloadError:"Download data failed, please make sure the network is good and try again.",start:"Start",next:"Next",previous:"Previous",go:"Proceed",done:"Done",notTarget:"Sorry, you do not match the criteria for this survey. We sincerely thank you and appreciate your time, look forward to your future participation in our online surveys!",backTest:"Back Test",invalidUrl:"Invalid survey url",tryAgain:"Operation failed,try again later.",clientError:"The survey terminal specified in the questionnaire is inconsistent with this terminal. Please confirm whether your link address is correct."},memory:{title:"Recover",message:"Previous unfinished answer, Do we recover it?",sure:"Recover",deny:"Start new"},langResume:{title:"Switching language, please wait."},backEnd:{response_overflow:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",collector_full:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",survey_not_exist:"Sorry, this survey may already been closed, you can renamed or delete it.",response_status_error:"Submition has been declined. Please try again.",quota_not_match:"quota_not_match",internal_server_error:"An error occurred with the server.",survey_offline:"Sorry, this survey may already be closed. Thanks for your participation",diagram_has_errors:"Some parts have logic error. please correct the error and launch the survey again.",interviewee_missing_error:"Channel mismatch",interviewee_invalid_error:"Reply is not allowed under this channel, please open this link in wechat app.",multi_responses_error:"You have already taken this survey. Thanks for your participation.",api_rate_limit_error:"Pinging the API too often.",response_already_examined:"Sorry, you do not match the criteria for this survey. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",question_missing_error:"Validation object not found",gen_validation_error:"Failed to get the verification code picture",invalid_phone_number_error:"The format of the phone number provided is incorrect.",sms_gateway_error:"SMS could not be sent",invalid_code_error:"Invalid data has been entered into the form, the validation fails.",quota_full:"Sorry, this survey has reached the maximum number of responses. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",reward_type_error:"Invalid reward type",already_been_verificated:"The reward has been verificated and cannot be used again",red_envelope_duplicated:"You have participated in this activity and cannot claim it again. Thank you for your participation.",red_envelope_expired:"Reward Code has expired.",red_envelope_received_by_yourself:"You can't scan the code repeatedly to get rewards.",red_envelope_received_by_others:"You cannot scan other people's reward codes.",red_envelope_intercepted:"There may be irregularity in the wechat account, resulting in the failure of red envelope issuance.",red_envelope_send_error:"Wechat account may be abnormal.",oauth_error:"failed to authorize"}}};let i="en_us",o=r[i];function a(e){e&&(Object.keys(e).forEach((t=>{r[t.toLowerCase()]=e[t]})),o=r[i])}function s(){return{...r}}function u(e){i=e.toLowerCase(),o=r[i]||r.en_us}function c(){return i}},3768:(e,t,n)=>{"use strict";n.d(t,{F2:()=>k,JH:()=>I,gS:()=>S,py:()=>x,zJ:()=>T}),n(5306);var r=n(1128),i=n(9481),o=n(9310),a=n(2812),s=n(3656),u=n(6935),c=n(9564),l=n(1881),d=n(6539),f=n(6064),p=n(3877);const h=["select","icon_mark","value_mark","upload","menu","slide_rate"],m=["fill","verify"];function g(e){const{type:t}=e;return"region"===t?"predef":t}function v(e,t){const{origin:n}=t;let r;if(t.isOtherOpt)r=n.optionType;else if(!0===n.useComment)r="option_comment";else{const{type:t}=e;r="region"===t?"predef_region":h.includes(t)?"option":m.includes(t)?"comment":t}return r}function y(e,t){const n=function(e){const{loop:t}=e;let n;return t&&(n=t.replacements.map((e=>({node_id:e.loopNodeId.toLowerCase(),index:e.index,option_id:e.uuid.toLowerCase()})))),n}(e),{nodeUuid:r}=e,i=t&&t(e);return{type:g(e),node_id:r.toLowerCase(),items:i,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function w(e,t){const n=(0,r.Lb)(t),i=(0,p.Df)(t,e),o={value:(0,f.O2)(i)?"":i,other:!!t.isOtherOpt,type:v(e,t)};if(o.option_id=t.uuid.toLowerCase(),(0,s.is)(t,"xid"in t)){const{optionY:e,optionX:n,xid:r,yid:i}=t;o.row_option_id=i.toLowerCase(),o.col_option_id=r.toLowerCase(),o.row_content=(0,u.mP)(e.text),o.col_content=(0,u.mP)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,u.mP)(t.text);return t.visible||(o.hidden=!0),o}function _(e){return(0,r.Kn)(e).reduce(((t,n)=>{var r;return(n.selected||(0,p.Zy)(n,e)||void 0===n.selected&&!0===(null===(r=null==n?void 0:n.__cache)||void 0===r?void 0:r.selected))&&t.push(w(e,n)),t}),[])}const b={};function x(e){const t=b[e.type];return t&&t(e)}function T(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function k(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function S(e,t="all",n="committed_url",r=!1){const a=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!k(e.checkMode,t))return;if("data"===e.type)return;const r=x(e);r&&n.push(r)})),n}(e,t),u=r?void 0:await(0,l.Xs)(e,n),c={backend_request_params:await(0,l.u)(e),webhook_params:u,answers:a,var_map_info:(0,o.Zt)(e,t),options_display_info:(0,i.De)(e,t),query_params:(0,d.ZI)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.Tm)(c.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),c}function I(e){switch(e.type){case"verify":return!!e.code;case"location":case"region":case"area":return!!e.value;case"describe":case"lottery":case"end":return!0;default:return(0,r.eK)(e)||(0,r.My)(e)}}b.select=b.select_image=b.menu=b.select_icon=b.hot_spot=e=>{const t=y(e,_);if((0,c.Ir)(e.origin)&&t.items){let e=!1,n=!1;t.items.forEach((t=>{"comment"!==t.type&&(t.hidden?e=!0:n=!0),delete t.hidden})),e&&n&&(t.items=t.items.filter((e=>!e.hidden)))}return t},b.cascade=b.icon_mark=b.value_mark=b.matrix=b.weight=b.slide_rate=b.sequence=b.upload=b.heat_map=b.fill=b.max_diff=e=>{const t=y(e,_);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},b.location=e=>{const t=y(e,(t=>{const n=(0,r.Kn)(e).find((e=>e.selected));return n?[w(t,n)]:[]})),{position:n,indexes:i}=e;return n&&(n.indexes=i,t.location=n),t},b.region=e=>{const t=b.location(e);return t.region=(0,a.BT)(e.value),t},b.area=e=>b.location(e),b.data=e=>y(e,(e=>(0,r.Kn)(e).reduce(((t,n)=>(n.selected&&t.push(w(e,n)),t)),[]))),b.verify=e=>{const t=y(e),{phoneNumber:n,validateType:r,code:i}=e;return"sms"===r&&(t.phone_num=n),t.code=i,t},b.end=e=>({type:g(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),b.logic=e=>{const t=y(e);return t.logic_result=e.logicResult,t}},9192:(e,t,n)=>{"use strict";n.d(t,{h:()=>c,t:()=>p}),n(2707),n(3948);var r=n(1128),i=n(45),o=n(3151),a=n(9564),s=n(4248),u=n(3877);function c(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[]}}function l(e){(0,s.Pg)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,r.eu)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,i.i1)(t,e)&&(t.isOtherOpt?(s=!0,l(t)):(a=!0,n(t)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(e,t){if(!(0,u.hZ)(e,t))return;const n=f[t.type];n?await n(e,t):function(e,t){d(e,t,l)}(e,t)}f.heat_map=(e,t)=>{d(e,t,(e=>{(0,s.Pg)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[],image:null})}));n&&await(0,a.YC)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.Pg)(e,{percent:(0,r.ad)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,r.eu)(t).forEach((t=>{if(t===e)return;const n=(0,i.Cp)(e.origin)||(0,i.Rv)(e,t),r=(0,i.Cp)(t.origin)||(0,i.Rv)(t,e),o=(0,i.tl)(e,t)||(0,i.tl)(e,t.optionX)||(0,i.tl)(e,t.optionY)||(0,i.tl)(e.optionX,t)||(0,i.tl)(e.optionY,t)||(0,i.W_)(e,t);(n||r||o)&&l(t)}))},f.cascade=(e,t)=>{const n=(e,t)=>{if(!t||!t.list)return[];if(t.list.find((t=>t.option===e)))return[...t.list];for(const r of t.list){const t=n(e,r);if(t.length>0)return t}return[]},r=t.otherOptions,a=r.includes(e)?[...t.cascade.list]:n(e,t.cascade);r.forEach((e=>{a.push({option:e})})),a.forEach((n=>{n.option!==e&&(0,i.i1)(n.option,e)&&(n.display?(0,o.j9)(n,t):l(n.option))}))}},1028:(e,t,n)=>{"use strict";n.d(t,{JG:()=>r,kI:()=>o,vv:()=>i});const r={refresh:!1,result:!1},i={refresh:!0,result:!0},o={refresh:!1,result:!0}},565:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,y:()=>s});var r=n(9564),i=n(4248),o=n(3768);function a(e,t){const{nodes:n}=e.parent;return!n.includes(e)&&(t&&(0,i.vW)().uploadLog("".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(e,t){const n=e.renderList.filter((e=>!((0,r.$X)(e)||!(0,o.F2)(e.checkMode,t)||!(0,r.ZA)(e.origin)||(0,o.JH)(e))));if(n.length>0){const e=n.map((e=>e.runtimeNodeName)).join();(0,i.vW)().uploadLog("answer lack for: ".concat(e),"warning")}}},277:(e,t,n)=>{"use strict";n.d(t,{M:()=>d}),n(1817);var r=n(7529),i=n(9564),o=n(4248),a=n(8413),s=n(6935),u=n(3768);function c(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.L)(e.location.address):""}function l(e,t){const n=(0,o.vW)().startState,a=[{title:(0,s.mP)(n.title),description:(0,s.mP)(n.description)}];return t.forEach((t=>{const n=(0,r.Sl)(e,t);if(!(0,i.$X)(n)){const e={title:(0,s.mP)(n.title)||n.runtimeNodeName,description:(0,s.mP)(n.description),value:c(t),options:t.items?t.items.map((e=>({text:e.row_content||e.col_content?e.row_content+"-"+e.col_content:e.content,value:(0,u.zJ)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.vW)();if(!e)return null;const t=await(0,u.gS)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},2629:(e,t,n)=>{"use strict";n.d(t,{Gl:()=>h,Rv:()=>m,lq:()=>g});var r=n(5015),i=n(5838),o=n(3892),a=n(9026),s=n(6935),u=n(7550),c=n(4248),l=n(5159);const d={valid:!0,message:""},f="vital:",p="alert:";async function h(e,t){if(e){const{parent:n}=t;return(0,r.LO)(n,e,null,!1)}return d}async function m(e,t){if(e){const{message:n}=e;return await(0,i.Q3)(t,e)?d:{valid:!1,message:n||(0,u.Iu)(l.bn.verify.invalidFailed)}}return d}async function g(e,t=!1){if(!e.parent.nextLoading&&!t)return d;e.validateFailed=!1;const{origin:n,parent:r}=e,{validation:i}=n;if(!i)return d;const{request:u,logic:l,noPreventNext:g}=i;let v=await h(u,e);return v.valid&&(v=await m(l,r)),!v.valid&&(e.validateFailed=!0,g&&(v=d,(0,a.L$)(r,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.sb)(e.message,{state:t}),(0,o.PX)(e.message)||(e.message=await(0,s.Ur)(e.message,{state:t})),e.message.startsWith(f)?(e.type="vital",e.message=e.message.substring(f.length)):e.message.startsWith(p)&&(e.type="alert",e.message=e.message.substring(p.length))),e}(v,r),e.validateFailTimes+=1,(0,o.PX)(v.message))?((0,c.dU)().hook.beforeForceLeave(),(0,c.dU)().app.openWebLink(v.message),(0,c.vW)().customAbort(),v):v}},7679:(e,t,n)=>{"use strict";n.d(t,{Dn:()=>N,Jh:()=>C,jY:()=>L}),n(2707),n(3210),n(3948);var r=n(1128),i=n(3892),o=n(9564),a=n(2629),s=n(6935),u=n(3656),c=n(4248),l=n(7550),d=n(5159),f=n(5142),p=n(3877),h=n(45),m=n(6866),g=n(5905);const v={valid:!0,message:""};function y(e){if(!(0,o.ZA)(e.origin))return v;const t=(0,r.My)(e)||(0,r.eK)(e);return{valid:t,message:t?"":(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}}function w(e,t){if((0,g.sy)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function _(e){if(!(0,o.ZA)(e.origin)&&!(0,r.eK)(e))return v;const{options:t}=e,{parent:n}=e;let i=await(0,s.Ob)(e.origin.fillMin,{state:n});i=i||t.length,i>t.length&&(i=t.length),i=w(e,i);let a=0;const u=(0,l.Iu)(d.bn.fill.itemInputRequired);let c=!1;for(const n of t)(0,p.Zy)(n,e)?(E(n,u),a+=1):!0===n.origin.fillRequired&&(O(n,u),c=!0);return i>a?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputLimitMin,{min:i}),dueToNode:e}:c?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:e}:v}function b(e,t=!1){const n=(0,g.sy)(e)?e.otherOptions:[],i=t?n:(0,r.eu)(e),a=(0,o.ZA)(e.origin),s=(0,l.Iu)(d.bn.fill.itemInputRequired),u=i.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,i=e.selected;return n&&(i||(0,r.c1)(e.origin)&&t)}(t,a)&&!(0,p.Zy)(t,e);return n?O(t,s):E(t,s),n}))[0],c=!u;return c?v:{valid:c,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:e,dueToOption:u}}async function x(e,t=!1){const n=t?e.options:(0,r.eu)(e),o=[];for(const t of n){let n={valid:!0};(0,p.Zy)(t,e)&&(n=await(0,i.b0)(t,e)),n.valid?E(t,n.message):(O(t,n.message),o.push(n))}return o[0]||v}async function T(e){return(0,o.qX)(e.origin)&&(0,r.My)(e)?k(e):v}async function k(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,r.eu)(e).find((e=>e.selected));return!(!t||!(0,h.Cp)(t.origin))}(e))return v;const{min:t}=await(0,o.gx)(e,e.parent);return(0,r.eu)(e).filter((e=>!(0,r.c1)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.Iu)(d.bn.select.limitMin,{min:t}),dueToNode:e}}const S={};async function I(e,t){if(!t.list)return v;const{multiple:n,min:r,max:o,required:a}=t,s=t.text?(0,l.Iu)(d.bn.menu.listItem)+t.text:(0,l.Iu)(d.bn.menu.topList),u=t.list.filter((e=>e.selected));for(const t of u){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.inputReq,{text:n.text})};const r=await(0,i.b0)(n,e);if(!r.valid)return{...r,message:(0,l.Iu)(d.bn.menu.inputRule,{text:n.text,rule:r.message})}}const c=u.length;if(a&&0===c)return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.required,{text:s})};if(n&&c<r&&c>0)return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.requiredBetween,{text:s,min:r,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await I(e,n);if(!t.valid)return t}return v}function O(e,t){e.errorMessage!==t&&(0,c.Pg)(e,{errorMessage:t})}function E(e,t){e.errorMessage===t&&(0,c.Pg)(e,{errorMessage:""})}function C(e,t){(0,c.vW)().locateError(e,t)}async function P(e,t){if((0,o.$X)(e)||e.readonly)return v;const n=function(e){const{origin:{canSkipVideo:t},video:n}=e;return t||!n||n.ended?v:{valid:!1,message:(0,l.Iu)(d.bn.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const r=S[e.type];let i=r?await r(e):v;return i.valid&&t&&(i=await(0,a.lq)(e)),i.valid&&O(e,i.message),i}S.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},S.select_image=e=>S.select(e),S.fill=async e=>{const t=y(e);if(!t.valid)return t;let n=await _(e);return n.valid?(n=b(e,!0),n.valid?x(e,!1):n):n},S.value_mark=async e=>{const t=y(e);if(!t.valid)return t;let n=await _(e);return n.valid?(n=b(e,!0),n.valid?x(e,!0):n):n},S.icon_mark=async e=>{const t=await S.value_mark(e);return t.valid?(0,o.ZA)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}:v:t},S.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:r}=e;let i=(0,o.ZA)(r)?r.rankCount||n.length:0;const a=n.length;i>a&&(i=a),i=w(e,i);let s=0;const u=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<u.length&&u[e].sortNo===e+1;e++)s++;return i>s?{valid:!1,message:(0,l.Iu)(d.bn.rank.limitMin,{min:i}),dueToNode:e}:(t=b(e,!0),t.valid?x(e,!0):t)},S.matrix=async e=>{const t=y(e);if(!t.valid)return t;let n=await async function(e){const{origin:t}=e;return(0,o.Ir)(t)?v:(0,o.ZA)(t)||(0,r.My)(e)?(0,o.Zu)(t)?k(e):(0,o.Lk)(t)||(0,o.zR)(t)||(0,o.Rx)(t)?function(e){let t,n,r;(0,o.Lk)(e.origin)?(t="yid",n=e.renderOptionsY,r=!1):(0,o.zR)(e.origin)?(t="xid",n=e.renderOptionsX,r=!0):(0,o.Rx)(e.origin)&&(e.renderOptionsX.length>e.renderOptionsY.length?(t="yid",n=e.renderOptionsY,r=!1):(t="xid",n=e.renderOptionsX,r=!0));const i=e.options;for(const o of n){const n=o.uuid;if(!i.some((e=>e.selected&&(0,u.RC)(e[t],n))))return{valid:!1,message:r?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:1}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:1}),dueToNode:e}}return v}(e):async function(e){const t=(0,o.lE)(e.origin);let{min:n}=await(0,o.gx)(e,e.parent);const r=t?"xid":"yid",i=e[t?"renderOptionsX":"renderOptionsY"],a=e[t?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=e.options;for(const o of i){const i=o.uuid;if(s.filter((e=>e.selected&&(0,u.RC)(e[r],i))).length<n)return{valid:!1,message:t?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:n}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:n}),dueToNode:e}}return v}(e):v}(e);return n.valid?(n=b(e,!0),n.valid?x(e,!0):n):n},S.region=async e=>!(0,o.ZA)(e.origin)||e.value?v:{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e},S.location=async e=>{const t=await S.region(e);return t.valid||(t.message=(0,l.Iu)(d.bn.locate.required)),t},S.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let i=!0,a="";const s=(0,r.C4)(e,!0);if(!(0,o.ZA)(e.origin)&&0===s)return v;const u=await(0,o.Fy)(e,e.parent),{max:c}=u,f=w(e,u.min);let h=0;a=(0,l.Iu)(d.bn.upload.uploadRequired);let m=!1;for(const t of n)(0,p.Zy)(t,e)?(E(t,a),h+=1):!0===t.origin.fillRequired&&(O(t,a),m=!0);return s<f?(i=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f})):s>c?(i=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMax,{max:c})):(i=!0,a=""),f>h?{valid:!1,message:(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f}),dueToNode:e}:m?{valid:!1,message:(0,l.Iu)(d.bn.upload.uploadRequired),dueToNode:e}:{valid:i,message:a,dueToNode:e}},S.verify=async e=>{if((0,c.vW)().preview||(0,c.dU)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}}else{const t={valid:!1,message:(0,l.Iu)(d.bn.verify.invalidFailed),dueToNode:e},{validateType:n}=e,{code:r,parent:i,nodeUuid:o}=e,a=()=>(e.validateFailTimes+=1,t);if("image"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.Rq)({code:r},e),v}catch(e){return a()}}}else if("password"===n){const{transactionID:e}=i,t={response_id:e,question_id:o,code:r};try{return await(0,f.bp)(t),v}catch(e){return a()}}else if("sms"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.Rq)({code:r},e),v}catch(e){return a()}}}}return v},S.menu=S.select,S.area=async e=>y(e),S.select_icon=async e=>{const t=y(e);return t.valid?T(e):t},S.weight=async e=>{if(!(0,o.ZA)(e.origin)&&!(0,r.eK)(e))return v;const t=y(e);if(!t.valid)return t;let{weightTotal:n}=e;n=w(e,n);const{options:i}=e,a=i.reduce(((e,t)=>e+Number(t.value)),0);if(0===n){const t=b(e,!1);if(!t.valid)return t}return n>a&&!0!==e.origin.relax?{valid:!1,message:(0,l.Iu)(d.bn.weight.totalLimitMin,{min:n}),dueToNode:e}:v},S.cascade=async e=>{if(!(0,o.ZA)(e.origin)&&!(0,r.My)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?I(e,t):n},S.hot_spot=S.select,S.heat_map=async e=>y(e),S.slide_rate=S.value_mark,S.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.Iu)(d.bn.maxDiff.all)}};const L=(0,u.Ds)((async(e,t)=>{if(t&&O(t,(await(0,i.b0)(t,e)).message),e){const t=await N([e]);t.message||O(e,t.message),(0,m.pI)(e)}}),250);async function N(e,t=!1,n=!1){const r=[];for(const i of e){const e=await P(i,t);e.valid||(n&&O(e.dueToNode,e.message),r.push(e),(0,m.pI)(i))}return r[0]||v}},3892:(e,t,n)=>{"use strict";n.d(t,{PX:()=>c,_2:()=>l,b0:()=>m,xT:()=>u}),n(5306),n(3210);var r=n(6935),i=n(7550),o=n(1128),a=n(5159),s=n(6064);function u(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function c(e){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(e)}async function l(e,t){const{parent:n}=t,{origin:i}=e;let o=await(0,r.Ob)(i.fillStart,{state:n}),a=await(0,r.Ob)(i.fillEnd,{state:n});return(0,s.O2)(o)&&(o=-1/0),(0,s.O2)(a)&&(a=1/0),{start:o,end:a}}function d(e,t,n){return t<=e&&n>=e}function f(e,t,n){return d(e,t,n)?"":(0,i.Iu)(a.bn.fill.valueLimit,{min:t,max:n})}const p={};async function h(e,t,n){const{itemsMax:r,itemsMin:s}=await(0,o.y4)(t,n),u=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),0);let c="";return(u<s||u>r)&&(c=(0,i.Iu)(a.bn.fill.itemsLimit,{min:s,max:r})),{valid:!c,message:c}}async function m(e,t){const n=(0,s.KF)(e.value),{origin:r}=e,i=r.fillType,o=p[i];if(!o||(0,s.O2)(n)&&"auto_complete"!==i)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const u=await o(n,e,t);return a.context.option=null,u.valid||(u.dueToOption=e,u.dueToNode=t),u}p.chars=async(e,t,n)=>{const{start:r,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const u=function(e,t=[]){if(0===t.length)return"";e=e.replace(/[\s,,]/g,"");let n="";const r=[];t.includes("number")&&(n+="0-9.",r.push((0,i.Iu)(a.bn.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",r.push((0,i.Iu)(a.bn.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",r.push((0,i.Iu)(a.bn.fill.chinese)));const o=r.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,i.Iu)(a.bn.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,i.Iu)(a.bn.fill.charsLimit,{min:t,max:n})}(e,r,o);return{valid:!u,message:u}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needEmail)}},p.float=async(e,t,n)=>{if(!function(e){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)}(e))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputDecimal)};const{origin:r}=t;if(r.scale&&!function(e,t){return new RegExp("\\d+\\.\\d{".concat(t,"}$")).test(e)}(e,r.scale))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputDecimalDigits,{scale:r.scale})};const{start:o,end:s}=await l(t,n),u=f(Number(e),o,s);return{valid:!u,message:u}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputInteger)};const r=Number(e),{start:o,end:s}=await l(t,n),u=f(r,o,s);return{valid:!u,message:u}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=u(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needPhoneNumber)}},p.postcode=async e=>{const t=function(e){return/^[0-9][0-9]{5}$/.test(e)}(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needZipCode)}},p.url=async e=>{const t=c(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,i.Iu)(a.bn.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:h(e,t,n),p.list_select=(e,t,n)=>h(e,t,n)},3877:(e,t,n)=>{"use strict";n.d(t,{Df:()=>s,Zy:()=>l,hZ:()=>o}),n(3210);var r=n(6064),i=n(6935);function o(e,t){return e.selected||l(e,t)}const a={};function s(e,t){let n="";const r=a[t.type];return n=e.isOtherOpt||!r?e.value:r(e),"string"==typeof n&&(n=(0,i.mP)(n)),n}function u(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,r.O2)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const c={};function l(e,t){return(c[t.type]||u)(e,t)}c.sequence=(e,t)=>-1!==e.sortNo&&u(e,t)},4725:(e,t,n)=>{"use strict";n.d(t,{Gi:()=>m,dK:()=>h,kw:()=>p,n0:()=>f}),n(3948);var r=n(9564),i=n(3656),o=n(7952),a=n(6451),s=n(5750),u=n(6935),c=n(1128),l=n(7552),d=n(9310);async function f(e,t){const{options:n,passRefs:r,refMaps:i}=await(0,a.P)(e,t.origin,null,!0);(0,d.sB)(t,i);const o=await(0,l.gk)(t,n,r);return(0,s.uR)(t,o)}function p(e,t,n=!1){const{loopStack:r}=t;return r.find(((t,o)=>(!n||o===r.length-1)&&(0,i.RC)(t.node.nodeUuid,e.nodeUuid)))}async function h(e,t,n,r,i,o){const a=(0,c.WA)(i),s={state:e,usage:{node:t,optionId:i.uuid}},l=await(0,u.e_)(a.text,s,"WRAPPED_URL"),d=await(0,u.e_)(i.text,s,"WRAPPED_URL"),f=await(0,u.e_)(a.value+"",s,"WRAPPED_URL");return{loopNodeId:n,outerIndex:o&&o.currentIndex,outerLoopId:o&&o.node.nodeUuid,index:r,uuid:i.uuid,refOptId:i.refOptId,refText:l||void 0,text:d||"",value:f,number:a.number,image:a.image,label:i.label,mapping:i.origin.isRef?a.mapping:i.mapping}}const m={_skip:(e,t,n)=>o.P.findNext(e,t,n),async _init(e,t,n){const{varList:o,origin:{loopStart:a,destList:s}}=t;if(0===o.length)return m._skip(e,t,n);const{loopStack:u}=n,c=s.find((e=>(0,i.RC)(e.selfPortId,a.uuid))).destInputId,l=(0,r.Cf)(e,c),d=o[0],{origin:f}=t,p=u[u.length-1],g=await h(n,t,f.nodeUuid,0,d,p),v={destInputId:c,node:f,varList:o,replacements:p?[...p.replacements,g]:[g],currentIndex:0};return u.push(v),{target:l,loop:(0,i.p$)(v),loopStack:(0,i.p$)(u)}},async _increase(e,t,n){const{nodeUuid:o}=t,{loopStack:a}=n,s=a[a.length-1],{varList:u,replacements:c,destInputId:l}=s,d=s.currentIndex+=1,f=u[d],p=a[a.length-2],m=await h(n,t,o,d,f,p),g=(0,r.Cf)(e,l);return c[c.length-1]=m,{target:g,loop:(0,i.p$)(s),loopStack:(0,i.p$)(a)}},async _end(e,t,n){const{loopStack:r}=n;r.pop();const a=await o.P.findNext(e,t,n);if(r.length>0){const e=(0,i.p$)(r);a.loop=e[e.length-1],a.loopStack=e}return a},findNext(e,t,n){const r=p(t,n,!0);if(r){const{currentIndex:i,varList:o}=r;return i===o.length-1?m._end(e,t,n):m._increase(e,t,n)}return m._init(e,t,n)}}},6492:(e,t,n)=>{"use strict";n.d(t,{tP:()=>T,Pf:()=>S,kJ:()=>b});var r=n(9564);function i(e,t,n,i,o){return o||(o=(0,r.CE)(e,t,n.uuid)),o||i.origin.parentRandomId||t.length&&(o=(0,r.Cf)(e,t[t.length-1].destInputId)),o}var o=n(1128),a=n(5905);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],u={async findNext(e,t){const{destList:n,output:u}=t.origin,c=(0,a.sy)(t)?t.otherOptions:[],l=s.indexOf(t.type)>-1?c:(0,o.eu)(t),d=l&&l.find((e=>e.selected));return{target:i(e,n,u,t,d&&(0,r.CE)(e,n,d.uuid))}}},c={async findNext(e,t,n){const{origin:{destList:i,parentRandomId:a}}=t,s=(0,o.fi)(t);let c=s&&(0,r.CE)(e,i,s.uuid);return c||(c=(await u.findNext(e,t,n)).target),c||!i.length||a||(c=(0,r.Cf)(e,i[0].destInputId)),{target:c}}};var l=n(7952),d=(n(5069),n(5838));const f={async findNext(e,t){const{origin:n,parent:i}=t,{options:o,output:a,destList:s,logicType:u,reverse:c,outputN:l}=n,f={logicType:u,reverse:c,options:o},p=await(0,d.Q3)(i,f);t.logicResult=p;const h=p?a:l;return{target:(0,r.CE)(e,s,h.uuid)}}};var p=n(5721),h=n(4725);n(2707),n(3948);const m={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:u}=n,c=[...o.filter((e=>e.selected)).sort(((e,t)=>e.cascadePath.length<t.cascadePath.length?1:-1)),...a.filter((e=>e.selected))];let l;for(const t of c)if(l=(0,r.CE)(e,s,t.uuid),l)break;return{target:i(e,s,u,t,l)}}};var g=n(7529),v=n(3656),y=n(8351);const w={cascade:m,logic:f,loop:h.Gi,sequence:c,random:p.GN};function _(e){const t=w[e];if(!t)throw new Error("lack next rules for this type of node...");return t}["describe","check","end","start","verify","data","max_diff"].forEach((e=>{w[e]=l.P})),["weight","slide_rate","upload","value_mark","icon_mark","fill","select_image","select","region","location","lottery","matrix","menu","area","select_icon","hot_spot","heat_map"].forEach((e=>{w[e]=u}));const b=["check","break_point"];function x(e,t){return"loop"===e.type?!(0,h.kw)(e,t):b.indexOf(e.type)<0}function T(e,t,n){return S(e,(0,y.qG)({target:n},t),t)}async function k(e,t,n,i){const{target:o,loop:a,random:s}=i,u=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,r.NU)(o,t.origin)&&(i.loopStack=n,i.loop=e),o.parentRandomId&&u&&!s&&(i.random=u)}else if(u){const t=(0,v.am)(u.node.nodeUuid,n.loopStack);return S(e,(0,g.JL)(n.renderList,t),n)}return i}async function S(e,t,n){let r,i,o=t,a=_(o.type),s=!0;for(;s&&(i=await k(e,o,n,await a.findNext(e,o,n)),r=i.target,r);)x(r,n)?s=!1:(o=(0,y.qG)(i,n),a=_(r.type));return i}},7952:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var r=n(9564);const i={async findNext(e,t){const{destList:n,output:i}=t.origin;return{target:(0,r.CE)(e,n,i&&i.uuid)}}}},5029:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,y:()=>o}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);const r=new Set;function i(e){return r.has(e)}function o(e){r.add(e)}},5721:(e,t,n)=>{"use strict";n.d(t,{GN:()=>f,Ns:()=>d,Ym:()=>c}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var r=n(3656),i=n(9564),o=n(7952),a=n(6866),s=n(5029);let u=[];function c(){return u}const l=new Set;function d(e,t){e&&0!==e.length&&(u=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.y)(n.nodeUuid);const e=t.find((e=>e.nodeUuid===n.parentRandomId));e&&l.add(e.nodeUuid)}})))}const f={async _init(e,t,n){const{origin:o}=t;let c=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,r.RC)(t.selfPortId,o.uuid)){const o=(0,i.Cf)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,r.XJ)(s.length+1);s.splice(e,0,t.destInputId)}else a[o]=[t.destInputId]}}));const s=function(e,t){const{customDestCount:n}=t.origin;if(!n||n>=e.length)return e;for(;e.length>n;)e.splice((0,r.XJ)(e.length),1);return e}(Object.keys(a),t);let u=[];for(;s.length>0;){const e=(0,r.XJ)(s.length);u=u.concat(a[s[e]]),s.splice(e,1)}return u}(e,t);!function(e,t){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=t;l.has(a)||o&&(e.forEach((e=>{const t=[];let a=(0,i.Cf)(n,e);for(;a;)t.push(a),a=(0,i.CE)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,r.XJ)(t.length),n=t[e].nodeUuid;(0,s.y)(n),u.push(n),t.splice(e,1)}})),l.add(a))}(c,t),c=(0,a.p8)(c,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:c,currentIndex:0};return n.push(f),{target:(0,i.Cf)(e,c[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:r}=t;return{target:(0,i.Cf)(e,r[n]),random:{...t}}},_end:(e,t,n)=>o.P.findNext(e,t,n),findNext(e,t,n){const{randomList:i}=n,{nodeUuid:o}=t,a=i.find((e=>(0,r.RC)(e.node.nodeUuid,o)));if(a){const{currentIndex:r,destPortIds:i}=a;return r===i.length-1?f._end(e,t,n):f._increase(e,a)}return f._init(e,t,i)}}},9758:(e,t,n)=>{"use strict";n.d(t,{Ko:()=>u,WM:()=>o}),n(3948);var r=n(2872),i=n(7089);function o(e){const t=e.split(":"),n={};if(1===t.length)n.baseId=t[0];else if(2===t.length)n.nodeId=t[0],n.nodePartId=t[1];else if(3===t.length){n.nodeId=t[0];const e=t[1];e.match(/^[a-z0-9]{8}$/)?n.optId=e:n.optFilterId=e,n.optPartId=t[2]}return n}function a(e){const t=[],n=e.getAttribute("data-ph-cfg");if(n){const e=JSON.parse(n);Object.keys(e).forEach((n=>{t.push({name:n,value:u(e[n])})}))}const r=e.getAttribute("data-img-size")||":",[i,o]=r.split(":").map((e=>Number(e))),a={phParams:t,limitSrc:Number(e.getAttribute("data-limit-src"))||0,limitRnd:e.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:i,outOfResult:!!e.getAttribute("data-out-of-result"),disorder:!!e.getAttribute("data-disorder")},s=e.getAttribute("data-limit");if(s){const[e,t,n]=s.split(":");a.limitType=Number(e)||1,a.limitStart=u(t),a.limitEnd=u(n)}return a}function s(e){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((t=>{e.removeAttribute(t)}))}function u(e){if(!e)return e;if(!function(e){return e.includes("var-tag")&&e.includes("data-id".concat("="))}(e=String(e)))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelectorAll(".var-tag");for(const e of n)if(!e.hasAttribute("data-v-config")){const t=o(e.getAttribute("data-id")),n=a(e);s(e);const u=(0,i.c)(t);e.setAttribute("data-v-id",u);const c=(0,r.BB)(n);c&&e.setAttribute("data-v-config",c)}return t.innerHTML}},9698:(e,t,n)=>{"use strict";n.d(t,{V:()=>o,q:()=>a});var r=n(3656),i=n(9758);function o(e){const t=e;return t.referUuid?{index:t.index,config:{phParams:[],limitEnd:t.limitEnd,limitSrc:t.limitSrc,limitStart:t.limitStart,limitType:t.limitType,disorder:t.disorder,limitRnd:t.limitRnd},identity:(0,i.WM)(t.uuid),uuid:t.referUuid}:t}function a(e,t){const n=e;if(n.limit){const e=t.find((e=>e.uuid===n.referId));return(0,r.pC)(e.referUuid)}return n.referId}},6539:(e,t,n)=>{"use strict";n.d(t,{FC:()=>c,Mw:()=>f,Xs:()=>d,Y8:()=>l,ZI:()=>s,zZ:()=>u}),n(5306),n(3210);var r=n(5159),i=n(4248),o=n(7550);let a;function s(){return a||(a=(0,i.dU)().app.getParams()),a}function u(){a=null}function c(e){const t={...e};return delete t.appid,delete t.code,delete t.state,t}function l(e){const t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^([?#&])/,""))?(e.split("&").forEach((e=>{const n=e.replace(/\+/g," ").split("=");let r=n.shift(),i=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),{...t}):t}function d(e){(0,i.vW)().preview||(0,i.dU)().dev.autoRun?(0,i.vW)().notify((0,o.Iu)(r.bn.preview.noLink)):((0,i.dU)().hook.beforeForceLeave(),(0,i.dU)().app.openWebLink(e))}function f(e,t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}const n=function(e){const t=[];return Object.keys(e).forEach((n=>{if(void 0!==e[n]){const r="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n]));t.push(r)}})),t.join("&")}(t),r=e.match(/\?/)?"&":"?";return e+r+n}},8343:(e,t,n)=>{"use strict";n.d(t,{v:()=>o}),n(3948);var r=n(6866),i=n(4248);async function o(e){const{currentStartTime:t,nodes:n}=e,o=(new Date).getTime(),a=Math.abs(o-t)/n.length;for(const e of n){const t=e.costTime||0;(0,i.Pg)(e,{costTime:t+a,endTime:o}),await(0,r.p9)(e)}(0,i.Pg)(e,{currentStartTime:o})}},6060:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var r=n(4248),i=n(68),o=n(7433),a=n(4588);async function s(e){const t=(0,a.VE)(e);(0,r.Pg)(e,{nodes:t});let n=null;if((0,a.Fr)(e)){const t=(0,a.zY)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,r.Pg)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,i.g)(t,n);(0,r.Pg)(e,{groupTable:o})}else(0,r.Pg)(e,{groupTable:void 0});const s=await(0,o.FK)(e);(0,r.Pg)(e,{prevButton:(0,o.ve)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},3251:(e,t,n)=>{"use strict";n.d(t,{cs:()=>c,s$:()=>s,yp:()=>u});var r=n(9564),i=n(4248);let o,a={};const s={on(e,t){a[e]||(a[e]=[]),a[e].push(t)},off(e,t){e||(a={}),a[e]&&(a[e]=t?a[e].filter((e=>e!==t)):[])},one(e,t){const n=r=>{t(r),s.off(e,n)};s.on(e,n)},trigger(e,t={}){if(a[e])try{a[e].forEach((n=>n({type:e,...t,data:t},t)))}catch(e){(0,i.vW)().uploadLog(e)}}};function u(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,r.qK)(e))}function c(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,i.dU)().hook.onSwitchPage())}},68:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(3656);function i(e,t){if(0===e.length)return;const n=e[0].loop.varList.map((t=>{const{text:n,uuid:r}=t,i=e.filter((e=>e.loop.replacements[0].uuid===r));return{uuid:r,title:n,cells:o(i)}})),r=n.reduce(((e,t)=>t.cells.length>e.cells.length?t:e),{cells:[]}),i=r.cells;n.forEach((e=>{e.cells=i.map((t=>e.cells.find((e=>e.node.nodeUuid===t.node.nodeUuid))||a(void 0)))}));const s=r.cells.map((e=>({uuid:e.node.nodeUuid,title:e.node.title})));return{title:t.tableTitle,header:s,rows:n}}function o(e){return e.map(a)}function a(e){const t=(null==e?void 0:e.renderId)||(0,r.M8)();return e.headHidden=!0,{uuid:t,node:e}}},6207:(e,t,n)=>{"use strict";n.d(t,{AK:()=>u,Fy:()=>c,LK:()=>s,pZ:()=>a}),n(5306);var r=n(866),i=n(7117);function o(e){const t=":"+(0,i.SN)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return e.indexOf(n)&&(e=e.replace(n,t)),e}function a(e){s(e)}function s(e){const{image:t,options:n}=e;t&&(t.id=o(t.id)),n&&n.forEach((e=>{e.image&&(e.image.id=o(e.image.id))}))}function u(e,t){return e.filter((e=>e.used)).map((e=>(s(e),e.destList=e.destList.filter((e=>!e.designOnly)),function(e){const t=e;t.questionText=(0,r.l)(t.questionText),t.describe=(0,r.l)(t.describe);let n=[];t.options&&(n=n.concat(t.options)),t.otherOptions&&(n=n.concat(t.otherOptions)),t.optionsX&&(n=n.concat(t.optionsX)),t.optionsY&&(n=n.concat(t.optionsY)),n.forEach((e=>{e.text=(0,r.l)(e.text)}))}(e),e)))}function c(e){return e.forEach((e=>{e.value=(0,r.l)(e.value)})),e}},7433:(e,t,n)=>{"use strict";n.d(t,{__:()=>$,Nf:()=>z,rU:()=>K,n0:()=>q,FK:()=>D,EM:()=>F,ve:()=>B,Yz:()=>X,eM:()=>H,JP:()=>G,gB:()=>A,Tb:()=>W,Bm:()=>j}),n(5069),n(3948);var r=n(3251),i=n(6539),o=n(9564),a=n(9026),s=n(7529),u=n(7679),c=n(8670),l=n(8351),d=n(7518),f=n(6492),p=n(4248),h=n(7550),m=n(7952),g=n(5817),v=n(5159),y=(n(5306),n(3210),n(3803)),w=n(5142),_=n(5015),b=n(6935),x=n(5838),T=n(5497);const k={},S={};async function I(e,t,n){const{actions:r}=t.origin;if(r&&!(0,y.q)()&&!(0,p.vW)().realTimePreview){if("forward_enter"===e){if(k[t.renderId])return;k[t.renderId]=!0}if("backward_leave"===e&&delete k[t.renderId],"forward_leave"===e){if(S[t.renderId])return;S[t.renderId]=!0}"backward_leave"===e&&delete S[t.renderId];for(const i of r){if(i.disabled||i.event!==e)continue;const{activeConfig:r}=i;if(!r||await(0,x.Q3)(n,r))if("http_request"===i.type)(0,T.l)(i),await(0,_.zp)(n,i.request,null,!0);else{const r={state:n},o={question_id:t.nodeUuid,response_id:n.transactionID,locale:n.language,event:e,type:i.type};if("email"===i.type){const{email:e}=i,t={...o,email:(await(0,b.e_)(e.address,r)).replace(/\s/g,""),content:await(0,b.Ur)(e.content,r),title:(await(0,b.e_)(e.title,r)).trim()};await(0,w.FB)(t)}else{const{sms:e}=i,t={};for(const n of e.params)t[n.name]=(await(0,b.e_)(n.value,r)).trim();const n={...o,url:(await(0,b.e_)(e.url,r)).replace(/\s/g,""),content:t};await(0,w.FB)(n)}}}}}var O=n(6866),E=n(6060),C=n(4588),P=n(3768);var L=n(3656),N=n(8343);let R;function A(){return!!R}const U=["end","gift","lottery"];function M(e){let{prev:t}=e;const n=[];let r=t&&(0,o.$X)(t);for(;r;)n.push({node:t,reason:r}),t=t.prev,r=t&&(0,o.$X)(t);return{prev:t,skipList:n,current:e}}function B(e){if((0,p.vW)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,r=(0,C.zY)(e),{prev:i}=M(r),o=r.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.vW)().preview&&"end"===o?(0,h.Iu)(v.bn.global.backTest):t&&i&&(r.checkMode===i.checkMode||(0,p.vW)().preview)&&U.indexOf(o)<0?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,h.Iu)(v.bn.global.previous):e.prevBtnText:""}async function D(e){const{formalResult:t}=e,n=e.current;if((0,L.is)(n,"end"===n.type)){const r=n.endBtnText||(0,h.Iu)(v.bn.global.go);if(n.linkUrl)return r;if(t&&t.reward||(0,p.vW)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":r;{const{target:t}=await m.P.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?r:""}}if((0,L.is)(n,"lottery"===n.type)){const e=(0,h.Iu)(v.bn.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,h.Iu)(v.bn.global.next):e.nextBtnText}function F(e,t){const n=[];let r=1;const i=e[t];let a=e[t+r],s=a&&(0,o.$X)(a);for(;a&&s;)n.push({node:a,reason:s}),r+=1,a=e[t+r],s=a&&(0,o.$X)(a);return{next:a,skipList:n,current:i}}async function j(e){const t=await(0,u.Dn)(e.nodes,!0,(0,C.Fr)(e));if(t.valid){if((0,C.Fr)(e)){(0,p.Pg)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await I("forward_leave",t,e)}else await I("forward_leave",e.current,e);return await(0,s.BW)(e,e.current,{type:"page_next",delay:200}),!0}return function(e,t){const{valid:n,message:i,dueToNode:o,dueToOption:a}=t,s={valid:n,message:i};if(a&&(s.optId=a.uuid,s.optText=a.text,a.label&&(s.message=a.label+":"+s.message)),o&&(s.nodeId=o.nodeUuid,s.nodeName=o.nodeName,s.nodeType=o.type,s.message=o.nodeName+":"+s.message),r.s$.trigger("NEXT_FAIL",s),"vital"===t.type)throw(0,p.vW)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.vW)().alert(t.message):(e.inSingleGroup||(0,p.vW)().notify(t.message),(0,u.Jh)(t,e))}(e,t),!1}function W(e,t){(0,p.Pg)(e,{nextLoading:t})}function q(e){W(e,!0),R={state:e}}async function z(e){W(e,!1),R&&(await H(R.state),R=void 0)}function V(e,t,n){(0,r.cs)({origin:t,parent:e},!0);const a={...(0,i.ZI)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.vW)().preview)(0,c.sO)(n,t,e.theme,(0,o.Jz)(e.nodeList)),(0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink((0,p.dU)().app.getRewardUrl(a)),(0,p.vW)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:r}}}=e;(0,p.dU)().auth.authorizeGift(n,r,t,"end"),(0,p.vW)().customAbort()}}function G(e,t){t.linkUrl?((0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink(t.linkUrl),(0,p.vW)().customAbort()):V(e,(0,o.nv)(e.nodeList,t.rewardRaw.gift_id),t.rewardRaw)}async function H(e){const t=function(e){const{renderList:t}=e,n=e.nodes[e.nodes.length-1];return F(t,(0,s.S5)(t,n))}(e),{current:n,next:u}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,i.Xs)(n);const u=(0,o.CE)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!u)return;const d=(0,c.Ok)(e,u);if((0,L.is)(u,"lottery"===u.type)){const t=await(0,l.MJ)(u,d,e);(0,a.FA)(t,e,!(!d||!d.id)),(0,p.Pg)(e,{current:t}),(0,r.cs)(t,!0)}else V(e,u,d);await(0,E.b)(e)}(e,n):(await(0,p.dU)().hook.beforeGotoNext(),(await(0,d.C)(e,{valid:!0,message:""},n,u)).valid?(function(e){if((0,p.vW)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,r=t[t.length-1];let i=r,a=[i];for((0,C.YB)(r.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===r.origin.groupId)),i=a[0]);i.prev&&(0,o.$X)(i.prev)&&!(0,C.YB)(i.prev.nodeUuid,e.nodeGroups);)a.unshift(i.prev),i=i.prev;return a}(e).map((e=>(0,P.py)(e))).filter((e=>!!e));(0,p.dU)().network.pushSocket("update",{answers:t}),clearTimeout(void 0)}(e),async function(e,t){const{next:n,current:i}=t;(0,p.Pg)(e,{current:n}),n.reached=!0,(0,a.UW)(i,n),(0,r.cs)(n,!0),(0,g.bR)(e),await(0,O.sB)(e),await(0,E.b)(e),W(e,!1),(0,o.qK)(i),(0,s.$V)(e,e.current),r.s$.trigger("NEXT_OK")}(e,t)):W(e,!1))}async function X(e){const t=(0,C.zY)(e),{prev:n,skipList:i}=M(t);if(n){if((0,C.YB)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_leave",n,e)}else await I("backward_leave",t,e);for(const t of i)await I("backward_enter",t.node,e),await I("backward_leave",t.node,e);if((0,p.Pg)(e,{current:n}),await(0,N.v)(e),(0,r.cs)(n,!0),(0,g.bR)(e),await(0,O.sB)(e),await(0,E.b)(e),(0,a.WJ)(t,n),(0,s.$V)(e,e.current),r.s$.trigger("PREV_OK"),(0,C.YB)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_enter",n,e)}else await I("backward_enter",n,e)}}async function K(e,t){const{nodeList:n,current:r}=e,i=await(0,f.Pf)(n,r,e),{target:o}=i;return o?$(e,i,t):null}async function $(e,t,n){const r=(0,l.qG)(t,e);if(n&&n(r))return null;const i=await(0,l.D1)(r,e.current);(0,p.Pg)(e,{current:i}),await I("forward_enter",i,e);const s=(0,o.$X)(i);return s&&((0,a.do)(e,i,s),await I("forward_leave",i,e)),i}},5817:(e,t,n)=>{"use strict";n.d(t,{bR:()=>p,xC:()=>f}),n(3948);var r=n(9564),i=n(1128),o=n(7529),a=n(4248);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function u(e){return e&&"end"!==e.type}function c(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=c(e=(0,r.nv)(t,n),t)),e}function l(e,t){let n;t=c(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,i.NV)(t);if(o&&(n=(0,r.CE)(e,a,o.uuid)),!u(n))if(s)n=(0,r.CE)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,r.CE)(e,a,t.uuid),u(n))break;return n}function d(e){return!s.includes(e.type)&&!e.autoSkip}function f(e){const t=function(e){const t=e.renderList.filter((e=>d(e.origin)));return(0,o.S5)(t,e.current)}(e),n=function(e,t){const{nodeList:n,current:r}=t;let i=e,o=l(n,r.origin);for(;o;)d(o)&&(i+=1),o=l(n,o);return"end"!==r.type&&(i+=1),i}(t,e);return-1===t?{index:-1,fullLength:n,percent:0}:{percent:Math.round(t/n*100),fullLength:n,index:t}}function p(e){if((0,a.dU)().dev.infer)return;const{percent:t,index:n}=f(e);n>-1&&(0,a.Pg)(e,{progress:t})}},7529:(e,t,n)=>{"use strict";n.d(t,{$V:()=>y,BW:()=>v,JL:()=>h,S5:()=>m,Sl:()=>w}),n(3948);var r=n(7433),i=n(9564),o=n(2629),a=n(3656),s=n(4248),u=n(9309),c=n(5817),l=n(3251),d=n(6060),f=n(4588);let p=-1;function h(e,t){return t=t.toLowerCase(),e.find((e=>e.renderId.toLowerCase()===t))}function m(e,t){for(let i=0;i<e.length;i++){if(n=e[i],r=t,(0,a.RC)(n.renderId,r.renderId))return i}var n,r;return-1}function g(e,t){(0,s.Pg)(e,{refreshing:t})}function v(e,t,n){if(g(e,!0),clearTimeout(p),n.initial&&(0,l.cs)(e.current,!0),n.delay){const r=(0,s.dU)().dev.autoRun||(0,s.dU)().dev.infer?0:n.delay;return new Promise(((i,o)=>{p=setTimeout((async()=>{try{await _(e,t,n)}catch(e){o(e)}i()}),r)}))}return _(e,t,n)}function y(e,t){const{circleNode1Id:n}=t.origin;n?(0,s.Pg)(e,{loopStack:(0,a.p$)(t.loopStack)}):(0,s.Pg)(e,{loopStack:[]});const r=e.randomList,i=t.random;r.forEach((e=>{i?(0,a.RC)(e.node.nodeUuid,i.node.nodeUuid)?e.currentIndex=i.currentIndex:i.stack.some((t=>(0,a.RC)(e.node.nodeUuid,t.node.nodeUuid)))||(e.currentIndex=-1):e.currentIndex=-1}))}function w(e,t){const n=function(e,t){let n=e;if(!t)return n;for(const e of t)n+="-"+(0,a.pC)(e.option_id);return n}(t.node_id,t.loop_ctxs);return h(e.renderList,n)}async function _(e,t,n){g(e,!0);const a=e.renderList;y(e,t=t||e.current);const l=m(a,t),p=await async function(e,t,n){const a=n.type;let u=[...e.renderList];u=u.length>0?u:[t];const c=m(u,t);if(c<0)return u;u.length=c,u.push(t),(0,s.Pg)(e,{renderList:u}),(0,f.Fr)(e)&&await(0,o.lq)(t);let l=null;const d=t=>!(0,f.dO)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,r.rU)(e,p);if(!t)break;if(u.push(t),f.le.includes(t.type))break;if(!(0,i.$X)(t)){if(l||(l=t,(0,f.YB)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.dO)(l,t,e.nodeGroups))break;await(0,o.lq)(t)}}return u}(e,t,n),h=n.initial?(0,r.EM)(p,l).next:t;(0,s.Pg)(e,{current:h}),g(e,!1),y(e,t),await(0,d.b)(e),n.initial||(await(0,r.Nf)(e),e.inSingleGroup&&(0,c.bR)(e)),(0,u.fS)()}},8670:(e,t,n)=>{"use strict";n.d(t,{G8:()=>O,Ok:()=>T,md:()=>I,sO:()=>k});var r=n(9564),i=n(3087),o=n(6539),a=n(3656),s=n(4248),u=n(7550),c=n(5521),l=n(5589),d=n(3251),f=n(9026),p=n(5159),h=n(5142),m=n(5810),g=n(3756),v=n(698),y=n(248),w=n(4125),_=n(9271),b=n(6970);let x=null;function T(e,t){if((0,s.vW)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(t,"gift"===t.type))return{...n,type:t.giftType,gift_id:t.nodeUuid};{const i=(0,a.DQ)(t.options,1)[0],o=(0,r.CE)(e.nodeList,t.destList,i.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:t.nodeUuid,lottery_option_id:i.uuid}}}return e.formalResult.reward}function k(e,t,n,r){const i="custom"===t.giftType;if((0,s.vW)().preview||i){r.useCustomLogo&&(t.useCustomLogo=r.useCustomLogo,t.logoImage=r.logoImage,t.logoText=r.logoText,r.i18n&&Object.keys(r.i18n).forEach((e=>{const n=r.i18n[e];t.i18n[e].logoText=n.logoText})));const i={};"custom"===t.giftType?i.custom={giftNode:t,theme:n,qrCode:e.code,rewardId:e.id}:i.redEnvelope={theme:n,recipient:(0,g.W)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.dU)().storage.set("cached_reward",JSON.stringify(i))}}function S(e){const t=(0,s.dU)().storage.get("cached_reward");if(!t)return;const n=JSON.parse(t);let r;const{custom:i,redEnvelope:o}=n;return i?r=i.rewardId:o&&(r=o.gift.id),r===e?n:void 0}function I(){x=null}async function O(){if(x)return x;const e=(0,o.ZI)(),{rt:t,rid:n,code:r,qid:a,tid:g,locale:T,reward_from_qr_code:k}=e;let I;(0,u.u4)(T);let O,C={};if("red_envelope"===t){let t;(0,s.vW)().preview?t=S(Number(n)).redEnvelope:!r&&k?t=E:(n&&!r&&((0,s.dU)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.vW)().customAbort()),t=function(e){var t;const n=e.gift.origin,r={...e,gift:{...null==e?void 0:e.gift,origin:{...null===(t=null==e?void 0:e.gift)||void 0===t?void 0:t.origin,i18n:{},logoText:""}}};if(!n)return r;const i=n.i18n;if(!i)return r;const o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e]={activityName:t.gift_name,blessings:t.gift_wishing,endBtnText:t.end_btn_text,logoText:t.logo_text}})),r.gift.origin.i18n=o,r}(await(0,h._7)({code:r},n)));const{gift:i,theme:o,isTemporaryForWXQrcode:c}=t;I=i.origin,C=t.recipient,(0,f.Bt)(I,{surveyId:a,userInfo:C,transactionID:g}),O={isTemporaryForWXQrcode:c,rewardValue:I.giftCount+" "+(0,u.Iu)(p.bn.reward.yuan),wechatID:C.nickname,wechatImage:C.headimgurl,theme:o}}else{const e=S(Number(n));if(!e)return(0,s.vW)().error((0,u.Iu)(p.bn.global.invalidReward)),null;const{custom:t}=e;I=t.giftNode,O={qrCode:t.qrCode,rewardToMessage:I.needSendNote,theme:t.theme}}(0,y.mj)(I,I.i18n[T]);const P=(0,w.s)(I),L={...O,images:I.image?[(0,_.q)(I.image)]:[],video:I.video,layout:I.layout,rewardId:n,eventHub:d.s$,nodeName:I.nodeName,type:I.type,rewardType:I.giftType,renderId:I.nodeUuid,rewardName:I.activityName,title:I.blessings,description:I.describe,summary:I.describe,rewardTime:(0,i.GN)(),...P,prevButton:(0,s.vW)().preview&&!(0,s.vW)().realTimePreview?(0,u.Iu)(p.bn.global.backTest):"",nextButton:I.linkUrl&&(I.endBtnText||(0,u.Iu)(p.bn.global.go)),handleEvents:{...m.k,async handlePrevClick(){(0,s.dU)().app.gotoStartPage((0,o.ZI)())},handleOptionClick:async(e,t)=>(await(0,c.W)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.U)(e,t)).result,async handleNextClick(){I.linkUrl&&(0,o.Xs)(I.linkUrl)},async handleGetRewardWX(){(0,s.dU)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.vW)().customAbort()}}};return L.template=await(0,b.b)(I.template,L),x=L,(0,v.z)(L.theme),await(0,s.dU)().hook.afterFetchReward(L),L}const E={isTemporaryForWXQrcode:!0,theme:{primary:"#202020",secondary:"#FFFFFF",contrast:"#CC2227",background:"#FCFCFC",error:"#CC2227",button:"#202020",fontSize:"1.5rem",fontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",btnFontSize:"1.25rem",btnFontWeight:"normal",name:"minimal",fontFamily:"roboto",titleFontSize:"1.5rem",titleFontWeight:"bold",boxWidth:"50vmin",bgOpacity:100,bgLayout:"cover",bgSize:"cover",effect:"normal",bgImageUrl:"",bgImageId:"",bgImageHeight:0,bgImageWidth:0},recipient:{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:"test微信名称示例"},gift:{id:-1,title:"test",description:"test",config:{gift_name:""},origin:{sortNo:10003,x:808,y:219,nodeName:"GIFT",type:"gift",used:!0,nodeUuid:"dc28e571-38a3-4af3-9829-22aaa62e83f0",input:{uuid:"bb75d086-9203-4cd1-a757-aa22fdde3a71"},label:"GIFT",questionText:"test",layout:{fontSize:"1.5rem",fontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",descFontIsolate:!1,fontIsolate:!1,iconFontSize:"48px",optFontIsolate:!1},template:{name:"basic",params:[],id:"standards_gift_basic"},giftCount:1,giftType:"red_envelope",activityName:"test",blessings:"test",needSendNote:!0,needVerification:!0,fromNodeIds:"319c139d-043f-4949-8721-b2376d52cea7",fromOptIds:"",i18n:{zh_cn:{activityName:"test",blessings:"test",endBtnText:""}}}},amount:1,type:"red_envelope"}},1881:(e,t,n)=>{"use strict";n.d(t,{$4:()=>h,GK:()=>m,Xs:()=>p,u:()=>g}),n(5306),n(3210),n(3948);var r=n(6935),i=n(6539),o=n(3251),a=n(3892),s=n(5142),u=n(949),c=n(6064),l=n(1772),d=n(4248);function f(e,t){const n=(0,c.KF)(e.result);return e&&(0,a.PX)(n)?(setTimeout((()=>{(0,i.Xs)(n)})),{type:"LINK",done:!0}):{type:t,done:!0}}async function p(e,t){let n="";const{parsedPayload:{surveyMeta:{collector:i}}}=e;if(!i)return;const{sampler_config:o}=i;o&&(n=o[t]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),u={};for(const t of s){const[n,i]=t.split("=");u[n]=await(0,r.Oy)(i,e)}return u}async function h(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.s$.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const c=a.trim(),p=c.startsWith("{{")&&c.endsWith("}}"),h=await(0,r.Oy)(c,t,!p);return h.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:h.trim().startsWith("http")?async function(e,t){return(0,i.Xs)(t),o.s$.trigger("SAMPLER_TRANSFER",{method:"LINK",url:t,type:e}),{type:"LINK",done:!0}}(e,h):async function(e,t,n){const r=n.indexOf(":"),a=n.substring(0,r).toUpperCase(),c=n.substring(r+1),p=c.indexOf("?"),h=-1===p?c:c.substring(0,p);let m={};if(-1!==p){const e=-1===p?"":c.substring(p);e&&(m=e?(0,i.Y8)(e):{})}let g={type:a,done:!1};if("FAKE"===a)g=f(await(0,u.T)(h,(0,l.fq)(m,e),!1),a);else if("GET"===a||"POST"===a){const e="GET"===a?"GET":"POST";try{g=f(await(0,s.o1)(h,{type:e,data:m}),a)}catch(e){(0,d.vW)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.s$.trigger("SAMPLER_TRANSFER",{url:h,data:m,method:a,type:t}),g}(t,e,h)}function m(e){return"LINK"===e.type&&e.done}async function g(e){var t,n;const{context:i}=e,o=i.node,a=null!==(n=null===(t=null==o?void 0:o.backendRequest)||void 0===t?void 0:t.params)&&void 0!==n?n:[],s={};for(const t of a){const{name:n,value:i}=t;s[n]=await(0,r.e_)(i,{state:e,joinBy:","})}return 0===a.length?void 0:s}},4588:(e,t,n)=>{"use strict";n.d(t,{Fr:()=>u,VE:()=>s,YB:()=>o,dO:()=>l,le:()=>c,zY:()=>a});var r=n(9564),i=n(4248);function o(e,t){return t.some((t=>t.singlePage&&t.nodes.includes(e)))}function a(e){return s(e)[0]||e.current}function s(e){const{current:t,renderList:n}=e,a=[t],s=n.indexOf(t);let u=s-1,c=t;for(;;){const t=n[u--];if(!l(t,c,e.nodeGroups))break;(0,r.$X)(t)||(a.unshift(t),c=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,r.$X)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,i.Pg)(e,{pageEnd:!1,pageStart:!1})})),(0,i.Pg)(a[0],{pageStart:!0}),(0,i.Pg)(a[a.length-1],{pageEnd:!0})),a}function u(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const c=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!c.includes(e.type)&&!c.includes(t.type)&&o(e.nodeUuid,n)&&o(t.nodeUuid,n)&&function(e,t){return!(!e.origin.groupId||!t.origin.groupId||t.origin.groupId!==e.origin.groupId)&&(!t.loop&&!e.loop||!(t.loop&&!e.loop||!t.loop&&e.loop||t.loop.destInputId!==e.loop.destInputId||t.loop.node.groupId!==t.origin.groupId&&t.loop.currentIndex!==e.loop.currentIndex))}(e,t)}},7518:(e,t,n)=>{"use strict";n.d(t,{C:()=>k,Y:()=>T});var r=n(3251),i=n(5142),o=n(3768),a=n(9026),s=n(5015),u=n(7433),c=n(8351),l=n(1881),d=n(6866),f=n(4248),p=n(7550),h=n(5159),m=n(6064),g=n(6060),v=n(565);const y={valid:!0,message:""},w={valid:!1,message:""};let _=!1,b=!1,x=!1;function T(){_=!1,b=!1,x=!1}function k(e,t,n,r){const i=[];let o=r.prev;for(;o!==n;)i.push({prev:o,next:r}),o=(r=o).prev;return i.push({prev:o,next:r}),S(e,t,i)}async function S(e,t,n){const T=n.pop(),k=await async function(e,t,n,T){const k=n.checkMode,S=T.checkMode,P=T.type;if("end"===P&&(clearInterval(e.timer),(0,f.Pg)(e,{limitTime:void 0})),(0,f.vW)().preview)return t;if(k){if("end"===P)return async function(e,t,n){if(x)return w;(0,f.dU)().network.closeSocket(),x=!0;const c=I(e,n);(0,u.Tb)(e,!0),(0,v.y)(e,"all"),await(0,f.dU)().hook.beforeEndSurvey(e);try{const t=await(0,o.gS)(e,"all","examine_skipped_url"),n=await(0,i.Hw)(t,e.transactionID);e.responseStatus=n.status,await(0,f.dU)().hook.onEndSurvey(e)}catch(t){const n=(0,m.KF)(t&&t.message)||"";return(0,f.vW)().uploadLog("skip提交失败 "+n,"warning"),(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain)),x=!1,(0,u.Tb)(e,!1),w}r.s$.trigger("CHECK_FAIL"),(0,f.dU)().network.closeSocket();try{await(0,d.VY)(e),c||(0,a.YU)(t,n,e),await(0,s.nR)(e,n),(0,u.Tb)(e,!1),O(e);const r=await(0,l.$4)("examine_skipped_url",e);if((0,l.GK)(r))return w}catch(e){(0,f.vW)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return y}(e,n,T);if(!S)return async function(e){if(b)return w;b=!0,(0,u.Tb)(e,!0);const t=await(0,o.gS)(e,"check","examine_failed_url"),n=t.answers.length;(0,v.y)(e,"check");try{const o=await(0,i.Im)(t,e.transactionID);return(0,a.lt)(e,n),(0,u.Tb)(e,!1),e.responseStatus=o.status,r.s$.trigger("CHECK_SUBMIT"),y}catch(t){await(0,f.dU)().hook.onEndSurvey(e),await(0,d.VY)(e);const r=(0,i.rR)(t);return C(r)?await E(e,n,"examine_failed_url",r):(b=!1,(0,f.vW)().uploadLog("examine提交失败"+t&&t.message,"warning"),(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain))),(0,u.Tb)(e,!1),w}}(e)}return"end"===P?async function(e,t){if(_)return w;(0,f.dU)().network.closeSocket(),_=!0;const n=I(e,t)||function(e,t){const{renderList:n,startTime:r}=e,i=function(e,t){const n=(0,p.Iu)(h.bn.global.notTarget),{minTime:r,timeLessText:i}=e;return r&&r>t?i||n:""}(e,Math.ceil((Date.now()-r)/1e3));if(i){e.fakeCommitted=!0;const r=n[n.length-1];return(0,f.Pg)(r,{hasReward:!1,title:i}),(0,a.Om)(t,e),!0}return!1}(e,t);(0,u.Tb)(e,!0),(0,v.y)(e,"normal");const b=await(0,o.gS)(e,"normal","committed_url");let x,T;await(0,f.dU)().hook.beforeEndSurvey(e);try{x=await(0,i.SK)(b,e.transactionID);const t=x.response||x;e.responseStatus=t.status,await(0,f.dU)().hook.onEndSurvey(e)}catch(t){const n=(0,i.rR)(t);if(C(n))await E(e,b.answers.length,"examine_failed_on_commit_url",n);else if(n===i.f9.response_overflow){O(e);const t=await(0,l.$4)("overflow_url",e);(0,l.GK)(t)||e.ignoreSubmittingResult||(0,f.vW)().error((0,i.W1)(n)),e.responseStatus="committed",r.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}else{const n=(0,m.KF)(t&&t.message)||"";(0,f.vW)().uploadLog("正式提交失败 "+n,"warning"),e.ignoreSubmittingResult||(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain)),(0,u.Tb)(e,!1),_=!1}if(!e.ignoreSubmittingResult)return w;await(0,f.dU)().hook.onEndSurvey(e),x={}}e.formalResult=x;try{await(0,s.nR)(e,t),n?T=await(0,l.$4)("invalid_url",e):((0,a.Kv)(t,e,b.answers.length,x),x.reward&&(0,f.Pg)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.dU)().app.canHandleReward())return(0,c.ks)(t,e)}(t,e),T=await(0,l.$4)("committed_url",e))}catch(e){(0,f.vW)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.VY)(e),(0,u.Tb)(e,!1),O(e),r.s$.trigger("FULL_SUBMIT"),await(0,g.b)(e),(0,l.GK)(T)?w:y}(e,T):t}(e,t,T.prev,T.next);return 0===n.length||"vital"===k.type?k:S(e,k,n)}function I(e,t){const{oneReplyPerTerminal:n,sid:r}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.eS)(t,e),n&&(0,f.dU)().storage.set(r,"1"),!0)}function O(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.dU)().storage.set(n,"1")}async function E(e,t,n,o){(0,a.hR)(e,t),O(e);const s=await(0,l.$4)(n,e);(0,l.GK)(s)||(0,f.vW)().error((0,i.W1)(o)),e.responseStatus="examine_failed",r.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}function C(e){return e===i.f9.quota_not_match||e===i.f9.quota_full}},9309:(e,t,n)=>{"use strict";n.d(t,{Wc:()=>V,BN:()=>Z,$A:()=>K,fS:()=>W});var r=n(9564),i=n(6492),o=n(7433),a=n(3087),s=n(5753),u=n(5521),c=n(5589),l=n(152),d=n(8231),f=n(8351),p=n(9026),h=n(2629),m=n(7529),g=n(5142),v=n(6207),y=n(7518),w=(n(3768),n(3151)),_=n(3251),b=n(6866),x=n(3803),T=n(4248),k=n(7550),S=n(248),I=(n(1128),n(5810)),O=n(3656),E=n(5817),C=n(5159),P=n(2167),L=n(4625),N=n(6539),R=n(7428),A=(n(5069),n(3948),n(6060)),U=n(4588);var M=n(565);const B={};var D=n(8343),F=n(5286),j=n(5905);const W=(0,O.Ds)((()=>{(0,T.vW)().realTimePreview||H()||_.s$.trigger("STRETCH_OK")}));function q(e){return!H()&&!(0,M.a)(e,!0)}function z(e){(0,x.q)()||(e.answerChangedSinceStart=!0)}function V(e){e.handleEvents={...I.k,handleQuickAnswer:t=>(z(e),(0,L.M)(t)),async handleLangChange(e){await(0,k.nE)(e.locale,!0)},async handleCascadeInput(e,t,n,r){if(!q(r))return null;const i=(0,w.OJ)(e,t,n,r);return this.handleOptionInput(e,i,r).then((e=>e))},handleOptionAssistInput:(t,n,r,i)=>((0,T.Pg)(r.assistValue,{[n]:t}),z(e),X({result:!0},i)),handleCascadeClick:async(e,t,n)=>q(n)?X(await(0,w.Xl)(e,t,n),n).then((e=>e)):null,async handleMenuClick(e,t){const n=()=>t.options.filter((e=>e.selected)).map((e=>e.text));return q(t)?(await this.handleOptionClick(t.options[e],t),n()):n()},async handleOptionClick(t,n){if(!q(n))return null;const r=await(0,u.W)(t,n);return r.result&&(0,p.cH)(t,n),z(e),X(r,n).then((e=>e))},async handleOptionInput(t,n,r){if(!q(r))return null;const i=await(0,s.wS)(t,n,r);return i.result&&(0,p.nF)(t,n,r),z(e),X(i,r).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.LM)(e,t,n),(0,p.EG)(e,t,n)),async handleSequenceInput(t,n,r,i){if(!q(r))return null;const o=i.sortNo,a=await(0,d.O)(t,n,r),s=i.sortNo;if(a.result&&o!==s){const e=r.options.findIndex((e=>e===i));(0,p.OP)(e,r)}return z(e),X(a,r).then((e=>e))},async handleQuestionInput(t,n){if(!q(n))return null;const r=await(0,c.U)(t,n);return r.result&&(0,p.hy)(t,n),z(e),X(r,n).then((e=>e))},handleLocateFailed(t){const n=(0,c.k)(t);return n.result&&(0,p.TY)(t),z(e),X(n,t).then((e=>e))},async handlePrevClick(){if(!(0,T.vW)().realTimePreview&&!G()&&e.prevButton&&!H())return(0,p.g9)(e.current),(0,o.Yz)(e).then((e=>e))},handleMaxDiffInput(t,n,r,i){if(!q(i))return null;const o=(0,l.o)(t,n,r);return z(e),X(o,i).then((e=>e))},async handleNextClick(){if((0,T.vW)().realTimePreview||H()||G()&&(0,o.gB)())return;(0,o.Tb)(e,!0),await(0,D.v)(e);const{current:t}=e;if((0,p.xi)(t),"lottery"===t.type)(0,o.JP)(e,t),(0,o.Tb)(e,!1);else if(await async function(e){const t=e.filter((e=>!!e.origin.backtracking));let n=!1;for(const e of t){const{origin:{backtracking:t},parent:r}=e;if(t.targetNodeUuid){const{logic:i,request:o}=t;let a=await(0,h.Gl)(o,e);if(a.valid&&(a=await(0,h.Rv)(i,r)),n=a.valid,n)return(0,T.Pg)(r,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,O._v)(200);const t=e.current,{backtracking:{targetNodeUuid:n}}=t.origin,i=await async function(e,t){const n=[...e.renderList].reverse(),i=n.findIndex((e=>(0,O.RC)(e.nodeUuid,t)));for(let e=i;e>=0;e--){const t=n[e];if(!(0,r.$X)(t))return t}return n[i]}(e,n);return await async function(e,t){const{renderList:n}=e,r=n.findIndex((e=>e.renderId===t.renderId)),i=n.slice(r).map((({renderId:e})=>e));await(0,b.nX)(e,i),(0,T.Pg)(e,{current:t});const a=(0,U.VE)(e),s=a.indexOf(t),u=a.slice(s),c=[];let l=t.prev;for(const t of u){const{origin:n,loop:r,random:i,loopStack:o}=t,a=(0,f.qG)({target:n,loop:r,random:i,loopStack:o},e),s=await(0,f.D1)(a,l);l=s,c.push(s)}await(0,T.dU)().hook.beforeGotoNext(),(0,T.Pg)(e,{current:c[0],nodes:a.slice(0,s).concat(c),renderList:n.slice(0,r).concat(c)}),(0,o.Tb)(e,!1),_.s$.trigger("NEXT_OK"),(0,_.cs)(e.current,!0)}(e,i),(0,E.bR)(e),await(0,b.sB)(e),await(0,A.b)(e),i}(e),(0,o.Tb)(e,!1);else if(await(0,o.Bm)(e)){if(!G())return(0,o.eM)(e);(0,o.n0)(e)}else(0,o.Tb)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,m.$V)(e,e.current);const r=await n.apply(e.handleEvents,t);return(0,m.$V)(e,e.current),r}}))}function G(){return(0,T.vW)().surveyState.refreshing}function H(){return(0,T.vW)().surveyState.nextLoading||G()}async function X(e,t){(0,j.LK)(t)&&await(0,F.y)(t),(0,_.cs)(t),await(0,b.p9)(t);const n=t.parent;return(0,T.vW)().realTimePreview||(n.inSingleGroup?((0,T.Pg)(n,{current:t}),await(0,m.BW)(n,t,{type:"page_inner",delay:60})):W()),(0,_.yp)(t),e.result}function K(e,t={}){return e=e||(0,T.vW)().surveyState,(0,T.Pg)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),$(e)}async function $(e){(0,o.Tb)(e,!0);const t=e.nodeList,n=(0,r.Jz)(t),a=await(0,i.tP)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,T.Pg)(e,{nextBtnText:t.nextBtnText||(0,k.Iu)(C.bn.global.next),prevBtnText:t.prevBtnText||(0,k.Iu)(C.bn.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.__)(e,a,null);const{current:s}=e,u=(0,r.$X)(s),c=(0,U.Fr)(e);if(u||c){const t=c?"page_inner":"page_next";await(0,m.BW)(e,s,{type:t,initial:!0})}else(0,T.Pg)(e,{renderList:[s]}),await(0,A.b)(e),W();(0,E.bR)(e);const l=e.current;return l.reached=!0,(0,p.DM)(e,l),_.s$.trigger("START_OK"),await(0,b.O2)(e),s!==l&&await(0,y.C)(e,{valid:!0,message:""},s,l),(0,_.cs)(e.current,!0),(0,o.Tb)(e,!1),e}async function Z(){const e=(0,T.dU)();if((0,T.vW)().surveyState)return(0,T.vW)().surveyState;const t=await async function(){const e=(0,T.vW)().sid,t=(0,T.vW)().startState;if(!t)return(0,T.dU)().app.gotoStartPage((0,N.ZI)()),(0,T.vW)().customAbort(),null;if((0,T.vW)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:r,channel:i,interviewee:o}=n;!function(e,t){(0,T.dU)().dev.autoRun||(0,T.dU)().storage.get(e)&&t&&!(0,T.vW)().preview&&((0,T.vW)().error((0,k.Iu)(C.bn.global.antiAgain)),(0,T.vW)().customAbort())}(e,!1===n.collector.multiple_response);const a={code:e,payload_digest:r,platform:i.type,interviewee_id:o&&o.id,query_params:(0,N.ZI)()};try{const e=await(0,g.yU)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=r,t.channel=i,(0,T.dU)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,g.gU)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:r}=e;if(!(0,T.vW)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,g.vT)(e,{type:"GET"},!0)}catch(e){throw(0,T.vW)().error((0,k.Iu)(C.bn.global.downloadError)),e}const r=await(0,P.Z)(n);t.nodeList=(0,v.AK)(r.nodes,t.nodeGroups)}(0,S.iZ)(n.autoCpltGroups,r);const{nodeList:i,variables:o,nodeGroups:a}=t;if(n.currentLang!==r){const e=t.langs.find((e=>e.locale===r));if(e){const t=await async function(e,t){if(!B[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,g.vT)(e.url,{type:"GET"},!0);t=await(0,P.Z)(n)}return t};B[e.locale]=t()}return B[e.locale]}(e);(0,S.pe)({nodes:i,variables:o,groups:a},t)}}}(t);const n=function(e){const{parsedPayload:t,userInfo:n,theme:r,hasVar:i,sid:o,langTable:s,startNode:u,surveyId:c,summary:l,language:d,images:f,langResume:p,title:h,transactionID:m,status:g,platform:v,digest:y,channel:w,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:S,showLogoInEachPage:I,imageList:O,varStyles:E,variables:C,nodeGroups:P,embedApis:L}=e,{nodeList:N,surveyMeta:A,testCases:U}=t;let M=!1;(0,R.s)()||A.collector&&(M=!1===A.collector.multiple_response);const{fakedServers:B,autoCpltGroups:D,noWxShare:F,previewShadowNodes:j,previewQuickAnswer:W,ignoreSubmittingResult:q,qNumberRequired:z,asterisksRequired:G,progressBarRequired:H,nodeTypeInfoRequired:X,limitTime:K,minTime:$,timeoutText:Z,timeLessText:J,resumeEnabled:Y}=u,Q={embedApis:L,nodeGroups:P,variables:C,varStyles:E,imageList:O,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:S,showLogoInEachPage:I,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:j&&!(0,T.dU)().dev.autoRun,previewQuickAnswer:W,ignoreSubmittingResult:q,langResume:p,langTable:s,testCases:U,progress:0,resumeEnabled:Y||(0,R.s)(),images:f,eventHub:_.s$,language:d,sid:o,parsedPayload:t,digest:y,channel:w,transactionID:m,status:g,platform:v,fakedServers:B,autoCpltGroups:D,noWxShare:F,theme:r,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:h,summary:l,bonusLimitTime:"",nodeList:N,companyID:"",oneReplyPerTerminal:M,surveyId:c,qNumberRequired:z,asterisksRequired:G,progressBarRequired:H,nodeTypeInfoRequired:X,preview:(0,T.vW)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:K||void 0,minTime:$,timeoutText:Z||"",timeLessText:J||"",timer:-1,restTime:(0,a.IA)(K),hasVar:i,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:u,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1};return V(Q),Q}(t);return(0,T.vW)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.qG)({target:t},e),r=await(0,h.lq)(n,!0);r.valid?e.initValidationPassed=!0:((0,T.vW)().error(r.message||(0,k.Iu)(C.bn.verify.failed)),(0,T.vW)().customAbort())}(n),await async function(e){if(await $(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.r)(e),clearInterval(e.timer),(0,b.VY)(e),(0,T.vW)().error(e.timeoutText||(0,k.Iu)(C.bn.global.timeOver))),(0,T.Pg)(e,{restTime:(0,a.IA)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,T.vW)().preview){const t=await(0,x.m)(e);(0,T.Pg)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,T.dU)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5810:(e,t,n)=>{"use strict";n.d(t,{k:()=>f});var r=n(5159),i=n(3892),o=n(9026),a=n(5142),s=n(4248),u=n(7550),c=n(3656);const l={};function d(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.vW)().notify((0,u.Iu)(r.bn.verify.tooFrequent)),null):()=>{l[e]=Date.now()}}const f={handleInputPhone(e,t){return this.handleQuestionInput({phoneNumber:e},t)},handleInputCode(e,t){return this.handleQuestionInput({code:e},t)},handleAutoLocate(e,t){return this.handleQuestionInput(e,t)},handleManualLocate(e,t){return this.handleQuestionInput(e,t)},handleGetCodeClick:e=>async function(e){return(0,c.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:c,validateType:l}=e,{transactionID:f}=t;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.vW)().preview)return(0,s.vW)().notify((0,u.Iu)(r.bn.preview.noMessage)),!1;if(!c||!(0,i.xT)(c))return(0,s.vW)().notify((0,u.Iu)(r.bn.fill.needPhoneNumber)),!1;const n=d(e.renderId);if(!n)return!1;p={...p,phone_num:c},e.messageGetFailed=!1;try{const r=await(0,a.bp)(p);e.serverValidations=r,t.phoneNumber=c,t.phoneUsed=r.phone_num_used,t.phoneUsed&&(0,o.wH)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.bp)(p);e.serverValidations=t,(0,s.Pg)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.vW)().preview)return(0,s.vW)().notify((0,u.Iu)(r.bn.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,i.xT)(t))return(0,s.vW)().notify((0,u.Iu)(r.bn.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.O0)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},3389:(e,t,n)=>{"use strict";n.d(t,{Core:()=>G,EventHub:()=>c.s$,I18n:()=>H});var r=n(4248),i=(n(1817),n(3948),n(6935)),o=n(866),a=n(6207),s=n(9564),u=n(6451),c=n(3251),l=n(7550),d=n(9026),f=n(248),p=n(5159),h=n(698),m=n(2167),g=n(5142),v=n(6539),y=n(3608),w=n(7433),_=n(7428),b=n(5905),x=n(4125),T=n(6213),k=n(6970),S=n(9141);let I;function O(e){return(0,v.ZI)().offline_survey_id&&(0,s.Jz)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.f)(e.icon)}))})),e}function E(e){e.handleEvents={async handleLangChange(t){await(0,l.nE)(t.locale,!1)||(0,r.Pg)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,w.Tb)(e,!0),await(0,r.vW)().fetchSurveyState(),(0,r.dU)().app.gotoSurveyPage((0,v.ZI)()),(0,w.Tb)(e,!1))}}}async function C(){if((0,r.vW)().startState)return(0,r.vW)().startState;const e=await async function(){const e=await(0,r.dU)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,r.vW)().sid;return(0,d.Fv)(),I||(0,g.X)(e)}}();!function(e){if((0,r.vW)().preview)return void(I=e);if(I)return;I=e;const{collector:{channel_configs:t}}=e,n=(0,r.dU)().name,i=t.find((e=>e.type===n));if(i){if(!i.allow_response)throw(0,r.vW)().error((0,g.W1)(g.mi.interviewee_invalid_error)),new Error(g.mi.interviewee_invalid_error);I.channel=i,(0,r.dU)().auth.authorize(I)}else I.channel={type:n}}(e),await(0,r.dU)().auth.init(e);const t=await async function(e){const t=await(0,r.dU)().dev.getCustomSurveyPayload();if(t)return{cfpd:t,surveyMeta:e};{let t;try{t=await(e.start_auto?(0,g.vT)(e.diagram_url,{type:"GET"},!0):(0,g.vT)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,r.vW)().error((0,l.Iu)(p.bn.global.downloadError)),e}const n=await(0,m.Z)(t);return function(e){if(!e.version)return(0,r.vW)().error((0,l.Iu)(p.bn.global.upgrade)),void(0,r.vW)().customAbort();e.version<2&&e.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,b.RE)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(n),{surveyMeta:e,cfpd:O(n)}}}(e),n=await async function(e){var t;const{surveyMeta:n,cfpd:i}=e,{mediaLibrary:o,surveyId:u,disabledLangs:c,testCases:d,variables:p}=i,h=(0,a.AK)(i.nodes,i.nodeGroups),m=(0,s.Jz)(h);let g=[];i.langPack?(i.langPack=function(e){if(e instanceof Array)return e;{const t=[];return Object.keys(e).forEach((n=>{const r=e[n];t.push({id:"",locale:n,content:r})})),t}}(i.langPack),g=i.langPack.map((e=>({locale:e.locale,content:e.content})))):n.langs&&(g=n.langs),g=g.filter((e=>e.locale!==m.currentLang));const v=m.currentLang,y=[v,...g.map((e=>e.locale))],w=(null!==(t=null===S.Z||void 0===S.Z?void 0:S.Z.langTable)&&void 0!==t?t:[]).filter((e=>y.includes(e.locale)&&!(null==c?void 0:c.includes(e.locale)))),_=await(0,l.Vj)(w,v),b=!!(0,r.dU)().storage.get("lang-resume");b&&(0,r.dU)().storage.remove("lang-resume"),(0,l.$1)(_);const x={imageList:o.imageList,videoList:o.videoList,nodeList:h,theme:i.theme,nodeGroups:i.nodeGroups||[],variables:(0,a.Fy)(i.variables),surveyMeta:I,embedApis:i.embedApis||[],varStyles:i.varStyles,surveyId:u,langs:g,language:_,langTable:w,langResume:b,testCases:d,disabledLangs:c||[],publishedAt:n.published_at,presetRichStyles:i.presetRichStyles};return _===v||(m.i18n&&(0,f.eb)(m,m.i18n[_]),p.forEach((e=>{e.i18n&&(0,f.ub)(e,e.i18n[_])}))),x}(t),v=await async function(e){if((0,r.vW)().startState)return(0,r.vW)().startState;const{imageList:t,nodeList:n,theme:i,variables:o,varStyles:a,surveyId:d,langResume:f,nodeGroups:h}=e,m=(0,s.Jz)(n),{imgScale:g,imgTransType:v,imgTransTime:w,imgPosition:_,welcomeUrl:b,startAuto:k,noWxShare:S,startBtnText:O,hasVar:C,layout:P,showInitLangSelect:L}=m;(0,T.W)(e.presetRichStyles);const N={imageList:t,variables:o,varStyles:a};(0,y.B3)(N);const R=await(0,u.nn)({},{origin:m}),{interviewee:A}=I,U=A?A.raw_data:(0,r.dU)().auth.userInfo||{},M={...N,embedApis:e.embedApis,nodeGroups:h,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:f,langTable:e.langTable,eventHub:c.s$,language:e.language||"en_us",layout:P,startNode:m,sid:(0,r.vW)().sid,noWxShare:S,preview:(0,r.vW)().preview,images:R,surveyId:d,...(0,x.s)(m),nextButton:O||(0,l.Iu)(p.bn.global.start),theme:i.usingTheme,imgScale:g,imgPosition:_,imgTransType:v,imgTransTime:w,welcomeUrl:b,userInfo:U,hasVar:C,parsedPayload:e,startAuto:k||f,showInitLangSelect:(0,l.HP)(L,e.langTable)};return E(M),M}(n);return await async function(e){const t={state:e},{origin:n}=e,{startName:r,qsnrName:a,questionText:s,describe:u,template:l}=n;e.title=await(0,i.Ur)((0,o.l)(r||a),t),e.summary=await(0,i.Ur)(s,t),e.description=await(0,i.Ur)(u,t),e.template=await(0,k.b)(l,t.state),(0,h.z)(e.theme),(0,c.cs)({origin:n})}(v),await(0,r.dU)().hook.afterFetchStart(v),(v.startAuto||(0,r.dU)().dev.autoRun)&&(v.hidden=!0,(0,r.vW)().startState=v,await v.handleEvents.handleNextClick()),v}var P=n(9309),L=n(8670),N=(n(5306),n(6064));async function R(){return null}const A={name:"other",dev:{parseRealUrl:e=>e,getCustomSurveyPayload:R,getCustomSurveyMeta:R,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,v.FC)(e);return(0,v.Mw)("https:/live.choiceform.com/reward",t)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:R,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:R,afterFetchStart:R,afterFetchSurvey:R,afterSetup:R,beforeSetupEnd:R,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:R,onEndSurvey:R,onRestartSurvey:R,onResumeSurvey:R,onStartNewSurvey:R,beforeGotoNext:R},system:{device:{browser:{name:"",version:""},device:{type:"",vendor:"",model:""},engine:{name:"",version:""},os:{name:"",version:""}},getReferer:()=>"",getLang:()=>"en_us",functionConstructor:Function,translate(e,t){if(t){let n=t?(0,l.P_)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,N.KF)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:R,loadUiEntryTemplates:R,setPresetStyle(){}}};function U(e,t){Object.keys(t).forEach((n=>{const r=t[n];"object"==typeof r?e[n]?null!==r&&U(e[n],r):e[n]=r:void 0!==r&&(e[n]=r)}))}function M(e){return U(A,e),A}var B=n(7518);const D={key:"",dynamic:!1,treeUrl:"",templatePath:"",useWxSdk:!1,hostConfig:{LOGO_NAME:"cform",qStaticHost:"https://media.choiceform.com/q-static-assets",recordUrl:"https://tracking.choiceform.com/api/records",host:"https://osapi.choiceform.com",wsHost:"wss://osapi.choiceform.com",cdnHost:"https://media.choiceform.com/os-client-live",mediaHost:"https://media.choiceform.com",publicHost:"https://public.choiceform.com"},setTheme(){},locateError(){},langSrcMap:null,setLocale(){},customAbort(){},switchRoute(){},uploadLog(e){console.info(e)}};var F=n(6866),j=n(277),W=n(3768),q=n(7552),z=n(9911);function V(){if(!G.initialized)throw new Error("CCCore not yet initialized")}const G={releaseVersion:"3.6.56",releaseDate:"2024-1-16",cfpd:S.Z,eventHub:c.s$,notifySuspended:!1,theme:(0,h.V)(),util:{convertVarStyle:y.L7,getTaskInfo:j.M,getAnswer:W.py,addStartStateDynamics(e){E(e)},addSurveyStateDynamics(e){(0,P.Wc)(e)},addNodeDynamics(e){(0,s.qK)(e)},addOptionDynamics(e){(0,q.kN)(e)},extendImageListGetter(e){(0,y.MD)(e)},loadFakeServers:e=>(0,z.U)(e,!1)},registerEnv(e){const t=M(e);(0,r.JN)(t),G.env=t},async setup(e){if(G.initialized)return G;if(e.dynamic){if(!e.templatePath||!e.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!e.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(G,function(e){const t={...D.hostConfig,...e.hostConfig};return Object.assign(D,{...e,hostConfig:t}),D}(e));const t=(0,v.ZI)(),n=t.sid;if(!n&&!(0,r.dU)().dev.realtime)throw new Error("setup error, must provide sid");G.sid=n,G.realTimePreview=(0,r.dU)().dev.realtime;const i=t.type;G.preview=G.realTimePreview||G.sid.length>30||"edit_template"===i||"preview_template"===i,G.preview?G.needPreviewFlag="1"!==t.ban_preview_bar:G.offlineTaskId=t.offline_task_id;const o=G.setTheme;G.setTheme=e=>{o(e),G.themeUpdated=!0,c.s$.trigger("SET_PROPS")},(0,p.tV)(G.langSrcMap);const a=G.customAbort;G.customAbort=()=>{throw a&&a(),G.notifySuspended=!0,setTimeout((()=>{G.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=G.error;G.error=e=>{G.startState||G.rewardState||G.setTheme((0,h.V)()),s(e),G.crashed=!0};const u=G.notify;G.notify=e=>{G.notifySuspended||(G.startState||G.rewardState||G.setTheme((0,h.V)()),u(e))},(0,r.dU)().dev.debug&&(G.hostConfig.host="https://osapi.choiceform.com",G.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",G.hostConfig.mediaHost="https://media.choiceform.com"),t.offline_survey_id&&(G.hostConfig.cdnHost=(0,_.f)(G.hostConfig.cdnHost),G.hostConfig.mediaHost=(0,_.f)(G.hostConfig.mediaHost)),G.hostConfig.qApiHost=G.hostConfig.host+"/q/v1",await(0,r.dU)().hook.beforeSetupEnd(G),(0,r.IO)(G),G.initialized=!0,await(0,r.dU)().hook.afterSetup(G),await(0,r.dU)().hook.beforeSetupEnd(G);const d=await(0,l.Vj)(S.Z.langTable,"zh_cn");return(0,p.i_)(d),G},async fetchStartState(){V();const e=await C();return e&&(e.core=G,G.startState=e,(0,r.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchSurveyState(){V(),G.startState&&(0,w.Tb)(G.startState,!0);const e=await(0,P.BN)();return e&&(e.core=G,G.surveyState=e,(0,w.Tb)(G.startState,!1),(0,r.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchRewardState(){V();const e=await(0,L.G8)();return e&&(e.core=G,G.rewardState=e,(0,r.dU)().hook.onTitleChange(e.quesTitle),c.s$.trigger("SET_PROPS")),e},reset(){G.offlineTaskId="",G.initialized=!1,I=null,G.startState=null,G.surveyState=null,(0,L.md)(),G.rewardState=null,(0,v.zZ)(),(0,B.Y)(),(0,F.g1)()}},H={mergeLangSrcMap:p.tV,getLangSrcMap:p.zH}},2435:(e,t,n)=>{"use strict";n.d(t,{QP:()=>l,Rj:()=>c,UW:()=>f,bj:()=>s,hm:()=>u,jw:()=>p,t:()=>d,uZ:()=>a}),n(5306),n(3948);var r=n(6064),i=n(5838),o=n(6935);function a(e,t){return(0,r.O2)(t)||e.length<=t?[...e]:s(e.map((e=>({...e.option,cascade:e}))),t).map((e=>e.cascade))}function s(e,t){return(0,r.O2)(t)||e.length<=t?[...e]:d(e.map((e=>{const t=e.origin.inferList.reduce(((e,t)=>(t.active&&"select"===t.type&&(e+=t.weight),e)),0);return{option:e,weight:t}})),t).map((e=>e.option))}function u(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function c(e,t){return e.filter((e=>e.origin.inferList.some((e=>e.active&&e.type===t))))}async function l(e,t){if(!e)return;const n=t.parent;e.origin.inferList=e.origin.inferList||[];for(const t of e.origin.inferList){const{activeConfig:r}=t;r?(n.context.option=e,t.active=await(0,i.Q3)(n,r),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,r.O2)(t)||e.length<=t)return e;const n=e.reduce(((e,t)=>e+t.weight),0);let i=0,o=0,a=e.map((e=>{const t=e.weight/n;o=i+t;const r={item:e,floor:i,ceil:o};return i=o,r}));const s=[];for(;s.length<t;){const e=Math.random()*o,t=a.find((t=>t.floor<=e&&t.ceil>e));t&&(s.push(t.item),a=a.filter((e=>e!==t)))}return s}async function f(e,t){const{parent:n}=t,r=[];for(const t of e)r.push(await(0,o.e_)(t.candidates,{state:n,joinBy:","}));return r.join(",")}function p(e){const t={},n=[];return e.split(",").forEach((e=>{let r=e,i=1;const o=e.match(/\(([\d\.]+)\)$/);o&&(r=e.replace(/\([\d\.]+\)$/,""),i=parseFloat(o[1]));const a=t[r];if(a)a.weight+=i;else{const e={text:r,weight:i};n.push(e),t[r]=e}})),n.filter((e=>0!==e.weight))}},9896:(e,t,n)=>{"use strict";n.d(t,{B3:()=>g,Bc:()=>d,I$:()=>v,Sl:()=>_,W7:()=>f,a2:()=>m,yE:()=>p}),n(5306),n(3210);var r=n(1128),i=n(3656),o=n(3892),a=n(2435),s=n(5142);let u=null;async function c(e,t){let{start:n,end:r}=await(0,o._2)(e,t);return n===-1/0&&(n=-9999,n>r&&(n=r-9999)),r===1/0&&(r=9999,r<n&&(r=n+9999)),{start:n,end:r}}function l(e,t,n){return!!t&&t.some((t=>{if(t.startsWith("/")&&t.endsWith("/")){const n=t.substring(1,t.length-1),r=new RegExp(n);return!!e.match(r)}return n?n(e,t):e===t}))}async function d(e,t,n){let r=0,i=await e();for(;l(i,t,n);)if(i=await e(),r++,r>10)throw new Error("Hard to infer, rejected 10 times");return i}async function f(e,t,n=1){if(!e.origin.inferList)return{value:"",antis:null};const r=e.origin.inferList.filter((e=>e.active&&"input"===e.type));if(0===r.length)return{value:"",antis:null};const i=await(0,a.UW)(r,t);if(""===i.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(i.split(",").forEach((e=>{e.startsWith("!")?o.push(e.substring(1)):e.match(/\(0\)$/)&&o.push(e.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.jw)(i);return{value:(0,a.t)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+g(1e9,9999999999)}function h(e){return u[e]||Math.random().toString().replace("0.","")}async function m(){return u||(u=await(0,s.vT)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),u)}function g(e=0,t=10,n=0){const r=Math.pow(10,n);return e*=r,t*=r,((0,i.xT)(e,t)/r).toString()}function v(e,t=1,n=10){let r=h(e);for(;r.length<n;)r+=h(e);const o=r.length,a=(0,i.xT)(n,o),s=a-(0,i.xT)(t,n),u=r.substring(s,a);return""===u.trim()?v(e,t,n):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let r=(0,i.xT)(e,t).toString();return n>1&&(r=r+" "+(0,i.xT)(1,12)),n>2&&(r=r+" "+(0,i.xT)(1,28)),r}const w={};async function _(e,t){const n=w[e.origin.fillType]||w.none,r=await n(e,t);return"__FORCE_EMPTY__"===r?"":r}w.auto_complete=async(e,t)=>{let{completeGroups:n}=e;const{itemsMax:o,itemsMin:a}=await(0,r.y4)(e,t),s=(0,i.xT)(a,o)||1,{value:u,antis:c}=await f(e,t,s);return u||(c&&(n=n.filter((e=>!l(e.name,c)))),(0,i.DQ)(n,s).map((e=>e.name)).join(","))},w.chars=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{tolerance:i}=e.origin,{start:o,end:a}=await c(e,t);return d((()=>!i||0===i.length||i.includes("chinese")?v("chinese",o,a):i.includes("alphabet")?v("alphabet",o,a):v("number",o,a)),r)},w.date=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{grade:i}=e,{start:o,end:a}=await c(e,t);return d((()=>y(o,a,i)),r)},w.date_range=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const i=y(1960,2050,3),o=Number(i.split(" ")[0]);return d((()=>{const e=y(o,2060);return i+" - "+e}),r)},w.email=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>((0,i.BY)(1,6)+"@"+(0,i.BY)(1,6)+"."+(0,i.BY)(1,4)).toLowerCase()),r)},w.float=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{scale:i}=e;return d((async()=>{const{start:n,end:r}=await c(e,t);return g(n,r,i)}),r)},w.integer=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{start:i,end:o}=await c(e,t);return d((()=>g(i,o)),r)},w.list_select=async(e,t)=>{let{selectList:n}=e;const{itemsMax:o,itemsMin:a}=await(0,r.y4)(e,t),s=(0,i.xT)(a||1,o||1)||1,{value:u,antis:c}=await f(e,t,s);return u||(c&&(n=n.filter((e=>!l(e,c)))),(0,i.DQ)(n,s).join(","))},w.none=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>v("chinese",1,10)),r)},w.phone_number=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>p()),r)},w.postcode=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>g(1e5,999999)),r)},w.time=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>g(1,25)+":"+g(1,60)),r)},w.time_range=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>{const e=g(1,20);return e+":"+g(1,60)+" - "+g(Number(e)+1,24)+":"+g(1,60)}),r)},w.time_duration=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{grade:i}=e;return await d((()=>{if(i<=3){let e=g(1,20)+"d";return i>1&&(e+=" "+g(1,24)+"h"),i>2&&(e+=" "+g(1,60)+"m"),e}{let e=g(1,60)+"h";return i>4&&(e+=g(1,60)+"m"),i>5&&(e+=g(1,60)),e}}),r)},w.url=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>("https://"+(0,i.BY)(1,3)+"."+(0,i.BY)(1,6)+"."+(0,i.BY)(1,3)).toLowerCase()),r)}},4625:(e,t,n)=>{"use strict";n.d(t,{W:()=>j,M:()=>F}),n(2707),n(3948);var r=n(9564),i=n(3656),o=n(1128),a=n(9896),s=n(6935),u=n(4248),c=n(9309),l=n(2435),d=n(6064),f=n(8064),p=n(5905);async function h(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.QP)(e,t),(0,u.Pg)(e,n)}async function m(e,t){(0,u.Pg)(e,{selected:!1}),e.option.origin&&await(0,l.QP)(e.option,t),e.list&&e.list.forEach((e=>m(e,t)))}async function g(e){(0,p.iN)(e)&&(0,u.Pg)(e.video,{ended:!0});let t=[];(0,p.Kf)(e)&&(t=[...t,...e.options]),(0,p.sy)(e)&&(t=[...t,...e.otherOptions]);for(const n of t)await h(n,e);const{cascade:n}=e;n&&await m(n,e)}var v=n(45);const y={doc:"os/client/o_1dn9kbm3u1f4d1tsudcg1fuh17678.txt",image:"os/client/o_1dn9kbq468tj1kq2dt3qeo1pumd.png",video:"os/client/o_1dn9kpohua8v1jv51oobq981dvv8.mp4",audio:"os/client/o_1dn9l7gbs1maj1e3nn941e6p125gj.mp3"},w={};function _(e){const{regions:t}=e,n=e.infoRange||"county",r=function(e){const t=O((0,o.eu)(e),1)[0];return!t||t.isOtherOpt?null:t.origin.inferList.some((e=>e.active))?t:null}(e);if(r){const e=r.text.split("-");return{address:e,indexes:(0,f.xR)(e,t),point:{lat:r.origin.latitude,lng:r.origin.longitude}}}{const e=(0,i.XJ)(t.length);let r=(0,d.KF)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,i.XJ)(o.cities.length),t=o.cities[e];if(a[1]=t.name,r=r+" "+e,"city"!==n){const e=(0,i.XJ)(t.areas.length),n=t.areas[e];n&&(a[2]=n.name,r=r+" "+e)}}return{address:a,indexes:r,point:{lng:0,lat:0}}}}async function b(e,t){const{value:n}=await(0,a.W7)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:r}=e,o=(0,i.DQ)(r,1)[0];return y[o]}async function x(e,t){const n=[],r=[];e.forEach((e=>{if((0,o.c1)(e.origin))n.push(e);else{let t=!0;(0,v.Cp)(e.origin)&&(0,d.O2)(e.origin.inferList)&&(t=Math.random()>.9),t&&r.push(e)}})),await E(r,t,1);const a=(0,i.xT)(1,n.length);S(n,t,a)}async function T(e,t){const{parent:n,origin:r}=t;let o=await(0,s.Ob)(r.fillMin,{state:n});o=o||0;let a=e.length;o&&r.inputInferLimit>o&&r.inputInferLimit<a&&(a=r.inputInferLimit);const u=o?(0,i.xT)(o,a):a;return(0,i.DQ)(e,u)}async function k(e,t){e.parent.context.option=t;const n=await(0,a.Sl)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function S(e,t,n){(0,i.DQ)(e,n).forEach((e=>k(t,e)))}async function I(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return k(e,t)}function O(e,t){const n=(0,l.Rj)(e,"select"),r=[],o=[];if(n.forEach((e=>{e.origin.inferList.every((e=>0===Number(e.weight)))||e.disabled?r.push(e):o.push(e)})),o.length>0)return(0,l.bj)(o,t);{let n=e.filter((e=>!e.disabled));return r.length>0&&(n=e.filter((e=>!r.includes(e)))),(0,i.DQ)(n,t)}}async function E(e,t,n){const r=O(e,n).sort(((e,t)=>(0,v.Cp)(e.origin)?1:(0,v.pL)(e.origin,t.origin)));for(const e of r)await I(t,e)}async function C(e,t){const{multiple:n,min:r,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.hm)(e);return n.length>0?(0,l.uZ)(n,t):(0,i.DQ)(e,t)}(a,n?(0,i.xT)(r||1,o||1):1);for(const n of s){const r=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(r,e,t),await C(n,t)}}async function P(e){const t=(0,o.eu)(e),n=e.origin;let a=1;if((0,r.qX)(n)){const t=await(0,r.gx)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:u}=n;u>o&&u<s&&(s=u),a=(0,i.xT)(o||1,s)}const s=[],u=[];t.forEach((e=>{(0,o.c1)(e.origin)?u.push(e):s.push(e)})),await E(s,e,a);const c=(0,i.xT)(1,u.length);S(u,e,c)}function L(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function N(e,t,n){const r=[];for(let i=e;i<t;i+=n)r.push(i);return r.push(t),r}async function R(e,t,n){const r=[...n].sort(),{value:o,antis:s}=await(0,a.W7)(e,t,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const e=r[0],t=r[r.length-1];return o<e?e:o>t?t:o}}{const e=()=>(0,i.DQ)(n,1)[0];return(0,a.Bc)(e,s)}}function A(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function U(e,t,n){const[r,o]=e.split("_");let a,s;if(r.includes("~")){const[e,t]=A(r);a=(0,i.xT)(e,t)}else a=Math.min(Math.max(Number(r),0),t);if(o.includes("~")){const[e,t]=A(o);s=(0,i.xT)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function M(e,t){const[n,r]=e.split("_").map((e=>Number(e))),[i,o]=t.split("_");let a=!1,s=!1;if(i.includes("~")){const[e,t]=A(i);a=e<=n&&n<=t}else a=Number(i)===n;if(o.includes("~")){const[e,t]=A(o);s=e<=r&&r<=t}else s=Number(o)===r;return a&&s}async function B(e,t){const{value:n,antis:r}=await(0,a.W7)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:U(n,s,o);{const e=()=>(0,i.XJ)(s)+"_"+(0,i.XJ)(o);return U(await(0,a.Bc)(e,r,M),s,o)}}function D(e,t){let n=t.filter((t=>!(-1!==t.sortNo||!t.origin.inferList)&&t.origin.inferList.some((t=>{if(!t.active)return!1;const n=(0,l.jw)(t.candidates),r=(0,l.t)(n,1);return r.length>0&&Number(r[0].text)<=e}))));0===n.length&&(n=t.filter((e=>-1===e.sortNo)));const r=(0,i.DQ)(n,1)[0];r&&(0,u.Pg)(r,{sortNo:e,selected:!0})}async function F(e){return await(0,a.a2)(),j(e)}async function j(e,t){const{type:n,readonly:r}=e;if(r)return(0,c.fS)();await g(e),t&&t.beforeInfer&&await t.beforeInfer(e);const i=w[n]||P;await i(e),t&&t.afterInfer&&await t.afterInfer(e)}w.select=P,w.value_mark=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r){const n=t.minValue||1,r=t.maxValue||5,i=t.step,o=await R(t,e,N(n,r,i).map((e=>(0,d.KF)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await x(n,e)},w.heat_map=async e=>{const{options:t,otherOptions:n}=e;for(const n of t){const t=await B(n,e);t&&await e.parent.handleEvents.handleQuestionInput(t,e)}await x(n,e)},w.icon_mark=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r){const n="rating-nps"===t.iconName,r=n?0:1,i=(n?t.iconCount-1:t.iconCount)||5,o=await R(t,e,L(r,i).map((e=>(0,d.KF)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await x(n,e)},w.slide_rate=async e=>{const{options:t,rateOptions:n,otherOptions:r}=e,i=await T(t,e),o=n.map((e=>e.value));for(const t of i){const n=await R(t,e,o);await e.parent.handleEvents.handleOptionInput(n,t,e)}await x(r,e)},w.weight=async e=>{let{weightTotal:t}=e;const{options:n,otherOptions:r}=e;t<=0&&(t=100);const o=[],a=[];n.forEach((e=>{const{inferList:t}=e.origin;t&&t.some((e=>e.active))?o.push(e):a.push(e)}));const s=[];for(const n of o){const r=n.origin.inferList.filter((e=>e.active)),i=await(0,l.UW)(r,e),o=(0,l.jw)(i),a=(0,l.t)(o,1),u=Number(a[0].text);s.push(u),t-=u}const u=(0,i.FL)(t,a.length),c=s.concat(u),d=o.concat(a);for(const[t,n]of d.entries()){const r=c[t];await e.parent.handleEvents.handleOptionInput(r.toString(),n,e)}await x(r,e)},w.fill=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r)await k(e,t);await x(n,e)},w.sequence=async e=>{const{options:t,otherOptions:n}=e,r=t.length;let i=1;for(;i<=r;)D(i,t),i+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await x(n,e),(0,c.fS)()},w.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await C(t,e),x(n,e)},w.describe=async()=>{(0,c.fS)()},w.max_diff=async e=>{const t=function(e){const t=[],{options:n,itemCountPerTask:r,taskCount:i}=e,o=Math.ceil(i*r/n.length);return e.options.forEach((e=>{if(!e.origin.inferList)return;let n=e.origin.inferList.reduce(((e,t)=>(t.active&&(e+=t.candidates.split(",").map((e=>Number(e)||0)).reduce(((e,t)=>e+t),0)),e)),0);n>o?n=o:n<-o&&(n=-o),n&&t.push({needValue:n,option:e})})),t}(e),{tasks:n,parent:{handleEvents:r}}=e;for(const o of n){let n=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue>0;return n&&(t.needValue-=1),n})))),a=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue<0;return n&&(t.needValue+=1),n}))));if(!n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))));n=(0,i.DQ)(e,1)[0]}if(!a||a===n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))&&e!==n));a=(0,i.DQ)(e,1)[0]}await r.handleMaxDiffInput(1,n,o,e),await r.handleMaxDiffInput(-1,a,o,e)}},w.upload=async e=>{const{options:t,otherOptions:n}=e,{min:o,max:a}=await(0,r.Fy)(e,e.parent),s=(0,i.xT)(o||1,a),u=(0,i.DQ)(t,s);for(const t of u)await e.parent.handleEvents.handleOptionInput({filePath:await b(t,e)},t,e);await x(n,e)},w.region=e=>{const{indexes:t}=_(e);return e.parent.handleEvents.handleQuestionInput(t,e)},w.location=e=>{const{address:t,point:n}=_(e),r={address:{province:t[0],city:t[1],district:t[2],country:""},point:{lat:n.lat||Number((0,a.B3)(0,90)),lng:n.lng||Number((0,a.B3)(0,180))}};return e.parent.handleEvents.handleQuestionInput(r,e)},w.area=w.location,w.matrix=async e=>{const{options:t,flatten:n,otherOptions:o,origin:a}=e,{min:s,max:u}=await(0,r.gx)(e,e.parent);if((0,r.Ir)(a))await E(t,e,1);else if((0,r.Rx)(a)){let t=n;const r=n[0].list.length;n.length>r&&(t=(0,i.DQ)(n,r));const o=[];for(const n of t){const t=n.list.filter(((e,t)=>!o.includes(t)));if(0===t.length)break;await E(t,e,1);const r=n.list.findIndex((e=>e.selected));o.push(r)}}else if((0,r.Lk)(a)||(0,r.zR)(a))for(const t of n)await E(t.list,e,1);else if((0,r.mI)(a)||(0,r.lE)(a))for(const t of n){const n=(0,i.xT)(s||1,u);await E(t.list,e,n)}else if((0,r.Zu)(a)){const n=(0,i.xT)(s||1,u);await E(t,e,n)}await x(o,e)},w.end=async()=>{},w.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.yE)(),code:(0,a.I$)("number")},e)},9911:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,x:()=>u}),n(5306),n(3948);var r=n(4248);const i=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,r.dU)().network.getFakeHost();if(!function(e){return o.some((t=>!!e.match(t)))}(e))throw new Error("can not load plugin files from untrusted site: "+e);n.currentSpace=e,await(0,r.dU)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",i.push(e)};a[e]=n()}return a[e]}async function u(e){const t=(0,r.dU)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function c(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,r.vW)().preview)return[];const t="FAKE:",{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=e;return n?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,r)=>{const i=n[r];if(i&&0===i.indexOf(t)){const n=i.substring(t.length,i.lastIndexOf("/"));-1===e.indexOf(n)&&e.push(n)}return e}),[]):[]}(e));if(n=n.filter((e=>!i.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},5497:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});const r={actions:[]};function i(e){r.actions.push(e)}},9026:(e,t,n)=>{"use strict";n.d(t,{Bt:()=>j,DM:()=>X,EG:()=>T,FA:()=>F,Fv:()=>H,Kv:()=>D,L$:()=>b,OP:()=>S,Om:()=>U,TY:()=>I,Ts:()=>K,UW:()=>L,WJ:()=>C,YU:()=>N,cH:()=>x,do:()=>z,eS:()=>M,eq:()=>q,g9:()=>E,hR:()=>R,hy:()=>O,lt:()=>A,nF:()=>k,oA:()=>V,qu:()=>W,r:()=>B,wH:()=>_,xi:()=>P}),n(1817);var r=n(3087),i=n(9310),o=n(3656),a=n(6935),s=n(3803),u=n(5142),c=n(1128),l=n(4248),d=n(6539),f=n(5905);let p=[],h=-1;function m(){const{dev:{local:e}}=(0,l.dU)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:r}}=(0,l.vW)();return!(e||t||n||!r)}function g(e,t=!1){if((0,s.q)()&&(!t||"start"===e.type))return;e.description=(0,a.mP)(e.description);const n=e.description;if(m()){const r=p[p.length-1];r&&(n.indexOf(r.description)>-1||r.description.indexOf(n)>-1)&&p.pop(),p.push(e),t&&v()}}function v(){if(m()){if(clearTimeout(h),p.length>0){const e=p;p=[];const t=(0,l.vW)().hostConfig.recordUrl;(0,u.o1)(t,{type:"POST",data:{records:e}})}h=setTimeout(v,1e4)}}function y(e,t,n,r,i){var o,a,s;const{surveyId:u,transactionID:c,userInfo:f}=n;let p,h,m,g,v,y,w;if(("gift"===r||"start"===r&&f)&&(p=f.nickname,h=f.openid,p&&(g=(0,l.dU)().name)),"start"===r&&(m=JSON.stringify((0,d.ZI)())),t&&e){const t=e;t.yid?(y=t?t.yid:void 0,w=t?t.xid:void 0):v=e?e.uuid.toLowerCase():void 0}return{survey_id:u,collector_id:null===(s=null===(a=null===(o=n.parsedPayload)||void 0===o?void 0:o.surveyMeta)||void 0===a?void 0:a.collector)||void 0===s?void 0:s.id,response_id:c,node_id:t?t.nodeUuid.toLowerCase():void 0,option_id:v,row_option_id:y,col_option_id:w,description:i,type:r,recorded_at:new Date,provider:g,user_name:p,user_id:h,query_params:m}}function w(e){const t=(0,f.LK)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.mP)(n)}function _(e,t){(0,l.dU)().dev.infer||g(y(null,t,e,"used_phone","在题目:".concat(w(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function b(e,t){(0,l.dU)().dev.infer||g(y(null,t,e,"verify_fail","在题目:".concat(w(t),"高级验证失败")))}function x(e,t){if((0,l.dU)().dev.infer)return;const{type:n,parent:r}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",u="";if("menu"===n||"cascade"===n)u=(0,c.eu)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=u?"select":"deselect",s=u?"选中":"清除所有选中";else{const r=e.selected;if(o=r?"select":"deselect",s=r?"选中":"取消选中","select_icon"===n||"select_image"===n)u="[".concat((0,i.ZK)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)u="[".concat(e.text,"]");else{const t=e;u="[".concat((0,a.mP)(t.optionX.text)," ").concat((0,a.mP)(t.optionX.text),"]")}else u="[".concat((0,a.mP)(e.text),"]")}const d="在题目:".concat(w(t),"中").concat(s,"选项:").concat(u);g(y(e,t,r,o,d))}function T(e,t,n){if((0,l.dU)().dev.infer)return;const r="在题目:".concat(w(n),"的选项:[").concat((0,a.mP)(t.text),"]中输入自动填充触发文字:").concat(e);g(y(t,n,n.parent,"auto_complete",r))}function k(e,t,n){if((0,l.dU)().dev.infer)return;const r=n.parent;let i,o;"value_mark"===n.type||"icon_mark"===n.type||"slide_rate"===n.type||"weight"===n.type?(i="打分:"+t.value,o="rate"):"upload"===n.type?(i=e?"上传图片":"清除图片",o="upload"):(i="输入:"+t.value,o="input"),g(y(t,n,r,o,"在题目:".concat(w(n),"的选项:[").concat((0,a.mP)(t.text),"]中").concat(i)))}function S(e,t){if((0,l.dU)().dev.infer)return;const n=t.parent,r=t.options[e];r&&(-1===r.sortNo?g(y(r,t,n,"cancel_sort","在题目:".concat(w(t),"中取消了对选项:[").concat((0,a.mP)(r.text),"]的排序"))):g(y(r,t,n,"sort","在题目:".concat(w(t),"中将选项:[").concat((0,a.mP)(r.text),"]排序到第").concat(r.sortNo,"位"))))}function I(e){if((0,l.dU)().dev.infer)return;const t="在题目:".concat(w(e),"中 定位失败");g(y(null,e,e.parent,"locate_failed",t))}function O(e,t){if((0,l.dU)().dev.infer)return;const n=t.parent,r=t.type,i=t.value;let o="input",a="输入";if("region"===r)a="输入:"+i;else if("location"===r||"area"===r)o="locate",a="定位到:"+i;else if("verify"===r){const t=typeof e;if("string"===t)a="输入:"+e;else if("object"===t){const{code:t,phoneNumber:n}=e;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(t))}}g(y(null,t,n,o,"在题目:".concat(w(t),"中").concat(a)))}function E(e){(0,l.dU)().dev.infer||g(y(null,e,e.parent,"prev","在题目:".concat(w(e),"中点击上一题")))}function C(e,t){(0,l.dU)().dev.infer||g(y(null,t,e.parent,"prev","返回到题目: ".concat(w(t),",由题目:").concat(w(e),"后退而来")))}function P(e){(0,l.dU)().dev.infer||g(y(null,e,e.parent,"next","在题目:".concat(w(e),"中点击下一题")))}function L(e,t){(0,l.dU)().dev.infer||g(y(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(w(t),",由题目:").concat(w(e),"前进而来"):"进入题目: ".concat(w(t),",由题目:").concat(w(e),"前进而来")))}function N(e,t,n){(0,l.dU)().dev.infer||g(y(null,t,n,"check_fail","从".concat(w(e),"走向甄别失败")),!0)}function R(e,t){(0,l.dU)().dev.infer||g(y(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function A(e,t){(0,l.dU)().dev.infer||g(y(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function U(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"time_less","答题时间太少被排除"),!0)}function M(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function B(e){(0,l.dU)().dev.infer||g(y(null,e.current,e,"time_over","答题超时未完成"),!0)}function D(e,t,n,r){(0,l.dU)().dev.infer||g(y(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(r))),!0)}function F(e,t,n=!1){(0,l.dU)().dev.infer||g(y(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function j(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"gift","领奖"),!0)}function W(e,t,n,r,i){(0,l.dU)().dev.infer||g(y(t,n,e,"auto_input","在题目:".concat(w(n),"中自动填充选项:[").concat(r,"],期待值:[").concat(i,"]")))}function q(e,t,n,r="成功"){(0,l.dU)().dev.infer||g(y(null,n,e,"auto_skip","在题目:".concat(w(n),"中尝试自动选中选项:[").concat((0,a.mP)(t.text),"]").concat(r)))}function z(e,t,n){if((0,l.dU)().dev.infer)return;let r="自动跳过题目:".concat(w(t)," by ").concat(n);"logic"===t.type&&(r+=" logicResult:".concat(t.logicResult)),g(y(null,t,e,"auto_skip",r))}function V(e,t,n){(0,l.dU)().dev.infer||g(y(null,n,e,"opt_display","在题目:".concat(w(n),"中显示选项:[").concat((0,a.mP)(t.text),"]")))}function G(){const e="browser_uuid";let t=(0,l.dU)().storage.get(e);return t||(t=(0,o.M8)(),(0,l.dU)().storage.set(e,t)),t}function H(){if((0,l.dU)().dev.infer)return;const e=(0,d.ZI)();e.code&&e.state||g({type:"enter",collector_code:(0,l.vW)().sid,browser_uuid:G(),recorded_at:(0,r.GN)(),description:"来自"+(0,l.dU)().system.getReferer()},!0)}function X(e,t){if((0,l.dU)().dev.infer)return;let n="开始答题,进入到题目: ".concat(w(t)," ");const{browser:r,device:i,engine:o,os:a}=(0,l.dU)().system.device;r&&(n+="browser:".concat(r.name||""," ").concat(r.version||"",", ")),i&&(n+="device:".concat(i.type||""," ").concat(i.vendor||""," ").concat(i.model||"",", ")),o&&(n+="engine:".concat(o.name||""," ").concat(o.version,", ")),a&&(n+="os:".concat(a.name||""," ").concat(a.version||""));const s=y(null,t,e,"start",n);s.browser_uuid=G(),s.collector_code=(0,l.vW)().sid,g(s,!0)}function K(e,t){(0,l.dU)().dev.infer||g(y(null,null,e,"resume","开始断点续答:"+t),!0)}},949:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var r=n(4248),i=n(9911);async function o(e,t,n){const o=e+JSON.stringify(t),a=await(0,i.x)(e);if(!a){const t="FAKE NOT FOUND:".concat(e);throw(0,r.vW)().error(t),t}let s=null;try{if(s=await a(t,(0,r.vW)()),s.exception)throw s.exception}catch(e){if(!(0,r.vW)().realTimePreview){const t="FAKE ERROR:".concat(o," ").concat(e.stack&&e.stack.split("\n")[0]);throw n||(0,r.vW)().error(t),t}s={result:""}}return s}},5142:(e,t,n)=>{"use strict";n.d(t,{FB:()=>O,Hw:()=>b,Im:()=>_,O0:()=>I,Rq:()=>k,SK:()=>x,W1:()=>E,X:()=>y,_7:()=>S,bp:()=>T,f9:()=>l,gU:()=>m,hj:()=>f,lH:()=>p,mi:()=>c,o1:()=>v,rR:()=>h,vT:()=>g,yU:()=>w});var r=n(6539),i=n(7550),o=n(4248),a=n(5159),s=n(5497);let u="";const c={diagram_has_errors:"diagram_has_errors",survey_not_exist:"survey_not_exist",survey_offline:"survey_offline",oauth_error:"oauth_error",interviewee_missing_error:"interviewee_missing_error",interviewee_invalid_error:"interviewee_invalid_error",multi_responses_error:"multi_responses_error",red_envelope_duplicated:"red_envelope_duplicated",red_envelope_expired:"red_envelope_expired",red_envelope_received_by_yourself:"red_envelope_received_by_yourself",red_envelope_received_by_others:"red_envelope_received_by_others",red_envelope_intercepted:"red_envelope_intercepted",red_envelope_send_error:"red_envelope_send_error"},l={quota_full:"quota_full",response_overflow:"response_overflow",quota_not_match:"quota_not_match"},d=[400,401,402,403,404,405,422,500];async function f(e,t,n){const r=await(0,o.dU)().network.request(e,t,n);if((i=r).status>=200&&i.status<300)return function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}(r.response);throw r;var i}function p(e){e&&d.includes(e.status)||(0,o.vW)().error((0,i.Iu)(a.bn.global.downloadError))}function h(e){const t=JSON.parse(e&&e.response||"{}");return t&&d.includes(t.status)?t.code+"":""}function m(e){const t=h(e);if(t!==u&&t){if(l[t])return;c[t]?(0,o.vW)().error(E(t)):(0,o.vW)().notify(E(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.vW)().uploadLog("api error: ".concat(t.type,":").concat(e," ").concat(JSON.stringify(n))),n}}function v(e,t={type:"GET"},n=!1){return g(e,t={...t,contentType:"application/json"},n)}async function y(e){if((0,o.vW)().preview)return async function(e){if("00000000-0000-0000-0000-000000000000"===e)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const t=(0,r.ZI)(),n=t.type;let i=(0,o.vW)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?i=(0,o.vW)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(i=(0,o.vW)().hostConfig.host+"/v1/templates/"+e);const a=await v(i,{type:"GET",jwt:t.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(e);const t=(0,o.dU)().auth.retrieveAuthSurveyMeta();return t||v((0,o.vW)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw p(e),e}))}function w(e){const t=(0,o.vW)().hostConfig.qApiHost+"/responses";return u=c.multi_responses_error,v(t,{type:"POST",data:e},!0).then((e=>(u="",e))).catch((n=>{throw(0,o.vW)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),u="",n}))}function _(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function b(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function T(e){if((0,o.vW)().preview)return(0,o.vW)().notify((0,i.Iu)(a.bn.preview.noMessage)),{};const t=(0,o.vW)().hostConfig.qApiHost+"/validations";e.question_id=e.question_id.toLowerCase();const n=await v(t,{type:"POST",data:e});return e.phone_num&&(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendSuccess)),n}async function k(e,t){return(0,o.vW)().preview?((0,o.vW)().notify((0,i.Iu)(a.bn.preview.noMessage)),{}):v((0,o.vW)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function S(e,t){const n=(0,o.dU)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const r=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",i=await g(r,{type:"POST",data:e},!1);return(0,o.dU)().storage.set("gift-"+e.code,JSON.stringify(i)),i}async function I(e,t){if((0,o.vW)().preview)return{};const n=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendSuccess)),t}catch(e){throw(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendFailed)),e}}async function O(e){(0,s.l)(e);const{preview:t}=(0,o.vW)(),{dev:{autoRun:n,infer:r}}=(0,o.dU)();return t||n||r?null:g((0,o.vW)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function E(e){return(0,i.Iu)(a.bn.backEnd[e])||e}},7428:(e,t,n)=>{"use strict";n.d(t,{f:()=>i,s:()=>o}),n(5306);var r=n(6539);function i(e){const t=(0,r.ZI)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,r.ZI)().offline_survey_id}},5015:(e,t,n)=>{"use strict";n.d(t,{nR:()=>p,zp:()=>d,LO:()=>f});var r=n(1772),i=n(6935),o=n(3251),a=n(4248),s=(n(5306),n(2125));var u=n(949),c=n(5142);const l={valid:!0,message:"",result:""};async function d(e,t,n,o){const{method:d,embedId:f}=t,p="embed"===d,h="fake"===d;if((0,a.vW)().realTimePreview&&!p&&!h||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...l};const m=await(0,i.sb)(t.url,{state:e}),g=await(0,r.O_)(e,t);n&&Object.keys(n).forEach((e=>{n[e]&&(g[e]=n[e])}));let v=null;if(p)v=await async function(e,t,n){const r=function(e,t){const n=t.find((t=>t.id===e));return n?(n.fn||(n.fn=function(e){if(e.fn)return e.fn;let t,n=e.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(e.name," */ ").concat(n,"})()");try{return t=(0,s.K)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(e,n);let i;try{i=await r(t,(0,a.vW)())}catch(t){const r="EMBED ERROR:".concat(function(e,t){const n=t.find((t=>t.id===e));return n?n.name:e}(e,n)," ").concat(t.stack&&t.stack.split("\n")[0]);(0,a.vW)().error(r)}return i}(f,g,e.embedApis);else if("fake"===d)v=await(0,u.T)(m,g,o);else{let e="GET";"post"===d&&(e="POST");let t=null;try{t=await(0,c.hj)((0,a.dU)().dev.parseRealUrl(m),{type:e,data:g,contentType:"application/json"},!1)}catch(t){const n="REAL ERROR:".concat(e," ").concat(m," ").concat(JSON.stringify(t));throw o||(0,a.vW)().error(n),n}v=t}return v}async function f(e,t,n,r){const i=await d(e,t,n,r);return void 0===i.valid&&(i.valid=!!i.result),i.valid||i.message||(i.message="^_^"),i}async function p(e,t){try{const{request:n}=t.origin;n&&(await d(e,n,null,!0),e.endRequested=!0,o.s$.trigger("END_REQ"))}catch(e){(0,a.vW)().uploadLog(e)}}},1128:(e,t,n)=>{"use strict";n.d(t,{C4:()=>d,Kn:()=>g,Lb:()=>T,Mo:()=>w,My:()=>l,NV:()=>m,WA:()=>b,ad:()=>k,c1:()=>c,c6:()=>x,cW:()=>u,eK:()=>f,eu:()=>h,fi:()=>y,kM:()=>s,mH:()=>v,y4:()=>_}),n(3948);var r=n(3877),i=n(3656),o=n(5905),a=n(6935);function s(e,t){const n=e.loopStack,r=t.uuid;return(0,i.am)(r,n)}function u(e,t){return e.find((e=>(0,i.RC)(e.uuid,t)))}function c(e){return"comment"===e.optionType}function l(e){return h(e).some((e=>e.selected))}function d(e,t=!1){return h(e).filter((n=>(!t||!n.isOtherOpt)&&(0,r.Zy)(n,e))).length}function f(e){return h(e).some((t=>(0,r.Zy)(t,e)))}function p(e){const t=[],n=e=>{if("children"in e)for(const t of e.children)n(t);else t.push(e)};for(const t of e.optionGroups)n(t);return t}function h(e){let t=[];return(0,o.Kf)(e)&&(t=(0,o.ub)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.sy)(e)&&(t=[...t,...e.otherOptions]),t}function m(e){let t=[];return(0,o.QM)(e)&&(t=[...t,...e.options]),(0,o.RE)(e)&&(t=[...t,...e.otherOptions]),t}function g(e){let t=h(e);const{hiddenOptions:n}=e;return n&&(t=[...t,...n]),t}function v(e){const{renderOptionsX:t,renderOptionsY:n,otherOptions:r}=e;return t.concat(n,r)}function y(e){const{options:t,origin:n}=e,r=t.find((e=>e.origin.seqTarget));return r&&r.selected?n.options[r.sortNo-1]:n.output}function w(e){return"yid"in e&&"xid"in e}async function _(e,t){const{parent:n}=t,{origin:r}=e;return{itemsMax:await(0,a.Ob)(r.itemsMax,{state:n}),itemsMin:await(0,a.Ob)(r.itemsMin,{state:n})}}function b(e){return e.passRef||{}}function x(e,t){const n=b(e);return e[t]||n[t]}function T(e){return e.assistValue?Object.keys(e.assistValue).reduce(((t,n)=>(e.assistValue[n]&&(t+=e.assistValue[n])&&(t+=" "),t)),""):""}function k(e,t){return e/t*100+"%"}},45:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>o,ID:()=>f,PC:()=>d,Rv:()=>s,W_:()=>l,i1:()=>u,pL:()=>a,tl:()=>c});var r=n(6064),i=n(1128);function o(e){return e&&-1===e.mutexNumber}function a(e,t){return(e.mutexNumber||0)>(t.mutexNumber||0)?1:-1}function s(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!o(e.optionX.origin)||t.yid!==e.yid)||o(e.optionY.origin)&&t.xid===e.xid)}function u(e,t){return!(!e||!t)&&("comment"!==e.origin.optionType||"option"!==t.origin.optionType)&&("option"!==e.origin.optionType||"comment"!==t.origin.optionType)&&(!(!o(e.origin)&&!o(t.origin))||c(e,t))}function c(e,t){return!(!e||!t||(0,r.O2)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!c(e.optionX,t.optionX)||t.yid!==e.yid)||c(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,i.Kn)(e).forEach((e=>{const t=e.origin;(0,i.c1)(t)||(n[t.mutexNumber]?n[t.mutexNumber]+=1:n[t.mutexNumber]=1)}));const r=Object.keys(n).reduce(((e,t)=>("0"===t||"undefined"===t?e+=n[t]:Number(t)<10&&(e+=1),e)),0);return t>r&&(t=r),t}function f(e,t){return!!o(t.origin)||e.some((e=>e!==t&&e.selected&&u(t,e)))}},3151:(e,t,n)=>{"use strict";n.d(t,{OJ:()=>d,Xl:()=>f,j9:()=>h});var r=n(1128),i=n(7550),o=n(4248),a=n(5159),s=n(6064),u=n(45),c=n(1028),l=n(9192);function d(e,t,n,i){const a=n.list[t];(0,o.Pg)(a.option,{value:e});const s=i.options.find((e=>e.cascadePath===a.resultId));return(0,r.c1)(a.option.origin)&&(e?m(a,i):h(a,i)),s}async function f(e,t,n){const d=t.list[e];if(!d)return c.JG;const f=t.list.filter((e=>function(e){return e.selected&&!(0,r.c1)(e.option.origin)}(e))),{option:p}=d;if(f.includes(d))h(d,n);else{const e=(0,u.ID)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.vW)().notify((0,i.Iu)(a.bn.menu.limitMax,{text:t.text?(0,i.Iu)(a.bn.menu.listItem)+t.text:(0,i.Iu)(a.bn.menu.topList),max:(0,s.KF)(t.max)})),c.JG}else t.list.forEach((e=>{e.selected&&h(e,n)}));e&&function(e,t){t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.Pg)(t,{selected:!1})}))}(d,n),m(d,n)}return await(0,l.t)(p,n),c.kI}function p(e){(0,o.Pg)(e,{selected:!1}),(0,o.Pg)(e.option,{selected:!1});const t=e.list;t&&0!==t.length&&t.forEach((e=>{p(e)}))}function h(e,t){p(e),t.options.forEach((t=>{t.cascadePath.includes(e.resultId)&&(0,o.Pg)(t,{selected:!1})}))}function m(e,t){(0,o.Pg)(e,{selected:!0}),(0,o.Pg)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.Pg)(t,{selected:!0})}))}},5521:(e,t,n)=>{"use strict";n.d(t,{W:()=>y});var r=n(1128),i=n(7679),o=n(9564),a=n(6935),s=n(3656),u=n(4248),c=n(7550),l=n(5159),d=n(9192),f=n(1028),p=n(5905);const h={};function m(e,t,n){t.forEach((t=>{(0,s.RC)(t.uuid,e.uuid)||t[n]!==e[n]||(0,u.Pg)(t,{selected:!1})}))}function g(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,u.Pg)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,u.Pg)(e,{selected:!1});else{(0,u.Pg)(e,{selected:!0});const i=(0,p.sy)(t)?t.otherOptions:[];g(e,n?i:(0,r.eu)(t))}return f.vv}async function y(e,t){const n=h[t.type];if(n){const r=await n(e,t);return r.noValidate||(0,i.jY)(t),await(0,d.t)(e,t),r}return f.JG}h.select=async(e,t)=>{if(e.selected)return(0,u.Pg)(e,{selected:!1}),f.vv;const n=await(0,o.rz)(t,e);return n.valid?((0,u.Pg)(e,{selected:!0}),(0,o.Ir)(t.origin)&&g(e,(0,r.eu)(t)),f.vv):((0,u.vW)().notify(n.message),f.JG)},h.select_icon=h.select,h.select_image=h.select,h.matrix=async(e,t)=>{if(e.selected)return(0,u.Pg)(e,{selected:!1}),f.vv;const n=await(0,o.Hf)(t,e);if(!n.valid)return(0,u.vW)().notify(n.message),f.JG;const{origin:i}=t;return(0,u.Pg)(e,{selected:!0}),(0,o.Ir)(i)?g(e,(0,r.eu)(t)):(0,o.Rx)(i)?(m(e,t.options,"yid"),m(e,t.options,"xid")):(0,o.Lk)(i)?m(e,t.options,"yid"):(0,o.zR)(i)&&m(e,t.options,"xid"),f.vv},h.upload=async(e,t)=>{var n,r;if(e.isOtherOpt)return v(e,t,!0);{const{parent:i,fullUploaded:o,origin:s}=t;let d=await(0,a.Ob)(s.maxUploadCount,{state:i});d=d||t.options.length;const p=e.value;if(o&&!p&&!e.origin.fillRequired)return(0,u.vW)().notify((0,c.Iu)(l.bn.upload.amountLimitMax,{max:d})),f.JG;const h={onprogress(t){(0,u.Pg)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId},m=await(0,u.dU)().network.upload(h);return await(null===(r=(n=i.handleEvents).handleOptionInput)||void 0===r?void 0:r.call(n,m,e,t)),f.kI}},h.menu=h.select,h.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.vv),h.hot_spot=h.select,h.icon_mark=h.value_mark=h.slide_rate=h.fill=h.weight=h.heat_map=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.kI,h.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.kI},5753:(e,t,n)=>{"use strict";n.d(t,{LM:()=>h,SV:()=>d,wS:()=>p});var r=n(9192),i=n(7679),o=n(9564),a=n(4248),s=n(1128);const u={refresh:!1,result:!0},c={refresh:!0,result:!0},l={};function d(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.Pg)(e,{image:{name:void 0,ratio:1,url:n,natural:n,thumbnail:n,large:n,width:64,height:64,id:"faked-id-for-upload-image",originName:"uploaded image"}})}function f(e,t){const n=String(e);return e===t.value?u:((0,a.Pg)(t,{value:n}),c)}async function p(e,t,n){let o;if("number"==typeof e&&(e=String(e)),t.isOtherOpt)o=f(e,t);else{const r=l[n.type];o=r?await r(e,t,n):f(e,t)}return o.noValidate||(0,i.jY)(n,t),await(0,r.t)(t,n),o}function h(e,t,n){t.atcpTrigger=e,(0,i.jY)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.Pg)(t,{value:e}),c),l.weight=async(e,t,n)=>{if(e===t.value)return u;const{options:r}=n,i=n.weightTotal,o=r.reduce(((e,n)=>n!==t?e+Number(n.value):e),0),l=i-o;return Number(e)>l&&(e=String(l)),(0,a.Pg)(t,{value:e}),r.forEach((e=>{const t=Number(e.value);(0,a.Pg)(e,{percent:(0,s.ad)(t,i)})})),c},l.upload=async(e,t,n)=>(e||(await(0,a.dU)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,r.h)()),(0,a.Pg)(t,e),await(0,o.YC)(n),d(t,e),{refresh:!0,result:!0}),l.slide_rate=async(e,t)=>f(e,t),l.fill=async(e,t)=>f(e,t)},7492:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},8064:(e,t,n)=>{"use strict";n.d(t,{BT:()=>i,dj:()=>o,xR:()=>a});var r=n(8413);function i(e,t){return e.find((e=>e.origin.radius>=(0,r.S)(t,{lng:e.origin.longitude,lat:e.origin.latitude})))||e[e.length-1]}function o(e,t){if(0===e.length)return;const n=t.split("-");return e.find((e=>e.text.split("-").every(((e,t)=>{const r=n[t];return!!(r&&r.indexOf(e)>-1)}))))||e[e.length-1]}function a(e,t){const n=t.map((e=>e.name)).indexOf(e[0]);let r=String(n);const i=t[n];if(e[1]&&i){const t=i.cities.map((e=>e.name)).indexOf(e[1]);r+=" "+t;const n=i.cities[t];e[2]&&n&&(r+=""+n.areas.map((e=>e.name)).indexOf(e[1]))}return r}},5750:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>d,T_:()=>a,uR:()=>l}),n(2707);var r=n(3656),i=n(9564),o=n(4588);function a(e){const t=[];return e.forEach(((e,n)=>{const i=(0,r.XJ)(n+1);t.splice(i,0,e)})),t}const s={};function u(e,t,n){let i=[];return i=n?c(e):t?function(e,t){const n=[],i={};e.forEach(((e,r)=>{const o=e.origin;if(o.refOptId){let a="";if(t&&(a=o.referId),a){const t=i[a];t?t.list.push(e):i[a]={headIndex:r,list:[e]}}else n.push(e)}else n.push(e)}));let o=[];return n.forEach((e=>{const t=(0,r.XJ)(o.length+1);o.splice(t,0,e)})),Object.keys(i).map((e=>i[e])).sort(((e,t)=>e.headIndex>t.headIndex?1:-1)).forEach((e=>{o=o.concat(e.list)})),o}(e,t):function(e){const t=[];return e.forEach((e=>{const n=(0,r.XJ)(t.length+1);t.splice(n,0,e)})),t}(e),i}function c(e,t){return t=(t||Math.round(10*Math.random()))%e.length,e.slice(t).concat(e.slice(0,t))}function l(e,t){const{renderId:n,origin:r}=e,{followRandom:a,circulation:c}=r;if(!(0,i.oZ)(e))return t;if((0,o.YB)(e.nodeUuid,e.parent.nodeGroups)){let r=s[e.nodeUuid];if(r)return t.sort(((e,t)=>r[e.uuid]>r[t.uuid]?1:-1));{const e=u(t,a,c);return s[n]=r={},e.forEach(((e,t)=>{r[e.uuid]=t})),e}}return u(t,a,c)}function d(e,t,n){const{randomType:r}=e.origin;return"col"!==r&&"row_col"!==r||(t=l(e,t)),"row"!==r&&"row_col"!==r||(n=l(e,n)),"col_loop"===r&&(t=c(t)),"row_loop"===r&&(n=c(n)),{optionsX:t,optionsY:n}}},7552:(e,t,n)=>{"use strict";n.d(t,{kN:()=>P,kv:()=>B,jy:()=>V,MT:()=>z,rI:()=>H,Jc:()=>L,gk:()=>N,Ds:()=>K,dX:()=>D}),n(2707),n(5306),n(72),n(9137),n(1957),n(6306),n(103),n(4592),n(8276),n(5082),n(2813),n(8222),n(8563),n(336),n(7512),n(3948);var r=n(5750),i=n(1128),o=n(9564),a=n(6451),s=n(9481),u=n(6935),c=n(4665),l=(n(3210),n(9026)),d=n(4248),f=n(6064);const p={done:!1,expectedValue:"",actualValue:""};function h(e){const{autoInputConfig:t}=e.origin;if(!t)return"";const{defaultValue:n}=t;return n&&(0,f.KF)(n).trim()?n:""}const m={};async function g(e,t,n,r,i){if(!h(e))return p;const{parent:o}=t,a=await(0,u.Ob)(h(e),{state:o});let s=String(a);return a>=n&&a<=r||(s=i),(0,d.Pg)(e,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(e,t){const n=m[t.type];if(n){t.parent.context.option=e;const r=await n(e,t);return!!r.done&&((0,l.qu)(t.parent,e,t,r.actualValue,r.expectedValue),!0)}return!1}m.fill=async(e,t)=>{if(!h(e))return p;const{parent:n}=t,r=await(0,u.e_)(h(e),{state:n});return(0,d.Pg)(e,{value:r}),{done:!0,actualValue:r,expectedValue:r}},m.value_mark=(e,t)=>g(e,t,e.minValue,e.maxValue,""),m.icon_mark=(e,t)=>g(e,t,0,e.iconCount,""),m.slide_rate=(e,t)=>{const{rateOptions:n}=t;return g(e,t,0,n.length,"")},m.weight=(e,t)=>g(e,t,0,e.maxValue||t.weightTotal,""),m.sequence=async(e,t)=>{if(!h(e))return p;const n=t.options.length,{parent:r}=t,i=await(0,u.Ob)(h(e),{state:r});let o=i;return i>=1&&i<=n||(o=-1),(0,d.Pg)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:i}},n(5069);var y=n(5838),w=n(5905);async function _(e,t){const n=t.parent;n.context.option=e;const r=await async function(e,t){return!!t&&(0,y.Q3)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!r}const b=["select","select_icon","select_image","menu","hot_spot","data"];var x=n(6866),T=n(3251);async function k(e,t,n,r=!1){const i=n.origin.options.find((n=>n.xid===e.uuid&&n.yid===t.uuid)),o={...await L(n,i,null),optionX:e,optionY:t,text:r?e.text:t.text,xid:e.uuid,yid:t.uuid},a=await(0,s.o4)(n.parent,o,n);return o.disabled=!a,o}var S=n(45),I=n(3656),O=n(9310),E=n(3892);const C=["select","sequence","menu"];function P(e){Object.defineProperty(e,"selected",{get(){return this.__cache.selected},set(e){"select-input"===this.inputType&&(e?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=e,e&&(0,S.Cp)(this.origin)&&setTimeout((()=>{T.s$.trigger("OPT_EXCLUDE",this)})),T.s$.trigger("OPT_SELECT",this)}})}async function L(e,t,n){const{parent:r}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:B(t,e.type),value:"",renderId:(0,i.kM)(e,t),uuid:t.uuid,label:t.label,number:t.number,optComment:t.optComment,optionType:t.optionType,useComment:t.useComment,passRef:n};return r.context.option=o,o.text=await(0,u.Ur)(t.text,{state:r,usage:{node:e,optionId:t.uuid}}),P(o),o.isOtherOpt&&(await R(o,e),(0,i.c1)(t)||await _(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.Pg)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.Pg)(e,{placeholder:e.text})}(o),await(0,a._F)(o,r),o}async function N(e,t,n){const r=[];for(const i of t){const t=n.find((e=>e.uuid===i.uuid)),o=await L(e,i,t);r.push(o)}return r}function R(e,t){return(0,d.Pg)(e,{inputType:B(e.origin,t.type)}),D(e,t)}const A=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],U=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],M=["select","menu","cascade"];function B(e,t){if(e.isOtherOpt){let t="select";return(0,i.c1)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return M.includes(t)?!0===e.useComment?"select-input":"select":A.includes(t)?"input":U.includes(t)?"select":void 0}async function D(e,t){if(!(0,w.Ck)(e))return;const{origin:n}=e,r=e.origin.fillType;if(!r)return;const{parent:o}=t;let a,s,c,l=await(0,u.Ob)(n.fillStart,{state:o}),f=await(0,u.Ob)(n.fillEnd,{state:o});if(isNaN(l)&&(l=void 0),isNaN(f)&&(f=void 0),"date"===r){const e=(new Date).getFullYear(),t=l,n=f;void 0!==l&&(l=new Date(l,0,1),e<t&&(a=l)),void 0!==f&&(f=new Date(f,11,31),e>n&&(a=f))}"auto_complete"===r&&(s=function(e,t=[]){const{autoCpltGroups:n}=e;return t.reduce(((e,t)=>{const r=n.find((e=>e.id===t));return r&&(e=e.concat(r.data)),e}),[])}(o,n.autoCpltIds),c=await(0,x.VJ)(t.parent.sid));let p=[];"list_select"===r&&(p=q((await(0,u.e_)(n.selectText,{state:o,joinBy:","})).split(",")));const h=await(0,i.y4)(e,t),m=await(0,E._2)(e,t);(0,d.Pg)(e,{itemsMax:h.itemsMax,itemsMin:h.itemsMin,fillStart:m.start,fillEnd:m.end,fillType:r,validateMin:l,validateMax:f,defaultValue:a,completeGroups:s,selectList:p,prevCpltLang:c,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function F(e,t,n=!1){const{options:i,otherOptions:o,hiddenOptions:a}=e,s={options:[],otherOptions:o,hiddenOptions:[]};if(i){const n=function(e){const t=e.filter((e=>"top-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),n=e.filter((e=>"bottom-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),r=e.filter((e=>"top-fixed"!==e.origin.position&&"bottom-fixed"!==e.origin.position));return t.concat(r).concat(n)}((0,r.uR)(e,i));for(const e of n)s.options.push(await t(e))}if(a)for(const e of a){const n=e.isOtherOpt?e:await t(e);s.hiddenOptions.push(n)}n&&z([...s.options,...s.otherOptions]),(0,d.Pg)(e,s)}const j={};async function W(e,t){return e.image?e.image:await(0,a.nO)(t,e)}function q(e){const t={};return e.map((e=>{const n=t[e];return n?(t[e]=n+1,"".concat(e,"(").concat(n,")")):(t[e]=2,e)}))}function z(e){q(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function V(e){return e&&e.path?(0,d.vW)().hostConfig.mediaHost+e.path:""}function G(e){const t=V(e);return{normalIconUrl:t,activeIconUrl:H(t)}}function H(e){return e.replace("/outline/","/glyph/")}function X(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:G(t.icon)}async function K(e,t){if((0,w.Kf)(e)){await async function(e,t){const{origin:n}=e;let r={options:[]};if((0,I.is)(n,"matrix"===n.type)){const{options:i,refMaps:o,passRefs:u}=await(0,a.P)(t,e.origin,"xid"),c=await N(e,i,u),l=await(0,s.tc)(t,c,e),{options:d,refMaps:f,passRefs:p}=await(0,a.P)(t,e.origin,"yid"),h=await N(e,d,p),m=await(0,s.Ou)(t,h,e);(0,O.sB)(e,[...o,...f]);const g=await N(e,n.otherOptions,[]),v=await(0,s.PR)(t,g,e);r={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.P)(t,e.origin);let i=n.options;(0,w.sy)(e)&&(i=i.concat(e.origin.otherOptions));const o=await N(e,i,n.passRefs),u=await(0,s.PR)(t,o,e),c=[],l=[];u.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):c.push(e)})),(0,O.sB)(e,n.refMaps),r={options:c,otherOptions:l,hiddenOptions:u.hiddenList}}(0,d.Pg)(e,r)}(e,t);const n=j[e.type];n&&await n(e),function(e){if((0,d.vW)().realTimePreview)return;if(!(0,w.Kf)(e))return;let t;C.indexOf(e.type)>-1?t=e=>!!e.text:"select_image"===e.type?t=e=>!!e.image:"slide_rate"===e.type&&(t=e=>!!e.text||!!e.image),t&&(e.options=e.options.filter(t))}(e),function(e){const{options:t,type:n,parent:r}=e;let i=(0,w.sy)(e)?e.otherOptions:[];b.includes(n)&&(i=[...i,...t]);const a=i.filter((e=>e.autoSelectMarked)).reverse();if((0,o.qX)(e.origin))a.forEach((t=>{(0,d.Pg)(t,{selected:!0}),(0,l.eq)(r,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.eq)(r,t,e,"因冲突被终止")})),t&&((0,d.Pg)(t,{selected:!0}),(0,l.eq)(r,t,e))}}(e),t.context.option=null}}j.select=e=>F(e,(async function(t){return await D(t,e),await _(t,e),t})),j.fill=e=>F(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await D(t,e),t.placeholder=(0,u.mP)(t.text),await v(t,e),t})),j.value_mark=e=>F(e,(async function(t){const{parent:n,origin:r}=e;t.value="";const i=await(0,u.Ob)(r.markMin,{state:n}),o=await(0,u.Ob)(r.markMax,{state:n});return(0,d.Pg)(t,{minValue:i,step:r.markStep,maxValue:o,minValueText:r.minText,maxValueText:r.maxText}),await v(t,e),t})),j.icon_mark=e=>F(e,(async function(t){return t.value="",(0,d.Pg)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),j.sequence=async e=>{let t=!1;await F(e,(async n=>((0,d.Pg)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},j.matrix=async e=>{const t=(0,r.Gy)(e,e.optionsX,e.optionsY),{parent:n,origin:i}=e,a=[];for(const r of t.optionsX)a.push({origin:r.origin,extraTitle:r.origin.extraTitle,width:r.origin.width,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,text:await(0,u.Ur)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const s=new Map;a.forEach(((e,t)=>{s.set(e,t)})),a.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.origin.position)){case"left-fixed".concat("___","right-fixed"):case"left-fixed".concat("___",void 0):case"".concat(void 0,"___","right-fixed"):return-1;case"".concat(void 0,"___","left-fixed"):case"right-fixed".concat("___","left-fixed"):case"right-fixed".concat("___",void 0):return 1;default:{const n=s.get(e),r=s.get(t);return n&&r?n-r:e.number-t.number}}}));const c=[];for(const r of t.optionsY)c.push({origin:r.origin,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,height:r.origin.height,text:await(0,u.Ur)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const l=new Map;c.forEach(((e,t)=>{l.set(e,t)})),c.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.origin.position)){case"top-fixed".concat("___","bottom-fixed"):case"".concat(void 0,"___","bottom-fixed"):case"top-fixed".concat("___",void 0):return-1;case"".concat(void 0,"___","top-fixed"):case"bottom-fixed".concat("___","top-fixed"):case"bottom-fixed".concat("___",void 0):return 1;default:{const n=l.get(e),r=l.get(t);return n&&r?n-r:e.number-t.number}}}));for(const t of e.otherOptions)await R(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:c.filter((e=>e.visible))},p=(0,o.Lk)(i)||(0,o.mI)(i),h=await async function(e,t,n,r=!1){const i=[],o=[];let a=e,s=t;r&&(a=t,s=e);for(const e of a)if(e.visible){const t={text:e.text,list:[]};for(const i of s)if(i.visible){let a=e,s=i;r&&(s=e,a=i);const u=await k(a,s,n,r);o.push(u),t.list.push(u)}i.push(t)}return{flatten:i,options:o,fullOptions:o}}(a,c,e,p),m=function(e,t,n){const r=[];return t.forEach((t=>{if(t.visible){const i=[];e.forEach((e=>{if(e.visible){const r=n.find((n=>n.xid===e.uuid&&n.yid===t.uuid));if(!r)throw new Error("matrix item not found");i.push(r)}})),r.push(i)}})),{matrix:r}}(a,c,h.options);(0,d.Pg)(e,{...f,...h,...m})},j.select_image=e=>F(e,(async t=>(t.image=await W(t,e),await _(t,e),t))),j.upload=e=>F(e,(async e=>(e.filePath="",e.value="",e.fileName="",e.fileType="",e.progress=0,e.isImage=!1,e.fileLimits=[...e.origin.fileLimits||["image"]],e.accept=(0,c.D)(e.fileLimits),e))),j.menu=e=>F(e,(async t=>(await D(t,e),await _(t,e),t)),!0),j.select_icon=e=>F(e,(async t=>{const n={...t,...X(t)};return await _(n,e),n})),j.weight=e=>{const{parent:t}=e;return F(e,(async n=>{let r=await(0,u.Ob)(n.origin.maxMark,{state:t});const i=await(0,o.Vg)(e.origin,t);return(!r||r>i)&&(r=i),(0,d.Pg)(n,{percent:"0%",color:n.origin.color,maxValue:r,value:""}),await v(n,e),n}))},j.cascade=e=>F(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),j.data=async e=>{for(const t of e.options)await _(t,e)},j.hot_spot=async e=>await F(e,(async t=>{await D(t,e),await _(t,e);let n=t.origin.graphs;if("points"in t){const{points:e,x:r,y:i}=t.origin;n=[{points:e,x:r,y:i,uuid:(0,I.M8)()}]}const r=n.map((e=>{const{area:t,pathD:n}=e.points.reduce(((t,n,r)=>{t.pathD?t.pathD+=" L":t.pathD+="M",t.pathD+=n.x+" "+n.y;const i=e.points[r+1];return i?t.area+=n.y+i.y*(i.x-n.x)/2:t.pathD+=" Z",t}),{area:0,pathD:""});return{...e,area:t,pathD:n,transform:"translate(".concat(e.x,",").concat(e.y,")")}}));return(0,d.Pg)(t,{graphs:r,color:t.origin.color}),t})),j.heat_map=(e,t)=>F(e,(async function(e){return e})),j.max_diff=e=>F(e,(async function(t){return t.value="0",t.image=await W(t,e),t.records=[],t})),j.slide_rate=async e=>{const{rateOptions:t}=e.origin,n=[];for(const r of t){const t=await L(e,r,null);await(0,s.o4)(e.parent,t,e)&&n.push(r)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...G(t),text:(0,u.FL)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),F(e,(async t=>((0,d.Pg)(t,{image:await W(t,e),value:""}),await v(t,e),t)))}},9481:(e,t,n)=>{"use strict";n.d(t,{De:()=>f,Ou:()=>d,PR:()=>u,o4:()=>s,tc:()=>l}),n(3948);var r=n(5838),i=n(1128),o=n(9026),a=n(3768);async function s(e,t,n){const{origin:i}=t,a=i.displayConfig;if(a){n.hasOptShowHide=!0,e.context.option=t;const i=await(0,r.Q3)(e,a);return i&&(0,o.oA)(e,t,n),e.context.option=null,i}return!0}async function u(e,t,n){const r=[],i=[];for(const o of t)await s(e,o,n)?(o.visible=!0,r.push(o)):(o.visible=!1,i.push(o));return{visibleList:r,hiddenList:i}}async function c(e,t,n){for(const r of t)r.visible=await s(e,r,n);return t}async function l(e,t,n){t=await c(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.width;return t}async function d(e,t,n){t=await c(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.height;return t}function f(e,t){const{renderList:n}=e,r=[];return n.forEach((e=>{if(!(0,a.F2)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,i.mH)(e):(0,i.eu)(e);let n;s&&(n=s.replacements.map((e=>e.index))),r.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:t.map((e=>e.uuid.toLowerCase()))})}})),r}},9564:(e,t,n)=>{"use strict";n.d(t,{$X:()=>W,$i:()=>D,CE:()=>T,Cf:()=>x,Fy:()=>N,Hf:()=>U,Ir:()=>S,Jz:()=>y,KF:()=>v,Lk:()=>I,NU:()=>q,Rx:()=>E,So:()=>b,Vg:()=>z,YC:()=>V,ZA:()=>w,Zu:()=>C,gx:()=>R,jJ:()=>j,lE:()=>L,mI:()=>P,nv:()=>B,oZ:()=>_,qK:()=>g,qX:()=>k,rz:()=>M,zR:()=>O}),n(3948);var r=n(1128),i=n(3656),o=n(6935),a=n(7550),s=n(4248),u=n(5159),c=n(3877),l=n(45),d=n(3768),f=n(5029);const p={valid:!0,message:""},h=["region","location","area","describe","end","logic","loop","lottery","verify"],m={};function g(e){(0,s.Pg)(e,{hasAnswer:(0,d.JH)(e)})}function v(e,t){if(8!==t.length)return t;let n=m[t];if(!n){const r=e.nodeList.find((e=>(0,i.RC)(e.nodeUuid,t)));if(r)return n=m[t]=r.nodeUuid,r.nodeUuid}return n}function y(e){return e.find((e=>"start"===e.type))}function w(e){return!0===e.answerRequired}function _(e){return(0,i.is)(e,"matrix"===e.type)?function(e){const{randomType:t}=e.origin;return"col"===t||"row_col"===t||"row"===t}(e):!0===e.origin.randomOptionY}function b(e){const t=e.loopStack,n=e.nodeUuid;return(0,i.am)(n,t)}function x(e,t){if(t)return e.find((e=>e.input&&(0,i.RC)(e.input.uuid,t)||e.loopEnd&&(0,i.RC)(e.loopEnd.uuid,t)))}function T(e,t,n){const r=t.find((e=>(0,i.RC)(e.selfPortId,n)));if(r&&r.destInputId)return x(e,r.destInputId)}function k(e){return(0,i.is)(e,"matrix"===e.type)?"multi"===e.matrixSelect:!0===e.multiSelect}function S(e){return(0,i.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function I(e){return"single_row"===e.matrixSelect}function O(e){return"single_col"===e.matrixSelect}function E(e){return"single_row_col"===e.matrixSelect}function C(e){return k(e)&&"all"===e.multiType}function P(e){return k(e)&&"row"===e.multiType}function L(e){return k(e)&&"col"===e.multiType}async function N(e,t){const{origin:n}=e,r=!0===n.limitEnabled;let i=r?await(0,o.Ob)(n.maxUploadCount,{state:t}):e.options.length,a=r?await(0,o.Ob)(n.minUploadCount,{state:t}):1;const s=e.options.length;return a||(a=1),i||(i=s),a>s&&(a=s),a>i&&(a=i),{max:i,min:a}}async function R(e,t){const{origin:n}=e;if(!k(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let u=await(0,o.Ob)(a,{state:t}),c=await(0,o.Ob)(s,{state:t});const d=(0,r.Kn)(e).length;return(0,i.is)(e,"matrix"===e.type)||(u=(0,l.PC)(e,u)),u||(u=1),c||(c=d),u>d&&(u=d),u>c&&(u=c),{min:u,max:c}}const A=(e,t,n,r)=>{let i=0;i=r?e.filter((e=>e[r]===t[r]&&e.selected)).length:e.filter((e=>e.selected)).length;const o=i<n;let s="";return o||(s=r?"xid"===r?(0,a.Iu)(u.bn.matrix.colLimitMax,{max:n}):(0,a.Iu)(u.bn.matrix.rowLimitMax,{max:n}):(0,a.Iu)(u.bn.select.limitMax,{max:n})),{valid:o,message:s}};async function U(e,t){if(!k(e.origin)||(0,l.Cp)(t.origin)||!t.isOtherOpt&&((0,l.Cp)(t.optionX.origin)||(0,l.Cp)(t.optionY.origin)))return p;const n=C(e.origin);if(!n&&!(0,r.Mo)(t))return p;const i=(0,r.eu)(e),{max:o}=await R(e,e.parent);return n?A(i,t,o):L(e.origin)?A(i,t,o,"xid"):P(e.origin)?A(i,t,o,"yid"):p}async function M(e,t){if(!k(e.origin))return p;const{max:n}=await R(e,e.parent),i=(0,r.eu)(e),o=!(i.filter((e=>e.selected)).length===n)||(0,l.ID)(i,t);return{valid:o,message:o?"":(0,a.Iu)(u.bn.select.limitMax,{max:n})}}function B(e,t){return e.find((e=>(0,i.RC)(e.nodeUuid,t)))}const D=["logic","random","loop"],F=[...D,"data"];function j(e){(0,s.vW)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!F.includes(e.type)&&(e.readonly=!0)}function W(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.vW)().preview&&e.parent.previewShadowNodes&&!F.includes(e.type)}(e)?"":"setting";if((0,f.u)(e.nodeUuid))return"random_group";const t=(0,r.eu)(e);return h.indexOf(e.type)>-1||!t||0!==t.length?"":"no_options"}function q(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,i.RC)(e.circleNode1Id,t.circleNode1Id)&&(0,i.RC)(e.circleNode2Id,t.circleNode2Id)}async function z(e,t){const{options:n}=e;let r=await(0,o.Ob)(e.total,{state:t})||100,i=0;for(const e of n){const n=await(0,o.Ob)(e.maxMark,{state:t});if(void 0===n){i=-1;break}i+=n}return i>0&&i<r&&(r=i),r}async function V(e){const{max:t}=await N(e,e.parent),n=t===e.options.filter((t=>(0,c.Zy)(t,e))).length;(0,s.Pg)(e,{fullUploaded:n})}},5589:(e,t,n)=>{"use strict";n.d(t,{U:()=>p,k:()=>h});var r=n(2812),i=n(1128),o=n(8064),a=n(8413),s=n(7679),u=n(4248),c=n(9192),l=n(1028);function d(e,t,n,r){e&&((0,u.Pg)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,u.Pg)(t,{selected:!1})}))),(0,u.Pg)(r,{value:n})}const f={};async function p(e,t){const n=f[t.type],r=n?await n(e,t):l.JG;return r.noValidate||(0,s.jY)(t),r}function h(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.vv}f.region=(e,t)=>{t.indexes=e;const n=(0,i.eu)(t),a=(0,r.ks)(e);d((0,o.dj)(n,a),n,a,t);const s=a.split("-"),u={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=u,t.position={address:u},l.vv},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.L)(e.address,"-",t.infoRange),r=(0,i.eu)(t);return d((0,o.dj)(r,n),r,n,t),(0,u.Pg)(t.parent,{point:e.point,address:e.address}),t.position=e,l.vv},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.L)(e.address,"-","street"),r=(0,i.eu)(t);return d((0,o.BT)(r,e.point),r,n,t),(0,u.Pg)(t.parent,{point:e.point,address:e.address}),t.position=e,l.vv},f.verify=(e,t)=>((0,u.Pg)(t,e),{...l.vv,noValidate:!0}),f.gift=(e,t)=>((0,u.Pg)(t,e),l.kI),f.heat_map=async(e,t)=>{const n={x:Math.round(e.x),y:Math.round(e.y)},{options:r}=t,i=r[t.clickTimes%r.length];return(0,u.Pg)(i,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,c.t)(i,t),l.kI}},152:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var r=n(4248);function i(e,t){(0,r.Pg)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,r.Pg)(n,{value:n.records.reduce(((e,t)=>e+t.value),0).toString()})}function o(e,t,n){if(t.value===e)return{result:!0};i(t,e),n.items.forEach((e=>{e!==t&&e.value===t.value&&i(e,0)}));const o=n.items.some((e=>1===e.value)),a=n.items.some((e=>-1===e.value));return(0,r.Pg)(n,{done:o&&a}),{result:!0}}},8231:(e,t,n)=>{"use strict";n.d(t,{O:()=>a}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var r=n(4248),i=n(9192);function o(e){return"[object Map]"!==Object.prototype.toString.call(e)}async function a(e,t,n){const{options:a}=n;if(!function(e,t){if(o(e))return!0;if(e.size!==t.length)return!1;const n=new Array(t.length).fill(!1);for(const[r,i]of e)i>=0&&i<t.length&&(n[i]=!0);return n.every((e=>e))}(e,a)||!function(e,t){if(e.size!==t.length)return!1;const n=Array.from(e.values()).filter((e=>-1!==e));for(const e of n)if(e<1||e>t.length)return!1;return r=n,new Set(r).size===r.length;var r}(t,a))return{result:!1};let s;for(const[e,n]of t)e.sortNo!==n&&((0,r.Pg)(e,{sortNo:n,selected:-1!==n}),e.selected&&(s=e));if(!o(e)){const t=[];for(const[n,r]of e)t[r]=n;(0,r.Pg)(a,t)}return s&&await(0,i.t)(s,n),{result:!0}}},4125:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(4248);function i(e){if(!e)return{};const{useCustomLogo:t,logoText:n,logoImage:i,showLogoInEachPage:o,logoImageShowWidth:a}=e;let s="";if(i){const e=i.name;s=(0,r.vW)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8351:(e,t,n)=>{"use strict";n.d(t,{ks:()=>ie,MJ:()=>re,D1:()=>ne,qG:()=>te});var r=n(7552),i=n(9564),o=n(2812),a=n(7550),s=n(5159),u=n(4248);const c={select:async e=>{const t=(0,i.qX)(e.origin);let n=(0,a.Iu)(s.bn.select.single);if(t){n=(0,a.Iu)(s.bn.select.multi);const{min:t,max:r}=await(0,i.gx)(e,e.parent);return{typeName:n,typeDescription:(0,a.Iu)(s.bn.select.limitBetween,{min:t,max:r})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.value)}),icon_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.graph)}),weight:async e=>{const t=e.weightTotal;let n=(0,a.Iu)(s.bn.weight.total,{total:t});return n+=!0===e.origin.relax?(0,a.Iu)(s.bn.weight.relax):(0,a.Iu)(s.bn.weight.strict),{typeName:(0,a.Iu)(s.bn.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.Iu)(s.bn.fill.name)}),slide_rate:async()=>({typeName:(0,a.Iu)(s.bn.slideRate.name)}),sequence:async e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.Iu)(s.bn.rank.limitMin,{min:t}):(0,a.Iu)(s.bn.rank.limitAll);return{typeName:(0,a.Iu)(s.bn.rank.name),typeDescription:n}},menu:async e=>({...await c.select(e),typeName:(0,a.Iu)(s.bn.menu.name)}),select_icon:e=>c.select(e),select_image:e=>c.select(e),upload:async e=>{const t=(0,a.Iu)(s.bn.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:r}=await(0,i.Fy)(e,e.parent);return{typeName:t,typeDescription:(0,a.Iu)(s.bn.upload.amountLimit,{min:n,max:r})}}return{typeName:t,typeDescription:""}},location:async()=>({typeName:(0,a.Iu)(s.bn.locate.name)}),area:async()=>({typeName:(0,a.Iu)(s.bn.site.name)}),region:async()=>({typeName:(0,a.Iu)(s.bn.region.name)}),verify:async()=>({typeName:(0,a.Iu)(s.bn.verify.name)}),cascade:async()=>({typeName:(0,a.Iu)(s.bn.cascade.name)}),matrix:async e=>{const{origin:t}=e;if((0,i.Ir)(t))return{typeName:(0,a.Iu)(s.bn.matrix.single)};if((0,i.qX)(t)){const{min:n,max:r}=await(0,i.gx)(e,e.parent);let o=(0,a.Iu)(s.bn.matrix.multi),u=(0,a.Iu)(s.bn.select.limitBetween,{min:n,max:r});return(0,i.lE)(t)?(o=(0,a.Iu)(s.bn.matrix.multiCol),u=(0,a.Iu)(s.bn.matrix.colLimitBetween,{min:n,max:r})):(0,i.mI)(e.origin)&&(o=(0,a.Iu)(s.bn.matrix.multiRow),u=(0,a.Iu)(s.bn.matrix.rowLimitBetween,{min:n,max:r})),{typeName:o,typeDescription:u}}return(0,i.Lk)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleRow),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowOne)}:(0,i.zR)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachColOne)}:(0,i.Rx)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleRowCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowColOne)}:{typeName:(0,a.Iu)(s.bn.matrix.single)}},hot_spot:async()=>({typeName:(0,a.Iu)(s.bn.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.Iu)(s.bn.heatMap.name)}),max_diff:async()=>({typeName:(0,a.Iu)(s.bn.maxDiff.name)})};var l=n(6935),d=n(9271),f=n(9310),p=n(4725),h=n(6866),m=n(7117),g=n(6539),v=(n(3948),n(1128)),y=n(5750),w=n(9481),_=n(3656),b=n(6451);function x(e){return 1===e?"bottom":2===e?"top":"center"}function T(e,t,n,r,i=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),u=i?i+"=>"+a:a;return s&&(s.text=u),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=T(e,t,n,r,u)})),t.text}async function k(e,t){const{destList:n,cascadeStart:r}=t.origin,o=(0,i.CE)(e.nodeList,n,r.uuid);o&&(t.cascade=await S(t,e,o,""))}async function S(e,t,n,o,u){u?await(0,r.dX)(u,e):u={uuid:"",text:""};const{nodeList:c}=t,l=o?o+"=>"+(0,_.pC)(u.uuid):(0,_.pC)(u.uuid),d={option:u,groupId:o,resultId:l,text:u.text||u.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect);const f=await async function(e,t,n){let i=n.cachedCasMenuOpts;i||(i=n.cachedCasMenuOpts={});const o=i[e.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,b.P)(t,e),s=await(0,r.gk)(n,o,a),u=await(0,w.PR)(t,s,n),c={...te({target:e},t),renderId:(0,_.am)(e.nodeUuid,n.loopStack)},l=await(0,r.gk)(n,e.otherOptions,[]),d=await(0,w.PR)(t,l,n),f={options:(0,y.uR)(c,u.visibleList),otherOptions:d.visibleList};return i[e.nodeUuid]=f,f}}(n,t,e),p={...te({target:n},t),...f,parent:t},h=(0,i.qX)(n),{min:m,max:g}=await(0,i.gx)(p,t),{destList:T,output:k}=n,I=(0,i.ZA)(n),O=[],E=h?(0,a.Iu)(s.bn.cascade.selectBetween,{min:m||1,max:g}):(0,a.Iu)(s.bn.cascade.selectSome,{amount:1}),C={...d,list:O,multiple:h,min:m,max:g,hint:E,required:I,display:x(n.menuType),lineCount:n.lineCount},P=(0,i.CE)(c,T,k.uuid),L=(0,v.eu)(p);(0,r.MT)(L);for(const n of L){const r=(0,i.CE)(c,T,n.uuid)||P,o=await S(e,t,r,l,n);O.push(o)}return C}function I(e,t,n){const r=function(e){const t=[];return e.forEach((e=>{const{pickedTimes:n}=e;t[n]?t[n].push(e):t[n]=[e]})),t}(e),i={items:[],done:!1};let o=t;for(const e of r)if(e){const t=(0,_.DQ)(e,o);if(t.forEach((e=>{i.items.push({option:e.option,value:0,round:n}),e.option.records.push({round:n,value:0}),e.pickedTimes+=1})),o-=t.length,0===o)break}return i}n(2707);var O=n(9698),E=n(7712);const C={optionsRelationship:{},groupsRelationship:{}},P=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function L(e){return"group"===e.type}function N(e){return"type"in e&&"group"===e.type}async function R(e,t){const{options:n,origin:r}=e;let i=r.optionGroups||[];if(o=e.type,!P.includes(o))return{optionGroups:void 0};var o;const a=function(e,t){const{optionRefers:n,refOptions:r}=e.origin;let i=[];const o=[];return n.forEach((e=>{const{identity:{nodeId:n}}=(0,O.V)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,E.ck)(t,n);if(!e)return;const a=M(U(e.optionGroups||[],e.origin.optionGroupsRelationship||C),r);i=i.concat(a)}})),i}(e,t);if(i=i.concat(a),0==i.length)return{optionGroups:void 0};i=function(e,t,n){const r=e.concat(t),i=(e,t)=>{if(L(e)){const n=e;let r=t;for(const e of n.children)r=Math.min(i(e,r),r);return r}{const t=e,r=n.map((e=>e.uuid)).indexOf(t.optionUuid);return-1===r?Number.MAX_VALUE:r}};return r.sort(((e,t)=>i(e,Number.MAX_VALUE)-i(t,Number.MAX_VALUE)))}(i,function(e,t){const n={};!function e(t){t.forEach((t=>{L(t)?t.children.forEach((t=>{L(t)?e(t.children):n[t.optionUuid]=t.groupUuids})):n[t.optionUuid]=t.groupUuids}))}(t);const r=[];e.forEach((e=>{n[e.uuid]||r.push(e)}));const i=[];return r.forEach((e=>{const t={text:e.text,optionUuid:e.uuid,groupUuids:[],type:"option",currentLevel:1};i.push(t)})),i}(n,i),n);let s=await B(i,n,t);return s=A(s),s=function(e,t){const{randomOptionY:n,circulation:r,followRandom:i}=e.origin;return r?j(t):n?i?t:F(t):t}(e,s),W(s,n),s=q(s),{optionGroups:s}}function A(e){const t=[];return e.forEach((e=>{N(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==A(t).length}(e)&&t.push(e):t.push(e)})),t}function U(e,t){return(e||[]).map((e=>{if(N(e)){const n=(0,_.p$)(e),{groupTitle:r,showGroupTitle:i,children:o,randomMode:a,type:s,uuid:u}=n;return{groupTitle:r,showGroupTitle:i,randomMode:a,type:s,uuid:u,children:U(o,t)}}{const n=(0,_.p$)(e),{text:r,uuid:i}=n;return{type:"option",text:r,optionUuid:i,groupUuids:t.optionsRelationship[i]||[]}}}))}function M(e,t){return e.map((e=>function(e,t){if(L(e)){const n=M(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:r,groupUuids:i,text:o,currentLevel:a}=e;return{type:r,groupUuids:i||[],text:o,currentLevel:a,optionUuid:t.find((e=>(0,_.RC)(n,e.refOptId))).uuid}}}(e,t)))}async function B(e,t,n){const r=[];for(const i of e){const e=await D(i,t,n);e&&r.push(e)}return r}async function D(e,t,n){if(L(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.Ur)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await B(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const F=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,_.XJ)(t.length+1);t.splice(n,0,e)})),t}(e),j=e=>{return t=e,n=(n||Math.round(10*Math.random()))%t.length,t.slice(n).concat(t.slice(0,n));var t,n};function W(e,t){e.forEach((e=>{if(N(e)){const{randomMode:n,children:r}=e;W(r||[],t);const i={followNode:()=>((e,t)=>{const{groups:n,options:r}=(e=>e.reduce(((e,t,n)=>{const{groups:r,options:i}=e;return N(t)?r.push({group:t,index:n}):i.push({uuid:t.uuid,option:t,index:n}),e}),{groups:[],options:[]}))(e),i=t.reduce(((e,t)=>{const{uuid:n}=t,i=r.find((({uuid:e})=>e===n));return i&&e.push(i.option),e}),[]);return n.forEach((({group:e,index:t})=>{i.splice(t,0,e)})),i})(r,t),noRandom:()=>r,random:()=>F(r),circulation:()=>j(r)};e.children=i[n]()}}))}function q(e){let t=[],n=[];const r=[];return e.forEach((e=>{if(N(e))e.children=q(e.children),r.push(e);else{const i=e.origin,{position:o}=i;"top-fixed"===o?t.push(e):"bottom-fixed"===o?n.push(e):r.push(e)}})),t=t.sort(((e,t)=>e.number-t.number)),n=n.sort(((e,t)=>e.number-t.number)),[...t,...r,...n]}var z=n(3087),V=n(7428),G=n(5905),H=n(6970),X=n(5286),K=n(9026),$=n(5838);const Z=["select","menu","select_image","select_icon","upload"];function J(e,t,n){let r=e.indexOf(t)+n;return r<0?r=0:r>e.length-1&&(r=e.length-1),e[r]}const Y={};function Q(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.q)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function ee(e){const{loop:t,parent:n,origin:r}=e,{lockLoopCount:i}=r;let o=r.nodeName.split("/")[0];if(o&&r.circleNode1Id&&!i&&!(0,u.vW)().realTimePreview){const e=(0,m.SN)();let i=await e.C_OL_LBL.getText({state:n});if(i||(i=t.node.nodeName+"_"+await e.C_OL_NUM.getText({state:n})),o=i+"_"+o,r.circleNode2Id){let r=await e.C_IL_LBL.getText({state:n});r||(r=t.node.nodeName+"_"+await e.C_IL_NUM.getText({state:n})),o=r+"_"+o}}return o}function te(e,t){const{target:n,loop:r,random:i,loopStack:o}=e;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:r,random:i,loopStack:o,type:n.type,parent:t}}async function ne(e,t){const n={...e,hasAnswer:!1,autoSkip:e.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:e.origin.checkMode,runtimeNodeName:await ee(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,u.vW)().realTimePreview,renderId:(0,i.So)(e),prev:t,errorMessage:""},o=e.parent;if(i.$i.indexOf(n.type)>-1)return async function(e,t){(0,u.Pg)(e,{autoSkip:!0,number:""});const n=Y[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,u.Pg)(e,{number:e.runtimeNodeName})}(n),function(e){(0,u.Pg)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,u.Pg)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var r;n.image?(0,u.Pg)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,b.nn)(e.parent,t)}):(0,u.Pg)(t,{images:[]}),n.video&&(0,u.Pg)(t,{autoplayVideo:n.autoplayVideo,video:n.video&&(r=n.video,r?{id:r.id,url:(0,V.f)(r.url),poster:(0,V.f)(r.poster)}:null)})}(n),await async function(e){if((0,G.n4)(e)){const{origin:t}=e;(0,u.Pg)(e,{layout:t.layout,template:await(0,H.b)(t.template,e.parent)})}}(n),await(0,r.Ds)(n,o),await async function(e,t){const n=await R(e,t);return(0,u.Pg)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=Y[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,i.gx)(e,e.parent),r=(0,i.qX)(t);(0,u.Pg)(e,{...n,multiple:r,selectType:r?"checkbox":"radio"})}(n),await(0,X.m)(n),(0,u.dU)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=c[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,u.Pg)(e,n))}(n),(0,i.jJ)(n),await async function(e){(0,G.Kf)(e)&&await async function(e){if(!(0,u.vW)().realTimePreview)if((0,_.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,u.Pg)(t,{selected:!0,sortNo:1}),(0,K.OP)(0,e)}}else if((0,_.is)(e,Z.indexOf(e.type)>-1)&&!await(0,$.yv)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,G.sy)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,u.Pg)(n,{selected:!0}),(0,K.eq)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,h.a7)(n),n}async function re(e,t,n){const r=!(!t||!t.id);let i;e.showRewards&&(i=e.options.map((e=>({rewardName:e.rewardName,rewardCount:e.rewardCount}))));const o=r?e.success:e.fail,c=r?(0,a.Iu)(s.bn.lottery.congratulation):(0,a.Iu)(s.bn.lottery.pity),l=r?(0,a.Iu)(s.bn.lottery.goal):(0,a.Iu)(s.bn.lottery.fail),f=o.title||c,p=o.summary||l,h=(0,d.q)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let m;if(r){const n=e.options.find((e=>e.uuid===t.lottery_option_id));n&&(m=n.rewardName)}const g=te({target:e},n),v=await ne(g,n.current);return(0,u.Pg)(v,{rewardRaw:t,rewardTime:(0,z.GN)(),goal:r,rewardImage:h.name?h:void 0,rewardTitle:f,rewardDescribe:p,rewardList:i,rewardName:m,showRewards:e.showRewards}),!(0,u.vW)().preview&&r&&((0,u.dU)().app.canHandleReward()||"red_envelope"!==t.type||await ie(n,v)),v}async function ie(e,t){const{formalResult:{reward:n,authorizer:r},nodeList:o}=e,{app_id:a,component_appid:s}=r,c=(0,i.nv)(o,n.gift_id);t.linkUrl=await(0,l.sb)(c.linkUrl,{state:e}),t.endBtnText=c.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,g.ZI)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,u.dU)().app.getRewardUrl(d)}Y.region=async e=>{(0,u.Pg)(e,{indexes:"0 0 0",value:"",regions:await(0,o.JL)(),infoRange:e.origin.infoRange})},Y.end=async e=>{const{parent:t}=e,n=await(0,l.sb)(e.origin.linkUrl,{state:t});(0,u.Pg)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},Y.location=async e=>{(0,u.Pg)(e,{regions:await(0,o.JL)(),infoRange:e.origin.infoRange,value:""})},Y.value_mark=async e=>{(0,u.Pg)(e,{showInput:e.origin.showInput})},Y.icon_mark=async e=>{(0,u.Pg)(e,{inverseValue:e.origin.inverseValue})},Y.menu=async e=>{const{origin:t}=e;(0,u.Pg)(e,{placeholder:t.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect),display:x(t.menuType),lineCount:t.lineCount})},Y.area=async e=>{(0,u.Pg)(e,{infoRange:"street",regions:await(0,o.JL)()})},Y.verify=async e=>{(0,u.Pg)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},Y.weight=async e=>{const{origin:t,parent:n}=e,r=await(0,i.Vg)(t,n);(0,u.Pg)(e,{weightTotal:r,unit:t.unit,distributeBy:t.distributeBy})},Y.max_diff=async e=>{const{origin:t}=e,n=function(e){const{options:t,origin:n}=e,{taskCount:r,itemCountPerTask:i}=n,o=t.map((e=>({option:e,pickedTimes:0}))),a=[];for(let e=0;e<r;e++)a.push(I(o,i,e+1));return a}(e);(0,u.Pg)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,u.Pg)(e,{currentTask:J(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,u.Pg)(e,{currentTask:J(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,u.Pg)(e,{currentTask:t})}})},Y.slide_rate=async e=>{(0,u.Pg)(e,{currentOption:e.options[0],gotoNextOption(){(0,u.Pg)(e,{currentOption:J(e.options,e.currentOption,1)})},gotoPrevOption(){(0,u.Pg)(e,{currentOption:J(e.options,e.currentOption,-1)})},gotoOption(t){(0,u.Pg)(e,{currentOption:t})}})},Y.select_image=async e=>{(0,u.Pg)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},Y.cascade=async e=>{await k(e.parent,e),function(e){const t=[],n=e=>{t.push(e),e.list&&e.list.forEach((e=>n(e)))};n(e.cascade),e.options.forEach((n=>{if(n.origin.useComment){const i=t.find((e=>e.resultId===n.cascadePath));n.inputType=(0,r.kv)(i.option.origin,e.type)}}))}(e),T(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.i5)(e,e.options)},Y.hot_spot=async e=>{(0,u.Pg)(e,{...Q(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},Y.heat_map=async e=>{(0,u.Pg)(e,{...Q(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},Y.loop=async e=>{const{parent:t}=e;(0,p.kw)(e,t)||(e.varList=await(0,p.n0)(t,e))}},5286:(e,t,n)=>{"use strict";n.d(t,{m:()=>s,y:()=>a});var r=n(4248),i=n(5905),o=n(6935);async function a(e){const{parent:t,origin:n}=e,i=await(0,o.Ur)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,r.Pg)(e,{description:i})}async function s(e){(0,i.LK)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,i=await(0,o.Ur)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,r.Pg)(e,{title:i})}(e),await a(e))}},6970:(e,t,n)=>{"use strict";n.d(t,{b:()=>o}),n(3948);var r=n(4248),i=n(6935);async function o(e,t){if(!e)return{param:{}};const n=await(0,r.dU)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,i.e_)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},6866:(e,t,n)=>{"use strict";n.d(t,{pI:()=>R,p9:()=>A,VY:()=>z,nX:()=>V,_I:()=>F,VJ:()=>X,Yk:()=>M,g1:()=>q,f$:()=>j,p8:()=>W,a7:()=>D,O2:()=>G,sB:()=>H}),n(2707),n(3948);var r=n(1128),i=n(9564),o=n(3768),a=n(3251),s=n(9309),u=n(4248),c=n(3656),l=n(5159),d=n(5905);const f={};function p(e,t){t&&e&&(t.selected=e.selected,t.option.selected=e.selected,t.list&&e.list&&t.list.forEach((t=>{const n=e.list.find((e=>e.resultId===t.resultId));n&&p(n,t)})))}function h(e){return e?{selected:e.selected,resultId:e.resultId,list:e.list&&e.list.map((e=>h(e)))}:null}function m(e,t){t.startTime=e.startTime,t.costTime=e.costTime,t.type=e.type,function(e,t){t.validateFailTimes=e.validateFailTimes,t.validateFailed=e.validateFailed}(e,t)}f.max_diff={cache(e,t){t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({uuid:e.option.uuid,value:e.value,round:e.round}))),done:e.done}))),t.currentTaskIndex=e.tasks.indexOf(e.currentTask)},use(e,t){e.tasks&&(t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({option:(0,r.cW)(t.options,e.uuid),value:e.value,round:e.round}))),done:e.done}))),t.currentTask=t.tasks[e.currentTaskIndex||0])}},f.slide_rate={use(e,t){t.currentOption=t.options[e.currentTaskIndex||0]},cache(e,t){t.currentTaskIndex=e.options.indexOf(e.currentOption)}},f.cascade={use(e,t){p(e.cascade,t.cascade)},cache(e,t){t.cascade=h(e.cascade)}},f.verify={borrow(e,t){t.code=e.code,t.phoneNumber=e.phoneNumber}},f.region={borrow(e,t){t.indexes=e.indexes,t.position=e.position,t.value=e.value}},f.location=f.area={borrow(e,t){f.region.borrow(e,t),t.succeed=e.succeed,t.failed=e.failed,t.failedSkipActivated=e.failedSkipActivated}},f.sequence={use(e,t){e.rankList&&t.options.sort(((t,n)=>e.rankList.indexOf(t.uuid)>e.rankList.indexOf(n.uuid)?1:-1))},cache(e,t){t.rankList=e.options.map((e=>e.uuid))}},f.heat_map={use(e,t){t.clickTimes=e.options.length}};const g=["select","select_icon","select_image","menu","hot_spot"];var v=n(5753),y=n(6064);const w={};function _(e,t,n){t.value=e.value,t.selected=e.selected,e.assistValue&&(t.assistValue=t.assistValue||{},Object.keys(e.assistValue).forEach((n=>{(0,y.O2)(e.assistValue[n])||(t.assistValue[n]=e.assistValue[n])})),"cache"===n&&0===Object.keys(t.assistValue).length&&delete t.assistValue)}function b(e,t,n){if(_(e,t,"use"),!t.isOtherOpt){const r=w[n];r&&(r.use?r.use(e,t):r.borrow&&r.borrow(e,t))}}w.max_diff={borrow(e,t){e.records&&(t.records=e.records.map((e=>({...e}))))}},w.sequence={borrow(e,t){t.sortNo=e.sortNo}},w.heat_map={borrow(e,t){e.point&&(t.point={...e.point})}},w.weight={borrow(e,t){t.percent=e.percent}},w.upload={borrow(e,t){t.fileName=e.fileName,t.fileType=e.fileType,t.filePath=e.filePath,t.isImage=e.isImage},cache(e,t){w.upload.borrow(e,t),t.value=e.miniValue||e.value},use(e,t){w.upload.borrow(e,t),t.fileName&&(0,v.SV)(t,e)}};var x=n(5721);let T=!1,k="";const S=["data","describe","logic","random","loop"];let I,O,E,C,P={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function L(e){const{offlineTaskId:t,preview:n}=(0,u.vW)();if(n)return"preview_cache_"+(0,c.pC)(e);{const n="response_cache_"+(0,c.pC)(e);return t?n+"_with_"+t:n}}function N(e,t){const n={};return function(e,t,n){if(t.uuid=e.uuid,_(e,t,"cache"),!e.isOtherOpt){const r=w[n];r&&(r.cache?r.cache(e,t):r.borrow&&r.borrow(e,t))}}(e,n,t),n}function R(e){if((0,u.dU)().dev.infer||T)return;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,r.eu)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),P.error[e.renderId]=t}async function A(e){if((0,u.dU)().dev.infer||T)return;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return;const t={};!function(e,t){m(e,t);const n=f[t.type];n&&(n.cache?n.cache(e,t):n.borrow&&n.borrow(e,t))}(e,t);const n=(0,o.py)(e);if(n&&n.items){const r=n.items.map((e=>e.option_id.toLowerCase())),i=e=>!!n.items&&r.includes(e.uuid.toLowerCase());(0,d.Kf)(e)&&(t.options=e.options.filter(i).map((t=>N(t,e.type)))),(0,d.sy)(e)&&(t.otherOptions=e.otherOptions.filter(i).map((t=>N(t,e.type))))}P.responseId=e.parent.transactionID,P.data[e.renderId]=t;const r=e.parent.randomList;r&&(P.randomList=r.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),P.randomAbandonedNodeIds=(0,x.Ym)()),await U(e.parent)}async function U(e){const{sid:t,renderList:n}=e,r=L(t);P.locale=(0,l.BH)();const i=Object.keys(P.data);P.count=0;for(const e of n)if(i.includes(e.renderId)&&(P.count+=1),e.renderId===P.point)break;await(0,u.dU)().storage.setVital(r,JSON.stringify(B(P)))}async function M(e){const t=L(e),n=await(0,u.dU)().storage.getVital(t);if(n){const e=JSON.parse(n);return k||(k=e.locale),e}return null}function B(e){const t=e.data,n={};return Object.keys(t).forEach((e=>{const r={...t[e]};"upload"===r.type&&(r.options=r.options.map((e=>((e={...e}).miniValue&&(e.value=e.miniValue,delete e.miniValue),e)))),n[e]=r})),{...e,data:n}}function D(e){if((0,u.dU)().dev.infer)return e;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return e;!function(e){const t=P.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,r.eu)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=P.data[e.renderId];return t?(function(e,t,n){const i=(0,r.eu)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of i){const t=(0,r.cW)(o,e.uuid);t&&b(t,e,n)}}(e,t,e.type),function(e,t){m(e,t);const n=f[t.type];n&&(n.use?n.use(e,t):n.borrow&&n.borrow(e,t))}(t,e),function(e){if((0,i.qX)(e.origin)||!(0,d.Kf)(e))return;let t=(0,d.sy)(e)?e.otherOptions:[];g.includes(e.type)&&(t=[...t,...e.options]);const n=t.filter((e=>e.selected));if(n.length<=1)return;const r=[];n.forEach((e=>{e.autoSelectMarked?(0,u.Pg)(e,{selected:!1,autoSelectMarked:!1}):r.push(e)})),r.length>1&&r.forEach(((e,t)=>{t<r.length-1&&(0,u.Pg)(e,{selected:!1})}))}(e),I&&I(e),e):(I&&I(e),e)}function F(e=!1){return e?B(P):P}async function j(e,t,n){P=e,E=[...e.randomList||[]],(0,x.Ns)(e.randomAbandonedNodeIds,t.nodeList),C=e.point;const r=P.count;let i=0;T=!0,I=()=>{i>=r?O({failed:!1,error:""}):(n.onProgress("".concat(i,"/").concat(r)),i++)},O=e=>{o(),I=null,O=null,a.s$.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.s$.off("NEXT_OK",c),a.s$.off("STRETCH_OK",c),a.s$.off("NEXT_OK",u),T=!1},u=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():O({failed:!0,error:t})},c=()=>t.current.renderId===C?O({failed:!1,error:""}):t.handleEvents.handleNextClick();a.s$.one("STRETCH_OK",c),a.s$.on("NEXT_FAIL",u),a.s$.on("NEXT_OK",c),a.s$.trigger("START_MEMORY"),await(0,s.$A)()}function W(e,t){if(!E)return e;const n=E.find((e=>e.nodeId===t.nodeUuid));if(!n)return e;const r=n.destPortIds,i=[],o=[];return e.forEach((e=>{r.includes(e)?i.push(e):o.push(e)})),i.sort(((e,t)=>r.indexOf(e)>r.indexOf(t)?1:-1)),[...i,...o]}function q(){P={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function z(e){q();const t=L(e.sid);await(0,u.dU)().storage.removeVital(t)}async function V(e,t){t.forEach((e=>{delete P.data[e]})),await U(e)}function G(e){T||(P.point=e.current.renderId)}async function H(e){G(e),await U(e)}async function X(e){return e?(k||await M(e),k):""}},3803:(e,t,n)=>{"use strict";n.d(t,{m:()=>l,q:()=>d});var r=n(6866),i=n(9026),o=n(4248),a=n(7550),s=n(5159);class u{constructor(e,t){if(e&&e.data&&Object.keys(e.data).length>0){const{langResume:n}=t;this.holder=e,this.state=t,this.show=!0,this.title=n?(0,a.Iu)(s.bn.langResume.title):(0,a.Iu)(s.bn.memory.title),this.message=n?"":(0,a.Iu)(s.bn.memory.message),this.sureText=n?"":(0,a.Iu)(s.bn.memory.sure),this.denyText=n?"":(0,a.Iu)(s.bn.memory.deny)}}async handleSure(){if(!this.holder||d())return;const e=this;return this.state.enterMode="resume",(0,o.Pg)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,i.Ts)(this.state,e.holder.responseId||""),await(0,o.dU)().hook.onResumeSurvey(this.state),(0,r.f$)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.Pg)(e,{show:!0}),(0,o.Pg)(e,{message:t})},onSuspend(){e.suspend()}})}async handleDeny(){d()||(await(0,o.dU)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.Pg)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.Pg)(this,{show:!1})}}let c=null;async function l(e){const t=await(0,r.Yk)(e.sid);return c=new u(t,e),c}function d(){return c&&c.resuming}},698:(e,t,n)=>{"use strict";n.d(t,{V:()=>i,z:()=>o});var r=n(4248);function i(){return{primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}}function o(e={primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}){e.error=e.error||e.contrast,e.button=e.button||e.contrast,(0,r.vW)().theme=e,(0,r.vW)().setTheme(e)}},6213:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(4248),i=n(3656);function o(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat("prs-").concat((0,i.pC)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:r,color:i,fontSize:o,italic:a,lineThrough:s,underline:u}=e;return n&&(t+="background-color: ".concat(n,";")),i&&(t+="color: ".concat(i,"; ")),r&&(t+="font-weight: bold;"),a&&(t+="font-style: italic;"),s&&(t+="text-decoration: line-through;"),u&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,r.dU)().ui.setPresetStyle(t,e)}},4248:(e,t,n)=>{"use strict";n.d(t,{IO:()=>c,JN:()=>u,Pg:()=>f,dU:()=>l,vW:()=>d});var r=n(3251),i=n(3656);let o=null,a=null;const s=(0,i.Ds)((()=>r.s$.trigger("SET_PROPS")),1e3/60);function u(e){a=e}function c(e){o=e}function l(){if(!a)throw new Error("Env not yet initialized");return a}function d(){if(!o)throw new Error("Client not yet initialized");return o}function f(e,t){e&&t&&(Object.keys(t).forEach((n=>{e[n]=t[n]})),o.silentSetter||s())}r.s$.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},3087:(e,t,n)=>{"use strict";function r(e){if(!e)return"00:00";const t=e%60;return i((e-t)/60)+":"+i(t)}function i(e){let t=e+"";return 1===t.length&&(t="0"+t),t}function o(){const e=new Date;return e.getFullYear()+"-"+i(e.getMonth()+1)+"-"+i(e.getDate())+" "+i(e.getHours())+":"+i(e.getMinutes())+":"+i(e.getSeconds())}n.d(t,{GN:()=>o,IA:()=>r,bi:()=>i})},2812:(e,t,n)=>{"use strict";n.d(t,{BT:()=>u,Hd:()=>a,JL:()=>s,ks:()=>c});var r=n(5142);let i;function o(e){e.forEach((e=>{e.cities&&0!==e.cities.length||(e.cities=[{name:e.name,code:e.code,areas:[{name:e.name,code:e.code}]}]),e.cities.forEach((e=>{e.areas&&0!==e.areas.length||(e.areas=[{name:e.name,code:e.code}])}))}))}function a(e){i=e,o(i)}async function s(){return i||(i=await(0,r.vT)("https://media.choiceform.com/static-assets/regions-2020.json",{type:"GET"},!0),o(i)),i}function u(e){if(!e)return"";const t=e.split("-"),n=t[0],r=i.find((e=>n.indexOf(e.name)>-1));if(!r)return"";const o=r?r.code+"":"",a=t[1];if(!a)return o;const s=r.cities.find((e=>a.indexOf(e.name)>-1));if(!s)return o;const u=s?s.code+"":"",c=t[2];if(!c)return u;const l=s.areas.find((e=>c.indexOf(e.name)>-1));return(l?l.code+"":"")||u||o||""}function c(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,r=i[t[0]];let o,a,s=r.name;return n>1&&(o=r.cities[t[1]],s+="-"+o.name,n>2&&(a=o.areas[t[2]],s+="-"+a.name)),s}},2125:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(4248);function i(e,t){return new(0,(0,r.dU)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},7550:(e,t,n)=>{"use strict";n.d(t,{$1:()=>m,HP:()=>y,Iu:()=>v,P_:()=>g,Vj:()=>f,nE:()=>p,u4:()=>h}),n(5306);var r=n(3251),i=n(5159),o=n(4248),a=n(6539),s=n(9141);const u=["zh_cn","en_us"];function c(){const{offline_survey_id:e}=(0,a.ZI)(),t="language";return e?t+e:t}async function l(){return(0,o.dU)().storage.getVital(c())}function d(e,t){return!!t&&e.some((e=>e.locale===t))}async function f(e,t){const n=await l();if(d(e,n))return n;const r=function(){const e=(0,o.dU)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.Z.langTable.find((e=>e.locale.startsWith(t)));return n?n.locale:t}(e):"en_us"}();return d(e,r)?r:t}async function p(e,t){return e!==await l()&&(m(e,!0),await async function(e){return(0,o.dU)().storage.setVital(c(),e)}(e),(0,o.dU)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.dU)().storage.set("lang-resume","true"),(0,o.dU)().hook.beforeForceLeave(),(0,o.dU)().app.reload(),!0)}function h(e){let t="en_us";u.includes(e)&&(t=e),i.i_(t),(0,o.vW)().setLocale(t),r.s$.trigger("LANG_CHANGE");const n=s.Z.langTable.find((t=>t.locale===e));(0,o.dU)().hook.onLangChange(n)}function m(e="en_us",t=!1){return t||h(e),e}function g(e){return e.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((e,t,n)=>"{".concat(t,"} ").concat(n)))}function v(e,t){return t?(0,o.dU)().system.translate(e,t):e}function y(e,t){const n=e&&t.length>1&&null===(0,o.dU)().storage.get("anti-show-init-lang-select");return(0,o.dU)().storage.remove("anti-show-init-lang-select"),!!n}},9271:(e,t,n)=>{"use strict";n.d(t,{J:()=>o,q:()=>a});var r=n(4665),i=n(4248);function o(e){return(0,i.vW)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:i,id:a,originName:s}=e,u=o(i);return{ratio:Math.round(n/t*1e5)/1e5,url:u,natural:(0,r.p)(u,"@m720"),thumbnail:(0,r.p)(u,"@avatar"),large:(0,r.p)(u,"@m1080"),width:t,height:n,id:a,originName:s,name:i}}},2167:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9141);async function i(e){return"string"==typeof e?JSON.parse(r.Z.inflateBase64(e)):e}},248:(e,t,n)=>{"use strict";n.d(t,{eb:()=>m,iZ:()=>h,mj:()=>g,pe:()=>p,ub:()=>v}),n(3948);var r=n(3656),i=n(7492),o=n(5905);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&i.b.forEach((n=>{const r=e.mapping[n];r&&"object"==typeof r||(e.mapping[n]=t.mapping[n]||"")}))}function u(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.RE)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((i=>{const o=n.find((e=>(0,r.pC)(e.uuid)===i));o&&function(e,t,n){(function(e,t){return!(e.isRef||!e.isOtherOpt&&["cascade","region","area","location"].includes(t.type))})(e,n)&&(e.text=t.text||""),e.optComment=t.optComment||"",s(e,t),e.selectText=t.selectText,e.autoInputConfig&&t.autoInputConfig&&(e.autoInputConfig.defaultValue=t.autoInputConfig.defaultValue||"")}(o,t.options[i],e)}))}function c(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),u(e,t),c(e.validation,t.validation),function(e,t){const{optionGroups:n}=e;if(!n)return;const i=t.optionGroups||{},o=e=>{e.forEach((e=>{if((0,r.is)(e,"group"===e.type)){const t=(0,r.pC)(e.uuid),n=i[t];n&&(e.groupTitle=n.groupTitle);const a=e.children||[];o(a)}}))};o(n)}(e,t)}const d={};function f(e,t){e.value=t.value||""}function p(e,t={}){const{nodes:n,variables:i,groups:o}=t,{nodes:a,variables:s,groups:u}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],i=a.find((t=>t.nodeUuid&&(0,r.pC)(t.nodeUuid)===e));i&&function(e,t){const n=d[e.type];n?n(e,t):l(e,t)}(i,t)})),s&&i&&Object.keys(i).forEach((e=>{const t=i[e],n=s.find((t=>(0,r.pC)(t.uuid)===e));n&&f(n,t)})),u&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=u.find((t=>(0,r.pC)(t.id)===e));n&&function(e,t){e.prevText=t.prevText||"",e.nextText=t.nextText||""}(n,t)}))}function h(e,t){e&&e.forEach((e=>{e.data.forEach((e=>{const n=e[t];n&&(e.name=n)}))}))}function m(e,t){t&&d.start(e,t)}function g(e,t){t&&d.gift(e,t)}function v(e,t){t&&f(e,t)}d.end=(e,t)=>{a(e,t),e.endBtnText=t.endBtnText||""},d.gift=(e,t)=>{a(e,t),e.activityName=t.activityName||"",e.endBtnText=t.endBtnText||"",e.blessings=t.questionText||""},d.loop=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const i=e.options.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.lottery=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const i=e.options.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.rewardName=t.options[n].rewardName)})),t.success&&(e.success.title=t.success.title||"",e.success.summary=t.success.summary||""),t.fail&&(e.fail.title=t.fail.title||"",e.fail.summary=t.fail.summary||"")},d.value_mark=(e,t)=>{l(e,t),e.minText&&(e.minText=t.minText||"",e.maxText=t.maxText||"")},d.menu=(e,t)=>{l(e,t),e.placeholder=t.placeholder||""},d.start=(e,t)=>{e.questionText=t.questionText||"",e.startName=t.startName||"",e.logoText=t.logoText||"",e.startBtnText=t.startBtnText||"",e.nextBtnText=t.nextBtnText||"",e.prevBtnText=t.prevBtnText||"",e.timeoutText=t.timeoutText||"",e.timeLessText=t.timeLessText||"",c(e.validation,t.validation)},d.slide_rate=(e,t)=>{l(e,t),(t.options||e.rateOptions)&&Object.keys(t.options).forEach((n=>{const i=e.rateOptions.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),c(e.validation,t.validation),t.options){let n=[];e.optionsX&&(n=[...n,...e.optionsX]),e.optionsY&&(n=[...n,...e.optionsY]),e.otherOptions&&(n=[...n,...e.otherOptions]);const i=e.options||[];Object.keys(t.options).forEach((e=>{const o=t.options[e],a=i.find((t=>(0,r.pC)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,r.pC)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{u(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},8413:(e,t,n)=>{"use strict";function r(e,t="-",n="street"){let r=e.province;return"province"!==n&&e.city&&(r+=t+e.city,"city"!==n&&e.district&&(r+=t+e.district,"county"!==n&&(e.street&&(r+=t+e.street),e.street_number&&(r+=e.street_number)))),r}function i(e){return e*(Math.PI/180)}function o(e,t){const n=i(t.lat-e.lat),r=i(t.lng-e.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(i(e.lat))*Math.cos(i(t.lat))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(t,{L:()=>r,S:()=>o})},3656:(e,t,n)=>{"use strict";n.d(t,{BY:()=>u,DQ:()=>g,Ds:()=>_,Dy:()=>l,FL:()=>y,M8:()=>d,RC:()=>p,Rf:()=>T,Tm:()=>v,XJ:()=>m,_v:()=>x,am:()=>c,is:()=>s,kr:()=>a,p$:()=>w,pC:()=>f,s$:()=>b,sG:()=>o,xT:()=>h}),n(2707),n(5306),n(8206),n(3948);var r=n(6064);const i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function o(e){return e.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(e){return e.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(e,t){return t}function u(e=1,t=5){const n=h(e,t),r=i.length;let o="";for(let e=0;e<n;e++){const e=h(0,r);o+=i[e]}return o}function c(e,t){if(36!==e.length)throw new Error("invalid uuid");return t?l(e,t.map((e=>f(e.varList[e.currentIndex].uuid)))):e}function l(e,t){if(36!==e.length)throw new Error("invalid uuid");return t&&t.forEach((t=>{e+="-"+f(t)})),e}function d(){const e=new Array(36);let t,n=0;for(let r=0;r<36;r++)8==r||13==r||18==r||23==r?e[r]="-":14==r?e[r]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,e[r]=i[19==r?3&t|8:t]);return e.join("").toLowerCase()}function f(e){return e.substring(e.length-8)}function p(e="",t=""){return e=e.toLowerCase(),t=t.toLowerCase(),8===e.length&&36===t.length?e===f(t):36===e.length&&8===t.length?f(e)===t:e===t}function h(e,t){return e>t&&([e,t]=[t,e]),e+m(t-e+1)}function m(e){return Math.floor(Math.random()*e)}function g(e,t){const n=[...e];if((0,r.O2)(t))return n;if(0===(t=Number(t)))return[];if(t<0||isNaN(t))return n;if(1===t)return n.splice(m(n.length),1);const i=[];for(n.length<t&&(t=n.length);i.length<t;){const e=m(n.length);i.push(n.splice(e,1)[0])}return i}function v(e,t){e&&"object"==typeof e&&Object.keys(e).forEach((n=>{const r=e[n];Array.isArray(r)&&r.forEach((e=>{v(e,t)})),"object"==typeof r&&v(r,t),t(e,n)}))}function y(e,t){if(e<t)throw new Error("can not random distribute");const n=function(e,t){const n=[];for(;n.length<t;){const t=h(1,e-1);n.includes(t)||n.push(t)}return n.sort(((e,t)=>e>t?1:-1)),n}(e,t-1),r=n.map(((e,t)=>e-(n[t-1]||0)));return r.push(e-n[n.length-1]),r}function w(e){const t=new WeakMap;return function e(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((t=>e(t)));const r=t.get(n);if(r)return r;const i={};return t.set(n,i),Object.keys(n).forEach((t=>{i[t]=e(n[t])})),i}(e)}function _(e,t=0){let n=-1;return function(...r){const i=this;clearTimeout(n),n=setTimeout((()=>{e.apply(i,r)}),t)}}async function b(e,t,n){const r=[];e.replace(t,((e,...t)=>(r.push(n(e,...t)),e)));const i=await Promise.all(r);return e.replace(t,(()=>i.shift()))}function x(e=0){return new Promise((t=>setTimeout(t,e)))}async function T(e){return e}},5905:(e,t,n)=>{"use strict";function r(e){return!!e.origin.layout}function i(e){const t=e.origin;return void 0!==t.questionText||void 0!==t.describe}function o(e){return!!e.origin.options}function a(e){return!!e.origin.optionGroups}function s(e){return!!e.origin.fillType}function u(e){return!!e.otherOptions}function c(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{Ck:()=>s,Kf:()=>o,LK:()=>i,QM:()=>c,RE:()=>u,iN:()=>d,n4:()=>r,sy:()=>l,ub:()=>a})},6064:(e,t,n)=>{"use strict";function r(e){return o(e)?"":String(e)}function i(e){if(o(e))return"";const t=Number(e);return isNaN(t)?e:t}function o(e){return e instanceof Array?0===e.length:"boolean"!=typeof e&&0!==e&&!e}n.d(t,{KF:()=>r,O2:()=>o,Xm:()=>i})},4665:(e,t,n)=>{"use strict";n.d(t,{D:()=>o,p:()=>i});var r=n(7428);function i(e,t){return e.endsWith(".svg")||(0,r.s)()?e:e+t}function o(e=[]){const t=[];return e.includes("video")&&t.push("video/*"),e.includes("audio")&&t.push("audio/*"),e.includes("image")&&t.push("image/*"),e.includes("doc")&&t.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),t.join()}},3756:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(5159),i=n(7550);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,i.Iu)(r.bn.reward.weChatName)}}},866:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(4248);const i=["beforecopy","beforepaste","beforecut","copy","paste","cut","animationstart","animationend","animationiteration","transitionend","scroll","wheel","blur","click","dblclick","focus","focusin","focusout","input","keypress","keyup","keydown","select","change","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","touchcancel","touchend","touchmove","touchstart","unload","cancel","close","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","loadedmetadata","loadeddata","durationchange","timeupdate","play","pause","ratechange","volumechange","suspend","emptied","stalled","invalid","reset","submit","invalid","reset","submit","show","contextmenu","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","webglcontextcreationerror","webglcontextlost","webglcontextrestored","error","load","loadend","loadstart","progress"];function o(e){if("SCRIPT"===e.tagName)e.parentElement&&e.parentElement.removeChild(e);else{i.forEach((t=>{e.removeAttribute("on"+t)}));for(let t=e.children.length-1;t>=0;t--){const n=e.children[t];1===n.nodeType&&o(n)}}}function a(e){if(!e||e.includes("data-safe-html="))return e;const t=(0,r.dU)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},2872:(e,t,n)=>{"use strict";function r(e){const t={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(e){const n=JSON.parse(e);return{...t,...n}}return t}n.d(t,{BB:()=>o,X8:()=>i,gh:()=>a,m5:()=>r});const i=e=>{if(!e)return!1;const{limitSrc:t,limitType:n,limitStart:r,limitEnd:i}=e;return!(!t||!n||1==n&&"0"==r&&"0"==i)};function o(e){const t=function(e){if(!e)return e;const t={};return e.phParams&&e.phParams.length>0&&(t.phParams=e.phParams),i(e)&&(t.limitSrc=e.limitSrc,t.limitType=e.limitType,t.limitStart=e.limitStart,t.limitEnd=e.limitEnd),"-1"!=e.limitRnd&&(t.limitRnd=e.limitRnd),e.disorder&&(t.disorder=e.disorder),e.outOfResult&&(t.outOfResult=e.outOfResult),Number(e.imgHeight)&&(t.imgHeight=e.imgHeight),Number(e.imgWidth)&&(t.imgWidth=e.imgWidth),0===Object.keys(t).length?void 0:t}(e);return t?JSON.stringify(t):""}function a(e){const t={};return e.forEach((e=>{t[e.name]=e.value})),t}},3608:(e,t,n)=>{"use strict";n.d(t,{B3:()=>u,BF:()=>g,Kz:()=>h,L7:()=>c,MD:()=>d,XY:()=>p,mh:()=>m}),n(5306);var r=n(6935),i=n(9271),o=n(3656),a=n(7117),s=n(4248);function u(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.indexOf("TO_GLOBAL")>-1&&"var-html"===e.type&&(t+=(0,r.IY)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.dU)().ui.setGlobalStyle(t)}(e.variables),function(e){if(e){const t=l(e.allJson,null)+l(e.strJson,"var-string")+l(e.expJson,"var-expression")+l(e.reqJson,"var-request")+l(e.loopJson,"var-loop");(0,s.dU)().ui.setVarStyle(t,e)}}(e.varStyles)}function c(e){let t="";return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline?t+="text-decoration: underline;":e.lineThrough&&(t+="text-decoration: line-through;"),e.color&&(t+="color: ".concat(e.color,";")),e.backgroundColor&&(t+="background-color: ".concat(e.backgroundColor,";")),e.fontSize&&(t+="font-size: ".concat(e.fontSize,";"),t+="line-height: 1.4;"),t}function l(e,t){if(!e)return"";let n=t?".var-light.".concat(t,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=c(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:g((0,i.J)(this.serverFileName),t.config,this.fileName)};e.forEach((e=>{e.getText=t,e.isMedia=!0,e.type="var-media"}))}function f(e){if(e)return{...e,identity:{baseId:e.uuid}}}function p(e="",t){return f(t.find((t=>t.name===e)))}function h(e="",t){return t.find((t=>(0,o.RC)(t.id,e)))}function m(e="",t){let n;const r=h(e,t.imageList);return r?n={...r,type:"var-media",uuid:r.id,name:""}:(n=t.variables.find((t=>(0,o.RC)(t.uuid,e))),n||(n=(0,a.jd)(e))),f(n)}function g(e="",t={imgHeight:0,imgWidth:0},n="Image",r=!1){let i="##"+e;return r||(i+="?w=".concat(t.imgWidth||0,"&h=").concat(t.imgHeight||0),n&&(i+="#"+n)),i+"##"}},7089:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,c:()=>i}),n(5306);const r=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function i(e){return e.baseId?e.baseId:r.map((t=>e[t]||"")).join(":").replace(/:+$/,"")}function o(e){if(!e.includes(":"))return{baseId:e};const t=e.split(":"),n={};return t.forEach(((e,t)=>{const i=r[t];n[i]=e})),n}},7712:(e,t,n)=>{"use strict";n.d(t,{DC:()=>L,Dy:()=>C,HX:()=>_,Hz:()=>E,KP:()=>N,Lr:()=>P,Sq:()=>b,V0:()=>I,b:()=>x,ck:()=>k,g:()=>T,is:()=>R,sP:()=>S,sb:()=>A,wc:()=>O}),n(3948);var r=n(6935),i=n(3146),o=n(3656),a=n(5750),s=n(1128),u=n(656),c=n(3608),l=n(7117),d=n(6064),f=n(4248),p=n(7089),h=n(2872),m=n(9758),g=n(7529),v=n(3817),y=n(9564),w=n(7552);function _(e){e=(0,m.Ko)(e);const t=(0,f.dU)().system.newDiv();return t.innerHTML=e,t}function b(e="",t){return t||(t=_(e)),[...t.querySelectorAll(".var-tag")]}function x(e=""){return String(e).indexOf("var-tag")>-1}function T(e){return(0,o.is)(e,1===e.nodeType)&&e.classList.contains("var-tag")}function k(e,t=""){const{loopStack:n,context:r}=e;let{renderList:i}=e;const a=(0,y.KF)(e,t);if(!a)return;const s=(0,o.am)(a,n);return r.node&&(i=[...i,r.node]),i.find((e=>s.startsWith(e.renderId)))}function S(e,t,n,r){if(!n)return null;const i=[n];r&&i.push(r);const a=(0,y.KF)(e,t);if(!a)return;const s=(0,o.Dy)(a,i);return(0,g.JL)(e.renderList,s)}function I(e){return{name:e.innerText,identity:(0,p.Q)(e.getAttribute("data-v-id")),config:(0,h.m5)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function O(e,t){return C(e,I(t))}function E(e){const{identity:t,config:n}=e;let r=(0,p.c)(t);if(!n)return r;if((0,h.X8)(n)){const{limitSrc:e,limitType:t,limitStart:i,limitEnd:o}=n;r+="_".concat(e,"_").concat(t,":").concat(i,":").concat(o)}const{limitRnd:i,phParams:o}=n;if((0,d.O2)(i)||"-1"==i||(r+="_".concat(i)),!(0,d.O2)(o)){const e=(0,h.gh)(o);r+="_".concat(JSON.stringify(e))}return r}function C(e,t){const n=E(t={...t,config:t.config||{}}),{identity:r,config:i,name:o,inEdist:a}=t,d=(0,p.c)(r),f={identity:r,config:i},{baseId:h,nodeId:m,nodePartId:g,optFilterId:y,optId:w,optPartId:_,loopRoundId:b,innerLoopRoundId:x}=r;if(h){if(A(h)){const[e,t]=h.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,c.mh)(h,e);return t?{...f,...t,name:o,mapId:n,inEdist:a}:null}let T,I="";if(b){if((0,v.N)(r))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(T=S(e,m,b,x),!T)return}else if(u.hi(g))I=m;else if(T=k(e,m),!T)return;if(g){const e=(0,l.jd)(g);return e&&{...f,uuid:d,name:o,node:T,nodePart:e,lookupLoopNodeId:I,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const O=(0,l.jd)(_,T);if(!O)return;const C="var-media"===O.type;if(y){const e=(0,l.jd)(y,T);if(!e)return;return{...f,inEdist:a,name:o,node:T,optionPart:O,optionFilter:e,uuid:d,lookupLoopNodeId:I,isMedia:C,type:O.type,mapId:n}}const P=(0,s.cW)((0,s.Kn)(T),w);return P?{...f,inEdist:a,name:o,node:T,option:P,optionPart:O,uuid:d,lookupLoopNodeId:I,isMedia:C,type:O.type,mapId:n}:void 0}async function P(e,t){let n=[];const{varInfo:{optionFilter:s,option:u,config:c}}=e,l=await(0,r.Ob)(c.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||u;n=d&&await(0,i.D)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.DQ)(n,l);return c.disorder?(0,a.T_)(f):f}async function L(e){const{varInfo:{nodePart:t,optionPart:n,option:r}}=e,o=e.specifiedOpt||r;if(t&&t.getBool)return t.getBool(e);if(o)return await(0,i.D)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await P(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});t&&r.push(t)}return r.length>0}}async function N(e){const{varInfo:{nodePart:t,optionPart:n,option:r}}=e,o=e.specifiedOpt||r,a=e.joinBy||" ";if(t&&t.getText)return t.getText(e);if(o)return await(0,i.D)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await P(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});(0,d.O2)(t)||r.push(t)}return r.join(a)}}async function R(e){const t={};t.text=await N(e);const n=await async function(e){const{varInfo:{nodePart:t,optionPart:n,option:r,isMedia:o}}=e;if(!o)return[];const a=e.specifiedOpt||r;if(t&&t.getImages)return t.getImages(e);if(a)return await(0,i.D)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await P(e),r=[];if(n.getImages)for(const i of t){const t=await n.getImages({...e,specifiedOpt:i});r.push(t[0])}return r}}(e);t.image=n[0];const r=(await async function(e){const{varInfo:{optionPart:t,option:n}}=e;if(!t)return[];const r=e.specifiedOpt||n;if(r)return await(0,i.D)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:r})]:[];{const n=await P(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e))[0];return r&&(t.normalIconUrl=r,t.activeIconUrl=(0,w.rI)(r)),t}function A(e){return e&&e.startsWith("URL_PARAM=")}},656:(e,t,n)=>{"use strict";n.d(t,{HG:()=>b,WE:()=>d,_Z:()=>x,gH:()=>l,hi:()=>p,nk:()=>f,qS:()=>h}),n(5306);var r=n(3656),i=n(3608),o=n(7117),a=n(5336),s=n(6064),u=n(7492);let c;function l(e){const{loopStack:t}=e;return t?t[t.length-1]:null}function d(e,t,n){const{state:{loopStack:i}}=e,o=i&&i[t];if(o){const e=o.replacements[t];if(e)return(0,r.Rf)(n(e))}return(0,r.Rf)(n())}async function f(e,t){const{varInfo:{lookupLoopNodeId:n,config:i},state:o}=e,a=l(o);if(!a)return"";const s=h(n,a.replacements);return(0,r.Rf)(t(s,i))}function p(e){return function(){if(!c){const e=(0,o.SN)();c=[],Object.keys(e).forEach((t=>{const{uuid:n,type:r}=e[t];"var-loop"===r&&c.push(n)}))}return c}().indexOf(e)>-1}function h(e,t){return t.find((t=>(0,r.RC)(t.loopNodeId,e)))}function m(e,t={imgHeight:0,imgWidth:0}){if(e){const{imgHeight:n,imgWidth:r}=t;let i=void 0===e.refText?e.text:e.refText;return i.match(/^##.+##$/)&&0!==n&&0!==r&&(i=i.replace(/\?w=0&h=0/,"?w=".concat(r||0,"&h=").concat(n||0))),i}return""}function g(e,t){if(e&&e.image){const{image:n}=e;return(0,i.BF)(n.url,t)}return""}function v(e){return e&&(0,s.KF)(e.index+1)}function y(e){return e&&e.value}function w(e){return e&&(0,s.KF)(e.number)}function _(e){return e&&e.label}function b(e){e.C_OL_TXT.getText=e=>d(e,0,m),e.C_OL_IDX.getText=e=>d(e,0,v),e.C_OL_NUM.getText=e=>d(e,0,w),e.C_OL_VAL.getText=e=>d(e,0,y),e.C_OL_LBL.getText=e=>d(e,0,_),e.C_IL_TXT.getText=e=>d(e,1,m),e.C_IL_IDX.getText=e=>d(e,1,v),e.C_IL_NUM.getText=e=>d(e,1,w),e.C_IL_VAL.getText=e=>d(e,1,y),e.C_IL_LBL.getText=e=>d(e,1,_),u.b.forEach((t=>{!function(t){const n=t.split("_")[1],r="C_IL_MAP_"+n,i=(e,n)=>d(e,n,(n=>{if(!n)return"";const{mapping:r}=n;return(0,a.T)(r,t,e)}));e["C_OL_MAP_"+n].getText=e=>i(e,0),e[r].getText=e=>i(e,1)}(t)}))}function x(e){e.LOOP.getText=e=>f(e,m),e.LOOP_IMG.getText=e=>f(e,g),e.LOOP_INDEX.getText=e=>f(e,v),e.LOOP_NUM.getText=e=>f(e,w),e.LOOP_VAL.getText=e=>f(e,y),e.LOOP_LBL.getText=e=>f(e,_),u.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.T)(n.mapping,t,e)))}(t)}))}},7117:(e,t,n)=>{"use strict";n.d(t,{SN:()=>x,jd:()=>_,tQ:()=>m}),n(5306),n(3948);var r=n(5336),i=n(3608),o=n(7712),a=n(1128),s=n(6064),u=n(7492);var c=n(3146),l=n(3022),d=n(2872);var f=n(7666),p=n(656),h=n(9141);const m="waiting fo extend";let g=!1;Math.avg=(...e)=>{let t=0;const n=e.length;for(let r=0;r<n;r++)t+=Number(e[r]);return t/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:m},MONTH:{uuid:"MONTH",type:"var-string",getText:m},DATE:{uuid:"DATE",type:"var-string",getText:m},DAY:{uuid:"DAY",type:"var-string",getText:m},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:m},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:m},WX_ID:{uuid:"WX_ID",type:"var-string",getText:m},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:m},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:m},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:m},RES_ID:{uuid:"RES_ID",type:"var-string",getText:m},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:m},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:m},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:m},CURR:{uuid:"CLANG",type:"var-string",getText:m},LKTP:{uuid:"LKTP",type:"var-string",getText:m},START_TIME:{uuid:"S_T",type:"var-string",getText:m},COST_TIME:{uuid:"C_T",type:"var-string",getText:m},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:m},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:m},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:m},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:m},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:m},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:m},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:m},RESULT:{uuid:"RESULT",type:"var-string",getText:m},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:m},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:m},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:m},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:m},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:m},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:m},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:m},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:m},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:m},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:m},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:m},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:m},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:m},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:m},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:m},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:m},POSITION:{uuid:"_P_OS",type:"var-string",getText:m},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:m,getBool:m},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:m,getBool:m},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:m,getBool:m},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:m},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:m},CITY:{uuid:"_C_ITY",type:"var-string",getText:m},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:m},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:m,getImages:m},QUES_TEXT:{uuid:"QT",type:"var-string",getText:m},QUES_LABEL:{uuid:"QL",type:"var-string",getText:m},QUES_DESC:{uuid:"QD",type:"var-string",getText:m},QUES_NAME:{uuid:"QN",type:"var-string",getText:m},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:m},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:m},PASSWORD:{uuid:"PSW",type:"var-string",getText:m},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:m,getBool:m},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:m,getBool:m},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:m,getBool:m},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:m,getBool:m},QUES_RS:{uuid:"QRS",type:"var-string",getText:m},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:m,getBool:m},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:m,getBool:m},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:m},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:m},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:m},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:m},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:m},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:m},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:m},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:m},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:m},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:m},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:m},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:m},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:m},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:m},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:m},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:m,getText:m},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:m},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:m},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:m,getImages:m},OPT_ICON:{uuid:"OIC",type:"var-string",getText:m,getIcon:m},OPT_MARK:{uuid:"OMA",type:"var-string",getText:m},OPT_RANK:{uuid:"ORA",type:"var-string",getText:m},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:m},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:m},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:m},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:m},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:m,getText:m},EXP_PLUS:{uuid:"EP",type:"var-expression",expOpr:"+"},EXP_MINUS:{uuid:"EM",type:"var-expression",expOpr:"-"},EXP_MULTIPLY:{uuid:"EPL",type:"var-expression",expOpr:"*"},EXP_DIVIDE:{uuid:"ED",type:"var-expression",expOpr:"/"},EXP_SUM:{uuid:"ES",type:"var-expression",expOpr:"(",split:"+"},EXP_MIN:{uuid:"EMN",type:"var-expression",expOpr:"Math.min(",split:","},EXP_MAX:{uuid:"EMX",type:"var-expression",expOpr:"Math.max(",split:","},EXP_AVG:{uuid:"EAG",type:"var-expression",expOpr:"Math.avg(",split:","},EXP_RD:{uuid:"ERD",type:"var-expression",expOpr:"Math.round(",split:"+"},EXP_FLR:{uuid:"EFLR",type:"var-expression",expOpr:"Math.floor(",split:"+"},EXP_CL:{uuid:"ECL",type:"var-expression",expOpr:"Math.ceil(",split:"+"},EXP_OP:{uuid:"EOP",type:"var-expression"},EXP_CP:{uuid:"ECP",type:"var-expression"},BOOL_AND:{uuid:"BAND",type:"var-bool",blOpr:"&&"},BOOL_OR:{uuid:"BOR",type:"var-bool",blOpr:"||"},BOOL_NOT:{uuid:"BNOT",type:"var-bool",blOpr:"!"},BOOL_OP:{uuid:"BOP",type:"var-bool",blOpr:"("},BOOL_CP:{uuid:"BCP",type:"var-bool",blOpr:")"},LOOP:{uuid:"LP",type:"var-loop",getText:m,getImages:m},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:m,getImages:m},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:m},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:m},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:m},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:m}};for(const e of h.Z.langTable){const t="LANG_"+e.locale.toUpperCase(),n=t;v[t]={uuid:n,type:"var-string",getText:async()=>e.locale}}for(let e=2;e<21;e++){const t="URL_KEY_"+e;v[t]={uuid:t,type:"var-string",getText:m}}function y(e,t){const n=t.origin.optionMappingHeads;if(n){const t=n.find((t=>t.field==="field_"+e));if(t)return{type:"image"===t.type?"var-media":"var-string"}}return null}for(let e=1;e<7;e++)v["OPT_ASTV_"+e]={uuid:"OASTV_"+e,type:"var-string",getText:m},v["OPT_MAP_"+e]={uuid:"OM_"+e,type:"var-string",getText:m,getDynamicProps:t=>y(e,t)},v["C_OPT_MAP_"+e]={uuid:"COMAP"+e,type:"var-string",getText:m},v["C_OL_MAP_"+e]={uuid:"COLMAP"+e,type:"var-string",getText:m},v["C_IL_MAP_"+e]={uuid:"CILMAP"+e,type:"var-string",getText:m},v["LOOP_MAP_"+e]={uuid:"LPMAP"+e,type:"var-loop",getText:m};const w=Object.keys(v);function _(e,t){for(const n of w)if(v[n].uuid===e){let e=v[n];if(e.getDynamicProps&&t){const n=e.getDynamicProps(t);n&&(e={...e,...n})}return e}}function b(){g||(function(){const e=[];w.forEach((t=>{if(!(v[t]instanceof Function)){if(e.indexOf(v[t].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[t].uuid);e.push(v[t].uuid)}}))}(),(0,r.k)(v),(0,p._Z)(v),(0,p.HG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.c6)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",u.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["OPT_MAP_"+n].getText=async e=>{const{specifiedOpt:n}=e,{mapping:i}=n;return(0,r.T)(i,t,e)}}(t),function(t){const n=t.split("_")[1];e["OPT_ASTV_"+n].getText=async e=>{const n=e.specifiedOpt.assistValue;return n&&n[t]||""}}(t)})),e.OPT_MARK.getText=e.OPT_INPUT.getText,e.OPT_TEXT.getText=async e=>{const t=e.specifiedOpt,n=(0,a.Lb)(t);if(n)return n;const{optionY:r,optionX:i}=t;return i?i.text+"_"+r.text:(0,a.c6)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.KF)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.KF)(t)},e.OPT_TEXT_X.getText=async e=>e.specifiedOpt.optionX.text,e.OPT_TEXT_Y.getText=async e=>e.specifiedOpt.optionY.text,e.OPT_NUMBER_X.getText=async e=>{const t=e.specifiedOpt.optionX.number;return(0,s.KF)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.KF)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:r}=e,o=(0,a.c6)(n,"image");return r?n.text:o?(0,i.BF)(o.url,t,o.originName):""},e.OPT_ICON.getText=async e=>e.specifiedOpt.text,e.OPT_COUNT.getText=async e=>{const t=await(0,o.Lr)(e);return(0,s.KF)(t.length)},e.OPT_GROUP_TITLE.getText=async e=>{const{optionGroups:t,optionGroupsRelationship:n}=e.varInfo.node.origin;if(!t||!n)return"";const r=e.specifiedOpt.uuid;return function e(t,n){const[r,...i]=n,o=t.find((e=>e.uuid===r));if(o){const t=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==i.length){const r=e(n||[],i);return[...t,...r]}return t}return[]}(t||[],n.optionsRelationship[r]).join("/")}}(v),function(e){async function t(e,t){const{varInfo:n,needOtherOpt:r}=e,i=n.node,o=(0,a.Kn)(i),s=[];for(const n of o)!r&&n.isOtherOpt||t&&!t(n,i)||!await(0,c.D)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.nt),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.Tm),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.Z6),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.vD),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.X8)(e.varInfo.config)?t(e):e.varInfo.node.options}(v),function(e,t){!function(e,t){t.forEach((t=>{const n=e[t];"function"==typeof n.getText&&(n.getBool=async function(e){const t=await this.getText(e);return!(0,s.O2)(t)})})),e.OPT_COUNT.getBool=async function(e){return!!await this.getText(e)}}(e,t),e.OPT_SELECTED.getBool=async e=>e.specifiedOpt.selected,e.OPT_SAME_MARK.getBool=async e=>{const t=await(0,o.Lr)(e);return function(e,t){if((0,s.O2)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const r of e){const e=r.value;if(n[e]?n[e]+=1:n[e]=1,n[e]>=t)return!0}return!1}(t,t.length)},e.OPT_DIFF_MARK.getBool=async e=>{const t=await(0,o.Lr)(e);return function(e,t){if((0,s.O2)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const r of e)if(n[r.value]=!0,Object.keys(n).length>=t)return!0;return!1}(t,t.length)},e.OPT_SAME_VALUE.getBool=e.OPT_SAME_MARK.getBool,e.OPT_DIFF_VALUE.getBool=e.OPT_DIFF_MARK.getBool,e.FAIL_SKIP.getBool=async e=>!!e.varInfo.node.failedSkipActivated,e.FAILED.getBool=async e=>!!e.varInfo.node.failed,e.SUCCEED.getBool=async e=>!!e.varInfo.node.succeed,e.USED_PHONE.getBool=async e=>!!e.state.phoneUsed,e.VALIDATE_FAILED.getBool=async e=>e.varInfo.node.validateFailed,e.Q_TIME_OVER.getBool=async e=>{const{origin:{maxAnswerTime:t},costTime:n}=e.varInfo.node,r=1e3*t;return!!(r&&n&&r<n)},e.Q_TIME_LESS.getBool=async e=>{const{origin:{minAnswerTime:t},costTime:n}=e.varInfo.node,r=1e3*t;return!!(r&&n&&r>n)},function(e,t){function n(e){return this.getBool(e)}t.forEach((t=>{const r=e[t];"function"==typeof r.getBool&&r.getText===m&&(r.getText=n)}))}(e,t)}(v,w),(0,f.e0)(v),function(){let e="";if(w.forEach((t=>{const n=v[t];if(["filter","getText","getImages","getIcon","getBool"].forEach((r=>{n[r]===m&&(e+=t+"=>"+r+"\n")})),n.getText){const e=n.getText;n.getText=async function(...t){const{keepWrap:n}=t[0],r=e.apply(this,t),i=await r;if("string"==typeof i&&!n){const e=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.KF)(i).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.O2)(i)?"":i}}})),e)throw new Error("lack var implement for:\n"+e)}(),g=!0)}function x(){return g||b(),v}b()},7666:(e,t,n)=>{"use strict";n.d(t,{e0:()=>f,gD:()=>l,xq:()=>d}),n(5306),n(3948);var r=n(656),i=n(7712),o=n(3608),a=n(9271),s=n(1128),u=n(7492);function c(e){return{type:"image",width:e.originWidth,height:e.originHeight,name:e.serverFileName,id:e.id,originName:e.fileName}}async function l(e,t){if(!t)return[];const n=(0,o.Kz)(t.uuid,e.imageList);if(n)return[(0,a.q)(c(n))];if(t.value){let n=[];const r=(0,i.Sq)(t.value);for(const t of r){const r=await l(e,(0,i.wc)(e,t));n=n.concat(r)}return n}{const{option:n,optionPart:r}=t,o=t.node;return o?r?(await(0,i.Lr)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.c6)(e,"image"))):o.images||[]:[]}}function d(e=""){return e&&"string"==typeof e?e.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):e}function f(e){async function t(e,t){const n=e&&e[t]||"";return"string"==typeof n?[]:[n]}e.QUES_IMAGE.getImages=async e=>{var t;const n=null===(t=e.varInfo)||void 0===t?void 0:t.node;return(null==n?void 0:n.images)||[]},e.OPT_IMAGE.getImages=async e=>{const{varInfo:{option:t},specifiedOpt:n}=e,r=n||t;return[(0,s.c6)(r,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,i=r.gH(t);if(!i)return[];const o=r.qS(n,i.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",u.b.forEach((n=>{!function(n){const r=n.split("_")[1];e["OPT_MAP_"+r].getImages=e=>{const{specifiedOpt:r}=e,{mapping:i}=r;return t(i,n)}}(n),function(n){const r=n.split("_")[1];e["C_OPT_MAP_"+r].getImages=async e=>{const{state:{context:{option:r}}}=e;if(!r)return[];const{mapping:i}=r;return t(i,n)}}(n),function(n){const i=n.split("_")[1],o="C_IL_MAP_"+i;function a(e,i){return r.WE(e,i,(e=>{if(!e)return[];const{mapping:r}=e;return t(r,n)}))}e["C_OL_MAP_"+i].getImages=e=>a(e,0),e[o].getImages=e=>a(e,1)}(n),function(n){const i=n.split("_")[1];e["LOOP_MAP_"+i].getImages=e=>r.nk(e,(e=>t(e.mapping,n)))}(n)}))}},5336:(e,t,n)=>{"use strict";n.d(t,{T:()=>p,k:()=>h}),n(1817);var r=n(3768),i=n(3608),o=n(4248),a=n(1128),s=n(6064),u=n(6539),c=n(7492),l=n(3087),d=n(8204);const f="unknown";function p(e,t,n){const r=e&&e[t]||"";if("string"==typeof r)return r;{const{pureText:e,varInfo:{config:t},specifiedOpt:o}=n;return e?o?o.text:"":(0,i.BF)(r.url,t,r.originName)}}function h(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,u.ZI)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,u.ZI)();return e.key1||e.key};for(let e=2;e<=20;e++)t(e);function n(e){const{varInfo:t,state:n}=e;let r;const i=t.node;return i&&(r=i.position&&i.position.address),r||(r=n.address),r}e.YEAR.getText=async()=>(new Date).getFullYear().toString(),e.MONTH.getText=async()=>{const e=(new Date).getMonth()+1;return(0,l.bi)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.bi)(e)},e.DAY.getText=async e=>{const t=(new Date).getDay();return"zh_cn"===e.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][t]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]},e.QUES_ID.getText=async e=>e.state.surveyId,e.WX_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.openid},e.WX_SRC.getText=async()=>(0,o.dU)().name,e.WX_NAME.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.nickname},e.WX_UN_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.unionid},e.RES_ID.getText=async e=>{const{state:t}=e;return t.transactionID},e.CLTR_ID.getText=async()=>"",e.CLTR_CODE.getText=async()=>(0,o.vW)().preview?"":(0,o.vW)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.vW)().preview)return"";const{state:{parsedPayload:t}}=e;if(t){const{surveyMeta:{collector:{name:e}}}=t;return e}return""},e.START_TIME.getText=async e=>{const t=e.state.startTime;return(0,s.KF)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.KF)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,r.gS)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.J)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.c6)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.KF)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.c6)(t,"value"):""},e.C_OPT_LBL.getText=async e=>{const{state:{context:{option:t}}}=e;return t&&t.label||""},e.C_OPT_IPT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-iptc-holder='".concat(t.renderId,"' hidden='true' />"):""},e.C_OPT_ASI.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-asic-holder='".concat(t.renderId,"' hidden='true' />"):""},c.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["C_OPT_MAP_"+n].getText=async e=>{const{state:{context:{option:n}}}=e;if(!n)return"";const{mapping:r}=n;return p(r,t,e)}}(t)})),e.POSITION.getText=async e=>{const{state:{point:t}}=e;return t?t.lat+","+t.lng:""},e.COUNTRY.getText=async e=>{const t=n(e);return t&&t.country},e.PROVINCE.getText=async e=>{const t=n(e);return t&&t.province},e.CITY.getText=async e=>{const t=n(e);return t&&t.city},e.DISTRICT.getText=async e=>{const t=n(e);return t&&t.district},e.QUES_IMAGE.getText=async e=>{const{varInfo:t,pureText:n}=e,r=t.node;return n?r.images.reduce(((e,t)=>e+" "+t.originName),""):r.images.reduce(((e,n)=>e+(0,i.BF)(n.url,t.config,n.originName)),"")},e.QUES_DESC.getText=async e=>e.varInfo.node.description,e.QUES_LABEL.getText=async e=>e.varInfo.node.origin.label||"",e.QUES_TEXT.getText=async e=>e.varInfo.node.title,e.QUES_NAME.getText=async e=>e.varInfo.node.nodeName,e.QUES_RUNTIME_NAME.getText=async e=>e.varInfo.node.runtimeNodeName,e.PHONE_NUMBER.getText=async e=>e.varInfo.node.phoneNumber,e.PASSWORD.getText=async e=>e.varInfo.node.code,e.QUES_TIME.getText=async e=>(0,s.KF)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,r.py)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.dU)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.dU)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.dU)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.dU)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.dU)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.dU)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.dU)().system.device.device.type||f}},3022:(e,t,n)=>{"use strict";n.d(t,{$P:()=>f,Tm:()=>s,Z6:()=>u,nt:()=>a,vD:()=>c}),n(2707),n(5306);var r=n(7117),i=n(6064),o=n(3877);function a(e){return e.selected}function s(e){return!e.selected}function u(e,t){return(0,o.Zy)(e,t)}function c(e,t){return!(0,o.Zy)(e,t)}const l=(e,t,n,r=!1)=>{if((0,i.O2)(t[n]))return NaN;const o={};e.forEach((e=>{let t=(e[n]+"").replace(/(\s|&nbsp;)/g,"");const r=parseFloat(t);isNaN(r)||(t=r),(0,i.O2)(t)||(o[t]?o[t].push(e):o[t]=[e])}));const a=Object.keys(o).sort(((e,t)=>{const n=Number(e),i=Number(t);return isNaN(n)||isNaN(i)?r?e>t?1:-1:e<t?1:-1:r?n>i?1:-1:n<i?1:-1}));for(let e=0;e<a.length;e++)if(o[a[e]].indexOf(t)>-1)return e+1;return NaN},d={};function f(e,t,n){const i=d[t];return i?i(function(e){let t=null;const{varInfo:n}=e,i=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const e=(0,r.SN)();return{selectIds:[e.CHECKED_OPTS.uuid,e.RANKED_OPTS.uuid,e.MATCHED_OPTS.uuid],unselectIds:[e.UNCHECKED_OPTS.uuid,e.UNRANKED_OPTS.uuid,e.UNMATCHED_OPTS.uuid],inputIds:[e.INPUTTED_OPTS.uuid,e.MARKED_OPTS.uuid],uninputIds:[e.UN_INPUTTED_OPTS.uuid,e.UNMARKED_OPTS.uuid]}}();return o&&(l.indexOf(o.uuid)>-1?t=a:d.indexOf(o.uuid)>-1?t=s:f.indexOf(o.uuid)>-1?t=u:p.indexOf(o.uuid)>-1&&(t=c)),t?i.options.filter((e=>t(e,i))):i.options}(n),e):NaN}d[1]=(e,t)=>t.number,d[14]=(e,t)=>l(e,t,"number",!0),d[15]=(e,t)=>l(e,t,"number",!1),d[2]=(e,t)=>t.text,d[12]=(e,t)=>l(e,t,"text",!0),d[13]=(e,t)=>l(e,t,"text",!1),d[3]=(e,t)=>t.value,d[4]=(e,t)=>l(e,t,"value",!0),d[5]=(e,t)=>l(e,t,"value",!1),d[6]=(e,t)=>t.sortNo,d[7]=(e,t)=>l(e,t,"sortNo",!0),d[8]=(e,t)=>l(e,t,"sortNo",!1),d[9]=(e,t)=>t.value,d[10]=(e,t)=>l(e,t,"value",!0),d[11]=(e,t)=>l(e,t,"value",!1)},8204:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});var r=n(4248);function i(){return(0,r.vW)().realTimePreview?"realtime_preview":(0,r.vW)().preview?"preview":"formal"}},5838:(e,t,n)=>{"use strict";n.d(t,{H$:()=>m,II:()=>l,L2:()=>g,Q3:()=>v,cx:()=>y,yv:()=>w}),n(5069),n(3210),n(3948);var r=n(7529),i=n(3656),o=n(6935),a=n(3768),s=n(7712),u=n(6064);const c={1:(e,t,n)=>(t>n&&([t,n]=[n,t]),c[5](e,t,0)&&c[6](e,n,0)),2:(e,t,n)=>!c[1](e,t,n),11:(e,t)=>{const n=(0,u.KF)(e).split(",").filter((e=>""!==e.trim())),r=(0,u.KF)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim(),e.indexOf(t)>-1))))))},12:(e,t)=>!c[11](e,t,0),3:(e,t)=>(0,u.KF)(e)===(0,u.KF)(t),4:(e,t)=>!c[3](e,t,0),5:(e,t)=>{const n=(0,u.Xm)(e),r=(0,u.Xm)(t);return"number"==typeof n&&"number"==typeof r?n>r:(0,u.KF)(n)>(0,u.KF)(r)},6:(e,t)=>{const n=(0,u.Xm)(e),r=(0,u.Xm)(t);return"number"==typeof n&&"number"==typeof r?n<r:(0,u.KF)(n)<(0,u.KF)(r)},7:(e,t)=>!c[6](e,t,0),8:(e,t)=>!c[5](e,t,0),9:(e,t)=>{const n=(0,u.KF)(e).split(",").filter((e=>""!==e.trim())),r=(0,u.KF)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!c[9](e,t,0),13:e=>(0,u.KF)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!c[13](e,t),15:(e,t)=>!c[16](e,t),16:(e,t)=>(0,u.KF)(e).split(",").every((e=>{const t=e.trim();return"false"===t||""===t}))},l={request:e=>!!e,bool:e=>!!e,mark:(e,t)=>l.input(e,t),input:(e,t)=>{let n=e,r=t.markStart,i=t.markEnd;return t.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase())),c[t.markId](n,r,i)}};function d(e,t){"string"==typeof e&&(e=(0,o.mP)(e));const n=l[t.limitType],r=n?n(e,t):!!e;return{value:r,reason:r?void 0:{type:"value_unmatch",expected:t.markStart,expectedEnd:t.markEnd,limit:t.markId,actual:e}}}async function f(e,t){const{text:n}=e.relatedEmbed,r=m(e.markId)?",":void 0;return d(await(0,o.Ur)(n,{state:t,joinBy:r}),e)}async function p(e,t){const{relatedVarId:n}=e,r={identity:{baseId:n}},i=(0,s.Dy)(t,r);if(!i)return{value:!1,reason:{type:"var_not_found"}};const a=m(e.markId)?",":void 0;return d(await(0,o.CQ)({state:t,varInfo:i,joinBy:a}),e)}function h(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:u}=t,c=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;let s,u=(0,i.am)(a,n);do{if(s=(0,r.JL)(o,u),s)break;u=u.substring(0,u.length-9)}while(u.length>=36);return s}(e,t);if(!c)return-2===u?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.py)(c);if(!d||!d.items)return-2===u?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((e=>function(e,t){return(0,i.RC)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.zJ)(f):"",r=p(e,t),i={value:r};return r||(i.reason={type:"node_unmatch",limit:u,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),i}{const e=-2===u?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:u,nodeId:n,optionId:o,expected:-1===u,actual:2===u}),t}}function m(e){return 9===e||10===e||11===e||12===e||13===e||14===e||15===e||16===e}async function g(e,t){return{start:m(e.markId)?await(0,o.e_)(e.markStart,{state:t,joinBy:","}):await(0,o.lg)(e.markStart,{state:t}),end:await(0,o.lg)(e.markEnd,{state:t})}}async function v(e,t){const{options:n,reverse:r,logicType:i}=t,o=await y(e,n,i);return r?!o.value:o.value}async function y(e,t,n){if(!t)return{value:!0};const r=[];for(const n of t){const t={...n},{relatedVarId:i,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:u}=t,{start:c,end:l}=await g(t,e);let d;t.markEnd=l,t.markStart=c,d=a?await y(e,s,u):o?await f(t,e):i?await p(t,e):h(e,t),r.push(d)}return{value:!r["and"===n?"some":"every"]((e=>!e.value)),details:r}}async function w(e,t){return"object"==typeof e&&null!==e?v(t,e):!!e}},3817:(e,t,n)=>{"use strict";n.d(t,{I:()=>f,N:()=>d}),n(3948);var r=n(9564),i=n(4248),o=n(3656),a=n(2872),s=n(7089),u=n(7712),c=n(6935);function l(e){return"LOOP_ALL_ROUND"===e}function d(e){return l(e.loopRoundId)||l(e.innerLoopRoundId)}async function f(e){const t=[],{state:n,varInfo:{identity:i}}=e,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:c,innerLoopRoundId:d}=i,f=(0,r.KF)(n,a);if(!f)return"";const h=(0,u.ck)(n,f);if(!h)return"";let m=[];m=l(s)?h.varList.map((e=>(0,o.pC)(e.uuid))):[s];for(const i of m)if(c){let a=[];const s=(0,r.KF)(n,c);if(!s)continue;const f=(0,u.sP)(n,s,i);if(!f)continue;a=l(d)?f.varList.map((e=>(0,o.pC)(e.uuid))):[d];for(const n of a){const r=await p(e,i,n);t.push(r)}}else{const n=await p(e,i);t.push(n)}return t.join(e.joinBy)}function p(e,t,n){const{varInfo:{config:r,identity:o}}=e,u=function(e,t){const n=(0,i.dU)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.c)(e.identity)),n.setAttribute("data-v-config",(0,a.BB)(e.config)),n.outerHTML}({config:r,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,c.Ur)(u,e)}},6451:(e,t,n)=>{"use strict";n.d(t,{P:()=>b,_F:()=>_,nO:()=>g,nn:()=>m}),n(2707),n(3948);var r=n(1128),i=n(6935),o=n(3656),a=n(9310),s=n(5750),u=n(7712),c=n(7117),l=n(4248),d=n(9271),f=n(9698),p=n(656),h=n(7666);async function m(e,t){const{loop:n}=t,r=n&&n.node.nodeUuid,{image:i}=t.origin;if(!i)return[];const o=(0,c.SN)();if("image"===i.type)return[(0,d.q)(i)];if(r&&p.hi(i.id))return await o.LOOP_IMG.getImages({state:e,varInfo:{node:t,lookupLoopNodeId:r}});{const t={identity:{baseId:i.id}};return await(0,h.gD)(e,(0,u.Dy)(e,t))}}async function g(e,t){const{origin:n,passRef:r}=t;if(r&&r.image)return r.image;const{parent:i,loop:o}=e,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const m=(0,c.SN)();let g;if("image"===l.type)g=(0,d.q)(l);else if(s&&p.hi(l.id))g=(await m.LOOP_IMG.getImages({state:i,varInfo:{option:t,lookupLoopNodeId:s}}))[0];else{const e={identity:{baseId:l.id}};g=(await(0,h.gD)(i,(0,u.Dy)(i,e)))[0]}return!f&&g&&"variable"===l.type&&(0,a.GY)({node:e,optionId:t.uuid},{mapId:l.id},g.originName),g}function v(e){return!(!e||!(0,l.vW)().realTimePreview&&!(e.text||e.image||e.normalIconUrl))}async function y(e,t,n){const{optionPart:i,optionFilter:o}=t;let{option:a}=t;if(!i||i.inBunch)return{valid:!0};if(!a){const i=await o.filter({state:e,varInfo:t});a=(0,r.cW)(i,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,r.eu)(t.node).indexOf(a):void 0}}function w(e,t){if(!t)return null;const n=(0,f.q)(e,t);for(const e of t){const t=(0,f.V)(e);if((0,o.RC)(t.uuid,n))return t}return null}async function _(e,t){const{origin:{mapping:n}}=e;if(e.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=e,n)for(const r of Object.keys(n)){const o=r,a=n[o];e.mapping[o]="string"==typeof a?await(0,i.Ur)(a,{state:t}):(0,d.q)(a)}e.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=null}async function b(e,t,n,c=!1){let l=[],d=[],f=[],{refOptions:p,options:h,optionRefers:m}=t;if((0,o.is)(t,!!n)&&("xid"===n?(p=t.refOptionsX,h=t.optionsX,m=t.optionXRefers):"yid"===n&&(p=t.refOptionsY,h=t.optionsY,m=t.optionYRefers)),h&&p&&0!==p.length){l=[...h];const t={};for(const n of p){const o=w(n,m);if(!o)continue;const a=o.config||{},s=await(0,i.Ob)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,u.Dy)(e,o);if(!f)continue;const{valid:p,srcOpt:h,srcRuntimeIndex:g}=await y(e,f,n);if(!p)continue;const _={state:e,varInfo:f,specifiedOpt:h,pureText:!c,keepWrap:!0};if(f.node&&(l=await(0,u.is)(_),h&&(d={uuid:n.uuid,value:h.value,optComment:h.optComment,image:(0,r.c6)(h,"image"),number:h.number,text:h.text,label:h.label,mapping:h.mapping&&{...h.mapping},normalIconUrl:(0,r.c6)(h,"normalIconUrl"),activeIconUrl:(0,r.c6)(h,"activeIconUrl")})),v(l)){const e={srcRuntimeIndex:g,option:{...n,...l},passRef:d},r=o.uuid;t[r]?t[r].candidates.push(e):t[r]={candidates:[e],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(t).forEach((e=>{const{limitRnd:n,candidates:r,varInfo:i,disorder:u}=t[e];let c=(0,o.DQ)(r,n);u?c=(0,s.T_)(c):c.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=c.map((e=>e.option)),h=c.map((e=>e.passRef));f=f.concat((0,a.cX)(i,p)),l=l.concat(p),d=d.concat(h)}))}else l=h;return{options:l,refMaps:f,passRefs:d}}},9310:(e,t,n)=>{"use strict";n.d(t,{GY:()=>a,ZK:()=>s,Zt:()=>d,cX:()=>u,i5:()=>l,sB:()=>c}),n(3948);var r=n(6935),i=n(3768),o=n(7552);function a(e,t,n){n=n;const{node:r,optionId:i,exclusiveId:o}=e;let a=r.embedVarMaps;if(a||(a=r.embedVarMaps=[]),o){const e=a.find((e=>e.exclusiveId===o&&e.var_id===t.mapId));if(e)return void(e.value=n)}a.push({type:"embed",var_id:t.mapId,value:n,option_id:i&&i.toLowerCase(),exclusiveId:o})}function s(e){const{text:t,image:n,icon:r}=e;if(t)return t;if(n)return n.originName;if(r){const e=(0,o.jy)(r).match(/#[^#]+$/);return e&&e[0]||""}return""}function u(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function c(e,t){e.referVarMaps?e.referVarMaps=e.referVarMaps.concat(t):e.referVarMaps=t}function l(e,t){const n=e.casVarMaps=[];t.forEach((e=>{e.text&&n.push({type:"cascade",option_id:e.uuid.toLowerCase(),value:e.text})}))}function d(e,t){const{renderList:n}=e,o=[];return n.forEach((e=>{if(!(0,i.F2)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:u,casVarMaps:c}=e;s=function(e){if(e){let t=[];const n=[];return e.forEach((e=>{delete e.exclusiveId,e.option_id?t.push(e):n.push(e)})),t=function(e){let t=[];const n={};return e.forEach((e=>{const{var_id:t,value:r}=e;let i=n[t];i?(i.values.indexOf(r)<0&&i.values.push(r),i.maps.push(e)):i=n[t]={values:[r],maps:[e]}})),Object.keys(n).forEach((e=>{const r=n[e],{values:i,maps:o}=r;if(i.length>1)t=t.concat(o);else{const e=o[0];o.length>1&&(e.option_id="all"),t.push(e)}})),t}(t),n.concat(t)}return[]}(s),u=u||[],c=c||[];const l=s.concat(u,c);if(l.length>0){let e;l.forEach((e=>{e.value=(0,r.mP)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},3146:(e,t,n)=>{"use strict";n.d(t,{D:()=>c}),n(2707);var r=n(3022),i=n(5838),o=n(6935),a=n(6064),s=n(2872);const u={"-1":6,"-2":8,"-3":5,"-4":7};async function c(e){if(!(0,s.X8)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,c=e.specifiedOpt||t,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:h}=function(e,t){if(!t)return{};const{limitType:n}=t;if(n>=0)return t;const r=u[n];let i;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return i=5===r||7===r?(0,a.KF)(o[o.length-1]||0):(0,a.KF)(o[0]||0),{...t,limitType:r,limitStart:i}}(n,e.varInfo.config),m=(0,r.$P)(c,p,e),g=Number(l),v=(0,i.H$)(g)?await(0,o.e_)(d,{...e,joinBy:","}):await(0,o.lg)(d,e),y=await(0,o.lg)(f,e);return i.II.input(m,{markId:g,markStart:v,markEnd:y,ignoreCase:h})}},1772:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,fq:()=>a}),n(3948);var r=n(6935),i=n(4248),o=n(8204);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.J)(),_IS_INFER_:(0,i.dU)().dev.infer?"Y":"",...e}}async function s(e,t){const{params:n}=t,i={};for(const t of n){const{name:n,value:o}=t;n.startsWith("_url_")?i[n]=await(0,r.sb)(o,{state:e}):n.startsWith("_html_")?i[n]=await(0,r.Ur)(o,{state:e},!0):i[n]=await(0,r.e_)(o,{state:e,joinBy:","},"URL")}return a(i,e)}},6935:(e,t,n)=>{"use strict";n.d(t,{FL:()=>M,CQ:()=>N,Ur:()=>I,Ob:()=>A,e_:()=>E,lg:()=>R,sb:()=>L,IY:()=>b,Oy:()=>U,mP:()=>C}),n(5306),n(3210),n(3948);var r=n(2125);function i(e){let t=!0;try{t=!!(0,r.K)(e,!0)}catch(t){console.info("error bool: ",e)}return t}function o(e,t,n){return function(e,t,n){return!!(t.length&&""!==n&&e&&e[e.length-1].match(/[\d)]/))}(e,t,n)&&(e+=t[t.length-1]),e+n}function a(e){return"("===e[e.length-1]&&(e+="0"),e+")"}var s=n(3656),u=n(5015),c=n(866),l=n(9310),d=n(7712),f=n(7666),p=n(3608),h=n(7117),m=n(4248),g=n(6064),v=n(6539),y=n(2872),w=n(3817);function _(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function b(e="",t=!1){if(e=(e=T(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.indexOf("&lt;")>-1||e.indexOf("&gt;")>-1;)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function x(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.indexOf("&amp;")>-1;)e.replace(/&amp;/g,"&");return e}function k(e="",t,n,r,i){let o='<span var-name="'+n+'" class="var-light '+t+'"'+(r?'in-edist="1">':">")+e+"</span>";return i&&(o=(0,s.sG)(o)),o}function S(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.HX)(e).childNodes]}async function I(e="",t,n=!1){e+="";const{state:r,innerJoinBy:i,varInfo:o,usage:a}=t,u=t.spaceRep||"";e=e.replace(/&nbsp;/g,u);const c=t.joinBy||" ";if((0,d.b)(e)){const u=(0,d.HX)(e),f=(0,d.Sq)(e,u);for(const e of f){const t=(0,d.wc)(r,e);let s="";if(t?s=await N({state:r,varInfo:t,joinBy:i||c}):(0,m.vW)().realTimePreview&&(s=k(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,g.O2)(s)?"":(0,g.KF)(s).trim(),a){const n=t||{mapId:(0,d.Hz)((0,d.V0)(e))};(0,l.GY)(a,n,s)}const u=!o&&t&&s&&!n;let f=[];_(t)?(u&&(s=k(s,t.type,t.name,t.inEdist,!1)),f=s?S(s):[""]):(u&&(s=k(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,m.dU)().system.newTextNode(e.innerHTML)]),O(e,f)}return P(function(e,t,n=""){if(_(t))return b(e.innerHTML);let r="";if(n){const i=[];for(const n of e.childNodes){let e="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;e=n.outerHTML}else e=n.textContent.trim(),t||(e=x(e));e&&i.push(T(e))}r=i.join(n)}else r=T(e.innerHTML);return r=r.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),r=T((0,s.kr)(r)),r}(u,o,c),t)}return e+""}function O(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const r=(0,m.dU)().system.newTextNode(t);n.insertBefore(r,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function E(e="",t,n="WRAPPED_URL"){return P(C(await I(e,t,!0),n),t)}function C(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.HX)(e).innerText;return n=(0,d.HX)(n).innerText,"URL"===t&&(n=(0,f.xq)(n)),n.trim()}function P(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function L(e="",t){let n=await I(e,{...t,innerJoinBy:","},!0);return n=C(b(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=P(n,t),n}async function N(e){let t="";const{varInfo:n}=e;if((0,w.N)(n.identity))t=await(0,w.I)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d.sb)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.ZI)()[n]}else n.nodePart||n.node?t=await(0,d.KP)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):I(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,h.SN)(),{varInfo:n,state:i}=e;let s="";const u=(0,d.HX)(n.value).childNodes,c=[];let l="";for(const e of u)if((0,d.g)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,c,e),l=""}const n=(0,d.wc)(i,e);if(n){const e=n.split;if(n.uuid===t.EXP_OP.uuid)s+="(";else if(n.uuid===t.EXP_CP.uuid)s=a(s);else if(e)s=o(s,c,n.expOpr),c.push(e);else if(n.expOpr)c.length&&(s=a(s),c.pop()),s=o(s,c,n.expOpr);else{const e=c[c.length-1];s=o(s,c,await N({state:i,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,c,parseFloat(l)));c.length;)s=a(s),c.pop();return function(e){let t=0;try{t=(0,r.K)(e,!0)}catch(n){t=NaN,console.info("error exp: ",e)}return t}(s)}(e):"var-media"===n.type?t=await async function(e){const{varInfo:t,state:n}=e,{config:r}=t,i=e.joinBy||" ",o=(0,d.Sq)(t.value),a=[];for(const e of o){const t=(0,d.wc)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=r;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const u=await N({state:n,varInfo:t,joinBy:i});(0,g.O2)(u)||a.push(u)}return a.join(i)}(e):"var-bool"===n.type?t=await async function(e){const{varInfo:t,state:n}=e;if(t.getBool)return t.getBool(e);const{nodePart:r,node:o}=t;if(r||o)return(0,d.DC)(e);const a=(0,d.Sq)(t.value);let s="";for(const t of a){const r=(0,d.wc)(n,t);if(r)if(r.blOpr)s+=r.blOpr;else if(r.getBool)s+=i(await r.getBool(e))?"1":"0";else{const e=await N({state:n,varInfo:r});s+="string"==typeof e?"0"===e?e:e?"1":"0":i(e)?"1":"0"}}return i(s)}(e):"var-request"===n.type?t=await async function(e){const{varInfo:{request:t,config:n},state:r}=e;if(t){let e=null;if(n&&n.phParams){e={};for(const t of n.phParams)e[t.name]=await E(t.value,{state:r,joinBy:","},"URL")}const{result:i}=await(0,u.LO)(r,t,e,!1);return"string"!=typeof i?i:(0,c.l)(i)}return""}(e):"var-html"===n.type&&(t=await async function(e){const{varInfo:t,state:n}=e,r=t.getText?await t.getText(e):await I(t.value,e),i=(0,c.l)(b(r));return await function(e,t,n){const r=(0,y.gh)(e);return(0,s.s$)(t,/{{{?(.+?)}}}?/g,(async(e,t)=>{const i=t.indexOf("=");let o=t,a="";i>-1&&(o=t.substring(0,i),a=t.substring(i+1));const s=r[o]||"";let u="";return s&&(u=e.startsWith("{{{")?await I(s,{state:n}):await E(s,{state:n},"URL")),u||a}))}(t.config.phParams,i,n)}(e))}return(0,d.b)(t)&&(t=await I(t,e)),t}async function R(e="",t,n=!1){if("number"==typeof e)return e;if((0,g.O2)(e))return n?NaN:"";const r=Number(e);if(isNaN(r)){const r=await E(e,t);if((0,g.O2)(r))return n?NaN:"";const i=Number(r);return isNaN(i)?n?NaN:r:i}return r}async function A(e="",t){if("number"==typeof e)return e;const n=await R(e,t,!0);return Number(n)}async function U(e="",t,n=!1){return(0,g.O2)(e)?"":(0,s.s$)((0,g.KF)(e),/{{(.+?)}}/g,(async(e,r)=>{let i=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.ZI)()[e];{const n=(0,p.XY)(e,t.variables);return n?C(await N({varInfo:n,state:t,joinBy:","})):""}}(r,t);return i&&n&&(i=encodeURIComponent(i)),"".concat(i||"")}))}function M(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3099:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:(e,t,n)=>{var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:(e,t,n)=>{var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,n)=>{"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:(e,t,n)=>{var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},8457:(e,t,n)=>{"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),s=n(7466),u=n(6135),c=n(1246);e.exports=function(e){var t,n,l,d,f,p,h=i(e),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,y=void 0!==v,w=c(h),_=0;if(y&&(v=r(v,g>2?arguments[2]:void 0,2)),null==w||m==Array&&a(w))for(n=new m(t=s(h.length));t>_;_++)p=y?v(h[_],_):h[_],u(n,_,p);else for(f=(d=w.call(h)).next,n=new m;!(l=f.call(d)).done;_++)p=y?o(d,v,[l.value,_],!0):l.value,u(n,_,p);return n.length=_,n}},1318:(e,t,n)=>{var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9341:(e,t,n)=>{"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3411:(e,t,n)=>{var r=n(9670);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},4326:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:(e,t,n)=>{var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},1501:(e,t,n)=>{"use strict";var r=n(9670),i=n(3099);e.exports=function(){for(var e=r(this),t=i(e.add),n=0,o=arguments.length;n<o;n++)t.call(e,arguments[n]);return e}},4092:(e,t,n)=>{"use strict";var r=n(9670),i=n(3099);e.exports=function(){for(var e,t=r(this),n=i(t.delete),o=!0,a=0,s=arguments.length;a<s;a++)e=n.call(t,arguments[a]),o=o&&e;return!!o}},9920:(e,t,n)=>{var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},8544:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:(e,t,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},8880:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,n)=>{"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},654:(e,t,n)=>{"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),s=n(8003),u=n(8880),c=n(1320),l=n(5112),d=n(1913),f=n(7497),p=n(3383),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),v="keys",y="values",w="entries",_=function(){return this};e.exports=function(e,t,n,l,p,b,x){i(n,t,l);var T,k,S,I=function(e){if(e===p&&L)return L;if(!m&&e in C)return C[e];switch(e){case v:case y:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",E=!1,C=e.prototype,P=C[g]||C["@@iterator"]||p&&C[p],L=!m&&P||I(p),N="Array"==t&&C.entries||P;if(N&&(T=o(N.call(new e)),h!==Object.prototype&&T.next&&(d||o(T)===h||(a?a(T,h):"function"!=typeof T[g]&&u(T,g,_)),s(T,O,!0,!0),d&&(f[O]=_))),p==y&&P&&P.name!==y&&(E=!0,L=function(){return P.call(this)}),d&&!x||C[g]===L||u(C,g,L),f[t]=L,p)if(k={values:I(y),keys:b?L:I(v),entries:I(w)},x)for(S in k)(m||E||!(S in C))&&c(C,S,k[S]);else r({target:t,proto:!0,forced:m||E},k);return k}},9781:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,t,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,d,f,p,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],d=e.noTargetGet?(p=i(n,l))&&p.value:n[l],!c(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,n)=>{"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),s=n(8880),u=o("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!c||!l||f)||"split"===e&&!p){var v=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===a?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),w=y[0],_=y[1];r(String.prototype,e,w),r(RegExp.prototype,h,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}d&&s(RegExp.prototype[h],"sham",!0)}},9974:(e,t,n)=>{var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:(e,t,n)=>{var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:(e,t,n)=>{var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:(e,t,n)=>{var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},4647:(e,t,n)=>{var r=n(1913),i=n(8554);e.exports=r?i:function(e){return Map.prototype.entries.call(e)}},6767:(e,t,n)=>{var r=n(1913),i=n(8554);e.exports=r?i:function(e){return Set.prototype.values.call(e)}},7854:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},6656:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:e=>{e.exports={}},490:(e,t,n)=>{var r=n(5005);e.exports=r("document","documentElement")},4664:(e,t,n)=>{var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(e,t,n)=>{var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},2788:(e,t,n)=>{var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:(e,t,n)=>{var r,i,o,a=n(8536),s=n(7854),u=n(111),c=n(8880),l=n(6656),d=n(6200),f=n(3501),p=s.WeakMap;if(a){var h=new p,m=h.get,g=h.has,v=h.set;r=function(e,t){return v.call(h,e,t),t},i=function(e){return m.call(h,e)||{}},o=function(e){return g.call(h,e)}}else{var y=d("state");f[y]=!0,r=function(e,t){return c(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:(e,t,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,n)=>{var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:(e,t,n)=>{var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:e=>{e.exports=!1},408:(e,t,n)=>{var r=n(9670),i=n(7659),o=n(7466),a=n(9974),s=n(1246),u=n(3411),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,d){var f,p,h,m,g,v,y,w=a(t,n,l?2:1);if(d)f=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(i(p)){for(h=0,m=o(e.length);m>h;h++)if((g=l?w(r(y=e[h])[0],y[1]):w(e[h]))&&g instanceof c)return g;return new c(!1)}f=p.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(g=u(f,w,y.value,l))&&g&&g instanceof c)return g;return new c(!1)}).stop=function(e){return new c(!0,e)}},3383:(e,t,n)=>{"use strict";var r,i,o,a=n(9518),s=n(8880),u=n(6656),c=n(5112),l=n(1913),d=c("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):f=!0),null==r&&(r={}),l||u(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},7497:e=>{e.exports={}},133:(e,t,n)=>{var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:(e,t,n)=>{var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:(e,t,n)=>{var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:(e,t,n)=>{"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),s=n(5296),u=n(7908),c=n(8361),l=Object.assign,d=Object.defineProperty;e.exports=!l||i((function(){if(r&&1!==l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=i}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,d=a.f,f=s.f;i>l;)for(var p,h=c(arguments[l++]),m=d?o(h).concat(d(h)):o(h),g=m.length,v=0;g>v;)p=m[v++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:l},30:(e,t,n)=>{var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200)("IE_PROTO"),d=function(){},f=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[l]=e):n=p(),void 0===t?n:o(n,t)}},6048:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},3070:(e,t,n)=>{var r=n(9781),i=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:(e,t,n)=>{var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(7593),u=n(6656),c=n(4664),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},8006:(e,t,n)=>{var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,n)=>{var r=n(6656),i=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},6324:(e,t,n)=>{var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},1956:(e,t,n)=>{var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:(e,t,n)=>{var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},3887:(e,t,n)=>{var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:(e,t,n)=>{var r=n(7854);e.exports=r},2248:(e,t,n)=>{var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:(e,t,n)=>{var r=n(7854),i=n(8880),o=n(6656),a=n(3505),s=n(2788),u=n(9909),c=u.get,l=u.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),l(n).source=d.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7651:(e,t,n)=>{var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:(e,t,n)=>{"use strict";var r,i,o=n(7066),a=n(2999),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),d=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||d)&&(c=function(e){var t,n,r,i,a=this,c=d&&a.sticky,p=o.call(a),h=a.source,m=0,g=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",p)),f&&(n=new RegExp("^"+h+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=s.call(c?n:a,g),c?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),f&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},7066:(e,t,n)=>{"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:(e,t,n)=>{"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4488:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},6465:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3505:(e,t,n)=>{var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},8003:(e,t,n)=>{var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:(e,t,n)=>{var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,n)=>{var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:(e,t,n)=>{var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:(e,t,n)=>{var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:(e,t,n)=>{var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3197:e=>{"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(e){return e+22+75*(e<26)},u=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},c=function(e){var n,r,c=[],l=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,d=128,f=0,p=72;for(n=0;n<e.length;n++)(r=e[n])<128&&c.push(a(r));var h=c.length,m=h;for(h&&c.push("-");m<l;){var g=t;for(n=0;n<e.length;n++)(r=e[n])>=d&&r<g&&(g=r);var v=m+1;if(g-d>o((t-f)/v))throw RangeError(i);for(f+=(g-d)*v,d=g,n=0;n<e.length;n++){if((r=e[n])<d&&++f>t)throw RangeError(i);if(r==d){for(var y=f,w=36;;w+=36){var _=w<=p?1:w>=p+26?26:w-p;if(y<_)break;var b=y-_,x=36-_;c.push(a(s(_+b%x))),y=o(b/x)}c.push(a(s(y))),p=u(f,v,m==h),f=0,++m}}++f,++d}return c.join("")};e.exports=function(e){var t,i,o=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)i=a[t],o.push(n.test(i)?"xn--"+c(i):i);return o.join(".")}},6091:(e,t,n)=>{var r=n(7293),i=n(1361);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},3111:(e,t,n)=>{var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},1400:(e,t,n)=>{var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:(e,t,n)=>{var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:(e,t,n)=>{var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:(e,t,n)=>{var r=n(4488);e.exports=function(e){return Object(r(e))}},7593:(e,t,n)=>{var r=n(111);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},1694:(e,t,n)=>{var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9711:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:(e,t,n)=>{var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(e,t,n)=>{var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),u=n(3307),c=i("wks"),l=r.Symbol,d=u?l:l&&l.withoutSetter||a;e.exports=function(e){return o(c,e)||(s&&o(l,e)?c[e]=l[e]:c[e]=d("Symbol."+e)),c[e]}},1361:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},6992:(e,t,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(654),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},5069:(e,t,n)=>{"use strict";var r=n(2109),i=n(3157),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},2707:(e,t,n)=>{"use strict";var r=n(2109),i=n(3099),o=n(7908),a=n(7293),s=n(9341),u=[],c=u.sort,l=a((function(){u.sort(void 0)})),d=a((function(){u.sort(null)})),f=s("sort");r({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(e){return void 0===e?c.call(o(this)):c.call(o(this),i(e))}})},4916:(e,t,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},8783:(e,t,n)=>{"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},5306:(e,t,n)=>{"use strict";var r=n(7007),i=n(9670),o=n(7908),a=n(7466),s=n(9958),u=n(4488),c=n(1530),l=n(7651),d=Math.max,f=Math.min,p=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!g&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var u=i(e),p=String(this),h="function"==typeof r;h||(r=String(r));var m=u.global;if(m){var _=u.unicode;u.lastIndex=0}for(var b=[];;){var x=l(u,p);if(null===x)break;if(b.push(x),!m)break;""===String(x[0])&&(u.lastIndex=c(p,a(u.lastIndex),_))}for(var T,k="",S=0,I=0;I<b.length;I++){x=b[I];for(var O=String(x[0]),E=d(f(s(x.index),p.length),0),C=[],P=1;P<x.length;P++)C.push(void 0===(T=x[P])?T:String(T));var L=x.groups;if(h){var N=[O].concat(C,E,p);void 0!==L&&N.push(L);var R=String(r.apply(void 0,N))}else R=w(O,p,E,C,L,r);E>=S&&(k+=p.slice(S,E)+R,S=E+O.length)}return k+p.slice(S)}];function w(e,n,r,i,a,s){var u=r+e.length,c=i.length,l=m;return void 0!==a&&(a=o(a),l=h),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>c){var d=p(l/10);return 0===d?t:d<=c?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},3210:(e,t,n)=>{"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},1817:(e,t,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(6656),s=n(111),u=n(3070).f,c=n(9920),l=o.Symbol;if(i&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var d={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new l(e):void 0===e?l():l(e);return""===e&&(d[t]=!0),t};c(f,l);var p=f.prototype=l.prototype;p.constructor=f;var h=p.toString,m="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:f})}},72:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},9137:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e,n){if(!r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},1957:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){r(n,e,t)&&f.call(i,e,n)}),void 0,!0,!0),i}})},103:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(e)}),void 0,!0,!0).result}})},6306:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(n)}),void 0,!0,!0).result}})},4592:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(4647),s=n(6465),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(e){return u(a(o(this)),(function(t,n){if(s(n,e))return u.stop()}),void 0,!0,!0).stopped}})},8276:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(4647),s=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(e){return s(a(o(this)),(function(t,n){if(n===e)return s.stop(t)}),void 0,!0,!0).result}})},5082:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){f.call(i,r(n,e,t),n)}),void 0,!0,!0),i}})},2813:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){f.call(i,e,r(n,e,t))}),void 0,!0,!0),i}})},8222:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{merge:function(e){for(var t=o(this),n=a(t.set),r=0;r<arguments.length;)s(arguments[r++],n,t,!0);return t}})},8563:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{reduce:function(e){var t=o(this),n=s(t),r=arguments.length<2,i=r?void 0:arguments[1];if(a(e),u(n,(function(n,o){r?(r=!1,i=o):i=e(i,o,n,t)}),void 0,!0,!0),r)throw TypeError("Reduce of empty map with no initial value");return i}})},336:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},7512:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099);r({target:"Map",proto:!0,real:!0,forced:i},{update:function(e,t){var n=o(this),r=arguments.length;a(t);var i=n.has(e);if(!i&&r<3)throw TypeError("Updating absent value");var s=i?n.get(e):a(r>2?arguments[2]:void 0)(e,n);return n.set(e,t(s,e,n)),n}})},8921:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(1501);r({target:"Set",proto:!0,real:!0,forced:i},{addAll:function(){return o.apply(this,arguments)}})},6248:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"Set",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},3599:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{difference:function(e){var t=a(this),n=new(u(t,o("Set")))(t),r=s(n.delete);return c(e,(function(e){r.call(n,e)})),n}})},1477:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e){if(!r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},4362:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(6767),d=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Set"))),f=s(i.add);return d(n,(function(e){r(e,e,t)&&f.call(i,e)}),void 0,!1,!0),i}})},5389:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop(e)}),void 0,!1,!0).result}})},401:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{intersection:function(e){var t=a(this),n=new(u(t,o("Set"))),r=s(t.has),i=s(n.add);return c(e,(function(e){r.call(t,e)&&i.call(n,e)})),n}})},5164:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:function(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!0===n.call(t,e))return s.stop()})).stopped}})},1238:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(8554),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:function(e){var t=u(this),n=a(e),r=n.has;return"function"!=typeof r&&(n=new(o("Set"))(e),r=s(n.has)),!c(t,(function(e){if(!1===r.call(n,e))return c.stop()}),void 0,!1,!0).stopped}})},4837:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isSupersetOf:function(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!1===n.call(t,e))return s.stop()})).stopped}})},7485:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(6767),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{join:function(e){var t=o(this),n=a(t),r=void 0===e?",":String(e),i=[];return s(n,i.push,i,!1,!0),i.join(r)}})},465:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(6767),d=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{map:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Set"))),f=s(i.add);return d(n,(function(e){f.call(i,r(e,e,t))}),void 0,!1,!0),i}})},6651:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{reduce:function(e){var t=o(this),n=s(t),r=arguments.length<2,i=r?void 0:arguments[1];if(a(e),u(n,(function(n){r?(r=!1,i=n):i=e(i,n,n,t)}),void 0,!1,!0),r)throw TypeError("Reduce of empty set with no initial value");return i}})},1437:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},5285:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:function(e){var t=a(this),n=new(u(t,o("Set")))(t),r=s(n.delete),i=s(n.add);return c(e,(function(e){r.call(n,e)||i.call(n,e)})),n}})},9865:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=a(this),n=new(u(t,o("Set")))(t);return c(e,s(n.add),n),n}})},8206:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"WeakMap",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},3948:(e,t,n)=>{var r=n(7854),i=n(8324),o=n(6992),a=n(8880),s=n(5112),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var d in i){var f=r[d],p=f&&f.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,d),i[d])for(var h in o)if(p[h]!==o[h])try{a(p,h,o[h])}catch(e){p[h]=o[h]}}}},1637:(e,t,n)=>{"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),s=n(2248),u=n(8003),c=n(4994),l=n(9909),d=n(5787),f=n(6656),p=n(9974),h=n(648),m=n(9670),g=n(111),v=n(30),y=n(9114),w=n(8554),_=n(1246),b=n(5112),x=i("fetch"),T=i("Headers"),k=b("iterator"),S="URLSearchParams",I="URLSearchParamsIterator",O=l.set,E=l.getterFor(S),C=l.getterFor(I),P=/\+/g,L=Array(4),N=function(e){return L[e-1]||(L[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},R=function(e){try{return decodeURIComponent(e)}catch(t){return e}},A=function(e){var t=e.replace(P," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(N(n--),R);return t}},U=/[!'()~]|%20/g,M={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},B=function(e){return M[e]},D=function(e){return encodeURIComponent(e).replace(U,B)},F=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:A(r.shift()),value:A(r.join("="))}))},j=function(e){this.entries.length=0,F(this.entries,e)},W=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=c((function(e,t){O(this,{type:I,iterator:w(E(e).entries),kind:t})}),"Iterator",(function(){var e=C(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),z=function(){d(this,z,S);var e,t,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,p=[];if(O(l,{type:S,entries:p,updateURL:function(){},updateSearchParams:j}),void 0!==c)if(g(c))if("function"==typeof(e=_(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(o=(i=w(m(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:s.value+""})}else for(u in c)f(c,u)&&p.push({key:u,value:c[u]+""});else F(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},V=z.prototype;s(V,{append:function(e,t){W(arguments.length,2);var n=E(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){W(arguments.length,1);for(var t=E(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){W(arguments.length,1);for(var n,r=E(this),i=r.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=E(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=E(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new q(this,"keys")},values:function(){return new q(this,"values")},entries:function(){return new q(this,"entries")}},{enumerable:!0}),a(V,k,V.entries),a(V,"toString",(function(){for(var e,t=E(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(D(e.key)+"="+D(e.value));return n.join("&")}),{enumerable:!0}),u(z,S),r({global:!0,forced:!o},{URLSearchParams:z}),o||"function"!=typeof x||"function"!=typeof T||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,h(n)===S&&((r=t.headers?new T(t.headers):new T).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(n)),headers:y(0,r)}))),i.push(t)),x.apply(this,i)}}),e.exports={URLSearchParams:z,getState:E}},285:(e,t,n)=>{"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),s=n(7854),u=n(6048),c=n(1320),l=n(5787),d=n(6656),f=n(1574),p=n(8457),h=n(8710).codeAt,m=n(3197),g=n(8003),v=n(1637),y=n(9909),w=s.URL,_=v.URLSearchParams,b=v.getState,x=y.set,T=y.getterFor("URL"),k=Math.floor,S=Math.pow,I="Invalid scheme",O="Invalid host",E="Invalid port",C=/[A-Za-z]/,P=/[\d+-.A-Za-z]/,L=/\d/,N=/^(0x|0X)/,R=/^[0-7]+$/,A=/^\d+$/,U=/^[\dA-Fa-f]+$/,M=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,B=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,D=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,F=/[\u0009\u000A\u000D]/g,j=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return O;if(!(n=q(t.slice(1,-1))))return O;e.host=n}else if(Z(e)){if(t=m(t),M.test(t))return O;if(null===(n=W(t)))return O;e.host=n}else{if(B.test(t))return O;for(n="",r=p(t),i=0;i<r.length;i++)n+=K(r[i],V);e.host=n}},W=function(e){var t,n,r,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=N.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?A:8==o?R:U).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*S(256,3-r);return s},q=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=n=0;n<4&&U.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,c>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;d++}if(!L.test(f()))return;for(;L.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},z=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},V={},G=f({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),H=f({},G,{"#":1,"?":1,"{":1,"}":1}),X=f({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),K=function(e,t){var n=h(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},$={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Z=function(e){return d($,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Y=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Q=function(e,t){var n;return 2==e.length&&C.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Q(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ue={},ce={},le={},de={},fe={},pe={},he={},me={},ge={},ve={},ye={},we={},_e={},be={},xe={},Te={},ke=function(e,t,n,i){var o,a,s,u,c,l=n||re,f=0,h="",m=!1,g=!1,v=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(D,"")),t=t.replace(F,""),o=p(t);f<=o.length;){switch(a=o[f],l){case re:if(!a||!C.test(a)){if(n)return I;l=oe;continue}h+=a.toLowerCase(),l=ie;break;case ie:if(a&&(P.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return I;h="",l=oe,f=0;continue}if(n&&(Z(e)!=d($,h)||"file"==h&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(Z(e)&&$[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?l=ge:Z(e)&&i&&i.scheme==e.scheme?l=ae:Z(e)?l=le:"/"==o[f+1]?(l=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),l=be)}break;case oe:if(!i||i.cannotBeABaseURL&&"#"!=a)return I;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Te;break}l="file"==i.scheme?ge:ue;continue;case ae:if("/"!=a||"/"!=o[f+1]){l=ue;continue}l=de,f++;break;case se:if("/"==a){l=fe;break}l=_e;continue;case ue:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&Z(e))l=ce;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),l=_e;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Te}break;case ce:if(!Z(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,l=_e;continue}l=fe}else l=de;break;case le:if(l=de,"/"!=a||"/"!=h.charAt(f+1))continue;f++;break;case de:if("/"!=a&&"\\"!=a){l=fe;continue}break;case fe:if("@"==a){m&&(h="%40"+h),m=!0,s=p(h);for(var y=0;y<s.length;y++){var w=s[y];if(":"!=w||v){var _=K(w,X);v?e.password+=_:e.username+=_}else v=!0}h=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)){if(m&&""==h)return"Invalid authority";f-=p(h).length+1,h="",l=pe}else h+=a;break;case pe:case he:if(n&&"file"==e.scheme){l=ye;continue}if(":"!=a||g){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)){if(Z(e)&&""==h)return O;if(n&&""==h&&(J(e)||null!==e.port))return;if(u=j(e,h))return u;if(h="",l=we,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),h+=a}else{if(""==h)return O;if(u=j(e,h))return u;if(h="",l=me,n==he)return}break;case me:if(!L.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)||n){if(""!=h){var b=parseInt(h,10);if(b>65535)return E;e.port=Z(e)&&b===$[e.scheme]?null:b,h=""}if(n)return;l=we;continue}return E}h+=a;break;case ge:if(e.scheme="file","/"==a||"\\"==a)l=ve;else{if(!i||"file"!=i.scheme){l=_e;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){ee(o.slice(f).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),l=_e;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Te}}break;case ve:if("/"==a||"\\"==a){l=ye;break}i&&"file"==i.scheme&&!ee(o.slice(f).join(""))&&(Q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),l=_e;continue;case ye:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(h))l=_e;else if(""==h){if(e.host="",n)return;l=we}else{if(u=j(e,h))return u;if("localhost"==e.host&&(e.host=""),n)return;h="",l=we}continue}h+=a;break;case we:if(Z(e)){if(l=_e,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(l=_e,"/"!=a))continue}else e.fragment="",l=Te;else e.query="",l=xe;break;case _e:if(a==r||"/"==a||"\\"==a&&Z(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=h).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==a||"\\"==a&&Z(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&Z(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Q(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",l=xe):"#"==a&&(e.fragment="",l=Te)}else h+=K(a,H);break;case be:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Te):a!=r&&(e.path[0]+=K(a,V));break;case xe:n||"#"!=a?a!=r&&("'"==a&&Z(e)?e.query+="%27":e.query+="#"==a?"%23":K(a,V)):(e.fragment="",l=Te);break;case Te:a!=r&&(e.fragment+=K(a,G))}f++}},Se=function(e){var t,n,r=l(this,Se,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Se)t=T(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var u=s.searchParams=new _,c=b(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(r.href=Oe.call(r),r.origin=Ee.call(r),r.protocol=Ce.call(r),r.username=Pe.call(r),r.password=Le.call(r),r.host=Ne.call(r),r.hostname=Re.call(r),r.port=Ae.call(r),r.pathname=Ue.call(r),r.search=Me.call(r),r.searchParams=Be.call(r),r.hash=De.call(r))},Ie=Se.prototype,Oe=function(){var e=T(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",J(e)&&(c+=n+(r?":"+r:"")+"@"),c+=z(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Ee=function(){var e=T(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Z(e)?t+"://"+z(e.host)+(null!==n?":"+n:""):"null"},Ce=function(){return T(this).scheme+":"},Pe=function(){return T(this).username},Le=function(){return T(this).password},Ne=function(){var e=T(this),t=e.host,n=e.port;return null===t?"":null===n?z(t):z(t)+":"+n},Re=function(){var e=T(this).host;return null===e?"":z(e)},Ae=function(){var e=T(this).port;return null===e?"":String(e)},Ue=function(){var e=T(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=T(this).query;return e?"?"+e:""},Be=function(){return T(this).searchParams},De=function(){var e=T(this).fragment;return e?"#"+e:""},Fe=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Ie,{href:Fe(Oe,(function(e){var t=T(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);b(t.searchParams).updateSearchParams(t.query)})),origin:Fe(Ee),protocol:Fe(Ce,(function(e){var t=T(this);ke(t,String(e)+":",re)})),username:Fe(Pe,(function(e){var t=T(this),n=p(String(e));if(!Y(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=K(n[r],X)}})),password:Fe(Le,(function(e){var t=T(this),n=p(String(e));if(!Y(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=K(n[r],X)}})),host:Fe(Ne,(function(e){var t=T(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Fe(Re,(function(e){var t=T(this);t.cannotBeABaseURL||ke(t,String(e),he)})),port:Fe(Ae,(function(e){var t=T(this);Y(t)||(""==(e=String(e))?t.port=null:ke(t,e,me))})),pathname:Fe(Ue,(function(e){var t=T(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",we))})),search:Fe(Me,(function(e){var t=T(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ke(t,e,xe)),b(t.searchParams).updateSearchParams(t.query)})),searchParams:Fe(Be),hash:Fe(De,(function(e){var t=T(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Te)):t.fragment=null}))}),c(Ie,"toJSON",(function(){return Oe.call(this)}),{enumerable:!0}),c(Ie,"toString",(function(){return Oe.call(this)}),{enumerable:!0}),w){var je=w.createObjectURL,We=w.revokeObjectURL;je&&c(Se,"createObjectURL",(function(e){return je.apply(w,arguments)})),We&&c(Se,"revokeObjectURL",(function(e){return We.apply(w,arguments)}))}g(Se,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Se})},9575:function(e,t,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,e.exports=function(){"use strict";var e,t="3.7.2",n="function"==typeof atob,r="function"==typeof btoa,i="function"==typeof Buffer,o="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,s=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(e={},s.forEach((function(t,n){return e[t]=n})),e),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,l=String.fromCharCode.bind(String),d="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},f=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},p=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},h=function(e){for(var t,n,r,i,o="",a=e.length%3,u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(r=e.charCodeAt(u++))>255||(i=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");o+=s[(t=n<<16|r<<8|i)>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},m=r?function(e){return btoa(e)}:i?function(e){return Buffer.from(e,"binary").toString("base64")}:h,g=i?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(l.apply(null,e.subarray(n,n+4096)));return m(t.join(""))},v=function(e,t){return void 0===t&&(t=!1),t?f(g(e)):g(e)},y=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,_=function(e){return e.replace(w,y)},b=i?function(e){return Buffer.from(e,"utf8").toString("base64")}:a?function(e){return g(a.encode(e))}:function(e){return m(_(e))},x=function(e,t){return void 0===t&&(t=!1),t?f(b(e)):b(e)},T=function(e){return x(e,!0)},k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=function(e){return e.replace(k,S)},O=function(e){if(e=e.replace(/\s+/g,""),!c.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,i="",o=0;o<e.length;)t=u[e.charAt(o++)]<<18|u[e.charAt(o++)]<<12|(n=u[e.charAt(o++)])<<6|(r=u[e.charAt(o++)]),i+=64===n?l(t>>16&255):64===r?l(t>>16&255,t>>8&255):l(t>>16&255,t>>8&255,255&t);return i},E=n?function(e){return atob(p(e))}:i?function(e){return Buffer.from(e,"base64").toString("binary")}:O,C=i?function(e){return d(Buffer.from(e,"base64"))}:function(e){return d(E(e),(function(e){return e.charCodeAt(0)}))},P=function(e){return C(N(e))},L=i?function(e){return Buffer.from(e,"base64").toString("utf8")}:o?function(e){return o.decode(C(e))}:function(e){return I(E(e))},N=function(e){return p(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},R=function(e){return L(N(e))},A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},U=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,A(t))};e("fromBase64",(function(){return R(this)})),e("toBase64",(function(e){return x(this,e)})),e("toBase64URI",(function(){return x(this,!0)})),e("toBase64URL",(function(){return x(this,!0)})),e("toUint8Array",(function(){return P(this)}))},M=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,A(t))};e("toBase64",(function(e){return v(this,e)})),e("toBase64URI",(function(){return v(this,!0)})),e("toBase64URL",(function(){return v(this,!0)}))},B={version:t,VERSION:"3.7.2",atob:E,atobPolyfill:O,btoa:m,btoaPolyfill:h,fromBase64:R,toBase64:x,encode:x,encodeURI:T,encodeURL:T,utob:_,btou:I,decode:R,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:v,toUint8Array:P,extendString:U,extendUint8Array:M,extendBuiltins:function(){U(),M()},Base64:{}};return Object.keys(B).forEach((function(e){return B.Base64[e]=B[e]})),B}()},6063:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){var r,i;void 0===(i="function"==typeof(r={af:function(e,t){return t?"other":1==e?"one":"other"},ak:function(e,t){return t?"other":0==e||1==e?"one":"other"},am:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:function(e,t){return t?"other":1==e?"one":"other"},ast:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:function(e,t){return t?"other":1==e?"one":"other"},bez:function(e,t){return t?"other":1==e?"one":"other"},bg:function(e,t){return t?"other":1==e?"one":"other"},bh:function(e,t){return t?"other":0==e||1==e?"one":"other"},bm:function(e,t){return"other"},bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:function(e,t){return"other"},br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:function(e,t){return t?"other":1==e?"one":"other"},bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=!String(e).split(".")[1];return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&n?"one":"other"},ce:function(e,t){return t?"other":1==e?"one":"other"},cgg:function(e,t){return t?"other":1==e?"one":"other"},chr:function(e,t){return t?"other":1==e?"one":"other"},ckb:function(e,t){return t?"other":1==e?"one":"other"},cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:function(e,t){return t?"other":1==e?"one":"other"},dz:function(e,t){return"other"},ee:function(e,t){return t?"other":1==e?"one":"other"},el:function(e,t){return t?"other":1==e?"one":"other"},en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:function(e,t){return t?"other":1==e?"one":"other"},es:function(e,t){return t?"other":1==e?"one":"other"},et:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},eu:function(e,t){return t?"other":1==e?"one":"other"},fa:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:function(e,t){return t?"other":1==e?"one":"other"},fr:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},fur:function(e,t){return t?"other":1==e?"one":"other"},fy:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},gsw:function(e,t){return t?"other":1==e?"one":"other"},gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:function(e,t){return t?"other":0==e||1==e?"one":"other"},gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:function(e,t){return t?"other":1==e?"one":"other"},haw:function(e,t){return t?"other":1==e?"one":"other"},he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1);return t?"other":1==e&&i?"one":2==r&&i?"two":i&&(e<0||e>10)&&o&&0==a?"many":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},id:function(e,t){return"other"},ig:function(e,t){return"other"},ii:function(e,t){return"other"},in:function(e,t){return"other"},io:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},is:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e,o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a||!i?"one":"other"},it:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},iu:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},iw:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1);return t?"other":1==e&&i?"one":2==r&&i?"two":i&&(e<0||e>10)&&o&&0==a?"many":"other"},ja:function(e,t){return"other"},jbo:function(e,t){return"other"},jgo:function(e,t){return t?"other":1==e?"one":"other"},ji:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},jmc:function(e,t){return t?"other":1==e?"one":"other"},jv:function(e,t){return"other"},jw:function(e,t){return"other"},ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:function(e,t){return t?"other":1==e?"one":"other"},kcg:function(e,t){return t?"other":1==e?"one":"other"},kde:function(e,t){return"other"},kea:function(e,t){return"other"},kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:function(e,t){return t?"other":1==e?"one":"other"},kl:function(e,t){return t?"other":1==e?"one":"other"},km:function(e,t){return"other"},kn:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ko:function(e,t){return"other"},ks:function(e,t){return t?"other":1==e?"one":"other"},ksb:function(e,t){return t?"other":1==e?"one":"other"},ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:function(e,t){return t?"other":1==e?"one":"other"},kw:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},ky:function(e,t){return t?"other":1==e?"one":"other"},lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:function(e,t){return t?"other":1==e?"one":"other"},lg:function(e,t){return t?"other":1==e?"one":"other"},lkt:function(e,t){return"other"},ln:function(e,t){return t?"other":0==e||1==e?"one":"other"},lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&u>=11&&u<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=u||2!=i&&1==c?"one":"other"},mas:function(e,t){return t?"other":1==e?"one":"other"},mg:function(e,t){return t?"other":0==e||1==e?"one":"other"},mgo:function(e,t){return t?"other":1==e?"one":"other"},mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==u&&11!=c?"one":"other"},ml:function(e,t){return t?"other":1==e?"one":"other"},mn:function(e,t){return t?"other":1==e?"one":"other"},mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":e>=0&&e<=1?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":0==e||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:function(e,t){return"other"},nah:function(e,t){return t?"other":1==e?"one":"other"},naq:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},nb:function(e,t){return t?"other":1==e?"one":"other"},nd:function(e,t){return t?"other":1==e?"one":"other"},ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},nn:function(e,t){return t?"other":1==e?"one":"other"},nnh:function(e,t){return t?"other":1==e?"one":"other"},no:function(e,t){return t?"other":1==e?"one":"other"},nqo:function(e,t){return"other"},nr:function(e,t){return t?"other":1==e?"one":"other"},nso:function(e,t){return t?"other":0==e||1==e?"one":"other"},ny:function(e,t){return t?"other":1==e?"one":"other"},nyn:function(e,t){return t?"other":1==e?"one":"other"},om:function(e,t){return t?"other":1==e?"one":"other"},or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:function(e,t){return t?"other":1==e?"one":"other"},pa:function(e,t){return t?"other":0==e||1==e?"one":"other"},pap:function(e,t){return t?"other":1==e?"one":"other"},pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&u>=11&&u<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=u||2!=i&&1==c?"one":"other"},ps:function(e,t){return t?"other":1==e?"one":"other"},pt:function(e,t){var n=String(e).split(".")[0];return t?"other":0==n||1==n?"one":"other"},"pt-PT":function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},rm:function(e,t){return t?"other":1==e?"one":"other"},ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:function(e,t){return t?"other":1==e?"one":"other"},root:function(e,t){return"other"},ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:function(e,t){return t?"other":1==e?"one":"other"},sah:function(e,t){return"other"},saq:function(e,t){return t?"other":1==e?"one":"other"},sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:function(e,t){return t?"other":1==e?"one":"other"},sdh:function(e,t){return t?"other":1==e?"one":"other"},se:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},seh:function(e,t){return t?"other":1==e?"one":"other"},ses:function(e,t){return"other"},sg:function(e,t){return"other"},sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smi:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smj:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smn:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},sms:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},sn:function(e,t){return t?"other":1==e?"one":"other"},so:function(e,t){return t?"other":1==e?"one":"other"},sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ss:function(e,t){return t?"other":1==e?"one":"other"},ssy:function(e,t){return t?"other":1==e?"one":"other"},st:function(e,t){return t?"other":1==e?"one":"other"},sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},syr:function(e,t){return t?"other":1==e?"one":"other"},ta:function(e,t){return t?"other":1==e?"one":"other"},te:function(e,t){return t?"other":1==e?"one":"other"},teo:function(e,t){return t?"other":1==e?"one":"other"},th:function(e,t){return"other"},ti:function(e,t){return t?"other":0==e||1==e?"one":"other"},tig:function(e,t){return t?"other":1==e?"one":"other"},tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:function(e,t){return t?"other":1==e?"one":"other"},to:function(e,t){return"other"},tr:function(e,t){return t?"other":1==e?"one":"other"},ts:function(e,t){return t?"other":1==e?"one":"other"},tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:function(e,t){return t?"other":1==e?"one":"other"},uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==u&&11!=c?"one":i&&u>=2&&u<=4&&(c<12||c>14)?"few":i&&0==u||i&&u>=5&&u<=9||i&&c>=11&&c<=14?"many":"other"},ur:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},uz:function(e,t){return t?"other":1==e?"one":"other"},ve:function(e,t){return t?"other":1==e?"one":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:function(e,t){return t?"other":1==e?"one":"other"},vun:function(e,t){return t?"other":1==e?"one":"other"},wa:function(e,t){return t?"other":0==e||1==e?"one":"other"},wae:function(e,t){return t?"other":1==e?"one":"other"},wo:function(e,t){return"other"},xh:function(e,t){return t?"other":1==e?"one":"other"},xog:function(e,t){return t?"other":1==e?"one":"other"},yi:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},yo:function(e,t){return"other"},yue:function(e,t){return"other"},zh:function(e,t){return"other"},zu:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"}})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){e.exports={date:n(4),duration:n(5),number:n(6),time:n(7)}},function(e,t,n){"use strict";function r(e,t,n,i){this.message=e,this.expected=t,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(r,Error),r.buildMessage=function(e,t){var n={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,n="";for(t=0;t<e.parts.length;t++)n+=e.parts[t]instanceof Array?o(e.parts[t][0])+"-"+o(e.parts[t][1]):o(e.parts[t]);return"["+(e.inverted?"^":"")+n+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}return"Expected "+function(e){var t,r,i,o=new Array(e.length);for(t=0;t<e.length;t++)o[t]=(i=e[t],n[i.type](i));if(o.sort(),o.length>0){for(t=1,r=1;t<o.length;t++)o[t-1]!==o[t]&&(o[r]=o[t],r++);o.length=r}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:r,parse:function(e,t){t=void 0!==t?t:{};var n,i={},o={start:Oe},a=Oe,s=be("#",!1),u=function(){return Fe[0]},c=function(e){return e.join("")},l="{",d=be("{",!1),f="}",p=be("}",!1),h=",",m=be(",",!1),g="select",v=be("select",!1),y=function(e,n){return t.strict&&Fe.unshift(!1),n},w=function(e,n){return t.strict&&Fe.shift(),{type:"select",arg:e,cases:n}},_="plural",b=be("plural",!1),x="selectordinal",T=be("selectordinal",!1),k=function(e,n,r,i){var o=("selectordinal"===n?t.ordinal:t.cardinal)||["zero","one","two","few","many","other"];return o&&o.length&&i.forEach((function(t){if(isNaN(t.key)&&o.indexOf(t.key)<0)throw new Error("Invalid key `"+t.key+"` for argument `"+e+"`. Valid "+n+" keys for this locale are `"+o.join("`, `")+"`, and explicit keys like `=0`.")})),Fe.shift(),{type:n,arg:e,offset:r||0,cases:i}},S=Te("identifier"),I=/^[^\t-\r \x85\u200E\u200F\u2028\u2029!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,O=xe([["\t","\r"]," ","…","‎","‏","\u2028","\u2029",["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!0,!1),E=function(e,t){return{key:e,tokens:t}},C=Te("plural offset"),P="offset",L=be("offset",!1),N=be(":",!1),R=be("=",!1),A="number",U=be("number",!1),M="date",B=be("date",!1),D="time",F=be("time",!1),j="spellout",W=be("spellout",!1),q="ordinal",z=be("ordinal",!1),V="duration",G=be("duration",!1),H=function(e){if(t.strict||/^\d/.test(e))return!1;switch(e.toLowerCase()){case"select":case"plural":case"selectordinal":return!1;default:return!0}},X=function(e){return!t.strict},K=Te("a valid (strict) function parameter"),$=/^[^'{}]/,Z=xe(["'","{","}"],!0,!1),J="'",Y=be("'",!1),Q=Te("doubled apostrophe"),ee=be("''",!1),te=/^[^']/,ne=xe(["'"],!0,!1),re=be("'{",!1),ie=be("'}",!1),oe=Te("escaped string"),ae=be("'#",!1),se=Te("plain char"),ue=/^[^{}#\0-\x08\x0E-\x1F\x7F]/,ce=xe(["{","}","#",["\0","\b"],["",""],""],!0,!1),le=Te("integer"),de=/^[0-9]/,fe=xe([["0","9"]],!1,!1),pe=Te("white space"),he=/^[\t-\r \x85\u200E\u200F\u2028\u2029]/,me=xe([["\t","\r"]," ","…","‎","‏","\u2028","\u2029"],!1,!1),ge=0,ve=[{line:1,column:1}],ye=0,we=[],_e=0;if("startRule"in t){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function be(e,t){return{type:"literal",text:e,ignoreCase:t}}function xe(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Te(e){return{type:"other",description:e}}function ke(t){var n,r=ve[t];if(r)return r;for(n=t-1;!ve[n];)n--;for(r={line:(r=ve[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return ve[t]=r,r}function Se(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Ie(e){ge<ye||(ge>ye&&(ye=ge,we=[]),we.push(e))}function Oe(){var e,t;for(e=[],t=Ee();t!==i;)e.push(t),t=Ee();return e}function Ee(){var t,n,r;if((t=function(){var t,n,r,o;return t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i&&De()!==i&&(r=Ce())!==i&&De()!==i?(125===e.charCodeAt(ge)?(o=f,ge++):(o=i,0===_e&&Ie(p)),o!==i?t=n=function(e){return{type:"argument",arg:e}}(r):(ge=t,t=i)):(ge=t,t=i),t}())===i&&(t=function(){var t,n,r,o,a,s,u,c,_;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(De()!==i)if((r=Ce())!==i)if(De()!==i)if(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i)if(De()!==i)if(e.substr(ge,6)===g?(a=g,ge+=6):(a=i,0===_e&&Ie(v)),a!==i&&(a=y(0,a)),a!==i)if((a=De())!==i)if(44===e.charCodeAt(ge)?(s=h,ge++):(s=i,0===_e&&Ie(m)),s!==i)if(De()!==i){if(u=[],(c=Pe())!==i)for(;c!==i;)u.push(c),c=Pe();else u=i;u!==i&&(c=De())!==i?(125===e.charCodeAt(ge)?(_=f,ge++):(_=i,0===_e&&Ie(p)),_!==i?t=n=w(r,u):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,u,c,g,v,y;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(De()!==i)if((r=Ce())!==i)if(De()!==i)if(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i)if(De()!==i)if(ge,e.substr(ge,6)===_?(s=_,ge+=6):(s=i,0===_e&&Ie(b)),s===i&&(e.substr(ge,13)===x?(s=x,ge+=13):(s=i,0===_e&&Ie(T))),s!==i&&(s=function(e,t){return Fe.unshift(!0),t}(0,s)),(a=s)!==i)if((s=De())!==i)if(44===e.charCodeAt(ge)?(u=h,ge++):(u=i,0===_e&&Ie(m)),u!==i)if(De()!==i)if((c=function(){var t,n,r,o;return _e++,t=ge,De()!==i?(e.substr(ge,6)===P?(n=P,ge+=6):(n=i,0===_e&&Ie(L)),n!==i&&De()!==i?(58===e.charCodeAt(ge)?(r=":",ge++):(r=i,0===_e&&Ie(N)),r!==i&&De()!==i&&(o=Be())!==i&&De()!==i?t=o:(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i),_e--,t===i&&0===_e&&Ie(C),t}())===i&&(c=null),c!==i){if(g=[],(v=Le())!==i)for(;v!==i;)g.push(v),v=Le();else g=i;g!==i&&(v=De())!==i?(125===e.charCodeAt(ge)?(y=f,ge++):(y=i,0===_e&&Ie(p)),y!==i?t=n=k(r,a,c,g):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,u;return t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i&&De()!==i&&(r=Ce())!==i&&De()!==i?(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i&&De()!==i&&(a=function(){var t,n,r,o,a;return e.substr(ge,6)===A?(t=A,ge+=6):(t=i,0===_e&&Ie(U)),t===i&&(e.substr(ge,4)===M?(t=M,ge+=4):(t=i,0===_e&&Ie(B)),t===i&&(e.substr(ge,4)===D?(t=D,ge+=4):(t=i,0===_e&&Ie(F)),t===i&&(e.substr(ge,8)===j?(t=j,ge+=8):(t=i,0===_e&&Ie(W)),t===i&&(e.substr(ge,7)===q?(t=q,ge+=7):(t=i,0===_e&&Ie(z)),t===i&&(e.substr(ge,8)===V?(t=V,ge+=8):(t=i,0===_e&&Ie(G)),t===i&&(t=ge,n=ge,_e++,e.substr(ge,6)===g?(r=g,ge+=6):(r=i,0===_e&&Ie(v)),_e--,r===i?n=void 0:(ge=n,n=i),n!==i?(r=ge,_e++,e.substr(ge,6)===_?(o=_,ge+=6):(o=i,0===_e&&Ie(b)),_e--,o===i?r=void 0:(ge=r,r=i),r!==i?(o=ge,_e++,e.substr(ge,13)===x?(a=x,ge+=13):(a=i,0===_e&&Ie(T)),_e--,a===i?o=void 0:(ge=o,o=i),o!==i&&(a=Ce())!==i&&(H(a)?void 0:i)!==i?t=n=a:(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i))))))),t}())!==i&&De()!==i?((s=function(){var t,n,r,o;if(t=ge,De()!==i)if(44===e.charCodeAt(ge)?(n=h,ge++):(n=i,0===_e&&Ie(m)),n!==i){for(r=[],o=Ee();o!==i;)r.push(o),o=Ee();r!==i&&(o=(o=X())?void 0:i)!==i?t=function(e){return{tokens:e}}(r):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;if(t===i)if(t=ge,De()!==i)if(44===e.charCodeAt(ge)?(n=h,ge++):(n=i,0===_e&&Ie(m)),n!==i){for(r=[],o=Re();o!==i;)r.push(o),o=Re();r!==i?t=function(e){return{tokens:[e.join("")]}}(r):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;return t}())===i&&(s=null),s!==i?(125===e.charCodeAt(ge)?(u=f,ge++):(u=i,0===_e&&Ie(p)),u!==i?t=n=function(e,t,n){return{type:"function",arg:e,key:t,param:n}}(r,a,s):(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i),t}())===i&&(t=ge,35===e.charCodeAt(ge)?(n="#",ge++):(n=i,0===_e&&Ie(s)),n!==i&&(r=(r=u())?void 0:i)!==i?t=n={type:"octothorpe"}:(ge=t,t=i),t===i)){if(t=ge,n=[],(r=Me())!==i)for(;r!==i;)n.push(r),r=Me();else n=i;n!==i&&(n=c(n)),t=n}return t}function Ce(){var t,n,r;if(_e++,t=ge,n=[],I.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(O)),r!==i)for(;r!==i;)n.push(r),I.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(O));else n=i;return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(S)),t}function Pe(){var e,t,n;return e=ge,De()!==i&&(t=Ce())!==i&&De()!==i&&(n=Ne())!==i?e=E(t,n):(ge=e,e=i),e}function Le(){var t,n,r;return t=ge,De()!==i&&(n=function(){var t,n,r;return(t=Ce())===i&&(t=ge,61===e.charCodeAt(ge)?(n="=",ge++):(n=i,0===_e&&Ie(R)),n!==i&&(r=Be())!==i?t=n=r:(ge=t,t=i)),t}())!==i&&De()!==i&&(r=Ne())!==i?t=E(n,r):(ge=t,t=i),t}function Ne(){var t,n,r,o,a,s;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(r=ge,(o=De())!==i?(a=ge,_e++,123===e.charCodeAt(ge)?(s=l,ge++):(s=i,0===_e&&Ie(d)),_e--,s!==i?(ge=a,a=void 0):a=i,a!==i?r=o=[o,a]:(ge=r,r=i)):(ge=r,r=i),r===i&&(r=null),r!==i){for(o=[],a=Ee();a!==i;)o.push(a),a=Ee();o!==i&&(a=De())!==i?(125===e.charCodeAt(ge)?(s=f,ge++):(s=i,0===_e&&Ie(p)),s!==i?t=n=o:(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;return t}function Re(){var t,n,r,o;if(_e++,t=ge,n=[],$.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(Z)),r!==i)for(;r!==i;)n.push(r),$.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(Z));else n=i;if(n!==i&&(n=function(e){return e.join("")}(n)),(t=n)===i&&(t=Ae())===i&&(t=ge,39===e.charCodeAt(ge)?(n=J,ge++):(n=i,0===_e&&Ie(Y)),n!==i&&(r=Ue())!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=r:(ge=t,t=i)):(ge=t,t=i),t===i))if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i){for(r=[],o=Re();o!==i;)r.push(o),o=Re();r!==i?(125===e.charCodeAt(ge)?(o=f,ge++):(o=i,0===_e&&Ie(p)),o!==i?t=n=function(e){return"{"+e.join("")+"}"}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;return _e--,t===i&&(n=i,0===_e&&Ie(K)),t}function Ae(){var t,n;return _e++,ge,"''"===e.substr(ge,2)?(n="''",ge+=2):(n=i,0===_e&&Ie(ee)),n!==i&&(n="'"),_e--,(t=n)===i&&(n=i,0===_e&&Ie(Q)),t}function Ue(){var t,n,r;if((t=Ae())===i){if(t=ge,n=[],te.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(ne)),r!==i)for(;r!==i;)n.push(r),te.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(ne));else n=i;n!==i&&(n=c(n)),t=n}return t}function Me(){var t,n;return(t=Ae())===i&&(t=function(){var t,n,r,o,a,s;if(_e++,(t=function(){var t,n,r,o;if(t=ge,"'{"===e.substr(ge,2)?(n="'{",ge+=2):(n=i,0===_e&&Ie(re)),n!==i){for(r=[],o=Ue();o!==i;)r.push(o),o=Ue();r!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=function(e){return"{"+e.join("")}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;if(t===i)if(t=ge,"'}"===e.substr(ge,2)?(n="'}",ge+=2):(n=i,0===_e&&Ie(ie)),n!==i){for(r=[],o=Ue();o!==i;)r.push(o),o=Ue();r!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=function(e){return"}"+e.join("")}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;return t}())===i){if(t=ge,n=ge,r=ge,"'#"===e.substr(ge,2)?(o="'#",ge+=2):(o=i,0===_e&&Ie(ae)),o!==i){for(a=[],s=Ue();s!==i;)a.push(s),s=Ue();a!==i?(39===e.charCodeAt(ge)?(s=J,ge++):(s=i,0===_e&&Ie(Y)),s!==i?r=o=function(e){return"#"+e.join("")}(a):(ge=r,r=i)):(ge=r,r=i)}else ge=r,r=i;r!==i&&(o=(o=u())?void 0:i)!==i?n=r=[r,o]:(ge=n,n=i),n!==i&&(n=function(e){return e[0]}(n)),(t=n)===i&&(39===e.charCodeAt(ge)?(t=J,ge++):(t=i,0===_e&&Ie(Y)))}return _e--,t===i&&(n=i,0===_e&&Ie(oe)),t}())===i&&(t=ge,35===e.charCodeAt(ge)?(n="#",ge++):(n=i,0===_e&&Ie(s)),n!==i&&(Fe[0]?i:void 0)!==i?t=n=n:(ge=t,t=i),t===i&&(t=function(){var t;return _e++,ue.test(e.charAt(ge))?(t=e.charAt(ge),ge++):(t=i,0===_e&&Ie(ce)),_e--,t===i&&0===_e&&Ie(se),t}())),t}function Be(){var t,n,r;if(_e++,t=ge,n=[],de.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(fe)),r!==i)for(;r!==i;)n.push(r),de.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(fe));else n=i;return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(le)),t}function De(){var t,n,r;for(_e++,t=ge,n=[],he.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(me));r!==i;)n.push(r),he.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(me));return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(pe)),t}var Fe=[!1];if((n=a())!==i&&ge===e.length)return n;throw n!==i&&ge<e.length&&Ie({type:"end"}),function(e,t,n){return new r(r.buildMessage(e,t),e,t,n)}(we,ye<e.length?e.charAt(ye):null,ye<e.length?Se(ye,ye+1):Se(ye,ye))}}},function(e,t,n){var r,i,o=[{cardinal:["other"],ordinal:["other"]},{cardinal:["one","other"],ordinal:["other"]},{cardinal:["one","other"],ordinal:["one","other"]},{cardinal:["one","two","other"],ordinal:["other"]}];void 0===(i="function"==typeof(r={af:o[1],ak:o[1],am:o[1],ar:{cardinal:["zero","one","two","few","many","other"],ordinal:["other"]},ars:{cardinal:["zero","one","two","few","many","other"],ordinal:["other"]},as:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},asa:o[1],ast:o[1],az:{cardinal:["one","other"],ordinal:["one","few","many","other"]},be:{cardinal:["one","few","many","other"],ordinal:["few","other"]},bem:o[1],bez:o[1],bg:o[1],bh:o[1],bm:o[0],bn:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},bo:o[0],br:{cardinal:["one","two","few","many","other"],ordinal:["other"]},brx:o[1],bs:{cardinal:["one","few","other"],ordinal:["other"]},ca:{cardinal:["one","other"],ordinal:["one","two","few","other"]},ce:o[1],cgg:o[1],chr:o[1],ckb:o[1],cs:{cardinal:["one","few","many","other"],ordinal:["other"]},cy:{cardinal:["zero","one","two","few","many","other"],ordinal:["zero","one","two","few","many","other"]},da:o[1],de:o[1],dsb:{cardinal:["one","two","few","other"],ordinal:["other"]},dv:o[1],dz:o[0],ee:o[1],el:o[1],en:{cardinal:["one","other"],ordinal:["one","two","few","other"]},eo:o[1],es:o[1],et:o[1],eu:o[1],fa:o[1],ff:o[1],fi:o[1],fil:o[2],fo:o[1],fr:o[2],fur:o[1],fy:o[1],ga:{cardinal:["one","two","few","many","other"],ordinal:["one","other"]},gd:{cardinal:["one","two","few","other"],ordinal:["one","two","few","other"]},gl:o[1],gsw:o[1],gu:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},guw:o[1],gv:{cardinal:["one","two","few","many","other"],ordinal:["other"]},ha:o[1],haw:o[1],he:{cardinal:["one","two","many","other"],ordinal:["other"]},hi:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},hr:{cardinal:["one","few","other"],ordinal:["other"]},hsb:{cardinal:["one","two","few","other"],ordinal:["other"]},hu:o[2],hy:o[2],ia:o[1],id:o[0],ig:o[0],ii:o[0],in:o[0],io:o[1],is:o[1],it:{cardinal:["one","other"],ordinal:["many","other"]},iu:o[3],iw:{cardinal:["one","two","many","other"],ordinal:["other"]},ja:o[0],jbo:o[0],jgo:o[1],ji:o[1],jmc:o[1],jv:o[0],jw:o[0],ka:{cardinal:["one","other"],ordinal:["one","many","other"]},kab:o[1],kaj:o[1],kcg:o[1],kde:o[0],kea:o[0],kk:{cardinal:["one","other"],ordinal:["many","other"]},kkj:o[1],kl:o[1],km:o[0],kn:o[1],ko:o[0],ks:o[1],ksb:o[1],ksh:{cardinal:["zero","one","other"],ordinal:["other"]},ku:o[1],kw:o[3],ky:o[1],lag:{cardinal:["zero","one","other"],ordinal:["other"]},lb:o[1],lg:o[1],lkt:o[0],ln:o[1],lo:{cardinal:["other"],ordinal:["one","other"]},lt:{cardinal:["one","few","many","other"],ordinal:["other"]},lv:{cardinal:["zero","one","other"],ordinal:["other"]},mas:o[1],mg:o[1],mgo:o[1],mk:{cardinal:["one","other"],ordinal:["one","two","many","other"]},ml:o[1],mn:o[1],mo:{cardinal:["one","few","other"],ordinal:["one","other"]},mr:{cardinal:["one","other"],ordinal:["one","two","few","other"]},ms:{cardinal:["other"],ordinal:["one","other"]},mt:{cardinal:["one","few","many","other"],ordinal:["other"]},my:o[0],nah:o[1],naq:o[3],nb:o[1],nd:o[1],ne:o[2],nl:o[1],nn:o[1],nnh:o[1],no:o[1],nqo:o[0],nr:o[1],nso:o[1],ny:o[1],nyn:o[1],om:o[1],or:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},os:o[1],pa:o[1],pap:o[1],pl:{cardinal:["one","few","many","other"],ordinal:["other"]},prg:{cardinal:["zero","one","other"],ordinal:["other"]},ps:o[1],pt:o[1],"pt-PT":o[1],rm:o[1],ro:{cardinal:["one","few","other"],ordinal:["one","other"]},rof:o[1],root:o[0],ru:{cardinal:["one","few","many","other"],ordinal:["other"]},rwk:o[1],sah:o[0],saq:o[1],sc:{cardinal:["one","other"],ordinal:["many","other"]},scn:{cardinal:["one","other"],ordinal:["many","other"]},sd:o[1],sdh:o[1],se:o[3],seh:o[1],ses:o[0],sg:o[0],sh:{cardinal:["one","few","other"],ordinal:["other"]},shi:{cardinal:["one","few","other"],ordinal:["other"]},si:o[1],sk:{cardinal:["one","few","many","other"],ordinal:["other"]},sl:{cardinal:["one","two","few","other"],ordinal:["other"]},sma:o[3],smi:o[3],smj:o[3],smn:o[3],sms:o[3],sn:o[1],so:o[1],sq:{cardinal:["one","other"],ordinal:["one","many","other"]},sr:{cardinal:["one","few","other"],ordinal:["other"]},ss:o[1],ssy:o[1],st:o[1],sv:o[2],sw:o[1],syr:o[1],ta:o[1],te:o[1],teo:o[1],th:o[0],ti:o[1],tig:o[1],tk:{cardinal:["one","other"],ordinal:["few","other"]},tl:o[2],tn:o[1],to:o[0],tr:o[1],ts:o[1],tzm:o[1],ug:o[1],uk:{cardinal:["one","few","many","other"],ordinal:["few","other"]},ur:o[1],uz:o[1],ve:o[1],vi:{cardinal:["other"],ordinal:["one","other"]},vo:o[1],vun:o[1],wa:o[1],wae:o[1],wo:o[0],xh:o[1],xog:o[1],yi:o[1],yo:o[0],yue:o[0],zh:o[0],zu:o[1]})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t){function n(e,t,n){var r={day:"numeric",month:"short",year:"numeric"};switch(n){case"full":r.weekday="long";case"long":r.month="long";break;case"short":r.month="numeric"}return new Date(e).toLocaleDateString(t,r)}e.exports=function(){return n}},function(e,t){function n(e){if(!isFinite(e))return String(e);var t="";e<0?(t="-",e=Math.abs(e)):e=Number(e);var n=e%60,r=[Math.round(n)===n?n:n.toFixed(3)];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.shift()+":"+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":")}e.exports=function(){return n}},function(e,t){e.exports=function(e){var t=function(e,t,n){var r=n&&n.split(":")||[],i={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:r[1]&&r[1].trim()||CURRENCY,minimumFractionDigits:2,maximumFractionDigits:2}};return new Intl.NumberFormat(t,i[r[0]]||{}).format(e)}.toString().replace("CURRENCY",JSON.stringify(e.currency||"USD")).match(/\(([^)]*)\)[^{]*{([\s\S]*)}/);return new Function(t[1],t[2])}},function(e,t){function n(e,t,n){var r={second:"numeric",minute:"numeric",hour:"numeric"};switch(n){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}return new Date(e).toLocaleTimeString(t,r)}e.exports=function(){return n}},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),o=n(2),a={break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},s={debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0};function u(e,t){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(e)&&!a[e])return t?"".concat(t,".").concat(e):e;var n=JSON.stringify(e);return t?t+"[".concat(n,"]"):n}function c(e){var t=e.trim().replace(/\W+/g,"_");return a[t]||s[t]||/^\d/.test(t)?"_"+t:t}var l=new RegExp("^"+["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"].join("|^"));function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mf=t,this.lc=null,this.locales={},this.runtime={},this.formatters={}}var t,n;return t=e,(n=[{key:"compile",value:function(e,t,n){var r=this;if("object"!=d(e)){this.lc=t;var i=n[t]||{cardinal:[],ordinal:[]};i.strict=!!this.mf.options.strictNumberSign;var a=Object(o.parse)(e,i).map((function(e){return r.token(e)}));return"function(d) { return ".concat(a.join(" + ")||'""',"; }")}var s={};for(var u in e){var c=n.hasOwnProperty(u)?u:t;s[u]=this.compile(e[u],c,n)}return s}},{key:"cases",value:function(e,t){var n=this,r="select"===e.type||!this.mf.hasCustomPluralFuncs,i=e.cases.map((function(e){var i=e.key,o=e.tokens;"other"===i&&(r=!1);var a=o.map((function(e){return n.token(e,t)}));return u(i)+": "+(a.join(" + ")||'""')}));if(r)throw new Error("No 'other' form found in "+JSON.stringify(e));return"{ ".concat(i.join(", ")," }")}},{key:"token",value:function(e,t){var n,r=this;if("string"==typeof e)return JSON.stringify(e);var i,o,a,s,d=[u(e.arg,"d")];switch(e.type){case"argument":return this.mf.options.biDiSupport?(i=d[0],o=this.lc,a=l.test(o),s=JSON.stringify(a?"‏":"‎"),"".concat(s," + ").concat(i," + ").concat(s)):d[0];case"select":n="select",t&&this.mf.options.strictNumberSign&&(t=null),d.push(this.cases(e,t)),this.runtime.select=!0;break;case"selectordinal":n="plural",d.push(0,c(this.lc),this.cases(e,e),1),this.locales[this.lc]=!0,this.runtime.plural=!0;break;case"plural":n="plural",d.push(e.offset||0,c(this.lc),this.cases(e,e)),this.locales[this.lc]=!0,this.runtime.plural=!0;break;case"function":if(!(e.key in this.mf.fmt)&&e.key in this.mf.constructor.formatters){var f=this.mf.constructor.formatters[e.key];this.mf.fmt[e.key]=f(this.mf)}if(!this.mf.fmt[e.key])throw new Error("Formatting function ".concat(JSON.stringify(e.key)," not found!"));if(d.push(JSON.stringify(this.lc)),e.param){t&&this.mf.options.strictNumberSign&&(t=null);var p=e.param.tokens.map((function(e){return r.token(e,t)}));d.push("("+(p.join(" + ")||'""')+").trim()")}n=u(e.key,"fmt"),this.formatters[e.key]=!0;break;case"octothorpe":if(!t)return'"#"';n="number",d=[u(t.arg,"d"),JSON.stringify(t.arg)],t.offset&&d.push(t.offset),this.runtime.number=!0}if(!n)throw new Error("Parser error for token "+JSON.stringify(e));return"".concat(n,"(").concat(d.join(", "),")")}}])&&f(t.prototype,n),e}(),h=n(3),m=n.n(h),g=n(0),v=n.n(g);function y(e,t,n){var r=function(){return t.apply(this,arguments)};if(r.toString=function(){return t.toString()},n){var i=m.a[e]||{};r.cardinal=i.cardinal,r.ordinal=i.ordinal}else r.cardinal=[],r.ordinal=[];return r}function w(e,t){for(var n=t.pluralKeyChecks,r=String(e);r;r=r.replace(/[-_]?[^-_]*$/,"")){var i=v.a[r];if(i)return y(r,i,n)}throw new Error("Localisation function not found for locale "+JSON.stringify(e))}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plural=function(e,t,n,r,i){if({}.hasOwnProperty.call(r,e))return r[e];t&&(e-=t);var o=n(e,i);return o in r?r[o]:r.other},this.select=function(e,t){return{}.hasOwnProperty.call(t,e)?t[e]:t.other},this.mf=t,this.setStrictNumber(t.options.strictNumberSign)}var t,n;return t=e,(n=[{key:"setStrictNumber",value:function(t){this.number=t?e.strictNumber:e.defaultNumber}},{key:"toString",value:function(e,t){for(var n={},r=Object.keys(t.locales),i=0;i<r.length;++i){var o=r[i];n[c(o)]=e[o]}for(var a=Object.keys(t.runtime),s=0;s<a.length;++s){var l=a[s];n[l]=this[l]}var d=Object.keys(t.formatters);if(d.length>0){n.fmt={};for(var f=0;f<d.length;++f){var p=d[f];n.fmt[p]=this.mf.fmt[p]}}return function e(t,n){if("object"!=_(t)){var r=t.toString().replace(/^(function )\w*/,"$1"),i=/([ \t]*)\S.*$/.exec(r);return i?r.replace(new RegExp("^"+i[1],"mg"),""):r}var o=[];for(var a in t){var s=e(t[a],n+1);o.push(0===n?"var ".concat(a," = ").concat(s,";\n"):"".concat(u(a),": ").concat(s))}if(0===n)return o.join("");if(0===o.length)return"{}";for(var c=" ";--n;)c+=" ";var l=o.join(",\n").replace(/^/gm,c);return"{\n".concat(l,"\n}")}(n,0)}}])&&b(t.prototype,n),e}();function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}x.defaultNumber=function(e,t,n){if(!n)return e;if(isNaN(e))throw new Error("Can't apply offset:"+n+" to argument `"+t+"` with non-numerical value "+JSON.stringify(e)+".");return e-n},x.strictNumber=function(e,t,n){if(isNaN(e))throw new Error("Argument `"+t+"` has non-numerical value "+JSON.stringify(e)+".");return e-(n||0)},n.d(t,"default",(function(){return I}));var I=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Object.assign({biDiSupport:!1,customFormatters:null,pluralKeyChecks:!0,strictNumberSign:!1},n),this.pluralFuncs={},"string"==typeof t)this.pluralFuncs[t]=w(t,this.options),this.defaultLocale=t;else if(Array.isArray(t))t.forEach((function(e){r.pluralFuncs[e]=w(e,r.options)})),this.defaultLocale=t[0];else{if(t)for(var i=Object.keys(t),o=0;o<i.length;++o){var a=i[o];if("function"!=typeof t[a]){var s="Expected function value for locale "+String(a);throw new Error(s)}this.pluralFuncs[a]=t[a],this.defaultLocale||(this.defaultLocale=a)}this.defaultLocale?this.hasCustomPluralFuncs=!0:(this.defaultLocale=e.defaultLocale,this.hasCustomPluralFuncs=!1)}this.fmt=Object.assign({},this.options.customFormatters),this.runtime=new x(this)}return S(e,null,[{key:"escape",value:function(e,t){var n=t?/[#{}]/g:/[{}]/g;return String(e).replace(n,"'$&'")}}]),S(e,[{key:"addFormatters",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;++n){var r=t[n];this.fmt[r]=e[r]}return this}},{key:"disablePluralKeyChecks",value:function(){for(var e in this.options.pluralKeyChecks=!1,this.pluralFuncs){var t=this.pluralFuncs[e];t&&(t.cardinal=[],t.ordinal=[])}return this}},{key:"setBiDiSupport",value:function(e){return this.options.biDiSupport=!!e||void 0===e,this}},{key:"setStrictNumberSign",value:function(e){return this.options.strictNumberSign=!!e||void 0===e,this.runtime.setStrictNumber(this.options.strictNumberSign),this}},{key:"compile",value:function(e,t){var n={};if(0===Object.keys(this.pluralFuncs).length)if(t){var r=w(t,this.options);if(!r){var i=JSON.stringify(t);throw new Error("Locale ".concat(i," not found!"))}n[t]=r}else t=this.defaultLocale,n=function(e){for(var t=e.pluralKeyChecks,n={},r=Object.keys(v.a),i=0;i<r.length;++i){var o=r[i];n[o]=y(o,v.a[o],t)}return n}(this.options);else if(t){var o=this.pluralFuncs[t];if(!o){var a=JSON.stringify(t),s=JSON.stringify(this.pluralFuncs);throw new Error("Locale ".concat(a," not found in ").concat(s,"!"))}n[t]=o}else t=this.defaultLocale,n=this.pluralFuncs;var l=new p(this),d=l.compile(e,t,n);if("object"!=T(e)){var f=new Function("number, plural, select, fmt",c(t),"return "+d),h=this.runtime;return f(h.number,h.plural,h.select,this.fmt,n[t])}var m=this.runtime.toString(n,l)+"\n",g=function e(t,n){if(n||(n=0),"object"!=T(t))return t;for(var r="",i=0;i<n;++i)r+=" ";var o=[];for(var a in t){var s=e(t[a],n+1);o.push("\n".concat(r," ").concat(u(a),": ").concat(s))}return"{".concat(o.join(","),"\n").concat(r,"}")}(d),_=new Function(m+"return "+g)();if(_.hasOwnProperty("toString"))throw new Error("The top-level message key `toString` is reserved");return _.toString=function(e){return e&&"export default"!==e?e.indexOf(".")>-1?m+e+" = "+g:m+["(function (root, G) {",' if (typeof define === "function" && define.amd) { define(G); }',' else if (typeof exports === "object") { module.exports = G; }'," else { "+u(e,"root")+" = G; }","})(this, "+g+");"].join("\n"):m+"export default "+g},_}}]),e}();I.defaultLocale="en",I.formatters=i.a}]).default},9591:(e,t,n)=>{"use strict";var r={};(0,n(4236).assign)(r,n(4555),n(8843),n(1619)),e.exports=r},4555:(e,t,n)=>{"use strict";var r=n(405),i=n(4236),o=n(9373),a=n(8898),s=n(2292),u=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var l;if(l="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,l)))throw new Error(a[n]);this._dict_set=!0}}function l(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=l,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}},8843:(e,t,n)=>{"use strict";var r=n(7948),i=n(4236),o=n(9373),a=n(1619),s=n(8898),u=n(2292),c=n(2401),l=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,u,c,d,f,p=this.strm,h=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(h),p.next_out=0,p.avail_out=h),(n=r.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===g&&(n=a.Z_OK,g=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(p.output,p.next_out),c=p.next_out-u,d=o.buf2string(p.output,u),p.next_out=c,p.avail_out=h-c,c&&i.arraySet(p.output,p.output,u,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},4236:(e,t)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},9373:(e,t,n)=>{"use strict";var r=n(4236),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(u),a=0,o=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return u(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,o,s=t||e.length,c=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if((o=a[i])>4)c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n<s;)i=i<<6|63&e[n++],o--;o>1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return u(c,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},6069:e=>{"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},405:(e,t,n)=>{"use strict";var r,i=n(4236),o=n(342),a=n(6069),s=n(2869),u=n(8898),c=-2,l=258,d=262,f=103,p=113,h=666;function m(e,t){return e.msg=u[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function w(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,f=e.w_mask,p=e.prev,h=e.strstart+l,m=c[o+a-1],g=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===g&&c[n+a-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=l-(h-o),o=h-l,r>a){if(e.match_start=t,a=r,r>=s)break;m=c[o+a-1],g=c[o+a]}}}while((t=p[t&f])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function T(e){var t,n,r,o,u,c,l,f,p,h,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);o+=m}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,f=e.strstart+e.lookahead,p=o,h=void 0,(h=c.avail_in)>p&&(h=p),n=0===h?0:(c.avail_in-=h,i.arraySet(l,c.input,c.next_in,h,f),1===c.state.wrap?c.adler=a(c.adler,l,h,f):2===c.state.wrap&&(c.adler=s(c.adler,l,h,f)),c.next_in+=h,c.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+3-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function k(e,t){for(var n,r;;){if(e.lookahead<d){if(T(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=x(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,i;;){if(e.lookahead<d){if(T(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=x(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(w(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&w(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function I(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),v(this.dyn_ltree),v(this.dyn_dtree),v(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),v(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),v(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):m(e,c)}function C(e){var t,n=E(e);return 0===n&&((t=e.state).window_size=2*t.w_size,v(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function P(e,t,n,r,o,a){if(!e)return c;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,c);8===r&&(r=9);var u=new O;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=n,C(e)}r=[new I(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(T(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,w(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(w(e,!1),e.strm.avail_out),1)})),new I(4,4,8,4,k),new I(4,5,16,8,k),new I(4,6,32,32,k),new I(4,4,16,16,S),new I(8,16,32,32,S),new I(8,16,128,128,S),new I(8,32,128,256,S),new I(32,128,258,1024,S),new I(32,258,258,4096,S)],t.deflateInit=function(e,t){return P(e,t,8,15,8,0)},t.deflateInit2=P,t.deflateReset=C,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var n,i,a,u;if(!e||!e.state||t>5||t<0)return e?m(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===h&&4!==t)return m(e,0===e.avail_out?-5:c);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,_(i,31),_(i,139),_(i,8),i.gzhead?(_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),_(i,255&i.gzhead.time),_(i,i.gzhead.time>>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,3),i.status=p);else{var d=8+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=p,b(i,d),0!==i.strstart&&(b(i,e.adler>>>16),b(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,_(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,_(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=f)}else i.status=f;if(i.status===f&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(_(i,255&e.adler),_(i,e.adler>>8&255),e.adler=0,i.status=p)):i.status=p),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(n)&&4!==t)return m(e,-5);if(i.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==h){var x=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(T(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=l){if(T(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+l;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=l-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==x&&4!==x||(i.status=h),1===x||3===x)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===x&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&e.adler),_(i,e.adler>>8&255),_(i,e.adler>>16&255),_(i,e.adler>>24&255),_(i,255&e.total_in),_(i,e.total_in>>8&255),_(i,e.total_in>>16&255),_(i,e.total_in>>24&255)):(b(i,e.adler>>>16),b(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?m(e,c):(e.state=null,t===p?m(e,-3):0):c},t.deflateSetDictionary=function(e,t){var n,r,o,s,u,l,d,f,p=t.length;if(!e||!e.state)return c;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),u=e.avail_in,l=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,T(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--o);n.strstart=r,n.lookahead=2,T(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=l,e.input=d,e.avail_in=u,n.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},2401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){var n,r,i,o,a,s,u,c,l,d,f,p,h,m,g,v,y,w,_,b,x,T,k,S,I;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,I=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),w=m[p&v];t:for(;;){if(p>>>=_=w>>>24,h-=_,0==(_=w>>>16&255))I[o++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=m[(65535&w)+(p&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&w,(_&=15)&&(h<_&&(p+=S[r++]<<h,h+=8),b+=p&(1<<_)-1,p>>>=_,h-=_),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),w=g[p&y];n:for(;;){if(p>>>=_=w>>>24,h-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=g[(65535&w)+(p&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&w,h<(_&=15)&&(p+=S[r++]<<h,(h+=8)<_&&(p+=S[r++]<<h,h+=8)),(x+=p&(1<<_)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=_,h-=_,x>(_=o-a)){if((_=x-_)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(T=0,k=f,0===d){if(T+=c-_,_<b){b-=_;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}}else if(d<_){if(T+=c+d-_,(_-=d)<b){b-=_;do{I[o++]=f[T++]}while(--_);if(T=0,d<b){b-=_=d;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}}}else if(T+=d-_,_<b){b-=_;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}for(;b>2;)I[o++]=k[T++],I[o++]=k[T++],I[o++]=k[T++],b-=3;b&&(I[o++]=k[T++],b>1&&(I[o++]=k[T++]))}else{T=o-x;do{I[o++]=I[T++],I[o++]=I[T++],I[o++]=I[T++],b-=3}while(b>2);b&&(I[o++]=I[T++],b>1&&(I[o++]=I[T++]))}break}}break}}while(r<i&&o<s);r-=b=h>>3,p&=(1<<(h-=b<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=h}},7948:(e,t,n)=>{"use strict";var r=n(4236),i=n(6069),o=n(2869),a=n(4264),s=n(9241),u=-2,c=12,l=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):u}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):u}function m(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):u}function g(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):u}var v,y,w=!0;function _(e){if(w){var t;for(v=new r.Buf32(512),y=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),w=!1}e.lencode=v,e.lenbits=9,e.distcode=y,e.distbits=5}function b(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=h,t.inflateReset2=m,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var n,f,p,h,m,g,v,y,w,x,T,k,S,I,O,E,C,P,L,N,R,A,U,M,B=0,D=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(n=e.state).mode===c&&(n.mode=13),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,y=n.hold,w=n.bits,x=g,T=v,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(2&n.wrap&&35615===y){n.check=0,D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0),y=0,w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",n.mode=l;break}if(8!=(15&y)){e.msg="unknown compression method",n.mode=l;break}if(w-=4,R=8+(15&(y>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){e.msg="invalid window size",n.mode=l;break}n.dmax=1<<R,e.adler=n.check=1,n.mode=512&y?10:c,y=0,w=0;break;case 2:for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(n.flags=y,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=l;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=l;break}n.head&&(n.head.text=y>>8&1),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0,n.mode=3;case 3:for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.head&&(n.head.time=y),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,D[2]=y>>>16&255,D[3]=y>>>24&255,n.check=o(n.check,D,4,0)),y=0,w=0,n.mode=4;case 4:for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.head&&(n.head.xflags=255&y,n.head.os=y>>8),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.length=y,n.head&&(n.head.extra_len=y),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((k=n.length)>g&&(k=g),k&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,k,R)),512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;k=0;do{R=f[h+k++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R))}while(R&&k<g);if(512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,R)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===g)break e;k=0;do{R=f[h+k++],n.head&&R&&n.length<65536&&(n.head.comment+=String.fromCharCode(R))}while(R&&k<g);if(512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,R)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y!==(65535&n.check)){e.msg="header crc mismatch",n.mode=l;break}y=0,w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=c;break;case 10:for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}e.adler=n.check=d(y),y=0,w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,2;e.adler=n.check=1,n.mode=c;case c:if(5===t||6===t)break e;case 13:if(n.last){y>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}switch(n.last=1&y,w-=1,3&(y>>>=1)){case 0:n.mode=14;break;case 1:if(_(n),n.mode=20,6===t){y>>>=2,w-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=l}y>>>=2,w-=2;break;case 14:for(y>>>=7&w,w-=7&w;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",n.mode=l;break}if(n.length=65535&y,y=0,w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(k>g&&(k=g),k>v&&(k=v),0===k)break e;r.arraySet(p,f,h,k,m),g-=k,h+=k,v-=k,m+=k,n.length-=k;break}n.mode=c;break;case 17:for(;w<14;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(n.nlen=257+(31&y),y>>>=5,w-=5,n.ndist=1+(31&y),y>>>=5,w-=5,n.ncode=4+(15&y),y>>>=4,w-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=l;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.lens[F[n.have++]]=7&y,y>>>=3,w-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},A=s(0,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,A){e.msg="invalid code lengths set",n.mode=l;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(B=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(C<16)y>>>=O,w-=O,n.lens[n.have++]=C;else{if(16===C){for(M=O+2;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y>>>=O,w-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=l;break}R=n.lens[n.have-1],k=3+(3&y),y>>>=2,w-=2}else if(17===C){for(M=O+3;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}w-=O,R=0,k=3+(7&(y>>>=O)),y>>>=3,w-=3}else{for(M=O+7;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}w-=O,R=0,k=11+(127&(y>>>=O)),y>>>=7,w-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=l;break}for(;k--;)n.lens[n.have++]=R}}if(n.mode===l)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=l;break}if(n.lenbits=9,U={bits:n.lenbits},A=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,A){e.msg="invalid literal/lengths set",n.mode=l;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},A=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,A){e.msg="invalid distances set",n.mode=l;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,a(e,T),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,y=n.hold,w=n.bits,n.mode===c&&(n.back=-1);break}for(n.back=0;E=(B=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(E&&0==(240&E)){for(P=O,L=E,N=C;E=(B=n.lencode[N+((y&(1<<P+L)-1)>>P)])>>>16&255,C=65535&B,!(P+(O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}y>>>=P,w-=P,n.back+=P}if(y>>>=O,w-=O,n.back+=O,n.length=C,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=c;break}if(64&E){e.msg="invalid literal/length code",n.mode=l;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(M=n.extra;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.length+=y&(1<<n.extra)-1,y>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(B=n.distcode[y&(1<<n.distbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(0==(240&E)){for(P=O,L=E,N=C;E=(B=n.distcode[N+((y&(1<<P+L)-1)>>P)])>>>16&255,C=65535&B,!(P+(O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}y>>>=P,w-=P,n.back+=P}if(y>>>=O,w-=O,n.back+=O,64&E){e.msg="invalid distance code",n.mode=l;break}n.offset=C,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(M=n.extra;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.offset+=y&(1<<n.extra)-1,y>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=l;break}n.mode=25;case 25:if(0===v)break e;if(k=T-v,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=l;break}k>n.wnext?(k-=n.wnext,S=n.wsize-k):S=n.wnext-k,k>n.length&&(k=n.length),I=n.window}else I=p,S=m-n.offset,k=n.length;k>v&&(k=v),v-=k,n.length-=k;do{p[m++]=I[S++]}while(--k);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;p[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===g)break e;g--,y|=f[h++]<<w,w+=8}if(T-=v,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?o(n.check,p,T,m-T):i(n.check,p,T,m-T)),T=v,(n.flags?y:d(y))!==n.check){e.msg="incorrect data check",n.mode=l;break}y=0,w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=l;break}y=0,w=0}n.mode=29;case 29:A=1;break e;case l:A=-3;break e;case 31:return-4;case 32:default:return u}return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,(n.wsize||T!==e.avail_out&&n.mode<l&&(n.mode<27||4!==t))&&b(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(x-=e.avail_in,T-=e.avail_out,e.total_in+=x,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?o(n.check,p,T,e.next_out-T):i(n.check,p,T,e.next_out-T)),e.data_type=n.bits+(n.last?64:0)+(n.mode===c?128:0)+(20===n.mode||15===n.mode?256:0),(0===x&&0===T||4===t)&&0===A&&(A=-5),A)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,0):u},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&i(1,t,r,0)!==n.check?-3:b(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):u},t.inflateInfo="pako inflate (from Nodeca project)"},9241:(e,t,n)=>{"use strict";var r=n(4236),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,u,c,l,d,f){var p,h,m,g,v,y,w,_,b,x=f.bits,T=0,k=0,S=0,I=0,O=0,E=0,C=0,P=0,L=0,N=0,R=null,A=0,U=new r.Buf16(16),M=new r.Buf16(16),B=null,D=0;for(T=0;T<=15;T++)U[T]=0;for(k=0;k<u;k++)U[t[n+k]]++;for(O=x,I=15;I>=1&&0===U[I];I--);if(O>I&&(O=I),0===I)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(S=1;S<I&&0===U[S];S++);for(O<S&&(O=S),P=1,T=1;T<=15;T++)if(P<<=1,(P-=U[T])<0)return-1;if(P>0&&(0===e||1!==I))return-1;for(M[1]=0,T=1;T<15;T++)M[T+1]=M[T]+U[T];for(k=0;k<u;k++)0!==t[n+k]&&(d[M[t[n+k]]++]=k);if(0===e?(R=B=d,y=19):1===e?(R=i,A-=257,B=o,D-=257,y=256):(R=a,B=s,y=-1),N=0,k=0,T=S,v=l,E=O,C=0,m=-1,g=(L=1<<O)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){w=T-C,d[k]<y?(_=0,b=d[k]):d[k]>y?(_=B[D+d[k]],b=R[A+d[k]]):(_=96,b=0),p=1<<T-C,S=h=1<<E;do{c[v+(N>>C)+(h-=p)]=w<<24|_<<16|b|0}while(0!==h);for(p=1<<T-1;N&p;)p>>=1;if(0!==p?(N&=p-1,N+=p):N=0,k++,0==--U[T]){if(T===I)break;T=t[n+d[k]]}if(T>O&&(N&g)!==m){for(0===C&&(C=O),v+=S,P=1<<(E=T-C);E+C<I&&!((P-=U[E+C])<=0);)E++,P<<=1;if(L+=1<<E,1===e&&L>852||2===e&&L>592)return 1;c[m=N&g]=O<<24|E<<16|v-l|0}}return 0!==N&&(c[v+N]=T-C<<24|64<<16|0),f.bits=O,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(e,t,n)=>{"use strict";var r=n(4236);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var d=new Array(512);i(d);var f=new Array(256);i(f);var p=new Array(29);i(p);var h,m,g,v=new Array(30);function y(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?d[e]:d[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,b(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function T(e,t,n){x(e,n[2*t],n[2*t+1])}function k(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function S(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=k(o[s]++,s))}}function I(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function C(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&E(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!E(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function P(e,t,n){var r,i,s,u,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===r?T(e,i,t):(T(e,(s=f[i])+256+1,t),0!==(u=o[s])&&x(e,i-=p[s],u),T(e,s=_(--r),n),0!==(u=a[s])&&x(e,r-=v[s],u))}while(c<e.last_lit);T(e,256,t)}function L(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)C(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,C(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>h&&(o=h,m++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=p&&(a=f[r-p]),s=u[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==m){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(o=h;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),S(o,c,e.bl_count)}function N(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function R(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{T(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(T(e,i,e.bl_tree),s--),T(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(T(e,17,e.bl_tree),x(e,s-3,3)):(T(e,18,e.bl_tree),x(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}i(v);var A=!1;function U(e,t,n,i){x(e,0+(i?1:0),3),function(e,t,n,i){O(e),b(e,n),b(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){A||(function(){var e,t,n,r,i,u=new Array(16);for(n=0,r=0;r<28;r++)for(p[r]=n,e=0;e<1<<o[r];e++)f[n++]=r;for(f[n-1]=r,i=0,r=0;r<16;r++)for(v[r]=i,e=0;e<1<<a[r];e++)d[i++]=r;for(i>>=7;r<30;r++)for(v[r]=i<<7,e=0;e<1<<a[r]-7;e++)d[256+i++]=r;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,u[8]++;for(;e<=255;)c[2*e+1]=9,e++,u[9]++;for(;e<=279;)c[2*e+1]=7,e++,u[7]++;for(;e<=287;)c[2*e+1]=8,e++,u[8]++;for(S(c,287,u),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=k(e,5);h=new y(c,o,257,286,15),m=new y(l,a,0,30,15),g=new y(new Array(0),s,0,19,7)}(),A=!0),e.l_desc=new w(e.dyn_ltree,h),e.d_desc=new w(e.dyn_dtree,m),e.bl_desc=new w(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,I(e)},t._tr_stored_block=U,t._tr_flush_block=function(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),a=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?U(e,t,n,r):4===e.strategy||o===i?(x(e,2+(r?1:0),3),P(e,c,l)):(x(e,4+(r?1:0),3),function(e,t,n,r){var i;for(x(e,t-257,5),x(e,n-1,5),x(e,r-4,4),i=0;i<r;i++)x(e,e.bl_tree[2*u[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),P(e,e.dyn_ltree,e.dyn_dtree)),I(e),r&&O(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),T(e,256,c),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},2238:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="object",u="model",c="name",l="type",d="vendor",f="version",p="architecture",h="console",m="mobile",g="tablet",v="smarttv",y="wearable",w={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},_={rgx:function(e,t){for(var n,r,i,u,c,l,d=0;d<t.length&&!c;){var f=t[d],p=t[d+1];for(n=r=0;n<f.length&&!c;)if(c=f[n++].exec(e))for(i=0;i<p.length;i++)l=c[++r],typeof(u=p[i])===s&&u.length>0?2==u.length?typeof u[1]==a?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3==u.length?typeof u[1]!==a||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):o:this[u[0]]=l?u[1].call(this,l,u[2]):o:4==u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):o):this[u]=l||o;d+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(w.has(t[n][r],e))return"?"===n?o:n}else if(w.has(t[n],e))return"?"===n?o:n;return e}},b={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},x={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[c,f],[/(opios)[\/\s]+([\w\.]+)/i],[[c,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[c,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[c,f],[/(konqueror)\/([\w\.]+)/i],[[c,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[c,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[c,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[c,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[c,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[c,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[c,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[c,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[c,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[c,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[c,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[c,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[c,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[c,f],[/(QQ)\/([\d\.]+)/i],[c,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[c,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[c,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[c,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[c],[/(LBBROWSER)/i],[c],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[c,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[c,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[c,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[c,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[c,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[c,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[c,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[c,f],[/(dolfin)\/([\w\.]+)/i],[[c,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[c,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[c,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[c,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[c,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,c],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[c,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[c,[f,_.str,b.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[c,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[c,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,w.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",w.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,w.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[u,d,[l,g]],[/applecoremedia\/[\w\.]+ \((ipad)/],[u,[d,"Apple"],[l,g]],[/(apple\s{0,1}tv)/i],[[u,"Apple TV"],[d,"Apple"],[l,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[d,u,[l,g]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[u,[d,"Amazon"],[l,g]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[u,_.str,b.device.amazon.model],[d,"Amazon"],[l,m]],[/android.+aft([bms])\sbuild/i],[u,[d,"Amazon"],[l,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[u,d,[l,m]],[/\((ip[honed|\s\w*]+);/i],[u,[d,"Apple"],[l,m]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[d,u,[l,m]],[/\(bb10;\s(\w+)/i],[u,[d,"BlackBerry"],[l,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[u,[d,"Asus"],[l,g]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[u,"Xperia Tablet"],[l,g]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,"Sony"],[l,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,u,[l,h]],[/android.+;\s(shield)\sbuild/i],[u,[d,"Nvidia"],[l,h]],[/(playstation\s[34portablevi]+)/i],[u,[d,"Sony"],[l,h]],[/(sprint\s(\w+))/i],[[d,_.str,b.device.sprint.vendor],[u,_.str,b.device.sprint.model],[l,m]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[u,/_/g," "],[l,m]],[/(nexus\s9)/i],[u,[d,"HTC"],[l,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[u,[d,"Huawei"],[l,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[u,[d,"Huawei"],[l,g]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,u,[l,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[u,[d,"Microsoft"],[l,h]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,"Microsoft"],[l,m]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[u,[d,"Motorola"],[l,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[u,[d,"Motorola"],[l,g]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,w.trim],[u,w.trim],[l,v]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,"Samsung"],[l,v]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[l,v]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[d,"Samsung"],u,[l,g]],[/smart-tv.+(samsung)/i],[d,[l,v],u],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],u,[l,m]],[/sie-(\w*)/i],[u,[d,"Siemens"],[l,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],u,[l,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[u,[d,"Acer"],[l,g]],[/android.+([vl]k\-?\d{3})\s+build/i],[u,[d,"LG"],[l,g]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],u,[l,g]],[/(lg) netcast\.tv/i],[d,u,[l,v]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[u,[d,"LG"],[l,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,u,[l,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[u,[d,"Lenovo"],[l,g]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,u,[l,m]],[/linux;.+((jolla));/i],[d,u,[l,m]],[/((pebble))app\/[\d\.]+\s/i],[d,u,[l,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,u,[l,m]],[/crkey/i],[[u,"Chromecast"],[d,"Google"],[l,v]],[/android.+;\s(glass)\s\d/i],[u,[d,"Google"],[l,y]],[/android.+;\s(pixel c)[\s)]/i],[u,[d,"Google"],[l,g]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[u,[d,"Google"],[l,m]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]?[\w\s]+))\s+build/i],[[u,/_/g," "],[d,"Xiaomi"],[l,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[u,/_/g," "],[d,"Xiaomi"],[l,g]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[u,[d,"Meizu"],[l,m]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],u,[l,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[u,[d,"OnePlus"],[l,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[u,[d,"RCA"],[l,g]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[u,[d,"Dell"],[l,g]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[u,[d,"Verizon"],[l,g]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],u,[l,g]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[u,[d,"NuVision"],[l,g]],[/android.+;\s(k88)\sbuild/i],[u,[d,"ZTE"],[l,g]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[u,[d,"Swiss"],[l,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[u,[d,"Swiss"],[l,g]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[u,[d,"Zeki"],[l,g]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],u,[l,g]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[u,[d,"Insignia"],[l,g]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[u,[d,"NextBook"],[l,g]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],u,[l,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],u,[l,m]],[/android.+;\s(PH-1)\s/i],[u,[d,"Essential"],[l,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[u,[d,"Envizen"],[l,g]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,u,[l,g]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[u,[d,"MachSpeed"],[l,g]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,u,[l,g]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[u,[d,"Rotor"],[l,g]],[/android.+(KS(.+))\s+build/i],[u,[d,"Amazon"],[l,g]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,u,[l,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,w.lowerize],d,u],[/[\s\/\(](smart-?tv)[;\)]/i],[[l,v]],[/(android[\w\.\s\-]{0,9});.+build/i],[u,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,c]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[c,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[c,[f,_.str,b.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[c,"Windows"],[f,_.str,b.os.windows.version]],[/\((bb)(10);/i],[[c,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[c,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[c,"Symbian"],f],[/\((series40);/i],[c],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[c,"Firefox OS"],f],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[c,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[c,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[c,f],[/(haiku)\s(\w+)/i],[c,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[c,f]]},T=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof T))return new T(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?w.extend(x,t):x;return this.getBrowser=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.browser),e.major=w.major(e.version),e},this.getCPU=function(){var e={architecture:o};return _.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return _.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};T.VERSION="0.7.22",T.BROWSER={NAME:c,MAJOR:"major",VERSION:f},T.CPU={ARCHITECTURE:p},T.DEVICE={MODEL:u,VENDOR:d,TYPE:l,CONSOLE:h,MOBILE:m,SMARTTV:v,TABLET:g,WEARABLE:y,EMBEDDED:"embedded"},T.ENGINE={NAME:c,VERSION:f},T.OS={NAME:c,VERSION:f},void 0!==t?(e.exports&&(t=e.exports=T),t.UAParser=T):(r=function(){return T}.call(t,n,t,e))===o||(e.exports=r);var k=i&&(i.jQuery||i.Zepto);if(k&&!k.ua){var S=new T;k.ua=S.getResult(),k.ua.get=function(){return S.getUA()},k.ua.set=function(e){S.setUA(e);var t=S.getResult();for(var n in t)k.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Core:()=>i.Core,EventHub:()=>i.EventHub,I18n:()=>i.I18n});var e=n(6063),t=n.n(e),i=n(3389);function o(){return window.navigator.userAgent.toLowerCase().match(/micromessenger/i)?"wechat":"web"}var a=n(3251),s=n(4248),u=n(698);function c(e){window.parent!==window&&window.parent.postMessage(e,"*")}var l=n(7550),d=n(5159),f=n(3656);function p(e){let t=0;const n=e.step||10,r=e.timeBetweenStep||200,i=window.setInterval((()=>{t+=n,e.onprogress(t),t>=90&&window.clearInterval(i)}),r);return()=>{clearInterval(i)}}async function h(e,t=50){return e.startsWith("data:image/")?new Promise((n=>{const r=document.createElement("img"),i=document.createElement("canvas");r.onload=()=>{const o=r.naturalHeight,a=r.naturalWidth;o<=t&&a<=t&&n(e);const s=o/a;let u=0,c=0;o>a?(u=t,c=t/s):(c=t,u=t*s),i.width=c,i.height=u,i.getContext("2d").drawImage(r,0,0,c,u),n(i.toDataURL())},r.src=e})):e}function m(e){const t=document.createElement("canvas");t.setAttribute("width","64"),t.setAttribute("height","64");const n=t.getContext("2d");n.fillStyle="white",n.fillRect(0,0,64,64),n.fillStyle="black",n.strokeStyle="black",n.font="bold 12px '字体','字体','微软雅黑','宋体'";let r=0,i=0,o=10;for(let t=0;t<e.length;t++)r+=n.measureText(e[t]).width,r>50&&(n.fillText(e.substring(i,t),5,o),o+=12,r=0,i=t),t===e.length-1&&n.fillText(e.substring(i,t+1),5,o);return t.toDataURL()}function g(e){return new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))}const v="native_app_message";function y(e){return new Promise(((t,n)=>{const r=()=>{window.removeEventListener(v,o),n(new Error("offline request timeout: ".concat(e.messageName)))};let i=setTimeout(r,15e3);const o=n=>{const{messageName:a,data:s}=n.detail;a===e.messageName?(clearTimeout(i),window.removeEventListener(v,o),t(s)):"delay"===a&&s.delayTask===e.messageName&&(clearTimeout(i),i=setTimeout(r,15e3))};window.addEventListener(v,o),window.ReactNativeWebView.postMessage(JSON.stringify(e))}))}const w={};var _=n(7428);n(3948),n(285);const b=20971520,x={resolve:()=>{},onprogress:()=>{},result:void 0},T={filePath:"",value:"",miniValue:"",isImage:!1,fileName:"",fileType:""};let k,S,I=x;async function O(e,t){const n=await async function(e){const t={fileName:e.name,fileType:e.type};return 0===e.type.indexOf("image/")?(t.isImage=!0,t.value=await g(e)):(t.isImage=!1,t.value=m(e.name)),t.miniValue=await h(t.value),t}(t);I.result={...I.result||T,...n,filePath:e},S(),I.resolve(I.result),I=x,k.value="",document.body.style.pointerEvents="all"}function E(){k||(k=document.createElement("input"),k.setAttribute("type","file"),k.style.display="none",k.addEventListener("change",(async function(){var e;const t=null===(e=this.files)||void 0===e?void 0:e[0];if(t)if(!t.type.startsWith("image/")||await async function(e){const t=await g(e);return new Promise((e=>{const n=document.createElement("img");n.onload=()=>{e(!0)},n.onerror=()=>{e(!1)},n.src=t}))}(t))if(document.body.style.pointerEvents="none",S=p({onprogress:I.onprogress}),(0,s.vW)().preview)await(0,f._v)(1e3),await O(t.name,t);else try{await async function({file:e,maxFileSize:t,keyPrefix:n,onProgress:r,onUploaded:i}){var o;if(t&&e.size>t)throw"file-size-error";const a=await fetch((null===(o=(0,s.vW)().hostConfig)||void 0===o?void 0:o.qApiHost)+"/media/uptoken?"+new URLSearchParams({key_prefix:n,mime_type:e.type}),{method:"get"});let u;if(!a.ok||200!==a.status){if(a.ok&&204===a.status)throw await a.text();throw await a.json()}u=await a.json();const c=new XMLHttpRequest;if(c.upload.onprogress=e=>{null==r||r(e.loaded/e.total*100)},c.onload=()=>{if(200!==c.status)throw"upload-error";null==i||i({file:e,res_key:u.res_key})},u.upload_host.includes("qiniup.com")){c.open("POST",u.upload_host);const t=new FormData;t.append("name",e.name),t.append("token",u.uptoken),t.append("file",e),c.send(t)}else c.open("PUT","".concat(u.upload_host,"/").concat(u.res_key)),c.setRequestHeader("Authorization",u.uptoken),c.setRequestHeader("Content-Type",e.type),c.send(e)}({file:t,keyPrefix:"os/client",maxFileSize:b,onProgress:I.onprogress,onUploaded:async({res_key:e})=>{await O(e,t)}})}catch(e){switch(S(),document.body.style.pointerEvents="all",e){case"file-size-error":(0,s.vW)().notify((0,l.Iu)(d.bn.upload.fileSizeLimit,{size:(b,20..toFixed(1)+"MB")}))}}else(0,s.vW)().notify(d.bn.upload.invalidImage)})),document.body.appendChild(k))}n(1817);var C=n(6970),P=n(9271),L=n(6935),N=n(3087),R=n(3756),A=n(4725),U=n(68),M=n(6207),B=n(7433),D=n(4588),F=n(9564),j=n(8351);var W=n(5810),q=n(4625),z=n(3151),V=n(5521),G=n(5753),H=n(5589),X=n(152),K=n(8231),$=n(4125),Z=n(5286),J=n(6213),Y=n(2812),Q=n(248),ee=n(3608),te=n(6492);const ne={};async function re(e,t){const n=(r=e,JSON.stringify({...r,x:void 0,y:void 0}));var r;const i=ne[e.nodeUuid];if(i&&i.raw===n)return i.value;{await(0,f._v)();const r={target:e},i=(0,j.qG)(r,t),o=await(0,j.D1)(i,t.current);return ne[e.nodeUuid]={value:o,raw:n},o}}let ie,oe=!1,ae=!1,se="",ue="zh_cn",ce=null;function le(e){const{globalSetting:t,content:n}=ce,{nodeList:r,variables:i,fullLangStore:o,autoCpltGroups:a}=t;let s=[...r];n.groupNodes?s=[...s,...n.groupNodes]:s.unshift(n);const u=n.group?[n.group]:[],c=o[e];(0,Q.pe)({nodes:s,groups:u,variables:i},c),(0,Q.iZ)(a,e)}const de={...W.k,async handleNextClick(){},async handlePrevClick(){},handleCascadeInput(e,t,n,r){const i=(0,z.OJ)(e,t,n,r);return this.handleOptionInput(e,i,r)},async handleCascadeClick(e,t,n){await(0,z.Xl)(e,t,n)},handleMenuClick:async(e,t)=>(await de.handleOptionClick(t.options[e],t),t.options.filter((e=>e.selected)).map((e=>e.text))),async handleOptionClick(e,t){const n=await(0,V.W)(e,t);return await(0,Z.y)(t),(0,a.yp)(t),n.result},async handleOptionAssistInput(e,t,n){(0,s.Pg)(n.assistValue,{[t]:e})},async handleAutoCpltInput(e,t,n){(0,G.LM)(e,t,n)},async handleOptionInput(e,t,n){const r=await(0,G.wS)(e,t,n);return await(0,Z.y)(n),(0,a.yp)(n),r.result},async handleQuestionInput(e,t){const n=await(0,H.U)(e,t);return await(0,Z.y)(t),(0,a.yp)(t),n.result},async handleSequenceInput(e,t,n){const r=await(0,K.O)(e,t,n);return await(0,Z.y)(n),(0,a.yp)(n),r.result},handleLangChange:async e=>e.locale===ue?void 0:(ue=e.locale,ae=!0,ce.globalSetting.language=e.locale,ie(ce)),async handleMaxDiffInput(e,t,n,r){const i=(0,X.o)(e,t,n);return await(0,Z.y)(r),(0,a.yp)(r),i.result},handleQuickAnswer:e=>(0,q.M)(e)};const fe={data:{theme:null,eventHub:a.s$}},pe={};let he=null;async function me(e){try{await async function(e){const t=Date.now(),{content:n}=e;let r=await async function(e,t){ce=e,ie=t;const{content:n,globalSetting:r,regionList:i}=e;r.language=ue,await async function(e){if(oe)return(0,l.u4)(e),void le(e);await(0,f._v)(50),(0,l.u4)(e),le(e),oe=!0}(r.language);const o={variables:(0,M.Fy)(r.variables),imageList:r.imageList,varStyles:r.varStyles};ae||((0,M.LK)(n),i&&await(0,Y.Hd)(i),(0,J.W)(r.presetRichStyles),(0,ee.B3)(o)),se!==n.nodeUuid&&(window.scrollTo(0,0),se=n.nodeUuid);const u={...o,core:(0,s.vW)(),embedApis:r.embedApis,nodeGroups:r.nodeGroups||[],eventHub:a.s$,context:{},loopStack:[],randomList:[],preview:!0,themeMode:!0,...r,langTable:r.langTable.filter((e=>!e.disabled)),nodeList:r.nodeList.map((e=>((0,M.pZ)(e),e))),handleEvents:de,nodes:[],theme:fe.data.theme,...(0,$.s)(r)};return await async function(e){let t;e.renderList=[];for(const n of e.nodeList){if("start"===n.type||te.kJ.includes(n.type))continue;const r=await re(n,e);r.prev=t,t=r,e.renderList.push(r)}}(u),u}(e,me);r=n.noView?function(e,t){const n={...e};return t.nodes=[n],t}(n,r):"start"===n.type?await async function(e,t){const n=[];e.image&&n.push((0,P.q)(e.image));const{imgScale:r,imgTransType:i,imgTransTime:o,imgPosition:a,welcomeUrl:s,startName:u,qsnrName:c,startBtnText:f,layout:p,type:h,nodeName:m}=e;return(t={type:h,nodeName:m,...t,imgScale:r,imgTransTime:o,imgTransType:i,imgPosition:a,layout:p,isStart:!0,title:u||c,welcomeUrl:s,images:n,nextButton:f||(0,l.Iu)(d.bn.global.start)}).template=await(0,C.b)(e.template,t),t.summary=await(0,L.Ur)(e.questionText,{state:t}),t.description=await(0,L.Ur)(e.describe,{state:t}),t}(n,r):"gift"===n.type?await async function(e,t){const n=(0,R.W)();(t={...t,type:e.type,nodeName:e.nodeName,isGift:!0,rewardName:e.activityName,title:e.blessings,wechatImage:n.headimgurl,wechatID:n.nickname,description:e.describe,rewardTime:(0,N.GN)(),images:e.image?[(0,P.q)(e.image)]:[],nextButton:e.linkUrl&&(e.endBtnText||(0,l.Iu)(d.bn.global.go))}).template=await(0,C.b)(e.template,t);const r=e;return t.rewardType=r.giftType,"red_envelope"===t.rewardType?t.rewardValue=r.giftCount+" "+(0,l.Iu)(d.bn.reward.yuan):(t.rewardToMessage=!0===r.needSendNote,t.qrCode=!0===r.needVerification?"123456789":""),t}(n,r):await async function(e,t){const{content:n,globalSetting:r}=e;return t={...t,progress:50,needProgressBar:r.progressBarRequired,inSingleGroup:null,nextBtnText:r.nextBtnText||(0,l.Iu)(d.bn.global.next),prevBtnText:r.prevBtnText||(0,l.Iu)(d.bn.global.previous)},(t=n.groupNodes?await async function(e,t){if(t.inSingleGroup=e.group,t.inSingleGroup&&t.inSingleGroup.renderAsTable){const n=[],r=e.groupNodes.find((e=>"loop"===e.type)),i=e.groupNodes.filter((e=>"loop"!==e.type)),o={target:r},a=(0,j.qG)(o,t),s=await(0,j.D1)(a,t.current);if(t.renderList.push(s),0===s.varList.length)if(s.options.length>0){const e=(0,f.DQ)(s.options,3);s.varList=e}else s.varList=[{number:1,text:"FAKE",uuid:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}];for(const[e,o]of s.varList.entries())for(const a of i){const i={target:a},u=(0,j.qG)(i,t),c=await(0,j.D1)(u,t.current),l=await(0,A.dK)(t,c,s.nodeUuid,e,o,null),d={destInputId:"",node:r,varList:s.varList,replacements:[l],currentIndex:e},p=[d];c.renderId=(0,f.am)(c.nodeUuid,p),c.loop=d,c.loopStack=p,n.push(c)}t.renderList=[...t.renderList,...n],t.nodes=n,t.groupTable=(0,U.g)(n,t.inSingleGroup)}else{const n=[];for(const r of e.groupNodes){(0,M.pZ)(r);const e={target:r},i=(0,j.qG)(e,t);n.push(await(0,j.D1)(i,t.current))}t.renderList=[...t.renderList,...n],t.nodes=n.filter((e=>-1===D.le.indexOf(e.type)&&!(0,F.$X)(e)))}return t.nodes[0].pageStart=!0,t.nodes[t.nodes.length-1].pageEnd=!0,t.current=t.nodes[0],t}(n,t):await async function(e,t){let n;if((0,M.pZ)(e),(0,f.is)(e,"lottery"===e.type)){t.formalResult={reward:{},gift:{}};const r=(0,f.DQ)(e.options,1)[0],i={id:-1,lottery_id:e.nodeUuid,lottery_option_id:r&&r.uuid};n=await(0,j.MJ)(e,i,t)}else{const r={target:e},i=(0,j.qG)(r,t);n=await(0,j.D1)(i,t.current)}return t.renderList.push(n),t.nodes=[n],t.current=n,t}(n,t)).limitTime&&(t.restTime=(0,N.IA)(t.limitTime)),t.prevButton=(0,B.ve)(t),t.nextButton=await(0,B.FK)(t),t}(e,r),window.cfState=r,(0,s.Pg)(fe,{data:r}),console.info("client full time:",Date.now()-t,"node count:",r.nodeList.length),c({name:"done_preview_realtime"}),a.s$.trigger("REALTIME_CHANGE")}(e)}catch(e){c({name:"error_realtime_preview",error:e.stack||e.message}),console.error(e)}}function ge(e){if(!e.data)return;const{name:t}=e.data;if(!t||0!==t.indexOf("preview"))return;const n=pe[t];n&&n(e.data)}function ve(){c({name:"mousedown_preview"})}function ye(){c({name:"mouseup_preview"})}pe.preview_theme=e=>{(0,u.z)(e.theme),(0,s.Pg)(fe.data,{theme:e.theme}),he&&a.s$.trigger("UPDATE_THEME",e.theme),he=e.theme},pe.preview_content=e=>me(e);var we=n(6539),_e=(n(2707),n(1128)),be=n(6064),xe=n(5838);const Te=[],ke={cached:!1,value:null};let Se,Ie;function Oe(){return!Se||0===Se.length}async function Ee(e,t){const{markId:n}=e;if(13===n||16===n)return{type:"input",candidates:"",active:!0};if(14===n||15===n)return null;if(-1===n||-2===n)return{active:!0,type:"select",weight:-1===n?1:-1};{const r={type:"input",active:!0},{start:i}=await(0,xe.L2)(e,t);return 6===n||8===n||12===n||2===n?r.candidates="number"==typeof i?(0,be.KF)(i-1):i.substring(0,i.length-1):1===n||5===n||11===n||4===n||7===n?r.candidates=(0,be.KF)(i+1):3!==n&&9!==n||(r.candidates=(0,be.KF)(i)),r}}function Ce(e){return"testcase"===e}n(5306);const Pe="failed to load:",Le=[];function Ne(e){let t=0;return new Promise(((n,r)=>{const i=async o=>{try{const t=await e();o&&(0,s.vW)().markLoadRetry({status:""}),n(t)}catch(e){!function(e){return e&&e.message&&e.message.startsWith(Pe)}(e)?r(e):t<3?setTimeout((()=>{t+=1,i(o)}),1e3):(t=0,Le.push(i),(0,s.vW)().markLoadRetry({status:"wait-retry",onRetry(){for((0,s.vW)().markLoadRetry({status:"retrying"});Le.length>0;)Le.pop()(!0)}}))}};i(!1)}))}function Re(e,t){return document.querySelector('script[src="'.concat(e,'"]'))?Promise.resolve():new Promise(((n,r)=>{const i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",e),t&&Object.keys(t).forEach((e=>{i.setAttribute(e,t[e])})),i.onload=()=>{n()},i.onerror=t=>{document.head.removeChild(i),r(new Error(Pe+e))},document.head.appendChild(i)}))}function Ae(e,t,n){return n?Ne((()=>Re(e,t))):Re(e,t)}function Ue(e,t){let n=!0;return"GET"===t.type?(t.data&&(e=(0,we.Mw)(e,t.data)),n=!1):(t.contentType="application/json","object"==typeof t.data&&(t.data=JSON.stringify(t.data))),t.type=t.type||"GET",new Promise(((r,i)=>{const o=new XMLHttpRequest;return o.onerror=()=>{i(new Error(Pe+e))},o.onload=()=>{r({status:o.status,response:o.response})},o.open(t.type,e),t.contentType&&o.setRequestHeader("content-type",t.contentType),t.jwt&&o.setRequestHeader("Authorization","Bearer "+t.jwt),o.send(n?t.data:void 0),o}))}function Me(e,t,n){return n?Ne((()=>Ue(e,t))):Ue(e,t)}window.CFPlugin=window.CFPlugin||{},window.CFPlugin.fakedServers={};const Be=(0,we.Y8)(location.search),De={local:!!location.origin.match(/:\d+$/),realtime:location.pathname.includes("/themes"),debug:!!Be.dev,autoRun:!!Be.auto_path,infer:!!Be.infer_id,parseRealUrl:function(e){const t=location.href.match(/real_port=(\d+)/);if(t){const n=e.substring(8).match(/\//);if(n){const r=e.substring(8+n.index+1);return"http://localhost:".concat(t[1],"/").concat(r)}}return e},getCustomSurveyMeta:async()=>Ce(Be.infer_id)?{langs:[]}:null,getCustomSurveyPayload:async()=>Ce(Be.infer_id)?new Promise((e=>{const t=n=>{const r=n.data;"testcase"===(r&&r.name||"")&&"payload"===r.type&&(window.removeEventListener("message",t),e(r.payload))};window.addEventListener("message",t),c({type:"initialize",name:"testcase"})})):null},Fe={start:"",survey:"/survey",reward:"/reward"};function je(e,t){const n=Fe[e],r=We(e,t),i=(0,s.vW)().switchRoute;if(i){let e=r.replace(location.origin,"");e.startsWith("/")||(e="/"+e),i({url:r,route:n,tail:e,params:t})}else location.replace(r)}function We(e,t){return(0,s.vW)().appRoot+(0,we.Mw)(Fe[e],t)}function qe(e){const t=(0,s.vW)().appRoot+Fe.start+"?".concat(e.sid),n={};return Object.keys(e).forEach((t=>{t.startsWith("share_preserved_")&&(n[t]=e[t])})),(0,we.Mw)(t,n)}const ze={canHandleReward:()=>"wechat"===o(),getParams:()=>function(e){if(!e.sid){const t=Object.keys(e).find((t=>!e[t]));e.sid=t,delete e[t]}return e}((0,we.Y8)(location.search)),gotoStartPage(e){je("start",e)},gotoSurveyPage(e){je("survey",e)},getRewardUrl:e=>We("reward",(0,we.FC)(e)),openWebLink(e){location.replace(e)},reload(){location.href=We("start",(0,we.ZI)())}};var Ve=n(2238),Ge=n.n(Ve);Ge()();const He=new(t()),Xe={device:Ge()(),newDiv:()=>document.createElement("div"),newSpan:()=>document.createElement("span"),newTextNode:e=>document.createTextNode(e),getReferer:()=>document.referrer,translate:(e,t)=>t?He.compile(e)(t):e,getLang:()=>(navigator.languages&&navigator.languages[0]||navigator.language).replace(/-/g,"_").toLowerCase()};var Ke=n(2183);function $e(e){return e.returnValue="1","1"}function Ze(){window.removeEventListener("beforeunload",$e)}var Je=n(5142);let Ye,Qe;function et(){Ye&&(Ye.disconnect(),Ze(),Ye=null,Qe=null)}const tt={removeUpload:async function(e){if((0,_.s)())return async function(e){const{nodeId:t,optionId:n}=e,r=w[t+n];if(!r)return;const i={messageName:"remove_upload",data:{...e,url:r}};await y(i),delete w[t+n]}(e)},closeSocket:et,pushSocket:function(e,t){Qe&&Qe.push(e,t)},connectSocket:function(e,t){if(!(0,_.s)())try{Ye=new Ke.Socket("".concat((0,s.vW)().hostConfig.wsHost,"/q/socket"),{params:{response_id:e}}),Ye.connect(),location.href.match(/:\d+\//)||window.addEventListener("beforeunload",$e),Qe=Ye.channel("client:".concat(t),{}),Qe.on("collector_full",(()=>{(0,s.vW)().error((0,Je.W1)("collector_full")),et()})),Qe.join().receive("error",(e=>{throw new Error("socket join failed: "+JSON.stringify(e))})).receive("timeout",(()=>{throw new Error("socket join timeout")}))}catch(e){(0,s.vW)().uploadLog("加入socket失败")}},loadFakeFile:function(e,t,n){return Ae((0,_.f)(function(e){const t=location.href.match(/fake_port=(\d+)/);if(t){let n=e;return["https://public.choiceform.com/fake-request-exploits/dist"].forEach((e=>{n=n.replace(e,"http://localhost:".concat(t[1]))})),n}return e}(e)),t,n)},getFakeHost:function(){return window.CFPlugin},upload:function(e){return(0,_.s)()?async function(e){const{accept:t,nodeId:n,optionId:r}=e,i={messageName:"request_upload",data:{accept:t,optionId:r,nodeId:n}},o=p({onprogress:e.onprogress}),{url:a,mineType:s}=await y(i);if(!a)return o(),null;w[n+r]=a;const u=a.substring(a.lastIndexOf("/")+1),c={filePath:a,fileName:u,fileType:s,progress:50};return s.startsWith("image/")?(c.value=a,c.isImage=!0):(c.value=m(u),c.isImage=!1),c.miniValue=await h(c.value),o(),c}(e):function(e){return e.accept?k.setAttribute("accept",e.accept):k.removeAttribute("accept"),I.onprogress=e.onprogress,new Promise((e=>{k.click(),I.resolve=e}))}(e)},initUploader:E,request:function(e,t,n){const r=(0,s.vW)();return(0,_.s)()?e.startsWith(r.hostConfig.qApiHost)?async function(e,t){const n={messageName:e,data:t.data};return{response:await y(n),status:200}}(e,t):Me((0,_.f)(e),t,n):Me(e,t,n)}};function nt(){window.wxMenuForceShow||window.wx.hideOptionMenu()}function rt(e){let t="";const n=e.images[0];return n&&n.url&&(t=n.url),t||(0,s.vW)().hostConfig.cdnHost+"/thumbnail.png"}function it(e,t=0){"wechat"===(0,s.dU)().name&&setTimeout((()=>{try{e.noWxShare||window.wx&&(window.wx.showOptionMenu(),window.wxMenuForceShow=!0),async function(e){if(e.noWxShare||!(0,s.dU)().app.canHandleReward()||!(0,s.vW)().useWxSdk)return;const t=(0,we.ZI)(),n=(0,s.vW)().sid,r=e.wxShareInfo||{sid:n,title:(0,L.mP)(e.title),desc:(0,L.mP)(e.summary),shareLink:qe(t),imageUrl:rt(e)},i=location.href.split("#")[0];!function(e,t){if(!window.wx)return;const{imageUrl:n,desc:r,shareLink:i}=t;let{title:o}=t;""===(0,be.KF)(o).trim()&&(o="choiceform");const a=window.wx,{appid:s,timestamp:u,noncestr:c,signature:l}=e;a.config({debug:!1,appId:s,timestamp:u,nonceStr:c,signature:l,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ"]}),a.ready((()=>{a.onMenuShareTimeline({title:o,link:i,imgUrl:n}),a.onMenuShareAppMessage({title:o,desc:r,link:i,imgUrl:n,type:"",dataUrl:""}),a.onMenuShareQQ({title:o,desc:r,link:i,imgUrl:n})})),a.error((e=>{console.info("wx share err",e)}))}(await function(e){const t=(0,s.vW)().hostConfig.qApiHost+"/wechat/jsapi_sign";return(0,Je.vT)(t,{type:"GET",data:e},!1)}({url:i}),r)}(e)}catch(e){(0,s.vW)().uploadLog("微信分享初始化失败")}}),t)}function ot(e,t,n,r,i){return"https://open.weixin.qq.com/connect/oauth2/authorize"+"?appid=".concat(e,"&redirect_uri=").concat(encodeURIComponent(n))+"&response_type=code&scope=snsapi_userinfo"+("scan_qr_code"===i?"&forcePopup=true":"")+"&state=".concat(r,"&component_appid=").concat(t,"#wechat_redirect")}n(3210);const at=async function(e){const t={messageName:"get_storage",data:{key:e}};return(await y(t)).value},st=function(e,t){return y({messageName:"set_storage",data:{key:e,value:t}})},ut=function(e){return y({messageName:"remove_storage",data:{key:e}})};let ct;function lt(){if(void 0!==ct)return ct;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(e){return ct=!1,!1}return ct=!0,!0}const dt={getItem:e=>decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null,setItem(e,t,n,r,i,o){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;let a="";return n&&(a="number"==typeof n?n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n:"string"==typeof n?"; expires="+n:"; expires="+n.toUTCString()),document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(i?"; domain="+i:"")+(r?"; path="+r:"")+(o?"; secure":""),!0},removeItem(e,t,n){return!(!e||!this.hasItem(e)||(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:""),0))},hasItem:e=>new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)};function ft(e,t){lt()?localStorage.setItem(e,t):dt.setItem(e,t)}function pt(e){return lt()?localStorage.getItem(e):dt.getItem(e)}function ht(e){lt()?localStorage.removeItem(e):dt.removeItem(e)}const mt={set:ft,setVital:async(e,t)=>(0,_.s)()?st(e,t):ft(e,t),get:pt,getVital:async e=>(0,_.s)()?at(e):pt(e),remove:ht,removeVital:async e=>(0,_.s)()?ut(e):ht(e)},gt="cached_meta_before_third_auth",vt={userInfo:null,retrieveAuthSurveyMeta:function(){const e=(0,we.ZI)(),{code:t,state:n}=e;if(t){const t=mt.get(gt);if(t)return mt.remove(gt),JSON.parse(t);{const t=We("start",(0,we.FC)(e));location.href=t,(0,s.vW)().customAbort()}}else n&&((0,s.vW)().error((0,l.Iu)(d.bn.global.authFailed)),mt.remove(gt),(0,s.vW)().customAbort());return null},async init(e){if((0,s.vW)().preview)return;const{channel:t}=e,{type:n,authorizer_id:r,app_id:i}=t;if(t&&"wechat"===n&&i){const t=(0,we.ZI)().code;t||((0,s.vW)().error((0,l.Iu)(d.bn.global.authFailed)),(0,s.vW)().customAbort()),e.interviewee=await function(e){const t=(0,s.vW)().hostConfig.qApiHost+"/interviewees";return(0,Je.o1)(t,{type:"POST",data:e}).catch((e=>{throw(0,Je.lH)(e),e}))}({code:t,authorizer_id:r})}},authorizeGift:function(e,t,n,r){const i=ot(e,t,(0,s.dU)().app.getRewardUrl(n),"reward",r);Ze(),location.replace(i)},authorize(e){const{channel:t}=e;if("wechat"===t.type&&t.app_id&&!e.authorized){e.authorized=!0,function(e){mt.set(gt,JSON.stringify(e))}(e);const{app_id:n,component_appid:r,authorizer_id:i}=t;!function(e,t,n){const r=ot(e,t,We("start",(0,we.ZI)()),n);Ze(),location.replace(r)}(n,r,i),(0,s.vW)().customAbort()}}};var yt=n(277),wt=n(5817),_t=n(9309),bt=n(9896);function xt(){const e=JSON.parse("session"&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent("session").replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null);return e?e.jwt:""}var Tt=n(3768),kt=n(7529);let St;async function It(e){const{infer_collector_id:t,infer_status:n}=(0,we.ZI)(),r=await(0,Tt.gS)(e);r.status=n||"test",r.collector_id=Number(t)||void 0;const i=function(){const{infer_time_range:e}=(0,we.ZI)();if(!e)return null;const t=e.split("-");let n=Number(t[0]),r=Number(t[1]);return n&&r?(n>r&&([n,r]=[r,n]),{start:n,end:r}):null}();if(!i)return r;const{start:o,end:a}=i,s=(0,f.xT)(o,a);r.created_at=new Date(s).toISOString();let u=0;return r.answers.forEach((t=>{const n=(0,kt.Sl)(e,t);t.start_time=new Date(s+u).toISOString(),(0,F.$X)(n)||"end"===n.type?t.cost_time=0:(t.cost_time=function(e){const t=e.origin,n=1e3*Number(t.minAnswerTime),r=1e3*Number(t.maxAnswerTime);return n&&r?(0,f.xT)(n,r):function(e,t,n){const r=.5,i=t-e,o=(0,f.xT)(1,99),a=Math.floor(Math.log(1-.5*o/50)/Math.log(r)),s=Math.max(7-a,0),u=o<50?e:Math.round(e+i*r*r**s),c=o>96.875?t:Math.round(e+i*r*r**(s-1));return(0,f.xT)(u,c)}(n||1e3,12e5)}(n),u+=t.cost_time)})),r.time_consuming=Math.ceil(u/1e3),r.committed_at=new Date(s+u).toISOString(),r.ip_address=await async function(e){const t=await async function(){if(!St){const e=await tt.request("https://core.choiceform.com/iplist.json",{type:"GET"},!1),t=JSON.parse(e.response);let n=[];const r=Object.keys(t);r.forEach((e=>{n=n.concat(t[e])})),St={regionMap:t,fullList:n,keys:r}}return St}(),n=e.address?e.address.city:"";let r=t.fullList;if(n){const e=t.keys.find((e=>e===n||e.startsWith(n)||n.startsWith(e)));e&&(r=t.regionMap[e])}return(0,f.DQ)(r,1)[0]}(e),r}let Ot=-1,Et=1,Ct=0,Pt="",Lt=null,Nt={index:0,fullLength:0,percent:0};async function Rt(e,t){let n=!0;if(Ce(Pt)?n=await async function(e,t){if(Oe()||!Ie)return!1;if("END"===e.type||"CHECK_END"===e.type){const e=[Ie,...Se.filter((e=>!e.when&&e!==Ie))];for(const n of e){n.done=!0;const{options:e,logicType:r}=n.should,i=await(0,xe.cx)(t,e,r);if(!i.value){const e={target:n.name,logicType:r,matches:i.details.filter((e=>!e.value))};Te.push(e)}}return Se=Se.filter((e=>!e.done)),Se.length>0?(Ie=Se[0],!0):(Te.length>0?c({name:"testcase",type:"failed",results:Te}):c({name:"testcase",type:"success"}),!1)}return c({name:"testcase",type:"error",target:Ie.name,message:e.message}),!1}(e,t):c({name:"infer_worker",type:e.type,data:e.data,message:e.message,round:Et++,id:Pt,ended:!0,nodeName:t.current.nodeName}),clearTimeout(Ot),a.s$.off(),n){!function(e){const t=window.CFPlugin.fakedServers;Object.keys(t).filter((e=>{e.endsWith("/__reset_for_infer__")&&t[e]({},(0,s.vW)())}))}();const e=await(0,_t.$A)();await Ut(e)}}function At(e){let t=[...e.nodes],n=0;const r=async()=>{t=[...e.nodes];const i=t[n++];let o=!1;!function(e){const t=Date.now();if(t-Ct>1e3){let n=(0,wt.xC)(e);-1===n.index?n=Nt:Nt=n,c({name:"infer_progress",id:Pt,progress:n,round:Et}),Ct=t}}(e),i?"end"===i.type?(Ce(Pt)?await Rt({type:"END"},e):await async function(e,t){if(e.prev.checkMode){let n=e.prev;const r=n?n.nodeName:"";for(;n&&(0,F.$X)(n);)n=n.prev;return Rt({type:"CHECK_END",message:(n?n.nodeName:"")+" => "+r+" :CHECK_END"},t)}if(e.origin.abandonAnswer)return Rt({type:"ABANDON",message:"Answer abandoned by: ".concat(e.nodeName)},t);{const e=((n=await It(t)).survey_id=(0,s.vW)().sid,{result:n,url:(0,s.vW)().hostConfig.host+"/d/v1/responses",jwt:xt()});return await async function(e){if(Ce(Pt))return!0;const t=window.CFPlugin.fakedServers;for(const e of Object.keys(t))if(e.endsWith("/__check_for_infer__")){const n=await t[e]({},(0,s.vW)());if(n.result)return a.s$.trigger("ERROR",{message:"Infer Result Error: ".concat(n.result)}),!1}return!0}()?Rt({type:"END",data:e},t):void 0}var n}(i,e),o=!0):(a.s$.one("STRETCH_OK",r),await(0,q.W)(i,Lt)):await e.handleEvents.handleNextClick(),o||(clearTimeout(Ot),Ot=window.setTimeout((()=>{Rt({type:"TIMEOUT",message:(e.current&&e.current.nodeName)+":TIMEOUT"},e)}),5e3))};return r()}function Ut(e){return a.s$.one("NEXT_FAIL",(t=>{Rt(t,e)})),a.s$.one("ERROR",(t=>{Rt(t,e)})),a.s$.on("NEXT_OK",(()=>{At(e)})),At(e)}let Mt="",Bt=!1;function Dt(){Bt=!0}function Ft(e){const{nodeUuid:t}=e;Mt===t||Bt||(c({name:"locate_preview",nodeUuid:t}),Mt=t)}var jt=n(6866),Wt=n(6060);const qt="preview_bookmarks_";let zt;async function Vt(e){const t=await mt.getVital(qt+e.surveyId);return zt=t?JSON.parse(t):[],zt}async function Gt(e,t){zt.some((t=>JSON.stringify(t.result)===JSON.stringify(e.result)))?(0,s.vW)().notify((0,l.Iu)(d.bn.previewBookmark.existed)):(zt.push(e),await mt.setVital(qt+t.surveyId,JSON.stringify(zt)))}class Ht{constructor(e,t){this.loading=!1,this.progress="",this.nodeList=[],this.bookmarks=[],this.parent=e,this.state=t}async loadData(){var e;(0,s.Pg)(this,{bookmarks:await Vt(this.state),nodeList:(e=this.state,e.renderList.filter((e=>e.reached&&!e.readonly)))})}async jumpToNode(e){this.loading||(await async function(e,t){(0,a.cs)(e,!0),(0,s.Pg)(t,{current:e}),(0,wt.bR)(t),await(0,Wt.b)(t)}(e,this.state),this.parent.close())}async applyBookmark(e){if(this.loading)return;document.body.style.pointerEvents="none",(0,s.vW)().notifySuspended=!0,(0,s.Pg)(this,{loading:!0});const t={onProgress:e=>{this.parent.opened||(this.parent.open(),document.body.style.pointerEvents="none"),(0,s.Pg)(this,{progress:e})},onEnd:e=>{document.body.style.pointerEvents=null,(0,s.vW)().notifySuspended=!1,this.parent.close(),(0,s.Pg)(this,{loading:!1,progress:""});const t=e.failed?d.bn.previewBookmark.importFailure:d.bn.previewBookmark.importSuccess;(0,s.vW)().notify(t)},onSuspend:()=>{document.body.style.pointerEvents=null,(0,s.vW)().notifySuspended=!1,this.parent.close()}};return function(e,t,n){return(0,jt.f$)(t.result,e,n)}(this.state,e,t)}async deleteBookmark(e){this.loading||(await async function(e,t){zt=zt.filter((t=>t!==e)),await mt.setVital(qt+t.surveyId,JSON.stringify(zt))}(e,this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async saveBookmarks(e){this.loading||(await async function(e,t){const n=function(e){return{result:(0,jt._I)(!0),id:(0,f.pC)((0,f.M8)()),name:e}}(e||Date.now().toString());await Gt(n,t)}(e,this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async uploadBookmark(){this.loading||(await async function(e){return new Promise((t=>{const n=document.createElement("input");n.setAttribute("type","file"),n.setAttribute("accept",".cfbm"),n.onchange=n=>{const r=n.target.files,i=new FileReader;i.onload=async()=>{const n=i.result;try{const r=JSON.parse(decodeURIComponent(atob(n)));if(!(r.id&&r.name&&r.result))throw new Error("not a valid bookmark");r.id=(0,f.pC)((0,f.M8)()),await Gt(r,e),t()}catch(e){(0,s.vW)().notify((0,l.Iu)(d.bn.previewBookmark.importFailed)+e.message)}},i.readAsText(r[0])},n.click()}))}(this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async downloadBookmark(e){this.loading||(function(e){const t=btoa(encodeURIComponent(JSON.stringify(e))),n=document.createElement("a"),r=new Blob([t],{type:"octet/stream"}),i=window.URL.createObjectURL(r);n.setAttribute("href",i),n.setAttribute("download",e.name+".cfbm"),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}(e),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}}var Xt=n(5905);function Kt(e){const t=[],n=[];let r=0;return e.renderList.forEach((e=>{const i=e.costTime;!(0,F.$X)(e)&&i&&(t.push({ques_id:e.nodeUuid,time:i,inLoop:!!e.loop}),n.push({renderId:e.renderId,name:e.nodeName,title:(0,Xt.LK)(e)?e.title:"",time:i}),r+=i)})),{postList:t,displayList:n,surveyId:e.surveyId,allTime:r}}class $t{constructor(e,t){this._submitted=!1,this.parent=e,this.state=t}loadData(){(0,s.Pg)(this,{timeInfo:Kt(this.state)})}async uploadTime(e){if(this._submitted)return;const t={items:this.timeInfo.postList,other_info:{}};t.other_info.name=e;const n="https://icon.cform.io/api/v1/surveys/"+this.timeInfo.surveyId+"/preview_stat";try{await(0,Je.o1)(n,{type:"POST",data:t}),(0,s.vW)().notify((0,l.Iu)(d.bn.previewTime.uploadSuccess)),this._submitted=!0}catch(e){(0,s.vW)().notify((0,l.Iu)(d.bn.previewTime.uploadFailed)),this._submitted=!1}}}class Zt{constructor(e){this.bookmark=new Ht(this,e),this.time=new $t(this,e)}close(){this.opened&&(0,s.Pg)(this,{opened:!1})}open(){this.opened||(0,s.Pg)(this,{opened:!0})}async handleToggleOpen(){this.bookmark.loading||((0,s.Pg)(this,{opened:!this.opened}),this.opened&&(await this.bookmark.loadData(),this.time.loadData()))}}const Jt={beforeForceLeave:Ze,onSwitchPage(){window.scrollTo(0,0)},onLangChange(e){const t=document.documentElement;t.setAttribute("lang",e.locale),t.setAttribute("dir",e.direction||"ltr")},onTitleChange(e){try{document.title=e||"choiceform"}catch(e){(0,s.vW)().uploadLog("修改网页标题失败")}},async beforeSetupEnd(e){if(e.useWxSdk&&!(0,_.s)())return async function(){"wechat"===(0,s.dU)().name&&(await Ae("https://res.wx.qq.com/open/js/jweixin-1.6.0.js",{},!0),void 0===window.WeixinJSBridge?document.addEventListener("WeixinJSBridgeReady",nt,!1):nt())}()},async afterSetup(){De.autoRun||De.infer||!(0,s.vW)().preview||(a.s$.on("SWITCH_NODE",((e,t)=>{Ft(t)})),a.s$.on("START_MEMORY",Dt),a.s$.on("END_MEMORY",((e,t)=>{!function(e){Bt=!1,e&&Ft(e)}(t)})))},async afterFetchStart(e){if(!(0,_.s)())return window.cfState=e,it(e)},async afterFetchSurvey(e){var t;window.cfState=e,(0,_.s)()||(it(e,1e3),await async function(e){const t=(0,we.ZI)();if(Pt=t.infer_id,Pt&&e.preview)return a.s$.trigger("START_MEMORY"),Ce(Pt)&&(function(e=[]){if(Se=e.filter((e=>!e.disabled)),Oe())c({name:"testcase",type:"success"});else{Se=Se.sort(((e,t)=>!e.when&&t.when?1:-1));for(let e=Se.length-1;e>=0;e--){const t=Se[e],{when:n,should:r,name:i}=t;if(n&&"or"===n.logicType&&n.options.length>1){const t=n.options.map(((e,t)=>({name:"".concat(i,"(").concat(t,")"),when:{logicType:"and",options:[e],reverse:!1},should:r})));Se.splice(e,1,...t)}}Ie=Se[0]}}(e.testCases),Lt={beforeInfer:e=>async function(e){if(Oe()||!Ie||!Ie.when)return;ke.value={};let t=!1;for(const n of Ie.when.options)if(n.relatedNodeId===e.nodeUuid){const r=(0,_e.Kn)(e);t||(r.forEach((e=>{ke.value[e.uuid]=e.origin.inferList,e.origin.inferList=[]})),t=!0);const i=r.find((e=>e.uuid===n.relatedOptionId)),o=await Ee(n,e.parent);o&&i.origin.inferList.push(o)}ke.cached=t}(e),async afterInfer(e){!function(e){ke.cached&&((0,_e.Kn)(e).forEach((e=>{e.origin.inferList=ke.value[e.uuid]})),ke.cached=!1,ke.value={})}(e)}}),await(0,bt.a2)(),Ut(e)}(e),await async function(){const e=(0,we.ZI)().auto_path;if(e){const t="http://localhost:12345/tasks/"+e+".js";await Ae(t.replace(/tasks\/.+/,"chai.js"),{},!1),await Ae(t,{type:"module"},!1)}}()),(0,s.Pg)(e,{previewTool:(t=e,(0,s.vW)().preview?new Zt(t):void 0)})},async afterFetchReward(e){if(!(0,_.s)())return window.cfState=e,it(e)},async onEndSurvey(){if((0,_.s)())return y({messageName:"end_survey",data:{}})},async onRestartSurvey(){if((0,_.s)())return y({messageName:"restart_survey",data:{}})},async onResumeSurvey(){if((0,_.s)())return y({messageName:"resume_survey",data:{}})},async onStartNewSurvey(){if((0,_.s)())return y({messageName:"start_new_survey",data:{}})},async beforeGotoNext(){if((0,_.s)())return y({messageName:"send_task_info",data:await(0,yt.M)()})}};window.CF_UI_COMS=window.CF_UI_COMS||{};const Yt={};let Qt;const en=[];async function tn(e,t){if(!Yt[e]){const n=async()=>{const{treeUrl:n,templatePath:r}=(0,s.vW)();if(!Qt){const e=await(0,Je.vT)(n,{type:"GET"},t);Qt=[...e.partials,...e.standards]}const i=function(e){const t=[],n=[];for(;e.length>0;){const r=[],i=[];e.forEach((e=>{const n=Qt.find((t=>t.id===e));i.push({file:n.file,id:e}),t.push(e),n.dependencies.forEach((e=>{t.includes(e)||r.push(e)}))})),n.unshift(i),e=r}return n}([e]),o=[];for(const e of i)for(const t of e)en.includes(t.id)||(o.push(r+"/"+t.file),en.push(t.id));return await Promise.all(o.map((e=>Ae(e,{crossorigin:"anonymous"},t)))),window.CF_UI_COMS[e]};Yt[e]=n()}return Yt[e]}function nn(e,t){let n=document.getElementById(t);n||(n=document.createElement("style"),n.setAttribute("id",t),n.style.display="none",document.head.appendChild(n)),n.innerHTML=e}const rn={loadUiEntryTemplates:async function(e,t){const{dynamic:n}=(0,s.vW)();if(n&&e&&!De.autoRun&&!De.infer)for(const n of e)await tn(n,t)},loadNodeComponent:async function(e,t){const{dynamic:n}=(0,s.vW)();if(n&&e&&!De.infer&&!De.autoRun)return await tn(e.id,t)},setGlobalStyle(e){nn(e,"global-var-style")},setVarStyle(e){nn(e,"common-var-style")},setPresetStyle(e){nn(e,"preset-rich-style")}};window.addEventListener("error",(e=>{i.EventHub.trigger("ERROR",{message:e.message})})),i.Core.realtime=fe,i.Core.initRealtimePreview=()=>{location.href.includes("/themes")&&(E(),c({name:"init_preview"}),document.documentElement.setAttribute("class","ios iphone mobile portrait safari -9"),window.addEventListener("message",ge),window.addEventListener("mousedown",ve),window.addEventListener("mouseup",ye))},i.Core.silentSetter=De.autoRun||De.infer,i.Core.registerEnv({name:o(),dev:De,app:ze,system:Xe,network:tt,auth:vt,storage:mt,hook:Jt,ui:rn}),i.I18n.MessageFormat=t(),window.CCClient={I18n:i.I18n,Core:i.Core,EventHub:i.EventHub}})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
2
+ (()=>{var e={2183:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i="undefined"!=typeof self?self:window,o=0,a=1,s=2,u=3,c="closed",l="errored",d="joined",f="joining",p="leaving",h="phx_close",m="phx_error",g="phx_join",v="phx_reply",y="phx_leave",w=[h,m,g,v,y],_="longpoll",b="websocket",x=function(e){return"function"==typeof e?e:function(){return e}},T=function(){function e(t,r,i,o){n(this,e),this.channel=t,this.event=r,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=o,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}return r(e,[{key:"resend",value:function(e){this.timeout=e,this.reset(),this.send()}},{key:"send",value:function(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}},{key:"receive",value:function(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}},{key:"reset",value:function(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}},{key:"matchReceive",value:function(e){var t=e.status,n=e.response;e.ref,this.recHooks.filter((function(e){return e.status===t})).forEach((function(e){return e.callback(n)}))}},{key:"cancelRefEvent",value:function(){this.refEvent&&this.channel.off(this.refEvent)}},{key:"cancelTimeout",value:function(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}},{key:"startTimeout",value:function(){var e=this;this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(function(t){e.cancelRefEvent(),e.cancelTimeout(),e.receivedResp=t,e.matchReceive(t)})),this.timeoutTimer=setTimeout((function(){e.trigger("timeout",{})}),this.timeout)}},{key:"hasReceived",value:function(e){return this.receivedResp&&this.receivedResp.status===e}},{key:"trigger",value:function(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}}]),e}(),k=e.Channel=function(){function e(t,r,i){var o=this;n(this,e),this.state=c,this.topic=t,this.params=x(r||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new T(this,g,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new E((function(){return o.rejoinUntilConnected()}),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(function(){o.state=d,o.rejoinTimer.reset(),o.pushBuffer.forEach((function(e){return e.send()})),o.pushBuffer=[]})),this.onClose((function(){o.rejoinTimer.reset(),o.socket.log("channel","close "+o.topic+" "+o.joinRef()),o.state=c,o.socket.remove(o)})),this.onError((function(e){o.isLeaving()||o.isClosed()||(o.socket.log("channel","error "+o.topic,e),o.state=l,o.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(function(){o.isJoining()&&(o.socket.log("channel","timeout "+o.topic+" ("+o.joinRef()+")",o.joinPush.timeout),new T(o,y,x({}),o.timeout).send(),o.state=l,o.joinPush.reset(),o.rejoinTimer.scheduleTimeout())})),this.on(v,(function(e,t){o.trigger(o.replyEventName(t),e)}))}return r(e,[{key:"rejoinUntilConnected",value:function(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this.rejoin()}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw"tried to join multiple times. 'join' can only be called a single time per channel instance";return this.joinedOnce=!0,this.rejoin(e),this.joinPush}},{key:"onClose",value:function(e){this.on(h,e)}},{key:"onError",value:function(e){return this.on(m,(function(t){return e(t)}))}},{key:"on",value:function(e,t){var n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}},{key:"off",value:function(e,t){this.bindings=this.bindings.filter((function(n){return!(n.event===e&&(void 0===t||t===n.ref))}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw"tried to push '"+e+"' to '"+this.topic+"' before joining. Use channel.join() before pushing events";var r=new T(this,e,(function(){return t}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=p;var n=function(){e.socket.log("channel","leave "+e.topic),e.trigger(h,"leave")},r=new T(this,y,x({}),t);return r.receive("ok",(function(){return n()})).receive("timeout",(function(){return n()})),r.send(),this.canPush()||r.trigger("ok",{}),r}},{key:"onMessage",value:function(e,t,n){return t}},{key:"isMember",value:function(e,t,n,r){if(this.topic!==e)return!1;var i=w.indexOf(t)>=0;return!r||!i||r===this.joinRef()||(this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1)}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"sendJoin",value:function(e){this.state=f,this.joinPush.resend(e)}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||this.sendJoin(e)}},{key:"trigger",value:function(e,t,n,r){var i=this,o=this.onMessage(e,t,n,r);if(t&&!o)throw"channel onMessage callbacks must return the payload, modified or unmodified";this.bindings.filter((function(t){return t.event===e})).map((function(e){return e.callback(o,n,r||i.joinRef())}))}},{key:"replyEventName",value:function(e){return"chan_reply_"+e}},{key:"isClosed",value:function(){return this.state===c}},{key:"isErrored",value:function(){return this.state===l}},{key:"isJoined",value:function(){return this.state===d}},{key:"isJoining",value:function(){return this.state===f}},{key:"isLeaving",value:function(){return this.state===p}}]),e}(),S={encode:function(e,t){var n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))},decode:function(e,t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(JSON.parse(e),5);return t({join_ref:n[0],ref:n[1],topic:n[2],event:n[3],payload:n[4]})}},I=(e.Socket=function(){function e(t){var r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=o.timeout||1e4,this.transport=o.transport||i.WebSocket||I,this.defaultEncoder=S.encode,this.defaultDecoder=S.decode,this.transport!==I?(this.encode=o.encode||this.defaultEncoder,this.decode=o.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),this.heartbeatIntervalMs=o.heartbeatIntervalMs||3e4,this.reconnectAfterMs=o.reconnectAfterMs||function(e){return[1e3,2e3,5e3,1e4][e-1]||1e4},this.logger=o.logger||function(){},this.longpollerTimeout=o.longpollerTimeout||2e4,this.params=x(o.params||{}),this.endPoint=t+"/"+b,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new E((function(){r.teardown((function(){return r.connect()}))}),this.reconnectAfterMs)}return r(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=O.appendParams(O.appendParams(this.endPoint,this.params()),{vsn:"2.0.0"});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?this.protocol()+":"+e:this.protocol()+"://"+location.host+e}},{key:"disconnect",value:function(e,t,n){this.reconnectTimer.reset(),this.teardown(e,t,n)}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=x(e)),this.conn||(this.conn=new this.transport(this.endPointURL()),this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,n){this.logger(e,t,n)}},{key:"onOpen",value:function(e){this.stateChangeCallbacks.open.push(e)}},{key:"onClose",value:function(e){this.stateChangeCallbacks.close.push(e)}},{key:"onError",value:function(e){this.stateChangeCallbacks.error.push(e)}},{key:"onMessage",value:function(e){this.stateChangeCallbacks.message.push(e)}},{key:"onConnOpen",value:function(){var e=this;this.log("transport","connected to "+this.endPointURL()),this.flushSendBuffer(),this.reconnectTimer.reset(),this.conn.skipHeartbeat||(clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs)),this.stateChangeCallbacks.open.forEach((function(e){return e()}))}},{key:"teardown",value:function(e,t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n||""):this.conn.close(),this.conn=null),e&&e()}},{key:"onConnClose",value:function(e){this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),e&&1e3!==e.code&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return t(e)}))}},{key:"onConnError",value:function(e){this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return t(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){return e.trigger(m)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case o:return"connecting";case a:return"open";case s:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"channel",value:function(e){var t=new k(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},this);return this.channels.push(t),t}},{key:"push",value:function(e){var t=this,n=e.topic,r=e.event,i=e.payload,o=e.ref,a=e.join_ref,s=function(){t.encode(e,(function(e){t.conn.send(e)}))};this.log("push",n+" "+r+" ("+a+", "+o+")",i),this.isConnected()?s():this.sendBuffer.push(s)}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.conn.close(1e3,"hearbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,(function(e){var n=e.topic,r=e.event,i=e.payload,o=e.ref,a=e.join_ref;o&&o===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.log("receive",(i.status||"")+" "+n+" "+r+" "+(o&&"("+o+")"||""),i),t.channels.filter((function(e){return e.isMember(n,r,i,a)})).forEach((function(e){return e.trigger(r,i,o,a)})),t.stateChangeCallbacks.message.forEach((function(t){return t(e)}))}))}}]),e}(),e.LongPoll=function(){function e(t){n(this,e),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=o,this.poll()}return r(e,[{key:"normalizeEndpoint",value:function(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+b),"$1/"+_)}},{key:"endpointURL",value:function(){return O.appendParams(this.pollEndpoint,{token:this.token})}},{key:"closeAndRetry",value:function(){this.close(),this.readyState=o}},{key:"ontimeout",value:function(){this.onerror("timeout"),this.closeAndRetry()}},{key:"poll",value:function(){var e=this;this.readyState!==a&&this.readyState!==o||O.request("GET",this.endpointURL(),"application/json",null,this.timeout,this.ontimeout.bind(this),(function(t){if(t){var n=t.status,r=t.token,i=t.messages;e.token=r}else n=0;switch(n){case 200:i.forEach((function(t){return e.onmessage({data:t})})),e.poll();break;case 204:e.poll();break;case 410:e.readyState=a,e.onopen(),e.poll();break;case 0:case 500:e.onerror(),e.closeAndRetry();break;default:throw"unhandled poll status "+n}}))}},{key:"send",value:function(e){var t=this;O.request("POST",this.endpointURL(),"application/json",e,this.timeout,this.onerror.bind(this,"timeout"),(function(e){e&&200===e.status||(t.onerror(e&&e.status),t.closeAndRetry())}))}},{key:"close",value:function(e,t){this.readyState=u,this.onclose()}}]),e}()),O=e.Ajax=function(){function e(){n(this,e)}return r(e,null,[{key:"request",value:function(e,t,n,r,o,a,s){if(i.XDomainRequest){var u=new XDomainRequest;this.xdomainRequest(u,e,t,r,o,a,s)}else{var c=i.XMLHttpRequest?new i.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(c,e,t,n,r,o,a,s)}}},{key:"xdomainRequest",value:function(e,t,n,r,i,o,a){var s=this;e.timeout=i,e.open(t,n),e.onload=function(){var t=s.parseJSON(e.responseText);a&&a(t)},o&&(e.ontimeout=o),e.onprogress=function(){},e.send(r)}},{key:"xhrRequest",value:function(e,t,n,r,i,o,a,s){var u=this;e.open(t,n,!0),e.timeout=o,e.setRequestHeader("Content-Type",r),e.onerror=function(){s&&s(null)},e.onreadystatechange=function(){if(e.readyState===u.states.complete&&s){var t=u.parseJSON(e.responseText);s(t)}},a&&(e.ontimeout=a),e.send(i)}},{key:"parseJSON",value:function(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}},{key:"serialize",value:function(e,n){var r=[];for(var i in e)if(e.hasOwnProperty(i)){var o=n?n+"["+i+"]":i,a=e[i];"object"===(void 0===a?"undefined":t(a))?r.push(this.serialize(a,o)):r.push(encodeURIComponent(o)+"="+encodeURIComponent(a))}return r.join("&")}},{key:"appendParams",value:function(e,t){return 0===Object.keys(t).length?e:e+(e.match(/\?/)?"&":"?")+this.serialize(t)}}]),e}();O.states={complete:4},e.Presence=function(){function e(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e);var o=i.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(o.state,(function(t){var n=r.caller,i=n.onJoin,o=n.onLeave,a=n.onSync;r.joinRef=r.channel.joinRef(),r.state=e.syncState(r.state,t,i,o),r.pendingDiffs.forEach((function(t){r.state=e.syncDiff(r.state,t,i,o)})),r.pendingDiffs=[],a()})),this.channel.on(o.diff,(function(t){var n=r.caller,i=n.onJoin,o=n.onLeave,a=n.onSync;r.inPendingSyncState()?r.pendingDiffs.push(t):(r.state=e.syncDiff(r.state,t,i,o),a())}))}return r(e,[{key:"onJoin",value:function(e){this.caller.onJoin=e}},{key:"onLeave",value:function(e){this.caller.onLeave=e}},{key:"onSync",value:function(e){this.caller.onSync=e}},{key:"list",value:function(t){return e.list(this.state,t)}},{key:"inPendingSyncState",value:function(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}}],[{key:"syncState",value:function(e,t,n,r){var i=this,o=this.clone(e),a={},s={};return this.map(o,(function(e,n){t[e]||(s[e]=n)})),this.map(t,(function(e,t){var n=o[e];if(n){var r=t.metas.map((function(e){return e.phx_ref})),u=n.metas.map((function(e){return e.phx_ref})),c=t.metas.filter((function(e){return u.indexOf(e.phx_ref)<0})),l=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));c.length>0&&(a[e]=t,a[e].metas=c),l.length>0&&(s[e]=i.clone(n),s[e].metas=l)}else a[e]=t})),this.syncDiff(o,{joins:a,leaves:s},n,r)}},{key:"syncDiff",value:function(e,t,n,r){var i=t.joins,o=t.leaves,a=this.clone(e);return n||(n=function(){}),r||(r=function(){}),this.map(i,(function(e,t){var r=a[e];if(a[e]=t,r){var i,o=a[e].metas.map((function(e){return e.phx_ref})),s=r.metas.filter((function(e){return o.indexOf(e.phx_ref)<0}));(i=a[e].metas).unshift.apply(i,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(s))}n(e,r,t)})),this.map(o,(function(e,t){var n=a[e];if(n){var i=t.metas.map((function(e){return e.phx_ref}));n.metas=n.metas.filter((function(e){return i.indexOf(e.phx_ref)<0})),r(e,n,t),0===n.metas.length&&delete a[e]}})),a}},{key:"list",value:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,n){return t(e,n)}))}},{key:"map",value:function(e,t){return Object.getOwnPropertyNames(e).map((function(n){return t(n,e[n])}))}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}}]),e}();var E=function(){function e(t,r){n(this,e),this.callback=t,this.timerCalc=r,this.timer=null,this.tries=0}return r(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()})?n.apply(t,[t]):n)||(e.exports=r)},9141:(e,t,n)=>{"use strict";var r=n(9591),i=n(9575),o=":CF_PD:",a={inflateBase64:function(e){return e=i.Base64.atob(e),(0,r.inflate)(e,{to:"string"})},deflateBase64:function(e){return e=(0,r.deflate)(e,{to:"string"}),i.Base64.btoa(e)},inflatePrefix:function(e){return e=e.substr(o.length),(0,r.inflate)(e,{to:"string"})},deflatePrefix:function(e){return e=(0,r.deflate)(e,{to:"string"}),o+e},langTable:[{locale:"ar_sa",value:"العربية",bdCode:"ara",direction:"rtl",comment:"阿拉伯语"},{locale:"az_az",value:"azərbaycan",bdCode:"aze",comment:"阿塞拜疆语"},{locale:"be_by",value:"беларуская",bdCode:"bel",comment:"白俄罗斯语"},{locale:"bg_bg",value:"български",bdCode:"bul",comment:"保加利亚语"},{locale:"bn_bd",value:"বাংলা",bdCode:"ben",comment:"孟加拉语"},{locale:"cs_cz",value:"čeština",bdCode:"cs",comment:"捷克语"},{locale:"da_dk",value:"dansk",bdCode:"dan",comment:"丹麦语"},{locale:"de_de",value:"Deutsch",bdCode:"de",comment:"德语"},{locale:"el_gr",value:"Ελληνικά",bdCode:"el",comment:"希腊语"},{locale:"en_us",value:"English",bdCode:"en",comment:"英语"},{locale:"es_es",value:"español",bdCode:"spa",comment:"西班牙语"},{locale:"et_ee",value:"eesti",bdCode:"est",comment:"爱沙尼亚语"},{locale:"fa_ir",value:"فارسی",bdCode:"per",direction:"rtl",comment:"波斯语"},{locale:"fi_fi",value:"suomi",bdCode:"fin",comment:"芬兰语"},{locale:"fil_ph",value:"Filipino",bdCode:"fil",comment:"菲律宾语"},{locale:"fr_fr",value:"français",bdCode:"fra",comment:"法语"},{locale:"he_il",value:"עברית",bdCode:"heb",direction:"rtl",comment:"希伯来语"},{locale:"hi_in",value:"हिन्दी",bdCode:"hi",comment:"印地语"},{locale:"hu_hu",value:"magyar",bdCode:"hu",comment:"匈牙利语"},{locale:"hy_am",value:"հայերեն",bdCode:"arm",comment:"亚美尼亚语"},{locale:"id_id",value:"Indonesia",comment:"印度尼西亚语"},{locale:"it_it",value:"italiano",bdCode:"it",comment:"意大利语"},{locale:"ja_jp",value:"日本語",bdCode:"jp",comment:"日本语"},{locale:"kk_kz",value:"қазақ тілі",comment:"哈萨克语"},{locale:"km_kh",value:"ខ្មែរ",bdCode:"hkm",comment:"高棉语"},{locale:"ko_kr",value:"한국어",bdCode:"kor",comment:"韩语"},{locale:"ky_kg",value:"кыргызча",comment:"柯尔克孜语"},{locale:"lo_la",value:"ລາວ",bdCode:"lao",comment:"老挝语"},{locale:"mg_mg",value:"Malagasy",bdCode:"mg",comment:"马达加斯加语"},{locale:"mn_mn",value:"монгол",comment:"蒙古语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"pl_pl",value:"polski",bdCode:"pl",comment:"波兰语"},{locale:"ps_af",value:"پښتو",bdCode:"pus",comment:"普什图语",direction:"rtl"},{locale:"pt_pt",value:"português",bdCode:"pt",comment:"葡萄牙语"},{locale:"ro_ro",value:"română",bdCode:"rom",comment:"罗马尼亚语"},{locale:"ru_ru",value:"русский",bdCode:"ru",comment:"俄语"},{locale:"rw_rw",value:"Kinyarwanda",bdCode:"kin",comment:"卢旺达语"},{locale:"so_so",value:"Soomaali",bdCode:"som",comment:"索马里语"},{locale:"sr_rs",value:"српски",bdCode:"srp",comment:"塞尔维亚语"},{locale:"sv_se",value:"svenska",bdCode:"swe",comment:"瑞典语"},{locale:"sw_ke",value:"Kiswahili",bdCode:"swa",comment:"斯瓦希里语"},{locale:"tg_tj",value:"тоҷикӣ",bdCode:"tgk",comment:"塔吉克语"},{locale:"th_th",value:"ไทย",bdCode:"th",comment:"泰语"},{locale:"tr_tr",value:"Türkçe",bdCode:"tr",comment:"土耳其语"},{locale:"uk_ua",value:"українська",bdCode:"ukr",comment:"乌克兰语"},{locale:"ur_pk",value:"اردو",bdCode:"urd",direction:"rtl",comment:"乌尔都语"},{locale:"uz_uz",value:"ўзбекча",comment:"乌兹别克语"},{locale:"zh_cn",bdCode:"zh",value:"简体中文",comment:"中文"},{locale:"zh_tw",bdCode:"cht",value:"繁體中文",comment:"中文"},{locale:"vi_vn",value:"Tiếng Việt",bdCode:"vie",comment:"越南语"}]};t.Z=a},5159:(e,t,n)=>{"use strict";n.d(t,{bn:()=>o,BH:()=>c,zH:()=>s,tV:()=>a,i_:()=>u});const r={zh_cn:{upload:{name:"上传",amountLimit:"最少上传{min}个文件,最多上传{max}个文件",amountLimitMin:"最少上传{min}个文件",amountLimitMax:"最多上传{max}个文件",fileSizeLimit:"文件大小不能超过{size}。",invalidImage:"图片已破损或无法识别。",uploadRequired:"上传项必须完成上传"},verify:{name:"验证",invalidFailed:"输入内容无效,验证失败。",failed:"验证失败。",sendSuccess:"短信发送成功",sendFailed:"短信发送失败,请稍后再试.",tooFrequent:"操作太过频繁,请稍后再试。"},region:{name:"地域"},locate:{name:"定位",required:"必须定位后才能继续。"},weight:{name:"权重",total:"权重总值{total}",relax:"各项打分之和可以小于权重总值",strict:"各项打分之和必须等于权重总值",totalLimitMin:"各项分值总和不能小于{min}分"},previewBookmark:{existed:"该书签已经存在",importSuccess:"导入成功",importFailure:"导入失败",importFailed:"导入书签失败:"},previewTime:{uploadSuccess:"上传回复时间成功",uploadFailed:"上传回复时间失败"},lottery:{congratulation:"恭喜你",pity:"很遗憾",goal:"获得了",fail:"没有中奖,谢谢您的参与!"},icon:{name:"图标题"},imageSelect:{name:"图片选择题"},site:{name:"范围定位题"},hotSpot:{name:"图片框选题",tips:"请在图片上选择你感兴趣的区域。"},heatMap:{name:"图片热力题"},maxDiff:{name:"MaxDiff问题",all:"请完成所有任务的作答"},cascade:{name:"级联菜单",selectSome:"选择{amount}项",selectBetween:"选择{min}到{max}项"},menu:{name:"菜单",clickToSelect:"请点击选择...",required:"{text}: 列表中必须选择。",inputRule:"{text}:{rule}",inputReq:"{text}: 必须填写内容。",requiredBetween:"{text}: 列表中必须选择{min}到{max}项。",topList:"顶层列表",listItem:"列表项",limitMax:"{text}:最多只能选中{max}项"},select:{single:"单选",multi:"多选",limitBetween:"最少选择{min}项,最多选择{max}项。",limitMax:"最多选择{max}项",limitMin:"最少选择{min}项"},slideRate:{name:"连续评价题"},fill:{name:"填空 ",itemsLimit:"请输入{min}到{max}个项目",charsLimit:"请输入{min}到{max}个字",inputDecimal:"请输入小数",inputDecimalDigits:"请输入小数位数为{scale}的数字",inputInteger:"请输入整数",valueLimit:"请输入{min}到{max}之间的数值",needEmail:"请输入有效的Email",needPhoneNumber:"请输入有效的手机号码",needZipCode:"请输入有效的邮编。",needUrl:"请输入有效的网址。",itemInputRequired:"该项必须填写。",inputRequired:"输入项中必须完成填写",inputLimitMin:"至少输入{min}项。",onlyAllow:"仅限:{text}",number:"数字",alphabet:"英文字母",chinese:"中文",atcpLabelOnly:"只能输入提示的标签"},rank:{name:"排序",limitMin:"必须排出前{min}项的顺序。",limitAll:"必须排出所有选项的顺序。",tips:"将项目拖放到您喜欢的顺序中。"},mark:{graph:"打分",value:"打分"},matrix:{single:"单选矩阵",multi:"多选矩阵",multiRow:"行多选矩阵",multiCol:"列多选矩阵",singleRow:"行单选矩阵",singleCol:"列单选矩阵",singleRowCol:"行列单选矩阵",eachRowOne:"每行选择一项",eachColOne:"每列选择一项",eachRowColOne:"每行每列选择一项",rowLimitBetween:"每行最少选择{min}项,最多选择{max}项。",colLimitBetween:"每列最少选择{min}项,最多选择{max}项。",rowLimitMax:"每行最多选择{max}项。",colLimitMax:"每列最多选择{max}项。",rowLimitMin:"每行最少选择{min}项。",colLimitMin:"每列最少选择{min}项。"},preview:{noMessage:"预览模式下不提供验证服务",noLink:"预览模式不进行链接跳转。"},video:{watchAll:"请认真观看完视频。"},reward:{get:"领取奖励",yuan:"元",weChatName:"微信名称示例"},global:{invalidReward:"分享的链接无法获取奖励",upgrade:"数据版本发生变化,到设计端重新保存后才能继续访问。",timeOver:"问卷回复时长超时,未能按时完成答题!",answerRequired:"必答题,答题后继续。",antiAgain:"不允许再次回复",authFailed:"授权失败",downloadError:"下载数据失败,请确保网络良好后再重试。",start:"开始",next:"下一题",previous:"上一题",go:"前往",done:"完成",notTarget:"抱歉,您暂时不符合当前调查的条件。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",backTest:"返回测试",invalidUrl:"不是有效问卷地址",tryAgain:"操作失败,请稍后重试。",clientError:"问卷指定的调研终端与本终端不一致,请确认你的链接地址是否正确。"},memory:{title:"记录恢复",message:"检测到未完成的回复记录,是否恢复记录?",sure:"恢复记录",deny:"重新开始"},langResume:{title:"正在切换语言,请稍候..."},backEnd:{response_overflow:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",collector_full:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",survey_not_exist:"抱歉,这个调查可能已经关闭、重命名或删除。",response_status_error:"操作被拒绝",quota_not_match:"配额失败",internal_server_error:"服务器未知错误",survey_offline:"本次调查可能已经结束并关闭,感谢您的参与。",diagram_has_errors:"部分逻辑存在错误,请修正后再发布调查问卷。",interviewee_missing_error:"渠道不匹配",interviewee_invalid_error:"该渠道下不允许回复,请使用微信打开链接。",multi_responses_error:"您已参与过本次调研活动,无法再次回复。感谢您的参与。",api_rate_limit_error:"API 连接过于频繁",response_already_examined:"抱歉,您不符合这项调查的条件。我们真诚地感谢您为此付出的时间,并期望您继续参与我们的在线调查活动!",question_missing_error:"没找到验证对象",gen_validation_error:"获取验证码图片失败",invalid_phone_number_error:"提供的电话号码格式不正确。",sms_gateway_error:"短信发送失败",invalid_code_error:"输入内容无效,验证失败。",quota_full:"抱歉,这个调查问卷的配额已经达到最大设定数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",reward_type_error:"无效的奖励类型",already_been_verificated:"奖品已核销,不可再次使用",red_envelope_duplicated:"您已参与过本活动,不能重复领取。感谢您的参与。",red_envelope_expired:"奖励码超时过期。",red_envelope_received_by_yourself:"不能重复扫码领取奖励。",red_envelope_received_by_others:"不能扫取他人奖励码。",red_envelope_intercepted:"微信账号可能存在异常导致红包发放操作失败。",red_envelope_send_error:"微信账号可能存在异常。",oauth_error:"授权失败"}},en_us:{upload:{name:"Upload",amountLimit:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} } and maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMin:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMax:"Upload maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",fileSizeLimit:"File size cannot exceed {size}。",invalidImage:"The picture is damaged or unrecognized.",uploadRequired:"Upload items must be completed"},verify:{name:"Verification",invalidFailed:"Invalid input",failed:"verification failed",sendSuccess:"Successful message sending",sendFailed:"Message sending failed, please try again later",tooFrequent:"The operation is too frequent, please try again later"},region:{name:"District"},locate:{name:"Location",required:"Continue after positioned"},weight:{name:"Weight Slider",total:"Total Weight: {total}",relax:"Sum of scores may be less than the total weight",strict:"Sum of scores must be equal to the total weight",totalLimitMin:"Sum of scores should not be less than {min, plural, =0 { no points} one {# point} other {# points} }"},previewBookmark:{existed:"This bookmark already exists",importFailed:"Failed to import bookmark:",importSuccess:"Import successfully",importFailure:"Import failed"},previewTime:{uploadSuccess:"Upload success",uploadFailed:"Upload failed"},lottery:{congratulation:"Congratulations!",pity:"It's a pity",goal:"You got it",fail:"Did not win. Thanks for your participation!"},icon:{name:"Icon"},imageSelect:{name:"Image Choice"},site:{name:"Site Location"},hotSpot:{name:"Picture Selection",tips:"Please select the picture of your choice"},heatMap:{name:"Heat Map"},maxDiff:{name:"MaxDiff question",all:"Please complete all tasks"},cascade:{name:"Cascade Menu",selectSome:"Please select {amount, plural, =0 {no options} one {# option} other {# options} }",selectBetween:"Please select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} }"},menu:{name:"Dropdown menu",clickToSelect:"Click to select...",required:"{text}: Requires selection",inputRule:"{text}:{rule}",inputReq:"{text}: Requires input",requiredBetween:"{text}: Please select minimum {min, plural, =0 {no items} one {# item} other {# items} } maximum {max, plural, =0 {no items} one {# item} other {# items} }",topList:"Top list",listItem:"List item",limitMax:"{text}:Please select maximum {max, plural, =0 {no items} one {# item} other {# items} }"},select:{single:"Single Answer",multi:"Multiple Answer",limitBetween:" Please answer minimum {min, plural, one {# choice} other {# choices} } maximum {max, plural, one {# choice} other {# choices} }",limitMax:"Maximum selection {max, plural, one {# choice may be answered.} other {# choices may be answered.} }",limitMin:"Minimum selection {min, plural, one {# choice.} other {# choices.} }"},slideRate:{name:"Slide Rating"},fill:{name:"Text Entry",itemsLimit:"Please enter item between {min} and {max}.",charsLimit:"Please enter text between {min} and {max}.",inputDecimal:"Please enter decimal",inputDecimalDigits:"Please enter decimal number with {scale} digits",inputInteger:"Please enter integer",valueLimit:"Please enter a number between {min} and {max}.",needEmail:"Please enter a valid email address.",needPhoneNumber:"Please enter a valid mobile phone number.",needZipCode:"Please enter a valid postcode.",needUrl:"Please enter valid a URL address.",itemInputRequired:"Please answer this question",inputRequired:"Answer required",inputLimitMin:"Please enter at least {min, plural, one {# item} other {# items} }",onlyAllow:"Please enter a valid {text}",number:"number",alphabet:"alphabet",chinese:"chinese character",atcpLabelOnly:"Can only input pop up label"},rank:{name:"Ranking",limitMin:"Please rank at least {min, plural, one {# choice.} other {# choices.} }",limitAll:"Please rank all options",tips:"Drag and drop items into you preferred order."},mark:{graph:"Rating",value:"Slider"},matrix:{single:"Single Choice Matrix",multi:"Multiple Choice Matrix",multiRow:"Multiple Row Choice Matrix",multiCol:"Multiple Column Choice Matrix",singleRow:"Single Row Choice Matrix",singleCol:"Single Column Choice Matrix",singleRowCol:"Single Row Column Choice Matrix",eachRowOne:"Must select one option in each row",eachColOne:"Must select one option in each column",eachRowColOne:"Must select one option in each row & column",rowLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each column"},preview:{noMessage:"No message service in preview mode",noLink:"No linking in preview mode"},video:{watchAll:"Please watch the video completely"},reward:{get:"Get Reward",yuan:"yuan",weChatName:"WeChat demo name"},global:{invalidReward:"Can not access gift via shared link",upgrade:"Data version changed, can continue to access it only after the design side saves it again.",timeOver:"Exceeded time limit",answerRequired:"This question requires an answer.",antiAgain:"You have already taken this survey.",authFailed:"Authorization failed",downloadError:"Download data failed, please make sure the network is good and try again.",start:"Start",next:"Next",previous:"Previous",go:"Proceed",done:"Done",notTarget:"Sorry, you do not match the criteria for this survey. We sincerely thank you and appreciate your time, look forward to your future participation in our online surveys!",backTest:"Back Test",invalidUrl:"Invalid survey url",tryAgain:"Operation failed,try again later.",clientError:"The survey terminal specified in the questionnaire is inconsistent with this terminal. Please confirm whether your link address is correct."},memory:{title:"Recover",message:"Previous unfinished answer, Do we recover it?",sure:"Recover",deny:"Start new"},langResume:{title:"Switching language, please wait."},backEnd:{response_overflow:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",collector_full:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",survey_not_exist:"Sorry, this survey may already been closed, you can renamed or delete it.",response_status_error:"Submition has been declined. Please try again.",quota_not_match:"quota_not_match",internal_server_error:"An error occurred with the server.",survey_offline:"Sorry, this survey may already be closed. Thanks for your participation",diagram_has_errors:"Some parts have logic error. please correct the error and launch the survey again.",interviewee_missing_error:"Channel mismatch",interviewee_invalid_error:"Reply is not allowed under this channel, please open this link in wechat app.",multi_responses_error:"You have already taken this survey. Thanks for your participation.",api_rate_limit_error:"Pinging the API too often.",response_already_examined:"Sorry, you do not match the criteria for this survey. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",question_missing_error:"Validation object not found",gen_validation_error:"Failed to get the verification code picture",invalid_phone_number_error:"The format of the phone number provided is incorrect.",sms_gateway_error:"SMS could not be sent",invalid_code_error:"Invalid data has been entered into the form, the validation fails.",quota_full:"Sorry, this survey has reached the maximum number of responses. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",reward_type_error:"Invalid reward type",already_been_verificated:"The reward has been verificated and cannot be used again",red_envelope_duplicated:"You have participated in this activity and cannot claim it again. Thank you for your participation.",red_envelope_expired:"Reward Code has expired.",red_envelope_received_by_yourself:"You can't scan the code repeatedly to get rewards.",red_envelope_received_by_others:"You cannot scan other people's reward codes.",red_envelope_intercepted:"There may be irregularity in the wechat account, resulting in the failure of red envelope issuance.",red_envelope_send_error:"Wechat account may be abnormal.",oauth_error:"failed to authorize"}}};let i="en_us",o=r[i];function a(e){e&&(Object.keys(e).forEach((t=>{r[t.toLowerCase()]=e[t]})),o=r[i])}function s(){return{...r}}function u(e){i=e.toLowerCase(),o=r[i]||r.en_us}function c(){return i}},3768:(e,t,n)=>{"use strict";n.d(t,{F2:()=>k,JH:()=>I,gS:()=>S,py:()=>x,zJ:()=>T}),n(5306);var r=n(1128),i=n(9481),o=n(9310),a=n(2812),s=n(3656),u=n(6935),c=n(9564),l=n(1881),d=n(6539),f=n(6064),p=n(3877);const h=["select","icon_mark","value_mark","upload","menu","slide_rate"],m=["fill","verify"];function g(e){const{type:t}=e;return"region"===t?"predef":t}function v(e,t){const{origin:n}=t;let r;if(t.isOtherOpt)r=n.optionType;else if(!0===n.useComment)r="option_comment";else{const{type:t}=e;r="region"===t?"predef_region":h.includes(t)?"option":m.includes(t)?"comment":t}return r}function y(e,t){const n=function(e){const{loop:t}=e;let n;return t&&(n=t.replacements.map((e=>({node_id:e.loopNodeId.toLowerCase(),index:e.index,option_id:e.uuid.toLowerCase()})))),n}(e),{nodeUuid:r}=e,i=t&&t(e);return{type:g(e),node_id:r.toLowerCase(),items:i,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function w(e,t){const n=(0,r.Lb)(t),i=(0,p.Df)(t,e),o={value:(0,f.O2)(i)?"":i,other:!!t.isOtherOpt,type:v(e,t)};if(o.option_id=t.uuid.toLowerCase(),(0,s.is)(t,"xid"in t)){const{optionY:e,optionX:n,xid:r,yid:i}=t;o.row_option_id=i.toLowerCase(),o.col_option_id=r.toLowerCase(),o.row_content=(0,u.mP)(e.text),o.col_content=(0,u.mP)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,u.mP)(t.text);return t.visible||(o.hidden=!0),o}function _(e){return(0,r.Kn)(e).reduce(((t,n)=>{var r;return(n.selected||(0,p.Zy)(n,e)||void 0===n.selected&&!0===(null===(r=null==n?void 0:n.__cache)||void 0===r?void 0:r.selected))&&t.push(w(e,n)),t}),[])}const b={};function x(e){const t=b[e.type];return t&&t(e)}function T(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function k(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function S(e,t="all",n="committed_url",r=!1){const a=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!k(e.checkMode,t))return;if("data"===e.type)return;const r=x(e);r&&n.push(r)})),n}(e,t),u=r?void 0:await(0,l.Xs)(e,n),c={backend_request_params:await(0,l.u)(e),webhook_params:u,answers:a,var_map_info:(0,o.Zt)(e,t),options_display_info:(0,i.De)(e,t),query_params:(0,d.ZI)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.Tm)(c.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),c}function I(e){switch(e.type){case"verify":return!!e.code;case"location":case"region":case"area":return!!e.value;case"describe":case"lottery":case"end":return!0;default:return(0,r.eK)(e)||(0,r.My)(e)}}b.select=b.select_image=b.menu=b.select_icon=b.hot_spot=e=>{const t=y(e,_);if((0,c.Ir)(e.origin)&&t.items){let e=!1,n=!1;t.items.forEach((t=>{"comment"!==t.type&&(t.hidden?e=!0:n=!0),delete t.hidden})),e&&n&&(t.items=t.items.filter((e=>!e.hidden)))}return t},b.cascade=b.icon_mark=b.value_mark=b.matrix=b.weight=b.slide_rate=b.sequence=b.upload=b.heat_map=b.fill=b.max_diff=e=>{const t=y(e,_);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},b.location=e=>{const t=y(e,(t=>{const n=(0,r.Kn)(e).find((e=>e.selected));return n?[w(t,n)]:[]})),{position:n,indexes:i}=e;return n&&(n.indexes=i,t.location=n),t},b.region=e=>{const t=b.location(e);return t.region=(0,a.BT)(e.value),t},b.area=e=>b.location(e),b.data=e=>y(e,(e=>(0,r.Kn)(e).reduce(((t,n)=>(n.selected&&t.push(w(e,n)),t)),[]))),b.verify=e=>{const t=y(e),{phoneNumber:n,validateType:r,code:i}=e;return"sms"===r&&(t.phone_num=n),t.code=i,t},b.end=e=>({type:g(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),b.logic=e=>{const t=y(e);return t.logic_result=e.logicResult,t}},9192:(e,t,n)=>{"use strict";n.d(t,{h:()=>c,t:()=>p}),n(2707),n(3948);var r=n(1128),i=n(45),o=n(3151),a=n(9564),s=n(4248),u=n(3877);function c(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[]}}function l(e){(0,s.Pg)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,r.eu)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,i.i1)(t,e)&&(t.isOtherOpt?(s=!0,l(t)):(a=!0,n(t)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(e,t){if(!(0,u.hZ)(e,t))return;const n=f[t.type];n?await n(e,t):function(e,t){d(e,t,l)}(e,t)}f.heat_map=(e,t)=>{d(e,t,(e=>{(0,s.Pg)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[],image:null})}));n&&await(0,a.YC)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.Pg)(e,{percent:(0,r.ad)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.Pg)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,r.eu)(t).forEach((t=>{if(t===e)return;const n=(0,i.Cp)(e.origin)||(0,i.Rv)(e,t),r=(0,i.Cp)(t.origin)||(0,i.Rv)(t,e),o=(0,i.tl)(e,t)||(0,i.tl)(e,t.optionX)||(0,i.tl)(e,t.optionY)||(0,i.tl)(e.optionX,t)||(0,i.tl)(e.optionY,t)||(0,i.W_)(e,t);(n||r||o)&&l(t)}))},f.cascade=(e,t)=>{const n=(e,t)=>{if(!t||!t.list)return[];if(t.list.find((t=>t.option===e)))return[...t.list];for(const r of t.list){const t=n(e,r);if(t.length>0)return t}return[]},r=t.otherOptions,a=r.includes(e)?[...t.cascade.list]:n(e,t.cascade);r.forEach((e=>{a.push({option:e})})),a.forEach((n=>{n.option!==e&&(0,i.i1)(n.option,e)&&(n.display?(0,o.j9)(n,t):l(n.option))}))}},1028:(e,t,n)=>{"use strict";n.d(t,{JG:()=>r,kI:()=>o,vv:()=>i});const r={refresh:!1,result:!1},i={refresh:!0,result:!0},o={refresh:!1,result:!0}},565:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,y:()=>s});var r=n(9564),i=n(4248),o=n(3768);function a(e,t){const{nodes:n}=e.parent;return!n.includes(e)&&(t&&(0,i.vW)().uploadLog("".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(e,t){const n=e.renderList.filter((e=>!((0,r.$X)(e)||!(0,o.F2)(e.checkMode,t)||!(0,r.ZA)(e.origin)||(0,o.JH)(e))));if(n.length>0){const e=n.map((e=>e.runtimeNodeName)).join();(0,i.vW)().uploadLog("answer lack for: ".concat(e),"warning")}}},277:(e,t,n)=>{"use strict";n.d(t,{M:()=>d}),n(1817);var r=n(7529),i=n(9564),o=n(4248),a=n(8413),s=n(6935),u=n(3768);function c(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.L)(e.location.address):""}function l(e,t){const n=(0,o.vW)().startState,a=[{title:(0,s.mP)(n.title),description:(0,s.mP)(n.description)}];return t.forEach((t=>{const n=(0,r.Sl)(e,t);if(!(0,i.$X)(n)){const e={title:(0,s.mP)(n.title)||n.runtimeNodeName,description:(0,s.mP)(n.description),value:c(t),options:t.items?t.items.map((e=>({text:e.row_content||e.col_content?e.row_content+"-"+e.col_content:e.content,value:(0,u.zJ)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.vW)();if(!e)return null;const t=await(0,u.gS)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},2629:(e,t,n)=>{"use strict";n.d(t,{Gl:()=>h,Rv:()=>m,lq:()=>g});var r=n(5015),i=n(5838),o=n(3892),a=n(9026),s=n(6935),u=n(7550),c=n(4248),l=n(5159);const d={valid:!0,message:""},f="vital:",p="alert:";async function h(e,t){if(e){const{parent:n}=t;return(0,r.LO)(n,e,null,!1)}return d}async function m(e,t){if(e){const{message:n}=e;return await(0,i.Q3)(t,e)?d:{valid:!1,message:n||(0,u.Iu)(l.bn.verify.invalidFailed)}}return d}async function g(e,t=!1){if(!e.parent.nextLoading&&!t)return d;e.validateFailed=!1;const{origin:n,parent:r}=e,{validation:i}=n;if(!i)return d;const{request:u,logic:l,noPreventNext:g}=i;let v=await h(u,e);return v.valid&&(v=await m(l,r)),!v.valid&&(e.validateFailed=!0,g&&(v=d,(0,a.L$)(r,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.sb)(e.message,{state:t}),(0,o.PX)(e.message)||(e.message=await(0,s.Ur)(e.message,{state:t})),e.message.startsWith(f)?(e.type="vital",e.message=e.message.substring(f.length)):e.message.startsWith(p)&&(e.type="alert",e.message=e.message.substring(p.length))),e}(v,r),e.validateFailTimes+=1,(0,o.PX)(v.message))?((0,c.dU)().hook.beforeForceLeave(),(0,c.dU)().app.openWebLink(v.message),(0,c.vW)().customAbort(),v):v}},7679:(e,t,n)=>{"use strict";n.d(t,{Dn:()=>N,Jh:()=>C,jY:()=>L}),n(2707),n(3210),n(3948);var r=n(1128),i=n(3892),o=n(9564),a=n(2629),s=n(6935),u=n(3656),c=n(4248),l=n(7550),d=n(5159),f=n(5142),p=n(3877),h=n(45),m=n(6866),g=n(5905);const v={valid:!0,message:""};function y(e){if(!(0,o.ZA)(e.origin))return v;const t=(0,r.My)(e)||(0,r.eK)(e);return{valid:t,message:t?"":(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}}function w(e,t){if((0,g.sy)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function _(e){if(!(0,o.ZA)(e.origin)&&!(0,r.eK)(e))return v;const{options:t}=e,{parent:n}=e;let i=await(0,s.Ob)(e.origin.fillMin,{state:n});i=i||t.length,i>t.length&&(i=t.length),i=w(e,i);let a=0;const u=(0,l.Iu)(d.bn.fill.itemInputRequired);let c=!1;for(const n of t)(0,p.Zy)(n,e)?(E(n,u),a+=1):!0===n.origin.fillRequired&&(O(n,u),c=!0);return i>a?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputLimitMin,{min:i}),dueToNode:e}:c?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:e}:v}function b(e,t=!1){const n=(0,g.sy)(e)?e.otherOptions:[],i=t?n:(0,r.eu)(e),a=(0,o.ZA)(e.origin),s=(0,l.Iu)(d.bn.fill.itemInputRequired),u=i.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,i=e.selected;return n&&(i||(0,r.c1)(e.origin)&&t)}(t,a)&&!(0,p.Zy)(t,e);return n?O(t,s):E(t,s),n}))[0],c=!u;return c?v:{valid:c,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:e,dueToOption:u}}async function x(e,t=!1){const n=t?e.options:(0,r.eu)(e),o=[];for(const t of n){let n={valid:!0};(0,p.Zy)(t,e)&&(n=await(0,i.b0)(t,e)),n.valid?E(t,n.message):(O(t,n.message),o.push(n))}return o[0]||v}async function T(e){return(0,o.qX)(e.origin)&&(0,r.My)(e)?k(e):v}async function k(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,r.eu)(e).find((e=>e.selected));return!(!t||!(0,h.Cp)(t.origin))}(e))return v;const{min:t}=await(0,o.gx)(e,e.parent);return(0,r.eu)(e).filter((e=>!(0,r.c1)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.Iu)(d.bn.select.limitMin,{min:t}),dueToNode:e}}const S={};async function I(e,t){if(!t.list)return v;const{multiple:n,min:r,max:o,required:a}=t,s=t.text?(0,l.Iu)(d.bn.menu.listItem)+t.text:(0,l.Iu)(d.bn.menu.topList),u=t.list.filter((e=>e.selected));for(const t of u){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.inputReq,{text:n.text})};const r=await(0,i.b0)(n,e);if(!r.valid)return{...r,message:(0,l.Iu)(d.bn.menu.inputRule,{text:n.text,rule:r.message})}}const c=u.length;if(a&&0===c)return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.required,{text:s})};if(n&&c<r&&c>0)return{valid:!1,dueToNode:e,message:(0,l.Iu)(d.bn.menu.requiredBetween,{text:s,min:r,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await I(e,n);if(!t.valid)return t}return v}function O(e,t){e.errorMessage!==t&&(0,c.Pg)(e,{errorMessage:t})}function E(e,t){e.errorMessage===t&&(0,c.Pg)(e,{errorMessage:""})}function C(e,t){(0,c.vW)().locateError(e,t)}async function P(e,t){if((0,o.$X)(e)||e.readonly)return v;const n=function(e){const{origin:{canSkipVideo:t},video:n}=e;return t||!n||n.ended?v:{valid:!1,message:(0,l.Iu)(d.bn.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const r=S[e.type];let i=r?await r(e):v;return i.valid&&t&&(i=await(0,a.lq)(e)),i.valid&&O(e,i.message),i}S.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},S.select_image=e=>S.select(e),S.fill=async e=>{const t=y(e);if(!t.valid)return t;let n=await _(e);return n.valid?(n=b(e,!0),n.valid?x(e,!1):n):n},S.value_mark=async e=>{const t=y(e);if(!t.valid)return t;let n=await _(e);return n.valid?(n=b(e,!0),n.valid?x(e,!0):n):n},S.icon_mark=async e=>{const t=await S.value_mark(e);return t.valid?(0,o.ZA)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}:v:t},S.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:r}=e;let i=(0,o.ZA)(r)?r.rankCount||n.length:0;const a=n.length;i>a&&(i=a),i=w(e,i);let s=0;const u=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<u.length&&u[e].sortNo===e+1;e++)s++;return i>s?{valid:!1,message:(0,l.Iu)(d.bn.rank.limitMin,{min:i}),dueToNode:e}:(t=b(e,!0),t.valid?x(e,!0):t)},S.matrix=async e=>{const t=y(e);if(!t.valid)return t;let n=await async function(e){const{origin:t}=e;return(0,o.Ir)(t)?v:(0,o.ZA)(t)||(0,r.My)(e)?(0,o.Zu)(t)?k(e):(0,o.Lk)(t)||(0,o.zR)(t)||(0,o.Rx)(t)?function(e){let t,n,r;(0,o.Lk)(e.origin)?(t="yid",n=e.renderOptionsY,r=!1):(0,o.zR)(e.origin)?(t="xid",n=e.renderOptionsX,r=!0):(0,o.Rx)(e.origin)&&(e.renderOptionsX.length>e.renderOptionsY.length?(t="yid",n=e.renderOptionsY,r=!1):(t="xid",n=e.renderOptionsX,r=!0));const i=e.options;for(const o of n){const n=o.uuid;if(!i.some((e=>e.selected&&(0,u.RC)(e[t],n))))return{valid:!1,message:r?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:1}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:1}),dueToNode:e}}return v}(e):async function(e){const t=(0,o.lE)(e.origin);let{min:n}=await(0,o.gx)(e,e.parent);const r=t?"xid":"yid",i=e[t?"renderOptionsX":"renderOptionsY"],a=e[t?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=e.options;for(const o of i){const i=o.uuid;if(s.filter((e=>e.selected&&(0,u.RC)(e[r],i))).length<n)return{valid:!1,message:t?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:n}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:n}),dueToNode:e}}return v}(e):v}(e);return n.valid?(n=b(e,!0),n.valid?x(e,!0):n):n},S.region=async e=>!(0,o.ZA)(e.origin)||e.value?v:{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e},S.location=async e=>{const t=await S.region(e);return t.valid||(t.message=(0,l.Iu)(d.bn.locate.required)),t},S.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let i=!0,a="";const s=(0,r.C4)(e,!0);if(!(0,o.ZA)(e.origin)&&0===s)return v;const u=await(0,o.Fy)(e,e.parent),{max:c}=u,f=w(e,u.min);let h=0;a=(0,l.Iu)(d.bn.upload.uploadRequired);let m=!1;for(const t of n)(0,p.Zy)(t,e)?(E(t,a),h+=1):!0===t.origin.fillRequired&&(O(t,a),m=!0);return s<f?(i=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f})):s>c?(i=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMax,{max:c})):(i=!0,a=""),f>h?{valid:!1,message:(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f}),dueToNode:e}:m?{valid:!1,message:(0,l.Iu)(d.bn.upload.uploadRequired),dueToNode:e}:{valid:i,message:a,dueToNode:e}},S.verify=async e=>{if((0,c.vW)().preview||(0,c.dU)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:e}}else{const t={valid:!1,message:(0,l.Iu)(d.bn.verify.invalidFailed),dueToNode:e},{validateType:n}=e,{code:r,parent:i,nodeUuid:o}=e,a=()=>(e.validateFailTimes+=1,t);if("image"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.Rq)({code:r},e),v}catch(e){return a()}}}else if("password"===n){const{transactionID:e}=i,t={response_id:e,question_id:o,code:r};try{return await(0,f.bp)(t),v}catch(e){return a()}}else if("sms"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.Rq)({code:r},e),v}catch(e){return a()}}}}return v},S.menu=S.select,S.area=async e=>y(e),S.select_icon=async e=>{const t=y(e);return t.valid?T(e):t},S.weight=async e=>{if(!(0,o.ZA)(e.origin)&&!(0,r.eK)(e))return v;const t=y(e);if(!t.valid)return t;let{weightTotal:n}=e;n=w(e,n);const{options:i}=e,a=i.reduce(((e,t)=>e+Number(t.value)),0);if(0===n){const t=b(e,!1);if(!t.valid)return t}return n>a&&!0!==e.origin.relax?{valid:!1,message:(0,l.Iu)(d.bn.weight.totalLimitMin,{min:n}),dueToNode:e}:v},S.cascade=async e=>{if(!(0,o.ZA)(e.origin)&&!(0,r.My)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?I(e,t):n},S.hot_spot=S.select,S.heat_map=async e=>y(e),S.slide_rate=S.value_mark,S.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.Iu)(d.bn.maxDiff.all)}};const L=(0,u.Ds)((async(e,t)=>{if(t&&O(t,(await(0,i.b0)(t,e)).message),e){const t=await N([e]);t.message||O(e,t.message),(0,m.pI)(e)}}),250);async function N(e,t=!1,n=!1){const r=[];for(const i of e){const e=await P(i,t);e.valid||(n&&O(e.dueToNode,e.message),r.push(e),(0,m.pI)(i))}return r[0]||v}},3892:(e,t,n)=>{"use strict";n.d(t,{PX:()=>c,_2:()=>l,b0:()=>m,xT:()=>u}),n(5306),n(3210);var r=n(6935),i=n(7550),o=n(1128),a=n(5159),s=n(6064);function u(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function c(e){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(e)}async function l(e,t){const{parent:n}=t,{origin:i}=e;let o=await(0,r.Ob)(i.fillStart,{state:n}),a=await(0,r.Ob)(i.fillEnd,{state:n});return(0,s.O2)(o)&&(o=-1/0),(0,s.O2)(a)&&(a=1/0),{start:o,end:a}}function d(e,t,n){return t<=e&&n>=e}function f(e,t,n){return d(e,t,n)?"":(0,i.Iu)(a.bn.fill.valueLimit,{min:t,max:n})}const p={};async function h(e,t,n){const{itemsMax:r,itemsMin:s}=await(0,o.y4)(t,n),u=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),0);let c="";return(u<s||u>r)&&(c=(0,i.Iu)(a.bn.fill.itemsLimit,{min:s,max:r})),{valid:!c,message:c}}async function m(e,t){const n=(0,s.KF)(e.value),{origin:r}=e,i=r.fillType,o=p[i];if(!o||(0,s.O2)(n)&&"auto_complete"!==i)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const u=await o(n,e,t);return a.context.option=null,u.valid||(u.dueToOption=e,u.dueToNode=t),u}p.chars=async(e,t,n)=>{const{start:r,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const u=function(e,t=[]){if(0===t.length)return"";e=e.replace(/[\s,,]/g,"");let n="";const r=[];t.includes("number")&&(n+="0-9.",r.push((0,i.Iu)(a.bn.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",r.push((0,i.Iu)(a.bn.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",r.push((0,i.Iu)(a.bn.fill.chinese)));const o=r.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,i.Iu)(a.bn.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,i.Iu)(a.bn.fill.charsLimit,{min:t,max:n})}(e,r,o);return{valid:!u,message:u}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needEmail)}},p.float=async(e,t,n)=>{if(!function(e){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)}(e))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputDecimal)};const{origin:r}=t;if(r.scale&&!function(e,t){return new RegExp("\\d+\\.\\d{".concat(t,"}$")).test(e)}(e,r.scale))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputDecimalDigits,{scale:r.scale})};const{start:o,end:s}=await l(t,n),u=f(Number(e),o,s);return{valid:!u,message:u}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,i.Iu)(a.bn.fill.inputInteger)};const r=Number(e),{start:o,end:s}=await l(t,n),u=f(r,o,s);return{valid:!u,message:u}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=u(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needPhoneNumber)}},p.postcode=async e=>{const t=function(e){return/^[0-9][0-9]{5}$/.test(e)}(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needZipCode)}},p.url=async e=>{const t=c(e);return{valid:t,message:t?"":(0,i.Iu)(a.bn.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,i.Iu)(a.bn.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:h(e,t,n),p.list_select=(e,t,n)=>h(e,t,n)},3877:(e,t,n)=>{"use strict";n.d(t,{Df:()=>s,Zy:()=>l,hZ:()=>o}),n(3210);var r=n(6064),i=n(6935);function o(e,t){return e.selected||l(e,t)}const a={};function s(e,t){let n="";const r=a[t.type];return n=e.isOtherOpt||!r?e.value:r(e),"string"==typeof n&&(n=(0,i.mP)(n)),n}function u(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,r.O2)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const c={};function l(e,t){return(c[t.type]||u)(e,t)}c.sequence=(e,t)=>-1!==e.sortNo&&u(e,t)},4725:(e,t,n)=>{"use strict";n.d(t,{Gi:()=>m,dK:()=>h,kw:()=>p,n0:()=>f}),n(3948);var r=n(9564),i=n(3656),o=n(7952),a=n(6451),s=n(5750),u=n(6935),c=n(1128),l=n(7552),d=n(9310);async function f(e,t){const{options:n,passRefs:r,refMaps:i}=await(0,a.P)(e,t.origin,null,!0);(0,d.sB)(t,i);const o=await(0,l.gk)(t,n,r);return(0,s.uR)(t,o)}function p(e,t,n=!1){const{loopStack:r}=t;return r.find(((t,o)=>(!n||o===r.length-1)&&(0,i.RC)(t.node.nodeUuid,e.nodeUuid)))}async function h(e,t,n,r,i,o){const a=(0,c.WA)(i),s={state:e,usage:{node:t,optionId:i.uuid}},l=await(0,u.e_)(a.text,s,"WRAPPED_URL"),d=await(0,u.e_)(i.text,s,"WRAPPED_URL"),f=await(0,u.e_)(a.value+"",s,"WRAPPED_URL");return{loopNodeId:n,outerIndex:o&&o.currentIndex,outerLoopId:o&&o.node.nodeUuid,index:r,uuid:i.uuid,refOptId:i.refOptId,refText:l||void 0,text:d||"",value:f,number:a.number,image:a.image,label:i.label,mapping:i.origin.isRef?a.mapping:i.mapping}}const m={_skip:(e,t,n)=>o.P.findNext(e,t,n),async _init(e,t,n){const{varList:o,origin:{loopStart:a,destList:s}}=t;if(0===o.length)return m._skip(e,t,n);const{loopStack:u}=n,c=s.find((e=>(0,i.RC)(e.selfPortId,a.uuid))).destInputId,l=(0,r.Cf)(e,c),d=o[0],{origin:f}=t,p=u[u.length-1],g=await h(n,t,f.nodeUuid,0,d,p),v={destInputId:c,node:f,varList:o,replacements:p?[...p.replacements,g]:[g],currentIndex:0};return u.push(v),{target:l,loop:(0,i.p$)(v),loopStack:(0,i.p$)(u)}},async _increase(e,t,n){const{nodeUuid:o}=t,{loopStack:a}=n,s=a[a.length-1],{varList:u,replacements:c,destInputId:l}=s,d=s.currentIndex+=1,f=u[d],p=a[a.length-2],m=await h(n,t,o,d,f,p),g=(0,r.Cf)(e,l);return c[c.length-1]=m,{target:g,loop:(0,i.p$)(s),loopStack:(0,i.p$)(a)}},async _end(e,t,n){const{loopStack:r}=n;r.pop();const a=await o.P.findNext(e,t,n);if(r.length>0){const e=(0,i.p$)(r);a.loop=e[e.length-1],a.loopStack=e}return a},findNext(e,t,n){const r=p(t,n,!0);if(r){const{currentIndex:i,varList:o}=r;return i===o.length-1?m._end(e,t,n):m._increase(e,t,n)}return m._init(e,t,n)}}},6492:(e,t,n)=>{"use strict";n.d(t,{tP:()=>T,Pf:()=>S,kJ:()=>b});var r=n(9564);function i(e,t,n,i,o){return o||(o=(0,r.CE)(e,t,n.uuid)),o||i.origin.parentRandomId||t.length&&(o=(0,r.Cf)(e,t[t.length-1].destInputId)),o}var o=n(1128),a=n(5905);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],u={async findNext(e,t){const{destList:n,output:u}=t.origin,c=(0,a.sy)(t)?t.otherOptions:[],l=s.indexOf(t.type)>-1?c:(0,o.eu)(t),d=l&&l.find((e=>e.selected));return{target:i(e,n,u,t,d&&(0,r.CE)(e,n,d.uuid))}}},c={async findNext(e,t,n){const{origin:{destList:i,parentRandomId:a}}=t,s=(0,o.fi)(t);let c=s&&(0,r.CE)(e,i,s.uuid);return c||(c=(await u.findNext(e,t,n)).target),c||!i.length||a||(c=(0,r.Cf)(e,i[0].destInputId)),{target:c}}};var l=n(7952),d=(n(5069),n(5838));const f={async findNext(e,t){const{origin:n,parent:i}=t,{options:o,output:a,destList:s,logicType:u,reverse:c,outputN:l}=n,f={logicType:u,reverse:c,options:o},p=await(0,d.Q3)(i,f);t.logicResult=p;const h=p?a:l;return{target:(0,r.CE)(e,s,h.uuid)}}};var p=n(5721),h=n(4725);n(2707),n(3948);const m={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:u}=n,c=[...o.filter((e=>e.selected)).sort(((e,t)=>e.cascadePath.length<t.cascadePath.length?1:-1)),...a.filter((e=>e.selected))];let l;for(const t of c)if(l=(0,r.CE)(e,s,t.uuid),l)break;return{target:i(e,s,u,t,l)}}};var g=n(7529),v=n(3656),y=n(8351);const w={cascade:m,logic:f,loop:h.Gi,sequence:c,random:p.GN};function _(e){const t=w[e];if(!t)throw new Error("lack next rules for this type of node...");return t}["describe","check","end","start","verify","data","max_diff"].forEach((e=>{w[e]=l.P})),["weight","slide_rate","upload","value_mark","icon_mark","fill","select_image","select","region","location","lottery","matrix","menu","area","select_icon","hot_spot","heat_map"].forEach((e=>{w[e]=u}));const b=["check","break_point"];function x(e,t){return"loop"===e.type?!(0,h.kw)(e,t):b.indexOf(e.type)<0}function T(e,t,n){return S(e,(0,y.qG)({target:n},t),t)}async function k(e,t,n,i){const{target:o,loop:a,random:s}=i,u=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,r.NU)(o,t.origin)&&(i.loopStack=n,i.loop=e),o.parentRandomId&&u&&!s&&(i.random=u)}else if(u){const t=(0,v.am)(u.node.nodeUuid,n.loopStack);return S(e,(0,g.JL)(n.renderList,t),n)}return i}async function S(e,t,n){let r,i,o=t,a=_(o.type),s=!0;for(;s&&(i=await k(e,o,n,await a.findNext(e,o,n)),r=i.target,r);)x(r,n)?s=!1:(o=(0,y.qG)(i,n),a=_(r.type));return i}},7952:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var r=n(9564);const i={async findNext(e,t){const{destList:n,output:i}=t.origin;return{target:(0,r.CE)(e,n,i&&i.uuid)}}}},5029:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,y:()=>o}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);const r=new Set;function i(e){return r.has(e)}function o(e){r.add(e)}},5721:(e,t,n)=>{"use strict";n.d(t,{GN:()=>f,Ns:()=>d,Ym:()=>c}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var r=n(3656),i=n(9564),o=n(7952),a=n(6866),s=n(5029);let u=[];function c(){return u}const l=new Set;function d(e,t){e&&0!==e.length&&(u=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.y)(n.nodeUuid);const e=t.find((e=>e.nodeUuid===n.parentRandomId));e&&l.add(e.nodeUuid)}})))}const f={async _init(e,t,n){const{origin:o}=t;let c=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,r.RC)(t.selfPortId,o.uuid)){const o=(0,i.Cf)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,r.XJ)(s.length+1);s.splice(e,0,t.destInputId)}else a[o]=[t.destInputId]}}));const s=function(e,t){const{customDestCount:n}=t.origin;if(!n||n>=e.length)return e;for(;e.length>n;)e.splice((0,r.XJ)(e.length),1);return e}(Object.keys(a),t);let u=[];for(;s.length>0;){const e=(0,r.XJ)(s.length);u=u.concat(a[s[e]]),s.splice(e,1)}return u}(e,t);!function(e,t){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=t;l.has(a)||o&&(e.forEach((e=>{const t=[];let a=(0,i.Cf)(n,e);for(;a;)t.push(a),a=(0,i.CE)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,r.XJ)(t.length),n=t[e].nodeUuid;(0,s.y)(n),u.push(n),t.splice(e,1)}})),l.add(a))}(c,t),c=(0,a.p8)(c,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:c,currentIndex:0};return n.push(f),{target:(0,i.Cf)(e,c[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:r}=t;return{target:(0,i.Cf)(e,r[n]),random:{...t}}},_end:(e,t,n)=>o.P.findNext(e,t,n),findNext(e,t,n){const{randomList:i}=n,{nodeUuid:o}=t,a=i.find((e=>(0,r.RC)(e.node.nodeUuid,o)));if(a){const{currentIndex:r,destPortIds:i}=a;return r===i.length-1?f._end(e,t,n):f._increase(e,a)}return f._init(e,t,i)}}},9758:(e,t,n)=>{"use strict";n.d(t,{Ko:()=>u,WM:()=>o}),n(3948);var r=n(2872),i=n(7089);function o(e){const t=e.split(":"),n={};if(1===t.length)n.baseId=t[0];else if(2===t.length)n.nodeId=t[0],n.nodePartId=t[1];else if(3===t.length){n.nodeId=t[0];const e=t[1];e.match(/^[a-z0-9]{8}$/)?n.optId=e:n.optFilterId=e,n.optPartId=t[2]}return n}function a(e){const t=[],n=e.getAttribute("data-ph-cfg");if(n){const e=JSON.parse(n);Object.keys(e).forEach((n=>{t.push({name:n,value:u(e[n])})}))}const r=e.getAttribute("data-img-size")||":",[i,o]=r.split(":").map((e=>Number(e))),a={phParams:t,limitSrc:Number(e.getAttribute("data-limit-src"))||0,limitRnd:e.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:i,outOfResult:!!e.getAttribute("data-out-of-result"),disorder:!!e.getAttribute("data-disorder")},s=e.getAttribute("data-limit");if(s){const[e,t,n]=s.split(":");a.limitType=Number(e)||1,a.limitStart=u(t),a.limitEnd=u(n)}return a}function s(e){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((t=>{e.removeAttribute(t)}))}function u(e){if(!e)return e;if(!function(e){return e.includes("var-tag")&&e.includes("data-id".concat("="))}(e=String(e)))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelectorAll(".var-tag");for(const e of n)if(!e.hasAttribute("data-v-config")){const t=o(e.getAttribute("data-id")),n=a(e);s(e);const u=(0,i.c)(t);e.setAttribute("data-v-id",u);const c=(0,r.BB)(n);c&&e.setAttribute("data-v-config",c)}return t.innerHTML}},9698:(e,t,n)=>{"use strict";n.d(t,{V:()=>o,q:()=>a});var r=n(3656),i=n(9758);function o(e){const t=e;return t.referUuid?{index:t.index,config:{phParams:[],limitEnd:t.limitEnd,limitSrc:t.limitSrc,limitStart:t.limitStart,limitType:t.limitType,disorder:t.disorder,limitRnd:t.limitRnd},identity:(0,i.WM)(t.uuid),uuid:t.referUuid}:t}function a(e,t){const n=e;if(n.limit){const e=t.find((e=>e.uuid===n.referId));return(0,r.pC)(e.referUuid)}return n.referId}},6539:(e,t,n)=>{"use strict";n.d(t,{FC:()=>c,Mw:()=>f,Xs:()=>d,Y8:()=>l,ZI:()=>s,zZ:()=>u}),n(5306),n(3210);var r=n(5159),i=n(4248),o=n(7550);let a;function s(){return a||(a=(0,i.dU)().app.getParams()),a}function u(){a=null}function c(e){const t={...e};return delete t.appid,delete t.code,delete t.state,t}function l(e){const t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^([?#&])/,""))?(e.split("&").forEach((e=>{const n=e.replace(/\+/g," ").split("=");let r=n.shift(),i=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),{...t}):t}function d(e){(0,i.vW)().preview||(0,i.dU)().dev.autoRun?(0,i.vW)().notify((0,o.Iu)(r.bn.preview.noLink)):((0,i.dU)().hook.beforeForceLeave(),(0,i.dU)().app.openWebLink(e))}function f(e,t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}const n=function(e){const t=[];return Object.keys(e).forEach((n=>{if(void 0!==e[n]){const r="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n]));t.push(r)}})),t.join("&")}(t),r=e.match(/\?/)?"&":"?";return e+r+n}},8343:(e,t,n)=>{"use strict";n.d(t,{v:()=>o}),n(3948);var r=n(6866),i=n(4248);async function o(e){const{currentStartTime:t,nodes:n}=e,o=(new Date).getTime(),a=Math.abs(o-t)/n.length;for(const e of n){const t=e.costTime||0;(0,i.Pg)(e,{costTime:t+a,endTime:o}),await(0,r.p9)(e)}(0,i.Pg)(e,{currentStartTime:o})}},6060:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var r=n(4248),i=n(68),o=n(7433),a=n(4588);async function s(e){const t=(0,a.VE)(e);(0,r.Pg)(e,{nodes:t});let n=null;if((0,a.Fr)(e)){const t=(0,a.zY)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,r.Pg)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,i.g)(t,n);(0,r.Pg)(e,{groupTable:o})}else(0,r.Pg)(e,{groupTable:void 0});const s=await(0,o.FK)(e);(0,r.Pg)(e,{prevButton:(0,o.ve)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},3251:(e,t,n)=>{"use strict";n.d(t,{cs:()=>c,s$:()=>s,yp:()=>u});var r=n(9564),i=n(4248);let o,a={};const s={on(e,t){a[e]||(a[e]=[]),a[e].push(t)},off(e,t){e||(a={}),a[e]&&(a[e]=t?a[e].filter((e=>e!==t)):[])},one(e,t){const n=r=>{t(r),s.off(e,n)};s.on(e,n)},trigger(e,t={}){if(a[e])try{a[e].forEach((n=>n({type:e,...t,data:t},t)))}catch(e){(0,i.vW)().uploadLog(e)}}};function u(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,r.qK)(e))}function c(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,i.dU)().hook.onSwitchPage())}},68:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(3656);function i(e,t){if(0===e.length)return;const n=e[0].loop.varList.map((t=>{const{text:n,uuid:r}=t,i=e.filter((e=>e.loop.replacements[0].uuid===r));return{uuid:r,title:n,cells:o(i)}})),r=n.reduce(((e,t)=>t.cells.length>e.cells.length?t:e),{cells:[]}),i=r.cells;n.forEach((e=>{e.cells=i.map((t=>e.cells.find((e=>e.node.nodeUuid===t.node.nodeUuid))||a(void 0)))}));const s=r.cells.map((e=>({uuid:e.node.nodeUuid,title:e.node.title})));return{title:t.tableTitle,header:s,rows:n}}function o(e){return e.map(a)}function a(e){const t=(null==e?void 0:e.renderId)||(0,r.M8)();return e.headHidden=!0,{uuid:t,node:e}}},6207:(e,t,n)=>{"use strict";n.d(t,{AK:()=>u,Fy:()=>c,LK:()=>s,pZ:()=>a}),n(5306);var r=n(866),i=n(7117);function o(e){const t=":"+(0,i.SN)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return e.indexOf(n)&&(e=e.replace(n,t)),e}function a(e){s(e)}function s(e){const{image:t,options:n}=e;t&&(t.id=o(t.id)),n&&n.forEach((e=>{e.image&&(e.image.id=o(e.image.id))}))}function u(e,t){return e.filter((e=>e.used)).map((e=>(s(e),e.destList=e.destList.filter((e=>!e.designOnly)),function(e){const t=e;t.questionText=(0,r.l)(t.questionText),t.describe=(0,r.l)(t.describe);let n=[];t.options&&(n=n.concat(t.options)),t.otherOptions&&(n=n.concat(t.otherOptions)),t.optionsX&&(n=n.concat(t.optionsX)),t.optionsY&&(n=n.concat(t.optionsY)),n.forEach((e=>{e.text=(0,r.l)(e.text)}))}(e),e)))}function c(e){return e.forEach((e=>{e.value=(0,r.l)(e.value)})),e}},7433:(e,t,n)=>{"use strict";n.d(t,{__:()=>$,Nf:()=>z,rU:()=>K,n0:()=>q,FK:()=>D,EM:()=>F,ve:()=>B,Yz:()=>X,eM:()=>H,JP:()=>G,gB:()=>A,Tb:()=>W,Bm:()=>j}),n(5069),n(3948);var r=n(3251),i=n(6539),o=n(9564),a=n(9026),s=n(7529),u=n(7679),c=n(8670),l=n(8351),d=n(7518),f=n(6492),p=n(4248),h=n(7550),m=n(7952),g=n(5817),v=n(5159),y=(n(5306),n(3210),n(3803)),w=n(5142),_=n(5015),b=n(6935),x=n(5838),T=n(5497);const k={},S={};async function I(e,t,n){const{actions:r}=t.origin;if(r&&!(0,y.q)()&&!(0,p.vW)().realTimePreview){if("forward_enter"===e){if(k[t.renderId])return;k[t.renderId]=!0}if("backward_leave"===e&&delete k[t.renderId],"forward_leave"===e){if(S[t.renderId])return;S[t.renderId]=!0}"backward_leave"===e&&delete S[t.renderId];for(const i of r){if(i.disabled||i.event!==e)continue;const{activeConfig:r}=i;if(!r||await(0,x.Q3)(n,r))if("http_request"===i.type)(0,T.l)(i),await(0,_.zp)(n,i.request,null,!0);else{const r={state:n},o={question_id:t.nodeUuid,response_id:n.transactionID,locale:n.language,event:e,type:i.type};if("email"===i.type){const{email:e}=i,t={...o,email:(await(0,b.e_)(e.address,r)).replace(/\s/g,""),content:await(0,b.Ur)(e.content,r),title:(await(0,b.e_)(e.title,r)).trim()};await(0,w.FB)(t)}else{const{sms:e}=i,t={};for(const n of e.params)t[n.name]=(await(0,b.e_)(n.value,r)).trim();const n={...o,url:(await(0,b.e_)(e.url,r)).replace(/\s/g,""),content:t};await(0,w.FB)(n)}}}}}var O=n(6866),E=n(6060),C=n(4588),P=n(3768);var L=n(3656),N=n(8343);let R;function A(){return!!R}const U=["end","gift","lottery"];function M(e){let{prev:t}=e;const n=[];let r=t&&(0,o.$X)(t);for(;r;)n.push({node:t,reason:r}),t=t.prev,r=t&&(0,o.$X)(t);return{prev:t,skipList:n,current:e}}function B(e){if((0,p.vW)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,r=(0,C.zY)(e),{prev:i}=M(r),o=r.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.vW)().preview&&"end"===o?(0,h.Iu)(v.bn.global.backTest):t&&i&&(r.checkMode===i.checkMode||(0,p.vW)().preview)&&U.indexOf(o)<0?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,h.Iu)(v.bn.global.previous):e.prevBtnText:""}async function D(e){const{formalResult:t}=e,n=e.current;if((0,L.is)(n,"end"===n.type)){const r=n.endBtnText||(0,h.Iu)(v.bn.global.go);if(n.linkUrl)return r;if(t&&t.reward||(0,p.vW)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":r;{const{target:t}=await m.P.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?r:""}}if((0,L.is)(n,"lottery"===n.type)){const e=(0,h.Iu)(v.bn.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,h.Iu)(v.bn.global.next):e.nextBtnText}function F(e,t){const n=[];let r=1;const i=e[t];let a=e[t+r],s=a&&(0,o.$X)(a);for(;a&&s;)n.push({node:a,reason:s}),r+=1,a=e[t+r],s=a&&(0,o.$X)(a);return{next:a,skipList:n,current:i}}async function j(e){const t=await(0,u.Dn)(e.nodes,!0,(0,C.Fr)(e));if(t.valid){if((0,C.Fr)(e)){(0,p.Pg)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await I("forward_leave",t,e)}else await I("forward_leave",e.current,e);return await(0,s.BW)(e,e.current,{type:"page_next",delay:200}),!0}return function(e,t){const{valid:n,message:i,dueToNode:o,dueToOption:a}=t,s={valid:n,message:i};if(a&&(s.optId=a.uuid,s.optText=a.text,a.label&&(s.message=a.label+":"+s.message)),o&&(s.nodeId=o.nodeUuid,s.nodeName=o.nodeName,s.nodeType=o.type,s.message=o.nodeName+":"+s.message),r.s$.trigger("NEXT_FAIL",s),"vital"===t.type)throw(0,p.vW)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.vW)().alert(t.message):(e.inSingleGroup||(0,p.vW)().notify(t.message),(0,u.Jh)(t,e))}(e,t),!1}function W(e,t){(0,p.Pg)(e,{nextLoading:t})}function q(e){W(e,!0),R={state:e}}async function z(e){W(e,!1),R&&(await H(R.state),R=void 0)}function V(e,t,n){(0,r.cs)({origin:t,parent:e},!0);const a={...(0,i.ZI)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.vW)().preview)(0,c.sO)(n,t,e.theme,(0,o.Jz)(e.nodeList)),(0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink((0,p.dU)().app.getRewardUrl(a)),(0,p.vW)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:r}}}=e;(0,p.dU)().auth.authorizeGift(n,r,t,"end"),(0,p.vW)().customAbort()}}function G(e,t){t.linkUrl?((0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink(t.linkUrl),(0,p.vW)().customAbort()):V(e,(0,o.nv)(e.nodeList,t.rewardRaw.gift_id),t.rewardRaw)}async function H(e){const t=function(e){const{renderList:t}=e,n=e.nodes[e.nodes.length-1];return F(t,(0,s.S5)(t,n))}(e),{current:n,next:u}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,i.Xs)(n);const u=(0,o.CE)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!u)return;const d=(0,c.Ok)(e,u);if((0,L.is)(u,"lottery"===u.type)){const t=await(0,l.MJ)(u,d,e);(0,a.FA)(t,e,!(!d||!d.id)),(0,p.Pg)(e,{current:t}),(0,r.cs)(t,!0)}else V(e,u,d);await(0,E.b)(e)}(e,n):(await(0,p.dU)().hook.beforeGotoNext(),(await(0,d.C)(e,{valid:!0,message:""},n,u)).valid?(function(e){if((0,p.vW)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,r=t[t.length-1];let i=r,a=[i];for((0,C.YB)(r.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===r.origin.groupId)),i=a[0]);i.prev&&(0,o.$X)(i.prev)&&!(0,C.YB)(i.prev.nodeUuid,e.nodeGroups);)a.unshift(i.prev),i=i.prev;return a}(e).map((e=>(0,P.py)(e))).filter((e=>!!e));(0,p.dU)().network.pushSocket("update",{answers:t}),clearTimeout(void 0)}(e),async function(e,t){const{next:n,current:i}=t;(0,p.Pg)(e,{current:n}),n.reached=!0,(0,a.UW)(i,n),(0,r.cs)(n,!0),(0,g.bR)(e),await(0,O.sB)(e),await(0,E.b)(e),W(e,!1),(0,o.qK)(i),(0,s.$V)(e,e.current),r.s$.trigger("NEXT_OK")}(e,t)):W(e,!1))}async function X(e){const t=(0,C.zY)(e),{prev:n,skipList:i}=M(t);if(n){if((0,C.YB)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_leave",n,e)}else await I("backward_leave",t,e);for(const t of i)await I("backward_enter",t.node,e),await I("backward_leave",t.node,e);if((0,p.Pg)(e,{current:n}),await(0,N.v)(e),(0,r.cs)(n,!0),(0,g.bR)(e),await(0,O.sB)(e),await(0,E.b)(e),(0,a.WJ)(t,n),(0,s.$V)(e,e.current),r.s$.trigger("PREV_OK"),(0,C.YB)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_enter",n,e)}else await I("backward_enter",n,e)}}async function K(e,t){const{nodeList:n,current:r}=e,i=await(0,f.Pf)(n,r,e),{target:o}=i;return o?$(e,i,t):null}async function $(e,t,n){const r=(0,l.qG)(t,e);if(n&&n(r))return null;const i=await(0,l.D1)(r,e.current);(0,p.Pg)(e,{current:i}),await I("forward_enter",i,e);const s=(0,o.$X)(i);return s&&((0,a.do)(e,i,s),await I("forward_leave",i,e)),i}},5817:(e,t,n)=>{"use strict";n.d(t,{bR:()=>p,xC:()=>f}),n(3948);var r=n(9564),i=n(1128),o=n(7529),a=n(4248);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function u(e){return e&&"end"!==e.type}function c(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=c(e=(0,r.nv)(t,n),t)),e}function l(e,t){let n;t=c(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,i.NV)(t);if(o&&(n=(0,r.CE)(e,a,o.uuid)),!u(n))if(s)n=(0,r.CE)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,r.CE)(e,a,t.uuid),u(n))break;return n}function d(e){return!s.includes(e.type)&&!e.autoSkip}function f(e){const t=function(e){const t=e.renderList.filter((e=>d(e.origin)));return(0,o.S5)(t,e.current)}(e),n=function(e,t){const{nodeList:n,current:r}=t;let i=e,o=l(n,r.origin);for(;o;)d(o)&&(i+=1),o=l(n,o);return"end"!==r.type&&(i+=1),i}(t,e);return-1===t?{index:-1,fullLength:n,percent:0}:{percent:Math.round(t/n*100),fullLength:n,index:t}}function p(e){if((0,a.dU)().dev.infer)return;const{percent:t,index:n}=f(e);n>-1&&(0,a.Pg)(e,{progress:t})}},7529:(e,t,n)=>{"use strict";n.d(t,{$V:()=>y,BW:()=>v,JL:()=>h,S5:()=>m,Sl:()=>w}),n(3948);var r=n(7433),i=n(9564),o=n(2629),a=n(3656),s=n(4248),u=n(9309),c=n(5817),l=n(3251),d=n(6060),f=n(4588);let p=-1;function h(e,t){return t=t.toLowerCase(),e.find((e=>e.renderId.toLowerCase()===t))}function m(e,t){for(let i=0;i<e.length;i++){if(n=e[i],r=t,(0,a.RC)(n.renderId,r.renderId))return i}var n,r;return-1}function g(e,t){(0,s.Pg)(e,{refreshing:t})}function v(e,t,n){if(g(e,!0),clearTimeout(p),n.initial&&(0,l.cs)(e.current,!0),n.delay){const r=(0,s.dU)().dev.autoRun||(0,s.dU)().dev.infer?0:n.delay;return new Promise(((i,o)=>{p=setTimeout((async()=>{try{await _(e,t,n)}catch(e){o(e)}i()}),r)}))}return _(e,t,n)}function y(e,t){const{circleNode1Id:n}=t.origin;n?(0,s.Pg)(e,{loopStack:(0,a.p$)(t.loopStack)}):(0,s.Pg)(e,{loopStack:[]});const r=e.randomList,i=t.random;r.forEach((e=>{i?(0,a.RC)(e.node.nodeUuid,i.node.nodeUuid)?e.currentIndex=i.currentIndex:i.stack.some((t=>(0,a.RC)(e.node.nodeUuid,t.node.nodeUuid)))||(e.currentIndex=-1):e.currentIndex=-1}))}function w(e,t){const n=function(e,t){let n=e;if(!t)return n;for(const e of t)n+="-"+(0,a.pC)(e.option_id);return n}(t.node_id,t.loop_ctxs);return h(e.renderList,n)}async function _(e,t,n){g(e,!0);const a=e.renderList;y(e,t=t||e.current);const l=m(a,t),p=await async function(e,t,n){const a=n.type;let u=[...e.renderList];u=u.length>0?u:[t];const c=m(u,t);if(c<0)return u;u.length=c,u.push(t),(0,s.Pg)(e,{renderList:u}),(0,f.Fr)(e)&&await(0,o.lq)(t);let l=null;const d=t=>!(0,f.dO)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,r.rU)(e,p);if(!t)break;if(u.push(t),f.le.includes(t.type))break;if(!(0,i.$X)(t)){if(l||(l=t,(0,f.YB)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.dO)(l,t,e.nodeGroups))break;await(0,o.lq)(t)}}return u}(e,t,n),h=n.initial?(0,r.EM)(p,l).next:t;(0,s.Pg)(e,{current:h}),g(e,!1),y(e,t),await(0,d.b)(e),n.initial||(await(0,r.Nf)(e),e.inSingleGroup&&(0,c.bR)(e)),(0,u.fS)()}},8670:(e,t,n)=>{"use strict";n.d(t,{G8:()=>O,Ok:()=>T,md:()=>I,sO:()=>k});var r=n(9564),i=n(3087),o=n(6539),a=n(3656),s=n(4248),u=n(7550),c=n(5521),l=n(5589),d=n(3251),f=n(9026),p=n(5159),h=n(5142),m=n(5810),g=n(3756),v=n(698),y=n(248),w=n(4125),_=n(9271),b=n(6970);let x=null;function T(e,t){if((0,s.vW)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(t,"gift"===t.type))return{...n,type:t.giftType,gift_id:t.nodeUuid};{const i=(0,a.DQ)(t.options,1)[0],o=(0,r.CE)(e.nodeList,t.destList,i.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:t.nodeUuid,lottery_option_id:i.uuid}}}return e.formalResult.reward}function k(e,t,n,r){const i="custom"===t.giftType;if((0,s.vW)().preview||i){r.useCustomLogo&&(t.useCustomLogo=r.useCustomLogo,t.logoImage=r.logoImage,t.logoText=r.logoText,r.i18n&&Object.keys(r.i18n).forEach((e=>{const n=r.i18n[e];t.i18n[e].logoText=n.logoText})));const i={};"custom"===t.giftType?i.custom={giftNode:t,theme:n,qrCode:e.code,rewardId:e.id}:i.redEnvelope={theme:n,recipient:(0,g.W)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.dU)().storage.set("cached_reward",JSON.stringify(i))}}function S(e){const t=(0,s.dU)().storage.get("cached_reward");if(!t)return;const n=JSON.parse(t);let r;const{custom:i,redEnvelope:o}=n;return i?r=i.rewardId:o&&(r=o.gift.id),r===e?n:void 0}function I(){x=null}async function O(){if(x)return x;const e=(0,o.ZI)(),{rt:t,rid:n,code:r,qid:a,tid:g,locale:T,reward_from_qr_code:k}=e;let I;(0,u.u4)(T);let O,C={};if("red_envelope"===t){let t;(0,s.vW)().preview?t=S(Number(n)).redEnvelope:!r&&k?t=E:(n&&!r&&((0,s.dU)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.vW)().customAbort()),t=function(e){var t;const n=e.gift.origin,r={...e,gift:{...null==e?void 0:e.gift,origin:{...null===(t=null==e?void 0:e.gift)||void 0===t?void 0:t.origin,i18n:{},logoText:""}}};if(!n)return r;const i=n.i18n;if(!i)return r;const o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e]={activityName:t.gift_name,blessings:t.gift_wishing,endBtnText:t.end_btn_text,logoText:t.logo_text}})),r.gift.origin.i18n=o,r}(await(0,h._7)({code:r},n)));const{gift:i,theme:o,isTemporaryForWXQrcode:c}=t;I=i.origin,C=t.recipient,(0,f.Bt)(I,{surveyId:a,userInfo:C,transactionID:g}),O={isTemporaryForWXQrcode:c,rewardValue:I.giftCount+" "+(0,u.Iu)(p.bn.reward.yuan),wechatID:C.nickname,wechatImage:C.headimgurl,theme:o}}else{const e=S(Number(n));if(!e)return(0,s.vW)().error((0,u.Iu)(p.bn.global.invalidReward)),null;const{custom:t}=e;I=t.giftNode,O={qrCode:t.qrCode,rewardToMessage:I.needSendNote,theme:t.theme}}(0,y.mj)(I,I.i18n[T]);const P=(0,w.s)(I),L={...O,images:I.image?[(0,_.q)(I.image)]:[],video:I.video,layout:I.layout,rewardId:n,eventHub:d.s$,nodeName:I.nodeName,type:I.type,rewardType:I.giftType,renderId:I.nodeUuid,rewardName:I.activityName,title:I.blessings,description:I.describe,summary:I.describe,rewardTime:(0,i.GN)(),...P,prevButton:(0,s.vW)().preview&&!(0,s.vW)().realTimePreview?(0,u.Iu)(p.bn.global.backTest):"",nextButton:I.linkUrl&&(I.endBtnText||(0,u.Iu)(p.bn.global.go)),handleEvents:{...m.k,async handlePrevClick(){(0,s.dU)().app.gotoStartPage((0,o.ZI)())},handleOptionClick:async(e,t)=>(await(0,c.W)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.U)(e,t)).result,async handleNextClick(){I.linkUrl&&(0,o.Xs)(I.linkUrl)},async handleGetRewardWX(){(0,s.dU)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.vW)().customAbort()}}};return L.template=await(0,b.b)(I.template,L),x=L,(0,v.z)(L.theme),await(0,s.dU)().hook.afterFetchReward(L),L}const E={isTemporaryForWXQrcode:!0,theme:{primary:"#202020",secondary:"#FFFFFF",contrast:"#CC2227",background:"#FCFCFC",error:"#CC2227",button:"#202020",fontSize:"1.5rem",fontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",btnFontSize:"1.25rem",btnFontWeight:"normal",name:"minimal",fontFamily:"roboto",titleFontSize:"1.5rem",titleFontWeight:"bold",boxWidth:"50vmin",bgOpacity:100,bgLayout:"cover",bgSize:"cover",effect:"normal",bgImageUrl:"",bgImageId:"",bgImageHeight:0,bgImageWidth:0},recipient:{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:"test微信名称示例"},gift:{id:-1,title:"test",description:"test",config:{gift_name:""},origin:{sortNo:10003,x:808,y:219,nodeName:"GIFT",type:"gift",used:!0,nodeUuid:"dc28e571-38a3-4af3-9829-22aaa62e83f0",input:{uuid:"bb75d086-9203-4cd1-a757-aa22fdde3a71"},label:"GIFT",questionText:"test",layout:{fontSize:"1.5rem",fontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",descFontIsolate:!1,fontIsolate:!1,iconFontSize:"48px",optFontIsolate:!1},template:{name:"basic",params:[],id:"standards_gift_basic"},giftCount:1,giftType:"red_envelope",activityName:"test",blessings:"test",needSendNote:!0,needVerification:!0,fromNodeIds:"319c139d-043f-4949-8721-b2376d52cea7",fromOptIds:"",i18n:{zh_cn:{activityName:"test",blessings:"test",endBtnText:""}}}},amount:1,type:"red_envelope"}},1881:(e,t,n)=>{"use strict";n.d(t,{$4:()=>h,GK:()=>m,Xs:()=>p,u:()=>g}),n(5306),n(3210),n(3948);var r=n(6935),i=n(6539),o=n(3251),a=n(3892),s=n(5142),u=n(949),c=n(6064),l=n(1772),d=n(4248);function f(e,t){const n=(0,c.KF)(e.result);return e&&(0,a.PX)(n)?(setTimeout((()=>{(0,i.Xs)(n)})),{type:"LINK",done:!0}):{type:t,done:!0}}async function p(e,t){let n="";const{parsedPayload:{surveyMeta:{collector:i}}}=e;if(!i)return;const{sampler_config:o}=i;o&&(n=o[t]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),u={};for(const t of s){const[n,i]=t.split("=");u[n]=await(0,r.Oy)(i,e)}return u}async function h(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.s$.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const c=a.trim(),p=c.startsWith("{{")&&c.endsWith("}}"),h=await(0,r.Oy)(c,t,!p);return h.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:h.trim().startsWith("http")?async function(e,t){return(0,i.Xs)(t),o.s$.trigger("SAMPLER_TRANSFER",{method:"LINK",url:t,type:e}),{type:"LINK",done:!0}}(e,h):async function(e,t,n){const r=n.indexOf(":"),a=n.substring(0,r).toUpperCase(),c=n.substring(r+1),p=c.indexOf("?"),h=-1===p?c:c.substring(0,p);let m={};if(-1!==p){const e=-1===p?"":c.substring(p);e&&(m=e?(0,i.Y8)(e):{})}let g={type:a,done:!1};if("FAKE"===a)g=f(await(0,u.T)({url:h,data:(0,l.fq)(m,e),silent:!1,responseId:null==e?void 0:e.transactionID}),a);else if("GET"===a||"POST"===a){const e="GET"===a?"GET":"POST";try{g=f(await(0,s.o1)(h,{type:e,data:m}),a)}catch(e){(0,d.vW)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.s$.trigger("SAMPLER_TRANSFER",{url:h,data:m,method:a,type:t}),g}(t,e,h)}function m(e){return"LINK"===e.type&&e.done}async function g(e){var t,n;const{context:i}=e,o=i.node,a=null!==(n=null===(t=null==o?void 0:o.backendRequest)||void 0===t?void 0:t.params)&&void 0!==n?n:[],s={};for(const t of a){const{name:n,value:i}=t;s[n]=await(0,r.e_)(i,{state:e,joinBy:","})}return 0===a.length?void 0:s}},4588:(e,t,n)=>{"use strict";n.d(t,{Fr:()=>u,VE:()=>s,YB:()=>o,dO:()=>l,le:()=>c,zY:()=>a});var r=n(9564),i=n(4248);function o(e,t){return t.some((t=>t.singlePage&&t.nodes.includes(e)))}function a(e){return s(e)[0]||e.current}function s(e){const{current:t,renderList:n}=e,a=[t],s=n.indexOf(t);let u=s-1,c=t;for(;;){const t=n[u--];if(!l(t,c,e.nodeGroups))break;(0,r.$X)(t)||(a.unshift(t),c=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,r.$X)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,i.Pg)(e,{pageEnd:!1,pageStart:!1})})),(0,i.Pg)(a[0],{pageStart:!0}),(0,i.Pg)(a[a.length-1],{pageEnd:!0})),a}function u(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const c=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!c.includes(e.type)&&!c.includes(t.type)&&o(e.nodeUuid,n)&&o(t.nodeUuid,n)&&function(e,t){return!(!e.origin.groupId||!t.origin.groupId||t.origin.groupId!==e.origin.groupId)&&(!t.loop&&!e.loop||!(t.loop&&!e.loop||!t.loop&&e.loop||t.loop.destInputId!==e.loop.destInputId||t.loop.node.groupId!==t.origin.groupId&&t.loop.currentIndex!==e.loop.currentIndex))}(e,t)}},7518:(e,t,n)=>{"use strict";n.d(t,{C:()=>k,Y:()=>T});var r=n(3251),i=n(5142),o=n(3768),a=n(9026),s=n(5015),u=n(7433),c=n(8351),l=n(1881),d=n(6866),f=n(4248),p=n(7550),h=n(5159),m=n(6064),g=n(6060),v=n(565);const y={valid:!0,message:""},w={valid:!1,message:""};let _=!1,b=!1,x=!1;function T(){_=!1,b=!1,x=!1}function k(e,t,n,r){const i=[];let o=r.prev;for(;o!==n;)i.push({prev:o,next:r}),o=(r=o).prev;return i.push({prev:o,next:r}),S(e,t,i)}async function S(e,t,n){const T=n.pop(),k=await async function(e,t,n,T){const k=n.checkMode,S=T.checkMode,P=T.type;if("end"===P&&(clearInterval(e.timer),(0,f.Pg)(e,{limitTime:void 0})),(0,f.vW)().preview)return t;if(k){if("end"===P)return async function(e,t,n){if(x)return w;(0,f.dU)().network.closeSocket(),x=!0;const c=I(e,n);(0,u.Tb)(e,!0),(0,v.y)(e,"all"),await(0,f.dU)().hook.beforeEndSurvey(e);try{const t=await(0,o.gS)(e,"all","examine_skipped_url"),n=await(0,i.Hw)(t,e.transactionID);e.responseStatus=n.status,await(0,f.dU)().hook.onEndSurvey(e)}catch(t){const n=(0,m.KF)(t&&t.message)||"";return(0,f.vW)().uploadLog("skip提交失败 "+n,"warning"),(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain)),x=!1,(0,u.Tb)(e,!1),w}r.s$.trigger("CHECK_FAIL"),(0,f.dU)().network.closeSocket();try{await(0,d.VY)(e),c||(0,a.YU)(t,n,e),await(0,s.nR)(e,n),(0,u.Tb)(e,!1),O(e);const r=await(0,l.$4)("examine_skipped_url",e);if((0,l.GK)(r))return w}catch(e){(0,f.vW)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return y}(e,n,T);if(!S)return async function(e){if(b)return w;b=!0,(0,u.Tb)(e,!0);const t=await(0,o.gS)(e,"check","examine_failed_url"),n=t.answers.length;(0,v.y)(e,"check");try{const o=await(0,i.Im)(t,e.transactionID);return(0,a.lt)(e,n),(0,u.Tb)(e,!1),e.responseStatus=o.status,r.s$.trigger("CHECK_SUBMIT"),y}catch(t){await(0,f.dU)().hook.onEndSurvey(e),await(0,d.VY)(e);const r=(0,i.rR)(t);return C(r)?await E(e,n,"examine_failed_url",r):(b=!1,(0,f.vW)().uploadLog("examine提交失败"+t&&t.message,"warning"),(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain))),(0,u.Tb)(e,!1),w}}(e)}return"end"===P?async function(e,t){if(_)return w;(0,f.dU)().network.closeSocket(),_=!0;const n=I(e,t)||function(e,t){const{renderList:n,startTime:r}=e,i=function(e,t){const n=(0,p.Iu)(h.bn.global.notTarget),{minTime:r,timeLessText:i}=e;return r&&r>t?i||n:""}(e,Math.ceil((Date.now()-r)/1e3));if(i){e.fakeCommitted=!0;const r=n[n.length-1];return(0,f.Pg)(r,{hasReward:!1,title:i}),(0,a.Om)(t,e),!0}return!1}(e,t);(0,u.Tb)(e,!0),(0,v.y)(e,"normal");const b=await(0,o.gS)(e,"normal","committed_url");let x,T;await(0,f.dU)().hook.beforeEndSurvey(e);try{x=await(0,i.SK)(b,e.transactionID);const t=x.response||x;e.responseStatus=t.status,await(0,f.dU)().hook.onEndSurvey(e)}catch(t){const n=(0,i.rR)(t);if(C(n))await E(e,b.answers.length,"examine_failed_on_commit_url",n);else if(n===i.f9.response_overflow){O(e);const t=await(0,l.$4)("overflow_url",e);(0,l.GK)(t)||e.ignoreSubmittingResult||(0,f.vW)().error((0,i.W1)(n)),e.responseStatus="committed",r.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}else{const n=(0,m.KF)(t&&t.message)||"";(0,f.vW)().uploadLog("正式提交失败 "+n,"warning"),e.ignoreSubmittingResult||(0,f.vW)().notify((0,p.Iu)(h.bn.global.tryAgain)),(0,u.Tb)(e,!1),_=!1}if(!e.ignoreSubmittingResult)return w;await(0,f.dU)().hook.onEndSurvey(e),x={}}e.formalResult=x;try{await(0,s.nR)(e,t),n?T=await(0,l.$4)("invalid_url",e):((0,a.Kv)(t,e,b.answers.length,x),x.reward&&(0,f.Pg)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.dU)().app.canHandleReward())return(0,c.ks)(t,e)}(t,e),T=await(0,l.$4)("committed_url",e))}catch(e){(0,f.vW)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.VY)(e),(0,u.Tb)(e,!1),O(e),r.s$.trigger("FULL_SUBMIT"),await(0,g.b)(e),(0,l.GK)(T)?w:y}(e,T):t}(e,t,T.prev,T.next);return 0===n.length||"vital"===k.type?k:S(e,k,n)}function I(e,t){const{oneReplyPerTerminal:n,sid:r}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.eS)(t,e),n&&(0,f.dU)().storage.set(r,"1"),!0)}function O(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.dU)().storage.set(n,"1")}async function E(e,t,n,o){(0,a.hR)(e,t),O(e);const s=await(0,l.$4)(n,e);(0,l.GK)(s)||(0,f.vW)().error((0,i.W1)(o)),e.responseStatus="examine_failed",r.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}function C(e){return e===i.f9.quota_not_match||e===i.f9.quota_full}},9309:(e,t,n)=>{"use strict";n.d(t,{Wc:()=>V,BN:()=>Z,$A:()=>K,fS:()=>W});var r=n(9564),i=n(6492),o=n(7433),a=n(3087),s=n(5753),u=n(5521),c=n(5589),l=n(152),d=n(8231),f=n(8351),p=n(9026),h=n(2629),m=n(7529),g=n(5142),v=n(6207),y=n(7518),w=(n(3768),n(3151)),_=n(3251),b=n(6866),x=n(3803),T=n(4248),k=n(7550),S=n(248),I=(n(1128),n(5810)),O=n(3656),E=n(5817),C=n(5159),P=n(2167),L=n(4625),N=n(6539),R=n(7428),A=(n(5069),n(3948),n(6060)),U=n(4588);var M=n(565);const B={};var D=n(8343),F=n(5286),j=n(5905);const W=(0,O.Ds)((()=>{(0,T.vW)().realTimePreview||H()||_.s$.trigger("STRETCH_OK")}));function q(e){return!H()&&!(0,M.a)(e,!0)}function z(e){(0,x.q)()||(e.answerChangedSinceStart=!0)}function V(e){e.handleEvents={...I.k,handleQuickAnswer:t=>(z(e),(0,L.M)(t)),async handleLangChange(e){await(0,k.nE)(e.locale,!0)},async handleCascadeInput(e,t,n,r){if(!q(r))return null;const i=(0,w.OJ)(e,t,n,r);return this.handleOptionInput(e,i,r).then((e=>e))},handleOptionAssistInput:(t,n,r,i)=>((0,T.Pg)(r.assistValue,{[n]:t}),z(e),X({result:!0},i)),handleCascadeClick:async(e,t,n)=>q(n)?X(await(0,w.Xl)(e,t,n),n).then((e=>e)):null,async handleMenuClick(e,t){const n=()=>t.options.filter((e=>e.selected)).map((e=>e.text));return q(t)?(await this.handleOptionClick(t.options[e],t),n()):n()},async handleOptionClick(t,n){if(!q(n))return null;const r=await(0,u.W)(t,n);return r.result&&(0,p.cH)(t,n),z(e),X(r,n).then((e=>e))},async handleOptionInput(t,n,r){if(!q(r))return null;const i=await(0,s.wS)(t,n,r);return i.result&&(0,p.nF)(t,n,r),z(e),X(i,r).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.LM)(e,t,n),(0,p.EG)(e,t,n)),async handleSequenceInput(t,n,r,i){if(!q(r))return null;const o=i.sortNo,a=await(0,d.O)(t,n,r),s=i.sortNo;if(a.result&&o!==s){const e=r.options.findIndex((e=>e===i));(0,p.OP)(e,r)}return z(e),X(a,r).then((e=>e))},async handleQuestionInput(t,n){if(!q(n))return null;const r=await(0,c.U)(t,n);return r.result&&(0,p.hy)(t,n),z(e),X(r,n).then((e=>e))},handleLocateFailed(t){const n=(0,c.k)(t);return n.result&&(0,p.TY)(t),z(e),X(n,t).then((e=>e))},async handlePrevClick(){if(!(0,T.vW)().realTimePreview&&!G()&&e.prevButton&&!H())return(0,p.g9)(e.current),(0,o.Yz)(e).then((e=>e))},handleMaxDiffInput(t,n,r,i){if(!q(i))return null;const o=(0,l.o)(t,n,r);return z(e),X(o,i).then((e=>e))},async handleNextClick(){if((0,T.vW)().realTimePreview||H()||G()&&(0,o.gB)())return;(0,o.Tb)(e,!0),await(0,D.v)(e);const{current:t}=e;if((0,p.xi)(t),"lottery"===t.type)(0,o.JP)(e,t),(0,o.Tb)(e,!1);else if(await async function(e){const t=e.filter((e=>!!e.origin.backtracking));let n=!1;for(const e of t){const{origin:{backtracking:t},parent:r}=e;if(t.targetNodeUuid){const{logic:i,request:o}=t;let a=await(0,h.Gl)(o,e);if(a.valid&&(a=await(0,h.Rv)(i,r)),n=a.valid,n)return(0,T.Pg)(r,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,O._v)(200);const t=e.current,{backtracking:{targetNodeUuid:n}}=t.origin,i=await async function(e,t){const n=[...e.renderList].reverse(),i=n.findIndex((e=>(0,O.RC)(e.nodeUuid,t)));for(let e=i;e>=0;e--){const t=n[e];if(!(0,r.$X)(t))return t}return n[i]}(e,n);return await async function(e,t){const{renderList:n}=e,r=n.findIndex((e=>e.renderId===t.renderId)),i=n.slice(r).map((({renderId:e})=>e));await(0,b.nX)(e,i),(0,T.Pg)(e,{current:t});const a=(0,U.VE)(e),s=a.indexOf(t),u=a.slice(s),c=[];let l=t.prev;for(const t of u){const{origin:n,loop:r,random:i,loopStack:o}=t,a=(0,f.qG)({target:n,loop:r,random:i,loopStack:o},e),s=await(0,f.D1)(a,l);l=s,c.push(s)}await(0,T.dU)().hook.beforeGotoNext(),(0,T.Pg)(e,{current:c[0],nodes:a.slice(0,s).concat(c),renderList:n.slice(0,r).concat(c)}),(0,o.Tb)(e,!1),_.s$.trigger("NEXT_OK"),(0,_.cs)(e.current,!0)}(e,i),(0,E.bR)(e),await(0,b.sB)(e),await(0,A.b)(e),i}(e),(0,o.Tb)(e,!1);else if(await(0,o.Bm)(e)){if(!G())return(0,o.eM)(e);(0,o.n0)(e)}else(0,o.Tb)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,m.$V)(e,e.current);const r=await n.apply(e.handleEvents,t);return(0,m.$V)(e,e.current),r}}))}function G(){return(0,T.vW)().surveyState.refreshing}function H(){return(0,T.vW)().surveyState.nextLoading||G()}async function X(e,t){(0,j.LK)(t)&&await(0,F.y)(t),(0,_.cs)(t),await(0,b.p9)(t);const n=t.parent;return(0,T.vW)().realTimePreview||(n.inSingleGroup?((0,T.Pg)(n,{current:t}),await(0,m.BW)(n,t,{type:"page_inner",delay:60})):W()),(0,_.yp)(t),e.result}function K(e,t={}){return e=e||(0,T.vW)().surveyState,(0,T.Pg)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),$(e)}async function $(e){(0,o.Tb)(e,!0);const t=e.nodeList,n=(0,r.Jz)(t),a=await(0,i.tP)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,T.Pg)(e,{nextBtnText:t.nextBtnText||(0,k.Iu)(C.bn.global.next),prevBtnText:t.prevBtnText||(0,k.Iu)(C.bn.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.__)(e,a,null);const{current:s}=e,u=(0,r.$X)(s),c=(0,U.Fr)(e);if(u||c){const t=c?"page_inner":"page_next";await(0,m.BW)(e,s,{type:t,initial:!0})}else(0,T.Pg)(e,{renderList:[s]}),await(0,A.b)(e),W();(0,E.bR)(e);const l=e.current;return l.reached=!0,(0,p.DM)(e,l),_.s$.trigger("START_OK"),await(0,b.O2)(e),s!==l&&await(0,y.C)(e,{valid:!0,message:""},s,l),(0,_.cs)(e.current,!0),(0,o.Tb)(e,!1),e}async function Z(){const e=(0,T.dU)();if((0,T.vW)().surveyState)return(0,T.vW)().surveyState;const t=await async function(){const e=(0,T.vW)().sid,t=(0,T.vW)().startState;if(!t)return(0,T.dU)().app.gotoStartPage((0,N.ZI)()),(0,T.vW)().customAbort(),null;if((0,T.vW)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:r,channel:i,interviewee:o}=n;!function(e,t){(0,T.dU)().dev.autoRun||(0,T.dU)().storage.get(e)&&t&&!(0,T.vW)().preview&&((0,T.vW)().error((0,k.Iu)(C.bn.global.antiAgain)),(0,T.vW)().customAbort())}(e,!1===n.collector.multiple_response);const a={code:e,payload_digest:r,platform:i.type,interviewee_id:o&&o.id,query_params:(0,N.ZI)()};try{const e=await(0,g.yU)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=r,t.channel=i,(0,T.dU)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,g.gU)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:r}=e;if(!(0,T.vW)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,g.vT)(e,{type:"GET"},!0)}catch(e){throw(0,T.vW)().error((0,k.Iu)(C.bn.global.downloadError)),e}const r=await(0,P.Z)(n);t.nodeList=(0,v.AK)(r.nodes,t.nodeGroups)}(0,S.iZ)(n.autoCpltGroups,r);const{nodeList:i,variables:o,nodeGroups:a}=t;if(n.currentLang!==r){const e=t.langs.find((e=>e.locale===r));if(e){const t=await async function(e,t){if(!B[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,g.vT)(e.url,{type:"GET"},!0);t=await(0,P.Z)(n)}return t};B[e.locale]=t()}return B[e.locale]}(e);(0,S.pe)({nodes:i,variables:o,groups:a},t)}}}(t);const n=function(e){const{parsedPayload:t,userInfo:n,theme:r,hasVar:i,sid:o,langTable:s,startNode:u,surveyId:c,summary:l,language:d,images:f,langResume:p,title:h,transactionID:m,status:g,platform:v,digest:y,channel:w,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:S,showLogoInEachPage:I,imageList:O,varStyles:E,variables:C,nodeGroups:P,embedApis:L}=e,{nodeList:N,surveyMeta:A,testCases:U}=t;let M=!1;(0,R.s)()||A.collector&&(M=!1===A.collector.multiple_response);const{fakedServers:B,autoCpltGroups:D,noWxShare:F,previewShadowNodes:j,previewQuickAnswer:W,ignoreSubmittingResult:q,qNumberRequired:z,asterisksRequired:G,progressBarRequired:H,nodeTypeInfoRequired:X,limitTime:K,minTime:$,timeoutText:Z,timeLessText:J,resumeEnabled:Y}=u,Q={embedApis:L,nodeGroups:P,variables:C,varStyles:E,imageList:O,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:S,showLogoInEachPage:I,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:j&&!(0,T.dU)().dev.autoRun,previewQuickAnswer:W,ignoreSubmittingResult:q,langResume:p,langTable:s,testCases:U,progress:0,resumeEnabled:Y||(0,R.s)(),images:f,eventHub:_.s$,language:d,sid:o,parsedPayload:t,digest:y,channel:w,transactionID:m,status:g,platform:v,fakedServers:B,autoCpltGroups:D,noWxShare:F,theme:r,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:h,summary:l,bonusLimitTime:"",nodeList:N,companyID:"",oneReplyPerTerminal:M,surveyId:c,qNumberRequired:z,asterisksRequired:G,progressBarRequired:H,nodeTypeInfoRequired:X,preview:(0,T.vW)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:K||void 0,minTime:$,timeoutText:Z||"",timeLessText:J||"",timer:-1,restTime:(0,a.IA)(K),hasVar:i,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:u,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1};return V(Q),Q}(t);return(0,T.vW)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.qG)({target:t},e),r=await(0,h.lq)(n,!0);r.valid?e.initValidationPassed=!0:((0,T.vW)().error(r.message||(0,k.Iu)(C.bn.verify.failed)),(0,T.vW)().customAbort())}(n),await async function(e){if(await $(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.r)(e),clearInterval(e.timer),(0,b.VY)(e),(0,T.vW)().error(e.timeoutText||(0,k.Iu)(C.bn.global.timeOver))),(0,T.Pg)(e,{restTime:(0,a.IA)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,T.vW)().preview){const t=await(0,x.m)(e);(0,T.Pg)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,T.dU)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5810:(e,t,n)=>{"use strict";n.d(t,{k:()=>f});var r=n(5159),i=n(3892),o=n(9026),a=n(5142),s=n(4248),u=n(7550),c=n(3656);const l={};function d(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.vW)().notify((0,u.Iu)(r.bn.verify.tooFrequent)),null):()=>{l[e]=Date.now()}}const f={handleInputPhone(e,t){return this.handleQuestionInput({phoneNumber:e},t)},handleInputCode(e,t){return this.handleQuestionInput({code:e},t)},handleAutoLocate(e,t){return this.handleQuestionInput(e,t)},handleManualLocate(e,t){return this.handleQuestionInput(e,t)},handleGetCodeClick:e=>async function(e){return(0,c.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:c,validateType:l}=e,{transactionID:f}=t;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.vW)().preview)return(0,s.vW)().notify((0,u.Iu)(r.bn.preview.noMessage)),!1;if(!c||!(0,i.xT)(c))return(0,s.vW)().notify((0,u.Iu)(r.bn.fill.needPhoneNumber)),!1;const n=d(e.renderId);if(!n)return!1;p={...p,phone_num:c},e.messageGetFailed=!1;try{const r=await(0,a.bp)(p);e.serverValidations=r,t.phoneNumber=c,t.phoneUsed=r.phone_num_used,t.phoneUsed&&(0,o.wH)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.bp)(p);e.serverValidations=t,(0,s.Pg)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.vW)().preview)return(0,s.vW)().notify((0,u.Iu)(r.bn.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,i.xT)(t))return(0,s.vW)().notify((0,u.Iu)(r.bn.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.O0)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},3389:(e,t,n)=>{"use strict";n.d(t,{Core:()=>G,EventHub:()=>c.s$,I18n:()=>H});var r=n(4248),i=(n(1817),n(3948),n(6935)),o=n(866),a=n(6207),s=n(9564),u=n(6451),c=n(3251),l=n(7550),d=n(9026),f=n(248),p=n(5159),h=n(698),m=n(2167),g=n(5142),v=n(6539),y=n(3608),w=n(7433),_=n(7428),b=n(5905),x=n(4125),T=n(6213),k=n(6970),S=n(9141);let I;function O(e){return(0,v.ZI)().offline_survey_id&&(0,s.Jz)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.f)(e.icon)}))})),e}function E(e){e.handleEvents={async handleLangChange(t){await(0,l.nE)(t.locale,!1)||(0,r.Pg)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,w.Tb)(e,!0),await(0,r.vW)().fetchSurveyState(),(0,r.dU)().app.gotoSurveyPage((0,v.ZI)()),(0,w.Tb)(e,!1))}}}async function C(){if((0,r.vW)().startState)return(0,r.vW)().startState;const e=await async function(){const e=await(0,r.dU)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,r.vW)().sid;return(0,d.Fv)(),I||(0,g.X)(e)}}();!function(e){if((0,r.vW)().preview)return void(I=e);if(I)return;I=e;const{collector:{channel_configs:t}}=e,n=(0,r.dU)().name,i=t.find((e=>e.type===n));if(i){if(!i.allow_response)throw(0,r.vW)().error((0,g.W1)(g.mi.interviewee_invalid_error)),new Error(g.mi.interviewee_invalid_error);I.channel=i,(0,r.dU)().auth.authorize(I)}else I.channel={type:n}}(e),await(0,r.dU)().auth.init(e);const t=await async function(e){const t=await(0,r.dU)().dev.getCustomSurveyPayload();if(t)return{cfpd:t,surveyMeta:e};{let t;try{t=await(e.start_auto?(0,g.vT)(e.diagram_url,{type:"GET"},!0):(0,g.vT)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,r.vW)().error((0,l.Iu)(p.bn.global.downloadError)),e}const n=await(0,m.Z)(t);return function(e){if(!e.version)return(0,r.vW)().error((0,l.Iu)(p.bn.global.upgrade)),void(0,r.vW)().customAbort();e.version<2&&e.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,b.RE)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(n),{surveyMeta:e,cfpd:O(n)}}}(e),n=await async function(e){var t;const{surveyMeta:n,cfpd:i}=e,{mediaLibrary:o,surveyId:u,disabledLangs:c,testCases:d,variables:p}=i,h=(0,a.AK)(i.nodes,i.nodeGroups),m=(0,s.Jz)(h);let g=[];i.langPack?(i.langPack=function(e){if(e instanceof Array)return e;{const t=[];return Object.keys(e).forEach((n=>{const r=e[n];t.push({id:"",locale:n,content:r})})),t}}(i.langPack),g=i.langPack.map((e=>({locale:e.locale,content:e.content})))):n.langs&&(g=n.langs),g=g.filter((e=>e.locale!==m.currentLang));const v=m.currentLang,y=[v,...g.map((e=>e.locale))],w=(null!==(t=null===S.Z||void 0===S.Z?void 0:S.Z.langTable)&&void 0!==t?t:[]).filter((e=>y.includes(e.locale)&&!(null==c?void 0:c.includes(e.locale)))),_=await(0,l.Vj)(w,v),b=!!(0,r.dU)().storage.get("lang-resume");b&&(0,r.dU)().storage.remove("lang-resume"),(0,l.$1)(_);const x={imageList:o.imageList,videoList:o.videoList,nodeList:h,theme:i.theme,nodeGroups:i.nodeGroups||[],variables:(0,a.Fy)(i.variables),surveyMeta:I,embedApis:i.embedApis||[],varStyles:i.varStyles,surveyId:u,langs:g,language:_,langTable:w,langResume:b,testCases:d,disabledLangs:c||[],publishedAt:n.published_at,presetRichStyles:i.presetRichStyles};return _===v||(m.i18n&&(0,f.eb)(m,m.i18n[_]),p.forEach((e=>{e.i18n&&(0,f.ub)(e,e.i18n[_])}))),x}(t),v=await async function(e){if((0,r.vW)().startState)return(0,r.vW)().startState;const{imageList:t,nodeList:n,theme:i,variables:o,varStyles:a,surveyId:d,langResume:f,nodeGroups:h}=e,m=(0,s.Jz)(n),{imgScale:g,imgTransType:v,imgTransTime:w,imgPosition:_,welcomeUrl:b,startAuto:k,noWxShare:S,startBtnText:O,hasVar:C,layout:P,showInitLangSelect:L}=m;(0,T.W)(e.presetRichStyles);const N={imageList:t,variables:o,varStyles:a};(0,y.B3)(N);const R=await(0,u.nn)({},{origin:m}),{interviewee:A}=I,U=A?A.raw_data:(0,r.dU)().auth.userInfo||{},M={...N,embedApis:e.embedApis,nodeGroups:h,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:f,langTable:e.langTable,eventHub:c.s$,language:e.language||"en_us",layout:P,startNode:m,sid:(0,r.vW)().sid,noWxShare:S,preview:(0,r.vW)().preview,images:R,surveyId:d,...(0,x.s)(m),nextButton:O||(0,l.Iu)(p.bn.global.start),theme:i.usingTheme,imgScale:g,imgPosition:_,imgTransType:v,imgTransTime:w,welcomeUrl:b,userInfo:U,hasVar:C,parsedPayload:e,startAuto:k||f,showInitLangSelect:(0,l.HP)(L,e.langTable)};return E(M),M}(n);return await async function(e){const t={state:e},{origin:n}=e,{startName:r,qsnrName:a,questionText:s,describe:u,template:l}=n;e.title=await(0,i.Ur)((0,o.l)(r||a),t),e.summary=await(0,i.Ur)(s,t),e.description=await(0,i.Ur)(u,t),e.template=await(0,k.b)(l,t.state),(0,h.z)(e.theme),(0,c.cs)({origin:n})}(v),await(0,r.dU)().hook.afterFetchStart(v),(v.startAuto||(0,r.dU)().dev.autoRun)&&(v.hidden=!0,(0,r.vW)().startState=v,await v.handleEvents.handleNextClick()),v}var P=n(9309),L=n(8670),N=(n(5306),n(6064));async function R(){return null}const A={name:"other",dev:{parseRealUrl:e=>e,getCustomSurveyPayload:R,getCustomSurveyMeta:R,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,v.FC)(e);return(0,v.Mw)("https:/live.choiceform.com/reward",t)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:R,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:R,afterFetchStart:R,afterFetchSurvey:R,afterSetup:R,beforeSetupEnd:R,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:R,onEndSurvey:R,onRestartSurvey:R,onResumeSurvey:R,onStartNewSurvey:R,beforeGotoNext:R},system:{device:{browser:{name:"",version:""},device:{type:"",vendor:"",model:""},engine:{name:"",version:""},os:{name:"",version:""}},getReferer:()=>"",getLang:()=>"en_us",functionConstructor:Function,translate(e,t){if(t){let n=t?(0,l.P_)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,N.KF)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:R,loadUiEntryTemplates:R,setPresetStyle(){}}};function U(e,t){Object.keys(t).forEach((n=>{const r=t[n];"object"==typeof r?e[n]?null!==r&&U(e[n],r):e[n]=r:void 0!==r&&(e[n]=r)}))}function M(e){return U(A,e),A}var B=n(7518);const D={key:"",dynamic:!1,treeUrl:"",templatePath:"",useWxSdk:!1,hostConfig:{LOGO_NAME:"cform",qStaticHost:"https://media.choiceform.com/q-static-assets",recordUrl:"https://tracking.choiceform.com/api/records",host:"https://osapi.choiceform.com",wsHost:"wss://osapi.choiceform.com",cdnHost:"https://media.choiceform.com/os-client-live",mediaHost:"https://media.choiceform.com",publicHost:"https://public.choiceform.com"},setTheme(){},locateError(){},langSrcMap:null,setLocale(){},customAbort(){},switchRoute(){},uploadLog(e){console.info(e)}};var F=n(6866),j=n(277),W=n(3768),q=n(7552),z=n(9911);function V(){if(!G.initialized)throw new Error("CCCore not yet initialized")}const G={releaseVersion:"3.6.57",releaseDate:"2024-2-6",cfpd:S.Z,eventHub:c.s$,notifySuspended:!1,theme:(0,h.V)(),util:{convertVarStyle:y.L7,getTaskInfo:j.M,getAnswer:W.py,addStartStateDynamics(e){E(e)},addSurveyStateDynamics(e){(0,P.Wc)(e)},addNodeDynamics(e){(0,s.qK)(e)},addOptionDynamics(e){(0,q.kN)(e)},extendImageListGetter(e){(0,y.MD)(e)},loadFakeServers:e=>(0,z.U)(e,!1)},registerEnv(e){const t=M(e);(0,r.JN)(t),G.env=t},async setup(e){if(G.initialized)return G;if(e.dynamic){if(!e.templatePath||!e.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!e.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(G,function(e){const t={...D.hostConfig,...e.hostConfig};return Object.assign(D,{...e,hostConfig:t}),D}(e));const t=(0,v.ZI)(),n=t.sid;if(!n&&!(0,r.dU)().dev.realtime)throw new Error("setup error, must provide sid");G.sid=n,G.realTimePreview=(0,r.dU)().dev.realtime;const i=t.type;G.preview=G.realTimePreview||G.sid.length>30||"edit_template"===i||"preview_template"===i,G.preview?G.needPreviewFlag="1"!==t.ban_preview_bar:G.offlineTaskId=t.offline_task_id;const o=G.setTheme;G.setTheme=e=>{o(e),G.themeUpdated=!0,c.s$.trigger("SET_PROPS")},(0,p.tV)(G.langSrcMap);const a=G.customAbort;G.customAbort=()=>{throw a&&a(),G.notifySuspended=!0,setTimeout((()=>{G.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=G.error;G.error=e=>{G.startState||G.rewardState||G.setTheme((0,h.V)()),s(e),G.crashed=!0};const u=G.notify;G.notify=e=>{G.notifySuspended||(G.startState||G.rewardState||G.setTheme((0,h.V)()),u(e))},(0,r.dU)().dev.debug&&(G.hostConfig.host="https://osapi.choiceform.com",G.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",G.hostConfig.mediaHost="https://media.choiceform.com"),t.offline_survey_id&&(G.hostConfig.cdnHost=(0,_.f)(G.hostConfig.cdnHost),G.hostConfig.mediaHost=(0,_.f)(G.hostConfig.mediaHost)),G.hostConfig.qApiHost=G.hostConfig.host+"/q/v1",await(0,r.dU)().hook.beforeSetupEnd(G),(0,r.IO)(G),G.initialized=!0,await(0,r.dU)().hook.afterSetup(G),await(0,r.dU)().hook.beforeSetupEnd(G);const d=await(0,l.Vj)(S.Z.langTable,"zh_cn");return(0,p.i_)(d),G},async fetchStartState(){V();const e=await C();return e&&(e.core=G,G.startState=e,(0,r.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchSurveyState(){V(),G.startState&&(0,w.Tb)(G.startState,!0);const e=await(0,P.BN)();return e&&(e.core=G,G.surveyState=e,(0,w.Tb)(G.startState,!1),(0,r.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchRewardState(){V();const e=await(0,L.G8)();return e&&(e.core=G,G.rewardState=e,(0,r.dU)().hook.onTitleChange(e.quesTitle),c.s$.trigger("SET_PROPS")),e},reset(){G.offlineTaskId="",G.initialized=!1,I=null,G.startState=null,G.surveyState=null,(0,L.md)(),G.rewardState=null,(0,v.zZ)(),(0,B.Y)(),(0,F.g1)()}},H={mergeLangSrcMap:p.tV,getLangSrcMap:p.zH}},2435:(e,t,n)=>{"use strict";n.d(t,{QP:()=>l,Rj:()=>c,UW:()=>f,bj:()=>s,hm:()=>u,jw:()=>p,t:()=>d,uZ:()=>a}),n(5306),n(3948);var r=n(6064),i=n(5838),o=n(6935);function a(e,t){return(0,r.O2)(t)||e.length<=t?[...e]:s(e.map((e=>({...e.option,cascade:e}))),t).map((e=>e.cascade))}function s(e,t){return(0,r.O2)(t)||e.length<=t?[...e]:d(e.map((e=>{const t=e.origin.inferList.reduce(((e,t)=>(t.active&&"select"===t.type&&(e+=t.weight),e)),0);return{option:e,weight:t}})),t).map((e=>e.option))}function u(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function c(e,t){return e.filter((e=>e.origin.inferList.some((e=>e.active&&e.type===t))))}async function l(e,t){if(!e)return;const n=t.parent;e.origin.inferList=e.origin.inferList||[];for(const t of e.origin.inferList){const{activeConfig:r}=t;r?(n.context.option=e,t.active=await(0,i.Q3)(n,r),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,r.O2)(t)||e.length<=t)return e;const n=e.reduce(((e,t)=>e+t.weight),0);let i=0,o=0,a=e.map((e=>{const t=e.weight/n;o=i+t;const r={item:e,floor:i,ceil:o};return i=o,r}));const s=[];for(;s.length<t;){const e=Math.random()*o,t=a.find((t=>t.floor<=e&&t.ceil>e));t&&(s.push(t.item),a=a.filter((e=>e!==t)))}return s}async function f(e,t){const{parent:n}=t,r=[];for(const t of e)r.push(await(0,o.e_)(t.candidates,{state:n,joinBy:","}));return r.join(",")}function p(e){const t={},n=[];return e.split(",").forEach((e=>{let r=e,i=1;const o=e.match(/\(([\d\.]+)\)$/);o&&(r=e.replace(/\([\d\.]+\)$/,""),i=parseFloat(o[1]));const a=t[r];if(a)a.weight+=i;else{const e={text:r,weight:i};n.push(e),t[r]=e}})),n.filter((e=>0!==e.weight))}},9896:(e,t,n)=>{"use strict";n.d(t,{B3:()=>g,Bc:()=>d,I$:()=>v,Sl:()=>_,W7:()=>f,a2:()=>m,yE:()=>p}),n(5306),n(3210);var r=n(1128),i=n(3656),o=n(3892),a=n(2435),s=n(5142);let u=null;async function c(e,t){let{start:n,end:r}=await(0,o._2)(e,t);return n===-1/0&&(n=-9999,n>r&&(n=r-9999)),r===1/0&&(r=9999,r<n&&(r=n+9999)),{start:n,end:r}}function l(e,t,n){return!!t&&t.some((t=>{if(t.startsWith("/")&&t.endsWith("/")){const n=t.substring(1,t.length-1),r=new RegExp(n);return!!e.match(r)}return n?n(e,t):e===t}))}async function d(e,t,n){let r=0,i=await e();for(;l(i,t,n);)if(i=await e(),r++,r>10)throw new Error("Hard to infer, rejected 10 times");return i}async function f(e,t,n=1){if(!e.origin.inferList)return{value:"",antis:null};const r=e.origin.inferList.filter((e=>e.active&&"input"===e.type));if(0===r.length)return{value:"",antis:null};const i=await(0,a.UW)(r,t);if(""===i.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(i.split(",").forEach((e=>{e.startsWith("!")?o.push(e.substring(1)):e.match(/\(0\)$/)&&o.push(e.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.jw)(i);return{value:(0,a.t)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+g(1e9,9999999999)}function h(e){return u[e]||Math.random().toString().replace("0.","")}async function m(){return u||(u=await(0,s.vT)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),u)}function g(e=0,t=10,n=0){const r=Math.pow(10,n);return e*=r,t*=r,((0,i.xT)(e,t)/r).toString()}function v(e,t=1,n=10){let r=h(e);for(;r.length<n;)r+=h(e);const o=r.length,a=(0,i.xT)(n,o),s=a-(0,i.xT)(t,n),u=r.substring(s,a);return""===u.trim()?v(e,t,n):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let r=(0,i.xT)(e,t).toString();return n>1&&(r=r+" "+(0,i.xT)(1,12)),n>2&&(r=r+" "+(0,i.xT)(1,28)),r}const w={};async function _(e,t){const n=w[e.origin.fillType]||w.none,r=await n(e,t);return"__FORCE_EMPTY__"===r?"":r}w.auto_complete=async(e,t)=>{let{completeGroups:n}=e;const{itemsMax:o,itemsMin:a}=await(0,r.y4)(e,t),s=(0,i.xT)(a,o)||1,{value:u,antis:c}=await f(e,t,s);return u||(c&&(n=n.filter((e=>!l(e.name,c)))),(0,i.DQ)(n,s).map((e=>e.name)).join(","))},w.chars=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{tolerance:i}=e.origin,{start:o,end:a}=await c(e,t);return d((()=>!i||0===i.length||i.includes("chinese")?v("chinese",o,a):i.includes("alphabet")?v("alphabet",o,a):v("number",o,a)),r)},w.date=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{grade:i}=e,{start:o,end:a}=await c(e,t);return d((()=>y(o,a,i)),r)},w.date_range=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const i=y(1960,2050,3),o=Number(i.split(" ")[0]);return d((()=>{const e=y(o,2060);return i+" - "+e}),r)},w.email=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>((0,i.BY)(1,6)+"@"+(0,i.BY)(1,6)+"."+(0,i.BY)(1,4)).toLowerCase()),r)},w.float=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{scale:i}=e;return d((async()=>{const{start:n,end:r}=await c(e,t);return g(n,r,i)}),r)},w.integer=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{start:i,end:o}=await c(e,t);return d((()=>g(i,o)),r)},w.list_select=async(e,t)=>{let{selectList:n}=e;const{itemsMax:o,itemsMin:a}=await(0,r.y4)(e,t),s=(0,i.xT)(a||1,o||1)||1,{value:u,antis:c}=await f(e,t,s);return u||(c&&(n=n.filter((e=>!l(e,c)))),(0,i.DQ)(n,s).join(","))},w.none=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>v("chinese",1,10)),r)},w.phone_number=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>p()),r)},w.postcode=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>g(1e5,999999)),r)},w.time=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>g(1,25)+":"+g(1,60)),r)},w.time_range=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>{const e=g(1,20);return e+":"+g(1,60)+" - "+g(Number(e)+1,24)+":"+g(1,60)}),r)},w.time_duration=async(e,t)=>{const{value:n,antis:r}=await f(e,t);if(n)return n;const{grade:i}=e;return await d((()=>{if(i<=3){let e=g(1,20)+"d";return i>1&&(e+=" "+g(1,24)+"h"),i>2&&(e+=" "+g(1,60)+"m"),e}{let e=g(1,60)+"h";return i>4&&(e+=g(1,60)+"m"),i>5&&(e+=g(1,60)),e}}),r)},w.url=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||await d((()=>("https://"+(0,i.BY)(1,3)+"."+(0,i.BY)(1,6)+"."+(0,i.BY)(1,3)).toLowerCase()),r)}},4625:(e,t,n)=>{"use strict";n.d(t,{W:()=>j,M:()=>F}),n(2707),n(3948);var r=n(9564),i=n(3656),o=n(1128),a=n(9896),s=n(6935),u=n(4248),c=n(9309),l=n(2435),d=n(6064),f=n(8064),p=n(5905);async function h(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.QP)(e,t),(0,u.Pg)(e,n)}async function m(e,t){(0,u.Pg)(e,{selected:!1}),e.option.origin&&await(0,l.QP)(e.option,t),e.list&&e.list.forEach((e=>m(e,t)))}async function g(e){(0,p.iN)(e)&&(0,u.Pg)(e.video,{ended:!0});let t=[];(0,p.Kf)(e)&&(t=[...t,...e.options]),(0,p.sy)(e)&&(t=[...t,...e.otherOptions]);for(const n of t)await h(n,e);const{cascade:n}=e;n&&await m(n,e)}var v=n(45);const y={doc:"os/client/o_1dn9kbm3u1f4d1tsudcg1fuh17678.txt",image:"os/client/o_1dn9kbq468tj1kq2dt3qeo1pumd.png",video:"os/client/o_1dn9kpohua8v1jv51oobq981dvv8.mp4",audio:"os/client/o_1dn9l7gbs1maj1e3nn941e6p125gj.mp3"},w={};function _(e){const{regions:t}=e,n=e.infoRange||"county",r=function(e){const t=O((0,o.eu)(e),1)[0];return!t||t.isOtherOpt?null:t.origin.inferList.some((e=>e.active))?t:null}(e);if(r){const e=r.text.split("-");return{address:e,indexes:(0,f.xR)(e,t),point:{lat:r.origin.latitude,lng:r.origin.longitude}}}{const e=(0,i.XJ)(t.length);let r=(0,d.KF)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,i.XJ)(o.cities.length),t=o.cities[e];if(a[1]=t.name,r=r+" "+e,"city"!==n){const e=(0,i.XJ)(t.areas.length),n=t.areas[e];n&&(a[2]=n.name,r=r+" "+e)}}return{address:a,indexes:r,point:{lng:0,lat:0}}}}async function b(e,t){const{value:n}=await(0,a.W7)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:r}=e,o=(0,i.DQ)(r,1)[0];return y[o]}async function x(e,t){const n=[],r=[];e.forEach((e=>{if((0,o.c1)(e.origin))n.push(e);else{let t=!0;(0,v.Cp)(e.origin)&&(0,d.O2)(e.origin.inferList)&&(t=Math.random()>.9),t&&r.push(e)}})),await E(r,t,1);const a=(0,i.xT)(1,n.length);S(n,t,a)}async function T(e,t){const{parent:n,origin:r}=t;let o=await(0,s.Ob)(r.fillMin,{state:n});o=o||0;let a=e.length;o&&r.inputInferLimit>o&&r.inputInferLimit<a&&(a=r.inputInferLimit);const u=o?(0,i.xT)(o,a):a;return(0,i.DQ)(e,u)}async function k(e,t){e.parent.context.option=t;const n=await(0,a.Sl)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function S(e,t,n){(0,i.DQ)(e,n).forEach((e=>k(t,e)))}async function I(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return k(e,t)}function O(e,t){const n=(0,l.Rj)(e,"select"),r=[],o=[];if(n.forEach((e=>{e.origin.inferList.every((e=>0===Number(e.weight)))||e.disabled?r.push(e):o.push(e)})),o.length>0)return(0,l.bj)(o,t);{let n=e.filter((e=>!e.disabled));return r.length>0&&(n=e.filter((e=>!r.includes(e)))),(0,i.DQ)(n,t)}}async function E(e,t,n){const r=O(e,n).sort(((e,t)=>(0,v.Cp)(e.origin)?1:(0,v.pL)(e.origin,t.origin)));for(const e of r)await I(t,e)}async function C(e,t){const{multiple:n,min:r,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.hm)(e);return n.length>0?(0,l.uZ)(n,t):(0,i.DQ)(e,t)}(a,n?(0,i.xT)(r||1,o||1):1);for(const n of s){const r=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(r,e,t),await C(n,t)}}async function P(e){const t=(0,o.eu)(e),n=e.origin;let a=1;if((0,r.qX)(n)){const t=await(0,r.gx)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:u}=n;u>o&&u<s&&(s=u),a=(0,i.xT)(o||1,s)}const s=[],u=[];t.forEach((e=>{(0,o.c1)(e.origin)?u.push(e):s.push(e)})),await E(s,e,a);const c=(0,i.xT)(1,u.length);S(u,e,c)}function L(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function N(e,t,n){const r=[];for(let i=e;i<t;i+=n)r.push(i);return r.push(t),r}async function R(e,t,n){const r=[...n].sort(),{value:o,antis:s}=await(0,a.W7)(e,t,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const e=r[0],t=r[r.length-1];return o<e?e:o>t?t:o}}{const e=()=>(0,i.DQ)(n,1)[0];return(0,a.Bc)(e,s)}}function A(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function U(e,t,n){const[r,o]=e.split("_");let a,s;if(r.includes("~")){const[e,t]=A(r);a=(0,i.xT)(e,t)}else a=Math.min(Math.max(Number(r),0),t);if(o.includes("~")){const[e,t]=A(o);s=(0,i.xT)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function M(e,t){const[n,r]=e.split("_").map((e=>Number(e))),[i,o]=t.split("_");let a=!1,s=!1;if(i.includes("~")){const[e,t]=A(i);a=e<=n&&n<=t}else a=Number(i)===n;if(o.includes("~")){const[e,t]=A(o);s=e<=r&&r<=t}else s=Number(o)===r;return a&&s}async function B(e,t){const{value:n,antis:r}=await(0,a.W7)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:U(n,s,o);{const e=()=>(0,i.XJ)(s)+"_"+(0,i.XJ)(o);return U(await(0,a.Bc)(e,r,M),s,o)}}function D(e,t){let n=t.filter((t=>!(-1!==t.sortNo||!t.origin.inferList)&&t.origin.inferList.some((t=>{if(!t.active)return!1;const n=(0,l.jw)(t.candidates),r=(0,l.t)(n,1);return r.length>0&&Number(r[0].text)<=e}))));0===n.length&&(n=t.filter((e=>-1===e.sortNo)));const r=(0,i.DQ)(n,1)[0];r&&(0,u.Pg)(r,{sortNo:e,selected:!0})}async function F(e){return await(0,a.a2)(),j(e)}async function j(e,t){const{type:n,readonly:r}=e;if(r)return(0,c.fS)();await g(e),t&&t.beforeInfer&&await t.beforeInfer(e);const i=w[n]||P;await i(e),t&&t.afterInfer&&await t.afterInfer(e)}w.select=P,w.value_mark=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r){const n=t.minValue||1,r=t.maxValue||5,i=t.step,o=await R(t,e,N(n,r,i).map((e=>(0,d.KF)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await x(n,e)},w.heat_map=async e=>{const{options:t,otherOptions:n}=e;for(const n of t){const t=await B(n,e);t&&await e.parent.handleEvents.handleQuestionInput(t,e)}await x(n,e)},w.icon_mark=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r){const n="rating-nps"===t.iconName,r=n?0:1,i=(n?t.iconCount-1:t.iconCount)||5,o=await R(t,e,L(r,i).map((e=>(0,d.KF)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await x(n,e)},w.slide_rate=async e=>{const{options:t,rateOptions:n,otherOptions:r}=e,i=await T(t,e),o=n.map((e=>e.value));for(const t of i){const n=await R(t,e,o);await e.parent.handleEvents.handleOptionInput(n,t,e)}await x(r,e)},w.weight=async e=>{let{weightTotal:t}=e;const{options:n,otherOptions:r}=e;t<=0&&(t=100);const o=[],a=[];n.forEach((e=>{const{inferList:t}=e.origin;t&&t.some((e=>e.active))?o.push(e):a.push(e)}));const s=[];for(const n of o){const r=n.origin.inferList.filter((e=>e.active)),i=await(0,l.UW)(r,e),o=(0,l.jw)(i),a=(0,l.t)(o,1),u=Number(a[0].text);s.push(u),t-=u}const u=(0,i.FL)(t,a.length),c=s.concat(u),d=o.concat(a);for(const[t,n]of d.entries()){const r=c[t];await e.parent.handleEvents.handleOptionInput(r.toString(),n,e)}await x(r,e)},w.fill=async e=>{const{options:t,otherOptions:n}=e,r=await T(t,e);for(const t of r)await k(e,t);await x(n,e)},w.sequence=async e=>{const{options:t,otherOptions:n}=e,r=t.length;let i=1;for(;i<=r;)D(i,t),i+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await x(n,e),(0,c.fS)()},w.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await C(t,e),x(n,e)},w.describe=async()=>{(0,c.fS)()},w.max_diff=async e=>{const t=function(e){const t=[],{options:n,itemCountPerTask:r,taskCount:i}=e,o=Math.ceil(i*r/n.length);return e.options.forEach((e=>{if(!e.origin.inferList)return;let n=e.origin.inferList.reduce(((e,t)=>(t.active&&(e+=t.candidates.split(",").map((e=>Number(e)||0)).reduce(((e,t)=>e+t),0)),e)),0);n>o?n=o:n<-o&&(n=-o),n&&t.push({needValue:n,option:e})})),t}(e),{tasks:n,parent:{handleEvents:r}}=e;for(const o of n){let n=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue>0;return n&&(t.needValue-=1),n})))),a=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue<0;return n&&(t.needValue+=1),n}))));if(!n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))));n=(0,i.DQ)(e,1)[0]}if(!a||a===n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))&&e!==n));a=(0,i.DQ)(e,1)[0]}await r.handleMaxDiffInput(1,n,o,e),await r.handleMaxDiffInput(-1,a,o,e)}},w.upload=async e=>{const{options:t,otherOptions:n}=e,{min:o,max:a}=await(0,r.Fy)(e,e.parent),s=(0,i.xT)(o||1,a),u=(0,i.DQ)(t,s);for(const t of u)await e.parent.handleEvents.handleOptionInput({filePath:await b(t,e)},t,e);await x(n,e)},w.region=e=>{const{indexes:t}=_(e);return e.parent.handleEvents.handleQuestionInput(t,e)},w.location=e=>{const{address:t,point:n}=_(e),r={address:{province:t[0],city:t[1],district:t[2],country:""},point:{lat:n.lat||Number((0,a.B3)(0,90)),lng:n.lng||Number((0,a.B3)(0,180))}};return e.parent.handleEvents.handleQuestionInput(r,e)},w.area=w.location,w.matrix=async e=>{const{options:t,flatten:n,otherOptions:o,origin:a}=e,{min:s,max:u}=await(0,r.gx)(e,e.parent);if((0,r.Ir)(a))await E(t,e,1);else if((0,r.Rx)(a)){let t=n;const r=n[0].list.length;n.length>r&&(t=(0,i.DQ)(n,r));const o=[];for(const n of t){const t=n.list.filter(((e,t)=>!o.includes(t)));if(0===t.length)break;await E(t,e,1);const r=n.list.findIndex((e=>e.selected));o.push(r)}}else if((0,r.Lk)(a)||(0,r.zR)(a))for(const t of n)await E(t.list,e,1);else if((0,r.mI)(a)||(0,r.lE)(a))for(const t of n){const n=(0,i.xT)(s||1,u);await E(t.list,e,n)}else if((0,r.Zu)(a)){const n=(0,i.xT)(s||1,u);await E(t,e,n)}await x(o,e)},w.end=async()=>{},w.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.yE)(),code:(0,a.I$)("number")},e)},9911:(e,t,n)=>{"use strict";n.d(t,{U:()=>c,x:()=>u}),n(5306),n(3948);var r=n(4248);const i=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,r.dU)().network.getFakeHost();if(!function(e){return o.some((t=>!!e.match(t)))}(e))throw new Error("can not load plugin files from untrusted site: "+e);n.currentSpace=e,await(0,r.dU)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",i.push(e)};a[e]=n()}return a[e]}async function u(e){const t=(0,r.dU)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function c(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,r.vW)().preview)return[];const t="FAKE:",{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=e;return n?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,r)=>{const i=n[r];if(i&&0===i.indexOf(t)){const n=i.substring(t.length,i.lastIndexOf("/"));-1===e.indexOf(n)&&e.push(n)}return e}),[]):[]}(e));if(n=n.filter((e=>!i.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},5497:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});const r={actions:[]};function i(e){r.actions.push(e)}},9026:(e,t,n)=>{"use strict";n.d(t,{Bt:()=>j,DM:()=>X,EG:()=>T,FA:()=>F,Fv:()=>H,Kv:()=>D,L$:()=>b,OP:()=>S,Om:()=>U,TY:()=>I,Ts:()=>K,UW:()=>L,WJ:()=>C,YU:()=>N,cH:()=>x,do:()=>z,eS:()=>M,eq:()=>q,g9:()=>E,hR:()=>R,hy:()=>O,lt:()=>A,nF:()=>k,oA:()=>V,qu:()=>W,r:()=>B,wH:()=>_,xi:()=>P}),n(1817);var r=n(3087),i=n(9310),o=n(3656),a=n(6935),s=n(3803),u=n(5142),c=n(1128),l=n(4248),d=n(6539),f=n(5905);let p=[],h=-1;function m(){const{dev:{local:e}}=(0,l.dU)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:r}}=(0,l.vW)();return!(e||t||n||!r)}function g(e,t=!1){if((0,s.q)()&&(!t||"start"===e.type))return;e.description=(0,a.mP)(e.description);const n=e.description;if(m()){const r=p[p.length-1];r&&(n.indexOf(r.description)>-1||r.description.indexOf(n)>-1)&&p.pop(),p.push(e),t&&v()}}function v(){if(m()){if(clearTimeout(h),p.length>0){const e=p;p=[];const t=(0,l.vW)().hostConfig.recordUrl;(0,u.o1)(t,{type:"POST",data:{records:e}})}h=setTimeout(v,1e4)}}function y(e,t,n,r,i){var o,a,s;const{surveyId:u,transactionID:c,userInfo:f}=n;let p,h,m,g,v,y,w;if(("gift"===r||"start"===r&&f)&&(p=f.nickname,h=f.openid,p&&(g=(0,l.dU)().name)),"start"===r&&(m=JSON.stringify((0,d.ZI)())),t&&e){const t=e;t.yid?(y=t?t.yid:void 0,w=t?t.xid:void 0):v=e?e.uuid.toLowerCase():void 0}return{survey_id:u,collector_id:null===(s=null===(a=null===(o=n.parsedPayload)||void 0===o?void 0:o.surveyMeta)||void 0===a?void 0:a.collector)||void 0===s?void 0:s.id,response_id:c,node_id:t?t.nodeUuid.toLowerCase():void 0,option_id:v,row_option_id:y,col_option_id:w,description:i,type:r,recorded_at:new Date,provider:g,user_name:p,user_id:h,query_params:m}}function w(e){const t=(0,f.LK)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.mP)(n)}function _(e,t){(0,l.dU)().dev.infer||g(y(null,t,e,"used_phone","在题目:".concat(w(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function b(e,t){(0,l.dU)().dev.infer||g(y(null,t,e,"verify_fail","在题目:".concat(w(t),"高级验证失败")))}function x(e,t){if((0,l.dU)().dev.infer)return;const{type:n,parent:r}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",u="";if("menu"===n||"cascade"===n)u=(0,c.eu)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=u?"select":"deselect",s=u?"选中":"清除所有选中";else{const r=e.selected;if(o=r?"select":"deselect",s=r?"选中":"取消选中","select_icon"===n||"select_image"===n)u="[".concat((0,i.ZK)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)u="[".concat(e.text,"]");else{const t=e;u="[".concat((0,a.mP)(t.optionX.text)," ").concat((0,a.mP)(t.optionX.text),"]")}else u="[".concat((0,a.mP)(e.text),"]")}const d="在题目:".concat(w(t),"中").concat(s,"选项:").concat(u);g(y(e,t,r,o,d))}function T(e,t,n){if((0,l.dU)().dev.infer)return;const r="在题目:".concat(w(n),"的选项:[").concat((0,a.mP)(t.text),"]中输入自动填充触发文字:").concat(e);g(y(t,n,n.parent,"auto_complete",r))}function k(e,t,n){if((0,l.dU)().dev.infer)return;const r=n.parent;let i,o;"value_mark"===n.type||"icon_mark"===n.type||"slide_rate"===n.type||"weight"===n.type?(i="打分:"+t.value,o="rate"):"upload"===n.type?(i=e?"上传图片":"清除图片",o="upload"):(i="输入:"+t.value,o="input"),g(y(t,n,r,o,"在题目:".concat(w(n),"的选项:[").concat((0,a.mP)(t.text),"]中").concat(i)))}function S(e,t){if((0,l.dU)().dev.infer)return;const n=t.parent,r=t.options[e];r&&(-1===r.sortNo?g(y(r,t,n,"cancel_sort","在题目:".concat(w(t),"中取消了对选项:[").concat((0,a.mP)(r.text),"]的排序"))):g(y(r,t,n,"sort","在题目:".concat(w(t),"中将选项:[").concat((0,a.mP)(r.text),"]排序到第").concat(r.sortNo,"位"))))}function I(e){if((0,l.dU)().dev.infer)return;const t="在题目:".concat(w(e),"中 定位失败");g(y(null,e,e.parent,"locate_failed",t))}function O(e,t){if((0,l.dU)().dev.infer)return;const n=t.parent,r=t.type,i=t.value;let o="input",a="输入";if("region"===r)a="输入:"+i;else if("location"===r||"area"===r)o="locate",a="定位到:"+i;else if("verify"===r){const t=typeof e;if("string"===t)a="输入:"+e;else if("object"===t){const{code:t,phoneNumber:n}=e;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(t))}}g(y(null,t,n,o,"在题目:".concat(w(t),"中").concat(a)))}function E(e){(0,l.dU)().dev.infer||g(y(null,e,e.parent,"prev","在题目:".concat(w(e),"中点击上一题")))}function C(e,t){(0,l.dU)().dev.infer||g(y(null,t,e.parent,"prev","返回到题目: ".concat(w(t),",由题目:").concat(w(e),"后退而来")))}function P(e){(0,l.dU)().dev.infer||g(y(null,e,e.parent,"next","在题目:".concat(w(e),"中点击下一题")))}function L(e,t){(0,l.dU)().dev.infer||g(y(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(w(t),",由题目:").concat(w(e),"前进而来"):"进入题目: ".concat(w(t),",由题目:").concat(w(e),"前进而来")))}function N(e,t,n){(0,l.dU)().dev.infer||g(y(null,t,n,"check_fail","从".concat(w(e),"走向甄别失败")),!0)}function R(e,t){(0,l.dU)().dev.infer||g(y(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function A(e,t){(0,l.dU)().dev.infer||g(y(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function U(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"time_less","答题时间太少被排除"),!0)}function M(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function B(e){(0,l.dU)().dev.infer||g(y(null,e.current,e,"time_over","答题超时未完成"),!0)}function D(e,t,n,r){(0,l.dU)().dev.infer||g(y(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(r))),!0)}function F(e,t,n=!1){(0,l.dU)().dev.infer||g(y(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function j(e,t){(0,l.dU)().dev.infer||g(y(null,e,t,"gift","领奖"),!0)}function W(e,t,n,r,i){(0,l.dU)().dev.infer||g(y(t,n,e,"auto_input","在题目:".concat(w(n),"中自动填充选项:[").concat(r,"],期待值:[").concat(i,"]")))}function q(e,t,n,r="成功"){(0,l.dU)().dev.infer||g(y(null,n,e,"auto_skip","在题目:".concat(w(n),"中尝试自动选中选项:[").concat((0,a.mP)(t.text),"]").concat(r)))}function z(e,t,n){if((0,l.dU)().dev.infer)return;let r="自动跳过题目:".concat(w(t)," by ").concat(n);"logic"===t.type&&(r+=" logicResult:".concat(t.logicResult)),g(y(null,t,e,"auto_skip",r))}function V(e,t,n){(0,l.dU)().dev.infer||g(y(null,n,e,"opt_display","在题目:".concat(w(n),"中显示选项:[").concat((0,a.mP)(t.text),"]")))}function G(){const e="browser_uuid";let t=(0,l.dU)().storage.get(e);return t||(t=(0,o.M8)(),(0,l.dU)().storage.set(e,t)),t}function H(){if((0,l.dU)().dev.infer)return;const e=(0,d.ZI)();e.code&&e.state||g({type:"enter",collector_code:(0,l.vW)().sid,browser_uuid:G(),recorded_at:(0,r.GN)(),description:"来自"+(0,l.dU)().system.getReferer()},!0)}function X(e,t){if((0,l.dU)().dev.infer)return;let n="开始答题,进入到题目: ".concat(w(t)," ");const{browser:r,device:i,engine:o,os:a}=(0,l.dU)().system.device;r&&(n+="browser:".concat(r.name||""," ").concat(r.version||"",", ")),i&&(n+="device:".concat(i.type||""," ").concat(i.vendor||""," ").concat(i.model||"",", ")),o&&(n+="engine:".concat(o.name||""," ").concat(o.version,", ")),a&&(n+="os:".concat(a.name||""," ").concat(a.version||""));const s=y(null,t,e,"start",n);s.browser_uuid=G(),s.collector_code=(0,l.vW)().sid,g(s,!0)}function K(e,t){(0,l.dU)().dev.infer||g(y(null,null,e,"resume","开始断点续答:"+t),!0)}},949:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var r=n(4248),i=n(9911);async function o(e){const{url:t,data:n,silent:o,responseId:a}=e,s=t+JSON.stringify(n),u=await(0,i.x)(t);if(!u){const e="FAKE NOT FOUND:".concat(t);throw(0,r.vW)().error(e),new Error(e+(a?" responseId is: ".concat(a):""))}let c=null;try{if(c=await u(n,(0,r.vW)()),c.exception)throw c.exception}catch(e){if(!(0,r.vW)().realTimePreview){const t="FAKE ERROR:".concat(s," ").concat(e.stack&&e.stack.split("\n")[0]);throw o||(0,r.vW)().error(t),new Error(t+(a?" responseId is: ".concat(a):""))}c={result:""}}return c}},5142:(e,t,n)=>{"use strict";n.d(t,{FB:()=>O,Hw:()=>b,Im:()=>_,O0:()=>I,Rq:()=>k,SK:()=>x,W1:()=>E,X:()=>y,_7:()=>S,bp:()=>T,f9:()=>l,gU:()=>m,hj:()=>f,lH:()=>p,mi:()=>c,o1:()=>v,rR:()=>h,vT:()=>g,yU:()=>w});var r=n(6539),i=n(7550),o=n(4248),a=n(5159),s=n(5497);let u="";const c={diagram_has_errors:"diagram_has_errors",survey_not_exist:"survey_not_exist",survey_offline:"survey_offline",oauth_error:"oauth_error",interviewee_missing_error:"interviewee_missing_error",interviewee_invalid_error:"interviewee_invalid_error",multi_responses_error:"multi_responses_error",red_envelope_duplicated:"red_envelope_duplicated",red_envelope_expired:"red_envelope_expired",red_envelope_received_by_yourself:"red_envelope_received_by_yourself",red_envelope_received_by_others:"red_envelope_received_by_others",red_envelope_intercepted:"red_envelope_intercepted",red_envelope_send_error:"red_envelope_send_error"},l={quota_full:"quota_full",response_overflow:"response_overflow",quota_not_match:"quota_not_match"},d=[400,401,402,403,404,405,422,500];async function f(e,t,n){const r=await(0,o.dU)().network.request(e,t,n);if((i=r).status>=200&&i.status<300)return function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}(r.response);throw r;var i}function p(e){e&&d.includes(e.status)||(0,o.vW)().error((0,i.Iu)(a.bn.global.downloadError))}function h(e){const t=JSON.parse(e&&e.response||"{}");return t&&d.includes(t.status)?t.code+"":""}function m(e){const t=h(e);if(t!==u&&t){if(l[t])return;c[t]?(0,o.vW)().error(E(t)):(0,o.vW)().notify(E(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.vW)().uploadLog("api error: ".concat(t.type,":").concat(e," ").concat(JSON.stringify(n))),n}}function v(e,t={type:"GET"},n=!1){return g(e,t={...t,contentType:"application/json"},n)}async function y(e){if((0,o.vW)().preview)return async function(e){if("00000000-0000-0000-0000-000000000000"===e)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const t=(0,r.ZI)(),n=t.type;let i=(0,o.vW)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?i=(0,o.vW)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(i=(0,o.vW)().hostConfig.host+"/v1/templates/"+e);const a=await v(i,{type:"GET",jwt:t.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(e);const t=(0,o.dU)().auth.retrieveAuthSurveyMeta();return t||v((0,o.vW)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw p(e),e}))}function w(e){const t=(0,o.vW)().hostConfig.qApiHost+"/responses";return u=c.multi_responses_error,v(t,{type:"POST",data:e},!0).then((e=>(u="",e))).catch((n=>{throw(0,o.vW)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),u="",n}))}function _(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function b(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return v((0,o.vW)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function T(e){if((0,o.vW)().preview)return(0,o.vW)().notify((0,i.Iu)(a.bn.preview.noMessage)),{};const t=(0,o.vW)().hostConfig.qApiHost+"/validations";e.question_id=e.question_id.toLowerCase();const n=await v(t,{type:"POST",data:e});return e.phone_num&&(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendSuccess)),n}async function k(e,t){return(0,o.vW)().preview?((0,o.vW)().notify((0,i.Iu)(a.bn.preview.noMessage)),{}):v((0,o.vW)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function S(e,t){const n=(0,o.dU)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const r=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",i=await g(r,{type:"POST",data:e},!1);return(0,o.dU)().storage.set("gift-"+e.code,JSON.stringify(i)),i}async function I(e,t){if((0,o.vW)().preview)return{};const n=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendSuccess)),t}catch(e){throw(0,o.vW)().notify((0,i.Iu)(a.bn.verify.sendFailed)),e}}async function O(e){(0,s.l)(e);const{preview:t}=(0,o.vW)(),{dev:{autoRun:n,infer:r}}=(0,o.dU)();return t||n||r?null:g((0,o.vW)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function E(e){return(0,i.Iu)(a.bn.backEnd[e])||e}},7428:(e,t,n)=>{"use strict";n.d(t,{f:()=>i,s:()=>o}),n(5306);var r=n(6539);function i(e){const t=(0,r.ZI)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,r.ZI)().offline_survey_id}},5015:(e,t,n)=>{"use strict";n.d(t,{nR:()=>p,zp:()=>d,LO:()=>f});var r=n(1772),i=n(6935),o=n(3251),a=n(4248),s=(n(5306),n(2125));var u=n(949),c=n(5142);const l={valid:!0,message:"",result:""};async function d(e,t,n,o){const{method:d,embedId:f}=t,p="embed"===d,h="fake"===d;if((0,a.vW)().realTimePreview&&!p&&!h||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...l};const m=await(0,i.sb)(t.url,{state:e}),g=await(0,r.O_)(e,t);n&&Object.keys(n).forEach((e=>{n[e]&&(g[e]=n[e])}));let v=null;if(p)v=await async function(e){const{embedId:t,data:n,embedApis:r,responseId:i}=e,o=function(e,t){const n=t.find((t=>t.id===e));return n?(n.fn||(n.fn=function(e){if(e.fn)return e.fn;let t,n=e.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(e.name," */ ").concat(n,"})()");try{return t=(0,s.K)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(t,r);let u;try{u=await o(n,(0,a.vW)())}catch(e){const n="EMBED ERROR:".concat(function(e,t){const n=t.find((t=>t.id===e));return n?n.name:e}(t,r)," ").concat(e.stack&&e.stack.split("\n")[0]);throw(0,a.vW)().error(n),new Error(n+(i?" responseId is: ".concat(i):""))}return u}({embedId:f,data:g,embedApis:e.embedApis,responseId:null==e?void 0:e.transactionID});else if("fake"===d)v=await(0,u.T)({url:m,data:g,silent:o,responseId:null==e?void 0:e.transactionID});else{let t="GET";"post"===d&&(t="POST");let n=null;try{n=await(0,c.hj)((0,a.dU)().dev.parseRealUrl(m),{type:t,data:g,contentType:"application/json"},!1)}catch(n){const r="REAL ERROR:".concat(t," ").concat(m," ").concat(JSON.stringify(n));o||(0,a.vW)().error(r);const i=r+((null==e?void 0:e.transactionID)?" responseId is: ".concat(null==e?void 0:e.transactionID):"");throw new Error(i)}v=n}return v}async function f(e,t,n,r){const i=await d(e,t,n,r);return void 0===i.valid&&(i.valid=!!i.result),i.valid||i.message||(i.message="^_^"),i}async function p(e,t){try{const{request:n}=t.origin;n&&(await d(e,n,null,!0),e.endRequested=!0,o.s$.trigger("END_REQ"))}catch(e){(0,a.vW)().uploadLog(e)}}},1128:(e,t,n)=>{"use strict";n.d(t,{C4:()=>d,Kn:()=>g,Lb:()=>T,Mo:()=>w,My:()=>l,NV:()=>m,WA:()=>b,ad:()=>k,c1:()=>c,c6:()=>x,cW:()=>u,eK:()=>f,eu:()=>h,fi:()=>y,kM:()=>s,mH:()=>v,y4:()=>_}),n(3948);var r=n(3877),i=n(3656),o=n(5905),a=n(6935);function s(e,t){const n=e.loopStack,r=t.uuid;return(0,i.am)(r,n)}function u(e,t){return e.find((e=>(0,i.RC)(e.uuid,t)))}function c(e){return"comment"===e.optionType}function l(e){return h(e).some((e=>e.selected))}function d(e,t=!1){return h(e).filter((n=>(!t||!n.isOtherOpt)&&(0,r.Zy)(n,e))).length}function f(e){return h(e).some((t=>(0,r.Zy)(t,e)))}function p(e){const t=[],n=e=>{if("children"in e)for(const t of e.children)n(t);else t.push(e)};for(const t of e.optionGroups)n(t);return t}function h(e){let t=[];return(0,o.Kf)(e)&&(t=(0,o.ub)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.sy)(e)&&(t=[...t,...e.otherOptions]),t}function m(e){let t=[];return(0,o.QM)(e)&&(t=[...t,...e.options]),(0,o.RE)(e)&&(t=[...t,...e.otherOptions]),t}function g(e){let t=h(e);const{hiddenOptions:n}=e;return n&&(t=[...t,...n]),t}function v(e){const{renderOptionsX:t,renderOptionsY:n,otherOptions:r}=e;return t.concat(n,r)}function y(e){const{options:t,origin:n}=e,r=t.find((e=>e.origin.seqTarget));return r&&r.selected?n.options[r.sortNo-1]:n.output}function w(e){return"yid"in e&&"xid"in e}async function _(e,t){const{parent:n}=t,{origin:r}=e;return{itemsMax:await(0,a.Ob)(r.itemsMax,{state:n}),itemsMin:await(0,a.Ob)(r.itemsMin,{state:n})}}function b(e){return e.passRef||{}}function x(e,t){const n=b(e);return e[t]||n[t]}function T(e){return e.assistValue?Object.keys(e.assistValue).reduce(((t,n)=>(e.assistValue[n]&&(t+=e.assistValue[n])&&(t+=" "),t)),""):""}function k(e,t){return e/t*100+"%"}},45:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>o,ID:()=>f,PC:()=>d,Rv:()=>s,W_:()=>l,i1:()=>u,pL:()=>a,tl:()=>c});var r=n(6064),i=n(1128);function o(e){return e&&-1===e.mutexNumber}function a(e,t){return(e.mutexNumber||0)>(t.mutexNumber||0)?1:-1}function s(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!o(e.optionX.origin)||t.yid!==e.yid)||o(e.optionY.origin)&&t.xid===e.xid)}function u(e,t){return!(!e||!t)&&("comment"!==e.origin.optionType||"option"!==t.origin.optionType)&&("option"!==e.origin.optionType||"comment"!==t.origin.optionType)&&(!(!o(e.origin)&&!o(t.origin))||c(e,t))}function c(e,t){return!(!e||!t||(0,r.O2)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!c(e.optionX,t.optionX)||t.yid!==e.yid)||c(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,i.Kn)(e).forEach((e=>{const t=e.origin;(0,i.c1)(t)||(n[t.mutexNumber]?n[t.mutexNumber]+=1:n[t.mutexNumber]=1)}));const r=Object.keys(n).reduce(((e,t)=>("0"===t||"undefined"===t?e+=n[t]:Number(t)<10&&(e+=1),e)),0);return t>r&&(t=r),t}function f(e,t){return!!o(t.origin)||e.some((e=>e!==t&&e.selected&&u(t,e)))}},3151:(e,t,n)=>{"use strict";n.d(t,{OJ:()=>d,Xl:()=>f,j9:()=>h});var r=n(1128),i=n(7550),o=n(4248),a=n(5159),s=n(6064),u=n(45),c=n(1028),l=n(9192);function d(e,t,n,i){const a=n.list[t];(0,o.Pg)(a.option,{value:e});const s=i.options.find((e=>e.cascadePath===a.resultId));return(0,r.c1)(a.option.origin)&&(e?m(a,i):h(a,i)),s}async function f(e,t,n){const d=t.list[e];if(!d)return c.JG;const f=t.list.filter((e=>function(e){return e.selected&&!(0,r.c1)(e.option.origin)}(e))),{option:p}=d;if(f.includes(d))h(d,n);else{const e=(0,u.ID)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.vW)().notify((0,i.Iu)(a.bn.menu.limitMax,{text:t.text?(0,i.Iu)(a.bn.menu.listItem)+t.text:(0,i.Iu)(a.bn.menu.topList),max:(0,s.KF)(t.max)})),c.JG}else t.list.forEach((e=>{e.selected&&h(e,n)}));e&&function(e,t){t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.Pg)(t,{selected:!1})}))}(d,n),m(d,n)}return await(0,l.t)(p,n),c.kI}function p(e){(0,o.Pg)(e,{selected:!1}),(0,o.Pg)(e.option,{selected:!1});const t=e.list;t&&0!==t.length&&t.forEach((e=>{p(e)}))}function h(e,t){p(e),t.options.forEach((t=>{t.cascadePath.includes(e.resultId)&&(0,o.Pg)(t,{selected:!1})}))}function m(e,t){(0,o.Pg)(e,{selected:!0}),(0,o.Pg)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.Pg)(t,{selected:!0})}))}},5521:(e,t,n)=>{"use strict";n.d(t,{W:()=>y});var r=n(1128),i=n(7679),o=n(9564),a=n(6935),s=n(3656),u=n(4248),c=n(7550),l=n(5159),d=n(9192),f=n(1028),p=n(5905);const h={};function m(e,t,n){t.forEach((t=>{(0,s.RC)(t.uuid,e.uuid)||t[n]!==e[n]||(0,u.Pg)(t,{selected:!1})}))}function g(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,u.Pg)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,u.Pg)(e,{selected:!1});else{(0,u.Pg)(e,{selected:!0});const i=(0,p.sy)(t)?t.otherOptions:[];g(e,n?i:(0,r.eu)(t))}return f.vv}async function y(e,t){const n=h[t.type];if(n){const r=await n(e,t);return r.noValidate||(0,i.jY)(t),await(0,d.t)(e,t),r}return f.JG}h.select=async(e,t)=>{if(e.selected)return(0,u.Pg)(e,{selected:!1}),f.vv;const n=await(0,o.rz)(t,e);return n.valid?((0,u.Pg)(e,{selected:!0}),(0,o.Ir)(t.origin)&&g(e,(0,r.eu)(t)),f.vv):((0,u.vW)().notify(n.message),f.JG)},h.select_icon=h.select,h.select_image=h.select,h.matrix=async(e,t)=>{if(e.selected)return(0,u.Pg)(e,{selected:!1}),f.vv;const n=await(0,o.Hf)(t,e);if(!n.valid)return(0,u.vW)().notify(n.message),f.JG;const{origin:i}=t;return(0,u.Pg)(e,{selected:!0}),(0,o.Ir)(i)?g(e,(0,r.eu)(t)):(0,o.Rx)(i)?(m(e,t.options,"yid"),m(e,t.options,"xid")):(0,o.Lk)(i)?m(e,t.options,"yid"):(0,o.zR)(i)&&m(e,t.options,"xid"),f.vv},h.upload=async(e,t)=>{var n,r;if(e.isOtherOpt)return v(e,t,!0);{const{parent:i,fullUploaded:o,origin:s}=t;let d=await(0,a.Ob)(s.maxUploadCount,{state:i});d=d||t.options.length;const p=e.value;if(o&&!p&&!e.origin.fillRequired)return(0,u.vW)().notify((0,c.Iu)(l.bn.upload.amountLimitMax,{max:d})),f.JG;const h={onprogress(t){(0,u.Pg)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId},m=await(0,u.dU)().network.upload(h);return await(null===(r=(n=i.handleEvents).handleOptionInput)||void 0===r?void 0:r.call(n,m,e,t)),f.kI}},h.menu=h.select,h.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.vv),h.hot_spot=h.select,h.icon_mark=h.value_mark=h.slide_rate=h.fill=h.weight=h.heat_map=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.kI,h.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.kI},5753:(e,t,n)=>{"use strict";n.d(t,{LM:()=>h,SV:()=>d,wS:()=>p});var r=n(9192),i=n(7679),o=n(9564),a=n(4248),s=n(1128);const u={refresh:!1,result:!0},c={refresh:!0,result:!0},l={};function d(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.Pg)(e,{image:{name:void 0,ratio:1,url:n,natural:n,thumbnail:n,large:n,width:64,height:64,id:"faked-id-for-upload-image",originName:"uploaded image"}})}function f(e,t){const n=String(e);return e===t.value?u:((0,a.Pg)(t,{value:n}),c)}async function p(e,t,n){let o;if("number"==typeof e&&(e=String(e)),t.isOtherOpt)o=f(e,t);else{const r=l[n.type];o=r?await r(e,t,n):f(e,t)}return o.noValidate||(0,i.jY)(n,t),await(0,r.t)(t,n),o}function h(e,t,n){t.atcpTrigger=e,(0,i.jY)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.Pg)(t,{value:e}),c),l.weight=async(e,t,n)=>{if(e===t.value)return u;const{options:r}=n,i=n.weightTotal,o=r.reduce(((e,n)=>n!==t?e+Number(n.value):e),0),l=i-o;return Number(e)>l&&(e=String(l)),(0,a.Pg)(t,{value:e}),r.forEach((e=>{const t=Number(e.value);(0,a.Pg)(e,{percent:(0,s.ad)(t,i)})})),c},l.upload=async(e,t,n)=>(e||(await(0,a.dU)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,r.h)()),(0,a.Pg)(t,e),await(0,o.YC)(n),d(t,e),{refresh:!0,result:!0}),l.slide_rate=async(e,t)=>f(e,t),l.fill=async(e,t)=>f(e,t)},7492:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});const r=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},8064:(e,t,n)=>{"use strict";n.d(t,{BT:()=>i,dj:()=>o,xR:()=>a});var r=n(8413);function i(e,t){return e.find((e=>e.origin.radius>=(0,r.S)(t,{lng:e.origin.longitude,lat:e.origin.latitude})))||e[e.length-1]}function o(e,t){if(0===e.length)return;const n=t.split("-");return e.find((e=>e.text.split("-").every(((e,t)=>{const r=n[t];return!!(r&&r.indexOf(e)>-1)}))))||e[e.length-1]}function a(e,t){const n=t.map((e=>e.name)).indexOf(e[0]);let r=String(n);const i=t[n];if(e[1]&&i){const t=i.cities.map((e=>e.name)).indexOf(e[1]);r+=" "+t;const n=i.cities[t];e[2]&&n&&(r+=""+n.areas.map((e=>e.name)).indexOf(e[1]))}return r}},5750:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>d,T_:()=>a,uR:()=>l}),n(2707);var r=n(3656),i=n(9564),o=n(4588);function a(e){const t=[];return e.forEach(((e,n)=>{const i=(0,r.XJ)(n+1);t.splice(i,0,e)})),t}const s={};function u(e,t,n){let i=[];return i=n?c(e):t?function(e,t){const n=[],i={};e.forEach(((e,r)=>{const o=e.origin;if(o.refOptId){let a="";if(t&&(a=o.referId),a){const t=i[a];t?t.list.push(e):i[a]={headIndex:r,list:[e]}}else n.push(e)}else n.push(e)}));let o=[];return n.forEach((e=>{const t=(0,r.XJ)(o.length+1);o.splice(t,0,e)})),Object.keys(i).map((e=>i[e])).sort(((e,t)=>e.headIndex>t.headIndex?1:-1)).forEach((e=>{o=o.concat(e.list)})),o}(e,t):function(e){const t=[];return e.forEach((e=>{const n=(0,r.XJ)(t.length+1);t.splice(n,0,e)})),t}(e),i}function c(e,t){return t=(t||Math.round(10*Math.random()))%e.length,e.slice(t).concat(e.slice(0,t))}function l(e,t){const{renderId:n,origin:r}=e,{followRandom:a,circulation:c}=r;if(!(0,i.oZ)(e))return t;if((0,o.YB)(e.nodeUuid,e.parent.nodeGroups)){let r=s[e.nodeUuid];if(r)return t.sort(((e,t)=>r[e.uuid]>r[t.uuid]?1:-1));{const e=u(t,a,c);return s[n]=r={},e.forEach(((e,t)=>{r[e.uuid]=t})),e}}return u(t,a,c)}function d(e,t,n){const{randomType:r}=e.origin;return"col"!==r&&"row_col"!==r||(t=l(e,t)),"row"!==r&&"row_col"!==r||(n=l(e,n)),"col_loop"===r&&(t=c(t)),"row_loop"===r&&(n=c(n)),{optionsX:t,optionsY:n}}},7552:(e,t,n)=>{"use strict";n.d(t,{kN:()=>P,kv:()=>B,jy:()=>V,MT:()=>z,rI:()=>H,Jc:()=>L,gk:()=>N,Ds:()=>K,dX:()=>D}),n(2707),n(5306),n(72),n(9137),n(1957),n(6306),n(103),n(4592),n(8276),n(5082),n(2813),n(8222),n(8563),n(336),n(7512),n(3948);var r=n(5750),i=n(1128),o=n(9564),a=n(6451),s=n(9481),u=n(6935),c=n(4665),l=(n(3210),n(9026)),d=n(4248),f=n(6064);const p={done:!1,expectedValue:"",actualValue:""};function h(e){const{autoInputConfig:t}=e.origin;if(!t)return"";const{defaultValue:n}=t;return n&&(0,f.KF)(n).trim()?n:""}const m={};async function g(e,t,n,r,i){if(!h(e))return p;const{parent:o}=t,a=await(0,u.Ob)(h(e),{state:o});let s=String(a);return a>=n&&a<=r||(s=i),(0,d.Pg)(e,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(e,t){const n=m[t.type];if(n){t.parent.context.option=e;const r=await n(e,t);return!!r.done&&((0,l.qu)(t.parent,e,t,r.actualValue,r.expectedValue),!0)}return!1}m.fill=async(e,t)=>{if(!h(e))return p;const{parent:n}=t,r=await(0,u.e_)(h(e),{state:n});return(0,d.Pg)(e,{value:r}),{done:!0,actualValue:r,expectedValue:r}},m.value_mark=(e,t)=>g(e,t,e.minValue,e.maxValue,""),m.icon_mark=(e,t)=>g(e,t,0,e.iconCount,""),m.slide_rate=(e,t)=>{const{rateOptions:n}=t;return g(e,t,0,n.length,"")},m.weight=(e,t)=>g(e,t,0,e.maxValue||t.weightTotal,""),m.sequence=async(e,t)=>{if(!h(e))return p;const n=t.options.length,{parent:r}=t,i=await(0,u.Ob)(h(e),{state:r});let o=i;return i>=1&&i<=n||(o=-1),(0,d.Pg)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:i}},n(5069);var y=n(5838),w=n(5905);async function _(e,t){const n=t.parent;n.context.option=e;const r=await async function(e,t){return!!t&&(0,y.Q3)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!r}const b=["select","select_icon","select_image","menu","hot_spot","data"];var x=n(6866),T=n(3251);async function k(e,t,n,r=!1){const i=n.origin.options.find((n=>n.xid===e.uuid&&n.yid===t.uuid)),o={...await L(n,i,null),optionX:e,optionY:t,text:r?e.text:t.text,xid:e.uuid,yid:t.uuid},a=await(0,s.o4)(n.parent,o,n);return o.disabled=!a,o}var S=n(45),I=n(3656),O=n(9310),E=n(3892);const C=["select","sequence","menu"];function P(e){Object.defineProperty(e,"selected",{get(){return this.__cache.selected},set(e){"select-input"===this.inputType&&(e?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=e,e&&(0,S.Cp)(this.origin)&&setTimeout((()=>{T.s$.trigger("OPT_EXCLUDE",this)})),T.s$.trigger("OPT_SELECT",this)}})}async function L(e,t,n){const{parent:r}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:B(t,e.type),value:"",renderId:(0,i.kM)(e,t),uuid:t.uuid,label:t.label,number:t.number,optComment:t.optComment,optionType:t.optionType,useComment:t.useComment,passRef:n};return r.context.option=o,o.text=await(0,u.Ur)(t.text,{state:r,usage:{node:e,optionId:t.uuid}}),P(o),o.isOtherOpt&&(await R(o,e),(0,i.c1)(t)||await _(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.Pg)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.Pg)(e,{placeholder:e.text})}(o),await(0,a._F)(o,r),o}async function N(e,t,n){const r=[];for(const i of t){const t=n.find((e=>e.uuid===i.uuid)),o=await L(e,i,t);r.push(o)}return r}function R(e,t){return(0,d.Pg)(e,{inputType:B(e.origin,t.type)}),D(e,t)}const A=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],U=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],M=["select","menu","cascade"];function B(e,t){if(e.isOtherOpt){let t="select";return(0,i.c1)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return M.includes(t)?!0===e.useComment?"select-input":"select":A.includes(t)?"input":U.includes(t)?"select":void 0}async function D(e,t){if(!(0,w.Ck)(e))return;const{origin:n}=e,r=e.origin.fillType;if(!r)return;const{parent:o}=t;let a,s,c,l=await(0,u.Ob)(n.fillStart,{state:o}),f=await(0,u.Ob)(n.fillEnd,{state:o});if(isNaN(l)&&(l=void 0),isNaN(f)&&(f=void 0),"date"===r){const e=(new Date).getFullYear(),t=l,n=f;void 0!==l&&(l=new Date(l,0,1),e<t&&(a=l)),void 0!==f&&(f=new Date(f,11,31),e>n&&(a=f))}"auto_complete"===r&&(s=function(e,t=[]){const{autoCpltGroups:n}=e;return t.reduce(((e,t)=>{const r=n.find((e=>e.id===t));return r&&(e=e.concat(r.data)),e}),[])}(o,n.autoCpltIds),c=await(0,x.VJ)(t.parent.sid));let p=[];"list_select"===r&&(p=q((await(0,u.e_)(n.selectText,{state:o,joinBy:","})).split(",")));const h=await(0,i.y4)(e,t),m=await(0,E._2)(e,t);(0,d.Pg)(e,{itemsMax:h.itemsMax,itemsMin:h.itemsMin,fillStart:m.start,fillEnd:m.end,fillType:r,validateMin:l,validateMax:f,defaultValue:a,completeGroups:s,selectList:p,prevCpltLang:c,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function F(e,t,n=!1){const{options:i,otherOptions:o,hiddenOptions:a}=e,s={options:[],otherOptions:o,hiddenOptions:[]};if(i){const n=function(e){const t=e.filter((e=>"top-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),n=e.filter((e=>"bottom-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),r=e.filter((e=>"top-fixed"!==e.origin.position&&"bottom-fixed"!==e.origin.position));return t.concat(r).concat(n)}((0,r.uR)(e,i));for(const e of n)s.options.push(await t(e))}if(a)for(const e of a){const n=e.isOtherOpt?e:await t(e);s.hiddenOptions.push(n)}n&&z([...s.options,...s.otherOptions]),(0,d.Pg)(e,s)}const j={};async function W(e,t){return e.image?e.image:await(0,a.nO)(t,e)}function q(e){const t={};return e.map((e=>{const n=t[e];return n?(t[e]=n+1,"".concat(e,"(").concat(n,")")):(t[e]=2,e)}))}function z(e){q(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function V(e){return e&&e.path?(0,d.vW)().hostConfig.mediaHost+e.path:""}function G(e){const t=V(e);return{normalIconUrl:t,activeIconUrl:H(t)}}function H(e){return e.replace("/outline/","/glyph/")}function X(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:G(t.icon)}async function K(e,t){if((0,w.Kf)(e)){await async function(e,t){const{origin:n}=e;let r={options:[]};if((0,I.is)(n,"matrix"===n.type)){const{options:i,refMaps:o,passRefs:u}=await(0,a.P)(t,e.origin,"xid"),c=await N(e,i,u),l=await(0,s.tc)(t,c,e),{options:d,refMaps:f,passRefs:p}=await(0,a.P)(t,e.origin,"yid"),h=await N(e,d,p),m=await(0,s.Ou)(t,h,e);(0,O.sB)(e,[...o,...f]);const g=await N(e,n.otherOptions,[]),v=await(0,s.PR)(t,g,e);r={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.P)(t,e.origin);let i=n.options;(0,w.sy)(e)&&(i=i.concat(e.origin.otherOptions));const o=await N(e,i,n.passRefs),u=await(0,s.PR)(t,o,e),c=[],l=[];u.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):c.push(e)})),(0,O.sB)(e,n.refMaps),r={options:c,otherOptions:l,hiddenOptions:u.hiddenList}}(0,d.Pg)(e,r)}(e,t);const n=j[e.type];n&&await n(e),function(e){if((0,d.vW)().realTimePreview)return;if(!(0,w.Kf)(e))return;let t;C.indexOf(e.type)>-1?t=e=>!!e.text:"select_image"===e.type?t=e=>!!e.image:"slide_rate"===e.type&&(t=e=>!!e.text||!!e.image),t&&(e.options=e.options.filter(t))}(e),function(e){const{options:t,type:n,parent:r}=e;let i=(0,w.sy)(e)?e.otherOptions:[];b.includes(n)&&(i=[...i,...t]);const a=i.filter((e=>e.autoSelectMarked)).reverse();if((0,o.qX)(e.origin))a.forEach((t=>{(0,d.Pg)(t,{selected:!0}),(0,l.eq)(r,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.eq)(r,t,e,"因冲突被终止")})),t&&((0,d.Pg)(t,{selected:!0}),(0,l.eq)(r,t,e))}}(e),t.context.option=null}}j.select=e=>F(e,(async function(t){return await D(t,e),await _(t,e),t})),j.fill=e=>F(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await D(t,e),t.placeholder=(0,u.mP)(t.text),await v(t,e),t})),j.value_mark=e=>F(e,(async function(t){const{parent:n,origin:r}=e;t.value="";const i=await(0,u.Ob)(r.markMin,{state:n}),o=await(0,u.Ob)(r.markMax,{state:n});return(0,d.Pg)(t,{minValue:i,step:r.markStep,maxValue:o,minValueText:r.minText,maxValueText:r.maxText}),await v(t,e),t})),j.icon_mark=e=>F(e,(async function(t){return t.value="",(0,d.Pg)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),j.sequence=async e=>{let t=!1;await F(e,(async n=>((0,d.Pg)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},j.matrix=async e=>{const t=(0,r.Gy)(e,e.optionsX,e.optionsY),{parent:n,origin:i}=e,a=[];for(const r of t.optionsX)a.push({origin:r.origin,extraTitle:r.origin.extraTitle,width:r.origin.width,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,text:await(0,u.Ur)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const s=new Map;a.forEach(((e,t)=>{s.set(e,t)})),a.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.origin.position)){case"left-fixed".concat("___","right-fixed"):case"left-fixed".concat("___",void 0):case"".concat(void 0,"___","right-fixed"):return-1;case"".concat(void 0,"___","left-fixed"):case"right-fixed".concat("___","left-fixed"):case"right-fixed".concat("___",void 0):return 1;default:{const n=s.get(e),r=s.get(t);return n&&r?n-r:e.number-t.number}}}));const c=[];for(const r of t.optionsY)c.push({origin:r.origin,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,height:r.origin.height,text:await(0,u.Ur)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const l=new Map;c.forEach(((e,t)=>{l.set(e,t)})),c.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.origin.position)){case"top-fixed".concat("___","bottom-fixed"):case"".concat(void 0,"___","bottom-fixed"):case"top-fixed".concat("___",void 0):return-1;case"".concat(void 0,"___","top-fixed"):case"bottom-fixed".concat("___","top-fixed"):case"bottom-fixed".concat("___",void 0):return 1;default:{const n=l.get(e),r=l.get(t);return n&&r?n-r:e.number-t.number}}}));for(const t of e.otherOptions)await R(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:c.filter((e=>e.visible))},p=(0,o.Lk)(i)||(0,o.mI)(i),h=await async function(e,t,n,r=!1){const i=[],o=[];let a=e,s=t;r&&(a=t,s=e);for(const e of a)if(e.visible){const t={text:e.text,list:[]};for(const i of s)if(i.visible){let a=e,s=i;r&&(s=e,a=i);const u=await k(a,s,n,r);o.push(u),t.list.push(u)}i.push(t)}return{flatten:i,options:o,fullOptions:o}}(a,c,e,p),m=function(e,t,n){const r=[];return t.forEach((t=>{if(t.visible){const i=[];e.forEach((e=>{if(e.visible){const r=n.find((n=>n.xid===e.uuid&&n.yid===t.uuid));if(!r)throw new Error("matrix item not found");i.push(r)}})),r.push(i)}})),{matrix:r}}(a,c,h.options);(0,d.Pg)(e,{...f,...h,...m})},j.select_image=e=>F(e,(async t=>(t.image=await W(t,e),await _(t,e),t))),j.upload=e=>F(e,(async e=>(e.filePath="",e.value="",e.fileName="",e.fileType="",e.progress=0,e.isImage=!1,e.fileLimits=[...e.origin.fileLimits||["image"]],e.accept=(0,c.D)(e.fileLimits),e))),j.menu=e=>F(e,(async t=>(await D(t,e),await _(t,e),t)),!0),j.select_icon=e=>F(e,(async t=>{const n={...t,...X(t)};return await _(n,e),n})),j.weight=e=>{const{parent:t}=e;return F(e,(async n=>{let r=await(0,u.Ob)(n.origin.maxMark,{state:t});const i=await(0,o.Vg)(e.origin,t);return(!r||r>i)&&(r=i),(0,d.Pg)(n,{percent:"0%",color:n.origin.color,maxValue:r,value:""}),await v(n,e),n}))},j.cascade=e=>F(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),j.data=async e=>{for(const t of e.options)await _(t,e)},j.hot_spot=async e=>await F(e,(async t=>{await D(t,e),await _(t,e);let n=t.origin.graphs;if("points"in t){const{points:e,x:r,y:i}=t.origin;n=[{points:e,x:r,y:i,uuid:(0,I.M8)()}]}const r=n.map((e=>{const{area:t,pathD:n}=e.points.reduce(((t,n,r)=>{t.pathD?t.pathD+=" L":t.pathD+="M",t.pathD+=n.x+" "+n.y;const i=e.points[r+1];return i?t.area+=n.y+i.y*(i.x-n.x)/2:t.pathD+=" Z",t}),{area:0,pathD:""});return{...e,area:t,pathD:n,transform:"translate(".concat(e.x,",").concat(e.y,")")}}));return(0,d.Pg)(t,{graphs:r,color:t.origin.color}),t})),j.heat_map=(e,t)=>F(e,(async function(e){return e})),j.max_diff=e=>F(e,(async function(t){return t.value="0",t.image=await W(t,e),t.records=[],t})),j.slide_rate=async e=>{const{rateOptions:t}=e.origin,n=[];for(const r of t){const t=await L(e,r,null);await(0,s.o4)(e.parent,t,e)&&n.push(r)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...G(t),text:(0,u.FL)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),F(e,(async t=>((0,d.Pg)(t,{image:await W(t,e),value:""}),await v(t,e),t)))}},9481:(e,t,n)=>{"use strict";n.d(t,{De:()=>f,Ou:()=>d,PR:()=>u,o4:()=>s,tc:()=>l}),n(3948);var r=n(5838),i=n(1128),o=n(9026),a=n(3768);async function s(e,t,n){const{origin:i}=t,a=i.displayConfig;if(a){n.hasOptShowHide=!0,e.context.option=t;const i=await(0,r.Q3)(e,a);return i&&(0,o.oA)(e,t,n),e.context.option=null,i}return!0}async function u(e,t,n){const r=[],i=[];for(const o of t)await s(e,o,n)?(o.visible=!0,r.push(o)):(o.visible=!1,i.push(o));return{visibleList:r,hiddenList:i}}async function c(e,t,n){for(const r of t)r.visible=await s(e,r,n);return t}async function l(e,t,n){t=await c(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.width;return t}async function d(e,t,n){t=await c(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.height;return t}function f(e,t){const{renderList:n}=e,r=[];return n.forEach((e=>{if(!(0,a.F2)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,i.mH)(e):(0,i.eu)(e);let n;s&&(n=s.replacements.map((e=>e.index))),r.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:t.map((e=>e.uuid.toLowerCase()))})}})),r}},9564:(e,t,n)=>{"use strict";n.d(t,{$X:()=>W,$i:()=>D,CE:()=>T,Cf:()=>x,Fy:()=>N,Hf:()=>U,Ir:()=>S,Jz:()=>y,KF:()=>v,Lk:()=>I,NU:()=>q,Rx:()=>E,So:()=>b,Vg:()=>z,YC:()=>V,ZA:()=>w,Zu:()=>C,gx:()=>R,jJ:()=>j,lE:()=>L,mI:()=>P,nv:()=>B,oZ:()=>_,qK:()=>g,qX:()=>k,rz:()=>M,zR:()=>O}),n(3948);var r=n(1128),i=n(3656),o=n(6935),a=n(7550),s=n(4248),u=n(5159),c=n(3877),l=n(45),d=n(3768),f=n(5029);const p={valid:!0,message:""},h=["region","location","area","describe","end","logic","loop","lottery","verify"],m={};function g(e){(0,s.Pg)(e,{hasAnswer:(0,d.JH)(e)})}function v(e,t){if(8!==t.length)return t;let n=m[t];if(!n){const r=e.nodeList.find((e=>(0,i.RC)(e.nodeUuid,t)));if(r)return n=m[t]=r.nodeUuid,r.nodeUuid}return n}function y(e){return e.find((e=>"start"===e.type))}function w(e){return!0===e.answerRequired}function _(e){return(0,i.is)(e,"matrix"===e.type)?function(e){const{randomType:t}=e.origin;return"col"===t||"row_col"===t||"row"===t}(e):!0===e.origin.randomOptionY}function b(e){const t=e.loopStack,n=e.nodeUuid;return(0,i.am)(n,t)}function x(e,t){if(t)return e.find((e=>e.input&&(0,i.RC)(e.input.uuid,t)||e.loopEnd&&(0,i.RC)(e.loopEnd.uuid,t)))}function T(e,t,n){const r=t.find((e=>(0,i.RC)(e.selfPortId,n)));if(r&&r.destInputId)return x(e,r.destInputId)}function k(e){return(0,i.is)(e,"matrix"===e.type)?"multi"===e.matrixSelect:!0===e.multiSelect}function S(e){return(0,i.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function I(e){return"single_row"===e.matrixSelect}function O(e){return"single_col"===e.matrixSelect}function E(e){return"single_row_col"===e.matrixSelect}function C(e){return k(e)&&"all"===e.multiType}function P(e){return k(e)&&"row"===e.multiType}function L(e){return k(e)&&"col"===e.multiType}async function N(e,t){const{origin:n}=e,r=!0===n.limitEnabled;let i=r?await(0,o.Ob)(n.maxUploadCount,{state:t}):e.options.length,a=r?await(0,o.Ob)(n.minUploadCount,{state:t}):1;const s=e.options.length;return a||(a=1),i||(i=s),a>s&&(a=s),a>i&&(a=i),{max:i,min:a}}async function R(e,t){const{origin:n}=e;if(!k(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let u=await(0,o.Ob)(a,{state:t}),c=await(0,o.Ob)(s,{state:t});const d=(0,r.Kn)(e).length;return(0,i.is)(e,"matrix"===e.type)||(u=(0,l.PC)(e,u)),u||(u=1),c||(c=d),u>d&&(u=d),u>c&&(u=c),{min:u,max:c}}const A=(e,t,n,r)=>{let i=0;i=r?e.filter((e=>e[r]===t[r]&&e.selected)).length:e.filter((e=>e.selected)).length;const o=i<n;let s="";return o||(s=r?"xid"===r?(0,a.Iu)(u.bn.matrix.colLimitMax,{max:n}):(0,a.Iu)(u.bn.matrix.rowLimitMax,{max:n}):(0,a.Iu)(u.bn.select.limitMax,{max:n})),{valid:o,message:s}};async function U(e,t){if(!k(e.origin)||(0,l.Cp)(t.origin)||!t.isOtherOpt&&((0,l.Cp)(t.optionX.origin)||(0,l.Cp)(t.optionY.origin)))return p;const n=C(e.origin);if(!n&&!(0,r.Mo)(t))return p;const i=(0,r.eu)(e),{max:o}=await R(e,e.parent);return n?A(i,t,o):L(e.origin)?A(i,t,o,"xid"):P(e.origin)?A(i,t,o,"yid"):p}async function M(e,t){if(!k(e.origin))return p;const{max:n}=await R(e,e.parent),i=(0,r.eu)(e),o=!(i.filter((e=>e.selected)).length===n)||(0,l.ID)(i,t);return{valid:o,message:o?"":(0,a.Iu)(u.bn.select.limitMax,{max:n})}}function B(e,t){return e.find((e=>(0,i.RC)(e.nodeUuid,t)))}const D=["logic","random","loop"],F=[...D,"data"];function j(e){(0,s.vW)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!F.includes(e.type)&&(e.readonly=!0)}function W(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.vW)().preview&&e.parent.previewShadowNodes&&!F.includes(e.type)}(e)?"":"setting";if((0,f.u)(e.nodeUuid))return"random_group";const t=(0,r.eu)(e);return h.indexOf(e.type)>-1||!t||0!==t.length?"":"no_options"}function q(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,i.RC)(e.circleNode1Id,t.circleNode1Id)&&(0,i.RC)(e.circleNode2Id,t.circleNode2Id)}async function z(e,t){const{options:n}=e;let r=await(0,o.Ob)(e.total,{state:t})||100,i=0;for(const e of n){const n=await(0,o.Ob)(e.maxMark,{state:t});if(void 0===n){i=-1;break}i+=n}return i>0&&i<r&&(r=i),r}async function V(e){const{max:t}=await N(e,e.parent),n=t===e.options.filter((t=>(0,c.Zy)(t,e))).length;(0,s.Pg)(e,{fullUploaded:n})}},5589:(e,t,n)=>{"use strict";n.d(t,{U:()=>p,k:()=>h});var r=n(2812),i=n(1128),o=n(8064),a=n(8413),s=n(7679),u=n(4248),c=n(9192),l=n(1028);function d(e,t,n,r){e&&((0,u.Pg)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,u.Pg)(t,{selected:!1})}))),(0,u.Pg)(r,{value:n})}const f={};async function p(e,t){const n=f[t.type],r=n?await n(e,t):l.JG;return r.noValidate||(0,s.jY)(t),r}function h(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.vv}f.region=(e,t)=>{t.indexes=e;const n=(0,i.eu)(t),a=(0,r.ks)(e);d((0,o.dj)(n,a),n,a,t);const s=a.split("-"),u={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=u,t.position={address:u},l.vv},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.L)(e.address,"-",t.infoRange),r=(0,i.eu)(t);return d((0,o.dj)(r,n),r,n,t),(0,u.Pg)(t.parent,{point:e.point,address:e.address}),t.position=e,l.vv},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.L)(e.address,"-","street"),r=(0,i.eu)(t);return d((0,o.BT)(r,e.point),r,n,t),(0,u.Pg)(t.parent,{point:e.point,address:e.address}),t.position=e,l.vv},f.verify=(e,t)=>((0,u.Pg)(t,e),{...l.vv,noValidate:!0}),f.gift=(e,t)=>((0,u.Pg)(t,e),l.kI),f.heat_map=async(e,t)=>{const n={x:Math.round(e.x),y:Math.round(e.y)},{options:r}=t,i=r[t.clickTimes%r.length];return(0,u.Pg)(i,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,c.t)(i,t),l.kI}},152:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var r=n(4248);function i(e,t){(0,r.Pg)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,r.Pg)(n,{value:n.records.reduce(((e,t)=>e+t.value),0).toString()})}function o(e,t,n){if(t.value===e)return{result:!0};i(t,e),n.items.forEach((e=>{e!==t&&e.value===t.value&&i(e,0)}));const o=n.items.some((e=>1===e.value)),a=n.items.some((e=>-1===e.value));return(0,r.Pg)(n,{done:o&&a}),{result:!0}}},8231:(e,t,n)=>{"use strict";n.d(t,{O:()=>a}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var r=n(4248),i=n(9192);function o(e){return"[object Map]"!==Object.prototype.toString.call(e)}async function a(e,t,n){const{options:a}=n;if(!function(e,t){if(o(e))return!0;if(e.size!==t.length)return!1;const n=new Array(t.length).fill(!1);for(const[r,i]of e)i>=0&&i<t.length&&(n[i]=!0);return n.every((e=>e))}(e,a)||!function(e,t){if(e.size!==t.length)return!1;const n=Array.from(e.values()).filter((e=>-1!==e));for(const e of n)if(e<1||e>t.length)return!1;return r=n,new Set(r).size===r.length;var r}(t,a))return{result:!1};let s;for(const[e,n]of t)e.sortNo!==n&&((0,r.Pg)(e,{sortNo:n,selected:-1!==n}),e.selected&&(s=e));if(!o(e)){const t=[];for(const[n,r]of e)t[r]=n;(0,r.Pg)(a,t)}return s&&await(0,i.t)(s,n),{result:!0}}},4125:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(4248);function i(e){if(!e)return{};const{useCustomLogo:t,logoText:n,logoImage:i,showLogoInEachPage:o,logoImageShowWidth:a}=e;let s="";if(i){const e=i.name;s=(0,r.vW)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8351:(e,t,n)=>{"use strict";n.d(t,{ks:()=>ie,MJ:()=>re,D1:()=>ne,qG:()=>te});var r=n(7552),i=n(9564),o=n(2812),a=n(7550),s=n(5159),u=n(4248);const c={select:async e=>{const t=(0,i.qX)(e.origin);let n=(0,a.Iu)(s.bn.select.single);if(t){n=(0,a.Iu)(s.bn.select.multi);const{min:t,max:r}=await(0,i.gx)(e,e.parent);return{typeName:n,typeDescription:(0,a.Iu)(s.bn.select.limitBetween,{min:t,max:r})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.value)}),icon_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.graph)}),weight:async e=>{const t=e.weightTotal;let n=(0,a.Iu)(s.bn.weight.total,{total:t});return n+=!0===e.origin.relax?(0,a.Iu)(s.bn.weight.relax):(0,a.Iu)(s.bn.weight.strict),{typeName:(0,a.Iu)(s.bn.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.Iu)(s.bn.fill.name)}),slide_rate:async()=>({typeName:(0,a.Iu)(s.bn.slideRate.name)}),sequence:async e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.Iu)(s.bn.rank.limitMin,{min:t}):(0,a.Iu)(s.bn.rank.limitAll);return{typeName:(0,a.Iu)(s.bn.rank.name),typeDescription:n}},menu:async e=>({...await c.select(e),typeName:(0,a.Iu)(s.bn.menu.name)}),select_icon:e=>c.select(e),select_image:e=>c.select(e),upload:async e=>{const t=(0,a.Iu)(s.bn.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:r}=await(0,i.Fy)(e,e.parent);return{typeName:t,typeDescription:(0,a.Iu)(s.bn.upload.amountLimit,{min:n,max:r})}}return{typeName:t,typeDescription:""}},location:async()=>({typeName:(0,a.Iu)(s.bn.locate.name)}),area:async()=>({typeName:(0,a.Iu)(s.bn.site.name)}),region:async()=>({typeName:(0,a.Iu)(s.bn.region.name)}),verify:async()=>({typeName:(0,a.Iu)(s.bn.verify.name)}),cascade:async()=>({typeName:(0,a.Iu)(s.bn.cascade.name)}),matrix:async e=>{const{origin:t}=e;if((0,i.Ir)(t))return{typeName:(0,a.Iu)(s.bn.matrix.single)};if((0,i.qX)(t)){const{min:n,max:r}=await(0,i.gx)(e,e.parent);let o=(0,a.Iu)(s.bn.matrix.multi),u=(0,a.Iu)(s.bn.select.limitBetween,{min:n,max:r});return(0,i.lE)(t)?(o=(0,a.Iu)(s.bn.matrix.multiCol),u=(0,a.Iu)(s.bn.matrix.colLimitBetween,{min:n,max:r})):(0,i.mI)(e.origin)&&(o=(0,a.Iu)(s.bn.matrix.multiRow),u=(0,a.Iu)(s.bn.matrix.rowLimitBetween,{min:n,max:r})),{typeName:o,typeDescription:u}}return(0,i.Lk)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleRow),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowOne)}:(0,i.zR)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachColOne)}:(0,i.Rx)(t)?{typeName:(0,a.Iu)(s.bn.matrix.singleRowCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowColOne)}:{typeName:(0,a.Iu)(s.bn.matrix.single)}},hot_spot:async()=>({typeName:(0,a.Iu)(s.bn.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.Iu)(s.bn.heatMap.name)}),max_diff:async()=>({typeName:(0,a.Iu)(s.bn.maxDiff.name)})};var l=n(6935),d=n(9271),f=n(9310),p=n(4725),h=n(6866),m=n(7117),g=n(6539),v=(n(3948),n(1128)),y=n(5750),w=n(9481),_=n(3656),b=n(6451);function x(e){return 1===e?"bottom":2===e?"top":"center"}function T(e,t,n,r,i=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),u=i?i+"=>"+a:a;return s&&(s.text=u),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=T(e,t,n,r,u)})),t.text}async function k(e,t){const{destList:n,cascadeStart:r}=t.origin,o=(0,i.CE)(e.nodeList,n,r.uuid);o&&(t.cascade=await S(t,e,o,""))}async function S(e,t,n,o,u){u?await(0,r.dX)(u,e):u={uuid:"",text:""};const{nodeList:c}=t,l=o?o+"=>"+(0,_.pC)(u.uuid):(0,_.pC)(u.uuid),d={option:u,groupId:o,resultId:l,text:u.text||u.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect);const f=await async function(e,t,n){let i=n.cachedCasMenuOpts;i||(i=n.cachedCasMenuOpts={});const o=i[e.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,b.P)(t,e),s=await(0,r.gk)(n,o,a),u=await(0,w.PR)(t,s,n),c={...te({target:e},t),renderId:(0,_.am)(e.nodeUuid,n.loopStack)},l=await(0,r.gk)(n,e.otherOptions,[]),d=await(0,w.PR)(t,l,n),f={options:(0,y.uR)(c,u.visibleList),otherOptions:d.visibleList};return i[e.nodeUuid]=f,f}}(n,t,e),p={...te({target:n},t),...f,parent:t},h=(0,i.qX)(n),{min:m,max:g}=await(0,i.gx)(p,t),{destList:T,output:k}=n,I=(0,i.ZA)(n),O=[],E=h?(0,a.Iu)(s.bn.cascade.selectBetween,{min:m||1,max:g}):(0,a.Iu)(s.bn.cascade.selectSome,{amount:1}),C={...d,list:O,multiple:h,min:m,max:g,hint:E,required:I,display:x(n.menuType),lineCount:n.lineCount},P=(0,i.CE)(c,T,k.uuid),L=(0,v.eu)(p);(0,r.MT)(L);for(const n of L){const r=(0,i.CE)(c,T,n.uuid)||P,o=await S(e,t,r,l,n);O.push(o)}return C}function I(e,t,n){const r=function(e){const t=[];return e.forEach((e=>{const{pickedTimes:n}=e;t[n]?t[n].push(e):t[n]=[e]})),t}(e),i={items:[],done:!1};let o=t;for(const e of r)if(e){const t=(0,_.DQ)(e,o);if(t.forEach((e=>{i.items.push({option:e.option,value:0,round:n}),e.option.records.push({round:n,value:0}),e.pickedTimes+=1})),o-=t.length,0===o)break}return i}n(2707);var O=n(9698),E=n(7712);const C={optionsRelationship:{},groupsRelationship:{}},P=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function L(e){return"group"===e.type}function N(e){return"type"in e&&"group"===e.type}async function R(e,t){const{options:n,origin:r}=e;let i=r.optionGroups||[];if(o=e.type,!P.includes(o))return{optionGroups:void 0};var o;const a=function(e,t){const{optionRefers:n,refOptions:r}=e.origin;let i=[];const o=[];return n.forEach((e=>{const{identity:{nodeId:n}}=(0,O.V)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,E.ck)(t,n);if(!e)return;const a=M(U(e.optionGroups||[],e.origin.optionGroupsRelationship||C),r);i=i.concat(a)}})),i}(e,t);if(i=i.concat(a),0==i.length)return{optionGroups:void 0};i=function(e,t,n){const r=e.concat(t),i=(e,t)=>{if(L(e)){const n=e;let r=t;for(const e of n.children)r=Math.min(i(e,r),r);return r}{const t=e,r=n.map((e=>e.uuid)).indexOf(t.optionUuid);return-1===r?Number.MAX_VALUE:r}};return r.sort(((e,t)=>i(e,Number.MAX_VALUE)-i(t,Number.MAX_VALUE)))}(i,function(e,t){const n={};!function e(t){t.forEach((t=>{L(t)?t.children.forEach((t=>{L(t)?e(t.children):n[t.optionUuid]=t.groupUuids})):n[t.optionUuid]=t.groupUuids}))}(t);const r=[];e.forEach((e=>{n[e.uuid]||r.push(e)}));const i=[];return r.forEach((e=>{const t={text:e.text,optionUuid:e.uuid,groupUuids:[],type:"option",currentLevel:1};i.push(t)})),i}(n,i),n);let s=await B(i,n,t);return s=A(s),s=function(e,t){const{randomOptionY:n,circulation:r,followRandom:i}=e.origin;return r?j(t):n?i?t:F(t):t}(e,s),W(s,n),s=q(s),{optionGroups:s}}function A(e){const t=[];return e.forEach((e=>{N(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==A(t).length}(e)&&t.push(e):t.push(e)})),t}function U(e,t){return(e||[]).map((e=>{if(N(e)){const n=(0,_.p$)(e),{groupTitle:r,showGroupTitle:i,children:o,randomMode:a,type:s,uuid:u}=n;return{groupTitle:r,showGroupTitle:i,randomMode:a,type:s,uuid:u,children:U(o,t)}}{const n=(0,_.p$)(e),{text:r,uuid:i}=n;return{type:"option",text:r,optionUuid:i,groupUuids:t.optionsRelationship[i]||[]}}}))}function M(e,t){return e.map((e=>function(e,t){if(L(e)){const n=M(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:r,groupUuids:i,text:o,currentLevel:a}=e;return{type:r,groupUuids:i||[],text:o,currentLevel:a,optionUuid:t.find((e=>(0,_.RC)(n,e.refOptId))).uuid}}}(e,t)))}async function B(e,t,n){const r=[];for(const i of e){const e=await D(i,t,n);e&&r.push(e)}return r}async function D(e,t,n){if(L(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.Ur)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await B(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const F=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,_.XJ)(t.length+1);t.splice(n,0,e)})),t}(e),j=e=>{return t=e,n=(n||Math.round(10*Math.random()))%t.length,t.slice(n).concat(t.slice(0,n));var t,n};function W(e,t){e.forEach((e=>{if(N(e)){const{randomMode:n,children:r}=e;W(r||[],t);const i={followNode:()=>((e,t)=>{const{groups:n,options:r}=(e=>e.reduce(((e,t,n)=>{const{groups:r,options:i}=e;return N(t)?r.push({group:t,index:n}):i.push({uuid:t.uuid,option:t,index:n}),e}),{groups:[],options:[]}))(e),i=t.reduce(((e,t)=>{const{uuid:n}=t,i=r.find((({uuid:e})=>e===n));return i&&e.push(i.option),e}),[]);return n.forEach((({group:e,index:t})=>{i.splice(t,0,e)})),i})(r,t),noRandom:()=>r,random:()=>F(r),circulation:()=>j(r)};e.children=i[n]()}}))}function q(e){let t=[],n=[];const r=[];return e.forEach((e=>{if(N(e))e.children=q(e.children),r.push(e);else{const i=e.origin,{position:o}=i;"top-fixed"===o?t.push(e):"bottom-fixed"===o?n.push(e):r.push(e)}})),t=t.sort(((e,t)=>e.number-t.number)),n=n.sort(((e,t)=>e.number-t.number)),[...t,...r,...n]}var z=n(3087),V=n(7428),G=n(5905),H=n(6970),X=n(5286),K=n(9026),$=n(5838);const Z=["select","menu","select_image","select_icon","upload"];function J(e,t,n){let r=e.indexOf(t)+n;return r<0?r=0:r>e.length-1&&(r=e.length-1),e[r]}const Y={};function Q(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.q)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function ee(e){const{loop:t,parent:n,origin:r}=e,{lockLoopCount:i}=r;let o=r.nodeName.split("/")[0];if(o&&r.circleNode1Id&&!i&&!(0,u.vW)().realTimePreview){const e=(0,m.SN)();let i=await e.C_OL_LBL.getText({state:n});if(i||(i=t.node.nodeName+"_"+await e.C_OL_NUM.getText({state:n})),o=i+"_"+o,r.circleNode2Id){let r=await e.C_IL_LBL.getText({state:n});r||(r=t.node.nodeName+"_"+await e.C_IL_NUM.getText({state:n})),o=r+"_"+o}}return o}function te(e,t){const{target:n,loop:r,random:i,loopStack:o}=e;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:r,random:i,loopStack:o,type:n.type,parent:t}}async function ne(e,t){const n={...e,hasAnswer:!1,autoSkip:e.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:e.origin.checkMode,runtimeNodeName:await ee(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,u.vW)().realTimePreview,renderId:(0,i.So)(e),prev:t,errorMessage:""},o=e.parent;if(i.$i.indexOf(n.type)>-1)return async function(e,t){(0,u.Pg)(e,{autoSkip:!0,number:""});const n=Y[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,u.Pg)(e,{number:e.runtimeNodeName})}(n),function(e){(0,u.Pg)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,u.Pg)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var r;n.image?(0,u.Pg)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,b.nn)(e.parent,t)}):(0,u.Pg)(t,{images:[]}),n.video&&(0,u.Pg)(t,{autoplayVideo:n.autoplayVideo,video:n.video&&(r=n.video,r?{id:r.id,url:(0,V.f)(r.url),poster:(0,V.f)(r.poster)}:null)})}(n),await async function(e){if((0,G.n4)(e)){const{origin:t}=e;(0,u.Pg)(e,{layout:t.layout,template:await(0,H.b)(t.template,e.parent)})}}(n),await(0,r.Ds)(n,o),await async function(e,t){const n=await R(e,t);return(0,u.Pg)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=Y[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,i.gx)(e,e.parent),r=(0,i.qX)(t);(0,u.Pg)(e,{...n,multiple:r,selectType:r?"checkbox":"radio"})}(n),await(0,X.m)(n),(0,u.dU)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=c[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,u.Pg)(e,n))}(n),(0,i.jJ)(n),await async function(e){(0,G.Kf)(e)&&await async function(e){if(!(0,u.vW)().realTimePreview)if((0,_.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,u.Pg)(t,{selected:!0,sortNo:1}),(0,K.OP)(0,e)}}else if((0,_.is)(e,Z.indexOf(e.type)>-1)&&!await(0,$.yv)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,G.sy)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,u.Pg)(n,{selected:!0}),(0,K.eq)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,h.a7)(n),n}async function re(e,t,n){const r=!(!t||!t.id);let i;e.showRewards&&(i=e.options.map((e=>({rewardName:e.rewardName,rewardCount:e.rewardCount}))));const o=r?e.success:e.fail,c=r?(0,a.Iu)(s.bn.lottery.congratulation):(0,a.Iu)(s.bn.lottery.pity),l=r?(0,a.Iu)(s.bn.lottery.goal):(0,a.Iu)(s.bn.lottery.fail),f=o.title||c,p=o.summary||l,h=(0,d.q)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let m;if(r){const n=e.options.find((e=>e.uuid===t.lottery_option_id));n&&(m=n.rewardName)}const g=te({target:e},n),v=await ne(g,n.current);return(0,u.Pg)(v,{rewardRaw:t,rewardTime:(0,z.GN)(),goal:r,rewardImage:h.name?h:void 0,rewardTitle:f,rewardDescribe:p,rewardList:i,rewardName:m,showRewards:e.showRewards}),!(0,u.vW)().preview&&r&&((0,u.dU)().app.canHandleReward()||"red_envelope"!==t.type||await ie(n,v)),v}async function ie(e,t){const{formalResult:{reward:n,authorizer:r},nodeList:o}=e,{app_id:a,component_appid:s}=r,c=(0,i.nv)(o,n.gift_id);t.linkUrl=await(0,l.sb)(c.linkUrl,{state:e}),t.endBtnText=c.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,g.ZI)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,u.dU)().app.getRewardUrl(d)}Y.region=async e=>{(0,u.Pg)(e,{indexes:"0 0 0",value:"",regions:await(0,o.JL)(),infoRange:e.origin.infoRange})},Y.end=async e=>{const{parent:t}=e,n=await(0,l.sb)(e.origin.linkUrl,{state:t});(0,u.Pg)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},Y.location=async e=>{(0,u.Pg)(e,{regions:await(0,o.JL)(),infoRange:e.origin.infoRange,value:""})},Y.value_mark=async e=>{(0,u.Pg)(e,{showInput:e.origin.showInput})},Y.icon_mark=async e=>{(0,u.Pg)(e,{inverseValue:e.origin.inverseValue})},Y.menu=async e=>{const{origin:t}=e;(0,u.Pg)(e,{placeholder:t.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect),display:x(t.menuType),lineCount:t.lineCount})},Y.area=async e=>{(0,u.Pg)(e,{infoRange:"street",regions:await(0,o.JL)()})},Y.verify=async e=>{(0,u.Pg)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},Y.weight=async e=>{const{origin:t,parent:n}=e,r=await(0,i.Vg)(t,n);(0,u.Pg)(e,{weightTotal:r,unit:t.unit,distributeBy:t.distributeBy})},Y.max_diff=async e=>{const{origin:t}=e,n=function(e){const{options:t,origin:n}=e,{taskCount:r,itemCountPerTask:i}=n,o=t.map((e=>({option:e,pickedTimes:0}))),a=[];for(let e=0;e<r;e++)a.push(I(o,i,e+1));return a}(e);(0,u.Pg)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,u.Pg)(e,{currentTask:J(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,u.Pg)(e,{currentTask:J(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,u.Pg)(e,{currentTask:t})}})},Y.slide_rate=async e=>{(0,u.Pg)(e,{currentOption:e.options[0],gotoNextOption(){(0,u.Pg)(e,{currentOption:J(e.options,e.currentOption,1)})},gotoPrevOption(){(0,u.Pg)(e,{currentOption:J(e.options,e.currentOption,-1)})},gotoOption(t){(0,u.Pg)(e,{currentOption:t})}})},Y.select_image=async e=>{(0,u.Pg)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},Y.cascade=async e=>{await k(e.parent,e),function(e){const t=[],n=e=>{t.push(e),e.list&&e.list.forEach((e=>n(e)))};n(e.cascade),e.options.forEach((n=>{if(n.origin.useComment){const i=t.find((e=>e.resultId===n.cascadePath));n.inputType=(0,r.kv)(i.option.origin,e.type)}}))}(e),T(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.i5)(e,e.options)},Y.hot_spot=async e=>{(0,u.Pg)(e,{...Q(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},Y.heat_map=async e=>{(0,u.Pg)(e,{...Q(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},Y.loop=async e=>{const{parent:t}=e;(0,p.kw)(e,t)||(e.varList=await(0,p.n0)(t,e))}},5286:(e,t,n)=>{"use strict";n.d(t,{m:()=>s,y:()=>a});var r=n(4248),i=n(5905),o=n(6935);async function a(e){const{parent:t,origin:n}=e,i=await(0,o.Ur)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,r.Pg)(e,{description:i})}async function s(e){(0,i.LK)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,i=await(0,o.Ur)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,r.Pg)(e,{title:i})}(e),await a(e))}},6970:(e,t,n)=>{"use strict";n.d(t,{b:()=>o}),n(3948);var r=n(4248),i=n(6935);async function o(e,t){if(!e)return{param:{}};const n=await(0,r.dU)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,i.e_)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},6866:(e,t,n)=>{"use strict";n.d(t,{pI:()=>R,p9:()=>A,VY:()=>z,nX:()=>V,_I:()=>F,VJ:()=>X,Yk:()=>M,g1:()=>q,f$:()=>j,p8:()=>W,a7:()=>D,O2:()=>G,sB:()=>H}),n(2707),n(3948);var r=n(1128),i=n(9564),o=n(3768),a=n(3251),s=n(9309),u=n(4248),c=n(3656),l=n(5159),d=n(5905);const f={};function p(e,t){t&&e&&(t.selected=e.selected,t.option.selected=e.selected,t.list&&e.list&&t.list.forEach((t=>{const n=e.list.find((e=>e.resultId===t.resultId));n&&p(n,t)})))}function h(e){return e?{selected:e.selected,resultId:e.resultId,list:e.list&&e.list.map((e=>h(e)))}:null}function m(e,t){t.startTime=e.startTime,t.costTime=e.costTime,t.type=e.type,function(e,t){t.validateFailTimes=e.validateFailTimes,t.validateFailed=e.validateFailed}(e,t)}f.max_diff={cache(e,t){t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({uuid:e.option.uuid,value:e.value,round:e.round}))),done:e.done}))),t.currentTaskIndex=e.tasks.indexOf(e.currentTask)},use(e,t){e.tasks&&(t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({option:(0,r.cW)(t.options,e.uuid),value:e.value,round:e.round}))),done:e.done}))),t.currentTask=t.tasks[e.currentTaskIndex||0])}},f.slide_rate={use(e,t){t.currentOption=t.options[e.currentTaskIndex||0]},cache(e,t){t.currentTaskIndex=e.options.indexOf(e.currentOption)}},f.cascade={use(e,t){p(e.cascade,t.cascade)},cache(e,t){t.cascade=h(e.cascade)}},f.verify={borrow(e,t){t.code=e.code,t.phoneNumber=e.phoneNumber}},f.region={borrow(e,t){t.indexes=e.indexes,t.position=e.position,t.value=e.value}},f.location=f.area={borrow(e,t){f.region.borrow(e,t),t.succeed=e.succeed,t.failed=e.failed,t.failedSkipActivated=e.failedSkipActivated}},f.sequence={use(e,t){e.rankList&&t.options.sort(((t,n)=>e.rankList.indexOf(t.uuid)>e.rankList.indexOf(n.uuid)?1:-1))},cache(e,t){t.rankList=e.options.map((e=>e.uuid))}},f.heat_map={use(e,t){t.clickTimes=e.options.length}};const g=["select","select_icon","select_image","menu","hot_spot"];var v=n(5753),y=n(6064);const w={};function _(e,t,n){t.value=e.value,t.selected=e.selected,e.assistValue&&(t.assistValue=t.assistValue||{},Object.keys(e.assistValue).forEach((n=>{(0,y.O2)(e.assistValue[n])||(t.assistValue[n]=e.assistValue[n])})),"cache"===n&&0===Object.keys(t.assistValue).length&&delete t.assistValue)}function b(e,t,n){if(_(e,t,"use"),!t.isOtherOpt){const r=w[n];r&&(r.use?r.use(e,t):r.borrow&&r.borrow(e,t))}}w.max_diff={borrow(e,t){e.records&&(t.records=e.records.map((e=>({...e}))))}},w.sequence={borrow(e,t){t.sortNo=e.sortNo}},w.heat_map={borrow(e,t){e.point&&(t.point={...e.point})}},w.weight={borrow(e,t){t.percent=e.percent}},w.upload={borrow(e,t){t.fileName=e.fileName,t.fileType=e.fileType,t.filePath=e.filePath,t.isImage=e.isImage},cache(e,t){w.upload.borrow(e,t),t.value=e.miniValue||e.value},use(e,t){w.upload.borrow(e,t),t.fileName&&(0,v.SV)(t,e)}};var x=n(5721);let T=!1,k="";const S=["data","describe","logic","random","loop"];let I,O,E,C,P={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function L(e){const{offlineTaskId:t,preview:n}=(0,u.vW)();if(n)return"preview_cache_"+(0,c.pC)(e);{const n="response_cache_"+(0,c.pC)(e);return t?n+"_with_"+t:n}}function N(e,t){const n={};return function(e,t,n){if(t.uuid=e.uuid,_(e,t,"cache"),!e.isOtherOpt){const r=w[n];r&&(r.cache?r.cache(e,t):r.borrow&&r.borrow(e,t))}}(e,n,t),n}function R(e){if((0,u.dU)().dev.infer||T)return;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,r.eu)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),P.error[e.renderId]=t}async function A(e){if((0,u.dU)().dev.infer||T)return;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return;const t={};!function(e,t){m(e,t);const n=f[t.type];n&&(n.cache?n.cache(e,t):n.borrow&&n.borrow(e,t))}(e,t);const n=(0,o.py)(e);if(n&&n.items){const r=n.items.map((e=>e.option_id.toLowerCase())),i=e=>!!n.items&&r.includes(e.uuid.toLowerCase());(0,d.Kf)(e)&&(t.options=e.options.filter(i).map((t=>N(t,e.type)))),(0,d.sy)(e)&&(t.otherOptions=e.otherOptions.filter(i).map((t=>N(t,e.type))))}P.responseId=e.parent.transactionID,P.data[e.renderId]=t;const r=e.parent.randomList;r&&(P.randomList=r.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),P.randomAbandonedNodeIds=(0,x.Ym)()),await U(e.parent)}async function U(e){const{sid:t,renderList:n}=e,r=L(t);P.locale=(0,l.BH)();const i=Object.keys(P.data);P.count=0;for(const e of n)if(i.includes(e.renderId)&&(P.count+=1),e.renderId===P.point)break;await(0,u.dU)().storage.setVital(r,JSON.stringify(B(P)))}async function M(e){const t=L(e),n=await(0,u.dU)().storage.getVital(t);if(n){const e=JSON.parse(n);return k||(k=e.locale),e}return null}function B(e){const t=e.data,n={};return Object.keys(t).forEach((e=>{const r={...t[e]};"upload"===r.type&&(r.options=r.options.map((e=>((e={...e}).miniValue&&(e.value=e.miniValue,delete e.miniValue),e)))),n[e]=r})),{...e,data:n}}function D(e){if((0,u.dU)().dev.infer)return e;if((0,i.$X)(e)||S.includes(e.type)||e.readonly)return e;!function(e){const t=P.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,r.eu)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=P.data[e.renderId];return t?(function(e,t,n){const i=(0,r.eu)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of i){const t=(0,r.cW)(o,e.uuid);t&&b(t,e,n)}}(e,t,e.type),function(e,t){m(e,t);const n=f[t.type];n&&(n.use?n.use(e,t):n.borrow&&n.borrow(e,t))}(t,e),function(e){if((0,i.qX)(e.origin)||!(0,d.Kf)(e))return;let t=(0,d.sy)(e)?e.otherOptions:[];g.includes(e.type)&&(t=[...t,...e.options]);const n=t.filter((e=>e.selected));if(n.length<=1)return;const r=[];n.forEach((e=>{e.autoSelectMarked?(0,u.Pg)(e,{selected:!1,autoSelectMarked:!1}):r.push(e)})),r.length>1&&r.forEach(((e,t)=>{t<r.length-1&&(0,u.Pg)(e,{selected:!1})}))}(e),I&&I(e),e):(I&&I(e),e)}function F(e=!1){return e?B(P):P}async function j(e,t,n){P=e,E=[...e.randomList||[]],(0,x.Ns)(e.randomAbandonedNodeIds,t.nodeList),C=e.point;const r=P.count;let i=0;T=!0,I=()=>{i>=r?O({failed:!1,error:""}):(n.onProgress("".concat(i,"/").concat(r)),i++)},O=e=>{o(),I=null,O=null,a.s$.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.s$.off("NEXT_OK",c),a.s$.off("STRETCH_OK",c),a.s$.off("NEXT_OK",u),T=!1},u=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():O({failed:!0,error:t})},c=()=>t.current.renderId===C?O({failed:!1,error:""}):t.handleEvents.handleNextClick();a.s$.one("STRETCH_OK",c),a.s$.on("NEXT_FAIL",u),a.s$.on("NEXT_OK",c),a.s$.trigger("START_MEMORY"),await(0,s.$A)()}function W(e,t){if(!E)return e;const n=E.find((e=>e.nodeId===t.nodeUuid));if(!n)return e;const r=n.destPortIds,i=[],o=[];return e.forEach((e=>{r.includes(e)?i.push(e):o.push(e)})),i.sort(((e,t)=>r.indexOf(e)>r.indexOf(t)?1:-1)),[...i,...o]}function q(){P={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function z(e){q();const t=L(e.sid);await(0,u.dU)().storage.removeVital(t)}async function V(e,t){t.forEach((e=>{delete P.data[e]})),await U(e)}function G(e){T||(P.point=e.current.renderId)}async function H(e){G(e),await U(e)}async function X(e){return e?(k||await M(e),k):""}},3803:(e,t,n)=>{"use strict";n.d(t,{m:()=>l,q:()=>d});var r=n(6866),i=n(9026),o=n(4248),a=n(7550),s=n(5159);class u{constructor(e,t){if(e&&e.data&&Object.keys(e.data).length>0){const{langResume:n}=t;this.holder=e,this.state=t,this.show=!0,this.title=n?(0,a.Iu)(s.bn.langResume.title):(0,a.Iu)(s.bn.memory.title),this.message=n?"":(0,a.Iu)(s.bn.memory.message),this.sureText=n?"":(0,a.Iu)(s.bn.memory.sure),this.denyText=n?"":(0,a.Iu)(s.bn.memory.deny)}}async handleSure(){if(!this.holder||d())return;const e=this;return this.state.enterMode="resume",(0,o.Pg)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,i.Ts)(this.state,e.holder.responseId||""),await(0,o.dU)().hook.onResumeSurvey(this.state),(0,r.f$)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.Pg)(e,{show:!0}),(0,o.Pg)(e,{message:t})},onSuspend(){e.suspend()}})}async handleDeny(){d()||(await(0,o.dU)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.Pg)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.Pg)(this,{show:!1})}}let c=null;async function l(e){const t=await(0,r.Yk)(e.sid);return c=new u(t,e),c}function d(){return c&&c.resuming}},698:(e,t,n)=>{"use strict";n.d(t,{V:()=>i,z:()=>o});var r=n(4248);function i(){return{primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}}function o(e={primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}){e.error=e.error||e.contrast,e.button=e.button||e.contrast,(0,r.vW)().theme=e,(0,r.vW)().setTheme(e)}},6213:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(4248),i=n(3656);function o(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat("prs-").concat((0,i.pC)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:r,color:i,fontSize:o,italic:a,lineThrough:s,underline:u}=e;return n&&(t+="background-color: ".concat(n,";")),i&&(t+="color: ".concat(i,"; ")),r&&(t+="font-weight: bold;"),a&&(t+="font-style: italic;"),s&&(t+="text-decoration: line-through;"),u&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,r.dU)().ui.setPresetStyle(t,e)}},4248:(e,t,n)=>{"use strict";n.d(t,{IO:()=>c,JN:()=>u,Pg:()=>f,dU:()=>l,vW:()=>d});var r=n(3251),i=n(3656);let o=null,a=null;const s=(0,i.Ds)((()=>r.s$.trigger("SET_PROPS")),1e3/60);function u(e){a=e}function c(e){o=e}function l(){if(!a)throw new Error("Env not yet initialized");return a}function d(){if(!o)throw new Error("Client not yet initialized");return o}function f(e,t){e&&t&&(Object.keys(t).forEach((n=>{e[n]=t[n]})),o.silentSetter||s())}r.s$.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},3087:(e,t,n)=>{"use strict";function r(e){if(!e)return"00:00";const t=e%60;return i((e-t)/60)+":"+i(t)}function i(e){let t=e+"";return 1===t.length&&(t="0"+t),t}function o(){const e=new Date;return e.getFullYear()+"-"+i(e.getMonth()+1)+"-"+i(e.getDate())+" "+i(e.getHours())+":"+i(e.getMinutes())+":"+i(e.getSeconds())}n.d(t,{GN:()=>o,IA:()=>r,bi:()=>i})},2812:(e,t,n)=>{"use strict";n.d(t,{BT:()=>u,Hd:()=>a,JL:()=>s,ks:()=>c});var r=n(5142);let i;function o(e){e.forEach((e=>{e.cities&&0!==e.cities.length||(e.cities=[{name:e.name,code:e.code,areas:[{name:e.name,code:e.code}]}]),e.cities.forEach((e=>{e.areas&&0!==e.areas.length||(e.areas=[{name:e.name,code:e.code}])}))}))}function a(e){i=e,o(i)}async function s(){return i||(i=await(0,r.vT)("https://media.choiceform.com/static-assets/regions-2020.json",{type:"GET"},!0),o(i)),i}function u(e){if(!e)return"";const t=e.split("-"),n=t[0],r=i.find((e=>n.indexOf(e.name)>-1));if(!r)return"";const o=r?r.code+"":"",a=t[1];if(!a)return o;const s=r.cities.find((e=>a.indexOf(e.name)>-1));if(!s)return o;const u=s?s.code+"":"",c=t[2];if(!c)return u;const l=s.areas.find((e=>c.indexOf(e.name)>-1));return(l?l.code+"":"")||u||o||""}function c(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,r=i[t[0]];let o,a,s=r.name;return n>1&&(o=r.cities[t[1]],s+="-"+o.name,n>2&&(a=o.areas[t[2]],s+="-"+a.name)),s}},2125:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(4248);function i(e,t){return new(0,(0,r.dU)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},7550:(e,t,n)=>{"use strict";n.d(t,{$1:()=>m,HP:()=>y,Iu:()=>v,P_:()=>g,Vj:()=>f,nE:()=>p,u4:()=>h}),n(5306);var r=n(3251),i=n(5159),o=n(4248),a=n(6539),s=n(9141);const u=["zh_cn","en_us"];function c(){const{offline_survey_id:e}=(0,a.ZI)(),t="language";return e?t+e:t}async function l(){return(0,o.dU)().storage.getVital(c())}function d(e,t){return!!t&&e.some((e=>e.locale===t))}async function f(e,t){const n=await l();if(d(e,n))return n;const r=function(){const e=(0,o.dU)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.Z.langTable.find((e=>e.locale.startsWith(t)));return n?n.locale:t}(e):"en_us"}();return d(e,r)?r:t}async function p(e,t){return e!==await l()&&(m(e,!0),await async function(e){return(0,o.dU)().storage.setVital(c(),e)}(e),(0,o.dU)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.dU)().storage.set("lang-resume","true"),(0,o.dU)().hook.beforeForceLeave(),(0,o.dU)().app.reload(),!0)}function h(e){let t="en_us";u.includes(e)&&(t=e),i.i_(t),(0,o.vW)().setLocale(t),r.s$.trigger("LANG_CHANGE");const n=s.Z.langTable.find((t=>t.locale===e));(0,o.dU)().hook.onLangChange(n)}function m(e="en_us",t=!1){return t||h(e),e}function g(e){return e.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((e,t,n)=>"{".concat(t,"} ").concat(n)))}function v(e,t){return t?(0,o.dU)().system.translate(e,t):e}function y(e,t){const n=e&&t.length>1&&null===(0,o.dU)().storage.get("anti-show-init-lang-select");return(0,o.dU)().storage.remove("anti-show-init-lang-select"),!!n}},9271:(e,t,n)=>{"use strict";n.d(t,{J:()=>o,q:()=>a});var r=n(4665),i=n(4248);function o(e){return(0,i.vW)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:i,id:a,originName:s}=e,u=o(i);return{ratio:Math.round(n/t*1e5)/1e5,url:u,natural:(0,r.p)(u,"@m720"),thumbnail:(0,r.p)(u,"@avatar"),large:(0,r.p)(u,"@m1080"),width:t,height:n,id:a,originName:s,name:i}}},2167:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9141);async function i(e){return"string"==typeof e?JSON.parse(r.Z.inflateBase64(e)):e}},248:(e,t,n)=>{"use strict";n.d(t,{eb:()=>m,iZ:()=>h,mj:()=>g,pe:()=>p,ub:()=>v}),n(3948);var r=n(3656),i=n(7492),o=n(5905);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&i.b.forEach((n=>{const r=e.mapping[n];r&&"object"==typeof r||(e.mapping[n]=t.mapping[n]||"")}))}function u(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.RE)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((i=>{const o=n.find((e=>(0,r.pC)(e.uuid)===i));o&&function(e,t,n){(function(e,t){return!(e.isRef||!e.isOtherOpt&&["cascade","region","area","location"].includes(t.type))})(e,n)&&(e.text=t.text||""),e.optComment=t.optComment||"",s(e,t),e.selectText=t.selectText,e.autoInputConfig&&t.autoInputConfig&&(e.autoInputConfig.defaultValue=t.autoInputConfig.defaultValue||"")}(o,t.options[i],e)}))}function c(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),u(e,t),c(e.validation,t.validation),function(e,t){const{optionGroups:n}=e;if(!n)return;const i=t.optionGroups||{},o=e=>{e.forEach((e=>{if((0,r.is)(e,"group"===e.type)){const t=(0,r.pC)(e.uuid),n=i[t];n&&(e.groupTitle=n.groupTitle);const a=e.children||[];o(a)}}))};o(n)}(e,t)}const d={};function f(e,t){e.value=t.value||""}function p(e,t={}){const{nodes:n,variables:i,groups:o}=t,{nodes:a,variables:s,groups:u}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],i=a.find((t=>t.nodeUuid&&(0,r.pC)(t.nodeUuid)===e));i&&function(e,t){const n=d[e.type];n?n(e,t):l(e,t)}(i,t)})),s&&i&&Object.keys(i).forEach((e=>{const t=i[e],n=s.find((t=>(0,r.pC)(t.uuid)===e));n&&f(n,t)})),u&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=u.find((t=>(0,r.pC)(t.id)===e));n&&function(e,t){e.prevText=t.prevText||"",e.nextText=t.nextText||""}(n,t)}))}function h(e,t){e&&e.forEach((e=>{e.data.forEach((e=>{const n=e[t];n&&(e.name=n)}))}))}function m(e,t){t&&d.start(e,t)}function g(e,t){t&&d.gift(e,t)}function v(e,t){t&&f(e,t)}d.end=(e,t)=>{a(e,t),e.endBtnText=t.endBtnText||""},d.gift=(e,t)=>{a(e,t),e.activityName=t.activityName||"",e.endBtnText=t.endBtnText||"",e.blessings=t.questionText||""},d.loop=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const i=e.options.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.lottery=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const i=e.options.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.rewardName=t.options[n].rewardName)})),t.success&&(e.success.title=t.success.title||"",e.success.summary=t.success.summary||""),t.fail&&(e.fail.title=t.fail.title||"",e.fail.summary=t.fail.summary||"")},d.value_mark=(e,t)=>{l(e,t),e.minText&&(e.minText=t.minText||"",e.maxText=t.maxText||"")},d.menu=(e,t)=>{l(e,t),e.placeholder=t.placeholder||""},d.start=(e,t)=>{e.questionText=t.questionText||"",e.startName=t.startName||"",e.logoText=t.logoText||"",e.startBtnText=t.startBtnText||"",e.nextBtnText=t.nextBtnText||"",e.prevBtnText=t.prevBtnText||"",e.timeoutText=t.timeoutText||"",e.timeLessText=t.timeLessText||"",c(e.validation,t.validation)},d.slide_rate=(e,t)=>{l(e,t),(t.options||e.rateOptions)&&Object.keys(t.options).forEach((n=>{const i=e.rateOptions.find((e=>(0,r.pC)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),c(e.validation,t.validation),t.options){let n=[];e.optionsX&&(n=[...n,...e.optionsX]),e.optionsY&&(n=[...n,...e.optionsY]),e.otherOptions&&(n=[...n,...e.otherOptions]);const i=e.options||[];Object.keys(t.options).forEach((e=>{const o=t.options[e],a=i.find((t=>(0,r.pC)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,r.pC)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{u(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},8413:(e,t,n)=>{"use strict";function r(e,t="-",n="street"){let r=e.province;return"province"!==n&&e.city&&(r+=t+e.city,"city"!==n&&e.district&&(r+=t+e.district,"county"!==n&&(e.street&&(r+=t+e.street),e.street_number&&(r+=e.street_number)))),r}function i(e){return e*(Math.PI/180)}function o(e,t){const n=i(t.lat-e.lat),r=i(t.lng-e.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(i(e.lat))*Math.cos(i(t.lat))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(t,{L:()=>r,S:()=>o})},3656:(e,t,n)=>{"use strict";n.d(t,{BY:()=>u,DQ:()=>g,Ds:()=>_,Dy:()=>l,FL:()=>y,M8:()=>d,RC:()=>p,Rf:()=>T,Tm:()=>v,XJ:()=>m,_v:()=>x,am:()=>c,is:()=>s,kr:()=>a,p$:()=>w,pC:()=>f,s$:()=>b,sG:()=>o,xT:()=>h}),n(2707),n(5306),n(8206),n(3948);var r=n(6064);const i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function o(e){return e.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(e){return e.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(e,t){return t}function u(e=1,t=5){const n=h(e,t),r=i.length;let o="";for(let e=0;e<n;e++){const e=h(0,r);o+=i[e]}return o}function c(e,t){if(36!==e.length)throw new Error("invalid uuid");return t?l(e,t.map((e=>f(e.varList[e.currentIndex].uuid)))):e}function l(e,t){if(36!==e.length)throw new Error("invalid uuid");return t&&t.forEach((t=>{e+="-"+f(t)})),e}function d(){const e=new Array(36);let t,n=0;for(let r=0;r<36;r++)8==r||13==r||18==r||23==r?e[r]="-":14==r?e[r]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,e[r]=i[19==r?3&t|8:t]);return e.join("").toLowerCase()}function f(e){return e.substring(e.length-8)}function p(e="",t=""){return e=e.toLowerCase(),t=t.toLowerCase(),8===e.length&&36===t.length?e===f(t):36===e.length&&8===t.length?f(e)===t:e===t}function h(e,t){return e>t&&([e,t]=[t,e]),e+m(t-e+1)}function m(e){return Math.floor(Math.random()*e)}function g(e,t){const n=[...e];if((0,r.O2)(t))return n;if(0===(t=Number(t)))return[];if(t<0||isNaN(t))return n;if(1===t)return n.splice(m(n.length),1);const i=[];for(n.length<t&&(t=n.length);i.length<t;){const e=m(n.length);i.push(n.splice(e,1)[0])}return i}function v(e,t){e&&"object"==typeof e&&Object.keys(e).forEach((n=>{const r=e[n];Array.isArray(r)&&r.forEach((e=>{v(e,t)})),"object"==typeof r&&v(r,t),t(e,n)}))}function y(e,t){if(e<t)throw new Error("can not random distribute");const n=function(e,t){const n=[];for(;n.length<t;){const t=h(1,e-1);n.includes(t)||n.push(t)}return n.sort(((e,t)=>e>t?1:-1)),n}(e,t-1),r=n.map(((e,t)=>e-(n[t-1]||0)));return r.push(e-n[n.length-1]),r}function w(e){const t=new WeakMap;return function e(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((t=>e(t)));const r=t.get(n);if(r)return r;const i={};return t.set(n,i),Object.keys(n).forEach((t=>{i[t]=e(n[t])})),i}(e)}function _(e,t=0){let n=-1;return function(...r){const i=this;clearTimeout(n),n=setTimeout((()=>{e.apply(i,r)}),t)}}async function b(e,t,n){const r=[];e.replace(t,((e,...t)=>(r.push(n(e,...t)),e)));const i=await Promise.all(r);return e.replace(t,(()=>i.shift()))}function x(e=0){return new Promise((t=>setTimeout(t,e)))}async function T(e){return e}},5905:(e,t,n)=>{"use strict";function r(e){return!!e.origin.layout}function i(e){const t=e.origin;return void 0!==t.questionText||void 0!==t.describe}function o(e){return!!e.origin.options}function a(e){return!!e.origin.optionGroups}function s(e){return!!e.origin.fillType}function u(e){return!!e.otherOptions}function c(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{Ck:()=>s,Kf:()=>o,LK:()=>i,QM:()=>c,RE:()=>u,iN:()=>d,n4:()=>r,sy:()=>l,ub:()=>a})},6064:(e,t,n)=>{"use strict";function r(e){return o(e)?"":String(e)}function i(e){if(o(e))return"";const t=Number(e);return isNaN(t)?e:t}function o(e){return e instanceof Array?0===e.length:"boolean"!=typeof e&&0!==e&&!e}n.d(t,{KF:()=>r,O2:()=>o,Xm:()=>i})},4665:(e,t,n)=>{"use strict";n.d(t,{D:()=>o,p:()=>i});var r=n(7428);function i(e,t){return e.endsWith(".svg")||(0,r.s)()?e:e+t}function o(e=[]){const t=[];return e.includes("video")&&t.push("video/*"),e.includes("audio")&&t.push("audio/*"),e.includes("image")&&t.push("image/*"),e.includes("doc")&&t.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),t.join()}},3756:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(5159),i=n(7550);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,i.Iu)(r.bn.reward.weChatName)}}},866:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(4248);const i=["beforecopy","beforepaste","beforecut","copy","paste","cut","animationstart","animationend","animationiteration","transitionend","scroll","wheel","blur","click","dblclick","focus","focusin","focusout","input","keypress","keyup","keydown","select","change","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","touchcancel","touchend","touchmove","touchstart","unload","cancel","close","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","loadedmetadata","loadeddata","durationchange","timeupdate","play","pause","ratechange","volumechange","suspend","emptied","stalled","invalid","reset","submit","invalid","reset","submit","show","contextmenu","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","webglcontextcreationerror","webglcontextlost","webglcontextrestored","error","load","loadend","loadstart","progress"];function o(e){if("SCRIPT"===e.tagName)e.parentElement&&e.parentElement.removeChild(e);else{i.forEach((t=>{e.removeAttribute("on"+t)}));for(let t=e.children.length-1;t>=0;t--){const n=e.children[t];1===n.nodeType&&o(n)}}}function a(e){if(!e||e.includes("data-safe-html="))return e;const t=(0,r.dU)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},2872:(e,t,n)=>{"use strict";function r(e){const t={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(e){const n=JSON.parse(e);return{...t,...n}}return t}n.d(t,{BB:()=>o,X8:()=>i,gh:()=>a,m5:()=>r});const i=e=>{if(!e)return!1;const{limitSrc:t,limitType:n,limitStart:r,limitEnd:i}=e;return!(!t||!n||1==n&&"0"==r&&"0"==i)};function o(e){const t=function(e){if(!e)return e;const t={};return e.phParams&&e.phParams.length>0&&(t.phParams=e.phParams),i(e)&&(t.limitSrc=e.limitSrc,t.limitType=e.limitType,t.limitStart=e.limitStart,t.limitEnd=e.limitEnd),"-1"!=e.limitRnd&&(t.limitRnd=e.limitRnd),e.disorder&&(t.disorder=e.disorder),e.outOfResult&&(t.outOfResult=e.outOfResult),Number(e.imgHeight)&&(t.imgHeight=e.imgHeight),Number(e.imgWidth)&&(t.imgWidth=e.imgWidth),0===Object.keys(t).length?void 0:t}(e);return t?JSON.stringify(t):""}function a(e){const t={};return e.forEach((e=>{t[e.name]=e.value})),t}},3608:(e,t,n)=>{"use strict";n.d(t,{B3:()=>u,BF:()=>g,Kz:()=>h,L7:()=>c,MD:()=>d,XY:()=>p,mh:()=>m}),n(5306);var r=n(6935),i=n(9271),o=n(3656),a=n(7117),s=n(4248);function u(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.indexOf("TO_GLOBAL")>-1&&"var-html"===e.type&&(t+=(0,r.IY)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.dU)().ui.setGlobalStyle(t)}(e.variables),function(e){if(e){const t=l(e.allJson,null)+l(e.strJson,"var-string")+l(e.expJson,"var-expression")+l(e.reqJson,"var-request")+l(e.loopJson,"var-loop");(0,s.dU)().ui.setVarStyle(t,e)}}(e.varStyles)}function c(e){let t="";return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline?t+="text-decoration: underline;":e.lineThrough&&(t+="text-decoration: line-through;"),e.color&&(t+="color: ".concat(e.color,";")),e.backgroundColor&&(t+="background-color: ".concat(e.backgroundColor,";")),e.fontSize&&(t+="font-size: ".concat(e.fontSize,";"),t+="line-height: 1.4;"),t}function l(e,t){if(!e)return"";let n=t?".var-light.".concat(t,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=c(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:g((0,i.J)(this.serverFileName),t.config,this.fileName)};e.forEach((e=>{e.getText=t,e.isMedia=!0,e.type="var-media"}))}function f(e){if(e)return{...e,identity:{baseId:e.uuid}}}function p(e="",t){return f(t.find((t=>t.name===e)))}function h(e="",t){return t.find((t=>(0,o.RC)(t.id,e)))}function m(e="",t){let n;const r=h(e,t.imageList);return r?n={...r,type:"var-media",uuid:r.id,name:""}:(n=t.variables.find((t=>(0,o.RC)(t.uuid,e))),n||(n=(0,a.jd)(e))),f(n)}function g(e="",t={imgHeight:0,imgWidth:0},n="Image",r=!1){let i="##"+e;return r||(i+="?w=".concat(t.imgWidth||0,"&h=").concat(t.imgHeight||0),n&&(i+="#"+n)),i+"##"}},7089:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,c:()=>i}),n(5306);const r=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function i(e){return e.baseId?e.baseId:r.map((t=>e[t]||"")).join(":").replace(/:+$/,"")}function o(e){if(!e.includes(":"))return{baseId:e};const t=e.split(":"),n={};return t.forEach(((e,t)=>{const i=r[t];n[i]=e})),n}},7712:(e,t,n)=>{"use strict";n.d(t,{DC:()=>L,Dy:()=>C,HX:()=>_,Hz:()=>E,KP:()=>N,Lr:()=>P,Sq:()=>b,V0:()=>I,b:()=>x,ck:()=>k,g:()=>T,is:()=>R,sP:()=>S,sb:()=>A,wc:()=>O}),n(3948);var r=n(6935),i=n(3146),o=n(3656),a=n(5750),s=n(1128),u=n(656),c=n(3608),l=n(7117),d=n(6064),f=n(4248),p=n(7089),h=n(2872),m=n(9758),g=n(7529),v=n(3817),y=n(9564),w=n(7552);function _(e){e=(0,m.Ko)(e);const t=(0,f.dU)().system.newDiv();return t.innerHTML=e,t}function b(e="",t){return t||(t=_(e)),[...t.querySelectorAll(".var-tag")]}function x(e=""){return String(e).indexOf("var-tag")>-1}function T(e){return(0,o.is)(e,1===e.nodeType)&&e.classList.contains("var-tag")}function k(e,t=""){const{loopStack:n,context:r}=e;let{renderList:i}=e;const a=(0,y.KF)(e,t);if(!a)return;const s=(0,o.am)(a,n);return r.node&&(i=[...i,r.node]),i.find((e=>s.startsWith(e.renderId)))}function S(e,t,n,r){if(!n)return null;const i=[n];r&&i.push(r);const a=(0,y.KF)(e,t);if(!a)return;const s=(0,o.Dy)(a,i);return(0,g.JL)(e.renderList,s)}function I(e){return{name:e.innerText,identity:(0,p.Q)(e.getAttribute("data-v-id")),config:(0,h.m5)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function O(e,t){return C(e,I(t))}function E(e){const{identity:t,config:n}=e;let r=(0,p.c)(t);if(!n)return r;if((0,h.X8)(n)){const{limitSrc:e,limitType:t,limitStart:i,limitEnd:o}=n;r+="_".concat(e,"_").concat(t,":").concat(i,":").concat(o)}const{limitRnd:i,phParams:o}=n;if((0,d.O2)(i)||"-1"==i||(r+="_".concat(i)),!(0,d.O2)(o)){const e=(0,h.gh)(o);r+="_".concat(JSON.stringify(e))}return r}function C(e,t){const n=E(t={...t,config:t.config||{}}),{identity:r,config:i,name:o,inEdist:a}=t,d=(0,p.c)(r),f={identity:r,config:i},{baseId:h,nodeId:m,nodePartId:g,optFilterId:y,optId:w,optPartId:_,loopRoundId:b,innerLoopRoundId:x}=r;if(h){if(A(h)){const[e,t]=h.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,c.mh)(h,e);return t?{...f,...t,name:o,mapId:n,inEdist:a}:null}let T,I="";if(b){if((0,v.N)(r))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(T=S(e,m,b,x),!T)return}else if(u.hi(g))I=m;else if(T=k(e,m),!T)return;if(g){const e=(0,l.jd)(g);return e&&{...f,uuid:d,name:o,node:T,nodePart:e,lookupLoopNodeId:I,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const O=(0,l.jd)(_,T);if(!O)return;const C="var-media"===O.type;if(y){const e=(0,l.jd)(y,T);if(!e)return;return{...f,inEdist:a,name:o,node:T,optionPart:O,optionFilter:e,uuid:d,lookupLoopNodeId:I,isMedia:C,type:O.type,mapId:n}}const P=(0,s.cW)((0,s.Kn)(T),w);return P?{...f,inEdist:a,name:o,node:T,option:P,optionPart:O,uuid:d,lookupLoopNodeId:I,isMedia:C,type:O.type,mapId:n}:void 0}async function P(e,t){let n=[];const{varInfo:{optionFilter:s,option:u,config:c}}=e,l=await(0,r.Ob)(c.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||u;n=d&&await(0,i.D)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.DQ)(n,l);return c.disorder?(0,a.T_)(f):f}async function L(e){const{varInfo:{nodePart:t,optionPart:n,option:r}}=e,o=e.specifiedOpt||r;if(t&&t.getBool)return t.getBool(e);if(o)return await(0,i.D)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await P(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});t&&r.push(t)}return r.length>0}}async function N(e){const{varInfo:{nodePart:t,optionPart:n,option:r}}=e,o=e.specifiedOpt||r,a=e.joinBy||" ";if(t&&t.getText)return t.getText(e);if(o)return await(0,i.D)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await P(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});(0,d.O2)(t)||r.push(t)}return r.join(a)}}async function R(e){const t={};t.text=await N(e);const n=await async function(e){const{varInfo:{nodePart:t,optionPart:n,option:r,isMedia:o}}=e;if(!o)return[];const a=e.specifiedOpt||r;if(t&&t.getImages)return t.getImages(e);if(a)return await(0,i.D)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await P(e),r=[];if(n.getImages)for(const i of t){const t=await n.getImages({...e,specifiedOpt:i});r.push(t[0])}return r}}(e);t.image=n[0];const r=(await async function(e){const{varInfo:{optionPart:t,option:n}}=e;if(!t)return[];const r=e.specifiedOpt||n;if(r)return await(0,i.D)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:r})]:[];{const n=await P(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e))[0];return r&&(t.normalIconUrl=r,t.activeIconUrl=(0,w.rI)(r)),t}function A(e){return e&&e.startsWith("URL_PARAM=")}},656:(e,t,n)=>{"use strict";n.d(t,{HG:()=>b,WE:()=>d,_Z:()=>x,gH:()=>l,hi:()=>p,nk:()=>f,qS:()=>h}),n(5306);var r=n(3656),i=n(3608),o=n(7117),a=n(5336),s=n(6064),u=n(7492);let c;function l(e){const{loopStack:t}=e;return t?t[t.length-1]:null}function d(e,t,n){const{state:{loopStack:i}}=e,o=i&&i[t];if(o){const e=o.replacements[t];if(e)return(0,r.Rf)(n(e))}return(0,r.Rf)(n())}async function f(e,t){const{varInfo:{lookupLoopNodeId:n,config:i},state:o}=e,a=l(o);if(!a)return"";const s=h(n,a.replacements);return(0,r.Rf)(t(s,i))}function p(e){return function(){if(!c){const e=(0,o.SN)();c=[],Object.keys(e).forEach((t=>{const{uuid:n,type:r}=e[t];"var-loop"===r&&c.push(n)}))}return c}().indexOf(e)>-1}function h(e,t){return t.find((t=>(0,r.RC)(t.loopNodeId,e)))}function m(e,t={imgHeight:0,imgWidth:0}){if(e){const{imgHeight:n,imgWidth:r}=t;let i=void 0===e.refText?e.text:e.refText;return i.match(/^##.+##$/)&&0!==n&&0!==r&&(i=i.replace(/\?w=0&h=0/,"?w=".concat(r||0,"&h=").concat(n||0))),i}return""}function g(e,t){if(e&&e.image){const{image:n}=e;return(0,i.BF)(n.url,t)}return""}function v(e){return e&&(0,s.KF)(e.index+1)}function y(e){return e&&e.value}function w(e){return e&&(0,s.KF)(e.number)}function _(e){return e&&e.label}function b(e){e.C_OL_TXT.getText=e=>d(e,0,m),e.C_OL_IDX.getText=e=>d(e,0,v),e.C_OL_NUM.getText=e=>d(e,0,w),e.C_OL_VAL.getText=e=>d(e,0,y),e.C_OL_LBL.getText=e=>d(e,0,_),e.C_IL_TXT.getText=e=>d(e,1,m),e.C_IL_IDX.getText=e=>d(e,1,v),e.C_IL_NUM.getText=e=>d(e,1,w),e.C_IL_VAL.getText=e=>d(e,1,y),e.C_IL_LBL.getText=e=>d(e,1,_),u.b.forEach((t=>{!function(t){const n=t.split("_")[1],r="C_IL_MAP_"+n,i=(e,n)=>d(e,n,(n=>{if(!n)return"";const{mapping:r}=n;return(0,a.T)(r,t,e)}));e["C_OL_MAP_"+n].getText=e=>i(e,0),e[r].getText=e=>i(e,1)}(t)}))}function x(e){e.LOOP.getText=e=>f(e,m),e.LOOP_IMG.getText=e=>f(e,g),e.LOOP_INDEX.getText=e=>f(e,v),e.LOOP_NUM.getText=e=>f(e,w),e.LOOP_VAL.getText=e=>f(e,y),e.LOOP_LBL.getText=e=>f(e,_),u.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.T)(n.mapping,t,e)))}(t)}))}},7117:(e,t,n)=>{"use strict";n.d(t,{SN:()=>x,jd:()=>_,tQ:()=>m}),n(5306),n(3948);var r=n(5336),i=n(3608),o=n(7712),a=n(1128),s=n(6064),u=n(7492);var c=n(3146),l=n(3022),d=n(2872);var f=n(7666),p=n(656),h=n(9141);const m="waiting fo extend";let g=!1;Math.avg=(...e)=>{let t=0;const n=e.length;for(let r=0;r<n;r++)t+=Number(e[r]);return t/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:m},MONTH:{uuid:"MONTH",type:"var-string",getText:m},DATE:{uuid:"DATE",type:"var-string",getText:m},DAY:{uuid:"DAY",type:"var-string",getText:m},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:m},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:m},WX_ID:{uuid:"WX_ID",type:"var-string",getText:m},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:m},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:m},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:m},RES_ID:{uuid:"RES_ID",type:"var-string",getText:m},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:m},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:m},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:m},CURR:{uuid:"CLANG",type:"var-string",getText:m},LKTP:{uuid:"LKTP",type:"var-string",getText:m},START_TIME:{uuid:"S_T",type:"var-string",getText:m},COST_TIME:{uuid:"C_T",type:"var-string",getText:m},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:m},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:m},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:m},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:m},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:m},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:m},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:m},RESULT:{uuid:"RESULT",type:"var-string",getText:m},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:m},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:m},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:m},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:m},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:m},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:m},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:m},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:m},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:m},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:m},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:m},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:m},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:m},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:m},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:m},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:m},POSITION:{uuid:"_P_OS",type:"var-string",getText:m},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:m,getBool:m},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:m,getBool:m},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:m,getBool:m},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:m},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:m},CITY:{uuid:"_C_ITY",type:"var-string",getText:m},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:m},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:m,getImages:m},QUES_TEXT:{uuid:"QT",type:"var-string",getText:m},QUES_LABEL:{uuid:"QL",type:"var-string",getText:m},QUES_DESC:{uuid:"QD",type:"var-string",getText:m},QUES_NAME:{uuid:"QN",type:"var-string",getText:m},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:m},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:m},PASSWORD:{uuid:"PSW",type:"var-string",getText:m},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:m,getBool:m},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:m,getBool:m},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:m,getBool:m},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:m,getBool:m},QUES_RS:{uuid:"QRS",type:"var-string",getText:m},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:m,getBool:m},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:m,getBool:m},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:m},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:m},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:m},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:m},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:m},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:m},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:m},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:m},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:m},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:m},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:m},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:m},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:m},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:m},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:m},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:m,getText:m},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:m},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:m},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:m,getImages:m},OPT_ICON:{uuid:"OIC",type:"var-string",getText:m,getIcon:m},OPT_MARK:{uuid:"OMA",type:"var-string",getText:m},OPT_RANK:{uuid:"ORA",type:"var-string",getText:m},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:m},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:m},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:m},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:m},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:m,getText:m},EXP_PLUS:{uuid:"EP",type:"var-expression",expOpr:"+"},EXP_MINUS:{uuid:"EM",type:"var-expression",expOpr:"-"},EXP_MULTIPLY:{uuid:"EPL",type:"var-expression",expOpr:"*"},EXP_DIVIDE:{uuid:"ED",type:"var-expression",expOpr:"/"},EXP_SUM:{uuid:"ES",type:"var-expression",expOpr:"(",split:"+"},EXP_MIN:{uuid:"EMN",type:"var-expression",expOpr:"Math.min(",split:","},EXP_MAX:{uuid:"EMX",type:"var-expression",expOpr:"Math.max(",split:","},EXP_AVG:{uuid:"EAG",type:"var-expression",expOpr:"Math.avg(",split:","},EXP_RD:{uuid:"ERD",type:"var-expression",expOpr:"Math.round(",split:"+"},EXP_FLR:{uuid:"EFLR",type:"var-expression",expOpr:"Math.floor(",split:"+"},EXP_CL:{uuid:"ECL",type:"var-expression",expOpr:"Math.ceil(",split:"+"},EXP_OP:{uuid:"EOP",type:"var-expression"},EXP_CP:{uuid:"ECP",type:"var-expression"},BOOL_AND:{uuid:"BAND",type:"var-bool",blOpr:"&&"},BOOL_OR:{uuid:"BOR",type:"var-bool",blOpr:"||"},BOOL_NOT:{uuid:"BNOT",type:"var-bool",blOpr:"!"},BOOL_OP:{uuid:"BOP",type:"var-bool",blOpr:"("},BOOL_CP:{uuid:"BCP",type:"var-bool",blOpr:")"},LOOP:{uuid:"LP",type:"var-loop",getText:m,getImages:m},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:m,getImages:m},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:m},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:m},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:m},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:m}};for(const e of h.Z.langTable){const t="LANG_"+e.locale.toUpperCase(),n=t;v[t]={uuid:n,type:"var-string",getText:async()=>e.locale}}for(let e=2;e<21;e++){const t="URL_KEY_"+e;v[t]={uuid:t,type:"var-string",getText:m}}function y(e,t){const n=t.origin.optionMappingHeads;if(n){const t=n.find((t=>t.field==="field_"+e));if(t)return{type:"image"===t.type?"var-media":"var-string"}}return null}for(let e=1;e<7;e++)v["OPT_ASTV_"+e]={uuid:"OASTV_"+e,type:"var-string",getText:m},v["OPT_MAP_"+e]={uuid:"OM_"+e,type:"var-string",getText:m,getDynamicProps:t=>y(e,t)},v["C_OPT_MAP_"+e]={uuid:"COMAP"+e,type:"var-string",getText:m},v["C_OL_MAP_"+e]={uuid:"COLMAP"+e,type:"var-string",getText:m},v["C_IL_MAP_"+e]={uuid:"CILMAP"+e,type:"var-string",getText:m},v["LOOP_MAP_"+e]={uuid:"LPMAP"+e,type:"var-loop",getText:m};const w=Object.keys(v);function _(e,t){for(const n of w)if(v[n].uuid===e){let e=v[n];if(e.getDynamicProps&&t){const n=e.getDynamicProps(t);n&&(e={...e,...n})}return e}}function b(){g||(function(){const e=[];w.forEach((t=>{if(!(v[t]instanceof Function)){if(e.indexOf(v[t].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[t].uuid);e.push(v[t].uuid)}}))}(),(0,r.k)(v),(0,p._Z)(v),(0,p.HG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.c6)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",u.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["OPT_MAP_"+n].getText=async e=>{const{specifiedOpt:n}=e,{mapping:i}=n;return(0,r.T)(i,t,e)}}(t),function(t){const n=t.split("_")[1];e["OPT_ASTV_"+n].getText=async e=>{const n=e.specifiedOpt.assistValue;return n&&n[t]||""}}(t)})),e.OPT_MARK.getText=e.OPT_INPUT.getText,e.OPT_TEXT.getText=async e=>{const t=e.specifiedOpt,n=(0,a.Lb)(t);if(n)return n;const{optionY:r,optionX:i}=t;return i?i.text+"_"+r.text:(0,a.c6)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.KF)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.KF)(t)},e.OPT_TEXT_X.getText=async e=>e.specifiedOpt.optionX.text,e.OPT_TEXT_Y.getText=async e=>e.specifiedOpt.optionY.text,e.OPT_NUMBER_X.getText=async e=>{const t=e.specifiedOpt.optionX.number;return(0,s.KF)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.KF)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:r}=e,o=(0,a.c6)(n,"image");return r?n.text:o?(0,i.BF)(o.url,t,o.originName):""},e.OPT_ICON.getText=async e=>e.specifiedOpt.text,e.OPT_COUNT.getText=async e=>{const t=await(0,o.Lr)(e);return(0,s.KF)(t.length)},e.OPT_GROUP_TITLE.getText=async e=>{const{optionGroups:t,optionGroupsRelationship:n}=e.varInfo.node.origin;if(!t||!n)return"";const r=e.specifiedOpt.uuid;return function e(t,n){const[r,...i]=n,o=t.find((e=>e.uuid===r));if(o){const t=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==i.length){const r=e(n||[],i);return[...t,...r]}return t}return[]}(t||[],n.optionsRelationship[r]).join("/")}}(v),function(e){async function t(e,t){const{varInfo:n,needOtherOpt:r}=e,i=n.node,o=(0,a.Kn)(i),s=[];for(const n of o)!r&&n.isOtherOpt||t&&!t(n,i)||!await(0,c.D)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.nt),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.Tm),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.Z6),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.vD),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.X8)(e.varInfo.config)?t(e):e.varInfo.node.options}(v),function(e,t){!function(e,t){t.forEach((t=>{const n=e[t];"function"==typeof n.getText&&(n.getBool=async function(e){const t=await this.getText(e);return!(0,s.O2)(t)})})),e.OPT_COUNT.getBool=async function(e){return!!await this.getText(e)}}(e,t),e.OPT_SELECTED.getBool=async e=>e.specifiedOpt.selected,e.OPT_SAME_MARK.getBool=async e=>{const t=await(0,o.Lr)(e);return function(e,t){if((0,s.O2)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const r of e){const e=r.value;if(n[e]?n[e]+=1:n[e]=1,n[e]>=t)return!0}return!1}(t,t.length)},e.OPT_DIFF_MARK.getBool=async e=>{const t=await(0,o.Lr)(e);return function(e,t){if((0,s.O2)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const r of e)if(n[r.value]=!0,Object.keys(n).length>=t)return!0;return!1}(t,t.length)},e.OPT_SAME_VALUE.getBool=e.OPT_SAME_MARK.getBool,e.OPT_DIFF_VALUE.getBool=e.OPT_DIFF_MARK.getBool,e.FAIL_SKIP.getBool=async e=>!!e.varInfo.node.failedSkipActivated,e.FAILED.getBool=async e=>!!e.varInfo.node.failed,e.SUCCEED.getBool=async e=>!!e.varInfo.node.succeed,e.USED_PHONE.getBool=async e=>!!e.state.phoneUsed,e.VALIDATE_FAILED.getBool=async e=>e.varInfo.node.validateFailed,e.Q_TIME_OVER.getBool=async e=>{const{origin:{maxAnswerTime:t},costTime:n}=e.varInfo.node,r=1e3*t;return!!(r&&n&&r<n)},e.Q_TIME_LESS.getBool=async e=>{const{origin:{minAnswerTime:t},costTime:n}=e.varInfo.node,r=1e3*t;return!!(r&&n&&r>n)},function(e,t){function n(e){return this.getBool(e)}t.forEach((t=>{const r=e[t];"function"==typeof r.getBool&&r.getText===m&&(r.getText=n)}))}(e,t)}(v,w),(0,f.e0)(v),function(){let e="";if(w.forEach((t=>{const n=v[t];if(["filter","getText","getImages","getIcon","getBool"].forEach((r=>{n[r]===m&&(e+=t+"=>"+r+"\n")})),n.getText){const e=n.getText;n.getText=async function(...t){const{keepWrap:n}=t[0],r=e.apply(this,t),i=await r;if("string"==typeof i&&!n){const e=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.KF)(i).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.O2)(i)?"":i}}})),e)throw new Error("lack var implement for:\n"+e)}(),g=!0)}function x(){return g||b(),v}b()},7666:(e,t,n)=>{"use strict";n.d(t,{e0:()=>f,gD:()=>l,xq:()=>d}),n(5306),n(3948);var r=n(656),i=n(7712),o=n(3608),a=n(9271),s=n(1128),u=n(7492);function c(e){return{type:"image",width:e.originWidth,height:e.originHeight,name:e.serverFileName,id:e.id,originName:e.fileName}}async function l(e,t){if(!t)return[];const n=(0,o.Kz)(t.uuid,e.imageList);if(n)return[(0,a.q)(c(n))];if(t.value){let n=[];const r=(0,i.Sq)(t.value);for(const t of r){const r=await l(e,(0,i.wc)(e,t));n=n.concat(r)}return n}{const{option:n,optionPart:r}=t,o=t.node;return o?r?(await(0,i.Lr)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.c6)(e,"image"))):o.images||[]:[]}}function d(e=""){return e&&"string"==typeof e?e.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):e}function f(e){async function t(e,t){const n=e&&e[t]||"";return"string"==typeof n?[]:[n]}e.QUES_IMAGE.getImages=async e=>{var t;const n=null===(t=e.varInfo)||void 0===t?void 0:t.node;return(null==n?void 0:n.images)||[]},e.OPT_IMAGE.getImages=async e=>{const{varInfo:{option:t},specifiedOpt:n}=e,r=n||t;return[(0,s.c6)(r,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,i=r.gH(t);if(!i)return[];const o=r.qS(n,i.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",u.b.forEach((n=>{!function(n){const r=n.split("_")[1];e["OPT_MAP_"+r].getImages=e=>{const{specifiedOpt:r}=e,{mapping:i}=r;return t(i,n)}}(n),function(n){const r=n.split("_")[1];e["C_OPT_MAP_"+r].getImages=async e=>{const{state:{context:{option:r}}}=e;if(!r)return[];const{mapping:i}=r;return t(i,n)}}(n),function(n){const i=n.split("_")[1],o="C_IL_MAP_"+i;function a(e,i){return r.WE(e,i,(e=>{if(!e)return[];const{mapping:r}=e;return t(r,n)}))}e["C_OL_MAP_"+i].getImages=e=>a(e,0),e[o].getImages=e=>a(e,1)}(n),function(n){const i=n.split("_")[1];e["LOOP_MAP_"+i].getImages=e=>r.nk(e,(e=>t(e.mapping,n)))}(n)}))}},5336:(e,t,n)=>{"use strict";n.d(t,{T:()=>p,k:()=>h}),n(1817);var r=n(3768),i=n(3608),o=n(4248),a=n(1128),s=n(6064),u=n(6539),c=n(7492),l=n(3087),d=n(8204);const f="unknown";function p(e,t,n){const r=e&&e[t]||"";if("string"==typeof r)return r;{const{pureText:e,varInfo:{config:t},specifiedOpt:o}=n;return e?o?o.text:"":(0,i.BF)(r.url,t,r.originName)}}function h(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,u.ZI)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,u.ZI)();return e.key1||e.key};for(let e=2;e<=20;e++)t(e);function n(e){const{varInfo:t,state:n}=e;let r;const i=t.node;return i&&(r=i.position&&i.position.address),r||(r=n.address),r}e.YEAR.getText=async()=>(new Date).getFullYear().toString(),e.MONTH.getText=async()=>{const e=(new Date).getMonth()+1;return(0,l.bi)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.bi)(e)},e.DAY.getText=async e=>{const t=(new Date).getDay();return"zh_cn"===e.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][t]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]},e.QUES_ID.getText=async e=>e.state.surveyId,e.WX_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.openid},e.WX_SRC.getText=async()=>(0,o.dU)().name,e.WX_NAME.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.nickname},e.WX_UN_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.unionid},e.RES_ID.getText=async e=>{const{state:t}=e;return t.transactionID},e.CLTR_ID.getText=async()=>"",e.CLTR_CODE.getText=async()=>(0,o.vW)().preview?"":(0,o.vW)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.vW)().preview)return"";const{state:{parsedPayload:t}}=e;if(t){const{surveyMeta:{collector:{name:e}}}=t;return e}return""},e.START_TIME.getText=async e=>{const t=e.state.startTime;return(0,s.KF)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.KF)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,r.gS)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.J)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.c6)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.KF)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.c6)(t,"value"):""},e.C_OPT_LBL.getText=async e=>{const{state:{context:{option:t}}}=e;return t&&t.label||""},e.C_OPT_IPT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-iptc-holder='".concat(t.renderId,"' hidden='true' />"):""},e.C_OPT_ASI.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-asic-holder='".concat(t.renderId,"' hidden='true' />"):""},c.b.forEach((t=>{!function(t){const n=t.split("_")[1];e["C_OPT_MAP_"+n].getText=async e=>{const{state:{context:{option:n}}}=e;if(!n)return"";const{mapping:r}=n;return p(r,t,e)}}(t)})),e.POSITION.getText=async e=>{const{state:{point:t}}=e;return t?t.lat+","+t.lng:""},e.COUNTRY.getText=async e=>{const t=n(e);return t&&t.country},e.PROVINCE.getText=async e=>{const t=n(e);return t&&t.province},e.CITY.getText=async e=>{const t=n(e);return t&&t.city},e.DISTRICT.getText=async e=>{const t=n(e);return t&&t.district},e.QUES_IMAGE.getText=async e=>{const{varInfo:t,pureText:n}=e,r=t.node;return n?r.images.reduce(((e,t)=>e+" "+t.originName),""):r.images.reduce(((e,n)=>e+(0,i.BF)(n.url,t.config,n.originName)),"")},e.QUES_DESC.getText=async e=>e.varInfo.node.description,e.QUES_LABEL.getText=async e=>e.varInfo.node.origin.label||"",e.QUES_TEXT.getText=async e=>e.varInfo.node.title,e.QUES_NAME.getText=async e=>e.varInfo.node.nodeName,e.QUES_RUNTIME_NAME.getText=async e=>e.varInfo.node.runtimeNodeName,e.PHONE_NUMBER.getText=async e=>e.varInfo.node.phoneNumber,e.PASSWORD.getText=async e=>e.varInfo.node.code,e.QUES_TIME.getText=async e=>(0,s.KF)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,r.py)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.dU)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.dU)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.dU)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.dU)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.dU)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.dU)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.dU)().system.device.device.type||f}},3022:(e,t,n)=>{"use strict";n.d(t,{$P:()=>f,Tm:()=>s,Z6:()=>u,nt:()=>a,vD:()=>c}),n(2707),n(5306);var r=n(7117),i=n(6064),o=n(3877);function a(e){return e.selected}function s(e){return!e.selected}function u(e,t){return(0,o.Zy)(e,t)}function c(e,t){return!(0,o.Zy)(e,t)}const l=(e,t,n,r=!1)=>{if((0,i.O2)(t[n]))return NaN;const o={};e.forEach((e=>{let t=(e[n]+"").replace(/(\s|&nbsp;)/g,"");const r=parseFloat(t);isNaN(r)||(t=r),(0,i.O2)(t)||(o[t]?o[t].push(e):o[t]=[e])}));const a=Object.keys(o).sort(((e,t)=>{const n=Number(e),i=Number(t);return isNaN(n)||isNaN(i)?r?e>t?1:-1:e<t?1:-1:r?n>i?1:-1:n<i?1:-1}));for(let e=0;e<a.length;e++)if(o[a[e]].indexOf(t)>-1)return e+1;return NaN},d={};function f(e,t,n){const i=d[t];return i?i(function(e){let t=null;const{varInfo:n}=e,i=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const e=(0,r.SN)();return{selectIds:[e.CHECKED_OPTS.uuid,e.RANKED_OPTS.uuid,e.MATCHED_OPTS.uuid],unselectIds:[e.UNCHECKED_OPTS.uuid,e.UNRANKED_OPTS.uuid,e.UNMATCHED_OPTS.uuid],inputIds:[e.INPUTTED_OPTS.uuid,e.MARKED_OPTS.uuid],uninputIds:[e.UN_INPUTTED_OPTS.uuid,e.UNMARKED_OPTS.uuid]}}();return o&&(l.indexOf(o.uuid)>-1?t=a:d.indexOf(o.uuid)>-1?t=s:f.indexOf(o.uuid)>-1?t=u:p.indexOf(o.uuid)>-1&&(t=c)),t?i.options.filter((e=>t(e,i))):i.options}(n),e):NaN}d[1]=(e,t)=>t.number,d[14]=(e,t)=>l(e,t,"number",!0),d[15]=(e,t)=>l(e,t,"number",!1),d[2]=(e,t)=>t.text,d[12]=(e,t)=>l(e,t,"text",!0),d[13]=(e,t)=>l(e,t,"text",!1),d[3]=(e,t)=>t.value,d[4]=(e,t)=>l(e,t,"value",!0),d[5]=(e,t)=>l(e,t,"value",!1),d[6]=(e,t)=>t.sortNo,d[7]=(e,t)=>l(e,t,"sortNo",!0),d[8]=(e,t)=>l(e,t,"sortNo",!1),d[9]=(e,t)=>t.value,d[10]=(e,t)=>l(e,t,"value",!0),d[11]=(e,t)=>l(e,t,"value",!1)},8204:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});var r=n(4248);function i(){return(0,r.vW)().realTimePreview?"realtime_preview":(0,r.vW)().preview?"preview":"formal"}},5838:(e,t,n)=>{"use strict";n.d(t,{H$:()=>m,II:()=>l,L2:()=>g,Q3:()=>v,cx:()=>y,yv:()=>w}),n(5069),n(3210),n(3948);var r=n(7529),i=n(3656),o=n(6935),a=n(3768),s=n(7712),u=n(6064);const c={1:(e,t,n)=>(t>n&&([t,n]=[n,t]),c[5](e,t,0)&&c[6](e,n,0)),2:(e,t,n)=>!c[1](e,t,n),11:(e,t)=>{const n=(0,u.KF)(e).split(",").filter((e=>""!==e.trim())),r=(0,u.KF)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim(),e.indexOf(t)>-1))))))},12:(e,t)=>!c[11](e,t,0),3:(e,t)=>(0,u.KF)(e)===(0,u.KF)(t),4:(e,t)=>!c[3](e,t,0),5:(e,t)=>{const n=(0,u.Xm)(e),r=(0,u.Xm)(t);return"number"==typeof n&&"number"==typeof r?n>r:(0,u.KF)(n)>(0,u.KF)(r)},6:(e,t)=>{const n=(0,u.Xm)(e),r=(0,u.Xm)(t);return"number"==typeof n&&"number"==typeof r?n<r:(0,u.KF)(n)<(0,u.KF)(r)},7:(e,t)=>!c[6](e,t,0),8:(e,t)=>!c[5](e,t,0),9:(e,t)=>{const n=(0,u.KF)(e).split(",").filter((e=>""!==e.trim())),r=(0,u.KF)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!c[9](e,t,0),13:e=>(0,u.KF)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!c[13](e,t),15:(e,t)=>!c[16](e,t),16:(e,t)=>(0,u.KF)(e).split(",").every((e=>{const t=e.trim();return"false"===t||""===t}))},l={request:e=>!!e,bool:e=>!!e,mark:(e,t)=>l.input(e,t),input:(e,t)=>{let n=e,r=t.markStart,i=t.markEnd;return t.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase())),c[t.markId](n,r,i)}};function d(e,t){"string"==typeof e&&(e=(0,o.mP)(e));const n=l[t.limitType],r=n?n(e,t):!!e;return{value:r,reason:r?void 0:{type:"value_unmatch",expected:t.markStart,expectedEnd:t.markEnd,limit:t.markId,actual:e}}}async function f(e,t){const{text:n}=e.relatedEmbed,r=m(e.markId)?",":void 0;return d(await(0,o.Ur)(n,{state:t,joinBy:r}),e)}async function p(e,t){const{relatedVarId:n}=e,r={identity:{baseId:n}},i=(0,s.Dy)(t,r);if(!i)return{value:!1,reason:{type:"var_not_found"}};const a=m(e.markId)?",":void 0;return d(await(0,o.CQ)({state:t,varInfo:i,joinBy:a}),e)}function h(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:u}=t,c=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;let s,u=(0,i.am)(a,n);do{if(s=(0,r.JL)(o,u),s)break;u=u.substring(0,u.length-9)}while(u.length>=36);return s}(e,t);if(!c)return-2===u?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.py)(c);if(!d||!d.items)return-2===u?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((e=>function(e,t){return(0,i.RC)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.zJ)(f):"",r=p(e,t),i={value:r};return r||(i.reason={type:"node_unmatch",limit:u,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),i}{const e=-2===u?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:u,nodeId:n,optionId:o,expected:-1===u,actual:2===u}),t}}function m(e){return 9===e||10===e||11===e||12===e||13===e||14===e||15===e||16===e}async function g(e,t){return{start:m(e.markId)?await(0,o.e_)(e.markStart,{state:t,joinBy:","}):await(0,o.lg)(e.markStart,{state:t}),end:await(0,o.lg)(e.markEnd,{state:t})}}async function v(e,t){const{options:n,reverse:r,logicType:i}=t,o=await y(e,n,i);return r?!o.value:o.value}async function y(e,t,n){if(!t)return{value:!0};const r=[];for(const n of t){const t={...n},{relatedVarId:i,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:u}=t,{start:c,end:l}=await g(t,e);let d;t.markEnd=l,t.markStart=c,d=a?await y(e,s,u):o?await f(t,e):i?await p(t,e):h(e,t),r.push(d)}return{value:!r["and"===n?"some":"every"]((e=>!e.value)),details:r}}async function w(e,t){return"object"==typeof e&&null!==e?v(t,e):!!e}},3817:(e,t,n)=>{"use strict";n.d(t,{I:()=>f,N:()=>d}),n(3948);var r=n(9564),i=n(4248),o=n(3656),a=n(2872),s=n(7089),u=n(7712),c=n(6935);function l(e){return"LOOP_ALL_ROUND"===e}function d(e){return l(e.loopRoundId)||l(e.innerLoopRoundId)}async function f(e){const t=[],{state:n,varInfo:{identity:i}}=e,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:c,innerLoopRoundId:d}=i,f=(0,r.KF)(n,a);if(!f)return"";const h=(0,u.ck)(n,f);if(!h)return"";let m=[];m=l(s)?h.varList.map((e=>(0,o.pC)(e.uuid))):[s];for(const i of m)if(c){let a=[];const s=(0,r.KF)(n,c);if(!s)continue;const f=(0,u.sP)(n,s,i);if(!f)continue;a=l(d)?f.varList.map((e=>(0,o.pC)(e.uuid))):[d];for(const n of a){const r=await p(e,i,n);t.push(r)}}else{const n=await p(e,i);t.push(n)}return t.join(e.joinBy)}function p(e,t,n){const{varInfo:{config:r,identity:o}}=e,u=function(e,t){const n=(0,i.dU)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.c)(e.identity)),n.setAttribute("data-v-config",(0,a.BB)(e.config)),n.outerHTML}({config:r,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,c.Ur)(u,e)}},6451:(e,t,n)=>{"use strict";n.d(t,{P:()=>b,_F:()=>_,nO:()=>g,nn:()=>m}),n(2707),n(3948);var r=n(1128),i=n(6935),o=n(3656),a=n(9310),s=n(5750),u=n(7712),c=n(7117),l=n(4248),d=n(9271),f=n(9698),p=n(656),h=n(7666);async function m(e,t){const{loop:n}=t,r=n&&n.node.nodeUuid,{image:i}=t.origin;if(!i)return[];const o=(0,c.SN)();if("image"===i.type)return[(0,d.q)(i)];if(r&&p.hi(i.id))return await o.LOOP_IMG.getImages({state:e,varInfo:{node:t,lookupLoopNodeId:r}});{const t={identity:{baseId:i.id}};return await(0,h.gD)(e,(0,u.Dy)(e,t))}}async function g(e,t){const{origin:n,passRef:r}=t;if(r&&r.image)return r.image;const{parent:i,loop:o}=e,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const m=(0,c.SN)();let g;if("image"===l.type)g=(0,d.q)(l);else if(s&&p.hi(l.id))g=(await m.LOOP_IMG.getImages({state:i,varInfo:{option:t,lookupLoopNodeId:s}}))[0];else{const e={identity:{baseId:l.id}};g=(await(0,h.gD)(i,(0,u.Dy)(i,e)))[0]}return!f&&g&&"variable"===l.type&&(0,a.GY)({node:e,optionId:t.uuid},{mapId:l.id},g.originName),g}function v(e){return!(!e||!(0,l.vW)().realTimePreview&&!(e.text||e.image||e.normalIconUrl))}async function y(e,t,n){const{optionPart:i,optionFilter:o}=t;let{option:a}=t;if(!i||i.inBunch)return{valid:!0};if(!a){const i=await o.filter({state:e,varInfo:t});a=(0,r.cW)(i,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,r.eu)(t.node).indexOf(a):void 0}}function w(e,t){if(!t)return null;const n=(0,f.q)(e,t);for(const e of t){const t=(0,f.V)(e);if((0,o.RC)(t.uuid,n))return t}return null}async function _(e,t){const{origin:{mapping:n}}=e;if(e.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=e,n)for(const r of Object.keys(n)){const o=r,a=n[o];e.mapping[o]="string"==typeof a?await(0,i.Ur)(a,{state:t}):(0,d.q)(a)}e.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=null}async function b(e,t,n,c=!1){let l=[],d=[],f=[],{refOptions:p,options:h,optionRefers:m}=t;if((0,o.is)(t,!!n)&&("xid"===n?(p=t.refOptionsX,h=t.optionsX,m=t.optionXRefers):"yid"===n&&(p=t.refOptionsY,h=t.optionsY,m=t.optionYRefers)),h&&p&&0!==p.length){l=[...h];const t={};for(const n of p){const o=w(n,m);if(!o)continue;const a=o.config||{},s=await(0,i.Ob)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,u.Dy)(e,o);if(!f)continue;const{valid:p,srcOpt:h,srcRuntimeIndex:g}=await y(e,f,n);if(!p)continue;const _={state:e,varInfo:f,specifiedOpt:h,pureText:!c,keepWrap:!0};if(f.node&&(l=await(0,u.is)(_),h&&(d={uuid:n.uuid,value:h.value,optComment:h.optComment,image:(0,r.c6)(h,"image"),number:h.number,text:h.text,label:h.label,mapping:h.mapping&&{...h.mapping},normalIconUrl:(0,r.c6)(h,"normalIconUrl"),activeIconUrl:(0,r.c6)(h,"activeIconUrl")})),v(l)){const e={srcRuntimeIndex:g,option:{...n,...l},passRef:d},r=o.uuid;t[r]?t[r].candidates.push(e):t[r]={candidates:[e],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(t).forEach((e=>{const{limitRnd:n,candidates:r,varInfo:i,disorder:u}=t[e];let c=(0,o.DQ)(r,n);u?c=(0,s.T_)(c):c.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=c.map((e=>e.option)),h=c.map((e=>e.passRef));f=f.concat((0,a.cX)(i,p)),l=l.concat(p),d=d.concat(h)}))}else l=h;return{options:l,refMaps:f,passRefs:d}}},9310:(e,t,n)=>{"use strict";n.d(t,{GY:()=>a,ZK:()=>s,Zt:()=>d,cX:()=>u,i5:()=>l,sB:()=>c}),n(3948);var r=n(6935),i=n(3768),o=n(7552);function a(e,t,n){n=n;const{node:r,optionId:i,exclusiveId:o}=e;let a=r.embedVarMaps;if(a||(a=r.embedVarMaps=[]),o){const e=a.find((e=>e.exclusiveId===o&&e.var_id===t.mapId));if(e)return void(e.value=n)}a.push({type:"embed",var_id:t.mapId,value:n,option_id:i&&i.toLowerCase(),exclusiveId:o})}function s(e){const{text:t,image:n,icon:r}=e;if(t)return t;if(n)return n.originName;if(r){const e=(0,o.jy)(r).match(/#[^#]+$/);return e&&e[0]||""}return""}function u(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function c(e,t){e.referVarMaps?e.referVarMaps=e.referVarMaps.concat(t):e.referVarMaps=t}function l(e,t){const n=e.casVarMaps=[];t.forEach((e=>{e.text&&n.push({type:"cascade",option_id:e.uuid.toLowerCase(),value:e.text})}))}function d(e,t){const{renderList:n}=e,o=[];return n.forEach((e=>{if(!(0,i.F2)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:u,casVarMaps:c}=e;s=function(e){if(e){let t=[];const n=[];return e.forEach((e=>{delete e.exclusiveId,e.option_id?t.push(e):n.push(e)})),t=function(e){let t=[];const n={};return e.forEach((e=>{const{var_id:t,value:r}=e;let i=n[t];i?(i.values.indexOf(r)<0&&i.values.push(r),i.maps.push(e)):i=n[t]={values:[r],maps:[e]}})),Object.keys(n).forEach((e=>{const r=n[e],{values:i,maps:o}=r;if(i.length>1)t=t.concat(o);else{const e=o[0];o.length>1&&(e.option_id="all"),t.push(e)}})),t}(t),n.concat(t)}return[]}(s),u=u||[],c=c||[];const l=s.concat(u,c);if(l.length>0){let e;l.forEach((e=>{e.value=(0,r.mP)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},3146:(e,t,n)=>{"use strict";n.d(t,{D:()=>c}),n(2707);var r=n(3022),i=n(5838),o=n(6935),a=n(6064),s=n(2872);const u={"-1":6,"-2":8,"-3":5,"-4":7};async function c(e){if(!(0,s.X8)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,c=e.specifiedOpt||t,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:h}=function(e,t){if(!t)return{};const{limitType:n}=t;if(n>=0)return t;const r=u[n];let i;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return i=5===r||7===r?(0,a.KF)(o[o.length-1]||0):(0,a.KF)(o[0]||0),{...t,limitType:r,limitStart:i}}(n,e.varInfo.config),m=(0,r.$P)(c,p,e),g=Number(l),v=(0,i.H$)(g)?await(0,o.e_)(d,{...e,joinBy:","}):await(0,o.lg)(d,e),y=await(0,o.lg)(f,e);return i.II.input(m,{markId:g,markStart:v,markEnd:y,ignoreCase:h})}},1772:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,fq:()=>a}),n(3948);var r=n(6935),i=n(4248),o=n(8204);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.J)(),_IS_INFER_:(0,i.dU)().dev.infer?"Y":"",...e}}async function s(e,t){const{params:n}=t,i={};for(const t of n){const{name:n,value:o}=t;n.startsWith("_url_")?i[n]=await(0,r.sb)(o,{state:e}):n.startsWith("_html_")?i[n]=await(0,r.Ur)(o,{state:e},!0):i[n]=await(0,r.e_)(o,{state:e,joinBy:","},"URL")}return a(i,e)}},6935:(e,t,n)=>{"use strict";n.d(t,{FL:()=>M,CQ:()=>N,Ur:()=>I,Ob:()=>A,e_:()=>E,lg:()=>R,sb:()=>L,IY:()=>b,Oy:()=>U,mP:()=>C}),n(5306),n(3210),n(3948);var r=n(2125);function i(e){let t=!0;try{t=!!(0,r.K)(e,!0)}catch(t){console.info("error bool: ",e)}return t}function o(e,t,n){return function(e,t,n){return!!(t.length&&""!==n&&e&&e[e.length-1].match(/[\d)]/))}(e,t,n)&&(e+=t[t.length-1]),e+n}function a(e){return"("===e[e.length-1]&&(e+="0"),e+")"}var s=n(3656),u=n(5015),c=n(866),l=n(9310),d=n(7712),f=n(7666),p=n(3608),h=n(7117),m=n(4248),g=n(6064),v=n(6539),y=n(2872),w=n(3817);function _(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function b(e="",t=!1){if(e=(e=T(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.indexOf("&lt;")>-1||e.indexOf("&gt;")>-1;)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function x(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.indexOf("&amp;")>-1;)e.replace(/&amp;/g,"&");return e}function k(e="",t,n,r,i){let o='<span var-name="'+n+'" class="var-light '+t+'"'+(r?'in-edist="1">':">")+e+"</span>";return i&&(o=(0,s.sG)(o)),o}function S(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.HX)(e).childNodes]}async function I(e="",t,n=!1){e+="";const{state:r,innerJoinBy:i,varInfo:o,usage:a}=t,u=t.spaceRep||"";e=e.replace(/&nbsp;/g,u);const c=t.joinBy||" ";if((0,d.b)(e)){const u=(0,d.HX)(e),f=(0,d.Sq)(e,u);for(const e of f){const t=(0,d.wc)(r,e);let s="";if(t?s=await N({state:r,varInfo:t,joinBy:i||c}):(0,m.vW)().realTimePreview&&(s=k(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,g.O2)(s)?"":(0,g.KF)(s).trim(),a){const n=t||{mapId:(0,d.Hz)((0,d.V0)(e))};(0,l.GY)(a,n,s)}const u=!o&&t&&s&&!n;let f=[];_(t)?(u&&(s=k(s,t.type,t.name,t.inEdist,!1)),f=s?S(s):[""]):(u&&(s=k(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,m.dU)().system.newTextNode(e.innerHTML)]),O(e,f)}return P(function(e,t,n=""){if(_(t))return b(e.innerHTML);let r="";if(n){const i=[];for(const n of e.childNodes){let e="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;e=n.outerHTML}else e=n.textContent.trim(),t||(e=x(e));e&&i.push(T(e))}r=i.join(n)}else r=T(e.innerHTML);return r=r.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),r=T((0,s.kr)(r)),r}(u,o,c),t)}return e+""}function O(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const r=(0,m.dU)().system.newTextNode(t);n.insertBefore(r,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function E(e="",t,n="WRAPPED_URL"){return P(C(await I(e,t,!0),n),t)}function C(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.HX)(e).innerText;return n=(0,d.HX)(n).innerText,"URL"===t&&(n=(0,f.xq)(n)),n.trim()}function P(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function L(e="",t){let n=await I(e,{...t,innerJoinBy:","},!0);return n=C(b(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=P(n,t),n}async function N(e){let t="";const{varInfo:n}=e;if((0,w.N)(n.identity))t=await(0,w.I)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d.sb)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.ZI)()[n]}else n.nodePart||n.node?t=await(0,d.KP)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):I(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,h.SN)(),{varInfo:n,state:i}=e;let s="";const u=(0,d.HX)(n.value).childNodes,c=[];let l="";for(const e of u)if((0,d.g)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,c,e),l=""}const n=(0,d.wc)(i,e);if(n){const e=n.split;if(n.uuid===t.EXP_OP.uuid)s+="(";else if(n.uuid===t.EXP_CP.uuid)s=a(s);else if(e)s=o(s,c,n.expOpr),c.push(e);else if(n.expOpr)c.length&&(s=a(s),c.pop()),s=o(s,c,n.expOpr);else{const e=c[c.length-1];s=o(s,c,await N({state:i,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,c,parseFloat(l)));c.length;)s=a(s),c.pop();return function(e){let t=0;try{t=(0,r.K)(e,!0)}catch(n){t=NaN,console.info("error exp: ",e)}return t}(s)}(e):"var-media"===n.type?t=await async function(e){const{varInfo:t,state:n}=e,{config:r}=t,i=e.joinBy||" ",o=(0,d.Sq)(t.value),a=[];for(const e of o){const t=(0,d.wc)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=r;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const u=await N({state:n,varInfo:t,joinBy:i});(0,g.O2)(u)||a.push(u)}return a.join(i)}(e):"var-bool"===n.type?t=await async function(e){const{varInfo:t,state:n}=e;if(t.getBool)return t.getBool(e);const{nodePart:r,node:o}=t;if(r||o)return(0,d.DC)(e);const a=(0,d.Sq)(t.value);let s="";for(const t of a){const r=(0,d.wc)(n,t);if(r)if(r.blOpr)s+=r.blOpr;else if(r.getBool)s+=i(await r.getBool(e))?"1":"0";else{const e=await N({state:n,varInfo:r});s+="string"==typeof e?"0"===e?e:e?"1":"0":i(e)?"1":"0"}}return i(s)}(e):"var-request"===n.type?t=await async function(e){const{varInfo:{request:t,config:n},state:r}=e;if(t){let e=null;if(n&&n.phParams){e={};for(const t of n.phParams)e[t.name]=await E(t.value,{state:r,joinBy:","},"URL")}const{result:i}=await(0,u.LO)(r,t,e,!1);return"string"!=typeof i?i:(0,c.l)(i)}return""}(e):"var-html"===n.type&&(t=await async function(e){const{varInfo:t,state:n}=e,r=t.getText?await t.getText(e):await I(t.value,e),i=(0,c.l)(b(r));return await function(e,t,n){const r=(0,y.gh)(e);return(0,s.s$)(t,/{{{?(.+?)}}}?/g,(async(e,t)=>{const i=t.indexOf("=");let o=t,a="";i>-1&&(o=t.substring(0,i),a=t.substring(i+1));const s=r[o]||"";let u="";return s&&(u=e.startsWith("{{{")?await I(s,{state:n}):await E(s,{state:n},"URL")),u||a}))}(t.config.phParams,i,n)}(e))}return(0,d.b)(t)&&(t=await I(t,e)),t}async function R(e="",t,n=!1){if("number"==typeof e)return e;if((0,g.O2)(e))return n?NaN:"";const r=Number(e);if(isNaN(r)){const r=await E(e,t);if((0,g.O2)(r))return n?NaN:"";const i=Number(r);return isNaN(i)?n?NaN:r:i}return r}async function A(e="",t){if("number"==typeof e)return e;const n=await R(e,t,!0);return Number(n)}async function U(e="",t,n=!1){return(0,g.O2)(e)?"":(0,s.s$)((0,g.KF)(e),/{{(.+?)}}/g,(async(e,r)=>{let i=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.ZI)()[e];{const n=(0,p.XY)(e,t.variables);return n?C(await N({varInfo:n,state:t,joinBy:","})):""}}(r,t);return i&&n&&(i=encodeURIComponent(i)),"".concat(i||"")}))}function M(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3099:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:(e,t,n)=>{var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:(e,t,n)=>{var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,n)=>{"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:(e,t,n)=>{var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},8457:(e,t,n)=>{"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),s=n(7466),u=n(6135),c=n(1246);e.exports=function(e){var t,n,l,d,f,p,h=i(e),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,y=void 0!==v,w=c(h),_=0;if(y&&(v=r(v,g>2?arguments[2]:void 0,2)),null==w||m==Array&&a(w))for(n=new m(t=s(h.length));t>_;_++)p=y?v(h[_],_):h[_],u(n,_,p);else for(f=(d=w.call(h)).next,n=new m;!(l=f.call(d)).done;_++)p=y?o(d,v,[l.value,_],!0):l.value,u(n,_,p);return n.length=_,n}},1318:(e,t,n)=>{var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9341:(e,t,n)=>{"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3411:(e,t,n)=>{var r=n(9670);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},4326:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:(e,t,n)=>{var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},1501:(e,t,n)=>{"use strict";var r=n(9670),i=n(3099);e.exports=function(){for(var e=r(this),t=i(e.add),n=0,o=arguments.length;n<o;n++)t.call(e,arguments[n]);return e}},4092:(e,t,n)=>{"use strict";var r=n(9670),i=n(3099);e.exports=function(){for(var e,t=r(this),n=i(t.delete),o=!0,a=0,s=arguments.length;a<s;a++)e=n.call(t,arguments[a]),o=o&&e;return!!o}},9920:(e,t,n)=>{var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},8544:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:(e,t,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},8880:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,n)=>{"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},654:(e,t,n)=>{"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),s=n(8003),u=n(8880),c=n(1320),l=n(5112),d=n(1913),f=n(7497),p=n(3383),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),v="keys",y="values",w="entries",_=function(){return this};e.exports=function(e,t,n,l,p,b,x){i(n,t,l);var T,k,S,I=function(e){if(e===p&&L)return L;if(!m&&e in C)return C[e];switch(e){case v:case y:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",E=!1,C=e.prototype,P=C[g]||C["@@iterator"]||p&&C[p],L=!m&&P||I(p),N="Array"==t&&C.entries||P;if(N&&(T=o(N.call(new e)),h!==Object.prototype&&T.next&&(d||o(T)===h||(a?a(T,h):"function"!=typeof T[g]&&u(T,g,_)),s(T,O,!0,!0),d&&(f[O]=_))),p==y&&P&&P.name!==y&&(E=!0,L=function(){return P.call(this)}),d&&!x||C[g]===L||u(C,g,L),f[t]=L,p)if(k={values:I(y),keys:b?L:I(v),entries:I(w)},x)for(S in k)(m||E||!(S in C))&&c(C,S,k[S]);else r({target:t,proto:!0,forced:m||E},k);return k}},9781:(e,t,n)=>{var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,t,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,d,f,p,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],d=e.noTargetGet?(p=i(n,l))&&p.value:n[l],!c(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,n)=>{"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),s=n(8880),u=o("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!c||!l||f)||"split"===e&&!p){var v=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===a?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),w=y[0],_=y[1];r(String.prototype,e,w),r(RegExp.prototype,h,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}d&&s(RegExp.prototype[h],"sham",!0)}},9974:(e,t,n)=>{var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:(e,t,n)=>{var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:(e,t,n)=>{var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:(e,t,n)=>{var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},4647:(e,t,n)=>{var r=n(1913),i=n(8554);e.exports=r?i:function(e){return Map.prototype.entries.call(e)}},6767:(e,t,n)=>{var r=n(1913),i=n(8554);e.exports=r?i:function(e){return Set.prototype.values.call(e)}},7854:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},6656:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:e=>{e.exports={}},490:(e,t,n)=>{var r=n(5005);e.exports=r("document","documentElement")},4664:(e,t,n)=>{var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(e,t,n)=>{var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},2788:(e,t,n)=>{var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:(e,t,n)=>{var r,i,o,a=n(8536),s=n(7854),u=n(111),c=n(8880),l=n(6656),d=n(6200),f=n(3501),p=s.WeakMap;if(a){var h=new p,m=h.get,g=h.has,v=h.set;r=function(e,t){return v.call(h,e,t),t},i=function(e){return m.call(h,e)||{}},o=function(e){return g.call(h,e)}}else{var y=d("state");f[y]=!0,r=function(e,t){return c(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:(e,t,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,n)=>{var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:(e,t,n)=>{var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:e=>{e.exports=!1},408:(e,t,n)=>{var r=n(9670),i=n(7659),o=n(7466),a=n(9974),s=n(1246),u=n(3411),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,d){var f,p,h,m,g,v,y,w=a(t,n,l?2:1);if(d)f=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(i(p)){for(h=0,m=o(e.length);m>h;h++)if((g=l?w(r(y=e[h])[0],y[1]):w(e[h]))&&g instanceof c)return g;return new c(!1)}f=p.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(g=u(f,w,y.value,l))&&g&&g instanceof c)return g;return new c(!1)}).stop=function(e){return new c(!0,e)}},3383:(e,t,n)=>{"use strict";var r,i,o,a=n(9518),s=n(8880),u=n(6656),c=n(5112),l=n(1913),d=c("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):f=!0),null==r&&(r={}),l||u(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},7497:e=>{e.exports={}},133:(e,t,n)=>{var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:(e,t,n)=>{var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:(e,t,n)=>{var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:(e,t,n)=>{"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),s=n(5296),u=n(7908),c=n(8361),l=Object.assign,d=Object.defineProperty;e.exports=!l||i((function(){if(r&&1!==l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=i}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,d=a.f,f=s.f;i>l;)for(var p,h=c(arguments[l++]),m=d?o(h).concat(d(h)):o(h),g=m.length,v=0;g>v;)p=m[v++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:l},30:(e,t,n)=>{var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200)("IE_PROTO"),d=function(){},f=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[l]=e):n=p(),void 0===t?n:o(n,t)}},6048:(e,t,n)=>{var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},3070:(e,t,n)=>{var r=n(9781),i=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:(e,t,n)=>{var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(7593),u=n(6656),c=n(4664),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},8006:(e,t,n)=>{var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,n)=>{var r=n(6656),i=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},6324:(e,t,n)=>{var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},1956:(e,t,n)=>{var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:(e,t,n)=>{var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},3887:(e,t,n)=>{var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:(e,t,n)=>{var r=n(7854);e.exports=r},2248:(e,t,n)=>{var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:(e,t,n)=>{var r=n(7854),i=n(8880),o=n(6656),a=n(3505),s=n(2788),u=n(9909),c=u.get,l=u.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),l(n).source=d.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7651:(e,t,n)=>{var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:(e,t,n)=>{"use strict";var r,i,o=n(7066),a=n(2999),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),d=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||d)&&(c=function(e){var t,n,r,i,a=this,c=d&&a.sticky,p=o.call(a),h=a.source,m=0,g=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",p)),f&&(n=new RegExp("^"+h+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=s.call(c?n:a,g),c?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),f&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},7066:(e,t,n)=>{"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:(e,t,n)=>{"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4488:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},6465:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3505:(e,t,n)=>{var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},8003:(e,t,n)=>{var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:(e,t,n)=>{var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,n)=>{var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:(e,t,n)=>{var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:(e,t,n)=>{var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:(e,t,n)=>{var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3197:e=>{"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(e){return e+22+75*(e<26)},u=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},c=function(e){var n,r,c=[],l=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,d=128,f=0,p=72;for(n=0;n<e.length;n++)(r=e[n])<128&&c.push(a(r));var h=c.length,m=h;for(h&&c.push("-");m<l;){var g=t;for(n=0;n<e.length;n++)(r=e[n])>=d&&r<g&&(g=r);var v=m+1;if(g-d>o((t-f)/v))throw RangeError(i);for(f+=(g-d)*v,d=g,n=0;n<e.length;n++){if((r=e[n])<d&&++f>t)throw RangeError(i);if(r==d){for(var y=f,w=36;;w+=36){var _=w<=p?1:w>=p+26?26:w-p;if(y<_)break;var b=y-_,x=36-_;c.push(a(s(_+b%x))),y=o(b/x)}c.push(a(s(y))),p=u(f,v,m==h),f=0,++m}}++f,++d}return c.join("")};e.exports=function(e){var t,i,o=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)i=a[t],o.push(n.test(i)?"xn--"+c(i):i);return o.join(".")}},6091:(e,t,n)=>{var r=n(7293),i=n(1361);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},3111:(e,t,n)=>{var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},1400:(e,t,n)=>{var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:(e,t,n)=>{var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:(e,t,n)=>{var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:(e,t,n)=>{var r=n(4488);e.exports=function(e){return Object(r(e))}},7593:(e,t,n)=>{var r=n(111);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},1694:(e,t,n)=>{var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9711:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:(e,t,n)=>{var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(e,t,n)=>{var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),u=n(3307),c=i("wks"),l=r.Symbol,d=u?l:l&&l.withoutSetter||a;e.exports=function(e){return o(c,e)||(s&&o(l,e)?c[e]=l[e]:c[e]=d("Symbol."+e)),c[e]}},1361:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},6992:(e,t,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(654),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},5069:(e,t,n)=>{"use strict";var r=n(2109),i=n(3157),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},2707:(e,t,n)=>{"use strict";var r=n(2109),i=n(3099),o=n(7908),a=n(7293),s=n(9341),u=[],c=u.sort,l=a((function(){u.sort(void 0)})),d=a((function(){u.sort(null)})),f=s("sort");r({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(e){return void 0===e?c.call(o(this)):c.call(o(this),i(e))}})},4916:(e,t,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},8783:(e,t,n)=>{"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},5306:(e,t,n)=>{"use strict";var r=n(7007),i=n(9670),o=n(7908),a=n(7466),s=n(9958),u=n(4488),c=n(1530),l=n(7651),d=Math.max,f=Math.min,p=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!g&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var u=i(e),p=String(this),h="function"==typeof r;h||(r=String(r));var m=u.global;if(m){var _=u.unicode;u.lastIndex=0}for(var b=[];;){var x=l(u,p);if(null===x)break;if(b.push(x),!m)break;""===String(x[0])&&(u.lastIndex=c(p,a(u.lastIndex),_))}for(var T,k="",S=0,I=0;I<b.length;I++){x=b[I];for(var O=String(x[0]),E=d(f(s(x.index),p.length),0),C=[],P=1;P<x.length;P++)C.push(void 0===(T=x[P])?T:String(T));var L=x.groups;if(h){var N=[O].concat(C,E,p);void 0!==L&&N.push(L);var R=String(r.apply(void 0,N))}else R=w(O,p,E,C,L,r);E>=S&&(k+=p.slice(S,E)+R,S=E+O.length)}return k+p.slice(S)}];function w(e,n,r,i,a,s){var u=r+e.length,c=i.length,l=m;return void 0!==a&&(a=o(a),l=h),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>c){var d=p(l/10);return 0===d?t:d<=c?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},3210:(e,t,n)=>{"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},1817:(e,t,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(6656),s=n(111),u=n(3070).f,c=n(9920),l=o.Symbol;if(i&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var d={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new l(e):void 0===e?l():l(e);return""===e&&(d[t]=!0),t};c(f,l);var p=f.prototype=l.prototype;p.constructor=f;var h=p.toString,m="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:f})}},72:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},9137:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e,n){if(!r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},1957:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){r(n,e,t)&&f.call(i,e,n)}),void 0,!0,!0),i}})},103:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(e)}),void 0,!0,!0).result}})},6306:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(n)}),void 0,!0,!0).result}})},4592:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(4647),s=n(6465),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(e){return u(a(o(this)),(function(t,n){if(s(n,e))return u.stop()}),void 0,!0,!0).stopped}})},8276:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(4647),s=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(e){return s(a(o(this)),(function(t,n){if(n===e)return s.stop(t)}),void 0,!0,!0).result}})},5082:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){f.call(i,r(n,e,t),n)}),void 0,!0,!0),i}})},2813:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(4647),d=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Map"))),f=s(i.set);return d(n,(function(e,n){f.call(i,e,r(n,e,t))}),void 0,!0,!0),i}})},8222:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{merge:function(e){for(var t=o(this),n=a(t.set),r=0;r<arguments.length;)s(arguments[r++],n,t,!0);return t}})},8563:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{reduce:function(e){var t=o(this),n=s(t),r=arguments.length<2,i=r?void 0:arguments[1];if(a(e),u(n,(function(n,o){r?(r=!1,i=o):i=e(i,o,n,t)}),void 0,!0,!0),r)throw TypeError("Reduce of empty map with no initial value");return i}})},336:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(4647),u=n(408);r({target:"Map",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},7512:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099);r({target:"Map",proto:!0,real:!0,forced:i},{update:function(e,t){var n=o(this),r=arguments.length;a(t);var i=n.has(e);if(!i&&r<3)throw TypeError("Updating absent value");var s=i?n.get(e):a(r>2?arguments[2]:void 0)(e,n);return n.set(e,t(s,e,n)),n}})},8921:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(1501);r({target:"Set",proto:!0,real:!0,forced:i},{addAll:function(){return o.apply(this,arguments)}})},6248:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"Set",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},3599:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{difference:function(e){var t=a(this),n=new(u(t,o("Set")))(t),r=s(n.delete);return c(e,(function(e){r.call(n,e)})),n}})},1477:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e){if(!r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},4362:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(6767),d=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Set"))),f=s(i.add);return d(n,(function(e){r(e,e,t)&&f.call(i,e)}),void 0,!1,!0),i}})},5389:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop(e)}),void 0,!1,!0).result}})},401:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{intersection:function(e){var t=a(this),n=new(u(t,o("Set"))),r=s(t.has),i=s(n.add);return c(e,(function(e){r.call(t,e)&&i.call(n,e)})),n}})},5164:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:function(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!0===n.call(t,e))return s.stop()})).stopped}})},1238:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(8554),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:function(e){var t=u(this),n=a(e),r=n.has;return"function"!=typeof r&&(n=new(o("Set"))(e),r=s(n.has)),!c(t,(function(e){if(!1===r.call(n,e))return c.stop()}),void 0,!1,!0).stopped}})},4837:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{isSupersetOf:function(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!1===n.call(t,e))return s.stop()})).stopped}})},7485:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(6767),s=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{join:function(e){var t=o(this),n=a(t),r=void 0===e?",":String(e),i=[];return s(n,i.push,i,!1,!0),i.join(r)}})},465:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(9974),c=n(6707),l=n(6767),d=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{map:function(e){var t=a(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,o("Set"))),f=s(i.add);return d(n,(function(e){f.call(i,r(e,e,t))}),void 0,!1,!0),i}})},6651:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(3099),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{reduce:function(e){var t=o(this),n=s(t),r=arguments.length<2,i=r?void 0:arguments[1];if(a(e),u(n,(function(n){r?(r=!1,i=n):i=e(i,n,n,t)}),void 0,!1,!0),r)throw TypeError("Reduce of empty set with no initial value");return i}})},1437:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(9670),a=n(9974),s=n(6767),u=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),n=s(t),r=a(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},5285:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:function(e){var t=a(this),n=new(u(t,o("Set")))(t),r=s(n.delete),i=s(n.add);return c(e,(function(e){r.call(n,e)||i.call(n,e)})),n}})},9865:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(5005),a=n(9670),s=n(3099),u=n(6707),c=n(408);r({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=a(this),n=new(u(t,o("Set")))(t);return c(e,s(n.add),n),n}})},8206:(e,t,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(4092);r({target:"WeakMap",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},3948:(e,t,n)=>{var r=n(7854),i=n(8324),o=n(6992),a=n(8880),s=n(5112),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var d in i){var f=r[d],p=f&&f.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,d),i[d])for(var h in o)if(p[h]!==o[h])try{a(p,h,o[h])}catch(e){p[h]=o[h]}}}},1637:(e,t,n)=>{"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),s=n(2248),u=n(8003),c=n(4994),l=n(9909),d=n(5787),f=n(6656),p=n(9974),h=n(648),m=n(9670),g=n(111),v=n(30),y=n(9114),w=n(8554),_=n(1246),b=n(5112),x=i("fetch"),T=i("Headers"),k=b("iterator"),S="URLSearchParams",I="URLSearchParamsIterator",O=l.set,E=l.getterFor(S),C=l.getterFor(I),P=/\+/g,L=Array(4),N=function(e){return L[e-1]||(L[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},R=function(e){try{return decodeURIComponent(e)}catch(t){return e}},A=function(e){var t=e.replace(P," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(N(n--),R);return t}},U=/[!'()~]|%20/g,M={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},B=function(e){return M[e]},D=function(e){return encodeURIComponent(e).replace(U,B)},F=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:A(r.shift()),value:A(r.join("="))}))},j=function(e){this.entries.length=0,F(this.entries,e)},W=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=c((function(e,t){O(this,{type:I,iterator:w(E(e).entries),kind:t})}),"Iterator",(function(){var e=C(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),z=function(){d(this,z,S);var e,t,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,p=[];if(O(l,{type:S,entries:p,updateURL:function(){},updateSearchParams:j}),void 0!==c)if(g(c))if("function"==typeof(e=_(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(o=(i=w(m(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:s.value+""})}else for(u in c)f(c,u)&&p.push({key:u,value:c[u]+""});else F(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},V=z.prototype;s(V,{append:function(e,t){W(arguments.length,2);var n=E(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){W(arguments.length,1);for(var t=E(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){W(arguments.length,1);for(var t=E(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){W(arguments.length,1);for(var n,r=E(this),i=r.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=E(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=E(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new q(this,"keys")},values:function(){return new q(this,"values")},entries:function(){return new q(this,"entries")}},{enumerable:!0}),a(V,k,V.entries),a(V,"toString",(function(){for(var e,t=E(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(D(e.key)+"="+D(e.value));return n.join("&")}),{enumerable:!0}),u(z,S),r({global:!0,forced:!o},{URLSearchParams:z}),o||"function"!=typeof x||"function"!=typeof T||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,h(n)===S&&((r=t.headers?new T(t.headers):new T).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(n)),headers:y(0,r)}))),i.push(t)),x.apply(this,i)}}),e.exports={URLSearchParams:z,getState:E}},285:(e,t,n)=>{"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),s=n(7854),u=n(6048),c=n(1320),l=n(5787),d=n(6656),f=n(1574),p=n(8457),h=n(8710).codeAt,m=n(3197),g=n(8003),v=n(1637),y=n(9909),w=s.URL,_=v.URLSearchParams,b=v.getState,x=y.set,T=y.getterFor("URL"),k=Math.floor,S=Math.pow,I="Invalid scheme",O="Invalid host",E="Invalid port",C=/[A-Za-z]/,P=/[\d+-.A-Za-z]/,L=/\d/,N=/^(0x|0X)/,R=/^[0-7]+$/,A=/^\d+$/,U=/^[\dA-Fa-f]+$/,M=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,B=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,D=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,F=/[\u0009\u000A\u000D]/g,j=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return O;if(!(n=q(t.slice(1,-1))))return O;e.host=n}else if(Z(e)){if(t=m(t),M.test(t))return O;if(null===(n=W(t)))return O;e.host=n}else{if(B.test(t))return O;for(n="",r=p(t),i=0;i<r.length;i++)n+=K(r[i],V);e.host=n}},W=function(e){var t,n,r,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=N.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?A:8==o?R:U).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*S(256,3-r);return s},q=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=n=0;n<4&&U.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,c>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;d++}if(!L.test(f()))return;for(;L.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;d++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},z=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},V={},G=f({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),H=f({},G,{"#":1,"?":1,"{":1,"}":1}),X=f({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),K=function(e,t){var n=h(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},$={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Z=function(e){return d($,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Y=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Q=function(e,t){var n;return 2==e.length&&C.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Q(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ue={},ce={},le={},de={},fe={},pe={},he={},me={},ge={},ve={},ye={},we={},_e={},be={},xe={},Te={},ke=function(e,t,n,i){var o,a,s,u,c,l=n||re,f=0,h="",m=!1,g=!1,v=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(D,"")),t=t.replace(F,""),o=p(t);f<=o.length;){switch(a=o[f],l){case re:if(!a||!C.test(a)){if(n)return I;l=oe;continue}h+=a.toLowerCase(),l=ie;break;case ie:if(a&&(P.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return I;h="",l=oe,f=0;continue}if(n&&(Z(e)!=d($,h)||"file"==h&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(Z(e)&&$[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?l=ge:Z(e)&&i&&i.scheme==e.scheme?l=ae:Z(e)?l=le:"/"==o[f+1]?(l=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),l=be)}break;case oe:if(!i||i.cannotBeABaseURL&&"#"!=a)return I;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Te;break}l="file"==i.scheme?ge:ue;continue;case ae:if("/"!=a||"/"!=o[f+1]){l=ue;continue}l=de,f++;break;case se:if("/"==a){l=fe;break}l=_e;continue;case ue:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&Z(e))l=ce;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),l=_e;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Te}break;case ce:if(!Z(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,l=_e;continue}l=fe}else l=de;break;case le:if(l=de,"/"!=a||"/"!=h.charAt(f+1))continue;f++;break;case de:if("/"!=a&&"\\"!=a){l=fe;continue}break;case fe:if("@"==a){m&&(h="%40"+h),m=!0,s=p(h);for(var y=0;y<s.length;y++){var w=s[y];if(":"!=w||v){var _=K(w,X);v?e.password+=_:e.username+=_}else v=!0}h=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)){if(m&&""==h)return"Invalid authority";f-=p(h).length+1,h="",l=pe}else h+=a;break;case pe:case he:if(n&&"file"==e.scheme){l=ye;continue}if(":"!=a||g){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)){if(Z(e)&&""==h)return O;if(n&&""==h&&(J(e)||null!==e.port))return;if(u=j(e,h))return u;if(h="",l=we,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),h+=a}else{if(""==h)return O;if(u=j(e,h))return u;if(h="",l=me,n==he)return}break;case me:if(!L.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Z(e)||n){if(""!=h){var b=parseInt(h,10);if(b>65535)return E;e.port=Z(e)&&b===$[e.scheme]?null:b,h=""}if(n)return;l=we;continue}return E}h+=a;break;case ge:if(e.scheme="file","/"==a||"\\"==a)l=ve;else{if(!i||"file"!=i.scheme){l=_e;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){ee(o.slice(f).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),l=_e;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Te}}break;case ve:if("/"==a||"\\"==a){l=ye;break}i&&"file"==i.scheme&&!ee(o.slice(f).join(""))&&(Q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),l=_e;continue;case ye:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(h))l=_e;else if(""==h){if(e.host="",n)return;l=we}else{if(u=j(e,h))return u;if("localhost"==e.host&&(e.host=""),n)return;h="",l=we}continue}h+=a;break;case we:if(Z(e)){if(l=_e,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(l=_e,"/"!=a))continue}else e.fragment="",l=Te;else e.query="",l=xe;break;case _e:if(a==r||"/"==a||"\\"==a&&Z(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=h).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==a||"\\"==a&&Z(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&Z(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Q(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",l=xe):"#"==a&&(e.fragment="",l=Te)}else h+=K(a,H);break;case be:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Te):a!=r&&(e.path[0]+=K(a,V));break;case xe:n||"#"!=a?a!=r&&("'"==a&&Z(e)?e.query+="%27":e.query+="#"==a?"%23":K(a,V)):(e.fragment="",l=Te);break;case Te:a!=r&&(e.fragment+=K(a,G))}f++}},Se=function(e){var t,n,r=l(this,Se,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Se)t=T(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var u=s.searchParams=new _,c=b(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(r.href=Oe.call(r),r.origin=Ee.call(r),r.protocol=Ce.call(r),r.username=Pe.call(r),r.password=Le.call(r),r.host=Ne.call(r),r.hostname=Re.call(r),r.port=Ae.call(r),r.pathname=Ue.call(r),r.search=Me.call(r),r.searchParams=Be.call(r),r.hash=De.call(r))},Ie=Se.prototype,Oe=function(){var e=T(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",J(e)&&(c+=n+(r?":"+r:"")+"@"),c+=z(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Ee=function(){var e=T(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Z(e)?t+"://"+z(e.host)+(null!==n?":"+n:""):"null"},Ce=function(){return T(this).scheme+":"},Pe=function(){return T(this).username},Le=function(){return T(this).password},Ne=function(){var e=T(this),t=e.host,n=e.port;return null===t?"":null===n?z(t):z(t)+":"+n},Re=function(){var e=T(this).host;return null===e?"":z(e)},Ae=function(){var e=T(this).port;return null===e?"":String(e)},Ue=function(){var e=T(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=T(this).query;return e?"?"+e:""},Be=function(){return T(this).searchParams},De=function(){var e=T(this).fragment;return e?"#"+e:""},Fe=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Ie,{href:Fe(Oe,(function(e){var t=T(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);b(t.searchParams).updateSearchParams(t.query)})),origin:Fe(Ee),protocol:Fe(Ce,(function(e){var t=T(this);ke(t,String(e)+":",re)})),username:Fe(Pe,(function(e){var t=T(this),n=p(String(e));if(!Y(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=K(n[r],X)}})),password:Fe(Le,(function(e){var t=T(this),n=p(String(e));if(!Y(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=K(n[r],X)}})),host:Fe(Ne,(function(e){var t=T(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Fe(Re,(function(e){var t=T(this);t.cannotBeABaseURL||ke(t,String(e),he)})),port:Fe(Ae,(function(e){var t=T(this);Y(t)||(""==(e=String(e))?t.port=null:ke(t,e,me))})),pathname:Fe(Ue,(function(e){var t=T(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",we))})),search:Fe(Me,(function(e){var t=T(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ke(t,e,xe)),b(t.searchParams).updateSearchParams(t.query)})),searchParams:Fe(Be),hash:Fe(De,(function(e){var t=T(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Te)):t.fragment=null}))}),c(Ie,"toJSON",(function(){return Oe.call(this)}),{enumerable:!0}),c(Ie,"toString",(function(){return Oe.call(this)}),{enumerable:!0}),w){var je=w.createObjectURL,We=w.revokeObjectURL;je&&c(Se,"createObjectURL",(function(e){return je.apply(w,arguments)})),We&&c(Se,"revokeObjectURL",(function(e){return We.apply(w,arguments)}))}g(Se,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Se})},9575:function(e,t,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,e.exports=function(){"use strict";var e,t="3.7.2",n="function"==typeof atob,r="function"==typeof btoa,i="function"==typeof Buffer,o="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,s=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(e={},s.forEach((function(t,n){return e[t]=n})),e),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,l=String.fromCharCode.bind(String),d="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},f=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},p=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},h=function(e){for(var t,n,r,i,o="",a=e.length%3,u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(r=e.charCodeAt(u++))>255||(i=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");o+=s[(t=n<<16|r<<8|i)>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},m=r?function(e){return btoa(e)}:i?function(e){return Buffer.from(e,"binary").toString("base64")}:h,g=i?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(l.apply(null,e.subarray(n,n+4096)));return m(t.join(""))},v=function(e,t){return void 0===t&&(t=!1),t?f(g(e)):g(e)},y=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,_=function(e){return e.replace(w,y)},b=i?function(e){return Buffer.from(e,"utf8").toString("base64")}:a?function(e){return g(a.encode(e))}:function(e){return m(_(e))},x=function(e,t){return void 0===t&&(t=!1),t?f(b(e)):b(e)},T=function(e){return x(e,!0)},k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=function(e){return e.replace(k,S)},O=function(e){if(e=e.replace(/\s+/g,""),!c.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,i="",o=0;o<e.length;)t=u[e.charAt(o++)]<<18|u[e.charAt(o++)]<<12|(n=u[e.charAt(o++)])<<6|(r=u[e.charAt(o++)]),i+=64===n?l(t>>16&255):64===r?l(t>>16&255,t>>8&255):l(t>>16&255,t>>8&255,255&t);return i},E=n?function(e){return atob(p(e))}:i?function(e){return Buffer.from(e,"base64").toString("binary")}:O,C=i?function(e){return d(Buffer.from(e,"base64"))}:function(e){return d(E(e),(function(e){return e.charCodeAt(0)}))},P=function(e){return C(N(e))},L=i?function(e){return Buffer.from(e,"base64").toString("utf8")}:o?function(e){return o.decode(C(e))}:function(e){return I(E(e))},N=function(e){return p(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},R=function(e){return L(N(e))},A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},U=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,A(t))};e("fromBase64",(function(){return R(this)})),e("toBase64",(function(e){return x(this,e)})),e("toBase64URI",(function(){return x(this,!0)})),e("toBase64URL",(function(){return x(this,!0)})),e("toUint8Array",(function(){return P(this)}))},M=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,A(t))};e("toBase64",(function(e){return v(this,e)})),e("toBase64URI",(function(){return v(this,!0)})),e("toBase64URL",(function(){return v(this,!0)}))},B={version:t,VERSION:"3.7.2",atob:E,atobPolyfill:O,btoa:m,btoaPolyfill:h,fromBase64:R,toBase64:x,encode:x,encodeURI:T,encodeURL:T,utob:_,btou:I,decode:R,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:v,toUint8Array:P,extendString:U,extendUint8Array:M,extendBuiltins:function(){U(),M()},Base64:{}};return Object.keys(B).forEach((function(e){return B.Base64[e]=B[e]})),B}()},6063:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){var r,i;void 0===(i="function"==typeof(r={af:function(e,t){return t?"other":1==e?"one":"other"},ak:function(e,t){return t?"other":0==e||1==e?"one":"other"},am:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:function(e,t){return t?"other":1==e?"one":"other"},ast:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:function(e,t){return t?"other":1==e?"one":"other"},bez:function(e,t){return t?"other":1==e?"one":"other"},bg:function(e,t){return t?"other":1==e?"one":"other"},bh:function(e,t){return t?"other":0==e||1==e?"one":"other"},bm:function(e,t){return"other"},bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:function(e,t){return"other"},br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:function(e,t){return t?"other":1==e?"one":"other"},bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=!String(e).split(".")[1];return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&n?"one":"other"},ce:function(e,t){return t?"other":1==e?"one":"other"},cgg:function(e,t){return t?"other":1==e?"one":"other"},chr:function(e,t){return t?"other":1==e?"one":"other"},ckb:function(e,t){return t?"other":1==e?"one":"other"},cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:function(e,t){return t?"other":1==e?"one":"other"},dz:function(e,t){return"other"},ee:function(e,t){return t?"other":1==e?"one":"other"},el:function(e,t){return t?"other":1==e?"one":"other"},en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:function(e,t){return t?"other":1==e?"one":"other"},es:function(e,t){return t?"other":1==e?"one":"other"},et:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},eu:function(e,t){return t?"other":1==e?"one":"other"},fa:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:function(e,t){return t?"other":1==e?"one":"other"},fr:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},fur:function(e,t){return t?"other":1==e?"one":"other"},fy:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},gsw:function(e,t){return t?"other":1==e?"one":"other"},gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:function(e,t){return t?"other":0==e||1==e?"one":"other"},gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:function(e,t){return t?"other":1==e?"one":"other"},haw:function(e,t){return t?"other":1==e?"one":"other"},he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1);return t?"other":1==e&&i?"one":2==r&&i?"two":i&&(e<0||e>10)&&o&&0==a?"many":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},id:function(e,t){return"other"},ig:function(e,t){return"other"},ii:function(e,t){return"other"},in:function(e,t){return"other"},io:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},is:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e,o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a||!i?"one":"other"},it:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},iu:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},iw:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1);return t?"other":1==e&&i?"one":2==r&&i?"two":i&&(e<0||e>10)&&o&&0==a?"many":"other"},ja:function(e,t){return"other"},jbo:function(e,t){return"other"},jgo:function(e,t){return t?"other":1==e?"one":"other"},ji:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},jmc:function(e,t){return t?"other":1==e?"one":"other"},jv:function(e,t){return"other"},jw:function(e,t){return"other"},ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:function(e,t){return t?"other":1==e?"one":"other"},kcg:function(e,t){return t?"other":1==e?"one":"other"},kde:function(e,t){return"other"},kea:function(e,t){return"other"},kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:function(e,t){return t?"other":1==e?"one":"other"},kl:function(e,t){return t?"other":1==e?"one":"other"},km:function(e,t){return"other"},kn:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},ko:function(e,t){return"other"},ks:function(e,t){return t?"other":1==e?"one":"other"},ksb:function(e,t){return t?"other":1==e?"one":"other"},ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:function(e,t){return t?"other":1==e?"one":"other"},kw:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},ky:function(e,t){return t?"other":1==e?"one":"other"},lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:function(e,t){return t?"other":1==e?"one":"other"},lg:function(e,t){return t?"other":1==e?"one":"other"},lkt:function(e,t){return"other"},ln:function(e,t){return t?"other":0==e||1==e?"one":"other"},lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&u>=11&&u<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=u||2!=i&&1==c?"one":"other"},mas:function(e,t){return t?"other":1==e?"one":"other"},mg:function(e,t){return t?"other":0==e||1==e?"one":"other"},mgo:function(e,t){return t?"other":1==e?"one":"other"},mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==u&&11!=c?"one":"other"},ml:function(e,t){return t?"other":1==e?"one":"other"},mn:function(e,t){return t?"other":1==e?"one":"other"},mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":e>=0&&e<=1?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":0==e||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:function(e,t){return"other"},nah:function(e,t){return t?"other":1==e?"one":"other"},naq:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},nb:function(e,t){return t?"other":1==e?"one":"other"},nd:function(e,t){return t?"other":1==e?"one":"other"},ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},nn:function(e,t){return t?"other":1==e?"one":"other"},nnh:function(e,t){return t?"other":1==e?"one":"other"},no:function(e,t){return t?"other":1==e?"one":"other"},nqo:function(e,t){return"other"},nr:function(e,t){return t?"other":1==e?"one":"other"},nso:function(e,t){return t?"other":0==e||1==e?"one":"other"},ny:function(e,t){return t?"other":1==e?"one":"other"},nyn:function(e,t){return t?"other":1==e?"one":"other"},om:function(e,t){return t?"other":1==e?"one":"other"},or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:function(e,t){return t?"other":1==e?"one":"other"},pa:function(e,t){return t?"other":0==e||1==e?"one":"other"},pap:function(e,t){return t?"other":1==e?"one":"other"},pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&u>=11&&u<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=u||2!=i&&1==c?"one":"other"},ps:function(e,t){return t?"other":1==e?"one":"other"},pt:function(e,t){var n=String(e).split(".")[0];return t?"other":0==n||1==n?"one":"other"},"pt-PT":function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},rm:function(e,t){return t?"other":1==e?"one":"other"},ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:function(e,t){return t?"other":1==e?"one":"other"},root:function(e,t){return"other"},ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:function(e,t){return t?"other":1==e?"one":"other"},sah:function(e,t){return"other"},saq:function(e,t){return t?"other":1==e?"one":"other"},sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:function(e,t){return t?"other":1==e?"one":"other"},sdh:function(e,t){return t?"other":1==e?"one":"other"},se:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},seh:function(e,t){return t?"other":1==e?"one":"other"},ses:function(e,t){return"other"},sg:function(e,t){return"other"},sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smi:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smj:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},smn:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},sms:function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},sn:function(e,t){return t?"other":1==e?"one":"other"},so:function(e,t){return t?"other":1==e?"one":"other"},sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),u=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==u&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||u>=2&&u<=4&&(c<12||c>14)?"few":"other"},ss:function(e,t){return t?"other":1==e?"one":"other"},ssy:function(e,t){return t?"other":1==e?"one":"other"},st:function(e,t){return t?"other":1==e?"one":"other"},sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},syr:function(e,t){return t?"other":1==e?"one":"other"},ta:function(e,t){return t?"other":1==e?"one":"other"},te:function(e,t){return t?"other":1==e?"one":"other"},teo:function(e,t){return t?"other":1==e?"one":"other"},th:function(e,t){return"other"},ti:function(e,t){return t?"other":0==e||1==e?"one":"other"},tig:function(e,t){return t?"other":1==e?"one":"other"},tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:function(e,t){return t?"other":1==e?"one":"other"},to:function(e,t){return"other"},tr:function(e,t){return t?"other":1==e?"one":"other"},ts:function(e,t){return t?"other":1==e?"one":"other"},tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:function(e,t){return t?"other":1==e?"one":"other"},uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),u=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==u&&11!=c?"one":i&&u>=2&&u<=4&&(c<12||c>14)?"few":i&&0==u||i&&u>=5&&u<=9||i&&c>=11&&c<=14?"many":"other"},ur:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},uz:function(e,t){return t?"other":1==e?"one":"other"},ve:function(e,t){return t?"other":1==e?"one":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:function(e,t){return t?"other":1==e?"one":"other"},vun:function(e,t){return t?"other":1==e?"one":"other"},wa:function(e,t){return t?"other":0==e||1==e?"one":"other"},wae:function(e,t){return t?"other":1==e?"one":"other"},wo:function(e,t){return"other"},xh:function(e,t){return t?"other":1==e?"one":"other"},xog:function(e,t){return t?"other":1==e?"one":"other"},yi:function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},yo:function(e,t){return"other"},yue:function(e,t){return"other"},zh:function(e,t){return"other"},zu:function(e,t){return t?"other":e>=0&&e<=1?"one":"other"}})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){e.exports={date:n(4),duration:n(5),number:n(6),time:n(7)}},function(e,t,n){"use strict";function r(e,t,n,i){this.message=e,this.expected=t,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(r,Error),r.buildMessage=function(e,t){var n={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,n="";for(t=0;t<e.parts.length;t++)n+=e.parts[t]instanceof Array?o(e.parts[t][0])+"-"+o(e.parts[t][1]):o(e.parts[t]);return"["+(e.inverted?"^":"")+n+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function o(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}return"Expected "+function(e){var t,r,i,o=new Array(e.length);for(t=0;t<e.length;t++)o[t]=(i=e[t],n[i.type](i));if(o.sort(),o.length>0){for(t=1,r=1;t<o.length;t++)o[t-1]!==o[t]&&(o[r]=o[t],r++);o.length=r}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:r,parse:function(e,t){t=void 0!==t?t:{};var n,i={},o={start:Oe},a=Oe,s=be("#",!1),u=function(){return Fe[0]},c=function(e){return e.join("")},l="{",d=be("{",!1),f="}",p=be("}",!1),h=",",m=be(",",!1),g="select",v=be("select",!1),y=function(e,n){return t.strict&&Fe.unshift(!1),n},w=function(e,n){return t.strict&&Fe.shift(),{type:"select",arg:e,cases:n}},_="plural",b=be("plural",!1),x="selectordinal",T=be("selectordinal",!1),k=function(e,n,r,i){var o=("selectordinal"===n?t.ordinal:t.cardinal)||["zero","one","two","few","many","other"];return o&&o.length&&i.forEach((function(t){if(isNaN(t.key)&&o.indexOf(t.key)<0)throw new Error("Invalid key `"+t.key+"` for argument `"+e+"`. Valid "+n+" keys for this locale are `"+o.join("`, `")+"`, and explicit keys like `=0`.")})),Fe.shift(),{type:n,arg:e,offset:r||0,cases:i}},S=Te("identifier"),I=/^[^\t-\r \x85\u200E\u200F\u2028\u2029!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,O=xe([["\t","\r"]," ","…","‎","‏","\u2028","\u2029",["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!0,!1),E=function(e,t){return{key:e,tokens:t}},C=Te("plural offset"),P="offset",L=be("offset",!1),N=be(":",!1),R=be("=",!1),A="number",U=be("number",!1),M="date",B=be("date",!1),D="time",F=be("time",!1),j="spellout",W=be("spellout",!1),q="ordinal",z=be("ordinal",!1),V="duration",G=be("duration",!1),H=function(e){if(t.strict||/^\d/.test(e))return!1;switch(e.toLowerCase()){case"select":case"plural":case"selectordinal":return!1;default:return!0}},X=function(e){return!t.strict},K=Te("a valid (strict) function parameter"),$=/^[^'{}]/,Z=xe(["'","{","}"],!0,!1),J="'",Y=be("'",!1),Q=Te("doubled apostrophe"),ee=be("''",!1),te=/^[^']/,ne=xe(["'"],!0,!1),re=be("'{",!1),ie=be("'}",!1),oe=Te("escaped string"),ae=be("'#",!1),se=Te("plain char"),ue=/^[^{}#\0-\x08\x0E-\x1F\x7F]/,ce=xe(["{","}","#",["\0","\b"],["",""],""],!0,!1),le=Te("integer"),de=/^[0-9]/,fe=xe([["0","9"]],!1,!1),pe=Te("white space"),he=/^[\t-\r \x85\u200E\u200F\u2028\u2029]/,me=xe([["\t","\r"]," ","…","‎","‏","\u2028","\u2029"],!1,!1),ge=0,ve=[{line:1,column:1}],ye=0,we=[],_e=0;if("startRule"in t){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function be(e,t){return{type:"literal",text:e,ignoreCase:t}}function xe(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Te(e){return{type:"other",description:e}}function ke(t){var n,r=ve[t];if(r)return r;for(n=t-1;!ve[n];)n--;for(r={line:(r=ve[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return ve[t]=r,r}function Se(e,t){var n=ke(e),r=ke(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Ie(e){ge<ye||(ge>ye&&(ye=ge,we=[]),we.push(e))}function Oe(){var e,t;for(e=[],t=Ee();t!==i;)e.push(t),t=Ee();return e}function Ee(){var t,n,r;if((t=function(){var t,n,r,o;return t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i&&De()!==i&&(r=Ce())!==i&&De()!==i?(125===e.charCodeAt(ge)?(o=f,ge++):(o=i,0===_e&&Ie(p)),o!==i?t=n=function(e){return{type:"argument",arg:e}}(r):(ge=t,t=i)):(ge=t,t=i),t}())===i&&(t=function(){var t,n,r,o,a,s,u,c,_;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(De()!==i)if((r=Ce())!==i)if(De()!==i)if(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i)if(De()!==i)if(e.substr(ge,6)===g?(a=g,ge+=6):(a=i,0===_e&&Ie(v)),a!==i&&(a=y(0,a)),a!==i)if((a=De())!==i)if(44===e.charCodeAt(ge)?(s=h,ge++):(s=i,0===_e&&Ie(m)),s!==i)if(De()!==i){if(u=[],(c=Pe())!==i)for(;c!==i;)u.push(c),c=Pe();else u=i;u!==i&&(c=De())!==i?(125===e.charCodeAt(ge)?(_=f,ge++):(_=i,0===_e&&Ie(p)),_!==i?t=n=w(r,u):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,u,c,g,v,y;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(De()!==i)if((r=Ce())!==i)if(De()!==i)if(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i)if(De()!==i)if(ge,e.substr(ge,6)===_?(s=_,ge+=6):(s=i,0===_e&&Ie(b)),s===i&&(e.substr(ge,13)===x?(s=x,ge+=13):(s=i,0===_e&&Ie(T))),s!==i&&(s=function(e,t){return Fe.unshift(!0),t}(0,s)),(a=s)!==i)if((s=De())!==i)if(44===e.charCodeAt(ge)?(u=h,ge++):(u=i,0===_e&&Ie(m)),u!==i)if(De()!==i)if((c=function(){var t,n,r,o;return _e++,t=ge,De()!==i?(e.substr(ge,6)===P?(n=P,ge+=6):(n=i,0===_e&&Ie(L)),n!==i&&De()!==i?(58===e.charCodeAt(ge)?(r=":",ge++):(r=i,0===_e&&Ie(N)),r!==i&&De()!==i&&(o=Be())!==i&&De()!==i?t=o:(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i),_e--,t===i&&0===_e&&Ie(C),t}())===i&&(c=null),c!==i){if(g=[],(v=Le())!==i)for(;v!==i;)g.push(v),v=Le();else g=i;g!==i&&(v=De())!==i?(125===e.charCodeAt(ge)?(y=f,ge++):(y=i,0===_e&&Ie(p)),y!==i?t=n=k(r,a,c,g):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;else ge=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,u;return t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i&&De()!==i&&(r=Ce())!==i&&De()!==i?(44===e.charCodeAt(ge)?(o=h,ge++):(o=i,0===_e&&Ie(m)),o!==i&&De()!==i&&(a=function(){var t,n,r,o,a;return e.substr(ge,6)===A?(t=A,ge+=6):(t=i,0===_e&&Ie(U)),t===i&&(e.substr(ge,4)===M?(t=M,ge+=4):(t=i,0===_e&&Ie(B)),t===i&&(e.substr(ge,4)===D?(t=D,ge+=4):(t=i,0===_e&&Ie(F)),t===i&&(e.substr(ge,8)===j?(t=j,ge+=8):(t=i,0===_e&&Ie(W)),t===i&&(e.substr(ge,7)===q?(t=q,ge+=7):(t=i,0===_e&&Ie(z)),t===i&&(e.substr(ge,8)===V?(t=V,ge+=8):(t=i,0===_e&&Ie(G)),t===i&&(t=ge,n=ge,_e++,e.substr(ge,6)===g?(r=g,ge+=6):(r=i,0===_e&&Ie(v)),_e--,r===i?n=void 0:(ge=n,n=i),n!==i?(r=ge,_e++,e.substr(ge,6)===_?(o=_,ge+=6):(o=i,0===_e&&Ie(b)),_e--,o===i?r=void 0:(ge=r,r=i),r!==i?(o=ge,_e++,e.substr(ge,13)===x?(a=x,ge+=13):(a=i,0===_e&&Ie(T)),_e--,a===i?o=void 0:(ge=o,o=i),o!==i&&(a=Ce())!==i&&(H(a)?void 0:i)!==i?t=n=a:(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i))))))),t}())!==i&&De()!==i?((s=function(){var t,n,r,o;if(t=ge,De()!==i)if(44===e.charCodeAt(ge)?(n=h,ge++):(n=i,0===_e&&Ie(m)),n!==i){for(r=[],o=Ee();o!==i;)r.push(o),o=Ee();r!==i&&(o=(o=X())?void 0:i)!==i?t=function(e){return{tokens:e}}(r):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;if(t===i)if(t=ge,De()!==i)if(44===e.charCodeAt(ge)?(n=h,ge++):(n=i,0===_e&&Ie(m)),n!==i){for(r=[],o=Re();o!==i;)r.push(o),o=Re();r!==i?t=function(e){return{tokens:[e.join("")]}}(r):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;return t}())===i&&(s=null),s!==i?(125===e.charCodeAt(ge)?(u=f,ge++):(u=i,0===_e&&Ie(p)),u!==i?t=n=function(e,t,n){return{type:"function",arg:e,key:t,param:n}}(r,a,s):(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i)):(ge=t,t=i),t}())===i&&(t=ge,35===e.charCodeAt(ge)?(n="#",ge++):(n=i,0===_e&&Ie(s)),n!==i&&(r=(r=u())?void 0:i)!==i?t=n={type:"octothorpe"}:(ge=t,t=i),t===i)){if(t=ge,n=[],(r=Me())!==i)for(;r!==i;)n.push(r),r=Me();else n=i;n!==i&&(n=c(n)),t=n}return t}function Ce(){var t,n,r;if(_e++,t=ge,n=[],I.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(O)),r!==i)for(;r!==i;)n.push(r),I.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(O));else n=i;return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(S)),t}function Pe(){var e,t,n;return e=ge,De()!==i&&(t=Ce())!==i&&De()!==i&&(n=Ne())!==i?e=E(t,n):(ge=e,e=i),e}function Le(){var t,n,r;return t=ge,De()!==i&&(n=function(){var t,n,r;return(t=Ce())===i&&(t=ge,61===e.charCodeAt(ge)?(n="=",ge++):(n=i,0===_e&&Ie(R)),n!==i&&(r=Be())!==i?t=n=r:(ge=t,t=i)),t}())!==i&&De()!==i&&(r=Ne())!==i?t=E(n,r):(ge=t,t=i),t}function Ne(){var t,n,r,o,a,s;if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i)if(r=ge,(o=De())!==i?(a=ge,_e++,123===e.charCodeAt(ge)?(s=l,ge++):(s=i,0===_e&&Ie(d)),_e--,s!==i?(ge=a,a=void 0):a=i,a!==i?r=o=[o,a]:(ge=r,r=i)):(ge=r,r=i),r===i&&(r=null),r!==i){for(o=[],a=Ee();a!==i;)o.push(a),a=Ee();o!==i&&(a=De())!==i?(125===e.charCodeAt(ge)?(s=f,ge++):(s=i,0===_e&&Ie(p)),s!==i?t=n=o:(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;else ge=t,t=i;return t}function Re(){var t,n,r,o;if(_e++,t=ge,n=[],$.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(Z)),r!==i)for(;r!==i;)n.push(r),$.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(Z));else n=i;if(n!==i&&(n=function(e){return e.join("")}(n)),(t=n)===i&&(t=Ae())===i&&(t=ge,39===e.charCodeAt(ge)?(n=J,ge++):(n=i,0===_e&&Ie(Y)),n!==i&&(r=Ue())!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=r:(ge=t,t=i)):(ge=t,t=i),t===i))if(t=ge,123===e.charCodeAt(ge)?(n=l,ge++):(n=i,0===_e&&Ie(d)),n!==i){for(r=[],o=Re();o!==i;)r.push(o),o=Re();r!==i?(125===e.charCodeAt(ge)?(o=f,ge++):(o=i,0===_e&&Ie(p)),o!==i?t=n=function(e){return"{"+e.join("")+"}"}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;return _e--,t===i&&(n=i,0===_e&&Ie(K)),t}function Ae(){var t,n;return _e++,ge,"''"===e.substr(ge,2)?(n="''",ge+=2):(n=i,0===_e&&Ie(ee)),n!==i&&(n="'"),_e--,(t=n)===i&&(n=i,0===_e&&Ie(Q)),t}function Ue(){var t,n,r;if((t=Ae())===i){if(t=ge,n=[],te.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(ne)),r!==i)for(;r!==i;)n.push(r),te.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(ne));else n=i;n!==i&&(n=c(n)),t=n}return t}function Me(){var t,n;return(t=Ae())===i&&(t=function(){var t,n,r,o,a,s;if(_e++,(t=function(){var t,n,r,o;if(t=ge,"'{"===e.substr(ge,2)?(n="'{",ge+=2):(n=i,0===_e&&Ie(re)),n!==i){for(r=[],o=Ue();o!==i;)r.push(o),o=Ue();r!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=function(e){return"{"+e.join("")}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;if(t===i)if(t=ge,"'}"===e.substr(ge,2)?(n="'}",ge+=2):(n=i,0===_e&&Ie(ie)),n!==i){for(r=[],o=Ue();o!==i;)r.push(o),o=Ue();r!==i?(39===e.charCodeAt(ge)?(o=J,ge++):(o=i,0===_e&&Ie(Y)),o!==i?t=n=function(e){return"}"+e.join("")}(r):(ge=t,t=i)):(ge=t,t=i)}else ge=t,t=i;return t}())===i){if(t=ge,n=ge,r=ge,"'#"===e.substr(ge,2)?(o="'#",ge+=2):(o=i,0===_e&&Ie(ae)),o!==i){for(a=[],s=Ue();s!==i;)a.push(s),s=Ue();a!==i?(39===e.charCodeAt(ge)?(s=J,ge++):(s=i,0===_e&&Ie(Y)),s!==i?r=o=function(e){return"#"+e.join("")}(a):(ge=r,r=i)):(ge=r,r=i)}else ge=r,r=i;r!==i&&(o=(o=u())?void 0:i)!==i?n=r=[r,o]:(ge=n,n=i),n!==i&&(n=function(e){return e[0]}(n)),(t=n)===i&&(39===e.charCodeAt(ge)?(t=J,ge++):(t=i,0===_e&&Ie(Y)))}return _e--,t===i&&(n=i,0===_e&&Ie(oe)),t}())===i&&(t=ge,35===e.charCodeAt(ge)?(n="#",ge++):(n=i,0===_e&&Ie(s)),n!==i&&(Fe[0]?i:void 0)!==i?t=n=n:(ge=t,t=i),t===i&&(t=function(){var t;return _e++,ue.test(e.charAt(ge))?(t=e.charAt(ge),ge++):(t=i,0===_e&&Ie(ce)),_e--,t===i&&0===_e&&Ie(se),t}())),t}function Be(){var t,n,r;if(_e++,t=ge,n=[],de.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(fe)),r!==i)for(;r!==i;)n.push(r),de.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(fe));else n=i;return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(le)),t}function De(){var t,n,r;for(_e++,t=ge,n=[],he.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(me));r!==i;)n.push(r),he.test(e.charAt(ge))?(r=e.charAt(ge),ge++):(r=i,0===_e&&Ie(me));return t=n!==i?e.substring(t,ge):n,_e--,t===i&&(n=i,0===_e&&Ie(pe)),t}var Fe=[!1];if((n=a())!==i&&ge===e.length)return n;throw n!==i&&ge<e.length&&Ie({type:"end"}),function(e,t,n){return new r(r.buildMessage(e,t),e,t,n)}(we,ye<e.length?e.charAt(ye):null,ye<e.length?Se(ye,ye+1):Se(ye,ye))}}},function(e,t,n){var r,i,o=[{cardinal:["other"],ordinal:["other"]},{cardinal:["one","other"],ordinal:["other"]},{cardinal:["one","other"],ordinal:["one","other"]},{cardinal:["one","two","other"],ordinal:["other"]}];void 0===(i="function"==typeof(r={af:o[1],ak:o[1],am:o[1],ar:{cardinal:["zero","one","two","few","many","other"],ordinal:["other"]},ars:{cardinal:["zero","one","two","few","many","other"],ordinal:["other"]},as:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},asa:o[1],ast:o[1],az:{cardinal:["one","other"],ordinal:["one","few","many","other"]},be:{cardinal:["one","few","many","other"],ordinal:["few","other"]},bem:o[1],bez:o[1],bg:o[1],bh:o[1],bm:o[0],bn:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},bo:o[0],br:{cardinal:["one","two","few","many","other"],ordinal:["other"]},brx:o[1],bs:{cardinal:["one","few","other"],ordinal:["other"]},ca:{cardinal:["one","other"],ordinal:["one","two","few","other"]},ce:o[1],cgg:o[1],chr:o[1],ckb:o[1],cs:{cardinal:["one","few","many","other"],ordinal:["other"]},cy:{cardinal:["zero","one","two","few","many","other"],ordinal:["zero","one","two","few","many","other"]},da:o[1],de:o[1],dsb:{cardinal:["one","two","few","other"],ordinal:["other"]},dv:o[1],dz:o[0],ee:o[1],el:o[1],en:{cardinal:["one","other"],ordinal:["one","two","few","other"]},eo:o[1],es:o[1],et:o[1],eu:o[1],fa:o[1],ff:o[1],fi:o[1],fil:o[2],fo:o[1],fr:o[2],fur:o[1],fy:o[1],ga:{cardinal:["one","two","few","many","other"],ordinal:["one","other"]},gd:{cardinal:["one","two","few","other"],ordinal:["one","two","few","other"]},gl:o[1],gsw:o[1],gu:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},guw:o[1],gv:{cardinal:["one","two","few","many","other"],ordinal:["other"]},ha:o[1],haw:o[1],he:{cardinal:["one","two","many","other"],ordinal:["other"]},hi:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},hr:{cardinal:["one","few","other"],ordinal:["other"]},hsb:{cardinal:["one","two","few","other"],ordinal:["other"]},hu:o[2],hy:o[2],ia:o[1],id:o[0],ig:o[0],ii:o[0],in:o[0],io:o[1],is:o[1],it:{cardinal:["one","other"],ordinal:["many","other"]},iu:o[3],iw:{cardinal:["one","two","many","other"],ordinal:["other"]},ja:o[0],jbo:o[0],jgo:o[1],ji:o[1],jmc:o[1],jv:o[0],jw:o[0],ka:{cardinal:["one","other"],ordinal:["one","many","other"]},kab:o[1],kaj:o[1],kcg:o[1],kde:o[0],kea:o[0],kk:{cardinal:["one","other"],ordinal:["many","other"]},kkj:o[1],kl:o[1],km:o[0],kn:o[1],ko:o[0],ks:o[1],ksb:o[1],ksh:{cardinal:["zero","one","other"],ordinal:["other"]},ku:o[1],kw:o[3],ky:o[1],lag:{cardinal:["zero","one","other"],ordinal:["other"]},lb:o[1],lg:o[1],lkt:o[0],ln:o[1],lo:{cardinal:["other"],ordinal:["one","other"]},lt:{cardinal:["one","few","many","other"],ordinal:["other"]},lv:{cardinal:["zero","one","other"],ordinal:["other"]},mas:o[1],mg:o[1],mgo:o[1],mk:{cardinal:["one","other"],ordinal:["one","two","many","other"]},ml:o[1],mn:o[1],mo:{cardinal:["one","few","other"],ordinal:["one","other"]},mr:{cardinal:["one","other"],ordinal:["one","two","few","other"]},ms:{cardinal:["other"],ordinal:["one","other"]},mt:{cardinal:["one","few","many","other"],ordinal:["other"]},my:o[0],nah:o[1],naq:o[3],nb:o[1],nd:o[1],ne:o[2],nl:o[1],nn:o[1],nnh:o[1],no:o[1],nqo:o[0],nr:o[1],nso:o[1],ny:o[1],nyn:o[1],om:o[1],or:{cardinal:["one","other"],ordinal:["one","two","few","many","other"]},os:o[1],pa:o[1],pap:o[1],pl:{cardinal:["one","few","many","other"],ordinal:["other"]},prg:{cardinal:["zero","one","other"],ordinal:["other"]},ps:o[1],pt:o[1],"pt-PT":o[1],rm:o[1],ro:{cardinal:["one","few","other"],ordinal:["one","other"]},rof:o[1],root:o[0],ru:{cardinal:["one","few","many","other"],ordinal:["other"]},rwk:o[1],sah:o[0],saq:o[1],sc:{cardinal:["one","other"],ordinal:["many","other"]},scn:{cardinal:["one","other"],ordinal:["many","other"]},sd:o[1],sdh:o[1],se:o[3],seh:o[1],ses:o[0],sg:o[0],sh:{cardinal:["one","few","other"],ordinal:["other"]},shi:{cardinal:["one","few","other"],ordinal:["other"]},si:o[1],sk:{cardinal:["one","few","many","other"],ordinal:["other"]},sl:{cardinal:["one","two","few","other"],ordinal:["other"]},sma:o[3],smi:o[3],smj:o[3],smn:o[3],sms:o[3],sn:o[1],so:o[1],sq:{cardinal:["one","other"],ordinal:["one","many","other"]},sr:{cardinal:["one","few","other"],ordinal:["other"]},ss:o[1],ssy:o[1],st:o[1],sv:o[2],sw:o[1],syr:o[1],ta:o[1],te:o[1],teo:o[1],th:o[0],ti:o[1],tig:o[1],tk:{cardinal:["one","other"],ordinal:["few","other"]},tl:o[2],tn:o[1],to:o[0],tr:o[1],ts:o[1],tzm:o[1],ug:o[1],uk:{cardinal:["one","few","many","other"],ordinal:["few","other"]},ur:o[1],uz:o[1],ve:o[1],vi:{cardinal:["other"],ordinal:["one","other"]},vo:o[1],vun:o[1],wa:o[1],wae:o[1],wo:o[0],xh:o[1],xog:o[1],yi:o[1],yo:o[0],yue:o[0],zh:o[0],zu:o[1]})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t){function n(e,t,n){var r={day:"numeric",month:"short",year:"numeric"};switch(n){case"full":r.weekday="long";case"long":r.month="long";break;case"short":r.month="numeric"}return new Date(e).toLocaleDateString(t,r)}e.exports=function(){return n}},function(e,t){function n(e){if(!isFinite(e))return String(e);var t="";e<0?(t="-",e=Math.abs(e)):e=Number(e);var n=e%60,r=[Math.round(n)===n?n:n.toFixed(3)];return e<60?r.unshift(0):(e=Math.round((e-r[0])/60),r.unshift(e%60),e>=60&&(e=Math.round((e-r[0])/60),r.unshift(e))),t+r.shift()+":"+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":")}e.exports=function(){return n}},function(e,t){e.exports=function(e){var t=function(e,t,n){var r=n&&n.split(":")||[],i={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:r[1]&&r[1].trim()||CURRENCY,minimumFractionDigits:2,maximumFractionDigits:2}};return new Intl.NumberFormat(t,i[r[0]]||{}).format(e)}.toString().replace("CURRENCY",JSON.stringify(e.currency||"USD")).match(/\(([^)]*)\)[^{]*{([\s\S]*)}/);return new Function(t[1],t[2])}},function(e,t){function n(e,t,n){var r={second:"numeric",minute:"numeric",hour:"numeric"};switch(n){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}return new Date(e).toLocaleTimeString(t,r)}e.exports=function(){return n}},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),o=n(2),a={break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},s={debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0};function u(e,t){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(e)&&!a[e])return t?"".concat(t,".").concat(e):e;var n=JSON.stringify(e);return t?t+"[".concat(n,"]"):n}function c(e){var t=e.trim().replace(/\W+/g,"_");return a[t]||s[t]||/^\d/.test(t)?"_"+t:t}var l=new RegExp("^"+["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"].join("|^"));function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mf=t,this.lc=null,this.locales={},this.runtime={},this.formatters={}}var t,n;return t=e,(n=[{key:"compile",value:function(e,t,n){var r=this;if("object"!=d(e)){this.lc=t;var i=n[t]||{cardinal:[],ordinal:[]};i.strict=!!this.mf.options.strictNumberSign;var a=Object(o.parse)(e,i).map((function(e){return r.token(e)}));return"function(d) { return ".concat(a.join(" + ")||'""',"; }")}var s={};for(var u in e){var c=n.hasOwnProperty(u)?u:t;s[u]=this.compile(e[u],c,n)}return s}},{key:"cases",value:function(e,t){var n=this,r="select"===e.type||!this.mf.hasCustomPluralFuncs,i=e.cases.map((function(e){var i=e.key,o=e.tokens;"other"===i&&(r=!1);var a=o.map((function(e){return n.token(e,t)}));return u(i)+": "+(a.join(" + ")||'""')}));if(r)throw new Error("No 'other' form found in "+JSON.stringify(e));return"{ ".concat(i.join(", ")," }")}},{key:"token",value:function(e,t){var n,r=this;if("string"==typeof e)return JSON.stringify(e);var i,o,a,s,d=[u(e.arg,"d")];switch(e.type){case"argument":return this.mf.options.biDiSupport?(i=d[0],o=this.lc,a=l.test(o),s=JSON.stringify(a?"‏":"‎"),"".concat(s," + ").concat(i," + ").concat(s)):d[0];case"select":n="select",t&&this.mf.options.strictNumberSign&&(t=null),d.push(this.cases(e,t)),this.runtime.select=!0;break;case"selectordinal":n="plural",d.push(0,c(this.lc),this.cases(e,e),1),this.locales[this.lc]=!0,this.runtime.plural=!0;break;case"plural":n="plural",d.push(e.offset||0,c(this.lc),this.cases(e,e)),this.locales[this.lc]=!0,this.runtime.plural=!0;break;case"function":if(!(e.key in this.mf.fmt)&&e.key in this.mf.constructor.formatters){var f=this.mf.constructor.formatters[e.key];this.mf.fmt[e.key]=f(this.mf)}if(!this.mf.fmt[e.key])throw new Error("Formatting function ".concat(JSON.stringify(e.key)," not found!"));if(d.push(JSON.stringify(this.lc)),e.param){t&&this.mf.options.strictNumberSign&&(t=null);var p=e.param.tokens.map((function(e){return r.token(e,t)}));d.push("("+(p.join(" + ")||'""')+").trim()")}n=u(e.key,"fmt"),this.formatters[e.key]=!0;break;case"octothorpe":if(!t)return'"#"';n="number",d=[u(t.arg,"d"),JSON.stringify(t.arg)],t.offset&&d.push(t.offset),this.runtime.number=!0}if(!n)throw new Error("Parser error for token "+JSON.stringify(e));return"".concat(n,"(").concat(d.join(", "),")")}}])&&f(t.prototype,n),e}(),h=n(3),m=n.n(h),g=n(0),v=n.n(g);function y(e,t,n){var r=function(){return t.apply(this,arguments)};if(r.toString=function(){return t.toString()},n){var i=m.a[e]||{};r.cardinal=i.cardinal,r.ordinal=i.ordinal}else r.cardinal=[],r.ordinal=[];return r}function w(e,t){for(var n=t.pluralKeyChecks,r=String(e);r;r=r.replace(/[-_]?[^-_]*$/,"")){var i=v.a[r];if(i)return y(r,i,n)}throw new Error("Localisation function not found for locale "+JSON.stringify(e))}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.plural=function(e,t,n,r,i){if({}.hasOwnProperty.call(r,e))return r[e];t&&(e-=t);var o=n(e,i);return o in r?r[o]:r.other},this.select=function(e,t){return{}.hasOwnProperty.call(t,e)?t[e]:t.other},this.mf=t,this.setStrictNumber(t.options.strictNumberSign)}var t,n;return t=e,(n=[{key:"setStrictNumber",value:function(t){this.number=t?e.strictNumber:e.defaultNumber}},{key:"toString",value:function(e,t){for(var n={},r=Object.keys(t.locales),i=0;i<r.length;++i){var o=r[i];n[c(o)]=e[o]}for(var a=Object.keys(t.runtime),s=0;s<a.length;++s){var l=a[s];n[l]=this[l]}var d=Object.keys(t.formatters);if(d.length>0){n.fmt={};for(var f=0;f<d.length;++f){var p=d[f];n.fmt[p]=this.mf.fmt[p]}}return function e(t,n){if("object"!=_(t)){var r=t.toString().replace(/^(function )\w*/,"$1"),i=/([ \t]*)\S.*$/.exec(r);return i?r.replace(new RegExp("^"+i[1],"mg"),""):r}var o=[];for(var a in t){var s=e(t[a],n+1);o.push(0===n?"var ".concat(a," = ").concat(s,";\n"):"".concat(u(a),": ").concat(s))}if(0===n)return o.join("");if(0===o.length)return"{}";for(var c=" ";--n;)c+=" ";var l=o.join(",\n").replace(/^/gm,c);return"{\n".concat(l,"\n}")}(n,0)}}])&&b(t.prototype,n),e}();function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}x.defaultNumber=function(e,t,n){if(!n)return e;if(isNaN(e))throw new Error("Can't apply offset:"+n+" to argument `"+t+"` with non-numerical value "+JSON.stringify(e)+".");return e-n},x.strictNumber=function(e,t,n){if(isNaN(e))throw new Error("Argument `"+t+"` has non-numerical value "+JSON.stringify(e)+".");return e-(n||0)},n.d(t,"default",(function(){return I}));var I=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Object.assign({biDiSupport:!1,customFormatters:null,pluralKeyChecks:!0,strictNumberSign:!1},n),this.pluralFuncs={},"string"==typeof t)this.pluralFuncs[t]=w(t,this.options),this.defaultLocale=t;else if(Array.isArray(t))t.forEach((function(e){r.pluralFuncs[e]=w(e,r.options)})),this.defaultLocale=t[0];else{if(t)for(var i=Object.keys(t),o=0;o<i.length;++o){var a=i[o];if("function"!=typeof t[a]){var s="Expected function value for locale "+String(a);throw new Error(s)}this.pluralFuncs[a]=t[a],this.defaultLocale||(this.defaultLocale=a)}this.defaultLocale?this.hasCustomPluralFuncs=!0:(this.defaultLocale=e.defaultLocale,this.hasCustomPluralFuncs=!1)}this.fmt=Object.assign({},this.options.customFormatters),this.runtime=new x(this)}return S(e,null,[{key:"escape",value:function(e,t){var n=t?/[#{}]/g:/[{}]/g;return String(e).replace(n,"'$&'")}}]),S(e,[{key:"addFormatters",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;++n){var r=t[n];this.fmt[r]=e[r]}return this}},{key:"disablePluralKeyChecks",value:function(){for(var e in this.options.pluralKeyChecks=!1,this.pluralFuncs){var t=this.pluralFuncs[e];t&&(t.cardinal=[],t.ordinal=[])}return this}},{key:"setBiDiSupport",value:function(e){return this.options.biDiSupport=!!e||void 0===e,this}},{key:"setStrictNumberSign",value:function(e){return this.options.strictNumberSign=!!e||void 0===e,this.runtime.setStrictNumber(this.options.strictNumberSign),this}},{key:"compile",value:function(e,t){var n={};if(0===Object.keys(this.pluralFuncs).length)if(t){var r=w(t,this.options);if(!r){var i=JSON.stringify(t);throw new Error("Locale ".concat(i," not found!"))}n[t]=r}else t=this.defaultLocale,n=function(e){for(var t=e.pluralKeyChecks,n={},r=Object.keys(v.a),i=0;i<r.length;++i){var o=r[i];n[o]=y(o,v.a[o],t)}return n}(this.options);else if(t){var o=this.pluralFuncs[t];if(!o){var a=JSON.stringify(t),s=JSON.stringify(this.pluralFuncs);throw new Error("Locale ".concat(a," not found in ").concat(s,"!"))}n[t]=o}else t=this.defaultLocale,n=this.pluralFuncs;var l=new p(this),d=l.compile(e,t,n);if("object"!=T(e)){var f=new Function("number, plural, select, fmt",c(t),"return "+d),h=this.runtime;return f(h.number,h.plural,h.select,this.fmt,n[t])}var m=this.runtime.toString(n,l)+"\n",g=function e(t,n){if(n||(n=0),"object"!=T(t))return t;for(var r="",i=0;i<n;++i)r+=" ";var o=[];for(var a in t){var s=e(t[a],n+1);o.push("\n".concat(r," ").concat(u(a),": ").concat(s))}return"{".concat(o.join(","),"\n").concat(r,"}")}(d),_=new Function(m+"return "+g)();if(_.hasOwnProperty("toString"))throw new Error("The top-level message key `toString` is reserved");return _.toString=function(e){return e&&"export default"!==e?e.indexOf(".")>-1?m+e+" = "+g:m+["(function (root, G) {",' if (typeof define === "function" && define.amd) { define(G); }',' else if (typeof exports === "object") { module.exports = G; }'," else { "+u(e,"root")+" = G; }","})(this, "+g+");"].join("\n"):m+"export default "+g},_}}]),e}();I.defaultLocale="en",I.formatters=i.a}]).default},9591:(e,t,n)=>{"use strict";var r={};(0,n(4236).assign)(r,n(4555),n(8843),n(1619)),e.exports=r},4555:(e,t,n)=>{"use strict";var r=n(405),i=n(4236),o=n(9373),a=n(8898),s=n(2292),u=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var l;if(l="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,l)))throw new Error(a[n]);this._dict_set=!0}}function l(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=l,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}},8843:(e,t,n)=>{"use strict";var r=n(7948),i=n(4236),o=n(9373),a=n(1619),s=n(8898),u=n(2292),c=n(2401),l=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,u,c,d,f,p=this.strm,h=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(h),p.next_out=0,p.avail_out=h),(n=r.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===g&&(n=a.Z_OK,g=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(p.output,p.next_out),c=p.next_out-u,d=o.buf2string(p.output,u),p.next_out=c,p.avail_out=h-c,c&&i.arraySet(p.output,p.output,u,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},4236:(e,t)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},9373:(e,t,n)=>{"use strict";var r=n(4236),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(u),a=0,o=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return u(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,o,s=t||e.length,c=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)c[r++]=i;else if((o=a[i])>4)c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n<s;)i=i<<6|63&e[n++],o--;o>1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return u(c,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},6069:e=>{"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},405:(e,t,n)=>{"use strict";var r,i=n(4236),o=n(342),a=n(6069),s=n(2869),u=n(8898),c=-2,l=258,d=262,f=103,p=113,h=666;function m(e,t){return e.msg=u[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function w(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function _(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,f=e.w_mask,p=e.prev,h=e.strstart+l,m=c[o+a-1],g=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===g&&c[n+a-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=l-(h-o),o=h-l,r>a){if(e.match_start=t,a=r,r>=s)break;m=c[o+a-1],g=c[o+a]}}}while((t=p[t&f])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function T(e){var t,n,r,o,u,c,l,f,p,h,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);o+=m}if(0===e.strm.avail_in)break;if(c=e.strm,l=e.window,f=e.strstart+e.lookahead,p=o,h=void 0,(h=c.avail_in)>p&&(h=p),n=0===h?0:(c.avail_in-=h,i.arraySet(l,c.input,c.next_in,h,f),1===c.state.wrap?c.adler=a(c.adler,l,h,f):2===c.state.wrap&&(c.adler=s(c.adler,l,h,f)),c.next_in+=h,c.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+3-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function k(e,t){for(var n,r;;){if(e.lookahead<d){if(T(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=x(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,i;;){if(e.lookahead<d){if(T(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=x(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(w(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&w(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}function I(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),v(this.dyn_ltree),v(this.dyn_dtree),v(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),v(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),v(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):m(e,c)}function C(e){var t,n=E(e);return 0===n&&((t=e.state).window_size=2*t.w_size,v(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function P(e,t,n,r,o,a){if(!e)return c;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,c);8===r&&(r=9);var u=new O;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=n,C(e)}r=[new I(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(T(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,w(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(w(e,!1),e.strm.avail_out),1)})),new I(4,4,8,4,k),new I(4,5,16,8,k),new I(4,6,32,32,k),new I(4,4,16,16,S),new I(8,16,32,32,S),new I(8,16,128,128,S),new I(8,32,128,256,S),new I(32,128,258,1024,S),new I(32,258,258,4096,S)],t.deflateInit=function(e,t){return P(e,t,8,15,8,0)},t.deflateInit2=P,t.deflateReset=C,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var n,i,a,u;if(!e||!e.state||t>5||t<0)return e?m(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===h&&4!==t)return m(e,0===e.avail_out?-5:c);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,_(i,31),_(i,139),_(i,8),i.gzhead?(_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),_(i,255&i.gzhead.time),_(i,i.gzhead.time>>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),_(i,3),i.status=p);else{var d=8+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=p,b(i,d),0!==i.strstart&&(b(i,e.adler>>>16),b(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,_(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,_(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=f)}else i.status=f;if(i.status===f&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(_(i,255&e.adler),_(i,e.adler>>8&255),e.adler=0,i.status=p)):i.status=p),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(n)&&4!==t)return m(e,-5);if(i.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==h){var x=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(T(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=l){if(T(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+l;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=l-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(w(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(w(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(w(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==x&&4!==x||(i.status=h),1===x||3===x)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===x&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&e.adler),_(i,e.adler>>8&255),_(i,e.adler>>16&255),_(i,e.adler>>24&255),_(i,255&e.total_in),_(i,e.total_in>>8&255),_(i,e.total_in>>16&255),_(i,e.total_in>>24&255)):(b(i,e.adler>>>16),b(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?m(e,c):(e.state=null,t===p?m(e,-3):0):c},t.deflateSetDictionary=function(e,t){var n,r,o,s,u,l,d,f,p=t.length;if(!e||!e.state)return c;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),u=e.avail_in,l=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,T(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--o);n.strstart=r,n.lookahead=2,T(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=l,e.input=d,e.avail_in=u,n.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},2401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){var n,r,i,o,a,s,u,c,l,d,f,p,h,m,g,v,y,w,_,b,x,T,k,S,I;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,I=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),w=m[p&v];t:for(;;){if(p>>>=_=w>>>24,h-=_,0==(_=w>>>16&255))I[o++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=m[(65535&w)+(p&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&w,(_&=15)&&(h<_&&(p+=S[r++]<<h,h+=8),b+=p&(1<<_)-1,p>>>=_,h-=_),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),w=g[p&y];n:for(;;){if(p>>>=_=w>>>24,h-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=g[(65535&w)+(p&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&w,h<(_&=15)&&(p+=S[r++]<<h,(h+=8)<_&&(p+=S[r++]<<h,h+=8)),(x+=p&(1<<_)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=_,h-=_,x>(_=o-a)){if((_=x-_)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(T=0,k=f,0===d){if(T+=c-_,_<b){b-=_;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}}else if(d<_){if(T+=c+d-_,(_-=d)<b){b-=_;do{I[o++]=f[T++]}while(--_);if(T=0,d<b){b-=_=d;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}}}else if(T+=d-_,_<b){b-=_;do{I[o++]=f[T++]}while(--_);T=o-x,k=I}for(;b>2;)I[o++]=k[T++],I[o++]=k[T++],I[o++]=k[T++],b-=3;b&&(I[o++]=k[T++],b>1&&(I[o++]=k[T++]))}else{T=o-x;do{I[o++]=I[T++],I[o++]=I[T++],I[o++]=I[T++],b-=3}while(b>2);b&&(I[o++]=I[T++],b>1&&(I[o++]=I[T++]))}break}}break}}while(r<i&&o<s);r-=b=h>>3,p&=(1<<(h-=b<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=h}},7948:(e,t,n)=>{"use strict";var r=n(4236),i=n(6069),o=n(2869),a=n(4264),s=n(9241),u=-2,c=12,l=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):u}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):u}function m(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):u}function g(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):u}var v,y,w=!0;function _(e){if(w){var t;for(v=new r.Buf32(512),y=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),w=!1}e.lencode=v,e.lenbits=9,e.distcode=y,e.distbits=5}function b(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=h,t.inflateReset2=m,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var n,f,p,h,m,g,v,y,w,x,T,k,S,I,O,E,C,P,L,N,R,A,U,M,B=0,D=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(n=e.state).mode===c&&(n.mode=13),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,y=n.hold,w=n.bits,x=g,T=v,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(2&n.wrap&&35615===y){n.check=0,D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0),y=0,w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",n.mode=l;break}if(8!=(15&y)){e.msg="unknown compression method",n.mode=l;break}if(w-=4,R=8+(15&(y>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){e.msg="invalid window size",n.mode=l;break}n.dmax=1<<R,e.adler=n.check=1,n.mode=512&y?10:c,y=0,w=0;break;case 2:for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(n.flags=y,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=l;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=l;break}n.head&&(n.head.text=y>>8&1),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0,n.mode=3;case 3:for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.head&&(n.head.time=y),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,D[2]=y>>>16&255,D[3]=y>>>24&255,n.check=o(n.check,D,4,0)),y=0,w=0,n.mode=4;case 4:for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.head&&(n.head.xflags=255&y,n.head.os=y>>8),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.length=y,n.head&&(n.head.extra_len=y),512&n.flags&&(D[0]=255&y,D[1]=y>>>8&255,n.check=o(n.check,D,2,0)),y=0,w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((k=n.length)>g&&(k=g),k&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,k,R)),512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;k=0;do{R=f[h+k++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R))}while(R&&k<g);if(512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,R)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===g)break e;k=0;do{R=f[h+k++],n.head&&R&&n.length<65536&&(n.head.comment+=String.fromCharCode(R))}while(R&&k<g);if(512&n.flags&&(n.check=o(n.check,f,k,h)),g-=k,h+=k,R)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y!==(65535&n.check)){e.msg="header crc mismatch",n.mode=l;break}y=0,w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=c;break;case 10:for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}e.adler=n.check=d(y),y=0,w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,2;e.adler=n.check=1,n.mode=c;case c:if(5===t||6===t)break e;case 13:if(n.last){y>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}switch(n.last=1&y,w-=1,3&(y>>>=1)){case 0:n.mode=14;break;case 1:if(_(n),n.mode=20,6===t){y>>>=2,w-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=l}y>>>=2,w-=2;break;case 14:for(y>>>=7&w,w-=7&w;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",n.mode=l;break}if(n.length=65535&y,y=0,w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(k>g&&(k=g),k>v&&(k=v),0===k)break e;r.arraySet(p,f,h,k,m),g-=k,h+=k,v-=k,m+=k,n.length-=k;break}n.mode=c;break;case 17:for(;w<14;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(n.nlen=257+(31&y),y>>>=5,w-=5,n.ndist=1+(31&y),y>>>=5,w-=5,n.ncode=4+(15&y),y>>>=4,w-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=l;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.lens[F[n.have++]]=7&y,y>>>=3,w-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},A=s(0,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,A){e.msg="invalid code lengths set",n.mode=l;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(B=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(C<16)y>>>=O,w-=O,n.lens[n.have++]=C;else{if(16===C){for(M=O+2;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y>>>=O,w-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=l;break}R=n.lens[n.have-1],k=3+(3&y),y>>>=2,w-=2}else if(17===C){for(M=O+3;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}w-=O,R=0,k=3+(7&(y>>>=O)),y>>>=3,w-=3}else{for(M=O+7;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}w-=O,R=0,k=11+(127&(y>>>=O)),y>>>=7,w-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=l;break}for(;k--;)n.lens[n.have++]=R}}if(n.mode===l)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=l;break}if(n.lenbits=9,U={bits:n.lenbits},A=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,A){e.msg="invalid literal/lengths set",n.mode=l;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},A=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,A){e.msg="invalid distances set",n.mode=l;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,a(e,T),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,y=n.hold,w=n.bits,n.mode===c&&(n.back=-1);break}for(n.back=0;E=(B=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(E&&0==(240&E)){for(P=O,L=E,N=C;E=(B=n.lencode[N+((y&(1<<P+L)-1)>>P)])>>>16&255,C=65535&B,!(P+(O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}y>>>=P,w-=P,n.back+=P}if(y>>>=O,w-=O,n.back+=O,n.length=C,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=c;break}if(64&E){e.msg="invalid literal/length code",n.mode=l;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(M=n.extra;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.length+=y&(1<<n.extra)-1,y>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(B=n.distcode[y&(1<<n.distbits)-1])>>>16&255,C=65535&B,!((O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(0==(240&E)){for(P=O,L=E,N=C;E=(B=n.distcode[N+((y&(1<<P+L)-1)>>P)])>>>16&255,C=65535&B,!(P+(O=B>>>24)<=w);){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}y>>>=P,w-=P,n.back+=P}if(y>>>=O,w-=O,n.back+=O,64&E){e.msg="invalid distance code",n.mode=l;break}n.offset=C,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(M=n.extra;w<M;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}n.offset+=y&(1<<n.extra)-1,y>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=l;break}n.mode=25;case 25:if(0===v)break e;if(k=T-v,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=l;break}k>n.wnext?(k-=n.wnext,S=n.wsize-k):S=n.wnext-k,k>n.length&&(k=n.length),I=n.window}else I=p,S=m-n.offset,k=n.length;k>v&&(k=v),v-=k,n.length-=k;do{p[m++]=I[S++]}while(--k);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;p[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===g)break e;g--,y|=f[h++]<<w,w+=8}if(T-=v,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?o(n.check,p,T,m-T):i(n.check,p,T,m-T)),T=v,(n.flags?y:d(y))!==n.check){e.msg="incorrect data check",n.mode=l;break}y=0,w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===g)break e;g--,y+=f[h++]<<w,w+=8}if(y!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=l;break}y=0,w=0}n.mode=29;case 29:A=1;break e;case l:A=-3;break e;case 31:return-4;case 32:default:return u}return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=w,(n.wsize||T!==e.avail_out&&n.mode<l&&(n.mode<27||4!==t))&&b(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(x-=e.avail_in,T-=e.avail_out,e.total_in+=x,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?o(n.check,p,T,e.next_out-T):i(n.check,p,T,e.next_out-T)),e.data_type=n.bits+(n.last?64:0)+(n.mode===c?128:0)+(20===n.mode||15===n.mode?256:0),(0===x&&0===T||4===t)&&0===A&&(A=-5),A)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,0):u},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&i(1,t,r,0)!==n.check?-3:b(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):u},t.inflateInfo="pako inflate (from Nodeca project)"},9241:(e,t,n)=>{"use strict";var r=n(4236),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,u,c,l,d,f){var p,h,m,g,v,y,w,_,b,x=f.bits,T=0,k=0,S=0,I=0,O=0,E=0,C=0,P=0,L=0,N=0,R=null,A=0,U=new r.Buf16(16),M=new r.Buf16(16),B=null,D=0;for(T=0;T<=15;T++)U[T]=0;for(k=0;k<u;k++)U[t[n+k]]++;for(O=x,I=15;I>=1&&0===U[I];I--);if(O>I&&(O=I),0===I)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(S=1;S<I&&0===U[S];S++);for(O<S&&(O=S),P=1,T=1;T<=15;T++)if(P<<=1,(P-=U[T])<0)return-1;if(P>0&&(0===e||1!==I))return-1;for(M[1]=0,T=1;T<15;T++)M[T+1]=M[T]+U[T];for(k=0;k<u;k++)0!==t[n+k]&&(d[M[t[n+k]]++]=k);if(0===e?(R=B=d,y=19):1===e?(R=i,A-=257,B=o,D-=257,y=256):(R=a,B=s,y=-1),N=0,k=0,T=S,v=l,E=O,C=0,m=-1,g=(L=1<<O)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){w=T-C,d[k]<y?(_=0,b=d[k]):d[k]>y?(_=B[D+d[k]],b=R[A+d[k]]):(_=96,b=0),p=1<<T-C,S=h=1<<E;do{c[v+(N>>C)+(h-=p)]=w<<24|_<<16|b|0}while(0!==h);for(p=1<<T-1;N&p;)p>>=1;if(0!==p?(N&=p-1,N+=p):N=0,k++,0==--U[T]){if(T===I)break;T=t[n+d[k]]}if(T>O&&(N&g)!==m){for(0===C&&(C=O),v+=S,P=1<<(E=T-C);E+C<I&&!((P-=U[E+C])<=0);)E++,P<<=1;if(L+=1<<E,1===e&&L>852||2===e&&L>592)return 1;c[m=N&g]=O<<24|E<<16|v-l|0}}return 0!==N&&(c[v+N]=T-C<<24|64<<16|0),f.bits=O,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(e,t,n)=>{"use strict";var r=n(4236);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var d=new Array(512);i(d);var f=new Array(256);i(f);var p=new Array(29);i(p);var h,m,g,v=new Array(30);function y(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?d[e]:d[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,b(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function T(e,t,n){x(e,n[2*t],n[2*t+1])}function k(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function S(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=k(o[s]++,s))}}function I(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function C(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&E(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!E(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function P(e,t,n){var r,i,s,u,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===r?T(e,i,t):(T(e,(s=f[i])+256+1,t),0!==(u=o[s])&&x(e,i-=p[s],u),T(e,s=_(--r),n),0!==(u=a[s])&&x(e,r-=v[s],u))}while(c<e.last_lit);T(e,256,t)}function L(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)C(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],C(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,C(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>h&&(o=h,m++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=p&&(a=f[r-p]),s=u[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==m){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(o=h;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),S(o,c,e.bl_count)}function N(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function R(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{T(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(T(e,i,e.bl_tree),s--),T(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(T(e,17,e.bl_tree),x(e,s-3,3)):(T(e,18,e.bl_tree),x(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}i(v);var A=!1;function U(e,t,n,i){x(e,0+(i?1:0),3),function(e,t,n,i){O(e),b(e,n),b(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){A||(function(){var e,t,n,r,i,u=new Array(16);for(n=0,r=0;r<28;r++)for(p[r]=n,e=0;e<1<<o[r];e++)f[n++]=r;for(f[n-1]=r,i=0,r=0;r<16;r++)for(v[r]=i,e=0;e<1<<a[r];e++)d[i++]=r;for(i>>=7;r<30;r++)for(v[r]=i<<7,e=0;e<1<<a[r]-7;e++)d[256+i++]=r;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,u[8]++;for(;e<=255;)c[2*e+1]=9,e++,u[9]++;for(;e<=279;)c[2*e+1]=7,e++,u[7]++;for(;e<=287;)c[2*e+1]=8,e++,u[8]++;for(S(c,287,u),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=k(e,5);h=new y(c,o,257,286,15),m=new y(l,a,0,30,15),g=new y(new Array(0),s,0,19,7)}(),A=!0),e.l_desc=new w(e.dyn_ltree,h),e.d_desc=new w(e.dyn_dtree,m),e.bl_desc=new w(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,I(e)},t._tr_stored_block=U,t._tr_flush_block=function(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),a=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?U(e,t,n,r):4===e.strategy||o===i?(x(e,2+(r?1:0),3),P(e,c,l)):(x(e,4+(r?1:0),3),function(e,t,n,r){var i;for(x(e,t-257,5),x(e,n-1,5),x(e,r-4,4),i=0;i<r;i++)x(e,e.bl_tree[2*u[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),P(e,e.dyn_ltree,e.dyn_dtree)),I(e),r&&O(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),T(e,256,c),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},2238:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="object",u="model",c="name",l="type",d="vendor",f="version",p="architecture",h="console",m="mobile",g="tablet",v="smarttv",y="wearable",w={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},_={rgx:function(e,t){for(var n,r,i,u,c,l,d=0;d<t.length&&!c;){var f=t[d],p=t[d+1];for(n=r=0;n<f.length&&!c;)if(c=f[n++].exec(e))for(i=0;i<p.length;i++)l=c[++r],typeof(u=p[i])===s&&u.length>0?2==u.length?typeof u[1]==a?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3==u.length?typeof u[1]!==a||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):o:this[u[0]]=l?u[1].call(this,l,u[2]):o:4==u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):o):this[u]=l||o;d+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===s&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(w.has(t[n][r],e))return"?"===n?o:n}else if(w.has(t[n],e))return"?"===n?o:n;return e}},b={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},x={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[c,f],[/(opios)[\/\s]+([\w\.]+)/i],[[c,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[c,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[c,f],[/(konqueror)\/([\w\.]+)/i],[[c,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[c,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[c,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[c,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[c,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[c,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[c,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[c,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[c,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[c,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[c,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[c,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[c,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[c,f],[/(QQ)\/([\d\.]+)/i],[c,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[c,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[c,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[c,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[c],[/(LBBROWSER)/i],[c],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[c,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[c,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[c,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[c,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[c,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[c,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[c,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[c,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[c,f],[/(dolfin)\/([\w\.]+)/i],[[c,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[c,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[c,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[c,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[c,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,c],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[c,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[c,[f,_.str,b.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[c,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[c,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,w.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",w.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,w.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[u,d,[l,g]],[/applecoremedia\/[\w\.]+ \((ipad)/],[u,[d,"Apple"],[l,g]],[/(apple\s{0,1}tv)/i],[[u,"Apple TV"],[d,"Apple"],[l,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[d,u,[l,g]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[u,[d,"Amazon"],[l,g]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[u,_.str,b.device.amazon.model],[d,"Amazon"],[l,m]],[/android.+aft([bms])\sbuild/i],[u,[d,"Amazon"],[l,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[u,d,[l,m]],[/\((ip[honed|\s\w*]+);/i],[u,[d,"Apple"],[l,m]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[d,u,[l,m]],[/\(bb10;\s(\w+)/i],[u,[d,"BlackBerry"],[l,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[u,[d,"Asus"],[l,g]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[u,"Xperia Tablet"],[l,g]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,"Sony"],[l,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,u,[l,h]],[/android.+;\s(shield)\sbuild/i],[u,[d,"Nvidia"],[l,h]],[/(playstation\s[34portablevi]+)/i],[u,[d,"Sony"],[l,h]],[/(sprint\s(\w+))/i],[[d,_.str,b.device.sprint.vendor],[u,_.str,b.device.sprint.model],[l,m]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[u,/_/g," "],[l,m]],[/(nexus\s9)/i],[u,[d,"HTC"],[l,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[u,[d,"Huawei"],[l,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[u,[d,"Huawei"],[l,g]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,u,[l,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[u,[d,"Microsoft"],[l,h]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,"Microsoft"],[l,m]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[u,[d,"Motorola"],[l,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[u,[d,"Motorola"],[l,g]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,w.trim],[u,w.trim],[l,v]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,"Samsung"],[l,v]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[l,v]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[d,"Samsung"],u,[l,g]],[/smart-tv.+(samsung)/i],[d,[l,v],u],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],u,[l,m]],[/sie-(\w*)/i],[u,[d,"Siemens"],[l,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],u,[l,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[u,[d,"Acer"],[l,g]],[/android.+([vl]k\-?\d{3})\s+build/i],[u,[d,"LG"],[l,g]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],u,[l,g]],[/(lg) netcast\.tv/i],[d,u,[l,v]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[u,[d,"LG"],[l,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,u,[l,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[u,[d,"Lenovo"],[l,g]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,u,[l,m]],[/linux;.+((jolla));/i],[d,u,[l,m]],[/((pebble))app\/[\d\.]+\s/i],[d,u,[l,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,u,[l,m]],[/crkey/i],[[u,"Chromecast"],[d,"Google"],[l,v]],[/android.+;\s(glass)\s\d/i],[u,[d,"Google"],[l,y]],[/android.+;\s(pixel c)[\s)]/i],[u,[d,"Google"],[l,g]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[u,[d,"Google"],[l,m]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]?[\w\s]+))\s+build/i],[[u,/_/g," "],[d,"Xiaomi"],[l,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[u,/_/g," "],[d,"Xiaomi"],[l,g]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[u,[d,"Meizu"],[l,m]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],u,[l,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[u,[d,"OnePlus"],[l,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[u,[d,"RCA"],[l,g]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[u,[d,"Dell"],[l,g]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[u,[d,"Verizon"],[l,g]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],u,[l,g]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[u,[d,"NuVision"],[l,g]],[/android.+;\s(k88)\sbuild/i],[u,[d,"ZTE"],[l,g]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[u,[d,"Swiss"],[l,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[u,[d,"Swiss"],[l,g]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[u,[d,"Zeki"],[l,g]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],u,[l,g]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[u,[d,"Insignia"],[l,g]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[u,[d,"NextBook"],[l,g]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],u,[l,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],u,[l,m]],[/android.+;\s(PH-1)\s/i],[u,[d,"Essential"],[l,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[u,[d,"Envizen"],[l,g]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,u,[l,g]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[u,[d,"MachSpeed"],[l,g]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,u,[l,g]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[u,[d,"Rotor"],[l,g]],[/android.+(KS(.+))\s+build/i],[u,[d,"Amazon"],[l,g]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,u,[l,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,w.lowerize],d,u],[/[\s\/\(](smart-?tv)[;\)]/i],[[l,v]],[/(android[\w\.\s\-]{0,9});.+build/i],[u,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[c,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,c]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[c,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[c,[f,_.str,b.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[c,"Windows"],[f,_.str,b.os.windows.version]],[/\((bb)(10);/i],[[c,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[c,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[c,"Symbian"],f],[/\((series40);/i],[c],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[c,"Firefox OS"],f],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[c,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[c,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[c,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[c,f],[/(haiku)\s(\w+)/i],[c,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[c,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[c,f]]},T=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof T))return new T(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?w.extend(x,t):x;return this.getBrowser=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.browser),e.major=w.major(e.version),e},this.getCPU=function(){var e={architecture:o};return _.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return _.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:o,version:o};return _.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};T.VERSION="0.7.22",T.BROWSER={NAME:c,MAJOR:"major",VERSION:f},T.CPU={ARCHITECTURE:p},T.DEVICE={MODEL:u,VENDOR:d,TYPE:l,CONSOLE:h,MOBILE:m,SMARTTV:v,TABLET:g,WEARABLE:y,EMBEDDED:"embedded"},T.ENGINE={NAME:c,VERSION:f},T.OS={NAME:c,VERSION:f},void 0!==t?(e.exports&&(t=e.exports=T),t.UAParser=T):(r=function(){return T}.call(t,n,t,e))===o||(e.exports=r);var k=i&&(i.jQuery||i.Zepto);if(k&&!k.ua){var S=new T;k.ua=S.getResult(),k.ua.get=function(){return S.getUA()},k.ua.set=function(e){S.setUA(e);var t=S.getResult();for(var n in t)k.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Core:()=>i.Core,EventHub:()=>i.EventHub,I18n:()=>i.I18n});var e=n(6063),t=n.n(e),i=n(3389);function o(){return window.navigator.userAgent.toLowerCase().match(/micromessenger/i)?"wechat":"web"}var a=n(3251),s=n(4248),u=n(698);function c(e){window.parent!==window&&window.parent.postMessage(e,"*")}var l=n(7550),d=n(5159),f=n(3656);function p(e){let t=0;const n=e.step||10,r=e.timeBetweenStep||200,i=window.setInterval((()=>{t+=n,e.onprogress(t),t>=90&&window.clearInterval(i)}),r);return()=>{clearInterval(i)}}async function h(e,t=50){return e.startsWith("data:image/")?new Promise((n=>{const r=document.createElement("img"),i=document.createElement("canvas");r.onload=()=>{const o=r.naturalHeight,a=r.naturalWidth;o<=t&&a<=t&&n(e);const s=o/a;let u=0,c=0;o>a?(u=t,c=t/s):(c=t,u=t*s),i.width=c,i.height=u,i.getContext("2d").drawImage(r,0,0,c,u),n(i.toDataURL())},r.src=e})):e}function m(e){const t=document.createElement("canvas");t.setAttribute("width","64"),t.setAttribute("height","64");const n=t.getContext("2d");n.fillStyle="white",n.fillRect(0,0,64,64),n.fillStyle="black",n.strokeStyle="black",n.font="bold 12px '字体','字体','微软雅黑','宋体'";let r=0,i=0,o=10;for(let t=0;t<e.length;t++)r+=n.measureText(e[t]).width,r>50&&(n.fillText(e.substring(i,t),5,o),o+=12,r=0,i=t),t===e.length-1&&n.fillText(e.substring(i,t+1),5,o);return t.toDataURL()}function g(e){return new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))}const v="native_app_message";function y(e){return new Promise(((t,n)=>{const r=()=>{window.removeEventListener(v,o),n(new Error("offline request timeout: ".concat(e.messageName)))};let i=setTimeout(r,15e3);const o=n=>{const{messageName:a,data:s}=n.detail;a===e.messageName?(clearTimeout(i),window.removeEventListener(v,o),t(s)):"delay"===a&&s.delayTask===e.messageName&&(clearTimeout(i),i=setTimeout(r,15e3))};window.addEventListener(v,o),window.ReactNativeWebView.postMessage(JSON.stringify(e))}))}const w={};var _=n(7428);n(3948),n(285);const b=20971520,x={resolve:()=>{},onprogress:()=>{},result:void 0},T={filePath:"",value:"",miniValue:"",isImage:!1,fileName:"",fileType:""};let k,S,I=x;async function O(e,t){const n=await async function(e){const t={fileName:e.name,fileType:e.type};return 0===e.type.indexOf("image/")?(t.isImage=!0,t.value=await g(e)):(t.isImage=!1,t.value=m(e.name)),t.miniValue=await h(t.value),t}(t);I.result={...I.result||T,...n,filePath:e},S(),I.resolve(I.result),I=x,k.value="",document.body.style.pointerEvents="all"}function E(){k||(k=document.createElement("input"),k.setAttribute("type","file"),k.style.display="none",k.addEventListener("change",(async function(){var e;const t=null===(e=this.files)||void 0===e?void 0:e[0];if(t)if(!t.type.startsWith("image/")||await async function(e){const t=await g(e);return new Promise((e=>{const n=document.createElement("img");n.onload=()=>{e(!0)},n.onerror=()=>{e(!1)},n.src=t}))}(t))if(document.body.style.pointerEvents="none",S=p({onprogress:I.onprogress}),(0,s.vW)().preview)await(0,f._v)(1e3),await O(t.name,t);else try{await async function({file:e,maxFileSize:t,keyPrefix:n,onProgress:r,onUploaded:i}){var o;if(t&&e.size>t)throw"file-size-error";const a=await fetch((null===(o=(0,s.vW)().hostConfig)||void 0===o?void 0:o.qApiHost)+"/media/uptoken?"+new URLSearchParams({key_prefix:n,mime_type:e.type}),{method:"get"});let u;if(!a.ok||200!==a.status){if(a.ok&&204===a.status)throw await a.text();throw await a.json()}u=await a.json();const c=new XMLHttpRequest;if(c.upload.onprogress=e=>{null==r||r(e.loaded/e.total*100)},c.onload=()=>{if(200!==c.status)throw"upload-error";null==i||i({file:e,res_key:u.res_key})},u.upload_host.includes("qiniup.com")){c.open("POST",u.upload_host);const t=new FormData;t.append("name",e.name),t.append("token",u.uptoken),t.append("file",e),c.send(t)}else c.open("PUT","".concat(u.upload_host,"/").concat(u.res_key)),c.setRequestHeader("Authorization",u.uptoken),c.setRequestHeader("Content-Type",e.type),c.send(e)}({file:t,keyPrefix:"os/client",maxFileSize:b,onProgress:I.onprogress,onUploaded:async({res_key:e})=>{await O(e,t)}})}catch(e){switch(S(),document.body.style.pointerEvents="all",e){case"file-size-error":(0,s.vW)().notify((0,l.Iu)(d.bn.upload.fileSizeLimit,{size:(b,20..toFixed(1)+"MB")}))}}else(0,s.vW)().notify(d.bn.upload.invalidImage)})),document.body.appendChild(k))}n(1817);var C=n(6970),P=n(9271),L=n(6935),N=n(3087),R=n(3756),A=n(4725),U=n(68),M=n(6207),B=n(7433),D=n(4588),F=n(9564),j=n(8351);var W=n(5810),q=n(4625),z=n(3151),V=n(5521),G=n(5753),H=n(5589),X=n(152),K=n(8231),$=n(4125),Z=n(5286),J=n(6213),Y=n(2812),Q=n(248),ee=n(3608),te=n(6492);const ne={};async function re(e,t){const n=(r=e,JSON.stringify({...r,x:void 0,y:void 0}));var r;const i=ne[e.nodeUuid];if(i&&i.raw===n)return i.value;{await(0,f._v)();const r={target:e},i=(0,j.qG)(r,t),o=await(0,j.D1)(i,t.current);return ne[e.nodeUuid]={value:o,raw:n},o}}let ie,oe=!1,ae=!1,se="",ue="zh_cn",ce=null;function le(e){const{globalSetting:t,content:n}=ce,{nodeList:r,variables:i,fullLangStore:o,autoCpltGroups:a}=t;let s=[...r];n.groupNodes?s=[...s,...n.groupNodes]:s.unshift(n);const u=n.group?[n.group]:[],c=o[e];(0,Q.pe)({nodes:s,groups:u,variables:i},c),(0,Q.iZ)(a,e)}const de={...W.k,async handleNextClick(){},async handlePrevClick(){},handleCascadeInput(e,t,n,r){const i=(0,z.OJ)(e,t,n,r);return this.handleOptionInput(e,i,r)},async handleCascadeClick(e,t,n){await(0,z.Xl)(e,t,n)},handleMenuClick:async(e,t)=>(await de.handleOptionClick(t.options[e],t),t.options.filter((e=>e.selected)).map((e=>e.text))),async handleOptionClick(e,t){const n=await(0,V.W)(e,t);return await(0,Z.y)(t),(0,a.yp)(t),n.result},async handleOptionAssistInput(e,t,n){(0,s.Pg)(n.assistValue,{[t]:e})},async handleAutoCpltInput(e,t,n){(0,G.LM)(e,t,n)},async handleOptionInput(e,t,n){const r=await(0,G.wS)(e,t,n);return await(0,Z.y)(n),(0,a.yp)(n),r.result},async handleQuestionInput(e,t){const n=await(0,H.U)(e,t);return await(0,Z.y)(t),(0,a.yp)(t),n.result},async handleSequenceInput(e,t,n){const r=await(0,K.O)(e,t,n);return await(0,Z.y)(n),(0,a.yp)(n),r.result},handleLangChange:async e=>e.locale===ue?void 0:(ue=e.locale,ae=!0,ce.globalSetting.language=e.locale,ie(ce)),async handleMaxDiffInput(e,t,n,r){const i=(0,X.o)(e,t,n);return await(0,Z.y)(r),(0,a.yp)(r),i.result},handleQuickAnswer:e=>(0,q.M)(e)};const fe={data:{theme:null,eventHub:a.s$}},pe={};let he=null;async function me(e){try{await async function(e){const t=Date.now(),{content:n}=e;let r=await async function(e,t){ce=e,ie=t;const{content:n,globalSetting:r,regionList:i}=e;r.language=ue,await async function(e){if(oe)return(0,l.u4)(e),void le(e);await(0,f._v)(50),(0,l.u4)(e),le(e),oe=!0}(r.language);const o={variables:(0,M.Fy)(r.variables),imageList:r.imageList,varStyles:r.varStyles};ae||((0,M.LK)(n),i&&await(0,Y.Hd)(i),(0,J.W)(r.presetRichStyles),(0,ee.B3)(o)),se!==n.nodeUuid&&(window.scrollTo(0,0),se=n.nodeUuid);const u={...o,core:(0,s.vW)(),embedApis:r.embedApis,nodeGroups:r.nodeGroups||[],eventHub:a.s$,context:{},loopStack:[],randomList:[],preview:!0,themeMode:!0,...r,langTable:r.langTable.filter((e=>!e.disabled)),nodeList:r.nodeList.map((e=>((0,M.pZ)(e),e))),handleEvents:de,nodes:[],theme:fe.data.theme,...(0,$.s)(r)};return await async function(e){let t;e.renderList=[];for(const n of e.nodeList){if("start"===n.type||te.kJ.includes(n.type))continue;const r=await re(n,e);r.prev=t,t=r,e.renderList.push(r)}}(u),u}(e,me);r=n.noView?function(e,t){const n={...e};return t.nodes=[n],t}(n,r):"start"===n.type?await async function(e,t){const n=[];e.image&&n.push((0,P.q)(e.image));const{imgScale:r,imgTransType:i,imgTransTime:o,imgPosition:a,welcomeUrl:s,startName:u,qsnrName:c,startBtnText:f,layout:p,type:h,nodeName:m}=e;return(t={type:h,nodeName:m,...t,imgScale:r,imgTransTime:o,imgTransType:i,imgPosition:a,layout:p,isStart:!0,title:u||c,welcomeUrl:s,images:n,nextButton:f||(0,l.Iu)(d.bn.global.start)}).template=await(0,C.b)(e.template,t),t.summary=await(0,L.Ur)(e.questionText,{state:t}),t.description=await(0,L.Ur)(e.describe,{state:t}),t}(n,r):"gift"===n.type?await async function(e,t){const n=(0,R.W)();(t={...t,type:e.type,nodeName:e.nodeName,isGift:!0,rewardName:e.activityName,title:e.blessings,wechatImage:n.headimgurl,wechatID:n.nickname,description:e.describe,rewardTime:(0,N.GN)(),images:e.image?[(0,P.q)(e.image)]:[],nextButton:e.linkUrl&&(e.endBtnText||(0,l.Iu)(d.bn.global.go))}).template=await(0,C.b)(e.template,t);const r=e;return t.rewardType=r.giftType,"red_envelope"===t.rewardType?t.rewardValue=r.giftCount+" "+(0,l.Iu)(d.bn.reward.yuan):(t.rewardToMessage=!0===r.needSendNote,t.qrCode=!0===r.needVerification?"123456789":""),t}(n,r):await async function(e,t){const{content:n,globalSetting:r}=e;return t={...t,progress:50,needProgressBar:r.progressBarRequired,inSingleGroup:null,nextBtnText:r.nextBtnText||(0,l.Iu)(d.bn.global.next),prevBtnText:r.prevBtnText||(0,l.Iu)(d.bn.global.previous)},(t=n.groupNodes?await async function(e,t){if(t.inSingleGroup=e.group,t.inSingleGroup&&t.inSingleGroup.renderAsTable){const n=[],r=e.groupNodes.find((e=>"loop"===e.type)),i=e.groupNodes.filter((e=>"loop"!==e.type)),o={target:r},a=(0,j.qG)(o,t),s=await(0,j.D1)(a,t.current);if(t.renderList.push(s),0===s.varList.length)if(s.options.length>0){const e=(0,f.DQ)(s.options,3);s.varList=e}else s.varList=[{number:1,text:"FAKE",uuid:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}];for(const[e,o]of s.varList.entries())for(const a of i){const i={target:a},u=(0,j.qG)(i,t),c=await(0,j.D1)(u,t.current),l=await(0,A.dK)(t,c,s.nodeUuid,e,o,null),d={destInputId:"",node:r,varList:s.varList,replacements:[l],currentIndex:e},p=[d];c.renderId=(0,f.am)(c.nodeUuid,p),c.loop=d,c.loopStack=p,n.push(c)}t.renderList=[...t.renderList,...n],t.nodes=n,t.groupTable=(0,U.g)(n,t.inSingleGroup)}else{const n=[];for(const r of e.groupNodes){(0,M.pZ)(r);const e={target:r},i=(0,j.qG)(e,t);n.push(await(0,j.D1)(i,t.current))}t.renderList=[...t.renderList,...n],t.nodes=n.filter((e=>-1===D.le.indexOf(e.type)&&!(0,F.$X)(e)))}return t.nodes[0].pageStart=!0,t.nodes[t.nodes.length-1].pageEnd=!0,t.current=t.nodes[0],t}(n,t):await async function(e,t){let n;if((0,M.pZ)(e),(0,f.is)(e,"lottery"===e.type)){t.formalResult={reward:{},gift:{}};const r=(0,f.DQ)(e.options,1)[0],i={id:-1,lottery_id:e.nodeUuid,lottery_option_id:r&&r.uuid};n=await(0,j.MJ)(e,i,t)}else{const r={target:e},i=(0,j.qG)(r,t);n=await(0,j.D1)(i,t.current)}return t.renderList.push(n),t.nodes=[n],t.current=n,t}(n,t)).limitTime&&(t.restTime=(0,N.IA)(t.limitTime)),t.prevButton=(0,B.ve)(t),t.nextButton=await(0,B.FK)(t),t}(e,r),window.cfState=r,(0,s.Pg)(fe,{data:r}),console.info("client full time:",Date.now()-t,"node count:",r.nodeList.length),c({name:"done_preview_realtime"}),a.s$.trigger("REALTIME_CHANGE")}(e)}catch(e){c({name:"error_realtime_preview",error:e.stack||e.message}),console.error(e)}}function ge(e){if(!e.data)return;const{name:t}=e.data;if(!t||0!==t.indexOf("preview"))return;const n=pe[t];n&&n(e.data)}function ve(){c({name:"mousedown_preview"})}function ye(){c({name:"mouseup_preview"})}pe.preview_theme=e=>{(0,u.z)(e.theme),(0,s.Pg)(fe.data,{theme:e.theme}),he&&a.s$.trigger("UPDATE_THEME",e.theme),he=e.theme},pe.preview_content=e=>me(e);var we=n(6539),_e=(n(2707),n(1128)),be=n(6064),xe=n(5838);const Te=[],ke={cached:!1,value:null};let Se,Ie;function Oe(){return!Se||0===Se.length}async function Ee(e,t){const{markId:n}=e;if(13===n||16===n)return{type:"input",candidates:"",active:!0};if(14===n||15===n)return null;if(-1===n||-2===n)return{active:!0,type:"select",weight:-1===n?1:-1};{const r={type:"input",active:!0},{start:i}=await(0,xe.L2)(e,t);return 6===n||8===n||12===n||2===n?r.candidates="number"==typeof i?(0,be.KF)(i-1):i.substring(0,i.length-1):1===n||5===n||11===n||4===n||7===n?r.candidates=(0,be.KF)(i+1):3!==n&&9!==n||(r.candidates=(0,be.KF)(i)),r}}function Ce(e){return"testcase"===e}n(5306);const Pe="failed to load:",Le=[];function Ne(e){let t=0;return new Promise(((n,r)=>{const i=async o=>{try{const t=await e();o&&(0,s.vW)().markLoadRetry({status:""}),n(t)}catch(e){!function(e){return e&&e.message&&e.message.startsWith(Pe)}(e)?r(e):t<3?setTimeout((()=>{t+=1,i(o)}),1e3):(t=0,Le.push(i),(0,s.vW)().markLoadRetry({status:"wait-retry",onRetry(){for((0,s.vW)().markLoadRetry({status:"retrying"});Le.length>0;)Le.pop()(!0)}}))}};i(!1)}))}function Re(e,t){return document.querySelector('script[src="'.concat(e,'"]'))?Promise.resolve():new Promise(((n,r)=>{const i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",e),t&&Object.keys(t).forEach((e=>{i.setAttribute(e,t[e])})),i.onload=()=>{n()},i.onerror=t=>{document.head.removeChild(i),r(new Error(Pe+e))},document.head.appendChild(i)}))}function Ae(e,t,n){return n?Ne((()=>Re(e,t))):Re(e,t)}function Ue(e,t){let n=!0;return"GET"===t.type?(t.data&&(e=(0,we.Mw)(e,t.data)),n=!1):(t.contentType="application/json","object"==typeof t.data&&(t.data=JSON.stringify(t.data))),t.type=t.type||"GET",new Promise(((r,i)=>{const o=new XMLHttpRequest;return o.onerror=()=>{i(new Error(Pe+e))},o.onload=()=>{r({status:o.status,response:o.response})},o.open(t.type,e),t.contentType&&o.setRequestHeader("content-type",t.contentType),t.jwt&&o.setRequestHeader("Authorization","Bearer "+t.jwt),o.send(n?t.data:void 0),o}))}function Me(e,t,n){return n?Ne((()=>Ue(e,t))):Ue(e,t)}window.CFPlugin=window.CFPlugin||{},window.CFPlugin.fakedServers={};const Be=(0,we.Y8)(location.search),De={local:!!location.origin.match(/:\d+$/),realtime:location.pathname.includes("/themes"),debug:!!Be.dev,autoRun:!!Be.auto_path,infer:!!Be.infer_id,parseRealUrl:function(e){const t=location.href.match(/real_port=(\d+)/);if(t){const n=e.substring(8).match(/\//);if(n){const r=e.substring(8+n.index+1);return"http://localhost:".concat(t[1],"/").concat(r)}}return e},getCustomSurveyMeta:async()=>Ce(Be.infer_id)?{langs:[]}:null,getCustomSurveyPayload:async()=>Ce(Be.infer_id)?new Promise((e=>{const t=n=>{const r=n.data;"testcase"===(r&&r.name||"")&&"payload"===r.type&&(window.removeEventListener("message",t),e(r.payload))};window.addEventListener("message",t),c({type:"initialize",name:"testcase"})})):null},Fe={start:"",survey:"/survey",reward:"/reward"};function je(e,t){const n=Fe[e],r=We(e,t),i=(0,s.vW)().switchRoute;if(i){let e=r.replace(location.origin,"");e.startsWith("/")||(e="/"+e),i({url:r,route:n,tail:e,params:t})}else location.replace(r)}function We(e,t){return(0,s.vW)().appRoot+(0,we.Mw)(Fe[e],t)}function qe(e){const t=(0,s.vW)().appRoot+Fe.start+"?".concat(e.sid),n={};return Object.keys(e).forEach((t=>{t.startsWith("share_preserved_")&&(n[t]=e[t])})),(0,we.Mw)(t,n)}const ze={canHandleReward:()=>"wechat"===o(),getParams:()=>function(e){if(!e.sid){const t=Object.keys(e).find((t=>!e[t]));e.sid=t,delete e[t]}return e}((0,we.Y8)(location.search)),gotoStartPage(e){je("start",e)},gotoSurveyPage(e){je("survey",e)},getRewardUrl:e=>We("reward",(0,we.FC)(e)),openWebLink(e){location.replace(e)},reload(){location.href=We("start",(0,we.ZI)())}};var Ve=n(2238),Ge=n.n(Ve);Ge()();const He=new(t()),Xe={device:Ge()(),newDiv:()=>document.createElement("div"),newSpan:()=>document.createElement("span"),newTextNode:e=>document.createTextNode(e),getReferer:()=>document.referrer,translate:(e,t)=>t?He.compile(e)(t):e,getLang:()=>(navigator.languages&&navigator.languages[0]||navigator.language).replace(/-/g,"_").toLowerCase()};var Ke=n(2183);function $e(e){return e.returnValue="1","1"}function Ze(){window.removeEventListener("beforeunload",$e)}var Je=n(5142);let Ye,Qe;function et(){Ye&&(Ye.disconnect(),Ze(),Ye=null,Qe=null)}const tt={removeUpload:async function(e){if((0,_.s)())return async function(e){const{nodeId:t,optionId:n}=e,r=w[t+n];if(!r)return;const i={messageName:"remove_upload",data:{...e,url:r}};await y(i),delete w[t+n]}(e)},closeSocket:et,pushSocket:function(e,t){Qe&&Qe.push(e,t)},connectSocket:function(e,t){if(!(0,_.s)())try{Ye=new Ke.Socket("".concat((0,s.vW)().hostConfig.wsHost,"/q/socket"),{params:{response_id:e}}),Ye.connect(),location.href.match(/:\d+\//)||window.addEventListener("beforeunload",$e),Qe=Ye.channel("client:".concat(t),{}),Qe.on("collector_full",(()=>{(0,s.vW)().error((0,Je.W1)("collector_full")),et()})),Qe.join().receive("error",(e=>{throw new Error("socket join failed: "+JSON.stringify(e))})).receive("timeout",(()=>{throw new Error("socket join timeout")}))}catch(e){(0,s.vW)().uploadLog("加入socket失败")}},loadFakeFile:function(e,t,n){return Ae((0,_.f)(function(e){const t=location.href.match(/fake_port=(\d+)/);if(t){let n=e;return["https://public.choiceform.com/fake-request-exploits/dist"].forEach((e=>{n=n.replace(e,"http://localhost:".concat(t[1]))})),n}return e}(e)),t,n)},getFakeHost:function(){return window.CFPlugin},upload:function(e){return(0,_.s)()?async function(e){const{accept:t,nodeId:n,optionId:r}=e,i={messageName:"request_upload",data:{accept:t,optionId:r,nodeId:n}},o=p({onprogress:e.onprogress}),{url:a,mineType:s}=await y(i);if(!a)return o(),null;w[n+r]=a;const u=a.substring(a.lastIndexOf("/")+1),c={filePath:a,fileName:u,fileType:s,progress:50};return s.startsWith("image/")?(c.value=a,c.isImage=!0):(c.value=m(u),c.isImage=!1),c.miniValue=await h(c.value),o(),c}(e):function(e){return e.accept?k.setAttribute("accept",e.accept):k.removeAttribute("accept"),I.onprogress=e.onprogress,new Promise((e=>{k.click(),I.resolve=e}))}(e)},initUploader:E,request:function(e,t,n){const r=(0,s.vW)();return(0,_.s)()?e.startsWith(r.hostConfig.qApiHost)?async function(e,t){const n={messageName:e,data:t.data};return{response:await y(n),status:200}}(e,t):Me((0,_.f)(e),t,n):Me(e,t,n)}};function nt(){window.wxMenuForceShow||window.wx.hideOptionMenu()}function rt(e){let t="";const n=e.images[0];return n&&n.url&&(t=n.url),t||(0,s.vW)().hostConfig.cdnHost+"/thumbnail.png"}function it(e,t=0){"wechat"===(0,s.dU)().name&&setTimeout((()=>{try{e.noWxShare||window.wx&&(window.wx.showOptionMenu(),window.wxMenuForceShow=!0),async function(e){if(e.noWxShare||!(0,s.dU)().app.canHandleReward()||!(0,s.vW)().useWxSdk)return;const t=(0,we.ZI)(),n=(0,s.vW)().sid,r=e.wxShareInfo||{sid:n,title:(0,L.mP)(e.title),desc:(0,L.mP)(e.summary),shareLink:qe(t),imageUrl:rt(e)},i=location.href.split("#")[0];!function(e,t){if(!window.wx)return;const{imageUrl:n,desc:r,shareLink:i}=t;let{title:o}=t;""===(0,be.KF)(o).trim()&&(o="choiceform");const a=window.wx,{appid:s,timestamp:u,noncestr:c,signature:l}=e;a.config({debug:!1,appId:s,timestamp:u,nonceStr:c,signature:l,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ"]}),a.ready((()=>{a.onMenuShareTimeline({title:o,link:i,imgUrl:n}),a.onMenuShareAppMessage({title:o,desc:r,link:i,imgUrl:n,type:"",dataUrl:""}),a.onMenuShareQQ({title:o,desc:r,link:i,imgUrl:n})})),a.error((e=>{console.info("wx share err",e)}))}(await function(e){const t=(0,s.vW)().hostConfig.qApiHost+"/wechat/jsapi_sign";return(0,Je.vT)(t,{type:"GET",data:e},!1)}({url:i}),r)}(e)}catch(e){(0,s.vW)().uploadLog("微信分享初始化失败")}}),t)}function ot(e,t,n,r,i){return"https://open.weixin.qq.com/connect/oauth2/authorize"+"?appid=".concat(e,"&redirect_uri=").concat(encodeURIComponent(n))+"&response_type=code&scope=snsapi_userinfo"+("scan_qr_code"===i?"&forcePopup=true":"")+"&state=".concat(r,"&component_appid=").concat(t,"#wechat_redirect")}n(3210);const at=async function(e){const t={messageName:"get_storage",data:{key:e}};return(await y(t)).value},st=function(e,t){return y({messageName:"set_storage",data:{key:e,value:t}})},ut=function(e){return y({messageName:"remove_storage",data:{key:e}})};let ct;function lt(){if(void 0!==ct)return ct;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(e){return ct=!1,!1}return ct=!0,!0}const dt={getItem:e=>decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null,setItem(e,t,n,r,i,o){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;let a="";return n&&(a="number"==typeof n?n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n:"string"==typeof n?"; expires="+n:"; expires="+n.toUTCString()),document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(i?"; domain="+i:"")+(r?"; path="+r:"")+(o?"; secure":""),!0},removeItem(e,t,n){return!(!e||!this.hasItem(e)||(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:""),0))},hasItem:e=>new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)};function ft(e,t){lt()?localStorage.setItem(e,t):dt.setItem(e,t)}function pt(e){return lt()?localStorage.getItem(e):dt.getItem(e)}function ht(e){lt()?localStorage.removeItem(e):dt.removeItem(e)}const mt={set:ft,setVital:async(e,t)=>(0,_.s)()?st(e,t):ft(e,t),get:pt,getVital:async e=>(0,_.s)()?at(e):pt(e),remove:ht,removeVital:async e=>(0,_.s)()?ut(e):ht(e)},gt="cached_meta_before_third_auth",vt={userInfo:null,retrieveAuthSurveyMeta:function(){const e=(0,we.ZI)(),{code:t,state:n}=e;if(t){const t=mt.get(gt);if(t)return mt.remove(gt),JSON.parse(t);{const t=We("start",(0,we.FC)(e));location.href=t,(0,s.vW)().customAbort()}}else n&&((0,s.vW)().error((0,l.Iu)(d.bn.global.authFailed)),mt.remove(gt),(0,s.vW)().customAbort());return null},async init(e){if((0,s.vW)().preview)return;const{channel:t}=e,{type:n,authorizer_id:r,app_id:i}=t;if(t&&"wechat"===n&&i){const t=(0,we.ZI)().code;t||((0,s.vW)().error((0,l.Iu)(d.bn.global.authFailed)),(0,s.vW)().customAbort()),e.interviewee=await function(e){const t=(0,s.vW)().hostConfig.qApiHost+"/interviewees";return(0,Je.o1)(t,{type:"POST",data:e}).catch((e=>{throw(0,Je.lH)(e),e}))}({code:t,authorizer_id:r})}},authorizeGift:function(e,t,n,r){const i=ot(e,t,(0,s.dU)().app.getRewardUrl(n),"reward",r);Ze(),location.replace(i)},authorize(e){const{channel:t}=e;if("wechat"===t.type&&t.app_id&&!e.authorized){e.authorized=!0,function(e){mt.set(gt,JSON.stringify(e))}(e);const{app_id:n,component_appid:r,authorizer_id:i}=t;!function(e,t,n){const r=ot(e,t,We("start",(0,we.ZI)()),n);Ze(),location.replace(r)}(n,r,i),(0,s.vW)().customAbort()}}};var yt=n(277),wt=n(5817),_t=n(9309),bt=n(9896);function xt(){const e=JSON.parse("session"&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent("session").replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null);return e?e.jwt:""}var Tt=n(3768),kt=n(7529);let St;async function It(e){const{infer_collector_id:t,infer_status:n}=(0,we.ZI)(),r=await(0,Tt.gS)(e);r.status=n||"test",r.collector_id=Number(t)||void 0;const i=function(){const{infer_time_range:e}=(0,we.ZI)();if(!e)return null;const t=e.split("-");let n=Number(t[0]),r=Number(t[1]);return n&&r?(n>r&&([n,r]=[r,n]),{start:n,end:r}):null}();if(!i)return r;const{start:o,end:a}=i,s=(0,f.xT)(o,a);r.created_at=new Date(s).toISOString();let u=0;return r.answers.forEach((t=>{const n=(0,kt.Sl)(e,t);t.start_time=new Date(s+u).toISOString(),(0,F.$X)(n)||"end"===n.type?t.cost_time=0:(t.cost_time=function(e){const t=e.origin,n=1e3*Number(t.minAnswerTime),r=1e3*Number(t.maxAnswerTime);return n&&r?(0,f.xT)(n,r):function(e,t,n){const r=.5,i=t-e,o=(0,f.xT)(1,99),a=Math.floor(Math.log(1-.5*o/50)/Math.log(r)),s=Math.max(7-a,0),u=o<50?e:Math.round(e+i*r*r**s),c=o>96.875?t:Math.round(e+i*r*r**(s-1));return(0,f.xT)(u,c)}(n||1e3,12e5)}(n),u+=t.cost_time)})),r.time_consuming=Math.ceil(u/1e3),r.committed_at=new Date(s+u).toISOString(),r.ip_address=await async function(e){const t=await async function(){if(!St){const e=await tt.request("https://core.choiceform.com/iplist.json",{type:"GET"},!1),t=JSON.parse(e.response);let n=[];const r=Object.keys(t);r.forEach((e=>{n=n.concat(t[e])})),St={regionMap:t,fullList:n,keys:r}}return St}(),n=e.address?e.address.city:"";let r=t.fullList;if(n){const e=t.keys.find((e=>e===n||e.startsWith(n)||n.startsWith(e)));e&&(r=t.regionMap[e])}return(0,f.DQ)(r,1)[0]}(e),r}let Ot=-1,Et=1,Ct=0,Pt="",Lt=null,Nt={index:0,fullLength:0,percent:0};async function Rt(e,t){let n=!0;if(Ce(Pt)?n=await async function(e,t){if(Oe()||!Ie)return!1;if("END"===e.type||"CHECK_END"===e.type){const e=[Ie,...Se.filter((e=>!e.when&&e!==Ie))];for(const n of e){n.done=!0;const{options:e,logicType:r}=n.should,i=await(0,xe.cx)(t,e,r);if(!i.value){const e={target:n.name,logicType:r,matches:i.details.filter((e=>!e.value))};Te.push(e)}}return Se=Se.filter((e=>!e.done)),Se.length>0?(Ie=Se[0],!0):(Te.length>0?c({name:"testcase",type:"failed",results:Te}):c({name:"testcase",type:"success"}),!1)}return c({name:"testcase",type:"error",target:Ie.name,message:e.message}),!1}(e,t):c({name:"infer_worker",type:e.type,data:e.data,message:e.message,round:Et++,id:Pt,ended:!0,nodeName:t.current.nodeName}),clearTimeout(Ot),a.s$.off(),n){!function(e){const t=window.CFPlugin.fakedServers;Object.keys(t).filter((e=>{e.endsWith("/__reset_for_infer__")&&t[e]({},(0,s.vW)())}))}();const e=await(0,_t.$A)();await Ut(e)}}function At(e){let t=[...e.nodes],n=0;const r=async()=>{t=[...e.nodes];const i=t[n++];let o=!1;!function(e){const t=Date.now();if(t-Ct>1e3){let n=(0,wt.xC)(e);-1===n.index?n=Nt:Nt=n,c({name:"infer_progress",id:Pt,progress:n,round:Et}),Ct=t}}(e),i?"end"===i.type?(Ce(Pt)?await Rt({type:"END"},e):await async function(e,t){if(e.prev.checkMode){let n=e.prev;const r=n?n.nodeName:"";for(;n&&(0,F.$X)(n);)n=n.prev;return Rt({type:"CHECK_END",message:(n?n.nodeName:"")+" => "+r+" :CHECK_END"},t)}if(e.origin.abandonAnswer)return Rt({type:"ABANDON",message:"Answer abandoned by: ".concat(e.nodeName)},t);{const e=((n=await It(t)).survey_id=(0,s.vW)().sid,{result:n,url:(0,s.vW)().hostConfig.host+"/d/v1/responses",jwt:xt()});return await async function(e){if(Ce(Pt))return!0;const t=window.CFPlugin.fakedServers;for(const e of Object.keys(t))if(e.endsWith("/__check_for_infer__")){const n=await t[e]({},(0,s.vW)());if(n.result)return a.s$.trigger("ERROR",{message:"Infer Result Error: ".concat(n.result)}),!1}return!0}()?Rt({type:"END",data:e},t):void 0}var n}(i,e),o=!0):(a.s$.one("STRETCH_OK",r),await(0,q.W)(i,Lt)):await e.handleEvents.handleNextClick(),o||(clearTimeout(Ot),Ot=window.setTimeout((()=>{Rt({type:"TIMEOUT",message:(e.current&&e.current.nodeName)+":TIMEOUT"},e)}),5e3))};return r()}function Ut(e){return a.s$.one("NEXT_FAIL",(t=>{Rt(t,e)})),a.s$.one("ERROR",(t=>{Rt(t,e)})),a.s$.on("NEXT_OK",(()=>{At(e)})),At(e)}let Mt="",Bt=!1;function Dt(){Bt=!0}function Ft(e){const{nodeUuid:t}=e;Mt===t||Bt||(c({name:"locate_preview",nodeUuid:t}),Mt=t)}var jt=n(6866),Wt=n(6060);const qt="preview_bookmarks_";let zt;async function Vt(e){const t=await mt.getVital(qt+e.surveyId);return zt=t?JSON.parse(t):[],zt}async function Gt(e,t){zt.some((t=>JSON.stringify(t.result)===JSON.stringify(e.result)))?(0,s.vW)().notify((0,l.Iu)(d.bn.previewBookmark.existed)):(zt.push(e),await mt.setVital(qt+t.surveyId,JSON.stringify(zt)))}class Ht{constructor(e,t){this.loading=!1,this.progress="",this.nodeList=[],this.bookmarks=[],this.parent=e,this.state=t}async loadData(){var e;(0,s.Pg)(this,{bookmarks:await Vt(this.state),nodeList:(e=this.state,e.renderList.filter((e=>e.reached&&!e.readonly)))})}async jumpToNode(e){this.loading||(await async function(e,t){(0,a.cs)(e,!0),(0,s.Pg)(t,{current:e}),(0,wt.bR)(t),await(0,Wt.b)(t)}(e,this.state),this.parent.close())}async applyBookmark(e){if(this.loading)return;document.body.style.pointerEvents="none",(0,s.vW)().notifySuspended=!0,(0,s.Pg)(this,{loading:!0});const t={onProgress:e=>{this.parent.opened||(this.parent.open(),document.body.style.pointerEvents="none"),(0,s.Pg)(this,{progress:e})},onEnd:e=>{document.body.style.pointerEvents=null,(0,s.vW)().notifySuspended=!1,this.parent.close(),(0,s.Pg)(this,{loading:!1,progress:""});const t=e.failed?d.bn.previewBookmark.importFailure:d.bn.previewBookmark.importSuccess;(0,s.vW)().notify(t)},onSuspend:()=>{document.body.style.pointerEvents=null,(0,s.vW)().notifySuspended=!1,this.parent.close()}};return function(e,t,n){return(0,jt.f$)(t.result,e,n)}(this.state,e,t)}async deleteBookmark(e){this.loading||(await async function(e,t){zt=zt.filter((t=>t!==e)),await mt.setVital(qt+t.surveyId,JSON.stringify(zt))}(e,this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async saveBookmarks(e){this.loading||(await async function(e,t){const n=function(e){return{result:(0,jt._I)(!0),id:(0,f.pC)((0,f.M8)()),name:e}}(e||Date.now().toString());await Gt(n,t)}(e,this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async uploadBookmark(){this.loading||(await async function(e){return new Promise((t=>{const n=document.createElement("input");n.setAttribute("type","file"),n.setAttribute("accept",".cfbm"),n.onchange=n=>{const r=n.target.files,i=new FileReader;i.onload=async()=>{const n=i.result;try{const r=JSON.parse(decodeURIComponent(atob(n)));if(!(r.id&&r.name&&r.result))throw new Error("not a valid bookmark");r.id=(0,f.pC)((0,f.M8)()),await Gt(r,e),t()}catch(e){(0,s.vW)().notify((0,l.Iu)(d.bn.previewBookmark.importFailed)+e.message)}},i.readAsText(r[0])},n.click()}))}(this.state),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}async downloadBookmark(e){this.loading||(function(e){const t=btoa(encodeURIComponent(JSON.stringify(e))),n=document.createElement("a"),r=new Blob([t],{type:"octet/stream"}),i=window.URL.createObjectURL(r);n.setAttribute("href",i),n.setAttribute("download",e.name+".cfbm"),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}(e),(0,s.Pg)(this,{bookmarks:await Vt(this.state)}))}}var Xt=n(5905);function Kt(e){const t=[],n=[];let r=0;return e.renderList.forEach((e=>{const i=e.costTime;!(0,F.$X)(e)&&i&&(t.push({ques_id:e.nodeUuid,time:i,inLoop:!!e.loop}),n.push({renderId:e.renderId,name:e.nodeName,title:(0,Xt.LK)(e)?e.title:"",time:i}),r+=i)})),{postList:t,displayList:n,surveyId:e.surveyId,allTime:r}}class $t{constructor(e,t){this._submitted=!1,this.parent=e,this.state=t}loadData(){(0,s.Pg)(this,{timeInfo:Kt(this.state)})}async uploadTime(e){if(this._submitted)return;const t={items:this.timeInfo.postList,other_info:{}};t.other_info.name=e;const n="https://icon.cform.io/api/v1/surveys/"+this.timeInfo.surveyId+"/preview_stat";try{await(0,Je.o1)(n,{type:"POST",data:t}),(0,s.vW)().notify((0,l.Iu)(d.bn.previewTime.uploadSuccess)),this._submitted=!0}catch(e){(0,s.vW)().notify((0,l.Iu)(d.bn.previewTime.uploadFailed)),this._submitted=!1}}}class Zt{constructor(e){this.bookmark=new Ht(this,e),this.time=new $t(this,e)}close(){this.opened&&(0,s.Pg)(this,{opened:!1})}open(){this.opened||(0,s.Pg)(this,{opened:!0})}async handleToggleOpen(){this.bookmark.loading||((0,s.Pg)(this,{opened:!this.opened}),this.opened&&(await this.bookmark.loadData(),this.time.loadData()))}}const Jt={beforeForceLeave:Ze,onSwitchPage(){window.scrollTo(0,0)},onLangChange(e){const t=document.documentElement;t.setAttribute("lang",e.locale),t.setAttribute("dir",e.direction||"ltr")},onTitleChange(e){try{document.title=e||"choiceform"}catch(e){(0,s.vW)().uploadLog("修改网页标题失败")}},async beforeSetupEnd(e){if(e.useWxSdk&&!(0,_.s)())return async function(){"wechat"===(0,s.dU)().name&&(await Ae("https://res.wx.qq.com/open/js/jweixin-1.6.0.js",{},!0),void 0===window.WeixinJSBridge?document.addEventListener("WeixinJSBridgeReady",nt,!1):nt())}()},async afterSetup(){De.autoRun||De.infer||!(0,s.vW)().preview||(a.s$.on("SWITCH_NODE",((e,t)=>{Ft(t)})),a.s$.on("START_MEMORY",Dt),a.s$.on("END_MEMORY",((e,t)=>{!function(e){Bt=!1,e&&Ft(e)}(t)})))},async afterFetchStart(e){if(!(0,_.s)())return window.cfState=e,it(e)},async afterFetchSurvey(e){var t;window.cfState=e,(0,_.s)()||(it(e,1e3),await async function(e){const t=(0,we.ZI)();if(Pt=t.infer_id,Pt&&e.preview)return a.s$.trigger("START_MEMORY"),Ce(Pt)&&(function(e=[]){if(Se=e.filter((e=>!e.disabled)),Oe())c({name:"testcase",type:"success"});else{Se=Se.sort(((e,t)=>!e.when&&t.when?1:-1));for(let e=Se.length-1;e>=0;e--){const t=Se[e],{when:n,should:r,name:i}=t;if(n&&"or"===n.logicType&&n.options.length>1){const t=n.options.map(((e,t)=>({name:"".concat(i,"(").concat(t,")"),when:{logicType:"and",options:[e],reverse:!1},should:r})));Se.splice(e,1,...t)}}Ie=Se[0]}}(e.testCases),Lt={beforeInfer:e=>async function(e){if(Oe()||!Ie||!Ie.when)return;ke.value={};let t=!1;for(const n of Ie.when.options)if(n.relatedNodeId===e.nodeUuid){const r=(0,_e.Kn)(e);t||(r.forEach((e=>{ke.value[e.uuid]=e.origin.inferList,e.origin.inferList=[]})),t=!0);const i=r.find((e=>e.uuid===n.relatedOptionId)),o=await Ee(n,e.parent);o&&i.origin.inferList.push(o)}ke.cached=t}(e),async afterInfer(e){!function(e){ke.cached&&((0,_e.Kn)(e).forEach((e=>{e.origin.inferList=ke.value[e.uuid]})),ke.cached=!1,ke.value={})}(e)}}),await(0,bt.a2)(),Ut(e)}(e),await async function(){const e=(0,we.ZI)().auto_path;if(e){const t="http://localhost:12345/tasks/"+e+".js";await Ae(t.replace(/tasks\/.+/,"chai.js"),{},!1),await Ae(t,{type:"module"},!1)}}()),(0,s.Pg)(e,{previewTool:(t=e,(0,s.vW)().preview?new Zt(t):void 0)})},async afterFetchReward(e){if(!(0,_.s)())return window.cfState=e,it(e)},async onEndSurvey(){if((0,_.s)())return y({messageName:"end_survey",data:{}})},async onRestartSurvey(){if((0,_.s)())return y({messageName:"restart_survey",data:{}})},async onResumeSurvey(){if((0,_.s)())return y({messageName:"resume_survey",data:{}})},async onStartNewSurvey(){if((0,_.s)())return y({messageName:"start_new_survey",data:{}})},async beforeGotoNext(){if((0,_.s)())return y({messageName:"send_task_info",data:await(0,yt.M)()})}};window.CF_UI_COMS=window.CF_UI_COMS||{};const Yt={};let Qt;const en=[];async function tn(e,t){if(!Yt[e]){const n=async()=>{const{treeUrl:n,templatePath:r}=(0,s.vW)();if(!Qt){const e=await(0,Je.vT)(n,{type:"GET"},t);Qt=[...e.partials,...e.standards]}const i=function(e){const t=[],n=[];for(;e.length>0;){const r=[],i=[];e.forEach((e=>{const n=Qt.find((t=>t.id===e));i.push({file:n.file,id:e}),t.push(e),n.dependencies.forEach((e=>{t.includes(e)||r.push(e)}))})),n.unshift(i),e=r}return n}([e]),o=[];for(const e of i)for(const t of e)en.includes(t.id)||(o.push(r+"/"+t.file),en.push(t.id));return await Promise.all(o.map((e=>Ae(e,{crossorigin:"anonymous"},t)))),window.CF_UI_COMS[e]};Yt[e]=n()}return Yt[e]}function nn(e,t){let n=document.getElementById(t);n||(n=document.createElement("style"),n.setAttribute("id",t),n.style.display="none",document.head.appendChild(n)),n.innerHTML=e}const rn={loadUiEntryTemplates:async function(e,t){const{dynamic:n}=(0,s.vW)();if(n&&e&&!De.autoRun&&!De.infer)for(const n of e)await tn(n,t)},loadNodeComponent:async function(e,t){const{dynamic:n}=(0,s.vW)();if(n&&e&&!De.infer&&!De.autoRun)return await tn(e.id,t)},setGlobalStyle(e){nn(e,"global-var-style")},setVarStyle(e){nn(e,"common-var-style")},setPresetStyle(e){nn(e,"preset-rich-style")}};window.addEventListener("error",(e=>{i.EventHub.trigger("ERROR",{message:e.message})})),i.Core.realtime=fe,i.Core.initRealtimePreview=()=>{location.href.includes("/themes")&&(E(),c({name:"init_preview"}),document.documentElement.setAttribute("class","ios iphone mobile portrait safari -9"),window.addEventListener("message",ge),window.addEventListener("mousedown",ve),window.addEventListener("mouseup",ye))},i.Core.silentSetter=De.autoRun||De.infer,i.Core.registerEnv({name:o(),dev:De,app:ze,system:Xe,network:tt,auth:vt,storage:mt,hook:Jt,ui:rn}),i.I18n.MessageFormat=t(),window.CCClient={I18n:i.I18n,Core:i.Core,EventHub:i.EventHub}})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();