@pisell/materials 1.0.639 → 1.0.640

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.
@@ -11,7 +11,7 @@ C=function t(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object
11
11
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
12
12
  F=function t(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,n,r){return t[n]=r}}function s(e,t,n,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new E(o||[]);return r(i,"_invoke",{value:O(e,n,l)}),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(A([])));g&&g!==t&&n.call(g,a)&&(m=g);var b=h.prototype=f.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var c=u(e[r],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==H(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;r(this,"_invoke",{value:function e(n,r){function i(){return new t((function(e,t){o(n,r,e,t)}))}return a=a?a.then(i,i):i()}})}function O(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return C()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=M(i,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new w(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=A,E.prototype={constructor:E,reset:function e(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function e(t){if(this.done)throw t;var r=this;function o(e,n){return l.type="throw",l.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function e(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var l=i?i.completion:{};return l.type=t,l.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(l)},complete:function e(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),d},finish:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var a=o.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function e(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function $(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){$(a,r,o,i,l,"next",e)}function l(e){$(a,r,o,i,l,"throw",e)}i(void 0)}))}}var W=function e(t){return JSON.stringify(t.map((function(e){return[{tag:"text",text:"".concat(e.key,": ")},{tag:"text",text:"".concat(e.value)}]})))},Y=function(){var e=U(F().mark((function e(t){var n,r,o,a;return F().wrap((function e(i){for(;;)switch(i.prev=i.next){case 0:return n=t.title,r=t.content,o=W(r),i.next=4,fetch(V,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({msg_type:"post",content:'{"post":{"zh_cn":{"title":"'.concat(n,'","content":').concat(o,"}}}")})});case 4:return a=i.sent,i.next=7,a.json();case 7:return i.abrupt("return",i.sent);case 8:case"end":return i.stop()}}),e)})));return function t(n){return e.apply(this,arguments)}}(),G=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Object(E.g)(t)&&!Object(E.e)(t))return console.error("amount is not a number"),t;try{var o=Math.round(t*Math.pow(10,n))/Math.pow(10,n),a=Math.abs(o),i=Math.floor(a),l=(a-i).toFixed(n).substring(2),c=r+i.toString();return n>0&&-1!==(c+="."+l).indexOf(".00")&&(c=c.substring(0,c.length-3)),o<0&&(c="-"+c),c}catch(e){return console.error(e),t}},Q=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=r.precision,a=void 0===o?2:o,i=r.useThousandsSeparator,l=void 0!==i&&i,c=r.showCurrencySymbol,s=void 0===c||c,u=r.hideDecimalForWholeNumbers,d=void 0===u||u;if(!Object(E.g)(t)&&!Object(E.e)(t))return console.error("amount is not a number"),t;try{var f=Math.round(t*Math.pow(10,a))/Math.pow(10,a),p=Math.abs(f),h=Math.floor(p),m=(p-h).toFixed(a).substring(2),v=l?h.toLocaleString():h.toString();return v=s?n+v:v,a>0&&(v+="."+m,d&&-1!==v.indexOf(".00")&&(v=v.substring(0,v.length-3))),f<0&&(v="-"+v),v}catch(e){return console.error(e),t}},q=6,X=0,K=1,Z=2,J=1,ee=2,te=function e(t){384!=t&&576!=t&&(t=384),this.widthOfColumns=new Array(6),this.dotsPerLine=t,this.charHSize=1,this.orderData=""};function ne(e,t){for(var n="",r,o=0;o<t;o++)n+=(r=255&e)<16?"0"+r.toString(16):r.toString(16),e>>=8;return n}function re(e){var t,n,r,o;return e<0?"":e<=127?ne(t=127&e,1):e<=2047?(n=63&e|128,ne(t=e>>6&31|192,1)+ne(n,1)):e<=65535?(n=e>>6&63|128,r=63&e|128,ne(t=e>>12&15|224,1)+ne(n,1)+ne(r,1)):e<=1114111?(n=e>>12&63|128,r=e>>6&63|128,o=63&e|128,ne(t=e>>18&7|240,1)+ne(n,1)+ne(r,1)+ne(o,1)):""}function oe(e){return e>=32&&e<=879||e>=65377&&e<=65439?12:8208==e||e>=8211&&e<=8214||e>=8216&&e<=8217||e>=8220&&e<=8221||e>=8229&&e<=8230||e>=8240&&e<=8243||8245==e||8251==e||e>=4352&&e<=4607||e>=9312&&e<=9471||e>=9632&&e<=10175||e>=11904&&e<=12255||e>=12288&&e<=12687||e>=12704&&e<=12783||e>=12800&&e<=40959||e>=44032&&e<=55295||e>=63744&&e<=64255||e>=65072&&e<=65103||e>=126976&&e<=129535||e>=65281&&e<=65374||e>=65504&&e<=65509?24:0}function ae(e,t){return 65535&e|(3&t)<<16}function ie(e){return 65535&e}function le(e){return e>>16&3}function ce(e,t,n){if(t<=0||n<=0)return null;if(e.length<t*n)return null;var r=t+7>>3,o=new Array(r*n),a=new Array(2*t),i,l,c,s,u,d,f,p,h,m,v,g,b,y,w,O,M;for(f=0,p=1,i=0;i<t;i++)a[i]=0,a[t+i]=e[i];for(u=0;u<n;u++){if(v=f,f=p,p=v,M=u<n-1)for(l=(u+1)*t,i=0;i<t;i++)a[p*t+i]=e[l],l++;for(c=u*r,i=0;i<r;i++)o[c]=0,c++;for(h=0,m=0,c=u*r,d=128,s=1;s<=t;s++){var j=f*t+h;a[j]<128?(g=a[j],o[c]|=d):g=a[j]-255,h++,1==d?(c++,d=128):d>>=1,b=g-((O=7*g+8>>4)+(w=5*g+8>>4)+(y=3*g+8>>4)),s<t&&(a[f*t+h]+=O),M&&(a[p*t+m]+=w,s>1&&(a[p*t+m-1]+=y),s<t&&(a[p*t+m+1]+=b)),m++}}return o}function se(e,t,n){if(t<=0||n<=0)return null;if(e.length<t*n)return null;var r=t+7>>3,o=new Array(r*n),a,i,l,c,s,u;for(a=0,i=0,s=0;s<n;s++){for(l=i,u=128,c=0;c<t;c++)e[a]<128&&(o[l]|=u),a++,1==u?(l++,u=128):u>>=1;i+=r}return o}function ue(e,t,n){var r=new Array(t*n),o=0,a=0,i,l,c,s,u;for(l=0;l<n;l++)for(i=0;i<t;i++)c=255&e.data[a++],s=255&e.data[a++],u=255&e.data[a++],a++,r[o++]=11*c+16*s+5*u>>5&255;return r}te.prototype.clear=function(){this.orderData=""},te.prototype.print=function(e,t,n){var r=this;return new Promise((function(o,a){var i=new XMLHttpRequest;i.timeout=1e4;var l="https://"+e+"/cgi-bin/print.cgi?sn="+t+"&copies="+n;i.open("POST",l,!0),i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)if("200"===i.status.toString(10)){var e,t=/task_id: (\d+)/.exec(i.responseText);o(t[1]||"")}else a(i.responseText)},i.setRequestHeader("Content-Type","text/plain; charset=utf-8"),i.send(r.orderData)}))},te.prototype.queryStatus=function(e,t,n){return new Promise((function(r,o){var a=new XMLHttpRequest;a.timeout=1e4;var i="https://"+e+"/cgi-bin/status.cgi?sn="+t+"&task_id="+n;a.open("POST",i,!0),a.onreadystatechange=function(){a.readyState===XMLHttpRequest.DONE&&("200"===a.status.toString(10)?r(a.responseText):o(a.responseText))},a.setRequestHeader("Content-Type","text/plain; charset=utf-8"),a.send()}))},te.prototype.appendText=function(e){for(var t=0;t<e.length;t++)this.orderData+=re(e.charCodeAt(t))},te.prototype.lineFeed=function(e){for(var t=0;t<e;t++)this.orderData+="0a"},te.prototype.restoreDefaultSettings=function(){this.charHSize=1,this.orderData+="1b40"},te.prototype.restoreDefaultLineSpacing=function(){this.orderData+="1b32"},te.prototype.setLineSpacing=function(e){e>=0&&e<=255&&(this.orderData+="1b33"+ne(e,1))},te.prototype.setPrintModes=function(e,t,n){var r=0;e&&(r|=8),t&&(r|=16),n&&(r|=32),this.charHSize=n?2:1,this.orderData+="1b21"+ne(r,1)},te.prototype.setCharacterSize=function(e,t){var n=0;e>=1&&e<=8&&(n|=e-1),t>=1&&t<=8&&(n|=t-1<<4,this.charHSize=t),this.orderData+="1d21"+ne(n,1)},te.prototype.horizontalTab=function(e){for(var t=0;t<e;t++)this.orderData+="09"},te.prototype.setAbsolutePrintPosition=function(e){e>=0&&e<=65535&&(this.orderData+="1b24"+ne(e,2))},te.prototype.setRelativePrintPosition=function(e){e>=-32768&&e<=32767&&(this.orderData+="1b5c"+ne(e,2))},te.prototype.setAlignment=function(e){e>=0&&e<=2&&(this.orderData+="1b61"+ne(e,1))},te.prototype.cutPaper=function(e){this.orderData+="1d56"+(e?"30":"31")},te.prototype.postponedCutPaper=function(e,t){t>=0&&t<=255&&(this.orderData+="1d56"+(e?"61":"62")+ne(t,1))},te.prototype.setColumnWidths=function(){var e,t,n,r;if(0!=arguments.length){for(e=0;e<6;e++)this.widthOfColumns[e]=0;for(t=this.dotsPerLine,e=0;e<arguments.length;e++){if(6==e)return;if(n=ie(arguments[e]),r=le(arguments[e]),0==n||n>t)return void(this.widthOfColumns[e]=ae(t,r));this.widthOfColumns[e]=arguments[e],t-=n}}},te.prototype.printInColumns=function(){var e=new Array(6),t=new Array(6),n=new Array(6),r,o,a,i,l,c,s,u,d;if(0!=arguments.length){for(l=0,r=0;r<arguments.length&&(6!=r&&0!=this.widthOfColumns[r]);r++)e[r]="",t[r]=arguments[r],l++;do{for(d=!0,u=0,r=0;r<l;r++)if(c=ie(this.widthOfColumns[r]),0!=t[r].length){for(d=!1,e[r]="",n[r]=0,o=0;o<t[r].length;o++){if(10==(a=t[r].charCodeAt(o))){o++;break}if(0==(i=oe(a))&&(a="?",i=12),i*=this.charHSize,n[r]+i>c)break;e[r]+=String.fromCharCode(a),n[r]+=i}switch(o<t[r].length?t[r]=t[r].substring(o):t[r]="",s=le(this.widthOfColumns[r])){case K:this.setAbsolutePrintPosition(u+(c-n[r])/2);break;case Z:this.setAbsolutePrintPosition(u+(c-n[r]));break;default:this.setAbsolutePrintPosition(u)}this.appendText(e[r]),u+=c}else u+=c;d||this.lineFeed(1)}while(!d)}},te.prototype.appendBarcode=function(e,t,n,r,o){var a=o.length;if(0!=a){a>255&&(a=255),t<1?t=1:t>255&&(t=255),n<1?n=1:n>6&&(n=6),this.orderData+="1d48"+ne(3&e,1),this.orderData+="1d6600",this.orderData+="1d68"+ne(t,1),this.orderData+="1d77"+ne(n,1),this.orderData+="1d6b"+ne(r,1)+ne(a,1);for(var i=0;i<a;i++)this.orderData+=ne(o.charCodeAt(i),1)}},te.prototype.appendQRcode=function(e,t,n){var r=n.length;if(0!=r){r>65535&&(r=65535),e<1?e=1:e>16&&(e=16),t<0?t=0:t>3&&(t=3),this.orderData+="1d286b040031410000",this.orderData+="1d286b03003143"+ne(e,1),this.orderData+="1d286b03003145"+ne(t+48,1),this.orderData+="1d286b"+ne(r+3,2)+"315030";for(var o=0;o<r;o++)this.orderData+=ne(n.charCodeAt(o),1);this.orderData+="1d286b0300315130"}},te.prototype.appendImage=function(e,t){var n,r,o=e.width,a=e.height;n=ue(e,o,a),r="diffuse"==t?ce(n,o,a):se(n,o,a),o=o+7>>3,this.orderData+="1d763000",this.orderData+=ne(o,2),this.orderData+=ne(a,2);for(var i=0;i<r.length;i++)this.orderData+=ne(255&r[i],1)},te.prototype.enterPageMode=function(){this.orderData+="1b4c"},te.prototype.setPrintAreaInPageMode=function(e,t,n,r){this.orderData+="1b57",this.orderData+=ne(e,2),this.orderData+=ne(t,2),this.orderData+=ne(n,2),this.orderData+=ne(r,2)},te.prototype.setPrintDirectionInPageMode=function(e){e>=0&&e<=3&&(this.orderData+="1b54"+ne(e,1))},te.prototype.setAbsolutePrintPositionInPageMode=function(e){e>=0&&e<=65535&&(this.orderData+="1d24"+ne(e,2))},te.prototype.setRelativePrintPositionInPageMode=function(e){e>=-32768&&e<=32767&&(this.orderData+="1d5c"+ne(e,2))},te.prototype.printAndExitPageMode=function(){this.orderData+="0c"},te.prototype.printInPageMode=function(){this.orderData+="1b0c"},te.prototype.clearInPageMode=function(){this.orderData+="18"},te.prototype.exitPageMode=function(){this.orderData+="1b53"};var de=te;function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(){
13
13
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
14
- pe=function t(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,n,r){return t[n]=r}}function s(e,t,n,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new E(o||[]);return r(i,"_invoke",{value:O(e,n,l)}),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(A([])));g&&g!==t&&n.call(g,a)&&(m=g);var b=h.prototype=f.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var c=u(e[r],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==fe(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;r(this,"_invoke",{value:function e(n,r){function i(){return new t((function(e,t){o(n,r,e,t)}))}return a=a?a.then(i,i):i()}})}function O(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return C()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=M(i,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new w(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=A,E.prototype={constructor:E,reset:function e(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function e(t){if(this.done)throw t;var r=this;function o(e,n){return l.type="throw",l.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function e(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var l=i?i.completion:{};return l.type=t,l.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(l)},complete:function e(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),d},finish:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var a=o.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function e(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function he(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){he(a,r,o,i,l,"next",e)}function l(e){he(a,r,o,i,l,"throw",e)}i(void 0)}))}}var ve=function e(t){t.setAlignment(X),t.appendText("------------------------------------------------\n")},ge=function(){var e=me(pe().mark((function e(t,n,r){var o,a,i;return pe().wrap((function e(l){for(;;)switch(l.prev=l.next){case 0:return o=new de(576),a=r.title,o.clear(),o.lineFeed(1),o.setPrintModes(!1,!1,!1),o.setAlignment(K),o.appendText("\u6253\u5370\u6d4b\u8bd5\n"),ve(o),o.setAlignment(X),o.appendText("Order time: 2023-10-19 14:15:50\n"),o.appendText("Order number\n"),o.appendText("D3012"),ve(o),o.setColumnWidths(ae(150,X),ae(426,X)),o.printInColumns("Number","Name"),o.setPrintModes(!0,!0,!0),o.printInColumns("1 x","\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0"),o.setPrintModes(!1,!1,!1),ve(o),o.lineFeed(4),o.cutPaper(!1),o.printAndExitPageMode(),l.next=24,o.print(t,n,1);case 24:return i=l.sent,l.abrupt("return",i);case 26:case"end":return l.stop()}}),e)})));return function t(n,r,o){return e.apply(this,arguments)}}(),be=n(0),ye=n(5);function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function je(e,t,n){return(t=xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){var t=Ee(e,"string");return"symbol"===we(t)?t:String(t)}function Ee(e,t){if("object"!==we(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==we(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ae(e,t){return Pe(e)||Te(e,t)||Se(e,t)||Ce()}function Ce(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Se(e,t){if(e){if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function Pe(e){if(Array.isArray(e))return e}var De=function e(t){var n=t.namespace,r=void 0===n?"state":n,o=t.state,a=t.reducers,i=void 0===a?{}:a,l=t.effects,c=void 0===l?{}:l,s=Object(be.createContext)({}),u;return{Context:s,Provider:function e(t){var n;return Object(be.forwardRef)((function(e,n){var a,l,u=Object(be.useRef)(),d,f=Ae(Object(be.useReducer)((function(e,t){var n=t.type,r=t.payload;return i[n]&&i[n](e,r)||e}),o),2),p=f[0],h=f[1];u.current=p;var m=Object(be.useCallback)((function(e){var t=e.type,n=e.payload;c[t]?c[t].call(null,u.current,n,h):i[t]&&h({type:t,payload:n})}),[]),v=Me(Me({},e),{},(je(a={},r,p),je(a,"dispatch",m),a)),g=null;return v.forwardedRef&&(g=v.forwardedRef,delete v.forwardedRef),Object(ye.jsx)(s.Provider,{value:(l={},je(l,r,p),je(l,"dispatch",m),l),children:Object(ye.jsx)(t,Me(Me({},v),{},{ref:n}))})}))}}},Ie=!1,ke=!1,Ne,ze,Re;function Le(e,t){if(window.WebViewJavascriptBridge)e(window.WebViewJavascriptBridge);else if(t(),window.WVJBCallbacks)window.WVJBCallbacks.push(e);else{window.WVJBCallbacks=[e];var n=document.createElement("iframe");n.style.display="none",n.src="https://__bridge_loaded__",document.documentElement&&document.documentElement.appendChild(n),setTimeout((function(){try{document.documentElement&&document.documentElement.removeChild(n)}catch(e){console.log(e)}}),0)}}function Be(e){window._jsBridge?e(window._jsBridge):document.addEventListener("WebViewJavascriptBridgeReady",(function(t){var n=t.bridge;window._jsBridge=n,n&&(n.init((function(e,t){t&&t("init responseCallback")})),e(n))}),!1)}function Ve(e,t){var n;return(e||["webPrint"]).includes(t)}function He(e){return Re||(Re={callDeviceApi:function t(n){var r=n.apiName,o=n.callback,a=n.params,i=void 0===a?{}:a,l=n.onError,c=function e(t){var n=t;try{n=JSON.parse(t)}catch(e){console.log("error ".concat(r),e)}(n.code||0===n.code)&&(n.code="".concat(n.code));for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];o.apply(void 0,[n].concat(i))};if("iphone"===e){var s;if(!Ve(null===(s=ze)||void 0===s?void 0:s.apiNames,r))return void(null==l||l());ze.callHandler(r,i,c,(function(e){console.log(e,"--- \u8c03\u7528ios api\u62a5\u9519\uff1a",r),l&&(null==l||l(e))}))}else if("android"===e){var u,d;if(!Ve(null===(u=Ne)||void 0===u?void 0:u.apiNames,r))return void(null==l||l());c(Ne.callHandler(r,JSON.stringify(i)))}else null==l||l(),console.log("--- \u6ca1\u83b7\u53d6\u5230js bridge ---")},calledByDevice:function t(n){var r=n.apiName,o=n.callback;"iphone"===e?ze.registerHandler(r,o):"android"===e&&Ne.registerHandler(r,o)}})}function Fe(e){return new Promise((function(t,n){var r;if(!!navigator.userAgent.includes("jsBridge")||e)if(Object(B.d)()&&!ke)Le((function(e){ke=!0,ze=e;var n=He("iphone");t(n)}),n);else if(Object(B.d)()&&ke){var o=He("iphone");t(o)}else if(Object(B.b)()&&!Ie)Be((function(e){Ne=e,Ie=!0;var n=He("android");t(n)}));else if(Object(B.b)()&&Ie){var a=He("android");t(a)}else n();else n()}))}function $e(e,t,n){Fe(!0).then((function(r){r.callDeviceApi({apiName:"webPrint",params:e,callback:function e(){t&&t.apply(void 0,arguments)},onError:n})}))}function Ue(e,t,n){Fe().then((function(r){r.callDeviceApi({apiName:"dataManager",params:e,callback:function e(){t&&t.apply(void 0,arguments)},onError:n})})).catch(n)}var We,Ye,Ge={ali:function e(t,n){if(!t||/^\s+$/.test(t))return"";if(/x-oss-process=/.test(t))return t;var r=2;return n=n||750,t.indexOf("?")>-1?t+="&":t+="?",t+="x-oss-process=image/resize,w_"+parseInt(2*n+"")+",image/format,webp/interlace,1,image/quality,Q_60/sharpen,90"},getImageSize:function e(t){var n={width:375,height:375,ratio:1,widthRatio:1,success:!1,originRatio:1};if("string"!=typeof t)return n;try{var r=t.split("__");if(r[1]){var o=r[1].split("_"),a=Number(o[0])||375,i=Number(o[1])||375;n.width=a,n.height=i,n.success=!0,n.ratio=Number(i/a),n.widthRatio=Number((a/i).toFixed(2)),n.originRatio=Number(i/a)}return n}catch(e){return n}}};function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){var t=Je(e,"string");return"symbol"===Qe(t)?t:String(t)}function Je(e,t){if("object"!==Qe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var et={en:{},"zh-CN":{},"zh-HK":{}},tt="en",nt={},rt=function e(t){var n;return{en:"en","zh-CN":"zh-CN","zh-HK":"zh-HK","zh-TW":"zh-HK","en-US":"en"}[t]||"en"},ot,at,it={init:function e(t,n){tt=rt(n);var r={};for(var o in et)r[o]=Xe(Xe({},et[o]),t[o]);nt=(et=r)[tt],console.log("\u591a\u8bed\u8a00\u6ce8\u5165\u6210\u529f, \u5f53\u524d\u8bed\u8a00\u4e3a:"+tt)},getText:function e(t){return nt[t]||t},locale:tt,localeMap:nt,localeMaps:et,formatLocale:rt};function lt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ct(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function e(){};return{s:o,n:function t(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=!0,i=!1,l;return{s:function t(){n=n.call(e)},n:function e(){var t=n.next();return a=t.done,t},e:function e(t){i=!0,l=t},f:function e(){try{a||null==n.return||n.return()}finally{if(i)throw l}}}}function ct(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ut=function e(t,n){var r=new Set,o=[],a=lt(t),i;try{for(a.s();!(i=a.n()).done;){var l=i.value,c=l[n];r.has(c)||(r.add(c),o.push(l))}}catch(e){a.e(e)}finally{a.f()}return o}},function(e,t,n){"use strict";var r;!function(e){e[e.AZTEC=0]="AZTEC",e[e.CODABAR=1]="CODABAR",e[e.CODE_39=2]="CODE_39",e[e.CODE_93=3]="CODE_93",e[e.CODE_128=4]="CODE_128",e[e.DATA_MATRIX=5]="DATA_MATRIX",e[e.EAN_8=6]="EAN_8",e[e.EAN_13=7]="EAN_13",e[e.ITF=8]="ITF",e[e.MAXICODE=9]="MAXICODE",e[e.PDF_417=10]="PDF_417",e[e.QR_CODE=11]="QR_CODE",e[e.RSS_14=12]="RSS_14",e[e.RSS_EXPANDED=13]="RSS_EXPANDED",e[e.UPC_A=14]="UPC_A",e[e.UPC_E=15]="UPC_E",e[e.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(r||(r={})),t.a=r},function(e,t,n){"use strict";var r=n(36),o=n(213),a=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this.x===n.x&&this.y===n.y}return!1},e.prototype.hashCode=function(){return 31*o.a.floatToIntBits(this.x)+o.a.floatToIntBits(this.y)},e.prototype.toString=function(){return"("+this.x+","+this.y+")"},e.orderBestPatterns=function(e){var t=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),r=this.distance(e[0],e[2]),o,a,i;if(n>=t&&n>=r?(a=e[0],o=e[1],i=e[2]):r>=n&&r>=t?(a=e[1],o=e[0],i=e[2]):(a=e[2],o=e[0],i=e[1]),this.crossProductZ(o,a,i)<0){var l=o;o=i,i=l}e[0]=o,e[1]=a,e[2]=i},e.distance=function(e,t){return r.a.distance(e.x,e.y,t.x,t.y)},e.crossProductZ=function(e,t,n){var r=t.x,o=t.y;return(n.x-r)*(e.y-o)-(n.y-o)*(e.x-r)},e}();t.a=a},function(e,t,n){"use strict";var r=n(30),o=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.enableDecoding=function(e){return this.encoding=e,this},e.prototype.append=function(e){return"string"==typeof e?this.value+=e.toString():this.encoding?this.value+=r.a.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},e.prototype.appendChars=function(e,t,n){for(var r=t;t<t+n;r++)this.append(e[r]);return this},e.prototype.length=function(){return this.value.length},e.prototype.charAt=function(e){return this.value.charAt(e)},e.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},e.prototype.setCharAt=function(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+1)},e.prototype.substring=function(e,t){return this.value.substring(e,t)},e.prototype.setLengthToZero=function(){this.value=""},e.prototype.toString=function(){return this.value},e.prototype.insert=function(e,t){this.value=this.value.substring(0,e)+t+this.value.substring(e)},e}();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(288);function o(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return c}));var r=function(e){return null!==e&&"object"==typeof e},o=function(e){return"function"==typeof e},a=function(e){return"string"==typeof e},i=function(e){return"boolean"==typeof e},l=function(e){return"number"==typeof e},c=function(e){return void 0===e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=function(){function e(){}return e.numberOfTrailingZeros=function(e){var t;if(0===e)return 32;var n=31;return 0!==(t=e<<16)&&(n-=16,e=t),0!==(t=e<<8)&&(n-=8,e=t),0!==(t=e<<4)&&(n-=4,e=t),0!==(t=e<<2)&&(n-=2,e=t),n-(e<<1>>>31)},e.numberOfLeadingZeros=function(e){if(0===e)return 32;var t=1;return e>>>16==0&&(t+=16,e<<=16),e>>>24==0&&(t+=8,e<<=8),e>>>28==0&&(t+=4,e<<=4),e>>>30==0&&(t+=2,e<<=2),t-=e>>>31},e.toHexString=function(e){return e.toString(16)},e.toBinaryString=function(e){return String(parseInt(String(e),2))},e.bitCount=function(e){return e=(e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,e+=e>>>8,63&(e+=e>>>16)},e.truncDivision=function(e,t){return Math.trunc(e/t)},e.parseInt=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},e.MIN_VALUE_32_BITS=-2147483648,e.MAX_VALUE=Number.MAX_SAFE_INTEGER,e}();t.a=r},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:!0}),t.getText=void 0;var o=r(n(638)),a=r(n(639)),i=r(n(640)),l=n(300),c={"zh-CN":o.default,"en-US":a.default,"zh-TW":i.default,"zh-HK":i.default,en:a.default,original:a.default},s=function e(t){var n;if(t){var r=(0,l.getCurrentLocale)();return(null===(n=null==c?void 0:c[r])||void 0===n?void 0:n[t])||t}};t.getText=s},function(e,t,n){"use strict";var r=n(39),o=n(61),a=n(78),i=function(){function e(){}return e.castAsNonUtf8Char=function(e,t){void 0===t&&(t=null);var n=t?t.getName():this.ISO88591;return a.a.decode(new Uint8Array([e]),n)},e.guessEncoding=function(t,n){if(null!=n&&void 0!==n.get(r.a.CHARACTER_SET))return n.get(r.a.CHARACTER_SET).toString();for(var o=t.length,a=!0,i=!0,l=!0,c=0,s=0,u=0,d=0,f=0,p=0,h=0,m=0,v=0,g=0,b=0,y=t.length>3&&239===t[0]&&187===t[1]&&191===t[2],w=0;w<o&&(a||i||l);w++){var O=255&t[w];l&&(c>0?0==(128&O)?l=!1:c--:0!=(128&O)&&(0==(64&O)?l=!1:(c++,0==(32&O)?s++:(c++,0==(16&O)?u++:(c++,0==(8&O)?d++:l=!1))))),a&&(O>127&&O<160?a=!1:O>159&&(O<192||215===O||247===O)&&b++),i&&(f>0?O<64||127===O||O>252?i=!1:f--:128===O||160===O||O>239?i=!1:O>160&&O<224?(p++,m=0,++h>v&&(v=h)):O>127?(f++,h=0,++m>g&&(g=m)):(h=0,m=0))}return l&&c>0&&(l=!1),i&&f>0&&(i=!1),l&&(y||s+u+d>0)?e.UTF8:i&&(e.ASSUME_SHIFT_JIS||v>=3||g>=3)?e.SHIFT_JIS:a&&i?2===v&&2===p||10*b>=o?e.SHIFT_JIS:e.ISO88591:a?e.ISO88591:i?e.SHIFT_JIS:l?e.UTF8:e.PLATFORM_DEFAULT_ENCODING},e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=-1;function o(e,n,o,a,i,l){if("%%"===e)return"%";if(void 0!==t[++r]){e=a?parseInt(a.substr(1)):void 0;var c=i?parseInt(i.substr(1)):void 0,s;switch(l){case"s":s=t[r];break;case"c":s=t[r][0];break;case"f":s=parseFloat(t[r]).toFixed(e);break;case"p":s=parseFloat(t[r]).toPrecision(e);break;case"e":s=parseFloat(t[r]).toExponential(e);break;case"x":s=parseInt(t[r]).toString(c||16);break;case"d":s=parseFloat(parseInt(t[r],c||10).toPrecision(e)).toFixed(0)}s="object"==typeof s?JSON.stringify(s):(+s).toString(c);for(var u=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";s.length<u;)s=void 0!==n?s+d:d+s;return s}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,o)},e.getBytes=function(e,t){return a.a.encode(e,t)},e.getCharCode=function(e,t){return void 0===t&&(t=0),e.charCodeAt(t)},e.getCharAt=function(e){return String.fromCharCode(e)},e.SHIFT_JIS=o.a.SJIS.getName(),e.GB2312="GB2312",e.ISO88591=o.a.ISO8859_1.getName(),e.EUC_JP="EUC_JP",e.UTF8=o.a.UTF8.getName(),e.PLATFORM_DEFAULT_ENCODING=e.UTF8,e.ASSUME_SHIFT_JIS=!1,e}();t.a=i},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function e(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return a(t,e),t},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r=0,o=t.length,a;r<o;r++)!a&&r in t||(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setFormFieldsUntouched=t.transformFormObjToArrayWithUntouched=t.filterSystemFields=t.toArr=t.renderValueWithMap=t.getNestedValue=t.withOptions=t.withDataSource=t.withFormItem=t.isValidDomain=t.formItemNameReverse=t.formItemNameReplace=t.withMode=void 0;var u=i(n(0)),d=n(21),f=s(n(12)),p=n(322),h=n(29),m=s(n(188)),v=s(n(97)),g=s(n(232)),b=s(n(409)),y=s(n(231)),w=s(n(233)),O=s(n(114));n(856);var M=function e(t,n,o){return function(e){var a=e.renderMode,i=void 0===a?"edit":a,c=e.value,s=e.onChange,d=l(e,["renderMode","value","onChange"]),f=(null==o?void 0:o(r(r({},d),{value:c,onChange:s,renderMode:i}),i))||r(r({},d),{value:c,onChange:s,renderMode:i});return["view","tableView"].includes(i)&&n?u.default.createElement(n,r({},f)):"disabled"===i?u.default.createElement(t,r({},f,{disabled:!0})):u.default.createElement(t,r({},f))}};t.withMode=M;var j="__zsj__",x=function e(t){return t.replace(/\./g,"__zsj__")};t.formItemNameReplace=x;var E=function e(t){return t.replace(new RegExp("__zsj__","g"),".")};t.formItemNameReverse=E;var A=function e(t){return/^(?!.*--)[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9](\.[A-Za-z]{2,})+$/.test(t)};t.isValidDomain=A;var C=function e(t,n){return function(e){var o,a=e.name,i=e.label,s=e.mode,y=e.renderMode,w=e.tooltip,O=e.noStyle,M=e.extra,j=e.required,x=e.requiredobj,E=e.minLengthobj,A=e.maxLengthobj,C=e.typeobj,S=e.maxobj,_=e.minobj,T=e.normalize,P=e.getValueProps,I=e.validator,k=e.style,N=e.validateTrigger,z=e.__designMode,R=e.labelCol,L=e.hideLabel,B=e.innerStyle,V=l(e,["name","label","mode","renderMode","tooltip","noStyle","extra","required","requiredobj","minLengthobj","maxLengthobj","typeobj","maxobj","minobj","normalize","getValueProps","validator","style","validateTrigger","__designMode","labelCol","hideLabel","innerStyle"]),H=(0,b.default)().path,F=void 0===H?[]:H,$,U=((0,v.default)().dataSource||{}).fields,W=(0,g.default)(),Y=W.renderMode,G=W.size,Q=null==U?void 0:U.find((function(e){return e.name===a})),q=i||(null===(o=null==Q?void 0:Q.uiSchema)||void 0===o?void 0:o.title)||a,X=y||Y,K=(0,d.isString)(a)&&a.includes(".")?[a]:a,Z=(0,u.useMemo)((function(){var e;return u.default.createElement(t,r({},V,{mode:s,renderMode:X},null==n?void 0:n.innerProps,{style:r(r({},B||{}),(null===(e=null==n?void 0:n.innerProps)||void 0===e?void 0:e.style)||{}),fieldKey:K,isVerification:null==C?void 0:C.enabled,size:G}))}),[X,V,s,null==n?void 0:n.innerProps,null==C?void 0:C.enabled,G,B,K]),J="design"===z,ee="hidden"===X,te=void 0!==K?c(c([],F,!0),D(K),!0):void 0,ne=[];if(x&&x.required&&ne.push(r(r({},x),{message:x.message||(0,h.getText)("pisell-data-source-form-required-message")})),C&&C.enabled)switch(C.type){case"email":ne.push(r(r({},C),{message:C.message||(0,h.getText)("pisell-data-source-form-email-message")}));break;case"pattern":ne.push(r(r({},C),{pattern:new RegExp(C.pattern),message:C.message||(0,h.getText)("pisell-data-source-form-pattern-message")}));break;case"phone":ne.push({validator:function e(t,n){if(!(null==n?void 0:n.trim()))return Promise.resolve();try{var r=n.replace(/\s|\(|\)/g,""),o=(0,p.parsePhoneNumberFromString)(r);return(null==o?void 0:o.isValid())?Promise.resolve():Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-phone-message")))}catch(e){return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-phone-message")))}}});break;case"mobile":ne.push({validator:function e(t,n){if(!(null==n?void 0:n.trim()))return Promise.resolve();try{var r=n.replace(/\s|\(|\)/g,"");if(r.length>15)return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")));if(r.startsWith("+61")){var o=r.slice(3);if(!/^(?:04\d{8}|4\d{8})$/.test(o))return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")))}else if(r.startsWith("+86")){var o=r.slice(3);if(!/^1[3-9]\d{9}$/.test(o))return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")))}return Promise.resolve()}catch(e){return r.length>15?Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message"))):Promise.resolve()}}});break;case"subdomain":ne.push({validator:function e(t,n){if(!n)return Promise.resolve();var r=n.split(".")[0];return/^[a-z0-9-]+$/.test(r)?/^\d+$/.test(r)?Promise.reject(new Error((0,h.getText)("subdomain-error-numbers-only"))):r.startsWith("-")||r.endsWith("-")?Promise.reject(new Error((0,h.getText)("subdomain-error-hyphen-ends"))):r.includes("--")?Promise.reject(new Error((0,h.getText)("subdomain-error-consecutive-hyphens"))):Promise.resolve():Promise.reject(new Error((0,h.getText)("subdomain-error-pattern")))}})}A&&A.enabled&&ne.push({validator:function e(t,n){var r=0;return(0,d.isString)(n)||(0,d.isArr)(n)?r=n.length:(0,d.isNumber)(n)&&(r="".concat(n).length),r>A.max?Promise.reject(new Error(A.message||(0,h.getText)("pisell-data-source-form-max-length-message")(null==A?void 0:A.max))):Promise.resolve()}}),E&&E.enabled&&ne.push({validator:function e(t,n){var r=0;return(0,d.isString)(n)||(0,d.isArr)(n)?r=n.length:(0,d.isNumber)(n)&&(r="".concat(n).length),r<E.min?Promise.reject(new Error(E.message||(0,h.getText)("pisell-data-source-form-min-length-message")(null==E?void 0:E.min))):Promise.resolve()}}),S&&S.enabled&&ne.push(r(r({},S),{type:"number",message:S.message||(0,h.getText)("pisell-data-source-form-max-value-message")(null==S?void 0:S.max)})),_&&_.enabled&&ne.push(r(r({},_),{type:"number",message:_.message||(0,h.getText)("pisell-data-source-form-min-value-message")(null==_?void 0:_.min)})),I&&ne.push({validator:function e(t,n){return I(n)}});var re=(0,u.useMemo)((function(){return L?{span:0}:R}),[L,R]),oe=(0,u.useMemo)((function(){return(0,d.isFunction)(null==n?void 0:n.otherFormItemProps)?null==n?void 0:n.otherFormItemProps(V):(null==n?void 0:n.otherFormItemProps)||{}}),[null==n?void 0:n.otherFormItemProps,V]);return u.default.createElement(m.default.Item,r({required:j,style:r(r({width:"100%"},k),{opacity:J&&ee?"0.3":1}),name:te,label:q,tooltip:w,noStyle:O,extra:M,hidden:ee&&!J,rules:ne,normalize:T,getValueProps:P,validateTrigger:N||["onChange","onBlur"],labelCol:re,initialValue:null==V?void 0:V.defaultValue,className:(0,f.default)("pisell-data-source-form-item",{"pisell-data-source-form-item-view":"view"===X})},oe),Z)}};t.withFormItem=C;var S=function e(t){return function(e){var n=e.dataSource;return u.default.createElement(y.default,{dataSource:n,requestOptions:{list:{cacheKey:"".concat(null==n?void 0:n.headerDataSource,"-").concat(null==n?void 0:n.name,"-").concat(null==n?void 0:n.tableName)}}},u.default.createElement(t,r({},e)))}};t.withDataSource=S;var _=function e(t){return function(e){var n,o=(0,w.default)(),a=e.options,i=e.optionSourceType,l=e.labelField,c=e.valueField,s=e.extraParams,d=(0,O.default)().parseVariable,f=(0,v.default)(),p=f.list,h=f.getCurrentRecord,m=(0,u.useMemo)((function(){var e={};return s&&Object.keys(s).forEach((function(t){e[t]=null==d?void 0:d(s[t],{currentRecord:h()})})),e}),[s]);(0,u.useEffect)((function(){"api"===i&&p.run(r({page:1,pageSize:500},m))}),[]);var g=(0,u.useMemo)((function(){var e,t,n;return"api"!==i?a:((null===(n=null===(t=null===(e=p.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.filter)||void 0===n?void 0:n.call(t,(function(e){return!["draft","inactive","disabled"].includes(null==e?void 0:e.status)})))||[]).map((function(e){return{label:o(e[l]),value:e[c]}}))||[]}),[a,i,null===(n=null==p?void 0:p.data)||void 0===n?void 0:n.data]);return u.default.createElement(t,r({},e,{options:g}))}};t.withOptions=_;var T=function e(t,n){for(var r,o=t,a=0,i=n.split(".");a<i.length;a++){var l=i[a];if(!o)break;o=o[l]}return o};t.getNestedValue=T;var P=function e(t,n,r){var o="tableView"===r?{fontSize:14,fontWeight:400}:{};return(0,d.isArr)(t)?u.default.createElement("span",{className:"pisell-form-read-pretty-text"},t.map((function(e,r){return u.default.createElement(u.default.Fragment,null,u.default.createElement("span",{key:e,className:"pisell-form-read-pretty-value",style:o},null==n?void 0:n[e]),r<t.length-1&&", ")}))):(0,d.isString)(t)||(0,d.isNumber)(t)?u.default.createElement("span",{className:"pisell-form-read-pretty-text"},u.default.createElement("span",{className:"pisell-form-read-pretty-value",style:o},(null==n?void 0:n[t])||t)):null};function D(e){return Array.isArray(e)?e:[e]}t.renderValueWithMap=P,t.toArr=D;var I=["createdAt","updatedAt","createdBy","created_at","updated_at","deleted_at"],k=function e(t){return Object.keys(t).reduce((function(e,n){return I.includes(n)||(e[n]=t[n]),e}),{})};t.filterSystemFields=k;var N=function e(t){return Object.keys(t).reduce((function(e,n){return e.push({name:n,value:t[n],touched:!1}),e}),[])};t.transformFormObjToArrayWithUntouched=N;var z=function e(t){var n,r=t.getFieldsError().map((function(e){return{name:e.name,value:t.getFieldValue(e.name),touched:!1}}));t.setFields(r)};t.setFormFieldsUntouched=z},function(e,t,n){"use strict";var r=n(0),o=n.n(r);function a(e){var t=Object(r.useRef)(e);return t.current=e,t}t.a=a},function(e,t,n){"use strict";var r=n(256),o=n(257),a=n(127),i=n(14),l=n(258),c=n(259),s=n(260),u=n(261),d=n(46),f=n(28),p=function(){function e(){}return e.randomize253State=function(e){var t=149*e%253+1,n=i.t+t;return n<=254?n:n-254},e.encodeHighLevel=function(e,t,n,d,f){void 0===t&&(t=0),void 0===n&&(n=null),void 0===d&&(d=null),void 0===f&&(f=!1);var p=new a.a,h=[new r.a,p,new u.a,new s.a,new l.a,new o.a],m=new c.a(e);m.setSymbolShape(t),m.setSizeConstraints(n,d),e.startsWith(i.p)&&e.endsWith(i.s)?(m.writeCodeword(i.o),m.setSkipAtEnd(2),m.pos+=i.p.length):e.startsWith(i.r)&&e.endsWith(i.s)&&(m.writeCodeword(i.q),m.setSkipAtEnd(2),m.pos+=i.r.length);var v=i.b;for(f&&(p.encodeMaximal(m),v=m.getNewEncoding(),m.resetEncoderSignal());m.hasMoreCharacters();)h[v].encode(m),m.getNewEncoding()>=0&&(v=m.getNewEncoding(),m.resetEncoderSignal());var g=m.getCodewordCount();m.updateSymbolInfo();var b=m.getSymbolInfo().getDataCapacity();g<b&&v!==i.b&&v!==i.c&&v!==i.f&&m.writeCodeword("\xfe");var y=m.getCodewords();for(y.length()<b&&y.append(i.t);y.length()<b;)y.append(this.randomize253State(y.length()+1));return m.getCodewords().toString()},e.lookAheadTest=function(e,t,n){var r=this.lookAheadTestIntern(e,t,n);if(n===i.x&&r===i.x){for(var o=Math.min(t+3,e.length),a=t;a<o;a++)if(!this.isNativeX12(e.charCodeAt(a)))return i.b}else if(n===i.f&&r===i.f)for(var o=Math.min(t+4,e.length),a=t;a<o;a++)if(!this.isNativeEDIFACT(e.charCodeAt(a)))return i.b;return r},e.lookAheadTestIntern=function(e,t,n){if(t>=e.length)return n;var r;n===i.b?r=[0,1,1,1,1,1.25]:(r=[1,2,2,2,2,2.25])[n]=0;for(var o=0,a=new Uint8Array(6),l=[];;){if(t+o===e.length){d.a.fill(a,0),d.a.fill(l,0);var c=this.findMinimums(r,l,f.a.MAX_VALUE,a),s=this.getMinimumCount(a);if(l[i.b]===c)return i.b;if(1===s){if(a[i.c]>0)return i.c;if(a[i.f]>0)return i.f;if(a[i.v]>0)return i.v;if(a[i.x]>0)return i.x}return i.d}var u=e.charCodeAt(t+o);if(o++,this.isDigit(u)?r[i.b]+=.5:this.isExtendedASCII(u)?(r[i.b]=Math.ceil(r[i.b]),r[i.b]+=2):(r[i.b]=Math.ceil(r[i.b]),r[i.b]++),this.isNativeC40(u)?r[i.d]+=2/3:this.isExtendedASCII(u)?r[i.d]+=8/3:r[i.d]+=4/3,this.isNativeText(u)?r[i.v]+=2/3:this.isExtendedASCII(u)?r[i.v]+=8/3:r[i.v]+=4/3,this.isNativeX12(u)?r[i.x]+=2/3:this.isExtendedASCII(u)?r[i.x]+=13/3:r[i.x]+=10/3,this.isNativeEDIFACT(u)?r[i.f]+=3/4:this.isExtendedASCII(u)?r[i.f]+=4.25:r[i.f]+=3.25,this.isSpecialB256(u)?r[i.c]+=4:r[i.c]++,o>=4){if(d.a.fill(a,0),d.a.fill(l,0),this.findMinimums(r,l,f.a.MAX_VALUE,a),l[i.b]<this.min(l[i.c],l[i.d],l[i.v],l[i.x],l[i.f]))return i.b;if(l[i.c]<l[i.b]||l[i.c]+1<this.min(l[i.d],l[i.v],l[i.x],l[i.f]))return i.c;if(l[i.f]+1<this.min(l[i.c],l[i.d],l[i.v],l[i.x],l[i.b]))return i.f;if(l[i.v]+1<this.min(l[i.c],l[i.d],l[i.f],l[i.x],l[i.b]))return i.v;if(l[i.x]+1<this.min(l[i.c],l[i.d],l[i.f],l[i.v],l[i.b]))return i.x;if(l[i.d]+1<this.min(l[i.b],l[i.c],l[i.f],l[i.v])){if(l[i.d]<l[i.x])return i.d;if(l[i.d]===l[i.x]){for(var p=t+o+1;p<e.length;){var h=e.charCodeAt(p);if(this.isX12TermSep(h))return i.x;if(!this.isNativeX12(h))break;p++}return i.d}}}}},e.min=function(e,t,n,r,o){var a=Math.min(e,Math.min(t,Math.min(n,r)));return void 0===o?a:Math.min(a,o)},e.findMinimums=function(e,t,n,r){for(var o=0;o<6;o++){var a=t[o]=Math.ceil(e[o]);n>a&&(n=a,d.a.fill(r,0)),n===a&&(r[o]=r[o]+1)}return n},e.getMinimumCount=function(e){for(var t=0,n=0;n<6;n++)t+=e[n];return t||0},e.isDigit=function(e){return e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)},e.isExtendedASCII=function(e){return e>=128&&e<=255},e.isNativeC40=function(e){return e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0)},e.isNativeText=function(e){return e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="a".charCodeAt(0)&&e<="z".charCodeAt(0)},e.isNativeX12=function(e){return this.isX12TermSep(e)||e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0)},e.isX12TermSep=function(e){return 13===e||e==="*".charCodeAt(0)||e===">".charCodeAt(0)},e.isNativeEDIFACT=function(e){return e>=" ".charCodeAt(0)&&e<="^".charCodeAt(0)},e.isSpecialB256=function(e){return!1},e.determineConsecutiveDigitCount=function(e,t){void 0===t&&(t=0);for(var n=e.length,r=t;r<n&&this.isDigit(e.charCodeAt(r));)r++;return r-t},e.illegalCharacter=function(e){var t=f.a.toHexString(e.charCodeAt(0));throw t="0000".substring(0,4-t.length)+t,new Error("Illegal character: "+e+" (0x"+t+")")},e}();t.a=p},function(e,t,n){var r,o;
14
+ pe=function t(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function e(t,n,r){return t[n]=r}}function s(e,t,n,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new E(o||[]);return r(i,"_invoke",{value:O(e,n,l)}),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(A([])));g&&g!==t&&n.call(g,a)&&(m=g);var b=h.prototype=f.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var c=u(e[r],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==fe(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;r(this,"_invoke",{value:function e(n,r){function i(){return new t((function(e,t){o(n,r,e,t)}))}return a=a?a.then(i,i):i()}})}function O(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return C()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=M(i,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new w(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=A,E.prototype={constructor:E,reset:function e(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function e(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function e(t){if(this.done)throw t;var r=this;function o(e,n){return l.type="throw",l.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function e(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var l=i?i.completion:{};return l.type=t,l.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(l)},complete:function e(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),d},finish:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function e(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var a=o.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function e(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function he(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){he(a,r,o,i,l,"next",e)}function l(e){he(a,r,o,i,l,"throw",e)}i(void 0)}))}}var ve=function e(t){t.setAlignment(X),t.appendText("------------------------------------------------\n")},ge=function(){var e=me(pe().mark((function e(t,n,r){var o,a,i;return pe().wrap((function e(l){for(;;)switch(l.prev=l.next){case 0:return o=new de(576),a=r.title,o.clear(),o.lineFeed(1),o.setPrintModes(!1,!1,!1),o.setAlignment(K),o.appendText("\u6253\u5370\u6d4b\u8bd5\n"),ve(o),o.setAlignment(X),o.appendText("Order time: 2023-10-19 14:15:50\n"),o.appendText("Order number\n"),o.appendText("D3012"),ve(o),o.setColumnWidths(ae(150,X),ae(426,X)),o.printInColumns("Number","Name"),o.setPrintModes(!0,!0,!0),o.printInColumns("1 x","\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0\u6211\u662f\u5f88\u957f\u7684\u5546\u54c1\u540d\u79f0"),o.setPrintModes(!1,!1,!1),ve(o),o.lineFeed(4),o.cutPaper(!1),o.printAndExitPageMode(),l.next=24,o.print(t,n,1);case 24:return i=l.sent,l.abrupt("return",i);case 26:case"end":return l.stop()}}),e)})));return function t(n,r,o){return e.apply(this,arguments)}}(),be=n(0),ye=n(5);function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function je(e,t,n){return(t=xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){var t=Ee(e,"string");return"symbol"===we(t)?t:String(t)}function Ee(e,t){if("object"!==we(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==we(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ae(e,t){return Pe(e)||Te(e,t)||Se(e,t)||Ce()}function Ce(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Se(e,t){if(e){if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Te(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function Pe(e){if(Array.isArray(e))return e}var De=function e(t){var n=t.namespace,r=void 0===n?"state":n,o=t.state,a=t.reducers,i=void 0===a?{}:a,l=t.effects,c=void 0===l?{}:l,s=Object(be.createContext)({}),u;return{Context:s,Provider:function e(t){var n;return Object(be.forwardRef)((function(e,n){var a,l,u=Object(be.useRef)(),d,f=Ae(Object(be.useReducer)((function(e,t){var n=t.type,r=t.payload;return i[n]&&i[n](e,r)||e}),o),2),p=f[0],h=f[1];u.current=p;var m=Object(be.useCallback)((function(e){var t=e.type,n=e.payload;c[t]?c[t].call(null,u.current,n,h):i[t]&&h({type:t,payload:n})}),[]),v=Me(Me({},e),{},(je(a={},r,p),je(a,"dispatch",m),a)),g=null;return v.forwardedRef&&(g=v.forwardedRef,delete v.forwardedRef),Object(ye.jsx)(s.Provider,{value:(l={},je(l,r,p),je(l,"dispatch",m),l),children:Object(ye.jsx)(t,Me(Me({},v),{},{ref:n}))})}))}}},Ie=!1,ke=!1,Ne,ze,Re;function Le(e,t){if(window.WebViewJavascriptBridge)e(window.WebViewJavascriptBridge);else if(t(),window.WVJBCallbacks)window.WVJBCallbacks.push(e);else{window.WVJBCallbacks=[e];var n=document.createElement("iframe");n.style.display="none",n.src="https://__bridge_loaded__",document.documentElement&&document.documentElement.appendChild(n),setTimeout((function(){try{document.documentElement&&document.documentElement.removeChild(n)}catch(e){console.log(e)}}),0)}}function Be(e){window._jsBridge?e(window._jsBridge):document.addEventListener("WebViewJavascriptBridgeReady",(function(t){var n=t.bridge;window._jsBridge=n,n&&(n.init((function(e,t){t&&t("init responseCallback")})),e(n))}),!1)}function Ve(e,t){var n;return(e||["webPrint"]).includes(t)}function He(e){return Re||(Re={callDeviceApi:function t(n){var r=n.apiName,o=n.callback,a=n.params,i=void 0===a?{}:a,l=n.onError,c=function e(t){var n=t;try{n=JSON.parse(t)}catch(e){console.log("error ".concat(r),e)}(n.code||0===n.code)&&(n.code="".concat(n.code));for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];o.apply(void 0,[n].concat(i))};if("iphone"===e){var s;if(!Ve(null===(s=ze)||void 0===s?void 0:s.apiNames,r))return void(null==l||l());ze.callHandler(r,i,c,(function(e){console.log(e,"--- \u8c03\u7528ios api\u62a5\u9519\uff1a",r),l&&(null==l||l(e))}))}else if("android"===e){var u,d;if(!Ve(null===(u=Ne)||void 0===u?void 0:u.apiNames,r))return void(null==l||l());c(Ne.callHandler(r,JSON.stringify(i)))}else null==l||l(),console.log("--- \u6ca1\u83b7\u53d6\u5230js bridge ---")},calledByDevice:function t(n){var r=n.apiName,o=n.callback;"iphone"===e?ze.registerHandler(r,o):"android"===e&&Ne.registerHandler(r,o)}})}function Fe(e){return new Promise((function(t,n){var r;if(!!navigator.userAgent.includes("jsBridge")||e)if(Object(B.d)()&&!ke)Le((function(e){ke=!0,ze=e;var n=He("iphone");t(n)}),n);else if(Object(B.d)()&&ke){var o=He("iphone");t(o)}else if(Object(B.b)()&&!Ie)Be((function(e){Ne=e,Ie=!0;var n=He("android");t(n)}));else if(Object(B.b)()&&Ie){var a=He("android");t(a)}else n();else n()}))}function $e(e,t,n){Fe(!0).then((function(r){r.callDeviceApi({apiName:"webPrint",params:e,callback:function e(){t&&t.apply(void 0,arguments)},onError:n})}))}function Ue(e,t,n){Fe().then((function(r){r.callDeviceApi({apiName:"dataManager",params:e,callback:function e(){t&&t.apply(void 0,arguments)},onError:n})})).catch(n)}var We,Ye,Ge={ali:function e(t,n){if(!t||/^\s+$/.test(t))return"";if(/x-oss-process=/.test(t))return t;var r=2;return n=n||750,t.indexOf("?")>-1?t+="&":t+="?",t+="x-oss-process=image/resize,w_"+parseInt(2*n+"")+",image/format,webp/interlace,1,image/quality,Q_60/sharpen,90"},getImageSize:function e(t){var n={width:375,height:375,ratio:1,widthRatio:1,success:!1,originRatio:1};if("string"!=typeof t)return n;try{var r=t.split("__");if(r[1]){var o=r[1].split("_"),a=Number(o[0])||375,i=Number(o[1])||375;n.width=a,n.height=i,n.success=!0,n.ratio=Number(i/a),n.widthRatio=Number((a/i).toFixed(2)),n.originRatio=Number(i/a)}return n}catch(e){return n}}};function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){var t=Je(e,"string");return"symbol"===Qe(t)?t:String(t)}function Je(e,t){if("object"!==Qe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var et={en:{},"zh-CN":{},"zh-HK":{}},tt="en",nt={},rt=function e(t){var n;return{en:"en","zh-CN":"zh-CN","zh-HK":"zh-HK","zh-TW":"zh-HK","en-US":"en"}[t]||"en"},ot,at,it={init:function e(t,n){tt=rt(n);var r={};for(var o in et)r[o]=Xe(Xe({},et[o]),t[o]);nt=(et=r)[tt],console.log("\u591a\u8bed\u8a00\u6ce8\u5165\u6210\u529f, \u5f53\u524d\u8bed\u8a00\u4e3a:"+tt)},getText:function e(t){return nt[t]||t},locale:tt,localeMap:nt,localeMaps:et,formatLocale:rt};function lt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ct(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function e(){};return{s:o,n:function t(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=!0,i=!1,l;return{s:function t(){n=n.call(e)},n:function e(){var t=n.next();return a=t.done,t},e:function e(t){i=!0,l=t},f:function e(){try{a||null==n.return||n.return()}finally{if(i)throw l}}}}function ct(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ut=function e(t,n){var r=new Set,o=[],a=lt(t),i;try{for(a.s();!(i=a.n()).done;){var l=i.value,c=l[n];r.has(c)||(r.add(c),o.push(l))}}catch(e){a.e(e)}finally{a.f()}return o}},function(e,t,n){"use strict";var r;!function(e){e[e.AZTEC=0]="AZTEC",e[e.CODABAR=1]="CODABAR",e[e.CODE_39=2]="CODE_39",e[e.CODE_93=3]="CODE_93",e[e.CODE_128=4]="CODE_128",e[e.DATA_MATRIX=5]="DATA_MATRIX",e[e.EAN_8=6]="EAN_8",e[e.EAN_13=7]="EAN_13",e[e.ITF=8]="ITF",e[e.MAXICODE=9]="MAXICODE",e[e.PDF_417=10]="PDF_417",e[e.QR_CODE=11]="QR_CODE",e[e.RSS_14=12]="RSS_14",e[e.RSS_EXPANDED=13]="RSS_EXPANDED",e[e.UPC_A=14]="UPC_A",e[e.UPC_E=15]="UPC_E",e[e.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(r||(r={})),t.a=r},function(e,t,n){"use strict";var r=n(36),o=n(213),a=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this.x===n.x&&this.y===n.y}return!1},e.prototype.hashCode=function(){return 31*o.a.floatToIntBits(this.x)+o.a.floatToIntBits(this.y)},e.prototype.toString=function(){return"("+this.x+","+this.y+")"},e.orderBestPatterns=function(e){var t=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),r=this.distance(e[0],e[2]),o,a,i;if(n>=t&&n>=r?(a=e[0],o=e[1],i=e[2]):r>=n&&r>=t?(a=e[1],o=e[0],i=e[2]):(a=e[2],o=e[0],i=e[1]),this.crossProductZ(o,a,i)<0){var l=o;o=i,i=l}e[0]=o,e[1]=a,e[2]=i},e.distance=function(e,t){return r.a.distance(e.x,e.y,t.x,t.y)},e.crossProductZ=function(e,t,n){var r=t.x,o=t.y;return(n.x-r)*(e.y-o)-(n.y-o)*(e.x-r)},e}();t.a=a},function(e,t,n){"use strict";var r=n(30),o=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.enableDecoding=function(e){return this.encoding=e,this},e.prototype.append=function(e){return"string"==typeof e?this.value+=e.toString():this.encoding?this.value+=r.a.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},e.prototype.appendChars=function(e,t,n){for(var r=t;t<t+n;r++)this.append(e[r]);return this},e.prototype.length=function(){return this.value.length},e.prototype.charAt=function(e){return this.value.charAt(e)},e.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},e.prototype.setCharAt=function(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+1)},e.prototype.substring=function(e,t){return this.value.substring(e,t)},e.prototype.setLengthToZero=function(){this.value=""},e.prototype.toString=function(){return this.value},e.prototype.insert=function(e,t){this.value=this.value.substring(0,e)+t+this.value.substring(e)},e}();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(288);function o(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return c}));var r=function(e){return null!==e&&"object"==typeof e},o=function(e){return"function"==typeof e},a=function(e){return"string"==typeof e},i=function(e){return"boolean"==typeof e},l=function(e){return"number"==typeof e},c=function(e){return void 0===e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=function(){function e(){}return e.numberOfTrailingZeros=function(e){var t;if(0===e)return 32;var n=31;return 0!==(t=e<<16)&&(n-=16,e=t),0!==(t=e<<8)&&(n-=8,e=t),0!==(t=e<<4)&&(n-=4,e=t),0!==(t=e<<2)&&(n-=2,e=t),n-(e<<1>>>31)},e.numberOfLeadingZeros=function(e){if(0===e)return 32;var t=1;return e>>>16==0&&(t+=16,e<<=16),e>>>24==0&&(t+=8,e<<=8),e>>>28==0&&(t+=4,e<<=4),e>>>30==0&&(t+=2,e<<=2),t-=e>>>31},e.toHexString=function(e){return e.toString(16)},e.toBinaryString=function(e){return String(parseInt(String(e),2))},e.bitCount=function(e){return e=(e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,e+=e>>>8,63&(e+=e>>>16)},e.truncDivision=function(e,t){return Math.trunc(e/t)},e.parseInt=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},e.MIN_VALUE_32_BITS=-2147483648,e.MAX_VALUE=Number.MAX_SAFE_INTEGER,e}();t.a=r},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:!0}),t.getText=void 0;var o=r(n(638)),a=r(n(639)),i=r(n(640)),l=n(300),c={"zh-CN":o.default,"en-US":a.default,"zh-TW":i.default,"zh-HK":i.default,en:a.default,original:a.default},s=function e(t){var n;if(t){var r=(0,l.getCurrentLocale)();return(null===(n=null==c?void 0:c[r])||void 0===n?void 0:n[t])||t}};t.getText=s},function(e,t,n){"use strict";var r=n(39),o=n(61),a=n(78),i=function(){function e(){}return e.castAsNonUtf8Char=function(e,t){void 0===t&&(t=null);var n=t?t.getName():this.ISO88591;return a.a.decode(new Uint8Array([e]),n)},e.guessEncoding=function(t,n){if(null!=n&&void 0!==n.get(r.a.CHARACTER_SET))return n.get(r.a.CHARACTER_SET).toString();for(var o=t.length,a=!0,i=!0,l=!0,c=0,s=0,u=0,d=0,f=0,p=0,h=0,m=0,v=0,g=0,b=0,y=t.length>3&&239===t[0]&&187===t[1]&&191===t[2],w=0;w<o&&(a||i||l);w++){var O=255&t[w];l&&(c>0?0==(128&O)?l=!1:c--:0!=(128&O)&&(0==(64&O)?l=!1:(c++,0==(32&O)?s++:(c++,0==(16&O)?u++:(c++,0==(8&O)?d++:l=!1))))),a&&(O>127&&O<160?a=!1:O>159&&(O<192||215===O||247===O)&&b++),i&&(f>0?O<64||127===O||O>252?i=!1:f--:128===O||160===O||O>239?i=!1:O>160&&O<224?(p++,m=0,++h>v&&(v=h)):O>127?(f++,h=0,++m>g&&(g=m)):(h=0,m=0))}return l&&c>0&&(l=!1),i&&f>0&&(i=!1),l&&(y||s+u+d>0)?e.UTF8:i&&(e.ASSUME_SHIFT_JIS||v>=3||g>=3)?e.SHIFT_JIS:a&&i?2===v&&2===p||10*b>=o?e.SHIFT_JIS:e.ISO88591:a?e.ISO88591:i?e.SHIFT_JIS:l?e.UTF8:e.PLATFORM_DEFAULT_ENCODING},e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=-1;function o(e,n,o,a,i,l){if("%%"===e)return"%";if(void 0!==t[++r]){e=a?parseInt(a.substr(1)):void 0;var c=i?parseInt(i.substr(1)):void 0,s;switch(l){case"s":s=t[r];break;case"c":s=t[r][0];break;case"f":s=parseFloat(t[r]).toFixed(e);break;case"p":s=parseFloat(t[r]).toPrecision(e);break;case"e":s=parseFloat(t[r]).toExponential(e);break;case"x":s=parseInt(t[r]).toString(c||16);break;case"d":s=parseFloat(parseInt(t[r],c||10).toPrecision(e)).toFixed(0)}s="object"==typeof s?JSON.stringify(s):(+s).toString(c);for(var u=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";s.length<u;)s=void 0!==n?s+d:d+s;return s}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,o)},e.getBytes=function(e,t){return a.a.encode(e,t)},e.getCharCode=function(e,t){return void 0===t&&(t=0),e.charCodeAt(t)},e.getCharAt=function(e){return String.fromCharCode(e)},e.SHIFT_JIS=o.a.SJIS.getName(),e.GB2312="GB2312",e.ISO88591=o.a.ISO8859_1.getName(),e.EUC_JP="EUC_JP",e.UTF8=o.a.UTF8.getName(),e.PLATFORM_DEFAULT_ENCODING=e.UTF8,e.ASSUME_SHIFT_JIS=!1,e}();t.a=i},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function e(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return a(t,e),t},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r=0,o=t.length,a;r<o;r++)!a&&r in t||(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setFormFieldsUntouched=t.transformFormObjToArrayWithUntouched=t.filterSystemFields=t.toArr=t.renderValueWithMap=t.getNestedValue=t.withOptions=t.withDataSource=t.withFormItem=t.isValidDomain=t.formItemNameReverse=t.formItemNameReplace=t.withMode=void 0;var u=i(n(0)),d=n(21),f=s(n(12)),p=n(322),h=n(29),m=s(n(188)),v=s(n(97)),g=s(n(232)),b=s(n(409)),y=s(n(231)),w=s(n(233)),O=s(n(114));n(856);var M=function e(t,n,o){return function(e){var a=e.renderMode,i=void 0===a?"edit":a,c=e.value,s=e.onChange,d=l(e,["renderMode","value","onChange"]),f=(null==o?void 0:o(r(r({},d),{value:c,onChange:s,renderMode:i}),i))||r(r({},d),{value:c,onChange:s,renderMode:i});return["view","tableView"].includes(i)&&n?u.default.createElement(n,r({},f)):"disabled"===i?u.default.createElement(t,r({},f,{disabled:!0})):u.default.createElement(t,r({},f))}};t.withMode=M;var j="__zsj__",x=function e(t){return t.replace(/\./g,"__zsj__")};t.formItemNameReplace=x;var E=function e(t){return t.replace(new RegExp("__zsj__","g"),".")};t.formItemNameReverse=E;var A=function e(t){return/^(?!.*--)[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9](\.[A-Za-z]{2,})+$/.test(t)};t.isValidDomain=A;var C=function e(t,n){return function(e){var o,a=e.name,i=e.label,s=e.mode,y=e.renderMode,w=e.tooltip,O=e.noStyle,M=e.extra,j=e.required,x=e.requiredobj,E=e.minLengthobj,A=e.maxLengthobj,C=e.typeobj,S=e.maxobj,_=e.minobj,T=e.normalize,P=e.getValueProps,I=e.validator,k=e.style,N=e.validateTrigger,z=e.__designMode,R=e.labelCol,L=e.hideLabel,B=e.innerStyle,V=l(e,["name","label","mode","renderMode","tooltip","noStyle","extra","required","requiredobj","minLengthobj","maxLengthobj","typeobj","maxobj","minobj","normalize","getValueProps","validator","style","validateTrigger","__designMode","labelCol","hideLabel","innerStyle"]),H=(0,b.default)().path,F=void 0===H?[]:H,$,U=((0,v.default)().dataSource||{}).fields,W=(0,g.default)(),Y=W.renderMode,G=W.size,Q=null==U?void 0:U.find((function(e){return e.name===a})),q=i||(null===(o=null==Q?void 0:Q.uiSchema)||void 0===o?void 0:o.title)||a,X=y||Y,K=(0,d.isString)(a)&&a.includes(".")?[a]:a,Z=(0,u.useMemo)((function(){var e;return u.default.createElement(t,r({},V,{mode:s,renderMode:X},null==n?void 0:n.innerProps,{style:r(r({},B||{}),(null===(e=null==n?void 0:n.innerProps)||void 0===e?void 0:e.style)||{}),fieldKey:K,isVerification:null==C?void 0:C.enabled,size:G}))}),[X,V,s,null==n?void 0:n.innerProps,null==C?void 0:C.enabled,G,B,K]),J="design"===z,ee="hidden"===X,te=void 0!==K?c(c([],F,!0),D(K),!0):void 0,ne=[];if(x&&x.required&&ne.push(r(r({},x),{message:x.message||(0,h.getText)("pisell-data-source-form-required-message")})),C&&C.enabled)switch(C.type){case"email":ne.push(r(r({},C),{message:C.message||(0,h.getText)("pisell-data-source-form-email-message")}));break;case"pattern":ne.push(r(r({},C),{pattern:new RegExp(C.pattern),message:C.message||(0,h.getText)("pisell-data-source-form-pattern-message")}));break;case"phone":ne.push({validator:function e(t,n){if(!(null==n?void 0:n.trim()))return Promise.resolve();try{var r=n.replace(/\s|\(|\)/g,""),o=(0,p.parsePhoneNumberFromString)(r);return(null==o?void 0:o.isValid())?Promise.resolve():Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-phone-message")))}catch(e){return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-phone-message")))}}});break;case"mobile":ne.push({validator:function e(t,n){if(!(null==n?void 0:n.trim()))return Promise.resolve();try{var r=n.replace(/\s|\(|\)/g,"");if(r.length>15)return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")));if(r.startsWith("+61")){var o=r.slice(3);if(!/^(?:04\d{8}|4\d{8})$/.test(o))return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")))}else if(r.startsWith("+86")){var o=r.slice(3);if(!/^1[3-9]\d{9}$/.test(o))return Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message")))}return Promise.resolve()}catch(e){return r.length>15?Promise.reject(new Error(C.message||(0,h.getText)("pisell-data-source-form-mobile-message"))):Promise.resolve()}}});break;case"url":ne.push(r(r({},C),{message:C.message||(0,h.getText)("pisell-data-source-form-url-message")}));break;case"subdomain":ne.push({validator:function e(t,n){if(!n)return Promise.resolve();var r=n.split(".")[0];return/^[a-z0-9-]+$/.test(r)?/^\d+$/.test(r)?Promise.reject(new Error((0,h.getText)("subdomain-error-numbers-only"))):r.startsWith("-")||r.endsWith("-")?Promise.reject(new Error((0,h.getText)("subdomain-error-hyphen-ends"))):r.includes("--")?Promise.reject(new Error((0,h.getText)("subdomain-error-consecutive-hyphens"))):Promise.resolve():Promise.reject(new Error((0,h.getText)("subdomain-error-pattern")))}})}A&&A.enabled&&ne.push({validator:function e(t,n){var r=0;return(0,d.isString)(n)||(0,d.isArr)(n)?r=n.length:(0,d.isNumber)(n)&&(r="".concat(n).length),r>A.max?Promise.reject(new Error(A.message||(0,h.getText)("pisell-data-source-form-max-length-message")(null==A?void 0:A.max))):Promise.resolve()}}),E&&E.enabled&&ne.push({validator:function e(t,n){var r=0;return(0,d.isString)(n)||(0,d.isArr)(n)?r=n.length:(0,d.isNumber)(n)&&(r="".concat(n).length),r<E.min?Promise.reject(new Error(E.message||(0,h.getText)("pisell-data-source-form-min-length-message")(null==E?void 0:E.min))):Promise.resolve()}}),S&&S.enabled&&ne.push(r(r({},S),{type:"number",message:S.message||(0,h.getText)("pisell-data-source-form-max-value-message")(null==S?void 0:S.max)})),_&&_.enabled&&ne.push(r(r({},_),{type:"number",message:_.message||(0,h.getText)("pisell-data-source-form-min-value-message")(null==_?void 0:_.min)})),I&&ne.push({validator:function e(t,n){return I(n)}});var re=(0,u.useMemo)((function(){return L?{span:0}:R}),[L,R]),oe=(0,u.useMemo)((function(){return(0,d.isFunction)(null==n?void 0:n.otherFormItemProps)?null==n?void 0:n.otherFormItemProps(V):(null==n?void 0:n.otherFormItemProps)||{}}),[null==n?void 0:n.otherFormItemProps,V]);return u.default.createElement(m.default.Item,r({required:j,style:r(r({width:"100%"},k),{opacity:J&&ee?"0.3":1}),name:te,label:q,tooltip:w,noStyle:O,extra:M,hidden:ee&&!J,rules:ne,normalize:T,getValueProps:P,validateTrigger:N||["onChange","onBlur"],labelCol:re,initialValue:null==V?void 0:V.defaultValue,className:(0,f.default)("pisell-data-source-form-item",{"pisell-data-source-form-item-view":"view"===X})},oe),Z)}};t.withFormItem=C;var S=function e(t){return function(e){var n=e.dataSource;return u.default.createElement(y.default,{dataSource:n,requestOptions:{list:{cacheKey:"".concat(null==n?void 0:n.headerDataSource,"-").concat(null==n?void 0:n.name,"-").concat(null==n?void 0:n.tableName)}}},u.default.createElement(t,r({},e)))}};t.withDataSource=S;var _=function e(t){return function(e){var n,o=(0,w.default)(),a=e.options,i=e.optionSourceType,l=e.labelField,c=e.valueField,s=e.extraParams,d=(0,O.default)().parseVariable,f=(0,v.default)(),p=f.list,h=f.getCurrentRecord,m=(0,u.useMemo)((function(){var e={};return s&&Object.keys(s).forEach((function(t){e[t]=null==d?void 0:d(s[t],{currentRecord:h()})})),e}),[s]);(0,u.useEffect)((function(){"api"===i&&p.run(r({page:1,pageSize:500},m))}),[]);var g=(0,u.useMemo)((function(){var e,t,n;return"api"!==i?a:((null===(n=null===(t=null===(e=p.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.filter)||void 0===n?void 0:n.call(t,(function(e){return!["draft","inactive","disabled"].includes(null==e?void 0:e.status)})))||[]).map((function(e){return{label:o(e[l]),value:e[c]}}))||[]}),[a,i,null===(n=null==p?void 0:p.data)||void 0===n?void 0:n.data]);return u.default.createElement(t,r({},e,{options:g}))}};t.withOptions=_;var T=function e(t,n){for(var r,o=t,a=0,i=n.split(".");a<i.length;a++){var l=i[a];if(!o)break;o=o[l]}return o};t.getNestedValue=T;var P=function e(t,n,r){var o="tableView"===r?{fontSize:14,fontWeight:400}:{};return(0,d.isArr)(t)?u.default.createElement("span",{className:"pisell-form-read-pretty-text"},t.map((function(e,r){return u.default.createElement(u.default.Fragment,null,u.default.createElement("span",{key:e,className:"pisell-form-read-pretty-value",style:o},null==n?void 0:n[e]),r<t.length-1&&", ")}))):(0,d.isString)(t)||(0,d.isNumber)(t)?u.default.createElement("span",{className:"pisell-form-read-pretty-text"},u.default.createElement("span",{className:"pisell-form-read-pretty-value",style:o},(null==n?void 0:n[t])||t)):null};function D(e){return Array.isArray(e)?e:[e]}t.renderValueWithMap=P,t.toArr=D;var I=["createdAt","updatedAt","createdBy","created_at","updated_at","deleted_at"],k=function e(t){return Object.keys(t).reduce((function(e,n){return I.includes(n)||(e[n]=t[n]),e}),{})};t.filterSystemFields=k;var N=function e(t){return Object.keys(t).reduce((function(e,n){return e.push({name:n,value:t[n],touched:!1}),e}),[])};t.transformFormObjToArrayWithUntouched=N;var z=function e(t){var n,r=t.getFieldsError().map((function(e){return{name:e.name,value:t.getFieldValue(e.name),touched:!1}}));t.setFields(r)};t.setFormFieldsUntouched=z},function(e,t,n){"use strict";var r=n(0),o=n.n(r);function a(e){var t=Object(r.useRef)(e);return t.current=e,t}t.a=a},function(e,t,n){"use strict";var r=n(256),o=n(257),a=n(127),i=n(14),l=n(258),c=n(259),s=n(260),u=n(261),d=n(46),f=n(28),p=function(){function e(){}return e.randomize253State=function(e){var t=149*e%253+1,n=i.t+t;return n<=254?n:n-254},e.encodeHighLevel=function(e,t,n,d,f){void 0===t&&(t=0),void 0===n&&(n=null),void 0===d&&(d=null),void 0===f&&(f=!1);var p=new a.a,h=[new r.a,p,new u.a,new s.a,new l.a,new o.a],m=new c.a(e);m.setSymbolShape(t),m.setSizeConstraints(n,d),e.startsWith(i.p)&&e.endsWith(i.s)?(m.writeCodeword(i.o),m.setSkipAtEnd(2),m.pos+=i.p.length):e.startsWith(i.r)&&e.endsWith(i.s)&&(m.writeCodeword(i.q),m.setSkipAtEnd(2),m.pos+=i.r.length);var v=i.b;for(f&&(p.encodeMaximal(m),v=m.getNewEncoding(),m.resetEncoderSignal());m.hasMoreCharacters();)h[v].encode(m),m.getNewEncoding()>=0&&(v=m.getNewEncoding(),m.resetEncoderSignal());var g=m.getCodewordCount();m.updateSymbolInfo();var b=m.getSymbolInfo().getDataCapacity();g<b&&v!==i.b&&v!==i.c&&v!==i.f&&m.writeCodeword("\xfe");var y=m.getCodewords();for(y.length()<b&&y.append(i.t);y.length()<b;)y.append(this.randomize253State(y.length()+1));return m.getCodewords().toString()},e.lookAheadTest=function(e,t,n){var r=this.lookAheadTestIntern(e,t,n);if(n===i.x&&r===i.x){for(var o=Math.min(t+3,e.length),a=t;a<o;a++)if(!this.isNativeX12(e.charCodeAt(a)))return i.b}else if(n===i.f&&r===i.f)for(var o=Math.min(t+4,e.length),a=t;a<o;a++)if(!this.isNativeEDIFACT(e.charCodeAt(a)))return i.b;return r},e.lookAheadTestIntern=function(e,t,n){if(t>=e.length)return n;var r;n===i.b?r=[0,1,1,1,1,1.25]:(r=[1,2,2,2,2,2.25])[n]=0;for(var o=0,a=new Uint8Array(6),l=[];;){if(t+o===e.length){d.a.fill(a,0),d.a.fill(l,0);var c=this.findMinimums(r,l,f.a.MAX_VALUE,a),s=this.getMinimumCount(a);if(l[i.b]===c)return i.b;if(1===s){if(a[i.c]>0)return i.c;if(a[i.f]>0)return i.f;if(a[i.v]>0)return i.v;if(a[i.x]>0)return i.x}return i.d}var u=e.charCodeAt(t+o);if(o++,this.isDigit(u)?r[i.b]+=.5:this.isExtendedASCII(u)?(r[i.b]=Math.ceil(r[i.b]),r[i.b]+=2):(r[i.b]=Math.ceil(r[i.b]),r[i.b]++),this.isNativeC40(u)?r[i.d]+=2/3:this.isExtendedASCII(u)?r[i.d]+=8/3:r[i.d]+=4/3,this.isNativeText(u)?r[i.v]+=2/3:this.isExtendedASCII(u)?r[i.v]+=8/3:r[i.v]+=4/3,this.isNativeX12(u)?r[i.x]+=2/3:this.isExtendedASCII(u)?r[i.x]+=13/3:r[i.x]+=10/3,this.isNativeEDIFACT(u)?r[i.f]+=3/4:this.isExtendedASCII(u)?r[i.f]+=4.25:r[i.f]+=3.25,this.isSpecialB256(u)?r[i.c]+=4:r[i.c]++,o>=4){if(d.a.fill(a,0),d.a.fill(l,0),this.findMinimums(r,l,f.a.MAX_VALUE,a),l[i.b]<this.min(l[i.c],l[i.d],l[i.v],l[i.x],l[i.f]))return i.b;if(l[i.c]<l[i.b]||l[i.c]+1<this.min(l[i.d],l[i.v],l[i.x],l[i.f]))return i.c;if(l[i.f]+1<this.min(l[i.c],l[i.d],l[i.v],l[i.x],l[i.b]))return i.f;if(l[i.v]+1<this.min(l[i.c],l[i.d],l[i.f],l[i.x],l[i.b]))return i.v;if(l[i.x]+1<this.min(l[i.c],l[i.d],l[i.f],l[i.v],l[i.b]))return i.x;if(l[i.d]+1<this.min(l[i.b],l[i.c],l[i.f],l[i.v])){if(l[i.d]<l[i.x])return i.d;if(l[i.d]===l[i.x]){for(var p=t+o+1;p<e.length;){var h=e.charCodeAt(p);if(this.isX12TermSep(h))return i.x;if(!this.isNativeX12(h))break;p++}return i.d}}}}},e.min=function(e,t,n,r,o){var a=Math.min(e,Math.min(t,Math.min(n,r)));return void 0===o?a:Math.min(a,o)},e.findMinimums=function(e,t,n,r){for(var o=0;o<6;o++){var a=t[o]=Math.ceil(e[o]);n>a&&(n=a,d.a.fill(r,0)),n===a&&(r[o]=r[o]+1)}return n},e.getMinimumCount=function(e){for(var t=0,n=0;n<6;n++)t+=e[n];return t||0},e.isDigit=function(e){return e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)},e.isExtendedASCII=function(e){return e>=128&&e<=255},e.isNativeC40=function(e){return e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0)},e.isNativeText=function(e){return e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="a".charCodeAt(0)&&e<="z".charCodeAt(0)},e.isNativeX12=function(e){return this.isX12TermSep(e)||e===" ".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0)},e.isX12TermSep=function(e){return 13===e||e==="*".charCodeAt(0)||e===">".charCodeAt(0)},e.isNativeEDIFACT=function(e){return e>=" ".charCodeAt(0)&&e<="^".charCodeAt(0)},e.isSpecialB256=function(e){return!1},e.determineConsecutiveDigitCount=function(e,t){void 0===t&&(t=0);for(var n=e.length,r=t;r<n&&this.isDigit(e.charCodeAt(r));)r++;return r-t},e.illegalCharacter=function(e){var t=f.a.toHexString(e.charCodeAt(0));throw t="0000".substring(0,4-t.length)+t,new Error("Illegal character: "+e+" (0x"+t+")")},e}();t.a=p},function(e,t,n){var r,o;
15
15
  /*!
16
16
  Copyright (c) 2018 Jed Watson.
17
17
  Licensed under the MIT License (MIT), see