2020-09-09 10:14:00 +00:00
|
|
|
System.register([],(function(t){"use strict";return{execute:function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var check=function(t){return t&&t.Math==Math&&t},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof e&&e)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},n=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a={f:i&&!o.call({1:2},1)?function propertyIsEnumerable(t){var e=i(this,t);return!!e&&e.enumerable}:o},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,classofRaw=function(t){return c.call(t).slice(8,-1)},u="".split,f=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?u.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return f(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},l={}.hasOwnProperty,has=function(t,e){return l.call(t,e)},s=r.document,p=isObject(s)&&isObject(s.createElement),documentCreateElement=function(t){return p?s.createElement(t):{}},h=!n&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),y=Object.getOwnPropertyDescriptor,v={f:n?y:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),h)try{return y(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!a.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},d=Object.defineProperty,g={f:n?d:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),h)try{return d(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},m=n?function(t,e,r){return g.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{m(r,t,e)}catch(n){r[t]=e}return e},b="__core-js_shared__",w=r[b]||setGlobal(b,{}),S=Function.toString;"function"!=typeof w.inspectSource&&(w.inspectSource=function(t){return S.call(t)});var x,E,O,j=w.inspectSource,_=r.WeakMap,P="function"==typeof _&&/native code/.test(j(_)),A=createCommonjsModule((function(t){(t.exports=function(t,e){return w[t]||(w[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),T=0,I=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++T+I).toString(36)},L=A("keys"),sharedKey=function(t){return L[t]||(L[t]=uid(t))},k={},R=r.WeakMap;if(P){var M=new R,C=M.get,G=M.has,N=M.set;x=function(t,e){return N.call(M,t,e),e},E=function(t){return C.call(M,t)||{}},O=function(t){return G.call(M,t)}}else{var D=sharedKey("state");k[D]=!0,x=function(t,e){return m(t,D,e),e},E=function(t){return has(t,D)?t[D]:{}},O=function(t){return has(t,D)}}var U={set:x,get:E,has:O,enforce:function(t){return O(t)?E(t):x(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=E(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},$=crea
|
2020-09-09 10:14:00 +00:00
|
|
|
*/t("default",{name:"helloworld",init:function init(t){var e=this;return function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function _next(t){asyncGeneratorStep(i,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(i,n,o,_next,_throw,"throw",t)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(){var r,n,o,i,a;return regeneratorRuntime.wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return r=t.$,t.importLocale,n=e,c.next=4,__variableDynamicImportRuntime0__("./locale/".concat(n.curPrefs.lang,".js"));case 4:return o=c.sent,i=o.default,a=n.canvas,c.abrupt("return",{name:i.name,svgicons:"helloworld-icon.xml",buttons:[{id:"hello_world",icon:"helloworld.png",type:"mode",title:i.buttons[0].title,events:{click:function click(){a.setMode("hello_world")}}}],mouseDown:function mouseDown(){if("hello_world"===a.getMode())return{started:!0}},mouseUp:function mouseUp(t){if("hello_world"===a.getMode()){var e=a.getZoom(),n=t.mouse_x/e,o=t.mouse_y/e,c=i.text;[["x",n],["y",o]].forEach((function(t){var e=_slicedToArray(t,2),r=e[0],n=e[1];c=c.replace("{"+r+"}",n)})),r.alert(c)}}});case 8:case"end":return c.stop()}}),_callee)})))()}});var Oo=Object.freeze({__proto__:null,default:{name:"Hello World",text:"Hello World!\n\nYou clicked here: {x}, {y}",buttons:[{title:"Say 'Hello World'"}]}}),jo=Object.freeze({__proto__:null,default:{name:"Hello World",text:"Hello World!\n\n 请点击: {x}, {y}",buttons:[{title:"输出 'Hello World'"}]}})}}}));
|