if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e()).then((()=>n))),(n=>t.resolve(e()).then((()=>{throw n}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function t(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}var n=require("./JLDeviceWechat+33Protocol.js");function i(e,t,i){n.connect(e,(e=>{t.call(this,e)})),n.onDisconnet((e=>{i.call(this,e)}))}__definePage("pages/index/index",e.defineComponent({__name:"index",setup(n){let r="",o={name:"",deviceId:"",prefixName:"",selected:!1,_name:""};return(n,s)=>(e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("button",{onClick:s[0]||(s[0]=e=>(uni.openBluetoothAdapter({success(e){t("log","at pages/index/index.vue:56",e),uni.startBluetoothDevicesDiscovery({services:[],success(e){t("log","at pages/index/index.vue:61",e),uni.onBluetoothDeviceFound((function(e){for(let s of e.devices){let e=s.name,a=s.deviceId;if(""!=e&&null!=e&&"undefined"!=e&&(r=-1!=e.indexOf("G-WJ")||-1!=e.indexOf("ETC")||-1!=e.indexOf("G-JL")?"ETC":-1!=e.indexOf("5201121")?"JL":e.substring(0,2),r=r.toUpperCase(),"WJ"==r||"JL"==r||"JY"==r||"AT"==r||"JT"==r||"WQ"==r||"CG"==r)){var n="";switch(r){case"WJ":n="万集";break;case"JL":n="聚利";break;case"JY":n="金溢";break;case"AT":n="埃特斯";break;case"JT":n="建投";break;case"WQ":n="握奇";break;case"CG":n="成谷";break;case"TD":n="天地融";break;case"ZZ":n="智载";break;case"ETC":n="前装";break;default:n="未知"}t("log","at pages/index/index.vue:124","输出内容",n,a),wx.stopBluetoothDevicesDiscovery({success(e){i(o,(function(e){t("log","at pages/index/index.vue:128","链接成功")}),(function(e){t("log","at pages/index/index.vue:130","链接失败")}))}})}}}))}})}}),void setTimeout((()=>{uni.closeBluetoothAdapter({})}),1e4)))},"蓝牙扫描"),e.createElementVNode("picker",{mode:"selector",class:"text",range:["类型一","类型二","类型三","类型四"]}," 选择器 ")]))}}));const r={onLaunch:function(){t("log","at App.vue:4","App Launch")},onShow:function(){t("log","at App.vue:48","App Show")},onHide:function(){t("log","at App.vue:51","App Hide")}}; /*! * pinia v2.0.14 * (c) 2022 Eduardo San Martin Morote * @license MIT */ let o;const s=e=>o=e,a=Symbol();function c(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var u,p;(p=u||(u={})).direct="direct",p.patchObject="patch object",p.patchFunction="patch function";const f="undefined"!=typeof window;function l(){const t=e.effectScope(!0),n=t.run((()=>e.ref({})));let i=[],r=[];const o=e.markRaw({install(e){s(o),o._a=e,e.provide(a,o),e.config.globalProperties.$pinia=o,r.forEach((e=>i.push(e))),r=[]},use(e){return this._a?i.push(e):r.push(e),this},_p:i,_a:null,_e:t,_s:new Map,state:n});return o}const d=()=>{};function h(t,n,i,r=d){t.push(n);const o=()=>{const e=t.indexOf(n);e>-1&&(t.splice(e,1),r())};return!i&&e.getCurrentInstance()&&e.onUnmounted(o),o}function y(e,...t){e.slice().forEach((e=>{e(...t)}))}function v(t,n){for(const i in n){if(!n.hasOwnProperty(i))continue;const r=n[i],o=t[i];c(o)&&c(r)&&t.hasOwnProperty(i)&&!e.isRef(r)&&!e.isReactive(r)?t[i]=v(o,r):t[i]=r}return t}const g=Symbol();const{assign:b}=Object;function m(t,n,i={},r,o,a){let p;const f=b({actions:{}},i),l={deep:!0};let m,A,_,$=e.markRaw([]),x=e.markRaw([]);const P=r.state.value[t];let k;function w(n){let i;m=A=!1,"function"==typeof n?(n(r.state.value[t]),i={type:u.patchFunction,storeId:t,events:_}):(v(r.state.value[t],n),i={type:u.patchObject,payload:n,storeId:t,events:_});const o=k=Symbol();e.nextTick().then((()=>{k===o&&(m=!0)})),A=!0,y($,i,r.state.value[t])}a||P||(r.state.value[t]={}),e.ref({});const O=d;function j(e,n){return function(){s(r);const i=Array.from(arguments),o=[],a=[];function c(e){o.push(e)}function u(e){a.push(e)}let p;y(x,{args:i,name:e,store:S,after:c,onError:u});try{p=n.apply(this&&this.$id===t?this:S,i)}catch(f){throw y(a,f),f}return p instanceof Promise?p.then((e=>(y(o,e),e))).catch((e=>(y(a,e),Promise.reject(e)))):(y(o,p),p)}}const I={_p:r,$id:t,$onAction:h.bind(null,x),$patch:w,$reset:O,$subscribe(n,i={}){const o=h($,n,i.detached,(()=>s())),s=p.run((()=>e.watch((()=>r.state.value[t]),(e=>{("sync"===i.flush?A:m)&&n({storeId:t,type:u.direct,events:_},e)}),b({},l,i))));return o},$dispose:function(){p.stop(),$=[],x=[],r._s.delete(t)}},S=e.reactive(b({},I));r._s.set(t,S);const R=r._e.run((()=>(p=e.effectScope(),p.run((()=>n())))));for(const s in R){const n=R[s];if(e.isRef(n)&&(U=n,!e.isRef(U)||!U.effect)||e.isReactive(n))a||(!P||c(T=n)&&T.hasOwnProperty(g)||(e.isRef(n)?n.value=P[s]:v(n,P[s])),r.state.value[t][s]=n);else if("function"==typeof n){const e=j(s,n);R[s]=e,f.actions[s]=n}}var T,U;return b(S,R),b(e.toRaw(S),R),Object.defineProperty(S,"$state",{get:()=>r.state.value[t],set:e=>{w((t=>{b(t,e)}))}}),r._p.forEach((e=>{b(S,p.run((()=>e({store:S,app:r._a,pinia:r,options:f}))))})),P&&a&&i.hydrate&&i.hydrate(S.$state,P),m=!0,A=!0,S}function A(t,n,i){let r,c;const u="function"==typeof n;function p(t,i){const p=e.getCurrentInstance();(t=t||p&&e.inject(a))&&s(t),(t=o)._s.has(r)||(u?m(r,n,c,t):function(t,n,i,r){const{state:o,actions:a,getters:c}=n,u=i.state.value[t];let p;p=m(t,(function(){u||(i.state.value[t]=o?o():{});const n=e.toRefs(i.state.value[t]);return b(n,a,Object.keys(c||{}).reduce(((n,r)=>(n[r]=e.markRaw(e.computed((()=>{s(i);const e=i._s.get(t);return c[r].call(e,e)}))),n)),{}))}),n,i,0,!0),p.$reset=function(){const e=o?o():{};this.$patch((t=>{b(t,e)}))}}(r,c,t));return t._s.get(r)}return"string"==typeof t?(r=t,c=u?i:n):(c=t,r=t.id),p.$id=r,p}let _="Store";function $(e,t){return Array.isArray(t)?t.reduce(((t,n)=>(t[n]=function(){return e(this.$pinia)[n]},t)),{}):Object.keys(t).reduce(((n,i)=>(n[i]=function(){const n=e(this.$pinia),r=t[i];return"function"==typeof r?r.call(this,n):n[r]},n)),{})}const x=$;var P=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get MutationType(){return u},PiniaVuePlugin:function(e){e.mixin({beforeCreate(){const e=this.$options;if(e.pinia){const t=e.pinia;if(!this._provided){const e={};Object.defineProperty(this,"_provided",{get:()=>e,set:t=>Object.assign(e,t)})}this._provided[a]=t,this.$pinia||(this.$pinia=t),t._a=this,f&&s(t)}else!this.$pinia&&e.parent&&e.parent.$pinia&&(this.$pinia=e.parent.$pinia)},destroyed(){delete this._pStores}})},acceptHMRUpdate:function(e,t){return n=>{const i=t.data.pinia||e._pinia;if(i){t.data.pinia=i;for(const o in n){const s=n[o];if("function"==typeof(r=s)&&"string"==typeof r.$id&&i._s.has(s.$id)){const n=s.$id;if(n!==e.$id)return console.warn(`The id of the store changed from "${e.$id}" to "${n}". Reloading.`),t.invalidate();const r=i._s.get(n);if(!r)return void console.log("[Pinia]: skipping hmr because store doesn't exist yet");s(i,r)}}var r}}},createPinia:l,defineStore:A,getActivePinia:()=>e.getCurrentInstance()&&e.inject(a)||o,mapActions:function(e,t){return Array.isArray(t)?t.reduce(((t,n)=>(t[n]=function(...t){return e(this.$pinia)[n](...t)},t)),{}):Object.keys(t).reduce(((n,i)=>(n[i]=function(...n){return e(this.$pinia)[t[i]](...n)},n)),{})},mapGetters:x,mapState:$,mapStores:function(...e){return e.reduce(((e,t)=>(e[t.$id+_]=function(){return t(this.$pinia)},e)),{})},mapWritableState:function(e,t){return Array.isArray(t)?t.reduce(((t,n)=>(t[n]={get(){return e(this.$pinia)[n]},set(t){return e(this.$pinia)[n]=t}},t)),{}):Object.keys(t).reduce(((n,i)=>(n[i]={get(){return e(this.$pinia)[t[i]]},set(n){return e(this.$pinia)[t[i]]=n}},n)),{})},setActivePinia:s,setMapStoreSuffix:function(e){_=e},skipHydrate:function(e){return Object.defineProperty(e,g,{})},storeToRefs:function(t){{t=e.toRaw(t);const n={};for(const i in t){const r=t[i];(e.isRef(r)||e.isReactive(r))&&(n[i]=e.toRef(t,i))}return n}}});const k={baseUrl:"http://127.0.0.1:8080/api"};function w(e={}){return e.url=k.baseUrl,e.header={"content-type":"application/json;charset=UTF-8"},new Promise(((t,n)=>{e.success=e=>{uni.hideLoading(),t(e)},e.fail=e=>{n(e)},uni.request(e)}))}const O=A("counter",(()=>{const t=e.ref(0),n=e.ref(0),i=e.ref({});return uni.getSystemInfo({success(e){i.value=e,t.value=e.screenWidth,n.value=e.screenHeight}}),{systemInfo:i}}));const{app:j,Vuex:I,Pinia:S}=function(){const t=e.createVueApp(r);t.use(l());const n=O();return t.config.globalProperties.$systemInfo=n.systemInfo,t.config.globalProperties.$request=w,{app:t,Pinia:P}}();uni.Vuex=I,uni.Pinia=S,j.provide("__globalStyles",__uniConfig.styles),j._component.mpType="app",j._component.render=()=>{},j.mount("#app")}(Vue);