@choiceform/os-client-core 3.6.75 → 3.6.76

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={8744:function(e,t){var n,r;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,c=3,u="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}},S=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=u,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 S(this,g,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new C((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=u,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 S(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 S(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 S(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===u}},{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}(),T={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]})}},E=(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||E,this.defaultEncoder=T.encode,this.defaultDecoder=T.decode,this.transport!==E?(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 C((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=I.appendParams(I.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 I.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||I.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;I.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=c,this.onclose()}}]),e}()),I=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 c=new XDomainRequest;this.xdomainRequest(c,e,t,r,o,a,s)}else{var u=i.XMLHttpRequest?new i.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(u,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 c=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===c.states.complete&&s){var t=c.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}();I.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})),c=n.metas.map((function(e){return e.phx_ref})),u=t.metas.filter((function(e){return c.indexOf(e.phx_ref)<0})),l=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));u.length>0&&(a[e]=t,a[e].metas=u),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 C=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}()},void 0===(r=n.apply(t,[t]))||(e.exports=r)},9200:(e,t,n)=>{"use strict";var r=n(3548),i=n(512),o={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(7),(0,r.inflate)(e,{to:"string"})},deflatePrefix:function(e){return":CF_PD:"+(e=(0,r.deflate)(e,{to:"string"}))},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:"ms_my",value:"Bahasa Melayu",bdCode:"may",comment:"马来语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"no",value:"Bokmål",bdCode:"nor",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.c=o},568:(e,t,n)=>{"use strict";n.d(t,{CW:()=>o,qe:()=>u,Y1:()=>s,qq:()=>a,Ki:()=>c});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 c(e){i=e.toLowerCase(),o=r[i]||r.en_us}function u(){return i}},4676:(e,t,n)=>{"use strict";n.d(t,{cA:()=>S,gp:()=>E,wr:()=>k,Qz:()=>I,Ci:()=>T}),n(7768);var r=n(4708),i=n(6332),o=n(3080),a=n(8084),s=n(556),c=n(3001),u=n(5776),l=n(8737),d=n(7404),f=n(2352),p=n(984);n(9952);var h=n(8856);const m=["select","icon_mark","value_mark","upload","menu","slide_rate"],g=["fill","verify"];function v(e){const{type:t}=e;return"region"===t?"predef":t}function y(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":m.includes(t)?"option":g.includes(t)?"comment":t}return r}function w(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:v(e),node_id:r.toLowerCase(),items:i,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function _(e,t){const n=(0,r.Ml)(t),i=(0,p.O_)(t,e),o={value:(0,f.oV)(i)?"":i,other:!!t.isOtherOpt,type:y(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,c.Qr)(e.text),o.col_content=(0,c.Qr)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.Qr)(t.text);return t.visible||(o.hidden=!0),o}function b(e){return(0,r.gr)(e).reduce(((t,n)=>{var r;return(n.selected||(0,p.QX)(n,e)||void 0===n.selected&&!0===(null===(r=null==n?void 0:n.__cache)||void 0===r?void 0:r.selected))&&t.push(_(e,n)),t}),[])}const x={};function S(e){const t=x[e.type];return t&&t(e)}function k(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function T(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function E(e,t="all",n="committed_url",r=!1){var a,c;const u=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!T(e.checkMode,t))return;if("data"===e.type)return;const r=S(e);r&&n.push(r)})),n}(e,t),{answers:f,logContent:p}=function(e){const{nodeList:t,answers:n}=e;let r=!1;const i=[];for(const e of n){const n=t.find((t=>t.nodeUuid===e.node_id));if(void 0!==e.loop_ctxs&&0!==e.loop_ctxs.length&&1!==e.loop_ctxs.length&&2===e.loop_ctxs.length){const t=null==n?void 0:n.circleNode1Id;if(void 0===(null==n?void 0:n.circleNode2Id)&&(r=!0,i.push("broken loop_ctxs in answer: ".concat(JSON.stringify(e),", node is: ").concat(JSON.stringify(n)))),t){const n=e.loop_ctxs.filter((e=>e.node_id===t));1===n.length&&0===n[0].index&&(e.loop_ctxs=n)}}}return{answers:n,logContent:r?i.join("\n"):null}}({nodeList:e.nodeList,answers:u});p&&(null===(c=(a=(0,h.E3)()).uploadLog)||void 0===c||c.call(a,p));const m=r?void 0:await(0,l.ML)(e,n),g=await(0,l.m0)(e),v={backend_request_params:null!=g?g:{},webhook_params:null!=m?m:{},answers:f,var_map_info:(0,o.oJ)(e,t),options_display_info:(0,i.Ud)(e,t),query_params:(0,d.uK)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.OI)(v.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),v}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.W4)(e)||(0,r.Om)(e)}}x.select=x.select_image=x.menu=x.select_icon=x.hot_spot=e=>{const t=w(e,b);if((0,u.cd)(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},x.cascade=x.icon_mark=x.value_mark=x.matrix=x.weight=x.slide_rate=x.sequence=x.upload=x.heat_map=x.fill=x.max_diff=e=>{const t=w(e,b);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},x.location=e=>{const t=w(e,(t=>{const n=(0,r.gr)(e).find((e=>e.selected));return n?[_(t,n)]:[]})),{position:n,indexes:i}=e;return n&&(n.indexes=i,t.location=n),t},x.region=e=>{const t=x.location(e);return t&&(t.region=(0,a.Qf)(e.value)),t},x.area=e=>x.location(e),x.data=e=>w(e,(e=>(0,r.gr)(e).reduce(((t,n)=>(n.selected&&t.push(_(e,n)),t)),[]))),x.verify=e=>{const t=w(e),{phoneNumber:n,validateType:r,code:i}=e;return"sms"===r&&(t.phone_num=n),t.code=i,t},x.end=e=>({type:v(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),x.logic=e=>{const t=w(e);return t.logic_result=e.logicResult,t}},9536:(e,t,n)=>{"use strict";n.d(t,{I:()=>u,e:()=>p}),n(5960),n(9952);var r=n(4708),i=n(1768),o=n(4196),a=n(5776),s=n(8856),c=n(984);function u(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:""}}function l(e){(0,s.e)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,r.wR)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,i.A9)(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,c.g7)(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.e)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",image:null})}));n&&await(0,a.SY)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.e)(e,{percent:(0,r.e$)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,r.wR)(t).forEach((t=>{if(t===e)return;const n=(0,i.I9)(e.origin)||(0,i.E5)(e,t),r=(0,i.I9)(t.origin)||(0,i.E5)(t,e),o=(0,i.IN)(e,t)||(0,i.IN)(e,t.optionX)||(0,i.IN)(e,t.optionY)||(0,i.IN)(e.optionX,t)||(0,i.IN)(e.optionY,t)||(0,i.u6)(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.A9)(n.option,e)&&(n.display?(0,o.gF)(n,t):l(n.option))}))}},4384:(e,t,n)=>{"use strict";n.d(t,{Az:()=>r,ay:()=>o,yK:()=>i});const r={refresh:!1,result:!1},i={refresh:!0,result:!0},o={refresh:!1,result:!0}},7801:(e,t,n)=>{"use strict";n.d(t,{_:()=>s,i:()=>a});var r=n(5776),i=n(8856),o=n(4676);function a(e,t){var n,r;const{nodes:o}=e.parent;return!o.includes(e)&&(t&&(null===(r=(n=(0,i.E3)()).uploadLog)||void 0===r||r.call(n,"".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning")),!0)}function s(e,t){var n,a;const s=e.renderList.filter((e=>!((0,r.S)(e)||!(0,o.Ci)(e.checkMode,t)||!(0,r.K6)(e.origin)||(0,o.Qz)(e))));if(s.length>0){const e=s.map((e=>e.runtimeNodeName)).join();null===(a=(n=(0,i.E3)()).uploadLog)||void 0===a||a.call(n,"answer lack for: ".concat(e),"warning")}}},1548:(e,t,n)=>{"use strict";n.d(t,{S:()=>d}),n(1088);var r=n(9216),i=n(5776),o=n(8856),a=n(5548),s=n(3001),c=n(4676);function u(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.A)(e.location.address):""}function l(e,t){const n=(0,o.E3)().startState,a=[{title:(0,s.Qr)(n.title),description:(0,s.Qr)(n.description)}];return t.forEach((t=>{const n=(0,r.Uq)(e,t);if(!(0,i.S)(n)){const e={title:(0,s.Qr)(n.title)||n.runtimeNodeName,description:(0,s.Qr)(n.description),value:u(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,c.wr)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.E3)();if(!e)return null;const t=await(0,c.gp)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},7788:(e,t,n)=>{"use strict";n.d(t,{YZ:()=>m,qc:()=>g,qo:()=>h});var r=n(6072),i=n(4060),o=n(9677),a=n(6784),s=n(3001),c=n(6496),u=n(8856),l=n(568);const d={valid:!0,message:""},f="vital:",p="alert:";async function h(e,t){if(e){const{parent:n}=t;return(0,r.eU)({state:n,request:e,customParam:null,silent:!1})}return d}async function m(e,t){if(e){const{message:n}=e;return await(0,i.wx)(t,e)?d:{valid:!1,message:n||(0,c.GS)(l.CW.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:c,logic:l,noPreventNext:g}=i;let v=await h(c,e);return v.valid&&(v=await m(l,r)),!v.valid&&(e.validateFailed=!0,g&&(v=d,(0,a.mU)(r,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.Oj)(e.message,{state:t}),(0,o.mK)(e.message)||(e.message=await(0,s.qQ)(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.mK)(v.message))?((0,u.W4)().hook.beforeForceLeave(),(0,u.W4)().app.openWebLink(v.message),(0,u.E3)().customAbort(),v):v}},9968:(e,t,n)=>{"use strict";n.d(t,{Oe:()=>O,c9:()=>L,iW:()=>R}),n(5960),n(9624),n(9952);var r=n(4708),i=n(9677),o=n(5776),a=n(7788),s=n(3001),c=n(556),u=n(8856),l=n(6496),d=n(568),f=n(7320),p=n(984),h=n(1768),m=n(1344),g=n(6276);const v={valid:!0,message:""};function y(e){if(!(0,o.K6)(e.origin))return v;const t=(0,r.Om)(e)||(0,r.W4)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}function w(e,t){if((0,g.IN)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function _(e){if(!(0,o.K6)(e.origin)&&!(0,r.W4)(e))return v;const{options:t}=e,{parent:n}=e;let i=await(0,s.W0)(e.origin.fillMin,{state:n});i=i||t.length,i>t.length&&(i=t.length),i=w(e,i);let a=0;const c=(0,l.GS)(d.CW.fill.itemInputRequired);let u=!1;for(const n of t)(0,p.QX)(n,e)?(C(n,c),a+=1):!0===n.origin.fillRequired&&(I(n,c),u=!0);return i>a?{valid:!1,message:(0,l.GS)(d.CW.fill.inputLimitMin,{min:i}),dueToNode:e}:u?{valid:!1,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e}:v}function b(e,t=!1){const n=(0,g.IN)(e)?e.otherOptions:[],i=t?n:(0,r.wR)(e),a=(0,o.K6)(e.origin),s=(0,l.GS)(d.CW.fill.itemInputRequired),c=i.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,i=e.selected;return n&&(i||(0,r.yg)(e.origin)&&t)}(t,a)&&!(0,p.QX)(t,e);return n?I(t,s):C(t,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e,dueToOption:c}}async function x(e,t=!1){const n=t?e.options:(0,r.wR)(e),o=[];for(const t of n){let n={valid:!0};(0,p.QX)(t,e)&&(n=await(0,i.uC)(t,e)),n.valid?C(t,n.message):(I(t,n.message),o.push(n))}return o[0]||v}async function S(e){return(0,o._A)(e.origin)&&(0,r.Om)(e)?k(e):v}async function k(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,r.wR)(e).find((e=>e.selected));return!(!t||!(0,h.I9)(t.origin))}(e))return v;const{min:t}=await(0,o.EH)(e,e.parent);return(0,r.wR)(e).filter((e=>!(0,r.yg)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.GS)(d.CW.select.limitMin,{min:t}),dueToNode:e}}const T={};async function E(e,t){if(!t.list)return v;const{multiple:n,min:r,max:o,required:a}=t,s=t.text?(0,l.GS)(d.CW.menu.listItem)+t.text:(0,l.GS)(d.CW.menu.topList),c=t.list.filter((e=>e.selected));for(const t of c){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.inputReq,{text:n.text})};const r=await(0,i.uC)(n,e);if(!r.valid)return{...r,message:(0,l.GS)(d.CW.menu.inputRule,{text:n.text,rule:r.message})}}const u=c.length;if(a&&0===u)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.required,{text:s})};if(n&&u<r&&u>0)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.requiredBetween,{text:s,min:r,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await E(e,n);if(!t.valid)return t}return v}function I(e,t){e.errorMessage!==t&&(0,u.e)(e,{errorMessage:t})}function C(e,t){e.errorMessage===t&&(0,u.e)(e,{errorMessage:""})}function O(e,t){(0,u.E3)().locateError(e,t)}async function N(e,t){if((0,o.S)(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.GS)(d.CW.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const r=T[e.type];let i=r?await r(e):v;return i.valid&&t&&(i=await(0,a.qc)(e)),i.valid&&I(e,i.message),i}T.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await S(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},T.select_image=e=>T.select(e),T.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},T.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},T.icon_mark=async e=>{const t=await T.value_mark(e);return t.valid?(0,o.K6)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}:v:t},T.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:r}=e;let i=(0,o.K6)(r)?r.rankCount||n.length:0;const a=n.length;i>a&&(i=a),i=w(e,i);let s=0;const c=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<c.length&&c[e].sortNo===e+1;e++)s++;return i>s?{valid:!1,message:(0,l.GS)(d.CW.rank.limitMin,{min:i}),dueToNode:e}:(t=b(e,!0),t.valid?x(e,!0):t)},T.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.cd)(t)?v:(0,o.K6)(t)||(0,r.Om)(e)?(0,o.Un)(t)?k(e):(0,o.ct)(t)||(0,o.gd)(t)||(0,o.cx)(t)?function(e){let t,n,r;(0,o.ct)(e.origin)?(t="yid",n=e.renderOptionsY,r=!1):(0,o.gd)(e.origin)?(t="xid",n=e.renderOptionsX,r=!0):(0,o.cx)(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,c.oj)(e[t],n))))return{valid:!1,message:r?(0,l.GS)(d.CW.matrix.colLimitMin,{min:1}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:1}),dueToNode:e}}return v}(e):async function(e){const t=(0,o.S2)(e.origin);let{min:n}=await(0,o.EH)(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,c.oj)(e[r],i))).length<n)return{valid:!1,message:t?(0,l.GS)(d.CW.matrix.colLimitMin,{min:n}):(0,l.GS)(d.CW.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},T.region=async e=>!(0,o.K6)(e.origin)||e.value?v:{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e},T.location=async e=>{const t=await T.region(e);return t.valid||(t.message=(0,l.GS)(d.CW.locate.required)),t},T.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let i=!0,a="";const s=(0,r.iQ)(e,!0);if(!(0,o.K6)(e.origin)&&0===s)return v;const c=await(0,o.YP)(e,e.parent),{max:u}=c,f=w(e,c.min);let h=0;a=(0,l.GS)(d.CW.upload.uploadRequired);let m=!1;for(const t of n)(0,p.QX)(t,e)?(C(t,a),h+=1):!0===t.origin.fillRequired&&(I(t,a),m=!0);return s<f?(i=!1,a=(0,l.GS)(d.CW.upload.amountLimitMin,{min:f})):s>u?(i=!1,a=(0,l.GS)(d.CW.upload.amountLimitMax,{max:u})):(i=!0,a=""),f>h?{valid:!1,message:(0,l.GS)(d.CW.upload.amountLimitMin,{min:f}),dueToNode:e}:m?{valid:!1,message:(0,l.GS)(d.CW.upload.uploadRequired),dueToNode:e}:{valid:i,message:a,dueToNode:e}},T.verify=async e=>{if((0,u.E3)().preview||(0,u.W4)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}else{const t={valid:!1,message:(0,l.GS)(d.CW.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.I1)({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.eY)(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.I1)({code:r},e),v}catch(e){return a()}}}}return v},T.menu=T.select,T.area=async e=>y(e),T.select_icon=async e=>{const t=y(e);return t.valid?S(e):t},T.weight=async e=>{if(!(0,o.K6)(e.origin)&&!(0,r.W4)(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.GS)(d.CW.weight.totalLimitMin,{min:n}),dueToNode:e}:v},T.cascade=async e=>{if(!(0,o.K6)(e.origin)&&!(0,r.Om)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?E(e,t):n},T.hot_spot=async e=>{const t=function(e){if(!(0,o.K6)(e.origin))return v;const t=(0,r.Om)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}(e);if(!t.valid)return t;let n=await S(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},T.heat_map=async e=>y(e),T.slide_rate=T.value_mark,T.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.GS)(d.CW.maxDiff.all)}};const L=(0,c.Cu)((async(e,t)=>{if(t&&I(t,(await(0,i.uC)(t,e)).message),e){const t=await R([e]);t.message||I(e,t.message),(0,m.ew)(e)}}),250);async function R(e,t=!1,n=!1){const r=[];for(const i of e){const e=await N(i,t);e.valid||(n&&I(e.dueToNode,e.message),r.push(e),(0,m.ew)(i))}return r[0]||v}},9677:(e,t,n)=>{"use strict";n.d(t,{KA:()=>c,_u:()=>l,mK:()=>u,uC:()=>m}),n(7768),n(9624);var r=n(3001),i=n(6496),o=n(4708),a=n(568),s=n(2352);function c(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function u(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.W0)(i.fillStart,{state:n}),a=await(0,r.W0)(i.fillEnd,{state:n});return(0,s.oV)(o)&&(o=-1/0),(0,s.oV)(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.GS)(a.CW.fill.valueLimit,{min:t,max:n})}const p={};async function h(e,t,n){const{itemsMax:r,itemsMin:s}=await(0,o.jJ)(t,n),c=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),0);let u="";return(c<s||c>r)&&(u=(0,i.GS)(a.CW.fill.itemsLimit,{min:s,max:r})),{valid:!u,message:u}}async function m(e,t){const n=(0,s.Wo)(e.value),{origin:r}=e,i=r.fillType,o=p[i];if(!o||(0,s.oV)(n)&&"auto_complete"!==i)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const c=await o(n,e,t);return a.context.option=null,c.valid||(c.dueToOption=e,c.dueToNode=t),c}p.chars=async(e,t,n)=>{const{start:r,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const c=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.GS)(a.CW.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",r.push((0,i.GS)(a.CW.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",r.push((0,i.GS)(a.CW.fill.chinese)));const o=r.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,i.GS)(a.CW.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,i.GS)(a.CW.fill.charsLimit,{min:t,max:n})}(e,r,o);return{valid:!c,message:c}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.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.GS)(a.CW.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.GS)(a.CW.fill.inputDecimalDigits,{scale:r.scale})};const{start:o,end:s}=await l(t,n),c=f(Number(e),o,s);return{valid:!c,message:c}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,i.GS)(a.CW.fill.inputInteger)};const r=Number(e),{start:o,end:s}=await l(t,n),c=f(r,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=c(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.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.GS)(a.CW.fill.needZipCode)}},p.url=async e=>{const t=u(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,i.GS)(a.CW.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:h(e,t,n),p.list_select=(e,t,n)=>h(e,t,n)},984:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,QX:()=>l,g7:()=>o}),n(9624);var r=n(2352),i=n(3001);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.Qr)(n)),n}function c(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,r.oV)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const u={};function l(e,t){return(u[t.type]||c)(e,t)}u.sequence=(e,t)=>-1!==e.sortNo&&c(e,t)},9796:(e,t,n)=>{"use strict";n.d(t,{Co:()=>f,GM:()=>m,iO:()=>p,uS:()=>h}),n(9952);var r=n(5776),i=n(556),o=n(2331),a=n(9376),s=n(6764),c=n(3001),u=n(4708),l=n(4316),d=n(3080);async function f(e,t){const{options:n,passRefs:r,refMaps:i}=await(0,a.q0)(e,t.origin,null,!0);(0,d.GO)(t,i);const o=await(0,l.o9)(t,n,r);return(0,s.uQ)(t,o)}function p(e,t,n=!1){const{loopStack:r}=t;return r.find(((t,o)=>(!n||o===r.length-1)&&(0,i.oj)(t.node.nodeUuid,e.nodeUuid)))}async function h(e,t,n,r,i,o){const a=(0,u.C2)(i),s={state:e,usage:{node:t,optionId:i.uuid}},l=await(0,c.E3)(a.text,s,"WRAPPED_URL"),d=await(0,c.E3)(i.text,s,"WRAPPED_URL"),f=await(0,c.E3)(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.G.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:c}=n,u=s.find((e=>(0,i.oj)(e.selfPortId,a.uuid))).destInputId,l=(0,r.gR)(e,u),d=o[0],{origin:f}=t,p=c[c.length-1],g=await h(n,t,f.nodeUuid,0,d,p),v={destInputId:u,node:f,varList:o,replacements:p?[...p.replacements,g]:[g],currentIndex:0};return c.push(v),{target:l,loop:(0,i.O0)(v),loopStack:(0,i.O0)(c)}},async _increase(e,t,n){const{nodeUuid:o}=t,{loopStack:a}=n,s=a[a.length-1],{varList:c,replacements:u,destInputId:l}=s,d=s.currentIndex+=1,f=c[d],p=a[a.length-2],m=await h(n,t,o,d,f,p),g=(0,r.gR)(e,l);return u[u.length-1]=m,{target:g,loop:(0,i.O0)(s),loopStack:(0,i.O0)(a)}},async _end(e,t,n){const{loopStack:r}=n;r.pop();const a=await o.G.findNext(e,t,n);if(r.length>0){const e=(0,i.O0)(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)}}},8956:(e,t,n)=>{"use strict";n.d(t,{kF:()=>T,WU:()=>I,Gw:()=>S});var r=n(5776);function i(e,t,n,i,o){return o||(o=(0,r.MR)(e,t,n.uuid)),o||i.origin.parentRandomId||t.length&&(o=(0,r.gR)(e,t[t.length-1].destInputId)),o}var o=n(4708),a=n(6276);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],c={async findNext(e,t){const{destList:n,output:c}=t.origin,u=(0,a.IN)(t)?t.otherOptions:[],l=s.includes(t.type)?u:(0,o.wR)(t),d=l&&l.find((e=>e.selected));return{target:i(e,n,c,t,d&&(0,r.MR)(e,n,d.uuid))}}},u={async findNext(e,t,n){const{origin:{destList:i,parentRandomId:a}}=t,s=(0,o.GE)(t);let u=s&&(0,r.MR)(e,i,s.uuid);return u||(u=(await c.findNext(e,t,n)).target),u||!i.length||a||(u=(0,r.gR)(e,i[0].destInputId)),{target:u}}};var l=n(2331),d=(n(2048),n(4060));const f={async findNext(e,t){const{origin:n,parent:i}=t,{options:o,output:a,destList:s,logicType:c,reverse:u,outputN:l}=n,f={logicType:c,reverse:u,options:o},p=await(0,d.wx)(i,f);t.logicResult=p;const h=p?a:l;return{target:(0,r.MR)(e,s,h.uuid)}}};var p=n(6940),h=n(9796);n(5960),n(9952);const m={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:c}=n,u=[...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 u)if(l=(0,r.MR)(e,s,t.uuid),l)break;return{target:i(e,s,c,t,l)}}};var g=n(9216),v=n(556),y=n(8184),w=n(8856),_=n(6072);const b={cascade:m,logic:f,uniqueness_verification:{async findNext(e,t){const{origin:n,parent:i}=t,{output:o,destList:a,outputN:s}=n;let c=!0;const u=i.verifyUniquenessUri,l=i.uniquenessVerification;if(u&&l&&l.enabled&&!(0,w.E3)().preview){const e={enabled:!1,method:u.method,url:u.url,params:l.params};c=(await(0,_.eU)({state:i,request:e,customParam:null,silent:!1,shouldCombineSystem:!1})).valid}t.verificationResult=c;const d=c?o:s;return{target:(0,r.MR)(e,a,d.uuid)}}},loop:h.GM,sequence:u,random:p.qM};function x(e){const t=b[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=>{b[e]=l.G})),["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=>{b[e]=c}));const S=["check","break_point"];function k(e,t){return"loop"===e.type?!(0,h.iO)(e,t):!S.includes(e.type)}function T(e,t,n){return I(e,(0,y.e_)({target:n},t),t)}async function E(e,t,n,i){const{target:o,loop:a,random:s}=i,c=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,r.uK)(o,t.origin)&&(i.loopStack=n,i.loop=e),o.parentRandomId&&c&&!s&&(i.random=c)}else if(c){const t=(0,v.So)(c.node.nodeUuid,n.loopStack);return I(e,(0,g.QL)(n.renderList,t),n)}return i}async function I(e,t,n){let r,i,o=t,a=x(o.type),s=!0;for(;s&&(i=await E(e,o,n,await a.findNext(e,o,n)),r=i.target,r);)k(r,n)?s=!1:(o=(0,y.e_)(i,n),a=x(r.type));return i}},2331:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});var r=n(5776);const i={async findNext(e,t){const{destList:n,output:i}=t.origin;return{target:(0,r.MR)(e,n,i&&i.uuid)}}}},6788:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,c:()=>o}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);const r=new Set;function i(e){return r.has(e)}function o(e){r.add(e)}},6940:(e,t,n)=>{"use strict";n.d(t,{ID:()=>d,mU:()=>u,qM:()=>f}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var r=n(556),i=n(5776),o=n(2331),a=n(1344),s=n(6788);let c=[];function u(){return c}const l=new Set;function d(e,t){e&&0!==e.length&&(c=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.c)(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 u=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,r.oj)(t.selfPortId,o.uuid)){const o=(0,i.gR)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,r.ec)(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.ec)(e.length),1);return e}(Object.keys(a),t);let c=[];for(;s.length>0;){const e=(0,r.ec)(s.length);c=c.concat(a[s[e]]),s.splice(e,1)}return c}(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.gR)(n,e);for(;a;)t.push(a),a=(0,i.MR)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,r.ec)(t.length),n=t[e].nodeUuid;(0,s.c)(n),c.push(n),t.splice(e,1)}})),l.add(a))}(u,t),u=(0,a.wn)(u,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,i.gR)(e,u[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:r}=t;return{target:(0,i.gR)(e,r[n]),random:{...t}}},_end:(e,t,n)=>o.G.findNext(e,t,n),findNext(e,t,n){const{randomList:i}=n,{nodeUuid:o}=t,a=i.find((e=>(0,r.oj)(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)}}},7192:(e,t,n)=>{"use strict";n.d(t,{GI:()=>o,Un:()=>c}),n(9952);var r=n(5876),i=n(9348);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:c(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=c(t),a.limitEnd=c(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 c(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 c=(0,i.A)(t);e.setAttribute("data-v-id",c);const u=(0,r._m)(n);u&&e.setAttribute("data-v-config",u)}return t.innerHTML}},3048:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,a:()=>a});var r=n(556),i=n(7192);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.GI)(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.kt)(e.referUuid)}return n.referId}},7404:(e,t,n)=>{"use strict";n.d(t,{ML:()=>d,SC:()=>u,Ww:()=>f,Yj:()=>l,gh:()=>c,uK:()=>s}),n(7768),n(9624);var r=n(568),i=n(8856),o=n(6496);let a;function s(){return a||(a=(0,i.W4)().app.getParams()),a}function c(){a=null}function u(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.E3)().preview||(0,i.W4)().dev.autoRun?(0,i.E3)().notify((0,o.GS)(r.CW.preview.noLink)):((0,i.W4)().hook.beforeForceLeave(),(0,i.W4)().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}},2172:(e,t,n)=>{"use strict";n.d(t,{a:()=>o}),n(9952);var r=n(1344),i=n(8856);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.e)(e,{costTime:t+a,endTime:o}),await(0,r.mi)(e)}(0,i.e)(e,{currentStartTime:o})}},2524:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var r=n(8856),i=n(9193),o=n(1304),a=n(6796);async function s(e){const t=(0,a.k9)(e);(0,r.e)(e,{nodes:t});let n=null;if((0,a.O2)(e)){const t=(0,a.Oi)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,r.e)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,i.y)(t,n);(0,r.e)(e,{groupTable:o})}else(0,r.e)(e,{groupTable:void 0});const s=await(0,o.uC)(e);(0,r.e)(e,{prevButton:(0,o.Qb)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},6348:(e,t,n)=>{"use strict";n.d(t,{U3:()=>u,i:()=>s,oP:()=>c});var r=n(5776),i=n(8856);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.E3)().uploadLog(e)}}};function c(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,r.CY)(e))}function u(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,i.W4)().hook.onSwitchPage())}},9193:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(556);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.YF)();return e.headHidden=!0,{uuid:t,node:e}}},7556:(e,t,n)=>{"use strict";n.d(t,{SA:()=>u,SW:()=>s,c5:()=>c,ox:()=>a}),n(7768);var r=n(3552),i=n(8348);function o(e){const t=":"+(0,i.yy)().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 c(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.q)(t.questionText),t.describe=(0,r.q)(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.q)(e.text)}))}(e),e)))}function u(e){return e.forEach((e=>{e.value=(0,r.q)(e.value)})),e}},1304:(e,t,n)=>{"use strict";n.d(t,{eO:()=>X,ek:()=>z,ef:()=>Q,ID:()=>F,uC:()=>B,gv:()=>D,Qb:()=>j,Wf:()=>Y,I7:()=>H,e0:()=>K,YR:()=>M,ye:()=>q,KY:()=>G}),n(2048),n(9952);var r=n(6348),i=n(7404),o=n(5776),a=n(6784),s=n(9216),c=n(9968),u=n(1428),l=n(8184),d=n(560),f=n(8956),p=n(8856),h=n(6496),m=n(2331),g=n(8412),v=n(568),y=(n(7768),n(9624),n(5616)),w=n(7320),_=n(6072),b=n(3001),x=n(4060),S=n(4732);const k={},T={};async function E(e,t,n){const{actions:r}=t.origin;if(r&&!(0,y.K)()&&!(0,p.E3)().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(T[t.renderId])return;T[t.renderId]=!0}"backward_leave"===e&&delete T[t.renderId];for(const i of r){if(i.disabled||i.event!==e)continue;const{activeConfig:r}=i;if(!r||await(0,x.wx)(n,r))if("http_request"===i.type)(0,S.y)(i),await(0,_.g5)({state:n,request:i.request,customParam:null,silent:!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.E3)(e.address,r)).replace(/\s/g,""),content:await(0,b.qQ)(e.content,r),title:(await(0,b.E3)(e.title,r)).trim()};await(0,w.G8)(t)}else{const{sms:e}=i,t={};for(const n of e.params)t[n.name]=(await(0,b.E3)(n.value,r)).trim();const n={...o,url:(await(0,b.E3)(e.url,r)).replace(/\s/g,""),content:t};await(0,w.G8)(n)}}}}}var I=n(1344),C=n(2524),O=n(6796),N=n(4676);let L;var R=n(556),A=n(2172);let P;function M(){return!!P}const U=["end","gift","lottery"];function W(e){let{prev:t}=e;const n=[];let r=t&&(0,o.S)(t);for(;r;)n.push({node:t,reason:r}),t=t.prev,r=t&&(0,o.S)(t);return{prev:t,skipList:n,current:e}}function j(e){if((0,p.E3)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,r=(0,O.Oi)(e),{prev:i}=W(r),o=r.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.E3)().preview&&"end"===o?(0,h.GS)(v.CW.global.backTest):t&&i&&(r.checkMode===i.checkMode||(0,p.E3)().preview)&&!U.includes(o)?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,h.GS)(v.CW.global.previous):e.prevBtnText:""}async function B(e){const{formalResult:t}=e,n=e.current;if((0,R.is)(n,"end"===n.type)){const r=n.endBtnText||(0,h.GS)(v.CW.global.go);if(n.linkUrl)return r;if(t&&t.reward||(0,p.E3)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":r;{const{target:t}=await m.G.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?r:""}}if((0,R.is)(n,"lottery"===n.type)){const e=(0,h.GS)(v.CW.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,h.GS)(v.CW.global.next):e.nextBtnText}function D(e,t){const n=[];let r=1;const i=e[t];let a=e[t+r],s=a&&(0,o.S)(a);for(;a&&s;)n.push({node:a,reason:s}),r+=1,a=e[t+r],s=a&&(0,o.S)(a);return{next:a,skipList:n,current:i}}async function G(e){const t=await(0,c.iW)(e.nodes,!0,(0,O.O2)(e));if(t.valid){if((0,O.O2)(e)){(0,p.e)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await E("forward_leave",t,e)}else await E("forward_leave",e.current,e);return await(0,s.AD)(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.i.trigger("NEXT_FAIL",s),"vital"===t.type)throw(0,p.E3)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.E3)().alert(t.message):(e.inSingleGroup||(0,p.E3)().notify(t.message,t),(0,c.Oe)(t,e))}(e,t),!1}function q(e,t){(0,p.e)(e,{nextLoading:t})}function F(e){q(e,!0),P={state:e}}async function z(e){q(e,!1),P&&(await H(P.state),P=void 0)}function V(e,t,n){(0,r.U3)({origin:t,parent:e},!0);const a={...(0,i.uK)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.E3)().preview)(0,u.ID)(n,t,e.theme,(0,o.q_)(e.nodeList)),(0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink((0,p.W4)().app.getRewardUrl(a)),(0,p.E3)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:r}}}=e;(0,p.W4)().auth.authorizeGift(n,r,t,"end"),(0,p.E3)().customAbort()}}function K(e,t){t.linkUrl?((0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink(t.linkUrl),(0,p.E3)().customAbort()):V(e,(0,o.o1)(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 D(t,(0,s.SM)(t,n))}(e),{current:n,next:c}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,i.ML)(n);const c=(0,o.MR)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.G3)(e,c);if((0,R.is)(c,"lottery"===c.type)){const t=await(0,l.yI)(c,d,e);(0,a.cR)(t,e,!(!d||!d.id)),(0,p.e)(e,{current:t}),(0,r.U3)(t,!0)}else V(e,c,d);await(0,C.w)(e)}(e,n):(await(0,p.W4)().hook.beforeGotoNext(),(await(0,d.e)(e,{valid:!0,message:""},n,c)).valid?(function(e){if((0,p.E3)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,r=t[t.length-1];let i=r,a=[i];for((0,O.ms)(r.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===r.origin.groupId)),i=a[0]);i.prev&&(0,o.S)(i.prev)&&!(0,O.ms)(i.prev.nodeUuid,e.nodeGroups);)a.unshift(i.prev),i=i.prev;return a}(e),n=t.map((e=>(0,N.cA)(e))).filter((e=>!!e));(0,p.W4)().network.pushSocket("update",{answers:n}),clearTimeout(L)}(e),async function(e,t){const{next:n,current:i}=t;(0,p.e)(e,{current:n}),n.reached=!0,(0,a.EZ)(i,n),(0,r.U3)(n,!0),(0,g.K8)(e),await(0,I.iq)(e),await(0,C.w)(e),q(e,!1),(0,o.CY)(i),(0,s.S_)(e,e.current),r.i.trigger("NEXT_OK")}(e,t)):q(e,!1))}async function Y(e){const t=(0,O.Oi)(e),{prev:n,skipList:i}=W(t);if(n){if((0,O.ms)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await E("backward_leave",n,e)}else await E("backward_leave",t,e);for(const t of i)await E("backward_enter",t.node,e),await E("backward_leave",t.node,e);if((0,p.e)(e,{current:n}),await(0,A.a)(e),(0,r.U3)(n,!0),(0,g.K8)(e),await(0,I.iq)(e),await(0,C.w)(e),(0,a.aS)(t,n),(0,s.S_)(e,e.current),r.i.trigger("PREV_OK"),(0,O.ms)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await E("backward_enter",n,e)}else await E("backward_enter",n,e)}}async function Q(e,t){const{nodeList:n,current:r}=e,i=await(0,f.WU)(n,r,e),{target:o}=i;return o?X(e,i,t):null}async function X(e,t,n){const r=(0,l.e_)(t,e);if(n&&n(r))return null;if(e&&e.current&&"logic"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.U3)(e,e.current,t)}if(e&&e.current&&"uniqueness_verification"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.eK)(e,e.current,t)}const i=await(0,l.o9)(r,e.current);(0,p.e)(e,{current:i}),await E("forward_enter",i,e);const s=(0,o.S)(i);return s&&((0,a.YZ)(e,i,s),await E("forward_leave",i,e)),i}},8412:(e,t,n)=>{"use strict";n.d(t,{K8:()=>p,wB:()=>f}),n(9952);var r=n(5776),i=n(4708),o=n(9216),a=n(8856);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function c(e){return e&&"end"!==e.type}function u(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=u(e=(0,r.o1)(t,n),t)),e}function l(e,t){let n;t=u(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,i.sf)(t);if(o&&(n=(0,r.MR)(e,a,o.uuid)),!c(n))if(s)n=(0,r.MR)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,r.MR)(e,a,t.uuid),c(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.SM)(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.W4)().dev.infer)return;const{percent:t,index:n}=f(e);n>-1&&(0,a.e)(e,{progress:t})}},9216:(e,t,n)=>{"use strict";n.d(t,{AD:()=>v,QL:()=>h,SM:()=>m,S_:()=>y,Uq:()=>w}),n(9952);var r=n(1304),i=n(5776),o=n(7788),a=n(556),s=n(8856),c=n(9948),u=n(8412),l=n(6348),d=n(2524),f=n(6796);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.oj)(n.renderId,r.renderId))return i}var n,r;return-1}function g(e,t){(0,s.e)(e,{refreshing:t})}function v(e,t,n){if(g(e,!0),clearTimeout(p),n.initial&&(0,l.U3)(e.current,!0),n.delay){const r=(0,s.W4)().dev.autoRun||(0,s.W4)().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.e)(e,{loopStack:(0,a.O0)(t.loopStack)}):(0,s.e)(e,{loopStack:[]});const r=e.randomList,i=t.random;r.forEach((e=>{i?(0,a.oj)(e.node.nodeUuid,i.node.nodeUuid)?e.currentIndex=i.currentIndex:i.stack.some((t=>(0,a.oj)(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.kt)(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 c=[...e.renderList];c=c.length>0?c:[t];const u=m(c,t);if(u<0)return c;c.length=u,c.push(t),(0,s.e)(e,{renderList:c}),(0,f.O2)(e)&&await(0,o.qc)(t);let l=null;const d=t=>!(0,f.ym)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,r.ef)(e,p);if(!t)break;if(c.push(t),f.AN.includes(t.type))break;if(!(0,i.S)(t)){if(l||(l=t,(0,f.ms)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.ym)(l,t,e.nodeGroups))break;await(0,o.qc)(t)}}return c}(e,t,n),h=n.initial?(0,r.gv)(p,l).next:t;(0,s.e)(e,{current:h}),g(e,!1),y(e,t),await(0,d.w)(e),n.initial||(await(0,r.ek)(e),e.inSingleGroup&&(0,u.K8)(e)),(0,c.Y1)()}},1428:(e,t,n)=>{"use strict";n.d(t,{G3:()=>S,ID:()=>k,oD:()=>E,uO:()=>I});var r=n(5776),i=n(1884),o=n(7404),a=n(556),s=n(8856),c=n(6496),u=n(7688),l=n(908),d=n(6348),f=n(6784),p=n(568),h=n(7320),m=n(5170),g=n(5224),v=n(2392),y=n(7828),w=n(4404),_=n(3132),b=n(5032);let x=null;function S(e,t){if((0,s.E3)().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.my)(t.options,1)[0],o=(0,r.MR)(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.E3)().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.x)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.W4)().storage.set("cached_reward",JSON.stringify(i))}}function T(e){const t=(0,s.W4)().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 E(){x=null}async function I(){if(x)return x;const e=(0,o.uK)(),{rt:t,rid:n,code:r,qid:a,tid:g,locale:S,reward_from_qr_code:k}=e;let E;(0,c.Uj)(S);let I,O={};if("red_envelope"===t){let t;(0,s.E3)().preview?t=T(Number(n)).redEnvelope:!r&&k?t=C:(n&&!r&&((0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().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.MT)({code:r},n)));const{gift:i,theme:o,isTemporaryForWXQrcode:u}=t;E=i.origin,O=t.recipient,(0,f.ML)(E,{surveyId:a,userInfo:O,transactionID:g}),I={isTemporaryForWXQrcode:u,rewardValue:E.giftCount+" "+(0,c.GS)(p.CW.reward.yuan),wechatID:O.nickname,wechatImage:O.headimgurl,theme:o}}else{const e=T(Number(n));if(!e)return(0,s.E3)().error((0,c.GS)(p.CW.global.invalidReward)),null;const{custom:t}=e;E=t.giftNode,I={qrCode:t.qrCode,rewardToMessage:E.needSendNote,theme:t.theme}}(0,y.__)(E,E.i18n[S]);const N=(0,w.Y)(E),L={...I,images:E.image?[(0,_.a)(E.image)]:[],video:E.video,layout:E.layout,rewardId:n,eventHub:d.i,nodeName:E.nodeName,type:E.type,rewardType:E.giftType,renderId:E.nodeUuid,rewardName:E.activityName,title:E.blessings,description:E.describe,summary:E.describe,rewardTime:(0,i.kF)(),...N,prevButton:(0,s.E3)().preview&&!(0,s.E3)().realTimePreview?(0,c.GS)(p.CW.global.backTest):"",nextButton:E.linkUrl&&(E.endBtnText||(0,c.GS)(p.CW.global.go)),handleEvents:{...m._,async handlePrevClick(){(0,s.W4)().app.gotoStartPage((0,o.uK)())},handleOptionClick:async(e,t)=>(await(0,u.o)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.s)(e,t)).result,async handleNextClick(){E.linkUrl&&(0,o.ML)(E.linkUrl)},async handleGetRewardWX(){(0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().customAbort()}}};return L.template=await(0,b.m)(E.template,L),x=L,(0,v.y)(L.theme),await(0,s.W4)().hook.afterFetchReward(L),L}const C={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"}},8737:(e,t,n)=>{"use strict";n.d(t,{ML:()=>p,YP:()=>h,m0:()=>g,wH:()=>m}),n(7768),n(9624),n(9952);var r=n(3001),i=n(7404),o=n(6348),a=n(9677),s=n(7320),c=n(5667),u=n(2352),l=n(6620),d=n(8856);function f(e,t){const n=(0,u.Wo)(e.result);return e&&(0,a.mK)(n)?(setTimeout((()=>{(0,i.ML)(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("&"),c={};for(const t of s){const[n,i]=t.split("=");c[n]=await(0,r.cb)(i,e)}return c}async function h(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.i.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),h=await(0,r.cb)(u,t,!p);return h.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:h.trim().startsWith("http")?async function(e,t){return(0,i.ML)(t),o.i.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(),u=n.substring(r+1),p=u.indexOf("?"),h=-1===p?u:u.substring(0,p);let m={};if(-1!==p){const e=-1===p?"":u.substring(p);e&&(m=e?(0,i.Yj)(e):{})}let g={type:a,done:!1};if("FAKE"===a)g=f(await(0,c.E)({url:h,data:(0,l.a8)(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.SY)(h,{type:e,data:m}),a)}catch(e){(0,d.E3)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.i.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.E3)(i,{state:e,joinBy:","})}return 0===a.length?void 0:s}},6796:(e,t,n)=>{"use strict";n.d(t,{AN:()=>u,O2:()=>c,Oi:()=>a,k9:()=>s,ms:()=>o,ym:()=>l});var r=n(5776),i=n(8856);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 c=s-1,u=t;for(;;){const t=n[c--];if(!l(t,u,e.nodeGroups))break;(0,r.S)(t)||(a.unshift(t),u=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,r.S)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,i.e)(e,{pageEnd:!1,pageStart:!1})})),(0,i.e)(a[0],{pageStart:!0}),(0,i.e)(a[a.length-1],{pageEnd:!0})),a}function c(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const u=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!u.includes(e.type)&&!u.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)}},560:(e,t,n)=>{"use strict";n.d(t,{S:()=>k,e:()=>T});var r=n(6348),i=n(7320),o=n(4676),a=n(6784),s=n(6072),c=n(1304),u=n(8184),l=n(8737),d=n(1344),f=n(8856),p=n(6496),h=n(568),m=n(2352),g=n(2524),v=n(7801),y=n(6620);const w={valid:!0,message:""},_={valid:!1,message:""};let b=!1,x=!1,S=!1;function k(){b=!1,x=!1,S=!1}function T(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}),E(e,t,i)}async function E(e,t,n){const k=n.pop(),T=await async function(e,t,n,k){const T=n.checkMode,E=k.checkMode,L=k.type;if("end"===L&&(clearInterval(e.timer),(0,f.e)(e,{limitTime:void 0})),(0,f.E3)().preview)return t;if(T){if("end"===L)return async function(e,t,n){if(S)return _;(0,f.W4)().network.closeSocket(),S=!0;const u=I(e,n);(0,c.ye)(e,!0),(0,v._)(e,"all"),await(0,f.W4)().hook.beforeEndSurvey(e);try{const t=await(0,o.gp)(e,"all","examine_skipped_url"),n=await(0,i.eI)(t,e.transactionID);e.responseStatus=n.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const n=(0,m.Wo)(t?JSON.stringify(t):"")||"";return(0,f.E3)().uploadLog("skip提交失败 "+n,"warning"),(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain)),S=!1,(0,c.ye)(e,!1),_}r.i.trigger("CHECK_FAIL"),(0,f.W4)().network.closeSocket();try{await(0,d.ig)(e),u||(0,a.W2)(t,n,e),await(0,s.Ed)(e,n),(0,c.ye)(e,!1),C(e);const r=await(0,l.YP)("examine_skipped_url",e);if((0,l.wH)(r))return _}catch(e){(0,f.E3)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return w}(e,n,k);if(!E)return async function(e){if(x)return _;x=!0,(0,c.ye)(e,!0);const t=await(0,o.gp)(e,"check","examine_failed_url"),n=t.answers.length;(0,v._)(e,"check");try{const o=await(0,i.KY)(t,e.transactionID);return(0,a.Sg)(e,n),(0,c.ye)(e,!1),e.responseStatus=o.status,r.i.trigger("CHECK_SUBMIT"),w}catch(t){await(0,f.W4)().hook.onEndSurvey(e),await(0,d.ig)(e);const r=(0,i.SC)(t);return N(r)?await O(e,n,"examine_failed_url",r):(x=!1,(0,f.E3)().uploadLog(JSON.stringify(t),"warning"),(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain))),(0,c.ye)(e,!1),_}}(e)}return"end"===L?async function(e,t){var n;if(b)return _;(0,f.W4)().network.closeSocket(),b=!0;const x=I(e,t)||function(e,t){const{renderList:n,startTime:r}=e,i=function(e,t){const n=(0,p.GS)(h.CW.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.e)(r,{hasReward:!1,title:i}),(0,a.kB)(t,e),!0}return!1}(e,t);(0,c.ye)(e,!0),(0,v._)(e,"normal");const S=await(0,o.gp)(e,"normal","committed_url");let k,T;await async function(e,t,n){const r=t.verifyUniquenessUri,i=t.uniquenessVerification;if(r&&i.enabled&&n.origin.doUniquenessVerification&&!(0,f.E3)().preview){const n=await(0,y.aI)(t,i.params,!1);Object.keys(n).length>0&&(e.verification_params=n)}}(S,e,t),await(0,f.W4)().hook.beforeEndSurvey(e);try{k=await(0,i._K)(S,e.transactionID);const t=k.response||k;e.responseStatus=t.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const o=(0,i.SC)(t);if(N(o))await O(e,S.answers.length,"examine_failed_on_commit_url",o);else if(o===i.aS.response_overflow){C(e);const t=await(0,l.YP)("overflow_url",e);(0,l.wH)(t)||e.ignoreSubmittingResult||(0,f.E3)().error((0,i.O)(o)),e.responseStatus="committed",r.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}else{const r=null!==(n=(0,m.Wo)(t?JSON.stringify(t):""))&&void 0!==n?n:"";(0,f.E3)().uploadLog("正式提交失败: "+r,"warning"),e.ignoreSubmittingResult||(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain)),(0,c.ye)(e,!1),b=!1}if(!e.ignoreSubmittingResult)return _;await(0,f.W4)().hook.onEndSurvey(e),k={}}e.formalResult=k;try{await(0,s.Ed)(e,t),x?T=await(0,l.YP)("invalid_url",e):((0,a.kv)(t,e,S.answers.length,k),k.reward&&(0,f.e)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.W4)().app.canHandleReward())return(0,u._M)(t,e)}(t,e),T=await(0,l.YP)("committed_url",e))}catch(e){(0,f.E3)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.ig)(e),(0,c.ye)(e,!1),C(e),r.i.trigger("FULL_SUBMIT"),await(0,g.w)(e),(0,l.wH)(T)?_:w}(e,k):t}(e,t,k.prev,k.next);return 0===n.length||"vital"===T.type?T:E(e,T,n)}function I(e,t){const{oneReplyPerTerminal:n,sid:r}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.kr)(t,e),n&&(0,f.W4)().storage.set(r,"1"),!0)}function C(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.W4)().storage.set(n,"1")}async function O(e,t,n,o){(0,a.ms)(e,t),C(e);const s=await(0,l.YP)(n,e);(0,l.wH)(s)||(0,f.E3)().error((0,i.O)(o)),e.responseStatus="examine_failed",r.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}function N(e){return e===i.aS.quota_not_match||e===i.aS.quota_full}},9948:(e,t,n)=>{"use strict";n.d(t,{Gg:()=>z,q0:()=>X,ER:()=>Y,Y1:()=>G});var r=n(5776),i=n(8956),o=n(1304),a=n(1884),s=n(4556),c=n(7688),u=n(908),l=n(1576),d=n(6680),f=n(8184),p=n(6784),h=n(7788),m=n(9216),g=n(7320),v=n(7556),y=n(560),w=(n(4676),n(4196)),_=n(6348),b=n(1344),x=n(5616),S=n(8856),k=n(6496),T=n(7828),E=(n(4708),n(5170)),I=n(556),C=n(8412),O=n(568),N=n(4872),L=n(8360),R=n(7404),A=n(3004),P=(n(2048),n(9952),n(2524)),M=n(6796);var U=n(7801);const W={};var j=n(2172),B=n(1103),D=n(6276);const G=(0,I.Cu)((()=>{(0,S.E3)().realTimePreview||K()||_.i.trigger("STRETCH_OK")}));function q(e){return!K()&&!(0,U.i)(e,!0)}function F(e){(0,x.K)()||(e.answerChangedSinceStart=!0)}function z(e){e.handleEvents={...E._,handleQuickAnswer:t=>(F(e),(0,L.E)(t)),async handleLangChange(e){await(0,k.Sk)(e.locale,!0)},async handleCascadeInput(e,t,n,r){if(!q(r))return null;const i=(0,w.cv)(e,t,n,r);return this.handleOptionInput(e,i,r).then((e=>e))},handleOptionAssistInput:(t,n,r,i)=>((0,S.e)(r.assistValue,{[n]:t}),F(e),H({result:!0},i)),handleCascadeClick:async(e,t,n)=>q(n)?H(await(0,w.GA)(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,c.o)(t,n);return r.result&&(0,p.me)(t,n),F(e),H(r,n).then((e=>e))},async handleOptionInput(t,n,r){if(!q(r))return null;const i=await(0,s.wf)(t,n,r);return i.result&&(0,p.ui)(t,n,r),F(e),H(i,r).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.I5)(e,t,n),(0,p.Ux)(e,t,n)),async handleSequenceInput(t,n,r,i){if(!q(r))return null;const o=i.sortNo,a=await(0,d.W)(t,n,r),s=i.sortNo;if(a.result&&o!==s){const e=r.options.findIndex((e=>e===i));(0,p.we)(e,r)}return F(e),H(a,r).then((e=>e))},async handleQuestionInput(t,n){if(!q(n))return null;const r=await(0,u.s)(t,n);return r.result&&(0,p.Oo)(t,n),F(e),H(r,n).then((e=>e))},handleLocateFailed(t){const n=(0,u.S)(t);return n.result&&(0,p.m_)(t),F(e),H(n,t).then((e=>e))},async handlePrevClick(){if(!(0,S.E3)().realTimePreview&&!V()&&e.prevButton&&!K())return(0,p.Id)(e.current),(0,o.Wf)(e).then((e=>e))},handleMaxDiffInput(t,n,r,i){if(!q(i))return null;const o=(0,l.w)(t,n,r);return F(e),H(o,i).then((e=>e))},async handleNextClick(){if((0,S.E3)().realTimePreview||K()||V()&&(0,o.YR)())return;(0,o.ye)(e,!0),await(0,j.a)(e);const{current:t}=e;if((0,p.GS)(t),"lottery"===t.type)(0,o.e0)(e,t),(0,o.ye)(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.qo)(o,e);if(a.valid&&(a=await(0,h.YZ)(i,r)),n=a.valid,n)return(0,S.e)(r,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,I.W_)(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,I.oj)(e.nodeUuid,t)));for(let e=i;e>=0;e--){const t=n[e];if(!(0,r.S)(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.Yp)(e,i),(0,S.e)(e,{current:t});const a=(0,M.k9)(e),s=a.indexOf(t),c=a.slice(s),u=[];let l=t.prev;for(const t of c){const{origin:n,loop:r,random:i,loopStack:o}=t,a=(0,f.e_)({target:n,loop:r,random:i,loopStack:o},e),s=await(0,f.o9)(a,l);l=s,u.push(s)}await(0,S.W4)().hook.beforeGotoNext(),(0,S.e)(e,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,r).concat(u)}),(0,o.ye)(e,!1),_.i.trigger("NEXT_OK"),(0,_.U3)(e.current,!0)}(e,i),(0,C.K8)(e),await(0,b.iq)(e),await(0,P.w)(e),i}(e),(0,o.ye)(e,!1);else if(await(0,o.KY)(e)){if(!V())return(0,o.I7)(e);(0,o.ID)(e)}else(0,o.ye)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,m.S_)(e,e.current);const r=await n.apply(e.handleEvents,t);return(0,m.S_)(e,e.current),r}}))}function V(){return(0,S.E3)().surveyState.refreshing}function K(){return(0,S.E3)().surveyState.nextLoading||V()}async function H(e,t){(0,D.kZ)(t)&&await(0,B.e)(t),(0,_.U3)(t),await(0,b.mi)(t);const n=t.parent;return(0,S.E3)().realTimePreview||(n.inSingleGroup?((0,S.e)(n,{current:t}),await(0,m.AD)(n,t,{type:"page_inner",delay:60})):G()),(0,_.oP)(t),e.result}function Y(e,t={}){return e=e||(0,S.E3)().surveyState,(0,S.e)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),Q(e)}async function Q(e){(0,o.ye)(e,!0);const t=e.nodeList,n=(0,r.q_)(t),a=await(0,i.kF)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,S.e)(e,{nextBtnText:t.nextBtnText||(0,k.GS)(O.CW.global.next),prevBtnText:t.prevBtnText||(0,k.GS)(O.CW.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.eO)(e,a,null);const{current:s}=e,c=(0,r.S)(s),u=(0,M.O2)(e);if(c||u){const t=u?"page_inner":"page_next";await(0,m.AD)(e,s,{type:t,initial:!0})}else(0,S.e)(e,{renderList:[s]}),await(0,P.w)(e),G();(0,C.K8)(e);const l=e.current;return l.reached=!0,(0,p.IU)(e,l),_.i.trigger("START_OK"),await(0,b.aC)(e),s!==l&&await(0,y.e)(e,{valid:!0,message:""},s,l),(0,_.U3)(e.current,!0),(0,o.ye)(e,!1),e}async function X(){const e=(0,S.W4)();if((0,S.E3)().surveyState)return(0,S.E3)().surveyState;const t=await async function(){const e=(0,S.E3)().sid,t=(0,S.E3)().startState;if(!t)return(0,S.W4)().app.gotoStartPage((0,R.uK)()),(0,S.E3)().customAbort(),null;if((0,S.E3)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:r,channel:i,interviewee:o}=n;!function(e,t){(0,S.W4)().dev.autoRun||(0,S.W4)().storage.get(e)&&t&&!(0,S.E3)().preview&&((0,S.E3)().error((0,k.GS)(O.CW.global.antiAgain)),(0,S.E3)().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,R.uK)()};try{const e=await(0,g._Y)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=r,t.channel=i,(0,S.W4)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,g.cA)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:r}=e;if(!(0,S.E3)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,g.kj)(e,{type:"GET"},!0)}catch(e){throw(0,S.E3)().error((0,k.GS)(O.CW.global.downloadError)),e}const r=await(0,N.K)(n);t.nodeList=(0,v.c5)(r.nodes,t.nodeGroups),t.uniquenessVerification=r.uniquenessVerification}(0,T.O_)(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(!W[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,g.kj)(e.url,{type:"GET"},!0);t=await(0,N.K)(n)}return t};W[e.locale]=t()}return W[e.locale]}(e);(0,T.w3)({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:c,surveyId:u,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:T,showLogoInEachPage:E,imageList:I,varStyles:C,variables:O,nodeGroups:N,embedApis:L}=e,{nodeList:R,surveyMeta:P,testCases:M,uniquenessVerification:U}=t;let W=!1;(0,A.U)()||P.collector&&(W=!1===P.collector.multiple_response);const{fakedServers:j,autoCpltGroups:B,noWxShare:D,previewShadowNodes:G,previewQuickAnswer:q,ignoreSubmittingResult:F,qNumberRequired:V,asterisksRequired:K,progressBarRequired:H,nodeTypeInfoRequired:Y,limitTime:Q,minTime:X,timeoutText:J,timeLessText:Z,resumeEnabled:$}=c,ee={embedApis:L,nodeGroups:N,variables:O,varStyles:C,imageList:I,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:T,showLogoInEachPage:E,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:G&&!(0,S.W4)().dev.autoRun,previewQuickAnswer:q,ignoreSubmittingResult:F,langResume:p,langTable:s,testCases:M,progress:0,resumeEnabled:$||(0,A.U)(),images:f,eventHub:_.i,language:d,sid:o,parsedPayload:t,digest:y,channel:w,transactionID:m,status:g,platform:v,fakedServers:j,autoCpltGroups:B,noWxShare:D,theme:r,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:h,summary:l,bonusLimitTime:"",nodeList:R,companyID:"",oneReplyPerTerminal:W,surveyId:u,qNumberRequired:V,asterisksRequired:K,progressBarRequired:H,nodeTypeInfoRequired:Y,preview:(0,S.E3)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:Q||void 0,minTime:X,timeoutText:J||"",timeLessText:Z||"",timer:-1,restTime:(0,a.KM)(Q),hasVar:i,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1,verifyUniquenessUri:P.verify_uniqueness_uri,uniquenessVerification:U};return z(ee),ee}(t);return(0,S.E3)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.e_)({target:t},e),r=await(0,h.qc)(n,!0);r.valid?e.initValidationPassed=!0:((0,S.E3)().error(r.message||(0,k.GS)(O.CW.verify.failed)),(0,S.E3)().customAbort())}(n),await async function(e){if(await Q(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.sH)(e),clearInterval(e.timer),(0,b.ig)(e),(0,S.E3)().error(e.timeoutText||(0,k.GS)(O.CW.global.timeOver))),(0,S.e)(e,{restTime:(0,a.KM)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,S.E3)().preview){const t=await(0,x.y)(e);(0,S.e)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,S.W4)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5170:(e,t,n)=>{"use strict";n.d(t,{_:()=>f});var r=n(568),i=n(9677),o=n(6784),a=n(7320),s=n(8856),c=n(6496),u=n(556);const l={};function d(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.E3)().notify((0,c.GS)(r.CW.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,u.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:u,validateType:l}=e,{transactionID:f}=t;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(r.CW.preview.noMessage)),!1;if(!u||!(0,i.KA)(u))return(0,s.E3)().notify((0,c.GS)(r.CW.fill.needPhoneNumber)),!1;const n=d(e.renderId);if(!n)return!1;p={...p,phone_num:u},e.messageGetFailed=!1;try{const r=await(0,a.eY)(p);e.serverValidations=r,t.phoneNumber=u,t.phoneUsed=r.phone_num_used,t.phoneUsed&&(0,o.U1)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.eY)(p);e.serverValidations=t,(0,s.e)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(r.CW.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,i.KA)(t))return(0,s.E3)().notify((0,c.GS)(r.CW.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.ae)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},1844:(e,t,n)=>{"use strict";n.d(t,{Core:()=>V,EventHub:()=>u.i,I18n:()=>K});var r=n(8856),i=(n(1088),n(9952),n(3001)),o=n(3552),a=n(7556),s=n(5776),c=n(9376),u=n(6348),l=n(6496),d=n(6784),f=n(7828),p=n(568),h=n(2392),m=n(4872),g=n(7320),v=n(7404),y=n(4072),w=n(1304),_=n(3004),b=n(6276),x=n(4404),S=n(1372),k=n(5032),T=n(9200);let E;function I(e){return(0,v.uK)().offline_survey_id&&(0,s.q_)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.G)(e.icon)}))})),e}function C(e){e.handleEvents={async handleLangChange(t){await(0,l.Sk)(t.locale,!1)||(0,r.e)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,w.ye)(e,!0),await(0,r.E3)().fetchSurveyState(),(0,r.W4)().app.gotoSurveyPage((0,v.uK)()),(0,w.ye)(e,!1))}}}async function O(){if((0,r.E3)().startState)return(0,r.E3)().startState;const e=await async function(){const e=await(0,r.W4)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,r.E3)().sid;return(0,d.U7)(),E||(0,g.qU)(e)}}();!function(e){if((0,r.E3)().preview)return void(E=e);if(E)return;E=e;const{collector:{channel_configs:t}}=e,n=(0,r.W4)().name,i=t.find((e=>e.type===n));if(i){if(!i.allow_response)throw(0,r.E3)().error((0,g.O)(g.FW.interviewee_invalid_error)),new Error(g.FW.interviewee_invalid_error);E.channel=i,(0,r.W4)().auth.authorize(E)}else E.channel={type:n}}(e),await(0,r.W4)().auth.init(e);const t=await async function(e){const t=await(0,r.W4)().dev.getCustomSurveyPayload();if(t)return{cfpd:t,surveyMeta:e};{let t;try{t=await(e.start_auto?(0,g.kj)(e.diagram_url,{type:"GET"},!0):(0,g.kj)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,r.E3)().error((0,l.GS)(p.CW.global.downloadError)),e}const n=await(0,m.K)(t);return function(e){if(!e.version)return(0,r.E3)().error((0,l.GS)(p.CW.global.upgrade)),void(0,r.E3)().customAbort();e.version<2&&e.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,b.yy)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(n),{surveyMeta:e,cfpd:I(n)}}}(e),n=await async function(e){var t;const{surveyMeta:n,cfpd:i}=e,{mediaLibrary:o,surveyId:c,disabledLangs:u,testCases:d,variables:p}=i,h=(0,a.c5)(i.nodes,i.nodeGroups),m=(0,s.q_)(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===T.c||void 0===T.c?void 0:T.c.langTable)&&void 0!==t?t:[]).filter((e=>y.includes(e.locale)&&!(null==u?void 0:u.includes(e.locale)))),_=await(0,l.Mh)(w,v),b=!!(0,r.W4)().storage.get("lang-resume");b&&(0,r.W4)().storage.remove("lang-resume"),(0,l.YP)(_);const x={imageList:o.imageList,videoList:o.videoList,nodeList:h,theme:i.theme,nodeGroups:i.nodeGroups||[],variables:(0,a.SA)(i.variables),surveyMeta:E,embedApis:i.embedApis||[],varStyles:i.varStyles,surveyId:c,langs:g,language:_,langTable:w,langResume:b,testCases:d,disabledLangs:u||[],publishedAt:n.published_at,presetRichStyles:i.presetRichStyles,uniquenessVerification:i.uniquenessVerification};return _===v||(m.i18n&&(0,f.QJ)(m,m.i18n[_]),p.forEach((e=>{e.i18n&&(0,f.gz)(e,e.i18n[_])}))),x}(t),v=await async function(e){if((0,r.E3)().startState)return(0,r.E3)().startState;const{imageList:t,nodeList:n,theme:i,variables:o,varStyles:a,surveyId:d,langResume:f,nodeGroups:h}=e,m=(0,s.q_)(n),{imgScale:g,imgTransType:v,imgTransTime:w,imgPosition:_,welcomeUrl:b,startAuto:k,noWxShare:T,startBtnText:I,hasVar:O,layout:N,showInitLangSelect:L}=m;(0,S.a)(e.presetRichStyles);const R={imageList:t,variables:o,varStyles:a};(0,y.YV)(R);const A=await(0,c.Q9)({},{origin:m}),{interviewee:P}=E,M=P?P.raw_data:(0,r.W4)().auth.userInfo||{},U={...R,embedApis:e.embedApis,nodeGroups:h,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:f,langTable:e.langTable,eventHub:u.i,language:e.language||"en_us",layout:N,startNode:m,sid:(0,r.E3)().sid,noWxShare:T,preview:(0,r.E3)().preview,images:A,surveyId:d,...(0,x.Y)(m),nextButton:I||(0,l.GS)(p.CW.global.start),theme:i.usingTheme,imgScale:g,imgPosition:_,imgTransType:v,imgTransTime:w,welcomeUrl:b,userInfo:M,hasVar:O,parsedPayload:e,startAuto:k||f,showInitLangSelect:(0,l.Mt)(L,e.langTable)};return C(U),U}(n);return await async function(e){const t={state:e},{origin:n}=e,{startName:r,qsnrName:a,questionText:s,describe:c,template:l}=n;e.title=await(0,i.qQ)((0,o.q)(r||a),t),e.summary=await(0,i.qQ)(s,t),e.description=await(0,i.qQ)(c,t),e.template=await(0,k.m)(l,t.state),(0,h.y)(e.theme),(0,u.U3)({origin:n})}(v),await(0,r.W4)().hook.afterFetchStart(v),(v.startAuto||(0,r.W4)().dev.autoRun)&&(v.hidden=!0,(0,r.E3)().startState=v,await v.handleEvents.handleNextClick()),v}var N=n(9948),L=n(1428),R=(n(7768),n(2352));async function A(){return null}const P={name:"other",dev:{parseRealUrl:e=>e,getCustomSurveyPayload:A,getCustomSurveyMeta:A,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,v.SC)(e);return(0,v.Ww)("https:/live.choiceform.com/reward",t)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:A,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:A,afterFetchStart:A,afterFetchSurvey:A,afterSetup:A,beforeSetupEnd:A,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:A,onEndSurvey:A,onRestartSurvey:A,onResumeSurvey:A,onStartNewSurvey:A,beforeGotoNext:A},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.At)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,R.Wo)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:A,loadUiEntryTemplates:A,setPresetStyle(){}}};function M(e,t){Object.keys(t).forEach((n=>{const r=t[n];"object"==typeof r?e[n]?null!==r&&M(e[n],r):e[n]=r:void 0!==r&&(e[n]=r)}))}function U(e){return M(P,e),P}var W=n(560);const j={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 B=n(1344),D=n(1548),G=n(4676),q=n(4316),F=n(8792);function z(){if(!V.initialized)throw new Error("CCCore not yet initialized")}const V={releaseVersion:"3.6.75",releaseDate:"2024-8-30",cfpd:T.c,eventHub:u.i,notifySuspended:!1,theme:(0,h.U)(),util:{convertVarStyle:y.UJ,getTaskInfo:D.S,getAnswer:G.cA,addStartStateDynamics(e){C(e)},addSurveyStateDynamics(e){(0,N.Gg)(e)},addNodeDynamics(e){(0,s.CY)(e)},addOptionDynamics(e){(0,q.yt)(e)},extendImageListGetter(e){(0,y.sf)(e)},loadFakeServers:e=>(0,F.U)(e,!1)},registerEnv(e){const t=U(e);(0,r.oB)(t),V.env=t},async setup(e){if(V.initialized)return V;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(V,function(e){const t={...j.hostConfig,...e.hostConfig};return Object.assign(j,{...e,hostConfig:t}),j}(e));const t=(0,v.uK)(),n=t.sid;if(!n&&!(0,r.W4)().dev.realtime)throw new Error("setup error, must provide sid");V.sid=n,V.realTimePreview=(0,r.W4)().dev.realtime;const i=t.type;V.preview=V.realTimePreview||V.sid.length>30||"edit_template"===i||"preview_template"===i,V.preview?V.needPreviewFlag="1"!==t.ban_preview_bar:V.offlineTaskId=t.offline_task_id;const o=V.setTheme;V.setTheme=e=>{o(e),V.themeUpdated=!0,u.i.trigger("SET_PROPS")},(0,p.qq)(V.langSrcMap);const a=V.customAbort;V.customAbort=()=>{throw a&&a(),V.notifySuspended=!0,setTimeout((()=>{V.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=V.error;V.error=e=>{V.startState||V.rewardState||V.setTheme((0,h.U)()),s(e),V.crashed=!0};const c=V.notify;V.notify=(e,t)=>{V.notifySuspended||(V.startState||V.rewardState||V.setTheme((0,h.U)()),c(e,t))},(0,r.W4)().dev.debug&&(V.hostConfig.host="https://osapi.choiceform.com",V.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",V.hostConfig.mediaHost="https://media.choiceform.com"),t.offline_survey_id&&(V.hostConfig.cdnHost=(0,_.G)(V.hostConfig.cdnHost),V.hostConfig.mediaHost=(0,_.G)(V.hostConfig.mediaHost)),V.hostConfig.qApiHost=V.hostConfig.host+"/q/v1",await(0,r.W4)().hook.beforeSetupEnd(V),(0,r.oV)(V),V.initialized=!0,await(0,r.W4)().hook.afterSetup(V),await(0,r.W4)().hook.beforeSetupEnd(V);const d=await(0,l.Mh)(T.c.langTable,"zh_cn");return(0,p.Ki)(d),V},async fetchStartState(){z();const e=await O();return e&&(e.core=V,V.startState=e,(0,r.W4)().hook.onTitleChange(e.title),u.i.trigger("SET_PROPS")),e},async fetchSurveyState(){z(),V.startState&&(0,w.ye)(V.startState,!0);const e=await(0,N.q0)();return e&&(e.core=V,V.surveyState=e,(0,w.ye)(V.startState,!1),(0,r.W4)().hook.onTitleChange(e.title),u.i.trigger("SET_PROPS")),e},async fetchRewardState(){z();const e=await(0,L.uO)();return e&&(e.core=V,V.rewardState=e,(0,r.W4)().hook.onTitleChange(e.quesTitle),u.i.trigger("SET_PROPS")),e},reset(){V.offlineTaskId="",V.initialized=!1,E=null,V.startState=null,V.surveyState=null,(0,L.oD)(),V.rewardState=null,(0,v.gh)(),(0,W.S)(),(0,B.IN)()}},K={mergeLangSrcMap:p.qq,getLangSrcMap:p.Y1}},3120:(e,t,n)=>{"use strict";n.d(t,{CI:()=>d,Mx:()=>u,UR:()=>l,WW:()=>s,WY:()=>a,cX:()=>c,eQ:()=>f,wJ:()=>p}),n(7768),n(9952);var r=n(2352),i=n(4060),o=n(3001);function a(e,t){return(0,r.oV)(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.oV)(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 c(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function u(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.wx)(n,r),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,r.oV)(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.E3)(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))}},1488:(e,t,n)=>{"use strict";n.d(t,{A9:()=>m,EP:()=>d,EZ:()=>_,Ep:()=>g,hS:()=>f,sh:()=>v,uc:()=>p}),n(7768),n(9624);var r=n(4708),i=n(556),o=n(9677),a=n(3120),s=n(7320);let c=null;async function u(e,t){let{start:n,end:r}=await(0,o._u)(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.eQ)(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.wJ)(i);return{value:(0,a.CI)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+g(1e9,9999999999)}function h(e){return c[e]||Math.random().toString().replace("0.","")}async function m(){return c||(c=await(0,s.kj)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function g(e=0,t=10,n=0){const r=Math.pow(10,n);return e*=r,t*=r,((0,i.ai)(e,t)/r).toString()}function v(e,t=1,n=10){const r=Math.min(1e4,n);let o=h(e);for(;o.length<r;)o+=h(e);const a=o.length,s=(0,i.ai)(r,a),c=s-(0,i.ai)(t,r),u=o.substring(c,s);return""===u.trim()?v(e,t,r):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let r=(0,i.ai)(e,t).toString();return n>1&&(r=r+" "+(0,i.ai)(1,12)),n>2&&(r=r+" "+(0,i.ai)(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.jJ)(e,t),s=(0,i.ai)(a,o)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e.name,u)))),(0,i.my)(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 u(e,t);return d((()=>i&&0!==i.length?1===i.length?v(i[0],o,a):2===i.length&&i.includes("number")?v(i.includes("chinese")?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",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 u(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.Av)(1,6)+"@"+(0,i.Av)(1,6)+"."+(0,i.Av)(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 u(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 u(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.jJ)(e,t),s=(0,i.ai)(a||1,o||1)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e,u)))),(0,i.my)(n,s).join(","))},w.none=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>v("zh_cn"===t.parent.language?"chinese":"alphabet",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.Av)(1,3)+"."+(0,i.Av)(1,6)+"."+(0,i.Av)(1,3)).toLowerCase()),r)}},8360:(e,t,n)=>{"use strict";n.d(t,{G:()=>D,E:()=>B}),n(5960),n(9952);var r=n(5776),i=n(556),o=n(4708),a=n(1488),s=n(3001),c=n(8856),u=n(9948),l=n(3120),d=n(2352),f=n(3244),p=n(6276);async function h(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.UR)(e,t),(0,c.e)(e,n)}async function m(e,t){(0,c.e)(e,{selected:!1}),e.option.origin&&await(0,l.UR)(e.option,t),e.list&&e.list.forEach((e=>m(e,t)))}async function g(e){(0,p._O)(e)&&(0,c.e)(e.video,{ended:!0});let t=[];(0,p.G6)(e)&&(t=[...t,...e.options]),(0,p.IN)(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(1768);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=I((0,o.wR)(e),1)[0];if(!t||t.isOtherOpt)return null;const n=t.origin.inferList.some((e=>e.active));return n?t:null}(e);if(r){const e=r.text.split("-");return{address:e,indexes:(0,f.Cm)(e,t),point:{lat:r.origin.latitude,lng:r.origin.longitude}}}{const e=(0,i.ec)(t.length);let r=(0,d.Wo)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,i.ec)(o.cities.length),t=o.cities[e];if(a[1]=t.name,r=r+" "+e,"city"!==n){const e=(0,i.ec)(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.hS)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:r}=e,o=(0,i.my)(r,1)[0];return"record_audio"===o?y.audio:y[o]}async function x(e,t){const n=[],r=[];e.forEach((e=>{if((0,o.yg)(e.origin))n.push(e);else{let t=!0;(0,v.I9)(e.origin)&&(0,d.oV)(e.origin.inferList)&&(t=Math.random()>.9),t&&r.push(e)}})),await C(r,t,1);const a=(0,i.ai)(1,n.length);T(n,t,a)}async function S(e,t){const{parent:n,origin:r}=t;let o=await(0,s.W0)(r.fillMin,{state:n});o=o||0;let a=e.length;o&&r.inputInferLimit>o&&r.inputInferLimit<a&&(a=r.inputInferLimit);const c=o?(0,i.ai)(o,a):a;return(0,i.my)(e,c)}async function k(e,t){e.parent.context.option=t;const n=await(0,a.EZ)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function T(e,t,n){(0,i.my)(e,n).forEach((e=>k(t,e)))}async function E(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return k(e,t)}function I(e,t){const n=(0,l.Mx)(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.WW)(o,t);{let n=e.filter((e=>!e.disabled));return r.length>0&&(n=e.filter((e=>!r.includes(e)))),(0,i.my)(n,t)}}async function C(e,t,n){const r=I(e,n).sort(((e,t)=>(0,v.I9)(e.origin)?1:(0,v.e4)(e.origin,t.origin)));for(const e of r)await E(t,e)}async function O(e,t){const{multiple:n,min:r,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.cX)(e);return n.length>0?(0,l.WY)(n,t):(0,i.my)(e,t)}(a,n?(0,i.ai)(r||1,o||1):1);for(const n of s){const r=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(r,e,t),await O(n,t)}}async function N(e){const t=(0,o.wR)(e),n=e.origin;let a=1;if((0,r._A)(n)){const t=await(0,r.EH)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,i.ai)(o||1,s)}const s=[],c=[];t.forEach((e=>{(0,o.yg)(e.origin)?c.push(e):s.push(e)})),await C(s,e,a);const u=(0,i.ai)(1,c.length);T(c,e,u)}function L(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function R(e,t,n){const r=[];for(let i=e;i<t;i+=n)r.push(i);return r.push(t),r}async function A(e,t,n){const r=[...n].sort(),{value:o,antis:s}=await(0,a.hS)(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.my)(n,1)[0];return(0,a.EP)(e,s)}}function P(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function M(e,t,n){const[r,o]=e.split("_");let a,s;if(r.includes("~")){const[e,t]=P(r);a=(0,i.ai)(e,t)}else a=Math.min(Math.max(Number(r),0),t);if(o.includes("~")){const[e,t]=P(o);s=(0,i.ai)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function U(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]=P(i);a=e<=n&&n<=t}else a=Number(i)===n;if(o.includes("~")){const[e,t]=P(o);s=e<=r&&r<=t}else s=Number(o)===r;return a&&s}async function W(e,t){const{value:n,antis:r}=await(0,a.hS)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:M(n,s,o);{const e=()=>(0,i.ec)(s)+"_"+(0,i.ec)(o);return M(await(0,a.EP)(e,r,U),s,o)}}function j(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.wJ)(t.candidates),r=(0,l.CI)(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.my)(n,1)[0];r&&(0,c.e)(r,{sortNo:e,selected:!0})}async function B(e){return await(0,a.A9)(),D(e)}async function D(e,t){const{type:n,readonly:r}=e;if(r)return(0,u.Y1)();await g(e),t&&t.beforeInfer&&await t.beforeInfer(e);const i=w[n]||N;await i(e),t&&t.afterInfer&&await t.afterInfer(e)}w.select=N,w.value_mark=async e=>{const{options:t,otherOptions:n}=e,r=await S(t,e);for(const t of r){const n=t.minValue||1,r=t.maxValue||5,i=t.step,o=await A(t,e,R(n,r,i).map((e=>(0,d.Wo)(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 W(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 S(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 A(t,e,L(r,i).map((e=>(0,d.Wo)(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 S(t,e),o=n.map((e=>e.value));for(const t of i){const n=await A(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.eQ)(r,e),o=(0,l.wJ)(i),a=(0,l.CI)(o,1),c=Number(a[0].text);s.push(c),t-=c}const c=(0,i.Sq)(t,a.length),u=s.concat(c),d=o.concat(a);for(const[t,n]of d.entries()){const r=u[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 S(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;)j(i,t),i+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await x(n,e),(0,u.Y1)()},w.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await O(t,e),x(n,e)},w.describe=async()=>{(0,u.Y1)()},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.my)(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.my)(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.YP)(e,e.parent),s=(0,i.ai)(o||1,a),c=(0,i.my)(t,s);for(const t of c)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.Ep)(0,90)),lng:n.lng||Number((0,a.Ep)(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:c}=await(0,r.EH)(e,e.parent);if((0,r.cd)(a))await C(t,e,1);else if((0,r.cx)(a)){let t=n;const r=n[0].list.length;n.length>r&&(t=(0,i.my)(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 C(t,e,1);const r=n.list.findIndex((e=>e.selected));o.push(r)}}else if((0,r.ct)(a)||(0,r.gd)(a))for(const t of n)await C(t.list,e,1);else if((0,r.KC)(a)||(0,r.S2)(a))for(const t of n){const n=(0,i.ai)(s||1,c);await C(t.list,e,n)}else if((0,r.Un)(a)){const n=(0,i.ai)(s||1,c);await C(t,e,n)}await x(o,e)},w.end=async()=>{},w.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.uc)(),code:(0,a.sh)("number")},e)},8792:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,e:()=>c}),n(7768),n(9952);var r=n(8856);const i=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,r.W4)().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.W4)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",i.push(e)};a[e]=n()}return a[e]}async function c(e){const t=(0,r.W4)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function u(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,r.E3)().preview)return[];const{parsedPayload:{surveyMeta:{collector:{sampler_config:t}}}}=e;return t?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,n)=>{const r=t[n];if(r&&0===r.indexOf("FAKE:")){const t=r.substring(5,r.lastIndexOf("/"));e.includes(t)||e.push(t)}return e}),[]):[]}(e));if(n=n.filter((e=>!i.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},4732:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});const r={actions:[]};function i(e){r.actions.push(e)}},6784:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>R,GS:()=>L,IU:()=>X,Id:()=>O,ML:()=>G,Oo:()=>C,Q3:()=>q,Sg:()=>M,U1:()=>b,U3:()=>V,U7:()=>Q,Ux:()=>k,W2:()=>A,Wy:()=>J,YZ:()=>z,aS:()=>N,cR:()=>D,eK:()=>K,kB:()=>U,kr:()=>W,kv:()=>B,mT:()=>H,mU:()=>x,m_:()=>I,me:()=>S,ms:()=>P,sH:()=>j,ui:()=>T,we:()=>E,y:()=>F}),n(1088);var r=n(1884),i=n(3080),o=n(556),a=n(3001),s=n(5616),c=n(7320),u=n(4708),l=n(8856),d=n(7404),f=n(6276);let p=[];const h=1e4;let m=-1;function g(){const{dev:{local:e}}=(0,l.W4)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:r}}=(0,l.E3)();return!(e||t||n||!r)}function v(e,t=!1){if((0,s.K)()&&(!t||"start"===e.type))return;e.description=(0,a.Qr)(e.description);const n=e.description;if(g()){const r=p[p.length-1];r&&(n.includes(r.description)||r.description.includes(n))&&p.pop(),p.push(e),t&&y()}}function y(){if(g()){if(clearTimeout(m),p.length>0){const e=p;p=[];const t=(0,l.E3)().hostConfig.recordUrl;(0,c.SY)(t,{type:"POST",data:{records:e}})}m=setTimeout(y,h)}}function w(e,t,n,r,i){var o,a,s;const{surveyId:c,transactionID:u,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.W4)().name)),"start"===r&&(m=JSON.stringify((0,d.uK)())),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:c,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:u,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 _(e){const t=(0,f.kZ)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.Qr)(n)}function b(e,t){(0,l.W4)().dev.infer||v(w(null,t,e,"used_phone","在题目:".concat(_(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function x(e,t){(0,l.W4)().dev.infer||v(w(null,t,e,"verify_fail","在题目:".concat(_(t),"高级验证失败")))}function S(e,t){if((0,l.W4)().dev.infer)return;const{type:n,parent:r}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.wR)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const r=e.selected;if(o=r?"select":"deselect",s=r?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,i.oB)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)c="[".concat(e.text,"]");else{const t=e;c="[".concat((0,a.Qr)(t.optionX.text)," ").concat((0,a.Qr)(t.optionX.text),"]")}else c="[".concat((0,a.Qr)(e.text),"]")}const d="在题目:".concat(_(t),"中").concat(s,"选项:").concat(c);v(w(e,t,r,o,d))}function k(e,t,n){if((0,l.W4)().dev.infer)return;const r="在题目:".concat(_(n),"的选项:[").concat((0,a.Qr)(t.text),"]中输入自动填充触发文字:").concat(e);v(w(t,n,n.parent,"auto_complete",r))}function T(e,t,n){if((0,l.W4)().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"),v(w(t,n,r,o,"在题目:".concat(_(n),"的选项:[").concat((0,a.Qr)(t.text),"]中").concat(i)))}function E(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,r=t.options[e];r&&(-1===r.sortNo?v(w(r,t,n,"cancel_sort","在题目:".concat(_(t),"中取消了对选项:[").concat((0,a.Qr)(r.text),"]的排序"))):v(w(r,t,n,"sort","在题目:".concat(_(t),"中将选项:[").concat((0,a.Qr)(r.text),"]排序到第").concat(r.sortNo,"位"))))}function I(e){if((0,l.W4)().dev.infer)return;const t="在题目:".concat(_(e),"中 定位失败");v(w(null,e,e.parent,"locate_failed",t))}function C(e,t){if((0,l.W4)().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))}}v(w(null,t,n,o,"在题目:".concat(_(t),"中").concat(a)))}function O(e){(0,l.W4)().dev.infer||v(w(null,e,e.parent,"prev","在题目:".concat(_(e),"中点击上一题")))}function N(e,t){(0,l.W4)().dev.infer||v(w(null,t,e.parent,"prev","返回到题目: ".concat(_(t),",由题目:").concat(_(e),"后退而来")))}function L(e){(0,l.W4)().dev.infer||v(w(null,e,e.parent,"next","在题目:".concat(_(e),"中点击下一题")))}function R(e,t){(0,l.W4)().dev.infer||v(w(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(_(t),",由题目:").concat(_(e),"前进而来"):"进入题目: ".concat(_(t),",由题目:").concat(_(e),"前进而来")))}function A(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,n,"check_fail","从".concat(_(e),"走向甄别失败")),!0)}function P(e,t){(0,l.W4)().dev.infer||v(w(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function M(e,t){(0,l.W4)().dev.infer||v(w(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function U(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"time_less","答题时间太少被排除"),!0)}function W(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function j(e){(0,l.W4)().dev.infer||v(w(null,e.current,e,"time_over","答题超时未完成"),!0)}function B(e,t,n,r){(0,l.W4)().dev.infer||v(w(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(r))),!0)}function D(e,t,n=!1){(0,l.W4)().dev.infer||v(w(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function G(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"gift","领奖"),!0)}function q(e,t,n,r,i){(0,l.W4)().dev.infer||v(w(t,n,e,"auto_input","在题目:".concat(_(n),"中自动填充选项:[").concat(r,"],期待值:[").concat(i,"]")))}function F(e,t,n,r="成功"){(0,l.W4)().dev.infer||v(w(null,n,e,"auto_skip","在题目:".concat(_(n),"中尝试自动选中选项:[").concat((0,a.Qr)(t.text),"]").concat(r)))}function z(e,t,n){if((0,l.W4)().dev.infer)return;const r="自动跳过题目:".concat(_(t)," by ").concat(n);"logic"!==t.type&&"uniqueness_verification"!==t.type&&v(w(null,t,e,"auto_skip",r))}function V(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,e,"auto_skip","自动跳过题目:".concat(_(t)," by ").concat(n)+" logicResult:".concat(t.logicResult)))}function K(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,e,"auto_skip","自动跳过题目:".concat(_(t)," by ").concat(n)+" does verification passed:".concat(t.verificationResult)))}function H(e,t,n){(0,l.W4)().dev.infer||v(w(null,n,e,"opt_display","在题目:".concat(_(n),"中显示选项:[").concat((0,a.Qr)(t.text),"]")))}function Y(){const e="browser_uuid";let t=(0,l.W4)().storage.get(e);return t||(t=(0,o.YF)(),(0,l.W4)().storage.set(e,t)),t}function Q(){if((0,l.W4)().dev.infer)return;const e=(0,d.uK)();e.code&&e.state||v({type:"enter",collector_code:(0,l.E3)().sid,browser_uuid:Y(),recorded_at:(0,r.kF)(),description:"来自"+(0,l.W4)().system.getReferer()},!0)}function X(e,t){if((0,l.W4)().dev.infer)return;let n="开始答题,进入到题目: ".concat(_(t)," ");const{browser:r,device:i,engine:o,os:a}=(0,l.W4)().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=w(null,t,e,"start",n);s.browser_uuid=Y(),s.collector_code=(0,l.E3)().sid,v(s,!0)}function J(e,t){(0,l.W4)().dev.infer||v(w(null,null,e,"resume","开始断点续答:"+t),!0)}},5667:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(8856),i=n(8792);let o=!1;async function a(e){const{url:t,data:n,silent:a,responseId:s}=e,c=t+JSON.stringify(n),u=await(0,i.e)(t);if(!u){const e="FAKE NOT FOUND:".concat(t);throw(0,r.E3)().error(e),new Error(e+(s?" responseId is: ".concat(s):""))}let l=null;try{if(l=await u(n,(0,r.E3)()),l.exception)throw l.exception}catch(e){if(!(0,r.E3)().realTimePreview){const t="FAKE ERROR:".concat(c," ").concat(e.stack&&e.stack.split("\n")[0]);throw a||(0,r.E3)().error(t),new Error(t+(s?" responseId is: ".concat(s):""))}l={result:""}}return o&&console.info(n,l),o&&console.info(JSON.stringify(n),JSON.stringify(l)),l}},7320:(e,t,n)=>{"use strict";n.d(t,{FW:()=>u,G8:()=>I,I1:()=>k,KY:()=>_,Kk:()=>f,MT:()=>T,O:()=>C,SC:()=>h,SY:()=>v,_K:()=>x,_Y:()=>w,aS:()=>l,ae:()=>E,cA:()=>m,eI:()=>b,eY:()=>S,kj:()=>g,qU:()=>y,qs:()=>p});var r=n(7404),i=n(6496),o=n(8856),a=n(568),s=n(4732);let c="";const u={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.W4)().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.E3)().error((0,i.GS)(a.CW.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!==c&&t){if(l[t])return;u[t]?(0,o.E3)().error(C(t)):(0,o.E3)().notify(C(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.E3)().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.E3)().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.uK)(),n=t.type;let i=(0,o.E3)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?i=(0,o.E3)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(i=(0,o.E3)().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.W4)().auth.retrieveAuthSurveyMeta();return t||v((0,o.E3)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw p(e),e}))}function w(e){const t=(0,o.E3)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,v(t,{type:"POST",data:e},!0).then((e=>(c="",e))).catch((n=>{throw(0,o.E3)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),c="",n}))}function _(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function b(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function S(e){if((0,o.E3)().preview)return(0,o.E3)().notify((0,i.GS)(a.CW.preview.noMessage)),{};const t=(0,o.E3)().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.E3)().notify((0,i.GS)(a.CW.verify.sendSuccess)),n}async function k(e,t){return(0,o.E3)().preview?((0,o.E3)().notify((0,i.GS)(a.CW.preview.noMessage)),{}):v((0,o.E3)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function T(e,t){const n=(0,o.W4)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const r=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",i=await g(r,{type:"POST",data:e},!1);return(0,o.W4)().storage.set("gift-"+e.code,JSON.stringify(i)),i}async function E(e,t){if((0,o.E3)().preview)return{};const n=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.E3)().notify((0,i.GS)(a.CW.verify.sendSuccess)),t}catch(e){throw(0,o.E3)().notify((0,i.GS)(a.CW.verify.sendFailed)),e}}async function I(e){(0,s.y)(e);const{preview:t}=(0,o.E3)(),{dev:{autoRun:n,infer:r}}=(0,o.W4)();return t||n||r?null:g((0,o.E3)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function C(e){return(0,i.GS)(a.CW.backEnd[e])||e}},3004:(e,t,n)=>{"use strict";n.d(t,{G:()=>i,U:()=>o}),n(7768);var r=n(7404);function i(e){const t=(0,r.uK)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,r.uK)().offline_survey_id}},6072:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>h,g5:()=>f,eU:()=>p});var r=n(6620),i=n(3001),o=n(6348),a=n(8856),s=(n(7768),n(3684));var c=n(5667),u=n(7320);let l=!1;const d={valid:!0,message:"",result:""};async function f({state:e,request:t,customParam:n,silent:o,shouldCombineSystem:f=!0}){const{method:p,embedId:h}=t,m="embed"===p,g="fake"===p;if((0,a.E3)().realTimePreview&&!m&&!g||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...d};const v=await(0,i.Oj)(t.url,{state:e}),y=await(0,r.aI)(e,t.params,f);n&&Object.keys(n).forEach((e=>{n[e]&&(y[e]=n[e])}));let w=null;if(m)w=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.y)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(t,r);let c;try{c=await o(n,(0,a.E3)())}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.E3)().error(n),new Error(n+(i?" responseId is: ".concat(i):""))}return c}({embedId:h,data:y,embedApis:e.embedApis,responseId:null==e?void 0:e.transactionID});else if("fake"===p)w=await(0,c.E)({url:v,data:y,silent:o,responseId:null==e?void 0:e.transactionID});else{let t="GET";"post"===p&&(t="POST");let n=null;try{n=await(0,u.Kk)((0,a.W4)().dev.parseRealUrl(v),{type:t,data:y,contentType:"application/json"},!1)}catch(n){const r="REAL ERROR:".concat(t," ").concat(v," ").concat(JSON.stringify(n));o||(0,a.E3)().error(r);const i=r+((null==e?void 0:e.transactionID)?" responseId is: ".concat(null==e?void 0:e.transactionID):"");throw new Error(i)}l&&console.info({...y,url:v},n),w=n}return w}async function p(e){const t=await f(e);return void 0===t.valid&&(t.valid=!!t.result),t.valid||t.message||(t.message="^_^"),t}async function h(e,t){try{const{request:n}=t.origin;n&&(await f({state:e,request:n,customParam:null,silent:!0}),e.endRequested=!0,o.i.trigger("END_REQ"))}catch(e){(0,a.E3)().uploadLog(e)}}},4708:(e,t,n)=>{"use strict";n.d(t,{C2:()=>b,GE:()=>y,IZ:()=>v,Ml:()=>S,Om:()=>l,W4:()=>f,Y5:()=>x,e$:()=>k,gr:()=>g,iQ:()=>d,jJ:()=>_,oz:()=>c,qY:()=>s,sf:()=>m,u6:()=>w,wR:()=>h,yg:()=>u}),n(9952);var r=n(984),i=n(556),o=n(6276),a=n(3001);function s(e,t){const n=e.loopStack,r=t.uuid;return(0,i.So)(r,n)}function c(e,t){return e.find((e=>(0,i.oj)(e.uuid,t)))}function u(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.QX)(n,e))).length}function f(e){return h(e).some((t=>(0,r.QX)(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.G6)(e)&&(t=(0,o.QB)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.IN)(e)&&(t=[...t,...e.otherOptions]),t}function m(e){let t=[];return(0,o.uo)(e)&&(t=[...t,...e.options]),(0,o.yy)(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.W0)(r.itemsMax,{state:n}),itemsMin:await(0,a.W0)(r.itemsMin,{state:n})}}function b(e){return e.passRef||{}}function x(e,t){const n=b(e);return e[t]||n[t]}function S(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+"%"}},1768:(e,t,n)=>{"use strict";n.d(t,{A9:()=>c,E5:()=>s,Gg:()=>f,I9:()=>o,IN:()=>u,e4:()=>a,u6:()=>l,uE:()=>d});var r=n(2352),i=n(4708);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 c(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))||u(e,t))}function u(e,t){return!(!e||!t||(0,r.oV)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!u(e.optionX,t.optionX)||t.yid!==e.yid)||u(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,i.gr)(e).forEach((e=>{const t=e.origin;(0,i.yg)(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&&c(t,e)))}},4196:(e,t,n)=>{"use strict";n.d(t,{GA:()=>f,cv:()=>d,gF:()=>h}),n(9952);var r=n(4708),i=n(6496),o=n(8856),a=n(568),s=n(2352),c=n(1768),u=n(4384),l=n(9536);function d(e,t,n,i){const a=n.list[t];(0,o.e)(a.option,{value:e});const s=i.options.find((e=>e.cascadePath===a.resultId));return(0,r.yg)(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 u.Az;const f=t.list.filter((e=>function(e){return e.selected&&!(0,r.yg)(e.option.origin)}(e))),{option:g}=d;if(f.includes(d))h(d,n);else{const e=(0,c.Gg)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.E3)().notify((0,i.GS)(a.CW.menu.limitMax,{text:t.text?(0,i.GS)(a.CW.menu.listItem)+t.text:(0,i.GS)(a.CW.menu.topList),max:(0,s.Wo)(t.max)})),u.Az}else t.list.forEach((e=>{e.selected&&h(e,n)}));e&&function(e,t,n){for(const t of n)(-1===e.option.origin.mutexNumber||-1===t.option.origin.mutexNumber||e.option.origin.mutexNumber&&t.option.origin.mutexNumber===e.option.origin.mutexNumber)&&p(t);t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.e)(t,{selected:!1})}))}(d,n,t.list.filter((e=>e.resultId!==d.resultId))),m(d,n)}return await(0,l.e)(g,n),u.ay}function p(e){(0,o.e)(e,{selected:!1}),(0,o.e)(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.e)(t,{selected:!1})}))}function m(e,t){(0,o.e)(e,{selected:!0}),(0,o.e)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.e)(t,{selected:!0})}))}},7688:(e,t,n)=>{"use strict";n.d(t,{o:()=>y});var r=n(4708),i=n(9968),o=n(5776),a=n(3001),s=n(556),c=n(8856),u=n(6496),l=n(568),d=n(9536),f=n(4384),p=n(6276);const h={};function m(e,t,n){t.forEach((t=>{(0,s.oj)(t.uuid,e.uuid)||t[n]!==e[n]||(0,c.e)(t,{selected:!1})}))}function g(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,c.e)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,c.e)(e,{selected:!1});else{(0,c.e)(e,{selected:!0});const i=(0,p.IN)(t)?t.otherOptions:[];g(e,n?i:(0,r.wR)(t))}return f.yK}async function y(e,t){const n=h[t.type];if(n){const r=await n(e,t);return r.noValidate||(0,i.c9)(t),await(0,d.e)(e,t),r}return f.Az}h.select=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const i=await(0,o._R)(t,e);return i.valid?((0,c.e)(e,{selected:!0}),(0,o.cd)(t.origin)&&g(e,(0,r.wR)(t)),f.yK):((0,c.E3)().notify(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:""),f.Az)},h.select_icon=h.select,h.select_image=h.select,h.matrix=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const i=await(0,o.IZ)(t,e);if(!i.valid)return(0,c.E3)().notify(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:""),f.Az;const{origin:a}=t;return(0,c.e)(e,{selected:!0}),(0,o.cd)(a)?g(e,(0,r.wR)(t)):(0,o.cx)(a)?(m(e,t.options,"yid"),m(e,t.options,"xid")):(0,o.ct)(a)?m(e,t.options,"yid"):(0,o.gd)(a)&&m(e,t.options,"xid"),f.yK},h.upload=async(e,t)=>{var n,r,i;if(e.isOtherOpt)return v(e,t,!0);{const{parent:o,fullUploaded:s,origin:d}=t;let p=await(0,a.W0)(d.maxUploadCount,{state:o});p=p||t.options.length;const h=e.value;if(s&&!h&&!e.origin.fillRequired)return(0,c.E3)().notify((0,u.GS)(l.CW.upload.amountLimitMax,{max:p})),f.Az;const m={onprogress(t){(0,c.e)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId,recordedAudioFile:null===(n=e.customData)||void 0===n?void 0:n.file},g=await(0,c.W4)().network.upload(m);return await(null===(i=(r=o.handleEvents).handleOptionInput)||void 0===i?void 0:i.call(r,g,e,t)),f.ay}},h.menu=h.select,h.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.yK),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.ay,h.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay},4556:(e,t,n)=>{"use strict";n.d(t,{I5:()=>h,Y5:()=>d,wf:()=>p});var r=n(9536),i=n(9968),o=n(5776),a=n(8856),s=n(4708);const c={refresh:!1,result:!0},u={refresh:!0,result:!0},l={};function d(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.e)(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?c:((0,a.e)(t,{value:n}),u)}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.c9)(n,t),await(0,r.e)(t,n),o}function h(e,t,n){t.atcpTrigger=e,(0,i.c9)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.e)(t,{value:e}),u),l.weight=async(e,t,n)=>{if(e===t.value)return c;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.e)(t,{value:e}),r.forEach((e=>{const t=Number(e.value);(0,a.e)(e,{percent:(0,s.e$)(t,i)})})),u},l.upload=async(e,t,n)=>(e||(await(0,a.W4)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,r.I)()),(0,a.e)(t,e),await(0,o.SY)(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)},3568:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});const r=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},3244:(e,t,n)=>{"use strict";n.d(t,{At:()=>o,Cm:()=>a,KQ:()=>i});var r=n(5548);function i(e,t){return e.find((e=>e.origin.radius>=(0,r.c)(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.includes(e))}))))||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];if(e[2]&&n){const t=n.areas.map((e=>e.name)).indexOf(e[1]);r+=""+t}}return r}},6764:(e,t,n)=>{"use strict";n.d(t,{sZ:()=>a,uE:()=>d,uQ:()=>l}),n(5960);var r=n(556),i=n(5776),o=n(6796);function a(e){const t=[];return e.forEach(((e,n)=>{const i=(0,r.ec)(n+1);t.splice(i,0,e)})),t}const s={};function c(e,t,n){let i=[];return i=n?u(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.ec)(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.ec)(t.length+1);t.splice(n,0,e)})),t}(e),i}function u(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:u}=r;if(!(0,i.Oi)(e))return t;if((0,o.ms)(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=c(t,a,u);return s[n]=r={},e.forEach(((e,t)=>{r[e.uuid]=t})),e}}return c(t,a,u)}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=u(t)),"row_loop"===r&&(n=u(n)),{optionsX:t,optionsY:n}}},4316:(e,t,n)=>{"use strict";n.d(t,{yt:()=>N,kd:()=>W,sV:()=>z,cV:()=>F,WG:()=>K,gk:()=>L,o9:()=>R,u_:()=>Y,wz:()=>j}),n(5960),n(7768),n(3656),n(4107),n(9896),n(6832),n(8252),n(7240),n(2288),n(5396),n(2480),n(7190),n(5036),n(4736),n(2520),n(9952);var r=n(6764),i=n(4708),o=n(5776),a=n(9376),s=n(6332),c=n(3001),u=n(4756),l=(n(9624),n(6784)),d=n(8856),f=n(2352);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.Wo)(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,c.W0)(h(e),{state:o});let s=String(a);return a>=n&&a<=r||(s=i),(0,d.e)(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.Q3)(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,c.E3)(h(e),{state:n});return(0,d.e)(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,c.W0)(h(e),{state:r});let o=i;return i>=1&&i<=n||(o=-1),(0,d.e)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:i}},n(2048);var y=n(4060),w=n(6276);async function _(e,t){const n=t.parent;n.context.option=e;const r=await async function(e,t){return!!t&&(0,y.wx)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!r}const b=["select","select_icon","select_image","menu","hot_spot","data"];var x=n(1344),S=n(6348);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.Ej)(n.parent,o,n);return o.disabled=!a,o}var T=n(1768),E=n(556),I=n(3080),C=n(9677);const O=["select","sequence","menu"];function N(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,T.I9)(this.origin)&&setTimeout((()=>{S.i.trigger("OPT_EXCLUDE",this)})),e?S.i.trigger("OPT_SELECT",this):S.i.trigger("OPT_DESELECT",this)}})}async function L(e,t,n){const{parent:r}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:W(t,e.type),value:"",renderId:(0,i.qY)(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,c.qQ)(t.text,{state:r,usage:{node:e,optionId:t.uuid}}),N(o),o.isOtherOpt&&(await A(o,e),(0,i.yg)(t)||await _(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.e)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.e)(e,{placeholder:e.text})}(o),await(0,a.Il)(o,r),o}async function R(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 A(e,t){return(0,d.e)(e,{inputType:W(e.origin,t.type)}),j(e,t)}const P=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],M=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],U=["select","menu","cascade"];function W(e,t){if(e.isOtherOpt){let t="select";return(0,i.yg)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return U.includes(t)?!0===e.useComment?"select-input":"select":P.includes(t)?"input":M.includes(t)?"select":void 0}async function j(e,t){if(!(0,w.cp)(e))return;const{origin:n}=e,r=e.origin.fillType;if(!r)return;const{parent:o}=t;let a,s,u,l=await(0,c.W0)(n.fillStart,{state:o}),f=await(0,c.W0)(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),u=await(0,x.$7)(t.parent.sid));let p=[];"list_select"===r&&(p=q((await(0,c.E3)(n.selectText,{state:o,joinBy:","})).split(",")));const h=await(0,i.jJ)(e,t),m=await(0,C._u)(e,t);(0,d.e)(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:u,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function B(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.uQ)(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&&F([...s.options,...s.otherOptions]),(0,d.e)(e,s)}const D={};async function G(e,t){return e.image?e.image:await(0,a.Md)(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 F(e){q(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function z(e){return e&&e.path?(0,d.E3)().hostConfig.mediaHost+e.path:""}function V(e){const t=z(e);return{normalIconUrl:t,activeIconUrl:K(t)}}function K(e){return e.replace("/outline/","/glyph/")}function H(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:V(t.icon)}async function Y(e,t){if((0,w.G6)(e)){await async function(e,t){const{origin:n}=e;let r={options:[]};if((0,E.is)(n,"matrix"===n.type)){const{options:i,refMaps:o,passRefs:c}=await(0,a.q0)(t,e.origin,"xid"),u=await R(e,i,c),l=await(0,s.s$)(t,u,e),{options:d,refMaps:f,passRefs:p}=await(0,a.q0)(t,e.origin,"yid"),h=await R(e,d,p),m=await(0,s.Ah)(t,h,e);(0,I.GO)(e,[...o,...f]);const g=await R(e,n.otherOptions,[]),v=await(0,s.is)(t,g,e);r={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.q0)(t,e.origin);let i=n.options;(0,w.IN)(e)&&(i=i.concat(e.origin.otherOptions));const o=await R(e,i,n.passRefs),c=await(0,s.is)(t,o,e),u=[],l=[];c.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):u.push(e)})),(0,I.GO)(e,n.refMaps),r={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.e)(e,r)}(e,t);const n=D[e.type];n&&await n(e),function(e){if((0,d.E3)().realTimePreview)return;if(!(0,w.G6)(e))return;let t;O.includes(e.type)?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.IN)(e)?e.otherOptions:[];b.includes(n)&&(i=[...i,...t]);const a=i.filter((e=>e.autoSelectMarked)).reverse();if((0,o._A)(e.origin))a.forEach((t=>{(0,d.e)(t,{selected:!0}),(0,l.y)(r,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.y)(r,t,e,"因冲突被终止")})),t&&((0,d.e)(t,{selected:!0}),(0,l.y)(r,t,e))}}(e),t.context.option=null}}D.select=e=>B(e,(async function(t){return await j(t,e),await _(t,e),t})),D.fill=e=>B(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await j(t,e),t.placeholder=(0,c.Qr)(t.text),await v(t,e),t})),D.value_mark=e=>B(e,(async function(t){const{parent:n,origin:r}=e;t.value="";const i=await(0,c.W0)(r.markMin,{state:n}),o=await(0,c.W0)(r.markMax,{state:n});return(0,d.e)(t,{minValue:i,step:r.markStep,maxValue:o,minValueText:r.minText,maxValueText:r.maxText}),await v(t,e),t})),D.icon_mark=e=>B(e,(async function(t){return t.value="",(0,d.e)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),D.sequence=async e=>{let t=!1;await B(e,(async n=>((0,d.e)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},D.matrix=async e=>{const t=(0,r.uE)(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,c.qQ)(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 u=[];for(const r of t.optionsY)u.push({origin:r.origin,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,height:r.origin.height,text:await(0,c.qQ)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const l=new Map;u.forEach(((e,t)=>{l.set(e,t)})),u.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 A(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:u.filter((e=>e.visible))},p=(0,o.ct)(i)||(0,o.KC)(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 c=await k(a,s,n,r);o.push(c),t.list.push(c)}i.push(t)}return{flatten:i,options:o,fullOptions:o}}(a,u,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,u,h.options);(0,d.e)(e,{...f,...h,...m})},D.select_image=e=>B(e,(async t=>(t.image=await G(t,e),await _(t,e),t))),D.upload=e=>B(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,u.A)(e.fileLimits),e))),D.menu=e=>B(e,(async t=>(await j(t,e),await _(t,e),t)),!0),D.select_icon=e=>B(e,(async t=>{const n={...t,...H(t)};return await _(n,e),n})),D.weight=e=>{const{parent:t}=e;return B(e,(async n=>{let r=await(0,c.W0)(n.origin.maxMark,{state:t});const i=await(0,o.iw)(e.origin,t);return(!r||r>i)&&(r=i),(0,d.e)(n,{percent:"0%",color:n.origin.color,maxValue:r,value:""}),await v(n,e),n}))},D.cascade=e=>B(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),D.data=async e=>{for(const t of e.options)await _(t,e)},D.hot_spot=async e=>await B(e,(async t=>{await j(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,E.YF)()}]}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.e)(t,{graphs:r,color:t.origin.color}),t})),D.heat_map=(e,t)=>B(e,(async function(e){return e})),D.max_diff=e=>B(e,(async function(t){return t.value="0",t.image=await G(t,e),t.records=[],t})),D.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.Ej)(e.parent,t,e)&&n.push(r)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...V(t),text:(0,c.gt)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),B(e,(async t=>((0,d.e)(t,{image:await G(t,e),value:""}),await v(t,e),t)))}},6332:(e,t,n)=>{"use strict";n.d(t,{Ah:()=>d,Ej:()=>s,Ud:()=>f,is:()=>c,s$:()=>l}),n(9952);var r=n(4060),i=n(4708),o=n(6784),a=n(4676);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.wx)(e,a);return i&&(0,o.mT)(e,t,n),e.context.option=null,i}return!0}async function c(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 u(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 u(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 u(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.Ci)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,i.IZ)(e):(0,i.wR)(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}},5776:(e,t,n)=>{"use strict";n.d(t,{AF:()=>v,CA:()=>j,CY:()=>g,EH:()=>A,IZ:()=>M,K6:()=>w,KC:()=>N,MR:()=>S,Oi:()=>_,S:()=>G,S2:()=>L,SY:()=>z,Un:()=>O,YJ:()=>b,YP:()=>R,_A:()=>k,_R:()=>U,cd:()=>T,ct:()=>E,cx:()=>C,gR:()=>x,gd:()=>I,iw:()=>F,j$:()=>D,o1:()=>W,q_:()=>y,uK:()=>q}),n(9952);var r=n(4708),i=n(556),o=n(3001),a=n(6496),s=n(8856),c=n(568),u=n(984),l=n(1768),d=n(4676),f=n(6788);const p={valid:!0,message:""},h=["region","location","area","describe","end","logic","uniqueness_verification","loop","lottery","verify"],m={};function g(e){(0,s.e)(e,{hasAnswer:(0,d.Qz)(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.oj)(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.So)(n,t)}function x(e,t){if(t)return e.find((e=>e.input&&(0,i.oj)(e.input.uuid,t)||e.loopEnd&&(0,i.oj)(e.loopEnd.uuid,t)))}function S(e,t,n){const r=t.find((e=>(0,i.oj)(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 T(e){return(0,i.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function E(e){return"single_row"===e.matrixSelect}function I(e){return"single_col"===e.matrixSelect}function C(e){return"single_row_col"===e.matrixSelect}function O(e){return k(e)&&"all"===e.multiType}function N(e){return k(e)&&"row"===e.multiType}function L(e){return k(e)&&"col"===e.multiType}async function R(e,t){const{origin:n}=e,r=!0===n.limitEnabled;let i=r?await(0,o.W0)(n.maxUploadCount,{state:t}):e.options.length,a=r?await(0,o.W0)(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 A(e,t){const{origin:n}=e;if(!k(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.W0)(a,{state:t}),u=await(0,o.W0)(s,{state:t});const d=(0,r.gr)(e).length;return(0,i.is)(e,"matrix"===e.type)||(c=(0,l.uE)(e,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const P=(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.GS)(c.CW.matrix.colLimitMax,{max:n}):(0,a.GS)(c.CW.matrix.rowLimitMax,{max:n}):(0,a.GS)(c.CW.select.limitMax,{max:n})),{valid:o,message:s}};async function M(e,t){if(!k(e.origin)||(0,l.I9)(t.origin)||!t.isOtherOpt&&((0,l.I9)(t.optionX.origin)||(0,l.I9)(t.optionY.origin)))return p;const n=O(e.origin);if(!n&&!(0,r.u6)(t))return p;const i=(0,r.wR)(e),{max:o}=await A(e,e.parent);return n?P(i,t,o):L(e.origin)?P(i,t,o,"xid"):N(e.origin)?P(i,t,o,"yid"):p}async function U(e,t){if(!k(e.origin))return p;const{max:n}=await A(e,e.parent),i=(0,r.wR)(e),o=!(i.filter((e=>e.selected)).length===n)||(0,l.Gg)(i,t);return{valid:o,message:o?"":(0,a.GS)(c.CW.select.limitMax,{max:n})}}function W(e,t){return e.find((e=>(0,i.oj)(e.nodeUuid,t)))}const j=["logic","random","loop","uniqueness_verification"],B=[...j,"data"];function D(e){(0,s.E3)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!B.includes(e.type)&&(e.readonly=!0)}function G(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.E3)().preview&&e.parent.previewShadowNodes&&!B.includes(e.type)}(e)?"":"setting";if((0,f.I)(e.nodeUuid))return"random_group";const t=(0,r.wR)(e);return!h.includes(e.type)&&t&&0===t.length?"no_options":""}function q(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,i.oj)(e.circleNode1Id,t.circleNode1Id)&&(0,i.oj)(e.circleNode2Id,t.circleNode2Id)}async function F(e,t){const{options:n}=e;let r=await(0,o.W0)(e.total,{state:t})||100,i=0;for(const e of n){const n=await(0,o.W0)(e.maxMark,{state:t});if(void 0===n){i=-1;break}i+=n}return i>0&&i<r&&(r=i),r}async function z(e){const{max:t}=await R(e,e.parent),n=t===e.options.filter((t=>(0,u.QX)(t,e))).length;(0,s.e)(e,{fullUploaded:n})}},908:(e,t,n)=>{"use strict";n.d(t,{S:()=>h,s:()=>p});var r=n(8084),i=n(4708),o=n(3244),a=n(5548),s=n(9968),c=n(8856),u=n(9536),l=n(4384);function d(e,t,n,r){e&&((0,c.e)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,c.e)(t,{selected:!1})}))),(0,c.e)(r,{value:n})}const f={};async function p(e,t){const n=f[t.type],r=n?await n(e,t):l.Az;return r.noValidate||(0,s.c9)(t),r}function h(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.yK}f.region=(e,t)=>{t.indexes=e;const n=(0,i.wR)(t),a=(0,r.qu)(e);d((0,o.At)(n,a),n,a,t);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=c,t.position={address:c},l.yK},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-",t.infoRange),r=(0,i.wR)(t);return d((0,o.At)(r,n),r,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-","street"),r=(0,i.wR)(t);return d((0,o.KQ)(r,e.point),r,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.verify=(e,t)=>((0,c.e)(t,e),{...l.yK,noValidate:!0}),f.gift=(e,t)=>((0,c.e)(t,e),l.ay),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,c.e)(i,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,u.e)(i,t),l.ay}},1576:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(8856);function i(e,t){(0,r.e)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,r.e)(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.e)(n,{done:o&&a}),{result:!0}}},6680:(e,t,n)=>{"use strict";n.d(t,{W:()=>a}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var r=n(8856),i=n(9536);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.e)(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.e)(a,t)}return s&&await(0,i.e)(s,n),{result:!0}}},4404:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(8856);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.E3)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8184:(e,t,n)=>{"use strict";n.d(t,{_M:()=>oe,yI:()=>ie,o9:()=>re,e_:()=>ne});var r=n(4316),i=n(5776),o=n(8084),a=n(6496),s=n(568),c=n(8856);const u={select:async e=>{const t=(0,i._A)(e.origin);let n=(0,a.GS)(s.CW.select.single);if(t){n=(0,a.GS)(s.CW.select.multi);const{min:t,max:r}=await(0,i.EH)(e,e.parent);return{typeName:n,typeDescription:(0,a.GS)(s.CW.select.limitBetween,{min:t,max:r})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.value)}),icon_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.graph)}),weight:async e=>{const t=e.weightTotal;let n=(0,a.GS)(s.CW.weight.total,{total:t});return n+=!0===e.origin.relax?(0,a.GS)(s.CW.weight.relax):(0,a.GS)(s.CW.weight.strict),{typeName:(0,a.GS)(s.CW.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.GS)(s.CW.fill.name)}),slide_rate:async()=>({typeName:(0,a.GS)(s.CW.slideRate.name)}),sequence:async e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.GS)(s.CW.rank.limitMin,{min:t}):(0,a.GS)(s.CW.rank.limitAll);return{typeName:(0,a.GS)(s.CW.rank.name),typeDescription:n}},menu:async e=>({...await u.select(e),typeName:(0,a.GS)(s.CW.menu.name)}),select_icon:e=>u.select(e),select_image:e=>u.select(e),upload:async e=>{const t=(0,a.GS)(s.CW.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:r}=await(0,i.YP)(e,e.parent);return{typeName:t,typeDescription:(0,a.GS)(s.CW.upload.amountLimit,{min:n,max:r})}}return{typeName:t,typeDescription:""}},location:async()=>({typeName:(0,a.GS)(s.CW.locate.name)}),area:async()=>({typeName:(0,a.GS)(s.CW.site.name)}),region:async()=>({typeName:(0,a.GS)(s.CW.region.name)}),verify:async()=>({typeName:(0,a.GS)(s.CW.verify.name)}),cascade:async()=>({typeName:(0,a.GS)(s.CW.cascade.name)}),matrix:async e=>{const{origin:t}=e;if((0,i.cd)(t))return{typeName:(0,a.GS)(s.CW.matrix.single)};if((0,i._A)(t)){const{min:n,max:r}=await(0,i.EH)(e,e.parent);let o=(0,a.GS)(s.CW.matrix.multi),c=(0,a.GS)(s.CW.select.limitBetween,{min:n,max:r});return(0,i.S2)(t)?(o=(0,a.GS)(s.CW.matrix.multiCol),c=(0,a.GS)(s.CW.matrix.colLimitBetween,{min:n,max:r})):(0,i.KC)(e.origin)&&(o=(0,a.GS)(s.CW.matrix.multiRow),c=(0,a.GS)(s.CW.matrix.rowLimitBetween,{min:n,max:r})),{typeName:o,typeDescription:c}}return(0,i.ct)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRow),typeDescription:(0,a.GS)(s.CW.matrix.eachRowOne)}:(0,i.gd)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleCol),typeDescription:(0,a.GS)(s.CW.matrix.eachColOne)}:(0,i.cx)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRowCol),typeDescription:(0,a.GS)(s.CW.matrix.eachRowColOne)}:{typeName:(0,a.GS)(s.CW.matrix.single)}},hot_spot:async()=>({typeName:(0,a.GS)(s.CW.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.GS)(s.CW.heatMap.name)}),max_diff:async()=>({typeName:(0,a.GS)(s.CW.maxDiff.name)})};var l=n(3001),d=n(3132),f=n(3080),p=n(9796),h=n(1344),m=n(8348),g=n(7404),v=(n(9952),n(4708)),y=n(6764),w=n(6332),_=n(556),b=n(9376);function x(e){return 1===e?"bottom":2===e?"top":"center"}function S(e,t,n,r,i=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),c=i?i+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=S(e,t,n,r,c)})),t.text}async function k(e,t){const{destList:n,cascadeStart:r}=t.origin,o=(0,i.MR)(e.nodeList,n,r.uuid);o&&(t.cascade=await T(t,e,o,""))}async function T(e,t,n,o,c){c?await(0,r.wz)(c,e):c={uuid:"",text:""};const{nodeList:u}=t,l=o?o+"=>"+(0,_.kt)(c.uuid):(0,_.kt)(c.uuid),d={option:c,groupId:o,resultId:l,text:c.text||c.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.GS)(s.CW.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.q0)(t,e),s=await(0,r.o9)(n,o,a),c=await(0,w.is)(t,s,n),u={...ne({target:e},t),renderId:(0,_.So)(e.nodeUuid,n.loopStack)},l=await(0,r.o9)(n,e.otherOptions,[]),d=await(0,w.is)(t,l,n),f={options:(0,y.uQ)(u,c.visibleList),otherOptions:d.visibleList};return i[e.nodeUuid]=f,f}}(n,t,e),p={...ne({target:n},t),...f,parent:t},h=(0,i._A)(n),{min:m,max:g}=await(0,i.EH)(p,t),{destList:S,output:k}=n,E=(0,i.K6)(n),I=[],C=h?(0,a.GS)(s.CW.cascade.selectBetween,{min:m||1,max:g}):(0,a.GS)(s.CW.cascade.selectSome,{amount:1}),O={...d,list:I,multiple:h,min:m,max:g,hint:C,required:E,display:x(n.menuType),lineCount:n.lineCount},N=(0,i.MR)(u,S,k.uuid),L=(0,v.wR)(p);(0,r.cV)(L);for(const n of L){const r=(0,i.MR)(u,S,n.uuid)||N,o=await T(e,t,r,l,n);I.push(o)}return O}function E(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,_.my)(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(5960);var I=n(3048),C=n(488);const O={optionsRelationship:{},groupsRelationship:{}},N=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function L(e){return"group"===e.type}function R(e){return"type"in e&&"group"===e.type}async function A(e,t){const{options:n,origin:r}=e;let i=r.optionGroups||[];if(o=e.type,!N.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,I.W)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,C.IH)(t,n);if(!e)return;const a=U(M(e.optionGroups||[],e.origin.optionGroupsRelationship||O),r);i=i.concat(a)}})),i}(e,t);if(i=i.concat(a),0==i.length)return{optionGroups:void 0};const s=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);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,s,n);let c=await W(i,n,t);return c=P(c),c=function(e,t){const{randomOptionY:n,circulation:r,followRandom:i}=e.origin;return r?G(t):n?i?t:D(t):t}(e,c),q(c,n),c=F(c),{optionGroups:c}}function P(e){const t=[];return e.forEach((e=>{R(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==P(t).length}(e)&&t.push(e):t.push(e)})),t}function M(e,t){return(e||[]).map((e=>{if(R(e)){const n=(0,_.O0)(e),{groupTitle:r,showGroupTitle:i,children:o,randomMode:a,type:s,uuid:c}=n;return{groupTitle:r,showGroupTitle:i,randomMode:a,type:s,uuid:c,children:M(o,t)}}{const n=(0,_.O0)(e),{text:r,uuid:i}=n;return{type:"option",text:r,optionUuid:i,groupUuids:t.optionsRelationship[i]||[]}}}))}function U(e,t){return e.map((e=>function(e,t){if(L(e)){const n=U(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:r,groupUuids:i,text:o,currentLevel:a}=e,s=t.find((e=>(0,_.oj)(n,e.refOptId)));return void 0===s?e:{type:r,groupUuids:i||[],text:o,currentLevel:a,optionUuid:s.uuid}}}(e,t)))}async function W(e,t,n){const r=[];for(const i of e){const e=await j(i,t,n);e&&r.push(e)}return r}async function j(e,t,n){if(L(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.qQ)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await W(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const B=(e,t)=>{const{groups:n,options:r}=(e=>e.reduce(((e,t,n)=>{const{groups:r,options:i}=e;return R(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},D=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,_.ec)(t.length+1);t.splice(n,0,e)})),t}(e),G=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 q(e,t){e.forEach((e=>{if(R(e)){const{randomMode:n,children:r}=e;q(r||[],t);const i={followNode:()=>B(r,t),noRandom:()=>r,random:()=>D(r),circulation:()=>G(r)};e.children=i[n]()}}))}function F(e){let t=[],n=[];const r=[];return e.forEach((e=>{if(R(e))e.children=F(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(1884),V=n(3004),K=n(6276),H=n(5032),Y=n(1103),Q=n(6784),X=n(4060);const J=["select","menu","select_image","select_icon"];function Z(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 $={};function ee(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.a)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function te(e){const{loop:t,parent:n,origin:r}=e,{lockLoopCount:i}=r;let o=r.nodeName.split("/")[0];if(o&&r.circleNode1Id&&!i&&!(0,c.E3)().realTimePreview){const e=(0,m.yy)();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 ne(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 re(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 te(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.E3)().realTimePreview,renderId:(0,i.YJ)(e),prev:t,errorMessage:""},o=e.parent;if(i.CA.includes(n.type))return async function(e,t){(0,c.e)(e,{autoSkip:!0,number:""});const n=$[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,c.e)(e,{number:e.runtimeNodeName})}(n),function(e){(0,c.e)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,c.e)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var r;n.image?(0,c.e)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,b.Q9)(e.parent,t)}):(0,c.e)(t,{images:[]}),n.video&&(0,c.e)(t,{autoplayVideo:n.autoplayVideo,video:n.video&&(r=n.video,r?{id:r.id,url:(0,V.G)(r.url),poster:(0,V.G)(r.poster)}:null)})}(n),await async function(e){if((0,K.Oo)(e)){const{origin:t}=e;(0,c.e)(e,{layout:t.layout,template:await(0,H.m)(t.template,e.parent)})}}(n),await(0,r.u_)(n,o),await async function(e,t){const n=await A(e,t);return(0,c.e)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=$[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,i.EH)(e,e.parent),r=(0,i._A)(t);(0,c.e)(e,{...n,multiple:r,selectType:r?"checkbox":"radio"})}(n),await(0,Y.S)(n),(0,c.W4)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=u[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,c.e)(e,n))}(n),(0,i.j$)(n),await async function(e){(0,K.G6)(e)&&await async function(e){if(!(0,c.E3)().realTimePreview)if((0,_.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,c.e)(t,{selected:!0,sortNo:1}),(0,Q.we)(0,e)}}else if((0,_.is)(e,J.includes(e.type))&&!await(0,X.yG)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,K.IN)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,c.e)(n,{selected:!0}),(0,Q.y)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,h._4)(n),n}async function ie(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,u=r?(0,a.GS)(s.CW.lottery.congratulation):(0,a.GS)(s.CW.lottery.pity),l=r?(0,a.GS)(s.CW.lottery.goal):(0,a.GS)(s.CW.lottery.fail),f=o.title||u,p=o.summary||l,h=(0,d.a)({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=ne({target:e},n),v=await re(g,n.current);return(0,c.e)(v,{rewardRaw:t,rewardTime:(0,z.kF)(),goal:r,rewardImage:h.name?h:void 0,rewardTitle:f,rewardDescribe:p,rewardList:i,rewardName:m,showRewards:e.showRewards}),!(0,c.E3)().preview&&r&&((0,c.W4)().app.canHandleReward()||"red_envelope"!==t.type||await oe(n,v)),v}async function oe(e,t){const{formalResult:{reward:n,authorizer:r},nodeList:o}=e,{app_id:a,component_appid:s}=r,u=(0,i.o1)(o,n.gift_id);t.linkUrl=await(0,l.Oj)(u.linkUrl,{state:e}),t.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,g.uK)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,c.W4)().app.getRewardUrl(d)}$.region=async e=>{(0,c.e)(e,{indexes:"0 0 0",value:"",regions:await(0,o.iM)(),infoRange:e.origin.infoRange})},$.end=async e=>{const{parent:t}=e,n=await(0,l.Oj)(e.origin.linkUrl,{state:t});(0,c.e)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},$.location=async e=>{(0,c.e)(e,{regions:await(0,o.iM)(),infoRange:e.origin.infoRange,value:""})},$.value_mark=async e=>{(0,c.e)(e,{showInput:e.origin.showInput})},$.icon_mark=async e=>{(0,c.e)(e,{inverseValue:e.origin.inverseValue})},$.menu=async e=>{const{origin:t}=e;(0,c.e)(e,{placeholder:t.placeholder||(0,a.GS)(s.CW.menu.clickToSelect),display:x(t.menuType),lineCount:t.lineCount})},$.area=async e=>{(0,c.e)(e,{infoRange:"street",regions:await(0,o.iM)()})},$.verify=async e=>{(0,c.e)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},$.weight=async e=>{const{origin:t,parent:n}=e,r=await(0,i.iw)(t,n);(0,c.e)(e,{weightTotal:r,unit:t.unit,distributeBy:t.distributeBy})},$.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(E(o,i,e+1));return a}(e);(0,c.e)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.e)(e,{currentTask:Z(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,c.e)(e,{currentTask:Z(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,c.e)(e,{currentTask:t})}})},$.slide_rate=async e=>{(0,c.e)(e,{currentOption:e.options[0],gotoNextOption(){(0,c.e)(e,{currentOption:Z(e.options,e.currentOption,1)})},gotoPrevOption(){(0,c.e)(e,{currentOption:Z(e.options,e.currentOption,-1)})},gotoOption(t){(0,c.e)(e,{currentOption:t})}})},$.select_image=async e=>{(0,c.e)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},$.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.kd)(i.option.origin,e.type)}}))}(e),S(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.So)(e,e.options)},$.hot_spot=async e=>{(0,c.e)(e,{...ee(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},$.heat_map=async e=>{(0,c.e)(e,{...ee(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},$.loop=async e=>{const{parent:t}=e;(0,p.iO)(e,t)||(e.varList=await(0,p.Co)(t,e))}},1103:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,e:()=>a});var r=n(8856),i=n(6276),o=n(3001);async function a(e){const{parent:t,origin:n}=e,i=await(0,o.qQ)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,r.e)(e,{description:i})}async function s(e){(0,i.kZ)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,i=await(0,o.qQ)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,r.e)(e,{title:i})}(e),await a(e))}},5032:(e,t,n)=>{"use strict";n.d(t,{m:()=>o}),n(9952);var r=n(8856),i=n(3001);async function o(e,t){if(!e)return{param:{}};const n=await(0,r.W4)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,i.E3)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},1344:(e,t,n)=>{"use strict";n.d(t,{ew:()=>M,mi:()=>U,ig:()=>V,Yp:()=>K,I5:()=>G,$7:()=>Q,io:()=>j,IN:()=>z,ay:()=>q,wn:()=>F,_4:()=>D,aC:()=>H,iq:()=>Y}),n(5960),n(9952);var r=n(4708),i=n(5776),o=n(4676),a=n(6348),s=n(9948),c=n(8856),u=n(556),l=n(568),d=n(6276);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.oz)(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(4556),y=n(2352);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.oV)(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.Y5)(t,e)}};var x=n(6940);let S=!1,k="";const T=["data","describe","logic","random","loop"];let E,I;const C="response_cache_",O="preview_cache_";let N,L,R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function A(e){const{offlineTaskId:t,preview:n}=(0,c.E3)();if(n)return O+(0,u.kt)(e);{const n=C+(0,u.kt)(e);return t?n+"_with_"+t:n}}function P(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 M(e){if((0,c.W4)().dev.infer||S)return;if((0,i.S)(e)||T.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,r.wR)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),R.error[e.renderId]=t}async function U(e){if((0,c.W4)().dev.infer||S)return;if((0,i.S)(e)||T.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.cA)(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.G6)(e)&&(t.options=e.options.filter(i).map((t=>P(t,e.type)))),(0,d.IN)(e)&&(t.otherOptions=e.otherOptions.filter(i).map((t=>P(t,e.type))))}R.responseId=e.parent.transactionID,R.data[e.renderId]=t;const r=e.parent.randomList;r&&(R.randomList=r.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),R.randomAbandonedNodeIds=(0,x.mU)()),await W(e.parent)}async function W(e){const{sid:t,renderList:n}=e,r=A(t);R.locale=(0,l.qe)();const i=Object.keys(R.data);R.count=0;for(const e of n)if(i.includes(e.renderId)&&(R.count+=1),e.renderId===R.point)break;await(0,c.W4)().storage.setVital(r,JSON.stringify(B(R)))}async function j(e){const t=A(e),n=await(0,c.W4)().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,c.W4)().dev.infer)return e;if((0,i.S)(e)||T.includes(e.type)||e.readonly)return e;!function(e){const t=R.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,r.wR)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=R.data[e.renderId];return t?(function(e,t,n){const i=(0,r.wR)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of i){const t=(0,r.oz)(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._A)(e.origin)||!(0,d.G6)(e))return;let t=(0,d.IN)(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,c.e)(e,{selected:!1,autoSelectMarked:!1}):r.push(e)})),r.length>1&&r.forEach(((e,t)=>{t<r.length-1&&(0,c.e)(e,{selected:!1})}))}(e),E&&E(e),e):(E&&E(e),e)}function G(e=!1){return e?B(R):R}async function q(e,t,n){R=e,N=[...e.randomList||[]],(0,x.ID)(e.randomAbandonedNodeIds,t.nodeList),L=e.point;const r=R.count;let i=0;S=!0,E=()=>{i>=r?I({failed:!1,error:""}):(n.onProgress("".concat(i,"/").concat(r)),i++)},I=e=>{o(),E=null,I=null,a.i.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.i.off("NEXT_OK",u),a.i.off("STRETCH_OK",u),a.i.off("NEXT_OK",c),S=!1},c=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():I({failed:!0,error:t})},u=()=>t.current.renderId===L?I({failed:!1,error:""}):t.handleEvents.handleNextClick();a.i.one("STRETCH_OK",u),a.i.on("NEXT_FAIL",c),a.i.on("NEXT_OK",u),a.i.trigger("START_MEMORY"),await(0,s.ER)()}function F(e,t){if(!N)return e;const n=N.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 z(){R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function V(e){z();const t=A(e.sid);await(0,c.W4)().storage.removeVital(t)}async function K(e,t){t.forEach((e=>{delete R.data[e]})),await W(e)}function H(e){S||(R.point=e.current.renderId)}async function Y(e){H(e),await W(e)}async function Q(e){return e?(k||await j(e),k):""}},5616:(e,t,n)=>{"use strict";n.d(t,{K:()=>d,y:()=>l});var r=n(1344),i=n(6784),o=n(8856),a=n(6496),s=n(568);class c{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.GS)(s.CW.langResume.title):(0,a.GS)(s.CW.memory.title),this.message=n?"":(0,a.GS)(s.CW.memory.message),this.sureText=n?"":(0,a.GS)(s.CW.memory.sure),this.denyText=n?"":(0,a.GS)(s.CW.memory.deny)}}async handleSure(){if(!this.holder||d())return;const e=this;return this.state.enterMode="resume",(0,o.e)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,i.Wy)(this.state,e.holder.responseId||""),await(0,o.W4)().hook.onResumeSurvey(this.state),(0,r.ay)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.e)(e,{show:!0}),(0,o.e)(e,{message:t})},onSuspend(){e.suspend()}})}async handleDeny(){d()||(await(0,o.W4)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.e)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.e)(this,{show:!1})}}let u=null;async function l(e){const t=await(0,r.io)(e.sid);return u=new c(t,e),u}function d(){return u&&u.resuming}},2392:(e,t,n)=>{"use strict";n.d(t,{U:()=>i,y:()=>o});var r=n(8856);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.E3)().theme=e,(0,r.E3)().setTheme(e)}},1372:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var r=n(8856),i=n(556);const o="prs-";function a(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat(o).concat((0,i.kt)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:r,color:i,fontSize:o,italic:a,lineThrough:s,underline:c}=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;"),c&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,r.W4)().ui.setPresetStyle(t,e)}},8856:(e,t,n)=>{"use strict";n.d(t,{E3:()=>d,W4:()=>l,e:()=>f,oB:()=>c,oV:()=>u});var r=n(6348),i=n(556);let o=null,a=null;const s=(0,i.Cu)((()=>r.i.trigger("SET_PROPS")),1e3/60);function c(e){a=e}function u(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.i.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},1884:(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,{KM:()=>r,Kk:()=>i,kF:()=>o})},8084:(e,t,n)=>{"use strict";n.d(t,{Qf:()=>u,iM:()=>c,oZ:()=>s,qu:()=>l});var r=n(7320);const i="https://media.choiceform.com/static-assets/regions-2020.json";let o;function a(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 s(e){o=e,a(o)}async function c(){return o||(o=await(0,r.kj)(i,{type:"GET"},!0),a(o)),o}function u(e){if(!e)return"";const t=e.split("-"),n=t[0],r=o.find((e=>n.includes(e.name)));if(!r)return"";const i=r?r.code+"":"",a=t[1];if(!a)return i;const s=r.cities.find((e=>a.includes(e.name)));if(!s)return i;const c=s?s.code+"":"",u=t[2];if(!u)return c;const l=s.areas.find((e=>u.includes(e.name)));return(l?l.code+"":"")||c||i||""}function l(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,r=o[t[0]];let i,a,s=r.name;return n>1&&(i=r.cities[t[1]],s+="-"+i.name,n>2&&(a=i.areas[t[2]],s+="-"+a.name)),s}},3684:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(8856);function i(e,t){return new(0,(0,r.W4)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},6496:(e,t,n)=>{"use strict";n.d(t,{At:()=>g,GS:()=>v,Mh:()=>f,Mt:()=>y,Sk:()=>p,Uj:()=>h,YP:()=>m}),n(7768);var r=n(6348),i=n(568),o=n(8856),a=n(7404),s=n(9200);const c=["zh_cn","en_us"];function u(){const{offline_survey_id:e}=(0,a.uK)(),t="language";return e?t+e:t}async function l(){return(0,o.W4)().storage.getVital(u())}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.W4)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.c.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.W4)().storage.setVital(u(),e)}(e),(0,o.W4)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.W4)().storage.set("lang-resume","true"),(0,o.W4)().hook.beforeForceLeave(),(0,o.W4)().app.reload(),!0)}function h(e){let t="en_us";c.includes(e)&&(t=e),i.Ki(t),(0,o.E3)().setLocale(t),r.i.trigger("LANG_CHANGE");const n=s.c.langTable.find((t=>t.locale===e));(0,o.W4)().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.W4)().system.translate(e,t):e}function y(e,t){const n=e&&t.length>1&&null===(0,o.W4)().storage.get("anti-show-init-lang-select");return(0,o.W4)().storage.remove("anti-show-init-lang-select"),!!n}},3132:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,k:()=>o});var r=n(4756),i=n(8856);function o(e){return(0,i.E3)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:i,id:a,originName:s}=e,c=o(i);return{ratio:Math.round(n/t*1e5)/1e5,url:c,natural:(0,r.Q)(c,"!m720"),thumbnail:(0,r.Q)(c,"!avatar"),large:(0,r.Q)(c,"!m1080"),width:t,height:n,id:a,originName:s,name:i}}},4872:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(9200);async function i(e){return"string"==typeof e?JSON.parse(r.c.inflateBase64(e)):e}},7828:(e,t,n)=>{"use strict";n.d(t,{O_:()=>h,QJ:()=>m,__:()=>g,gz:()=>v,w3:()=>p}),n(9952);var r=n(556),i=n(3568),o=n(6276);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&i.c.forEach((n=>{const r=e.mapping[n];r&&"object"==typeof r||(e.mapping[n]=t.mapping[n]||"")}))}function c(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.yy)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((i=>{const o=n.find((e=>(0,r.kt)(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 u(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),c(e,t),u(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.kt)(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:c}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],i=a.find((t=>t.nodeUuid&&(0,r.kt)(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.kt)(t.uuid)===e));n&&f(n,t)})),c&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=c.find((t=>(0,r.kt)(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.kt)(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.kt)(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||"",u(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.kt)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),u(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.kt)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,r.kt)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{c(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},5548:(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,{A:()=>r,c:()=>o})},556:(e,t,n)=>{"use strict";n.d(t,{Av:()=>c,Cu:()=>_,DB:()=>l,O0:()=>w,OI:()=>v,Qh:()=>o,So:()=>u,Sq:()=>y,W_:()=>x,YF:()=>d,aO:()=>a,ai:()=>h,ec:()=>m,eg:()=>b,is:()=>s,k5:()=>S,kt:()=>f,my:()=>g,oj:()=>p}),n(5960),n(7768),n(6056),n(9952);var r=n(2352);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 c(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 u(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.oV)(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 S(e){return e}},6276:(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 c(e){return!!e.otherOptions}function u(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{G6:()=>o,IN:()=>l,Oo:()=>r,QB:()=>a,_O:()=>d,cp:()=>s,kZ:()=>i,uo:()=>u,yy:()=>c})},2352:(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,{Wo:()=>r,oV:()=>o,uI:()=>i})},4756:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>i});var r=n(3004);function i(e,t){return e.endsWith(".svg")||(0,r.U)()?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()}},5224:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var r=n(568),i=n(6496);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,i.GS)(r.CW.reward.weChatName)}}},3552:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(8856);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.W4)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},5876:(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,{Qr:()=>i,_m:()=>o,cF:()=>r,mE:()=>a});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}},4072:(e,t,n)=>{"use strict";n.d(t,{Ij:()=>g,UJ:()=>u,WK:()=>p,YV:()=>c,ee:()=>h,kx:()=>m,sf:()=>d}),n(7768);var r=n(3001),i=n(3132),o=n(556),a=n(8348),s=n(8856);function c(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.includes("TO_GLOBAL")&&"var-html"===e.type&&(t+=(0,r.uO)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.W4)().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.W4)().ui.setVarStyle(t,e)}}(e.varStyles)}function u(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+=u(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:g((0,i.k)(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.oj)(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.oj)(t.uuid,e))),n||(n=(0,a._O)(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+"##"}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,U:()=>o}),n(7768);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}},488:(e,t,n)=>{"use strict";n.d(t,{Ge:()=>R,IH:()=>k,Yl:()=>T,_i:()=>P,aL:()=>L,gQ:()=>_,im:()=>E,iq:()=>x,ms:()=>N,oB:()=>b,of:()=>O,sl:()=>C,uZ:()=>A,yE:()=>S,yI:()=>I}),n(9952);var r=n(3001),i=n(8832),o=n(556),a=n(6764),s=n(4708),c=n(8107),u=n(4072),l=n(8348),d=n(2352),f=n(8856),p=n(9348),h=n(5876),m=n(7192),g=n(9216),v=n(8260),y=n(5776),w=n(4316);function _(e){e=(0,m.Un)(e);const t=(0,f.W4)().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).includes("var-tag")}function S(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.AF)(e,t);if(!a)return;const s=(0,o.So)(a,n);return r.node&&(i=[...i,r.node]),i.find((e=>s.startsWith(e.renderId)))}function T(e,t,n,r){if(!n)return null;const i=[n];r&&i.push(r);const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.DB)(a,i);return(0,g.QL)(e.renderList,s)}function E(e){return{name:e.innerText,identity:(0,p.U)(e.getAttribute("data-v-id")),config:(0,h.cF)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function I(e,t){return O(e,E(t))}function C(e){const{identity:t,config:n}=e;let r=(0,p.A)(t);if(!n)return r;if((0,h.Qr)(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.oV)(i)||"-1"==i||(r+="_".concat(i)),!(0,d.oV)(o)){const e=(0,h.mE)(o);r+="_".concat(JSON.stringify(e))}return r}function O(e,t){const n=C(t={...t,config:t.config||{}}),{identity:r,config:i,name:o,inEdist:a}=t,d=(0,p.A)(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(P(h)){const[e,t]=h.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,u.kx)(h,e);return t?{...f,...t,name:o,mapId:n,inEdist:a}:null}let S,E="";if(b){if((0,v.g)(r))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(S=T(e,m,b,x),!S)return}else if(c.Ux(g))E=m;else if(S=k(e,m),!S)return;if(g){const e=(0,l._O)(g);return e&&{...f,uuid:d,name:o,node:S,nodePart:e,lookupLoopNodeId:E,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const I=(0,l._O)(_,S);if(!I)return;const O="var-media"===I.type;if(y){const e=(0,l._O)(y,S);if(!e)return;return{...f,inEdist:a,name:o,node:S,optionPart:I,optionFilter:e,uuid:d,lookupLoopNodeId:E,isMedia:O,type:I.type,mapId:n}}const N=(0,s.oz)((0,s.gr)(S),w);return N?{...f,inEdist:a,name:o,node:S,option:N,optionPart:I,uuid:d,lookupLoopNodeId:E,isMedia:O,type:I.type,mapId:n}:void 0}async function N(e,t){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=e,l=await(0,r.W0)(u.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||c;n=d&&await(0,i.U)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.my)(n,l);return u.disorder?(0,a.sZ)(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.U)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await N(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 R(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.U)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await N(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});(0,d.oV)(t)||r.push(t)}return r.join(a)}}async function A(e){const t={};t.text=await R(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.U)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await N(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.U)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:r})]:[];{const n=await N(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e),o=r[0];return o&&(t.normalIconUrl=o,t.activeIconUrl=(0,w.WG)(o)),t}function P(e){return e&&e.startsWith("URL_PARAM=")}},8107:(e,t,n)=>{"use strict";n.d(t,{M4:()=>f,MH:()=>h,Ux:()=>p,WG:()=>d,Wy:()=>l,nS:()=>x,yG:()=>b}),n(7768);var r=n(556),i=n(4072),o=n(8348),a=n(1880),s=n(2352),c=n(3568);let u;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.k5)(n(e))}return(0,r.k5)(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.k5)(t(s,i))}function p(e){return function(){if(!u){const e=(0,o.yy)();u=[],Object.keys(e).forEach((t=>{const{uuid:n,type:r}=e[t];"var-loop"===r&&u.push(n)}))}return u}().includes(e)}function h(e,t){return t.find((t=>(0,r.oj)(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.Ij)(n.url,t)}return""}function v(e){return e&&(0,s.Wo)(e.index+1)}function y(e){return e&&e.value}function w(e){return e&&(0,s.Wo)(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,_),c.c.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.C)(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,_),c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.C)(n.mapping,t,e)))}(t)}))}},8348:(e,t,n)=>{"use strict";n.d(t,{yy:()=>x,_O:()=>_,cK:()=>m}),n(7768),n(9952);var r=n(1880),i=n(4072),o=n(488),a=n(4708),s=n(2352),c=n(3568);var u=n(8832),l=n(6524),d=n(5876);var f=n(9572),p=n(8107),h=n(9200);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.c.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.M)(v),(0,p.nS)(v),(0,p.yG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.Y5)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",c.c.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.C)(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.Ml)(t);if(n)return n;const{optionY:r,optionX:i}=t;return i?i.text+"_"+r.text:(0,a.Y5)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.Wo)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.Wo)(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.Wo)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.Wo)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:r}=e,o=(0,a.Y5)(n,"image");return r?n.text:o?(0,i.Ij)(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.ms)(e);return(0,s.Wo)(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.gr)(i),s=[];for(const n of o)!r&&n.isOtherOpt||t&&!t(n,i)||!await(0,u.U)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.e2),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.gb),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.yu),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.sb),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.Qr)(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.oV)(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.ms)(e);return function(e,t){if((0,s.oV)(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.ms)(e);return function(e,t){if((0,s.oV)(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.wi)(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.Wo)(i).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.oV)(i)?"":i}}})),e)throw new Error("lack var implement for:\n"+e)}(),g=!0)}function x(){return g||b(),v}b()},9572:(e,t,n)=>{"use strict";n.d(t,{cT:()=>l,wi:()=>f,yH:()=>d}),n(7768),n(9952);var r=n(8107),i=n(488),o=n(4072),a=n(3132),s=n(4708),c=n(3568);function u(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.ee)(t.uuid,e.imageList);if(n)return[(0,a.a)(u(n))];if(t.value){let n=[];const r=(0,i.oB)(t.value);for(const t of r){const r=await l(e,(0,i.yI)(e,t));n=n.concat(r)}return n}{const{option:n,optionPart:r}=t,o=t.node;return o?r?(await(0,i.ms)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.Y5)(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.Y5)(r,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,i=r.Wy(t);if(!i)return[];const o=r.MH(n,i.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",c.c.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.WG(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.M4(e,(e=>t(e.mapping,n)))}(n)}))}},1880:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,M:()=>h}),n(1088);var r=n(4676),i=n(4072),o=n(8856),a=n(4708),s=n(2352),c=n(7404),u=n(3568),l=n(1884),d=n(1820);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.Ij)(r.url,t,r.originName)}}function h(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,c.uK)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,c.uK)();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.Kk)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.Kk)(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.W4)().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.E3)().preview?"":(0,o.E3)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.E3)().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.Wo)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.Wo)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,r.gp)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.i)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.Wo)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(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' />"):""},u.c.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.Ij)(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.Wo)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,r.cA)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.W4)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.W4)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.W4)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.W4)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.W4)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.W4)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.W4)().system.device.device.type||f}},6524:(e,t,n)=>{"use strict";n.d(t,{KE:()=>f,e2:()=>a,gb:()=>s,sb:()=>u,yu:()=>c}),n(5960),n(7768);var r=n(8348),i=n(2352),o=n(984);function a(e){return e.selected}function s(e){return!e.selected}function c(e,t){return(0,o.QX)(e,t)}function u(e,t){return!(0,o.QX)(e,t)}const l=(e,t,n,r=!1)=>{if((0,i.oV)(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.oV)(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]].includes(t))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.yy)();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.includes(o.uuid)?t=a:d.includes(o.uuid)?t=s:f.includes(o.uuid)?t=c:p.includes(o.uuid)&&(t=u)),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)},1820:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var r=n(8856);function i(){return(0,r.E3)().realTimePreview?"realtime_preview":(0,r.E3)().preview?"preview":"formal"}},4060:(e,t,n)=>{"use strict";n.d(t,{IB:()=>l,UF:()=>y,em:()=>g,uy:()=>m,wx:()=>v,yG:()=>w}),n(2048),n(9624),n(9952);var r=n(9216),i=n(556),o=n(3001),a=n(4676),s=n(488),c=n(2352);const u={1:(e,t,n)=>(t>n&&([t,n]=[n,t]),u[5](e,t,0)&&u[6](e,n,0)),2:(e,t,n)=>!u[1](e,t,n),11:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),r=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim(),e.includes(t)))))))},12:(e,t)=>!u[11](e,t,0),3:(e,t)=>(0,c.Wo)(e)===(0,c.Wo)(t),4:(e,t)=>!u[3](e,t,0),5:(e,t)=>{const n=(0,c.uI)(e),r=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof r?n>r:(0,c.Wo)(n)>(0,c.Wo)(r)},6:(e,t)=>{const n=(0,c.uI)(e),r=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof r?n<r:(0,c.Wo)(n)<(0,c.Wo)(r)},7:(e,t)=>!u[6](e,t,0),8:(e,t)=>!u[5](e,t,0),9:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),r=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!u[9](e,t,0),13:e=>(0,c.Wo)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!u[13](e,t),15:(e,t)=>!u[16](e,t),16:(e,t)=>(0,c.Wo)(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())),u[t.markId](n,r,i)}};function d(e,t){"string"==typeof e&&(e=(0,o.Qr)(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.qQ)(n,{state:t,joinBy:r}),e)}async function p(e,t){const{relatedVarId:n}=e,r={identity:{baseId:n}},i=(0,s.of)(t,r);if(!i)return{value:!1,reason:{type:"var_not_found"}};const a=m(e.markId)?",":void 0;return d(await(0,o.Wi)({state:t,varInfo:i,joinBy:a}),e)}function h(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=t,u=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;let s,c=(0,i.So)(a,n);do{if(s=(0,r.QL)(o,c),s)break;c=c.substring(0,c.length-9)}while(c.length>=36);return s}(e,t);if(!u)return-2===c?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.cA)(u);if(!d||!d.items)return-2===c?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((e=>function(e,t){return(0,i.oj)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.wr)(f):"",r=p(e,t),i={value:r};return r||(i.reason={type:"node_unmatch",limit:c,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),i}{const e=-2===c?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),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.E3)(e.markStart,{state:t,joinBy:","}):await(0,o.wh)(e.markStart,{state:t}),end:await(0,o.wh)(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:c}=t,{start:u,end:l}=await g(t,e);let d;t.markEnd=l,t.markStart=u,d=a?await y(e,s,c):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}},8260:(e,t,n)=>{"use strict";n.d(t,{g:()=>d,u:()=>f}),n(9952);var r=n(5776),i=n(8856),o=n(556),a=n(5876),s=n(9348),c=n(488),u=n(3001);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:u,innerLoopRoundId:d}=i,f=(0,r.AF)(n,a);if(!f)return"";const h=(0,c.IH)(n,f);if(!h)return"";let m=[];m=l(s)?h.varList.map((e=>(0,o.kt)(e.uuid))):[s];for(const i of m)if(u){let a=[];const s=(0,r.AF)(n,u);if(!s)continue;const f=(0,c.Yl)(n,s,i);if(!f)continue;a=l(d)?f.varList.map((e=>(0,o.kt)(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,c=function(e,t){const n=(0,i.W4)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.A)(e.identity)),n.setAttribute("data-v-config",(0,a._m)(e.config)),n.outerHTML}({config:r,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,u.qQ)(c,e)}},9376:(e,t,n)=>{"use strict";n.d(t,{Il:()=>_,Md:()=>g,Q9:()=>m,q0:()=>b}),n(5960),n(9952);var r=n(4708),i=n(3001),o=n(556),a=n(3080),s=n(6764),c=n(488),u=n(8348),l=n(8856),d=n(3132),f=n(3048),p=n(8107),h=n(9572);async function m(e,t){const{loop:n}=t,r=n&&n.node.nodeUuid,{image:i}=t.origin;if(!i)return[];const o=(0,u.yy)();if("image"===i.type)return[(0,d.a)(i)];if(r&&p.Ux(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.cT)(e,(0,c.of)(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,u.yy)();let g;if("image"===l.type)g=(0,d.a)(l);else if(s&&p.Ux(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.cT)(i,(0,c.of)(i,e)))[0]}return!f&&g&&"variable"===l.type&&(0,a.KS)({node:e,optionId:t.uuid},{mapId:l.id},g.originName),g}function v(e){return!(!e||!(0,l.E3)().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.oz)(i,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,r.wR)(t.node).indexOf(a):void 0}}function w(e,t){if(!t)return null;const n=(0,f.a)(e,t);for(const e of t){const t=(0,f.W)(e);if((0,o.oj)(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.qQ)(a,{state:t}):(0,d.a)(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,u=!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.W0)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,c.of)(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:!u,keepWrap:!0};if(f.node&&(l=await(0,c.uZ)(_),h&&(d={uuid:n.uuid,value:h.value,optComment:h.optComment,image:(0,r.Y5)(h,"image"),number:h.number,text:h.text,label:h.label,mapping:h.mapping&&{...h.mapping},normalIconUrl:(0,r.Y5)(h,"normalIconUrl"),activeIconUrl:(0,r.Y5)(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:c}=t[e];let u=(0,o.my)(r,n);c?u=(0,s.sZ)(u):u.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=u.map((e=>e.option)),h=u.map((e=>e.passRef));f=f.concat((0,a.SW)(i,p)),l=l.concat(p),d=d.concat(h)}))}else l=h;return{options:l,refMaps:f,passRefs:d}}},3080:(e,t,n)=>{"use strict";n.d(t,{GO:()=>u,KS:()=>a,SW:()=>c,So:()=>l,oB:()=>s,oJ:()=>d}),n(9952);var r=n(3001),i=n(4676),o=n(4316);function a(e,t,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.sV)(r).match(/#[^#]+$/);return e&&e[0]||""}return""}function c(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function u(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.Ci)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=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.includes(r)||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),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let e;l.forEach((e=>{e.value=(0,r.Qr)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},8832:(e,t,n)=>{"use strict";n.d(t,{U:()=>u}),n(5960);var r=n(6524),i=n(4060),o=n(3001),a=n(2352),s=n(5876);const c={"-1":6,"-2":8,"-3":5,"-4":7};async function u(e){if(!(0,s.Qr)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,u=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=c[n];let i;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return i=5===r||7===r?(0,a.Wo)(o[o.length-1]||0):(0,a.Wo)(o[0]||0),{...t,limitType:r,limitStart:i}}(n,e.varInfo.config),m=(0,r.KE)(u,p,e),g=Number(l),v=(0,i.uy)(g)?await(0,o.E3)(d,{...e,joinBy:","}):await(0,o.wh)(d,e),y=await(0,o.wh)(f,e);return i.IB.input(m,{markId:g,markStart:v,markEnd:y,ignoreCase:h})}},6620:(e,t,n)=>{"use strict";n.d(t,{a8:()=>a,aI:()=>s}),n(9952);var r=n(3001),i=n(8856),o=n(1820);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.i)(),_IS_INFER_:(0,i.W4)().dev.infer?"Y":"",...e}}async function s(e,t=[],n=!0){const i={};for(const n of t){const{name:t,value:o}=n;t.startsWith("_url_")?i[t]=await(0,r.Oj)(o,{state:e}):t.startsWith("_html_")?i[t]=await(0,r.qQ)(o,{state:e},!0):i[t]=await(0,r.E3)(o,{state:e,joinBy:","},"URL")}return n?a(i,e):i}},3001:(e,t,n)=>{"use strict";n.d(t,{gt:()=>U,Wi:()=>R,qQ:()=>E,W0:()=>P,E3:()=>C,wh:()=>A,Oj:()=>L,uO:()=>b,cb:()=>M,Qr:()=>O}),n(7768),n(9624),n(9952);var r=n(3684);function i(e){let t=!0;try{t=!!(0,r.y)(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(556),c=n(6072),u=n(3552),l=n(3080),d=n(488),f=n(9572),p=n(4072),h=n(8348),m=n(8856),g=n(2352),v=n(7404),y=n(5876),w=n(8260);function _(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function b(e="",t=!1){if(e=(e=S(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.includes("&lt;")||e.includes("&gt;");)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function x(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function S(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.includes("&amp;");)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.Qh)(o)),o}function T(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.gQ)(e).childNodes]}async function E(e="",t,n=!1){e+="";const{state:r,innerJoinBy:i,varInfo:o,usage:a}=t,c=t.spaceRep||"";e=e.replace(/&nbsp;/g,c);const u=t.joinBy||" ";if((0,d.iq)(e)){const c=(0,d.gQ)(e),f=(0,d.oB)(e,c);for(const e of f){const t=(0,d.yI)(r,e);let s="";if(t?s=await R({state:r,varInfo:t,joinBy:i||u}):(0,m.E3)().realTimePreview&&(s=k(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,g.oV)(s)?"":(0,g.Wo)(s).trim(),a){const n=t||{mapId:(0,d.sl)((0,d.im)(e))};(0,l.KS)(a,n,s)}const c=!o&&t&&s&&!n;let f=[];_(t)?(c&&(s=k(s,t.type,t.name,t.inEdist,!1)),f=s?T(s):[""]):(c&&(s=k(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,m.W4)().system.newTextNode(e.innerHTML)]),I(e,f)}const 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(S(e))}r=i.join(n)}else r=S(e.innerHTML);return r=r.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),r=S((0,s.aO)(r)),r}(c,o,u);return N(p,t)}return e+""}function I(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const r=(0,m.W4)().system.newTextNode(t);n.insertBefore(r,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function C(e="",t,n="WRAPPED_URL"){return N(O(await E(e,t,!0),n),t)}function O(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.gQ)(e).innerText;return n=(0,d.gQ)(n).innerText,"URL"===t&&(n=(0,f.yH)(n)),n.trim()}function N(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function L(e="",t){let n=await E(e,{...t,innerJoinBy:","},!0);return n=O(b(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=N(n,t),n}async function R(e){let t="";const{varInfo:n}=e;if((0,w.g)(n.identity))t=await(0,w.u)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d._i)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.uK)()[n]}else n.nodePart||n.node?t=await(0,d.Ge)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):E(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,h.yy)(),{varInfo:n,state:i}=e;let s="";const c=(0,d.gQ)(n.value).childNodes,u=[];let l="";for(const e of c)if((0,d.yE)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,u,e),l=""}const n=(0,d.yI)(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,u,n.expOpr),u.push(e);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const e=u[u.length-1];s=o(s,u,await R({state:i,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(e){let t=0;try{t=(0,r.y)(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.oB)(t.value),a=[];for(const e of o){const t=(0,d.yI)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=r;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const c=await R({state:n,varInfo:t,joinBy:i});(0,g.oV)(c)||a.push(c)}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.aL)(e);const a=(0,d.oB)(t.value);let s="";for(const t of a){const r=(0,d.yI)(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 R({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 C(t.value,{state:r,joinBy:","},"URL")}const{result:i}=await(0,c.eU)({state:r,request:t,customParam:e,silent:!1});return"string"!=typeof i?i:(0,u.q)(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 E(t.value,e),i=(0,u.q)(b(r));return await function(e,t,n){const r=(0,y.mE)(e);return(0,s.eg)(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 c="";return s&&(c=e.startsWith("{{{")?await E(s,{state:n}):await C(s,{state:n},"URL")),c||a}))}(t.config.phParams,i,n)}(e))}return(0,d.iq)(t)&&(t=await E(t,e)),t}async function A(e="",t,n=!1){if("number"==typeof e)return e;if((0,g.oV)(e))return n?NaN:"";const r=Number(e);if(isNaN(r)){const r=await C(e,t);if((0,g.oV)(r))return n?NaN:"";const i=Number(r);return isNaN(i)?n?NaN:r:i}return r}async function P(e="",t){if("number"==typeof e)return e;const n=await A(e,t,!0);return Number(n)}async function M(e="",t,n=!1){return(0,g.oV)(e)?"":(0,s.eg)((0,g.Wo)(e),/{{(.+?)}}/g,(async(e,r)=>{let i=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.uK)()[e];{const n=(0,p.WK)(e,t.variables);return n?O(await R({varInfo:n,state:t,joinBy:","})):""}}(r,t);return i&&n&&(i=encodeURIComponent(i)),"".concat(i||"")}))}function U(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3040:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6960:(e,t,n)=>{var r=n(6840);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5775:(e,t,n)=>{var r=n(3280),i=n(5156),o=n(3984),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}},3696:(e,t,n)=>{"use strict";var r=n(8540).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},7852:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},5968:(e,t,n)=>{var r=n(6840);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},7580:(e,t,n)=>{"use strict";var r=n(3596),i=n(8648),o=n(4916),a=n(3976),s=n(1688),c=n(2652),u=n(6648);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=u(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[_],c(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,c(n,_,p);return n.length=_,n}},7299:(e,t,n)=>{var r=n(2576),i=n(1688),o=n(9924),a=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1452:(e,t,n)=>{"use strict";var r=n(996);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},4916:(e,t,n)=>{var r=n(5968);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}}},5996:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},6400:(e,t,n)=>{var r=n(8928),i=n(5996),o=n(3280)("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}},1528:(e,t,n)=>{"use strict";var r=n(5968),i=n(3040);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}},6792:(e,t,n)=>{"use strict";var r=n(5968),i=n(3040);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}},8580:(e,t,n)=>{var r=n(3944),i=n(3412),o=n(2456),a=n(3984);e.exports=function(e,t){for(var n=i(t),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];r(e,l)||s(e,l,c(t,l))}}},9700:(e,t,n)=>{var r=n(996);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3419:(e,t,n)=>{"use strict";var r=n(7963).IteratorPrototype,i=n(5156),o=n(4848),a=n(3532),s=n(476),c=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,u,!1,!0),s[u]=c,e}},784:(e,t,n)=>{var r=n(376),i=n(3984),o=n(4848);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},4848:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2652:(e,t,n)=>{"use strict";var r=n(5880),i=n(3984),o=n(4848);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},9436:(e,t,n)=>{"use strict";var r=n(2808),i=n(3419),o=n(5432),a=n(1640),s=n(3532),c=n(784),u=n(7376),l=n(3280),d=n(8820),f=n(476),p=n(7963),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 S,k,T,E=function(e){if(e===p&&L)return L;if(!m&&e in O)return O[e];switch(e){case v:case y:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",C=!1,O=e.prototype,N=O[g]||O["@@iterator"]||p&&O[p],L=!m&&N||E(p),R="Array"==t&&O.entries||N;if(R&&(S=o(R.call(new e)),h!==Object.prototype&&S.next&&(d||o(S)===h||(a?a(S,h):"function"!=typeof S[g]&&c(S,g,_)),s(S,I,!0,!0),d&&(f[I]=_))),p==y&&N&&N.name!==y&&(C=!0,L=function(){return N.call(this)}),d&&!x||O[g]===L||c(O,g,L),f[t]=L,p)if(k={values:E(y),keys:b?L:E(v),entries:E(w)},x)for(T in k)(m||C||!(T in O))&&u(O,T,k[T]);else r({target:t,proto:!0,forced:m||C},k);return k}},376:(e,t,n)=>{var r=n(996);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4111:(e,t,n)=>{var r=n(4280),i=n(6840),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},3060: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}},2552:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2808:(e,t,n)=>{var r=n(4280),i=n(2456).f,o=n(784),a=n(7376),s=n(1016),c=n(8580),u=n(7724);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],!u(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},996:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},8284:(e,t,n)=>{"use strict";n(4016);var r=n(7376),i=n(996),o=n(3280),a=n(2804),s=n(784),c=o("species"),u=!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[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!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)}},3596:(e,t,n)=>{var r=n(3040);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)}}},3904:(e,t,n)=>{var r=n(2328),i=n(4280),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]}},6648:(e,t,n)=>{var r=n(6400),i=n(476),o=n(3280)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},460:(e,t,n)=>{var r=n(5968),i=n(6648);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},4516:(e,t,n)=>{var r=n(8820),i=n(460);e.exports=r?i:function(e){return Map.prototype.entries.call(e)}},4892:(e,t,n)=>{var r=n(8820),i=n(460);e.exports=r?i:function(e){return Set.prototype.values.call(e)}},4280:(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")()},3944:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},1976:e=>{e.exports={}},4128:(e,t,n)=>{var r=n(3904);e.exports=r("document","documentElement")},4544:(e,t,n)=>{var r=n(376),i=n(996),o=n(4111);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8048:(e,t,n)=>{var r=n(996),i=n(5996),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},196:(e,t,n)=>{var r=n(7536),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},8264:(e,t,n)=>{var r,i,o,a=n(4688),s=n(4280),c=n(6840),u=n(784),l=n(3944),d=n(7996),f=n(1976),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 u(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(!c(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3976:(e,t,n)=>{var r=n(3280),i=n(476),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},1444:(e,t,n)=>{var r=n(5996);e.exports=Array.isArray||function(e){return"Array"==r(e)}},7724:(e,t,n)=>{var r=n(996),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=c&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},6840:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8820:e=>{e.exports=!1},596:(e,t,n)=>{var r=n(5968),i=n(3976),o=n(1688),a=n(3596),s=n(6648),c=n(4916),u=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 u)return g;return new u(!1)}f=p.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(g=c(f,w,y.value,l))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},7963:(e,t,n)=>{"use strict";var r,i,o,a=n(5432),s=n(784),c=n(3944),u=n(3280),l=n(8820),d=u("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):f=!0),null==r&&(r={}),l||c(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},476:e=>{e.exports={}},5976:(e,t,n)=>{var r=n(996);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},3172:(e,t,n)=>{var r=n(996),i=n(3280),o=n(8820),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}))},4688:(e,t,n)=>{var r=n(4280),i=n(196),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},9584:(e,t,n)=>{"use strict";var r=n(376),i=n(996),o=n(3008),a=n(7928),s=n(8),c=n(8648),u=n(8048),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=c(e),i=arguments.length,l=1,d=a.f,f=s.f;i>l;)for(var p,h=u(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},5156:(e,t,n)=>{var r,i=n(5968),o=n(6800),a=n(2552),s=n(1976),c=n(4128),u=n(4111),l=n(7996),d="prototype",f="script",p=l("IE_PROTO"),h=function(){},m=function(e){return"<"+f+">"+e+"</"+f+">"},g=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g=r?function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):(t=u("iframe"),n="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete g[d][a[i]];return g()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=i(e),n=new h,h[d]=null,n[p]=e):n=g(),void 0===t?n:o(n,t)}},6800:(e,t,n)=>{var r=n(376),i=n(3984),o=n(5968),a=n(3008);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,c=0;s>c;)i.f(e,n=r[c++],t[n]);return e}},3984:(e,t,n)=>{var r=n(376),i=n(4544),o=n(5968),a=n(5880),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}},2456:(e,t,n)=>{var r=n(376),i=n(8),o=n(4848),a=n(2576),s=n(5880),c=n(3944),u=n(4544),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return o(!i.f.call(e,t),e[t])}},220:(e,t,n)=>{var r=n(1216),i=n(2552).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7928:(e,t)=>{t.f=Object.getOwnPropertySymbols},5432:(e,t,n)=>{var r=n(3944),i=n(8648),o=n(7996),a=n(9700),s=o("IE_PROTO"),c=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?c:null}},1216:(e,t,n)=>{var r=n(3944),i=n(2576),o=n(7299).indexOf,a=n(1976);e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},3008:(e,t,n)=>{var r=n(1216),i=n(2552);e.exports=Object.keys||function(e){return r(e,i)}},8:(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},1640:(e,t,n)=>{var r=n(5968),i=n(6960);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)},3412:(e,t,n)=>{var r=n(3904),i=n(220),o=n(7928),a=n(5968);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},2328:(e,t,n)=>{var r=n(4280);e.exports=r},1656:(e,t,n)=>{var r=n(7376);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},7376:(e,t,n)=>{var r=n(4280),i=n(784),o=n(3944),a=n(1016),s=n(196),c=n(8264),u=c.get,l=c.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var c=!!s&&!!s.unsafe,u=!!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?(c?!f&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},9792:(e,t,n)=>{var r=n(5996),i=n(2804);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)}},2804:(e,t,n)=>{"use strict";var r,i,o=n(736),a=n(8288),s=RegExp.prototype.exec,c=String.prototype.replace,u=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)&&(u=function(e){var t,n,r,i,a=this,u=d&&a.sticky,p=o.call(a),h=a.source,m=0,g=e;return u&&(-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(u?n:a,g),u?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&&c.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},736:(e,t,n)=>{"use strict";var r=n(5968);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}},8288:(e,t,n)=>{"use strict";var r=n(996);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")}))},1952:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4004:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},1016:(e,t,n)=>{var r=n(4280),i=n(784);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},3532:(e,t,n)=>{var r=n(3984).f,i=n(3944),o=n(3280)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},7996:(e,t,n)=>{var r=n(9364),i=n(1732),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},7536:(e,t,n)=>{var r=n(4280),i=n(1016),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},9364:(e,t,n)=>{var r=n(8820),i=n(7536);(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)"})},592:(e,t,n)=>{var r=n(5968),i=n(3040),o=n(3280)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8540:(e,t,n)=>{var r=n(3509),i=n(1952),o=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},4248: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)},c=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))},u=function(e){var n=[];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);var r,u,l=e.length,d=128,f=0,p=72;for(r=0;r<e.length;r++)(u=e[r])<128&&n.push(a(u));var h=n.length,m=h;for(h&&n.push("-");m<l;){var g=t;for(r=0;r<e.length;r++)(u=e[r])>=d&&u<g&&(g=u);var v=m+1;if(g-d>o((t-f)/v))throw RangeError(i);for(f+=(g-d)*v,d=g,r=0;r<e.length;r++){if((u=e[r])<d&&++f>t)throw RangeError(i);if(u==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-_;n.push(a(s(_+b%x))),y=o(b/x)}n.push(a(s(y))),p=c(f,v,m==h),f=0,++m}}++f,++d}return n.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--"+u(i):i);return o.join(".")}},9616:(e,t,n)=>{var r=n(996),i=n(2308);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},6452:(e,t,n)=>{var r=n(1952),i="["+n(2308)+"]",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)}},9924:(e,t,n)=>{var r=n(3509),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)}},2576:(e,t,n)=>{var r=n(8048),i=n(1952);e.exports=function(e){return r(i(e))}},3509:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},1688:(e,t,n)=>{var r=n(3509),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},8648:(e,t,n)=>{var r=n(1952);e.exports=function(e){return Object(r(e))}},5880:(e,t,n)=>{var r=n(6840);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")}},8928:(e,t,n)=>{var r={};r[n(3280)("toStringTag")]="z",e.exports="[object z]"===String(r)},1732:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},5112:(e,t,n)=>{var r=n(5976);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3280:(e,t,n)=>{var r=n(4280),i=n(9364),o=n(3944),a=n(1732),s=n(5976),c=n(5112),u=i("wks"),l=r.Symbol,d=c?l:l&&l.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(l,e)?u[e]=l[e]:u[e]=d("Symbol."+e)),u[e]}},2308:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},3224:(e,t,n)=>{"use strict";var r=n(2576),i=n(5775),o=n(476),a=n(8264),s=n(9436),c="Array Iterator",u=a.set,l=a.getterFor(c);e.exports=s(Array,"Array",(function(e,t){u(this,{type:c,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")},2048:(e,t,n)=>{"use strict";var r=n(2808),i=n(1444),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)}})},5960:(e,t,n)=>{"use strict";var r=n(2808),i=n(3040),o=n(8648),a=n(996),s=n(1452),c=[],u=c.sort,l=a((function(){c.sort(void 0)})),d=a((function(){c.sort(null)})),f=s("sort");r({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},4016:(e,t,n)=>{"use strict";var r=n(2808),i=n(2804);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},4024:(e,t,n)=>{"use strict";var r=n(8540).charAt,i=n(8264),o=n(9436),a="String Iterator",s=i.set,c=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=c(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})}))},7768:(e,t,n)=>{"use strict";var r=n(8284),i=n(5968),o=n(8648),a=n(1688),s=n(3509),c=n(1952),u=n(3696),l=n(9792),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=c(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 c=i(e),p=String(this),h="function"==typeof r;h||(r=String(r));var m=c.global;if(m){var _=c.unicode;c.lastIndex=0}for(var b=[];;){var x=l(c,p);if(null===x)break;if(b.push(x),!m)break;""===String(x[0])&&(c.lastIndex=u(p,a(c.lastIndex),_))}for(var S,k="",T=0,E=0;E<b.length;E++){x=b[E];for(var I=String(x[0]),C=d(f(s(x.index),p.length),0),O=[],N=1;N<x.length;N++)O.push(void 0===(S=x[N])?S:String(S));var L=x.groups;if(h){var R=[I].concat(O,C,p);void 0!==L&&R.push(L);var A=String(r.apply(void 0,R))}else A=w(I,p,C,O,L,r);C>=T&&(k+=p.slice(T,C)+A,T=C+I.length)}return k+p.slice(T)}];function w(e,n,r,i,a,s){var c=r+e.length,u=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(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>u){var d=p(l/10);return 0===d?t:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},9624:(e,t,n)=>{"use strict";var r=n(2808),i=n(6452).trim;r({target:"String",proto:!0,forced:n(9616)("trim")},{trim:function(){return i(this)}})},1088:(e,t,n)=>{"use strict";var r=n(2808),i=n(376),o=n(4280),a=n(3944),s=n(6840),c=n(3984).f,u=n(8580),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};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var h=p.toString,m="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;c(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})}},3656:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},4107:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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!c(n,(function(e,n){if(!r(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},9896:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},8252:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop(e)}),void 0,!0,!0).result}})},6832:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop(n)}),void 0,!0,!0).result}})},7240:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4516),s=n(4004),c=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(e){return c(a(o(this)),(function(t,n){if(s(n,e))return c.stop()}),void 0,!0,!0).stopped}})},2288:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4516),s=n(596);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}})},5396:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},2480:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},7190:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},5036:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(4516),c=n(596);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),c(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}})},4736:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},2520:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040);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}})},9328:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(1528);r({target:"Set",proto:!0,real:!0,forced:i},{addAll:function(){return o.apply(this,arguments)}})},4560:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"Set",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},8712:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{difference:function(e){var t=a(this),n=new(c(t,o("Set")))(t),r=s(n.delete);return u(e,(function(e){r.call(n,e)})),n}})},9708:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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!c(n,(function(e){if(!r(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},7976:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},5600:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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 c(n,(function(e){if(r(e,e,t))return c.stop(e)}),void 0,!1,!0).result}})},7452:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{intersection:function(e){var t=a(this),n=new(c(t,o("Set"))),r=s(t.has),i=s(n.add);return u(e,(function(e){r.call(t,e)&&i.call(n,e)})),n}})},8636:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},1524:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(460),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:function(e){var t=c(this),n=a(e),r=n.has;return"function"!=typeof r&&(n=new(o("Set"))(e),r=s(n.has)),!u(t,(function(e){if(!1===r.call(n,e))return u.stop()}),void 0,!1,!0).stopped}})},8836:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},5040:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4892),s=n(596);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)}})},1728:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{map:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(t,o("Set"))),f=s(i.add);return d(n,(function(e){f.call(i,r(e,e,t))}),void 0,!1,!0),i}})},80:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(4892),c=n(596);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),c(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}})},1124:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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 c(n,(function(e){if(r(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},9600:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:function(e){var t=a(this),n=new(c(t,o("Set")))(t),r=s(n.delete),i=s(n.add);return u(e,(function(e){r.call(n,e)||i.call(n,e)})),n}})},8932:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=a(this),n=new(c(t,o("Set")))(t);return u(e,s(n.add),n),n}})},6056:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"WeakMap",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},9952:(e,t,n)=>{var r=n(4280),i=n(3060),o=n(3224),a=n(784),s=n(3280),c=s("iterator"),u=s("toStringTag"),l=o.values;for(var d in i){var f=r[d],p=f&&f.prototype;if(p){if(p[c]!==l)try{a(p,c,l)}catch(e){p[c]=l}if(p[u]||a(p,u,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]}}}},6552:(e,t,n)=>{"use strict";n(3224);var r=n(2808),i=n(3904),o=n(3172),a=n(7376),s=n(1656),c=n(3532),u=n(3419),l=n(8264),d=n(7852),f=n(3944),p=n(3596),h=n(6400),m=n(5968),g=n(6840),v=n(5156),y=n(4848),w=n(460),_=n(6648),b=n(3280),x=i("fetch"),S=i("Headers"),k=b("iterator"),T="URLSearchParams",E=T+"Iterator",I=l.set,C=l.getterFor(T),O=l.getterFor(E),N=/\+/g,L=Array(4),R=function(e){return L[e-1]||(L[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},A=function(e){try{return decodeURIComponent(e)}catch(t){return e}},P=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(R(n--),A);return t}},M=/[!'()~]|%20/g,U={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},W=function(e){return U[e]},j=function(e){return encodeURIComponent(e).replace(M,W)},B=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:P(r.shift()),value:P(r.join("="))}))},D=function(e){this.entries.length=0,B(this.entries,e)},G=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=u((function(e,t){I(this,{type:E,iterator:w(C(e).entries),kind:t})}),"Iterator",(function(){var e=O(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})),F=function(){d(this,F,T);var e,t,n,r,i,o,a,s,c,u=arguments.length>0?arguments[0]:void 0,l=[];if(I(this,{type:T,entries:l,updateURL:function(){},updateSearchParams:D}),void 0!==u)if(g(u))if("function"==typeof(e=_(u)))for(n=(t=e.call(u)).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");l.push({key:a.value+"",value:s.value+""})}else for(c in u)f(u,c)&&l.push({key:c,value:u[c]+""});else B(l,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},z=F.prototype;s(z,{append:function(e,t){G(arguments.length,2);var n=C(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){G(arguments.length,1);for(var t=C(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){G(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){G(arguments.length,1);for(var t=C(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){G(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){G(arguments.length,1);for(var n,r=C(this),i=r.entries,o=!1,a=e+"",s=t+"",c=0;c<i.length;c++)(n=i[c]).key===a&&(o?i.splice(c--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=C(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=C(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(z,k,z.entries),a(z,"toString",(function(){for(var e,t=C(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(j(e.key)+"="+j(e.value));return n.join("&")}),{enumerable:!0}),c(F,T),r({global:!0,forced:!o},{URLSearchParams:F}),o||"function"!=typeof x||"function"!=typeof S||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)===T&&((r=t.headers?new S(t.headers):new S).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:F,getState:C}},6856:(e,t,n)=>{"use strict";n(4024);var r,i=n(2808),o=n(376),a=n(3172),s=n(4280),c=n(6800),u=n(7376),l=n(7852),d=n(3944),f=n(9584),p=n(7580),h=n(8540).codeAt,m=n(4248),g=n(3532),v=n(6552),y=n(8264),w=s.URL,_=v.URLSearchParams,b=v.getState,x=y.set,S=y.getterFor("URL"),k=Math.floor,T=Math.pow,E="Invalid scheme",I="Invalid host",C="Invalid port",O=/[A-Za-z]/,N=/[\d+-.A-Za-z]/,L=/\d/,R=/^(0x|0X)/,A=/^[0-7]+$/,P=/^\d+$/,M=/^[\dA-Fa-f]+$/,U=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,W=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,j=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,D=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return I;if(!(n=q(t.slice(1,-1))))return I;e.host=n}else if(X(e)){if(t=m(t),U.test(t))return I;if(null===(n=G(t)))return I;e.host=n}else{if(W.test(t))return I;for(n="",r=p(t),i=0;i<r.length;i++)n+=Y(r[i],z);e.host=n}},G=function(e){var t,n,r,i,o,a,s,c=e.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=R.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?P:8==o?A:M).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>=T(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*T(256,3-r);return s},q=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&M.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>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++}c[u]=256*c[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c},F=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},z={},V=f({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),K=f({},V,{"#":1,"?":1,"{":1,"}":1}),H=f({},K,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var n=h(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},Q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(e){return d(Q,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},$=function(e,t){var n;return 2==e.length&&O.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&$(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&&$(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ce={},ue={},le={},de={},fe={},pe={},he={},me={},ge={},ve={},ye={},we={},_e={},be={},xe={},Se={},ke=function(e,t,n,i){var o,a,s,c,u,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(j,"")),t=t.replace(B,""),o=p(t);f<=o.length;){switch(a=o[f],l){case re:if(!a||!O.test(a)){if(n)return E;l=oe;continue}h+=a.toLowerCase(),l=ie;break;case ie:if(a&&(N.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return E;h="",l=oe,f=0;continue}if(n&&(X(e)!=d(Q,h)||"file"==h&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(X(e)&&Q[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?l=ge:X(e)&&i&&i.scheme==e.scheme?l=ae:X(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 E;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Se;break}l="file"==i.scheme?ge:ce;continue;case ae:if("/"!=a||"/"!=o[f+1]){l=ce;continue}l=de,f++;break;case se:if("/"==a){l=fe;break}l=_e;continue;case ce: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&&X(e))l=ue;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=Se}break;case ue:if(!X(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 _=Y(w,H);v?e.password+=_:e.username+=_}else v=!0}h=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(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&&X(e)){if(X(e)&&""==h)return I;if(n&&""==h&&(J(e)||null!==e.port))return;if(c=D(e,h))return c;if(h="",l=we,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),h+=a}else{if(""==h)return I;if(c=D(e,h))return c;if(h="",l=me,n==he)return}break;case me:if(!L.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)||n){if(""!=h){var b=parseInt(h,10);if(b>65535)return C;e.port=X(e)&&b===Q[e.scheme]?null:b,h=""}if(n)return;l=we;continue}return C}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=Se}}break;case ve:if("/"==a||"\\"==a){l=ye;break}i&&"file"==i.scheme&&!ee(o.slice(f).join(""))&&($(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&&$(h))l=_e;else if(""==h){if(e.host="",n)return;l=we}else{if(c=D(e,h))return c;if("localhost"==e.host&&(e.host=""),n)return;h="",l=we}continue}h+=a;break;case we:if(X(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=Se;else e.query="",l=xe;break;case _e:if(a==r||"/"==a||"\\"==a&&X(e)||!n&&("?"==a||"#"==a)){if(".."===(u=(u=h).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(te(e),"/"==a||"\\"==a&&X(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&X(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&$(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=Se)}else h+=Y(a,K);break;case be:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Se):a!=r&&(e.path[0]+=Y(a,z));break;case xe:n||"#"!=a?a!=r&&("'"==a&&X(e)?e.query+="%27":e.query+="#"==a?"%23":Y(a,z)):(e.fragment="",l=Se);break;case Se:a!=r&&(e.fragment+=Y(a,V))}f++}},Te=function(e){var t,n,r=l(this,Te,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Te)t=S(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var c=s.searchParams=new _,u=b(c);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(c)||null},o||(r.href=Ie.call(r),r.origin=Ce.call(r),r.protocol=Oe.call(r),r.username=Ne.call(r),r.password=Le.call(r),r.host=Re.call(r),r.hostname=Ae.call(r),r.port=Pe.call(r),r.pathname=Me.call(r),r.search=Ue.call(r),r.searchParams=We.call(r),r.hash=je.call(r))},Ee=Te.prototype,Ie=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",J(e)&&(u+=n+(r?":"+r:"")+"@"),u+=F(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},Ce=function(){var e=S(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&&X(e)?t+"://"+F(e.host)+(null!==n?":"+n:""):"null"},Oe=function(){return S(this).scheme+":"},Ne=function(){return S(this).username},Le=function(){return S(this).password},Re=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?F(t):F(t)+":"+n},Ae=function(){var e=S(this).host;return null===e?"":F(e)},Pe=function(){var e=S(this).port;return null===e?"":String(e)},Me=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=S(this).query;return e?"?"+e:""},We=function(){return S(this).searchParams},je=function(){var e=S(this).fragment;return e?"#"+e:""},Be=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&c(Ee,{href:Be(Ie,(function(e){var t=S(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);b(t.searchParams).updateSearchParams(t.query)})),origin:Be(Ce),protocol:Be(Oe,(function(e){var t=S(this);ke(t,String(e)+":",re)})),username:Be(Ne,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=Y(n[r],H)}})),password:Be(Le,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=Y(n[r],H)}})),host:Be(Re,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Be(Ae,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),he)})),port:Be(Pe,(function(e){var t=S(this);Z(t)||(""==(e=String(e))?t.port=null:ke(t,e,me))})),pathname:Be(Me,(function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",we))})),search:Be(Ue,(function(e){var t=S(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:Be(We),hash:Be(je,(function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Se)):t.fragment=null}))}),u(Ee,"toJSON",(function(){return Ie.call(this)}),{enumerable:!0}),u(Ee,"toString",(function(){return Ie.call(this)}),{enumerable:!0}),w){var De=w.createObjectURL,Ge=w.revokeObjectURL;De&&u(Te,"createObjectURL",(function(e){return De.apply(w,arguments)})),Ge&&u(Te,"revokeObjectURL",(function(e){return Ge.apply(w,arguments)}))}g(Te,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Te})},512: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=t,r="function"==typeof atob,i="function"==typeof btoa,o="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,s="function"==typeof TextEncoder?new TextEncoder:void 0,c=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(e={},c.forEach((function(t,n){return e[t]=n})),e),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,d=String.fromCharCode.bind(String),f="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))},p=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},h=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(e){for(var t,n,r,i,o="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=c[(t=n<<16|r<<8|i)>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},g=i?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:m,v=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(d.apply(null,e.subarray(n,n+4096)));return g(t.join(""))},y=function(e,t){return void 0===t&&(t=!1),t?p(v(e)):v(e)},w=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(e){return e.replace(_,w)},x=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:s?function(e){return v(s.encode(e))}:function(e){return g(b(e))},S=function(e,t){return void 0===t&&(t=!1),t?p(x(e)):x(e)},k=function(e){return S(e,!0)},T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=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 d(55296+(t>>>10))+d(56320+(1023&t));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=function(e){return e.replace(T,E)},C=function(e){if(e=e.replace(/\s+/g,""),!l.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?d(t>>16&255):64===r?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,255&t);return i},O=r?function(e){return atob(h(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:C,N=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(O(e),(function(e){return e.charCodeAt(0)}))},L=function(e){return N(A(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(N(e))}:function(e){return I(O(e))},A=function(e){return h(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},P=function(e){return R(A(e))},M=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},U=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,M(t))};e("fromBase64",(function(){return P(this)})),e("toBase64",(function(e){return S(this,e)})),e("toBase64URI",(function(){return S(this,!0)})),e("toBase64URL",(function(){return S(this,!0)})),e("toUint8Array",(function(){return L(this)}))},W=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,M(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},j={version:t,VERSION:n,atob:O,atobPolyfill:C,btoa:g,btoaPolyfill:m,fromBase64:P,toBase64:S,encode:S,encodeURI:k,encodeURL:k,utob:b,btou:I,decode:P,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:y,toUint8Array:L,extendString:U,extendUint8Array:W,extendBuiltins:function(){U(),W()},Base64:{}};return Object.keys(j).forEach((function(e){return j.Base64[e]=j[e]})),j}()},6148: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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=r.slice(-2),u=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&c>=11&&c<=19?"zero":1==a&&11!=s||2==i&&1==u&&11!=c||2!=i&&1==u?"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),c=i.slice(-1),u=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==c&&11!=u?"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),c=r.slice(-2),u=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&c>=11&&c<=19?"zero":1==a&&11!=s||2==i&&1==u&&11!=c||2!=i&&1==u?"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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=r.slice(-1),u=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==c&&11!=u?"one":i&&c>=2&&c<=4&&(u<12||u>14)?"few":i&&0==c||i&&c>=5&&c<=9||i&&u>=11&&u<=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:$e},a=$e,s="#",c=He("#",!1),u=function(){return dt[0]},l=function(){return{type:"octothorpe"}},d=function(e){return e.join("")},f="{",p=He("{",!1),h="}",m=He("}",!1),g=function(e){return{type:"argument",arg:e}},v=",",y=He(",",!1),w="select",_=He("select",!1),b=function(e,n){return t.strict&&dt.unshift(!1),n},x=function(e,n){return t.strict&&dt.shift(),{type:"select",arg:e,cases:n}},S="plural",k=He("plural",!1),T="selectordinal",E=He("selectordinal",!1),I=function(e,t){return dt.unshift(!0),t},C=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`.")})),dt.shift(),{type:n,arg:e,offset:r||0,cases:i}},O=function(e,t,n){return{type:"function",arg:e,key:t,param:n}},N=Qe("identifier"),L=/^[^\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]/,R=Ye([["\t","\r"]," ","…","‎","‏","\u2028","\u2029",["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!0,!1),A=function(e,t){return{key:e,tokens:t}},P=function(e){return e},M=Qe("plural offset"),U="offset",W=He("offset",!1),j=":",B=He(":",!1),D=function(e){return e},G="=",q=He("=",!1),F="number",z=He("number",!1),V="date",K=He("date",!1),H="time",Y=He("time",!1),Q="spellout",X=He("spellout",!1),J="ordinal",Z=He("ordinal",!1),$="duration",ee=He("duration",!1),te=function(e){if(t.strict||/^\d/.test(e))return!1;switch(e.toLowerCase()){case"select":case"plural":case"selectordinal":return!1;default:return!0}},ne=function(e){return e},re=function(e){return!t.strict},ie=function(e){return{tokens:e}},oe=function(e){return{tokens:[e.join("")]}},ae=Qe("a valid (strict) function parameter"),se=/^[^'{}]/,ce=Ye(["'","{","}"],!0,!1),ue=function(e){return e.join("")},le="'",de=He("'",!1),fe=function(e){return e},pe=function(e){return"{"+e.join("")+"}"},he=Qe("doubled apostrophe"),me="''",ge=He("''",!1),ve=function(){return"'"},ye=/^[^']/,we=Ye(["'"],!0,!1),_e="'{",be=He("'{",!1),xe=function(e){return"{"+e.join("")},Se="'}",ke=He("'}",!1),Te=function(e){return"}"+e.join("")},Ee=Qe("escaped string"),Ie="'#",Ce=He("'#",!1),Oe=function(e){return"#"+e.join("")},Ne=function(e){return e[0]},Le=Qe("plain char"),Re=/^[^{}#\0-\x08\x0E-\x1F\x7F]/,Ae=Ye(["{","}","#",["\0","\b"],["",""],""],!0,!1),Pe=function(e){return!dt[0]},Me=function(e){return e},Ue=Qe("integer"),We=/^[0-9]/,je=Ye([["0","9"]],!1,!1),Be=Qe("white space"),De=/^[\t-\r \x85\u200E\u200F\u2028\u2029]/,Ge=Ye([["\t","\r"]," ","…","‎","‏","\u2028","\u2029"],!1,!1),qe=0,Fe=[{line:1,column:1}],ze=0,Ve=[],Ke=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 He(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ye(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Qe(e){return{type:"other",description:e}}function Xe(t){var n,r=Fe[t];if(r)return r;for(n=t-1;!Fe[n];)n--;for(r={line:(r=Fe[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Fe[t]=r,r}function Je(e,t){var n=Xe(e),r=Xe(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Ze(e){qe<ze||(qe>ze&&(ze=qe,Ve=[]),Ve.push(e))}function $e(){var e,t;for(e=[],t=et();t!==i;)e.push(t),t=et();return e}function et(){var t,n,r;if((t=function(){var t,n,r,o;return t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i&&lt()!==i&&(r=tt())!==i&&lt()!==i?(125===e.charCodeAt(qe)?(o=h,qe++):(o=i,0===Ke&&Ze(m)),o!==i?t=n=g(r):(qe=t,t=i)):(qe=t,t=i),t}())===i&&(t=function(){var t,n,r,o,a,s,c,u,l;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(lt()!==i)if((r=tt())!==i)if(lt()!==i)if(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i)if(lt()!==i)if(e.substr(qe,6)===w?(a=w,qe+=6):(a=i,0===Ke&&Ze(_)),a!==i&&(a=b(r,a)),a!==i)if((a=lt())!==i)if(44===e.charCodeAt(qe)?(s=v,qe++):(s=i,0===Ke&&Ze(y)),s!==i)if(lt()!==i){if(c=[],(u=nt())!==i)for(;u!==i;)c.push(u),u=nt();else c=i;c!==i&&(u=lt())!==i?(125===e.charCodeAt(qe)?(l=h,qe++):(l=i,0===Ke&&Ze(m)),l!==i?t=n=x(r,c):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,c,u,l,d,g;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(lt()!==i)if((r=tt())!==i)if(lt()!==i)if(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i)if(lt()!==i)if(qe,e.substr(qe,6)===S?(s=S,qe+=6):(s=i,0===Ke&&Ze(k)),s===i&&(e.substr(qe,13)===T?(s=T,qe+=13):(s=i,0===Ke&&Ze(E))),s!==i&&(s=I(r,s)),(a=s)!==i)if((s=lt())!==i)if(44===e.charCodeAt(qe)?(c=v,qe++):(c=i,0===Ke&&Ze(y)),c!==i)if(lt()!==i)if((u=function(){var t,n,r,o;return Ke++,t=qe,lt()!==i?(e.substr(qe,6)===U?(n=U,qe+=6):(n=i,0===Ke&&Ze(W)),n!==i&&lt()!==i?(58===e.charCodeAt(qe)?(r=j,qe++):(r=i,0===Ke&&Ze(B)),r!==i&&lt()!==i&&(o=ut())!==i&&lt()!==i?t=D(o):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i),Ke--,t===i&&0===Ke&&Ze(M),t}())===i&&(u=null),u!==i){if(l=[],(d=rt())!==i)for(;d!==i;)l.push(d),d=rt();else l=i;l!==i&&(d=lt())!==i?(125===e.charCodeAt(qe)?(g=h,qe++):(g=i,0===Ke&&Ze(m)),g!==i?t=n=C(r,a,u,l):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,c;return t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i&&lt()!==i&&(r=tt())!==i&&lt()!==i?(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i&&lt()!==i&&(a=function(){var t,n,r,o,a;return e.substr(qe,6)===F?(t=F,qe+=6):(t=i,0===Ke&&Ze(z)),t===i&&(e.substr(qe,4)===V?(t=V,qe+=4):(t=i,0===Ke&&Ze(K)),t===i&&(e.substr(qe,4)===H?(t=H,qe+=4):(t=i,0===Ke&&Ze(Y)),t===i&&(e.substr(qe,8)===Q?(t=Q,qe+=8):(t=i,0===Ke&&Ze(X)),t===i&&(e.substr(qe,7)===J?(t=J,qe+=7):(t=i,0===Ke&&Ze(Z)),t===i&&(e.substr(qe,8)===$?(t=$,qe+=8):(t=i,0===Ke&&Ze(ee)),t===i&&(t=qe,n=qe,Ke++,e.substr(qe,6)===w?(r=w,qe+=6):(r=i,0===Ke&&Ze(_)),Ke--,r===i?n=void 0:(qe=n,n=i),n!==i?(r=qe,Ke++,e.substr(qe,6)===S?(o=S,qe+=6):(o=i,0===Ke&&Ze(k)),Ke--,o===i?r=void 0:(qe=r,r=i),r!==i?(o=qe,Ke++,e.substr(qe,13)===T?(a=T,qe+=13):(a=i,0===Ke&&Ze(E)),Ke--,a===i?o=void 0:(qe=o,o=i),o!==i&&(a=tt())!==i&&(te(a)?void 0:i)!==i?t=n=ne(a):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i))))))),t}())!==i&&lt()!==i?((s=function(){var t,n,r,o;if(t=qe,lt()!==i)if(44===e.charCodeAt(qe)?(n=v,qe++):(n=i,0===Ke&&Ze(y)),n!==i){for(r=[],o=et();o!==i;)r.push(o),o=et();r!==i&&(o=(o=re(r))?void 0:i)!==i?t=ie(r):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;if(t===i)if(t=qe,lt()!==i)if(44===e.charCodeAt(qe)?(n=v,qe++):(n=i,0===Ke&&Ze(y)),n!==i){for(r=[],o=ot();o!==i;)r.push(o),o=ot();r!==i?t=oe(r):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;return t}())===i&&(s=null),s!==i?(125===e.charCodeAt(qe)?(c=h,qe++):(c=i,0===Ke&&Ze(m)),c!==i?t=n=O(r,a,s):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i),t}())===i&&(t=qe,35===e.charCodeAt(qe)?(n=s,qe++):(n=i,0===Ke&&Ze(c)),n!==i&&(r=(r=u())?void 0:i)!==i?t=n=l():(qe=t,t=i),t===i)){if(t=qe,n=[],(r=ct())!==i)for(;r!==i;)n.push(r),r=ct();else n=i;n!==i&&(n=d(n)),t=n}return t}function tt(){var t,n,r;if(Ke++,t=qe,n=[],L.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(R)),r!==i)for(;r!==i;)n.push(r),L.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(R));else n=i;return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(N)),t}function nt(){var e,t,n;return e=qe,lt()!==i&&(t=tt())!==i&&lt()!==i&&(n=it())!==i?e=A(t,n):(qe=e,e=i),e}function rt(){var t,n,r;return t=qe,lt()!==i&&(n=function(){var t,n,r;return(t=tt())===i&&(t=qe,61===e.charCodeAt(qe)?(n=G,qe++):(n=i,0===Ke&&Ze(q)),n!==i&&(r=ut())!==i?t=n=D(r):(qe=t,t=i)),t}())!==i&&lt()!==i&&(r=it())!==i?t=A(n,r):(qe=t,t=i),t}function it(){var t,n,r,o,a,s;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(r=qe,(o=lt())!==i?(a=qe,Ke++,123===e.charCodeAt(qe)?(s=f,qe++):(s=i,0===Ke&&Ze(p)),Ke--,s!==i?(qe=a,a=void 0):a=i,a!==i?r=o=[o,a]:(qe=r,r=i)):(qe=r,r=i),r===i&&(r=null),r!==i){for(o=[],a=et();a!==i;)o.push(a),a=et();o!==i&&(a=lt())!==i?(125===e.charCodeAt(qe)?(s=h,qe++):(s=i,0===Ke&&Ze(m)),s!==i?t=n=P(o):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;return t}function ot(){var t,n,r,o;if(Ke++,t=qe,n=[],se.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(ce)),r!==i)for(;r!==i;)n.push(r),se.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(ce));else n=i;if(n!==i&&(n=ue(n)),(t=n)===i&&(t=at())===i&&(t=qe,39===e.charCodeAt(qe)?(n=le,qe++):(n=i,0===Ke&&Ze(de)),n!==i&&(r=st())!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=fe(r):(qe=t,t=i)):(qe=t,t=i),t===i))if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i){for(r=[],o=ot();o!==i;)r.push(o),o=ot();r!==i?(125===e.charCodeAt(qe)?(o=h,qe++):(o=i,0===Ke&&Ze(m)),o!==i?t=n=pe(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;return Ke--,t===i&&(n=i,0===Ke&&Ze(ae)),t}function at(){var t,n;return Ke++,qe,e.substr(qe,2)===me?(n=me,qe+=2):(n=i,0===Ke&&Ze(ge)),n!==i&&(n=ve()),Ke--,(t=n)===i&&(n=i,0===Ke&&Ze(he)),t}function st(){var t,n,r;if((t=at())===i){if(t=qe,n=[],ye.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(we)),r!==i)for(;r!==i;)n.push(r),ye.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(we));else n=i;n!==i&&(n=d(n)),t=n}return t}function ct(){var t,n;return(t=at())===i&&(t=function(){var t,n,r,o,a,s;if(Ke++,(t=function(){var t,n,r,o;if(t=qe,e.substr(qe,2)===_e?(n=_e,qe+=2):(n=i,0===Ke&&Ze(be)),n!==i){for(r=[],o=st();o!==i;)r.push(o),o=st();r!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=xe(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;if(t===i)if(t=qe,e.substr(qe,2)===Se?(n=Se,qe+=2):(n=i,0===Ke&&Ze(ke)),n!==i){for(r=[],o=st();o!==i;)r.push(o),o=st();r!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=Te(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;return t}())===i){if(t=qe,n=qe,r=qe,e.substr(qe,2)===Ie?(o=Ie,qe+=2):(o=i,0===Ke&&Ze(Ce)),o!==i){for(a=[],s=st();s!==i;)a.push(s),s=st();a!==i?(39===e.charCodeAt(qe)?(s=le,qe++):(s=i,0===Ke&&Ze(de)),s!==i?r=o=Oe(a):(qe=r,r=i)):(qe=r,r=i)}else qe=r,r=i;r!==i&&(o=(o=u())?void 0:i)!==i?n=r=[r,o]:(qe=n,n=i),n!==i&&(n=Ne(n)),(t=n)===i&&(39===e.charCodeAt(qe)?(t=le,qe++):(t=i,0===Ke&&Ze(de)))}return Ke--,t===i&&(n=i,0===Ke&&Ze(Ee)),t}())===i&&(t=qe,35===e.charCodeAt(qe)?(n=s,qe++):(n=i,0===Ke&&Ze(c)),n!==i&&(Pe(n)?void 0:i)!==i?t=n=Me(n):(qe=t,t=i),t===i&&(t=function(){var t;return Ke++,Re.test(e.charAt(qe))?(t=e.charAt(qe),qe++):(t=i,0===Ke&&Ze(Ae)),Ke--,t===i&&0===Ke&&Ze(Le),t}())),t}function ut(){var t,n,r;if(Ke++,t=qe,n=[],We.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(je)),r!==i)for(;r!==i;)n.push(r),We.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(je));else n=i;return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(Ue)),t}function lt(){var t,n,r;for(Ke++,t=qe,n=[],De.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(Ge));r!==i;)n.push(r),De.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(Ge));return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(Be)),t}var dt=[!1];if((n=a())!==i&&qe===e.length)return n;throw n!==i&&qe<e.length&&Ze({type:"end"}),function(e,t,n){return new r(r.buildMessage(e,t),e,t,n)}(Ve,ze<e.length?e.charAt(ze):null,ze<e.length?Je(ze,ze+1):Je(ze,ze))}}},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 c(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 u(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 c in e){var u=n.hasOwnProperty(c)?c:t;s[c]=this.compile(e[c],u,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 c(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=[c(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,u(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,u(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=c(e.key,"fmt"),this.formatters[e.key]=!0;break;case"octothorpe":if(!t)return'"#"';n="number",d=[c(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[u(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(c(a),": ").concat(s))}if(0===n)return o.join("");if(0===o.length)return"{}";for(var u=" ";--n;)u+=" ";var l=o.join(",\n").replace(/^/gm,u);return"{\n".concat(l,"\n}")}(n,0)}}])&&b(t.prototype,n),e}();function S(e){return(S="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 T(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 E}));var E=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 T(e,null,[{key:"escape",value:function(e,t){var n=t?/[#{}]/g:/[{}]/g;return String(e).replace(n,"'$&'")}}]),T(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"!=S(e)){var f=new Function("number, plural, select, fmt",u(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"!=S(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(c(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 { "+c(e,"root")+" = G; }","})(this, "+g+");"].join("\n"):m+"export default "+g},_}}]),e}();E.defaultLocale="en",E.formatters=i.a}]).default},3548:(e,t,n)=>{"use strict";var r={};(0,n(12).assign)(r,n(3400),n(7888),n(944)),e.exports=r},3400:(e,t,n)=>{"use strict";var r=n(9379),i=n(12),o=n(3352),a=n(9451),s=n(6092),c=Object.prototype.toString,u=0,l=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:l,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,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(n!==u)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,h))!==u)throw new Error(a[n]);this._dict_set=!0}}function h(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(e,t){var n,a,s=this.strm,l=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]"===c.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(l),s.next_out=0,s.avail_out=l),1!==(n=r.deflate(s,a))&&n!==u)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,n===u):2!==a||(this.onEnd(u),s.avail_out=0,!0)},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===u&&("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=p,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},7888:(e,t,n)=>{"use strict";var r=n(7040),i=n(12),o=n(3352),a=n(944),s=n(9451),c=n(6092),u=n(1112),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 c,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 u,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,c,u,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?(c=o.utf8border(p.output,p.next_out),u=p.next_out-c,d=o.buf2string(p.output,c),p.next_out=u,p.avail_out=h-u,u&&i.arraySet(p.output,p.output,c,u,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},12:(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)},3352:(e,t,n)=>{"use strict";var r=n(12),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 c(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,c=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++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,o=0;a<c;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 c(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,u=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)u[r++]=i;else if((o=a[i])>4)u[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?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return c(u,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}},2696: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}},944: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}},9456: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}},9379:(e,t,n)=>{"use strict";var r,i=n(12),o=n(2976),a=n(2696),s=n(9456),c=n(9451),u=0,l=0,d=-2,f=2,p=8,h=286,m=30,g=19,v=2*h+1,y=15,w=3,_=258,b=_+w+1,x=42,S=103,k=113,T=666;function E(e,t){return e.msg=c[t],t}function I(e){return(e<<1)-(e>4?9:0)}function C(e){for(var t=e.length;--t>=0;)e[t]=0}function O(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 N(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,O(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function A(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-b?e.strstart-(e.w_size-b):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+_,p=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===h&&u[n+a-1]===p&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<f);if(r=_-(f-o),o=f-_,r>a){if(e.match_start=t,a=r,r>=s)break;p=u[o+a-1],h=u[o+a]}}}while((t=d[t&l])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead}function P(e){var t,n,r,o,c,u,l,d,f,p,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-b)){i.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=h?r-h:0}while(--n);t=n=h;do{r=e.prev[--t],e.prev[t]=r>=h?r-h:0}while(--n);o+=h}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.lookahead,f=o,p=void 0,(p=u.avail_in)>f&&(p=f),n=0===p?0:(u.avail_in-=p,i.arraySet(l,u.input,u.next_in,p,d),1===u.state.wrap?u.adler=a(u.adler,l,p,d):2===u.state.wrap&&(u.adler=s(u.adler,l,p,d)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=w)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+w-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<w)););}while(e.lookahead<b&&0!==e.strm.avail_in)}function M(e,t){for(var n,r;;){if(e.lookahead<b){if(P(e),e.lookahead<b&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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-b&&(e.match_length=A(e,n)),e.match_length>=w)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-w),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=w){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<w-1?e.strstart:w-1,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}function U(e,t){for(var n,r,i;;){if(e.lookahead<b){if(P(e),e.lookahead<b&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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=w-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-b&&(e.match_length=A(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===w&&e.strstart-e.match_start>4096)&&(e.match_length=w-1)),e.prev_length>=w&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-w,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-w),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+w-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=w-1,e.strstart++,r&&(N(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]))&&N(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<w-1?e.strstart:w-1,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}function W(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 j(){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=p,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(2*v),this.dyn_dtree=new i.Buf16(2*(2*m+1)),this.bl_tree=new i.Buf16(2*(2*g+1)),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(y+1),this.heap=new i.Buf16(2*h+1),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*h+1),C(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 B(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?x:k,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),l):E(e,d)}function D(e){var t,n=B(e);return n===l&&((t=e.state).window_size=2*t.w_size,C(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=w-1,t.match_available=0,t.ins_h=0),n}function G(e,t,n,r,o,a){if(!e)return d;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||n!==p||r<8||r>15||t<0||t>9||a<0||a>4)return E(e,d);8===r&&(r=9);var c=new j;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+w-1)/w),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,D(e)}r=[new W(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(P(e),0===e.lookahead&&t===u)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,N(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-b&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),1)})),new W(4,4,8,4,M),new W(4,5,16,8,M),new W(4,6,32,32,M),new W(4,4,16,16,U),new W(8,16,32,32,U),new W(8,16,128,128,U),new W(8,32,128,256,U),new W(32,128,258,1024,U),new W(32,258,258,4096,U)],t.deflateInit=function(e,t){return G(e,t,p,15,8,0)},t.deflateInit2=G,t.deflateReset=D,t.deflateResetKeep=B,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},t.deflate=function(e,t){var n,i,a,c;if(!e||!e.state||t>5||t<0)return e?E(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===T&&4!==t)return E(e,0===e.avail_out?-5:d);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===x)if(2===i.wrap)e.adler=0,L(i,31),L(i,139),L(i,8),i.gzhead?(L(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)),L(i,255&i.gzhead.time),L(i,i.gzhead.time>>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(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):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),L(i,3),i.status=k);else{var f=p+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=k,R(i,f),0!==i.strstart&&(R(i,e.adler>>>16),R(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)),O(e),a=i.pending,i.pending!==i.pending_buf_size));)L(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)),O(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,L(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(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)),O(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,L(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.status=S)}else i.status=S;if(i.status===S&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&O(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=k)):i.status=k),0!==i.pending){if(O(e),0===e.avail_out)return i.last_flush=-1,l}else if(0===e.avail_in&&I(t)<=I(n)&&4!==t)return E(e,-5);if(i.status===T&&0!==e.avail_in)return E(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==T){var h=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(P(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(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<=_){if(P(e),e.lookahead<=_&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=w&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+_;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=_-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=w?(n=o._tr_tally(e,1,e.match_length-w),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&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==h&&4!==h||(i.status=T),1===h||3===h)return 0===e.avail_out&&(i.last_flush=-1),l;if(2===h&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),O(e),0===e.avail_out))return i.last_flush=-1,l}return 4!==t?l:i.wrap<=0?1:(2===i.wrap?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),O(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==x&&69!==t&&73!==t&&91!==t&&t!==S&&t!==k&&t!==T?E(e,d):(e.state=null,t===k?E(e,-3):l):d},t.deflateSetDictionary=function(e,t){var n,r,o,s,c,u,f,p,h=t.length;if(!e||!e.state)return d;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==x||n.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(C(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,h-n.w_size,n.w_size,0),t=p,h=n.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=h,e.next_in=0,e.input=t,P(n);n.lookahead>=w;){r=n.strstart,o=n.lookahead-(w-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+w-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=w-1,P(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=w-1,n.match_available=0,e.next_in=u,e.input=f,e.avail_in=c,n.wrap=s,l},t.deflateInfo="pako deflate (from Nodeca project)"},1112: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}},6560:e=>{"use strict";e.exports=function(e,t){var n,r,i,o,a,s,c,u,l,d,f,p,h,m,g,v,y,w,_,b,x,S,k,T,E;n=e.state,r=e.next_in,T=e.input,i=r+(e.avail_in-5),o=e.next_out,E=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=n.dmax,u=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+=T[r++]<<h,h+=8,p+=T[r++]<<h,h+=8),w=m[p&v];t:for(;;){if(p>>>=_=w>>>24,h-=_,0==(_=w>>>16&255))E[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+=T[r++]<<h,h+=8),b+=p&(1<<_)-1,p>>>=_,h-=_),h<15&&(p+=T[r++]<<h,h+=8,p+=T[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+=T[r++]<<h,(h+=8)<_&&(p+=T[r++]<<h,h+=8)),(x+=p&(1<<_)-1)>c){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(S=0,k=f,0===d){if(S+=u-_,_<b){b-=_;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}}else if(d<_){if(S+=u+d-_,(_-=d)<b){b-=_;do{E[o++]=f[S++]}while(--_);if(S=0,d<b){b-=_=d;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}}}else if(S+=d-_,_<b){b-=_;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}for(;b>2;)E[o++]=k[S++],E[o++]=k[S++],E[o++]=k[S++],b-=3;b&&(E[o++]=k[S++],b>1&&(E[o++]=k[S++]))}else{S=o-x;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],b-=3}while(b>2);b&&(E[o++]=E[S++],b>1&&(E[o++]=E[S++]))}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}},7040:(e,t,n)=>{"use strict";var r=n(12),i=n(2696),o=n(9456),a=n(6560),s=n(6120),c=0,u=-2,l=1,d=12,f=30,p=852,h=592;function m(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){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 v(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=l,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(p),t.distcode=t.distdyn=new r.Buf32(h),t.sane=1,t.back=-1,c):u}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):u}function w(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,y(e))):u}function _(e,t){var n,r;return e?(r=new g,e.state=r,r.window=null,(n=w(e,t))!==c&&(e.state=null),n):u}var b,x,S=!0;function k(e){if(S){var t;for(b=new r.Buf32(512),x=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,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,x,0,e.work,{bits:5}),S=!1}e.lencode=b,e.lenbits=9,e.distcode=x,e.distbits=5}function T(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=y,t.inflateReset2=w,t.inflateResetKeep=v,t.inflateInit=function(e){return _(e,15)},t.inflateInit2=_,t.inflate=function(e,t){var n,p,h,g,v,y,w,_,b,x,S,E,I,C,O,N,L,R,A,P,M,U,W,j,B=0,D=new r.Buf8(4),G=[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===d&&(n.mode=13),v=e.next_out,h=e.output,w=e.avail_out,g=e.next_in,p=e.input,y=e.avail_in,_=n.hold,b=n.bits,x=y,S=w,U=c;e:for(;;)switch(n.mode){case l:if(0===n.wrap){n.mode=13;break}for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(2&n.wrap&&35615===_){n.check=0,D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0),_=0,b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",n.mode=f;break}if(8!=(15&_)){e.msg="unknown compression method",n.mode=f;break}if(b-=4,M=8+(15&(_>>>=4)),0===n.wbits)n.wbits=M;else if(M>n.wbits){e.msg="invalid window size",n.mode=f;break}n.dmax=1<<M,e.adler=n.check=1,n.mode=512&_?10:d,_=0,b=0;break;case 2:for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(n.flags=_,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=f;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=f;break}n.head&&(n.head.text=_>>8&1),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0,n.mode=3;case 3:for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.head&&(n.head.time=_),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,D[2]=_>>>16&255,D[3]=_>>>24&255,n.check=o(n.check,D,4,0)),_=0,b=0,n.mode=4;case 4:for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.head&&(n.head.xflags=255&_,n.head.os=_>>8),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.length=_,n.head&&(n.head.extra_len=_),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((E=n.length)>y&&(E=y),E&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,M)),512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;E=0;do{M=p[g+E++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M))}while(M&&E<y);if(512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,M)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break e;E=0;do{M=p[g+E++],n.head&&M&&n.length<65536&&(n.head.comment+=String.fromCharCode(M))}while(M&&E<y);if(512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,M)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_!==(65535&n.check)){e.msg="header crc mismatch",n.mode=f;break}_=0,b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=d;break;case 10:for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}e.adler=n.check=m(_),_=0,b=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,2;e.adler=n.check=1,n.mode=d;case d:if(5===t||6===t)break e;case 13:if(n.last){_>>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}switch(n.last=1&_,b-=1,3&(_>>>=1)){case 0:n.mode=14;break;case 1:if(k(n),n.mode=20,6===t){_>>>=2,b-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=f}_>>>=2,b-=2;break;case 14:for(_>>>=7&b,b-=7&b;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",n.mode=f;break}if(n.length=65535&_,_=0,b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(E=n.length){if(E>y&&(E=y),E>w&&(E=w),0===E)break e;r.arraySet(h,p,g,E,v),y-=E,g+=E,w-=E,v+=E,n.length-=E;break}n.mode=d;break;case 17:for(;b<14;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(n.nlen=257+(31&_),_>>>=5,b-=5,n.ndist=1+(31&_),_>>>=5,b-=5,n.ncode=4+(15&_),_>>>=4,b-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=f;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;b<3;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.lens[G[n.have++]]=7&_,_>>>=3,b-=3}for(;n.have<19;)n.lens[G[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,W={bits:n.lenbits},U=s(0,n.lens,0,19,n.lencode,0,n.work,W),n.lenbits=W.bits,U){e.msg="invalid code lengths set",n.mode=f;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;N=(B=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(L<16)_>>>=O,b-=O,n.lens[n.have++]=L;else{if(16===L){for(j=O+2;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_>>>=O,b-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=f;break}M=n.lens[n.have-1],E=3+(3&_),_>>>=2,b-=2}else if(17===L){for(j=O+3;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}b-=O,M=0,E=3+(7&(_>>>=O)),_>>>=3,b-=3}else{for(j=O+7;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}b-=O,M=0,E=11+(127&(_>>>=O)),_>>>=7,b-=7}if(n.have+E>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=f;break}for(;E--;)n.lens[n.have++]=M}}if(n.mode===f)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=f;break}if(n.lenbits=9,W={bits:n.lenbits},U=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,W),n.lenbits=W.bits,U){e.msg="invalid literal/lengths set",n.mode=f;break}if(n.distbits=6,n.distcode=n.distdyn,W={bits:n.distbits},U=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,W),n.distbits=W.bits,U){e.msg="invalid distances set",n.mode=f;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(y>=6&&w>=258){e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,a(e,S),v=e.next_out,h=e.output,w=e.avail_out,g=e.next_in,p=e.input,y=e.avail_in,_=n.hold,b=n.bits,n.mode===d&&(n.back=-1);break}for(n.back=0;N=(B=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(N&&0==(240&N)){for(R=O,A=N,P=L;N=(B=n.lencode[P+((_&(1<<R+A)-1)>>R)])>>>16&255,L=65535&B,!(R+(O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}_>>>=R,b-=R,n.back+=R}if(_>>>=O,b-=O,n.back+=O,n.length=L,0===N){n.mode=26;break}if(32&N){n.back=-1,n.mode=d;break}if(64&N){e.msg="invalid literal/length code",n.mode=f;break}n.extra=15&N,n.mode=22;case 22:if(n.extra){for(j=n.extra;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.length+=_&(1<<n.extra)-1,_>>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;N=(B=n.distcode[_&(1<<n.distbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(0==(240&N)){for(R=O,A=N,P=L;N=(B=n.distcode[P+((_&(1<<R+A)-1)>>R)])>>>16&255,L=65535&B,!(R+(O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}_>>>=R,b-=R,n.back+=R}if(_>>>=O,b-=O,n.back+=O,64&N){e.msg="invalid distance code",n.mode=f;break}n.offset=L,n.extra=15&N,n.mode=24;case 24:if(n.extra){for(j=n.extra;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.offset+=_&(1<<n.extra)-1,_>>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=f;break}n.mode=25;case 25:if(0===w)break e;if(E=S-w,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=f;break}E>n.wnext?(E-=n.wnext,I=n.wsize-E):I=n.wnext-E,E>n.length&&(E=n.length),C=n.window}else C=h,I=v-n.offset,E=n.length;E>w&&(E=w),w-=E,n.length-=E;do{h[v++]=C[I++]}while(--E);0===n.length&&(n.mode=21);break;case 26:if(0===w)break e;h[v++]=n.length,w--,n.mode=21;break;case 27:if(n.wrap){for(;b<32;){if(0===y)break e;y--,_|=p[g++]<<b,b+=8}if(S-=w,e.total_out+=S,n.total+=S,S&&(e.adler=n.check=n.flags?o(n.check,h,S,v-S):i(n.check,h,S,v-S)),S=w,(n.flags?_:m(_))!==n.check){e.msg="incorrect data check",n.mode=f;break}_=0,b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=f;break}_=0,b=0}n.mode=29;case 29:U=1;break e;case f:U=-3;break e;case 31:return-4;default:return u}return e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,(n.wsize||S!==e.avail_out&&n.mode<f&&(n.mode<27||4!==t))&&T(e,e.output,e.next_out,S-e.avail_out)?(n.mode=31,-4):(x-=e.avail_in,S-=e.avail_out,e.total_in+=x,e.total_out+=S,n.total+=S,n.wrap&&S&&(e.adler=n.check=n.flags?o(n.check,h,S,e.next_out-S):i(n.check,h,S,e.next_out-S)),e.data_type=n.bits+(n.last?64:0)+(n.mode===d?128:0)+(20===n.mode||15===n.mode?256:0),(0===x&&0===S||4===t)&&U===c&&(U=-5),U)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,c):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:T(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,c):u},t.inflateInfo="pako inflate (from Nodeca project)"},6120:(e,t,n)=>{"use strict";var r=n(12),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,c,u,l,d,f){var p,h,m,g,v,y,w,_,b,x=f.bits,S=0,k=0,T=0,E=0,I=0,C=0,O=0,N=0,L=0,R=0,A=null,P=0,M=new r.Buf16(16),U=new r.Buf16(16),W=null,j=0;for(S=0;S<=15;S++)M[S]=0;for(k=0;k<c;k++)M[t[n+k]]++;for(I=x,E=15;E>=1&&0===M[E];E--);if(I>E&&(I=E),0===E)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(T=1;T<E&&0===M[T];T++);for(I<T&&(I=T),N=1,S=1;S<=15;S++)if(N<<=1,(N-=M[S])<0)return-1;if(N>0&&(0===e||1!==E))return-1;for(U[1]=0,S=1;S<15;S++)U[S+1]=U[S]+M[S];for(k=0;k<c;k++)0!==t[n+k]&&(d[U[t[n+k]]++]=k);if(0===e?(A=W=d,y=19):1===e?(A=i,P-=257,W=o,j-=257,y=256):(A=a,W=s,y=-1),R=0,k=0,S=T,v=l,C=I,O=0,m=-1,g=(L=1<<I)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){w=S-O,d[k]<y?(_=0,b=d[k]):d[k]>y?(_=W[j+d[k]],b=A[P+d[k]]):(_=96,b=0),p=1<<S-O,T=h=1<<C;do{u[v+(R>>O)+(h-=p)]=w<<24|_<<16|b|0}while(0!==h);for(p=1<<S-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,k++,0==--M[S]){if(S===E)break;S=t[n+d[k]]}if(S>I&&(R&g)!==m){for(0===O&&(O=I),v+=T,N=1<<(C=S-O);C+O<E&&!((N-=M[C+O])<=0);)C++,N<<=1;if(L+=1<<C,1===e&&L>852||2===e&&L>592)return 1;u[m=R&g]=I<<24|C<<16|v-l|0}}return 0!==R&&(u[v+R]=S-O<<24|64<<16|0),f.bits=I,0}},9451: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"}},2976:(e,t,n)=>{"use strict";var r=n(12);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,c=15,u=16,l=[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],d=[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],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var m=new Array(60);i(m);var g=new Array(512);i(g);var v=new Array(256);i(v);var y=new Array(29);i(y);var w,_,b,x=new Array(s);function S(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 k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function T(e){return e<256?g[e]:g[256+(e>>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function I(e,t,n){e.bi_valid>u-n?(e.bi_buf|=t<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=t>>u-e.bi_valid,e.bi_valid+=n-u):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function C(e,t,n){I(e,n[2*t],n[2*t+1])}function O(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function N(e,t,n){var r,i,o=new Array(c+1),a=0;for(r=1;r<=c;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]=O(o[s]++,s))}}function L(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;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 R(e){e.bi_valid>8?E(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 A(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 P(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!A(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function M(e,t,n){var r,i,a,s,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?C(e,i,t):(C(e,(a=v[i])+o+1,t),0!==(s=l[a])&&I(e,i-=y[a],s),C(e,a=T(--r),n),0!==(s=d[a])&&I(e,r-=x[a],s))}while(c<e.last_lit);C(e,256,t)}function U(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,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)P(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(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++,P(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,l=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o<=c;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)>m&&(o=m,g++),u[2*r+1]=o,r>l||(e.bl_count[o]++,a=0,r>=h&&(a=p[r-h]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(d[2*r+1]+a)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>l||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),N(o,l,e.bl_count)}function W(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<u?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?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))}function j(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<u)do{C(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(C(e,i,e.bl_tree),s--),C(e,16,e.bl_tree),I(e,s-3,2)):s<=10?(C(e,17,e.bl_tree),I(e,s-3,3)):(C(e,18,e.bl_tree),I(e,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}}i(x);var B=!1;function D(e,t,n,i){I(e,0+(i?1:0),3),function(e,t,n,i){R(e),E(e,n),E(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){B||(function(){var e,t,n,r,i,o=new Array(c+1);for(n=0,r=0;r<28;r++)for(y[r]=n,e=0;e<1<<l[r];e++)v[n++]=r;for(v[n-1]=r,i=0,r=0;r<16;r++)for(x[r]=i,e=0;e<1<<d[r];e++)g[i++]=r;for(i>>=7;r<s;r++)for(x[r]=i<<7,e=0;e<1<<d[r]-7;e++)g[256+i++]=r;for(t=0;t<=c;t++)o[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,o[8]++;for(;e<=255;)h[2*e+1]=9,e++,o[9]++;for(;e<=279;)h[2*e+1]=7,e++,o[7]++;for(;e<=287;)h[2*e+1]=8,e++,o[8]++;for(N(h,287,o),e=0;e<s;e++)m[2*e+1]=5,m[2*e]=O(e,5);w=new S(h,l,257,a,c),_=new S(m,d,0,s,c),b=new S(new Array(0),f,0,19,7)}(),B=!0),e.l_desc=new k(e.dyn_ltree,w),e.d_desc=new k(e.dyn_dtree,_),e.bl_desc=new k(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,L(e)},t._tr_stored_block=D,t._tr_flush_block=function(e,t,n,r){var i,a,s=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<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),U(e,e.l_desc),U(e,e.d_desc),s=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),U(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?D(e,t,n,r):4===e.strategy||a===i?(I(e,2+(r?1:0),3),M(e,h,m)):(I(e,4+(r?1:0),3),function(e,t,n,r){var i;for(I(e,t-257,5),I(e,n-1,5),I(e,r-4,4),i=0;i<r;i++)I(e,e.bl_tree[2*p[i]+1],3);j(e,e.dyn_ltree,t-1),j(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),L(e),r&&R(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*(v[n]+o+1)]++,e.dyn_dtree[2*T(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){I(e,2,3),C(e,256,h),function(e){16===e.bi_valid?(E(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)}},6092: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}},9112:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="object",c="model",u="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,c,u,l,d=0;d<t.length&&!u;){var f=t[d],p=t[d+1];for(n=r=0;n<f.length&&!u;)if(u=f[n++].exec(e))for(i=0;i<p.length;i++)l=u[++r],typeof(c=p[i])===s&&c.length>0?2==c.length?typeof c[1]==a?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3==c.length?typeof c[1]!==a||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):o:this[c[0]]=l?c[1].call(this,l,c[2]):o:4==c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):o):this[c]=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],[u,f],[/(opios)[\/\s]+([\w\.]+)/i],[[u,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[u,"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],[u,f],[/(konqueror)\/([\w\.]+)/i],[[u,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[u,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[u,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[u,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[u,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[u,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[u,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[u,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[u,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[u,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[u,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[u,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[u,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[u,f],[/(QQ)\/([\d\.]+)/i],[u,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[u,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[u,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[u,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[u],[/(LBBROWSER)/i],[u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[u,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[u,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[u,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[u,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[u,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[u,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[u,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[u,f],[/(dolfin)\/([\w\.]+)/i],[[u,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[u,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[u,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[u,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[u,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,u],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[u,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[u,[f,_.str,b.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[u,"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],[u,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],[c,d,[l,g]],[/applecoremedia\/[\w\.]+ \((ipad)/],[c,[d,"Apple"],[l,g]],[/(apple\s{0,1}tv)/i],[[c,"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,c,[l,g]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[c,[d,"Amazon"],[l,g]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[c,_.str,b.device.amazon.model],[d,"Amazon"],[l,m]],[/android.+aft([bms])\sbuild/i],[c,[d,"Amazon"],[l,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[c,d,[l,m]],[/\((ip[honed|\s\w*]+);/i],[c,[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,c,[l,m]],[/\(bb10;\s(\w+)/i],[c,[d,"BlackBerry"],[l,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[c,[d,"Asus"],[l,g]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[c,"Xperia Tablet"],[l,g]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,"Sony"],[l,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,c,[l,h]],[/android.+;\s(shield)\sbuild/i],[c,[d,"Nvidia"],[l,h]],[/(playstation\s[34portablevi]+)/i],[c,[d,"Sony"],[l,h]],[/(sprint\s(\w+))/i],[[d,_.str,b.device.sprint.vendor],[c,_.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,[c,/_/g," "],[l,m]],[/(nexus\s9)/i],[c,[d,"HTC"],[l,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[c,[d,"Huawei"],[l,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[c,[d,"Huawei"],[l,g]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,c,[l,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[c,[d,"Microsoft"],[l,h]],[/(kin\.[onetw]{3})/i],[[c,/\./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],[c,[d,"Motorola"],[l,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[c,[d,"Motorola"],[l,g]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,w.trim],[c,w.trim],[l,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,"Samsung"],[l,v]],[/\(dtv[\);].+(aquos)/i],[c,[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"],c,[l,g]],[/smart-tv.+(samsung)/i],[d,[l,v],c],[/((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"],c,[l,m]],[/sie-(\w*)/i],[c,[d,"Siemens"],[l,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],c,[l,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[c,[d,"Acer"],[l,g]],[/android.+([vl]k\-?\d{3})\s+build/i],[c,[d,"LG"],[l,g]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],c,[l,g]],[/(lg) netcast\.tv/i],[d,c,[l,v]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[c,[d,"LG"],[l,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,c,[l,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[c,[d,"Lenovo"],[l,g]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,c,[l,m]],[/linux;.+((jolla));/i],[d,c,[l,m]],[/((pebble))app\/[\d\.]+\s/i],[d,c,[l,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,c,[l,m]],[/crkey/i],[[c,"Chromecast"],[d,"Google"],[l,v]],[/android.+;\s(glass)\s\d/i],[c,[d,"Google"],[l,y]],[/android.+;\s(pixel c)[\s)]/i],[c,[d,"Google"],[l,g]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[c,[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],[[c,/_/g," "],[d,"Xiaomi"],[l,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[c,/_/g," "],[d,"Xiaomi"],[l,g]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[c,[d,"Meizu"],[l,m]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],c,[l,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[c,[d,"OnePlus"],[l,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[c,[d,"RCA"],[l,g]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[c,[d,"Dell"],[l,g]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[c,[d,"Verizon"],[l,g]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],c,[l,g]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[c,[d,"NuVision"],[l,g]],[/android.+;\s(k88)\sbuild/i],[c,[d,"ZTE"],[l,g]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[c,[d,"Swiss"],[l,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[c,[d,"Swiss"],[l,g]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[c,[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"],c,[l,g]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[c,[d,"Insignia"],[l,g]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[c,[d,"NextBook"],[l,g]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],c,[l,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],c,[l,m]],[/android.+;\s(PH-1)\s/i],[c,[d,"Essential"],[l,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[c,[d,"Envizen"],[l,g]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,c,[l,g]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[c,[d,"MachSpeed"],[l,g]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,c,[l,g]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[c,[d,"Rotor"],[l,g]],[/android.+(KS(.+))\s+build/i],[c,[d,"Amazon"],[l,g]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,c,[l,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,w.lowerize],d,c],[/[\s\/\(](smart-?tv)[;\)]/i],[[l,v]],[/(android[\w\.\s\-]{0,9});.+build/i],[c,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"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],[u,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,u]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[u,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],[u,[f,_.str,b.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[f,_.str,b.os.windows.version]],[/\((bb)(10);/i],[[u,"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],[u,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[u,"Symbian"],f],[/\((series40);/i],[u],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"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],[u,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[u,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[u,f],[/(haiku)\s(\w+)/i],[u,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[u,"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],[u,f]]},S=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof S))return new S(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};S.VERSION="0.7.22",S.BROWSER={NAME:u,MAJOR:"major",VERSION:f},S.CPU={ARCHITECTURE:p},S.DEVICE={MODEL:c,VENDOR:d,TYPE:l,CONSOLE:h,MOBILE:m,SMARTTV:v,TABLET:g,WEARABLE:y,EMBEDDED:"embedded"},S.ENGINE={NAME:u,VERSION:f},S.OS={NAME:u,VERSION:f},void 0!==t?(e.exports&&(t=e.exports=S),t.UAParser=S):(r=function(){return S}.call(t,n,t,e))===o||(e.exports=r);var k=i&&(i.jQuery||i.Zepto);if(k&&!k.ua){var T=new S;k.ua=T.getResult(),k.ua.get=function(){return T.getUA()},k.ua.set=function(e){T.setUA(e);var t=T.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(6148),t=n.n(e),i=n(1844);function o(){return window.navigator.userAgent.toLowerCase().match(/micromessenger/i)?"wechat":"web"}var a=n(6348),s=n(8856),c=n(2392);function u(e){window.parent!==window&&window.parent.postMessage(e,"*")}var l=n(6496),d=n(568),f=n(556);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)}}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 c=0,u=0;o>a?(c=t,u=t/s):(u=t,c=t*s),i.width=u,i.height=c,i.getContext("2d").drawImage(r,0,0,u,c),n(i.toDataURL())},r.src=e})):Promise.resolve(e)}async function m(e){const t={fileName:e.name,fileType:e.type};return 0===e.type.indexOf("image/")?(t.isImage=!0,t.value=await v(e)):(t.isImage=!1,t.value=g(e.name)),t.miniValue=await h(t.value),t}function g(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 v(e){return new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))}const y="native_app_message";function w(e){return new Promise(((t,n)=>{const r=()=>{window.removeEventListener(y,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(y,o),t(s)):"delay"===a&&s.delayTask===e.messageName&&(clearTimeout(i),i=setTimeout(r,15e3))};window.addEventListener(y,o),window.ReactNativeWebView.postMessage(JSON.stringify(e))}))}const _={};var b=n(3004);function x(e){const{file:t,onProgress:n,onUploaded:r}=e;(async function({file:e,maxFileSize:t,keyPrefix:n}){var r;if(t&&e.size>t)throw"file-size-error";const i=await fetch((null===(r=(0,s.E3)().hostConfig)||void 0===r?void 0:r.qApiHost)+"/media/uptoken?"+new URLSearchParams({key_prefix:n,mime_type:e.type}),{method:"get"});let o;if(!i.ok||200!==i.status){if(i.ok&&204===i.status)throw await i.text();throw await i.json()}return o=await i.json(),o})(e).then((e=>{const i=new XMLHttpRequest;if(i.upload.onprogress=e=>{null==n||n(e.loaded/e.total*100)},i.onload=()=>{if(200!==i.status)throw"upload-error";null==r||r({file:t,res_key:e.res_key})},e.upload_host.includes("qiniup.com")){i.open("POST",e.upload_host);const n=new FormData;n.append("name",t.name),n.append("token",e.uptoken),n.append("file",t),i.send(n)}else i.open("PUT","".concat(e.upload_host,"/").concat(e.res_key)),i.setRequestHeader("Authorization",e.uptoken),i.setRequestHeader("Content-Type",t.type),i.send(t)})).catch((e=>{throw e}))}n(9952),n(6856);const S="os/client",k=20971520;function T(e){return e<1024?e+"bytes":e>=1024&&e<1048576?(e/1024).toFixed(1)+"KB":(e/1048576).toFixed(1)+"MB"}const E={resolve:()=>{},onprogress:()=>{},result:void 0},I={filePath:"",value:"",miniValue:"",isImage:!1,fileName:"",fileType:""};let C,O,N=E;async function L(e,t){const n=await m(t);N.result={...N.result||I,...n,filePath:e},O(),N.resolve(N.result),N=E,C.value="",document.body.style.pointerEvents="all"}function R(){C||(C=document.createElement("input"),C.setAttribute("type","file"),C.style.display="none",C.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 v(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",O=p({onprogress:N.onprogress}),(0,s.E3)().preview)await(0,f.W_)(1e3),await L(t.name,t);else try{x({file:t,keyPrefix:S,maxFileSize:k,onProgress:N.onprogress,onUploaded:async({res_key:e})=>{await L(e,t)}})}catch(e){O(),document.body.style.pointerEvents="all","file-size-error"===e&&(0,s.E3)().notify((0,l.GS)(d.CW.upload.fileSizeLimit,{size:T(k)}))}else(0,s.E3)().notify(d.CW.upload.invalidImage)})),document.body.appendChild(C))}n(1088);var A=n(5032),P=n(3132),M=n(3001),U=n(1884),W=n(5224),j=n(9796),B=n(9193),D=n(7556),G=n(1304),q=n(6796),F=n(5776),z=n(8184);var V=n(5170),K=n(8360),H=n(4196),Y=n(7688),Q=n(4556),X=n(908),J=n(1576),Z=n(6680),$=n(4404),ee=n(1103),te=n(1372),ne=n(8084),re=n(7828),ie=n(4072),oe=n(8956);const ae={};async function se(e,t){const n=(r=e,JSON.stringify({...r,x:void 0,y:void 0}));var r;const i=ae[e.nodeUuid];if(i&&i.raw===n)return i.value;{await(0,f.W_)();const r={target:e},i=(0,z.e_)(r,t),o=await(0,z.o9)(i,t.current);return ae[e.nodeUuid]={value:o,raw:n},o}}let ce,ue,le=!1,de=!1,fe="",pe=null;function he(e){const{globalSetting:t,content:n}=pe,{nodeList:r,variables:i,fullLangStore:o,autoCpltGroups:a}=t;let s=[...r];n.groupNodes?s=[...s,...n.groupNodes]:s.unshift(n);const c=n.group?[n.group]:[],u=o[e];(0,re.w3)({nodes:s,groups:c,variables:i},u),(0,re.O_)(a,e)}const me={...V._,async handleNextClick(){},async handlePrevClick(){},handleCascadeInput(e,t,n,r){const i=(0,H.cv)(e,t,n,r);return this.handleOptionInput(e,i,r)},async handleCascadeClick(e,t,n){await(0,H.GA)(e,t,n)},handleMenuClick:async(e,t)=>(await me.handleOptionClick(t.options[e],t),t.options.filter((e=>e.selected)).map((e=>e.text))),async handleOptionClick(e,t){const n=await(0,Y.o)(e,t);return await(0,ee.e)(t),(0,a.oP)(t),n.result},async handleOptionAssistInput(e,t,n){(0,s.e)(n.assistValue,{[t]:e})},async handleAutoCpltInput(e,t,n){(0,Q.I5)(e,t,n)},async handleOptionInput(e,t,n){const r=await(0,Q.wf)(e,t,n);return await(0,ee.e)(n),(0,a.oP)(n),r.result},async handleQuestionInput(e,t){const n=await(0,X.s)(e,t);return await(0,ee.e)(t),(0,a.oP)(t),n.result},async handleSequenceInput(e,t,n){const r=await(0,Z.W)(e,t,n);return await(0,ee.e)(n),(0,a.oP)(n),r.result},handleLangChange:async e=>e.locale===ue?void 0:(ue=e.locale,de=!0,pe.globalSetting.language=e.locale,ce(pe)),async handleMaxDiffInput(e,t,n,r){const i=(0,J.w)(e,t,n);return await(0,ee.e)(r),(0,a.oP)(r),i.result},handleQuickAnswer:e=>(0,K.E)(e)};const ge={data:{theme:null,eventHub:a.i}},ve={};let ye=null;async function we(e){try{await async function(e){const t=Date.now(),{content:n}=e;let r=await async function(e,t){var n;void 0===ue&&(ue=null!==(n=e.globalSetting.language)&&void 0!==n?n:"zh_cn"),pe=e,ce=t;const{content:r,globalSetting:i,regionList:o}=e;i.language=ue,await async function(e){if(le)return(0,l.Uj)(e),void he(e);await(0,f.W_)(50),(0,l.Uj)(e),he(e),le=!0}(i.language);const c={variables:(0,D.SA)(i.variables),imageList:i.imageList,varStyles:i.varStyles};de||((0,D.SW)(r),o&&await(0,ne.oZ)(o),(0,te.a)(i.presetRichStyles),(0,ie.YV)(c)),fe!==r.nodeUuid&&(window.scrollTo(0,0),fe=r.nodeUuid);const u={...c,core:(0,s.E3)(),embedApis:i.embedApis,nodeGroups:i.nodeGroups||[],eventHub:a.i,context:{},loopStack:[],randomList:[],preview:!0,themeMode:!0,...i,langTable:i.langTable.filter((e=>!e.disabled)),nodeList:i.nodeList.map((e=>((0,D.ox)(e),e))),handleEvents:me,nodes:[],theme:ge.data.theme,...(0,$.Y)(i)};return await async function(e){let t;e.renderList=[];for(const n of e.nodeList){if("start"===n.type||oe.Gw.includes(n.type))continue;const r=await se(n,e);r.prev=t,t=r,e.renderList.push(r)}}(u),u}(e,we);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.a)(e.image));const{imgScale:r,imgTransType:i,imgTransTime:o,imgPosition:a,welcomeUrl:s,startName:c,qsnrName:u,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:c||u,welcomeUrl:s,images:n,nextButton:f||(0,l.GS)(d.CW.global.start)}).template=await(0,A.m)(e.template,t),t.summary=await(0,M.qQ)(e.questionText,{state:t}),t.description=await(0,M.qQ)(e.describe,{state:t}),t}(n,r):"gift"===n.type?await async function(e,t){const n=(0,W.x)();(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,U.kF)(),images:e.image?[(0,P.a)(e.image)]:[],nextButton:e.linkUrl&&(e.endBtnText||(0,l.GS)(d.CW.global.go))}).template=await(0,A.m)(e.template,t);const r=e;return t.rewardType=r.giftType,"red_envelope"===t.rewardType?t.rewardValue=r.giftCount+" "+(0,l.GS)(d.CW.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.GS)(d.CW.global.next),prevBtnText:r.prevBtnText||(0,l.GS)(d.CW.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,z.e_)(o,t),s=await(0,z.o9)(a,t.current);if(t.renderList.push(s),0===s.varList.length)if(s.options.length>0){const e=(0,f.my)(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},c=(0,z.e_)(i,t),u=await(0,z.o9)(c,t.current),l=await(0,j.uS)(t,u,s.nodeUuid,e,o,null),d={destInputId:"",node:r,varList:s.varList,replacements:[l],currentIndex:e},p=[d];u.renderId=(0,f.So)(u.nodeUuid,p),u.loop=d,u.loopStack=p,n.push(u)}t.renderList=[...t.renderList,...n],t.nodes=n,t.groupTable=(0,B.y)(n,t.inSingleGroup)}else{const n=[];for(const r of e.groupNodes){(0,D.ox)(r);const e={target:r},i=(0,z.e_)(e,t);n.push(await(0,z.o9)(i,t.current))}t.renderList=[...t.renderList,...n],t.nodes=n.filter((e=>!q.AN.includes(e.type)&&!(0,F.S)(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,D.ox)(e),(0,f.is)(e,"lottery"===e.type)){t.formalResult={reward:{},gift:{}};const r=(0,f.my)(e.options,1)[0],i={id:-1,lottery_id:e.nodeUuid,lottery_option_id:r&&r.uuid};n=await(0,z.yI)(e,i,t)}else{const r={target:e},i=(0,z.e_)(r,t);n=await(0,z.o9)(i,t.current)}return t.renderList.push(n),t.nodes=[n],t.current=n,t}(n,t),t.limitTime&&(t.restTime=(0,U.KM)(t.limitTime)),t.prevButton=(0,G.Qb)(t),t.nextButton=await(0,G.uC)(t),t}(e,r),window.cfState=r,(0,s.e)(ge,{data:r}),console.info("client full time:",Date.now()-t,"node count:",r.nodeList.length),u({name:"done_preview_realtime"}),a.i.trigger("REALTIME_CHANGE")}(e)}catch(e){u({name:"error_realtime_preview",error:e.stack||e.message}),console.error(e)}}function _e(e){if(!e.data)return;const{name:t}=e.data;if(!t||0!==t.indexOf("preview"))return;const n=ve[t];n&&n(e.data)}function be(){u({name:"mousedown_preview"})}function xe(){u({name:"mouseup_preview"})}ve.preview_theme=e=>{(0,c.y)(e.theme),(0,s.e)(ge.data,{theme:e.theme}),ye&&a.i.trigger("UPDATE_THEME",e.theme),ye=e.theme},ve.preview_content=e=>we(e);var Se=n(7404),ke=(n(5960),n(4708)),Te=n(2352),Ee=n(4060);const Ie=[],Ce={cached:!1,value:null};let Oe,Ne;function Le(){return!Oe||0===Oe.length}async function Re(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,Ee.em)(e,t);return 6===n||8===n||12===n||2===n?r.candidates="number"==typeof i?(0,Te.Wo)(i-1):i.substring(0,i.length-1):1===n||5===n||11===n||4===n||7===n?r.candidates=(0,Te.Wo)(i+1):3!==n&&9!==n||(r.candidates=(0,Te.Wo)(i)),r}}function Ae(e){return"testcase"===e}n(7768);const Pe="failed to load:",Me=[];function Ue(e){let t=0;return new Promise(((n,r)=>{const i=async o=>{try{const t=await e();o&&(0,s.E3)().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,Me.push(i),(0,s.E3)().markLoadRetry({status:"wait-retry",onRetry(){for((0,s.E3)().markLoadRetry({status:"retrying"});Me.length>0;)Me.pop()(!0)}}))}};i(!1)}))}function We(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 je(e,t,n){return n?Ue((()=>We(e,t))):We(e,t)}function Be(e,t){let n=!0;return"GET"===t.type?(t.data&&(e=(0,Se.Ww)(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 De(e,t,n){return n?Ue((()=>Be(e,t))):Be(e,t)}window.CFPlugin=window.CFPlugin||{},window.CFPlugin.fakedServers={};const Ge=(0,Se.Yj)(location.search),qe={local:!!location.origin.match(/:\d+$/),realtime:location.pathname.includes("/themes"),debug:!!Ge.dev,autoRun:!!Ge.auto_path,infer:!!Ge.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()=>Ae(Ge.infer_id)?{langs:[]}:null,getCustomSurveyPayload:async()=>Ae(Ge.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),u({type:"initialize",name:"testcase"})})):null},Fe={start:"",survey:"/survey",reward:"/reward"};function ze(e,t){const n=Fe[e],r=Ve(e,t),i=(0,s.E3)().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 Ve(e,t){return(0,s.E3)().appRoot+(0,Se.Ww)(Fe[e],t)}function Ke(e){const t=(0,s.E3)().appRoot+Fe.start+"?".concat(e.sid),n={};return Object.keys(e).forEach((t=>{t.startsWith("share_preserved_")&&(n[t]=e[t])})),(0,Se.Ww)(t,n)}const He={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,Se.Yj)(location.search)),gotoStartPage(e){ze("start",e)},gotoSurveyPage(e){ze("survey",e)},getRewardUrl:e=>Ve("reward",(0,Se.SC)(e)),openWebLink(e){location.replace(e)},reload(){location.href=Ve("start",(0,Se.uK)())}};var Ye=n(9112),Qe=n.n(Ye);Qe()();const Xe=new(t()),Je={device:Qe()(),newDiv:()=>document.createElement("div"),newSpan:()=>document.createElement("span"),newTextNode:e=>document.createTextNode(e),getReferer:()=>document.referrer,translate:(e,t)=>t?Xe.compile(e)(t):e,getLang:()=>(navigator.languages&&navigator.languages[0]||navigator.language).replace(/-/g,"_").toLowerCase()};var Ze=n(8744);function $e(e){return e.returnValue="1","1"}function et(){window.removeEventListener("beforeunload",$e)}var tt=n(7320);let nt,rt;function it(){nt&&(nt.disconnect(),et(),nt=null,rt=null)}const ot={removeUpload:async function(e){if((0,b.U)())return async function(e){const{nodeId:t,optionId:n}=e,r=_[t+n];if(!r)return;const i={messageName:"remove_upload",data:{...e,url:r}};await w(i),delete _[t+n]}(e)},closeSocket:it,pushSocket:function(e,t){rt&&rt.push(e,t)},connectSocket:function(e,t){if(!(0,b.U)())try{nt=new Ze.Socket("".concat((0,s.E3)().hostConfig.wsHost,"/q/socket"),{params:{response_id:e}}),nt.connect(),location.href.match(/:\d+\//)||window.addEventListener("beforeunload",$e),rt=nt.channel("client:".concat(t),{}),rt.on("collector_full",(()=>{(0,s.E3)().error((0,tt.O)("collector_full")),it()})),rt.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.E3)().uploadLog("加入socket失败")}},loadFakeFile:function(e,t,n){return je((0,b.G)(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,b.U)()?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 w(i);if(!a)return o(),null;_[n+r]=a;const c=a.substring(a.lastIndexOf("/")+1),u={filePath:a,fileName:c,fileType:s,progress:50};return s.startsWith("image/")?(u.value=a,u.isImage=!0):(u.value=g(c),u.isImage=!1),u.miniValue=await h(u.value),o(),u}(e):function(e){return e.recordedAudioFile?async function(e){const t=e.recordedAudioFile;if((0,s.E3)().preview){await(0,f.W_)(1e3);const e=await m(t);return{...I,...e,filePath:t.name}}return new Promise((n=>{try{x({file:t,keyPrefix:S,maxFileSize:k,onProgress:e.onprogress,onUploaded:async({res_key:e})=>{const r=await m(t),i={...I,...r,filePath:e};n(i)}})}catch(e){O(),"file-size-error"===e&&(0,s.E3)().notify((0,l.GS)(d.CW.upload.fileSizeLimit,{size:T(k)}))}}))}(e):(e.accept?C.setAttribute("accept",e.accept):C.removeAttribute("accept"),N.onprogress=e.onprogress,new Promise((e=>{C.click(),N.resolve=e})))}(e)},initUploader:R,request:function(e,t,n){const r=(0,s.E3)();return(0,b.U)()?e.startsWith(r.hostConfig.qApiHost)?async function(e,t){const n={messageName:e,data:t.data};return{response:await w(n),status:200}}(e,t):De((0,b.G)(e),t,n):De(e,t,n)}};function at(){window.wxMenuForceShow||window.wx.hideOptionMenu()}function st(e){let t="";const n=e.images[0];return n&&n.url&&(t=n.url),t||(0,s.E3)().hostConfig.cdnHost+"/thumbnail.png"}function ct(e,t=0){"wechat"===(0,s.W4)().name&&setTimeout((()=>{try{e.noWxShare||window.wx&&(window.wx.showOptionMenu(),window.wxMenuForceShow=!0),async function(e){if(e.noWxShare||!(0,s.W4)().app.canHandleReward()||!(0,s.E3)().useWxSdk)return;const t=(0,Se.uK)(),n=(0,s.E3)().sid,r=e.wxShareInfo||{sid:n,title:(0,M.Qr)(e.title),desc:(0,M.Qr)(e.summary),shareLink:Ke(t),imageUrl:st(e)},i=location.href.split("#")[0],o=await function(e){const t=(0,s.E3)().hostConfig.qApiHost+"/wechat/jsapi_sign";return(0,tt.kj)(t,{type:"GET",data:e},!1)}({url:i});!function(e,t){if(!window.wx)return;const{imageUrl:n,desc:r,shareLink:i}=t;let{title:o}=t;""===(0,Te.Wo)(o).trim()&&(o="choiceform");const a=window.wx,{appid:s,timestamp:c,noncestr:u,signature:l}=e;a.config({debug:!1,appId:s,timestamp:c,nonceStr:u,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)}))}(o,r)}(e)}catch(e){(0,s.E3)().uploadLog("微信分享初始化失败")}}),t)}function ut(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(9624);const lt={get:async function(e){const t={messageName:"get_storage",data:{key:e}};return(await w(t)).value},set:function(e,t){return w({messageName:"set_storage",data:{key:e,value:t}})},remove:function(e){return w({messageName:"remove_storage",data:{key:e}})}},dt=lt;let ft;function pt(){if(void 0!==ft)return ft;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(e){return ft=!1,!1}return ft=!0,!0}const ht={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 mt(e,t){pt()?localStorage.setItem(e,t):ht.setItem(e,t)}function gt(e){return pt()?localStorage.getItem(e):ht.getItem(e)}function vt(e){pt()?localStorage.removeItem(e):ht.removeItem(e)}const yt={set:mt,setVital:async(e,t)=>(0,b.U)()?dt.set(e,t):mt(e,t),get:gt,getVital:async e=>(0,b.U)()?dt.get(e):gt(e),remove:vt,removeVital:async e=>(0,b.U)()?dt.remove(e):vt(e)},wt="cached_meta_before_third_auth",_t={userInfo:null,retrieveAuthSurveyMeta:function(){const e=(0,Se.uK)(),{code:t,state:n}=e;if(t){const t=yt.get(wt);if(t)return yt.remove(wt),JSON.parse(t);{const t=Ve("start",(0,Se.SC)(e));location.href=t,(0,s.E3)().customAbort()}}else n&&((0,s.E3)().error((0,l.GS)(d.CW.global.authFailed)),yt.remove(wt),(0,s.E3)().customAbort());return null},async init(e){if((0,s.E3)().preview)return;const{channel:t}=e,{type:n,authorizer_id:r,app_id:i}=t;if(t&&"wechat"===n&&i){const t=(0,Se.uK)().code;t||((0,s.E3)().error((0,l.GS)(d.CW.global.authFailed)),(0,s.E3)().customAbort()),e.interviewee=await function(e){const t=(0,s.E3)().hostConfig.qApiHost+"/interviewees";return(0,tt.SY)(t,{type:"POST",data:e}).catch((e=>{throw(0,tt.qs)(e),e}))}({code:t,authorizer_id:r})}},authorizeGift:function(e,t,n,r){const i=ut(e,t,(0,s.W4)().app.getRewardUrl(n),"reward",r);et(),location.replace(i)},authorize(e){const{channel:t}=e;if("wechat"===t.type&&t.app_id&&!e.authorized){e.authorized=!0,function(e){yt.set(wt,JSON.stringify(e))}(e);const{app_id:n,component_appid:r,authorizer_id:i}=t;!function(e,t,n){const r=ut(e,t,Ve("start",(0,Se.uK)()),n);et(),location.replace(r)}(n,r,i),(0,s.E3)().customAbort()}}};var bt=n(1548),xt=n(8412),St=n(9948),kt=n(1488);function Tt(){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 Et=n(4676),It=n(9216);const Ct="https://core.choiceform.com/iplist.json";let Ot;async function Nt(e){const{infer_collector_id:t,infer_status:n}=(0,Se.uK)(),r=await(0,Et.gp)(e);r.status=n||"test",r.collector_id=Number(t)||void 0;const i=function(){const{infer_time_range:e}=(0,Se.uK)();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.ai)(o,a);r.created_at=new Date(s).toISOString();let c=0;return r.answers.forEach((t=>{const n=(0,It.Uq)(e,t);t.start_time=new Date(s+c).toISOString(),(0,F.S)(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.ai)(n,r):function(e,t,n){const r=.5,i=t-e,o=(0,f.ai)(1,99),a=Math.floor(Math.log(1-.5*o/50)/Math.log(r)),s=Math.max(7-a,0),c=o<50?e:Math.round(e+i*r*r**s),u=o>96.875?t:Math.round(e+i*r*r**(s-1));return(0,f.ai)(c,u)}(n||1e3,12e5)}(n),c+=t.cost_time)})),r.time_consuming=Math.ceil(c/1e3),r.committed_at=new Date(s+c).toISOString(),r.ip_address=await async function(e){const t=await async function(){if(!Ot){const e=await ot.request(Ct,{type:"GET"},!1),t=JSON.parse(e.response);let n=[];const r=Object.keys(t);r.forEach((e=>{n=n.concat(t[e])})),Ot={regionMap:t,fullList:n,keys:r}}return Ot}(),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.my)(r,1)[0]}(e),r}let Lt=-1,Rt=1,At=0,Pt="",Mt=null,Ut={index:0,fullLength:0,percent:0};async function Wt(e,t){let n=!0;if(Ae(Pt)?n=await async function(e,t){if(Le()||!Ne)return!1;if("END"===e.type||"CHECK_END"===e.type){const e=[Ne,...Oe.filter((e=>!e.when&&e!==Ne))];for(const n of e){n.done=!0;const{options:e,logicType:r}=n.should,i=await(0,Ee.UF)(t,e,r);if(!i.value){const e={target:n.name,logicType:r,matches:i.details.filter((e=>!e.value))};Ie.push(e)}}return Oe=Oe.filter((e=>!e.done)),Oe.length>0?(Ne=Oe[0],!0):(Ie.length>0?u({name:"testcase",type:"failed",results:Ie}):u({name:"testcase",type:"success"}),!1)}return u({name:"testcase",type:"error",target:Ne.name,message:e.message}),!1}(e,t):u({name:"infer_worker",type:e.type,data:e.data,message:e.message,round:Rt++,id:Pt,ended:!0,nodeName:t.current.nodeName}),clearTimeout(Lt),a.i.off(),n){!function(e){const t=window.CFPlugin.fakedServers;Object.keys(t).filter((e=>{e.endsWith("/__reset_for_infer__")&&t[e]({},(0,s.E3)())}))}();const e=await(0,St.ER)();await Bt(e)}}function jt(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-At>1e3){let n=(0,xt.wB)(e);-1===n.index?n=Ut:Ut=n,u({name:"infer_progress",id:Pt,progress:n,round:Rt}),At=t}}(e),i?"end"===i.type?(Ae(Pt)?await Wt({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.S)(n);)n=n.prev;return Wt({type:"CHECK_END",message:(n?n.nodeName:"")+" => "+r+" :CHECK_END"},t)}if(e.origin.abandonAnswer)return Wt({type:"ABANDON",message:"Answer abandoned by: ".concat(e.nodeName)},t);{const e=((n=await Nt(t)).survey_id=(0,s.E3)().sid,{result:n,url:(0,s.E3)().hostConfig.host+"/d/v1/responses",jwt:Tt()});return await async function(e){if(Ae(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.E3)());if(n.result)return a.i.trigger("ERROR",{message:"Infer Result Error: ".concat(n.result)}),!1}return!0}()?Wt({type:"END",data:e},t):void 0}var n}(i,e),o=!0):(a.i.one("STRETCH_OK",r),await(0,K.G)(i,Mt)):await e.handleEvents.handleNextClick(),o||(clearTimeout(Lt),Lt=window.setTimeout((()=>{Wt({type:"TIMEOUT",message:(e.current&&e.current.nodeName)+":TIMEOUT"},e)}),5e3))};return r()}function Bt(e){return a.i.one("NEXT_FAIL",(t=>{Wt(t,e)})),a.i.one("ERROR",(t=>{Wt(t,e)})),a.i.on("NEXT_OK",(()=>{jt(e)})),jt(e)}let Dt="",Gt=!1;function qt(){Gt=!0}function Ft(e){const{nodeUuid:t}=e;Dt===t||Gt||(u({name:"locate_preview",nodeUuid:t}),Dt=t)}var zt=n(1344),Vt=n(2524);const Kt="preview_bookmarks_";let Ht;async function Yt(e){const t=await yt.getVital(Kt+e.surveyId);return Ht=t?JSON.parse(t):[],Ht}async function Qt(e,t){Ht.some((t=>JSON.stringify(t.result)===JSON.stringify(e.result)))?(0,s.E3)().notify((0,l.GS)(d.CW.previewBookmark.existed)):(Ht.push(e),await yt.setVital(Kt+t.surveyId,JSON.stringify(Ht)))}class Xt{constructor(e,t){this.loading=!1,this.progress="",this.nodeList=[],this.bookmarks=[],this.parent=e,this.state=t}async loadData(){var e;(0,s.e)(this,{bookmarks:await Yt(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.U3)(e,!0),(0,s.e)(t,{current:e}),(0,xt.K8)(t),await(0,Vt.w)(t)}(e,this.state),this.parent.close())}async applyBookmark(e){if(this.loading)return;document.body.style.pointerEvents="none",(0,s.E3)().notifySuspended=!0,(0,s.e)(this,{loading:!0});const t={onProgress:e=>{this.parent.opened||(this.parent.open(),document.body.style.pointerEvents="none"),(0,s.e)(this,{progress:e})},onEnd:e=>{document.body.style.pointerEvents=null,(0,s.E3)().notifySuspended=!1,this.parent.close(),(0,s.e)(this,{loading:!1,progress:""});const t=e.failed?d.CW.previewBookmark.importFailure:d.CW.previewBookmark.importSuccess;(0,s.E3)().notify(t)},onSuspend:()=>{document.body.style.pointerEvents=null,(0,s.E3)().notifySuspended=!1,this.parent.close()}};return function(e,t,n){return(0,zt.ay)(t.result,e,n)}(this.state,e,t)}async deleteBookmark(e){this.loading||(await async function(e,t){Ht=Ht.filter((t=>t!==e)),await yt.setVital(Kt+t.surveyId,JSON.stringify(Ht))}(e,this.state),(0,s.e)(this,{bookmarks:await Yt(this.state)}))}async saveBookmarks(e){this.loading||(await async function(e,t){const n=function(e){return{result:(0,zt.I5)(!0),id:(0,f.kt)((0,f.YF)()),name:e}}(e||Date.now().toString());await Qt(n,t)}(e,this.state),(0,s.e)(this,{bookmarks:await Yt(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.kt)((0,f.YF)()),await Qt(r,e),t()}catch(e){(0,s.E3)().notify((0,l.GS)(d.CW.previewBookmark.importFailed)+e.message)}},i.readAsText(r[0])},n.click()}))}(this.state),(0,s.e)(this,{bookmarks:await Yt(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.e)(this,{bookmarks:await Yt(this.state)}))}}var Jt=n(6276);function Zt(e){const t=[],n=[];let r=0;return e.renderList.forEach((e=>{const i=e.costTime;!(0,F.S)(e)&&i&&(t.push({ques_id:e.nodeUuid,time:i,inLoop:!!e.loop}),n.push({renderId:e.renderId,name:e.nodeName,title:(0,Jt.kZ)(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.e)(this,{timeInfo:Zt(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,tt.SY)(n,{type:"POST",data:t}),(0,s.E3)().notify((0,l.GS)(d.CW.previewTime.uploadSuccess)),this._submitted=!0}catch(e){(0,s.E3)().notify((0,l.GS)(d.CW.previewTime.uploadFailed)),this._submitted=!1}}}class en{constructor(e){this.bookmark=new Xt(this,e),this.time=new $t(this,e)}close(){this.opened&&(0,s.e)(this,{opened:!1})}open(){this.opened||(0,s.e)(this,{opened:!0})}async handleToggleOpen(){this.bookmark.loading||((0,s.e)(this,{opened:!this.opened}),this.opened&&(await this.bookmark.loadData(),this.time.loadData()))}}const tn={beforeForceLeave:et,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.E3)().uploadLog("修改网页标题失败")}},async beforeSetupEnd(e){if(e.useWxSdk&&!(0,b.U)())return async function(){"wechat"===(0,s.W4)().name&&(await je("https://res.wx.qq.com/open/js/jweixin-1.6.0.js",{},!0),void 0===window.WeixinJSBridge?document.addEventListener("WeixinJSBridgeReady",at,!1):at())}()},async afterSetup(){qe.autoRun||qe.infer||!(0,s.E3)().preview||(a.i.on("SWITCH_NODE",((e,t)=>{Ft(t)})),a.i.on("START_MEMORY",qt),a.i.on("END_MEMORY",((e,t)=>{!function(e){Gt=!1,e&&Ft(e)}(t)})))},async afterFetchStart(e){if(!(0,b.U)())return window.cfState=e,ct(e)},async afterFetchSurvey(e){var t;window.cfState=e,(0,b.U)()||(ct(e,1e3),await async function(e){const t=(0,Se.uK)();if(Pt=t.infer_id,Pt&&e.preview)return a.i.trigger("START_MEMORY"),Ae(Pt)&&(function(e=[]){if(Oe=e.filter((e=>!e.disabled)),Le())u({name:"testcase",type:"success"});else{Oe=Oe.sort(((e,t)=>!e.when&&t.when?1:-1));for(let e=Oe.length-1;e>=0;e--){const t=Oe[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})));Oe.splice(e,1,...t)}}Ne=Oe[0]}}(e.testCases),Mt={beforeInfer:e=>async function(e){if(Le()||!Ne||!Ne.when)return;Ce.value={};let t=!1;for(const n of Ne.when.options)if(n.relatedNodeId===e.nodeUuid){const r=(0,ke.gr)(e);t||(r.forEach((e=>{Ce.value[e.uuid]=e.origin.inferList,e.origin.inferList=[]})),t=!0);const i=r.find((e=>e.uuid===n.relatedOptionId)),o=await Re(n,e.parent);o&&i.origin.inferList.push(o)}Ce.cached=t}(e),async afterInfer(e){!function(e){Ce.cached&&((0,ke.gr)(e).forEach((e=>{e.origin.inferList=Ce.value[e.uuid]})),Ce.cached=!1,Ce.value={})}(e)}}),await(0,kt.A9)(),Bt(e)}(e),await async function(){const e=(0,Se.uK)().auto_path;if(e){const t="http://localhost:12345/tasks/"+e+".js";await je(t.replace(/tasks\/.+/,"chai.js"),{},!1),await je(t,{type:"module"},!1)}}()),(0,s.e)(e,{previewTool:(t=e,(0,s.E3)().preview?new en(t):void 0)})},async afterFetchReward(e){if(!(0,b.U)())return window.cfState=e,ct(e)},async onEndSurvey(){if((0,b.U)())return w({messageName:"end_survey",data:{}})},async onRestartSurvey(){if((0,b.U)())return w({messageName:"restart_survey",data:{}})},async onResumeSurvey(){if((0,b.U)())return w({messageName:"resume_survey",data:{}})},async onStartNewSurvey(){if((0,b.U)())return w({messageName:"start_new_survey",data:{}})},async beforeGotoNext(){if((0,b.U)())return w({messageName:"send_task_info",data:await(0,bt.S)()})}};window.CF_UI_COMS=window.CF_UI_COMS||{};const nn={};let rn;const on=[];async function an(e,t){if(!nn[e]){const n=async()=>{const{treeUrl:n,templatePath:r}=(0,s.E3)();if(!rn){const e=await(0,tt.kj)(n,{type:"GET"},t);rn=[...e.partials,...e.standards]}const i=function(e){const t=[],n=[];for(;e.length>0;){const r=[],i=[];e.forEach((e=>{const n=rn.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)on.includes(t.id)||(o.push(r+"/"+t.file),on.push(t.id));return await Promise.all(o.map((e=>je(e,{crossorigin:"anonymous"},t)))),window.CF_UI_COMS[e]};nn[e]=n()}return nn[e]}function sn(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 cn={loadUiEntryTemplates:async function(e,t){const{dynamic:n}=(0,s.E3)();if(n&&e&&!qe.autoRun&&!qe.infer)for(const n of e)await an(n,t)},loadNodeComponent:async function(e,t){const{dynamic:n}=(0,s.E3)();if(n&&e&&!qe.infer&&!qe.autoRun)return await an(e.id,t)},setGlobalStyle(e){sn(e,"global-var-style")},setVarStyle(e){sn(e,"common-var-style")},setPresetStyle(e){sn(e,"preset-rich-style")}};window.addEventListener("error",(e=>{i.EventHub.trigger("ERROR",{message:e.message})})),i.Core.realtime=ge,i.Core.initRealtimePreview=()=>{location.href.includes("/themes")&&(R(),u({name:"init_preview"}),document.documentElement.setAttribute("class","ios iphone mobile portrait safari -9"),window.addEventListener("message",_e),window.addEventListener("mousedown",be),window.addEventListener("mouseup",xe))},i.Core.silentSetter=qe.autoRun||qe.infer,i.Core.registerEnv({name:o(),dev:qe,app:He,system:Je,network:ot,auth:_t,storage:yt,hook:tn,ui:cn}),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={8744:function(e,t){var n,r;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,c=3,u="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}},S=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=u,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 S(this,g,this.params,this.timeout),this.pushBuffer=[],this.rejoinTimer=new C((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=u,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 S(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 S(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 S(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===u}},{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}(),T={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]})}},E=(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||E,this.defaultEncoder=T.encode,this.defaultDecoder=T.decode,this.transport!==E?(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 C((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=I.appendParams(I.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 I.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||I.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;I.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=c,this.onclose()}}]),e}()),I=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 c=new XDomainRequest;this.xdomainRequest(c,e,t,r,o,a,s)}else{var u=i.XMLHttpRequest?new i.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.xhrRequest(u,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 c=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===c.states.complete&&s){var t=c.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}();I.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})),c=n.metas.map((function(e){return e.phx_ref})),u=t.metas.filter((function(e){return c.indexOf(e.phx_ref)<0})),l=n.metas.filter((function(e){return r.indexOf(e.phx_ref)<0}));u.length>0&&(a[e]=t,a[e].metas=u),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 C=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}()},void 0===(r=n.apply(t,[t]))||(e.exports=r)},9200:(e,t,n)=>{"use strict";var r=n(3548),i=n(512),o={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(7),(0,r.inflate)(e,{to:"string"})},deflatePrefix:function(e){return":CF_PD:"+(e=(0,r.deflate)(e,{to:"string"}))},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:"ms_my",value:"Bahasa Melayu",bdCode:"may",comment:"马来语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"no",value:"Bokmål",bdCode:"nor",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.c=o},568:(e,t,n)=>{"use strict";n.d(t,{CW:()=>o,qe:()=>u,Y1:()=>s,qq:()=>a,Ki:()=>c});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 c(e){i=e.toLowerCase(),o=r[i]||r.en_us}function u(){return i}},4676:(e,t,n)=>{"use strict";n.d(t,{cA:()=>S,gp:()=>E,wr:()=>k,Qz:()=>I,Ci:()=>T}),n(7768);var r=n(4708),i=n(6332),o=n(3080),a=n(8084),s=n(556),c=n(3001),u=n(5776),l=n(8737),d=n(7404),f=n(2352),p=n(984);n(9952);var h=n(8856);const m=["select","icon_mark","value_mark","upload","menu","slide_rate"],g=["fill","verify"];function v(e){const{type:t}=e;return"region"===t?"predef":t}function y(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":m.includes(t)?"option":g.includes(t)?"comment":t}return r}function w(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:v(e),node_id:r.toLowerCase(),items:i,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function _(e,t){const n=(0,r.Ml)(t),i=(0,p.O_)(t,e),o={value:(0,f.oV)(i)?"":i,other:!!t.isOtherOpt,type:y(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,c.Qr)(e.text),o.col_content=(0,c.Qr)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.Qr)(t.text);return t.visible||(o.hidden=!0),o}function b(e){return(0,r.gr)(e).reduce(((t,n)=>{var r;return(n.selected||(0,p.QX)(n,e)||void 0===n.selected&&!0===(null===(r=null==n?void 0:n.__cache)||void 0===r?void 0:r.selected))&&t.push(_(e,n)),t}),[])}const x={};function S(e){const t=x[e.type];return t&&t(e)}function k(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function T(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function E(e,t="all",n="committed_url",r=!1){var a,c;const u=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!T(e.checkMode,t))return;if("data"===e.type)return;const r=S(e);r&&n.push(r)})),n}(e,t),{answers:f,logContent:p}=function(e){const{nodeList:t,answers:n}=e;let r=!1;const i=[];for(const e of n){const n=t.find((t=>t.nodeUuid===e.node_id));if(void 0!==e.loop_ctxs&&0!==e.loop_ctxs.length&&1!==e.loop_ctxs.length&&2===e.loop_ctxs.length){const t=null==n?void 0:n.circleNode1Id;if(void 0===(null==n?void 0:n.circleNode2Id)&&(r=!0,i.push("broken loop_ctxs in answer: ".concat(JSON.stringify(e),", node is: ").concat(JSON.stringify(n)))),t){const n=e.loop_ctxs.filter((e=>e.node_id===t));1===n.length&&0===n[0].index&&(e.loop_ctxs=n)}}}return{answers:n,logContent:r?i.join("\n"):null}}({nodeList:e.nodeList,answers:u});p&&(null===(c=(a=(0,h.E3)()).uploadLog)||void 0===c||c.call(a,p));const m=r?void 0:await(0,l.ML)(e,n),g=await(0,l.m0)(e),v={backend_request_params:null!=g?g:{},webhook_params:null!=m?m:{},answers:f,var_map_info:(0,o.oJ)(e,t),options_display_info:(0,i.Ud)(e,t),query_params:(0,d.uK)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.OI)(v.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),v}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.W4)(e)||(0,r.Om)(e)}}x.select=x.select_image=x.menu=x.select_icon=x.hot_spot=e=>{const t=w(e,b);if((0,u.cd)(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},x.cascade=x.icon_mark=x.value_mark=x.matrix=x.weight=x.slide_rate=x.sequence=x.upload=x.heat_map=x.fill=x.max_diff=e=>{const t=w(e,b);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},x.location=e=>{const t=w(e,(t=>{const n=(0,r.gr)(e).find((e=>e.selected));return n?[_(t,n)]:[]})),{position:n,indexes:i}=e;return n&&(n.indexes=i,t.location=n),t},x.region=e=>{const t=x.location(e);return t&&(t.region=(0,a.Qf)(e.value)),t},x.area=e=>x.location(e),x.data=e=>w(e,(e=>(0,r.gr)(e).reduce(((t,n)=>(n.selected&&t.push(_(e,n)),t)),[]))),x.verify=e=>{const t=w(e),{phoneNumber:n,validateType:r,code:i}=e;return"sms"===r&&(t.phone_num=n),t.code=i,t},x.end=e=>({type:v(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),x.logic=e=>{const t=w(e);return t.logic_result=e.logicResult,t}},9536:(e,t,n)=>{"use strict";n.d(t,{I:()=>u,e:()=>p}),n(5960),n(9952);var r=n(4708),i=n(1768),o=n(4196),a=n(5776),s=n(8856),c=n(984);function u(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:""}}function l(e){(0,s.e)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,r.wR)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,i.A9)(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,c.g7)(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.e)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",image:null})}));n&&await(0,a.SY)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.e)(e,{percent:(0,r.e$)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,r.wR)(t).forEach((t=>{if(t===e)return;const n=(0,i.I9)(e.origin)||(0,i.E5)(e,t),r=(0,i.I9)(t.origin)||(0,i.E5)(t,e),o=(0,i.IN)(e,t)||(0,i.IN)(e,t.optionX)||(0,i.IN)(e,t.optionY)||(0,i.IN)(e.optionX,t)||(0,i.IN)(e.optionY,t)||(0,i.u6)(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.A9)(n.option,e)&&(n.display?(0,o.gF)(n,t):l(n.option))}))}},4384:(e,t,n)=>{"use strict";n.d(t,{Az:()=>r,ay:()=>o,yK:()=>i});const r={refresh:!1,result:!1},i={refresh:!0,result:!0},o={refresh:!1,result:!0}},7801:(e,t,n)=>{"use strict";n.d(t,{_:()=>s,i:()=>a});var r=n(5776),i=n(8856),o=n(4676);function a(e,t){var n,r;const{nodes:o}=e.parent;return!o.includes(e)&&(t&&(null===(r=(n=(0,i.E3)()).uploadLog)||void 0===r||r.call(n,"".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning")),!0)}function s(e,t){var n,a;const s=e.renderList.filter((e=>!((0,r.S)(e)||!(0,o.Ci)(e.checkMode,t)||!(0,r.K6)(e.origin)||(0,o.Qz)(e))));if(s.length>0){const e=s.map((e=>e.runtimeNodeName)).join();null===(a=(n=(0,i.E3)()).uploadLog)||void 0===a||a.call(n,"answer lack for: ".concat(e),"warning")}}},1548:(e,t,n)=>{"use strict";n.d(t,{S:()=>d}),n(1088);var r=n(9216),i=n(5776),o=n(8856),a=n(5548),s=n(3001),c=n(4676);function u(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.A)(e.location.address):""}function l(e,t){const n=(0,o.E3)().startState,a=[{title:(0,s.Qr)(n.title),description:(0,s.Qr)(n.description)}];return t.forEach((t=>{const n=(0,r.Uq)(e,t);if(!(0,i.S)(n)){const e={title:(0,s.Qr)(n.title)||n.runtimeNodeName,description:(0,s.Qr)(n.description),value:u(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,c.wr)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.E3)();if(!e)return null;const t=await(0,c.gp)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},7788:(e,t,n)=>{"use strict";n.d(t,{YZ:()=>m,qc:()=>g,qo:()=>h});var r=n(6072),i=n(4060),o=n(9677),a=n(6784),s=n(3001),c=n(6496),u=n(8856),l=n(568);const d={valid:!0,message:""},f="vital:",p="alert:";async function h(e,t){if(e){const{parent:n}=t;return(0,r.eU)({state:n,request:e,customParam:null,silent:!1})}return d}async function m(e,t){if(e){const{message:n}=e;return await(0,i.wx)(t,e)?d:{valid:!1,message:n||(0,c.GS)(l.CW.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:c,logic:l,noPreventNext:g}=i;let v=await h(c,e);return v.valid&&(v=await m(l,r)),!v.valid&&(e.validateFailed=!0,g&&(v=d,(0,a.mU)(r,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.Oj)(e.message,{state:t}),(0,o.mK)(e.message)||(e.message=await(0,s.qQ)(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.mK)(v.message))?((0,u.W4)().hook.beforeForceLeave(),(0,u.W4)().app.openWebLink(v.message),(0,u.E3)().customAbort(),v):v}},9968:(e,t,n)=>{"use strict";n.d(t,{Oe:()=>O,c9:()=>L,iW:()=>R}),n(5960),n(9624),n(9952);var r=n(4708),i=n(9677),o=n(5776),a=n(7788),s=n(3001),c=n(556),u=n(8856),l=n(6496),d=n(568),f=n(7320),p=n(984),h=n(1768),m=n(1344),g=n(6276);const v={valid:!0,message:""};function y(e){if(!(0,o.K6)(e.origin))return v;const t=(0,r.Om)(e)||(0,r.W4)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}function w(e,t){if((0,g.IN)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function _(e){if(!(0,o.K6)(e.origin)&&!(0,r.W4)(e))return v;const{options:t}=e,{parent:n}=e;let i=await(0,s.W0)(e.origin.fillMin,{state:n});i=i||t.length,i>t.length&&(i=t.length),i=w(e,i);let a=0;const c=(0,l.GS)(d.CW.fill.itemInputRequired);let u=!1;for(const n of t)(0,p.QX)(n,e)?(C(n,c),a+=1):!0===n.origin.fillRequired&&(I(n,c),u=!0);return i>a?{valid:!1,message:(0,l.GS)(d.CW.fill.inputLimitMin,{min:i}),dueToNode:e}:u?{valid:!1,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e}:v}function b(e,t=!1){const n=(0,g.IN)(e)?e.otherOptions:[],i=t?n:(0,r.wR)(e),a=(0,o.K6)(e.origin),s=(0,l.GS)(d.CW.fill.itemInputRequired),c=i.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,i=e.selected;return n&&(i||(0,r.yg)(e.origin)&&t)}(t,a)&&!(0,p.QX)(t,e);return n?I(t,s):C(t,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e,dueToOption:c}}async function x(e,t=!1){const n=t?e.options:(0,r.wR)(e),o=[];for(const t of n){let n={valid:!0};(0,p.QX)(t,e)&&(n=await(0,i.uC)(t,e)),n.valid?C(t,n.message):(I(t,n.message),o.push(n))}return o[0]||v}async function S(e){return(0,o._A)(e.origin)&&(0,r.Om)(e)?k(e):v}async function k(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,r.wR)(e).find((e=>e.selected));return!(!t||!(0,h.I9)(t.origin))}(e))return v;const{min:t}=await(0,o.EH)(e,e.parent);return(0,r.wR)(e).filter((e=>!(0,r.yg)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.GS)(d.CW.select.limitMin,{min:t}),dueToNode:e}}const T={};async function E(e,t){if(!t.list)return v;const{multiple:n,min:r,max:o,required:a}=t,s=t.text?(0,l.GS)(d.CW.menu.listItem)+t.text:(0,l.GS)(d.CW.menu.topList),c=t.list.filter((e=>e.selected));for(const t of c){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.inputReq,{text:n.text})};const r=await(0,i.uC)(n,e);if(!r.valid)return{...r,message:(0,l.GS)(d.CW.menu.inputRule,{text:n.text,rule:r.message})}}const u=c.length;if(a&&0===u)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.required,{text:s})};if(n&&u<r&&u>0)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.requiredBetween,{text:s,min:r,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await E(e,n);if(!t.valid)return t}return v}function I(e,t){e.errorMessage!==t&&(0,u.e)(e,{errorMessage:t})}function C(e,t){e.errorMessage===t&&(0,u.e)(e,{errorMessage:""})}function O(e,t){(0,u.E3)().locateError(e,t)}async function N(e,t){if((0,o.S)(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.GS)(d.CW.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const r=T[e.type];let i=r?await r(e):v;return i.valid&&t&&(i=await(0,a.qc)(e)),i.valid&&I(e,i.message),i}T.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await S(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},T.select_image=e=>T.select(e),T.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},T.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},T.icon_mark=async e=>{const t=await T.value_mark(e);return t.valid?(0,o.K6)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}:v:t},T.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:r}=e;let i=(0,o.K6)(r)?r.rankCount||n.length:0;const a=n.length;i>a&&(i=a),i=w(e,i);let s=0;const c=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<c.length&&c[e].sortNo===e+1;e++)s++;return i>s?{valid:!1,message:(0,l.GS)(d.CW.rank.limitMin,{min:i}),dueToNode:e}:(t=b(e,!0),t.valid?x(e,!0):t)},T.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.cd)(t)?v:(0,o.K6)(t)||(0,r.Om)(e)?(0,o.Un)(t)?k(e):(0,o.ct)(t)||(0,o.gd)(t)||(0,o.cx)(t)?function(e){let t,n,r;(0,o.ct)(e.origin)?(t="yid",n=e.renderOptionsY,r=!1):(0,o.gd)(e.origin)?(t="xid",n=e.renderOptionsX,r=!0):(0,o.cx)(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,c.oj)(e[t],n))))return{valid:!1,message:r?(0,l.GS)(d.CW.matrix.colLimitMin,{min:1}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:1}),dueToNode:e}}return v}(e):async function(e){const t=(0,o.S2)(e.origin);let{min:n}=await(0,o.EH)(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,c.oj)(e[r],i))).length<n)return{valid:!1,message:t?(0,l.GS)(d.CW.matrix.colLimitMin,{min:n}):(0,l.GS)(d.CW.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},T.region=async e=>!(0,o.K6)(e.origin)||e.value?v:{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e},T.location=async e=>{const t=await T.region(e);return t.valid||(t.message=(0,l.GS)(d.CW.locate.required)),t},T.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let i=!0,a="";const s=(0,r.iQ)(e,!0);if(!(0,o.K6)(e.origin)&&0===s)return v;const c=await(0,o.YP)(e,e.parent),{max:u}=c,f=w(e,c.min);let h=0;a=(0,l.GS)(d.CW.upload.uploadRequired);let m=!1;for(const t of n)(0,p.QX)(t,e)?(C(t,a),h+=1):!0===t.origin.fillRequired&&(I(t,a),m=!0);return s<f?(i=!1,a=(0,l.GS)(d.CW.upload.amountLimitMin,{min:f})):s>u?(i=!1,a=(0,l.GS)(d.CW.upload.amountLimitMax,{max:u})):(i=!0,a=""),f>h?{valid:!1,message:(0,l.GS)(d.CW.upload.amountLimitMin,{min:f}),dueToNode:e}:m?{valid:!1,message:(0,l.GS)(d.CW.upload.uploadRequired),dueToNode:e}:{valid:i,message:a,dueToNode:e}},T.verify=async e=>{if((0,u.E3)().preview||(0,u.W4)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}else{const t={valid:!1,message:(0,l.GS)(d.CW.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.I1)({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.eY)(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.I1)({code:r},e),v}catch(e){return a()}}}}return v},T.menu=T.select,T.area=async e=>y(e),T.select_icon=async e=>{const t=y(e);return t.valid?S(e):t},T.weight=async e=>{if(!(0,o.K6)(e.origin)&&!(0,r.W4)(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.GS)(d.CW.weight.totalLimitMin,{min:n}),dueToNode:e}:v},T.cascade=async e=>{if(!(0,o.K6)(e.origin)&&!(0,r.Om)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?E(e,t):n},T.hot_spot=async e=>{const t=function(e){if(!(0,o.K6)(e.origin))return v;const t=(0,r.Om)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}(e);if(!t.valid)return t;let n=await S(e);return n.valid?(n=b(e,!1),n.valid?x(e,!1):n):n},T.heat_map=async e=>y(e),T.slide_rate=T.value_mark,T.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.GS)(d.CW.maxDiff.all)}};const L=(0,c.Cu)((async(e,t)=>{if(t&&I(t,(await(0,i.uC)(t,e)).message),e){const t=await R([e]);t.message||I(e,t.message),(0,m.ew)(e)}}),250);async function R(e,t=!1,n=!1){const r=[];for(const i of e){const e=await N(i,t);e.valid||(n&&I(e.dueToNode,e.message),r.push(e),(0,m.ew)(i))}return r[0]||v}},9677:(e,t,n)=>{"use strict";n.d(t,{KA:()=>c,_u:()=>l,mK:()=>u,uC:()=>m}),n(7768),n(9624);var r=n(3001),i=n(6496),o=n(4708),a=n(568),s=n(2352);function c(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function u(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.W0)(i.fillStart,{state:n}),a=await(0,r.W0)(i.fillEnd,{state:n});return(0,s.oV)(o)&&(o=-1/0),(0,s.oV)(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.GS)(a.CW.fill.valueLimit,{min:t,max:n})}const p={};async function h(e,t,n){const{itemsMax:r,itemsMin:s}=await(0,o.jJ)(t,n),c=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),0);let u="";return(c<s||c>r)&&(u=(0,i.GS)(a.CW.fill.itemsLimit,{min:s,max:r})),{valid:!u,message:u}}async function m(e,t){const n=(0,s.Wo)(e.value),{origin:r}=e,i=r.fillType,o=p[i];if(!o||(0,s.oV)(n)&&"auto_complete"!==i)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const c=await o(n,e,t);return a.context.option=null,c.valid||(c.dueToOption=e,c.dueToNode=t),c}p.chars=async(e,t,n)=>{const{start:r,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const c=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.GS)(a.CW.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",r.push((0,i.GS)(a.CW.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",r.push((0,i.GS)(a.CW.fill.chinese)));const o=r.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,i.GS)(a.CW.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,i.GS)(a.CW.fill.charsLimit,{min:t,max:n})}(e,r,o);return{valid:!c,message:c}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.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.GS)(a.CW.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.GS)(a.CW.fill.inputDecimalDigits,{scale:r.scale})};const{start:o,end:s}=await l(t,n),c=f(Number(e),o,s);return{valid:!c,message:c}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,i.GS)(a.CW.fill.inputInteger)};const r=Number(e),{start:o,end:s}=await l(t,n),c=f(r,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=c(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.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.GS)(a.CW.fill.needZipCode)}},p.url=async e=>{const t=u(e);return{valid:t,message:t?"":(0,i.GS)(a.CW.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,i.GS)(a.CW.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:h(e,t,n),p.list_select=(e,t,n)=>h(e,t,n)},984:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,QX:()=>l,g7:()=>o}),n(9624);var r=n(2352),i=n(3001);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.Qr)(n)),n}function c(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,r.oV)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const u={};function l(e,t){return(u[t.type]||c)(e,t)}u.sequence=(e,t)=>-1!==e.sortNo&&c(e,t)},9796:(e,t,n)=>{"use strict";n.d(t,{Co:()=>f,GM:()=>m,iO:()=>p,uS:()=>h}),n(9952);var r=n(5776),i=n(556),o=n(2331),a=n(9376),s=n(6764),c=n(3001),u=n(4708),l=n(4316),d=n(3080);async function f(e,t){const{options:n,passRefs:r,refMaps:i}=await(0,a.q0)(e,t.origin,null,!0);(0,d.GO)(t,i);const o=await(0,l.o9)(t,n,r);return(0,s.uQ)(t,o)}function p(e,t,n=!1){const{loopStack:r}=t;return r.find(((t,o)=>(!n||o===r.length-1)&&(0,i.oj)(t.node.nodeUuid,e.nodeUuid)))}async function h(e,t,n,r,i,o){const a=(0,u.C2)(i),s={state:e,usage:{node:t,optionId:i.uuid}},l=await(0,c.E3)(a.text,s,"WRAPPED_URL"),d=await(0,c.E3)(i.text,s,"WRAPPED_URL"),f=await(0,c.E3)(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.G.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:c}=n,u=s.find((e=>(0,i.oj)(e.selfPortId,a.uuid))).destInputId,l=(0,r.gR)(e,u),d=o[0],{origin:f}=t,p=c[c.length-1],g=await h(n,t,f.nodeUuid,0,d,p),v={destInputId:u,node:f,varList:o,replacements:p?[...p.replacements,g]:[g],currentIndex:0};return c.push(v),{target:l,loop:(0,i.O0)(v),loopStack:(0,i.O0)(c)}},async _increase(e,t,n){const{nodeUuid:o}=t,{loopStack:a}=n,s=a[a.length-1],{varList:c,replacements:u,destInputId:l}=s,d=s.currentIndex+=1,f=c[d],p=a[a.length-2],m=await h(n,t,o,d,f,p),g=(0,r.gR)(e,l);return u[u.length-1]=m,{target:g,loop:(0,i.O0)(s),loopStack:(0,i.O0)(a)}},async _end(e,t,n){const{loopStack:r}=n;r.pop();const a=await o.G.findNext(e,t,n);if(r.length>0){const e=(0,i.O0)(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)}}},8956:(e,t,n)=>{"use strict";n.d(t,{kF:()=>T,WU:()=>I,Gw:()=>S});var r=n(5776);function i(e,t,n,i,o){return o||(o=(0,r.MR)(e,t,n.uuid)),o||i.origin.parentRandomId||t.length&&(o=(0,r.gR)(e,t[t.length-1].destInputId)),o}var o=n(4708),a=n(6276);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],c={async findNext(e,t){const{destList:n,output:c}=t.origin,u=(0,a.IN)(t)?t.otherOptions:[],l=s.includes(t.type)?u:(0,o.wR)(t),d=l&&l.find((e=>e.selected));return{target:i(e,n,c,t,d&&(0,r.MR)(e,n,d.uuid))}}},u={async findNext(e,t,n){const{origin:{destList:i,parentRandomId:a}}=t,s=(0,o.GE)(t);let u=s&&(0,r.MR)(e,i,s.uuid);return u||(u=(await c.findNext(e,t,n)).target),u||!i.length||a||(u=(0,r.gR)(e,i[0].destInputId)),{target:u}}};var l=n(2331),d=(n(2048),n(4060));const f={async findNext(e,t){const{origin:n,parent:i}=t,{options:o,output:a,destList:s,logicType:c,reverse:u,outputN:l}=n,f={logicType:c,reverse:u,options:o},p=await(0,d.wx)(i,f);t.logicResult=p;const h=p?a:l;return{target:(0,r.MR)(e,s,h.uuid)}}};var p=n(6940),h=n(9796);n(5960),n(9952);const m={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:c}=n,u=[...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 u)if(l=(0,r.MR)(e,s,t.uuid),l)break;return{target:i(e,s,c,t,l)}}};var g=n(9216),v=n(556),y=n(8184),w=n(8856),_=n(6072);const b={cascade:m,logic:f,uniqueness_verification:{async findNext(e,t){const{origin:n,parent:i}=t,{output:o,destList:a,outputN:s}=n;let c=!0;const u=i.verifyUniquenessUri,l=i.uniquenessVerification;if(u&&l&&l.enabled&&!(0,w.E3)().preview){const e={enabled:!1,method:u.method,url:u.url,params:l.params};c=(await(0,_.eU)({state:i,request:e,customParam:null,silent:!1,shouldCombineSystem:!1})).valid}t.verificationResult=c;const d=c?o:s;return{target:(0,r.MR)(e,a,d.uuid)}}},loop:h.GM,sequence:u,random:p.qM};function x(e){const t=b[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=>{b[e]=l.G})),["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=>{b[e]=c}));const S=["check","break_point"];function k(e,t){return"loop"===e.type?!(0,h.iO)(e,t):!S.includes(e.type)}function T(e,t,n){return I(e,(0,y.e_)({target:n},t),t)}async function E(e,t,n,i){const{target:o,loop:a,random:s}=i,c=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,r.uK)(o,t.origin)&&(i.loopStack=n,i.loop=e),o.parentRandomId&&c&&!s&&(i.random=c)}else if(c){const t=(0,v.So)(c.node.nodeUuid,n.loopStack);return I(e,(0,g.QL)(n.renderList,t),n)}return i}async function I(e,t,n){let r,i,o=t,a=x(o.type),s=!0;for(;s&&(i=await E(e,o,n,await a.findNext(e,o,n)),r=i.target,r);)k(r,n)?s=!1:(o=(0,y.e_)(i,n),a=x(r.type));return i}},2331:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});var r=n(5776);const i={async findNext(e,t){const{destList:n,output:i}=t.origin;return{target:(0,r.MR)(e,n,i&&i.uuid)}}}},6788:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,c:()=>o}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);const r=new Set;function i(e){return r.has(e)}function o(e){r.add(e)}},6940:(e,t,n)=>{"use strict";n.d(t,{ID:()=>d,mU:()=>u,qM:()=>f}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var r=n(556),i=n(5776),o=n(2331),a=n(1344),s=n(6788);let c=[];function u(){return c}const l=new Set;function d(e,t){e&&0!==e.length&&(c=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.c)(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 u=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,r.oj)(t.selfPortId,o.uuid)){const o=(0,i.gR)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,r.ec)(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.ec)(e.length),1);return e}(Object.keys(a),t);let c=[];for(;s.length>0;){const e=(0,r.ec)(s.length);c=c.concat(a[s[e]]),s.splice(e,1)}return c}(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.gR)(n,e);for(;a;)t.push(a),a=(0,i.MR)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,r.ec)(t.length),n=t[e].nodeUuid;(0,s.c)(n),c.push(n),t.splice(e,1)}})),l.add(a))}(u,t),u=(0,a.wn)(u,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,i.gR)(e,u[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:r}=t;return{target:(0,i.gR)(e,r[n]),random:{...t}}},_end:(e,t,n)=>o.G.findNext(e,t,n),findNext(e,t,n){const{randomList:i}=n,{nodeUuid:o}=t,a=i.find((e=>(0,r.oj)(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)}}},7192:(e,t,n)=>{"use strict";n.d(t,{GI:()=>o,Un:()=>c}),n(9952);var r=n(5876),i=n(9348);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:c(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=c(t),a.limitEnd=c(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 c(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 c=(0,i.A)(t);e.setAttribute("data-v-id",c);const u=(0,r._m)(n);u&&e.setAttribute("data-v-config",u)}return t.innerHTML}},3048:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,a:()=>a});var r=n(556),i=n(7192);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.GI)(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.kt)(e.referUuid)}return n.referId}},7404:(e,t,n)=>{"use strict";n.d(t,{ML:()=>d,SC:()=>u,Ww:()=>f,Yj:()=>l,gh:()=>c,uK:()=>s}),n(7768),n(9624);var r=n(568),i=n(8856),o=n(6496);let a;function s(){return a||(a=(0,i.W4)().app.getParams()),a}function c(){a=null}function u(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.E3)().preview||(0,i.W4)().dev.autoRun?(0,i.E3)().notify((0,o.GS)(r.CW.preview.noLink)):((0,i.W4)().hook.beforeForceLeave(),(0,i.W4)().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}},2172:(e,t,n)=>{"use strict";n.d(t,{a:()=>o}),n(9952);var r=n(1344),i=n(8856);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.e)(e,{costTime:t+a,endTime:o}),await(0,r.mi)(e)}(0,i.e)(e,{currentStartTime:o})}},2524:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var r=n(8856),i=n(9193),o=n(1304),a=n(6796);async function s(e){const t=(0,a.k9)(e);(0,r.e)(e,{nodes:t});let n=null;if((0,a.O2)(e)){const t=(0,a.Oi)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,r.e)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,i.y)(t,n);(0,r.e)(e,{groupTable:o})}else(0,r.e)(e,{groupTable:void 0});const s=await(0,o.uC)(e);(0,r.e)(e,{prevButton:(0,o.Qb)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},6348:(e,t,n)=>{"use strict";n.d(t,{U3:()=>u,i:()=>s,oP:()=>c});var r=n(5776),i=n(8856);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.E3)().uploadLog(e)}}};function c(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,r.CY)(e))}function u(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,i.W4)().hook.onSwitchPage())}},9193:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(556);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.YF)();return e.headHidden=!0,{uuid:t,node:e}}},7556:(e,t,n)=>{"use strict";n.d(t,{SA:()=>u,SW:()=>s,c5:()=>c,ox:()=>a}),n(7768);var r=n(3552),i=n(8348);function o(e){const t=":"+(0,i.yy)().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 c(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.q)(t.questionText),t.describe=(0,r.q)(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.q)(e.text)}))}(e),e)))}function u(e){return e.forEach((e=>{e.value=(0,r.q)(e.value)})),e}},1304:(e,t,n)=>{"use strict";n.d(t,{eO:()=>X,ek:()=>z,ef:()=>Q,ID:()=>F,uC:()=>B,gv:()=>D,Qb:()=>j,Wf:()=>Y,I7:()=>H,e0:()=>K,YR:()=>M,ye:()=>q,KY:()=>G}),n(2048),n(9952);var r=n(6348),i=n(7404),o=n(5776),a=n(6784),s=n(9216),c=n(9968),u=n(1428),l=n(8184),d=n(560),f=n(8956),p=n(8856),h=n(6496),m=n(2331),g=n(8412),v=n(568),y=(n(7768),n(9624),n(5616)),w=n(7320),_=n(6072),b=n(3001),x=n(4060),S=n(4732);const k={},T={};async function E(e,t,n){const{actions:r}=t.origin;if(r&&!(0,y.K)()&&!(0,p.E3)().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(T[t.renderId])return;T[t.renderId]=!0}"backward_leave"===e&&delete T[t.renderId];for(const i of r){if(i.disabled||i.event!==e)continue;const{activeConfig:r}=i;if(!r||await(0,x.wx)(n,r))if("http_request"===i.type)(0,S.y)(i),await(0,_.g5)({state:n,request:i.request,customParam:null,silent:!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.E3)(e.address,r)).replace(/\s/g,""),content:await(0,b.qQ)(e.content,r),title:(await(0,b.E3)(e.title,r)).trim()};await(0,w.G8)(t)}else{const{sms:e}=i,t={};for(const n of e.params)t[n.name]=(await(0,b.E3)(n.value,r)).trim();const n={...o,url:(await(0,b.E3)(e.url,r)).replace(/\s/g,""),content:t};await(0,w.G8)(n)}}}}}var I=n(1344),C=n(2524),O=n(6796),N=n(4676);let L;var R=n(556),A=n(2172);let P;function M(){return!!P}const U=["end","gift","lottery"];function W(e){let{prev:t}=e;const n=[];let r=t&&(0,o.S)(t);for(;r;)n.push({node:t,reason:r}),t=t.prev,r=t&&(0,o.S)(t);return{prev:t,skipList:n,current:e}}function j(e){if((0,p.E3)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,r=(0,O.Oi)(e),{prev:i}=W(r),o=r.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.E3)().preview&&"end"===o?(0,h.GS)(v.CW.global.backTest):t&&i&&(r.checkMode===i.checkMode||(0,p.E3)().preview)&&!U.includes(o)?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,h.GS)(v.CW.global.previous):e.prevBtnText:""}async function B(e){const{formalResult:t}=e,n=e.current;if((0,R.is)(n,"end"===n.type)){const r=n.endBtnText||(0,h.GS)(v.CW.global.go);if(n.linkUrl)return r;if(t&&t.reward||(0,p.E3)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":r;{const{target:t}=await m.G.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?r:""}}if((0,R.is)(n,"lottery"===n.type)){const e=(0,h.GS)(v.CW.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,h.GS)(v.CW.global.next):e.nextBtnText}function D(e,t){const n=[];let r=1;const i=e[t];let a=e[t+r],s=a&&(0,o.S)(a);for(;a&&s;)n.push({node:a,reason:s}),r+=1,a=e[t+r],s=a&&(0,o.S)(a);return{next:a,skipList:n,current:i}}async function G(e){const t=await(0,c.iW)(e.nodes,!0,(0,O.O2)(e));if(t.valid){if((0,O.O2)(e)){(0,p.e)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await E("forward_leave",t,e)}else await E("forward_leave",e.current,e);return await(0,s.AD)(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.i.trigger("NEXT_FAIL",s),"vital"===t.type)throw(0,p.E3)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.E3)().alert(t.message):(e.inSingleGroup||(0,p.E3)().notify(t.message,t),(0,c.Oe)(t,e))}(e,t),!1}function q(e,t){(0,p.e)(e,{nextLoading:t})}function F(e){q(e,!0),P={state:e}}async function z(e){q(e,!1),P&&(await H(P.state),P=void 0)}function V(e,t,n){(0,r.U3)({origin:t,parent:e},!0);const a={...(0,i.uK)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.E3)().preview)(0,u.ID)(n,t,e.theme,(0,o.q_)(e.nodeList)),(0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink((0,p.W4)().app.getRewardUrl(a)),(0,p.E3)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:r}}}=e;(0,p.W4)().auth.authorizeGift(n,r,t,"end"),(0,p.E3)().customAbort()}}function K(e,t){t.linkUrl?((0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink(t.linkUrl),(0,p.E3)().customAbort()):V(e,(0,o.o1)(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 D(t,(0,s.SM)(t,n))}(e),{current:n,next:c}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,i.ML)(n);const c=(0,o.MR)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.G3)(e,c);if((0,R.is)(c,"lottery"===c.type)){const t=await(0,l.yI)(c,d,e);(0,a.cR)(t,e,!(!d||!d.id)),(0,p.e)(e,{current:t}),(0,r.U3)(t,!0)}else V(e,c,d);await(0,C.w)(e)}(e,n):(await(0,p.W4)().hook.beforeGotoNext(),(await(0,d.e)(e,{valid:!0,message:""},n,c)).valid?(function(e){if((0,p.E3)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,r=t[t.length-1];let i=r,a=[i];for((0,O.ms)(r.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===r.origin.groupId)),i=a[0]);i.prev&&(0,o.S)(i.prev)&&!(0,O.ms)(i.prev.nodeUuid,e.nodeGroups);)a.unshift(i.prev),i=i.prev;return a}(e),n=t.map((e=>(0,N.cA)(e))).filter((e=>!!e));(0,p.W4)().network.pushSocket("update",{answers:n}),clearTimeout(L)}(e),async function(e,t){const{next:n,current:i}=t;(0,p.e)(e,{current:n}),n.reached=!0,(0,a.EZ)(i,n),(0,r.U3)(n,!0),(0,g.K8)(e),await(0,I.iq)(e),await(0,C.w)(e),q(e,!1),(0,o.CY)(i),(0,s.S_)(e,e.current),r.i.trigger("NEXT_OK")}(e,t)):q(e,!1))}async function Y(e){const t=(0,O.Oi)(e),{prev:n,skipList:i}=W(t);if(n){if((0,O.ms)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await E("backward_leave",n,e)}else await E("backward_leave",t,e);for(const t of i)await E("backward_enter",t.node,e),await E("backward_leave",t.node,e);if((0,p.e)(e,{current:n}),await(0,A.a)(e),(0,r.U3)(n,!0),(0,g.K8)(e),await(0,I.iq)(e),await(0,C.w)(e),(0,a.aS)(t,n),(0,s.S_)(e,e.current),r.i.trigger("PREV_OK"),(0,O.ms)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await E("backward_enter",n,e)}else await E("backward_enter",n,e)}}async function Q(e,t){const{nodeList:n,current:r}=e,i=await(0,f.WU)(n,r,e),{target:o}=i;return o?X(e,i,t):null}async function X(e,t,n){const r=(0,l.e_)(t,e);if(n&&n(r))return null;if(e&&e.current&&"logic"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.U3)(e,e.current,t)}if(e&&e.current&&"uniqueness_verification"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.eK)(e,e.current,t)}const i=await(0,l.o9)(r,e.current);(0,p.e)(e,{current:i}),await E("forward_enter",i,e);const s=(0,o.S)(i);return s&&((0,a.YZ)(e,i,s),await E("forward_leave",i,e)),i}},8412:(e,t,n)=>{"use strict";n.d(t,{K8:()=>p,wB:()=>f}),n(9952);var r=n(5776),i=n(4708),o=n(9216),a=n(8856);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function c(e){return e&&"end"!==e.type}function u(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=u(e=(0,r.o1)(t,n),t)),e}function l(e,t){let n;t=u(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,i.sf)(t);if(o&&(n=(0,r.MR)(e,a,o.uuid)),!c(n))if(s)n=(0,r.MR)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,r.MR)(e,a,t.uuid),c(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.SM)(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.W4)().dev.infer)return;const{percent:t,index:n}=f(e);n>-1&&(0,a.e)(e,{progress:t})}},9216:(e,t,n)=>{"use strict";n.d(t,{AD:()=>v,QL:()=>h,SM:()=>m,S_:()=>y,Uq:()=>w}),n(9952);var r=n(1304),i=n(5776),o=n(7788),a=n(556),s=n(8856),c=n(9948),u=n(8412),l=n(6348),d=n(2524),f=n(6796);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.oj)(n.renderId,r.renderId))return i}var n,r;return-1}function g(e,t){(0,s.e)(e,{refreshing:t})}function v(e,t,n){if(g(e,!0),clearTimeout(p),n.initial&&(0,l.U3)(e.current,!0),n.delay){const r=(0,s.W4)().dev.autoRun||(0,s.W4)().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.e)(e,{loopStack:(0,a.O0)(t.loopStack)}):(0,s.e)(e,{loopStack:[]});const r=e.randomList,i=t.random;r.forEach((e=>{i?(0,a.oj)(e.node.nodeUuid,i.node.nodeUuid)?e.currentIndex=i.currentIndex:i.stack.some((t=>(0,a.oj)(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.kt)(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 c=[...e.renderList];c=c.length>0?c:[t];const u=m(c,t);if(u<0)return c;c.length=u,c.push(t),(0,s.e)(e,{renderList:c}),(0,f.O2)(e)&&await(0,o.qc)(t);let l=null;const d=t=>!(0,f.ym)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,r.ef)(e,p);if(!t)break;if(c.push(t),f.AN.includes(t.type))break;if(!(0,i.S)(t)){if(l||(l=t,(0,f.ms)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.ym)(l,t,e.nodeGroups))break;await(0,o.qc)(t)}}return c}(e,t,n),h=n.initial?(0,r.gv)(p,l).next:t;(0,s.e)(e,{current:h}),g(e,!1),y(e,t),await(0,d.w)(e),n.initial||(await(0,r.ek)(e),e.inSingleGroup&&(0,u.K8)(e)),(0,c.Y1)()}},1428:(e,t,n)=>{"use strict";n.d(t,{G3:()=>S,ID:()=>k,oD:()=>E,uO:()=>I});var r=n(5776),i=n(1884),o=n(7404),a=n(556),s=n(8856),c=n(6496),u=n(7688),l=n(908),d=n(6348),f=n(6784),p=n(568),h=n(7320),m=n(5170),g=n(5224),v=n(2392),y=n(7828),w=n(4404),_=n(3132),b=n(5032);let x=null;function S(e,t){if((0,s.E3)().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.my)(t.options,1)[0],o=(0,r.MR)(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.E3)().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.x)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.W4)().storage.set("cached_reward",JSON.stringify(i))}}function T(e){const t=(0,s.W4)().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 E(){x=null}async function I(){if(x)return x;const e=(0,o.uK)(),{rt:t,rid:n,code:r,qid:a,tid:g,locale:S,reward_from_qr_code:k}=e;let E;(0,c.Uj)(S);let I,O={};if("red_envelope"===t){let t;(0,s.E3)().preview?t=T(Number(n)).redEnvelope:!r&&k?t=C:(n&&!r&&((0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().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.MT)({code:r},n)));const{gift:i,theme:o,isTemporaryForWXQrcode:u}=t;E=i.origin,O=t.recipient,(0,f.ML)(E,{surveyId:a,userInfo:O,transactionID:g}),I={isTemporaryForWXQrcode:u,rewardValue:E.giftCount+" "+(0,c.GS)(p.CW.reward.yuan),wechatID:O.nickname,wechatImage:O.headimgurl,theme:o}}else{const e=T(Number(n));if(!e)return(0,s.E3)().error((0,c.GS)(p.CW.global.invalidReward)),null;const{custom:t}=e;E=t.giftNode,I={qrCode:t.qrCode,rewardToMessage:E.needSendNote,theme:t.theme}}(0,y.__)(E,E.i18n[S]);const N=(0,w.Y)(E),L={...I,images:E.image?[(0,_.a)(E.image)]:[],video:E.video,layout:E.layout,rewardId:n,eventHub:d.i,nodeName:E.nodeName,type:E.type,rewardType:E.giftType,renderId:E.nodeUuid,rewardName:E.activityName,title:E.blessings,description:E.describe,summary:E.describe,rewardTime:(0,i.kF)(),...N,prevButton:(0,s.E3)().preview&&!(0,s.E3)().realTimePreview?(0,c.GS)(p.CW.global.backTest):"",nextButton:E.linkUrl&&(E.endBtnText||(0,c.GS)(p.CW.global.go)),handleEvents:{...m._,async handlePrevClick(){(0,s.W4)().app.gotoStartPage((0,o.uK)())},handleOptionClick:async(e,t)=>(await(0,u.o)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.s)(e,t)).result,async handleNextClick(){E.linkUrl&&(0,o.ML)(E.linkUrl)},async handleGetRewardWX(){(0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().customAbort()}}};return L.template=await(0,b.m)(E.template,L),x=L,(0,v.y)(L.theme),await(0,s.W4)().hook.afterFetchReward(L),L}const C={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"}},8737:(e,t,n)=>{"use strict";n.d(t,{ML:()=>p,YP:()=>h,m0:()=>g,wH:()=>m}),n(7768),n(9624),n(9952);var r=n(3001),i=n(7404),o=n(6348),a=n(9677),s=n(7320),c=n(5667),u=n(2352),l=n(6620),d=n(8856);function f(e,t){const n=(0,u.Wo)(e.result);return e&&(0,a.mK)(n)?(setTimeout((()=>{(0,i.ML)(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("&"),c={};for(const t of s){const[n,i]=t.split("=");c[n]=await(0,r.cb)(i,e)}return c}async function h(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.i.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),h=await(0,r.cb)(u,t,!p);return h.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:h.trim().startsWith("http")?async function(e,t){return(0,i.ML)(t),o.i.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(),u=n.substring(r+1),p=u.indexOf("?"),h=-1===p?u:u.substring(0,p);let m={};if(-1!==p){const e=-1===p?"":u.substring(p);e&&(m=e?(0,i.Yj)(e):{})}let g={type:a,done:!1};if("FAKE"===a)g=f(await(0,c.E)({url:h,data:(0,l.a8)(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.SY)(h,{type:e,data:m}),a)}catch(e){(0,d.E3)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.i.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.E3)(i,{state:e,joinBy:","})}return 0===a.length?void 0:s}},6796:(e,t,n)=>{"use strict";n.d(t,{AN:()=>u,O2:()=>c,Oi:()=>a,k9:()=>s,ms:()=>o,ym:()=>l});var r=n(5776),i=n(8856);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 c=s-1,u=t;for(;;){const t=n[c--];if(!l(t,u,e.nodeGroups))break;(0,r.S)(t)||(a.unshift(t),u=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,r.S)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,i.e)(e,{pageEnd:!1,pageStart:!1})})),(0,i.e)(a[0],{pageStart:!0}),(0,i.e)(a[a.length-1],{pageEnd:!0})),a}function c(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const u=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!u.includes(e.type)&&!u.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)}},560:(e,t,n)=>{"use strict";n.d(t,{S:()=>k,e:()=>T});var r=n(6348),i=n(7320),o=n(4676),a=n(6784),s=n(6072),c=n(1304),u=n(8184),l=n(8737),d=n(1344),f=n(8856),p=n(6496),h=n(568),m=n(2352),g=n(2524),v=n(7801),y=n(6620);const w={valid:!0,message:""},_={valid:!1,message:""};let b=!1,x=!1,S=!1;function k(){b=!1,x=!1,S=!1}function T(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}),E(e,t,i)}async function E(e,t,n){const k=n.pop(),T=await async function(e,t,n,k){const T=n.checkMode,E=k.checkMode,L=k.type;if("end"===L&&(clearInterval(e.timer),(0,f.e)(e,{limitTime:void 0})),(0,f.E3)().preview)return t;if(T){if("end"===L)return async function(e,t,n){if(S)return _;(0,f.W4)().network.closeSocket(),S=!0;const u=I(e,n);(0,c.ye)(e,!0),(0,v._)(e,"all"),await(0,f.W4)().hook.beforeEndSurvey(e);try{const t=await(0,o.gp)(e,"all","examine_skipped_url"),n=await(0,i.eI)(t,e.transactionID);e.responseStatus=n.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const n=(0,m.Wo)(t?JSON.stringify(t):"")||"";return(0,f.E3)().uploadLog("skip提交失败 "+n,"warning"),(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain)),S=!1,(0,c.ye)(e,!1),_}r.i.trigger("CHECK_FAIL"),(0,f.W4)().network.closeSocket();try{await(0,d.ig)(e),u||(0,a.W2)(t,n,e),await(0,s.Ed)(e,n),(0,c.ye)(e,!1),C(e);const r=await(0,l.YP)("examine_skipped_url",e);if((0,l.wH)(r))return _}catch(e){(0,f.E3)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return w}(e,n,k);if(!E)return async function(e){if(x)return _;x=!0,(0,c.ye)(e,!0);const t=await(0,o.gp)(e,"check","examine_failed_url"),n=t.answers.length;(0,v._)(e,"check");try{const o=await(0,i.KY)(t,e.transactionID);return(0,a.Sg)(e,n),(0,c.ye)(e,!1),e.responseStatus=o.status,r.i.trigger("CHECK_SUBMIT"),w}catch(t){await(0,f.W4)().hook.onEndSurvey(e),await(0,d.ig)(e);const r=(0,i.SC)(t);return N(r)?await O(e,n,"examine_failed_url",r):(x=!1,(0,f.E3)().uploadLog(JSON.stringify(t),"warning"),(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain))),(0,c.ye)(e,!1),_}}(e)}return"end"===L?async function(e,t){var n;if(b)return _;(0,f.W4)().network.closeSocket(),b=!0;const x=I(e,t)||function(e,t){const{renderList:n,startTime:r}=e,i=function(e,t){const n=(0,p.GS)(h.CW.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.e)(r,{hasReward:!1,title:i}),(0,a.kB)(t,e),!0}return!1}(e,t);(0,c.ye)(e,!0),(0,v._)(e,"normal");const S=await(0,o.gp)(e,"normal","committed_url");let k,T;await async function(e,t,n){const r=t.verifyUniquenessUri,i=t.uniquenessVerification;if(r&&i.enabled&&n.origin.doUniquenessVerification&&!(0,f.E3)().preview){const n=await(0,y.aI)(t,i.params,!1);Object.keys(n).length>0&&(e.verification_params=n)}}(S,e,t),await(0,f.W4)().hook.beforeEndSurvey(e);try{k=await(0,i._K)(S,e.transactionID);const t=k.response||k;e.responseStatus=t.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const o=(0,i.SC)(t);if(N(o))await O(e,S.answers.length,"examine_failed_on_commit_url",o);else if(o===i.aS.response_overflow){C(e);const t=await(0,l.YP)("overflow_url",e);(0,l.wH)(t)||e.ignoreSubmittingResult||(0,f.E3)().error((0,i.O)(o)),e.responseStatus="committed",r.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}else{const r=null!==(n=(0,m.Wo)(t?JSON.stringify(t):""))&&void 0!==n?n:"";(0,f.E3)().uploadLog("正式提交失败: "+r,"warning"),e.ignoreSubmittingResult||(0,f.E3)().notify((0,p.GS)(h.CW.global.tryAgain)),(0,c.ye)(e,!1),b=!1}if(!e.ignoreSubmittingResult)return _;await(0,f.W4)().hook.onEndSurvey(e),k={}}e.formalResult=k;try{await(0,s.Ed)(e,t),x?T=await(0,l.YP)("invalid_url",e):((0,a.kv)(t,e,S.answers.length,k),k.reward&&(0,f.e)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.W4)().app.canHandleReward())return(0,u._M)(t,e)}(t,e),T=await(0,l.YP)("committed_url",e))}catch(e){(0,f.E3)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.ig)(e),(0,c.ye)(e,!1),C(e),r.i.trigger("FULL_SUBMIT"),await(0,g.w)(e),(0,l.wH)(T)?_:w}(e,k):t}(e,t,k.prev,k.next);return 0===n.length||"vital"===T.type?T:E(e,T,n)}function I(e,t){const{oneReplyPerTerminal:n,sid:r}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.kr)(t,e),n&&(0,f.W4)().storage.set(r,"1"),!0)}function C(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.W4)().storage.set(n,"1")}async function O(e,t,n,o){(0,a.ms)(e,t),C(e);const s=await(0,l.YP)(n,e);(0,l.wH)(s)||(0,f.E3)().error((0,i.O)(o)),e.responseStatus="examine_failed",r.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}function N(e){return e===i.aS.quota_not_match||e===i.aS.quota_full}},9948:(e,t,n)=>{"use strict";n.d(t,{Gg:()=>z,q0:()=>X,ER:()=>Y,Y1:()=>G});var r=n(5776),i=n(8956),o=n(1304),a=n(1884),s=n(4556),c=n(7688),u=n(908),l=n(1576),d=n(6680),f=n(8184),p=n(6784),h=n(7788),m=n(9216),g=n(7320),v=n(7556),y=n(560),w=(n(4676),n(4196)),_=n(6348),b=n(1344),x=n(5616),S=n(8856),k=n(6496),T=n(7828),E=(n(4708),n(5170)),I=n(556),C=n(8412),O=n(568),N=n(4872),L=n(8360),R=n(7404),A=n(3004),P=(n(2048),n(9952),n(2524)),M=n(6796);var U=n(7801);const W={};var j=n(2172),B=n(1103),D=n(6276);const G=(0,I.Cu)((()=>{(0,S.E3)().realTimePreview||K()||_.i.trigger("STRETCH_OK")}));function q(e){return!K()&&!(0,U.i)(e,!0)}function F(e){(0,x.K)()||(e.answerChangedSinceStart=!0)}function z(e){e.handleEvents={...E._,handleQuickAnswer:t=>(F(e),(0,L.E)(t)),async handleLangChange(e){await(0,k.Sk)(e.locale,!0)},async handleCascadeInput(e,t,n,r){if(!q(r))return null;const i=(0,w.cv)(e,t,n,r);return this.handleOptionInput(e,i,r).then((e=>e))},handleOptionAssistInput:(t,n,r,i)=>((0,S.e)(r.assistValue,{[n]:t}),F(e),H({result:!0},i)),handleCascadeClick:async(e,t,n)=>q(n)?H(await(0,w.GA)(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,c.o)(t,n);return r.result&&(0,p.me)(t,n),F(e),H(r,n).then((e=>e))},async handleOptionInput(t,n,r){if(!q(r))return null;const i=await(0,s.wf)(t,n,r);return i.result&&(0,p.ui)(t,n,r),F(e),H(i,r).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.I5)(e,t,n),(0,p.Ux)(e,t,n)),async handleSequenceInput(t,n,r,i){if(!q(r))return null;const o=i.sortNo,a=await(0,d.W)(t,n,r),s=i.sortNo;if(a.result&&o!==s){const e=r.options.findIndex((e=>e===i));(0,p.we)(e,r)}return F(e),H(a,r).then((e=>e))},async handleQuestionInput(t,n){if(!q(n))return null;const r=await(0,u.s)(t,n);return r.result&&(0,p.Oo)(t,n),F(e),H(r,n).then((e=>e))},handleLocateFailed(t){const n=(0,u.S)(t);return n.result&&(0,p.m_)(t),F(e),H(n,t).then((e=>e))},async handlePrevClick(){if(!(0,S.E3)().realTimePreview&&!V()&&e.prevButton&&!K())return(0,p.Id)(e.current),(0,o.Wf)(e).then((e=>e))},handleMaxDiffInput(t,n,r,i){if(!q(i))return null;const o=(0,l.w)(t,n,r);return F(e),H(o,i).then((e=>e))},async handleNextClick(){if((0,S.E3)().realTimePreview||K()||V()&&(0,o.YR)())return;(0,o.ye)(e,!0),await(0,j.a)(e);const{current:t}=e;if((0,p.GS)(t),"lottery"===t.type)(0,o.e0)(e,t),(0,o.ye)(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.qo)(o,e);if(a.valid&&(a=await(0,h.YZ)(i,r)),n=a.valid,n)return(0,S.e)(r,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,I.W_)(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,I.oj)(e.nodeUuid,t)));for(let e=i;e>=0;e--){const t=n[e];if(!(0,r.S)(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.Yp)(e,i),(0,S.e)(e,{current:t});const a=(0,M.k9)(e),s=a.indexOf(t),c=a.slice(s),u=[];let l=t.prev;for(const t of c){const{origin:n,loop:r,random:i,loopStack:o}=t,a=(0,f.e_)({target:n,loop:r,random:i,loopStack:o},e),s=await(0,f.o9)(a,l);l=s,u.push(s)}await(0,S.W4)().hook.beforeGotoNext(),(0,S.e)(e,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,r).concat(u)}),(0,o.ye)(e,!1),_.i.trigger("NEXT_OK"),(0,_.U3)(e.current,!0)}(e,i),(0,C.K8)(e),await(0,b.iq)(e),await(0,P.w)(e),i}(e),(0,o.ye)(e,!1);else if(await(0,o.KY)(e)){if(!V())return(0,o.I7)(e);(0,o.ID)(e)}else(0,o.ye)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,m.S_)(e,e.current);const r=await n.apply(e.handleEvents,t);return(0,m.S_)(e,e.current),r}}))}function V(){return(0,S.E3)().surveyState.refreshing}function K(){return(0,S.E3)().surveyState.nextLoading||V()}async function H(e,t){(0,D.kZ)(t)&&await(0,B.e)(t),(0,_.U3)(t),await(0,b.mi)(t);const n=t.parent;return(0,S.E3)().realTimePreview||(n.inSingleGroup?((0,S.e)(n,{current:t}),await(0,m.AD)(n,t,{type:"page_inner",delay:60})):G()),(0,_.oP)(t),e.result}function Y(e,t={}){return e=e||(0,S.E3)().surveyState,(0,S.e)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),Q(e)}async function Q(e){(0,o.ye)(e,!0);const t=e.nodeList,n=(0,r.q_)(t),a=await(0,i.kF)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,S.e)(e,{nextBtnText:t.nextBtnText||(0,k.GS)(O.CW.global.next),prevBtnText:t.prevBtnText||(0,k.GS)(O.CW.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.eO)(e,a,null);const{current:s}=e,c=(0,r.S)(s),u=(0,M.O2)(e);if(c||u){const t=u?"page_inner":"page_next";await(0,m.AD)(e,s,{type:t,initial:!0})}else(0,S.e)(e,{renderList:[s]}),await(0,P.w)(e),G();(0,C.K8)(e);const l=e.current;return l.reached=!0,(0,p.IU)(e,l),_.i.trigger("START_OK"),await(0,b.aC)(e),s!==l&&await(0,y.e)(e,{valid:!0,message:""},s,l),(0,_.U3)(e.current,!0),(0,o.ye)(e,!1),e}async function X(){const e=(0,S.W4)();if((0,S.E3)().surveyState)return(0,S.E3)().surveyState;const t=await async function(){const e=(0,S.E3)().sid,t=(0,S.E3)().startState;if(!t)return(0,S.W4)().app.gotoStartPage((0,R.uK)()),(0,S.E3)().customAbort(),null;if((0,S.E3)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:r,channel:i,interviewee:o}=n;!function(e,t){(0,S.W4)().dev.autoRun||(0,S.W4)().storage.get(e)&&t&&!(0,S.E3)().preview&&((0,S.E3)().error((0,k.GS)(O.CW.global.antiAgain)),(0,S.E3)().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,R.uK)()};try{const e=await(0,g._Y)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=r,t.channel=i,(0,S.W4)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,g.cA)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:r}=e;if(!(0,S.E3)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,g.kj)(e,{type:"GET"},!0)}catch(e){throw(0,S.E3)().error((0,k.GS)(O.CW.global.downloadError)),e}const r=await(0,N.K)(n);t.nodeList=(0,v.c5)(r.nodes,t.nodeGroups),t.uniquenessVerification=r.uniquenessVerification}(0,T.O_)(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(!W[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,g.kj)(e.url,{type:"GET"},!0);t=await(0,N.K)(n)}return t};W[e.locale]=t()}return W[e.locale]}(e);(0,T.w3)({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:c,surveyId:u,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:T,showLogoInEachPage:E,imageList:I,varStyles:C,variables:O,nodeGroups:N,embedApis:L}=e,{nodeList:R,surveyMeta:P,testCases:M,uniquenessVerification:U}=t;let W=!1;(0,A.U)()||P.collector&&(W=!1===P.collector.multiple_response);const{fakedServers:j,autoCpltGroups:B,noWxShare:D,previewShadowNodes:G,previewQuickAnswer:q,ignoreSubmittingResult:F,qNumberRequired:V,asterisksRequired:K,progressBarRequired:H,nodeTypeInfoRequired:Y,limitTime:Q,minTime:X,timeoutText:J,timeLessText:Z,resumeEnabled:$}=c,ee={embedApis:L,nodeGroups:N,variables:O,varStyles:C,imageList:I,useCustomLogo:b,logoText:x,logoImageUrl:k,logoImageShowWidth:T,showLogoInEachPage:E,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:G&&!(0,S.W4)().dev.autoRun,previewQuickAnswer:q,ignoreSubmittingResult:F,langResume:p,langTable:s,testCases:M,progress:0,resumeEnabled:$||(0,A.U)(),images:f,eventHub:_.i,language:d,sid:o,parsedPayload:t,digest:y,channel:w,transactionID:m,status:g,platform:v,fakedServers:j,autoCpltGroups:B,noWxShare:D,theme:r,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:h,summary:l,bonusLimitTime:"",nodeList:R,companyID:"",oneReplyPerTerminal:W,surveyId:u,qNumberRequired:V,asterisksRequired:K,progressBarRequired:H,nodeTypeInfoRequired:Y,preview:(0,S.E3)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:Q||void 0,minTime:X,timeoutText:J||"",timeLessText:Z||"",timer:-1,restTime:(0,a.KM)(Q),hasVar:i,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1,verifyUniquenessUri:P.verify_uniqueness_uri,uniquenessVerification:U};return z(ee),ee}(t);return(0,S.E3)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.e_)({target:t},e),r=await(0,h.qc)(n,!0);r.valid?e.initValidationPassed=!0:((0,S.E3)().error(r.message||(0,k.GS)(O.CW.verify.failed)),(0,S.E3)().customAbort())}(n),await async function(e){if(await Q(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.sH)(e),clearInterval(e.timer),(0,b.ig)(e),(0,S.E3)().error(e.timeoutText||(0,k.GS)(O.CW.global.timeOver))),(0,S.e)(e,{restTime:(0,a.KM)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,S.E3)().preview){const t=await(0,x.y)(e);(0,S.e)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,S.W4)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5170:(e,t,n)=>{"use strict";n.d(t,{_:()=>f});var r=n(568),i=n(9677),o=n(6784),a=n(7320),s=n(8856),c=n(6496),u=n(556);const l={};function d(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.E3)().notify((0,c.GS)(r.CW.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,u.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:u,validateType:l}=e,{transactionID:f}=t;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(r.CW.preview.noMessage)),!1;if(!u||!(0,i.KA)(u))return(0,s.E3)().notify((0,c.GS)(r.CW.fill.needPhoneNumber)),!1;const n=d(e.renderId);if(!n)return!1;p={...p,phone_num:u},e.messageGetFailed=!1;try{const r=await(0,a.eY)(p);e.serverValidations=r,t.phoneNumber=u,t.phoneUsed=r.phone_num_used,t.phoneUsed&&(0,o.U1)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.eY)(p);e.serverValidations=t,(0,s.e)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(r.CW.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,i.KA)(t))return(0,s.E3)().notify((0,c.GS)(r.CW.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.ae)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},1844:(e,t,n)=>{"use strict";n.d(t,{Core:()=>V,EventHub:()=>u.i,I18n:()=>K});var r=n(8856),i=(n(1088),n(9952),n(3001)),o=n(3552),a=n(7556),s=n(5776),c=n(9376),u=n(6348),l=n(6496),d=n(6784),f=n(7828),p=n(568),h=n(2392),m=n(4872),g=n(7320),v=n(7404),y=n(4072),w=n(1304),_=n(3004),b=n(6276),x=n(4404),S=n(1372),k=n(5032),T=n(9200);let E;function I(e){return(0,v.uK)().offline_survey_id&&(0,s.q_)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.G)(e.icon)}))})),e}function C(e){e.handleEvents={async handleLangChange(t){await(0,l.Sk)(t.locale,!1)||(0,r.e)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,w.ye)(e,!0),await(0,r.E3)().fetchSurveyState(),(0,r.W4)().app.gotoSurveyPage((0,v.uK)()),(0,w.ye)(e,!1))}}}async function O(){if((0,r.E3)().startState)return(0,r.E3)().startState;const e=await async function(){const e=await(0,r.W4)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,r.E3)().sid;return(0,d.U7)(),E||(0,g.qU)(e)}}();!function(e){if((0,r.E3)().preview)return void(E=e);if(E)return;E=e;const{collector:{channel_configs:t}}=e,n=(0,r.W4)().name,i=t.find((e=>e.type===n));if(i){if(!i.allow_response)throw(0,r.E3)().error((0,g.O)(g.FW.interviewee_invalid_error)),new Error(g.FW.interviewee_invalid_error);E.channel=i,(0,r.W4)().auth.authorize(E)}else E.channel={type:n}}(e),await(0,r.W4)().auth.init(e);const t=await async function(e){const t=await(0,r.W4)().dev.getCustomSurveyPayload();if(t)return{cfpd:t,surveyMeta:e};{let t;try{t=await(e.start_auto?(0,g.kj)(e.diagram_url,{type:"GET"},!0):(0,g.kj)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,r.E3)().error((0,l.GS)(p.CW.global.downloadError)),e}const n=await(0,m.K)(t);return function(e){if(!e.version)return(0,r.E3)().error((0,l.GS)(p.CW.global.upgrade)),void(0,r.E3)().customAbort();e.version<2&&e.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,b.yy)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(n),{surveyMeta:e,cfpd:I(n)}}}(e),n=await async function(e){var t;const{surveyMeta:n,cfpd:i}=e,{mediaLibrary:o,surveyId:c,disabledLangs:u,testCases:d,variables:p}=i,h=(0,a.c5)(i.nodes,i.nodeGroups),m=(0,s.q_)(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===T.c||void 0===T.c?void 0:T.c.langTable)&&void 0!==t?t:[]).filter((e=>y.includes(e.locale)&&!(null==u?void 0:u.includes(e.locale)))),_=await(0,l.Mh)(w,v),b=!!(0,r.W4)().storage.get("lang-resume");b&&(0,r.W4)().storage.remove("lang-resume"),(0,l.YP)(_);const x={imageList:o.imageList,videoList:o.videoList,nodeList:h,theme:i.theme,nodeGroups:i.nodeGroups||[],variables:(0,a.SA)(i.variables),surveyMeta:E,embedApis:i.embedApis||[],varStyles:i.varStyles,surveyId:c,langs:g,language:_,langTable:w,langResume:b,testCases:d,disabledLangs:u||[],publishedAt:n.published_at,presetRichStyles:i.presetRichStyles,uniquenessVerification:i.uniquenessVerification};return _===v||(m.i18n&&(0,f.QJ)(m,m.i18n[_]),p.forEach((e=>{e.i18n&&(0,f.gz)(e,e.i18n[_])}))),x}(t),v=await async function(e){if((0,r.E3)().startState)return(0,r.E3)().startState;const{imageList:t,nodeList:n,theme:i,variables:o,varStyles:a,surveyId:d,langResume:f,nodeGroups:h}=e,m=(0,s.q_)(n),{imgScale:g,imgTransType:v,imgTransTime:w,imgPosition:_,welcomeUrl:b,startAuto:k,noWxShare:T,startBtnText:I,hasVar:O,layout:N,showInitLangSelect:L}=m;(0,S.a)(e.presetRichStyles);const R={imageList:t,variables:o,varStyles:a};(0,y.YV)(R);const A=await(0,c.Q9)({},{origin:m}),{interviewee:P}=E,M=P?P.raw_data:(0,r.W4)().auth.userInfo||{},U={...R,embedApis:e.embedApis,nodeGroups:h,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:f,langTable:e.langTable,eventHub:u.i,language:e.language||"en_us",layout:N,startNode:m,sid:(0,r.E3)().sid,noWxShare:T,preview:(0,r.E3)().preview,images:A,surveyId:d,...(0,x.Y)(m),nextButton:I||(0,l.GS)(p.CW.global.start),theme:i.usingTheme,imgScale:g,imgPosition:_,imgTransType:v,imgTransTime:w,welcomeUrl:b,userInfo:M,hasVar:O,parsedPayload:e,startAuto:k||f,showInitLangSelect:(0,l.Mt)(L,e.langTable)};return C(U),U}(n);return await async function(e){const t={state:e},{origin:n}=e,{startName:r,qsnrName:a,questionText:s,describe:c,template:l}=n;e.title=await(0,i.qQ)((0,o.q)(r||a),t),e.summary=await(0,i.qQ)(s,t),e.description=await(0,i.qQ)(c,t),e.template=await(0,k.m)(l,t.state),(0,h.y)(e.theme),(0,u.U3)({origin:n})}(v),await(0,r.W4)().hook.afterFetchStart(v),(v.startAuto||(0,r.W4)().dev.autoRun)&&(v.hidden=!0,(0,r.E3)().startState=v,await v.handleEvents.handleNextClick()),v}var N=n(9948),L=n(1428),R=(n(7768),n(2352));async function A(){return null}const P={name:"other",dev:{parseRealUrl:e=>e,getCustomSurveyPayload:A,getCustomSurveyMeta:A,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,v.SC)(e);return(0,v.Ww)("https:/live.choiceform.com/reward",t)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:A,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:A,afterFetchStart:A,afterFetchSurvey:A,afterSetup:A,beforeSetupEnd:A,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:A,onEndSurvey:A,onRestartSurvey:A,onResumeSurvey:A,onStartNewSurvey:A,beforeGotoNext:A},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.At)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,R.Wo)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:A,loadUiEntryTemplates:A,setPresetStyle(){}}};function M(e,t){Object.keys(t).forEach((n=>{const r=t[n];"object"==typeof r?e[n]?null!==r&&M(e[n],r):e[n]=r:void 0!==r&&(e[n]=r)}))}function U(e){return M(P,e),P}var W=n(560);const j={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 B=n(1344),D=n(1548),G=n(4676),q=n(4316),F=n(8792);function z(){if(!V.initialized)throw new Error("CCCore not yet initialized")}const V={releaseVersion:"3.6.76",releaseDate:"2024-10-11",cfpd:T.c,eventHub:u.i,notifySuspended:!1,theme:(0,h.U)(),util:{convertVarStyle:y.UJ,getTaskInfo:D.S,getAnswer:G.cA,addStartStateDynamics(e){C(e)},addSurveyStateDynamics(e){(0,N.Gg)(e)},addNodeDynamics(e){(0,s.CY)(e)},addOptionDynamics(e){(0,q.yt)(e)},extendImageListGetter(e){(0,y.sf)(e)},loadFakeServers:e=>(0,F.U)(e,!1)},registerEnv(e){const t=U(e);(0,r.oB)(t),V.env=t},async setup(e){if(V.initialized)return V;if(e.dynamic){if(!e.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide treeUrl");if(!e.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(V,function(e){const t={...j.hostConfig,...e.hostConfig};return Object.assign(j,{...e,hostConfig:t}),j}(e));const t=(0,v.uK)(),n=t.sid;if(!n&&!(0,r.W4)().dev.realtime)throw new Error("setup error, must provide sid");V.sid=n,V.realTimePreview=(0,r.W4)().dev.realtime;const i=t.type;V.preview=V.realTimePreview||V.sid.length>30||"edit_template"===i||"preview_template"===i,V.preview?V.needPreviewFlag="1"!==t.ban_preview_bar:V.offlineTaskId=t.offline_task_id;const o=V.setTheme;V.setTheme=e=>{o(e),V.themeUpdated=!0,u.i.trigger("SET_PROPS")},(0,p.qq)(V.langSrcMap);const a=V.customAbort;V.customAbort=()=>{throw a&&a(),V.notifySuspended=!0,setTimeout((()=>{V.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=V.error;V.error=e=>{V.startState||V.rewardState||V.setTheme((0,h.U)()),s(e),V.crashed=!0};const c=V.notify;V.notify=(e,t)=>{V.notifySuspended||(V.startState||V.rewardState||V.setTheme((0,h.U)()),c(e,t))},(0,r.W4)().dev.debug&&(V.hostConfig.host="https://osapi.choiceform.com",V.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",V.hostConfig.mediaHost="https://media.choiceform.com"),t.offline_survey_id&&(V.hostConfig.cdnHost=(0,_.G)(V.hostConfig.cdnHost),V.hostConfig.mediaHost=(0,_.G)(V.hostConfig.mediaHost)),V.hostConfig.qApiHost=V.hostConfig.host+"/q/v1",await(0,r.W4)().hook.beforeSetupEnd(V),(0,r.oV)(V),V.initialized=!0,await(0,r.W4)().hook.afterSetup(V),await(0,r.W4)().hook.beforeSetupEnd(V);const d=await(0,l.Mh)(T.c.langTable,"zh_cn");return(0,p.Ki)(d),V},async fetchStartState(){z();const e=await O();return e&&(e.core=V,V.startState=e,(0,r.W4)().hook.onTitleChange(e.title),u.i.trigger("SET_PROPS")),e},async fetchSurveyState(){z(),V.startState&&(0,w.ye)(V.startState,!0);const e=await(0,N.q0)();return e&&(e.core=V,V.surveyState=e,(0,w.ye)(V.startState,!1),(0,r.W4)().hook.onTitleChange(e.title),u.i.trigger("SET_PROPS")),e},async fetchRewardState(){z();const e=await(0,L.uO)();return e&&(e.core=V,V.rewardState=e,(0,r.W4)().hook.onTitleChange(e.quesTitle),u.i.trigger("SET_PROPS")),e},reset(){V.offlineTaskId="",V.initialized=!1,E=null,V.startState=null,V.surveyState=null,(0,L.oD)(),V.rewardState=null,(0,v.gh)(),(0,W.S)(),(0,B.IN)()}},K={mergeLangSrcMap:p.qq,getLangSrcMap:p.Y1}},3120:(e,t,n)=>{"use strict";n.d(t,{CI:()=>d,Mx:()=>u,UR:()=>l,WW:()=>s,WY:()=>a,cX:()=>c,eQ:()=>f,wJ:()=>p}),n(7768),n(9952);var r=n(2352),i=n(4060),o=n(3001);function a(e,t){return(0,r.oV)(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.oV)(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 c(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function u(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.wx)(n,r),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,r.oV)(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.E3)(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))}},1488:(e,t,n)=>{"use strict";n.d(t,{A9:()=>m,EP:()=>d,EZ:()=>_,Ep:()=>g,hS:()=>f,sh:()=>v,uc:()=>p}),n(7768),n(9624);var r=n(4708),i=n(556),o=n(9677),a=n(3120),s=n(7320);let c=null;async function u(e,t){let{start:n,end:r}=await(0,o._u)(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.eQ)(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.wJ)(i);return{value:(0,a.CI)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+g(1e9,9999999999)}function h(e){return c[e]||Math.random().toString().replace("0.","")}async function m(){return c||(c=await(0,s.kj)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function g(e=0,t=10,n=0){const r=Math.pow(10,n);return e*=r,t*=r,((0,i.ai)(e,t)/r).toString()}function v(e,t=1,n=10){const r=Math.min(1e4,n);let o=h(e);for(;o.length<r;)o+=h(e);const a=o.length,s=(0,i.ai)(r,a),c=s-(0,i.ai)(t,r),u=o.substring(c,s);return""===u.trim()?v(e,t,r):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let r=(0,i.ai)(e,t).toString();return n>1&&(r=r+" "+(0,i.ai)(1,12)),n>2&&(r=r+" "+(0,i.ai)(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.jJ)(e,t),s=(0,i.ai)(a,o)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e.name,u)))),(0,i.my)(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 u(e,t);return d((()=>i&&0!==i.length?1===i.length?v(i[0],o,a):2===i.length&&i.includes("number")?v(i.includes("chinese")?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",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 u(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.Av)(1,6)+"@"+(0,i.Av)(1,6)+"."+(0,i.Av)(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 u(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 u(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.jJ)(e,t),s=(0,i.ai)(a||1,o||1)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e,u)))),(0,i.my)(n,s).join(","))},w.none=async(e,t)=>{const{value:n,antis:r}=await f(e,t);return n||d((()=>v("zh_cn"===t.parent.language?"chinese":"alphabet",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.Av)(1,3)+"."+(0,i.Av)(1,6)+"."+(0,i.Av)(1,3)).toLowerCase()),r)}},8360:(e,t,n)=>{"use strict";n.d(t,{G:()=>D,E:()=>B}),n(5960),n(9952);var r=n(5776),i=n(556),o=n(4708),a=n(1488),s=n(3001),c=n(8856),u=n(9948),l=n(3120),d=n(2352),f=n(3244),p=n(6276);async function h(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.UR)(e,t),(0,c.e)(e,n)}async function m(e,t){(0,c.e)(e,{selected:!1}),e.option.origin&&await(0,l.UR)(e.option,t),e.list&&e.list.forEach((e=>m(e,t)))}async function g(e){(0,p._O)(e)&&(0,c.e)(e.video,{ended:!0});let t=[];(0,p.G6)(e)&&(t=[...t,...e.options]),(0,p.IN)(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(1768);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=I((0,o.wR)(e),1)[0];if(!t||t.isOtherOpt)return null;const n=t.origin.inferList.some((e=>e.active));return n?t:null}(e);if(r){const e=r.text.split("-");return{address:e,indexes:(0,f.Cm)(e,t),point:{lat:r.origin.latitude,lng:r.origin.longitude}}}{const e=(0,i.ec)(t.length);let r=(0,d.Wo)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,i.ec)(o.cities.length),t=o.cities[e];if(a[1]=t.name,r=r+" "+e,"city"!==n){const e=(0,i.ec)(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.hS)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:r}=e,o=(0,i.my)(r,1)[0];return"record_audio"===o?y.audio:y[o]}async function x(e,t){const n=[],r=[];e.forEach((e=>{if((0,o.yg)(e.origin))n.push(e);else{let t=!0;(0,v.I9)(e.origin)&&(0,d.oV)(e.origin.inferList)&&(t=Math.random()>.9),t&&r.push(e)}})),await C(r,t,1);const a=(0,i.ai)(1,n.length);T(n,t,a)}async function S(e,t){const{parent:n,origin:r}=t;let o=await(0,s.W0)(r.fillMin,{state:n});o=o||0;let a=e.length;o&&r.inputInferLimit>o&&r.inputInferLimit<a&&(a=r.inputInferLimit);const c=o?(0,i.ai)(o,a):a;return(0,i.my)(e,c)}async function k(e,t){e.parent.context.option=t;const n=await(0,a.EZ)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function T(e,t,n){(0,i.my)(e,n).forEach((e=>k(t,e)))}async function E(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return k(e,t)}function I(e,t){const n=(0,l.Mx)(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.WW)(o,t);{let n=e.filter((e=>!e.disabled));return r.length>0&&(n=e.filter((e=>!r.includes(e)))),(0,i.my)(n,t)}}async function C(e,t,n){const r=I(e,n).sort(((e,t)=>(0,v.I9)(e.origin)?1:(0,v.e4)(e.origin,t.origin)));for(const e of r)await E(t,e)}async function O(e,t){const{multiple:n,min:r,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.cX)(e);return n.length>0?(0,l.WY)(n,t):(0,i.my)(e,t)}(a,n?(0,i.ai)(r||1,o||1):1);for(const n of s){const r=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(r,e,t),await O(n,t)}}async function N(e){const t=(0,o.wR)(e),n=e.origin;let a=1;if((0,r._A)(n)){const t=await(0,r.EH)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,i.ai)(o||1,s)}const s=[],c=[];t.forEach((e=>{(0,o.yg)(e.origin)?c.push(e):s.push(e)})),await C(s,e,a);const u=(0,i.ai)(1,c.length);T(c,e,u)}function L(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function R(e,t,n){const r=[];for(let i=e;i<t;i+=n)r.push(i);return r.push(t),r}async function A(e,t,n){const r=[...n].sort(),{value:o,antis:s}=await(0,a.hS)(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.my)(n,1)[0];return(0,a.EP)(e,s)}}function P(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function M(e,t,n){const[r,o]=e.split("_");let a,s;if(r.includes("~")){const[e,t]=P(r);a=(0,i.ai)(e,t)}else a=Math.min(Math.max(Number(r),0),t);if(o.includes("~")){const[e,t]=P(o);s=(0,i.ai)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function U(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]=P(i);a=e<=n&&n<=t}else a=Number(i)===n;if(o.includes("~")){const[e,t]=P(o);s=e<=r&&r<=t}else s=Number(o)===r;return a&&s}async function W(e,t){const{value:n,antis:r}=await(0,a.hS)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:M(n,s,o);{const e=()=>(0,i.ec)(s)+"_"+(0,i.ec)(o);return M(await(0,a.EP)(e,r,U),s,o)}}function j(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.wJ)(t.candidates),r=(0,l.CI)(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.my)(n,1)[0];r&&(0,c.e)(r,{sortNo:e,selected:!0})}async function B(e){return await(0,a.A9)(),D(e)}async function D(e,t){const{type:n,readonly:r}=e;if(r)return(0,u.Y1)();await g(e),t&&t.beforeInfer&&await t.beforeInfer(e);const i=w[n]||N;await i(e),t&&t.afterInfer&&await t.afterInfer(e)}w.select=N,w.value_mark=async e=>{const{options:t,otherOptions:n}=e,r=await S(t,e);for(const t of r){const n=t.minValue||1,r=t.maxValue||5,i=t.step,o=await A(t,e,R(n,r,i).map((e=>(0,d.Wo)(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 W(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 S(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 A(t,e,L(r,i).map((e=>(0,d.Wo)(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 S(t,e),o=n.map((e=>e.value));for(const t of i){const n=await A(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.eQ)(r,e),o=(0,l.wJ)(i),a=(0,l.CI)(o,1),c=Number(a[0].text);s.push(c),t-=c}const c=(0,i.Sq)(t,a.length),u=s.concat(c),d=o.concat(a);for(const[t,n]of d.entries()){const r=u[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 S(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;)j(i,t),i+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await x(n,e),(0,u.Y1)()},w.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await O(t,e),x(n,e)},w.describe=async()=>{(0,u.Y1)()},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.my)(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.my)(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.YP)(e,e.parent),s=(0,i.ai)(o||1,a),c=(0,i.my)(t,s);for(const t of c)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.Ep)(0,90)),lng:n.lng||Number((0,a.Ep)(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:c}=await(0,r.EH)(e,e.parent);if((0,r.cd)(a))await C(t,e,1);else if((0,r.cx)(a)){let t=n;const r=n[0].list.length;n.length>r&&(t=(0,i.my)(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 C(t,e,1);const r=n.list.findIndex((e=>e.selected));o.push(r)}}else if((0,r.ct)(a)||(0,r.gd)(a))for(const t of n)await C(t.list,e,1);else if((0,r.KC)(a)||(0,r.S2)(a))for(const t of n){const n=(0,i.ai)(s||1,c);await C(t.list,e,n)}else if((0,r.Un)(a)){const n=(0,i.ai)(s||1,c);await C(t,e,n)}await x(o,e)},w.end=async()=>{},w.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.uc)(),code:(0,a.sh)("number")},e)},8792:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,e:()=>c}),n(7768),n(9952);var r=n(8856);const i=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,r.W4)().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.W4)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",i.push(e)};a[e]=n()}return a[e]}async function c(e){const t=(0,r.W4)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function u(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,r.E3)().preview)return[];const{parsedPayload:{surveyMeta:{collector:{sampler_config:t}}}}=e;return t?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,n)=>{const r=t[n];if(r&&0===r.indexOf("FAKE:")){const t=r.substring(5,r.lastIndexOf("/"));e.includes(t)||e.push(t)}return e}),[]):[]}(e));if(n=n.filter((e=>!i.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},4732:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});const r={actions:[]};function i(e){r.actions.push(e)}},6784:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>R,GS:()=>L,IU:()=>X,Id:()=>O,ML:()=>G,Oo:()=>C,Q3:()=>q,Sg:()=>M,U1:()=>b,U3:()=>V,U7:()=>Q,Ux:()=>k,W2:()=>A,Wy:()=>J,YZ:()=>z,aS:()=>N,cR:()=>D,eK:()=>K,kB:()=>U,kr:()=>W,kv:()=>B,mT:()=>H,mU:()=>x,m_:()=>I,me:()=>S,ms:()=>P,sH:()=>j,ui:()=>T,we:()=>E,y:()=>F}),n(1088);var r=n(1884),i=n(3080),o=n(556),a=n(3001),s=n(5616),c=n(7320),u=n(4708),l=n(8856),d=n(7404),f=n(6276);let p=[];const h=1e4;let m=-1;function g(){const{dev:{local:e}}=(0,l.W4)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:r}}=(0,l.E3)();return!(e||t||n||!r)}function v(e,t=!1){if((0,s.K)()&&(!t||"start"===e.type))return;e.description=(0,a.Qr)(e.description);const n=e.description;if(g()){const r=p[p.length-1];r&&(n.includes(r.description)||r.description.includes(n))&&p.pop(),p.push(e),t&&y()}}function y(){if(g()){if(clearTimeout(m),p.length>0){const e=p;p=[];const t=(0,l.E3)().hostConfig.recordUrl;(0,c.SY)(t,{type:"POST",data:{records:e}})}m=setTimeout(y,h)}}function w(e,t,n,r,i){var o,a,s;const{surveyId:c,transactionID:u,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.W4)().name)),"start"===r&&(m=JSON.stringify((0,d.uK)())),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:c,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:u,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 _(e){const t=(0,f.kZ)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.Qr)(n)}function b(e,t){(0,l.W4)().dev.infer||v(w(null,t,e,"used_phone","在题目:".concat(_(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function x(e,t){(0,l.W4)().dev.infer||v(w(null,t,e,"verify_fail","在题目:".concat(_(t),"高级验证失败")))}function S(e,t){if((0,l.W4)().dev.infer)return;const{type:n,parent:r}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.wR)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const r=e.selected;if(o=r?"select":"deselect",s=r?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,i.oB)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)c="[".concat(e.text,"]");else{const t=e;c="[".concat((0,a.Qr)(t.optionX.text)," ").concat((0,a.Qr)(t.optionX.text),"]")}else c="[".concat((0,a.Qr)(e.text),"]")}const d="在题目:".concat(_(t),"中").concat(s,"选项:").concat(c);v(w(e,t,r,o,d))}function k(e,t,n){if((0,l.W4)().dev.infer)return;const r="在题目:".concat(_(n),"的选项:[").concat((0,a.Qr)(t.text),"]中输入自动填充触发文字:").concat(e);v(w(t,n,n.parent,"auto_complete",r))}function T(e,t,n){if((0,l.W4)().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"),v(w(t,n,r,o,"在题目:".concat(_(n),"的选项:[").concat((0,a.Qr)(t.text),"]中").concat(i)))}function E(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,r=t.options[e];r&&(-1===r.sortNo?v(w(r,t,n,"cancel_sort","在题目:".concat(_(t),"中取消了对选项:[").concat((0,a.Qr)(r.text),"]的排序"))):v(w(r,t,n,"sort","在题目:".concat(_(t),"中将选项:[").concat((0,a.Qr)(r.text),"]排序到第").concat(r.sortNo,"位"))))}function I(e){if((0,l.W4)().dev.infer)return;const t="在题目:".concat(_(e),"中 定位失败");v(w(null,e,e.parent,"locate_failed",t))}function C(e,t){if((0,l.W4)().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))}}v(w(null,t,n,o,"在题目:".concat(_(t),"中").concat(a)))}function O(e){(0,l.W4)().dev.infer||v(w(null,e,e.parent,"prev","在题目:".concat(_(e),"中点击上一题")))}function N(e,t){(0,l.W4)().dev.infer||v(w(null,t,e.parent,"prev","返回到题目: ".concat(_(t),",由题目:").concat(_(e),"后退而来")))}function L(e){(0,l.W4)().dev.infer||v(w(null,e,e.parent,"next","在题目:".concat(_(e),"中点击下一题")))}function R(e,t){(0,l.W4)().dev.infer||v(w(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(_(t),",由题目:").concat(_(e),"前进而来"):"进入题目: ".concat(_(t),",由题目:").concat(_(e),"前进而来")))}function A(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,n,"check_fail","从".concat(_(e),"走向甄别失败")),!0)}function P(e,t){(0,l.W4)().dev.infer||v(w(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function M(e,t){(0,l.W4)().dev.infer||v(w(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function U(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"time_less","答题时间太少被排除"),!0)}function W(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function j(e){(0,l.W4)().dev.infer||v(w(null,e.current,e,"time_over","答题超时未完成"),!0)}function B(e,t,n,r){(0,l.W4)().dev.infer||v(w(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(r))),!0)}function D(e,t,n=!1){(0,l.W4)().dev.infer||v(w(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function G(e,t){(0,l.W4)().dev.infer||v(w(null,e,t,"gift","领奖"),!0)}function q(e,t,n,r,i){(0,l.W4)().dev.infer||v(w(t,n,e,"auto_input","在题目:".concat(_(n),"中自动填充选项:[").concat(r,"],期待值:[").concat(i,"]")))}function F(e,t,n,r="成功"){(0,l.W4)().dev.infer||v(w(null,n,e,"auto_skip","在题目:".concat(_(n),"中尝试自动选中选项:[").concat((0,a.Qr)(t.text),"]").concat(r)))}function z(e,t,n){if((0,l.W4)().dev.infer)return;const r="自动跳过题目:".concat(_(t)," by ").concat(n);"logic"!==t.type&&"uniqueness_verification"!==t.type&&v(w(null,t,e,"auto_skip",r))}function V(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,e,"auto_skip","自动跳过题目:".concat(_(t)," by ").concat(n)+" logicResult:".concat(t.logicResult)))}function K(e,t,n){(0,l.W4)().dev.infer||v(w(null,t,e,"auto_skip","自动跳过题目:".concat(_(t)," by ").concat(n)+" does verification passed:".concat(t.verificationResult)))}function H(e,t,n){(0,l.W4)().dev.infer||v(w(null,n,e,"opt_display","在题目:".concat(_(n),"中显示选项:[").concat((0,a.Qr)(t.text),"]")))}function Y(){const e="browser_uuid";let t=(0,l.W4)().storage.get(e);return t||(t=(0,o.YF)(),(0,l.W4)().storage.set(e,t)),t}function Q(){if((0,l.W4)().dev.infer)return;const e=(0,d.uK)();e.code&&e.state||v({type:"enter",collector_code:(0,l.E3)().sid,browser_uuid:Y(),recorded_at:(0,r.kF)(),description:"来自"+(0,l.W4)().system.getReferer()},!0)}function X(e,t){if((0,l.W4)().dev.infer)return;let n="开始答题,进入到题目: ".concat(_(t)," ");const{browser:r,device:i,engine:o,os:a}=(0,l.W4)().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=w(null,t,e,"start",n);s.browser_uuid=Y(),s.collector_code=(0,l.E3)().sid,v(s,!0)}function J(e,t){(0,l.W4)().dev.infer||v(w(null,null,e,"resume","开始断点续答:"+t),!0)}},5667:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(8856),i=n(8792);let o=!1;async function a(e){const{url:t,data:n,silent:a,responseId:s}=e,c=t+JSON.stringify(n),u=await(0,i.e)(t);if(!u){const e="FAKE NOT FOUND:".concat(t);throw(0,r.E3)().error(e),new Error(e+(s?" responseId is: ".concat(s):""))}let l=null;try{if(l=await u(n,(0,r.E3)()),l.exception)throw l.exception}catch(e){if(!(0,r.E3)().realTimePreview){const t="FAKE ERROR:".concat(c," ").concat(e.stack&&e.stack.split("\n")[0]);throw a||(0,r.E3)().error(t),new Error(t+(s?" responseId is: ".concat(s):""))}l={result:""}}return o&&console.info(n,l),o&&console.info(JSON.stringify(n),JSON.stringify(l)),l}},7320:(e,t,n)=>{"use strict";n.d(t,{FW:()=>u,G8:()=>I,I1:()=>k,KY:()=>_,Kk:()=>f,MT:()=>T,O:()=>C,SC:()=>h,SY:()=>v,_K:()=>x,_Y:()=>w,aS:()=>l,ae:()=>E,cA:()=>m,eI:()=>b,eY:()=>S,kj:()=>g,qU:()=>y,qs:()=>p});var r=n(7404),i=n(6496),o=n(8856),a=n(568),s=n(4732);let c="";const u={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.W4)().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.E3)().error((0,i.GS)(a.CW.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!==c&&t){if(l[t])return;u[t]?(0,o.E3)().error(C(t)):(0,o.E3)().notify(C(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.E3)().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.E3)().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.uK)(),n=t.type;let i=(0,o.E3)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?i=(0,o.E3)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(i=(0,o.E3)().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.W4)().auth.retrieveAuthSurveyMeta();return t||v((0,o.E3)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw p(e),e}))}function w(e){const t=(0,o.E3)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,v(t,{type:"POST",data:e},!0).then((e=>(c="",e))).catch((n=>{throw(0,o.E3)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),c="",n}))}function _(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function b(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return v((0,o.E3)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function S(e){if((0,o.E3)().preview)return(0,o.E3)().notify((0,i.GS)(a.CW.preview.noMessage)),{};const t=(0,o.E3)().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.E3)().notify((0,i.GS)(a.CW.verify.sendSuccess)),n}async function k(e,t){return(0,o.E3)().preview?((0,o.E3)().notify((0,i.GS)(a.CW.preview.noMessage)),{}):v((0,o.E3)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function T(e,t){const n=(0,o.W4)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const r=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",i=await g(r,{type:"POST",data:e},!1);return(0,o.W4)().storage.set("gift-"+e.code,JSON.stringify(i)),i}async function E(e,t){if((0,o.E3)().preview)return{};const n=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.E3)().notify((0,i.GS)(a.CW.verify.sendSuccess)),t}catch(e){throw(0,o.E3)().notify((0,i.GS)(a.CW.verify.sendFailed)),e}}async function I(e){(0,s.y)(e);const{preview:t}=(0,o.E3)(),{dev:{autoRun:n,infer:r}}=(0,o.W4)();return t||n||r?null:g((0,o.E3)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function C(e){return(0,i.GS)(a.CW.backEnd[e])||e}},3004:(e,t,n)=>{"use strict";n.d(t,{G:()=>i,U:()=>o}),n(7768);var r=n(7404);function i(e){const t=(0,r.uK)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,r.uK)().offline_survey_id}},6072:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>h,g5:()=>f,eU:()=>p});var r=n(6620),i=n(3001),o=n(6348),a=n(8856),s=(n(7768),n(3684));var c=n(5667),u=n(7320);let l=!1;const d={valid:!0,message:"",result:""};async function f({state:e,request:t,customParam:n,silent:o,shouldCombineSystem:f=!0}){const{method:p,embedId:h}=t,m="embed"===p,g="fake"===p;if((0,a.E3)().realTimePreview&&!m&&!g||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...d};const v=await(0,i.Oj)(t.url,{state:e}),y=await(0,r.aI)(e,t.params,f);n&&Object.keys(n).forEach((e=>{n[e]&&(y[e]=n[e])}));let w=null;if(m)w=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.y)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(t,r);let c;try{c=await o(n,(0,a.E3)())}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.E3)().error(n),new Error(n+(i?" responseId is: ".concat(i):""))}return c}({embedId:h,data:y,embedApis:e.embedApis,responseId:null==e?void 0:e.transactionID});else if("fake"===p)w=await(0,c.E)({url:v,data:y,silent:o,responseId:null==e?void 0:e.transactionID});else{let t="GET";"post"===p&&(t="POST");let n=null;try{n=await(0,u.Kk)((0,a.W4)().dev.parseRealUrl(v),{type:t,data:y,contentType:"application/json"},!1)}catch(n){const r="REAL ERROR:".concat(t," ").concat(v," ").concat(JSON.stringify(n));o||(0,a.E3)().error(r);const i=r+((null==e?void 0:e.transactionID)?" responseId is: ".concat(null==e?void 0:e.transactionID):"");throw new Error(i)}l&&console.info({...y,url:v},n),w=n}return w}async function p(e){const t=await f(e);return void 0===t.valid&&(t.valid=!!t.result),t.valid||t.message||(t.message="^_^"),t}async function h(e,t){try{const{request:n}=t.origin;n&&(await f({state:e,request:n,customParam:null,silent:!0}),e.endRequested=!0,o.i.trigger("END_REQ"))}catch(e){(0,a.E3)().uploadLog(e)}}},4708:(e,t,n)=>{"use strict";n.d(t,{C2:()=>b,GE:()=>y,IZ:()=>v,Ml:()=>S,Om:()=>l,W4:()=>f,Y5:()=>x,e$:()=>k,gr:()=>g,iQ:()=>d,jJ:()=>_,oz:()=>c,qY:()=>s,sf:()=>m,u6:()=>w,wR:()=>h,yg:()=>u}),n(9952);var r=n(984),i=n(556),o=n(6276),a=n(3001);function s(e,t){const n=e.loopStack,r=t.uuid;return(0,i.So)(r,n)}function c(e,t){return e.find((e=>(0,i.oj)(e.uuid,t)))}function u(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.QX)(n,e))).length}function f(e){return h(e).some((t=>(0,r.QX)(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.G6)(e)&&(t=(0,o.QB)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.IN)(e)&&(t=[...t,...e.otherOptions]),t}function m(e){let t=[];return(0,o.uo)(e)&&(t=[...t,...e.options]),(0,o.yy)(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.W0)(r.itemsMax,{state:n}),itemsMin:await(0,a.W0)(r.itemsMin,{state:n})}}function b(e){return e.passRef||{}}function x(e,t){const n=b(e);return e[t]||n[t]}function S(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+"%"}},1768:(e,t,n)=>{"use strict";n.d(t,{A9:()=>c,E5:()=>s,Gg:()=>f,I9:()=>o,IN:()=>u,e4:()=>a,u6:()=>l,uE:()=>d});var r=n(2352),i=n(4708);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 c(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))||u(e,t))}function u(e,t){return!(!e||!t||(0,r.oV)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!u(e.optionX,t.optionX)||t.yid!==e.yid)||u(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,i.gr)(e).forEach((e=>{const t=e.origin;(0,i.yg)(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&&c(t,e)))}},4196:(e,t,n)=>{"use strict";n.d(t,{GA:()=>f,cv:()=>d,gF:()=>h}),n(9952);var r=n(4708),i=n(6496),o=n(8856),a=n(568),s=n(2352),c=n(1768),u=n(4384),l=n(9536);function d(e,t,n,i){const a=n.list[t];(0,o.e)(a.option,{value:e});const s=i.options.find((e=>e.cascadePath===a.resultId));return(0,r.yg)(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 u.Az;const f=t.list.filter((e=>function(e){return e.selected&&!(0,r.yg)(e.option.origin)}(e))),{option:g}=d;if(f.includes(d))h(d,n);else{const e=(0,c.Gg)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.E3)().notify((0,i.GS)(a.CW.menu.limitMax,{text:t.text?(0,i.GS)(a.CW.menu.listItem)+t.text:(0,i.GS)(a.CW.menu.topList),max:(0,s.Wo)(t.max)})),u.Az}else t.list.forEach((e=>{e.selected&&h(e,n)}));e&&function(e,t,n){for(const t of n)(-1===e.option.origin.mutexNumber||-1===t.option.origin.mutexNumber||e.option.origin.mutexNumber&&t.option.origin.mutexNumber===e.option.origin.mutexNumber)&&p(t);t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.e)(t,{selected:!1})}))}(d,n,t.list.filter((e=>e.resultId!==d.resultId))),m(d,n)}return await(0,l.e)(g,n),u.ay}function p(e){(0,o.e)(e,{selected:!1}),(0,o.e)(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.e)(t,{selected:!1})}))}function m(e,t){(0,o.e)(e,{selected:!0}),(0,o.e)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.e)(t,{selected:!0})}))}},7688:(e,t,n)=>{"use strict";n.d(t,{o:()=>y});var r=n(4708),i=n(9968),o=n(5776),a=n(3001),s=n(556),c=n(8856),u=n(6496),l=n(568),d=n(9536),f=n(4384),p=n(6276);const h={};function m(e,t,n){t.forEach((t=>{(0,s.oj)(t.uuid,e.uuid)||t[n]!==e[n]||(0,c.e)(t,{selected:!1})}))}function g(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,c.e)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,c.e)(e,{selected:!1});else{(0,c.e)(e,{selected:!0});const i=(0,p.IN)(t)?t.otherOptions:[];g(e,n?i:(0,r.wR)(t))}return f.yK}async function y(e,t){const n=h[t.type];if(n){const r=await n(e,t);return r.noValidate||(0,i.c9)(t),await(0,d.e)(e,t),r}return f.Az}h.select=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const i=await(0,o._R)(t,e);return i.valid?((0,c.e)(e,{selected:!0}),(0,o.cd)(t.origin)&&g(e,(0,r.wR)(t)),f.yK):((0,c.E3)().notify(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:""),f.Az)},h.select_icon=h.select,h.select_image=h.select,h.matrix=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const i=await(0,o.IZ)(t,e);if(!i.valid)return(0,c.E3)().notify(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:""),f.Az;const{origin:a}=t;return(0,c.e)(e,{selected:!0}),(0,o.cd)(a)?g(e,(0,r.wR)(t)):(0,o.cx)(a)?(m(e,t.options,"yid"),m(e,t.options,"xid")):(0,o.ct)(a)?m(e,t.options,"yid"):(0,o.gd)(a)&&m(e,t.options,"xid"),f.yK},h.upload=async(e,t)=>{var n,r,i;if(e.isOtherOpt)return v(e,t,!0);{const{parent:o,fullUploaded:s,origin:d}=t;let p=await(0,a.W0)(d.maxUploadCount,{state:o});p=p||t.options.length;const h=e.value;if(s&&!h&&!e.origin.fillRequired)return(0,c.E3)().notify((0,u.GS)(l.CW.upload.amountLimitMax,{max:p})),f.Az;const m={onprogress(t){(0,c.e)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId,recordedAudioFile:null===(n=e.customData)||void 0===n?void 0:n.file},g=await(0,c.W4)().network.upload(m);return await(null===(i=(r=o.handleEvents).handleOptionInput)||void 0===i?void 0:i.call(r,g,e,t)),f.ay}},h.menu=h.select,h.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.yK),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.ay,h.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay},4556:(e,t,n)=>{"use strict";n.d(t,{I5:()=>h,Y5:()=>d,wf:()=>p});var r=n(9536),i=n(9968),o=n(5776),a=n(8856),s=n(4708);const c={refresh:!1,result:!0},u={refresh:!0,result:!0},l={};function d(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.e)(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?c:((0,a.e)(t,{value:n}),u)}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.c9)(n,t),await(0,r.e)(t,n),o}function h(e,t,n){t.atcpTrigger=e,(0,i.c9)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.e)(t,{value:e}),u),l.weight=async(e,t,n)=>{if(e===t.value)return c;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.e)(t,{value:e}),r.forEach((e=>{const t=Number(e.value);(0,a.e)(e,{percent:(0,s.e$)(t,i)})})),u},l.upload=async(e,t,n)=>(e||(await(0,a.W4)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,r.I)()),(0,a.e)(t,e),await(0,o.SY)(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)},3568:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});const r=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},3244:(e,t,n)=>{"use strict";n.d(t,{At:()=>o,Cm:()=>a,KQ:()=>i});var r=n(5548);function i(e,t){return e.find((e=>e.origin.radius>=(0,r.c)(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.includes(e))}))))||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];if(e[2]&&n){const t=n.areas.map((e=>e.name)).indexOf(e[1]);r+=""+t}}return r}},6764:(e,t,n)=>{"use strict";n.d(t,{sZ:()=>a,uE:()=>d,uQ:()=>l}),n(5960);var r=n(556),i=n(5776),o=n(6796);function a(e){const t=[];return e.forEach(((e,n)=>{const i=(0,r.ec)(n+1);t.splice(i,0,e)})),t}const s={};function c(e,t,n){let i=[];return i=n?u(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.ec)(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.ec)(t.length+1);t.splice(n,0,e)})),t}(e),i}function u(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:u}=r;if(!(0,i.Oi)(e))return t;if((0,o.ms)(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=c(t,a,u);return s[n]=r={},e.forEach(((e,t)=>{r[e.uuid]=t})),e}}return c(t,a,u)}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=u(t)),"row_loop"===r&&(n=u(n)),{optionsX:t,optionsY:n}}},4316:(e,t,n)=>{"use strict";n.d(t,{yt:()=>N,kd:()=>W,sV:()=>z,cV:()=>F,WG:()=>K,gk:()=>L,o9:()=>R,u_:()=>Y,wz:()=>j}),n(5960),n(7768),n(3656),n(4107),n(9896),n(6832),n(8252),n(7240),n(2288),n(5396),n(2480),n(7190),n(5036),n(4736),n(2520),n(9952);var r=n(6764),i=n(4708),o=n(5776),a=n(9376),s=n(6332),c=n(3001),u=n(4756),l=(n(9624),n(6784)),d=n(8856),f=n(2352);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.Wo)(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,c.W0)(h(e),{state:o});let s=String(a);return a>=n&&a<=r||(s=i),(0,d.e)(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.Q3)(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,c.E3)(h(e),{state:n});return(0,d.e)(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,c.W0)(h(e),{state:r});let o=i;return i>=1&&i<=n||(o=-1),(0,d.e)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:i}},n(2048);var y=n(4060),w=n(6276);async function _(e,t){const n=t.parent;n.context.option=e;const r=await async function(e,t){return!!t&&(0,y.wx)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!r}const b=["select","select_icon","select_image","menu","hot_spot","data"];var x=n(1344),S=n(6348);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.Ej)(n.parent,o,n);return o.disabled=!a,o}var T=n(1768),E=n(556),I=n(3080),C=n(9677);const O=["select","sequence","menu"];function N(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,T.I9)(this.origin)&&setTimeout((()=>{S.i.trigger("OPT_EXCLUDE",this)})),e?S.i.trigger("OPT_SELECT",this):S.i.trigger("OPT_DESELECT",this)}})}async function L(e,t,n){const{parent:r}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:W(t,e.type),value:"",renderId:(0,i.qY)(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,c.qQ)(t.text,{state:r,usage:{node:e,optionId:t.uuid}}),N(o),o.isOtherOpt&&(await A(o,e),(0,i.yg)(t)||await _(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.e)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.e)(e,{placeholder:e.text})}(o),await(0,a.Il)(o,r),o}async function R(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 A(e,t){return(0,d.e)(e,{inputType:W(e.origin,t.type)}),j(e,t)}const P=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],M=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],U=["select","menu","cascade"];function W(e,t){if(e.isOtherOpt){let t="select";return(0,i.yg)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return U.includes(t)?!0===e.useComment?"select-input":"select":P.includes(t)?"input":M.includes(t)?"select":void 0}async function j(e,t){if(!(0,w.cp)(e))return;const{origin:n}=e,r=e.origin.fillType;if(!r)return;const{parent:o}=t;let a,s,u,l=await(0,c.W0)(n.fillStart,{state:o}),f=await(0,c.W0)(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),u=await(0,x.$7)(t.parent.sid));let p=[];"list_select"===r&&(p=q((await(0,c.E3)(n.selectText,{state:o,joinBy:","})).split(",")));const h=await(0,i.jJ)(e,t),m=await(0,C._u)(e,t);(0,d.e)(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:u,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function B(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.uQ)(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&&F([...s.options,...s.otherOptions]),(0,d.e)(e,s)}const D={};async function G(e,t){return e.image?e.image:await(0,a.Md)(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 F(e){q(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function z(e){return e&&e.path?(0,d.E3)().hostConfig.mediaHost+e.path:""}function V(e){const t=z(e);return{normalIconUrl:t,activeIconUrl:K(t)}}function K(e){return e.replace("/outline/","/glyph/")}function H(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:V(t.icon)}async function Y(e,t){if((0,w.G6)(e)){await async function(e,t){const{origin:n}=e;let r={options:[]};if((0,E.is)(n,"matrix"===n.type)){const{options:i,refMaps:o,passRefs:c}=await(0,a.q0)(t,e.origin,"xid"),u=await R(e,i,c),l=await(0,s.s$)(t,u,e),{options:d,refMaps:f,passRefs:p}=await(0,a.q0)(t,e.origin,"yid"),h=await R(e,d,p),m=await(0,s.Ah)(t,h,e);(0,I.GO)(e,[...o,...f]);const g=await R(e,n.otherOptions,[]),v=await(0,s.is)(t,g,e);r={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.q0)(t,e.origin);let i=n.options;(0,w.IN)(e)&&(i=i.concat(e.origin.otherOptions));const o=await R(e,i,n.passRefs),c=await(0,s.is)(t,o,e),u=[],l=[];c.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):u.push(e)})),(0,I.GO)(e,n.refMaps),r={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.e)(e,r)}(e,t);const n=D[e.type];n&&await n(e),function(e){if((0,d.E3)().realTimePreview)return;if(!(0,w.G6)(e))return;let t;O.includes(e.type)?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.IN)(e)?e.otherOptions:[];b.includes(n)&&(i=[...i,...t]);const a=i.filter((e=>e.autoSelectMarked)).reverse();if((0,o._A)(e.origin))a.forEach((t=>{(0,d.e)(t,{selected:!0}),(0,l.y)(r,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.y)(r,t,e,"因冲突被终止")})),t&&((0,d.e)(t,{selected:!0}),(0,l.y)(r,t,e))}}(e),t.context.option=null}}D.select=e=>B(e,(async function(t){return await j(t,e),await _(t,e),t})),D.fill=e=>B(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await j(t,e),t.placeholder=(0,c.Qr)(t.text),await v(t,e),t})),D.value_mark=e=>B(e,(async function(t){const{parent:n,origin:r}=e;t.value="";const i=await(0,c.W0)(r.markMin,{state:n}),o=await(0,c.W0)(r.markMax,{state:n});return(0,d.e)(t,{minValue:i,step:r.markStep,maxValue:o,minValueText:r.minText,maxValueText:r.maxText}),await v(t,e),t})),D.icon_mark=e=>B(e,(async function(t){return t.value="",(0,d.e)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),D.sequence=async e=>{let t=!1;await B(e,(async n=>((0,d.e)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},D.matrix=async e=>{const t=(0,r.uE)(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,c.qQ)(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 u=[];for(const r of t.optionsY)u.push({origin:r.origin,uuid:r.origin.uuid,number:r.origin.number,renderId:"",visible:r.visible,height:r.origin.height,text:await(0,c.qQ)(r.text,{state:n,usage:{node:e,optionId:r.uuid}})});const l=new Map;u.forEach(((e,t)=>{l.set(e,t)})),u.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 A(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:u.filter((e=>e.visible))},p=(0,o.ct)(i)||(0,o.KC)(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 c=await k(a,s,n,r);o.push(c),t.list.push(c)}i.push(t)}return{flatten:i,options:o,fullOptions:o}}(a,u,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,u,h.options);(0,d.e)(e,{...f,...h,...m})},D.select_image=e=>B(e,(async t=>(t.image=await G(t,e),await _(t,e),t))),D.upload=e=>B(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,u.A)(e.fileLimits),e))),D.menu=e=>B(e,(async t=>(await j(t,e),await _(t,e),t)),!0),D.select_icon=e=>B(e,(async t=>{const n={...t,...H(t)};return await _(n,e),n})),D.weight=e=>{const{parent:t}=e;return B(e,(async n=>{let r=await(0,c.W0)(n.origin.maxMark,{state:t});const i=await(0,o.iw)(e.origin,t);return(!r||r>i)&&(r=i),(0,d.e)(n,{percent:"0%",color:n.origin.color,maxValue:r,value:""}),await v(n,e),n}))},D.cascade=e=>B(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),D.data=async e=>{for(const t of e.options)await _(t,e)},D.hot_spot=async e=>await B(e,(async t=>{await j(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,E.YF)()}]}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.e)(t,{graphs:r,color:t.origin.color}),t})),D.heat_map=(e,t)=>B(e,(async function(e){return e})),D.max_diff=e=>B(e,(async function(t){return t.value="0",t.image=await G(t,e),t.records=[],t})),D.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.Ej)(e.parent,t,e)&&n.push(r)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...V(t),text:(0,c.gt)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),B(e,(async t=>((0,d.e)(t,{image:await G(t,e),value:""}),await v(t,e),t)))}},6332:(e,t,n)=>{"use strict";n.d(t,{Ah:()=>d,Ej:()=>s,Ud:()=>f,is:()=>c,s$:()=>l}),n(9952);var r=n(4060),i=n(4708),o=n(6784),a=n(4676);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.wx)(e,a);return i&&(0,o.mT)(e,t,n),e.context.option=null,i}return!0}async function c(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 u(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 u(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 u(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.Ci)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,i.IZ)(e):(0,i.wR)(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}},5776:(e,t,n)=>{"use strict";n.d(t,{AF:()=>v,CA:()=>j,CY:()=>g,EH:()=>A,IZ:()=>M,K6:()=>w,KC:()=>N,MR:()=>S,Oi:()=>_,S:()=>G,S2:()=>L,SY:()=>z,Un:()=>O,YJ:()=>b,YP:()=>R,_A:()=>k,_R:()=>U,cd:()=>T,ct:()=>E,cx:()=>C,gR:()=>x,gd:()=>I,iw:()=>F,j$:()=>D,o1:()=>W,q_:()=>y,uK:()=>q}),n(9952);var r=n(4708),i=n(556),o=n(3001),a=n(6496),s=n(8856),c=n(568),u=n(984),l=n(1768),d=n(4676),f=n(6788);const p={valid:!0,message:""},h=["region","location","area","describe","end","logic","uniqueness_verification","loop","lottery","verify"],m={};function g(e){(0,s.e)(e,{hasAnswer:(0,d.Qz)(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.oj)(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.So)(n,t)}function x(e,t){if(t)return e.find((e=>e.input&&(0,i.oj)(e.input.uuid,t)||e.loopEnd&&(0,i.oj)(e.loopEnd.uuid,t)))}function S(e,t,n){const r=t.find((e=>(0,i.oj)(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 T(e){return(0,i.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function E(e){return"single_row"===e.matrixSelect}function I(e){return"single_col"===e.matrixSelect}function C(e){return"single_row_col"===e.matrixSelect}function O(e){return k(e)&&"all"===e.multiType}function N(e){return k(e)&&"row"===e.multiType}function L(e){return k(e)&&"col"===e.multiType}async function R(e,t){const{origin:n}=e,r=!0===n.limitEnabled;let i=r?await(0,o.W0)(n.maxUploadCount,{state:t}):e.options.length,a=r?await(0,o.W0)(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 A(e,t){const{origin:n}=e;if(!k(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.W0)(a,{state:t}),u=await(0,o.W0)(s,{state:t});const d=(0,r.gr)(e).length;return(0,i.is)(e,"matrix"===e.type)||(c=(0,l.uE)(e,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const P=(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.GS)(c.CW.matrix.colLimitMax,{max:n}):(0,a.GS)(c.CW.matrix.rowLimitMax,{max:n}):(0,a.GS)(c.CW.select.limitMax,{max:n})),{valid:o,message:s}};async function M(e,t){if(!k(e.origin)||(0,l.I9)(t.origin)||!t.isOtherOpt&&((0,l.I9)(t.optionX.origin)||(0,l.I9)(t.optionY.origin)))return p;const n=O(e.origin);if(!n&&!(0,r.u6)(t))return p;const i=(0,r.wR)(e),{max:o}=await A(e,e.parent);return n?P(i,t,o):L(e.origin)?P(i,t,o,"xid"):N(e.origin)?P(i,t,o,"yid"):p}async function U(e,t){if(!k(e.origin))return p;const{max:n}=await A(e,e.parent),i=(0,r.wR)(e),o=!(i.filter((e=>e.selected)).length===n)||(0,l.Gg)(i,t);return{valid:o,message:o?"":(0,a.GS)(c.CW.select.limitMax,{max:n})}}function W(e,t){return e.find((e=>(0,i.oj)(e.nodeUuid,t)))}const j=["logic","random","loop","uniqueness_verification"],B=[...j,"data"];function D(e){(0,s.E3)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!B.includes(e.type)&&(e.readonly=!0)}function G(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.E3)().preview&&e.parent.previewShadowNodes&&!B.includes(e.type)}(e)?"":"setting";if((0,f.I)(e.nodeUuid))return"random_group";const t=(0,r.wR)(e);return!h.includes(e.type)&&t&&0===t.length?"no_options":""}function q(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,i.oj)(e.circleNode1Id,t.circleNode1Id)&&(0,i.oj)(e.circleNode2Id,t.circleNode2Id)}async function F(e,t){const{options:n}=e;let r=await(0,o.W0)(e.total,{state:t})||100,i=0;for(const e of n){const n=await(0,o.W0)(e.maxMark,{state:t});if(void 0===n){i=-1;break}i+=n}return i>0&&i<r&&(r=i),r}async function z(e){const{max:t}=await R(e,e.parent),n=t===e.options.filter((t=>(0,u.QX)(t,e))).length;(0,s.e)(e,{fullUploaded:n})}},908:(e,t,n)=>{"use strict";n.d(t,{S:()=>h,s:()=>p});var r=n(8084),i=n(4708),o=n(3244),a=n(5548),s=n(9968),c=n(8856),u=n(9536),l=n(4384);function d(e,t,n,r){e&&((0,c.e)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,c.e)(t,{selected:!1})}))),(0,c.e)(r,{value:n})}const f={};async function p(e,t){const n=f[t.type],r=n?await n(e,t):l.Az;return r.noValidate||(0,s.c9)(t),r}function h(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.yK}f.region=(e,t)=>{t.indexes=e;const n=(0,i.wR)(t),a=(0,r.qu)(e);d((0,o.At)(n,a),n,a,t);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=c,t.position={address:c},l.yK},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-",t.infoRange),r=(0,i.wR)(t);return d((0,o.At)(r,n),r,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-","street"),r=(0,i.wR)(t);return d((0,o.KQ)(r,e.point),r,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.verify=(e,t)=>((0,c.e)(t,e),{...l.yK,noValidate:!0}),f.gift=(e,t)=>((0,c.e)(t,e),l.ay),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,c.e)(i,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,u.e)(i,t),l.ay}},1576:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(8856);function i(e,t){(0,r.e)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,r.e)(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.e)(n,{done:o&&a}),{result:!0}}},6680:(e,t,n)=>{"use strict";n.d(t,{W:()=>a}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var r=n(8856),i=n(9536);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.e)(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.e)(a,t)}return s&&await(0,i.e)(s,n),{result:!0}}},4404:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(8856);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.E3)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8184:(e,t,n)=>{"use strict";n.d(t,{_M:()=>oe,yI:()=>ie,o9:()=>re,e_:()=>ne});var r=n(4316),i=n(5776),o=n(8084),a=n(6496),s=n(568),c=n(8856);const u={select:async e=>{const t=(0,i._A)(e.origin);let n=(0,a.GS)(s.CW.select.single);if(t){n=(0,a.GS)(s.CW.select.multi);const{min:t,max:r}=await(0,i.EH)(e,e.parent);return{typeName:n,typeDescription:(0,a.GS)(s.CW.select.limitBetween,{min:t,max:r})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.value)}),icon_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.graph)}),weight:async e=>{const t=e.weightTotal;let n=(0,a.GS)(s.CW.weight.total,{total:t});return n+=!0===e.origin.relax?(0,a.GS)(s.CW.weight.relax):(0,a.GS)(s.CW.weight.strict),{typeName:(0,a.GS)(s.CW.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.GS)(s.CW.fill.name)}),slide_rate:async()=>({typeName:(0,a.GS)(s.CW.slideRate.name)}),sequence:async e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.GS)(s.CW.rank.limitMin,{min:t}):(0,a.GS)(s.CW.rank.limitAll);return{typeName:(0,a.GS)(s.CW.rank.name),typeDescription:n}},menu:async e=>({...await u.select(e),typeName:(0,a.GS)(s.CW.menu.name)}),select_icon:e=>u.select(e),select_image:e=>u.select(e),upload:async e=>{const t=(0,a.GS)(s.CW.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:r}=await(0,i.YP)(e,e.parent);return{typeName:t,typeDescription:(0,a.GS)(s.CW.upload.amountLimit,{min:n,max:r})}}return{typeName:t,typeDescription:""}},location:async()=>({typeName:(0,a.GS)(s.CW.locate.name)}),area:async()=>({typeName:(0,a.GS)(s.CW.site.name)}),region:async()=>({typeName:(0,a.GS)(s.CW.region.name)}),verify:async()=>({typeName:(0,a.GS)(s.CW.verify.name)}),cascade:async()=>({typeName:(0,a.GS)(s.CW.cascade.name)}),matrix:async e=>{const{origin:t}=e;if((0,i.cd)(t))return{typeName:(0,a.GS)(s.CW.matrix.single)};if((0,i._A)(t)){const{min:n,max:r}=await(0,i.EH)(e,e.parent);let o=(0,a.GS)(s.CW.matrix.multi),c=(0,a.GS)(s.CW.select.limitBetween,{min:n,max:r});return(0,i.S2)(t)?(o=(0,a.GS)(s.CW.matrix.multiCol),c=(0,a.GS)(s.CW.matrix.colLimitBetween,{min:n,max:r})):(0,i.KC)(e.origin)&&(o=(0,a.GS)(s.CW.matrix.multiRow),c=(0,a.GS)(s.CW.matrix.rowLimitBetween,{min:n,max:r})),{typeName:o,typeDescription:c}}return(0,i.ct)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRow),typeDescription:(0,a.GS)(s.CW.matrix.eachRowOne)}:(0,i.gd)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleCol),typeDescription:(0,a.GS)(s.CW.matrix.eachColOne)}:(0,i.cx)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRowCol),typeDescription:(0,a.GS)(s.CW.matrix.eachRowColOne)}:{typeName:(0,a.GS)(s.CW.matrix.single)}},hot_spot:async()=>({typeName:(0,a.GS)(s.CW.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.GS)(s.CW.heatMap.name)}),max_diff:async()=>({typeName:(0,a.GS)(s.CW.maxDiff.name)})};var l=n(3001),d=n(3132),f=n(3080),p=n(9796),h=n(1344),m=n(8348),g=n(7404),v=(n(9952),n(4708)),y=n(6764),w=n(6332),_=n(556),b=n(9376);function x(e){return 1===e?"bottom":2===e?"top":"center"}function S(e,t,n,r,i=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),c=i?i+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=S(e,t,n,r,c)})),t.text}async function k(e,t){const{destList:n,cascadeStart:r}=t.origin,o=(0,i.MR)(e.nodeList,n,r.uuid);o&&(t.cascade=await T(t,e,o,""))}async function T(e,t,n,o,c){c?await(0,r.wz)(c,e):c={uuid:"",text:""};const{nodeList:u}=t,l=o?o+"=>"+(0,_.kt)(c.uuid):(0,_.kt)(c.uuid),d={option:c,groupId:o,resultId:l,text:c.text||c.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.GS)(s.CW.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.q0)(t,e),s=await(0,r.o9)(n,o,a),c=await(0,w.is)(t,s,n),u={...ne({target:e},t),renderId:(0,_.So)(e.nodeUuid,n.loopStack)},l=await(0,r.o9)(n,e.otherOptions,[]),d=await(0,w.is)(t,l,n),f={options:(0,y.uQ)(u,c.visibleList),otherOptions:d.visibleList};return i[e.nodeUuid]=f,f}}(n,t,e),p={...ne({target:n},t),...f,parent:t},h=(0,i._A)(n),{min:m,max:g}=await(0,i.EH)(p,t),{destList:S,output:k}=n,E=(0,i.K6)(n),I=[],C=h?(0,a.GS)(s.CW.cascade.selectBetween,{min:m||1,max:g}):(0,a.GS)(s.CW.cascade.selectSome,{amount:1}),O={...d,list:I,multiple:h,min:m,max:g,hint:C,required:E,display:x(n.menuType),lineCount:n.lineCount},N=(0,i.MR)(u,S,k.uuid),L=(0,v.wR)(p);(0,r.cV)(L);for(const n of L){const r=(0,i.MR)(u,S,n.uuid)||N,o=await T(e,t,r,l,n);I.push(o)}return O}function E(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,_.my)(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(5960);var I=n(3048),C=n(488);const O={optionsRelationship:{},groupsRelationship:{}},N=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function L(e){return"group"===e.type}function R(e){return"type"in e&&"group"===e.type}async function A(e,t){const{options:n,origin:r}=e;let i=r.optionGroups||[];if(o=e.type,!N.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,I.W)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,C.IH)(t,n);if(!e)return;const a=U(M(e.optionGroups||[],e.origin.optionGroupsRelationship||O),r);i=i.concat(a)}})),i}(e,t);if(i=i.concat(a),0==i.length)return{optionGroups:void 0};const s=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);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,s,n);let c=await W(i,n,t);return c=P(c),c=function(e,t){const{randomOptionY:n,circulation:r,followRandom:i}=e.origin;return r?G(t):n?i?t:D(t):t}(e,c),q(c,n),c=F(c),{optionGroups:c}}function P(e){const t=[];return e.forEach((e=>{R(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==P(t).length}(e)&&t.push(e):t.push(e)})),t}function M(e,t){return(e||[]).map((e=>{if(R(e)){const n=(0,_.O0)(e),{groupTitle:r,showGroupTitle:i,children:o,randomMode:a,type:s,uuid:c}=n;return{groupTitle:r,showGroupTitle:i,randomMode:a,type:s,uuid:c,children:M(o,t)}}{const n=(0,_.O0)(e),{text:r,uuid:i}=n;return{type:"option",text:r,optionUuid:i,groupUuids:t.optionsRelationship[i]||[]}}}))}function U(e,t){return e.map((e=>function(e,t){if(L(e)){const n=U(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:r,groupUuids:i,text:o,currentLevel:a}=e,s=t.find((e=>(0,_.oj)(n,e.refOptId)));return void 0===s?e:{type:r,groupUuids:i||[],text:o,currentLevel:a,optionUuid:s.uuid}}}(e,t)))}async function W(e,t,n){const r=[];for(const i of e){const e=await j(i,t,n);e&&r.push(e)}return r}async function j(e,t,n){if(L(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.qQ)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await W(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const B=(e,t)=>{const{groups:n,options:r}=(e=>e.reduce(((e,t,n)=>{const{groups:r,options:i}=e;return R(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},D=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,_.ec)(t.length+1);t.splice(n,0,e)})),t}(e),G=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 q(e,t){e.forEach((e=>{if(R(e)){const{randomMode:n,children:r}=e;q(r||[],t);const i={followNode:()=>B(r,t),noRandom:()=>r,random:()=>D(r),circulation:()=>G(r)};e.children=i[n]()}}))}function F(e){let t=[],n=[];const r=[];return e.forEach((e=>{if(R(e))e.children=F(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(1884),V=n(3004),K=n(6276),H=n(5032),Y=n(1103),Q=n(6784),X=n(4060);const J=["select","menu","select_image","select_icon"];function Z(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 $={};function ee(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.a)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function te(e){const{loop:t,parent:n,origin:r}=e,{lockLoopCount:i}=r;let o=r.nodeName.split("/")[0];if(o&&r.circleNode1Id&&!i&&!(0,c.E3)().realTimePreview){const e=(0,m.yy)();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 ne(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 re(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 te(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.E3)().realTimePreview,renderId:(0,i.YJ)(e),prev:t,errorMessage:""},o=e.parent;if(i.CA.includes(n.type))return async function(e,t){(0,c.e)(e,{autoSkip:!0,number:""});const n=$[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,c.e)(e,{number:e.runtimeNodeName})}(n),function(e){(0,c.e)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,c.e)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var r;n.image?(0,c.e)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,b.Q9)(e.parent,t)}):(0,c.e)(t,{images:[]}),n.video&&(0,c.e)(t,{autoplayVideo:n.autoplayVideo,video:n.video&&(r=n.video,r?{id:r.id,url:(0,V.G)(r.url),poster:(0,V.G)(r.poster)}:null)})}(n),await async function(e){if((0,K.Oo)(e)){const{origin:t}=e;(0,c.e)(e,{layout:t.layout,template:await(0,H.m)(t.template,e.parent)})}}(n),await(0,r.u_)(n,o),await async function(e,t){const n=await A(e,t);return(0,c.e)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=$[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,i.EH)(e,e.parent),r=(0,i._A)(t);(0,c.e)(e,{...n,multiple:r,selectType:r?"checkbox":"radio"})}(n),await(0,Y.S)(n),(0,c.W4)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=u[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,c.e)(e,n))}(n),(0,i.j$)(n),await async function(e){(0,K.G6)(e)&&await async function(e){if(!(0,c.E3)().realTimePreview)if((0,_.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,c.e)(t,{selected:!0,sortNo:1}),(0,Q.we)(0,e)}}else if((0,_.is)(e,J.includes(e.type))&&!await(0,X.yG)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,K.IN)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,c.e)(n,{selected:!0}),(0,Q.y)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,h._4)(n),n}async function ie(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,u=r?(0,a.GS)(s.CW.lottery.congratulation):(0,a.GS)(s.CW.lottery.pity),l=r?(0,a.GS)(s.CW.lottery.goal):(0,a.GS)(s.CW.lottery.fail),f=o.title||u,p=o.summary||l,h=(0,d.a)({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=ne({target:e},n),v=await re(g,n.current);return(0,c.e)(v,{rewardRaw:t,rewardTime:(0,z.kF)(),goal:r,rewardImage:h.name?h:void 0,rewardTitle:f,rewardDescribe:p,rewardList:i,rewardName:m,showRewards:e.showRewards}),!(0,c.E3)().preview&&r&&((0,c.W4)().app.canHandleReward()||"red_envelope"!==t.type||await oe(n,v)),v}async function oe(e,t){const{formalResult:{reward:n,authorizer:r},nodeList:o}=e,{app_id:a,component_appid:s}=r,u=(0,i.o1)(o,n.gift_id);t.linkUrl=await(0,l.Oj)(u.linkUrl,{state:e}),t.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,g.uK)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,c.W4)().app.getRewardUrl(d)}$.region=async e=>{(0,c.e)(e,{indexes:"0 0 0",value:"",regions:await(0,o.iM)(),infoRange:e.origin.infoRange})},$.end=async e=>{const{parent:t}=e,n=await(0,l.Oj)(e.origin.linkUrl,{state:t});(0,c.e)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},$.location=async e=>{(0,c.e)(e,{regions:await(0,o.iM)(),infoRange:e.origin.infoRange,value:""})},$.value_mark=async e=>{(0,c.e)(e,{showInput:e.origin.showInput})},$.icon_mark=async e=>{(0,c.e)(e,{inverseValue:e.origin.inverseValue})},$.menu=async e=>{const{origin:t}=e;(0,c.e)(e,{placeholder:t.placeholder||(0,a.GS)(s.CW.menu.clickToSelect),display:x(t.menuType),lineCount:t.lineCount})},$.area=async e=>{(0,c.e)(e,{infoRange:"street",regions:await(0,o.iM)()})},$.verify=async e=>{(0,c.e)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},$.weight=async e=>{const{origin:t,parent:n}=e,r=await(0,i.iw)(t,n);(0,c.e)(e,{weightTotal:r,unit:t.unit,distributeBy:t.distributeBy})},$.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(E(o,i,e+1));return a}(e);(0,c.e)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.e)(e,{currentTask:Z(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,c.e)(e,{currentTask:Z(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,c.e)(e,{currentTask:t})}})},$.slide_rate=async e=>{(0,c.e)(e,{currentOption:e.options[0],gotoNextOption(){(0,c.e)(e,{currentOption:Z(e.options,e.currentOption,1)})},gotoPrevOption(){(0,c.e)(e,{currentOption:Z(e.options,e.currentOption,-1)})},gotoOption(t){(0,c.e)(e,{currentOption:t})}})},$.select_image=async e=>{(0,c.e)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},$.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.kd)(i.option.origin,e.type)}}))}(e),S(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.So)(e,e.options)},$.hot_spot=async e=>{(0,c.e)(e,{...ee(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},$.heat_map=async e=>{(0,c.e)(e,{...ee(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},$.loop=async e=>{const{parent:t}=e;(0,p.iO)(e,t)||(e.varList=await(0,p.Co)(t,e))}},1103:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,e:()=>a});var r=n(8856),i=n(6276),o=n(3001);async function a(e){const{parent:t,origin:n}=e,i=await(0,o.qQ)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,r.e)(e,{description:i})}async function s(e){(0,i.kZ)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,i=await(0,o.qQ)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,r.e)(e,{title:i})}(e),await a(e))}},5032:(e,t,n)=>{"use strict";n.d(t,{m:()=>o}),n(9952);var r=n(8856),i=n(3001);async function o(e,t){if(!e)return{param:{}};const n=await(0,r.W4)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,i.E3)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},1344:(e,t,n)=>{"use strict";n.d(t,{ew:()=>M,mi:()=>U,ig:()=>V,Yp:()=>K,I5:()=>G,$7:()=>Q,io:()=>j,IN:()=>z,ay:()=>q,wn:()=>F,_4:()=>D,aC:()=>H,iq:()=>Y}),n(5960),n(9952);var r=n(4708),i=n(5776),o=n(4676),a=n(6348),s=n(9948),c=n(8856),u=n(556),l=n(568),d=n(6276);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.oz)(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(4556),y=n(2352);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.oV)(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.Y5)(t,e)}};var x=n(6940);let S=!1,k="";const T=["data","describe","logic","random","loop"];let E,I;const C="response_cache_",O="preview_cache_";let N,L,R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function A(e){const{offlineTaskId:t,preview:n}=(0,c.E3)();if(n)return O+(0,u.kt)(e);{const n=C+(0,u.kt)(e);return t?n+"_with_"+t:n}}function P(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 M(e){if((0,c.W4)().dev.infer||S)return;if((0,i.S)(e)||T.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,r.wR)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),R.error[e.renderId]=t}async function U(e){if((0,c.W4)().dev.infer||S)return;if((0,i.S)(e)||T.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.cA)(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.G6)(e)&&(t.options=e.options.filter(i).map((t=>P(t,e.type)))),(0,d.IN)(e)&&(t.otherOptions=e.otherOptions.filter(i).map((t=>P(t,e.type))))}R.responseId=e.parent.transactionID,R.data[e.renderId]=t;const r=e.parent.randomList;r&&(R.randomList=r.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),R.randomAbandonedNodeIds=(0,x.mU)()),await W(e.parent)}async function W(e){const{sid:t,renderList:n}=e,r=A(t);R.locale=(0,l.qe)();const i=Object.keys(R.data);R.count=0;for(const e of n)if(i.includes(e.renderId)&&(R.count+=1),e.renderId===R.point)break;await(0,c.W4)().storage.setVital(r,JSON.stringify(B(R)))}async function j(e){const t=A(e),n=await(0,c.W4)().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,c.W4)().dev.infer)return e;if((0,i.S)(e)||T.includes(e.type)||e.readonly)return e;!function(e){const t=R.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,r.wR)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=R.data[e.renderId];return t?(function(e,t,n){const i=(0,r.wR)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of i){const t=(0,r.oz)(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._A)(e.origin)||!(0,d.G6)(e))return;let t=(0,d.IN)(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,c.e)(e,{selected:!1,autoSelectMarked:!1}):r.push(e)})),r.length>1&&r.forEach(((e,t)=>{t<r.length-1&&(0,c.e)(e,{selected:!1})}))}(e),E&&E(e),e):(E&&E(e),e)}function G(e=!1){return e?B(R):R}async function q(e,t,n){R=e,N=[...e.randomList||[]],(0,x.ID)(e.randomAbandonedNodeIds,t.nodeList),L=e.point;const r=R.count;let i=0;S=!0,E=()=>{i>=r?I({failed:!1,error:""}):(n.onProgress("".concat(i,"/").concat(r)),i++)},I=e=>{o(),E=null,I=null,a.i.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.i.off("NEXT_OK",u),a.i.off("STRETCH_OK",u),a.i.off("NEXT_OK",c),S=!1},c=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():I({failed:!0,error:t})},u=()=>t.current.renderId===L?I({failed:!1,error:""}):t.handleEvents.handleNextClick();a.i.one("STRETCH_OK",u),a.i.on("NEXT_FAIL",c),a.i.on("NEXT_OK",u),a.i.trigger("START_MEMORY"),await(0,s.ER)()}function F(e,t){if(!N)return e;const n=N.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 z(){R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function V(e){z();const t=A(e.sid);await(0,c.W4)().storage.removeVital(t)}async function K(e,t){t.forEach((e=>{delete R.data[e]})),await W(e)}function H(e){S||(R.point=e.current.renderId)}async function Y(e){H(e),await W(e)}async function Q(e){return e?(k||await j(e),k):""}},5616:(e,t,n)=>{"use strict";n.d(t,{K:()=>d,y:()=>l});var r=n(1344),i=n(6784),o=n(8856),a=n(6496),s=n(568);class c{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.GS)(s.CW.langResume.title):(0,a.GS)(s.CW.memory.title),this.message=n?"":(0,a.GS)(s.CW.memory.message),this.sureText=n?"":(0,a.GS)(s.CW.memory.sure),this.denyText=n?"":(0,a.GS)(s.CW.memory.deny)}}async handleSure(){if(!this.holder||d())return;const e=this;return this.state.enterMode="resume",(0,o.e)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,i.Wy)(this.state,e.holder.responseId||""),await(0,o.W4)().hook.onResumeSurvey(this.state),(0,r.ay)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.e)(e,{show:!0}),(0,o.e)(e,{message:t})},onSuspend(){e.suspend()}})}async handleDeny(){d()||(await(0,o.W4)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.e)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.e)(this,{show:!1})}}let u=null;async function l(e){const t=await(0,r.io)(e.sid);return u=new c(t,e),u}function d(){return u&&u.resuming}},2392:(e,t,n)=>{"use strict";n.d(t,{U:()=>i,y:()=>o});var r=n(8856);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.E3)().theme=e,(0,r.E3)().setTheme(e)}},1372:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var r=n(8856),i=n(556);const o="prs-";function a(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat(o).concat((0,i.kt)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:r,color:i,fontSize:o,italic:a,lineThrough:s,underline:c}=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;"),c&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,r.W4)().ui.setPresetStyle(t,e)}},8856:(e,t,n)=>{"use strict";n.d(t,{E3:()=>d,W4:()=>l,e:()=>f,oB:()=>c,oV:()=>u});var r=n(6348),i=n(556);let o=null,a=null;const s=(0,i.Cu)((()=>r.i.trigger("SET_PROPS")),1e3/60);function c(e){a=e}function u(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.i.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},1884:(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,{KM:()=>r,Kk:()=>i,kF:()=>o})},8084:(e,t,n)=>{"use strict";n.d(t,{Qf:()=>u,iM:()=>c,oZ:()=>s,qu:()=>l});var r=n(7320);const i="https://media.choiceform.com/static-assets/regions-2020.json";let o;function a(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 s(e){o=e,a(o)}async function c(){return o||(o=await(0,r.kj)(i,{type:"GET"},!0),a(o)),o}function u(e){if(!e)return"";const t=e.split("-"),n=t[0],r=o.find((e=>n.includes(e.name)));if(!r)return"";const i=r?r.code+"":"",a=t[1];if(!a)return i;const s=r.cities.find((e=>a.includes(e.name)));if(!s)return i;const c=s?s.code+"":"",u=t[2];if(!u)return c;const l=s.areas.find((e=>u.includes(e.name)));return(l?l.code+"":"")||c||i||""}function l(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,r=o[t[0]];let i,a,s=r.name;return n>1&&(i=r.cities[t[1]],s+="-"+i.name,n>2&&(a=i.areas[t[2]],s+="-"+a.name)),s}},3684:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(8856);function i(e,t){return new(0,(0,r.W4)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},6496:(e,t,n)=>{"use strict";n.d(t,{At:()=>g,GS:()=>v,Mh:()=>f,Mt:()=>y,Sk:()=>p,Uj:()=>h,YP:()=>m}),n(7768);var r=n(6348),i=n(568),o=n(8856),a=n(7404),s=n(9200);const c=["zh_cn","en_us"];function u(){const{offline_survey_id:e}=(0,a.uK)(),t="language";return e?t+e:t}async function l(){return(0,o.W4)().storage.getVital(u())}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.W4)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.c.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.W4)().storage.setVital(u(),e)}(e),(0,o.W4)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.W4)().storage.set("lang-resume","true"),(0,o.W4)().hook.beforeForceLeave(),(0,o.W4)().app.reload(),!0)}function h(e){let t="en_us";c.includes(e)&&(t=e),i.Ki(t),(0,o.E3)().setLocale(t),r.i.trigger("LANG_CHANGE");const n=s.c.langTable.find((t=>t.locale===e));(0,o.W4)().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.W4)().system.translate(e,t):e}function y(e,t){const n=e&&t.length>1&&null===(0,o.W4)().storage.get("anti-show-init-lang-select");return(0,o.W4)().storage.remove("anti-show-init-lang-select"),!!n}},3132:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,k:()=>o});var r=n(4756),i=n(8856);function o(e){return(0,i.E3)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:i,id:a,originName:s}=e,c=o(i);return{ratio:Math.round(n/t*1e5)/1e5,url:c,natural:(0,r.Q)(c,"!m720"),thumbnail:(0,r.Q)(c,"!avatar"),large:(0,r.Q)(c,"!m1080"),width:t,height:n,id:a,originName:s,name:i}}},4872:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(9200);async function i(e){return"string"==typeof e?JSON.parse(r.c.inflateBase64(e)):e}},7828:(e,t,n)=>{"use strict";n.d(t,{O_:()=>h,QJ:()=>m,__:()=>g,gz:()=>v,w3:()=>p}),n(9952);var r=n(556),i=n(3568),o=n(6276);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&i.c.forEach((n=>{const r=e.mapping[n];r&&"object"==typeof r||(e.mapping[n]=t.mapping[n]||"")}))}function c(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.yy)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((i=>{const o=n.find((e=>(0,r.kt)(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 u(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),c(e,t),u(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.kt)(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:c}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],i=a.find((t=>t.nodeUuid&&(0,r.kt)(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.kt)(t.uuid)===e));n&&f(n,t)})),c&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=c.find((t=>(0,r.kt)(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.kt)(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.kt)(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||"",u(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.kt)(e.uuid)===n));i&&(i.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),u(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.kt)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,r.kt)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{c(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},5548:(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,{A:()=>r,c:()=>o})},556:(e,t,n)=>{"use strict";n.d(t,{Av:()=>c,Cu:()=>_,DB:()=>l,O0:()=>w,OI:()=>v,Qh:()=>o,So:()=>u,Sq:()=>y,W_:()=>x,YF:()=>d,aO:()=>a,ai:()=>h,ec:()=>m,eg:()=>b,is:()=>s,k5:()=>S,kt:()=>f,my:()=>g,oj:()=>p}),n(5960),n(7768),n(6056),n(9952);var r=n(2352);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 c(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 u(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.oV)(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 S(e){return e}},6276:(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 c(e){return!!e.otherOptions}function u(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{G6:()=>o,IN:()=>l,Oo:()=>r,QB:()=>a,_O:()=>d,cp:()=>s,kZ:()=>i,uo:()=>u,yy:()=>c})},2352:(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,{Wo:()=>r,oV:()=>o,uI:()=>i})},4756:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>i});var r=n(3004);function i(e,t){return e.endsWith(".svg")||(0,r.U)()?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()}},5224:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var r=n(568),i=n(6496);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,i.GS)(r.CW.reward.weChatName)}}},3552:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(8856);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.W4)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},5876:(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,{Qr:()=>i,_m:()=>o,cF:()=>r,mE:()=>a});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}},4072:(e,t,n)=>{"use strict";n.d(t,{Ij:()=>g,UJ:()=>u,WK:()=>p,YV:()=>c,ee:()=>h,kx:()=>m,sf:()=>d}),n(7768);var r=n(3001),i=n(3132),o=n(556),a=n(8348),s=n(8856);function c(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.includes("TO_GLOBAL")&&"var-html"===e.type&&(t+=(0,r.uO)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.W4)().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.W4)().ui.setVarStyle(t,e)}}(e.varStyles)}function u(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+=u(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:g((0,i.k)(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.oj)(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.oj)(t.uuid,e))),n||(n=(0,a._O)(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+"##"}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,U:()=>o}),n(7768);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}},488:(e,t,n)=>{"use strict";n.d(t,{Ge:()=>R,IH:()=>k,Yl:()=>T,_i:()=>P,aL:()=>L,gQ:()=>_,im:()=>E,iq:()=>x,ms:()=>N,oB:()=>b,of:()=>O,sl:()=>C,uZ:()=>A,yE:()=>S,yI:()=>I}),n(9952);var r=n(3001),i=n(8832),o=n(556),a=n(6764),s=n(4708),c=n(8107),u=n(4072),l=n(8348),d=n(2352),f=n(8856),p=n(9348),h=n(5876),m=n(7192),g=n(9216),v=n(8260),y=n(5776),w=n(4316);function _(e){e=(0,m.Un)(e);const t=(0,f.W4)().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).includes("var-tag")}function S(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.AF)(e,t);if(!a)return;const s=(0,o.So)(a,n);return r.node&&(i=[...i,r.node]),i.find((e=>s.startsWith(e.renderId)))}function T(e,t,n,r){if(!n)return null;const i=[n];r&&i.push(r);const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.DB)(a,i);return(0,g.QL)(e.renderList,s)}function E(e){return{name:e.innerText,identity:(0,p.U)(e.getAttribute("data-v-id")),config:(0,h.cF)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function I(e,t){return O(e,E(t))}function C(e){const{identity:t,config:n}=e;let r=(0,p.A)(t);if(!n)return r;if((0,h.Qr)(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.oV)(i)||"-1"==i||(r+="_".concat(i)),!(0,d.oV)(o)){const e=(0,h.mE)(o);r+="_".concat(JSON.stringify(e))}return r}function O(e,t){const n=C(t={...t,config:t.config||{}}),{identity:r,config:i,name:o,inEdist:a}=t,d=(0,p.A)(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(P(h)){const[e,t]=h.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,u.kx)(h,e);return t?{...f,...t,name:o,mapId:n,inEdist:a}:null}let S,E="";if(b){if((0,v.g)(r))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(S=T(e,m,b,x),!S)return}else if(c.Ux(g))E=m;else if(S=k(e,m),!S)return;if(g){const e=(0,l._O)(g);return e&&{...f,uuid:d,name:o,node:S,nodePart:e,lookupLoopNodeId:E,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const I=(0,l._O)(_,S);if(!I)return;const O="var-media"===I.type;if(y){const e=(0,l._O)(y,S);if(!e)return;return{...f,inEdist:a,name:o,node:S,optionPart:I,optionFilter:e,uuid:d,lookupLoopNodeId:E,isMedia:O,type:I.type,mapId:n}}const N=(0,s.oz)((0,s.gr)(S),w);return N?{...f,inEdist:a,name:o,node:S,option:N,optionPart:I,uuid:d,lookupLoopNodeId:E,isMedia:O,type:I.type,mapId:n}:void 0}async function N(e,t){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=e,l=await(0,r.W0)(u.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||c;n=d&&await(0,i.U)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.my)(n,l);return u.disorder?(0,a.sZ)(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.U)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await N(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 R(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.U)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await N(e),r=[];for(const i of t){const t=await n.getText({...e,specifiedOpt:i});(0,d.oV)(t)||r.push(t)}return r.join(a)}}async function A(e){const t={};t.text=await R(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.U)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await N(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.U)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:r})]:[];{const n=await N(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e),o=r[0];return o&&(t.normalIconUrl=o,t.activeIconUrl=(0,w.WG)(o)),t}function P(e){return e&&e.startsWith("URL_PARAM=")}},8107:(e,t,n)=>{"use strict";n.d(t,{M4:()=>f,MH:()=>h,Ux:()=>p,WG:()=>d,Wy:()=>l,nS:()=>x,yG:()=>b}),n(7768);var r=n(556),i=n(4072),o=n(8348),a=n(1880),s=n(2352),c=n(3568);let u;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.k5)(n(e))}return(0,r.k5)(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.k5)(t(s,i))}function p(e){return function(){if(!u){const e=(0,o.yy)();u=[],Object.keys(e).forEach((t=>{const{uuid:n,type:r}=e[t];"var-loop"===r&&u.push(n)}))}return u}().includes(e)}function h(e,t){return t.find((t=>(0,r.oj)(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.Ij)(n.url,t)}return""}function v(e){return e&&(0,s.Wo)(e.index+1)}function y(e){return e&&e.value}function w(e){return e&&(0,s.Wo)(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,_),c.c.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.C)(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,_),c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.C)(n.mapping,t,e)))}(t)}))}},8348:(e,t,n)=>{"use strict";n.d(t,{yy:()=>x,_O:()=>_,cK:()=>m}),n(7768),n(9952);var r=n(1880),i=n(4072),o=n(488),a=n(4708),s=n(2352),c=n(3568);var u=n(8832),l=n(6524),d=n(5876);var f=n(9572),p=n(8107),h=n(9200);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.c.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.M)(v),(0,p.nS)(v),(0,p.yG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.Y5)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",c.c.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.C)(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.Ml)(t);if(n)return n;const{optionY:r,optionX:i}=t;return i?i.text+"_"+r.text:(0,a.Y5)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.Wo)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.Wo)(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.Wo)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.Wo)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:r}=e,o=(0,a.Y5)(n,"image");return r?n.text:o?(0,i.Ij)(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.ms)(e);return(0,s.Wo)(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.gr)(i),s=[];for(const n of o)!r&&n.isOtherOpt||t&&!t(n,i)||!await(0,u.U)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.e2),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.gb),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.yu),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.sb),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.Qr)(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.oV)(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.ms)(e);return function(e,t){if((0,s.oV)(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.ms)(e);return function(e,t){if((0,s.oV)(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.wi)(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.Wo)(i).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.oV)(i)?"":i}}})),e)throw new Error("lack var implement for:\n"+e)}(),g=!0)}function x(){return g||b(),v}b()},9572:(e,t,n)=>{"use strict";n.d(t,{cT:()=>l,wi:()=>f,yH:()=>d}),n(7768),n(9952);var r=n(8107),i=n(488),o=n(4072),a=n(3132),s=n(4708),c=n(3568);function u(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.ee)(t.uuid,e.imageList);if(n)return[(0,a.a)(u(n))];if(t.value){let n=[];const r=(0,i.oB)(t.value);for(const t of r){const r=await l(e,(0,i.yI)(e,t));n=n.concat(r)}return n}{const{option:n,optionPart:r}=t,o=t.node;return o?r?(await(0,i.ms)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.Y5)(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.Y5)(r,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,i=r.Wy(t);if(!i)return[];const o=r.MH(n,i.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",c.c.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.WG(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.M4(e,(e=>t(e.mapping,n)))}(n)}))}},1880:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,M:()=>h}),n(1088);var r=n(4676),i=n(4072),o=n(8856),a=n(4708),s=n(2352),c=n(7404),u=n(3568),l=n(1884),d=n(1820);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.Ij)(r.url,t,r.originName)}}function h(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,c.uK)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,c.uK)();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.Kk)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.Kk)(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.W4)().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.E3)().preview?"":(0,o.E3)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.E3)().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.Wo)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.Wo)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,r.gp)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.i)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.Wo)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(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' />"):""},u.c.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.Ij)(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.Wo)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,r.cA)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.W4)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.W4)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.W4)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.W4)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.W4)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.W4)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.W4)().system.device.device.type||f}},6524:(e,t,n)=>{"use strict";n.d(t,{KE:()=>f,e2:()=>a,gb:()=>s,sb:()=>u,yu:()=>c}),n(5960),n(7768);var r=n(8348),i=n(2352),o=n(984);function a(e){return e.selected}function s(e){return!e.selected}function c(e,t){return(0,o.QX)(e,t)}function u(e,t){return!(0,o.QX)(e,t)}const l=(e,t,n,r=!1)=>{if((0,i.oV)(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.oV)(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]].includes(t))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.yy)();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.includes(o.uuid)?t=a:d.includes(o.uuid)?t=s:f.includes(o.uuid)?t=c:p.includes(o.uuid)&&(t=u)),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)},1820:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var r=n(8856);function i(){return(0,r.E3)().realTimePreview?"realtime_preview":(0,r.E3)().preview?"preview":"formal"}},4060:(e,t,n)=>{"use strict";n.d(t,{IB:()=>l,UF:()=>y,em:()=>g,uy:()=>m,wx:()=>v,yG:()=>w}),n(2048),n(9624),n(9952);var r=n(9216),i=n(556),o=n(3001),a=n(4676),s=n(488),c=n(2352);const u={1:(e,t,n)=>(t>n&&([t,n]=[n,t]),u[5](e,t,0)&&u[6](e,n,0)),2:(e,t,n)=>!u[1](e,t,n),11:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),r=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim(),e.includes(t)))))))},12:(e,t)=>!u[11](e,t,0),3:(e,t)=>(0,c.Wo)(e)===(0,c.Wo)(t),4:(e,t)=>!u[3](e,t,0),5:(e,t)=>{const n=(0,c.uI)(e),r=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof r?n>r:(0,c.Wo)(n)>(0,c.Wo)(r)},6:(e,t)=>{const n=(0,c.uI)(e),r=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof r?n<r:(0,c.Wo)(n)<(0,c.Wo)(r)},7:(e,t)=>!u[6](e,t,0),8:(e,t)=>!u[5](e,t,0),9:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),r=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),r.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!u[9](e,t,0),13:e=>(0,c.Wo)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!u[13](e,t),15:(e,t)=>!u[16](e,t),16:(e,t)=>(0,c.Wo)(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())),u[t.markId](n,r,i)}};function d(e,t){"string"==typeof e&&(e=(0,o.Qr)(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.qQ)(n,{state:t,joinBy:r}),e)}async function p(e,t){const{relatedVarId:n}=e,r={identity:{baseId:n}},i=(0,s.of)(t,r);if(!i)return{value:!1,reason:{type:"var_not_found"}};const a=m(e.markId)?",":void 0;return d(await(0,o.Wi)({state:t,varInfo:i,joinBy:a}),e)}function h(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=t,u=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;let s,c=(0,i.So)(a,n);do{if(s=(0,r.QL)(o,c),s)break;c=c.substring(0,c.length-9)}while(c.length>=36);return s}(e,t);if(!u)return-2===c?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.cA)(u);if(!d||!d.items)return-2===c?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((e=>function(e,t){return(0,i.oj)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.wr)(f):"",r=p(e,t),i={value:r};return r||(i.reason={type:"node_unmatch",limit:c,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),i}{const e=-2===c?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),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.E3)(e.markStart,{state:t,joinBy:","}):await(0,o.wh)(e.markStart,{state:t}),end:await(0,o.wh)(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:c}=t,{start:u,end:l}=await g(t,e);let d;t.markEnd=l,t.markStart=u,d=a?await y(e,s,c):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}},8260:(e,t,n)=>{"use strict";n.d(t,{g:()=>d,u:()=>f}),n(9952);var r=n(5776),i=n(8856),o=n(556),a=n(5876),s=n(9348),c=n(488),u=n(3001);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:u,innerLoopRoundId:d}=i,f=(0,r.AF)(n,a);if(!f)return"";const h=(0,c.IH)(n,f);if(!h)return"";let m=[];m=l(s)?h.varList.map((e=>(0,o.kt)(e.uuid))):[s];for(const i of m)if(u){let a=[];const s=(0,r.AF)(n,u);if(!s)continue;const f=(0,c.Yl)(n,s,i);if(!f)continue;a=l(d)?f.varList.map((e=>(0,o.kt)(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,c=function(e,t){const n=(0,i.W4)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.A)(e.identity)),n.setAttribute("data-v-config",(0,a._m)(e.config)),n.outerHTML}({config:r,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,u.qQ)(c,e)}},9376:(e,t,n)=>{"use strict";n.d(t,{Il:()=>_,Md:()=>g,Q9:()=>m,q0:()=>b}),n(5960),n(9952);var r=n(4708),i=n(3001),o=n(556),a=n(3080),s=n(6764),c=n(488),u=n(8348),l=n(8856),d=n(3132),f=n(3048),p=n(8107),h=n(9572);async function m(e,t){const{loop:n}=t,r=n&&n.node.nodeUuid,{image:i}=t.origin;if(!i)return[];const o=(0,u.yy)();if("image"===i.type)return[(0,d.a)(i)];if(r&&p.Ux(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.cT)(e,(0,c.of)(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,u.yy)();let g;if("image"===l.type)g=(0,d.a)(l);else if(s&&p.Ux(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.cT)(i,(0,c.of)(i,e)))[0]}return!f&&g&&"variable"===l.type&&(0,a.KS)({node:e,optionId:t.uuid},{mapId:l.id},g.originName),g}function v(e){return!(!e||!(0,l.E3)().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.oz)(i,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,r.wR)(t.node).indexOf(a):void 0}}function w(e,t){if(!t)return null;const n=(0,f.a)(e,t);for(const e of t){const t=(0,f.W)(e);if((0,o.oj)(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.qQ)(a,{state:t}):(0,d.a)(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,u=!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.W0)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,c.of)(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:!u,keepWrap:!0};if(f.node&&(l=await(0,c.uZ)(_),h&&(d={uuid:n.uuid,value:h.value,optComment:h.optComment,image:(0,r.Y5)(h,"image"),number:h.number,text:h.text,label:h.label,mapping:h.mapping&&{...h.mapping},normalIconUrl:(0,r.Y5)(h,"normalIconUrl"),activeIconUrl:(0,r.Y5)(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:c}=t[e];let u=(0,o.my)(r,n);c?u=(0,s.sZ)(u):u.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=u.map((e=>e.option)),h=u.map((e=>e.passRef));f=f.concat((0,a.SW)(i,p)),l=l.concat(p),d=d.concat(h)}))}else l=h;return{options:l,refMaps:f,passRefs:d}}},3080:(e,t,n)=>{"use strict";n.d(t,{GO:()=>u,KS:()=>a,SW:()=>c,So:()=>l,oB:()=>s,oJ:()=>d}),n(9952);var r=n(3001),i=n(4676),o=n(4316);function a(e,t,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.sV)(r).match(/#[^#]+$/);return e&&e[0]||""}return""}function c(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function u(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.Ci)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=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.includes(r)||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),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let e;l.forEach((e=>{e.value=(0,r.Qr)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},8832:(e,t,n)=>{"use strict";n.d(t,{U:()=>u}),n(5960);var r=n(6524),i=n(4060),o=n(3001),a=n(2352),s=n(5876);const c={"-1":6,"-2":8,"-3":5,"-4":7};async function u(e){if(!(0,s.Qr)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,u=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=c[n];let i;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return i=5===r||7===r?(0,a.Wo)(o[o.length-1]||0):(0,a.Wo)(o[0]||0),{...t,limitType:r,limitStart:i}}(n,e.varInfo.config),m=(0,r.KE)(u,p,e),g=Number(l),v=(0,i.uy)(g)?await(0,o.E3)(d,{...e,joinBy:","}):await(0,o.wh)(d,e),y=await(0,o.wh)(f,e);return i.IB.input(m,{markId:g,markStart:v,markEnd:y,ignoreCase:h})}},6620:(e,t,n)=>{"use strict";n.d(t,{a8:()=>a,aI:()=>s}),n(9952);var r=n(3001),i=n(8856),o=n(1820);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.i)(),_IS_INFER_:(0,i.W4)().dev.infer?"Y":"",...e}}async function s(e,t=[],n=!0){const i={};for(const n of t){const{name:t,value:o}=n;t.startsWith("_url_")?i[t]=await(0,r.Oj)(o,{state:e}):t.startsWith("_html_")?i[t]=await(0,r.qQ)(o,{state:e},!0):i[t]=await(0,r.E3)(o,{state:e,joinBy:","},"URL")}return n?a(i,e):i}},3001:(e,t,n)=>{"use strict";n.d(t,{gt:()=>U,Wi:()=>R,qQ:()=>E,W0:()=>P,E3:()=>C,wh:()=>A,Oj:()=>L,uO:()=>b,cb:()=>M,Qr:()=>O}),n(7768),n(9624),n(9952);var r=n(3684);function i(e){let t=!0;try{t=!!(0,r.y)(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(556),c=n(6072),u=n(3552),l=n(3080),d=n(488),f=n(9572),p=n(4072),h=n(8348),m=n(8856),g=n(2352),v=n(7404),y=n(5876),w=n(8260);function _(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function b(e="",t=!1){if(e=(e=S(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.includes("&lt;")||e.includes("&gt;");)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function x(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function S(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.includes("&amp;");)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.Qh)(o)),o}function T(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.gQ)(e).childNodes]}async function E(e="",t,n=!1){e+="";const{state:r,innerJoinBy:i,varInfo:o,usage:a}=t,c=t.spaceRep||"";e=e.replace(/&nbsp;/g,c);const u=t.joinBy||" ";if((0,d.iq)(e)){const c=(0,d.gQ)(e),f=(0,d.oB)(e,c);for(const e of f){const t=(0,d.yI)(r,e);let s="";if(t?s=await R({state:r,varInfo:t,joinBy:i||u}):(0,m.E3)().realTimePreview&&(s=k(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,g.oV)(s)?"":(0,g.Wo)(s).trim(),a){const n=t||{mapId:(0,d.sl)((0,d.im)(e))};(0,l.KS)(a,n,s)}const c=!o&&t&&s&&!n;let f=[];_(t)?(c&&(s=k(s,t.type,t.name,t.inEdist,!1)),f=s?T(s):[""]):(c&&(s=k(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,m.W4)().system.newTextNode(e.innerHTML)]),I(e,f)}const 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(S(e))}r=i.join(n)}else r=S(e.innerHTML);return r=r.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),r=S((0,s.aO)(r)),r}(c,o,u);return N(p,t)}return e+""}function I(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const r=(0,m.W4)().system.newTextNode(t);n.insertBefore(r,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function C(e="",t,n="WRAPPED_URL"){return N(O(await E(e,t,!0),n),t)}function O(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.gQ)(e).innerText;return n=(0,d.gQ)(n).innerText,"URL"===t&&(n=(0,f.yH)(n)),n.trim()}function N(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function L(e="",t){let n=await E(e,{...t,innerJoinBy:","},!0);return n=O(b(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=N(n,t),n}async function R(e){let t="";const{varInfo:n}=e;if((0,w.g)(n.identity))t=await(0,w.u)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d._i)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.uK)()[n]}else n.nodePart||n.node?t=await(0,d.Ge)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):E(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,h.yy)(),{varInfo:n,state:i}=e;let s="";const c=(0,d.gQ)(n.value).childNodes,u=[];let l="";for(const e of c)if((0,d.yE)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,u,e),l=""}const n=(0,d.yI)(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,u,n.expOpr),u.push(e);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const e=u[u.length-1];s=o(s,u,await R({state:i,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(e){let t=0;try{t=(0,r.y)(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.oB)(t.value),a=[];for(const e of o){const t=(0,d.yI)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=r;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const c=await R({state:n,varInfo:t,joinBy:i});(0,g.oV)(c)||a.push(c)}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.aL)(e);const a=(0,d.oB)(t.value);let s="";for(const t of a){const r=(0,d.yI)(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 R({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 C(t.value,{state:r,joinBy:","},"URL")}const{result:i}=await(0,c.eU)({state:r,request:t,customParam:e,silent:!1});return"string"!=typeof i?i:(0,u.q)(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 E(t.value,e),i=(0,u.q)(b(r));return await function(e,t,n){const r=(0,y.mE)(e);return(0,s.eg)(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 c="";return s&&(c=e.startsWith("{{{")?await E(s,{state:n}):await C(s,{state:n},"URL")),c||a}))}(t.config.phParams,i,n)}(e))}return(0,d.iq)(t)&&(t=await E(t,e)),t}async function A(e="",t,n=!1){if("number"==typeof e)return e;if((0,g.oV)(e))return n?NaN:"";const r=Number(e);if(isNaN(r)){const r=await C(e,t);if((0,g.oV)(r))return n?NaN:"";const i=Number(r);return isNaN(i)?n?NaN:r:i}return r}async function P(e="",t){if("number"==typeof e)return e;const n=await A(e,t,!0);return Number(n)}async function M(e="",t,n=!1){return(0,g.oV)(e)?"":(0,s.eg)((0,g.Wo)(e),/{{(.+?)}}/g,(async(e,r)=>{let i=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.uK)()[e];{const n=(0,p.WK)(e,t.variables);return n?O(await R({varInfo:n,state:t,joinBy:","})):""}}(r,t);return i&&n&&(i=encodeURIComponent(i)),"".concat(i||"")}))}function U(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3040:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6960:(e,t,n)=>{var r=n(6840);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5775:(e,t,n)=>{var r=n(3280),i=n(5156),o=n(3984),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}},3696:(e,t,n)=>{"use strict";var r=n(8540).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},7852:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},5968:(e,t,n)=>{var r=n(6840);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},7580:(e,t,n)=>{"use strict";var r=n(3596),i=n(8648),o=n(4916),a=n(3976),s=n(1688),c=n(2652),u=n(6648);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=u(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[_],c(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,c(n,_,p);return n.length=_,n}},7299:(e,t,n)=>{var r=n(2576),i=n(1688),o=n(9924),a=function(e){return function(t,n,a){var s,c=r(t),u=i(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1452:(e,t,n)=>{"use strict";var r=n(996);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},4916:(e,t,n)=>{var r=n(5968);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}}},5996:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},6400:(e,t,n)=>{var r=n(8928),i=n(5996),o=n(3280)("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}},1528:(e,t,n)=>{"use strict";var r=n(5968),i=n(3040);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}},6792:(e,t,n)=>{"use strict";var r=n(5968),i=n(3040);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}},8580:(e,t,n)=>{var r=n(3944),i=n(3412),o=n(2456),a=n(3984);e.exports=function(e,t){for(var n=i(t),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];r(e,l)||s(e,l,c(t,l))}}},9700:(e,t,n)=>{var r=n(996);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3419:(e,t,n)=>{"use strict";var r=n(7963).IteratorPrototype,i=n(5156),o=n(4848),a=n(3532),s=n(476),c=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,u,!1,!0),s[u]=c,e}},784:(e,t,n)=>{var r=n(376),i=n(3984),o=n(4848);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},4848:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2652:(e,t,n)=>{"use strict";var r=n(5880),i=n(3984),o=n(4848);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},9436:(e,t,n)=>{"use strict";var r=n(2808),i=n(3419),o=n(5432),a=n(1640),s=n(3532),c=n(784),u=n(7376),l=n(3280),d=n(8820),f=n(476),p=n(7963),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 S,k,T,E=function(e){if(e===p&&L)return L;if(!m&&e in O)return O[e];switch(e){case v:case y:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",C=!1,O=e.prototype,N=O[g]||O["@@iterator"]||p&&O[p],L=!m&&N||E(p),R="Array"==t&&O.entries||N;if(R&&(S=o(R.call(new e)),h!==Object.prototype&&S.next&&(d||o(S)===h||(a?a(S,h):"function"!=typeof S[g]&&c(S,g,_)),s(S,I,!0,!0),d&&(f[I]=_))),p==y&&N&&N.name!==y&&(C=!0,L=function(){return N.call(this)}),d&&!x||O[g]===L||c(O,g,L),f[t]=L,p)if(k={values:E(y),keys:b?L:E(v),entries:E(w)},x)for(T in k)(m||C||!(T in O))&&u(O,T,k[T]);else r({target:t,proto:!0,forced:m||C},k);return k}},376:(e,t,n)=>{var r=n(996);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4111:(e,t,n)=>{var r=n(4280),i=n(6840),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},3060: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}},2552:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2808:(e,t,n)=>{var r=n(4280),i=n(2456).f,o=n(784),a=n(7376),s=n(1016),c=n(8580),u=n(7724);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],!u(m?l:h+(g?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},996:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},8284:(e,t,n)=>{"use strict";n(4016);var r=n(7376),i=n(996),o=n(3280),a=n(2804),s=n(784),c=o("species"),u=!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[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!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)}},3596:(e,t,n)=>{var r=n(3040);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)}}},3904:(e,t,n)=>{var r=n(2328),i=n(4280),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]}},6648:(e,t,n)=>{var r=n(6400),i=n(476),o=n(3280)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},460:(e,t,n)=>{var r=n(5968),i=n(6648);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},4516:(e,t,n)=>{var r=n(8820),i=n(460);e.exports=r?i:function(e){return Map.prototype.entries.call(e)}},4892:(e,t,n)=>{var r=n(8820),i=n(460);e.exports=r?i:function(e){return Set.prototype.values.call(e)}},4280:(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")()},3944:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},1976:e=>{e.exports={}},4128:(e,t,n)=>{var r=n(3904);e.exports=r("document","documentElement")},4544:(e,t,n)=>{var r=n(376),i=n(996),o=n(4111);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8048:(e,t,n)=>{var r=n(996),i=n(5996),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},196:(e,t,n)=>{var r=n(7536),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},8264:(e,t,n)=>{var r,i,o,a=n(4688),s=n(4280),c=n(6840),u=n(784),l=n(3944),d=n(7996),f=n(1976),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 u(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(!c(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3976:(e,t,n)=>{var r=n(3280),i=n(476),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},1444:(e,t,n)=>{var r=n(5996);e.exports=Array.isArray||function(e){return"Array"==r(e)}},7724:(e,t,n)=>{var r=n(996),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=c&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},6840:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8820:e=>{e.exports=!1},596:(e,t,n)=>{var r=n(5968),i=n(3976),o=n(1688),a=n(3596),s=n(6648),c=n(4916),u=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 u)return g;return new u(!1)}f=p.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(g=c(f,w,y.value,l))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},7963:(e,t,n)=>{"use strict";var r,i,o,a=n(5432),s=n(784),c=n(3944),u=n(3280),l=n(8820),d=u("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):f=!0),null==r&&(r={}),l||c(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},476:e=>{e.exports={}},5976:(e,t,n)=>{var r=n(996);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},3172:(e,t,n)=>{var r=n(996),i=n(3280),o=n(8820),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}))},4688:(e,t,n)=>{var r=n(4280),i=n(196),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},9584:(e,t,n)=>{"use strict";var r=n(376),i=n(996),o=n(3008),a=n(7928),s=n(8),c=n(8648),u=n(8048),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=c(e),i=arguments.length,l=1,d=a.f,f=s.f;i>l;)for(var p,h=u(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},5156:(e,t,n)=>{var r,i=n(5968),o=n(6800),a=n(2552),s=n(1976),c=n(4128),u=n(4111),l=n(7996),d="prototype",f="script",p=l("IE_PROTO"),h=function(){},m=function(e){return"<"+f+">"+e+"</"+f+">"},g=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g=r?function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):(t=u("iframe"),n="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete g[d][a[i]];return g()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=i(e),n=new h,h[d]=null,n[p]=e):n=g(),void 0===t?n:o(n,t)}},6800:(e,t,n)=>{var r=n(376),i=n(3984),o=n(5968),a=n(3008);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,c=0;s>c;)i.f(e,n=r[c++],t[n]);return e}},3984:(e,t,n)=>{var r=n(376),i=n(4544),o=n(5968),a=n(5880),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}},2456:(e,t,n)=>{var r=n(376),i=n(8),o=n(4848),a=n(2576),s=n(5880),c=n(3944),u=n(4544),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return o(!i.f.call(e,t),e[t])}},220:(e,t,n)=>{var r=n(1216),i=n(2552).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7928:(e,t)=>{t.f=Object.getOwnPropertySymbols},5432:(e,t,n)=>{var r=n(3944),i=n(8648),o=n(7996),a=n(9700),s=o("IE_PROTO"),c=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?c:null}},1216:(e,t,n)=>{var r=n(3944),i=n(2576),o=n(7299).indexOf,a=n(1976);e.exports=function(e,t){var n,s=i(e),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},3008:(e,t,n)=>{var r=n(1216),i=n(2552);e.exports=Object.keys||function(e){return r(e,i)}},8:(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},1640:(e,t,n)=>{var r=n(5968),i=n(6960);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)},3412:(e,t,n)=>{var r=n(3904),i=n(220),o=n(7928),a=n(5968);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},2328:(e,t,n)=>{var r=n(4280);e.exports=r},1656:(e,t,n)=>{var r=n(7376);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},7376:(e,t,n)=>{var r=n(4280),i=n(784),o=n(3944),a=n(1016),s=n(196),c=n(8264),u=c.get,l=c.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var c=!!s&&!!s.unsafe,u=!!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?(c?!f&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},9792:(e,t,n)=>{var r=n(5996),i=n(2804);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)}},2804:(e,t,n)=>{"use strict";var r,i,o=n(736),a=n(8288),s=RegExp.prototype.exec,c=String.prototype.replace,u=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)&&(u=function(e){var t,n,r,i,a=this,u=d&&a.sticky,p=o.call(a),h=a.source,m=0,g=e;return u&&(-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(u?n:a,g),u?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&&c.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},736:(e,t,n)=>{"use strict";var r=n(5968);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}},8288:(e,t,n)=>{"use strict";var r=n(996);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")}))},1952:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4004:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},1016:(e,t,n)=>{var r=n(4280),i=n(784);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},3532:(e,t,n)=>{var r=n(3984).f,i=n(3944),o=n(3280)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},7996:(e,t,n)=>{var r=n(9364),i=n(1732),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},7536:(e,t,n)=>{var r=n(4280),i=n(1016),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},9364:(e,t,n)=>{var r=n(8820),i=n(7536);(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)"})},592:(e,t,n)=>{var r=n(5968),i=n(3040),o=n(3280)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8540:(e,t,n)=>{var r=n(3509),i=n(1952),o=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},4248: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)},c=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))},u=function(e){var n=[];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);var r,u,l=e.length,d=128,f=0,p=72;for(r=0;r<e.length;r++)(u=e[r])<128&&n.push(a(u));var h=n.length,m=h;for(h&&n.push("-");m<l;){var g=t;for(r=0;r<e.length;r++)(u=e[r])>=d&&u<g&&(g=u);var v=m+1;if(g-d>o((t-f)/v))throw RangeError(i);for(f+=(g-d)*v,d=g,r=0;r<e.length;r++){if((u=e[r])<d&&++f>t)throw RangeError(i);if(u==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-_;n.push(a(s(_+b%x))),y=o(b/x)}n.push(a(s(y))),p=c(f,v,m==h),f=0,++m}}++f,++d}return n.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--"+u(i):i);return o.join(".")}},9616:(e,t,n)=>{var r=n(996),i=n(2308);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},6452:(e,t,n)=>{var r=n(1952),i="["+n(2308)+"]",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)}},9924:(e,t,n)=>{var r=n(3509),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)}},2576:(e,t,n)=>{var r=n(8048),i=n(1952);e.exports=function(e){return r(i(e))}},3509:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},1688:(e,t,n)=>{var r=n(3509),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},8648:(e,t,n)=>{var r=n(1952);e.exports=function(e){return Object(r(e))}},5880:(e,t,n)=>{var r=n(6840);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")}},8928:(e,t,n)=>{var r={};r[n(3280)("toStringTag")]="z",e.exports="[object z]"===String(r)},1732:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},5112:(e,t,n)=>{var r=n(5976);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3280:(e,t,n)=>{var r=n(4280),i=n(9364),o=n(3944),a=n(1732),s=n(5976),c=n(5112),u=i("wks"),l=r.Symbol,d=c?l:l&&l.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(l,e)?u[e]=l[e]:u[e]=d("Symbol."+e)),u[e]}},2308:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},3224:(e,t,n)=>{"use strict";var r=n(2576),i=n(5775),o=n(476),a=n(8264),s=n(9436),c="Array Iterator",u=a.set,l=a.getterFor(c);e.exports=s(Array,"Array",(function(e,t){u(this,{type:c,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")},2048:(e,t,n)=>{"use strict";var r=n(2808),i=n(1444),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)}})},5960:(e,t,n)=>{"use strict";var r=n(2808),i=n(3040),o=n(8648),a=n(996),s=n(1452),c=[],u=c.sort,l=a((function(){c.sort(void 0)})),d=a((function(){c.sort(null)})),f=s("sort");r({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},4016:(e,t,n)=>{"use strict";var r=n(2808),i=n(2804);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},4024:(e,t,n)=>{"use strict";var r=n(8540).charAt,i=n(8264),o=n(9436),a="String Iterator",s=i.set,c=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=c(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})}))},7768:(e,t,n)=>{"use strict";var r=n(8284),i=n(5968),o=n(8648),a=n(1688),s=n(3509),c=n(1952),u=n(3696),l=n(9792),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=c(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 c=i(e),p=String(this),h="function"==typeof r;h||(r=String(r));var m=c.global;if(m){var _=c.unicode;c.lastIndex=0}for(var b=[];;){var x=l(c,p);if(null===x)break;if(b.push(x),!m)break;""===String(x[0])&&(c.lastIndex=u(p,a(c.lastIndex),_))}for(var S,k="",T=0,E=0;E<b.length;E++){x=b[E];for(var I=String(x[0]),C=d(f(s(x.index),p.length),0),O=[],N=1;N<x.length;N++)O.push(void 0===(S=x[N])?S:String(S));var L=x.groups;if(h){var R=[I].concat(O,C,p);void 0!==L&&R.push(L);var A=String(r.apply(void 0,R))}else A=w(I,p,C,O,L,r);C>=T&&(k+=p.slice(T,C)+A,T=C+I.length)}return k+p.slice(T)}];function w(e,n,r,i,a,s){var c=r+e.length,u=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(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>u){var d=p(l/10);return 0===d?t:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},9624:(e,t,n)=>{"use strict";var r=n(2808),i=n(6452).trim;r({target:"String",proto:!0,forced:n(9616)("trim")},{trim:function(){return i(this)}})},1088:(e,t,n)=>{"use strict";var r=n(2808),i=n(376),o=n(4280),a=n(3944),s=n(6840),c=n(3984).f,u=n(8580),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};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var h=p.toString,m="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;c(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})}},3656:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},4107:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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!c(n,(function(e,n){if(!r(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},9896:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},8252:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop(e)}),void 0,!0,!0).result}})},6832:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop(n)}),void 0,!0,!0).result}})},7240:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4516),s=n(4004),c=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(e){return c(a(o(this)),(function(t,n){if(s(n,e))return c.stop()}),void 0,!0,!0).stopped}})},2288:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4516),s=n(596);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}})},5396:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},2480:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},7190:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},5036:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(4516),c=n(596);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),c(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}})},4736:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);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 c(n,(function(e,n){if(r(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},2520:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040);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}})},9328:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(1528);r({target:"Set",proto:!0,real:!0,forced:i},{addAll:function(){return o.apply(this,arguments)}})},4560:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"Set",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},8712:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{difference:function(e){var t=a(this),n=new(c(t,o("Set")))(t),r=s(n.delete);return u(e,(function(e){r.call(n,e)})),n}})},9708:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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!c(n,(function(e){if(!r(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},7976:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{filter:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(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}})},5600:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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 c(n,(function(e){if(r(e,e,t))return c.stop(e)}),void 0,!1,!0).result}})},7452:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{intersection:function(e){var t=a(this),n=new(c(t,o("Set"))),r=s(t.has),i=s(n.add);return u(e,(function(e){r.call(t,e)&&i.call(n,e)})),n}})},8636:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},1524:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(460),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:function(e){var t=c(this),n=a(e),r=n.has;return"function"!=typeof r&&(n=new(o("Set"))(e),r=s(n.has)),!u(t,(function(e){if(!1===r.call(n,e))return u.stop()}),void 0,!1,!0).stopped}})},8836:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(596);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}})},5040:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(4892),s=n(596);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)}})},1728:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{map:function(e){var t=a(this),n=l(t),r=c(e,arguments.length>1?arguments[1]:void 0,3),i=new(u(t,o("Set"))),f=s(i.add);return d(n,(function(e){f.call(i,r(e,e,t))}),void 0,!1,!0),i}})},80:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3040),s=n(4892),c=n(596);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),c(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}})},1124:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);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 c(n,(function(e){if(r(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},9600:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:function(e){var t=a(this),n=new(c(t,o("Set")))(t),r=s(n.delete),i=s(n.add);return u(e,(function(e){r.call(n,e)||i.call(n,e)})),n}})},8932:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);r({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=a(this),n=new(c(t,o("Set")))(t);return u(e,s(n.add),n),n}})},6056:(e,t,n)=>{"use strict";var r=n(2808),i=n(8820),o=n(6792);r({target:"WeakMap",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},9952:(e,t,n)=>{var r=n(4280),i=n(3060),o=n(3224),a=n(784),s=n(3280),c=s("iterator"),u=s("toStringTag"),l=o.values;for(var d in i){var f=r[d],p=f&&f.prototype;if(p){if(p[c]!==l)try{a(p,c,l)}catch(e){p[c]=l}if(p[u]||a(p,u,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]}}}},6552:(e,t,n)=>{"use strict";n(3224);var r=n(2808),i=n(3904),o=n(3172),a=n(7376),s=n(1656),c=n(3532),u=n(3419),l=n(8264),d=n(7852),f=n(3944),p=n(3596),h=n(6400),m=n(5968),g=n(6840),v=n(5156),y=n(4848),w=n(460),_=n(6648),b=n(3280),x=i("fetch"),S=i("Headers"),k=b("iterator"),T="URLSearchParams",E=T+"Iterator",I=l.set,C=l.getterFor(T),O=l.getterFor(E),N=/\+/g,L=Array(4),R=function(e){return L[e-1]||(L[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},A=function(e){try{return decodeURIComponent(e)}catch(t){return e}},P=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(R(n--),A);return t}},M=/[!'()~]|%20/g,U={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},W=function(e){return U[e]},j=function(e){return encodeURIComponent(e).replace(M,W)},B=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:P(r.shift()),value:P(r.join("="))}))},D=function(e){this.entries.length=0,B(this.entries,e)},G=function(e,t){if(e<t)throw TypeError("Not enough arguments")},q=u((function(e,t){I(this,{type:E,iterator:w(C(e).entries),kind:t})}),"Iterator",(function(){var e=O(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})),F=function(){d(this,F,T);var e,t,n,r,i,o,a,s,c,u=arguments.length>0?arguments[0]:void 0,l=[];if(I(this,{type:T,entries:l,updateURL:function(){},updateSearchParams:D}),void 0!==u)if(g(u))if("function"==typeof(e=_(u)))for(n=(t=e.call(u)).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");l.push({key:a.value+"",value:s.value+""})}else for(c in u)f(u,c)&&l.push({key:c,value:u[c]+""});else B(l,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},z=F.prototype;s(z,{append:function(e,t){G(arguments.length,2);var n=C(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){G(arguments.length,1);for(var t=C(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){G(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){G(arguments.length,1);for(var t=C(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){G(arguments.length,1);for(var t=C(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){G(arguments.length,1);for(var n,r=C(this),i=r.entries,o=!1,a=e+"",s=t+"",c=0;c<i.length;c++)(n=i[c]).key===a&&(o?i.splice(c--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=C(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=C(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(z,k,z.entries),a(z,"toString",(function(){for(var e,t=C(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(j(e.key)+"="+j(e.value));return n.join("&")}),{enumerable:!0}),c(F,T),r({global:!0,forced:!o},{URLSearchParams:F}),o||"function"!=typeof x||"function"!=typeof S||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)===T&&((r=t.headers?new S(t.headers):new S).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:F,getState:C}},6856:(e,t,n)=>{"use strict";n(4024);var r,i=n(2808),o=n(376),a=n(3172),s=n(4280),c=n(6800),u=n(7376),l=n(7852),d=n(3944),f=n(9584),p=n(7580),h=n(8540).codeAt,m=n(4248),g=n(3532),v=n(6552),y=n(8264),w=s.URL,_=v.URLSearchParams,b=v.getState,x=y.set,S=y.getterFor("URL"),k=Math.floor,T=Math.pow,E="Invalid scheme",I="Invalid host",C="Invalid port",O=/[A-Za-z]/,N=/[\d+-.A-Za-z]/,L=/\d/,R=/^(0x|0X)/,A=/^[0-7]+$/,P=/^\d+$/,M=/^[\dA-Fa-f]+$/,U=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,W=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,j=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,D=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return I;if(!(n=q(t.slice(1,-1))))return I;e.host=n}else if(X(e)){if(t=m(t),U.test(t))return I;if(null===(n=G(t)))return I;e.host=n}else{if(W.test(t))return I;for(n="",r=p(t),i=0;i<r.length;i++)n+=Y(r[i],z);e.host=n}},G=function(e){var t,n,r,i,o,a,s,c=e.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=R.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?P:8==o?A:M).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>=T(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*T(256,3-r);return s},q=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&M.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>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++}c[u]=256*c[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c},F=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},z={},V=f({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),K=f({},V,{"#":1,"?":1,"{":1,"}":1}),H=f({},K,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var n=h(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},Q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(e){return d(Q,e.scheme)},J=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},$=function(e,t){var n;return 2==e.length&&O.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&$(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&&$(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ce={},ue={},le={},de={},fe={},pe={},he={},me={},ge={},ve={},ye={},we={},_e={},be={},xe={},Se={},ke=function(e,t,n,i){var o,a,s,c,u,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(j,"")),t=t.replace(B,""),o=p(t);f<=o.length;){switch(a=o[f],l){case re:if(!a||!O.test(a)){if(n)return E;l=oe;continue}h+=a.toLowerCase(),l=ie;break;case ie:if(a&&(N.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return E;h="",l=oe,f=0;continue}if(n&&(X(e)!=d(Q,h)||"file"==h&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(X(e)&&Q[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?l=ge:X(e)&&i&&i.scheme==e.scheme?l=ae:X(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 E;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Se;break}l="file"==i.scheme?ge:ce;continue;case ae:if("/"!=a||"/"!=o[f+1]){l=ce;continue}l=de,f++;break;case se:if("/"==a){l=fe;break}l=_e;continue;case ce: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&&X(e))l=ue;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=Se}break;case ue:if(!X(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 _=Y(w,H);v?e.password+=_:e.username+=_}else v=!0}h=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(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&&X(e)){if(X(e)&&""==h)return I;if(n&&""==h&&(J(e)||null!==e.port))return;if(c=D(e,h))return c;if(h="",l=we,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),h+=a}else{if(""==h)return I;if(c=D(e,h))return c;if(h="",l=me,n==he)return}break;case me:if(!L.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&X(e)||n){if(""!=h){var b=parseInt(h,10);if(b>65535)return C;e.port=X(e)&&b===Q[e.scheme]?null:b,h=""}if(n)return;l=we;continue}return C}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=Se}}break;case ve:if("/"==a||"\\"==a){l=ye;break}i&&"file"==i.scheme&&!ee(o.slice(f).join(""))&&($(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&&$(h))l=_e;else if(""==h){if(e.host="",n)return;l=we}else{if(c=D(e,h))return c;if("localhost"==e.host&&(e.host=""),n)return;h="",l=we}continue}h+=a;break;case we:if(X(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=Se;else e.query="",l=xe;break;case _e:if(a==r||"/"==a||"\\"==a&&X(e)||!n&&("?"==a||"#"==a)){if(".."===(u=(u=h).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(te(e),"/"==a||"\\"==a&&X(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&X(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&$(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=Se)}else h+=Y(a,K);break;case be:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Se):a!=r&&(e.path[0]+=Y(a,z));break;case xe:n||"#"!=a?a!=r&&("'"==a&&X(e)?e.query+="%27":e.query+="#"==a?"%23":Y(a,z)):(e.fragment="",l=Se);break;case Se:a!=r&&(e.fragment+=Y(a,V))}f++}},Te=function(e){var t,n,r=l(this,Te,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Te)t=S(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var c=s.searchParams=new _,u=b(c);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(c)||null},o||(r.href=Ie.call(r),r.origin=Ce.call(r),r.protocol=Oe.call(r),r.username=Ne.call(r),r.password=Le.call(r),r.host=Re.call(r),r.hostname=Ae.call(r),r.port=Pe.call(r),r.pathname=Me.call(r),r.search=Ue.call(r),r.searchParams=We.call(r),r.hash=je.call(r))},Ee=Te.prototype,Ie=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",J(e)&&(u+=n+(r?":"+r:"")+"@"),u+=F(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},Ce=function(){var e=S(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&&X(e)?t+"://"+F(e.host)+(null!==n?":"+n:""):"null"},Oe=function(){return S(this).scheme+":"},Ne=function(){return S(this).username},Le=function(){return S(this).password},Re=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?F(t):F(t)+":"+n},Ae=function(){var e=S(this).host;return null===e?"":F(e)},Pe=function(){var e=S(this).port;return null===e?"":String(e)},Me=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=S(this).query;return e?"?"+e:""},We=function(){return S(this).searchParams},je=function(){var e=S(this).fragment;return e?"#"+e:""},Be=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&c(Ee,{href:Be(Ie,(function(e){var t=S(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);b(t.searchParams).updateSearchParams(t.query)})),origin:Be(Ce),protocol:Be(Oe,(function(e){var t=S(this);ke(t,String(e)+":",re)})),username:Be(Ne,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=Y(n[r],H)}})),password:Be(Le,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=Y(n[r],H)}})),host:Be(Re,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Be(Ae,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),he)})),port:Be(Pe,(function(e){var t=S(this);Z(t)||(""==(e=String(e))?t.port=null:ke(t,e,me))})),pathname:Be(Me,(function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",we))})),search:Be(Ue,(function(e){var t=S(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:Be(We),hash:Be(je,(function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Se)):t.fragment=null}))}),u(Ee,"toJSON",(function(){return Ie.call(this)}),{enumerable:!0}),u(Ee,"toString",(function(){return Ie.call(this)}),{enumerable:!0}),w){var De=w.createObjectURL,Ge=w.revokeObjectURL;De&&u(Te,"createObjectURL",(function(e){return De.apply(w,arguments)})),Ge&&u(Te,"revokeObjectURL",(function(e){return Ge.apply(w,arguments)}))}g(Te,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Te})},512: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=t,r="function"==typeof atob,i="function"==typeof btoa,o="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,s="function"==typeof TextEncoder?new TextEncoder:void 0,c=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(e={},c.forEach((function(t,n){return e[t]=n})),e),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,d=String.fromCharCode.bind(String),f="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))},p=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},h=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(e){for(var t,n,r,i,o="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=c[(t=n<<16|r<<8|i)>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},g=i?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:m,v=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(d.apply(null,e.subarray(n,n+4096)));return g(t.join(""))},y=function(e,t){return void 0===t&&(t=!1),t?p(v(e)):v(e)},w=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(e){return e.replace(_,w)},x=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:s?function(e){return v(s.encode(e))}:function(e){return g(b(e))},S=function(e,t){return void 0===t&&(t=!1),t?p(x(e)):x(e)},k=function(e){return S(e,!0)},T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=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 d(55296+(t>>>10))+d(56320+(1023&t));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=function(e){return e.replace(T,E)},C=function(e){if(e=e.replace(/\s+/g,""),!l.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?d(t>>16&255):64===r?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,255&t);return i},O=r?function(e){return atob(h(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:C,N=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(O(e),(function(e){return e.charCodeAt(0)}))},L=function(e){return N(A(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(N(e))}:function(e){return I(O(e))},A=function(e){return h(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},P=function(e){return R(A(e))},M=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},U=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,M(t))};e("fromBase64",(function(){return P(this)})),e("toBase64",(function(e){return S(this,e)})),e("toBase64URI",(function(){return S(this,!0)})),e("toBase64URL",(function(){return S(this,!0)})),e("toUint8Array",(function(){return L(this)}))},W=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,M(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},j={version:t,VERSION:n,atob:O,atobPolyfill:C,btoa:g,btoaPolyfill:m,fromBase64:P,toBase64:S,encode:S,encodeURI:k,encodeURL:k,utob:b,btou:I,decode:P,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:y,toUint8Array:L,extendString:U,extendUint8Array:W,extendBuiltins:function(){U(),W()},Base64:{}};return Object.keys(j).forEach((function(e){return j.Base64[e]=j[e]})),j}()},6148: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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=r.slice(-2),u=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&c>=11&&c<=19?"zero":1==a&&11!=s||2==i&&1==u&&11!=c||2!=i&&1==u?"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),c=i.slice(-1),u=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==c&&11!=u?"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),c=r.slice(-2),u=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&c>=11&&c<=19?"zero":1==a&&11!=s||2==i&&1==u&&11!=c||2!=i&&1==u?"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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=i.slice(-1),u=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==c&&11!=u?"one":o&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(u<12||u>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),c=r.slice(-1),u=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==c&&11!=u?"one":i&&c>=2&&c<=4&&(u<12||u>14)?"few":i&&0==c||i&&c>=5&&c<=9||i&&u>=11&&u<=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:$e},a=$e,s="#",c=He("#",!1),u=function(){return dt[0]},l=function(){return{type:"octothorpe"}},d=function(e){return e.join("")},f="{",p=He("{",!1),h="}",m=He("}",!1),g=function(e){return{type:"argument",arg:e}},v=",",y=He(",",!1),w="select",_=He("select",!1),b=function(e,n){return t.strict&&dt.unshift(!1),n},x=function(e,n){return t.strict&&dt.shift(),{type:"select",arg:e,cases:n}},S="plural",k=He("plural",!1),T="selectordinal",E=He("selectordinal",!1),I=function(e,t){return dt.unshift(!0),t},C=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`.")})),dt.shift(),{type:n,arg:e,offset:r||0,cases:i}},O=function(e,t,n){return{type:"function",arg:e,key:t,param:n}},N=Qe("identifier"),L=/^[^\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]/,R=Ye([["\t","\r"]," ","…","‎","‏","\u2028","\u2029",["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!0,!1),A=function(e,t){return{key:e,tokens:t}},P=function(e){return e},M=Qe("plural offset"),U="offset",W=He("offset",!1),j=":",B=He(":",!1),D=function(e){return e},G="=",q=He("=",!1),F="number",z=He("number",!1),V="date",K=He("date",!1),H="time",Y=He("time",!1),Q="spellout",X=He("spellout",!1),J="ordinal",Z=He("ordinal",!1),$="duration",ee=He("duration",!1),te=function(e){if(t.strict||/^\d/.test(e))return!1;switch(e.toLowerCase()){case"select":case"plural":case"selectordinal":return!1;default:return!0}},ne=function(e){return e},re=function(e){return!t.strict},ie=function(e){return{tokens:e}},oe=function(e){return{tokens:[e.join("")]}},ae=Qe("a valid (strict) function parameter"),se=/^[^'{}]/,ce=Ye(["'","{","}"],!0,!1),ue=function(e){return e.join("")},le="'",de=He("'",!1),fe=function(e){return e},pe=function(e){return"{"+e.join("")+"}"},he=Qe("doubled apostrophe"),me="''",ge=He("''",!1),ve=function(){return"'"},ye=/^[^']/,we=Ye(["'"],!0,!1),_e="'{",be=He("'{",!1),xe=function(e){return"{"+e.join("")},Se="'}",ke=He("'}",!1),Te=function(e){return"}"+e.join("")},Ee=Qe("escaped string"),Ie="'#",Ce=He("'#",!1),Oe=function(e){return"#"+e.join("")},Ne=function(e){return e[0]},Le=Qe("plain char"),Re=/^[^{}#\0-\x08\x0E-\x1F\x7F]/,Ae=Ye(["{","}","#",["\0","\b"],["",""],""],!0,!1),Pe=function(e){return!dt[0]},Me=function(e){return e},Ue=Qe("integer"),We=/^[0-9]/,je=Ye([["0","9"]],!1,!1),Be=Qe("white space"),De=/^[\t-\r \x85\u200E\u200F\u2028\u2029]/,Ge=Ye([["\t","\r"]," ","…","‎","‏","\u2028","\u2029"],!1,!1),qe=0,Fe=[{line:1,column:1}],ze=0,Ve=[],Ke=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 He(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ye(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function Qe(e){return{type:"other",description:e}}function Xe(t){var n,r=Fe[t];if(r)return r;for(n=t-1;!Fe[n];)n--;for(r={line:(r=Fe[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Fe[t]=r,r}function Je(e,t){var n=Xe(e),r=Xe(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function Ze(e){qe<ze||(qe>ze&&(ze=qe,Ve=[]),Ve.push(e))}function $e(){var e,t;for(e=[],t=et();t!==i;)e.push(t),t=et();return e}function et(){var t,n,r;if((t=function(){var t,n,r,o;return t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i&&lt()!==i&&(r=tt())!==i&&lt()!==i?(125===e.charCodeAt(qe)?(o=h,qe++):(o=i,0===Ke&&Ze(m)),o!==i?t=n=g(r):(qe=t,t=i)):(qe=t,t=i),t}())===i&&(t=function(){var t,n,r,o,a,s,c,u,l;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(lt()!==i)if((r=tt())!==i)if(lt()!==i)if(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i)if(lt()!==i)if(e.substr(qe,6)===w?(a=w,qe+=6):(a=i,0===Ke&&Ze(_)),a!==i&&(a=b(r,a)),a!==i)if((a=lt())!==i)if(44===e.charCodeAt(qe)?(s=v,qe++):(s=i,0===Ke&&Ze(y)),s!==i)if(lt()!==i){if(c=[],(u=nt())!==i)for(;u!==i;)c.push(u),u=nt();else c=i;c!==i&&(u=lt())!==i?(125===e.charCodeAt(qe)?(l=h,qe++):(l=i,0===Ke&&Ze(m)),l!==i?t=n=x(r,c):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,c,u,l,d,g;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(lt()!==i)if((r=tt())!==i)if(lt()!==i)if(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i)if(lt()!==i)if(qe,e.substr(qe,6)===S?(s=S,qe+=6):(s=i,0===Ke&&Ze(k)),s===i&&(e.substr(qe,13)===T?(s=T,qe+=13):(s=i,0===Ke&&Ze(E))),s!==i&&(s=I(r,s)),(a=s)!==i)if((s=lt())!==i)if(44===e.charCodeAt(qe)?(c=v,qe++):(c=i,0===Ke&&Ze(y)),c!==i)if(lt()!==i)if((u=function(){var t,n,r,o;return Ke++,t=qe,lt()!==i?(e.substr(qe,6)===U?(n=U,qe+=6):(n=i,0===Ke&&Ze(W)),n!==i&&lt()!==i?(58===e.charCodeAt(qe)?(r=j,qe++):(r=i,0===Ke&&Ze(B)),r!==i&&lt()!==i&&(o=ut())!==i&&lt()!==i?t=D(o):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i),Ke--,t===i&&0===Ke&&Ze(M),t}())===i&&(u=null),u!==i){if(l=[],(d=rt())!==i)for(;d!==i;)l.push(d),d=rt();else l=i;l!==i&&(d=lt())!==i?(125===e.charCodeAt(qe)?(g=h,qe++):(g=i,0===Ke&&Ze(m)),g!==i?t=n=C(r,a,u,l):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;else qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,c;return t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i&&lt()!==i&&(r=tt())!==i&&lt()!==i?(44===e.charCodeAt(qe)?(o=v,qe++):(o=i,0===Ke&&Ze(y)),o!==i&&lt()!==i&&(a=function(){var t,n,r,o,a;return e.substr(qe,6)===F?(t=F,qe+=6):(t=i,0===Ke&&Ze(z)),t===i&&(e.substr(qe,4)===V?(t=V,qe+=4):(t=i,0===Ke&&Ze(K)),t===i&&(e.substr(qe,4)===H?(t=H,qe+=4):(t=i,0===Ke&&Ze(Y)),t===i&&(e.substr(qe,8)===Q?(t=Q,qe+=8):(t=i,0===Ke&&Ze(X)),t===i&&(e.substr(qe,7)===J?(t=J,qe+=7):(t=i,0===Ke&&Ze(Z)),t===i&&(e.substr(qe,8)===$?(t=$,qe+=8):(t=i,0===Ke&&Ze(ee)),t===i&&(t=qe,n=qe,Ke++,e.substr(qe,6)===w?(r=w,qe+=6):(r=i,0===Ke&&Ze(_)),Ke--,r===i?n=void 0:(qe=n,n=i),n!==i?(r=qe,Ke++,e.substr(qe,6)===S?(o=S,qe+=6):(o=i,0===Ke&&Ze(k)),Ke--,o===i?r=void 0:(qe=r,r=i),r!==i?(o=qe,Ke++,e.substr(qe,13)===T?(a=T,qe+=13):(a=i,0===Ke&&Ze(E)),Ke--,a===i?o=void 0:(qe=o,o=i),o!==i&&(a=tt())!==i&&(te(a)?void 0:i)!==i?t=n=ne(a):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i))))))),t}())!==i&&lt()!==i?((s=function(){var t,n,r,o;if(t=qe,lt()!==i)if(44===e.charCodeAt(qe)?(n=v,qe++):(n=i,0===Ke&&Ze(y)),n!==i){for(r=[],o=et();o!==i;)r.push(o),o=et();r!==i&&(o=(o=re(r))?void 0:i)!==i?t=ie(r):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;if(t===i)if(t=qe,lt()!==i)if(44===e.charCodeAt(qe)?(n=v,qe++):(n=i,0===Ke&&Ze(y)),n!==i){for(r=[],o=ot();o!==i;)r.push(o),o=ot();r!==i?t=oe(r):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;return t}())===i&&(s=null),s!==i?(125===e.charCodeAt(qe)?(c=h,qe++):(c=i,0===Ke&&Ze(m)),c!==i?t=n=O(r,a,s):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i)):(qe=t,t=i),t}())===i&&(t=qe,35===e.charCodeAt(qe)?(n=s,qe++):(n=i,0===Ke&&Ze(c)),n!==i&&(r=(r=u())?void 0:i)!==i?t=n=l():(qe=t,t=i),t===i)){if(t=qe,n=[],(r=ct())!==i)for(;r!==i;)n.push(r),r=ct();else n=i;n!==i&&(n=d(n)),t=n}return t}function tt(){var t,n,r;if(Ke++,t=qe,n=[],L.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(R)),r!==i)for(;r!==i;)n.push(r),L.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(R));else n=i;return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(N)),t}function nt(){var e,t,n;return e=qe,lt()!==i&&(t=tt())!==i&&lt()!==i&&(n=it())!==i?e=A(t,n):(qe=e,e=i),e}function rt(){var t,n,r;return t=qe,lt()!==i&&(n=function(){var t,n,r;return(t=tt())===i&&(t=qe,61===e.charCodeAt(qe)?(n=G,qe++):(n=i,0===Ke&&Ze(q)),n!==i&&(r=ut())!==i?t=n=D(r):(qe=t,t=i)),t}())!==i&&lt()!==i&&(r=it())!==i?t=A(n,r):(qe=t,t=i),t}function it(){var t,n,r,o,a,s;if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i)if(r=qe,(o=lt())!==i?(a=qe,Ke++,123===e.charCodeAt(qe)?(s=f,qe++):(s=i,0===Ke&&Ze(p)),Ke--,s!==i?(qe=a,a=void 0):a=i,a!==i?r=o=[o,a]:(qe=r,r=i)):(qe=r,r=i),r===i&&(r=null),r!==i){for(o=[],a=et();a!==i;)o.push(a),a=et();o!==i&&(a=lt())!==i?(125===e.charCodeAt(qe)?(s=h,qe++):(s=i,0===Ke&&Ze(m)),s!==i?t=n=P(o):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;else qe=t,t=i;return t}function ot(){var t,n,r,o;if(Ke++,t=qe,n=[],se.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(ce)),r!==i)for(;r!==i;)n.push(r),se.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(ce));else n=i;if(n!==i&&(n=ue(n)),(t=n)===i&&(t=at())===i&&(t=qe,39===e.charCodeAt(qe)?(n=le,qe++):(n=i,0===Ke&&Ze(de)),n!==i&&(r=st())!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=fe(r):(qe=t,t=i)):(qe=t,t=i),t===i))if(t=qe,123===e.charCodeAt(qe)?(n=f,qe++):(n=i,0===Ke&&Ze(p)),n!==i){for(r=[],o=ot();o!==i;)r.push(o),o=ot();r!==i?(125===e.charCodeAt(qe)?(o=h,qe++):(o=i,0===Ke&&Ze(m)),o!==i?t=n=pe(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;return Ke--,t===i&&(n=i,0===Ke&&Ze(ae)),t}function at(){var t,n;return Ke++,qe,e.substr(qe,2)===me?(n=me,qe+=2):(n=i,0===Ke&&Ze(ge)),n!==i&&(n=ve()),Ke--,(t=n)===i&&(n=i,0===Ke&&Ze(he)),t}function st(){var t,n,r;if((t=at())===i){if(t=qe,n=[],ye.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(we)),r!==i)for(;r!==i;)n.push(r),ye.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(we));else n=i;n!==i&&(n=d(n)),t=n}return t}function ct(){var t,n;return(t=at())===i&&(t=function(){var t,n,r,o,a,s;if(Ke++,(t=function(){var t,n,r,o;if(t=qe,e.substr(qe,2)===_e?(n=_e,qe+=2):(n=i,0===Ke&&Ze(be)),n!==i){for(r=[],o=st();o!==i;)r.push(o),o=st();r!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=xe(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;if(t===i)if(t=qe,e.substr(qe,2)===Se?(n=Se,qe+=2):(n=i,0===Ke&&Ze(ke)),n!==i){for(r=[],o=st();o!==i;)r.push(o),o=st();r!==i?(39===e.charCodeAt(qe)?(o=le,qe++):(o=i,0===Ke&&Ze(de)),o!==i?t=n=Te(r):(qe=t,t=i)):(qe=t,t=i)}else qe=t,t=i;return t}())===i){if(t=qe,n=qe,r=qe,e.substr(qe,2)===Ie?(o=Ie,qe+=2):(o=i,0===Ke&&Ze(Ce)),o!==i){for(a=[],s=st();s!==i;)a.push(s),s=st();a!==i?(39===e.charCodeAt(qe)?(s=le,qe++):(s=i,0===Ke&&Ze(de)),s!==i?r=o=Oe(a):(qe=r,r=i)):(qe=r,r=i)}else qe=r,r=i;r!==i&&(o=(o=u())?void 0:i)!==i?n=r=[r,o]:(qe=n,n=i),n!==i&&(n=Ne(n)),(t=n)===i&&(39===e.charCodeAt(qe)?(t=le,qe++):(t=i,0===Ke&&Ze(de)))}return Ke--,t===i&&(n=i,0===Ke&&Ze(Ee)),t}())===i&&(t=qe,35===e.charCodeAt(qe)?(n=s,qe++):(n=i,0===Ke&&Ze(c)),n!==i&&(Pe(n)?void 0:i)!==i?t=n=Me(n):(qe=t,t=i),t===i&&(t=function(){var t;return Ke++,Re.test(e.charAt(qe))?(t=e.charAt(qe),qe++):(t=i,0===Ke&&Ze(Ae)),Ke--,t===i&&0===Ke&&Ze(Le),t}())),t}function ut(){var t,n,r;if(Ke++,t=qe,n=[],We.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(je)),r!==i)for(;r!==i;)n.push(r),We.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(je));else n=i;return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(Ue)),t}function lt(){var t,n,r;for(Ke++,t=qe,n=[],De.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(Ge));r!==i;)n.push(r),De.test(e.charAt(qe))?(r=e.charAt(qe),qe++):(r=i,0===Ke&&Ze(Ge));return t=n!==i?e.substring(t,qe):n,Ke--,t===i&&(n=i,0===Ke&&Ze(Be)),t}var dt=[!1];if((n=a())!==i&&qe===e.length)return n;throw n!==i&&qe<e.length&&Ze({type:"end"}),function(e,t,n){return new r(r.buildMessage(e,t),e,t,n)}(Ve,ze<e.length?e.charAt(ze):null,ze<e.length?Je(ze,ze+1):Je(ze,ze))}}},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 c(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 u(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 c in e){var u=n.hasOwnProperty(c)?c:t;s[c]=this.compile(e[c],u,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 c(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=[c(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,u(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,u(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=c(e.key,"fmt"),this.formatters[e.key]=!0;break;case"octothorpe":if(!t)return'"#"';n="number",d=[c(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[u(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(c(a),": ").concat(s))}if(0===n)return o.join("");if(0===o.length)return"{}";for(var u=" ";--n;)u+=" ";var l=o.join(",\n").replace(/^/gm,u);return"{\n".concat(l,"\n}")}(n,0)}}])&&b(t.prototype,n),e}();function S(e){return(S="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 T(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 E}));var E=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 T(e,null,[{key:"escape",value:function(e,t){var n=t?/[#{}]/g:/[{}]/g;return String(e).replace(n,"'$&'")}}]),T(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"!=S(e)){var f=new Function("number, plural, select, fmt",u(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"!=S(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(c(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 { "+c(e,"root")+" = G; }","})(this, "+g+");"].join("\n"):m+"export default "+g},_}}]),e}();E.defaultLocale="en",E.formatters=i.a}]).default},3548:(e,t,n)=>{"use strict";var r={};(0,n(12).assign)(r,n(3400),n(7888),n(944)),e.exports=r},3400:(e,t,n)=>{"use strict";var r=n(9379),i=n(12),o=n(3352),a=n(9451),s=n(6092),c=Object.prototype.toString,u=0,l=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:l,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,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(n!==u)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,h))!==u)throw new Error(a[n]);this._dict_set=!0}}function h(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(e,t){var n,a,s=this.strm,l=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]"===c.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(l),s.next_out=0,s.avail_out=l),1!==(n=r.deflate(s,a))&&n!==u)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,n===u):2!==a||(this.onEnd(u),s.avail_out=0,!0)},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===u&&("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=p,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},7888:(e,t,n)=>{"use strict";var r=n(7040),i=n(12),o=n(3352),a=n(944),s=n(9451),c=n(6092),u=n(1112),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 c,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 u,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,c,u,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?(c=o.utf8border(p.output,p.next_out),u=p.next_out-c,d=o.buf2string(p.output,c),p.next_out=u,p.avail_out=h-u,u&&i.arraySet(p.output,p.output,c,u,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},12:(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)},3352:(e,t,n)=>{"use strict";var r=n(12),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 c(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,c=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++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,o=0;a<c;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 c(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,u=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)u[r++]=i;else if((o=a[i])>4)u[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?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return c(u,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}},2696: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}},944: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}},9456: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}},9379:(e,t,n)=>{"use strict";var r,i=n(12),o=n(2976),a=n(2696),s=n(9456),c=n(9451),u=0,l=0,d=-2,f=2,p=8,h=286,m=30,g=19,v=2*h+1,y=15,w=3,_=258,b=_+w+1,x=42,S=103,k=113,T=666;function E(e,t){return e.msg=c[t],t}function I(e){return(e<<1)-(e>4?9:0)}function C(e){for(var t=e.length;--t>=0;)e[t]=0}function O(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 N(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,O(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function A(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-b?e.strstart-(e.w_size-b):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+_,p=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===h&&u[n+a-1]===p&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<f);if(r=_-(f-o),o=f-_,r>a){if(e.match_start=t,a=r,r>=s)break;p=u[o+a-1],h=u[o+a]}}}while((t=d[t&l])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead}function P(e){var t,n,r,o,c,u,l,d,f,p,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-b)){i.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=h?r-h:0}while(--n);t=n=h;do{r=e.prev[--t],e.prev[t]=r>=h?r-h:0}while(--n);o+=h}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.lookahead,f=o,p=void 0,(p=u.avail_in)>f&&(p=f),n=0===p?0:(u.avail_in-=p,i.arraySet(l,u.input,u.next_in,p,d),1===u.state.wrap?u.adler=a(u.adler,l,p,d):2===u.state.wrap&&(u.adler=s(u.adler,l,p,d)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=w)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+w-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<w)););}while(e.lookahead<b&&0!==e.strm.avail_in)}function M(e,t){for(var n,r;;){if(e.lookahead<b){if(P(e),e.lookahead<b&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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-b&&(e.match_length=A(e,n)),e.match_length>=w)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-w),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=w){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<w-1?e.strstart:w-1,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}function U(e,t){for(var n,r,i;;){if(e.lookahead<b){if(P(e),e.lookahead<b&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=w&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+w-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=w-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-b&&(e.match_length=A(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===w&&e.strstart-e.match_start>4096)&&(e.match_length=w-1)),e.prev_length>=w&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-w,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-w),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+w-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=w-1,e.strstart++,r&&(N(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]))&&N(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<w-1?e.strstart:w-1,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}function W(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 j(){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=p,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(2*v),this.dyn_dtree=new i.Buf16(2*(2*m+1)),this.bl_tree=new i.Buf16(2*(2*g+1)),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(y+1),this.heap=new i.Buf16(2*h+1),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*h+1),C(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 B(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?x:k,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),l):E(e,d)}function D(e){var t,n=B(e);return n===l&&((t=e.state).window_size=2*t.w_size,C(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=w-1,t.match_available=0,t.ins_h=0),n}function G(e,t,n,r,o,a){if(!e)return d;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||n!==p||r<8||r>15||t<0||t>9||a<0||a>4)return E(e,d);8===r&&(r=9);var c=new j;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+w-1)/w),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,D(e)}r=[new W(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(P(e),0===e.lookahead&&t===u)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,N(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-b&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),1)})),new W(4,4,8,4,M),new W(4,5,16,8,M),new W(4,6,32,32,M),new W(4,4,16,16,U),new W(8,16,32,32,U),new W(8,16,128,128,U),new W(8,32,128,256,U),new W(32,128,258,1024,U),new W(32,258,258,4096,U)],t.deflateInit=function(e,t){return G(e,t,p,15,8,0)},t.deflateInit2=G,t.deflateReset=D,t.deflateResetKeep=B,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},t.deflate=function(e,t){var n,i,a,c;if(!e||!e.state||t>5||t<0)return e?E(e,d):d;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===T&&4!==t)return E(e,0===e.avail_out?-5:d);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===x)if(2===i.wrap)e.adler=0,L(i,31),L(i,139),L(i,8),i.gzhead?(L(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)),L(i,255&i.gzhead.time),L(i,i.gzhead.time>>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(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):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),L(i,3),i.status=k);else{var f=p+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=k,R(i,f),0!==i.strstart&&(R(i,e.adler>>>16),R(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)),O(e),a=i.pending,i.pending!==i.pending_buf_size));)L(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)),O(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,L(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(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)),O(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,L(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.status=S)}else i.status=S;if(i.status===S&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&O(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=k)):i.status=k),0!==i.pending){if(O(e),0===e.avail_out)return i.last_flush=-1,l}else if(0===e.avail_in&&I(t)<=I(n)&&4!==t)return E(e,-5);if(i.status===T&&0!==e.avail_in)return E(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==T){var h=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(P(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(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<=_){if(P(e),e.lookahead<=_&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=w&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+_;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=_-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=w?(n=o._tr_tally(e,1,e.match_length-w),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&&(N(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(N(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==h&&4!==h||(i.status=T),1===h||3===h)return 0===e.avail_out&&(i.last_flush=-1),l;if(2===h&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(C(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),O(e),0===e.avail_out))return i.last_flush=-1,l}return 4!==t?l:i.wrap<=0?1:(2===i.wrap?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),O(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==x&&69!==t&&73!==t&&91!==t&&t!==S&&t!==k&&t!==T?E(e,d):(e.state=null,t===k?E(e,-3):l):d},t.deflateSetDictionary=function(e,t){var n,r,o,s,c,u,f,p,h=t.length;if(!e||!e.state)return d;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==x||n.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(C(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,h-n.w_size,n.w_size,0),t=p,h=n.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=h,e.next_in=0,e.input=t,P(n);n.lookahead>=w;){r=n.strstart,o=n.lookahead-(w-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+w-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=w-1,P(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=w-1,n.match_available=0,e.next_in=u,e.input=f,e.avail_in=c,n.wrap=s,l},t.deflateInfo="pako deflate (from Nodeca project)"},1112: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}},6560:e=>{"use strict";e.exports=function(e,t){var n,r,i,o,a,s,c,u,l,d,f,p,h,m,g,v,y,w,_,b,x,S,k,T,E;n=e.state,r=e.next_in,T=e.input,i=r+(e.avail_in-5),o=e.next_out,E=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=n.dmax,u=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+=T[r++]<<h,h+=8,p+=T[r++]<<h,h+=8),w=m[p&v];t:for(;;){if(p>>>=_=w>>>24,h-=_,0==(_=w>>>16&255))E[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+=T[r++]<<h,h+=8),b+=p&(1<<_)-1,p>>>=_,h-=_),h<15&&(p+=T[r++]<<h,h+=8,p+=T[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+=T[r++]<<h,(h+=8)<_&&(p+=T[r++]<<h,h+=8)),(x+=p&(1<<_)-1)>c){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(S=0,k=f,0===d){if(S+=u-_,_<b){b-=_;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}}else if(d<_){if(S+=u+d-_,(_-=d)<b){b-=_;do{E[o++]=f[S++]}while(--_);if(S=0,d<b){b-=_=d;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}}}else if(S+=d-_,_<b){b-=_;do{E[o++]=f[S++]}while(--_);S=o-x,k=E}for(;b>2;)E[o++]=k[S++],E[o++]=k[S++],E[o++]=k[S++],b-=3;b&&(E[o++]=k[S++],b>1&&(E[o++]=k[S++]))}else{S=o-x;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],b-=3}while(b>2);b&&(E[o++]=E[S++],b>1&&(E[o++]=E[S++]))}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}},7040:(e,t,n)=>{"use strict";var r=n(12),i=n(2696),o=n(9456),a=n(6560),s=n(6120),c=0,u=-2,l=1,d=12,f=30,p=852,h=592;function m(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){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 v(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=l,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(p),t.distcode=t.distdyn=new r.Buf32(h),t.sane=1,t.back=-1,c):u}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):u}function w(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,y(e))):u}function _(e,t){var n,r;return e?(r=new g,e.state=r,r.window=null,(n=w(e,t))!==c&&(e.state=null),n):u}var b,x,S=!0;function k(e){if(S){var t;for(b=new r.Buf32(512),x=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,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,x,0,e.work,{bits:5}),S=!1}e.lencode=b,e.lenbits=9,e.distcode=x,e.distbits=5}function T(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=y,t.inflateReset2=w,t.inflateResetKeep=v,t.inflateInit=function(e){return _(e,15)},t.inflateInit2=_,t.inflate=function(e,t){var n,p,h,g,v,y,w,_,b,x,S,E,I,C,O,N,L,R,A,P,M,U,W,j,B=0,D=new r.Buf8(4),G=[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===d&&(n.mode=13),v=e.next_out,h=e.output,w=e.avail_out,g=e.next_in,p=e.input,y=e.avail_in,_=n.hold,b=n.bits,x=y,S=w,U=c;e:for(;;)switch(n.mode){case l:if(0===n.wrap){n.mode=13;break}for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(2&n.wrap&&35615===_){n.check=0,D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0),_=0,b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",n.mode=f;break}if(8!=(15&_)){e.msg="unknown compression method",n.mode=f;break}if(b-=4,M=8+(15&(_>>>=4)),0===n.wbits)n.wbits=M;else if(M>n.wbits){e.msg="invalid window size",n.mode=f;break}n.dmax=1<<M,e.adler=n.check=1,n.mode=512&_?10:d,_=0,b=0;break;case 2:for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(n.flags=_,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=f;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=f;break}n.head&&(n.head.text=_>>8&1),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0,n.mode=3;case 3:for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.head&&(n.head.time=_),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,D[2]=_>>>16&255,D[3]=_>>>24&255,n.check=o(n.check,D,4,0)),_=0,b=0,n.mode=4;case 4:for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.head&&(n.head.xflags=255&_,n.head.os=_>>8),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.length=_,n.head&&(n.head.extra_len=_),512&n.flags&&(D[0]=255&_,D[1]=_>>>8&255,n.check=o(n.check,D,2,0)),_=0,b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((E=n.length)>y&&(E=y),E&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,M)),512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;E=0;do{M=p[g+E++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M))}while(M&&E<y);if(512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,M)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break e;E=0;do{M=p[g+E++],n.head&&M&&n.length<65536&&(n.head.comment+=String.fromCharCode(M))}while(M&&E<y);if(512&n.flags&&(n.check=o(n.check,p,E,g)),y-=E,g+=E,M)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;b<16;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_!==(65535&n.check)){e.msg="header crc mismatch",n.mode=f;break}_=0,b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=d;break;case 10:for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}e.adler=n.check=m(_),_=0,b=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,2;e.adler=n.check=1,n.mode=d;case d:if(5===t||6===t)break e;case 13:if(n.last){_>>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}switch(n.last=1&_,b-=1,3&(_>>>=1)){case 0:n.mode=14;break;case 1:if(k(n),n.mode=20,6===t){_>>>=2,b-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=f}_>>>=2,b-=2;break;case 14:for(_>>>=7&b,b-=7&b;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",n.mode=f;break}if(n.length=65535&_,_=0,b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(E=n.length){if(E>y&&(E=y),E>w&&(E=w),0===E)break e;r.arraySet(h,p,g,E,v),y-=E,g+=E,w-=E,v+=E,n.length-=E;break}n.mode=d;break;case 17:for(;b<14;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(n.nlen=257+(31&_),_>>>=5,b-=5,n.ndist=1+(31&_),_>>>=5,b-=5,n.ncode=4+(15&_),_>>>=4,b-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=f;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;b<3;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.lens[G[n.have++]]=7&_,_>>>=3,b-=3}for(;n.have<19;)n.lens[G[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,W={bits:n.lenbits},U=s(0,n.lens,0,19,n.lencode,0,n.work,W),n.lenbits=W.bits,U){e.msg="invalid code lengths set",n.mode=f;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;N=(B=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(L<16)_>>>=O,b-=O,n.lens[n.have++]=L;else{if(16===L){for(j=O+2;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_>>>=O,b-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=f;break}M=n.lens[n.have-1],E=3+(3&_),_>>>=2,b-=2}else if(17===L){for(j=O+3;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}b-=O,M=0,E=3+(7&(_>>>=O)),_>>>=3,b-=3}else{for(j=O+7;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}b-=O,M=0,E=11+(127&(_>>>=O)),_>>>=7,b-=7}if(n.have+E>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=f;break}for(;E--;)n.lens[n.have++]=M}}if(n.mode===f)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=f;break}if(n.lenbits=9,W={bits:n.lenbits},U=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,W),n.lenbits=W.bits,U){e.msg="invalid literal/lengths set",n.mode=f;break}if(n.distbits=6,n.distcode=n.distdyn,W={bits:n.distbits},U=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,W),n.distbits=W.bits,U){e.msg="invalid distances set",n.mode=f;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(y>=6&&w>=258){e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,a(e,S),v=e.next_out,h=e.output,w=e.avail_out,g=e.next_in,p=e.input,y=e.avail_in,_=n.hold,b=n.bits,n.mode===d&&(n.back=-1);break}for(n.back=0;N=(B=n.lencode[_&(1<<n.lenbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(N&&0==(240&N)){for(R=O,A=N,P=L;N=(B=n.lencode[P+((_&(1<<R+A)-1)>>R)])>>>16&255,L=65535&B,!(R+(O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}_>>>=R,b-=R,n.back+=R}if(_>>>=O,b-=O,n.back+=O,n.length=L,0===N){n.mode=26;break}if(32&N){n.back=-1,n.mode=d;break}if(64&N){e.msg="invalid literal/length code",n.mode=f;break}n.extra=15&N,n.mode=22;case 22:if(n.extra){for(j=n.extra;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.length+=_&(1<<n.extra)-1,_>>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;N=(B=n.distcode[_&(1<<n.distbits)-1])>>>16&255,L=65535&B,!((O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(0==(240&N)){for(R=O,A=N,P=L;N=(B=n.distcode[P+((_&(1<<R+A)-1)>>R)])>>>16&255,L=65535&B,!(R+(O=B>>>24)<=b);){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}_>>>=R,b-=R,n.back+=R}if(_>>>=O,b-=O,n.back+=O,64&N){e.msg="invalid distance code",n.mode=f;break}n.offset=L,n.extra=15&N,n.mode=24;case 24:if(n.extra){for(j=n.extra;b<j;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}n.offset+=_&(1<<n.extra)-1,_>>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=f;break}n.mode=25;case 25:if(0===w)break e;if(E=S-w,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=f;break}E>n.wnext?(E-=n.wnext,I=n.wsize-E):I=n.wnext-E,E>n.length&&(E=n.length),C=n.window}else C=h,I=v-n.offset,E=n.length;E>w&&(E=w),w-=E,n.length-=E;do{h[v++]=C[I++]}while(--E);0===n.length&&(n.mode=21);break;case 26:if(0===w)break e;h[v++]=n.length,w--,n.mode=21;break;case 27:if(n.wrap){for(;b<32;){if(0===y)break e;y--,_|=p[g++]<<b,b+=8}if(S-=w,e.total_out+=S,n.total+=S,S&&(e.adler=n.check=n.flags?o(n.check,h,S,v-S):i(n.check,h,S,v-S)),S=w,(n.flags?_:m(_))!==n.check){e.msg="incorrect data check",n.mode=f;break}_=0,b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;b<32;){if(0===y)break e;y--,_+=p[g++]<<b,b+=8}if(_!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=f;break}_=0,b=0}n.mode=29;case 29:U=1;break e;case f:U=-3;break e;case 31:return-4;default:return u}return e.next_out=v,e.avail_out=w,e.next_in=g,e.avail_in=y,n.hold=_,n.bits=b,(n.wsize||S!==e.avail_out&&n.mode<f&&(n.mode<27||4!==t))&&T(e,e.output,e.next_out,S-e.avail_out)?(n.mode=31,-4):(x-=e.avail_in,S-=e.avail_out,e.total_in+=x,e.total_out+=S,n.total+=S,n.wrap&&S&&(e.adler=n.check=n.flags?o(n.check,h,S,e.next_out-S):i(n.check,h,S,e.next_out-S)),e.data_type=n.bits+(n.last?64:0)+(n.mode===d?128:0)+(20===n.mode||15===n.mode?256:0),(0===x&&0===S||4===t)&&U===c&&(U=-5),U)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,c):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:T(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,c):u},t.inflateInfo="pako inflate (from Nodeca project)"},6120:(e,t,n)=>{"use strict";var r=n(12),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,c,u,l,d,f){var p,h,m,g,v,y,w,_,b,x=f.bits,S=0,k=0,T=0,E=0,I=0,C=0,O=0,N=0,L=0,R=0,A=null,P=0,M=new r.Buf16(16),U=new r.Buf16(16),W=null,j=0;for(S=0;S<=15;S++)M[S]=0;for(k=0;k<c;k++)M[t[n+k]]++;for(I=x,E=15;E>=1&&0===M[E];E--);if(I>E&&(I=E),0===E)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(T=1;T<E&&0===M[T];T++);for(I<T&&(I=T),N=1,S=1;S<=15;S++)if(N<<=1,(N-=M[S])<0)return-1;if(N>0&&(0===e||1!==E))return-1;for(U[1]=0,S=1;S<15;S++)U[S+1]=U[S]+M[S];for(k=0;k<c;k++)0!==t[n+k]&&(d[U[t[n+k]]++]=k);if(0===e?(A=W=d,y=19):1===e?(A=i,P-=257,W=o,j-=257,y=256):(A=a,W=s,y=-1),R=0,k=0,S=T,v=l,C=I,O=0,m=-1,g=(L=1<<I)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){w=S-O,d[k]<y?(_=0,b=d[k]):d[k]>y?(_=W[j+d[k]],b=A[P+d[k]]):(_=96,b=0),p=1<<S-O,T=h=1<<C;do{u[v+(R>>O)+(h-=p)]=w<<24|_<<16|b|0}while(0!==h);for(p=1<<S-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,k++,0==--M[S]){if(S===E)break;S=t[n+d[k]]}if(S>I&&(R&g)!==m){for(0===O&&(O=I),v+=T,N=1<<(C=S-O);C+O<E&&!((N-=M[C+O])<=0);)C++,N<<=1;if(L+=1<<C,1===e&&L>852||2===e&&L>592)return 1;u[m=R&g]=I<<24|C<<16|v-l|0}}return 0!==R&&(u[v+R]=S-O<<24|64<<16|0),f.bits=I,0}},9451: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"}},2976:(e,t,n)=>{"use strict";var r=n(12);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,c=15,u=16,l=[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],d=[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],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=new Array(576);i(h);var m=new Array(60);i(m);var g=new Array(512);i(g);var v=new Array(256);i(v);var y=new Array(29);i(y);var w,_,b,x=new Array(s);function S(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 k(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function T(e){return e<256?g[e]:g[256+(e>>>7)]}function E(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function I(e,t,n){e.bi_valid>u-n?(e.bi_buf|=t<<e.bi_valid&65535,E(e,e.bi_buf),e.bi_buf=t>>u-e.bi_valid,e.bi_valid+=n-u):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function C(e,t,n){I(e,n[2*t],n[2*t+1])}function O(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function N(e,t,n){var r,i,o=new Array(c+1),a=0;for(r=1;r<=c;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]=O(o[s]++,s))}}function L(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;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 R(e){e.bi_valid>8?E(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 A(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 P(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!A(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function M(e,t,n){var r,i,a,s,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?C(e,i,t):(C(e,(a=v[i])+o+1,t),0!==(s=l[a])&&I(e,i-=y[a],s),C(e,a=T(--r),n),0!==(s=d[a])&&I(e,r-=x[a],s))}while(c<e.last_lit);C(e,256,t)}function U(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,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)P(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(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++,P(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,l=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o<=c;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)>m&&(o=m,g++),u[2*r+1]=o,r>l||(e.bl_count[o]++,a=0,r>=h&&(a=p[r-h]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(d[2*r+1]+a)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>l||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),N(o,l,e.bl_count)}function W(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<u?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?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))}function j(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<u)do{C(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(C(e,i,e.bl_tree),s--),C(e,16,e.bl_tree),I(e,s-3,2)):s<=10?(C(e,17,e.bl_tree),I(e,s-3,3)):(C(e,18,e.bl_tree),I(e,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}}i(x);var B=!1;function D(e,t,n,i){I(e,0+(i?1:0),3),function(e,t,n,i){R(e),E(e,n),E(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){B||(function(){var e,t,n,r,i,o=new Array(c+1);for(n=0,r=0;r<28;r++)for(y[r]=n,e=0;e<1<<l[r];e++)v[n++]=r;for(v[n-1]=r,i=0,r=0;r<16;r++)for(x[r]=i,e=0;e<1<<d[r];e++)g[i++]=r;for(i>>=7;r<s;r++)for(x[r]=i<<7,e=0;e<1<<d[r]-7;e++)g[256+i++]=r;for(t=0;t<=c;t++)o[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,o[8]++;for(;e<=255;)h[2*e+1]=9,e++,o[9]++;for(;e<=279;)h[2*e+1]=7,e++,o[7]++;for(;e<=287;)h[2*e+1]=8,e++,o[8]++;for(N(h,287,o),e=0;e<s;e++)m[2*e+1]=5,m[2*e]=O(e,5);w=new S(h,l,257,a,c),_=new S(m,d,0,s,c),b=new S(new Array(0),f,0,19,7)}(),B=!0),e.l_desc=new k(e.dyn_ltree,w),e.d_desc=new k(e.dyn_dtree,_),e.bl_desc=new k(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,L(e)},t._tr_stored_block=D,t._tr_flush_block=function(e,t,n,r){var i,a,s=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<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),U(e,e.l_desc),U(e,e.d_desc),s=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),U(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?D(e,t,n,r):4===e.strategy||a===i?(I(e,2+(r?1:0),3),M(e,h,m)):(I(e,4+(r?1:0),3),function(e,t,n,r){var i;for(I(e,t-257,5),I(e,n-1,5),I(e,r-4,4),i=0;i<r;i++)I(e,e.bl_tree[2*p[i]+1],3);j(e,e.dyn_ltree,t-1),j(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),L(e),r&&R(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*(v[n]+o+1)]++,e.dyn_dtree[2*T(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){I(e,2,3),C(e,256,h),function(e){16===e.bi_valid?(E(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)}},6092: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}},9112:function(e,t,n){var r;!function(i,o){"use strict";var a="function",s="object",c="model",u="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,c,u,l,d=0;d<t.length&&!u;){var f=t[d],p=t[d+1];for(n=r=0;n<f.length&&!u;)if(u=f[n++].exec(e))for(i=0;i<p.length;i++)l=u[++r],typeof(c=p[i])===s&&c.length>0?2==c.length?typeof c[1]==a?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3==c.length?typeof c[1]!==a||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):o:this[c[0]]=l?c[1].call(this,l,c[2]):o:4==c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):o):this[c]=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],[u,f],[/(opios)[\/\s]+([\w\.]+)/i],[[u,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[u,"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],[u,f],[/(konqueror)\/([\w\.]+)/i],[[u,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[u,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[u,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[u,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[u,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[u,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[u,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[u,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[u,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[u,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[u,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[u,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[u,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[u,"Brave"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[u,f],[/(QQ)\/([\d\.]+)/i],[u,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[u,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[u,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[u,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[u],[/(LBBROWSER)/i],[u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[u,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[u,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[u,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[u,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[u,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[u,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[u,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[u,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[u,f],[/(dolfin)\/([\w\.]+)/i],[[u,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[u,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[u,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[u,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[u,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[f,[u,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[f,u],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[u,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[u,[f,_.str,b.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[u,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[u,"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],[u,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],[c,d,[l,g]],[/applecoremedia\/[\w\.]+ \((ipad)/],[c,[d,"Apple"],[l,g]],[/(apple\s{0,1}tv)/i],[[c,"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,c,[l,g]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[c,[d,"Amazon"],[l,g]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[c,_.str,b.device.amazon.model],[d,"Amazon"],[l,m]],[/android.+aft([bms])\sbuild/i],[c,[d,"Amazon"],[l,v]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[c,d,[l,m]],[/\((ip[honed|\s\w*]+);/i],[c,[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,c,[l,m]],[/\(bb10;\s(\w+)/i],[c,[d,"BlackBerry"],[l,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[c,[d,"Asus"],[l,g]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[c,"Xperia Tablet"],[l,g]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,"Sony"],[l,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,c,[l,h]],[/android.+;\s(shield)\sbuild/i],[c,[d,"Nvidia"],[l,h]],[/(playstation\s[34portablevi]+)/i],[c,[d,"Sony"],[l,h]],[/(sprint\s(\w+))/i],[[d,_.str,b.device.sprint.vendor],[c,_.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,[c,/_/g," "],[l,m]],[/(nexus\s9)/i],[c,[d,"HTC"],[l,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[c,[d,"Huawei"],[l,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[c,[d,"Huawei"],[l,g]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,c,[l,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[c,[d,"Microsoft"],[l,h]],[/(kin\.[onetw]{3})/i],[[c,/\./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],[c,[d,"Motorola"],[l,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[c,[d,"Motorola"],[l,g]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,w.trim],[c,w.trim],[l,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,"Samsung"],[l,v]],[/\(dtv[\);].+(aquos)/i],[c,[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"],c,[l,g]],[/smart-tv.+(samsung)/i],[d,[l,v],c],[/((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"],c,[l,m]],[/sie-(\w*)/i],[c,[d,"Siemens"],[l,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],c,[l,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[c,[d,"Acer"],[l,g]],[/android.+([vl]k\-?\d{3})\s+build/i],[c,[d,"LG"],[l,g]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],c,[l,g]],[/(lg) netcast\.tv/i],[d,c,[l,v]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[c,[d,"LG"],[l,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,c,[l,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[c,[d,"Lenovo"],[l,g]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,c,[l,m]],[/linux;.+((jolla));/i],[d,c,[l,m]],[/((pebble))app\/[\d\.]+\s/i],[d,c,[l,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,c,[l,m]],[/crkey/i],[[c,"Chromecast"],[d,"Google"],[l,v]],[/android.+;\s(glass)\s\d/i],[c,[d,"Google"],[l,y]],[/android.+;\s(pixel c)[\s)]/i],[c,[d,"Google"],[l,g]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[c,[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],[[c,/_/g," "],[d,"Xiaomi"],[l,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[c,/_/g," "],[d,"Xiaomi"],[l,g]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[c,[d,"Meizu"],[l,m]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],c,[l,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[c,[d,"OnePlus"],[l,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[c,[d,"RCA"],[l,g]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[c,[d,"Dell"],[l,g]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[c,[d,"Verizon"],[l,g]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],c,[l,g]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[c,[d,"NuVision"],[l,g]],[/android.+;\s(k88)\sbuild/i],[c,[d,"ZTE"],[l,g]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[c,[d,"Swiss"],[l,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[c,[d,"Swiss"],[l,g]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[c,[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"],c,[l,g]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[c,[d,"Insignia"],[l,g]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[c,[d,"NextBook"],[l,g]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],c,[l,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],c,[l,m]],[/android.+;\s(PH-1)\s/i],[c,[d,"Essential"],[l,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[c,[d,"Envizen"],[l,g]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,c,[l,g]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[c,[d,"MachSpeed"],[l,g]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,c,[l,g]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[c,[d,"Rotor"],[l,g]],[/android.+(KS(.+))\s+build/i],[c,[d,"Amazon"],[l,g]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,c,[l,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[l,w.lowerize],d,c],[/[\s\/\(](smart-?tv)[;\)]/i],[[l,v]],[/(android[\w\.\s\-]{0,9});.+build/i],[c,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[u,"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],[u,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,u]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[u,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],[u,[f,_.str,b.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[f,_.str,b.os.windows.version]],[/\((bb)(10);/i],[[u,"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],[u,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[u,"Symbian"],f],[/\((series40);/i],[u],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"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],[u,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[u,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[u,f],[/(haiku)\s(\w+)/i],[u,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[u,"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],[u,f]]},S=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof S))return new S(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};S.VERSION="0.7.22",S.BROWSER={NAME:u,MAJOR:"major",VERSION:f},S.CPU={ARCHITECTURE:p},S.DEVICE={MODEL:c,VENDOR:d,TYPE:l,CONSOLE:h,MOBILE:m,SMARTTV:v,TABLET:g,WEARABLE:y,EMBEDDED:"embedded"},S.ENGINE={NAME:u,VERSION:f},S.OS={NAME:u,VERSION:f},void 0!==t?(e.exports&&(t=e.exports=S),t.UAParser=S):(r=function(){return S}.call(t,n,t,e))===o||(e.exports=r);var k=i&&(i.jQuery||i.Zepto);if(k&&!k.ua){var T=new S;k.ua=T.getResult(),k.ua.get=function(){return T.getUA()},k.ua.set=function(e){T.setUA(e);var t=T.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(6148),t=n.n(e),i=n(1844);function o(){return window.navigator.userAgent.toLowerCase().match(/micromessenger/i)?"wechat":"web"}var a=n(6348),s=n(8856),c=n(2392);function u(e){window.parent!==window&&window.parent.postMessage(e,"*")}var l=n(6496),d=n(568),f=n(556);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)}}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 c=0,u=0;o>a?(c=t,u=t/s):(u=t,c=t*s),i.width=u,i.height=c,i.getContext("2d").drawImage(r,0,0,u,c),n(i.toDataURL())},r.src=e})):Promise.resolve(e)}async function m(e){const t={fileName:e.name,fileType:e.type};return 0===e.type.indexOf("image/")?(t.isImage=!0,t.value=await v(e)):(t.isImage=!1,t.value=g(e.name)),t.miniValue=await h(t.value),t}function g(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 v(e){return new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))}const y="native_app_message";function w(e){return new Promise(((t,n)=>{const r=()=>{window.removeEventListener(y,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(y,o),t(s)):"delay"===a&&s.delayTask===e.messageName&&(clearTimeout(i),i=setTimeout(r,15e3))};window.addEventListener(y,o),window.ReactNativeWebView.postMessage(JSON.stringify(e))}))}const _={};var b=n(3004);function x(e){const{file:t,onProgress:n,onUploaded:r}=e;(async function({file:e,maxFileSize:t,keyPrefix:n}){var r;if(t&&e.size>t)throw"file-size-error";const i=await fetch((null===(r=(0,s.E3)().hostConfig)||void 0===r?void 0:r.qApiHost)+"/media/uptoken?"+new URLSearchParams({key_prefix:n,mime_type:e.type}),{method:"get"});let o;if(!i.ok||200!==i.status){if(i.ok&&204===i.status)throw await i.text();throw await i.json()}return o=await i.json(),o})(e).then((e=>{const i=new XMLHttpRequest;if(i.upload.onprogress=e=>{null==n||n(e.loaded/e.total*100)},i.onload=()=>{if(200!==i.status)throw"upload-error";null==r||r({file:t,res_key:e.res_key})},e.upload_host.includes("qiniup.com")){i.open("POST",e.upload_host);const n=new FormData;n.append("name",t.name),n.append("token",e.uptoken),n.append("file",t),i.send(n)}else i.open("PUT","".concat(e.upload_host,"/").concat(e.res_key)),i.setRequestHeader("Authorization",e.uptoken),i.setRequestHeader("Content-Type",t.type),i.send(t)})).catch((e=>{throw e}))}n(9952),n(6856);const S="os/client",k=20971520;function T(e){return e<1024?e+"bytes":e>=1024&&e<1048576?(e/1024).toFixed(1)+"KB":(e/1048576).toFixed(1)+"MB"}const E={resolve:()=>{},onprogress:()=>{},result:void 0},I={filePath:"",value:"",miniValue:"",isImage:!1,fileName:"",fileType:""};let C,O,N=E;async function L(e,t){const n=await m(t);N.result={...N.result||I,...n,filePath:e},O(),N.resolve(N.result),N=E,C.value="",document.body.style.pointerEvents="all"}function R(){C||(C=document.createElement("input"),C.setAttribute("type","file"),C.style.display="none",C.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 v(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",O=p({onprogress:N.onprogress}),(0,s.E3)().preview)await(0,f.W_)(1e3),await L(t.name,t);else try{x({file:t,keyPrefix:S,maxFileSize:k,onProgress:N.onprogress,onUploaded:async({res_key:e})=>{await L(e,t)}})}catch(e){O(),document.body.style.pointerEvents="all","file-size-error"===e&&(0,s.E3)().notify((0,l.GS)(d.CW.upload.fileSizeLimit,{size:T(k)}))}else(0,s.E3)().notify(d.CW.upload.invalidImage)})),document.body.appendChild(C))}n(1088);var A=n(5032),P=n(3132),M=n(3001),U=n(1884),W=n(5224),j=n(9796),B=n(9193),D=n(7556),G=n(1304),q=n(6796),F=n(5776),z=n(8184);var V=n(5170),K=n(8360),H=n(4196),Y=n(7688),Q=n(4556),X=n(908),J=n(1576),Z=n(6680),$=n(4404),ee=n(1103),te=n(1372),ne=n(8084),re=n(7828),ie=n(4072),oe=n(8956);const ae={};async function se(e,t){const n=(r=e,JSON.stringify({...r,x:void 0,y:void 0}));var r;const i=ae[e.nodeUuid];if(i&&i.raw===n)return i.value;{await(0,f.W_)();const r={target:e},i=(0,z.e_)(r,t),o=await(0,z.o9)(i,t.current);return ae[e.nodeUuid]={value:o,raw:n},o}}let ce,ue,le=!1,de=!1,fe="",pe=null;function he(e){const{globalSetting:t,content:n}=pe,{nodeList:r,variables:i,fullLangStore:o,autoCpltGroups:a}=t;let s=[...r];n.groupNodes?s=[...s,...n.groupNodes]:s.unshift(n);const c=n.group?[n.group]:[],u=o[e];(0,re.w3)({nodes:s,groups:c,variables:i},u),(0,re.O_)(a,e)}const me={...V._,async handleNextClick(){},async handlePrevClick(){},handleCascadeInput(e,t,n,r){const i=(0,H.cv)(e,t,n,r);return this.handleOptionInput(e,i,r)},async handleCascadeClick(e,t,n){await(0,H.GA)(e,t,n)},handleMenuClick:async(e,t)=>(await me.handleOptionClick(t.options[e],t),t.options.filter((e=>e.selected)).map((e=>e.text))),async handleOptionClick(e,t){const n=await(0,Y.o)(e,t);return await(0,ee.e)(t),(0,a.oP)(t),n.result},async handleOptionAssistInput(e,t,n){(0,s.e)(n.assistValue,{[t]:e})},async handleAutoCpltInput(e,t,n){(0,Q.I5)(e,t,n)},async handleOptionInput(e,t,n){const r=await(0,Q.wf)(e,t,n);return await(0,ee.e)(n),(0,a.oP)(n),r.result},async handleQuestionInput(e,t){const n=await(0,X.s)(e,t);return await(0,ee.e)(t),(0,a.oP)(t),n.result},async handleSequenceInput(e,t,n){const r=await(0,Z.W)(e,t,n);return await(0,ee.e)(n),(0,a.oP)(n),r.result},handleLangChange:async e=>e.locale===ue?void 0:(ue=e.locale,de=!0,pe.globalSetting.language=e.locale,ce(pe)),async handleMaxDiffInput(e,t,n,r){const i=(0,J.w)(e,t,n);return await(0,ee.e)(r),(0,a.oP)(r),i.result},handleQuickAnswer:e=>(0,K.E)(e)};const ge={data:{theme:null,eventHub:a.i}},ve={};let ye=null;async function we(e){try{await async function(e){const t=Date.now(),{content:n}=e;let r=await async function(e,t){var n;void 0===ue&&(ue=null!==(n=e.globalSetting.language)&&void 0!==n?n:"zh_cn"),pe=e,ce=t;const{content:r,globalSetting:i,regionList:o}=e;i.language=ue,await async function(e){if(le)return(0,l.Uj)(e),void he(e);await(0,f.W_)(50),(0,l.Uj)(e),he(e),le=!0}(i.language);const c={variables:(0,D.SA)(i.variables),imageList:i.imageList,varStyles:i.varStyles};de||((0,D.SW)(r),o&&await(0,ne.oZ)(o),(0,te.a)(i.presetRichStyles),(0,ie.YV)(c)),fe!==r.nodeUuid&&(window.scrollTo(0,0),fe=r.nodeUuid);const u={...c,core:(0,s.E3)(),embedApis:i.embedApis,nodeGroups:i.nodeGroups||[],eventHub:a.i,context:{},loopStack:[],randomList:[],preview:!0,themeMode:!0,...i,langTable:i.langTable.filter((e=>!e.disabled)),nodeList:i.nodeList.map((e=>((0,D.ox)(e),e))),handleEvents:me,nodes:[],theme:ge.data.theme,...(0,$.Y)(i)};return await async function(e){let t;e.renderList=[];for(const n of e.nodeList){if("start"===n.type||oe.Gw.includes(n.type))continue;const r=await se(n,e);r.prev=t,t=r,e.renderList.push(r)}}(u),u}(e,we);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.a)(e.image));const{imgScale:r,imgTransType:i,imgTransTime:o,imgPosition:a,welcomeUrl:s,startName:c,qsnrName:u,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:c||u,welcomeUrl:s,images:n,nextButton:f||(0,l.GS)(d.CW.global.start)}).template=await(0,A.m)(e.template,t),t.summary=await(0,M.qQ)(e.questionText,{state:t}),t.description=await(0,M.qQ)(e.describe,{state:t}),t}(n,r):"gift"===n.type?await async function(e,t){const n=(0,W.x)();(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,U.kF)(),images:e.image?[(0,P.a)(e.image)]:[],nextButton:e.linkUrl&&(e.endBtnText||(0,l.GS)(d.CW.global.go))}).template=await(0,A.m)(e.template,t);const r=e;return t.rewardType=r.giftType,"red_envelope"===t.rewardType?t.rewardValue=r.giftCount+" "+(0,l.GS)(d.CW.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.GS)(d.CW.global.next),prevBtnText:r.prevBtnText||(0,l.GS)(d.CW.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,z.e_)(o,t),s=await(0,z.o9)(a,t.current);if(t.renderList.push(s),0===s.varList.length)if(s.options.length>0){const e=(0,f.my)(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},c=(0,z.e_)(i,t),u=await(0,z.o9)(c,t.current),l=await(0,j.uS)(t,u,s.nodeUuid,e,o,null),d={destInputId:"",node:r,varList:s.varList,replacements:[l],currentIndex:e},p=[d];u.renderId=(0,f.So)(u.nodeUuid,p),u.loop=d,u.loopStack=p,n.push(u)}t.renderList=[...t.renderList,...n],t.nodes=n,t.groupTable=(0,B.y)(n,t.inSingleGroup)}else{const n=[];for(const r of e.groupNodes){(0,D.ox)(r);const e={target:r},i=(0,z.e_)(e,t);n.push(await(0,z.o9)(i,t.current))}t.renderList=[...t.renderList,...n],t.nodes=n.filter((e=>!q.AN.includes(e.type)&&!(0,F.S)(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,D.ox)(e),(0,f.is)(e,"lottery"===e.type)){t.formalResult={reward:{},gift:{}};const r=(0,f.my)(e.options,1)[0],i={id:-1,lottery_id:e.nodeUuid,lottery_option_id:r&&r.uuid};n=await(0,z.yI)(e,i,t)}else{const r={target:e},i=(0,z.e_)(r,t);n=await(0,z.o9)(i,t.current)}return t.renderList.push(n),t.nodes=[n],t.current=n,t}(n,t),t.limitTime&&(t.restTime=(0,U.KM)(t.limitTime)),t.prevButton=(0,G.Qb)(t),t.nextButton=await(0,G.uC)(t),t}(e,r),window.cfState=r,(0,s.e)(ge,{data:r}),console.info("client full time:",Date.now()-t,"node count:",r.nodeList.length),u({name:"done_preview_realtime"}),a.i.trigger("REALTIME_CHANGE")}(e)}catch(e){u({name:"error_realtime_preview",error:e.stack||e.message}),console.error(e)}}function _e(e){if(!e.data)return;const{name:t}=e.data;if(!t||0!==t.indexOf("preview"))return;const n=ve[t];n&&n(e.data)}function be(){u({name:"mousedown_preview"})}function xe(){u({name:"mouseup_preview"})}ve.preview_theme=e=>{(0,c.y)(e.theme),(0,s.e)(ge.data,{theme:e.theme}),ye&&a.i.trigger("UPDATE_THEME",e.theme),ye=e.theme},ve.preview_content=e=>we(e);var Se=n(7404),ke=(n(5960),n(4708)),Te=n(2352),Ee=n(4060);const Ie=[],Ce={cached:!1,value:null};let Oe,Ne;function Le(){return!Oe||0===Oe.length}async function Re(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,Ee.em)(e,t);return 6===n||8===n||12===n||2===n?r.candidates="number"==typeof i?(0,Te.Wo)(i-1):i.substring(0,i.length-1):1===n||5===n||11===n||4===n||7===n?r.candidates=(0,Te.Wo)(i+1):3!==n&&9!==n||(r.candidates=(0,Te.Wo)(i)),r}}function Ae(e){return"testcase"===e}n(7768);const Pe="failed to load:",Me=[];function Ue(e){let t=0;return new Promise(((n,r)=>{const i=async o=>{try{const t=await e();o&&(0,s.E3)().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,Me.push(i),(0,s.E3)().markLoadRetry({status:"wait-retry",onRetry(){for((0,s.E3)().markLoadRetry({status:"retrying"});Me.length>0;)Me.pop()(!0)}}))}};i(!1)}))}function We(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 je(e,t,n){return n?Ue((()=>We(e,t))):We(e,t)}function Be(e,t){let n=!0;return"GET"===t.type?(t.data&&(e=(0,Se.Ww)(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 De(e,t,n){return n?Ue((()=>Be(e,t))):Be(e,t)}window.CFPlugin=window.CFPlugin||{},window.CFPlugin.fakedServers={};const Ge=(0,Se.Yj)(location.search),qe={local:!!location.origin.match(/:\d+$/),realtime:location.pathname.includes("/themes"),debug:!!Ge.dev,autoRun:!!Ge.auto_path,infer:!!Ge.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()=>Ae(Ge.infer_id)?{langs:[]}:null,getCustomSurveyPayload:async()=>Ae(Ge.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),u({type:"initialize",name:"testcase"})})):null},Fe={start:"",survey:"/survey",reward:"/reward"};function ze(e,t){const n=Fe[e],r=Ve(e,t),i=(0,s.E3)().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 Ve(e,t){return(0,s.E3)().appRoot+(0,Se.Ww)(Fe[e],t)}function Ke(e){const t=(0,s.E3)().appRoot+Fe.start+"?".concat(e.sid),n={};return Object.keys(e).forEach((t=>{t.startsWith("share_preserved_")&&(n[t]=e[t])})),(0,Se.Ww)(t,n)}const He={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,Se.Yj)(location.search)),gotoStartPage(e){ze("start",e)},gotoSurveyPage(e){ze("survey",e)},getRewardUrl:e=>Ve("reward",(0,Se.SC)(e)),openWebLink(e){location.replace(e)},reload(){location.href=Ve("start",(0,Se.uK)())}};var Ye=n(9112),Qe=n.n(Ye);Qe()();const Xe=new(t()),Je={device:Qe()(),newDiv:()=>document.createElement("div"),newSpan:()=>document.createElement("span"),newTextNode:e=>document.createTextNode(e),getReferer:()=>document.referrer,translate:(e,t)=>t?Xe.compile(e)(t):e,getLang:()=>(navigator.languages&&navigator.languages[0]||navigator.language).replace(/-/g,"_").toLowerCase()};var Ze=n(8744);function $e(e){return e.returnValue="1","1"}function et(){window.removeEventListener("beforeunload",$e)}var tt=n(7320);let nt,rt;function it(){nt&&(nt.disconnect(),et(),nt=null,rt=null)}const ot={removeUpload:async function(e){if((0,b.U)())return async function(e){const{nodeId:t,optionId:n}=e,r=_[t+n];if(!r)return;const i={messageName:"remove_upload",data:{...e,url:r}};await w(i),delete _[t+n]}(e)},closeSocket:it,pushSocket:function(e,t){rt&&rt.push(e,t)},connectSocket:function(e,t){if(!(0,b.U)())try{nt=new Ze.Socket("".concat((0,s.E3)().hostConfig.wsHost,"/q/socket"),{params:{response_id:e}}),nt.connect(),location.href.match(/:\d+\//)||window.addEventListener("beforeunload",$e),rt=nt.channel("client:".concat(t),{}),rt.on("collector_full",(()=>{(0,s.E3)().error((0,tt.O)("collector_full")),it()})),rt.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.E3)().uploadLog("加入socket失败")}},loadFakeFile:function(e,t,n){return je((0,b.G)(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,b.U)()?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 w(i);if(!a)return o(),null;_[n+r]=a;const c=a.substring(a.lastIndexOf("/")+1),u={filePath:a,fileName:c,fileType:s,progress:50};return s.startsWith("image/")?(u.value=a,u.isImage=!0):(u.value=g(c),u.isImage=!1),u.miniValue=await h(u.value),o(),u}(e):function(e){return e.recordedAudioFile?async function(e){const t=e.recordedAudioFile;if((0,s.E3)().preview){await(0,f.W_)(1e3);const e=await m(t);return{...I,...e,filePath:t.name}}return new Promise((n=>{try{x({file:t,keyPrefix:S,maxFileSize:k,onProgress:e.onprogress,onUploaded:async({res_key:e})=>{const r=await m(t),i={...I,...r,filePath:e};n(i)}})}catch(e){O(),"file-size-error"===e&&(0,s.E3)().notify((0,l.GS)(d.CW.upload.fileSizeLimit,{size:T(k)}))}}))}(e):(e.accept?C.setAttribute("accept",e.accept):C.removeAttribute("accept"),N.onprogress=e.onprogress,new Promise((e=>{C.click(),N.resolve=e})))}(e)},initUploader:R,request:function(e,t,n){const r=(0,s.E3)();return(0,b.U)()?e.startsWith(r.hostConfig.qApiHost)?async function(e,t){const n={messageName:e,data:t.data};return{response:await w(n),status:200}}(e,t):De((0,b.G)(e),t,n):De(e,t,n)}};function at(){window.wxMenuForceShow||window.wx.hideOptionMenu()}function st(e){let t="";const n=e.images[0];return n&&n.url&&(t=n.url),t||(0,s.E3)().hostConfig.cdnHost+"/thumbnail.png"}function ct(e,t=0){"wechat"===(0,s.W4)().name&&setTimeout((()=>{try{e.noWxShare||window.wx&&(window.wx.showOptionMenu(),window.wxMenuForceShow=!0),async function(e){if(e.noWxShare||!(0,s.W4)().app.canHandleReward()||!(0,s.E3)().useWxSdk)return;const t=(0,Se.uK)(),n=(0,s.E3)().sid,r=e.wxShareInfo||{sid:n,title:(0,M.Qr)(e.title),desc:(0,M.Qr)(e.summary),shareLink:Ke(t),imageUrl:st(e)},i=location.href.split("#")[0],o=await function(e){const t=(0,s.E3)().hostConfig.qApiHost+"/wechat/jsapi_sign";return(0,tt.kj)(t,{type:"GET",data:e},!1)}({url:i});!function(e,t){if(!window.wx)return;const{imageUrl:n,desc:r,shareLink:i}=t;let{title:o}=t;""===(0,Te.Wo)(o).trim()&&(o="choiceform");const a=window.wx,{appid:s,timestamp:c,noncestr:u,signature:l}=e;a.config({debug:!1,appId:s,timestamp:c,nonceStr:u,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)}))}(o,r)}(e)}catch(e){(0,s.E3)().uploadLog("微信分享初始化失败")}}),t)}function ut(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(9624);const lt={get:async function(e){const t={messageName:"get_storage",data:{key:e}};return(await w(t)).value},set:function(e,t){return w({messageName:"set_storage",data:{key:e,value:t}})},remove:function(e){return w({messageName:"remove_storage",data:{key:e}})}},dt=lt;let ft;function pt(){if(void 0!==ft)return ft;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(e){return ft=!1,!1}return ft=!0,!0}const ht={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 mt(e,t){pt()?localStorage.setItem(e,t):ht.setItem(e,t)}function gt(e){return pt()?localStorage.getItem(e):ht.getItem(e)}function vt(e){pt()?localStorage.removeItem(e):ht.removeItem(e)}const yt={set:mt,setVital:async(e,t)=>(0,b.U)()?dt.set(e,t):mt(e,t),get:gt,getVital:async e=>(0,b.U)()?dt.get(e):gt(e),remove:vt,removeVital:async e=>(0,b.U)()?dt.remove(e):vt(e)},wt="cached_meta_before_third_auth",_t={userInfo:null,retrieveAuthSurveyMeta:function(){const e=(0,Se.uK)(),{code:t,state:n}=e;if(t){const t=yt.get(wt);if(t)return yt.remove(wt),JSON.parse(t);{const t=Ve("start",(0,Se.SC)(e));location.href=t,(0,s.E3)().customAbort()}}else n&&((0,s.E3)().error((0,l.GS)(d.CW.global.authFailed)),yt.remove(wt),(0,s.E3)().customAbort());return null},async init(e){if((0,s.E3)().preview)return;const{channel:t}=e,{type:n,authorizer_id:r,app_id:i}=t;if(t&&"wechat"===n&&i){const t=(0,Se.uK)().code;t||((0,s.E3)().error((0,l.GS)(d.CW.global.authFailed)),(0,s.E3)().customAbort()),e.interviewee=await function(e){const t=(0,s.E3)().hostConfig.qApiHost+"/interviewees";return(0,tt.SY)(t,{type:"POST",data:e}).catch((e=>{throw(0,tt.qs)(e),e}))}({code:t,authorizer_id:r})}},authorizeGift:function(e,t,n,r){const i=ut(e,t,(0,s.W4)().app.getRewardUrl(n),"reward",r);et(),location.replace(i)},authorize(e){const{channel:t}=e;if("wechat"===t.type&&t.app_id&&!e.authorized){e.authorized=!0,function(e){yt.set(wt,JSON.stringify(e))}(e);const{app_id:n,component_appid:r,authorizer_id:i}=t;!function(e,t,n){const r=ut(e,t,Ve("start",(0,Se.uK)()),n);et(),location.replace(r)}(n,r,i),(0,s.E3)().customAbort()}}};var bt=n(1548),xt=n(8412),St=n(9948),kt=n(1488);function Tt(){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 Et=n(4676),It=n(9216);const Ct="https://core.choiceform.com/iplist.json";let Ot;async function Nt(e){const{infer_collector_id:t,infer_status:n}=(0,Se.uK)(),r=await(0,Et.gp)(e);r.status=n||"test",r.collector_id=Number(t)||void 0;const i=function(){const{infer_time_range:e}=(0,Se.uK)();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.ai)(o,a);r.created_at=new Date(s).toISOString();let c=0;return r.answers.forEach((t=>{const n=(0,It.Uq)(e,t);t.start_time=new Date(s+c).toISOString(),(0,F.S)(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.ai)(n,r):function(e,t,n){const r=.5,i=t-e,o=(0,f.ai)(1,99),a=Math.floor(Math.log(1-.5*o/50)/Math.log(r)),s=Math.max(7-a,0),c=o<50?e:Math.round(e+i*r*r**s),u=o>96.875?t:Math.round(e+i*r*r**(s-1));return(0,f.ai)(c,u)}(n||1e3,12e5)}(n),c+=t.cost_time)})),r.time_consuming=Math.ceil(c/1e3),r.committed_at=new Date(s+c).toISOString(),r.ip_address=await async function(e){const t=await async function(){if(!Ot){const e=await ot.request(Ct,{type:"GET"},!1),t=JSON.parse(e.response);let n=[];const r=Object.keys(t);r.forEach((e=>{n=n.concat(t[e])})),Ot={regionMap:t,fullList:n,keys:r}}return Ot}(),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.my)(r,1)[0]}(e),r}let Lt=-1,Rt=1,At=0,Pt="",Mt=null,Ut={index:0,fullLength:0,percent:0};async function Wt(e,t){let n=!0;if(Ae(Pt)?n=await async function(e,t){if(Le()||!Ne)return!1;if("END"===e.type||"CHECK_END"===e.type){const e=[Ne,...Oe.filter((e=>!e.when&&e!==Ne))];for(const n of e){n.done=!0;const{options:e,logicType:r}=n.should,i=await(0,Ee.UF)(t,e,r);if(!i.value){const e={target:n.name,logicType:r,matches:i.details.filter((e=>!e.value))};Ie.push(e)}}return Oe=Oe.filter((e=>!e.done)),Oe.length>0?(Ne=Oe[0],!0):(Ie.length>0?u({name:"testcase",type:"failed",results:Ie}):u({name:"testcase",type:"success"}),!1)}return u({name:"testcase",type:"error",target:Ne.name,message:e.message}),!1}(e,t):u({name:"infer_worker",type:e.type,data:e.data,message:e.message,round:Rt++,id:Pt,ended:!0,nodeName:t.current.nodeName}),clearTimeout(Lt),a.i.off(),n){!function(e){const t=window.CFPlugin.fakedServers;Object.keys(t).filter((e=>{e.endsWith("/__reset_for_infer__")&&t[e]({},(0,s.E3)())}))}();const e=await(0,St.ER)();await Bt(e)}}function jt(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-At>1e3){let n=(0,xt.wB)(e);-1===n.index?n=Ut:Ut=n,u({name:"infer_progress",id:Pt,progress:n,round:Rt}),At=t}}(e),i?"end"===i.type?(Ae(Pt)?await Wt({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.S)(n);)n=n.prev;return Wt({type:"CHECK_END",message:(n?n.nodeName:"")+" => "+r+" :CHECK_END"},t)}if(e.origin.abandonAnswer)return Wt({type:"ABANDON",message:"Answer abandoned by: ".concat(e.nodeName)},t);{const e=((n=await Nt(t)).survey_id=(0,s.E3)().sid,{result:n,url:(0,s.E3)().hostConfig.host+"/d/v1/responses",jwt:Tt()});return await async function(e){if(Ae(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.E3)());if(n.result)return a.i.trigger("ERROR",{message:"Infer Result Error: ".concat(n.result)}),!1}return!0}()?Wt({type:"END",data:e},t):void 0}var n}(i,e),o=!0):(a.i.one("STRETCH_OK",r),await(0,K.G)(i,Mt)):await e.handleEvents.handleNextClick(),o||(clearTimeout(Lt),Lt=window.setTimeout((()=>{Wt({type:"TIMEOUT",message:(e.current&&e.current.nodeName)+":TIMEOUT"},e)}),5e3))};return r()}function Bt(e){return a.i.one("NEXT_FAIL",(t=>{Wt(t,e)})),a.i.one("ERROR",(t=>{Wt(t,e)})),a.i.on("NEXT_OK",(()=>{jt(e)})),jt(e)}let Dt="",Gt=!1;function qt(){Gt=!0}function Ft(e){const{nodeUuid:t}=e;Dt===t||Gt||(u({name:"locate_preview",nodeUuid:t}),Dt=t)}var zt=n(1344),Vt=n(2524);const Kt="preview_bookmarks_";let Ht;async function Yt(e){const t=await yt.getVital(Kt+e.surveyId);return Ht=t?JSON.parse(t):[],Ht}async function Qt(e,t){Ht.some((t=>JSON.stringify(t.result)===JSON.stringify(e.result)))?(0,s.E3)().notify((0,l.GS)(d.CW.previewBookmark.existed)):(Ht.push(e),await yt.setVital(Kt+t.surveyId,JSON.stringify(Ht)))}class Xt{constructor(e,t){this.loading=!1,this.progress="",this.nodeList=[],this.bookmarks=[],this.parent=e,this.state=t}async loadData(){var e;(0,s.e)(this,{bookmarks:await Yt(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.U3)(e,!0),(0,s.e)(t,{current:e}),(0,xt.K8)(t),await(0,Vt.w)(t)}(e,this.state),this.parent.close())}async applyBookmark(e){if(this.loading)return;document.body.style.pointerEvents="none",(0,s.E3)().notifySuspended=!0,(0,s.e)(this,{loading:!0});const t={onProgress:e=>{this.parent.opened||(this.parent.open(),document.body.style.pointerEvents="none"),(0,s.e)(this,{progress:e})},onEnd:e=>{document.body.style.pointerEvents=null,(0,s.E3)().notifySuspended=!1,this.parent.close(),(0,s.e)(this,{loading:!1,progress:""});const t=e.failed?d.CW.previewBookmark.importFailure:d.CW.previewBookmark.importSuccess;(0,s.E3)().notify(t)},onSuspend:()=>{document.body.style.pointerEvents=null,(0,s.E3)().notifySuspended=!1,this.parent.close()}};return function(e,t,n){return(0,zt.ay)(t.result,e,n)}(this.state,e,t)}async deleteBookmark(e){this.loading||(await async function(e,t){Ht=Ht.filter((t=>t!==e)),await yt.setVital(Kt+t.surveyId,JSON.stringify(Ht))}(e,this.state),(0,s.e)(this,{bookmarks:await Yt(this.state)}))}async saveBookmarks(e){this.loading||(await async function(e,t){const n=function(e){return{result:(0,zt.I5)(!0),id:(0,f.kt)((0,f.YF)()),name:e}}(e||Date.now().toString());await Qt(n,t)}(e,this.state),(0,s.e)(this,{bookmarks:await Yt(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.kt)((0,f.YF)()),await Qt(r,e),t()}catch(e){(0,s.E3)().notify((0,l.GS)(d.CW.previewBookmark.importFailed)+e.message)}},i.readAsText(r[0])},n.click()}))}(this.state),(0,s.e)(this,{bookmarks:await Yt(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.e)(this,{bookmarks:await Yt(this.state)}))}}var Jt=n(6276);function Zt(e){const t=[],n=[];let r=0;return e.renderList.forEach((e=>{const i=e.costTime;!(0,F.S)(e)&&i&&(t.push({ques_id:e.nodeUuid,time:i,inLoop:!!e.loop}),n.push({renderId:e.renderId,name:e.nodeName,title:(0,Jt.kZ)(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.e)(this,{timeInfo:Zt(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,tt.SY)(n,{type:"POST",data:t}),(0,s.E3)().notify((0,l.GS)(d.CW.previewTime.uploadSuccess)),this._submitted=!0}catch(e){(0,s.E3)().notify((0,l.GS)(d.CW.previewTime.uploadFailed)),this._submitted=!1}}}class en{constructor(e){this.bookmark=new Xt(this,e),this.time=new $t(this,e)}close(){this.opened&&(0,s.e)(this,{opened:!1})}open(){this.opened||(0,s.e)(this,{opened:!0})}async handleToggleOpen(){this.bookmark.loading||((0,s.e)(this,{opened:!this.opened}),this.opened&&(await this.bookmark.loadData(),this.time.loadData()))}}const tn={beforeForceLeave:et,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.E3)().uploadLog("修改网页标题失败")}},async beforeSetupEnd(e){if(e.useWxSdk&&!(0,b.U)())return async function(){"wechat"===(0,s.W4)().name&&(await je("https://res.wx.qq.com/open/js/jweixin-1.6.0.js",{},!0),void 0===window.WeixinJSBridge?document.addEventListener("WeixinJSBridgeReady",at,!1):at())}()},async afterSetup(){qe.autoRun||qe.infer||!(0,s.E3)().preview||(a.i.on("SWITCH_NODE",((e,t)=>{Ft(t)})),a.i.on("START_MEMORY",qt),a.i.on("END_MEMORY",((e,t)=>{!function(e){Gt=!1,e&&Ft(e)}(t)})))},async afterFetchStart(e){if(!(0,b.U)())return window.cfState=e,ct(e)},async afterFetchSurvey(e){var t;window.cfState=e,(0,b.U)()||(ct(e,1e3),await async function(e){const t=(0,Se.uK)();if(Pt=t.infer_id,Pt&&e.preview)return a.i.trigger("START_MEMORY"),Ae(Pt)&&(function(e=[]){if(Oe=e.filter((e=>!e.disabled)),Le())u({name:"testcase",type:"success"});else{Oe=Oe.sort(((e,t)=>!e.when&&t.when?1:-1));for(let e=Oe.length-1;e>=0;e--){const t=Oe[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})));Oe.splice(e,1,...t)}}Ne=Oe[0]}}(e.testCases),Mt={beforeInfer:e=>async function(e){if(Le()||!Ne||!Ne.when)return;Ce.value={};let t=!1;for(const n of Ne.when.options)if(n.relatedNodeId===e.nodeUuid){const r=(0,ke.gr)(e);t||(r.forEach((e=>{Ce.value[e.uuid]=e.origin.inferList,e.origin.inferList=[]})),t=!0);const i=r.find((e=>e.uuid===n.relatedOptionId)),o=await Re(n,e.parent);o&&i.origin.inferList.push(o)}Ce.cached=t}(e),async afterInfer(e){!function(e){Ce.cached&&((0,ke.gr)(e).forEach((e=>{e.origin.inferList=Ce.value[e.uuid]})),Ce.cached=!1,Ce.value={})}(e)}}),await(0,kt.A9)(),Bt(e)}(e),await async function(){const e=(0,Se.uK)().auto_path;if(e){const t="http://localhost:12345/tasks/"+e+".js";await je(t.replace(/tasks\/.+/,"chai.js"),{},!1),await je(t,{type:"module"},!1)}}()),(0,s.e)(e,{previewTool:(t=e,(0,s.E3)().preview?new en(t):void 0)})},async afterFetchReward(e){if(!(0,b.U)())return window.cfState=e,ct(e)},async onEndSurvey(){if((0,b.U)())return w({messageName:"end_survey",data:{}})},async onRestartSurvey(){if((0,b.U)())return w({messageName:"restart_survey",data:{}})},async onResumeSurvey(){if((0,b.U)())return w({messageName:"resume_survey",data:{}})},async onStartNewSurvey(){if((0,b.U)())return w({messageName:"start_new_survey",data:{}})},async beforeGotoNext(){if((0,b.U)())return w({messageName:"send_task_info",data:await(0,bt.S)()})}};window.CF_UI_COMS=window.CF_UI_COMS||{};const nn={};let rn;const on=[];async function an(e,t){if(!nn[e]){const n=async()=>{const{treeUrl:n,templatePath:r}=(0,s.E3)();if(!rn){const e=await(0,tt.kj)(n,{type:"GET"},t);rn=[...e.partials,...e.standards]}const i=function(e){const t=[],n=[];for(;e.length>0;){const r=[],i=[];e.forEach((e=>{const n=rn.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)on.includes(t.id)||(o.push(r+"/"+t.file),on.push(t.id));return await Promise.all(o.map((e=>je(e,{crossorigin:"anonymous"},t)))),window.CF_UI_COMS[e]};nn[e]=n()}return nn[e]}function sn(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 cn={loadUiEntryTemplates:async function(e,t){const{dynamic:n}=(0,s.E3)();if(n&&e&&!qe.autoRun&&!qe.infer)for(const n of e)await an(n,t)},loadNodeComponent:async function(e,t){const{dynamic:n}=(0,s.E3)();if(n&&e&&!qe.infer&&!qe.autoRun)return await an(e.id,t)},setGlobalStyle(e){sn(e,"global-var-style")},setVarStyle(e){sn(e,"common-var-style")},setPresetStyle(e){sn(e,"preset-rich-style")}};window.addEventListener("error",(e=>{i.EventHub.trigger("ERROR",{message:e.message})})),i.Core.realtime=ge,i.Core.initRealtimePreview=()=>{location.href.includes("/themes")&&(R(),u({name:"init_preview"}),document.documentElement.setAttribute("class","ios iphone mobile portrait safari -9"),window.addEventListener("message",_e),window.addEventListener("mousedown",be),window.addEventListener("mouseup",xe))},i.Core.silentSetter=qe.autoRun||qe.infer,i.Core.registerEnv({name:o(),dev:qe,app:He,system:Je,network:ot,auth:_t,storage:yt,hook:tn,ui:cn}),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})})();