tauri/examples/api/public/build/bundle.js

26 lines
59 KiB
JavaScript
Raw Normal View History

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e)}function o(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(e,n,i){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function s(t,e){t.appendChild(e)}function c(t,e,n){t.insertBefore(e,n||null)}function a(t){t.parentNode.removeChild(t)}function l(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function h(){return f(" ")}function p(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function v(t){return function(e){return e.preventDefault(),t.call(this,e)}}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function g(t){return""===t?null:+t}function y(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e){t.value=null==e?"":e}function b(t,e,n,i){t.style.setProperty(e,n,i?"important":"")}function w(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e)return void(i.selected=!0)}}let x;function M(t){x=t}function k(){if(!x)throw new Error("Function called outside component initialization");return x}function $(t){k().$$.on_mount.push(t)}function C(t){k().$$.on_destroy.push(t)}const O=[],E=[],P=[],S=[],T=Promise.resolve();let z=!1;function j(t){P.push(t)}let A=!1;const W=new Set;function L(){if(!A){A=!0;do{for(let t=0;t<O.length;t+=1){const e=O[t];M(e),D(e.$$)}for(M(null),O.length=0;E.length;)E.pop()();for(let t=0;t<P.length;t+=1){const e=P[t];W.has(e)||(W.add(e),e())}P.length=0}while(O.length);for(;S.length;)S.pop()();z=!1,A=!1,W.clear()}}function D(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(j)}}const F=new Set;let R;function I(t,e){t&&t.i&&(F.delete(t),t.i(e))}function U(t,e,n,i){if(t&&t.o){if(F.has(t))return;F.add(t),R.c.push((()=>{F.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function K(t){t&&t.c()}function N(t,n,r,u){const{fragment:s,on_mount:c,on_destroy:a,after_update:l}=t.$$;s&&s.m(n,r),u||j((()=>{const n=c.map(e).filter(o);a?a.push(...n):i(n),t.$$.on_mount=[]})),l.forEach(j)}function q(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function B(t,e){-1===t.$$.dirty[0]&&(O.push(t),z||(z=!0,T.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function G(e,o,r,u,s,c,l=[-1]){const d=x;M(e);const f=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:n(),dirty:l,skip_bound:!1};let h=!1;if(f.ctx=r?r(e,o.props||{},((t,n,...i)=>{const o=i.length?i[0]:n;return f.ctx&&s(f.ctx[t],f.ctx[t]=o)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](o),h&&B(e,t)),n})):[],f.update(),h=!0,i(f.before_update),f.fragment=!!u&&u(f.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);f.fragment&&f.fragment.l(t),t.forEach(a)}else f.fragment&&f.fragment.c();o.intro&&I(e.$$.fragment),N(e,o.target,o.anchor,o.customElement),L()}M(d)}class H{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}
/*!
* hotkeys-js v3.8.5
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2021 kenny wong <wowohoo@qq.com>
* http://jaywcjlove.github.io/hotkeys
*
* Licensed under the MIT license.
*/var V="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function J(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on".concat(e),(function(){n(window.event)}))}function X(t,e){for(var n=e.slice(0,e.length-1),i=0;i<n.length;i++)n[i]=t[n[i].toLowerCase()];return n}function Y(t){"string"!=typeof t&&(t="");for(var e=(t=t.replace(/\s/g,"")).split(","),n=e.lastIndexOf("");n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}for(var Q={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":V?173:189,"=":V?61:187,";":V?59:186,"'":222,"[":219,"]":221,"\\":220},Z={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},tt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},et={16:!1,18:!1,17:!1,91:!1},nt={},it=1;it<20;it++)Q["f".concat(it)]=111+it;var ot=[],rt="all",ut=[],st=function(t){return Q[t.toLowerCase()]||Z[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function ct(t){rt=t||"all"}function at(){return rt||"all"}var lt=function(t){var e=t.key,n=t.scope,i=t.method,o=t.splitKey,r=void 0===o?"+":o;Y(e).forEach((function(t){var e=t.split(r),o=e.length,u=e[o-1],s="*"===u?"*":st(u);if(nt[s]){n||(n=at());var c=o>1?X(Z,e):[];nt[s]=nt[s].map((function(t){return(!i||t.method===i)&&t.scope===n&&function(t,e){for(var n=t.length>=e.length?t:e,i=t.length>=e.length?e:t,o=!0,r=0;r<n.length;r++)-1===i.indexOf(n[r])&&(o=!1);return o}(t.mods,c)?{}:t}))}}))};function dt(t,e,n){var i;if(e.scope===n||"all"===e.scope){for(var o in i=e.mods.length>0,et)Object.prototype.hasOwnProperty.call(et,o)&&(!et[o]&&e.mods.indexOf(+o)>-1||et[o]&&-1===e.mods.indexOf(+o))&&(i=!1);(0!==e.mods.length||et[16]||et[18]||et[17]||et[91])&&!i&&"*"!==e.shortcut||!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function ft(t){var e=nt["*"],n=t.keyCode||t.which||t.charCode;if(ht.filter.call(this,t)){if(93!==n&&224!==n||(n=91),-1===ot.indexOf(n)&&229!==n&&ot.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(e){var n=tt[e];t[e]&&-1===ot.indexOf(n)?ot.push(n):!t[e]&&ot.indexOf(n)>-1?ot.splice(ot.indexOf(n),1):"metaKey"===e&&t[e]&&3===ot.length&&(t.ctrlKey||t.shiftKey||t.altKey||(ot=ot.slice(ot.indexOf(n))))})),n in et){for(var i in et[n]=!0,Z)Z[i]===n&&(ht[i]=!0);if(!e)return}for(var o in et)Object.prototype.hasOwnProperty.call(et,o)&&(et[o]=t[tt[o]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===ot.indexOf(17)&&ot.push(17),-1===ot.indexOf(18)&&ot.push(18),et[17]=!0,et[18]=!0);var r=at();if(e)for(var u=0;u<e.length;u++)e[u].scope===r&&("keydown"===t.type&&e[u].keydown||"keyup"===t.type&&e[u].keyup)&&dt(t,e[u],r);if(n in nt)for(var s=0;s<nt[n].length;s++)if(("keydown"===t.type&&nt[n][s].keydown||"keyup"===t.type&&nt[n][s].keyup)&&nt[n][s].key){for(var c=nt[n][s],a=c.splitKey,l=c.key.split(a),d=[],f=0;f<l.length;f++)d.push(st(l[f]));d.sort().join("")===ot.sort().join("")&&dt(t,c,r)}}}function ht(t,e,n){ot=[];var i=Y(t),o=[],r="all",u=document,s=0,c=!1,a=!0,l="+";for(void 0===n&&"function"==typeof e&&(n=e),"[object Object]"===Object.prototype.toString.call(e)&&(e.scope&&(r=e.scope),e.element&&(u=e.element),e.keyup&&(c=e.keyup),void 0!==e.keydown&&(a=e.keydown),"string"==typeof e.splitKey&&(l=e.splitKey)),"string"==typeof e&&(r=e);s<i.length;s++)o=[],(t=i[s].split(l)).length>1&&(o=X(Z,t)),(t="*"===(t=t[t.length-1])?"*":st(t))in nt||(nt[t]=[]),nt[t].push({keyup:c,keydown:a,scope:r,mods:o,shortcut:i[s],method:n,key:i[s],splitKey:l});void 0!==u&&!function(t){return ut.indexOf(t)>-1}(u)&&window&&(ut
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var gt=function(t,e){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function yt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _t=function(){return(_t=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function bt(t,e,n,i){return new(n||(n=Promise))((function(o,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,s)}c((i=i.apply(t,e||[])).next())}))}function wt(t,e){var n,i,o,r,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function xt(t,e){void 0===e&&(e=!1);var n=function(){var t=new Int8Array(1);window.crypto.getRandomValues(t);var e=new Uint8Array(Math.max(16,Math.abs(t[0])));return window.crypto.getRandomValues(e),e.join("")}();return Object.defineProperty(window,n,{value:function(i){return e&&Reflect.deleteProperty(window,n),null==t?void 0:t(i)},writable:!1,configurable:!0}),n}function Mt(t,e){return void 0===e&&(e={}),bt(this,void 0,void 0,(function(){return wt(this,(function(n){return[2,new Promise((function(n,i){var o=xt((function(t){n(t),Reflect.deleteProperty(window,r)}),!0),r=xt((function(t){i(t),Reflect.deleteProperty(window,o)}),!0);window.rpc.notify(t,_t({callback:o,error:r},e))}))]}))}))}function kt(t){return bt(this,void 0,void 0,(function(){return wt(this,(function(e){return[2,Mt("tauri",t)]}))}))}function $t(t,e,n,i){return bt(this,void 0,void 0,(function(){return wt(this,(function(o){return"object"==typeof n&&Object.freeze(n),[2,kt({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:"string"==typeof n?[n]:n,options:i,onEventFn:xt(t)}})]}))}))}Object.freeze({__proto__:null,transformCallback:xt,invoke:Mt});var Ct,Ot,Et=function(){function t(){this.eventListeners=Object.create(null)}return t.prototype.addEventListener=function(t,e){t in this.eventListeners?this.eventListeners[t].push(e):this.eventListeners[t]=[e]},t.prototype._emit=function(t,e){if(t in this.eventListeners)for(var n=0,i=this.eventListeners[t];n<i.length;n++)(0,i[n])(e)},t.prototype.on=function(t,e){return this.addEventListener(t,e),this},t}(),Pt=function(){function t(t){this.pid=t}return t.prototype.write=function(t){return bt(this,void 0,void 0,(function(){return wt(this,(function(e){return[2,kt({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:t}})]}))}))},t.prototype.kill=function(){return bt(this,void 0,void 0,(function(){return wt(this,(function(t){return[2,kt({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})]}))}))},t}(),St=function(t){funct
//# sourceMappingURL=bundle.js.map