| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-09cf4572"],{"107c":function(e,t,n){var r=n("d039"),o=n("da84"),i=o.RegExp;e.exports=r((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},1276:function(e,t,n){"use strict";var r=n("2ba4"),o=n("c65b"),i=n("e330"),a=n("d784"),c=n("44e7"),s=n("825a"),l=n("1d80"),u=n("4840"),f=n("8aa5"),p=n("50c4"),h=n("577e"),d=n("dc4a"),v=n("4dae"),g=n("14c3"),m=n("9263"),x=n("9f7f"),y=n("d039"),w=x.UNSUPPORTED_Y,b=4294967295,S=Math.min,E=[].push,_=i(/./.exec),k=i(E),I=i("".slice),L=!y((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));a("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=h(l(this)),a=void 0===n?b:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!c(e))return o(t,i,e,a);var s,u,f,p=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,x=new RegExp(e.source,d+"g");while(s=o(m,x,i)){if(u=x.lastIndex,u>g&&(k(p,I(i,g,s.index)),s.length>1&&s.index<i.length&&r(E,p,v(s,1)),f=s[0].length,g=u,p.length>=a))break;x.lastIndex===s.index&&x.lastIndex++}return g===i.length?!f&&_(x,"")||k(p,""):k(p,I(i,g)),p.length>a?v(p,0,a):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var r=l(this),a=void 0==t?void 0:d(t,e);return a?o(a,t,r,n):o(i,h(r),t,n)},function(e,r){var o=s(this),a=h(e),c=n(i,o,a,r,i!==t);if(c.done)return c.value;var l=u(o,RegExp),d=o.unicode,v=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),m=new l(w?"^(?:"+o.source+")":o,v),x=void 0===r?b:r>>>0;if(0===x)return[];if(0===a.length)return null===g(m,a)?[a]:[];var y=0,E=0,_=[];while(E<a.length){m.lastIndex=w?0:E;var L,R=g(m,w?I(a,E):a);if(null===R||(L=S(p(m.lastIndex+(w?E:0)),a.length))===y)E=f(a,E,d);else{if(k(_,I(a,y,E)),_.length===x)return _;for(var M=1;M<=R.length-1;M++)if(k(_,R[M]),_.length===x)return _;E=y=L}}return k(_,I(a,y)),_}]}),!L,w)},"14c3":function(e,t,n){var r=n("da84"),o=n("c65b"),i=n("825a"),a=n("1626"),c=n("c6b6"),s=n("9263"),l=r.TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var r=o(n,e,t);return null!==r&&i(r),r}if("RegExp"===c(e))return o(s,e,t);throw l("RegExp#exec called on incompatible receiver")}},"44e7":function(e,t,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),a=i("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},"4dae":function(e,t,n){var r=n("da84"),o=n("23cb"),i=n("07fa"),a=n("8418"),c=r.Array,s=Math.max;e.exports=function(e,t,n){for(var r=i(e),l=o(t,r),u=o(void 0===n?r:n,r),f=c(s(u-l,0)),p=0;l<u;l++,p++)a(f,p,e[l]);return f.length=p,f}},8418:function(e,t,n){"use strict";var r=n("a04b"),o=n("9bf2"),i=n("5c6c");e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},"8aa5":function(e,t,n){"use strict";var r=n("6547").charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},9263:function(e,t,n){"use strict";var r=n("c65b"),o=n("e330"),i=n("577e"),a=n("ad6d"),c=n("9f7f"),s=n("5692"),l=n("7c73"),u=n("69f3").get,f=n("fce3"),p=n("107c"),h=s("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,v=d,g=o("".charAt),m=o("".indexOf),x=o("".replace),y=o("".slice),w=function(){var e=/a/,t=/b*/g;return r(d,e,"a"),r(d,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),b=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1],E=w||S||b||f||p;E&&(v=function(e){var t,n,o,c,s,f,p,E=this,_=u(E),k=i(e),I=_.raw;if(I)return I.lastIndex=E.lastIndex,t=r(v,I,k),E.lastIndex=I.lastIndex,t;var L=_.groups,R=b&&E.sticky,M=r(a,E),O=E.source,C=0,j=k;if(R&&(M=x(M,"y",""),-1===m(M,"g")&&(M+="g"),j=y(k,E.lastIndex),E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==g(k,E.lastIndex-1))&&(O="(?: "+O+")",j=" "+j,C++),n=new RegExp("^(?:"+O+")",M)),S&&(n=new RegExp("^"+O+"$(?!\\s)",M)),w&&(o=E.lastIndex),c=r(d,R?n:E,j),R?c?(c.input=y(c.input,C),c[0]=y(c[0],C),c.index=E.lastIndex,E.lastIndex+=c[0].length):E.lastIndex=0:w&&c&&(E.lastIndex=E.global?c.index+c[0].length:o),S&&c&&c.length>1&&r(h,c[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(c[s]=void 0)})),c&&L)for(c.groups=f=l(null),s=0;s<L.length;s++)p=L[s],f[p[0]]=c[p[1]];return c}),e.exports=v},"96cf":function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",l="object"===typeof e,u=t.regeneratorRuntime;if(u)l&&(e.exports=u);else{u=t.regeneratorRuntime=l?e.exports:{},u.wrap=w;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",v={},g={};g[a]=function(){return this};var m=Object.getPrototypeOf,x=m&&m(m(j([])));x&&x!==r&&o.call(x,a)&&(g=x);var y=_.prototype=S.prototype=Object.create(g);E.prototype=y.constructor=_,_.constructor=E,_[s]=E.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(y),e},u.awrap=function(e){return{__await:e}},k(I.prototype),I.prototype[c]=function(){return this},u.AsyncIterator=I,u.async=function(e,t,n,r){var o=new I(w(e,t,n,r));return u.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(y),y[s]="Generator",y[a]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){while(t.length){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return c.type="throw",c.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(e,t,n,r){var o=t&&t.prototype instanceof S?t:S,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=L(e,n,a),i}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function S(){}function E(){}function _(){}function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function I(e){function t(n,r,i,a){var c=b(e[n],e,r);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"===typeof l&&o.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(l).then((function(e){s.value=e,i(s)}),a)}a(c.arg)}var n;function r(e,r){function o(){return new Promise((function(n,o){t(e,r,n,o)}))}return n=n?n.then(o,o):o()}this._invoke=r}function L(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return P()}n.method=o,n.arg=i;while(1){var a=n.delegate;if(a){var c=R(a,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=b(e,t,n);if("normal"===s.type){if(r=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}function R(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,R(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=b(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function M(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function j(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,i=function t(){while(++r<e.length)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},"983d":function(e,t,n){"use strict";n("daea")},"9f7f":function(e,t,n){var r=n("d039"),o=n("da84"),i=o.RegExp,a=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),c=a||r((function(){return!i("a","y").sticky})),s=a||r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:c,UNSUPPORTED_Y:a}},a15b:function(e,t,n){"use strict";var r=n("23e7"),o=n("e330"),i=n("44ad"),a=n("fc6a"),c=n("a640"),s=o([].join),l=i!=Object,u=c("join",",");r({target:"Array",proto:!0,forced:l||!u},{join:function(e){return s(a(this),void 0===e?",":e)}})},a358:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return s}));n("a15b"),n("ac1f"),n("1276");var r=n("cff8"),o=n.n(r),i=n("b775"),a={test:"controller.example.test",messageShow:"controller.example.messageShow",messageShowConfirm:"controller.example.messageShowConfirm",selectFolder:"controller.example.selectFolder",openDirectory:"controller.example.openDirectory",loadViewContent:"controller.example.loadViewContent",removeViewContent:"controller.example.removeViewContent",createWindow:"controller.example.createWindow",sendNotification:"controller.example.sendNotification",initPowerMonitor:"controller.example.initPowerMonitor",getScreen:"controller.example.getScreen",openSoftware:"controller.example.openSoftware",autoLaunch:"controller.example.autoLaunch",setTheme:"controller.example.setTheme",getTheme:"controller.example.getTheme",checkForUpdater:"controller.example.checkForUpdater",downloadApp:"controller.example.downloadApp",dbOperation:"controller.example.dbOperation",uploadFile:"controller.example.uploadFile",checkHttpServer:"controller.example.checkHttpServer",doHttpRequest:"controller.example.doHttpRequest",doSocketRequest:"controller.example.doSocketRequest",ipcInvokeMsg:"controller.example.ipcInvokeMsg",ipcSendSyncMsg:"controller.example.ipcSendSyncMsg",ipcSendMsg:"controller.example.ipcSendMsg",hello:"controller.example.hello"},c={appUpdater:"app.updater"},s=function(e,t){var n=o.a.get("httpServiceConfig"),r=n.server||"http://127.0.0.1:7071",a=e.split(".").join("/");return a=r+"/"+a,console.log("url:",a),Object(i["b"])({url:a,method:"post",data:t,params:{},timeout:6e4})}},a640:function(e,t,n){"use strict";var r=n("d039");e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},ac1f:function(e,t,n){"use strict";var r=n("23e7"),o=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(e,t,n){"use strict";var r=n("825a");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},d44a:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app-base-socket-ipc"}},[e._m(0),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.handleInvoke}},[e._v("发送 - 回调")]),e._v(" 结果:"+e._s(e.message1)+" ")],1),n("p"),n("a-space",[n("a-button",{on:{click:e.handleInvoke2}},[e._v("发送 - async/await")]),e._v(" 结果:"+e._s(e.message2)+" ")],1)],1),e._m(1),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.handleSendSync}},[e._v("同步消息")]),e._v(" 结果:"+e._s(e.message3)+" ")],1)],1),e._m(2),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.sendMsgStart}},[e._v("开始")]),n("a-button",{on:{click:e.sendMsgStop}},[e._v("结束")]),e._v(" 结果:"+e._s(e.messageString)+" ")],1)],1)])},o=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 1. 发送异步消息 ")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 2. 同步消息(不推荐,阻塞执行) ")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 3. 长消息: 服务端持续向前端页面发消息 ")])])}];n("d3b7");function i(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,s,"next",e)}function s(e){i(a,r,o,c,s,"throw",e)}c(void 0)}))}}n("96cf");var c=n("a358"),s={data:function(){return{messageString:"",message1:"",message2:"",message3:""}},mounted:function(){this.init()},methods:{init:function(){var e=this;this.$ipc.removeAllListeners(c["a"].ipcSendMsg),this.$ipc.on(c["a"].ipcSendMsg,(function(t,n){console.log("[ipcRenderer] [socketMsgStart] result:",n),e.messageString=n,t.sender.send(c["a"].hello,"electron-egg")}))},sendMsgStart:function(){var e={type:"start",content:"开始"};this.$ipc.send(c["a"].ipcSendMsg,e)},sendMsgStop:function(){var e={type:"end",content:""};this.$ipc.send(c["a"].ipcSendMsg,e)},handleInvoke:function(){var e=this;this.$ipcInvoke(c["a"].ipcInvokeMsg,"异步-回调").then((function(t){console.log("r:",t),e.message1=t}))},handleInvoke2:function(){var e=this;return a(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ipcInvoke(c["a"].ipcInvokeMsg,"异步");case 2:n=t.sent,console.log("msg:",n),e.message2=n;case 5:case"end":return t.stop()}}),t)})))()},handleSendSync:function(){var e=this.$ipcSendSync(c["a"].ipcSendSyncMsg,"同步");this.message3=e}}},l=s,u=(n("983d"),n("2877")),f=Object(u["a"])(l,r,o,!1,null,"6f328a9e",null);t["default"]=f.exports},d784:function(e,t,n){"use strict";n("ac1f");var r=n("e330"),o=n("6eeb"),i=n("9263"),a=n("d039"),c=n("b622"),s=n("9112"),l=c("species"),u=RegExp.prototype;e.exports=function(e,t,n,f){var p=c(e),h=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),d=h&&!a((function(){var t=!1,n=/a/;return"split"===e&&(n={},n.constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!h||!d||n){var v=r(/./[p]),g=t(p,""[e],(function(e,t,n,o,a){var c=r(e),s=t.exec;return s===i||s===u.exec?h&&!a?{done:!0,value:v(t,n,o)}:{done:!0,value:c(n,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(u,p,g[1])}f&&s(u[p],"sham",!0)}},daea:function(e,t,n){},fce3:function(e,t,n){var r=n("d039"),o=n("da84"),i=o.RegExp;e.exports=r((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))}}]);
- //# sourceMappingURL=chunk-09cf4572.d47a3d90.js.map
|