dwt 18.1.2-beta → 18.1.3-beta

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.
@@ -1,7 +1,7 @@
1
- // @20230309 104955
1
+ // @20230727 104955
2
2
  /*
3
3
  * @name: dwt all-in-one package
4
- * @version: 18.1
4
+ * @version: 18.1.3
5
5
  * @components:
6
6
  * + Dynamsoft Dynamic Web TWAIN version: 18.1
7
7
  * + Dynamsoft Barcode Reader Addon for DWT version 18.1 (DBR version 9.4)
@@ -11,14 +11,14 @@
11
11
  * + Dynamsoft Webcam Addon for DWT version: 18.1
12
12
  * + Dynamsoft File Uploader version: 18.1
13
13
  */
14
- /*! 20230309104535 - 20221201
14
+ /*! 20230727104535 - 20221201
15
15
  * Dynamsoft JavaScript Library
16
16
  * Product: Dynamsoft Web Twain
17
17
  * Web Site: https://www.dynamsoft.com
18
18
  *
19
19
  * Copyright 2023, Dynamsoft Corporation
20
20
  * Author: Dynamsoft Support Team
21
- * Version: 18.1
21
+ * Version: 18.1.3
22
22
  */
23
23
  /// Dynamsoft JavaScript Core, version 6.1.18 20230110162601
24
24
 
@@ -121,7 +121,7 @@ var Dynamsoft=self.Dynamsoft||{};Dynamsoft.DWT=Dynamsoft.DWT||{},Dynamsoft.aryAd
121
121
  * final js: build\addon\dynamsoft.webtwain.addon.ocrpro.js
122
122
  */
123
123
  ;var Dynamsoft=self.Dynamsoft||{};Dynamsoft.DWT=Dynamsoft.DWT||{};Dynamsoft.aryAddonReadyFun=Dynamsoft.aryAddonReadyFun||[];Dynamsoft.AddonReady=Dynamsoft.AddonReady||function(a){Dynamsoft.aryAddonReadyFun.push(a)};Dynamsoft.ProOCRVerInName="1.2.0.0806";(function(b){function a(){var c=this;c._text="";c._left=0;c._top=0;c._right=0;c._bottom=0}a.prototype.GetText=function(){var c=this;return c._text};a.prototype.GetLetterRect=function(){var c=this;return c._left+","+c._top+","+c._right+","+c._bottom};b.NewLetterResult=function(){return new a()}})(Dynamsoft.Lib);(function(b){function a(){var c=this;c._count=0;c._letterlist=[];c._zoneCount=0;c._zoneWords=[]}a.prototype.GetLettersCount=function(){var c=this;return c._count};a.prototype.GetZoneCount=function(){var c=this;return c._zoneCount};a.prototype.GetLetterContent=function(d){var f=this,c=f._count;if(f._errorCode<0){return""}if(d==null||d>=c||d<0){Dynamsoft.Lib.Errors.OCR_InvalidIndex(f,"GetLetterContent");return""}var e=Dynamsoft.Lib.NewLetterResult();e._text=f._letterlist[d].letter;e._left=f._letterlist[d].boundary[0];e._top=f._letterlist[d].boundary[1];e._right=f._letterlist[d].boundary[2];e._bottom=f._letterlist[d].boundary[3];return e};a.prototype.GetZoneContent=function(d){var e=this,c=e._zoneCount;if(e._errorCode<0){return""}if(d==null||d>=c||d<0){Dynamsoft.Lib.Errors.OCR_InvalidIndex(e,"GetZoneContent");return""}return e._zoneWords[d]};b.NewPageResult=function(){return new a()}})(Dynamsoft.Lib);(function(a){function b(){var c=this;c._input=0;c._message="";c._page=-1}b.prototype.GetInput=function(){var c=this;return c._input};b.prototype.GetMessage=function(){var c=this;return c._message};b.prototype.GetPage=function(){var c=this;return c._page};a.NewErrorInfo=function(){return new b()}})(Dynamsoft.Lib);(function(a){function b(c){var d=this;d._errorCode=0;d._errorString="";d._errorlist=[];d._request="";d._ocrTotalCount=0;d._alreadyOCRCount=0;d._resultlist=[];d._resultZoneDetail=[];d._stwain=c}b.prototype.GetErrorCode=function(){var c=this;return c._errorCode};b.prototype.GetErrorString=function(){var c=this;return c._errorString};b.prototype.GetInput=function(){var e=this;if(e._request&&e._request.input){var d=e._request.input;if(d){var c=Number(d);if(!isNaN(c)){return e._stwain._ImgManager.convertServerIdToClientIndex(c)}}return d}else{return""}};b.prototype.GetErrorDetailList=function(){var g=this,c=0;if(g._errorlist){c=g._errorlist.length}var e=[];for(var d=0;d<c;d++){var f=Dynamsoft.Lib.NewErrorInfo();f._input=g._errorlist[d].input;f._message=g._errorlist[d].message;f._page=g._errorlist[d].page;e.push(f)}return e};b.prototype.GetOCRTotalCount=function(){var c=this;if(c._ocrTotalCount){return c._ocrTotalCount}else{return 0}};b.prototype.GetAlreadyOCRCount=function(){var c=this;if(c._alreadyOCRCount){return c._alreadyOCRCount}else{return 0}};b.prototype.GetPageCount=function(){var c=this;if(c._resultlist&&c._resultlist.length){return c._resultlist.length}else{return 0}};b.prototype.GetPageContent=function(d){var f=this,c=0;if(f._resultlist){c=f._resultlist.length}if(d==null||d>=c||d<0){Dynamsoft.Lib.Errors.OCR_InvalidIndex(f,"GetPageContent");return""}var e=Dynamsoft.Lib.NewPageResult();if(f._resultlist){e._count=f._resultlist[d].length;e._letterlist=f._resultlist[d]}else{e._count=0}if(f._resultZoneDetail){e._zoneCount=f._resultZoneDetail[d].length;e._zoneWords=f._resultZoneDetail[d]}else{e._zoneCount=0}return e};b.prototype.Get=function(){var c=this;return c._stwain._innerFun("GetOCRRestult")};b.prototype.Save=function(c){var e=this,d=a.html5.Funs.replaceLocalFilename(c);return e._stwain._innerFun("SaveOCRRestult",a.html5.Funs.makeParams(d))};a.NewOCRProResult=function(c){return new b(c)}})(Dynamsoft.Lib);(function(c){var d=[Dynamsoft.DWT],b=0;for(;b<1;b++){var a=d[b];a.EnumDWT_OCRProRecognitionModule={OCRPM_AUTO:"AUTO",OCRPM_MOSTACCURATE:"MOSTACCURATE",OCRPM_BALANCED:"BALANCED",OCRPM_FASTEST:"FASTEST"};a.EnumDWT_OCRProOutputFormat={OCRPFT_TXTS:"TXTS",OCRPFT_TXTCSV:"TXTCSV",OCRPFT_TXTF:"TXTF",OCRPFT_XML:"XML",OCRPFT_IOTPDF:"IOTPDF",OCRPFT_IOTPDF_MRC:"IOTPDF_MRC"};a.EnumDWT_OCRProPDFVersion={OCRPPDFV_0:"1.0",OCRPPDFV_1:"1.1",OCRPPDFV_2:"1.2",OCRPPDFV_3:"1.3",OCRPPDFV_4:"1.4",OCRPPDFV_5:"1.5",OCRPPDFV_6:"1.6",OCRPPDFV_7:"1.7"};a.EnumDWT_OCRProPDFAVersion={OCRPPDFAV_1A:"pdf/a-1a",OCRPPDFAV_1B:"pdf/a-1b",OCRPPDFAV_2A:"pdf/a-2a",OCRPPDFAV_2B:"pdf/a-2b",OCRPPDFAV_2U:"pdf/a-2u",OCRPPDFAV_3A:"pdf/a-3a",OCRPPDFAV_3B:"pdf/a-3b",OCRPPDFAV_3U:"pdf/a-3u"};a.EnumDWT_OCRProType={OCRDT_File:0,OCRDT_Index:1};a.EnumDWT_OCRFindTextFlags={OCRFT_WHOLEWORD:1,OCRFT_MATCHCASE:2,OCRFT_FUZZYMATCH:4};a.EnumDWT_OCRFindTextAction={OCRFT_HIGHLIGHT:0,OCRFT_STRIKEOUT:1,OCRFT_MARKFORREDACT:2}}})(typeof window!=="undefined"?window:this);(function(a){function b(){var c=this;c.FindText="";c.FindTextFlags=Dynamsoft.DWT.EnumDWT_OCRFindTextFlags.OCRFT_WHOLEWORD;c.FindTextAction=Dynamsoft.DWT.EnumDWT_OCRFindTextAction.OCRFT_MARKFORREDACT}a.NewRedaction=function(){return new b()}})(Dynamsoft.Lib);Dynamsoft.WebTwain={Addon:{OCRPro:{}}};(function(a){function b(){var c=this;c.RecognitionModule="";c.Languages="eng";c.OutputFormat="";c.PDFVersion="";c.PDFAVersion="";c.LicenseChecker="";c.Redaction=Dynamsoft.Lib.NewRedaction()}a.NewSettings=function(){return new b()}})(Dynamsoft.WebTwain.Addon.OCRPro);(function(){function a(f,e,c,b){var d=this;d.left=f;d.top=e;d.right=c;d.bottom=b}Dynamsoft.WebTwain.Addon.OCRPro.NewOCRZone=function(e,d,c,b){return new a(e,d,c,b)}})();Dynamsoft.AddonReady(function(m,h){if(!m.product.bHTML5Edition){return}var n=1000,q=function(){return n++};function o(y){var z=m.html5.Funs;y.__innerGetOCRProResultAsyncFunction=function(B){var A=Dynamsoft.Lib.NewOCRProResult(this);if(B){A._errorCode=B.code;A._errorString=B.message;A._request=B.request;A._errorlist=B.errorList;A._ocrTotalCount=B.ocrTotalCount;A._alreadyOCRCount=B.alreadyOCRCount;A._resultlist=B.resultDetail;A._resultZoneDetail=B.resultZoneDetail}return A};y.__innerIsOCRTrial=function(A,B){var D=this,C=function(){var F=false;if(D.__licenseInfo.Detail){for(var E=0;E<D.__licenseInfo.Detail.length;E++){if(D.__licenseInfo.Detail[E].EnumLicenseType=="10"){if(D.__licenseInfo.Detail[E].Trial=="TRUE"){F=true}}}}return A(F)};if(D.__licenseInfo&&D.__licenseInfo.Detail){return C()}else{return D.GetLicenseInfo(C,B)}};y.__innerOCRReadFunction=function(D,I,E,H,A,B,G,C){var F=this;return F.__innerOCRAsyncReadFunction(D,I,E,H,A,B,G,C)};y.__innerOCRAsyncReadFunction=function(D,K,E,I,A,B,H,C){var G=this;var F=function(L){if(L.code==0){if(m.isFunction(H)){if(K!=-1){if(I==1){H(K,A,G.__innerGetOCRProResultAsyncFunction(L))}else{H(K,G.__innerGetOCRProResultAsyncFunction(L))}}else{if(E!=""){H(E,G.__innerGetOCRProResultAsyncFunction(L))}else{H(G.__innerGetOCRProResultAsyncFunction(L))}}}if(m.License.isLTS()){Dynamsoft.DWT.lcvrf(y)}}else{if(m.isFunction(C)){C(L.code,L.message,G.__innerGetOCRProResultAsyncFunction(L))}}z.hideMask(D)},J=function(L){z.hideMask(D)};z.showMask(D);G._innerSend(D,B,true,F,J);return true};y.__innerGetRequestJson=function(G,I,A,K,B){var F=y,C;var E="[{";E+='"id":"'+y.clientId+'",';E+='"method":"OCRProRecognize",';E+='"dllName":"'+B+'",';E+='"productkey":"'+Dynamsoft.DWT.ProductKey+'",';if(G==Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_File){E+='"inputType":"file",'}else{E+='"inputType":"index",'}E+='"input":[';for(C=0;C<I.length;C++){if(G==Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_File){E+='"'+I[C]+'"'}else{E+=I[C]}if(C+1<I.length){E+="|"}}E+="],";E+='"settings":{';E+='"recognitionMethod": "Page"';if(A){if(A.RecognitionModule&&A.RecognitionModule.length>0){E+=',"recognitionModule":"'+A.RecognitionModule+'"'}if(A.Languages&&A.Languages.length>0){E+=',"languages":"'+A.Languages+'"'}if(A.OutputFormat&&A.OutputFormat.length>0){E+=',"outputFormat":"'+A.OutputFormat+'"'}if(A.PDFVersion&&A.PDFVersion.length>0){E+=',"pdfVersion":"'+A.PDFVersion+'"'}if(A.PDFAVersion&&A.PDFAVersion.length>0){E+=',"pdfAVersion":"'+A.PDFAVersion+'"'}if(A.Redaction&&A.Redaction.FindText&&A.Redaction.FindText.length>0){var J=parseInt(A.Redaction.FindTextFlags),H=parseInt(A.Redaction.FindTextAction);if(!isNaN(J)&&!isNaN(H)){E+=',"redaction":{';var D=A.Redaction.FindText;D=D.replace(/\"/g,'\\"');E+='"findText":"'+D+'"';E+=',"findTextFlags":'+J;E+=',"findTextAction":'+H;E+="}"}}}E+="},";E+='"zones":[';for(C=0;C<K.length;C++){E+="["+K[C].left+","+K[C].top+","+K[C].right+","+K[C].bottom+"]";if(C+1<K.length){E+=","}}E+="],";E+='"outputFile":""';E+="}]";return E};y.__LoadImageFromBytesForDownloadInner=function(E,K,O,J,L,B,H,M,D){var I=y;var A,C,G;if(E>=J){A=B*J;G=K.slice(A,L)}else{A=E*B;C=(E+1)*B;G=K.slice(A,C)}var N=function(){if(Dynamsoft.Lib.isFunction(D)){D()}};var F=function(){if(E>=J){if(Dynamsoft.Lib.isFunction(M)){M()}return}E=E+1;I.__LoadImageFromBytesForDownloadInner(E,K,O,J,L,B,H,M,D)};I.__LoadImageFromBytes(G,O,"",H,F,N,A,L)};y.__LoadImageFromBytesForDownload=function(H,B,G,D,C,J){var F=y;var A=2*1000*1000;var I=H.size||H.length;var E=parseInt(I/A);var K=I%A;if(K==0){E=E-1}F.__LoadImageFromBytesForDownloadInner(0,H,B,E,I,A,D,C,J)}}var e=function(B){var C=[],z,y,A;if(B._ImgManager.count()<=0){return C}y=B._ImgManager.getCurrentImageIndex();z=B._ImgManager.convertClientIndexToServerId(y);A=B._ImgManager.getSelectedClientIndexArray();if(m.isArray(A)){m.each(A,function(D){var E=B._ImgManager.convertClientIndexToServerId(D);C.push(E)})}return C},v=function(C,A,z,B){var y=m.NewOCRProResult(C);y._errorCode=A;y._errorString=z;var D=m.NewErrorInfo();D.input=B;D.message=y._errorString;D.page=0;y._errorlist=[D];return y},g=function(A){var B=m.html5.Funs,z,y;if(m.env.bMac){y="DynamicOCRPro_"+Dynamsoft.ProOCRVerInName+".dylib"}else{if(m.env.bLinux){y="DynamicOCRPro_"+Dynamsoft.ProOCRVerInName+".so"}else{if(Dynamsoft.dcp.b64bit){y="DynamicOCRProx64_"+Dynamsoft.ProOCRVerInName+".dll"}else{y="DynamicOCRPro_"+Dynamsoft.ProOCRVerInName+".dll"}}}o(A);z={OCRPro:{Settings:false,Recognize:function(N,K,D){var J=[],H,O,L,I;var G=A;G._resetErr();if(G._isMobileMode()){return G._mobileNotSupport("Addon.OCRPro.Recognize")}H=parseInt(N);if(m.isNaN(H)||!m.isNumber(H)){O=v(A,-2201,"Invalid parameter type.",N);if(m.isFunction(D)){D(O._errorCode,O._errorString,O)}else{m.Errors.WebviewerError(A,O._errorString,O._errorCode)}return false}var F=A._ImgManager.convertClientIndexToServerId(H);if(F==-1){if(m.isFunction(D)){m.Errors.IndexOutOfRange(A);O=v(A,A._errorCode,A._errorString,N);D(O._errorCode,O._errorString,O)}return false}if(!m.License.checkProductKey(A,{OCRPro:true},true)){if(m.isFunction(D)){O=v(A,A._errorCode,A._errorString,N);D(O._errorCode,O._errorString,O)}return false}J.push(F);var M=[],C=this.Settings;var E=A.__innerGetRequestJson(Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_Index,J,C,M,y);return A.__innerIsOCRTrial(function(P){if(P||m.License.isLTS()){return A.__innerOCRReadFunction("OCRProRecognize",N,"",0,M,E,K,D)}else{return w(C.LicenseChecker,A,"OCRProRecognize",N,"",0,M,E,K,D)}},D)},RecognizeRect:function(X,P,R,G){var N=[],K,M,F,L;var S=A;S._resetErr();if(S._isMobileMode()){return S._mobileNotSupport("Addon.OCRPro.RecognizeRect")}K=parseInt(X);if(m.isNaN(K)||!m.isNumber(K)){M=v(A,-2201,"Invalid parameter type.",X);if(m.isFunction(G)){G(M._errorCode,M._errorString,M)}else{m.Errors.WebviewerError(A,M._errorString,M._errorCode)}return false}var Q=A._ImgManager.convertClientIndexToServerId(K),T=A._ImgManager.GetImageWidth(K),J=A.GetImageHeight(K);if(Q==-1){if(m.isFunction(G)){m.Errors.IndexOutOfRange(A);M=v(A,A._errorCode,A._errorString,X);G(M._errorCode,M._errorString,M)}return false}if(!m.License.checkProductKey(A,{OCRPro:true},true)){if(m.isFunction(G)){M=v(A,A._errorCode,A._errorString,X);G(M._errorCode,M._errorString,M)}return false}if(T>0&&J>0){var V,E,U,W,I,D;for(var O=0;O<P.length;O++){V=P[O];E=V.left;U=V.top;W=V.right;I=V.bottom;if(E<0){E=0}if(U<0){U=0}if(W<0){W=0}if(I<0){I=0}if(E>W){D=E;E=W;W=D}if(U>I){D=U;U=I;I=D}if(W>T){W=T}if(I>J){I=J}V.left=E;V.top=U;V.right=W;V.bottom=I}}N.push(Q);var C=this.Settings;var H=A.__innerGetRequestJson(Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_Index,N,C,P,y);return A.__innerIsOCRTrial(function(Y){if(Y||m.License.isLTS()){return A.__innerOCRReadFunction("OCRProRecognize",X,"",1,P,H,R,G)}else{return w(C.LicenseChecker,A,"OCRProRecognize",X,"",1,P,H,R,G)}},G)},RecognizeFile:function(D,M,G){var I=A;I._resetErr();if(I._isMobileMode()){return I._mobileNotSupport("Addon.OCRPro.RecognizeFile")}var P,N,K;if(D.length==0){if(m.isFunction(G)){P=Dynamsoft.Lib.NewOCRProResult(A);P._errorCode=-2201;P._errorString="File name cannot be empty.";K=[];N=Dynamsoft.Lib.NewErrorInfo();N.input=D;N.message=P._errorString;N.page=0;K.push(N);P._errorlist=K;G(P._errorCode,P._errorString,P)}return false}if(!m.License.checkProductKey(A,{OCRPro:true},true)){if(m.isFunction(G)){P=Dynamsoft.Lib.NewOCRProResult(A);P._errorCode=A._errorCode;P._errorString=A._errorString;K=[];N=Dynamsoft.Lib.NewErrorInfo();N.input=D;N.message=P._errorString;N.page=0;K.push(N);P._errorlist=K;G(P._errorCode,P._errorString,P)}return false}var J=B.replaceLocalFilename(D);var C=[];if(J.indexOf("|")>0){C=J.split("|")}else{if(J.indexOf(";")>0){C=J.split(";")}else{if(J.indexOf(",")>0){C=J.split(",")}}}var L=[];if(C.length>0){for(var F=0;F<C.length;F++){L.push(C[F])}}else{L.push(J)}var O=[],E=this.Settings;var H=A.__innerGetRequestJson(Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_File,L,E,O,y);A.__innerIsOCRTrial(function(Q){if(Q||m.License.isLTS()){return A.__innerOCRReadFunction("OCRProRecognize",-1,D,0,O,H,M,G)}else{return w(E.LicenseChecker,A,"OCRProRecognize",-1,D,0,O,H,M,G)}},G)},RecognizeSelectedImages:function(J,D){var G,H,K;var F=A;F._resetErr();if(F._isMobileMode()){return F._mobileNotSupport("Addon.OCRPro.RecognizeSelectedImages")}if(!m.License.checkProductKey(A,{OCRPro:true},true)){if(m.isFunction(D)){var M=Dynamsoft.Lib.NewOCRProResult(A);M._errorCode=A._errorCode;M._errorString=A._errorString;H=[];K=Dynamsoft.Lib.NewErrorInfo();K.input="";K.message=M._errorString;K.page=0;H.push(K);M._errorlist=H;D(M._errorCode,M._errorString,M)}return false}var L=[],C=this.Settings,I=e(A),E=A.__innerGetRequestJson(Dynamsoft.DWT.EnumDWT_OCRProType.OCRDT_Index,I,C,L,y);A.__innerIsOCRTrial(function(N){if(N||m.License.isLTS()){G=A.__innerOCRReadFunction("OCRProRecognize",-1,"",0,L,E,J,D)}else{G=w(C.LicenseChecker,A,"OCRProRecognize",-1,"",0,L,E,J,D)}},D);return G},IsModuleInstalled:function(){var D=A;D._resetErr();if(D._isMobileMode()){return D._mobileNotSupport("Addon.OCRPro.IsModuleInstalled")}var C=D._innerFun("GetAddOnVersion",B.makeParams("proocr",y));return(C!="")},Download:function(G,J,C){var F=A,H;F._resetErr();if(F._isMobileMode()){return F._mobileNotSupport("Addon.OCRPro.Download")}var E=function(){if(m.isFunction(J)){J()}return true},K=function(){if(m.isFunction(C)){C(F.ErrorCode,F.ErrorString)}return false};if(!m.License.checkProductKey(F,{Core:true})){return K()}if(!m.License.checkProductKey(F,{OCRPro:true},true)){return K()}if(this.IsModuleInstalled()){E();return true}if(!G||G==""||!m.isString(G)){m.Errors.OCR_InvalidRemoteFilename(F);K();return false}if(B.isServerInvalid(F)){K();return false}H="get";m.cancelFrome=2;m.showProgress(F,"Download",true);var I=function(L){var M=(L.total===0)?100:Math.round(L.loaded*100/L.total),N=[L.loaded," / ",L.total].join("");F._OnPercentDone([0,M,"","http"])},D=true;F._OnPercentDone([0,-1,"Downloading OCR Resources...","http"]);if(!m.isFunction(J)){D=false}return B.loadHttpBlob(F,H,G,D,function(L){F._OnPercentDone([0,-1,"Loading..."]);var M=102;F.__LoadImageFromBytesForDownload(L,M,"",D,E,K)},function(){m.closeProgress("Download");K()},I)}}};A.__addon=A.__addon||{};m.mix(A.__addon,z)};if(m.DynamicLoadAddonFuns){m.DynamicLoadAddonFuns.push(g)}function p(E,H,z,I,B,G,y,C,F,A){var D=this;D.STWAIN=H;D.AjaxFunctionUrl=E;D.FunctionName=z;D.ImageIndex=I;D.FileNames=B;D.Type=G;D.AryZone=y;D.JsonString=C;D.OnSuccess=F;D.OnFailure=A}Dynamsoft.WebTwain.Addon.OCRPro.NewOCRReadPara=function(D,G,z,H,B,F,y,C,E,A){return new p(D,G,z,H,B,F,y,C,E,A)};function s(C,B){var D="";var E=C.responseText;if(E.length==0){var A=Dynamsoft.WebTwain.Addon.OCRPro.NewOCRError();Dynamsoft.Lib.Errors.OCR_LicenseCheckerError(A,B.AjaxFunctionUrl);E=A.responseText}D=f(E);var z=D.split(";");if(z.length==1){B.OnFailure(-1,E,Dynamsoft.Lib.NewOCRProResult())}else{if(z[0]=="true"){var y=function(G,F,H){if(Dynamsoft.Lib.isUndefined(H)){if(Dynamsoft.Lib.isUndefined(F)){B.OnSuccess(G);x(B.AjaxFunctionUrl,G.GetPageCount())}else{B.OnSuccess(G,F);x(B.AjaxFunctionUrl,F.GetPageCount())}}else{B.OnSuccess(G,F,H);x(B.AjaxFunctionUrl,H.GetPageCount())}};B.STWAIN.__innerOCRReadFunction(B.FunctionName,B.ImageIndex,B.FileNames,B.Type,B.AryZone,B.JsonString,y,B.OnFailure)}else{B.OnFailure(z[1],z[2],Dynamsoft.Lib.NewOCRProResult())}}}function w(G,J,z,K,D,I,y,E,H,A){var B=G;var F="DTW_AjaxMethod=CheckLicense&Productkey="+j(Dynamsoft.DWT.ProductKey);var C=Dynamsoft.WebTwain.Addon.OCRPro.NewOCRReadPara(G,J,z,K,D,I,y,E,H,A);return d(B,F,s,C)}function x(A,B){var z=A;var y="DTW_AjaxMethod=WriteOCRCount&OCRCount="+j(B+"");d(z,y,b,null)}function b(z,y){}function a(){var y=this;y.responseText="";y.errorString=""}Dynamsoft.WebTwain.Addon.OCRPro.NewOCRError=function(){return new a()};Dynamsoft.Lib.mix(Dynamsoft.Lib.Errors,{OCR_LicenseCheckerEmpty:function(z){var A=-2601;var y="LicenseChecker cannot be empty.";z.errorString=y;z.responseText=j("false;"+A+";"+y+";")},OCR_LicenseCheckerNotConnect:function(z){var A=-2602;var y="Cannot connect to the LicenseChecker, please check and make sure it's set correctly.";z.errorString=y;z.responseText=j("false;"+A+";"+y+";")},OCR_AccessDenied:function(z){var A=-2603;var y="Access denied.";z.errorString=y;z.responseText=j("false;"+A+";"+y+";")},OCR_LicenseCheckerError:function(z,B){var A=-2604;var y="Error occured in '"+B+"'.";z.errorString=y;z.responseText=j("false;"+A+";"+y+";")},OCR_HTTPError:function(z,A){var B=-2605;var y="HTTP Error "+A+".";z.errorString=y;z.responseText=j("false;"+B+";"+y+";")},OCR_LicenseCheckerUnauthorized:function(z,B){var A=-2606;var y="You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to '"+B+"'.";z.errorString=y;z.responseText=j("false;"+A+";"+y+";")},__last:false});function i(){var y=null,A=window;try{y=new A.ActiveXObject("Msxml2.XMLHTTP")}catch(z){try{y=new A.ActiveXObject("Microsoft.XMLHTTP")}catch(z){y=new XMLHttpRequest()}}return y}function d(z,y,D,C){var A=Dynamsoft.WebTwain.Addon.OCRPro.NewOCRError();if(z==""){Dynamsoft.Lib.Errors.OCR_LicenseCheckerEmpty(A);alert(A.errorString);D(A,C);return false}var B=i();B.open("POST",z,true);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");B.onreadystatechange=function(){if(B.readyState==4){if(B.status==200){if(D!=null&&typeof(D)=="function"){D(B,C)}}else{if(B.status==401){Dynamsoft.Lib.Errors.OCR_LicenseCheckerUnauthorized(A,C.AjaxFunctionUrl);D(A,C);return false}else{if(B.status==404){Dynamsoft.Lib.Errors.OCR_LicenseCheckerNotConnect(A);alert(A.errorString);D(A,C);return false}else{if(B.status==403){Dynamsoft.Lib.Errors.OCR_AccessDenied(A);D(A,C);return false}else{Dynamsoft.Lib.Errors.OCR_HTTPError(A,B.status);D(A,C);return false}}}}}};if(B&&y){B.send(y)}return true}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var r=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);function k(E){var A,C,y;var D,B,z;y=E.length;C=0;A="";while(C<y){D=E.charCodeAt(C++)&255;if(C==y){A+=c.charAt(D>>2);A+=c.charAt((D&3)<<4);A+="==";break}B=E.charCodeAt(C++);if(C==y){A+=c.charAt(D>>2);A+=c.charAt(((D&3)<<4)|((B&240)>>4));A+=c.charAt((B&15)<<2);A+="=";break}z=E.charCodeAt(C++);A+=c.charAt(D>>2);A+=c.charAt(((D&3)<<4)|((B&240)>>4));A+=c.charAt(((B&15)<<2)|((z&192)>>6));A+=c.charAt(z&63)}return A}function t(F){var E,D,B,z;var C,y,A;y=F.length;C=0;A="";while(C<y){do{E=r[F.charCodeAt(C++)&255]}while(C<y&&E==-1);if(E==-1){break}do{D=r[F.charCodeAt(C++)&255]}while(C<y&&D==-1);if(D==-1){break}A+=String.fromCharCode((E<<2)|((D&48)>>4));do{B=F.charCodeAt(C++)&255;if(B==61){return A}B=r[B]}while(C<y&&B==-1);if(B==-1){break}A+=String.fromCharCode(((D&15)<<4)|((B&60)>>2));do{z=F.charCodeAt(C++)&255;if(z==61){return A}z=r[z]}while(C<y&&z==-1);if(z==-1){break}A+=String.fromCharCode(((B&3)<<6)|z)}return A}function u(B){var z,A,y,C;z="";y=B.length;for(A=0;A<y;A++){C=B.charCodeAt(A);if((C>=1)&&(C<=127)){z+=B.charAt(A)}else{if(C>2047){z+=String.fromCharCode(224|((C>>12)&15));z+=String.fromCharCode(128|((C>>6)&63));z+=String.fromCharCode(128|((C>>0)&63))}else{z+=String.fromCharCode(192|((C>>6)&31));z+=String.fromCharCode(128|((C>>0)&63))}}}return z}function l(D){var z,B,y,E;var C,A;z="";y=D.length;B=0;while(B<y){E=D.charCodeAt(B++);switch(E>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:z+=D.charAt(B-1);break;case 12:case 13:C=D.charCodeAt(B++);z+=String.fromCharCode(((E&31)<<6)|(C&63));break;case 14:C=D.charCodeAt(B++);A=D.charCodeAt(B++);z+=String.fromCharCode(((E&15)<<12)|((C&63)<<6)|((A&63)<<0));break}}return z}function j(y){return k(u(y))}function f(y){return l(t(y))}});
124
- /*! 20230105181553
124
+ /*! 20230727181553
125
125
  * Dynamsoft JavaScript Library
126
126
  * Product: Dynamsoft Web Twain
127
127
  * Web Site: https://www.dynamsoft.com
@@ -133,7 +133,7 @@ var Dynamsoft=self.Dynamsoft||{};Dynamsoft.DWT=Dynamsoft.DWT||{},Dynamsoft.aryAd
133
133
  * Version: 18.1
134
134
  *
135
135
  */
136
- var Dynamsoft=self.Dynamsoft||{};Dynamsoft.DWT=Dynamsoft.DWT||{},Dynamsoft.aryAddonReadyFun=Dynamsoft.aryAddonReadyFun||[],Dynamsoft.AddonReady=Dynamsoft.AddonReady||function(e){Dynamsoft.aryAddonReadyFun.push(e)},Dynamsoft.WebcamVerForActiveX="15.0.0.0625",Dynamsoft.WebcamVerInName="15.0.0.0625",function(){for(var e=[Dynamsoft.DWT],t=0;t<1;t++){var r=e[t];r.EnumDWT_VideoRotateMode={VRM_NONE:0,VRM_90_DEGREES_CLOCKWISE:1,VRM_180_DEGREES_CLOCKWISE:2,VRM_270_DEGREES_CLOCKWISE:3,VRM_FLIP_VERTICAL:4,VRM_FLIP_HORIZONTAL:5},r.EnumDWT_VideoProperty={VP_BRIGHTNESS:0,VP_CONTRAST:1,VP_HUE:2,VP_SATURATION:3,VP_SHARPNESS:4,VP_GAMMA:5,VP_COLORENABLE:6,VP_WHITEBALANCE:7,VP_BACKLIGHTCOMPENSATION:8,VP_GAIN:9},r.EnumDWT_CameraControlProperty={CCP_PAN:0,CCP_TILT:1,CCP_ROLL:2,CCP_ZOOM:3,CCP_EXPOSURE:4,CCP_IRIS:5,CCP_FOCUS:6}}}(),function(){Dynamsoft.Lib.WebcamErrors={InvalidParameter:function(e){e._errorCode=-10001,e._errorString="The parameter is invalid."},VideoNotPlayingWhenCapture:function(e){e._errorCode=-10002,e._errorString="To capture an image, the video must be playing."},VideoNotPlayingWhenGetURL:function(e){e._errorCode=-10003,e._errorString="To get the url for the current frame, the video must be playing."},Success:function(e){e._errorCode=0,e._errorString="Successful."}}}(),function(r){function t(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}t.prototype.GetCount=function(){return r.WebcamErrors.Success(this._stwain),this._Count-1},t.prototype.Get=function(e){var t=this;return t._resultlist.length-1<=e||e<0?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(t._stwain,"Get"),""):(r.WebcamErrors.Success(t._stwain),t._resultlist[e])},t.prototype.GetCurrent=function(){var e=this,t=e._resultlist.length;return 0==t?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,"GetCurrent"),""):(r.WebcamErrors.Success(e._stwain),e._resultlist[t-1])},r.NewWebcamValue=function(e){return new t(e)}}(Dynamsoft.Lib),function(t){function r(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}r.prototype.GetValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):(t.WebcamErrors.Success(e._stwain),e._resultlist[0].current)},r.prototype.GetIfAuto=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),!1):(t.WebcamErrors.Success(e._stwain),"true"==e._resultlist[0].auto)},t.NewWebcamSetting=function(e){return new r(e)}}(Dynamsoft.Lib),function(e){function t(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}t.prototype.GetMinValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):e._resultlist[0].min},t.prototype.GetMaxValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):e._resultlist[0].max},t.prototype.GetSteppingDelta=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),0):e._resultlist[0].step},t.prototype.GetDefaultValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),0):e._resultlist[0].defaultValue},t.prototype.GetIfAuto=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),!1):"true"==e._resultlist[0].auto},e.NewWebcamMoreSetting=function(e){return new t(e)}}(Dynamsoft.Lib),Dynamsoft.AddonReady(function(n,e){n.DynamicLoadAddonFuns&&n.DynamicLoadAddonFuns.push(function(r){r._innerSetWebcamValue=function(e){var t=n.NewWebcamValue(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t},r._innerSetWebcamSetting=function(e){var t=n.NewWebcamSetting(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t},r._innerSetWebcamMoreSetting=function(e){var t=n.NewWebcamMoreSetting(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t}}),n.Addon_Events.push("OnFrameCaptured"),n.Addon_Events.push("OnCaptureSuccess"),n.Addon_Events.push("OnCaptureError")}),Dynamsoft.AddonReady(function(l,e){l.product.bHTML5Edition&&l.DynamicLoadAddonFuns&&l.DynamicLoadAddonFuns.push(function(m){var e,d=l.html5.Funs,t=l.env.bMac?"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".dylib":l.env.bLinux?"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".so":m._b64bit?"DynamicWebcamx64_"+Dynamsoft.WebcamVerInName+".dll":"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".dll";if(!m._isMobileMode())try{m._innerSend("GetAddOnVersion",d.makeParams("webcam",t),!0,!1,!1).catch(function(){})}catch(e){}(e=m)._innerWebcamValueFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamValue(e)},e._innerWebcamSettingFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamSetting(e)},e._innerWebcamMoreSettingFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamMoreSetting(e)},e._OnCaptureSuccess=function(e){Dynamsoft.Lib.isFunction(this.__OnCaptureSuccess)&&this.__OnCaptureSuccess()},e._OnCaptureError=function(e){var t=e[1],e=e[2];Dynamsoft.Lib.isFunction(this.__OnCaptureError)&&this.__OnCaptureError(t,e)},e._OnFrameCaptured=function(e){var t,r=this,n=Dynamsoft.Lib;r.__videoPause||(t=(t=r.__videoQuality)||60,r.__videoDest&&r.__videoDest.UpdateVideoContainer(r.GetImageURL(-1,-1,-1,0,t))),n.isFunction(r.__OnFrameCaptured)&&r.__OnFrameCaptured(e)},e={Webcam:{IsModuleInstalled:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.IsModuleInstalled"):""!=e._innerFun("GetAddOnVersion",d.makeParams("webcam",t))},Download:function(e,t,r){var n=m;if(n._resetErr(),n._isMobileMode())return n._mobileNotSupport("Addon.Webcam.Download");Dynamsoft.Lib.cancelFrome=2;function o(){return Dynamsoft.Lib.isFunction(t)&&t(),!0}function i(){return Dynamsoft.Lib.isFunction(r)&&r(m._errorCode,m._errorString),!1}if(!l.License.checkProductKey(m,{Webcam:!0},!0))return i();if(this.IsModuleInstalled())return o();if(!e||""==e)return Dynamsoft.Lib.Errors.Webcam_InvalidRemoteFilename(n),i();if(d.isServerInvalid(n))return i(),!1;Dynamsoft.Lib.showProgress(n,"Download",!0);var a=!0;return n._OnPercentDone([0,-1,"Downloading Webcam Module...","http"]),Dynamsoft.Lib.isFunction(t)||(a=!1),d.loadHttpBlob(n,"get",e,a,function(e){n._OnPercentDone([0,-1,"Loading..."]);n.__LoadImageFromBytesV1(e,100,"",0,a,o,i)},function(){Dynamsoft.Lib.closeProgress(n,"Download"),i()},function(e){var t=0===e.total?100:Math.round(100*e.loaded/e.total);[e.loaded," / ",e.total].join("");n._OnPercentDone([0,t,"","http"])})},GetSourceList:function(){var e,t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetSourceList"):l.License.checkProductKey(t,{Webcam:!0},!0)?(e=t._innerFunRaw("GetWebcamSourceList"),0==t.ErrorCode&&e.splice(e.length-1,1),e):[]},SelectSource:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SelectSource"):!!l.License.checkProductKey(t,{Webcam:!0},!0)&&t._innerFun("SelectWebcam",d.makeParams(e))},CloseSource:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.CloseSource"):(this._clear(),e._innerFun("StopCapture"))},GetFramePartURL:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFramePartURL"):this._isPlaying()?e.GetImageURL(-1,-1,-1,!0,e.__videoQuality):(l.WebcamErrors.VideoNotPlayingWhenGetURL(e),"")},GetFrameURL:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFrameURL"):this._isPlaying()?e.GetImageURL(-1,-1,-1,0,e.__videoQuality):(l.WebcamErrors.VideoNotPlayingWhenGetURL(e),"")},PlayVideo:function(e,t,r,n,o){var i,a,u,s,c=m;return c._resetErr(),c._isMobileMode()?c._mobileNotSupport("Addon.Webcam.PlayVideo"):(i=Dynamsoft.Lib,a=60,u=this,s=function(){return u._clear(),Dynamsoft.Lib.isFunction(o)&&o(m._errorCode,m._errorString),!1},e?l.License.checkProductKey(m,{Webcam:!0},!0)?(c.__videoDest=e,c.__videoDest.ShowVideoContainer(!0),i.isFunction(r)&&(m.__OnFrameCaptured=r),m.__videoPause?(m.__videoPause=!1,l.isFunction(n)&&n()):(m.__videoPause=!1,m.__videoQuality=t?a=(a=+t)<1?60:a:a,m._innerSend("PlayVideo",d.makeParams(!0),!0,n,s)),!0):s():(Dynamsoft.Lib.Errors.ParameterCannotEmpty(m),s()))},PauseVideo:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.PauseVideo"):(this._isPlaying()&&(e.__videoPause=!0),!0)},_clear:function(){var e=m;Dynamsoft.Lib;e.__videoPause=!1,e.__OnFrameCaptured=!1,e.__videoQuality=60,e.__videoDest&&e.__videoDest.ShowVideoContainer(!1),e.__videoDest=!1},_isPlaying:function(){return m.GetIfShowVideoContainer()},StopVideo:function(){var e=m;if(e._resetErr(),e._isMobileMode())return e._mobileNotSupport("Addon.Webcam.StopVideo");this._clear();var t=e._innerFun("PlayVideo",d.makeParams(!1,0));return e._innerFun("StopCapture"),t},CaptureImage:function(e,t){var r,n,o=m;return o._resetErr(),o._isMobileMode()?(o._mobileNotSupport("Addon.Webcam.CaptureImage"),l.isFunction(t)&&t(o._errorCode,o._errorString),!1):l.License.checkProductKey(o,{Webcam:!0},!0)?(r="CaptureImage",n=function(){d.hideMask(r),l.isFunction(t)&&t(o._errorCode,o._errorString)},d.showMask(r),o.__OnCaptureError=n,o._innerSend(r,d.makeParams(!1),!0,function(){d.hideMask(),0==o.ErrorCode?(d.hideMask(r),l.isFunction(e)&&setTimeout(e,0),l.License.isLTS()&&Dynamsoft.DWT.lcvrf(m)):n(o.ErrorCode,o.ErrorString)},n),!0):(l.isFunction(t)&&t(o._errorCode,o._errorString),!1)},GetMediaType:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetMediaType"):e._innerWebcamValueFunction("GetMediaType")},SetMediaType:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetMediaType"):l.isString(e)?t._innerFun("SetMediaType",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetResolution:function(){var e=m;if(e._resetErr(),e._isMobileMode())return e._mobileNotSupport("Addon.Webcam.GetResolution");e=e._innerWebcamValueFunction("GetResolution");if(e&&e._resultlist){var t,r,n=e._resultlist,o=[],i=[];for(""==(r=0<n.length?n[n.length-1]:r)&&0<n.length&&(r=n[0]),t=0;t<n.length-1;t++){for(var a,u=(a=n[t]).toLowerCase().split("x"),s=(d=c=s=void 0,{value:a,p1:parseInt(u[0]),p2:parseInt(u[1])}),c=o,d=c.length-1;0<=d&&c[d].p1>=s.p1&&!(c[d].p1==s.p1&&c[d].p2<s.p2);)c[d+1]=c[d],d--;c[d+1]=s}for(t=0;t<o.length;t++)a=o[t].value,i.push(a);r&&i.push(r),e._resultlist=i,i=o=null}return e},SetResolution:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetResolution"):l.isNumber(e)||l.isString(e)?t._innerFun("SetResolution",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetFrameRate:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFrameRate"):e._innerWebcamValueFunction("GetFrameRate")},SetFrameRate:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetFrameRate"):l.isNumber(e)?m._innerFun("SetFrameRate",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetVideoPropertySetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetVideoPropertySetting"):t._innerWebcamSettingFunction("GetWebcamVideoPropertySetting",d.makeParams(e))},GetVideoPropertyMoreSetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetVideoPropertyMoreSetting"):t._innerWebcamMoreSettingFunction("GetWebcamVideoPropertyMoreSetting",d.makeParams(e))},SetVideoPropertySetting:function(e,t,r){var n=m;return n._resetErr(),n._isMobileMode()?n._mobileNotSupport("Addon.Webcam.SetVideoPropertySetting"):n._innerFun("SetWebcamVideoPropertySetting",d.makeParams(e,t,r))},SetVideoRotateMode:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetVideoRotateMode"):t._innerFun("SetVideoRotateMode",d.makeParams(e))},GetCameraControlPropertySetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetCameraControlPropertySetting"):t._innerWebcamSettingFunction("GetWebcamCameraControlSetting",d.makeParams(e))},GetCameraControlPropertyMoreSetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetCameraControlPropertyMoreSetting"):t._innerWebcamMoreSettingFunction("GetWebcamCameraControlMoreSetting",d.makeParams(e))},SetCameraControlPropertySetting:function(e,t,r){var n=m;return n._resetErr(),n._isMobileMode()?n._mobileNotSupport("Addon.Webcam.SetCameraControlPropertySetting"):n._innerFun("SetWebcamCameraControlPropertySetting",d.makeParams(e,t,r))}}},m.__addon=m.__addon||{},l.mix(m.__addon,e)})}),Dynamsoft.AddonReady(function(_,e){var r;_.product.bActiveXEdition&&_.DynamicLoadAddonFuns&&_.DynamicLoadAddonFuns.push(function(m){var l,e,t;if(!m.getSWebTwain()||!m.getSWebTwain().Addon)return!1;Dynamsoft.navInfoSync.bWin&&(t=!Dynamsoft.navInfo.bOSx64||Dynamsoft.navInfo.bWOW64,r=t?"DynamicWebcam_"+Dynamsoft.WebcamVerForActiveX+".dll":"DynamicWebcamx64_"+Dynamsoft.WebcamVerForActiveX+".dll"),l=m.getSWebTwain();try{l.GetAddOnVersion("webcam",r)}catch(e){}(t=m)._innerRead=function(e){var t;try{t=Dynamsoft.Lib.parse(e)}catch(e){}return t.result},t._innerWebcamValueFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamValue(e)},t._innerWebcamSettingFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamSetting(e)},t._innerWebcamMoreSettingFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamMoreSetting(e)},e={Webcam:{IsModuleInstalled:function(){var e=l.GetAddOnVersion("webcam",r);return _.setErrorString(m),""!=e},Download:function(e,t,r){function n(){return Dynamsoft.Lib.isFunction(t)&&t(),!0}function o(){return Dynamsoft.Lib.isFunction(r)&&r(m._errorCode,m._errorString),!1}return _.License.checkProductKey(m,{Webcam:!0},!0)?this.IsModuleInstalled()?n():e&&""!=e?(e=l.DownloadAddon(e),_.wrapperRet(m,e,n,o)):(Dynamsoft.Lib.Errors.Webcam_InvalidRemoteFilename(m),o()):o()},GetSourceList:function(){var e,t;return _.License.checkProductKey(m,{Webcam:!0},!0)?(e=l.GetWebcamSourceList(),t=[],_.setErrorString(m),0==m._errorCode&&(t=m._innerRead(e))&&1<t.length&&t.splice(t.length-1,1),t):[]},SelectSource:function(e){return!!_.License.checkProductKey(m,{Webcam:!0},!0)&&(e=l.SelectWebcam(e),_.setErrorString(m),e)},CloseSource:function(){m._playVideoDWT=null;var e=l.StopCapture();return _.setErrorString(m),e},GetFramePartURL:function(){var e;return this._isPlaying()?(e=l.GetDIB(-1),_.setErrorString(m),e):(_.WebcamErrors.VideoNotPlayingWhenGetURL(m),"")},GetFrameURL:function(){return""},PlayVideo:function(e,t,r,n,o){function i(){return m._playVideoDWT=null,Dynamsoft.Lib.isFunction(o)&&o(m.ErrorCode,m.ErrorString),!1}var a;return e&&e.getSWebTwain()?_.License.checkProductKey(m,{Webcam:!0},!0)?(a=e.getSWebTwain().CurrentHWND)?(m._playVideoDWT=e,setTimeout(function(){var e=l.RunWebcamCmd("PlayVideo",a,null,null,r);_.wrapperRet(m,e,n,i)},0),!0):(_.WebcamErrors.InvalidParameter(m),i()):i():(Dynamsoft.Lib.WebcamErrors.InvalidParameter(m),i())},PauseVideo:function(){return!0},StopVideo:function(){m._playVideoDWT=null;var e=l.RunWebcamCmd("StopVideo",0,null,null,null);return _.setErrorString(m),l.StopCapture(),e},CaptureImage:function(e,t){function r(){return Dynamsoft.Lib.isFunction(t)&&t(m.ErrorCode,m.ErrorString),!1}var n;return _.License.checkProductKey(m,{Webcam:!0},!0)?(n=l.RunWebcamCmd("Capture",0,function(){_.isFunction(e)&&setTimeout(e,0),_.License.isLTS()&&Dynamsoft.DWT.lcvrf(m)},r,null),_.setErrorString(m),n):r()},GetMediaType:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetMediaType());return _.setErrorString(m),e},SetMediaType:function(e){return _.isString(e)?(e=l.SetMediaType(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetResolution:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetResolution());if(_.setErrorString(m),e&&e._resultlist){var t,r,n=e._resultlist,o=[],i=[];for(0<n.length&&(r=n[n.length-1]),t=0;t<n.length-1;t++){for(var a,u=(a=n[t]).toLowerCase().split("x"),s=(d=c=s=void 0,{value:a,p1:parseInt(u[0]),p2:parseInt(u[1])}),c=o,d=c.length-1;0<=d&&c[d].p1>=s.p1&&!(c[d].p1==s.p1&&c[d].p2<s.p2);)c[d+1]=c[d],d--;c[d+1]=s}for(t=0;t<o.length;t++)a=o[t].value,i.push(a);r&&i.push(r),e._resultlist=i,i=o=null}return e},SetResolution:function(e){return _.isNumber(e)||_.isString(e)?(e=l.SetResolution(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetFrameRate:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetFrameRate());return _.setErrorString(m),e},SetFrameRate:function(e){return _.isNumber(e)?(e=l.SetFrameRate(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetVideoPropertySetting:function(e){e=l.GetWebcamVideoPropertySetting(e);return _.setErrorString(m),m._innerWebcamSettingFunctionPlugin(e)},GetVideoPropertyMoreSetting:function(e){e=l.GetWebcamVideoPropertyMoreSetting(e);return _.setErrorString(m),m._innerWebcamMoreSettingFunctionPlugin(e)},SetVideoPropertySetting:function(e,t,r){e=l.SetWebcamVideoPropertySetting(e,t,r);return _.setErrorString(m),e},SetVideoRotateMode:function(e){e=l.SetVideoRotateMode(e);return _.setErrorString(m),e},GetCameraControlPropertySetting:function(e){e=l.GetWebcamCameraControlSetting(e);return _.setErrorString(m),m._innerWebcamSettingFunctionPlugin(e)},GetCameraControlPropertyMoreSetting:function(e){e=l.GetWebcamCameraControlMoreSetting(e);return _.setErrorString(m),m._innerWebcamMoreSettingFunctionPlugin(e)},SetCameraControlPropertySetting:function(e,t,r){e=l.SetWebcamCameraControlPropertySetting(e,t,r);return _.setErrorString(m),e},_isPlaying:function(){return!!m._playVideoDWT}}},m.Addon=m.Addon||{},_.mix(m.Addon,e)})});
136
+ var Dynamsoft=self.Dynamsoft||{};Dynamsoft.DWT=Dynamsoft.DWT||{},Dynamsoft.aryAddonReadyFun=Dynamsoft.aryAddonReadyFun||[],Dynamsoft.AddonReady=Dynamsoft.AddonReady||function(e){Dynamsoft.aryAddonReadyFun.push(e)},Dynamsoft.WebcamVerForActiveX="15.0.0.0625",Dynamsoft.WebcamVerInName="15.0.0.0625",function(){for(var e=[Dynamsoft.DWT],t=0;t<1;t++){var r=e[t];r.EnumDWT_VideoRotateMode={VRM_NONE:0,VRM_90_DEGREES_CLOCKWISE:1,VRM_180_DEGREES_CLOCKWISE:2,VRM_270_DEGREES_CLOCKWISE:3,VRM_FLIP_VERTICAL:4,VRM_FLIP_HORIZONTAL:5},r.EnumDWT_VideoProperty={VP_BRIGHTNESS:0,VP_CONTRAST:1,VP_HUE:2,VP_SATURATION:3,VP_SHARPNESS:4,VP_GAMMA:5,VP_COLORENABLE:6,VP_WHITEBALANCE:7,VP_BACKLIGHTCOMPENSATION:8,VP_GAIN:9},r.EnumDWT_CameraControlProperty={CCP_PAN:0,CCP_TILT:1,CCP_ROLL:2,CCP_ZOOM:3,CCP_EXPOSURE:4,CCP_IRIS:5,CCP_FOCUS:6}}}(),function(){Dynamsoft.Lib.WebcamErrors={InvalidParameter:function(e){e._errorCode=-10001,e._errorString="The parameter is invalid."},VideoNotPlayingWhenCapture:function(e){e._errorCode=-10002,e._errorString="To capture an image, the video must be playing."},VideoNotPlayingWhenGetURL:function(e){e._errorCode=-10003,e._errorString="To get the url for the current frame, the video must be playing."},Success:function(e){e._errorCode=0,e._errorString="Successful."}}}(),function(r){function t(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}t.prototype.GetCount=function(){return r.WebcamErrors.Success(this._stwain),this._Count-1},t.prototype.Get=function(e){var t=this;return t._resultlist.length-1<=e||e<0?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(t._stwain,"Get"),""):(r.WebcamErrors.Success(t._stwain),t._resultlist[e])},t.prototype.GetCurrent=function(){var e=this,t=e._resultlist.length;return 0==t?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,"GetCurrent"),""):(r.WebcamErrors.Success(e._stwain),e._resultlist[t-1])},r.NewWebcamValue=function(e){return new t(e)}}(Dynamsoft.Lib),function(t){function r(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}r.prototype.GetValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):(t.WebcamErrors.Success(e._stwain),e._resultlist[0].current)},r.prototype.GetIfAuto=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),!1):(t.WebcamErrors.Success(e._stwain),"true"==e._resultlist[0].auto)},t.NewWebcamSetting=function(e){return new r(e)}}(Dynamsoft.Lib),function(e){function t(e){var t=this;t._Count=0,t._resultlist=[],t._stwain=e}t.prototype.GetMinValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):e._resultlist[0].min},t.prototype.GetMaxValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),""):e._resultlist[0].max},t.prototype.GetSteppingDelta=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),0):e._resultlist[0].step},t.prototype.GetDefaultValue=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),0):e._resultlist[0].defaultValue},t.prototype.GetIfAuto=function(){var e=this;return 0==e._resultlist.length?(Dynamsoft.Lib.Errors.Webcam_InvalidIndex(e._stwain,""),!1):"true"==e._resultlist[0].auto},e.NewWebcamMoreSetting=function(e){return new t(e)}}(Dynamsoft.Lib),Dynamsoft.AddonReady(function(n,e){n.DynamicLoadAddonFuns&&n.DynamicLoadAddonFuns.push(function(r){r._innerSetWebcamValue=function(e){var t=n.NewWebcamValue(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t},r._innerSetWebcamSetting=function(e){var t=n.NewWebcamSetting(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t},r._innerSetWebcamMoreSetting=function(e){var t=n.NewWebcamMoreSetting(r);return e&&n.isArray(e)&&(t._resultlist=e,t._Count=e.length),t}}),n.Addon_Events.push("OnFrameCaptured"),n.Addon_Events.push("OnCaptureSuccess"),n.Addon_Events.push("OnCaptureError")}),Dynamsoft.AddonReady(function(l,e){l.product.bHTML5Edition&&l.DynamicLoadAddonFuns&&l.DynamicLoadAddonFuns.push(function(m){var e,d=l.html5.Funs,t=l.env.bMac?"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".dylib":l.env.bLinux?"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".so":m._b64bit?"DynamicWebcamx64_"+Dynamsoft.WebcamVerInName+".dll":"DynamicWebcam_"+Dynamsoft.WebcamVerInName+".dll";if(!m._isMobileMode())try{m._innerFun("GetAddOnVersion",d.makeParams("webcam",t))}catch(e){}(e=m)._innerWebcamValueFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamValue(e)},e._innerWebcamSettingFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamSetting(e)},e._innerWebcamMoreSettingFunction=function(e,t){e=this._innerFunRaw(e,t,!1,!1);return this._innerSetWebcamMoreSetting(e)},e._OnCaptureSuccess=function(e){Dynamsoft.Lib.isFunction(this.__OnCaptureSuccess)&&this.__OnCaptureSuccess()},e._OnCaptureError=function(e){var t=e[1],e=e[2];Dynamsoft.Lib.isFunction(this.__OnCaptureError)&&this.__OnCaptureError(t,e)},e._OnFrameCaptured=function(e){var t,r=this,n=Dynamsoft.Lib;r.__videoPause||(t=(t=r.__videoQuality)||60,r.__videoDest&&r.__videoDest.UpdateVideoContainer(r.GetImageURL(-1,-1,-1,0,t))),n.isFunction(r.__OnFrameCaptured)&&r.__OnFrameCaptured(e)},e={Webcam:{IsModuleInstalled:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.IsModuleInstalled"):""!=e._innerFun("GetAddOnVersion",d.makeParams("webcam",t))},Download:function(e,t,r){var n=m;if(n._resetErr(),n._isMobileMode())return n._mobileNotSupport("Addon.Webcam.Download");Dynamsoft.Lib.cancelFrome=2;function o(){return Dynamsoft.Lib.isFunction(t)&&t(),!0}function i(){return Dynamsoft.Lib.isFunction(r)&&r(m._errorCode,m._errorString),!1}if(!l.License.checkProductKey(m,{Webcam:!0},!0))return i();if(this.IsModuleInstalled())return o();if(!e||""==e)return Dynamsoft.Lib.Errors.Webcam_InvalidRemoteFilename(n),i();if(d.isServerInvalid(n))return i(),!1;Dynamsoft.Lib.showProgress(n,"Download",!0);var a=!0;return n._OnPercentDone([0,-1,"Downloading Webcam Module...","http"]),Dynamsoft.Lib.isFunction(t)||(a=!1),d.loadHttpBlob(n,"get",e,a,function(e){n._OnPercentDone([0,-1,"Loading..."]);n.__LoadImageFromBytesV1(e,100,"",0,a,o,i)},function(){Dynamsoft.Lib.closeProgress(n,"Download"),i()},function(e){var t=0===e.total?100:Math.round(100*e.loaded/e.total);[e.loaded," / ",e.total].join("");n._OnPercentDone([0,t,"","http"])})},GetSourceList:function(){var e,t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetSourceList"):l.License.checkProductKey(t,{Webcam:!0},!0)?(e=t._innerFunRaw("GetWebcamSourceList"),0==t.ErrorCode&&e.splice(e.length-1,1),e):[]},SelectSource:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SelectSource"):!!l.License.checkProductKey(t,{Webcam:!0},!0)&&t._innerFun("SelectWebcam",d.makeParams(e))},CloseSource:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.CloseSource"):(this._clear(),e._innerFun("StopCapture"))},GetFramePartURL:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFramePartURL"):this._isPlaying()?e.GetImageURL(-1,-1,-1,!0,e.__videoQuality):(l.WebcamErrors.VideoNotPlayingWhenGetURL(e),"")},GetFrameURL:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFrameURL"):this._isPlaying()?e.GetImageURL(-1,-1,-1,0,e.__videoQuality):(l.WebcamErrors.VideoNotPlayingWhenGetURL(e),"")},PlayVideo:function(e,t,r,n,o){var i,a,u,s,c=m;return c._resetErr(),c._isMobileMode()?c._mobileNotSupport("Addon.Webcam.PlayVideo"):(i=Dynamsoft.Lib,a=60,u=this,s=function(){return u._clear(),Dynamsoft.Lib.isFunction(o)&&o(m._errorCode,m._errorString),!1},e?l.License.checkProductKey(m,{Webcam:!0},!0)?(c.__videoDest=e,c.__videoDest.ShowVideoContainer(!0),i.isFunction(r)&&(m.__OnFrameCaptured=r),m.__videoPause?(m.__videoPause=!1,l.isFunction(n)&&n()):(m.__videoPause=!1,m.__videoQuality=t?a=(a=+t)<1?60:a:a,m._innerSend("PlayVideo",d.makeParams(!0),!0,n,s)),!0):s():(Dynamsoft.Lib.Errors.ParameterCannotEmpty(m),s()))},PauseVideo:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.PauseVideo"):(this._isPlaying()&&(e.__videoPause=!0),!0)},_clear:function(){var e=m;Dynamsoft.Lib;e.__videoPause=!1,e.__OnFrameCaptured=!1,e.__videoQuality=60,e.__videoDest&&e.__videoDest.ShowVideoContainer(!1),e.__videoDest=!1},_isPlaying:function(){return m.GetIfShowVideoContainer()},StopVideo:function(){var e=m;if(e._resetErr(),e._isMobileMode())return e._mobileNotSupport("Addon.Webcam.StopVideo");this._clear();var t=e._innerFun("PlayVideo",d.makeParams(!1,0));return e._innerFun("StopCapture"),t},CaptureImage:function(e,t){var r,n,o=m;return o._resetErr(),o._isMobileMode()?(o._mobileNotSupport("Addon.Webcam.CaptureImage"),l.isFunction(t)&&t(o._errorCode,o._errorString),!1):l.License.checkProductKey(o,{Webcam:!0},!0)?(r="CaptureImage",n=function(){d.hideMask(r),l.isFunction(t)&&t(o._errorCode,o._errorString)},d.showMask(r),o.__OnCaptureError=n,o._innerSend(r,d.makeParams(!1),!0,function(){d.hideMask(),0==o.ErrorCode?(d.hideMask(r),l.isFunction(e)&&setTimeout(e,0),l.License.isLTS()&&Dynamsoft.DWT.lcvrf(m)):n(o.ErrorCode,o.ErrorString)},n),!0):(l.isFunction(t)&&t(o._errorCode,o._errorString),!1)},GetMediaType:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetMediaType"):e._innerWebcamValueFunction("GetMediaType")},SetMediaType:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetMediaType"):l.isString(e)?t._innerFun("SetMediaType",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetResolution:function(){var e=m;if(e._resetErr(),e._isMobileMode())return e._mobileNotSupport("Addon.Webcam.GetResolution");e=e._innerWebcamValueFunction("GetResolution");if(e&&e._resultlist){var t,r,n=e._resultlist,o=[],i=[];for(""==(r=0<n.length?n[n.length-1]:r)&&0<n.length&&(r=n[0]),t=0;t<n.length-1;t++){for(var a,u=(a=n[t]).toLowerCase().split("x"),s=(d=c=s=void 0,{value:a,p1:parseInt(u[0]),p2:parseInt(u[1])}),c=o,d=c.length-1;0<=d&&c[d].p1>=s.p1&&!(c[d].p1==s.p1&&c[d].p2<s.p2);)c[d+1]=c[d],d--;c[d+1]=s}for(t=0;t<o.length;t++)a=o[t].value,i.push(a);r&&i.push(r),e._resultlist=i,i=o=null}return e},SetResolution:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetResolution"):l.isNumber(e)||l.isString(e)?t._innerFun("SetResolution",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetFrameRate:function(){var e=m;return e._resetErr(),e._isMobileMode()?e._mobileNotSupport("Addon.Webcam.GetFrameRate"):e._innerWebcamValueFunction("GetFrameRate")},SetFrameRate:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetFrameRate"):l.isNumber(e)?m._innerFun("SetFrameRate",d.makeParams(e)):(l.Errors.InvalidValue(t),!1)},GetVideoPropertySetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetVideoPropertySetting"):t._innerWebcamSettingFunction("GetWebcamVideoPropertySetting",d.makeParams(e))},GetVideoPropertyMoreSetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetVideoPropertyMoreSetting"):t._innerWebcamMoreSettingFunction("GetWebcamVideoPropertyMoreSetting",d.makeParams(e))},SetVideoPropertySetting:function(e,t,r){var n=m;return n._resetErr(),n._isMobileMode()?n._mobileNotSupport("Addon.Webcam.SetVideoPropertySetting"):n._innerFun("SetWebcamVideoPropertySetting",d.makeParams(e,t,r))},SetVideoRotateMode:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.SetVideoRotateMode"):t._innerFun("SetVideoRotateMode",d.makeParams(e))},GetCameraControlPropertySetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetCameraControlPropertySetting"):t._innerWebcamSettingFunction("GetWebcamCameraControlSetting",d.makeParams(e))},GetCameraControlPropertyMoreSetting:function(e){var t=m;return t._resetErr(),t._isMobileMode()?t._mobileNotSupport("Addon.Webcam.GetCameraControlPropertyMoreSetting"):t._innerWebcamMoreSettingFunction("GetWebcamCameraControlMoreSetting",d.makeParams(e))},SetCameraControlPropertySetting:function(e,t,r){var n=m;return n._resetErr(),n._isMobileMode()?n._mobileNotSupport("Addon.Webcam.SetCameraControlPropertySetting"):n._innerFun("SetWebcamCameraControlPropertySetting",d.makeParams(e,t,r))}}},m.__addon=m.__addon||{},l.mix(m.__addon,e)})}),Dynamsoft.AddonReady(function(_,e){var r;_.product.bActiveXEdition&&_.DynamicLoadAddonFuns&&_.DynamicLoadAddonFuns.push(function(m){var l,e,t;if(!m.getSWebTwain()||!m.getSWebTwain().Addon)return!1;Dynamsoft.navInfoSync.bWin&&(t=!Dynamsoft.navInfo.bOSx64||Dynamsoft.navInfo.bWOW64,r=t?"DynamicWebcam_"+Dynamsoft.WebcamVerForActiveX+".dll":"DynamicWebcamx64_"+Dynamsoft.WebcamVerForActiveX+".dll"),l=m.getSWebTwain();try{l.GetAddOnVersion("webcam",r)}catch(e){}(t=m)._innerRead=function(e){var t;try{t=Dynamsoft.Lib.parse(e)}catch(e){}return t.result},t._innerWebcamValueFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamValue(e)},t._innerWebcamSettingFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamSetting(e)},t._innerWebcamMoreSettingFunctionPlugin=function(e){e=this._innerRead(e);return this._innerSetWebcamMoreSetting(e)},e={Webcam:{IsModuleInstalled:function(){var e=l.GetAddOnVersion("webcam",r);return _.setErrorString(m),""!=e},Download:function(e,t,r){function n(){return Dynamsoft.Lib.isFunction(t)&&t(),!0}function o(){return Dynamsoft.Lib.isFunction(r)&&r(m._errorCode,m._errorString),!1}return _.License.checkProductKey(m,{Webcam:!0},!0)?this.IsModuleInstalled()?n():e&&""!=e?(e=l.DownloadAddon(e),_.wrapperRet(m,e,n,o)):(Dynamsoft.Lib.Errors.Webcam_InvalidRemoteFilename(m),o()):o()},GetSourceList:function(){var e,t;return _.License.checkProductKey(m,{Webcam:!0},!0)?(e=l.GetWebcamSourceList(),t=[],_.setErrorString(m),0==m._errorCode&&(t=m._innerRead(e))&&1<t.length&&t.splice(t.length-1,1),t):[]},SelectSource:function(e){return!!_.License.checkProductKey(m,{Webcam:!0},!0)&&(e=l.SelectWebcam(e),_.setErrorString(m),e)},CloseSource:function(){m._playVideoDWT=null;var e=l.StopCapture();return _.setErrorString(m),e},GetFramePartURL:function(){var e;return this._isPlaying()?(e=l.GetDIB(-1),_.setErrorString(m),e):(_.WebcamErrors.VideoNotPlayingWhenGetURL(m),"")},GetFrameURL:function(){return""},PlayVideo:function(e,t,r,n,o){function i(){return m._playVideoDWT=null,Dynamsoft.Lib.isFunction(o)&&o(m.ErrorCode,m.ErrorString),!1}var a;return e&&e.getSWebTwain()?_.License.checkProductKey(m,{Webcam:!0},!0)?(a=e.getSWebTwain().CurrentHWND)?(m._playVideoDWT=e,setTimeout(function(){var e=l.RunWebcamCmd("PlayVideo",a,null,null,r);_.wrapperRet(m,e,n,i)},0),!0):(_.WebcamErrors.InvalidParameter(m),i()):i():(Dynamsoft.Lib.WebcamErrors.InvalidParameter(m),i())},PauseVideo:function(){return!0},StopVideo:function(){m._playVideoDWT=null;var e=l.RunWebcamCmd("StopVideo",0,null,null,null);return _.setErrorString(m),l.StopCapture(),e},CaptureImage:function(e,t){function r(){return Dynamsoft.Lib.isFunction(t)&&t(m.ErrorCode,m.ErrorString),!1}var n;return _.License.checkProductKey(m,{Webcam:!0},!0)?(n=l.RunWebcamCmd("Capture",0,function(){_.isFunction(e)&&setTimeout(e,0),_.License.isLTS()&&Dynamsoft.DWT.lcvrf(m)},r,null),_.setErrorString(m),n):r()},GetMediaType:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetMediaType());return _.setErrorString(m),e},SetMediaType:function(e){return _.isString(e)?(e=l.SetMediaType(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetResolution:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetResolution());if(_.setErrorString(m),e&&e._resultlist){var t,r,n=e._resultlist,o=[],i=[];for(0<n.length&&(r=n[n.length-1]),t=0;t<n.length-1;t++){for(var a,u=(a=n[t]).toLowerCase().split("x"),s=(d=c=s=void 0,{value:a,p1:parseInt(u[0]),p2:parseInt(u[1])}),c=o,d=c.length-1;0<=d&&c[d].p1>=s.p1&&!(c[d].p1==s.p1&&c[d].p2<s.p2);)c[d+1]=c[d],d--;c[d+1]=s}for(t=0;t<o.length;t++)a=o[t].value,i.push(a);r&&i.push(r),e._resultlist=i,i=o=null}return e},SetResolution:function(e){return _.isNumber(e)||_.isString(e)?(e=l.SetResolution(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetFrameRate:function(){var e=m._innerWebcamValueFunctionPlugin(l.GetFrameRate());return _.setErrorString(m),e},SetFrameRate:function(e){return _.isNumber(e)?(e=l.SetFrameRate(e),_.setErrorString(m),e):(_.Errors.InvalidValue(m),!1)},GetVideoPropertySetting:function(e){e=l.GetWebcamVideoPropertySetting(e);return _.setErrorString(m),m._innerWebcamSettingFunctionPlugin(e)},GetVideoPropertyMoreSetting:function(e){e=l.GetWebcamVideoPropertyMoreSetting(e);return _.setErrorString(m),m._innerWebcamMoreSettingFunctionPlugin(e)},SetVideoPropertySetting:function(e,t,r){e=l.SetWebcamVideoPropertySetting(e,t,r);return _.setErrorString(m),e},SetVideoRotateMode:function(e){e=l.SetVideoRotateMode(e);return _.setErrorString(m),e},GetCameraControlPropertySetting:function(e){e=l.GetWebcamCameraControlSetting(e);return _.setErrorString(m),m._innerWebcamSettingFunctionPlugin(e)},GetCameraControlPropertyMoreSetting:function(e){e=l.GetWebcamCameraControlMoreSetting(e);return _.setErrorString(m),m._innerWebcamMoreSettingFunctionPlugin(e)},SetCameraControlPropertySetting:function(e,t,r){e=l.SetWebcamCameraControlPropertySetting(e,t,r);return _.setErrorString(m),e},_isPlaying:function(){return!!m._playVideoDWT}}},m.Addon=m.Addon||{},_.mix(m.Addon,e)})});
137
137
  /*! 20230105181553
138
138
  * Dynamsoft JavaScript Library
139
139
  * Product: Dynamsoft Web Twain
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dwt",
3
- "version": "18.1.2-beta",
3
+ "version": "18.1.3-beta",
4
4
  "author": {
5
5
  "name": "Dynamsoft",
6
6
  "url": "https://www.dynamsoft.com"