@psdk/device-ble-taro 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/sourcemap-register.js +1 -0
- package/package.json +4 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require('./sourcemap-register.js');(()=>{var e={239:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.TaroBleConnectedDevice=void 0;const i=n(833);const o=r(n(302));const s=r(n(162));class TaroBleConnectedDevice{device;scpair;_connectionState;dataOfRead;notifyCallback;constructor(e){this.device=e.device;this.scpair=e.scpair;this._connectionState=i.ConnectionState.CONNECTED;this.dataOfRead=[];this.doListen()}notify(e){this.notifyCallback=e}doListen(){if(this.scpair.read==null)return;s.default.onBLECharacteristicValueChange((async e=>{if(this.notifyCallback){await this.notifyCallback(e)}}));s.default.onBLEConnectionStateChange((e=>{this._connectionState=e.connected?i.ConnectionState.CONNECTED:i.ConnectionState.DISCONNECTED}));s.default.notifyBLECharacteristicValueChange({deviceId:this.device.deviceId,serviceId:this.scpair.service.uuid,characteristicId:this.scpair.read.uuid,state:true,success:e=>console.log(e),fail:e=>console.error(e)})}async realRead(){return new Promise(((e,t)=>{if(this.scpair.read==null){t(`the connect device not support read operation: service id: [${this.scpair.service.uuid}]`);return}s.default.readBLECharacteristicValue({deviceId:this.device.deviceId,serviceId:this.scpair.service.uuid,characteristicId:this.scpair.read.uuid,success:n=>{if(n.errMsg.indexOf("ok")==-1){t(n.errMsg);return}e()},fail:e=>t(e)})}))}origin(){return this.device}connectionState(){return this._connectionState}deviceName(){return this.device.localName||this.device.name||"NONE"}async disconnect(){return new Promise(((e,t)=>{s.default.closeBLEConnection({deviceId:this.device.deviceId,success:()=>{this.device=null;this.scpair=null;e()},fail:e=>t(e)})}))}canRead(){return this.scpair.read!=null}async read(e){if(this.dataOfRead.length>0){this.dataOfRead.splice(0,this.dataOfRead.length)}await this.realRead();const t=e?.timeout??5e3;const n=+new Date;while(true){const e=+new Date;if(e-n>t){return new Uint8Array([])}if(this.dataOfRead.length==0){await o.default.set(100);continue}const r=this.dataOfRead.pop();const i=r.value;return new Uint8Array(i)}}async write(e){return new Promise(((t,n)=>{s.default.writeBLECharacteristicValue({deviceId:this.device.deviceId,serviceId:this.scpair.service.uuid,characteristicId:this.scpair.write.uuid,value:e.buffer,success:e=>{if(e.errMsg.indexOf("ok")==-1){n(e.errMsg);return}t()},fail:e=>n(e)})}))}flush(){this.dataOfRead.splice(0,this.dataOfRead.length)}}t.TaroBleConnectedDevice=TaroBleConnectedDevice},926:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(239),t);i(n(61),t)},61:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.TaroBleBluetooth=void 0;const i=n(397);const o=n(833);const s=r(n(302));const a=n(239);const c=r(n(162));class TaroBleBluetooth extends i.Jluetooth{options;discoveredCallback;connectedDevice;constructor(e){super();this.options=e;this.onBluetoothDeviceFound()}isConnected(){if(!this.connectedDevice)return false;return this.connectedDevice.connectionState()===o.ConnectionState.CONNECTED}async bluetoothAdapterState(){return new Promise(((e,t)=>{c.default.getBluetoothAdapterState({success:t=>e(t),fail:e=>t(e)})}))}async connect(e,t){if(this.isConnected()){if(!(t?.autoSwitchDevice??false)){return this.connectedDevice}await this.connectedDevice.disconnect()}const n=e.origin;await this.createBLEConnection({deviceId:n.deviceId,timeout:t?.timeout});await s.default.set(500);const r=await this.getBLEDeviceServices({deviceId:n.deviceId});const i=await this.findSCPair({deviceId:n.deviceId,services:r});if(!i){return Promise.reject(`Can not get write characteristic by device: ${e.name}`)}this.connectedDevice=new a.TaroBleConnectedDevice({device:n,scpair:i});await this.stopDiscovery();return Promise.resolve(this.connectedDevice)}discovered(e){this.discoveredCallback=e}async startDiscovery(){await this.requestLocation();await this.closeBluetoothAdapter();await s.default.set(300);await this.openBluetoothAdapter();const e=await this.bluetoothAdapterState();if(!e.available){await s.default.set(500)}if(e.discovering){await this.stopDiscovery();await s.default.set(500)}return new Promise(((e,t)=>{c.default.startBluetoothDevicesDiscovery({allowDuplicatesKey:false,interval:0,success:()=>e(),fail:e=>t(e)})}))}async stopDiscovery(){return new Promise(((e,t)=>{c.default.stopBluetoothDevicesDiscovery({success:t=>e(t),fail:e=>t(e)})}))}async openBluetoothAdapter(){return new Promise(((e,t)=>{c.default.openBluetoothAdapter({success:n=>{if(n.errMsg&&n.errMsg.indexOf("ok")==-1){t(n);return}e()},fail:e=>t(e)})}))}async closeBluetoothAdapter(){return new Promise(((e,t)=>{c.default.closeBluetoothAdapter({success:n=>{if(n.errMsg&&n.errMsg.indexOf("ok")==-1){t(n);return}e()},fail:e=>t(e)})}))}onBluetoothDeviceFound(){c.default.onBluetoothDeviceFound((async e=>{const t=e.devices;if(!t.length){return}const n=t.filter((e=>{const t=e.name||e.localName;if(t)return true;return this.options?.allowNoName??true})).map((e=>new i.JluetoothDevice({origin:e,name:e.name||e.localName,deviceId:e.deviceId})));if(!n.length){return}if(this.discoveredCallback){await this.discoveredCallback(n)}}))}async createBLEConnection(e){return new Promise(((t,n)=>{c.default.createBLEConnection({deviceId:e.deviceId,timeout:e.timeout,success:()=>t(),fail:e=>n(e)})}))}async getBLEDeviceServices(e){return new Promise(((t,n)=>{c.default.getBLEDeviceServices({deviceId:e.deviceId,success:e=>{if(e.errMsg.indexOf("ok")==-1){n(e.errMsg);return}t(e.services)},fail:e=>n(e)})}))}async getBLEDeviceCharacteristics(e){return new Promise(((t,n)=>{c.default.getBLEDeviceCharacteristics({deviceId:e.deviceId,serviceId:e.serviceId,success:e=>{if(e.errMsg.indexOf("ok")==-1){n(e.errMsg);return}t(e.characteristics)},fail:e=>n(e)})}))}async requestLocation(){return new Promise(((e,t)=>{c.default.getLocation({success:()=>e(),fail:e=>t(e)})}))}async findSCPair(e){const t=new Map;for(const n of e.services){const r=await this.getBLEDeviceCharacteristics({deviceId:e.deviceId,serviceId:n.uuid});t.set(n.uuid,r)}if(this.options?.allowedWriteCharacteristic&&this.options?.allowedReadCharacteristic){for(const n of e.services){if(!i.TBluetoothHelpers.isAllowServices(n.uuid,this.options?.allowServices)){continue}const e=t.get(n.uuid);let r=null;let o=null;for(const t of e){if(this.options?.allowedWriteCharacteristic.toLowerCase()==t.uuid.toLowerCase()){r=t}}for(const t of e){if(this.options?.allowedReadCharacteristic.toLowerCase()==t.uuid.toLowerCase()){o=t}}if(r!=null&&o!=null){return{service:n,write:r,read:o}}}}for(const n of e.services){if(!i.TBluetoothHelpers.isAllowServices(n.uuid,this.options?.allowServices)){continue}const e=t.get(n.uuid);const r=e.find((e=>{const t=e.properties;return t.write&&t.notify}));if(r){return{service:n,write:r,read:r}}}if(this.options?.allowDetectDifferentCharacteristic??true){for(const n of e.services){if(!i.TBluetoothHelpers.isAllowServices(n.uuid,this.options?.allowServices)){continue}const e=t.get(n.uuid);const r=e.find((e=>{const t=e.properties;return t.write}));const o=e.find((e=>{const t=e.properties;return t.notify}));if(r&&o){return{service:n,write:r,read:o}}}}else{for(const n of e.services){if(!i.TBluetoothHelpers.isAllowServices(n.uuid,this.options?.allowServices)){continue}const e=t.get(n.uuid);const r=e.find((e=>{const t=e.properties;return t.write}));if(r){return{service:n,write:r}}}}}}t.TaroBleBluetooth=TaroBleBluetooth},546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TBluetoothHelpers=void 0;const r=n(60);class TBluetoothHelpers{static isAllowService(e,t){return this.isAllowServices(e,t&&[t])}static isAllowServices(e,t){if(t==undefined)return true;for(const n of t){const t=n.rule??r.AllowRule.EQUALS;switch(t){case r.AllowRule.EQUALS:{if(e==n.uuid)return true;break}case r.AllowRule.START_WITH:{if(e.startsWith(n.uuid))return true;break}case r.AllowRule.END_WITH:{if(e.endsWith(n.uuid))return true;break}case r.AllowRule.REGEX:{if(new RegExp(n.uuid).test(e))return true;break}}}}}t.TBluetoothHelpers=TBluetoothHelpers},397:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(11),t);i(n(60),t);i(n(546),t)},11:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Jluetooth=void 0;class Jluetooth{async isDiscovery(){const e=await this.bluetoothAdapterState();return e.discovering||false}}t.Jluetooth=Jluetooth},60:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AllowRule=t.JluetoothDevice=void 0;class JluetoothDevice{origin;name;deviceId;constructor(e){this.origin=e.origin;this.name=e.name;this.deviceId=e.deviceId}}t.JluetoothDevice=JluetoothDevice;var n;(function(e){e["EQUALS"]="EQUALS";e["START_WITH"]="START_WITH";e["END_WITH"]="END_WITH";e["REGEX"]="REGEX"})(n||(t.AllowRule=n={}))},245:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FakeConnectedDevice=void 0;const r=n(569);const i=n(932);class FakeConnectedDevice{origin(){return"FAKE-DEVICE"}connectionState(){return r.ConnectionState.CONNECTED}deviceName(){return"FAKE-DEVICE"}async disconnect(){}canRead(){return true}async read(e){return i.PsdkConst.EMPTY_BYTES}async write(e){console.log("WRITE: ",e)}flush(){}}t.FakeConnectedDevice=FakeConnectedDevice},324:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(245),t);i(n(569),t)},569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReadOptions=t.WroteReporter=t.ConnectionState=void 0;var n;(function(e){e["CONNECTED"]="CONNECTED";e["DISCONNECTED"]="DISCONNECTED"})(n||(t.ConnectionState=n={}));class WroteReporter{ok;binary;controlExit;exception;constructor(e,t,n,r){this.ok=e;this.binary=t;this.controlExit=n;this.exception=r}}t.WroteReporter=WroteReporter;class ReadOptions{timeout;constructor(e){this.timeout=e?.timeout}}t.ReadOptions=ReadOptions},555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PSDK=void 0;const r=n(482);const i=n(783);class PSDK{sversion(){return"0.2.67"}authors(){return r.PsdkConst.DEF_AUTHORS}raw(e){this.commander().pushArg(e);return this}variable(e,t){this.commander().variable(e,t);return this}command(){return this.commander().command()}clear(){this.commander().clear();return this}async write(e){const t=this.connectedDevice();if(!t)throw Error("It's seems you missing to set connectedDevice");e=e??r.WriteOptions.def();const n=this.command();const o=n.binary();const s=new i.DataWriteOperation(e,o,t);const a=await s.write();this.clear();return a}newline(){this.commander().newline();return this}push(e){this.commander().pushArg(e);return this}}t.PSDK=PSDK},101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BasicArg=void 0;const r=n(482);class BasicArg{newline(){return r.PsdkConst.DEF_ENABLED_NEWLINE}}t.BasicArg=BasicArg},12:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.OnlyTextHeaderArg=t.OnlyBinaryHeaderArg=t.EasyArg=void 0;const r=n(101);const i=n(623);class EasyArg extends r.BasicArg{prependClauses;appendClauses;constructor(){super();this.prependClauses=[];this.appendClauses=[]}append(e){this.appendClauses.push(...e.clauses());return this}prepend(e){this.prependClauses.push(...e.clauses());return this}clauses(){const e=this.clause();const t=[];if(e.type!==i.ClauseType.NONE){t.push(e);if(this.newline()){t.push(i.CommandClause.newline())}}return[...this.prependClauses,...t,...this.appendClauses]}clear(){this.prependClauses.splice(0,this.prependClauses.length);this.appendClauses.splice(0,this.appendClauses.length)}}t.EasyArg=EasyArg;class OnlyBinaryHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return i.CommandClause.binary(this.header())}newline(){return false}}t.OnlyBinaryHeaderArg=OnlyBinaryHeaderArg;class OnlyTextHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return i.CommandClause.text(this.header())}}t.OnlyTextHeaderArg=OnlyTextHeaderArg},666:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RawMode=t.Raw=void 0;const r=n(12);const i=n(623);const o=n(482);class Raw extends r.EasyArg{_mode;_text;_charset;_binary;_newline=o.PsdkConst.DEF_ENABLED_NEWLINE;constructor(){super()}static text(e,t){const n=new Raw;n._mode=s.TEXT;n._text=e;n._charset=t?.charset??o.PsdkConst.DEF_CHARSET;n._newline=t?.newline??o.PsdkConst.DEF_ENABLED_NEWLINE;return n}static binary(e,t){const n=new Raw;n._mode=s.BINARY;n._binary=e;n._charset=t?.charset??o.PsdkConst.DEF_CHARSET;n._newline=t?.newline??o.PsdkConst.DEF_ENABLED_NEWLINE;return n}append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){let e;switch(this._mode){case s.TEXT:e=i.CommandClause.text(this._text,this._charset);break;case s.BINARY:e=i.CommandClause.binary(this._binary);break;default:e=i.CommandClause.none();break}return e}header(){return o.PsdkConst.EMPTY_BYTES}newline(){return this._newline}}t.Raw=Raw;var s;(function(e){e["BINARY"]="BINARY";e["TEXT"]="TEXT"})(s||(t.RawMode=s={}))},146:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(101),t);i(n(12),t);i(n(666),t)},623:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(247),t);i(n(392),t);i(n(211),t);i(n(718),t);i(n(839),t);i(n(410),t)},247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DefaultCommand=t.BasicCommand=void 0;const r=n(482);const i=n(423);const o=n(211);const s=n(6);class BasicCommand{base64(){return i.Base64.fromUint8Array(this.binary())}}t.BasicCommand=BasicCommand;class DefaultCommand extends BasicCommand{bytes;constructor(e,t){super();let n=[];for(const i of e){switch(i.type){case o.ClauseType.TEXT:const e=s.PVariableKit.replace(i.text,t);const a=s.FastGBK.encode(e);const c=Array.prototype.slice.call(a,0);n=n.concat(c);break;case o.ClauseType.NEWLINE:case o.ClauseType.BINARY:const l=Array.from(i.binary??r.PsdkConst.EMPTY_BYTES);n=n.concat(l);break}}this.bytes=new Uint8Array(n)}binary(){return this.bytes}hex(e){return(e??r.HexOutput.def()).format(this.binary())}string(e){return s.FastGBK.decode(this.binary())}}t.DefaultCommand=DefaultCommand},211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CommandClause=t.ClauseType=void 0;const r=n(482);var i;(function(e){e["TEXT"]="TEXT";e["BINARY"]="BINARY";e["NEWLINE"]="NEWLINE";e["NONE"]="NONE"})(i||(t.ClauseType=i={}));class CommandClause{_type;_text;_charset;_binary;constructor(e,t,n,r){this._type=e;this._text=t;this._charset=n;this._binary=r}static text(e,t=r.PsdkConst.DEF_CHARSET){return new CommandClause(i.TEXT,e,t,undefined)}static binary(e){return new CommandClause(i.BINARY,undefined,undefined,e)}static newline(){return new CommandClause(i.NEWLINE,undefined,undefined,r.PsdkConst.DEF_NEWLINE_BINARY)}static none(){return new CommandClause(i.NONE,undefined,undefined,undefined)}get type(){return this._type}get text(){return this._text}get charset(){return this._charset}get binary(){return this._binary}}t.CommandClause=CommandClause},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Commander=void 0;const r=n(211);const i=n(482);const o=n(247);class Commander{clauses;_variable;constructor(){this.clauses=[];this._variable=new Map}static make(){return new Commander}pushText(e,t){if(e.startsWith(i.PsdkConst.CRLF)){e=e.substring(2)}const n=r.CommandClause.text(e,t?.charset??i.PsdkConst.DEF_CHARSET);return this.pushClause(n,t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE)}pushBinary(e,t){const n=r.CommandClause.binary(e);return this.pushClause(n,t??i.PsdkConst.DEF_ENABLED_NEWLINE)}pushClause(e,t){this.clauses.push(e);if(t??i.PsdkConst.DEF_ENABLED_NEWLINE){this.clauses.push(r.CommandClause.newline())}return this}pushClauses(e){e.forEach((e=>this.pushClause(e,false)));return this}pushArg(e){this.pushClauses(e.clauses());return this}newline(){const e=r.CommandClause.newline();return this.pushClause(e,false)}variable(e,t){this._variable.set(e,t);return this}clear(){this.clauses.splice(0,this.clauses.length);this._variable.clear();return this}command(){return new o.DefaultCommand(this.clauses,this._variable)}}t.Commander=Commander},718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TextAppendat=t.Appendat=void 0;const r=n(6);class Appendat{_argument;_condition;_callback;constructor(e,t,n){this._argument=e;this._condition=t;this._callback=n}get condition(){return this._condition}callback(e){this._callback=e;return this}quote(){return this}argument(){if(!r.Checker.truthy(this._callback))return this._argument;if(!r.Checker.truthy(this._argument))return undefined;return this._callback.callback(this._argument)}}t.Appendat=Appendat;class TextAppendat extends Appendat{_quote;constructor(e,t,n){super(e,t??true,n);this._quote=false}static create(e,t){return new TextAppendat(e,t?.condition??true,new class{callback(e){const n=t?.callback;if(n){return n(e)}return e}})}callback(e){super.callback(e);return this}quote(){this._quote=true;return this}argument(){const e=super.argument();if(!r.Checker.truthy(e))return this._quote?'""':"";if(this._quote){return`"${e}"`}return e}}t.TextAppendat=TextAppendat},839:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BinaryCommand=void 0;const r=n(211);const i=n(6);class BinaryCommand{binary;constructor(e){this.binary=e??[]}static make(){return new BinaryCommand}static with(e){const t=Array.from(e);return new BinaryCommand(t)}appendNumber(e){this.binary.push(e);return this}appendText(e,t){const n=i.FastGBK.encode(e);this.binary.push(...n);return this}appendU8A(e){const t=Array.from(e);this.binary=this.binary.concat(t);return this}output(){return new Uint8Array(this.binary)}clause(){const e=this.output();return r.CommandClause.binary(e)}}t.BinaryCommand=BinaryCommand},410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TSPLCommand=t.CPCLCommand=t.SingleCommand=void 0;const r=n(718);const i=n(211);const o=n(6);class SingleCommand{_arguments;_symbolAfterHeader;_symbolBetweenArguments;_header;_charset;constructor(e,t,n){this._arguments=[];this._symbolAfterHeader=e;this._symbolBetweenArguments=t;this._charset=n}get getHeader(){return this._header}get symbolAfterHeader(){return this._symbolAfterHeader}get symbolBetweenArguments(){return this._symbolBetweenArguments}header(e){this._header=e;return this}get charset(){return this._charset}append(e){if(!e.condition)return this;const t=e.argument();if(!o.Checker.truthy(t))return this;this._arguments.push(t);return this}arguments(){return this._arguments}}t.SingleCommand=SingleCommand;class BasicStringSingleCommand extends SingleCommand{constructor(e,t,n){super(e,t,n)}append(e){const t=e.argument();if(!o.Checker.truthy(t))return this;super.append(e);return this}appendText(e){return this.append(r.TextAppendat.create(e??"",{}))}appendNumber(e){if(isNaN(e))return this;return this.append(r.TextAppendat.create((e??"").toString(),{}))}output(){let e="";if(o.Checker.truthy(super.getHeader)){e+=super.getHeader;e+=super.symbolAfterHeader}const t=super.arguments();const n=t.length;let r=0;for(const i of t){r+=1;if(!o.Checker.truthy(i))continue;e+=i;if(r<n){e+=super.symbolBetweenArguments}}return e}clause(){const e=this.output();if(!o.Checker.truthy(e)){return i.CommandClause.none()}return i.CommandClause.text(e,super.charset)}}class CPCLCommand extends BasicStringSingleCommand{constructor(e,t){super(" "," ",t);super.header(e)}static with(e,t){return new CPCLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.CPCLCommand=CPCLCommand;class TSPLCommand extends BasicStringSingleCommand{constructor(e,t){super(" ",",",t);super.header(e)}static with(e,t){return new TSPLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.TSPLCommand=TSPLCommand},783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DataWriteOperation=void 0;const r=n(482);const i=n(324);const o=n(6);class DataWriteOperation{options;binary;connectedDevice;constructor(e,t,n){this.options=e;this.binary=t;this.connectedDevice=n}async write(){if(!this.options.enableChunkWrite){const e=await this.writData(this.binary);this.doCallback(e,this.binary,1,1);return e}const e=Array.from(this.binary);const t=o.CollectionKit.split(e,this.options.chunkSize);const n=t.length;let s=0;for(const e of t){s+=1;const t=new Uint8Array(e);const i=await this.writData(t);const o=this.doCallback(i,t,s,n);if(o==r.WriteControl.STOP){i.controlExit=true;return i}if(!i.ok){return i}}return new i.WroteReporter(true,this.binary,false)}doCallback(e,t,n,i){const o=this.options.callback;if(!o)return r.WriteControl.CONTINUE;const s=new r.DataWrote(t,n,i);if(e.ok){return o.success(s)}if(o.failed){o.failed(s,e.exception)}else{console.log("no custom failed callback, full exception: ",e.exception)}return r.WriteControl.STOP}async writData(e){try{await this.connectedDevice.write(e);return new i.WroteReporter(true,e,false)}catch(t){return new i.WroteReporter(false,e,false,t)}}}t.DataWriteOperation=DataWriteOperation},932:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(146),t);i(n(482),t);i(n(623),t);i(n(555),t)},831:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HexOutput=void 0;const n=32;class HexOutput{enableFormat;spacing;maxLengthOfLine;constructor(e,t,r=n){this.enableFormat=e;this.spacing=t;this.maxLengthOfLine=r}static def(){return new HexOutput(false,false,n)}static simple(e=true){return new HexOutput(e,true,n)}static formatWithMaxLength(e){return new HexOutput(true,true,e)}format(e){const t=Array.from(e,(function(e){return("0"+(e&255).toString(16)).slice(-2)})).join("");if(!this.enableFormat){return t}let n="";const r=t.length;let i=0;for(let e=0;e<r;e++){const o=e+1;const s=t[e];n+=s;if(o%2==0&&this.spacing){if(o<r){if(i+1<this.maxLengthOfLine){n+=" "}i+=1}}if(i>=this.maxLengthOfLine){n+="\n";i=0}}return n}}t.HexOutput=HexOutput},482:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(164),t);i(n(831),t);i(n(331),t);i(n(614),t)},614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Lifecycle=void 0;class Lifecycle{connectedDevice;constructor(e){this.connectedDevice=e}}t.Lifecycle=Lifecycle},164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PsdkConst=void 0;const r=n(6);const i="\r";const o="\n";const s=`${i}${o}`;t.PsdkConst={DEF_CHARSET:"gbk",CR:i,LF:o,CRLF:s,QUOTE:'"',DEF_NEWLINE_BINARY:r.ByteKit.textToU8A(s),DEF_AUTHORS:["fewensa <osuni@protonmail.com>"],DEF_ENABLED_NEWLINE:true,DEF_WRITE_CHUNK_SIZE:512,EMPTY_BYTES:new Uint8Array([])}},331:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WriteControl=t.DataWrote=t.DataWrite=t.IDataWriteCallback=t.WriteOptions=void 0;const r=n(164);class WriteOptions{enableChunkWrite;chunkSize;callback;constructor(e=true,t=r.PsdkConst.DEF_WRITE_CHUNK_SIZE,n){this.enableChunkWrite=e;this.chunkSize=t;this.callback=n}static def(){return new WriteOptions(true,r.PsdkConst.DEF_WRITE_CHUNK_SIZE,undefined)}}t.WriteOptions=WriteOptions;class IDataWriteCallback{failed(e,t){console.error(`Write data failed: ${t.message}`)}}t.IDataWriteCallback=IDataWriteCallback;class DataWrite{binary;currentTimes;totalTimes;constructor(e,t,n){this.binary=e;this.currentTimes=t;this.totalTimes=n}}t.DataWrite=DataWrite;class DataWrote extends DataWrite{}t.DataWrote=DataWrote;var i;(function(e){e["CONTINUE"]="CONTINUE";e["STOP"]="STOP"})(i||(t.WriteControl=i={}))},833:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(324),t);i(n(932),t);i(n(6),t)},423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Base64=t.extendBuiltins=t.extendUint8Array=t.extendString=t.toUint8Array=t.fromUint8Array=t.isValid=t.decode=t.btou=t.encodeURL=t.encodeURI=t.encode=t.utob=t.toBase64=t.fromBase64=t.btoaPolyfill=t.btoa=t.atobPolyfill=t.atob=t.VERSION=t.version=void 0;const n="3.7.7";t.version=n;const r=n;t.VERSION=r;const i=typeof Buffer==="function";const o=typeof TextDecoder==="function"?new TextDecoder:undefined;const s=typeof TextEncoder==="function"?new TextEncoder:undefined;const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const c=Array.prototype.slice.call(a);const l=(e=>{let t={};e.forEach(((e,n)=>t[e]=n));return t})(c);const u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;const h=String.fromCharCode.bind(String);const d=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0));const _mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>e=="+"?"-":"_"));const _tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");const btoaPolyfill=e=>{let t,n,r,i,o="";const s=e.length%3;for(let 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");t=n<<16|r<<8|i;o+=c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[t&63]}return s?o.slice(0,s-3)+"===".substring(s):o};t.btoaPolyfill=btoaPolyfill;const f=typeof btoa==="function"?e=>btoa(e):i?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill;t.btoa=f;const p=i?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let n=[];for(let r=0,i=e.length;r<i;r+=t){n.push(h.apply(null,e.subarray(r,r+t)))}return f(n.join(""))};const fromUint8Array=(e,t=false)=>t?_mkUriSafe(p(e)):p(e);t.fromUint8Array=fromUint8Array;const cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?h(192|t>>>6)+h(128|t&63):h(224|t>>>12&15)+h(128|t>>>6&63)+h(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return h(240|t>>>18&7)+h(128|t>>>12&63)+h(128|t>>>6&63)+h(128|t&63)}};const m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;const utob=e=>e.replace(m,cb_utob);t.utob=utob;const g=i?e=>Buffer.from(e,"utf8").toString("base64"):s?e=>p(s.encode(e)):e=>f(utob(e));const encode=(e,t=false)=>t?_mkUriSafe(g(e)):g(e);t.toBase64=encode;t.encode=encode;const encodeURI=e=>encode(e,true);t.encodeURI=encodeURI;t.encodeURL=encodeURI;const v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;const cb_btou=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),n=t-65536;return h((n>>>10)+55296)+h((n&1023)+56320);case 3:return h((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return h((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}};const btou=e=>e.replace(v,cb_btou);t.btou=btou;const atobPolyfill=e=>{e=e.replace(/\s+/g,"");if(!u.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,i;for(let o=0;o<e.length;){t=l[e.charAt(o++)]<<18|l[e.charAt(o++)]<<12|(r=l[e.charAt(o++)])<<6|(i=l[e.charAt(o++)]);n+=r===64?h(t>>16&255):i===64?h(t>>16&255,t>>8&255):h(t>>16&255,t>>8&255,t&255)}return n};t.atobPolyfill=atobPolyfill;const b=typeof atob==="function"?e=>atob(_tidyB64(e)):i?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill;t.atob=b;const y=i?e=>d(Buffer.from(e,"base64")):e=>d(b(e).split("").map((e=>e.charCodeAt(0))));const toUint8Array=e=>y(_unURI(e));t.toUint8Array=toUint8Array;const _=i?e=>Buffer.from(e,"base64").toString("utf8"):o?e=>o.decode(y(e)):e=>btou(b(e));const _unURI=e=>_tidyB64(e.replace(/[-_]/g,(e=>e=="-"?"+":"/")));const decode=e=>_(_unURI(e));t.fromBase64=decode;t.decode=decode;const isValid=e=>{if(typeof e!=="string")return false;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)};t.isValid=isValid;const _noEnum=e=>({value:e,enumerable:false,writable:true,configurable:true});const extendString=function(){const _add=(e,t)=>Object.defineProperty(String.prototype,e,_noEnum(t));_add("fromBase64",(function(){return decode(this)}));_add("toBase64",(function(e){return encode(this,e)}));_add("toBase64URI",(function(){return encode(this,true)}));_add("toBase64URL",(function(){return encode(this,true)}));_add("toUint8Array",(function(){return toUint8Array(this)}))};t.extendString=extendString;const extendUint8Array=function(){const _add=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,_noEnum(t));_add("toBase64",(function(e){return fromUint8Array(this,e)}));_add("toBase64URI",(function(){return fromUint8Array(this,true)}));_add("toBase64URL",(function(){return fromUint8Array(this,true)}))};t.extendUint8Array=extendUint8Array;const extendBuiltins=()=>{extendString();extendUint8Array()};t.extendBuiltins=extendBuiltins;const E={version:n,VERSION:r,atob:b,atobPolyfill:atobPolyfill,btoa:f,btoaPolyfill:btoaPolyfill,fromBase64:decode,toBase64:encode,encode:encode,encodeURI:encodeURI,encodeURL:encodeURI,utob:utob,btou:btou,decode:decode,isValid:isValid,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array,extendString:extendString,extendUint8Array:extendUint8Array,extendBuiltins:extendBuiltins};t.Base64=E},659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ByteKit=void 0;const r=n(192);class ByteKit{static textToU8A(e){if(!r.Checker.truthy(e))return new Uint8Array([]);let t=[];let n,i;n=e.length;for(let r=0;r<n;r++){i=e.charCodeAt(r);if(i>=65536&&i<=1114111){t.push(i>>18&7|240);t.push(i>>12&63|128);t.push(i>>6&63|128);t.push(i&63|128)}else if(i>=2048&&i<=65535){t.push(i>>12&15|224);t.push(i>>6&63|128);t.push(i&63|128)}else if(i>=128&&i<=2047){t.push(i>>6&31|192);t.push(i&63|128)}else{t.push(i&255)}}return new Uint8Array(t)}}t.ByteKit=ByteKit},192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Checker=void 0;class Checker{static truthy(e){if(e===undefined)return false;if(e===null)return false;if(e==="")return false;const t=typeof e;switch(t){case"number":if(isNaN(e))return false;break;case"bigint":default:return true}}static empty(e){if(!Checker.truthy(e))return true;return e.length===0}}t.Checker=Checker},961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FastGBK=void 0;let n;function initGbkTable(){const e=[[161,169,161,254],[176,247,161,254],[129,160,64,254],[170,254,64,160],[168,169,64,160],[170,175,161,254],[248,254,161,254],[161,167,64,160]];const t=new Uint16Array(23940);let r=0;for(const[n,i,o,s]of e){for(let e=o;e<=s;e++){if(e!==127){for(let o=n;o<=i;o++){t[r++]=e<<8|o}}}}n=new Uint16Array(65536);n.fill(65535);const i=new TextDecoder("gbk").decode(t);for(let e=0;e<i.length;e++){n[i.charCodeAt(e)]=t[e]}}const defaultOnAlloc=e=>new Uint8Array(e);const defaultOnError=()=>63;const r=new TextDecoder("gbk");class FastGBK{static decode(e){return r.decode(e)}static encode(e,t){if(!n){initGbkTable()}const r=t?.onAlloc??defaultOnAlloc;const i=t?.onError??defaultOnError;const o=r(e.length*2);let s=0;for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);if(r<128){o[s++]=r;continue}const a=n[r];if(a!==65535){o[s++]=a;o[s++]=a>>8}else if(r===8364){o[s++]=128}else{const n=i(t,e);if(n===-1){break}if(n>255){o[s++]=n;o[s++]=n>>8}else{o[s++]=n}}}return o.subarray(0,s)}}t.FastGBK=FastGBK},6:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});i(n(659),t);i(n(925),t);i(n(329),t);i(n(973),t);i(n(192),t);i(n(961),t)},329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CollectionKit=void 0;const r=n(192);class CollectionKit{static split(e,t){if(r.Checker.empty(e))return[];if(t<=0)throw new Error("The size must > 0");const n=[];let i=[];for(const r of e){i.push(r);if(t==i.length){n.push(i);i=[]}}if(0!=i.length)n.push(i);return n}static parts(e,t){if(r.Checker.empty(e)){return[]}if(t<=0)throw new Error("The parts length must > 0");if(e.length<=t){return[e]}const n=[];let i=[];const o=Math.floor(e.length/t);for(const r of e){i.push(r);if(i.length==o){n.push(i);if(n.length<t)i=[]}}return n}}t.CollectionKit=CollectionKit},973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ImageKit=void 0;class ImageKit{static processImage(e,t,n){const r=e.getContext("2d");let i=Math.floor(t%8===0?t/8:t/8+1);let o=0;let s=0;const a=n*i;const c=[];for(let e=0;e<a;e++){c[e]=0}const l=r.getImageData(0,0,e.width,e.height);while(o<n){let e=0;for(let n=0;n<t;n++){e++;if(e>8){e=1;s++}const t=1<<8-e;const r=ImageKit.fastExtractPixel(l,n,o,1,1);const i=r[0];const a=i[0];const u=i[1];const h=i[2];if((a+u+h)/3<128){c[s]=c[s]|t}}s=i*(o+1);o+=1}return new Uint8Array(c)}static fastExtractPixel(e,t,n,r,i){let o,s;let a=[];let c,l,u,h;const d=e.data;for(s=0;s<i;s++){let i=(t+(n+s)*e.width)*4;for(o=0;o<r;o++){c=d[i++];l=d[i++];u=d[i++];h=d[i++];a.push([c,l,u,h])}}return a}}t.ImageKit=ImageKit},925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PVariableKit=void 0;const r=n(192);class PVariableKit{static replace(e,t){if(!r.Checker.truthy(e))return e;if(!r.Checker.truthy(t))return e;if(e.indexOf("{{")<0&&e.indexOf("}}")<0)return e;const n=/[\\]?\{\{(?<varx>.*?)}}/gm;const i="__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__";while(true){const r=n.exec(e);if(r==null)break;const o=r[0];const s=o.replace("{{","").replace("}}","");const a=s.trim();const c=t.get(a)??"";if(o.startsWith("\\")){const t=o.replace("\\{{",i);e=e.replace(o,t);continue}e=e.replace(o,c)}e=e.replace(new RegExp(i,"g"),"{{");return e}}t.PVariableKit=PVariableKit},173:(e,t,n)=>{"use strict";var r=n(517);var i=n(380);const o={WEAPP:"WEAPP",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",WEB:"WEB",RN:"RN",HARMONY:"HARMONY",QUICKAPP:"QUICKAPP",HARMONYHYBRID:"HARMONYHYBRID"};function getEnv(){if(process.env.TARO_ENV==="weapp"){return o.WEAPP}else if(process.env.TARO_ENV==="alipay"){return o.ALIPAY}else if(process.env.TARO_ENV==="swan"){return o.SWAN}else if(process.env.TARO_ENV==="tt"){return o.TT}else if(process.env.TARO_ENV==="jd"){return o.JD}else if(process.env.TARO_ENV==="qq"){return o.QQ}else if(process.env.TARO_ENV==="harmony-hybrid"){return o.HARMONYHYBRID}else if(process.env.TARO_ENV==="h5"||process.env.TARO_PLATFORM==="web"){return o.WEB}else if(process.env.TARO_ENV==="rn"){return o.RN}else if(process.env.TARO_ENV==="harmony"||process.env.TARO_PLATFORM==="harmony"){return o.HARMONY}else if(process.env.TARO_ENV==="quickapp"){return o.QUICKAPP}else{return process.env.TARO_ENV||"Unknown"}}class Chain{constructor(e,t,n){this.index=n||0;this.requestParams=e||{};this.interceptors=t||[]}proceed(e={}){this.requestParams=e;if(this.index>=this.interceptors.length){throw new Error("chain 参数错误, 请勿直接修改 request.chain")}const t=this._getNextInterceptor();const n=this._getNextChain();const r=t(n);const o=r.catch((e=>Promise.reject(e)));Object.keys(r).forEach((e=>i.isFunction(r[e])&&(o[e]=r[e])));return o}_getNextInterceptor(){return this.interceptors[this.index]}_getNextChain(){return new Chain(this.requestParams,this.interceptors,this.index+1)}}class Link{constructor(e){this.taroInterceptor=e;this.chain=new Chain}request(e){const t=this.chain;const n=this.taroInterceptor;t.interceptors=t.interceptors.filter((e=>e!==n)).concat(n);return t.proceed(Object.assign({},e))}addInterceptor(e){this.chain.interceptors.push(e)}cleanInterceptors(){this.chain=new Chain}}function interceptorify(e){return new Link((function(t){return e(t.requestParams)}))}function timeoutInterceptor(e){const t=e.requestParams;let n;const r=new Promise(((r,i)=>{const o=setTimeout((()=>{clearTimeout(o);i(new Error("网络链接超时,请稍后再试!"))}),t&&t.timeout||6e4);n=e.proceed(t);n.then((e=>{if(!o)return;clearTimeout(o);r(e)})).catch((e=>{o&&clearTimeout(o);i(e)}))}));if(!i.isUndefined(n)&&i.isFunction(n.abort))r.abort=n.abort;return r}function logInterceptor(e){const t=e.requestParams;const{method:n,data:r,url:o}=t;console.log(`http ${n||"GET"} --\x3e ${o} data: `,r);const s=e.proceed(t);const a=s.then((e=>{console.log(`http <-- ${o} result:`,e);return e}));if(i.isFunction(s.abort))a.abort=s.abort;return a}var s=Object.freeze({__proto__:null,logInterceptor:logInterceptor,timeoutInterceptor:timeoutInterceptor});function Behavior(e){return e}function getPreload(e){return function(t,n){e.preloadData=i.isObject(t)?t:{[t]:n}}}const a=750;const c={640:2.34/2,750:1,828:1.81/2};const l=20;const u=5;const h="rpx";function getInitPxTransform(e){return function(t){const{designWidth:n=a,deviceRatio:r=c,baseFontSize:i=l,targetUnit:o=h,unitPrecision:s=u}=t;e.config=e.config||{};e.config.designWidth=n;e.config.deviceRatio=r;e.config.baseFontSize=i;e.config.targetUnit=o;e.config.unitPrecision=s}}function getPxTransform(e){return function(t){const n=e.config||{};const r=n.baseFontSize;const o=n.deviceRatio||c;const s=((e=0)=>i.isFunction(n.designWidth)?n.designWidth(e):n.designWidth||a)(t);if(!(s in o)){throw new Error(`deviceRatio 配置中不存在 ${s} 的设置!`)}const l=n.targetUnit||h;const d=n.unitPrecision||u;const f=~~t;let p=1/o[s];switch(l){case"rem":p*=r*2;break;case"px":p*=2;break}let m=f/p;if(d>=0&&d<=100){m=Number(m.toFixed(d))}return m+l}}const d={Behavior:Behavior,getEnv:getEnv,ENV_TYPE:o,Link:Link,interceptors:s,Current:r.Current,getCurrentInstance:r.getCurrentInstance,options:r.options,nextTick:r.nextTick,eventCenter:r.eventCenter,Events:r.Events,getInitPxTransform:getInitPxTransform,interceptorify:interceptorify};d.initPxTransform=getInitPxTransform(d);d.preload=getPreload(r.Current);d.pxTransform=getPxTransform(d);e.exports=d},517:(e,t,n)=>{"use strict";n.r(t);n.d(t,{A:()=>Ne,APP:()=>K,BEHAVIORS:()=>ke,BODY:()=>Y,CATCHMOVE:()=>Ee,CATCH_VIEW:()=>Te,CHANGE:()=>le,CLASS:()=>X,COMMENT:()=>we,COMPILE_MODE:()=>_e,CONFIRM:()=>pe,CONTAINER:()=>q,CONTEXT_ACTIONS:()=>xe,CURRENT_TARGET:()=>de,CUSTOM_WRAPPER:()=>ue,Current:()=>Jt,DATASET:()=>oe,DATE:()=>be,DOCUMENT_ELEMENT_NAME:()=>G,DOCUMENT_FRAGMENT:()=>Q,EVENT_CALLBACK_RESULT:()=>Re,EXTERNAL_CLASSES:()=>Ie,Events:()=>r.Events,FOCUS:()=>ee,FormElement:()=>FormElement,HEAD:()=>V,HOOKS_APP_ID:()=>F,HTML:()=>$,History:()=>zt,ID:()=>z,INPUT:()=>ce,KEY_CODE:()=>ge,Location:()=>un,MutationObserver:()=>De,OBJECT:()=>se,ON_HIDE:()=>Se,ON_LOAD:()=>Oe,ON_READY:()=>Ce,ON_SHOW:()=>Pe,OPTIONS:()=>Ae,PAGE_INIT:()=>H,PROPERTY_THRESHOLD:()=>M,PROPS:()=>ie,PURE_VIEW:()=>re,ROOT_STR:()=>W,SET_DATA:()=>U,SET_TIMEOUT:()=>ye,STATIC_VIEW:()=>ne,STYLE:()=>Z,SVGElement:()=>SVGElement,Style:()=>Style,TARGET:()=>he,TARO_RUNTIME:()=>j,TIME_STAMP:()=>me,TOUCHMOVE:()=>ve,TYPE:()=>fe,TaroElement:()=>TaroElement,TaroEvent:()=>TaroEvent,TaroNode:()=>TaroNode,TaroRootElement:()=>TaroRootElement,TaroText:()=>TaroText,UID:()=>J,URL:()=>Ft,URLSearchParams:()=>Nt,VALUE:()=>ae,VIEW:()=>te,addLeadingSlash:()=>addLeadingSlash,cancelAnimationFrame:()=>yn,createComponentConfig:()=>createComponentConfig,createEvent:()=>createEvent,createPageConfig:()=>createPageConfig,createRecursiveComponentConfig:()=>createRecursiveComponentConfig,document:()=>Ut,env:()=>Ue,eventCenter:()=>Wt,eventHandler:()=>eventHandler,eventSource:()=>Fe,getComputedStyle:()=>Ht,getCurrentInstance:()=>getCurrentInstance,getCurrentPage:()=>getCurrentPage,getHomePage:()=>getHomePage,getOnHideEventKey:()=>getOnHideEventKey,getOnReadyEventKey:()=>getOnReadyEventKey,getOnShowEventKey:()=>getOnShowEventKey,getPageInstance:()=>getPageInstance,getPath:()=>getPath,handlePolyfill:()=>handlePolyfill,hasBasename:()=>hasBasename,history:()=>Tn,hooks:()=>r.hooks,hydrate:()=>hydrate,incrementId:()=>incrementId,injectPageInstance:()=>injectPageInstance,isHasExtractProp:()=>isHasExtractProp,location:()=>En,navigator:()=>mn,nextTick:()=>nextTick,now:()=>gn,options:()=>ct,parseUrl:()=>parseUrl,removePageInstance:()=>removePageInstance,requestAnimationFrame:()=>bn,safeExecute:()=>safeExecute,stringify:()=>stringify,stripBasename:()=>stripBasename,stripSuffix:()=>stripSuffix,stripTrailing:()=>stripTrailing,window:()=>_n});var r=n(380);var i=n(36);const{__extends:o,__assign:s,__rest:a,__decorate:c,__param:l,__esDecorate:u,__runInitializers:h,__propKey:d,__setFunctionName:f,__metadata:p,__awaiter:m,__generator:g,__exportStar:v,__createBinding:b,__values:y,__read:_,__spread:E,__spreadArrays:T,__spreadArray:w,__await:O,__asyncGenerator:C,__asyncDelegator:P,__asyncValues:S,__makeTemplateObject:A,__importStar:I,__importDefault:R,__classPrivateFieldGet:k,__classPrivateFieldSet:N,__classPrivateFieldIn:x,__addDisposableResource:L,__disposeResources:B}=i;const D=null&&tslib;const M=2046;const j="Taro runtime";const F="taro-app";const U="小程序 setData";const H="页面初始化";const W="root";const $="html";const V="head";const Y="body";const K="app";const q="container";const G="#document";const Q="document-fragment";const z="id";const J="uid";const X="class";const Z="style";const ee="focus";const te="view";const ne="static-view";const re="pure-view";const ie="props";const oe="dataset";const se="object";const ae="value";const ce="input";const le="change";const ue="custom-wrapper";const he="target";const de="currentTarget";const fe="type";const pe="confirm";const me="timeStamp";const ge="keyCode";const ve="touchmove";const be="Date";const ye="setTimeout";const _e="compileMode";const Ee="catchMove";const Te="catch-view";const we="comment";const Oe="onLoad";const Ce="onReady";const Pe="onShow";const Se="onHide";const Ae="options";const Ie="externalClasses";const Re="e_result";const ke="behaviors";const Ne="a";var xe;(function(e){e["INIT"]="0";e["RESTORE"]="1";e["RECOVER"]="2";e["DESTORY"]="3"})(xe||(xe={}));const Le=[];class MutationObserverImpl{constructor(e){this.records=[];this.callback=e}observe(e,t){this.disconnect();this.target=e;this.options=t||{};Le.push(this)}disconnect(){this.target=null;const e=Le.indexOf(this);if(e>=0){Le.splice(e,1)}}takeRecords(){return this.records.splice(0,this.records.length)}}const sidMatches=(e,t)=>!!e&&e.sid===(t===null||t===void 0?void 0:t.sid);const isConcerned=(e,t)=>{const{characterData:n,characterDataOldValue:r,attributes:i,attributeOldValue:o,childList:s}=t;switch(e.type){case"characterData":if(n){if(!r)e.oldValue=null;return true}return false;case"attributes":if(i){if(!o)e.oldValue=null;return true}return false;case"childList":if(s){return true}return false}};let Be=false;function logMutation(e,t){e.records.push(t);if(!Be){Be=true;Promise.resolve().then((()=>{Be=false;Le.forEach((e=>e.callback(e.takeRecords())))}))}}function recordMutation(e){Le.forEach((t=>{const{options:n}=t;for(let r=e.target;r;r=r.parentNode){if(sidMatches(t.target,r)&&isConcerned(e,n)){logMutation(t,e);break}if(!n.subtree)break}}))}let De=class MutationObserver{constructor(e){if(ENABLE_MUTATION_OBSERVER){this.core=new MutationObserverImpl(e)}else{if(process.env.NODE_ENV!=="production"){console.warn("[Taro Warning] 若要使用 MutationObserver,请在 Taro 编译配置中设置 'mini.runtime.enableMutationObserver: true'")}this.core={observe:r.noop,disconnect:r.noop,takeRecords:r.noop}}}observe(...e){this.core.observe(...e)}disconnect(){this.core.disconnect()}takeRecords(){return this.core.takeRecords()}static record(e){recordMutation(e)}};function throttle(e,t=250,n){let r=0;let i;return function(...o){const s=n||this;const a=Date.now();if(a-r>t){e.apply(this,o);r=a}else{clearTimeout(i);i=setTimeout((()=>{r=a;e.apply(s,o)}),t)}}}const incrementId=()=>{const e=[];for(let t=65;t<=90;t++){e.push(t)}for(let t=97;t<=122;t++){e.push(t)}const t=e.length-1;const n=[0,0];return()=>{const r=n.map((t=>e[t]));const i=String.fromCharCode(...r);let o=n.length-1;n[o]++;while(n[o]>t){n[o]=0;o=o-1;if(o<0){n.push(0);break}n[o]++}return i}};function isElement(e){return e.nodeType===1}function isText(e){return e.nodeType===3}function isComment(e){return e.nodeName===we}function isHasExtractProp(e){const t=Object.keys(e.props).find((e=>!(/^(class|style|id)$/.test(e)||e.startsWith("data-"))));return Boolean(t)}function isParentBinded(e,t){var n;while(e=(e===null||e===void 0?void 0:e.parentElement)||null){if(!e||e.nodeName===W||e.nodeName==="root-portal"){return false}else if((n=e.__handlers[t])===null||n===void 0?void 0:n.length){return true}}return false}function shortcutAttr(e){switch(e){case Z:return"st";case z:return J;case X:return"cl";default:return e}}const Me=new Map;function extend(e,t,n){if((0,r.isFunction)(n)){n={value:n}}Object.defineProperty(e.prototype,t,Object.assign({configurable:true,enumerable:true},n))}let je;function getComponentsAlias(){if(!je){je=(0,r.getComponentsAlias)(r.internalComponents)}return je}class ClassList{constructor(e,t){this.tokenList=[];this.el=t;e.trim().split(/\s+/).forEach((e=>this.tokenList.push(e)))}get value(){return this.toString()}get length(){return this.tokenList.length}add(){let e=0;let t=false;const n=arguments;const r=n.length;const i=this.tokenList;do{const r=n[e];if(this.checkTokenIsValid(r)&&!~i.indexOf(r)){i.push(r);t=true}}while(++e<r);if(t){this._update()}}remove(){let e=0;let t=false;const n=arguments;const r=n.length;const i=this.tokenList;do{const r=n[e]+"";if(!this.checkTokenIsValid(r))continue;const o=i.indexOf(r);if(~i.indexOf(r)){i.splice(o,1);t=true}}while(++e<r);if(t){this._update()}}contains(e){if(!this.checkTokenIsValid(e))return false;return!!~this.tokenList.indexOf(e)}toggle(e,t){const n=this.contains(e);const r=n?t!==true&&"remove":t!==false&&"add";if(r){this[r](e)}if(t===true||t===false){return t}else{return!n}}replace(e,t){if(!this.checkTokenIsValid(e)||!this.checkTokenIsValid(t))return;const n=this.tokenList.indexOf(e);if(~n){this.tokenList.splice(n,1,t);this._update()}}toString(){return this.tokenList.filter((e=>e!=="")).join(" ")}checkTokenIsValid(e){if(e===""||/\s/.test(e))return false;return true}_update(){this.el.className=this.value}}class EventSource extends Map{removeNode(e){const{sid:t,uid:n}=e;this.delete(t);if(n!==t&&n)this.delete(n)}removeNodeTree(e){this.removeNode(e);const{childNodes:t}=e;t.forEach((e=>this.removeNodeTree(e)))}}const Fe=new EventSource;const Ue={window:process.env.TARO_PLATFORM==="web"?window:r.EMPTY_OBJ,document:process.env.TARO_PLATFORM==="web"?document:r.EMPTY_OBJ};let He;let We;function hydrate(e){var t;We||(We=getComponentsAlias());He||(He=r.hooks.call("getSpecialNodes"));const n=e.nodeName;let i=null;if(isText(e)){return{sid:e.sid,["v"]:e.nodeValue,["nn"]:((t=We[n])===null||t===void 0?void 0:t._num)||"8"}}const o={["nn"]:n,sid:e.sid};if(e.uid!==e.sid){o.uid=e.uid}if(!e.isAnyEventBinded()&&He.indexOf(n)>-1){o["nn"]=`static-${n}`;if(n===te&&!isHasExtractProp(e)){o["nn"]=re}}const{props:s}=e;for(const e in s){const t=(0,r.toCamelCase)(e);if(!e.startsWith("data-")&&e!==X&&e!==Z&&e!==z&&t!==Ee&&t!==_e){o[t]=s[e]}if(process.env.TARO_ENV!=="swan"&&n===te&&t===Ee&&s[e]!==false){o["nn"]=Te}if(t===_e){i=s[e]}}o["cn"]=e.childNodes.filter((e=>!isComment(e))).map(hydrate);if(e.className!==""){o["cl"]=e.className}const a=e.cssText;if(a!==""&&n!=="swiper-item"){o["st"]=a}r.hooks.call("modifyHydrateData",o,e);const c=o["nn"];const l=We[c];if(l){o["nn"]=l._num;for(const e in o){if(e in l){o[l[e]]=o[e];delete o[e]}}}if(i!==null){o["nn"]=i}const u=r.hooks.call("transferHydrateData",o,e,l);return u||o}class TaroEventTarget{constructor(){this.__handlers={}}addEventListener(e,t,n){e=e.toLowerCase();r.hooks.call("onAddEvent",e,t,n,this);if(e==="regionchange"){this.addEventListener("begin",t,n);this.addEventListener("end",t,n);return}let i=Boolean(n);let o=false;if((0,r.isObject)(n)){i=Boolean(n.capture);o=Boolean(n.once)}if(o){const wrapper=function(){t.apply(this,arguments);this.removeEventListener(e,wrapper)};this.addEventListener(e,wrapper,Object.assign(Object.assign({},n),{once:false}));return}process.env.NODE_ENV!=="production"&&(0,r.warn)(i,"Taro 暂未实现 event 的 capture 特性。");const s=t;t=function(){return s.apply(this,arguments)};t.oldHandler=s;const a=this.__handlers[e];if((0,r.isArray)(a)){a.push(t)}else{this.__handlers[e]=[t]}}removeEventListener(e,t){e=e.toLowerCase();if(e==="regionchange"){this.removeEventListener("begin",t);this.removeEventListener("end",t);return}if(!t){return}const n=this.__handlers[e];if(!(0,r.isArray)(n)){return}const i=n.findIndex((e=>{if(e===t||e.oldHandler===t)return true}));process.env.NODE_ENV!=="production"&&(0,r.warn)(i===-1,`事件: '${e}' 没有注册在 DOM 中,因此不会被移除。`);n.splice(i,1)}isAnyEventBinded(){const e=this.__handlers;const t=Object.keys(e).find((t=>e[t].length));return Boolean(t)}}const $e="cn";const Ve=incrementId();class TaroNode extends TaroEventTarget{constructor(){super();this.parentNode=null;this.childNodes=[];this.hydrate=e=>()=>hydrate(e);this.uid="_"+Ve();this.sid=this.uid;Fe.set(this.sid,this)}updateChildNodes(e){const cleanChildNodes=()=>[];const rerenderChildNodes=()=>{const e=this.childNodes.filter((e=>!isComment(e)));return e.map(hydrate)};this.enqueueUpdate({path:`${this._path}.${$e}`,value:e?cleanChildNodes:rerenderChildNodes})}updateSingleChild(e){this.childNodes.forEach(((t,n)=>{if(isComment(t))return;if(e&&n<e)return;this.enqueueUpdate({path:t._path,value:this.hydrate(t)})}))}get _root(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e._root)||null}findIndex(e){const t=this.childNodes.indexOf(e);(0,r.ensure)(t!==-1,"The node to be replaced is not a child of this node.");return t}get _path(){const e=this.parentNode;if(e){const t=e.childNodes.filter((e=>!isComment(e)));const n=t.indexOf(this);const i=r.hooks.call("getPathIndex",n);return`${e._path}.${$e}.${i}`}return""}get nextSibling(){const e=this.parentNode;return(e===null||e===void 0?void 0:e.childNodes[e.findIndex(this)+1])||null}get previousSibling(){const e=this.parentNode;return(e===null||e===void 0?void 0:e.childNodes[e.findIndex(this)-1])||null}get parentElement(){const e=this.parentNode;if((e===null||e===void 0?void 0:e.nodeType)===1){return e}return null}get firstChild(){return this.childNodes[0]||null}get lastChild(){const e=this.childNodes;return e[e.length-1]||null}set textContent(e){const t=this.childNodes.slice();const n=[];while(this.firstChild){this.removeChild(this.firstChild,{doUpdate:false})}if(e===""){this.updateChildNodes(true)}else{const t=Ue.document.createTextNode(e);n.push(t);this.appendChild(t);this.updateChildNodes()}De.record({type:"childList",target:this,removedNodes:t,addedNodes:n})}insertBefore(e,t,n){if(e.nodeName===Q){e.childNodes.reduceRight(((e,t)=>{this.insertBefore(t,e);return t}),t);return e}e.remove({cleanRef:false});let r=0;e.parentNode=this;if(t){r=this.findIndex(t);this.childNodes.splice(r,0,e)}else{this.childNodes.push(e)}const i=this.childNodes.length;if(this._root){if(!t){const t=i===1;if(t){this.updateChildNodes()}else{this.enqueueUpdate({path:e._path,value:this.hydrate(e)})}}else if(n){this.enqueueUpdate({path:e._path,value:this.hydrate(e)})}else{const e=i*2/3;if(e>r){this.updateChildNodes()}else{this.updateSingleChild(r)}}}De.record({type:"childList",target:this,addedNodes:[e],removedNodes:n?[t]:[],nextSibling:n?t.nextSibling:t||null,previousSibling:e.previousSibling});return e}appendChild(e){return this.insertBefore(e)}replaceChild(e,t){if(t.parentNode!==this)return;this.insertBefore(e,t,true);t.remove({doUpdate:false});return t}removeChild(e,t={}){const{cleanRef:n,doUpdate:r}=t;if(n!==false&&r!==false){De.record({type:"childList",target:this,removedNodes:[e],nextSibling:e.nextSibling,previousSibling:e.previousSibling})}const i=this.findIndex(e);this.childNodes.splice(i,1);e.parentNode=null;if(n!==false){Fe.removeNodeTree(e)}if(this._root&&r!==false){this.updateChildNodes()}return e}remove(e){var t;(t=this.parentNode)===null||t===void 0?void 0:t.removeChild(this,e)}hasChildNodes(){return this.childNodes.length>0}enqueueUpdate(e){var t;(t=this._root)===null||t===void 0?void 0:t.enqueueUpdate(e)}get ownerDocument(){return Ue.document}static extend(e,t){extend(TaroNode,e,t)}}const Ye="webkit";const Ke=["all","appearance","blockOverflow","blockSize","bottom","clear","contain","content","continue","cursor","direction","display","filter","float","gap","height","inset","isolation","left","letterSpacing","lightingColor","markerSide","mixBlendMode","opacity","order","position","quotes","resize","right","rowGap","tabSize","tableLayout","top","userSelect","verticalAlign","visibility","voiceFamily","volume","whiteSpace","widows","width","zIndex","pointerEvents","aspectRatio"];function combine(e,t,n){!n&&Ke.push(e);t.forEach((t=>{Ke.push(e+t);if(e===Ye){Ke.push("Webkit"+t)}}))}const qe="Color";const Ge="Style";const Qe="Width";const ze="Image";const Je="Size";const Xe=[qe,Ge,Qe];const Ze=["FitLength","FitWidth",ze];const et=[...Ze,"Radius"];const tt=[...Xe,...Ze];const nt=["EndRadius","StartRadius"];const rt=["Bottom","Left","Right","Top"];const it=["End","Start"];const ot=["Content","Items","Self"];const st=["BlockSize","Height","InlineSize",Qe];const at=["After","Before"];combine("borderBlock",Xe);combine("borderBlockEnd",Xe);combine("borderBlockStart",Xe);combine("outline",[...Xe,"Offset"]);combine("border",[...Xe,"Boundary","Break","Collapse","Radius","Spacing"]);combine("borderFit",["Length",Qe]);combine("borderInline",Xe);combine("borderInlineEnd",Xe);combine("borderInlineStart",Xe);combine("borderLeft",tt);combine("borderRight",tt);combine("borderTop",tt);combine("borderBottom",tt);combine("textDecoration",[qe,Ge,"Line"]);combine("textEmphasis",[qe,Ge,"Position"]);combine("scrollMargin",rt);combine("scrollPadding",rt);combine("padding",rt);combine("margin",[...rt,"Trim"]);combine("scrollMarginBlock",it);combine("scrollMarginInline",it);combine("scrollPaddingBlock",it);combine("scrollPaddingInline",it);combine("gridColumn",it);combine("gridRow",it);combine("insetBlock",it);combine("insetInline",it);combine("marginBlock",it);combine("marginInline",it);combine("paddingBlock",it);combine("paddingInline",it);combine("pause",at);combine("cue",at);combine("mask",["Clip","Composite",ze,"Mode","Origin","Position","Repeat",Je,"Type"]);combine("borderImage",["Outset","Repeat","Slice","Source","Transform",Qe]);combine("maskBorder",["Mode","Outset","Repeat","Slice","Source",Qe]);combine("font",["Family","FeatureSettings","Kerning","LanguageOverride","MaxSize","MinSize","OpticalSizing","Palette",Je,"SizeAdjust","Stretch",Ge,"Weight","VariationSettings"]);combine("transform",["Box","Origin",Ge]);combine("background",[qe,ze,"Attachment","BlendMode","Clip","Origin","Position","Repeat",Je]);combine("listStyle",[ze,"Position","Type"]);combine("scrollSnap",["Align","Stop","Type"]);combine("grid",["Area","AutoColumns","AutoFlow","AutoRows"]);combine("gridTemplate",["Areas","Columns","Rows"]);combine("overflow",["Block","Inline","Wrap","X","Y"]);combine("transition",["Delay","Duration","Property","TimingFunction"]);combine("color",["Adjust","InterpolationFilters","Scheme"]);combine("textAlign",["All","Last"]);combine("page",["BreakAfter","BreakBefore","BreakInside"]);combine("animation",["Delay","Direction","Duration","FillMode","IterationCount","Name","PlayState","TimingFunction"]);combine("flex",["Basis","Direction","Flow","Grow","Shrink","Wrap"]);combine("offset",[...at,...it,"Anchor","Distance","Path","Position","Rotate"]);combine("perspective",["Origin"]);combine("clip",["Path","Rule"]);combine("flow",["From","Into"]);combine("align",["Content","Items","Self"],true);combine("alignment",["Adjust","Baseline"],true);combine("borderStart",nt,true);combine("borderEnd",nt,true);combine("borderCorner",["Fit",ze,"ImageTransform"],true);combine("borderTopLeft",et,true);combine("borderTopRight",et,true);combine("borderBottomLeft",et,true);combine("borderBottomRight",et,true);combine("column",["s","Count","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","Span",Qe],true);combine("break",[...at,"Inside"],true);combine("wrap",[...at,"Flow","Inside","Through"],true);combine("justify",ot,true);combine("place",ot,true);combine("max",[...st,"Lines"],true);combine("min",st,true);combine("line",["Break","Clamp","Grid","Height","Padding","Snap"],true);combine("inline",["BoxAlign",Je,"Sizing"],true);combine("text",["CombineUpright","GroupAlign","Height","Indent","Justify","Orientation","Overflow","Shadow","SpaceCollapse","SpaceTrim","Spacing","Transform","UnderlinePosition","Wrap"],true);combine("shape",["ImageThreshold","Inside","Margin","Outside"],true);combine("word",["Break","Spacing","Wrap"],true);combine("object",["Fit","Position"],true);combine("box",["DecorationBreak","Shadow","Sizing","Snap"],true);combine(Ye,["LineClamp","BoxOrient","TextFillColor","TextStroke","TextStrokeColor","TextStrokeWidth"],true);function recordCss(e){De.record({type:"attributes",target:e._element,attributeName:"style",oldValue:e.cssText})}function enqueueUpdate(e){const t=e._element;if(t._root){t.enqueueUpdate({path:`${t._path}.${"st"}`,value:e.cssText})}}function setStyle(e,t){process.env.NODE_ENV!=="production"&&(0,r.warn)((0,r.isString)(e)&&e.length>M,`Style 属性 ${t} 的值数据量过大,可能会影响渲染性能,考虑使用 CSS 类或其它方案替代。`);const n=this[t];if(n===e)return;!this._pending&&recordCss(this);if((0,r.isNull)(e)||(0,r.isUndefined)(e)||e===""){this._usedStyleProp.delete(t);delete this._value[t]}else{this._usedStyleProp.add(t);this._value[t]=e}!this._pending&&enqueueUpdate(this)}function initStyle(e,t){const n={};for(let i=0;i<t.length;i++){const o=t[i];if(e[o])return;n[o]={get(){const e=this._value[o];return(0,r.isNull)(e)||(0,r.isUndefined)(e)?"":e},set(e){setStyle.call(this,e,o)}}}Object.defineProperties(e.prototype,n)}function isCssVariable(e){return/^--/.test(e)}class Style{constructor(e){this._element=e;this._usedStyleProp=new Set;this._value={}}setCssVariables(e){this.hasOwnProperty(e)||Object.defineProperty(this,e,{enumerable:true,configurable:true,get:()=>this._value[e]||"",set:t=>{setStyle.call(this,t,e)}})}get cssText(){if(!this._usedStyleProp.size)return"";const e=[];this._usedStyleProp.forEach((t=>{const n=this[t];if((0,r.isNull)(n)||(0,r.isUndefined)(n))return;let i=isCssVariable(t)?t:(0,r.toDashed)(t);if(i.indexOf("webkit")===0||i.indexOf("Webkit")===0){i=`-${i}`}e.push(`${i}: ${n};`)}));return e.join(" ")}set cssText(e){this._pending=true;recordCss(this);this._usedStyleProp.forEach((e=>{this.removeProperty(e)}));if(e===""||(0,r.isUndefined)(e)||(0,r.isNull)(e)){this._pending=false;enqueueUpdate(this);return}const t=e.split(";");for(let e=0;e<t.length;e++){const n=t[e].trim();if(n===""){continue}const[i,...o]=n.split(":");const s=o.join(":");if((0,r.isUndefined)(s)){continue}this.setProperty(i.trim(),s.trim())}this._pending=false;enqueueUpdate(this)}setProperty(e,t){if(e[0]==="-"){this.setCssVariables(e)}else{e=(0,r.toCamelCase)(e)}if((0,r.isNull)(t)||(0,r.isUndefined)(t)){this.removeProperty(e)}else{this[e]=t}}removeProperty(e){e=(0,r.toCamelCase)(e);if(!this._usedStyleProp.has(e)){return""}const t=this[e];this[e]=undefined;return t}getPropertyValue(e){e=(0,r.toCamelCase)(e);const t=this[e];if(!t){return""}return t}}initStyle(Style,Ke);r.hooks.tap("injectNewStyleProperties",(e=>{if((0,r.isArray)(e)){initStyle(Style,e)}else{if(typeof e!=="string")return;initStyle(Style,[e])}}));function returnTrue(){return true}function treeToArray(e,t){const n=[];const r=t!==null&&t!==void 0?t:returnTrue;let i=e;while(i){if(i.nodeType===1&&r(i)){n.push(i)}i=following(i,e)}return n}function following(e,t){const n=e.firstChild;const r=e.nodeType===1||e.nodeType===9;if(n&&r){return n}let i=e;do{if(i===t){return null}const e=i.nextSibling;if(e){return e}i=i.parentElement}while(i);return null}class TaroElement extends TaroNode{constructor(){super();this.props={};this.dataset=r.EMPTY_OBJ;this.nodeType=1;this.style=new Style(this);r.hooks.call("patchElement",this)}_stopPropagation(e){let t=this;while(t=t.parentNode){const n=t.__handlers[e.type];if(!(0,r.isArray)(n)){continue}for(let e=n.length;e--;){const t=n[e];t._stop=true}}}get id(){return this.getAttribute(z)}set id(e){this.setAttribute(z,e)}get className(){return this.getAttribute(X)||""}set className(e){this.setAttribute(X,e)}get cssText(){return this.getAttribute(Z)||""}get classList(){return new ClassList(this.className,this)}get children(){return this.childNodes.filter(isElement)}get attributes(){const e=this.props;const t=Object.keys(e);const n=this.style.cssText;const r=t.map((t=>({name:t,value:e[t]})));return r.concat(n?{name:Z,value:n}:[])}get textContent(){let e="";const t=this.childNodes;for(let n=0;n<t.length;n++){e+=t[n].textContent}return e}set textContent(e){super.textContent=e}hasAttribute(e){return!(0,r.isUndefined)(this.props[e])}hasAttributes(){return this.attributes.length>0}get focus(){return function(){this.setAttribute(ee,true)}}set focus(e){this.setAttribute(ee,e)}blur(){this.setAttribute(ee,false)}setAttribute(e,t){process.env.NODE_ENV!=="production"&&(0,r.warn)((0,r.isString)(t)&&t.length>M,`元素 ${this.nodeName} 的 ${e} 属性值数据量过大,可能会影响渲染性能。考虑降低图片转为 base64 的阈值或在 CSS 中使用 base64。`);const n=this.nodeName===te&&!isHasExtractProp(this)&&!this.isAnyEventBinded();if(e!==Z){De.record({target:this,type:"attributes",attributeName:e,oldValue:this.getAttribute(e)})}switch(e){case Z:this.style.cssText=t;break;case z:if(this.uid!==this.sid){Fe.delete(this.uid)}t=String(t);this.props[e]=this.uid=t;Fe.set(t,this);break;default:this.props[e]=t;if(e.startsWith("data-")){if(this.dataset===r.EMPTY_OBJ){this.dataset=Object.create(null)}this.dataset[(0,r.toCamelCase)(e.replace(/^data-/,""))]=t}break}if(!this._root)return;const i=getComponentsAlias();const o=i[this.nodeName];const s=i[te]._num;const a=i[ne]._num;const c=i[Te]._num;const l=this._path;e=shortcutAttr(e);const u=(0,r.toCamelCase)(e);const h={path:`${l}.${u}`,value:(0,r.isFunction)(t)?()=>t:t};r.hooks.call("modifySetAttrPayload",this,e,h,i);if(o){const t=o[u]||e;h.path=`${l}.${(0,r.toCamelCase)(t)}`}this.enqueueUpdate(h);if(this.nodeName===te){if(u===Ee){this.enqueueUpdate({path:`${l}.${"nn"}`,value:t?c:this.isAnyEventBinded()?s:a})}else if(n&&isHasExtractProp(this)){this.enqueueUpdate({path:`${l}.${"nn"}`,value:a})}}}removeAttribute(e){const t=this.nodeName===te&&isHasExtractProp(this)&&!this.isAnyEventBinded();De.record({target:this,type:"attributes",attributeName:e,oldValue:this.getAttribute(e)});if(e===Z){this.style.cssText=""}else{const t=r.hooks.call("onRemoveAttribute",this,e);if(t){return}if(!this.props.hasOwnProperty(e)){return}delete this.props[e]}if(!this._root)return;const n=getComponentsAlias();const i=n[this.nodeName];const o=n[te]._num;const s=n[ne]._num;const a=n[re]._num;const c=this._path;e=shortcutAttr(e);const l=(0,r.toCamelCase)(e);const u={path:`${c}.${l}`,value:""};r.hooks.call("modifyRmAttrPayload",this,e,u,n);if(i){const t=i[l]||e;u.path=`${c}.${(0,r.toCamelCase)(t)}`}this.enqueueUpdate(u);if(this.nodeName===te){if(l===Ee){this.enqueueUpdate({path:`${c}.${"nn"}`,value:this.isAnyEventBinded()?o:isHasExtractProp(this)?s:a})}else if(t&&!isHasExtractProp(this)){this.enqueueUpdate({path:`${c}.${"nn"}`,value:a})}}}getAttribute(e){const t=e===Z?this.style.cssText:this.props[e];return t!==null&&t!==void 0?t:""}getElementsByTagName(e){return treeToArray(this,(t=>t.nodeName===e||e==="*"&&this!==t))}getElementsByClassName(e){const t=e.trim().split(/\s+/);return treeToArray(this,(e=>{const n=e.classList;return t.every((e=>n.contains(e)))}))}dispatchEvent(e){const t=e.cancelable;const n=this.__handlers[e.type];if(!(0,r.isArray)(n)){return false}for(let i=n.length;i--;){const o=n[i];let s;if(o._stop){o._stop=false}else{r.hooks.call("modifyDispatchEvent",e,this);s=o.call(this,e)}if((s===false||e._end)&&t){e.defaultPrevented=true}if(!(0,r.isUndefined)(s)&&e.mpEvent){const t=r.hooks.call("modifyTaroEventReturn",this,e,s);if(t){e.mpEvent[Re]=s}}if(e._end&&e._stop){break}}if(e._stop){this._stopPropagation(e)}else{e._stop=true}return n!=null}addEventListener(e,t,n){const i=this.nodeName;const o=r.hooks.call("getSpecialNodes");let s=true;if((0,r.isObject)(n)&&n.sideEffect===false){s=false;delete n.sideEffect}r.hooks.call("modifyAddEventListener",this,s,getComponentsAlias);if(s!==false&&!this.isAnyEventBinded()&&o.indexOf(i)>-1){const e=getComponentsAlias();const t=e[i]._num;this.enqueueUpdate({path:`${this._path}.${"nn"}`,value:t})}super.addEventListener(e,t,n)}removeEventListener(e,t,n=true){super.removeEventListener(e,t);const i=this.nodeName;const o=r.hooks.call("getSpecialNodes");r.hooks.call("modifyRemoveEventListener",this,n,getComponentsAlias);if(n!==false&&!this.isAnyEventBinded()&&o.indexOf(i)>-1){const e=getComponentsAlias();const t=isHasExtractProp(this)?`static-${i}`:`pure-${i}`;const n=e[t]._num;this.enqueueUpdate({path:`${this._path}.${"nn"}`,value:n})}}static extend(e,t){extend(TaroElement,e,t)}}const ct={prerender:true,debug:false};function initPosition(){return{index:0,column:0,line:0}}function feedPosition(e,t,n){const r=e.index;const i=e.index=r+n;for(let n=r;n<i;n++){const r=t.charAt(n);if(r==="\n"){e.line++;e.column=0}else{e.column++}}}function jumpPosition(e,t,n){const r=n-e.index;return feedPosition(e,t,r)}function copyPosition(e){return{index:e.index,line:e.line,column:e.column}}const lt=/\s/;function isWhitespaceChar(e){return lt.test(e)}const ut=/=/;function isEqualSignChar(e){return ut.test(e)}function shouldBeIgnore(e){const t=e.toLowerCase();if(ct.html.skipElements.has(t)){return true}return false}const ht=/[A-Za-z0-9]/;function findTextEnd(e,t){while(true){const n=e.indexOf("<",t);if(n===-1){return n}const r=e.charAt(n+1);if(r==="/"||r==="!"||ht.test(r)){return n}t=n+1}}function isWordEnd(e,t,n){if(!isWhitespaceChar(n.charAt(e)))return false;const r=n.length;for(let r=e-1;r>t;r--){const e=n.charAt(r);if(!isWhitespaceChar(e)){if(isEqualSignChar(e))return false;break}}for(let t=e+1;t<r;t++){const e=n.charAt(t);if(!isWhitespaceChar(e)){if(isEqualSignChar(e))return false;return true}}}class Scaner{constructor(e){this.tokens=[];this.position=initPosition();this.html=e}scan(){const{html:e,position:t}=this;const n=e.length;while(t.index<n){const n=t.index;this.scanText();if(t.index===n){const t=e.startsWith("!--",n+1);if(t){this.scanComment()}else{const e=this.scanTag();if(shouldBeIgnore(e)){this.scanSkipTag(e)}}}}return this.tokens}scanText(){const e="text";const{html:t,position:n}=this;let r=findTextEnd(t,n.index);if(r===n.index){return}if(r===-1){r=t.length}const i=copyPosition(n);const o=t.slice(n.index,r);jumpPosition(n,t,r);const s=copyPosition(n);this.tokens.push({type:e,content:o,position:{start:i,end:s}})}scanComment(){const e="comment";const{html:t,position:n}=this;const r=copyPosition(n);feedPosition(n,t,4);let i=t.indexOf("--\x3e",n.index);let o=i+3;if(i===-1){i=o=t.length}const s=t.slice(n.index,i);jumpPosition(n,t,o);this.tokens.push({type:e,content:s,position:{start:r,end:copyPosition(n)}})}scanTag(){this.scanTagStart();const e=this.scanTagName();this.scanAttrs();this.scanTagEnd();return e}scanTagStart(){const e="tag-start";const{html:t,position:n}=this;const r=t.charAt(n.index+1);const i=r==="/";const o=copyPosition(n);feedPosition(n,t,i?2:1);this.tokens.push({type:e,close:i,position:{start:o}})}scanTagEnd(){const e="tag-end";const{html:t,position:n}=this;const r=t.charAt(n.index);const i=r==="/";feedPosition(n,t,i?2:1);const o=copyPosition(n);this.tokens.push({type:e,close:i,position:{end:o}})}scanTagName(){const e="tag";const{html:t,position:n}=this;const r=t.length;let i=n.index;while(i<r){const e=t.charAt(i);const n=!(isWhitespaceChar(e)||e==="/"||e===">");if(n)break;i++}let o=i+1;while(o<r){const e=t.charAt(o);const n=!(isWhitespaceChar(e)||e==="/"||e===">");if(!n)break;o++}jumpPosition(n,t,o);const s=t.slice(i,o);this.tokens.push({type:e,content:s});return s}scanAttrs(){const{html:e,position:t,tokens:n}=this;let r=t.index;let i=null;let o=r;const s=[];const a=e.length;while(r<a){const t=e.charAt(r);if(i){const e=t===i;if(e){i=null}r++;continue}const n=t==="/"||t===">";if(n){if(r!==o){s.push(e.slice(o,r))}break}if(isWordEnd(r,o,e)){if(r!==o){s.push(e.slice(o,r))}o=r+1;r++;continue}const a=t==="'"||t==='"';if(a){i=t;r++;continue}r++}jumpPosition(t,e,r);const c=s.length;const l="attribute";for(let e=0;e<c;e++){const t=s[e];const r=t.includes("=");if(r){const r=s[e+1];if(r&&r.startsWith("=")){if(r.length>1){const i=t+r;n.push({type:l,content:i});e+=1;continue}const i=s[e+2];e+=1;if(i){const r=t+"="+i;n.push({type:l,content:r});e+=1;continue}}}if(t.endsWith("=")){const r=s[e+1];if(r&&!r.includes("=")){const i=t+r;n.push({type:l,content:i});e+=1;continue}const i=t.slice(0,-1);n.push({type:l,content:i});continue}n.push({type:l,content:t})}}scanSkipTag(e){const{html:t,position:n}=this;const r=e.toLowerCase();const i=t.length;while(n.index<i){const e=t.indexOf("</",n.index);if(e===-1){this.scanText();break}jumpPosition(n,t,e);const i=this.scanTag();if(r===i.toLowerCase()){break}}}}function unquote(e){const t=e.charAt(0);const n=e.length-1;const r=t==='"'||t==="'";if(r&&t===e.charAt(n)){return e.slice(1,n)}return e}const dt="{";const ft="}";const pt=".";const mt="#";const gt=">";const vt="~";const bt="+";class StyleTagParser{constructor(){this.styles=[]}extractStyle(e){const t=/<style\s?[^>]*>((.|\n|\s)+?)<\/style>/g;let n=e;n=n.replace(t,((e,t)=>{const n=t.trim();this.stringToSelector(n);return""}));return n.trim()}stringToSelector(e){let t=e.indexOf(dt);while(t>-1){const n=e.indexOf(ft);const r=e.slice(0,t).trim();let i=e.slice(t+1,n);i=i.replace(/:(.*);/g,(function(e,t){const n=t.trim().replace(/ +/g,"+++");return`:${n};`}));i=i.replace(/ /g,"");i=i.replace(/\+\+\+/g," ");if(!/;$/.test(i)){i+=";"}r.split(",").forEach((e=>{const t=this.parseSelector(e);this.styles.push({content:i,selectorList:t})}));e=e.slice(n+1);t=e.indexOf(dt)}}parseSelector(e){const t=e.trim().replace(/ *([>~+]) */g," $1").replace(/ +/g," ").replace(/\[\s*([^[\]=\s]+)\s*=\s*([^[\]=\s]+)\s*\]/g,"[$1=$2]").split(" ");const n=t.map((e=>{const t=e.charAt(0);const n={isChild:t===gt,isGeneralSibling:t===vt,isAdjacentSibling:t===bt,tag:null,id:null,class:[],attrs:[]};e=e.replace(/^[>~+]/,"");e=e.replace(/\[(.+?)\]/g,(function(e,t){const[r,i]=t.split("=");const o=t.indexOf("=")===-1;const s={all:o,key:r,value:o?null:i};n.attrs.push(s);return""}));e=e.replace(/([.#][A-Za-z0-9-_]+)/g,(function(e,t){if(t[0]===mt){n.id=t.substr(1)}else if(t[0]===pt){n.class.push(t.substr(1))}return""}));if(e!==""){n.tag=e}return n}));return n}matchStyle(e,t,n){const r=sortStyles(this.styles).reduce(((r,{content:i,selectorList:o},s)=>{let a=n[s];let c=o[a];const l=o[a+1];if((l===null||l===void 0?void 0:l.isGeneralSibling)||(l===null||l===void 0?void 0:l.isAdjacentSibling)){c=l;a+=1;n[s]+=1}let u=this.matchCurrent(e,t,c);if(u&&c.isGeneralSibling){let e=getPreviousElement(t);while(e){if(e.h5tagName&&this.matchCurrent(e.h5tagName,e,o[a-1])){u=true;break}e=getPreviousElement(e);u=false}}if(u&&c.isAdjacentSibling){const e=getPreviousElement(t);if(!e||!e.h5tagName){u=false}else{const t=this.matchCurrent(e.h5tagName,e,o[a-1]);if(!t){u=false}}}if(u){if(a===o.length-1){return r+i}else if(a<o.length-1){n[s]+=1}}else{if(c.isChild&&a>0){n[s]-=1;if(this.matchCurrent(e,t,o[n[s]])){n[s]+=1}}}return r}),"");return r}matchCurrent(e,t,n){if(n.tag&&n.tag!==e)return false;if(n.id&&n.id!==t.id)return false;if(n.class.length){const e=t.className.split(" ");for(let t=0;t<n.class.length;t++){const r=n.class[t];if(e.indexOf(r)===-1){return false}}}if(n.attrs.length){for(let e=0;e<n.attrs.length;e++){const{all:r,key:i,value:o}=n.attrs[e];if(r&&!t.hasAttribute(i)){return false}else{const e=t.getAttribute(i);if(e!==unquote(o||"")){return false}}}}return true}}function getPreviousElement(e){const t=e.parentElement;if(!t)return null;const n=e.previousSibling;if(!n)return null;if(n.nodeType===1){return n}else{return getPreviousElement(n)}}function sortStyles(e){return e.sort(((e,t)=>{const n=getHundredsWeight(e.selectorList);const r=getHundredsWeight(t.selectorList);if(n!==r)return n-r;const i=getTensWeight(e.selectorList);const o=getTensWeight(t.selectorList);if(i!==o)return i-o;const s=getOnesWeight(e.selectorList);const a=getOnesWeight(t.selectorList);return s-a}))}function getHundredsWeight(e){return e.reduce(((e,t)=>e+(t.id?1:0)),0)}function getTensWeight(e){return e.reduce(((e,t)=>e+t.class.length+t.attrs.length),0)}function getOnesWeight(e){return e.reduce(((e,t)=>e+(t.tag?1:0)),0)}function makeMap(e,t){const n=Object.create(null);const r=e.split(",");for(let e=0;e<r.length;e++){n[r[e]]=true}return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const yt={img:"image",iframe:"web-view"};const _t=Object.keys(r.internalComponents).map((e=>e.toLowerCase())).join(",");const Et=makeMap(_t,true);const Tt=makeMap("a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b",true);const wt=makeMap("address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt",true);const Ot={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]};function hasTerminalParent(e,t){const n=Ot[e];if(n){let r=t.length-1;while(r>=0){const i=t[r].tagName;if(i===e){break}if(n&&n.includes(i)){return true}r--}}return false}function getTagName(e){if(ct.html.renderHTMLTag){return e}if(yt[e]){return yt[e]}else if(Et(e)){return e}else if(wt(e)){return"view"}else if(Tt(e)){return"text"}return"view"}function splitEqual(e){const t="=";const n=e.indexOf(t);if(n===-1)return[e];const r=e.slice(0,n).trim();const i=e.slice(n+t.length).trim();return[r,i]}function format(e,t,n,i){return e.filter((e=>{if(e.type==="comment"){return false}else if(e.type==="text"){return e.content!==""}return true})).map((e=>{if(e.type==="text"){let n=t.createTextNode(e.content);if((0,r.isFunction)(ct.html.transformText)){n=ct.html.transformText(n,e)}i===null||i===void 0?void 0:i.appendChild(n);return n}const o=t.createElement(getTagName(e.tagName));o.h5tagName=e.tagName;i===null||i===void 0?void 0:i.appendChild(o);if(!ct.html.renderHTMLTag){o.className=`h5-${e.tagName}`}for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];const[r,i]=splitEqual(n);if(r==="class"){o.className+=" "+unquote(i)}else if(r[0]==="o"&&r[1]==="n"){continue}else{o.setAttribute(r,i==null?true:unquote(i))}}const{styleTagParser:s,descendantList:a}=n;const c=a.slice();const l=s.matchStyle(e.tagName,o,c);o.setAttribute("style",l+o.style.cssText);format(e.children,t,{styleTagParser:s,descendantList:c},o);if((0,r.isFunction)(ct.html.transformElement)){return ct.html.transformElement(o,e)}return o}))}function parser(e,t){const n=new StyleTagParser;e=n.extractStyle(e);const r=new Scaner(e).scan();const i={tagName:"",children:[],type:"element",attributes:[]};const o={tokens:r,options:ct,cursor:0,stack:[i]};parse(o);return format(i.children,t,{styleTagParser:n,descendantList:Array(n.styles.length).fill(0)})}function parse(e){const{tokens:t,stack:n}=e;let{cursor:r}=e;const i=t.length;let o=n[n.length-1].children;while(r<i){const e=t[r];if(e.type!=="tag-start"){o.push(e);r++;continue}const s=t[++r];r++;const a=s.content.toLowerCase();if(e.close){let e=n.length;let o=false;while(--e>-1){if(n[e].tagName===a){o=true;break}}while(r<i){const e=t[r];if(e.type!=="tag-end")break;r++}if(o){n.splice(e);break}else{continue}}const c=ct.html.closingElements.has(a);let l=c;if(l){l=!hasTerminalParent(a,n)}if(l){let e=n.length-1;while(e>0){if(a===n[e].tagName){n.splice(e);const t=e-1;o=n[t].children;break}e=e-1}}const u=[];let h;while(r<i){h=t[r];if(h.type==="tag-end")break;u.push(h.content);r++}r++;const d=[];const f={type:"element",tagName:s.content,attributes:u,children:d};o.push(f);const p=!(h.close||ct.html.voidElements.has(a));if(p){n.push({tagName:a,children:d});const e={tokens:t,cursor:r,stack:n};parse(e);r=e.cursor}}e.cursor=r}ct.html={skipElements:new Set(["style","script"]),voidElements:new Set(["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),closingElements:new Set(["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"]),renderHTMLTag:false};function setInnerHTML(e,t){while(e.firstChild){e.removeChild(e.firstChild)}const n=parser(t,e.ownerDocument);for(let t=0;t<n.length;t++){e.appendChild(n[t])}}function getBoundingClientRectImpl(){if(!ct.miniGlobal)return Promise.resolve(null);return new Promise((e=>{const t=ct.miniGlobal.createSelectorQuery();t.select(`#${this.uid}`).boundingClientRect((t=>{e(t)})).exec()}))}function getTemplateContent(e){if(e.nodeName==="template"){const t=e.ownerDocument;const n=t.createElement(Q);n.childNodes=e.childNodes;e.childNodes=[n];n.parentNode=e;n.childNodes.forEach((e=>{e.parentNode=n}));return n}}function insertAdjacentHTML(e,t){var n,r;const i=parser(t,this.ownerDocument);for(let t=0;t<i.length;t++){const o=i[t];switch(e){case"beforebegin":(n=this.parentNode)===null||n===void 0?void 0:n.insertBefore(o,this);break;case"afterbegin":if(this.hasChildNodes()){this.insertBefore(o,this.childNodes[0])}else{this.appendChild(o)}break;case"beforeend":this.appendChild(o);break;case"afterend":(r=this.parentNode)===null||r===void 0?void 0:r.appendChild(o);break}}}function cloneNode(e=false){const t=this.ownerDocument;let n;if(this.nodeType===1){n=t.createElement(this.nodeName)}else if(this.nodeType===3){n=t.createTextNode("")}for(const e in this){const t=this[e];if([ie,oe].includes(e)&&typeof t===se){n[e]=Object.assign({},t)}else if(e==="_value"){n[e]=t}else if(e===Z){n.style._value=Object.assign({},t._value);n.style._usedStyleProp=new Set(Array.from(t._usedStyleProp))}}if(e){n.childNodes=this.childNodes.map((e=>e.cloneNode(true)))}return n}function contains(e){let t=false;this.childNodes.some((n=>{const{uid:r}=n;if(r===e.uid||r===e.id||n.contains(e)){t=true;return true}}));return t}if(process.env.TARO_PLATFORM!=="web"){if(ENABLE_INNER_HTML){TaroNode.extend("innerHTML",{set(e){setInnerHTML.call(this,this,e)},get(){return""}});if(ENABLE_ADJACENT_HTML){TaroNode.extend("insertAdjacentHTML",insertAdjacentHTML)}}if(ENABLE_CLONE_NODE){TaroNode.extend("cloneNode",cloneNode)}if(ENABLE_CONTAINS){TaroNode.extend("contains",contains)}if(ENABLE_SIZE_APIS){TaroElement.extend("getBoundingClientRect",getBoundingClientRectImpl)}if(ENABLE_TEMPLATE_CONTENT){TaroElement.extend("content",{get(){return getTemplateContent(this)}})}}class TaroEvent{constructor(e,t,n){this._stop=false;this._end=false;this.defaultPrevented=false;this.button=0;this.timeStamp=Date.now();this.type=e.toLowerCase();this.mpEvent=n;this.bubbles=Boolean(t&&t.bubbles);this.cancelable=Boolean(t&&t.cancelable)}stopPropagation(){this._stop=true}stopImmediatePropagation(){this._end=this._stop=true}preventDefault(){this.defaultPrevented=true}get target(){var e,t,n,i,o;const s=this.cacheTarget;if(!s){const s=Object.create(((e=this.mpEvent)===null||e===void 0?void 0:e.target)||null);const a=Ue.document.getElementById(((t=s.dataset)===null||t===void 0?void 0:t.sid)||s.id||null);const c=Ue.document.getElementById(((n=s.targetDataset)===null||n===void 0?void 0:n.sid)||((i=s.dataset)===null||i===void 0?void 0:i.sid)||s.id||null);s.dataset=Object.assign(Object.assign({},a!==null?a.dataset:r.EMPTY_OBJ),c!==null?c.dataset:r.EMPTY_OBJ);for(const e in(o=this.mpEvent)===null||o===void 0?void 0:o.detail){s[e]=this.mpEvent.detail[e]}this.cacheTarget=s;return s}else{return s}}get currentTarget(){var e,t,n,r,i,o,s,a;const c=this.cacheCurrentTarget;if(!c){const c=Ue.document;const l=Object.create(((e=this.mpEvent)===null||e===void 0?void 0:e.currentTarget)||null);const u=c.getElementById(((t=l.dataset)===null||t===void 0?void 0:t.sid)||l.id||null);const h=c.getElementById(((i=(r=(n=this.mpEvent)===null||n===void 0?void 0:n.target)===null||r===void 0?void 0:r.dataset)===null||i===void 0?void 0:i.sid)||((s=(o=this.mpEvent)===null||o===void 0?void 0:o.target)===null||s===void 0?void 0:s.id)||null);if(u===null||u&&u===h){this.cacheCurrentTarget=this.target;return this.target}l.dataset=u.dataset;for(const e in(a=this.mpEvent)===null||a===void 0?void 0:a.detail){l[e]=this.mpEvent.detail[e]}this.cacheCurrentTarget=l;return l}else{return c}}}function createEvent(e,t){if(typeof e==="string"){return new TaroEvent(e,{bubbles:true,cancelable:true})}const n=new TaroEvent(e.type,{bubbles:true,cancelable:true},e);for(const t in e){if(t===de||t===he||t===fe||t===me){continue}else{n[t]=e[t]}}if(n.type===pe&&(t===null||t===void 0?void 0:t.nodeName)===ce){n[ge]=13}return n}const Ct={};function getEventCBResult(e){const t=e[Re];if(!(0,r.isUndefined)(t)){delete e[Re]}return t}function eventHandler(e){var t,n;e.type===undefined&&Object.defineProperty(e,"type",{value:e._type});e.detail===undefined&&Object.defineProperty(e,"detail",{value:e._detail||Object.assign({},e)});e.currentTarget=e.currentTarget||e.target||Object.assign({},e);r.hooks.call("modifyMpEventImpl",e);const i=e.currentTarget;const o=((t=i.dataset)===null||t===void 0?void 0:t.sid)||i.id||((n=e.detail)===null||n===void 0?void 0:n.id)||"";const s=Ue.document.getElementById(o);if(s){const dispatch=()=>{const t=createEvent(e,s);r.hooks.call("modifyTaroEvent",t,s);r.hooks.call("dispatchTaroEvent",t,s);r.hooks.call("dispatchTaroEventFinish",t,s)};if(r.hooks.isExist("batchedEventUpdates")){const t=e.type;if(!r.hooks.call("isBubbleEvents",t)||!isParentBinded(s,t)||t===ve&&!!s.props.catchMove){r.hooks.call("batchedEventUpdates",(()=>{if(Ct[t]){Ct[t].forEach((e=>e()));delete Ct[t]}dispatch()}));return getEventCBResult(e)}else{(Ct[t]||(Ct[t]=[])).push(dispatch)}}else{dispatch();return getEventCBResult(e)}}}class FormElement extends TaroElement{get type(){var e;return(e=this.props[fe])!==null&&e!==void 0?e:""}set type(e){this.setAttribute(fe,e)}get value(){const e=this.props[ae];return e==null?"":e}set value(e){this.setAttribute(ae,e)}dispatchEvent(e){if(e.mpEvent){const t=e.mpEvent.detail.value;if(e.type===le){this.props.value=t}else if(e.type===ce){this.value=t}}return super.dispatchEvent(e)}}class Performance{constructor(){this.recorder=new Map}start(e){if(!ct.debug){return}this.recorder.set(e,Date.now())}stop(e){if(!ct.debug){return}const t=Date.now();const n=this.recorder.get(e);this.recorder.delete(e);const r=t-n;console.log(`${e} 时长: ${r}ms`)}}const Pt=new Performance;function findCustomWrapper(e,t){const n=t.slice(1);let i=e;let o;let s="";n.some(((e,n)=>{const a=e.replace(/^\[(.+)\]$/,"$1").replace(/\bcn\b/g,"childNodes");i=i[a];if((0,r.isArray)(i)){i=i.filter((e=>!isComment(e)))}if((0,r.isUndefined)(i))return true;if(i.nodeName===ue){const e=Me.get(i.sid);if(e){o=e;s=t.slice(n+2).join(".")}}}));if(o){return{customWrapper:o,splitedPath:s}}}class TaroRootElement extends TaroElement{constructor(){super();this.updatePayloads=[];this.updateCallbacks=[];this.pendingUpdate=false;this.ctx=null;this.nodeName=W;this.tagName=W.toUpperCase()}get _path(){return W}get _root(){return this}enqueueUpdate(e){this.updatePayloads.push(e);if(!this.pendingUpdate&&this.ctx){this.performUpdate()}}performUpdate(e=false,t){this.pendingUpdate=true;const n=r.hooks.call("proxyToRaw",this.ctx);setTimeout((()=>{const i=`${U} 开始时间戳 ${Date.now()}`;Pt.start(i);const o=Object.create(null);const s=new Set(e?["root.cn.[0]","root.cn[0]"]:[]);while(this.updatePayloads.length>0){const{path:e,value:t}=this.updatePayloads.shift();if(e.endsWith("cn")){s.add(e)}o[e]=t}for(const e in o){s.forEach((t=>{if(e.includes(t)&&e!==t){delete o[e]}}));const t=o[e];if((0,r.isFunction)(t)){o[e]=t()}}if((0,r.isFunction)(t))return t(o);this.pendingUpdate=false;let a={};const c=new Map;if(e){a=o}else{for(const e in o){const t=e.split(".");const n=findCustomWrapper(this,t);if(n){const{customWrapper:t,splitedPath:r}=n;c.set(t,Object.assign(Object.assign({},c.get(t)||{}),{[`i.${r}`]:o[e]}))}else{a[e]=o[e]}}}const l=c.size;const u=Object.keys(a).length>0;const h=l+(u?1:0);let d=0;const cb=()=>{if(++d===h){Pt.stop(i);this.flushUpdateCallback();e&&Pt.stop(H)}};if(l){c.forEach(((e,t)=>{if(process.env.NODE_ENV!=="production"&&ct.debug){console.log("custom wrapper setData: ",e)}t.setData(e,cb)}))}if(u){if(process.env.NODE_ENV!=="production"&&ct.debug){console.log("page setData:",a)}n.setData(a,cb)}}),0)}enqueueUpdateCallback(e,t){this.updateCallbacks.push((()=>{t?e.call(t):e()}))}flushUpdateCallback(){const e=this.updateCallbacks;if(!e.length)return;const t=e.slice(0);this.updateCallbacks.length=0;for(let e=0;e<t.length;e++){t[e]()}}}class TaroText extends TaroNode{constructor(e){super();this.nodeType=3;this.nodeName="#text";this._value=e}set textContent(e){De.record({target:this,type:"characterData",oldValue:this._value});this._value=e;this.enqueueUpdate({path:`${this._path}.${"v"}`,value:e})}get textContent(){return this._value}set nodeValue(e){this.textContent=e}get nodeValue(){return this._value}set data(e){this.textContent=e}get data(){return this._value}}var St,At;const It=/[!'()~]|%20|%00/g;const Rt=/\+/g;const kt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};function replacer(e){return kt[e]}function appendTo(e,t,n){const i=(0,r.isArray)(n)?n.join(","):n;if(t in e)e[t].push(i);else e[t]=[i]}function addEach(e,t){appendTo(this,t,e)}function decode(e){return decodeURIComponent(e.replace(Rt," "))}function encode(e){return encodeURIComponent(e).replace(It,replacer)}const Nt=process.env.TARO_PLATFORM==="web"?Ue.window.URLSearchParams:(At=class{constructor(e){St.set(this,Object.create(null));e!==null&&e!==void 0?e:e="";const t=k(this,St,"f");if(typeof e==="string"){if(e.charAt(0)==="?"){e=e.slice(1)}for(let n=e.split("&"),r=0,i=n.length;r<i;r++){const e=n[r];const i=e.indexOf("=");try{if(i>-1){appendTo(t,decode(e.slice(0,i)),decode(e.slice(i+1)))}else if(e.length){appendTo(t,decode(e),"")}}catch(t){if(process.env.NODE_ENV!=="production"){console.warn(`[Taro warn] URL 参数 ${e} decode 异常`)}}}}else{if((0,r.isArray)(e)){for(let n=0,r=e.length;n<r;n++){const r=e[n];appendTo(t,r[0],r[1])}}else if(e.forEach){e.forEach(addEach,t)}else{for(const n in e){appendTo(t,n,e[n])}}}}append(e,t){appendTo(k(this,St,"f"),e,t)}delete(e){delete k(this,St,"f")[e]}get(e){const t=k(this,St,"f");return e in t?t[e][0]:null}getAll(e){const t=k(this,St,"f");return e in t?t[e].slice(0):[]}has(e){return e in k(this,St,"f")}keys(){return Object.keys(k(this,St,"f"))}set(e,t){k(this,St,"f")[e]=[""+t]}forEach(e,t){const n=k(this,St,"f");Object.getOwnPropertyNames(n).forEach((function(r){n[r].forEach((function(n){e.call(t,n,r,this)}),this)}),this)}toJSON(){return{}}toString(){const e=k(this,St,"f");const t=[];for(const n in e){const r=encode(n);for(let i=0,o=e[n];i<o.length;i++){t.push(r+"="+encode(o[i]))}}return t.join("&")}},St=new WeakMap,At);var xt,Lt,Bt,Dt,Mt,jt;class TaroURL{static createObjectURL(){throw new Error("Oops, not support URL.createObjectURL() in miniprogram.")}static revokeObjectURL(){throw new Error("Oops, not support URL.revokeObjectURL() in miniprogram.")}constructor(e,t){xt.set(this,"");Lt.set(this,"");Bt.set(this,"");Dt.set(this,"");Mt.set(this,"");jt.set(this,void 0);if(!(0,r.isString)(e))e=String(e);const n=parseUrlBase(e,t);const{hash:i,hostname:o,pathname:s,port:a,protocol:c,search:l}=n;N(this,xt,i,"f");N(this,Lt,o,"f");N(this,Bt,s||"/","f");N(this,Dt,a,"f");N(this,Mt,c,"f");N(this,jt,new Nt(l),"f")}get protocol(){return k(this,Mt,"f")}set protocol(e){(0,r.isString)(e)&&N(this,Mt,e.trim(),"f")}get host(){return this.hostname+(this.port?":"+this.port:"")}set host(e){if(e&&(0,r.isString)(e)){e=e.trim();const{hostname:t,port:n}=parseUrl(`//${e}`);this.hostname=t;this.port=n}}get hostname(){return k(this,Lt,"f")}set hostname(e){e&&(0,r.isString)(e)&&N(this,Lt,e.trim(),"f")}get port(){return k(this,Dt,"f")}set port(e){(0,r.isString)(e)&&N(this,Dt,e.trim(),"f")}get pathname(){return k(this,Bt,"f")}set pathname(e){if((0,r.isString)(e)){e=e.trim();const t=/^(\/|\.\/|\.\.\/)/;let n=e;while(t.test(n)){n=n.replace(t,"")}if(n)N(this,Bt,"/"+n,"f");else N(this,Bt,"/","f")}}get search(){const e=k(this,jt,"f").toString();return e.length===0||e.startsWith("?")?e:`?${e}`}set search(e){if((0,r.isString)(e)){e=e.trim();N(this,jt,new Nt(e),"f")}}get hash(){return k(this,xt,"f")}set hash(e){if((0,r.isString)(e)){e=e.trim();if(e)N(this,xt,e.startsWith("#")?e:`#${e}`,"f");else N(this,xt,"","f")}}get href(){return`${this.protocol}//${this.host}${this.pathname}${this.search}${this.hash}`}set href(e){if(e&&(0,r.isString)(e)){e=e.trim();const{protocol:t,hostname:n,port:r,hash:i,search:o,pathname:s}=parseUrl(e);this.protocol=t;this.hostname=n;this.pathname=s;this.port=r;this.hash=i;this.search=o}}get origin(){return`${this.protocol}//${this.host}`}set origin(e){if(e&&(0,r.isString)(e)){e=e.trim();const{protocol:t,hostname:n,port:r}=parseUrl(e);this.protocol=t;this.hostname=n;this.port=r}}get searchParams(){return k(this,jt,"f")}toString(){return this.href}toJSON(){return this.toString()}_toRaw(){return{protocol:this.protocol,port:this.port,host:this.host,hostname:this.hostname,pathname:this.pathname,hash:this.hash,search:this.search,origin:this.origin,href:this.href}}}xt=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap,Mt=new WeakMap,jt=new WeakMap;const Ft=process.env.TARO_PLATFORM==="web"?Ue.window.URL:TaroURL;function parseUrl(e=""){const t={href:"",origin:"",protocol:"",hostname:"",host:"",port:"",pathname:"",search:"",hash:""};if(!e||!(0,r.isString)(e))return t;e=e.trim();const n=/^(([^:/?#]+):)?\/\/(([^/?#]+):(.+)@)?([^/?#:]*)(:(\d+))?([^?#]*)(\?([^#]*))?(#(.*))?/;const i=e.match(n);if(!i)return t;t.protocol=i[1]||"https:";t.hostname=i[6]||"taro.com";t.port=i[8]||"";t.pathname=i[9]||"/";t.search=i[10]||"";t.hash=i[12]||"";t.href=e;t.origin=t.protocol+"//"+t.hostname;t.host=t.hostname+(t.port?`:${t.port}`:"");return t}function parseUrlBase(e,t){const n=/^(https?:)\/\//i;let i="";let o=null;if(!(0,r.isUndefined)(t)){t=String(t).trim();if(!n.test(t))throw new TypeError(`Failed to construct 'URL': Invalid base URL`);o=parseUrl(t)}e=String(e).trim();if(n.test(e)){i=e}else if(o){if(e){if(e.startsWith("//")){i=o.protocol+e}else{i=o.origin+(e.startsWith("/")?e:`/${e}`)}}else{i=o.href}}else{throw new TypeError(`Failed to construct 'URL': Invalid URL`)}return parseUrl(i)}class AnchorElement extends TaroElement{get href(){var e;return(e=this.props["href"])!==null&&e!==void 0?e:""}set href(e){this.setAttribute("href",e)}get protocol(){var e;return(e=this.props["protocol"])!==null&&e!==void 0?e:""}get host(){var e;return(e=this.props["host"])!==null&&e!==void 0?e:""}get search(){var e;return(e=this.props["search"])!==null&&e!==void 0?e:""}get hash(){var e;return(e=this.props["hash"])!==null&&e!==void 0?e:""}get hostname(){var e;return(e=this.props["hostname"])!==null&&e!==void 0?e:""}get port(){var e;return(e=this.props["port"])!==null&&e!==void 0?e:""}get pathname(){var e;return(e=this.props["pathname"])!==null&&e!==void 0?e:""}setAttribute(e,t){if(e==="href"){const e=parseUrl(t);for(const t in e){super.setAttribute(t,e[t])}}else{super.setAttribute(e,t)}}}class TransferElement extends TaroElement{constructor(e){super();this.dataName=e;this.isTransferElement=true}get _path(){return this.dataName}}class TaroDocument extends TaroElement{constructor(){super();this.createEvent=createEvent;this.nodeType=9;this.nodeName=G}createElement(e){const t=e.toLowerCase();let n;switch(true){case t===W:n=new TaroRootElement;return n;case r.controlledComponent.has(t):n=new FormElement;break;case t===Ne:n=new AnchorElement;break;case t==="page-meta":case t==="navigation-bar":n=new TransferElement((0,r.toCamelCase)(t));break;default:n=new TaroElement;break}n.nodeName=t;n.tagName=e.toUpperCase();return n}createElementNS(e,t){return this.createElement(t)}createTextNode(e){return new TaroText(e)}getElementById(e){const t=Fe.get(e);return(0,r.isUndefined)(t)?null:t}querySelector(e){if(/^#/.test(e)){return this.getElementById(e.slice(1))}return null}querySelectorAll(){return[]}createComment(){const e=new TaroText("");e.nodeName=we;return e}get defaultView(){return Ue.window}}function createDocument(){const e=new TaroDocument;const t=e.createElement.bind(e);const n=t($);const r=t(V);const i=t(Y);const o=t(K);o.id=K;const s=t(q);e.appendChild(n);n.appendChild(r);n.appendChild(i);i.appendChild(s);s.appendChild(o);e.documentElement=n;e.head=r;e.body=i;return e}const Ut=process.env.TARO_PLATFORM==="web"?Ue.document:Ue.document=createDocument();const Ht=process.env.TARO_PLATFORM==="web"?Ue.window.getComputedStyle:function(e){return e.style};const Wt=r.hooks.call("getEventCenter",r.Events);class RuntimeCache{constructor(e){this.cache=new Map;this.name=e}has(e){return this.cache.has(e)}set(e,t){if(e&&t){this.cache.set(e,t)}}get(e){if(this.has(e))return this.cache.get(e)}delete(e){this.cache.delete(e)}}var $t,Vt,Yt,Kt,qt,Gt;const Qt=new RuntimeCache("history");class TaroHistory extends r.Events{constructor(e,t){super();$t.add(this);Vt.set(this,void 0);Yt.set(this,[]);Kt.set(this,0);qt.set(this,void 0);N(this,qt,t.window,"f");N(this,Vt,e,"f");k(this,Vt,"f").on("__record_history__",(e=>{var t;N(this,Kt,(t=k(this,Kt,"f"),t++,t),"f");N(this,Yt,k(this,Yt,"f").slice(0,k(this,Kt,"f")),"f");k(this,Yt,"f").push({state:null,title:"",url:e})}),null);k(this,Vt,"f").on("__reset_history__",(e=>{k(this,$t,"m",Gt).call(this,e)}),null);this.on(xe.INIT,(()=>{k(this,$t,"m",Gt).call(this)}),null);this.on(xe.RESTORE,(e=>{Qt.set(e,{location:k(this,Vt,"f"),stack:k(this,Yt,"f").slice(),cur:k(this,Kt,"f")})}),null);this.on(xe.RECOVER,(e=>{if(Qt.has(e)){const t=Qt.get(e);N(this,Vt,t.location,"f");N(this,Yt,t.stack,"f");N(this,Kt,t.cur,"f")}}),null);this.on(xe.DESTORY,(e=>{Qt.delete(e)}),null);k(this,$t,"m",Gt).call(this)}get length(){return k(this,Yt,"f").length}get state(){return k(this,Yt,"f")[k(this,Kt,"f")].state}go(e){if(!(0,r.isNumber)(e)||isNaN(e))return;let t=k(this,Kt,"f")+e;t=Math.min(Math.max(t,0),this.length-1);N(this,Kt,t,"f");k(this,Vt,"f").trigger("__set_href_without_history__",k(this,Yt,"f")[k(this,Kt,"f")].url);k(this,qt,"f").trigger("popstate",k(this,Yt,"f")[k(this,Kt,"f")])}back(){this.go(-1)}forward(){this.go(1)}pushState(e,t,n){if(!n||!(0,r.isString)(n))return;N(this,Yt,k(this,Yt,"f").slice(0,k(this,Kt,"f")+1),"f");k(this,Yt,"f").push({state:e,title:t,url:n});N(this,Kt,this.length-1,"f");k(this,Vt,"f").trigger("__set_href_without_history__",n)}replaceState(e,t,n){if(!n||!(0,r.isString)(n))return;k(this,Yt,"f")[k(this,Kt,"f")]={state:e,title:t,url:n};k(this,Vt,"f").trigger("__set_href_without_history__",n)}get cache(){return Qt}}Vt=new WeakMap,Yt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,$t=new WeakSet,Gt=function _TaroHistory_reset(e=""){N(this,Yt,[{state:null,title:"",url:e||k(this,Vt,"f").href}],"f");N(this,Kt,0,"f")};const zt=process.env.TARO_PLATFORM==="web"?Ue.window.History:TaroHistory;const Jt={app:null,router:null,page:null};const getCurrentInstance=()=>Jt;var Xt,Zt,en,tn,nn,rn,on,sn,an;const cn="https://taro.com";const ln=new RuntimeCache("location");class TaroLocation extends r.Events{constructor(e){super();Xt.add(this);Zt.set(this,new Ft(cn));en.set(this,false);tn.set(this,void 0);N(this,tn,e.window,"f");k(this,Xt,"m",nn).call(this);this.on("__set_href_without_history__",(e=>{N(this,en,true,"f");const t=k(this,Zt,"f").hash;k(this,Zt,"f").href=generateFullUrl(e);if(t!==k(this,Zt,"f").hash){k(this,tn,"f").trigger("hashchange")}N(this,en,false,"f")}),null);this.on(xe.INIT,(()=>{k(this,Xt,"m",nn).call(this)}),null);this.on(xe.RESTORE,(e=>{ln.set(e,{lastHref:this.href})}),null);this.on(xe.RECOVER,(e=>{if(ln.has(e)){const t=ln.get(e);N(this,en,true,"f");k(this,Zt,"f").href=t.lastHref;N(this,en,false,"f")}}),null);this.on(xe.DESTORY,(e=>{ln.delete(e)}),null)}get protocol(){return k(this,Zt,"f").protocol}set protocol(e){const t=/^(http|https):$/i;if(!e||!(0,r.isString)(e)||!t.test(e.trim()))return;e=e.trim();const n=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").protocol=e;if(k(this,Xt,"m",an).call(this,n))k(this,Xt,"m",sn).call(this)}get host(){return k(this,Zt,"f").host}set host(e){if(!e||!(0,r.isString)(e))return;e=e.trim();const t=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").host=e;if(k(this,Xt,"m",an).call(this,t))k(this,Xt,"m",sn).call(this)}get hostname(){return k(this,Zt,"f").hostname}set hostname(e){if(!e||!(0,r.isString)(e))return;e=e.trim();const t=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").hostname=e;if(k(this,Xt,"m",an).call(this,t))k(this,Xt,"m",sn).call(this)}get port(){return k(this,Zt,"f").port}set port(e){const t=Number(e=e.trim());if(!(0,r.isNumber)(t)||t<=0)return;const n=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").port=e;if(k(this,Xt,"m",an).call(this,n))k(this,Xt,"m",sn).call(this)}get pathname(){return k(this,Zt,"f").pathname}set pathname(e){if(!e||!(0,r.isString)(e))return;e=e.trim();const t=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").pathname=e;if(k(this,Xt,"m",an).call(this,t))k(this,Xt,"m",sn).call(this)}get search(){return k(this,Zt,"f").search}set search(e){if(!e||!(0,r.isString)(e))return;e=e.trim();e=e.startsWith("?")?e:`?${e}`;const t=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").search=e;if(k(this,Xt,"m",an).call(this,t))k(this,Xt,"m",sn).call(this)}get hash(){return k(this,Zt,"f").hash}set hash(e){if(!e||!(0,r.isString)(e))return;e=e.trim();e=e.startsWith("#")?e:`#${e}`;const t=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").hash=e;if(k(this,Xt,"m",an).call(this,t))k(this,Xt,"m",sn).call(this)}get href(){return k(this,Zt,"f").href}set href(e){const t=/^(http:|https:)?\/\/.+/;if(!e||!(0,r.isString)(e)||!t.test(e=e.trim()))return;const n=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").href=e;if(k(this,Xt,"m",an).call(this,n))k(this,Xt,"m",sn).call(this)}get origin(){return k(this,Zt,"f").origin}set origin(e){const t=/^(http:|https:)?\/\/.+/;if(!e||!(0,r.isString)(e)||!t.test(e=e.trim()))return;const n=k(this,Xt,"m",rn).call(this);k(this,Zt,"f").origin=e;if(k(this,Xt,"m",an).call(this,n))k(this,Xt,"m",sn).call(this)}assign(){(0,r.warn)(true,"小程序环境中调用location.assign()无效.")}reload(){(0,r.warn)(true,"小程序环境中调用location.reload()无效.")}replace(e){this.trigger("__set_href_without_history__",e)}toString(){return this.href}get cache(){return ln}}Zt=new WeakMap,en=new WeakMap,tn=new WeakMap,Xt=new WeakSet,nn=function _TaroLocation_reset(){const e=getCurrentInstance();const t=e.router;if(t){const{path:e,params:n}=t;const r=Object.keys(n).map((e=>`${e}=${n[e]}`));const i=r.length>0?"?"+r.join("&"):"";const o=`${cn}${e.startsWith("/")?e:"/"+e}${i}`;N(this,Zt,new Ft(o),"f");this.trigger("__reset_history__",this.href)}},rn=function _TaroLocation_getPreValue(){return k(this,Zt,"f")._toRaw()},on=function _TaroLocation_rollBack(e){k(this,Zt,"f").href=e},sn=function _TaroLocation_recordHistory(){this.trigger("__record_history__",this.href)},an=function _TaroLocation_checkUrlChange(e){if(k(this,en,"f")){return false}const{protocol:t,hostname:n,port:r,pathname:i,search:o,hash:s}=k(this,Zt,"f")._toRaw();if(t!==e.protocol||n!==e.hostname||r!==e.port){k(this,Xt,"m",on).call(this,e.href);return false}if(i!==e.pathname){return true}if(o!==e.search){return true}if(s!==e.hash){k(this,tn,"f").trigger("hashchange");return true}k(this,Xt,"m",on).call(this,e.href);return false};const un=process.env.TARO_PLATFORM==="web"?Ue.window.Location:TaroLocation;function generateFullUrl(e=""){const t=cn;if(/^[/?#]/.test(e)){return t+e}return e}const hn="Macintosh";const dn="Intel Mac OS X 10_14_5";const fn="AppleWebKit/534.36 (KHTML, like Gecko) NodeJS/v4.1.0 Chrome/76.0.3809.132 Safari/534.36";const pn="("+hn+"; "+dn+") "+fn;const mn=process.env.TARO_PLATFORM==="web"?Ue.window.navigator:{appCodeName:"Mozilla",appName:"Netscape",appVersion:"5.0 "+pn,cookieEnabled:true,mimeTypes:[],onLine:true,platform:"MacIntel",plugins:[],product:"Taro",productSub:"20030107",userAgent:"Mozilla/5.0 "+pn,vendor:"Joyent",vendorSub:""};let gn;(function(){let e;if(typeof performance!=="undefined"&&performance!==null&&performance.now){gn=()=>performance.now()}else if(Date.now){e=Date.now();gn=()=>Date.now()-e}else{e=(new Date).getTime();gn=()=>(new Date).getTime()-e}})();let vn=0;const bn=typeof requestAnimationFrame!=="undefined"&&requestAnimationFrame!==null?requestAnimationFrame:function(e){const t=gn();const n=Math.max(vn+16,t);return setTimeout((function(){e(vn=n)}),n-t)};const yn=typeof cancelAnimationFrame!=="undefined"&&cancelAnimationFrame!==null?cancelAnimationFrame:function(e){clearTimeout(e)};class TaroWindow extends r.Events{constructor(){super();this.navigator=mn;this.requestAnimationFrame=bn;this.cancelAnimationFrame=yn;this.getComputedStyle=Ht;const e=[...Object.getOwnPropertyNames(global||{}),...Object.getOwnPropertySymbols(global||{})];e.forEach((e=>{if(e==="atob"||e==="document")return;if(!Object.prototype.hasOwnProperty.call(this,e)){try{this[e]=global[e]}catch(t){if(process.env.NODE_ENV!=="production"){console.warn(`[Taro warn] window.${String(e)} 在赋值到 window 时报错`)}}}}));this.Date||(this.Date=Date);this.location=new un({window:this});this.history=new zt(this.location,{window:this});this.initEvent()}initEvent(){const e=this.location;const t=this.history;this.on(xe.INIT,(t=>{e.trigger(xe.INIT,t)}),null);this.on(xe.RECOVER,(n=>{e.trigger(xe.RECOVER,n);t.trigger(xe.RECOVER,n)}),null);this.on(xe.RESTORE,(n=>{e.trigger(xe.RESTORE,n);t.trigger(xe.RESTORE,n)}),null);this.on(xe.DESTORY,(n=>{e.trigger(xe.DESTORY,n);t.trigger(xe.DESTORY,n)}),null)}get document(){return Ue.document}addEventListener(e,t){if(!(0,r.isString)(e))return;this.on(e,t,null)}removeEventListener(e,t){if(!(0,r.isString)(e))return;this.off(e,t,null)}setTimeout(...e){return setTimeout(...e)}clearTimeout(...e){return clearTimeout(...e)}}const _n=process.env.TARO_PLATFORM==="web"?Ue.window:Ue.window=new TaroWindow;const En=_n.location;const Tn=_n.history;class SVGElement extends TaroElement{}const addLeadingSlash=(e="")=>e.charAt(0)==="/"?e:"/"+e;const hasBasename=(e="",t="")=>new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t;const stripBasename=(e="",t="")=>hasBasename(e,t)?e.substring(t.length):e;const stripTrailing=(e="")=>e.replace(/[?#][\s\S]*$/,"");const stripSuffix=(e="",t="")=>e.includes(t)?e.substring(0,e.length-t.length):e;const getHomePage=(e="",t="",n={},r="")=>{var i;const o=addLeadingSlash(stripBasename(e,t));const s=((i=Object.entries(n).find((([e])=>e===o)))===null||i===void 0?void 0:i[1])||o;return r||(typeof s==="string"?s:s[0])||t};const getCurrentPage=(e="hash",t="/")=>{const n=e==="hash"?En.hash.slice(1).split("?")[0]:En.pathname;return addLeadingSlash(stripBasename(n,t))};const wn=new Map;const On=incrementId();function injectPageInstance(e,t){r.hooks.call("mergePageInstance",wn.get(t),e);wn.set(t,e)}function getPageInstance(e){return wn.get(e)}function removePageInstance(e){wn.delete(e)}function safeExecute(e,t,...n){const i=wn.get(e);if(i==null){return}const o=r.hooks.call("getLifecycle",i,t);if((0,r.isArray)(o)){const e=o.map((e=>e.apply(i,n)));return e[0]}if(!(0,r.isFunction)(o)){return}return o.apply(i,n)}function stringify(e){if(e==null){return""}const t=Object.keys(e).map((t=>t+"="+e[t])).join("&");return t===""?t:"?"+t}function getPath(e,t){const n=e.indexOf("?");if(process.env.TARO_PLATFORM==="web"){return`${n>-1?e.substring(0,n):e}${stringify((t===null||t===void 0?void 0:t.stamp)?{stamp:t.stamp}:{})}`}else{return`${n>-1?e.substring(0,n):e}${stringify(t)}`}}function getOnReadyEventKey(e){return e+"."+Ce}function getOnShowEventKey(e){return e+"."+Pe}function getOnHideEventKey(e){return e+"."+Se}function createPageConfig(e,t,n,i){const o=t!==null&&t!==void 0?t:`taro_page_${On()}`;const[s,a,c,l,u,h,d]=r.hooks.call("getMiniLifecycleImpl").page;let f=null;let p=false;let m=[];function setCurrentRouter(e){const t=process.env.TARO_PLATFORM==="web"?e.$taroPath:e.route||e.__route__||e.$taroPath;Jt.router={params:e.$taroParams,path:addLeadingSlash(t),$taroPath:e.$taroPath,onReady:getOnReadyEventKey(o),onShow:getOnShowEventKey(o),onHide:getOnHideEventKey(o)};if(!(0,r.isUndefined)(e.exitState)){Jt.router.exitState=e.exitState}}let g;let v;const b={[s](t={},n){v=new Promise((e=>{g=e}));Pt.start(H);Jt.page=this;this.config=i||{};const s=Object.assign({},t,{$taroTimestamp:Date.now()});const a=this.$taroPath=getPath(o,s);if(process.env.TARO_PLATFORM==="web"){b.path=a}if(this.$taroParams==null){this.$taroParams=s}setCurrentRouter(this);if(process.env.TARO_PLATFORM!=="web"){_n.trigger(xe.INIT,a)}const mount=()=>{Jt.app.mount(e,a,(()=>{f=Ue.document.getElementById(a);(0,r.ensure)(f!==null,"没有找到页面实例。");safeExecute(a,Oe,this.$taroParams);g();if(process.env.TARO_PLATFORM!=="web"){f.ctx=this;f.performUpdate(true,n)}else{(0,r.isFunction)(n)&&n()}}))};if(p){m.push(mount)}else{mount()}},[a](){const e=this.$taroPath;if(process.env.TARO_PLATFORM!=="web"){_n.trigger(xe.DESTORY,e)}safeExecute(e,a);p=true;Jt.app.unmount(e,(()=>{p=false;wn.delete(e);if(f){f.ctx=null;f=null}if(m.length){m.forEach((e=>e()));m=[]}}))},[c](){v.then((()=>{safeExecute(this.$taroPath,Ce);bn((()=>Wt.trigger(getOnReadyEventKey(o))));this.onReady.called=true}))},[l](e={}){v.then((()=>{Jt.page=this;setCurrentRouter(this);if(process.env.TARO_PLATFORM!=="web"){_n.trigger(xe.RECOVER,this.$taroPath)}safeExecute(this.$taroPath,Pe,e);bn((()=>Wt.trigger(getOnShowEventKey(o))))}))},[u](){if(process.env.TARO_PLATFORM!=="web"){_n.trigger(xe.RESTORE,this.$taroPath)}if(Jt.page===this){Jt.page=null;Jt.router=null}safeExecute(this.$taroPath,Se);Wt.trigger(getOnHideEventKey(o))}};if(process.env.TARO_PLATFORM==="web"){b.getOpenerEventChannel=()=>r.EventChannel.pageChannel}h.forEach((e=>{let t=false;e=e.replace(/^defer:/,(()=>{t=true;return""}));b[e]=function(){const exec=()=>safeExecute(this.$taroPath,e,...arguments);if(t){v.then(exec)}else{return exec()}}}));d.forEach((t=>{var n;if(e[t]||((n=e.prototype)===null||n===void 0?void 0:n[t])||e[t.replace(/^on/,"enable")]||(i===null||i===void 0?void 0:i[t.replace(/^on/,"enable")])){b[t]=function(...e){var n;const r=(n=e[0])===null||n===void 0?void 0:n.target;if(r===null||r===void 0?void 0:r.id){const e=r.id;const t=Ue.document.getElementById(e);if(t){r.dataset=t.dataset}}return safeExecute(this.$taroPath,t,...e)}}}));b.eh=eventHandler;if(!(0,r.isUndefined)(n)){b.data=n}r.hooks.call("modifyPageObject",b);return b}function createComponentConfig(e,t,n){const i=t!==null&&t!==void 0?t:`taro_component_${On()}`;let o=null;const[s,a]=r.hooks.call("getMiniLifecycleImpl").component;const c={[s](){var t;Pt.start(H);this.pageIdCache=((t=this.getPageId)===null||t===void 0?void 0:t.call(this))||On();const n=getPath(i,{id:this.pageIdCache});Jt.app.mount(e,n,(()=>{o=Ue.document.getElementById(n);(0,r.ensure)(o!==null,"没有找到组件实例。");this.$taroInstances=wn.get(n);safeExecute(n,Oe);if(process.env.TARO_PLATFORM!=="web"){o.ctx=this;o.performUpdate(true)}}))},[a](){const e=getPath(i,{id:this.pageIdCache});Jt.app.unmount(e,(()=>{wn.delete(e);if(o){o.ctx=null}}))},methods:{eh:eventHandler}};if(!(0,r.isUndefined)(n)){c.data=n}[Ae,Ie,ke].forEach((t=>{var n;c[t]=(n=e[t])!==null&&n!==void 0?n:r.EMPTY_OBJ}));return c}function createRecursiveComponentConfig(e){const t=e===ue;const[n,i]=r.hooks.call("getMiniLifecycleImpl").component;const o=t?{[n](){var e,t;const n=((e=this.data.i)===null||e===void 0?void 0:e.sid)||((t=this.props.i)===null||t===void 0?void 0:t.sid);if((0,r.isString)(n)){Me.set(n,this);const e=Ue.document.getElementById(n);if(e){e.ctx=this}}},[i](){var e,t;const n=((e=this.data.i)===null||e===void 0?void 0:e.sid)||((t=this.props.i)===null||t===void 0?void 0:t.sid);if((0,r.isString)(n)){Me.delete(n);const e=Ue.document.getElementById(n);if(e){e.ctx=null}}}}:r.EMPTY_OBJ;return r.hooks.call("modifyRecursiveComponentConfig",Object.assign({properties:{i:{type:Object,value:{["nn"]:(0,r.getComponentsAlias)(r.internalComponents)[te]._num}},l:{type:String,value:""}},options:{addGlobalClass:true,virtualHost:!t},methods:{eh:eventHandler}},o),{isCustomWrapper:t})}const Cn=100;const nextTick=(e,t)=>{const n=Date.now();const r=Jt.router;const timerFunc=()=>{setTimeout((function(){t?e.call(t):e()}),1)};if(r===null)return timerFunc();const i=r.$taroPath;function next(){var r,o,s;const a=Ue.document.getElementById(i);if(a===null||a===void 0?void 0:a.pendingUpdate){if(process.env.TARO_PLATFORM==="web"){(s=(o=(r=a.firstChild)===null||r===void 0?void 0:r["componentOnReady"])===null||o===void 0?void 0:o.call(r).then((()=>{timerFunc()})))!==null&&s!==void 0?s:timerFunc()}else{a.enqueueUpdateCallback(e,t)}}else if(Date.now()-n>Cn){timerFunc()}else{setTimeout((()=>next()),20)}}next()};function handleArrayFindPolyfill(){if(!(0,r.isFunction)(Array.prototype.find)){Object.defineProperty(Array.prototype,"find",{value(e){if(this==null){throw new TypeError('"this" is null or not defined')}const t=Object(this);const n=t.length>>>0;if(!(0,r.isFunction)(e)){throw new TypeError("predicate must be a function")}const i=arguments[1];let o=0;while(o<n){const n=t[o];if(e.call(i,n,o,t)){return n}o++}return undefined}})}}function handleArrayIncludesPolyfill(){if(!(0,r.isFunction)(Array.prototype.includes)){Object.defineProperty(Array.prototype,"includes",{value(e,t){if(this==null){throw new TypeError('"this" is null or not defined')}const n=Object(this);const r=n.length>>>0;if(r===0){return false}const i=t|0;let o=Math.max(i>=0?i:r-Math.abs(i),0);while(o<r){if(n[o]===e){return true}o++}return false}})}}function handleIntersectionObserverPolyfill(){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype)){Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}})}}else{handleIntersectionObserverObjectPolyfill()}}function handleIntersectionObserverObjectPolyfill(){const e=window.document;function IntersectionObserverEntry(e){this.time=e.time;this.target=e.target;this.rootBounds=e.rootBounds;this.boundingClientRect=e.boundingClientRect;this.intersectionRect=e.intersectionRect||getEmptyRect();this.isIntersecting=!!e.intersectionRect;const t=this.boundingClientRect;const n=t.width*t.height;const r=this.intersectionRect;const i=r.width*r.height;if(n){this.intersectionRatio=Number((i/n).toFixed(4))}else{this.intersectionRatio=this.isIntersecting?1:0}}function IntersectionObserver(e,t={}){if(!(0,r.isFunction)(e)){throw new Error("callback must be a function")}if(t.root&&t.root.nodeType!=1){throw new Error("root must be an Element")}this._checkForIntersections=throttle(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=e;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(t.rootMargin);this.thresholds=this._initThresholds(t.threshold);this.root=t.root||null;this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" ")}IntersectionObserver.prototype.THROTTLE_TIMEOUT=100;IntersectionObserver.prototype.POLL_INTERVAL=null;IntersectionObserver.prototype.USE_MUTATION_OBSERVER=true;IntersectionObserver.prototype.observe=function(e){const t=this._observationTargets.some((function(t){return t.element==e}));if(t)return;if(!(e&&e.nodeType==1)){throw new Error("target must be an Element")}this._registerInstance();this._observationTargets.push({element:e,entry:null});this._monitorIntersections();this._checkForIntersections()};IntersectionObserver.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e}));if(!this._observationTargets.length){this._unmonitorIntersections();this._unregisterInstance()}};IntersectionObserver.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorIntersections();this._unregisterInstance()};IntersectionObserver.prototype.takeRecords=function(){const e=this._queuedEntries.slice();this._queuedEntries=[];return e};IntersectionObserver.prototype._initThresholds=function(e){let t=e||[0];if(!Array.isArray(t))t=[t];return t.sort().filter((function(e,t,n){if(!(0,r.isNumber)(e)||isNaN(e)||e<0||e>1){throw new Error("threshold must be a number between 0 and 1 inclusively")}return e!==n[t-1]}))};IntersectionObserver.prototype._parseRootMargin=function(e){const t=e||"0px";const n=t.split(/\s+/).map((function(e){const t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t){throw new Error("rootMargin must be specified in pixels or percent")}return{value:parseFloat(t[1]),unit:t[2]}}));n[1]=n[1]||n[0];n[2]=n[2]||n[0];n[3]=n[3]||n[1];return n};IntersectionObserver.prototype._monitorIntersections=function(){if(!this._monitoringIntersections){this._monitoringIntersections=true;if(this.POLL_INTERVAL){this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL)}else{addEvent(window,"resize",this._checkForIntersections,true);addEvent(e,"scroll",this._checkForIntersections,true);if(this.USE_MUTATION_OBSERVER&&"MutationObserver"in window){this._domObserver=new MutationObserver(this._checkForIntersections);this._domObserver.observe(e,{attributes:true,childList:true,characterData:true,subtree:true})}}}};IntersectionObserver.prototype._unmonitorIntersections=function(){if(this._monitoringIntersections){this._monitoringIntersections=false;clearInterval(this._monitoringInterval);this._monitoringInterval=null;removeEvent(window,"resize",this._checkForIntersections,true);removeEvent(e,"scroll",this._checkForIntersections,true);if(this._domObserver){this._domObserver.disconnect();this._domObserver=null}}};IntersectionObserver.prototype._checkForIntersections=function(){const e=this._rootIsInDom();const t=e?this._getRootRect():getEmptyRect();this._observationTargets.forEach((function(n){const r=n.element;const i=getBoundingClientRect(r);const o=this._rootContainsTarget(r);const s=n.entry;const a=e&&o&&this._computeTargetAndRootIntersection(r,t);const c=n.entry=new IntersectionObserverEntry({time:now(),target:r,boundingClientRect:i,rootBounds:t,intersectionRect:a,intersectionRatio:-1,isIntersecting:false});if(!s){this._queuedEntries.push(c)}else if(e&&o){if(this._hasCrossedThreshold(s,c)){this._queuedEntries.push(c)}}else{if(s&&s.isIntersecting){this._queuedEntries.push(c)}}}),this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this)}};IntersectionObserver.prototype._computeTargetAndRootIntersection=function(t,n){if(window.getComputedStyle(t).display==="none")return;const r=getBoundingClientRect(t);let i=r;let o=getParentNode(t);let s=false;while(!s){let t=null;const r=o.nodeType==1?window.getComputedStyle(o):{};if(r.display==="none")return;if(o==this.root||o==e){s=true;t=n}else{if(o!=e.body&&o!=e.documentElement&&r.overflow!="visible"){t=getBoundingClientRect(o)}}if(t){i=computeRectIntersection(t,i);if(!i)break}o=getParentNode(o)}return i};IntersectionObserver.prototype._getRootRect=function(){let t;if(this.root){t=getBoundingClientRect(this.root)}else{const n=e.documentElement;const r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)};IntersectionObserver.prototype._expandRectByRootMargin=function(e){const t=this._rootMarginValues.map((function(t,n){return t.unit==="px"?t.value:t.value*(n%2?e.width:e.height)/100}));const n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};n.width=n.right-n.left;n.height=n.bottom-n.top;return n};IntersectionObserver.prototype._hasCrossedThreshold=function(e,t){const n=e&&e.isIntersecting?e.intersectionRatio||0:-1;const r=t.isIntersecting?t.intersectionRatio||0:-1;if(n===r)return;for(let e=0;e<this.thresholds.length;e++){const t=this.thresholds[e];if(t==n||t==r||t<n!==t<r){return true}}};IntersectionObserver.prototype._rootIsInDom=function(){return!this.root||containsDeep(e,this.root)};IntersectionObserver.prototype._rootContainsTarget=function(t){return containsDeep(this.root||e,t)};IntersectionObserver.prototype._registerInstance=function(){};IntersectionObserver.prototype._unregisterInstance=function(){};function now(){return window.performance&&performance.now&&performance.now()}function addEvent(e,t,n,i){if((0,r.isFunction)(e.addEventListener)){e.addEventListener(t,n,i||false)}else if((0,r.isFunction)(e.attachEvent)){e.attachEvent("on"+t,n)}}function removeEvent(e,t,n,i){if((0,r.isFunction)(e.removeEventListener)){e.removeEventListener(t,n,i||false)}else if((0,r.isFunction)(e.detatchEvent)){e.detatchEvent("on"+t,n)}}function computeRectIntersection(e,t){const n=Math.max(e.top,t.top);const r=Math.min(e.bottom,t.bottom);const i=Math.max(e.left,t.left);const o=Math.min(e.right,t.right);const s=o-i;const a=r-n;return s>=0&&a>=0&&{top:n,bottom:r,left:i,right:o,width:s,height:a}}function getBoundingClientRect(e){let t;try{t=e.getBoundingClientRect()}catch(e){}if(!t)return getEmptyRect();if(!(t.width&&t.height)){t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}}return t}function getEmptyRect(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function containsDeep(e,t){let n=t;while(n){if(n==e)return true;n=getParentNode(n)}return false}function getParentNode(e){const t=e.parentNode;if(t&&t.nodeType==11&&t.host){return t.host}if(t&&t.assignedSlot){return t.assignedSlot.parentNode}return t}window.IntersectionObserver=IntersectionObserver;window.IntersectionObserverEntry=IntersectionObserverEntry}function handleObjectAssignPolyfill(){if(!(0,r.isFunction)(Object.assign)){Object.assign=function(e){if(e==null){throw new TypeError("Cannot convert undefined or null to object")}const t=Object(e);for(let e=1;e<arguments.length;e++){const n=arguments[e];if(n!=null){for(const e in n){if(Object.prototype.hasOwnProperty.call(n,e)){t[e]=n[e]}}}}return t}}}function handleObjectEntriesPolyfill(){if(!(0,r.isFunction)(Object.entries)){Object.entries=function(e){if(e==null){throw new TypeError("Cannot convert undefined or null to object")}const t=[];if(e!=null){for(const n in e){if(Object.prototype.hasOwnProperty.call(e,n)){t.push([n,e[n]])}}}return t}}}function handleObjectDefinePropertyPolyfill(){if(!(0,r.isFunction)(Object.defineProperties)){Object.defineProperties=function(e,t){function convertToDescriptor(e){function hasProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}if(!(0,r.isObject)(e)){throw new TypeError("bad desc")}const t={};if(hasProperty(e,"enumerable"))t.enumerable=!!e.enumerable;if(hasProperty(e,"configurable")){t.configurable=!!e.configurable}if(hasProperty(e,"value"))t.value=e.value;if(hasProperty(e,"writable"))t.writable=!!e.writable;if(hasProperty(e,"get")){const n=e.get;if(!(0,r.isFunction)(n)&&!(0,r.isUndefined)(n)){throw new TypeError("bad get")}t.get=n}if(hasProperty(e,"set")){const n=e.set;if(!(0,r.isFunction)(n)&&!(0,r.isUndefined)(n)){throw new TypeError("bad set")}t.set=n}if(("get"in t||"set"in t)&&("value"in t||"writable"in t)){throw new TypeError("identity-confused descriptor")}return t}if(!(0,r.isObject)(e))throw new TypeError("bad obj");t=Object(t);const n=Object.keys(t);const i=[];for(let e=0;e<n.length;e++){i.push([n[e],convertToDescriptor(t[n[e]])])}for(let t=0;t<i.length;t++){Object.defineProperty(e,i[t][0],i[t][1])}return e}}}function handlePolyfill(){if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="Object"||process.env.SUPPORT_TARO_POLYFILL==="Object.assign"){handleObjectAssignPolyfill()}if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="Object"||process.env.SUPPORT_TARO_POLYFILL==="Object.entries"){handleObjectEntriesPolyfill()}if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="Object"||process.env.SUPPORT_TARO_POLYFILL==="Object.defineProperty"){handleObjectDefinePropertyPolyfill()}if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="Array"||process.env.SUPPORT_TARO_POLYFILL==="Array.find"){handleArrayFindPolyfill()}if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="Array"||process.env.SUPPORT_TARO_POLYFILL==="Array.includes"){handleArrayIncludesPolyfill()}if(process.env.TARO_PLATFORM==="web"&&(0,r.isObject)(window)){if(process.env.SUPPORT_TARO_POLYFILL==="enabled"||process.env.SUPPORT_TARO_POLYFILL==="IntersectionObserver"){handleIntersectionObserverPolyfill()}}}if(process.env.SUPPORT_TARO_POLYFILL!=="disabled"&&process.env.TARO_PLATFORM!=="web"){handlePolyfill()}},380:(e,t)=>{"use strict";const n="[]";const r="";const i="!0";const o="!1";const s={bindTouchStart:r,bindTouchMove:r,bindTouchEnd:r,bindTouchCancel:r,bindLongTap:r};const a={animation:r,bindAnimationStart:r,bindAnimationIteration:r,bindAnimationEnd:r,bindTransitionEnd:r};function singleQuote(e){return`'${e}'`}const c=Object.assign(Object.assign({"hover-class":singleQuote("none"),"hover-stop-propagation":o,"hover-start-time":"50","hover-stay-time":"400"},s),a);const l={type:r,size:"23",color:r};const u=Object.assign({longitude:r,latitude:r,scale:"16",markers:n,covers:r,polyline:n,circles:n,controls:n,"include-points":n,"show-location":r,"layer-style":"1",bindMarkerTap:r,bindControlTap:r,bindCalloutTap:r,bindUpdated:r},s);const h={percent:r,"stroke-width":"6",color:singleQuote("#09BB07"),activeColor:singleQuote("#09BB07"),backgroundColor:singleQuote("#EBEBEB"),active:o,"active-mode":singleQuote("backwards"),"show-info":o};const d={nodes:n};const f=Object.assign({selectable:o,space:r,decode:o},s);const p=Object.assign({size:singleQuote("default"),type:r,plain:o,disabled:r,loading:o,"form-type":r,"open-type":r,"hover-class":singleQuote("button-hover"),"hover-stop-propagation":o,"hover-start-time":"20","hover-stay-time":"70",name:r,bindagreeprivacyauthorization:r},s);const m={value:r,disabled:r,checked:o,color:singleQuote("#09BB07"),name:r};const g={bindChange:r,name:r};const v={"report-submit":o,bindSubmit:r,bindReset:r,name:r};const b={value:r,type:singleQuote(r),password:o,placeholder:r,"placeholder-style":r,"placeholder-class":singleQuote("input-placeholder"),disabled:r,maxlength:"140","cursor-spacing":"0",focus:o,"confirm-type":singleQuote("done"),"confirm-hold":o,cursor:"-1","selection-start":"-1","selection-end":"-1",bindInput:r,bindFocus:r,bindBlur:r,bindConfirm:r,name:r};const y=Object.assign({for:r,name:r},s);const _={mode:singleQuote("selector"),disabled:r,range:r,"range-key":r,value:r,start:r,end:r,fields:singleQuote("day"),"custom-item":r,name:r,bindCancel:r,bindChange:r,bindColumnChange:r};const E={value:r,"indicator-style":r,"indicator-class":r,"mask-style":r,"mask-class":r,bindChange:r,name:r};const T={name:r};const w={value:r,checked:o,disabled:r,color:singleQuote("#09BB07"),name:r};const O={bindChange:r,name:r};const C={min:"0",max:"100",step:"1",disabled:r,value:"0",activeColor:singleQuote("#1aad19"),backgroundColor:singleQuote("#e9e9e9"),"block-size":"28","block-color":singleQuote("#ffffff"),"show-value":o,bindChange:r,bindChanging:r,name:r};const P={checked:o,disabled:r,type:singleQuote("switch"),color:singleQuote("#04BE02"),bindChange:r,name:r};const S={value:r,placeholder:r,"placeholder-style":r,"placeholder-class":singleQuote("textarea-placeholder"),disabled:r,maxlength:"140","auto-focus":o,focus:o,"auto-height":o,fixed:o,"cursor-spacing":"0",cursor:"-1","selection-start":"-1","selection-end":"-1",bindFocus:r,bindBlur:r,bindLineChange:r,bindInput:r,bindConfirm:r,name:r};const A={src:r,bindLoad:"eh",bindError:"eh"};const I=Object.assign({"scroll-top":o},s);const R={"scale-area":o};const k=Object.assign(Object.assign({direction:"none",inertia:o,"out-of-bounds":o,x:r,y:r,damping:"20",friction:"2",disabled:r,scale:o,"scale-min":"0.5","scale-max":"10","scale-value":"1",bindChange:r,bindScale:r,bindHTouchMove:r,bindVTouchMove:r,width:singleQuote("10px"),height:singleQuote("10px")},s),a);const N=Object.assign(Object.assign({"scroll-x":o,"scroll-y":o,"upper-threshold":"50","lower-threshold":"50","scroll-top":r,"scroll-left":r,"scroll-into-view":r,"scroll-with-animation":o,"enable-back-to-top":o,bindScrollToUpper:r,bindScrollToLower:r,bindScroll:r},s),a);const x=Object.assign({"indicator-dots":o,"indicator-color":singleQuote("rgba(0, 0, 0, .3)"),"indicator-active-color":singleQuote("#000000"),autoplay:o,current:"0",interval:"5000",duration:"500",circular:o,vertical:o,"previous-margin":singleQuote("0px"),"next-margin":singleQuote("0px"),"display-multiple-items":"1",bindChange:r,bindTransition:r,bindAnimationFinish:r},s);const L={"item-id":r};const B={url:r,"open-type":singleQuote("navigate"),delta:"1","hover-class":singleQuote("navigator-hover"),"hover-stop-propagation":o,"hover-start-time":"50","hover-stay-time":"600",bindSuccess:r,bindFail:r,bindComplete:r};const D={id:r,src:r,loop:o,controls:o,poster:r,name:r,author:r,bindError:r,bindPlay:r,bindPause:r,bindTimeUpdate:r,bindEnded:r};const M={"device-position":singleQuote("back"),flash:singleQuote("auto"),bindStop:r,bindError:r};const j=Object.assign({src:r,mode:singleQuote("scaleToFill"),"lazy-load":o,bindError:r,bindLoad:r},s);const F=Object.assign({src:r,autoplay:o,muted:o,orientation:singleQuote("vertical"),"object-fit":singleQuote("contain"),"background-mute":o,"min-cache":"1","max-cache":"3",bindStateChange:r,bindFullScreenChange:r,bindNetStatus:r},a);const U=Object.assign({src:r,duration:r,controls:i,"danmu-list":r,"danmu-btn":r,"enable-danmu":r,autoplay:o,loop:o,muted:o,"initial-time":"0","page-gesture":o,direction:r,"show-progress":i,"show-fullscreen-btn":i,"show-play-btn":i,"show-center-play-btn":i,"enable-progress-gesture":i,"object-fit":singleQuote("contain"),poster:r,"show-mute-btn":o,bindPlay:r,bindPause:r,bindEnded:r,bindTimeUpdate:r,bindFullScreenChange:r,bindWaiting:r,bindError:r},a);const H=Object.assign({"canvas-id":r,"disable-scroll":o,bindError:r},s);const W={"unit-id":r,"ad-intervals":r,bindLoad:r,bindError:r,bindClose:r};const $={src:r,bindMessage:r,bindLoad:r,bindError:r};const V={};const Y={name:r};const K={name:r};const q={name:r};const G={};const Q={View:c,Icon:l,Progress:h,RichText:d,Text:f,Button:p,Checkbox:m,CheckboxGroup:g,Form:v,Input:b,Label:y,Picker:_,PickerView:E,PickerViewColumn:T,Radio:w,RadioGroup:O,Slider:C,Switch:P,CoverImage:A,Textarea:S,CoverView:I,MovableArea:R,MovableView:k,ScrollView:N,Swiper:x,SwiperItem:L,Navigator:B,Audio:D,Camera:M,Image:j,LivePlayer:F,Video:U,Canvas:H,Ad:W,WebView:$,Block:V,Map:u,Slot:K,SlotView:Y,NativeSlot:q,Script:G};const z=new Set(["input","checkbox","picker","picker-view","radio","slider","switch","textarea"]);const J=new Set(["input","textarea"]);const X=new Set(["progress","icon","rich-text","input","textarea","slider","switch","audio","ad","official-account","open-data","navigation-bar"]);const Z=new Map([["view",-1],["catch-view",-1],["cover-view",-1],["static-view",-1],["pure-view",-1],["block",-1],["text",-1],["static-text",6],["slot",8],["slot-view",8],["label",6],["form",4],["scroll-view",4],["swiper",4],["swiper-item",4]]);t.PLATFORM_TYPE=void 0;(function(e){e["MINI"]="mini";e["WEB"]="web";e["RN"]="rn";e["HARMONY"]="harmony";e["QUICK"]="quickapp"})(t.PLATFORM_TYPE||(t.PLATFORM_TYPE={}));const ee={h5:{type:t.PLATFORM_TYPE.WEB},harmony:{type:t.PLATFORM_TYPE.HARMONY},mini:{type:t.PLATFORM_TYPE.MINI},rn:{type:t.PLATFORM_TYPE.RN},quickapp:{type:t.PLATFORM_TYPE.QUICK}};class Events{constructor(e){var t;this.callbacks=(t=e===null||e===void 0?void 0:e.callbacks)!==null&&t!==void 0?t:{}}on(e,t,n){let r,i,o;if(!t){return this}if(typeof e==="symbol"){o=[e]}else{o=e.split(Events.eventSplitter)}this.callbacks||(this.callbacks={});const s=this.callbacks;while(r=o.shift()){const e=s[r];const o=e?e.tail:{};o.next=i={};o.context=n;o.callback=t;s[r]={tail:i,next:e?e.next:o}}return this}once(e,t,n){const wrapper=(...r)=>{t.apply(this,r);this.off(e,wrapper,n)};this.on(e,wrapper,n);return this}off(e,t,n){let r,i,o;if(!(i=this.callbacks)){return this}if(!(e||t||n)){delete this.callbacks;return this}if(typeof e==="symbol"){o=[e]}else{o=e?e.split(Events.eventSplitter):Object.keys(i)}while(r=o.shift()){let e=i[r];delete i[r];if(!e||!(t||n)){continue}const o=e.tail;while((e=e.next)!==o){const i=e.callback;const o=e.context;if(t&&i!==t||n&&o!==n){this.on(r,i,o)}}}return this}trigger(e,...t){let n,r,i,o;if(!(i=this.callbacks)){return this}if(typeof e==="symbol"){o=[e]}else{o=e.split(Events.eventSplitter)}while(n=o.shift()){if(r=i[n]){const e=r.tail;while((r=r.next)!==e){r.callback.apply(r.context||this,t)}}}return this}}Events.eventSplitter=",";class PageEvts extends Events{constructor(){super(...arguments);this.exeList=[]}on(e,t){super.on(e,t,this);this.exeList=this.exeList.reduce(((t,n)=>{if(n.eventName===e){super.trigger(n.eventName,n.data)}else{t.push(n)}return t}),[]);return this}emit(e,t){ne.trigger(e,t)}}const te=new PageEvts;class RouteEvts extends Events{emit(e,t){te.off(e);te.exeList.push({eventName:e,data:t})}addEvents(e){if(!e||typeof e!=="object")return;Object.keys(e).forEach((t=>{this.off(t);this.on(t,e[t],this)}))}}const ne=new RouteEvts;const re={pageChannel:te,routeChannel:ne};function isString(e){return typeof e==="string"}function isUndefined(e){return typeof e==="undefined"}function isNull(e){return e===null}function isObject(e){return e!==null&&typeof e==="object"}function isBoolean(e){return e===true||e===false}function isFunction(e){return typeof e==="function"}function isNumber(e){return typeof e==="number"}function isBooleanStringLiteral(e){return e==="true"||e==="false"}const ie=Array.isArray;const isWebPlatform=()=>process.env.TARO_ENV==="h5"||process.env.TARO_PLATFORM==="web";t.HOOK_TYPE=void 0;(function(e){e[e["SINGLE"]=0]="SINGLE";e[e["MULTI"]=1]="MULTI";e[e["WATERFALL"]=2]="WATERFALL"})(t.HOOK_TYPE||(t.HOOK_TYPE={}));const oe={app:["onLaunch","onShow","onHide"],page:["onLoad","onUnload","onReady","onShow","onHide",["onPullDownRefresh","onReachBottom","onPageScroll","onResize","defer:onTabItemTap","onTitleClick","onOptionMenuClick","onPopMenuClick","onPullIntercept","onAddToFavorites"],["onShareAppMessage","onShareTimeline"]],component:["attached","detached"]};function TaroHook(e,t){return{type:e,initial:t||null}}class TaroHooks extends Events{constructor(e,t){super(t);this.hooks=e;for(const t in e){const{initial:n}=e[t];if(isFunction(n)){this.on(t,n)}}}tapOneOrMany(e,t){const n=isFunction(t)?[t]:t;n.forEach((t=>this.on(e,t)))}tap(e,n){const r=this.hooks;const{type:i,initial:o}=r[e];if(i===t.HOOK_TYPE.SINGLE){this.off(e);this.on(e,isFunction(n)?n:n[n.length-1])}else{o&&this.off(e,o);this.tapOneOrMany(e,n)}}call(e,...n){var r;const i=this.hooks[e];if(!i)return;const{type:o}=i;const s=this.callbacks;if(!s)return;const a=s[e];if(a){const e=a.tail;let i=a.next;let s=n;let c;while(i!==e){c=(r=i.callback)===null||r===void 0?void 0:r.apply(i.context||this,s);if(o===t.HOOK_TYPE.WATERFALL){const e=[c];s=e}i=i.next}return c}}isExist(e){var t;return Boolean((t=this.callbacks)===null||t===void 0?void 0:t[e])}}const se=new TaroHooks({getMiniLifecycle:TaroHook(t.HOOK_TYPE.SINGLE,(e=>e)),getMiniLifecycleImpl:TaroHook(t.HOOK_TYPE.SINGLE,(function(){return this.call("getMiniLifecycle",oe)})),getLifecycle:TaroHook(t.HOOK_TYPE.SINGLE,((e,t)=>e[t])),modifyRecursiveComponentConfig:TaroHook(t.HOOK_TYPE.SINGLE,(e=>e)),getPathIndex:TaroHook(t.HOOK_TYPE.SINGLE,(e=>`[${e}]`)),getEventCenter:TaroHook(t.HOOK_TYPE.SINGLE,(e=>new e)),isBubbleEvents:TaroHook(t.HOOK_TYPE.SINGLE,(e=>{const t=new Set(["touchstart","touchmove","touchcancel","touchend","touchforcechange","tap","longpress","longtap","transitionend","animationstart","animationiteration","animationend"]);return t.has(e)})),getSpecialNodes:TaroHook(t.HOOK_TYPE.SINGLE,(()=>["view","text","image"])),onRemoveAttribute:TaroHook(t.HOOK_TYPE.SINGLE),batchedEventUpdates:TaroHook(t.HOOK_TYPE.SINGLE),mergePageInstance:TaroHook(t.HOOK_TYPE.SINGLE),modifyPageObject:TaroHook(t.HOOK_TYPE.SINGLE),createPullDownComponent:TaroHook(t.HOOK_TYPE.SINGLE),getDOMNode:TaroHook(t.HOOK_TYPE.SINGLE),modifyHydrateData:TaroHook(t.HOOK_TYPE.SINGLE),transferHydrateData:TaroHook(t.HOOK_TYPE.SINGLE),modifySetAttrPayload:TaroHook(t.HOOK_TYPE.SINGLE),modifyRmAttrPayload:TaroHook(t.HOOK_TYPE.SINGLE),onAddEvent:TaroHook(t.HOOK_TYPE.SINGLE),proxyToRaw:TaroHook(t.HOOK_TYPE.SINGLE,(function(e){return e})),modifyMpEvent:TaroHook(t.HOOK_TYPE.MULTI),modifyMpEventImpl:TaroHook(t.HOOK_TYPE.SINGLE,(function(e){try{this.call("modifyMpEvent",e)}catch(e){console.warn("[Taro modifyMpEvent hook Error]: "+(e===null||e===void 0?void 0:e.message))}})),injectNewStyleProperties:TaroHook(t.HOOK_TYPE.SINGLE),modifyTaroEvent:TaroHook(t.HOOK_TYPE.MULTI),dispatchTaroEvent:TaroHook(t.HOOK_TYPE.SINGLE,((e,t)=>{t.dispatchEvent(e)})),dispatchTaroEventFinish:TaroHook(t.HOOK_TYPE.MULTI),modifyTaroEventReturn:TaroHook(t.HOOK_TYPE.SINGLE,(()=>undefined)),modifyDispatchEvent:TaroHook(t.HOOK_TYPE.MULTI),initNativeApi:TaroHook(t.HOOK_TYPE.MULTI),patchElement:TaroHook(t.HOOK_TYPE.MULTI),modifyAddEventListener:TaroHook(t.HOOK_TYPE.SINGLE),modifyRemoveEventListener:TaroHook(t.HOOK_TYPE.SINGLE)});const ae={};const ce=[];const noop=(...e)=>{};const box=e=>({v:e});const unbox=e=>e.v;function toDashed(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function toCamelCase(e){let t="";let n=false;for(let r=0;r<e.length;r++){if(e[r]!=="-"){t+=n?e[r].toUpperCase():e[r];n=false}else{n=true}}return t}const toKebabCase=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}const le=Object.prototype.hasOwnProperty;const hasOwn=(e,t)=>le.call(e,t);function ensure(e,t){if(!e){if(process.env.NODE_ENV!=="production"){const e="\n如有疑问,请提交 issue 至:https://github.com/nervjs/taro/issues";throw new Error(t+e)}else{throw new Error(t)}}}function warn(e,t){if(process.env.NODE_ENV!=="production"){if(e){console.warn(`[taro warn] ${t}`)}}}function queryToJson(e){const t=decodeURIComponent;const n=e.split("&");const r={};let i;let o;for(let e=0,s=n.length,a;e<s;++e){a=n[e];if(a.length){const e=a.indexOf("=");if(e<0){i=t(a);o=""}else{i=t(a.slice(0,e));o=t(a.slice(e+1))}if(typeof r[i]==="string"){r[i]=[r[i]]}if(Array.isArray(r[i])){r[i].push(o)}else{r[i]=o}}}return r}let ue=1;const he=(new Date).getTime().toString();function getUniqueKey(){return he+ue++}const de={};function cacheDataSet(e,t){de[e]=t}function cacheDataGet(e,t){const n=de[e];t&&delete de[e];return n}function cacheDataHas(e){return e in de}function mergeInternalComponents(e){Object.keys(e).forEach((t=>{if(t in Q){Object.assign(Q[t],e[t])}else{Q[t]=e[t]}}));return Q}function getComponentsAlias(e){const t={};const n=e.View;const r={"#text":{},StaticView:n,StaticImage:e.Image,StaticText:e.Text,PureView:n,CatchView:n};e=Object.assign(Object.assign({},e),r);Object.keys(e).sort(((e,t)=>{const n=/^(Static|Pure|Catch)*(View|Image|Text)$/;const r=n.test(e);const i=n.test(t);if(r&&i){return e>t?1:-1}else if(r){return-1}else if(i){return 1}else{return e>=t?1:-1}})).forEach(((n,r)=>{const i={_num:String(r)};Object.keys(e[n]).filter((e=>!/^bind/.test(e)&&!["focus","blur"].includes(e))).sort().forEach(((e,t)=>{i[toCamelCase(e)]="p"+t}));t[toDashed(n)]=i}));return t}function getPlatformType(e="weapp",n=t.PLATFORM_TYPE.MINI){if(Object.keys(ee).includes(e)){n=e}const r=ee[n]||{};return r.type||n}function mergeReconciler(e,t){const n=t||se;const r=Object.keys(e);r.forEach((t=>{n.tap(t,e[t])}))}function nonsupport(e){return function(){console.warn(`小程序暂不支持 ${e}`)}}function setUniqueKeyToRoute(e,t){const n="__key_";const r=["navigateTo","redirectTo","reLaunch","switchTab"];if(r.indexOf(e)>-1){const e=t.url=t.url||"";const r=e.indexOf("?")>-1;const i=getUniqueKey();t.url+=(r?"&":"?")+`${n}=${i}`}}function indent(e,t){return e.split("\n").map(((e,n)=>{const r=n===0?"":Array(t).fill(" ").join("");return r+e})).join("\n")}const fe=new Set(["addPhoneContact","authorize","canvasGetImageData","canvasPutImageData","canvasToTempFilePath","checkSession","chooseAddress","chooseImage","chooseInvoiceTitle","chooseLocation","chooseVideo","clearStorage","closeBLEConnection","closeBluetoothAdapter","closeSocket","compressImage","connectSocket","createBLEConnection","downloadFile","exitMiniProgram","getAvailableAudioSources","getBLEDeviceCharacteristics","getBLEDeviceServices","getBatteryInfo","getBeacons","getBluetoothAdapterState","getBluetoothDevices","getClipboardData","getConnectedBluetoothDevices","getConnectedWifi","getExtConfig","getFileInfo","getImageInfo","getLocation","getNetworkType","getSavedFileInfo","getSavedFileList","getScreenBrightness","getSetting","getStorage","getStorageInfo","getSystemInfo","getUserInfo","getWifiList","hideHomeButton","hideShareMenu","hideTabBar","hideTabBarRedDot","loadFontFace","login","makePhoneCall","navigateBack","navigateBackMiniProgram","navigateTo","navigateToBookshelf","navigateToMiniProgram","notifyBLECharacteristicValueChange","hideKeyboard","hideLoading","hideNavigationBarLoading","hideToast","openBluetoothAdapter","openDocument","openLocation","openSetting","pageScrollTo","previewImage","queryBookshelf","reLaunch","readBLECharacteristicValue","redirectTo","removeSavedFile","removeStorage","removeTabBarBadge","requestSubscribeMessage","saveFile","saveImageToPhotosAlbum","saveVideoToPhotosAlbum","scanCode","sendSocketMessage","setBackgroundColor","setBackgroundTextStyle","setClipboardData","setEnableDebug","setInnerAudioOption","setKeepScreenOn","setNavigationBarColor","setNavigationBarTitle","setScreenBrightness","setStorage","setTabBarBadge","setTabBarItem","setTabBarStyle","showActionSheet","showFavoriteGuide","showLoading","showModal","showShareMenu","showTabBar","showTabBarRedDot","showToast","startBeaconDiscovery","startBluetoothDevicesDiscovery","startDeviceMotionListening","startPullDownRefresh","stopBeaconDiscovery","stopBluetoothDevicesDiscovery","stopCompass","startCompass","startAccelerometer","stopAccelerometer","showNavigationBarLoading","stopDeviceMotionListening","stopPullDownRefresh","switchTab","uploadFile","vibrateLong","vibrateShort","writeBLECharacteristicValue"]);function getCanIUseWebp(e){return function(){var t;const n=(t=e.getSystemInfoSync)===null||t===void 0?void 0:t.call(e);if(!n){if(process.env.NODE_ENV!=="production"){console.error("不支持 API canIUseWebp")}return false}const{platform:r}=n;const i=r.toLowerCase();if(i==="android"||i==="devtools"){return true}return false}}function getNormalRequest(e){return function request(t){t=t?isString(t)?{url:t}:t:{};const n=t.success;const r=t.fail;const i=t.complete;let o;const s=new Promise(((s,a)=>{t.success=e=>{n&&n(e);s(e)};t.fail=e=>{r&&r(e);a(e)};t.complete=e=>{i&&i(e)};o=e.request(t)}));equipTaskMethodsIntoPromise(o,s);s.abort=e=>{e&&e();if(o){o.abort()}return s};return s}}function processApis(e,t,n={}){const r=n.needPromiseApis||[];const i=new Set([...r,...fe]);const o=["getEnv","interceptors","Current","getCurrentInstance","options","nextTick","eventCenter","Events","preload","webpackJsonp"];const s=new Set(!n.isOnlyPromisify?Object.keys(t).filter((e=>o.indexOf(e)===-1)):r);if(n.modifyApis){n.modifyApis(s)}s.forEach((r=>{if(i.has(r)){const i=r;e[i]=(e={},...r)=>{let o=i;if(typeof e==="string"){if(r.length){return t[o](e,...r)}return t[o](e)}if(n.transformMeta){const r=n.transformMeta(o,e);o=r.key;e=r.options;if(!t.hasOwnProperty(o)){return nonsupport(o)()}}let s=null;const a=Object.assign({},e);setUniqueKeyToRoute(o,e);const c=new Promise(((i,c)=>{a.success=t=>{var r,a;(r=n.modifyAsyncResult)===null||r===void 0?void 0:r.call(n,o,t);(a=e.success)===null||a===void 0?void 0:a.call(e,t);if(o==="connectSocket"){i(Promise.resolve().then((()=>s?Object.assign(s,t):t)))}else{i(t)}};a.fail=t=>{var n;(n=e.fail)===null||n===void 0?void 0:n.call(e,t);c(t)};a.complete=t=>{var n;(n=e.complete)===null||n===void 0?void 0:n.call(e,t)};if(r.length){s=t[o](a,...r)}else{s=t[o](a)}}));if(["uploadFile","downloadFile"].includes(o)){equipTaskMethodsIntoPromise(s,c);c.progress=e=>{s===null||s===void 0?void 0:s.onProgressUpdate(e);return c};c.abort=e=>{e===null||e===void 0?void 0:e();s===null||s===void 0?void 0:s.abort();return c}}return c}}else{let i=r;if(n.transformMeta){i=n.transformMeta(r,{}).key}if(!t.hasOwnProperty(i)){e[r]=nonsupport(r);return}if(isFunction(t[r])){e[r]=(...e)=>{if(n.handleSyncApis){return n.handleSyncApis(r,t,e)}else{return t[i].apply(t,e)}}}else{e[r]=t[i]}}}));!n.isOnlyPromisify&&equipCommonApis(e,t,n)}function equipCommonApis(e,t,n={}){e.canIUseWebp=getCanIUseWebp(e);e.getCurrentPages=getCurrentPages||nonsupport("getCurrentPages");e.getApp=getApp||nonsupport("getApp");e.env=t.env||{};try{e.requirePlugin=requirePlugin||nonsupport("requirePlugin")}catch(t){e.requirePlugin=nonsupport("requirePlugin")}const r=n.request||getNormalRequest(t);function taroInterceptor(e){return r(e.requestParams)}const i=new e.Link(taroInterceptor);e.request=i.request.bind(i);e.addInterceptor=i.addInterceptor.bind(i);e.cleanInterceptors=i.cleanInterceptors.bind(i);e.miniGlobal=e.options.miniGlobal=t;e.getAppInfo=function(){return{platform:process.env.TARO_PLATFORM||"MiniProgram",taroVersion:process.env.TARO_VERSION||"unknown",designWidth:e.config.designWidth}};e.createSelectorQuery=delayRef(e,t,"createSelectorQuery","exec");e.createIntersectionObserver=delayRef(e,t,"createIntersectionObserver","observe")}function equipTaskMethodsIntoPromise(e,t){if(!e||!t)return;const n=["abort","onHeadersReceived","offHeadersReceived","onProgressUpdate","offProgressUpdate","onChunkReceived","offChunkReceived"];e&&n.forEach((n=>{if(n in e){t[n]=e[n].bind(e)}}))}function delayRef(e,t,n,r){return function(...i){const o=t[n](...i);const s=o[r].bind(o);o[r]=function(...t){e.nextTick((()=>s(...t)))};return o}}t.Shortcuts=void 0;(function(e){e["Container"]="container";e["Childnodes"]="cn";e["Text"]="v";e["NodeType"]="nt";e["NodeName"]="nn";e["Style"]="st";e["Class"]="cl";e["Src"]="src"})(t.Shortcuts||(t.Shortcuts={}));t.EMPTY_ARR=ce;t.EMPTY_OBJ=ae;t.EventChannel=re;t.Events=Events;t.PLATFORM_CONFIG_MAP=ee;t.TaroHook=TaroHook;t.TaroHooks=TaroHooks;t.animation=a;t.box=box;t.cacheDataGet=cacheDataGet;t.cacheDataHas=cacheDataHas;t.cacheDataSet=cacheDataSet;t.capitalize=capitalize;t.controlledComponent=z;t.ensure=ensure;t.focusComponents=J;t.getComponentsAlias=getComponentsAlias;t.getPlatformType=getPlatformType;t.getUniqueKey=getUniqueKey;t.hasOwn=hasOwn;t.hooks=se;t.indent=indent;t.internalComponents=Q;t.isArray=ie;t.isBoolean=isBoolean;t.isBooleanStringLiteral=isBooleanStringLiteral;t.isFunction=isFunction;t.isNull=isNull;t.isNumber=isNumber;t.isObject=isObject;t.isString=isString;t.isUndefined=isUndefined;t.isWebPlatform=isWebPlatform;t.mergeInternalComponents=mergeInternalComponents;t.mergeReconciler=mergeReconciler;t.nestElements=Z;t.nonsupport=nonsupport;t.noop=noop;t.processApis=processApis;t.queryToJson=queryToJson;t.setUniqueKeyToRoute=setUniqueKeyToRoute;t.singleQuote=singleQuote;t.toCamelCase=toCamelCase;t.toDashed=toDashed;t.toKebabCase=toKebabCase;t.touchEvents=s;t.unbox=unbox;t.voidElements=X;t.warn=warn},162:(e,t,n)=>{const{hooks:r}=n(517);const i=n(173)["default"];if(r.isExist("initNativeApi")){r.call("initNativeApi",i)}e.exports=i;e.exports["default"]=e.exports},302:(e,t,n)=>{const{promiseFinally:r,toError:i}=n(840);e.exports=class Timeout{static set(e,t){return(new Timeout).set(e,t)}static wrap(e,t,n){return(new Timeout).wrap(e,t,n)}constructor(){this._id=null;this._delay=null}get id(){return this._id}get delay(){return this._delay}set(e,t=""){return new Promise(((n,r)=>{this.clear();const o=t?()=>r(i(t)):n;this._id=setTimeout(o,e);this._delay=e}))}wrap(e,t,n=""){const i=r(e,(()=>this.clear()));const o=this.set(t,n);return Promise.race([i,o])}clear(){if(this._id){clearTimeout(this._id)}}}},840:(e,t)=>{t.promiseFinally=(e,t)=>{const success=e=>{t();return e};const error=e=>{t();return Promise.reject(e)};return Promise.resolve(e).then(success,error)};t.toError=e=>{e=typeof e==="function"?e():e;return typeof e==="string"?new Error(e):e}},36:e=>{var t;var n;var r;var i;var o;var s;var a;var c;var l;var u;var h;var d;var f;var p;var m;var g;var v;var b;var y;var _;var E;var T;var w;var O;var C;var P;var S;var A;var I;var R;var k;(function(t){var n=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd){define("tslib",["exports"],(function(e){t(createExporter(n,createExporter(e)))}))}else if(true&&typeof e.exports==="object"){t(createExporter(n,createExporter(e.exports)))}else{t(createExporter(n))}function createExporter(e,t){if(e!==n){if(typeof Object.create==="function"){Object.defineProperty(e,"__esModule",{value:true})}else{e.__esModule=true}}return function(n,r){return e[n]=t?t(n,r):r}}})((function(e){var N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};t=function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");N(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)};n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};r=function(e,t){var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)n[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++){if(t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i]))n[r[i]]=e[r[i]]}return n};i=function(e,t,n,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)if(s=e[a])o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o;return i>3&&o&&Object.defineProperty(t,n,o),o};o=function(e,t){return function(n,r){t(n,r,e)}};s=function(e,t,n,r,i,o){function accept(e){if(e!==void 0&&typeof e!=="function")throw new TypeError("Function expected");return e}var s=r.kind,a=s==="getter"?"get":s==="setter"?"set":"value";var c=!t&&e?r["static"]?e:e.prototype:null;var l=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{});var u,h=false;for(var d=n.length-1;d>=0;d--){var f={};for(var p in r)f[p]=p==="access"?{}:r[p];for(var p in r.access)f.access[p]=r.access[p];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(accept(e||null))};var m=(0,n[d])(s==="accessor"?{get:l.get,set:l.set}:l[a],f);if(s==="accessor"){if(m===void 0)continue;if(m===null||typeof m!=="object")throw new TypeError("Object expected");if(u=accept(m.get))l.get=u;if(u=accept(m.set))l.set=u;if(u=accept(m.init))i.unshift(u)}else if(u=accept(m)){if(s==="field")i.unshift(u);else l[a]=u}}if(c)Object.defineProperty(c,r.name,l);h=true};a=function(e,t,n){var r=arguments.length>2;for(var i=0;i<t.length;i++){n=r?t[i].call(e,n):t[i].call(e)}return r?n:void 0};c=function(e){return typeof e==="symbol"?e:"".concat(e)};l=function(e,t,n){if(typeof t==="symbol")t=t.description?"[".concat(t.description,"]"):"";return Object.defineProperty(e,"name",{configurable:true,value:n?"".concat(n," ",t):t})};u=function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};h=function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(r.next(e))}catch(e){i(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};d=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function verb(e){return function(t){return step([e,t])}}function step(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};f=function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))I(t,e,n)};I=Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]};p=function(e){var t=typeof Symbol==="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&r>=e.length)e=void 0;return{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};m=function(e,t){var n=typeof Symbol==="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{while((t===void 0||t-- >0)&&!(i=r.next()).done)o.push(i.value)}catch(e){s={error:e}}finally{try{if(i&&!i.done&&(n=r["return"]))n.call(r)}finally{if(s)throw s.error}}return o};g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e};v=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};b=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};y=function(e){return this instanceof y?(this.v=e,this):new y(e)};_=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},verb("next"),verb("throw"),verb("return",awaitReturn),i[Symbol.asyncIterator]=function(){return this},i;function awaitReturn(e){return function(t){return Promise.resolve(t).then(e,reject)}}function verb(e,t){if(r[e]){i[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||resume(e,t)}))};if(t)i[e]=t(i[e])}}function resume(e,t){try{step(r[e](t))}catch(e){settle(o[0][3],e)}}function step(e){e.value instanceof y?Promise.resolve(e.value.v).then(fulfill,reject):settle(o[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,t){if(e(t),o.shift(),o.length)resume(o[0][0],o[0][1])}};E=function(e){var t,n;return t={},verb("next"),verb("throw",(function(e){throw e})),verb("return"),t[Symbol.iterator]=function(){return this},t;function verb(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:false}:i?i(t):t}:i}};T=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof p==="function"?p(e):e[Symbol.iterator](),n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n);function verb(t){n[t]=e[t]&&function(n){return new Promise((function(r,i){n=e[t](n),settle(r,i,n.done,n.value)}))}}function settle(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}};w=function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t};O=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))I(t,e,n);x(t,e);return t};C=function(e){return e&&e.__esModule?e:{default:e}};P=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)};S=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n};A=function(e,t){if(t===null||typeof t!=="object"&&typeof t!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e==="function"?t===e:e.has(t)};R=function(e,t,n){if(t!==null&&t!==void 0){if(typeof t!=="object"&&typeof t!=="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose];if(n)i=r}if(typeof r!=="function")throw new TypeError("Object not disposable.");if(i)r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}};e.stack.push({value:t,dispose:r,async:n})}else if(n){e.stack.push({async:true})}return t};var L=typeof SuppressedError==="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};k=function(e){function fail(t){e.error=e.hasError?new L(t,e.error,"An error was suppressed during disposal."):t;e.hasError=true}function next(){while(e.stack.length){var t=e.stack.pop();try{var n=t.dispose&&t.dispose.call(t.value);if(t.async)return Promise.resolve(n).then(next,(function(e){fail(e);return next()}))}catch(e){fail(e)}}if(e.hasError)throw e.error}return next()};e("__extends",t);e("__assign",n);e("__rest",r);e("__decorate",i);e("__param",o);e("__esDecorate",s);e("__runInitializers",a);e("__propKey",c);e("__setFunctionName",l);e("__metadata",u);e("__awaiter",h);e("__generator",d);e("__exportStar",f);e("__createBinding",I);e("__values",p);e("__read",m);e("__spread",g);e("__spreadArrays",v);e("__spreadArray",b);e("__await",y);e("__asyncGenerator",_);e("__asyncDelegator",E);e("__asyncValues",T);e("__makeTemplateObject",w);e("__importStar",O);e("__importDefault",C);e("__classPrivateFieldGet",P);e("__classPrivateFieldSet",S);e("__classPrivateFieldIn",A);e("__addDisposableResource",R);e("__disposeResources",k)}))}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var o=true;try{e[n].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[n]}return i.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var n in t){if(__nccwpck_require__.o(t,n)&&!__nccwpck_require__.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(926);module.exports=n})();
|
|
2
|
+
//# sourceMappingURL=index.js.map
|