From 8ebe8b0b341d5f0d9f87b63dde4cf4d308d04b26 Mon Sep 17 00:00:00 2001 From: iqudoo Date: Thu, 30 Apr 2026 10:34:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 2 +- src/services/provider/scan.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 223d05d..f90be7e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=7)}([function(n,t,e){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};t.getVersion=function(){return o.version},t.getConfig=function(n){var t=u[n];return t||(t=i[n]),t},t.setConfig=function(n){n&&"object"==(void 0===n?"undefined":r(n))&&Object.assign(u,n)};var o={version:"0.0.1.0430.1030"},i={},u={}},function(n,t,e){"use strict";t.__esModule=!0;var r;r="undefined"!=typeof GameGlobal?Object.assign({},GameGlobal):"undefined"==typeof window?{setTimeout:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}((function(){return setTimeout.apply(void 0,arguments)})),setInterval:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}((function(){return setInterval.apply(void 0,arguments)})),clearTimeout:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}((function(){return clearTimeout.apply(void 0,arguments)})),clearInterval:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}((function(){return clearInterval.apply(void 0,arguments)}))}:window,t.default=r},function(n,t,e){"use strict";t.__esModule=!0,t.createUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var t=16*Math.random()|0;return("x"==n?t:3&t|8).toString(16)}))}},function(n,t,e){"use strict";t.__esModule=!0,t.isReadyCalled=function(){return s},e(8);var r=function(n){return n&&n.__esModule?n:{default:n}}(e(1)),o=e(0),i=e(13),u=e(6),c=e(5),a=null,s=!1;r.default.__IScanReady__&&r.default.__IScanReady__(),t.default=Object.assign({},{config:function(n){return n&&(0,o.setConfig)(n),a||(a=Promise.resolve().then((function(){return(0,c.printDebug)("-------------------------------"),(0,c.printDebug)("sdk_version:",(0,o.getVersion)()),(0,c.printDebug)("-------------------------------"),(0,u.initWxJssdk)(),Promise.resolve().then((function(){s=!0})).catch((function(n){throw a=null,n}))})))},onScanListener:i.onScanListener,offScanListener:i.offScanListener,setStatusListener:i.setStatusListener,getStatus:i.getStatus,startScan:i.startScan,stopScan:i.stopScan,clear:i.clear})},function(n,t,e){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};t.toAny=function(n,t){if(null==n)return t;var e=function(n){if("string"!=typeof n)return void 0===n?"undefined":r(n);try{var t=JSON.parse(n);return void 0===t?"undefined":r(t)}catch(t){var e=parseFloat(n);return isNaN(e)||""+e!==n?"string":"number"}}(n);switch(null!=t&&(e=void 0===t?"undefined":r(t)),e){case"number":return function(n){try{return JSON.parse(n)}catch(t){return parseFloat(n)}}(n);case"boolean":return function(n){return!!n&&"false"!=n&&"0"!=n}(n);case"object":return function(n,t){if("object"===(void 0===n?"undefined":r(n)))return n;try{return JSON.parse(n)}catch(n){}return t}(n,t);case"string":return function(n,t){try{var e=void 0===n?"undefined":r(n);if("string"===e)return n;if("boolean"===e)return n?"true":"false";if("number"===e)return""+n;if("object"===e)return JSON.stringify(n)}catch(n){}return t}(n,t)}return t}},function(n,t,e){"use strict";t.__esModule=!0,t.printError=function(n){for(var t,e=arguments.length,r=Array(e>1?e-1:0),o=1;o1?e-1:0),o=1;o1?e-1:0),o=1;o1)for(var e=1;e0?(0,u.startScanner)((function(n){!function(n){if(function(n){for(var t=0;t=0&&e.splice(r,1)}},t.bridgeSync=l,t.bridgeAsync=function(n,t,e){return new Promise((function(r,o){if(f()){var u=!1,a=null;e>0&&(a=setTimeout((function(){u=!0,a=null,o("bridgeAsync timeout")}),e));var s=(0,i.createUUID)()+"_"+Date.now();!function(n,t){t&&(c[n]=t)}(s,(function(n,t){u||(a&&clearTimeout(a),0==n?r(t):o(t))})),l(n,Object.assign({request_id:s},t))}else o("Can't bridgeAsync, because not in runtime")})).then((function(e){var r=[n];return t&&(r.push("params:"),r.push(t)),e&&(r.push("resp:"),r.push(e)),o.printDebug.apply(void 0,["bridge resp >>>"].concat(r)),e})).catch((function(e){throw t?(0,o.printWarn)("bridge err >>>",n,"params:",t,e):(0,o.printWarn)("bridge err >>>",n,e),e}))};var r=e(4),o=e(5),i=e(2),u={},c={},a="__bridge_client__";function s(){var n=a+"_handle_callback";window[n]||(window[n]=function(n){var t=(0,r.toAny)(n,{}),e=t.method,o=t.payload,i=t.code,a=t.request_id,s=(0,r.toAny)(o,{});a?c[a]&&c[a](i,s):u[e]&&u[e].forEach((function(n){n&&n(s)}))})}function f(){return!!window[a]}function l(n,t){s();var e=(0,r.toAny)(function(n){for(var t=n.split("."),e=window;t.length>1;)e=e[t.shift()];if(e&&1==t.length&&e.hasOwnProperty(t[0])){for(var r,o=arguments.length,i=Array(o>1?o-1:0),u=1;u>>"].concat(i)),e}},function(n,t,e){"use strict";t.__esModule=!0,t.isSupportWebScan=function(){return"undefined"!=typeof navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&"undefined"!=typeof BarcodeDetector},t.isSupportImageScan=function(){return"undefined"!=typeof document&&"undefined"!=typeof BarcodeDetector&&"undefined"!=typeof URL&&URL.createObjectURL},t.stopScanForWeb=f,t.startScanForImage=function(){return s((0,o.getConfig)("scanType")).then((function(n){return new Promise((function(n){var t=document.createElement("input");t.type="file",t.accept="image/*",t.style.display="none";var e=!1,r=function(t){e||(e=!0,u("__webscan_image_input__"),n(t))};t.id="__webscan_image_input__",t.onchange=function(){r(t.files&&t.files[0])},t.oncancel=function(){r(null)},document.body.appendChild(t),t.click()})).then((function(t){return function(n,t){return t?"undefined"!=typeof createImageBitmap?createImageBitmap(t).then((function(t){return n.detect(t).then((function(n){return t.close&&t.close(),n&&n[0]})).catch((function(n){throw t.close&&t.close(),n}))})):new Promise((function(e,r){var o=new Image,i=URL.createObjectURL(t);o.onload=function(){n.detect(o).then((function(n){URL.revokeObjectURL(i),e(n&&n[0])})).catch((function(n){URL.revokeObjectURL(i),r(n)}))},o.onerror=function(n){URL.revokeObjectURL(i),r(n)},o.src=i})):Promise.resolve(null)}(n,t)}))})).then((function(n){return n&&n.rawValue?{result:n.rawValue}:{success:!1,error:"未识别到二维码或条形码"}}))},t.startScanForWeb=function(n,t){return new Promise((function(e,u){try{i.uuid=(0,r.createUUID)(),i.finish=!1;var l,d=c("video","__webscan_video__","display: none",!1),p=n||"position: fixed; width: 300px; height: 240px; top: 0; left: 0; z-index: 9999;",h=c("canvas","__webscan_canvas__",p+" display: none;",!0);h.style.display,h.style.cssText=p,l=h.style.display,h.style.display="none";var v=h.getContext("2d"),y=i.uuid;d.width=300,d.height=300,d.uuid=i.uuid,s((0,o.getConfig)("scanType")).then((function(n){return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(t){return{detector:n,stream:t}}))})).then((function(n){var r=n.detector,c=n.stream;d.srcObject=c,d.setAttribute("playsinline",!0),d.play();var s=(0,o.getConfig)("closeWebScan",(function(){})),p=(0,o.getConfig)("displayWebScan",(function(n,t){}));p&&p(h,(function(){f()})),h.style.display="none";var g=!1,m=!1,_=!1,b=function(){if(!_){_=!0;try{c.getTracks()[0].stop()}catch(n){}s&&s()}};requestAnimationFrame((function(){!function n(){try{d.readyState!==d.HAVE_ENOUGH_DATA||g||(h.height=d.videoHeight,h.width=d.videoWidth,v.setTransform(-1,0,0,1,h.width,0),v.drawImage(d,0,0,h.width,h.height),v.setTransform(1,0,0,1,0,0),m||(m=!0,h.style.display=l||""),g=!0,r.detect(d).then((function(n){var r=n&&n[0];if(r&&r.rawValue&&i.uuid==y){if(t&&!t(r.rawValue))return;!function(n,t,e){var r=e.cornerPoints;if(r&&r.length)for(var o=0;o1&&(e[t[0]]=t[1])}})),s.status>=200&&s.status<300){var r={errMsg:"request:ok"};try{var o=JSON.parse(s.response);r.data=o}catch(n){r.data=s.response}r.header=e,r.statusCode=s.status,n.success&&n.success(r)}else n.fail&&n.fail({errMsg:"request:fail",data:s.response,header:e})}},s.send(t)}(Object.assign({},{url:t,method:e,data:f,headers:c,json:a,timeout:s},{success:n,fail:r}))})).then((function(n){if(n.statusCode&&200!=n.statusCode)throw n;return n}))};var r=e(2),o=e(17),i=e(18)},function(n,t,e){"use strict";t.__esModule=!0,t.hex_md5=function(n){return h(o(d(n),n.length*r))},t.b64_md5=function(n){return v(o(d(n),n.length*r))},t.str_md5=function(n){return p(o(d(n),n.length*r))},t.hex_hmac_md5=function(n,t){return h(f(n,t))},t.b64_hmac_md5=function(n,t){return v(f(n,t))},t.str_hmac_md5=function(n,t){return p(f(n,t))};var r=8;function o(n,t){n[t>>5]|=128<>>9<<4)]=t;for(var e=1732584193,r=-271733879,o=-1732584194,i=271733878,f=0;f>>32-t}(l(l(t,n),l(r,i)),o),e)}function u(n,t,e,r,o,u,c){return i(t&e|~t&r,n,t,o,u,c)}function c(n,t,e,r,o,u,c){return i(t&r|e&~r,n,t,o,u,c)}function a(n,t,e,r,o,u,c){return i(t^e^r,n,t,o,u,c)}function s(n,t,e,r,o,u,c){return i(e^(t|~r),n,t,o,u,c)}function f(n,t){var e=d(n);e.length>16&&(e=o(e,n.length*r));for(var i=Array(16),u=Array(16),c=0;c<16;c++)i[c]=909522486^e[c],u[c]=1549556828^e[c];var a=o(i.concat(d(t)),512+t.length*r);return o(u.concat(a),640)}function l(n,t){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}function d(n){for(var t=Array(),e=(1<>5]|=(n.charCodeAt(o/r)&e)<>5]>>>o%32&e);return t}function h(n){for(var t="0123456789abcdef",e="",r=0;r<4*n.length;r++)e+=t.charAt(n[r>>2]>>r%4*8+4&15)+t.charAt(n[r>>2]>>r%4*8&15);return e}function v(n){for(var t="",e=0;e<4*n.length;e+=3)for(var r=(n[e>>2]>>e%4*8&255)<<16|(n[e+1>>2]>>(e+1)%4*8&255)<<8|n[e+2>>2]>>(e+2)%4*8&255,o=0;o<4;o++)8*e+6*o>32*n.length?t+="":t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63);return t}},function(n,t,e){"use strict";t.__esModule=!0,t.stringifyQuery=function(n){return Object.keys(n).map((function(t){var e=n[t];return t+"="+encodeURIComponent(e)})).join("&")},t.decodeQuery=function(n){return Object.keys(n).reduce((function(t,e){var r=n[e];return t[e]=decodeURIComponent(r),t}),{})},t.parseQueryParams=o,t.appendQueryParams=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=o(n),r=e.url,i=e.params;Object.keys(t).forEach((function(n){var e=t[n];null!=e?i[n]=e:delete i[n]}));var u=Object.keys(i).map((function(n){var t=i[n];return n+"="+encodeURIComponent(t)})).join("&");return r?u?r+"?"+u:r:u},t.getQueryString=function(n,t){var e=r.default.location.search,o=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),i=e.substr(1).match(o);return null!=i?decodeURIComponent(unescape(i[2])):t};var r=function(n){return n&&n.__esModule?n:{default:n}}(e(1));function o(n){var t="",e={};if(!n||"string"!=typeof n)return{url:t,params:e};var r="",o=n.indexOf("?"),i=n.indexOf("#"),u=n.indexOf("=");return o>=0?(t=n.substring(0,o),r=n.substring(o+1,i>0?i:n.length)):u>=0?(t="",r=n):(t=n,r=""),r.split("&").map((function(n){var t=n.indexOf("=");if(t>0){var r=n.substring(0,t),o=n.substring(t+1);e[r]=decodeURIComponent(o)}})),{url:t,params:e}}},function(n,t,e){"use strict";t.__esModule=!0,t.startScanner=function(n){n&&"function"==typeof n&&(r=n,"scanning"!==o&&(o="scanning",a(),window.addEventListener("keydown",s)))},t.stopScanner=function(){"scanning"===o&&(o="closed",r=null,a(),window.removeEventListener("keydown",s))};var r=null,o="closed",i="",u=null,c=0;function a(){i="",c=0,u&&(clearTimeout(u),u=null)}function s(n){if("scanning"===o&&!(n.ctrlKey||n.metaKey||n.altKey)){if("Enter"===n.key){var t=function(n){return n.replace(/[\uFF01-\uFF5E]/g,(function(n){return String.fromCharCode(n.charCodeAt(0)-65248)})).replace(/\u3002/g,".")}(i);return t&&function(n){n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation()}(n),console.log("onScannerKeydown",t),a(),void(t&&r&&r(t))}if(n.key&&1===n.key.length){var e=Date.now();c&&e-c>100&&a(),c=e,i+=n.key,u&&clearTimeout(u),u=setTimeout((function(){a()}),100)}}}},function(n,t,e){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};t.exportSDK=function(n,t){for(var e=arguments.length,i=Array(e>2?e-2:0),u=2;u1&&void 0!==arguments[1]?arguments[1]:"",o={};return Object.keys(t).forEach((function(i){var u=t[i];if("object"===(void 0===u?"undefined":r(u)))Object.assign(o,n(u,""+e+i+"."));else if("function"==typeof u){var c,a=""+e+i;Object.assign(o,((c={})[a]=a,c))}})),o}(n);var a={};return Object.keys(c).forEach((function(t){var e=c[t],r=e&&e.method||t;!function(n,t,e){var r=t.split(".");r.forEach((function(t,o){o==r.length-1?n[t]=e:n[t]||(n[t]={}),n=n[t]}))}(a,t,(function(){for(var e=arguments.length,u=Array(e),c=0;c1;)e=e[r.shift()];if(e&&1==r.length&&e.hasOwnProperty(r[0])){for(var o,i=arguments.length,u=Array(i>2?i-2:0),c=2;c1?e-1:0),o=1;o1?e-1:0),o=1;o1?e-1:0),o=1;o1)for(var e=1;e0?(0,u.startScanner)((function(n){!function(n){if(function(n){for(var t=0;t=0&&e.splice(r,1)}},t.bridgeSync=l,t.bridgeAsync=function(n,t,e){return new Promise((function(r,o){if(f()){var u=!1,a=null;e>0&&(a=setTimeout((function(){u=!0,a=null,o("bridgeAsync timeout")}),e));var s=(0,i.createUUID)()+"_"+Date.now();!function(n,t){t&&(c[n]=t)}(s,(function(n,t){u||(a&&clearTimeout(a),0==n?r(t):o(t))})),l(n,Object.assign({request_id:s},t))}else o("Can't bridgeAsync, because not in runtime")})).then((function(e){var r=[n];return t&&(r.push("params:"),r.push(t)),e&&(r.push("resp:"),r.push(e)),o.printDebug.apply(void 0,["bridge resp >>>"].concat(r)),e})).catch((function(e){throw t?(0,o.printWarn)("bridge err >>>",n,"params:",t,e):(0,o.printWarn)("bridge err >>>",n,e),e}))};var r=e(4),o=e(5),i=e(2),u={},c={},a="__bridge_client__";function s(){var n=a+"_handle_callback";window[n]||(window[n]=function(n){var t=(0,r.toAny)(n,{}),e=t.method,o=t.payload,i=t.code,a=t.request_id,s=(0,r.toAny)(o,{});a?c[a]&&c[a](i,s):u[e]&&u[e].forEach((function(n){n&&n(s)}))})}function f(){return!!window[a]}function l(n,t){s();var e=(0,r.toAny)(function(n){for(var t=n.split("."),e=window;t.length>1;)e=e[t.shift()];if(e&&1==t.length&&e.hasOwnProperty(t[0])){for(var r,o=arguments.length,i=Array(o>1?o-1:0),u=1;u>>"].concat(i)),e}},function(n,t,e){"use strict";t.__esModule=!0,t.isSupportWebScan=function(){return"undefined"!=typeof navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&"undefined"!=typeof BarcodeDetector},t.isSupportImageScan=function(){return"undefined"!=typeof document&&"undefined"!=typeof BarcodeDetector&&"undefined"!=typeof URL&&URL.createObjectURL},t.stopScanForWeb=f,t.startScanForImage=function(){return s((0,o.getConfig)("scanType")).then((function(n){return new Promise((function(n){var t=document.createElement("input");t.type="file",t.accept="image/*",t.style.display="none";var e=!1,r=function(t){e||(e=!0,u("__webscan_image_input__"),n(t))};t.id="__webscan_image_input__",t.onchange=function(){r(t.files&&t.files[0])},t.oncancel=function(){r(null)},document.body.appendChild(t),t.click()})).then((function(t){return function(n,t){return t?"undefined"!=typeof createImageBitmap?createImageBitmap(t).then((function(t){return n.detect(t).then((function(n){return t.close&&t.close(),n&&n[0]})).catch((function(n){throw t.close&&t.close(),n}))})):new Promise((function(e,r){var o=new Image,i=URL.createObjectURL(t);o.onload=function(){n.detect(o).then((function(n){URL.revokeObjectURL(i),e(n&&n[0])})).catch((function(n){URL.revokeObjectURL(i),r(n)}))},o.onerror=function(n){URL.revokeObjectURL(i),r(n)},o.src=i})):Promise.resolve(null)}(n,t)}))})).then((function(n){return n&&n.rawValue?{result:n.rawValue}:{success:!1,error:"未识别到二维码或条形码"}}))},t.startScanForWeb=function(n,t){return new Promise((function(e,u){try{i.uuid=(0,r.createUUID)(),i.finish=!1;var l,d=c("video","__webscan_video__","display: none",!1),p=n||"position: fixed; width: 300px; height: 240px; top: 0; left: 0; z-index: 9999;",h=c("canvas","__webscan_canvas__",p+" display: none;",!0);h.style.display,h.style.cssText=p,l=h.style.display,h.style.display="none";var v=h.getContext("2d"),y=i.uuid;d.width=300,d.height=300,d.uuid=i.uuid,s((0,o.getConfig)("scanType")).then((function(n){return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(t){return{detector:n,stream:t}}))})).then((function(n){var r=n.detector,c=n.stream;d.srcObject=c,d.setAttribute("playsinline",!0),d.play();var s=(0,o.getConfig)("closeWebScan",(function(){})),p=(0,o.getConfig)("displayWebScan",(function(n,t){}));p&&p(h,(function(){f()})),h.style.display="none";var g=!1,m=!1,_=!1,b=function(){if(!_){_=!0;try{c.getTracks()[0].stop()}catch(n){}s&&s()}};requestAnimationFrame((function(){!function n(){try{d.readyState!==d.HAVE_ENOUGH_DATA||g||(h.height=d.videoHeight,h.width=d.videoWidth,v.setTransform(-1,0,0,1,h.width,0),v.drawImage(d,0,0,h.width,h.height),v.setTransform(1,0,0,1,0,0),m||(m=!0,h.style.display=l||""),g=!0,r.detect(d).then((function(n){var r=n&&n[0];if(r&&r.rawValue&&i.uuid==y){if(t&&!t(r.rawValue))return;!function(n,t,e){var r=e.cornerPoints;if(r&&r.length)for(var o=0;o1&&(e[t[0]]=t[1])}})),s.status>=200&&s.status<300){var r={errMsg:"request:ok"};try{var o=JSON.parse(s.response);r.data=o}catch(n){r.data=s.response}r.header=e,r.statusCode=s.status,n.success&&n.success(r)}else n.fail&&n.fail({errMsg:"request:fail",data:s.response,header:e})}},s.send(t)}(Object.assign({},{url:t,method:e,data:f,headers:c,json:a,timeout:s},{success:n,fail:r}))})).then((function(n){if(n.statusCode&&200!=n.statusCode)throw n;return n}))};var r=e(2),o=e(17),i=e(18)},function(n,t,e){"use strict";t.__esModule=!0,t.hex_md5=function(n){return h(o(d(n),n.length*r))},t.b64_md5=function(n){return v(o(d(n),n.length*r))},t.str_md5=function(n){return p(o(d(n),n.length*r))},t.hex_hmac_md5=function(n,t){return h(f(n,t))},t.b64_hmac_md5=function(n,t){return v(f(n,t))},t.str_hmac_md5=function(n,t){return p(f(n,t))};var r=8;function o(n,t){n[t>>5]|=128<>>9<<4)]=t;for(var e=1732584193,r=-271733879,o=-1732584194,i=271733878,f=0;f>>32-t}(l(l(t,n),l(r,i)),o),e)}function u(n,t,e,r,o,u,c){return i(t&e|~t&r,n,t,o,u,c)}function c(n,t,e,r,o,u,c){return i(t&r|e&~r,n,t,o,u,c)}function a(n,t,e,r,o,u,c){return i(t^e^r,n,t,o,u,c)}function s(n,t,e,r,o,u,c){return i(e^(t|~r),n,t,o,u,c)}function f(n,t){var e=d(n);e.length>16&&(e=o(e,n.length*r));for(var i=Array(16),u=Array(16),c=0;c<16;c++)i[c]=909522486^e[c],u[c]=1549556828^e[c];var a=o(i.concat(d(t)),512+t.length*r);return o(u.concat(a),640)}function l(n,t){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}function d(n){for(var t=Array(),e=(1<>5]|=(n.charCodeAt(o/r)&e)<>5]>>>o%32&e);return t}function h(n){for(var t="0123456789abcdef",e="",r=0;r<4*n.length;r++)e+=t.charAt(n[r>>2]>>r%4*8+4&15)+t.charAt(n[r>>2]>>r%4*8&15);return e}function v(n){for(var t="",e=0;e<4*n.length;e+=3)for(var r=(n[e>>2]>>e%4*8&255)<<16|(n[e+1>>2]>>(e+1)%4*8&255)<<8|n[e+2>>2]>>(e+2)%4*8&255,o=0;o<4;o++)8*e+6*o>32*n.length?t+="":t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63);return t}},function(n,t,e){"use strict";t.__esModule=!0,t.stringifyQuery=function(n){return Object.keys(n).map((function(t){var e=n[t];return t+"="+encodeURIComponent(e)})).join("&")},t.decodeQuery=function(n){return Object.keys(n).reduce((function(t,e){var r=n[e];return t[e]=decodeURIComponent(r),t}),{})},t.parseQueryParams=o,t.appendQueryParams=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=o(n),r=e.url,i=e.params;Object.keys(t).forEach((function(n){var e=t[n];null!=e?i[n]=e:delete i[n]}));var u=Object.keys(i).map((function(n){var t=i[n];return n+"="+encodeURIComponent(t)})).join("&");return r?u?r+"?"+u:r:u},t.getQueryString=function(n,t){var e=r.default.location.search,o=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),i=e.substr(1).match(o);return null!=i?decodeURIComponent(unescape(i[2])):t};var r=function(n){return n&&n.__esModule?n:{default:n}}(e(1));function o(n){var t="",e={};if(!n||"string"!=typeof n)return{url:t,params:e};var r="",o=n.indexOf("?"),i=n.indexOf("#"),u=n.indexOf("=");return o>=0?(t=n.substring(0,o),r=n.substring(o+1,i>0?i:n.length)):u>=0?(t="",r=n):(t=n,r=""),r.split("&").map((function(n){var t=n.indexOf("=");if(t>0){var r=n.substring(0,t),o=n.substring(t+1);e[r]=decodeURIComponent(o)}})),{url:t,params:e}}},function(n,t,e){"use strict";t.__esModule=!0,t.startScanner=function(n){n&&"function"==typeof n&&(r=n,"scanning"!==o&&(o="scanning",a(),window.addEventListener("keydown",s)))},t.stopScanner=function(){"scanning"===o&&(o="closed",r=null,a(),window.removeEventListener("keydown",s))};var r=null,o="closed",i="",u=null,c=0;function a(){i="",c=0,u&&(clearTimeout(u),u=null)}function s(n){if("scanning"===o&&!(n.ctrlKey||n.metaKey||n.altKey)){if("Enter"===n.key){var t=function(n){return n.replace(/[\uFF01-\uFF5E]/g,(function(n){return String.fromCharCode(n.charCodeAt(0)-65248)})).replace(/\u3002/g,".")}(i);return t&&function(n){n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation()}(n),console.log("onScannerKeydown",t),a(),void(t&&r&&r(t))}if(n.key&&1===n.key.length){var e=Date.now();c&&e-c>100&&a(),c=e,i+=n.key,u&&clearTimeout(u),u=setTimeout((function(){a()}),100)}}}},function(n,t,e){"use strict";t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};t.exportSDK=function(n,t){for(var e=arguments.length,i=Array(e>2?e-2:0),u=2;u1&&void 0!==arguments[1]?arguments[1]:"",o={};return Object.keys(t).forEach((function(i){var u=t[i];if("object"===(void 0===u?"undefined":r(u)))Object.assign(o,n(u,""+e+i+"."));else if("function"==typeof u){var c,a=""+e+i;Object.assign(o,((c={})[a]=a,c))}})),o}(n);var a={};return Object.keys(c).forEach((function(t){var e=c[t],r=e&&e.method||t;!function(n,t,e){var r=t.split(".");r.forEach((function(t,o){o==r.length-1?n[t]=e:n[t]||(n[t]={}),n=n[t]}))}(a,t,(function(){for(var e=arguments.length,u=Array(e),c=0;c1;)e=e[r.shift()];if(e&&1==r.length&&e.hasOwnProperty(r[0])){for(var o,i=arguments.length,u=Array(i>2?i-2:0),c=2;c