@antv/g-svg 1.6.1 → 1.6.4
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.
- package/dist/index.umd.js +13 -3
- package/dist/index.umd.min.js +1 -1
- package/package.json +5 -5
package/dist/index.umd.js
CHANGED
|
@@ -886,7 +886,7 @@
|
|
|
886
886
|
var addTouchEventListener = function addTouchEventListener($el) {
|
|
887
887
|
$el.addEventListener('touchstart', onPointerDown, true);
|
|
888
888
|
$el.addEventListener('touchend', onPointerUp, true);
|
|
889
|
-
|
|
889
|
+
$el.addEventListener('touchmove', onPointerMove, true);
|
|
890
890
|
$el.addEventListener('touchcancel', onPointerCancel, true);
|
|
891
891
|
};
|
|
892
892
|
|
|
@@ -909,8 +909,8 @@
|
|
|
909
909
|
var removeTouchEventListener = function removeTouchEventListener($el) {
|
|
910
910
|
$el.removeEventListener('touchstart', onPointerDown, true);
|
|
911
911
|
$el.removeEventListener('touchend', onPointerUp, true);
|
|
912
|
+
$el.removeEventListener('touchmove', onPointerMove, true);
|
|
912
913
|
$el.removeEventListener('touchcancel', onPointerCancel, true);
|
|
913
|
-
globalThis.document.removeEventListener('touchmove', onPointerMove, true);
|
|
914
914
|
};
|
|
915
915
|
|
|
916
916
|
var removeMouseEventListener = function removeMouseEventListener($el) {
|
|
@@ -963,7 +963,17 @@
|
|
|
963
963
|
}, _callee);
|
|
964
964
|
})));
|
|
965
965
|
renderingService.hooks.destroy.tap(DOMInteractionPlugin_1.tag, function () {
|
|
966
|
-
var $el = _this.contextService.getDomElement();
|
|
966
|
+
var $el = _this.contextService.getDomElement(); // @ts-ignore
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
if (globalThis.navigator.msPointerEnabled) {
|
|
970
|
+
// @ts-ignore
|
|
971
|
+
$el.style.msContentZooming = ''; // @ts-ignore
|
|
972
|
+
|
|
973
|
+
$el.style.msTouchAction = '';
|
|
974
|
+
} else if (canvas.supportsPointerEvents) {
|
|
975
|
+
$el.style.touchAction = '';
|
|
976
|
+
}
|
|
967
977
|
|
|
968
978
|
if (canvas.supportsPointerEvents) {
|
|
969
979
|
removePointerEventListener($el);
|
package/dist/index.umd.min.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
3
3
|
r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var v={};s(v,o,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(L([])));y&&y!==e&&n.call(y,o)&&(v=y);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,s(m,"constructor",p),s(p,"constructor",f),f.displayName=s(p,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),s(m,u,"Generator"),s(m,o,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function n(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function u(t){n(a,i,o,u,s,"next",t)}function s(t){n(a,i,o,u,s,"throw",t)}u(void 0)}))}}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e,r,n){var i,o=arguments.length,a=3>o?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(3>o?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function s(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(){
|
|
4
4
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
5
|
-
c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function h(){}function f(){}function p(){}var v={};u(v,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(L([])));y&&y!==e&&r.call(y,i)&&(v=y);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,u(m,"constructor",p),u(p,"constructor",f),f.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,a,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,u,"next",t)}function u(t){l(o,n,i,a,u,"throw",t)}a(void 0)}))}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var f,p,v=(f=function(){function t(){this.contextService=void 0,this.renderingContext=void 0}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},u=function(e){t.hooks.pointerOut.call(e)},s=function(e){t.hooks.pointerCancel.call(e)},l=function(e){t.hooks.pointerWheel.call(e)},h=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",u,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",i,!0)},f=function(t){t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),globalThis.document.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",s,!0)},v=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",u,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",i,!0)};t.hooks.init.tapPromise(p.tag,d(c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?h(n):v(n),r.supportsTouchEvents&&f(n),n.addEventListener("wheel",l,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(p.tag,(function(){var t=e.contextService.getDomElement();r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",u,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",u,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",i,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchcancel",s,!0),globalThis.document.removeEventListener("touchmove",n,!0)}(t),t.removeEventListener("wheel",l,!0)}))},t}(),f.tag="DOMInteraction",p=f);u([e.inject(e.ContextService),s("design:type",Object)],v.prototype,"contextService",void 0),u([e.inject(e.RenderingContext),s("design:type",Object)],v.prototype,"renderingContext",void 0),v=p=u([e.singleton({contrib:e.RenderingPluginContribution})],v);var g=e.Module((function(t){t(v)})),y=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,h(e,r);var i=n.prototype;return i.init=function(){this.container.load(g,!0)},i.destroy=function(){this.container.unload(g)},n}(e.AbstractRendererPlugin),m=Object.freeze({__proto__:null,Plugin:y}),b=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;o>i;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},w=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},E=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},A=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},x=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},S=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},L=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,C=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],O=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function T(t){return t?_(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new S:"undefined"!=typeof navigator?_(navigator.userAgent):"undefined"!=typeof process&&process.version?new E(process.version.slice(1)):null}function _(t){var e=function(t){return""!==t&&C.reduce((function(e,r){var n=r[0];if(e)return e;var i=r[1].exec(t);return!!i&&[n,i]}),!1)}(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new x;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=b(b([],i,!0),function(t){for(var e=[],r=0;t>r;r++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,r=O.length;r>e;e++){var n=O[e],i=n[0];if(n[1].exec(t))return i}return null}(t),u=L.exec(t);return u&&u[1]?new A(r,o,a,u[1]):new w(r,o,a)}function P(){
|
|
5
|
+
c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function h(){}function f(){}function p(){}var v={};u(v,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(L([])));y&&y!==e&&r.call(y,i)&&(v=y);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,u(m,"constructor",p),u(p,"constructor",f),f.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,a,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,u,"next",t)}function u(t){l(o,n,i,a,u,"throw",t)}a(void 0)}))}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var f,p,v=(f=function(){function t(){this.contextService=void 0,this.renderingContext=void 0}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},u=function(e){t.hooks.pointerOut.call(e)},s=function(e){t.hooks.pointerCancel.call(e)},l=function(e){t.hooks.pointerWheel.call(e)},h=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",u,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",i,!0)},f=function(t){t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",s,!0)},v=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",u,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",i,!0)};t.hooks.init.tapPromise(p.tag,d(c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?h(n):v(n),r.supportsTouchEvents&&f(n),n.addEventListener("wheel",l,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(p.tag,(function(){var t=e.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):r.supportsPointerEvents&&(t.style.touchAction=""),r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",u,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",u,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",i,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",n,!0),t.removeEventListener("touchcancel",s,!0)}(t),t.removeEventListener("wheel",l,!0)}))},t}(),f.tag="DOMInteraction",p=f);u([e.inject(e.ContextService),s("design:type",Object)],v.prototype,"contextService",void 0),u([e.inject(e.RenderingContext),s("design:type",Object)],v.prototype,"renderingContext",void 0),v=p=u([e.singleton({contrib:e.RenderingPluginContribution})],v);var g=e.Module((function(t){t(v)})),y=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,h(e,r);var i=n.prototype;return i.init=function(){this.container.load(g,!0)},i.destroy=function(){this.container.unload(g)},n}(e.AbstractRendererPlugin),m=Object.freeze({__proto__:null,Plugin:y}),b=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;o>i;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},w=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},E=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},A=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},x=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},S=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},L=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,C=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],O=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function T(t){return t?_(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new S:"undefined"!=typeof navigator?_(navigator.userAgent):"undefined"!=typeof process&&process.version?new E(process.version.slice(1)):null}function _(t){var e=function(t){return""!==t&&C.reduce((function(e,r){var n=r[0];if(e)return e;var i=r[1].exec(t);return!!i&&[n,i]}),!1)}(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new x;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=b(b([],i,!0),function(t){for(var e=[],r=0;t>r;r++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,r=O.length;r>e;e++){var n=O[e],i=n[0];if(n[1].exec(t))return i}return null}(t),u=L.exec(t);return u&&u[1]?new A(r,o,a,u[1]):new w(r,o,a)}function P(){
|
|
6
6
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
7
7
|
P=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=Object.create((e&&e.prototype instanceof d?e:d).prototype),o=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function d(){}function h(){}function f(){}var p={};u(p,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==e&&r.call(g,i)&&(p=g);var y=f.prototype=d.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=f,u(y,"constructor",f),u(f,"constructor",h),h.displayName=u(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,a,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function G(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function k(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){G(o,n,i,a,u,"next",t)}function u(t){G(o,n,i,a,u,"throw",t)}a(void 0)}))}}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var N=function(){this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0};function M(t,r){var n=r.img,i=void 0===n?"":n,o=r.width,a=r.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),e.isString(i))t.setAttribute("href",i);else if(i instanceof Image)o||t.setAttribute("width",""+i.width),a||t.setAttribute("height",""+i.height),t.setAttribute("href",i.src);else if(i instanceof HTMLElement&&e.isString(i.nodeName)&&"CANVAS"===i.nodeName.toUpperCase())t.setAttribute("href",i.toDataURL());else if(i instanceof ImageData){var u=document.createElement("canvas");u.setAttribute("width",""+i.width),u.setAttribute("height",""+i.height);var s=u.getContext("2d");s&&(s.putImageData(i,0,0),o||t.setAttribute("width",""+i.width),a||t.setAttribute("height",""+i.height),t.setAttribute("href",u.toDataURL()))}}function $(t,e){var r=e.y1,n=e.x2,i=e.y2,o=e.defX,a=void 0===o?0:o,u=e.defY,s=void 0===u?0:u;t.setAttribute("x1",""+(e.x1.value-a)),t.setAttribute("y1",""+(r.value-s)),t.setAttribute("x2",""+(n.value-a)),t.setAttribute("y2",""+(i.value-s))}function D(t,r){var n=r.defX,i=r.defY;t.setAttribute("d",e.translatePathToString(r.path.absolutePath,void 0===n?0:n,void 0===i?0:i))}function R(t,e){var r=e.points,n=e.defX,i=void 0===n?0:n,o=e.defY,a=void 0===o?0:o;r&&r.points&&r.points.length>=2&&t.setAttribute("points",r.points.map((function(t){return t[0]-i+","+(t[1]-a)})).join(" "))}function I(t,r){var n=r.radius,i=r.width,o=r.height;if(isFinite(i.value)&&isFinite(o.value)){var a="";if(n&&n.some((function(t){return 0!==t.value}))){var u=n.map((function(t){return e.clamp(t.value,0,Math.min(Math.abs(i.value)/2,Math.abs(o.value)/2))})),s=u[0],c=u[1],l=u[2],d=u[3],h=i.value>0?1:-1,f=o.value>0?1:-1,p=h+f!==0?1:0;a=[["M "+h*s+",0"],["l "+(i.value-h*(s+c))+",0"],["a "+c+","+c+",0,0,"+p+","+h*c+","+f*c],["l 0,"+(o.value-f*(c+l))],["a "+l+","+l+",0,0,"+p+","+-h*l+","+f*l],["l "+(h*(l+d)-i.value)+",0"],["a "+d+","+d+",0,0,"+p+","+-h*d+","+-f*d],["l 0,"+(f*(d+s)-o.value)],["a "+s+","+s+",0,0,"+p+","+h*s+","+-f*s],["z"]].join(" ")}else a="M 0,0 l "+i.value+",0 l 0,"+o.value+" l"+-i.value+" 0 z";t.setAttribute("d",a)}}function W(t){return t.toFixed(6).replace(".000000","")}function U(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"}))}N.tag="c-svg-element";var V={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},F={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function B(t,e){var r=e.textBaseline,n=e.lineWidth,i=e.metrics,o=e.dx,a=e.dy,u=T();u&&"firefox"===u.name?t.setAttribute("dominant-baseline",F[r.value]||"alphabetic"):(t.setAttribute("dominant-baseline",F[r.value]),t.setAttribute("alignment-baseline",V[r.value])),t.setAttribute("paint-order","stroke");var s=i.lines,c=i.lineHeight,l=i.height,d=s.length;t.setAttribute("style","transform:translate("+o.toString()+", "+a.toString()+");"),1===d?(t.innerHTML=U(s[0]),t.setAttribute("dx",""+n.value/2)):t.innerHTML=s.map((function(t,e){var i=0;return 0===e?"middle"===r.value?i=c/2-l/2:"top"===r.value||"hanging"===r.value?i=0:"bottom"!==r.value&&"alphabetic"!==r.value&&"ideographic"!==r.value||(i=-c*(d-1)):i=c,'<tspan x="0" dx="'+n.value/2+'" dy="'+i+'">'+U(t)+"</tspan>"})).join("")}var H,Y,X=e.Syringe.defineToken("CreateElementContribution",{multiple:!1});function z(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}var Q=((H={})[e.Shape.RECT]="path",H[e.Shape.CIRCLE]="circle",H[e.Shape.ELLIPSE]="ellipse",H[e.Shape.IMAGE]="image",H[e.Shape.GROUP]="g",H[e.Shape.LINE]="line",H[e.Shape.POLYLINE]="polyline",H[e.Shape.POLYGON]="polygon",H[e.Shape.TEXT]="text",H[e.Shape.PATH]="path",H[e.Shape.HTML]="foreignObject",H),q=((Y={})[e.Shape.CIRCLE]=["r"],Y[e.Shape.ELLIPSE]=["rx","ry"],Y[e.Shape.RECT]=["width","height","radius"],Y[e.Shape.IMAGE]=["img","width","height"],Y[e.Shape.LINE]=["x1","y1","x2","y2"],Y[e.Shape.POLYLINE]=["points"],Y[e.Shape.POLYGON]=["points"],Y[e.Shape.PATH]=["path"],Y[e.Shape.TEXT]=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","textTransform","whiteSpace","dx","dy"],Y),K=function(){function t(){this.canvasConfig=void 0}var r=t.prototype;return r.createElement=function(t){return z(Q[t.nodeName]||"g",this.canvasConfig.document||document)},r.shouldUpdateElementAttribute=function(t,e){return(q[t.nodeName]||[]).indexOf(e)>-1},r.updateElementAttribute=function(t){var r=t.elementSVG.$el,n=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:M(r,n);break;case e.Shape.RECT:I(r,n);break;case e.Shape.LINE:$(r,n);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:R(r,n);break;case e.Shape.PATH:D(r,n);break;case e.Shape.TEXT:B(r,n)}},t}();u([e.inject(e.CanvasConfig),s("design:type",Object)],K.prototype,"canvasConfig",void 0),K=u([e.singleton({token:X})],K);var J="g-filter-";function Z(t,r,n,i,o){var a=J+n.entity,u=r.querySelectorAll("[name="+a+"]");if(u.length&&u.forEach((function(t){r.removeChild(t)})),0===o.length)null==i||i.removeAttribute("filter");else{var s=o.map((function(n,i){var o=n.name,u=n.params,s=z("filter",t);return s.setAttribute("filterUnits","userSpaceOnUse"),"blur"===o?function(t,e,r){var n=z("feGaussianBlur",t);n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation",""+r[0].value),e.appendChild(n)}(t,s,u):"brightness"===o?function(t,e,r){var n=tt(r[0]);et(t,e,{type:"linear",slope:n,intercept:0})}(t,s,u):"drop-shadow"===o?function(t,e,r){var n=r[0].value,i=r[1].value,o=r[2].value,a=r[3].formatted,u=z("feGaussianBlur",t);u.setAttribute("in","SourceAlpha"),u.setAttribute("stdDeviation",""+o),e.appendChild(u);var s=z("feOffset",t);s.setAttribute("dx",""+n),s.setAttribute("dy",""+i),s.setAttribute("result","offsetblur"),e.appendChild(s);var c=z("feFlood",t);c.setAttribute("flood-color",a),e.appendChild(c);var l=z("feComposite",t);l.setAttribute("in2","offsetblur"),l.setAttribute("operator","in"),e.appendChild(l);var d=z("feMerge",t);e.appendChild(d);var h=z("feMergeNode",t),f=z("feMergeNode",t);f.setAttribute("in","SourceGraphic"),d.appendChild(h),d.appendChild(f)}(t,s,u):"contrast"===o?function(t,e,r){var n=tt(r[0]);et(t,e,{type:"linear",slope:n,intercept:-.5*n+.5})}(t,s,u):"grayscale"===o?function(t,e,r){var n=tt(r[0]);rt(t,e,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(t,s,u):"sepia"===o?function(t,e,r){var n=tt(r[0]);rt(t,e,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(t,s,u):"saturate"===o?function(t,e,r){var n=tt(r[0]),i=z("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values",""+n),e.appendChild(i)}(t,s,u):"hue-rotate"===o?function(t,r,n){var i=z("feColorMatrix",t);i.setAttribute("type","hueRotate"),i.setAttribute("values",""+n[0].to(e.UnitType.kDegrees).value),r.appendChild(i)}(t,s,u):"invert"===o&&function(t,e,r){var n=tt(r[0]);et(t,e,{type:"table",tableValues:n+" "+(1-n)})}(t,s,u),s.id=a+"-"+i,s.setAttribute("name",a),r.appendChild(s),s.id}));null==i||i.setAttribute("filter",s.map((function(t){return"url(#"+t+")"})).join(" "))}}function tt(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function et(t,e,r){var n=r.type,i=r.slope,o=r.intercept,a=r.tableValues,u=z("feComponentTransfer",t);[z("feFuncR",t),z("feFuncG",t),z("feFuncB",t)].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues",""+a):(t.setAttribute("slope",""+i),t.setAttribute("intercept",""+o)),u.appendChild(t)})),e.appendChild(u)}function rt(t,e,r){var n=z("feColorMatrix",t);n.setAttribute("type","matrix"),n.setAttribute("values",r.join(" ")),e.appendChild(n)}var nt={},it=0;function ot(t,r,n,i,o,a,u){if(!o)return"";if(!(o instanceof e.CSSRGB)){if(e.isPattern(o)){var s=function(t,r,n,i,o){var a=at(i);if(!r.querySelector("#"+a)){var u=i.image,s=i.repetition,c="";if(e.isString(u)?c=u:e.isBrowser&&(u instanceof HTMLImageElement?c=u.src:u instanceof HTMLCanvasElement&&(c=u.toDataURL())),c){var l=z("pattern",t);l.setAttribute("patternUnits","userSpaceOnUse");var d,h=z("image",t);l.appendChild(h),l.id=a,r.appendChild(l),h.setAttribute("href",c),o?d=o(c):e.isBrowser&&(d=new window.Image),c.match(/^data:/i)||(d.crossOrigin="Anonymous",h.setAttribute("crossorigin","anonymous")),d.src=c;var f=function(){l.setAttribute("x","0"),l.setAttribute("y","0");var t=n.getGeometryBounds().halfExtents,e=d.width,r=d.height;"repeat-x"===s?r=2*t[1]:"repeat-y"===s?e=2*t[0]:"no-repeat"===s&&(e=2*t[0],r=2*t[1]),l.setAttribute("width",""+e),l.setAttribute("height",""+r),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width",""+d.width),h.setAttribute("height",""+d.height)};d.complete?f():(d.onload=f,d.src=d.src)}}return a}(t,r,n,o,u);return i.style[a]="url(#"+s+")",s}if(1===o.length){var c=ut(t,n,r,i,o[0]);return null==i||i.setAttribute(a,"url(#"+c+")"),c}var l=function(t,e,r,n,i){var o=J+e.entity+"-gradient",a=r.querySelector("#"+o);a||((a=z("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.id=o,r.appendChild(a));var u=0;i.forEach((function(i,s){var c=ut(t,e,r,n,i),l=c+"_rect",d=z("rect",t);d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.setAttribute("fill","url(#"+c+")"),d.id=l,r.appendChild(d);var h=z("feImage",t);if(h.setAttribute("href","#"+l),h.setAttribute("result",o+"-"+s),a.appendChild(h),s>0){var f=z("feBlend",t);f.setAttribute("in",1===s?o+"-"+(s-1):o+"-blended-"+(u-1)),f.setAttribute("in2",o+"-"+s),f.setAttribute("result",o+"-blended-"+u++),f.setAttribute("mode","multiply"),a.appendChild(f)}}));var s=z("feComposite",t);return s.setAttribute("in",o+"-blended-"+u),s.setAttribute("in2","SourceGraphic"),s.setAttribute("operator","in"),a.appendChild(s),o}(t,n,r,i,o);return null==i||i.setAttribute("filter","url(#"+l+")"),null==i||i.setAttribute("fill","black"),l}return"currentColor"===n.style[a]?null==i||i.setAttribute(a,"currentColor"):null==i||i.setAttribute(a,o.isNone?"none":o.toString()),""}function at(t){var r="";if(t instanceof e.CSSGradientValue){var n=t.type,i=t.value;if(n===e.GradientType.LinearGradient||n===e.GradientType.RadialGradient)r=""+i.type+i.width+i.height+(i.angle||0)+(i.cx||0)+(i.cy||0)+i.steps.map((function(t){return t.join("")})).join("")}else e.isPattern(t)&&(r=e.isString(t.image)?"pattern-"+t.image+"-"+t.repetition:"pattern-"+it);return r&&(nt[r]||(nt[r]="g-pattern-"+it++)),nt[r]}function ut(t,r,n,i,o){var a=at(o),u=n.querySelector("#"+a);if(!u){(u=z(o.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var s="";o.value.steps.forEach((function(t){s+='<stop offset="'+t[0]+'" stop-color="'+t[1]+'"></stop>'})),u.innerHTML=s,u.id=a,n.appendChild(u)}var c=r.getGeometryBounds(),l=c&&2*c.halfExtents[0]||0,d=c&&2*c.halfExtents[1]||0;if(o.type===e.GradientType.LinearGradient){var h=e.computeLinearGradient(l,d,o.value.angle),f=h.y1,p=h.x2,v=h.y2;u.setAttribute("x1",""+h.x1),u.setAttribute("y1",""+f),u.setAttribute("x2",""+p),u.setAttribute("y2",""+v)}else{var g=o.value,y=e.computeRadialGradient(l,d,g.cx,g.cy),m=y.y,b=y.r;u.setAttribute("cx",""+y.x),u.setAttribute("cy",""+m),u.setAttribute("r",""+b)}return a}var st,ct,lt=/url\(#(.*)\)/,dt=function(){function t(){this.canvasConfig=void 0,this.contextService=void 0,this.$def=void 0,this.gradientCache={}}var r=t.prototype;return r.getDefElement=function(){return this.$def},r.init=function(){var t=this.canvasConfig.document,e=this.contextService.getContext();this.$def=z("defs",t),e.appendChild(this.$def)},r.clear=function(t){var e=this;Object.keys(this.gradientCache).forEach((function(r){e.clearUnusedDefElement(e.gradientCache,r,t)}))},r.clearUnusedDefElement=function(t,e,r){if(t[e]&&1===t[e].size&&t[e].has(r)){var n=this.$def.querySelector("#"+e);n&&this.$def.removeChild(n)}},r.createOrUpdateGradientAndPattern=function(t,e,r,n){var i=this.canvasConfig,o=i.document,a=i.createImage;if(e){var u,s=null===(u=e.getAttribute(n))||void 0===u?void 0:u.match(lt);s&&s.length>1&&this.clearUnusedDefElement(this.gradientCache,s[1],t.entity);var c=ot(o||document,this.$def,t,e,r,n,a);this.gradientCache[c]||(this.gradientCache[c]=new Set),this.gradientCache[c].add(t.entity)}},r.createOrUpdateShadow=function(t,r,n){!function(t,r,n,i,o){var a=n.parsedStyle,u=a.shadowType,s=a.shadowBlur,c=a.shadowColor,l=a.shadowOffsetX,d=a.shadowOffsetY,h=!e.isNil(c)&&(null==s?void 0:s.value)>0,f="g-filter-dropshadow-"+n.entity,p=r.querySelector("#"+f);if(p&&(p.getAttribute("data-type")===u.value&&h||(p.remove(),p=null)),h){if(null==i||i.setAttribute("filter","url(#"+f+")"),!p){if((p=z("filter",t)).setAttribute("data-type",u.value),"outer"===u.value){var v=z("feDropShadow",t);v.setAttribute("dx",""+((null==l?void 0:l.value)||0)/2),v.setAttribute("dy",""+((null==d?void 0:d.value)||0)/2),v.setAttribute("stdDeviation",""+((null==s?void 0:s.value)||0)/4),v.setAttribute("flood-color",c.toString()),p.appendChild(v)}else if("inner"===u.value){var g=z("feComponentTransfer",t);g.setAttribute("in","SourceAlpha");var y=z("feFuncA",t);y.setAttribute("type","table"),y.setAttribute("tableValues","1 0"),g.appendChild(y),p.appendChild(g);var m=z("feGaussianBlur",t);m.setAttribute("stdDeviation",""+((null==s?void 0:s.value)||0)/4),p.appendChild(m);var b=z("feOffset",t);b.setAttribute("dx",""+((null==l?void 0:l.value)||0)/2),b.setAttribute("dy",""+((null==d?void 0:d.value)||0)/2),b.setAttribute("result","offsetblur"),p.appendChild(b);var w=z("feFlood",t);w.setAttribute("flood-color",c.toString()),w.setAttribute("result","color"),p.appendChild(w);var E=z("feComposite",t);E.setAttribute("in2","offsetblur"),E.setAttribute("operator","in"),p.appendChild(E);var A=z("feComposite",t);A.setAttribute("in2","SourceAlpha"),A.setAttribute("operator","in"),p.appendChild(A);var x=z("feMerge",t);p.appendChild(x);var S=z("feMergeNode",t);S.setAttribute("in","SourceGraphic");var L=z("feMergeNode",t);x.appendChild(S),x.appendChild(L)}return p.id=f,p.setAttribute("filterUnits","userSpaceOnUse"),void r.appendChild(p)}if("inner"===u.value){var C=p.children[1],O=p.children[2];"shadowColor"===o?p.children[3].setAttribute("flood-color",c.toString()):"shadowBlur"===o?C.setAttribute("stdDeviation",""+((null==s?void 0:s.value)||0)/4):"shadowOffsetX"===o?O.setAttribute("dx",""+((null==l?void 0:l.value)||0)/2):"shadowOffsetY"===o&&O.setAttribute("dy",""+((null==d?void 0:d.value)||0)/2)}else if("outer"===u.value){var T=p.children[0];"shadowColor"===o?T.setAttribute("flood-color",c.toString()):"shadowBlur"===o?T.setAttribute("stdDeviation",""+((null==s?void 0:s.value)||0)/4):"shadowOffsetX"===o?T.setAttribute("dx",""+((null==l?void 0:l.value)||0)/2):"shadowOffsetY"===o&&T.setAttribute("dy",""+((null==d?void 0:d.value)||0)/2)}}else null==i||i.removeAttribute("filter")}(this.canvasConfig.document||document,this.$def,t,r,n)},r.createOrUpdateFilter=function(t,e,r){Z(this.canvasConfig.document||document,this.$def,t,e,r)},t}();u([e.inject(e.CanvasConfig),s("design:type",Object)],dt.prototype,"canvasConfig",void 0),u([e.inject(e.ContextService),s("design:type",Object)],dt.prototype,"contextService",void 0),dt=u([e.singleton()],dt);var ht={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor"},ft={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},pt={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit"},vt="g_svg",gt=(st=function(){function t(){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.createElementContribution=void 0,this.defElementManager=void 0,this.$camera=void 0,this.renderQueue=[],this.pendingReorderQueue=new Set}var r=t.prototype;return r.apply=function(t){var r=this,n=this.canvasConfig.document,i=function(t){r.createSVGDom(n,t.target,r.$camera)},o=function(t){var e=t.target;r.defElementManager.clear(e.entity),r.removeSVGDom(e)},a=function(t){var e=t.target;if(e.elementSVG){var i=t.attrName;if("zIndex"===i){var o,a,u=e.parentNode,s=null===(o=e.parentNode)||void 0===o||null===(a=o.elementSVG)||void 0===a?void 0:a.$groupEl,c=((null==u?void 0:u.children)||[]).slice();s&&r.reorderChildren(n,s,c)}else if("increasedLineWidthForHitTesting"===i){var l=e.elementSVG;r.createOrUpdateHitArea(e,l.$el,l.$groupEl)}r.updateAttribute(e,[i])}},u=function(t){var n,i=t.target,o=null===(n=i.elementSVG)||void 0===n?void 0:n.$el,a=i.parsedStyle,u=a.fill,s=a.stroke;!u||u instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,u,"fill"),!s||s instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,s,"stroke")};t.hooks.init.tapPromise(ct.tag,k(P().mark((function t(){var n,s,c,l;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=(n=r.canvasConfig).background,c=n.document,r.defElementManager.init(),l=r.contextService.getContext(),s&&(l.style.background=s),l.setAttribute("color-interpolation-filters","sRGB"),r.$camera=z("g",c),r.$camera.id="g_svg_camera",r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),l.appendChild(r.$camera),r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.addEventListener(e.ElementEvent.BOUNDS_CHANGED,u);case 13:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(ct.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,u)})),t.hooks.render.tap(ct.tag,(function(t){r.renderQueue.push(t)})),t.hooks.beginFrame.tap(ct.tag,(function(){var t=r.canvasConfig.document;r.pendingReorderQueue.size&&(r.pendingReorderQueue.forEach((function(e){var i,o=((null==e?void 0:e.children)||[]).slice(),a=null==e||null===(i=e.elementSVG)||void 0===i?void 0:i.$groupEl;a&&r.reorderChildren(t||n,a,o||[])})),r.pendingReorderQueue.clear())})),t.hooks.endFrame.tap(ct.tag,(function(){r.renderingContext.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),r.renderQueue.forEach((function(t){var e,n,i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;i&&o&&(r.applyTransform(o,t.getLocalTransform()),t.renderable.dirty=!1)})),r.renderQueue=[]}))},r.reorderChildren=function(t,e,r){if(r.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),r.length){var n=(t||document).createDocumentFragment();r.forEach((function(t){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),e.appendChild(n)}},r.applyTransform=function(t,e){t.setAttribute("transform","matrix("+W(e[0])+","+W(e[1])+","+W(e[4])+","+W(e[5])+","+W(e[12])+","+W(e[13])+")")},r.applyAttributes=function(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,o=t.attributes;n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}},r.updateAttribute=function(t,r){var n=this,i=this.canvasConfig.document,o=t.elementSVG,a=o.$el,u=o.$groupEl,s=o.$hitTestingEl,c=t.parsedStyle,l=t.computedStyle;r.some((function(e){return n.createElementContribution.shouldUpdateElementAttribute(t,e)}))&&a&&[a,s].forEach((function(r){r&&(n.createElementContribution.updateElementAttribute(t,r),t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t))})),r.forEach((function(r){var o=ht[r],d=l[r],h=c[r];if(t.nodeName===e.Shape.HTML&&("lineWidth"===r?a.style["border-width"]=(h.value||0)+"px":"lineDash"===r&&(a.style["border-style"]="dashed")),"fill"===r)t.nodeName===e.Shape.HTML?a.style.background=h.toString():n.defElementManager.createOrUpdateGradientAndPattern(t,a,h,o);else if("stroke"===r)t.nodeName===e.Shape.HTML?(a.style["border-color"]=h.toString(),a.style["border-style"]="solid"):n.defElementManager.createOrUpdateGradientAndPattern(t,a,h,o);else if("visibility"===r&&"unset"!==d.value)null==u||u.setAttribute(o,""+d.value);else if("clipPath"===r)n.createOrUpdateClipPath(i,h,u);else if("shadowType"===r||"shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r)n.defElementManager.createOrUpdateShadow(t,a,r);else if("filter"===r)n.defElementManager.createOrUpdateFilter(t,a,h);else if("innerHTML"===r)n.createOrUpdateInnerHTML(i,a,h);else if("anchor"===r)t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t);else if(d){var f=d.toString();[a,s].forEach((function(t){if(t&&o)if("unset"!==f&&f!==pt[r]){var e,n=(null===(e=ft[r])||void 0===e?void 0:e[f])||f;t.setAttribute(o,n)}else t.removeAttribute(o)}))}}))},r.createSVGDom=function(t,r,n,i){void 0===i&&(i=!1),r.elementSVG=new N;var o=r.elementSVG,a=this.createElementContribution.createElement(r);if(a){var u,s;r.nodeName===e.Shape.HTML&&(r.parsedStyle.$el=a),a.id="g_svg_"+r.nodeName+"_"+r.entity,!a.hasAttribute("data-wrapgroup")&&"g"===a.nodeName||i?s=a:(s=z("g",t)).appendChild(a),o.$el=a,o.$groupEl=s,this.applyAttributes(r),this.createOrUpdateHitArea(r,a,s);var c=r.parentNode&&(null===(u=r.parentNode.elementSVG)||void 0===u?void 0:u.$groupEl)||n;c&&(c.appendChild(s),this.pendingReorderQueue.add(r.parentNode))}},r.removeSVGDom=function(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&r.parentNode.removeChild(r)},r.createOrUpdateHitArea=function(t,e,r){var n,i=t.elementSVG,o=i.$hitTestingEl,a=null===(n=t.parsedStyle.increasedLineWidthForHitTesting)||void 0===n?void 0:n.value;if(a){var u;if(!o){(o=e.cloneNode()).id="g_svg_"+t.nodeName+"_hittesting_"+t.entity,["filter"].forEach((function(t){o.removeAttribute(t)}));var s="none"!==e.getAttribute("fill");o.setAttribute("fill",s?"transparent":"none"),o.setAttribute("stroke","transparent"),r.appendChild(o),i.$hitTestingEl=o}o.setAttribute("stroke-width",""+(a+(null===(u=t.parsedStyle.lineWidth)||void 0===u?void 0:u.value)))}else o&&(r.removeChild(o),i.$hitTestingEl=null)},r.createOrUpdateInnerHTML=function(t,e,r){var n=(t||document).createElement("div");"string"==typeof r?n.innerHTML=r:n.appendChild(r),e.innerHTML="",e.appendChild(n)},r.createOrUpdateClipPath=function(t,e,r){if(e){var n,i="clip-path-"+e.entity,o=this.defElementManager.getDefElement();if(!o.querySelector("#"+i)){var a=z("clipPath",t);a.id=i,o.appendChild(a),this.createSVGDom(t,e,a,!0),e.elementSVG.$groupEl=a}var u=null===(n=e.elementSVG)||void 0===n?void 0:n.$groupEl;u&&this.applyTransform(u,e.getLocalTransform()),this.applyAttributes(e),r.setAttribute("clip-path","url(#"+i+")")}else r.removeAttribute("clip-path")},r.updateAnchorWithTransform=function(t){var r,n,i=t.getGeometryBounds(),o=i&&2*i.halfExtents[0]||0,a=i&&2*i.halfExtents[1]||0,u=(t.parsedStyle||{}).anchor;[null===(r=t.elementSVG)||void 0===r?void 0:r.$el,null===(n=t.elementSVG)||void 0===n?void 0:n.$hitTestingEl].forEach((function(r){if(r){var n=-u[0].value*o,i=-u[1].value*a;0===n&&0===i||r.setAttribute("transform","translate("+n+","+i+")"),t.nodeName!==e.Shape.CIRCLE&&t.nodeName!==e.Shape.ELLIPSE||(r.setAttribute("cx",""+o/2),r.setAttribute("cy",""+a/2))}}))},t}(),st.tag="SVGRenderer",ct=st);u([e.inject(e.CanvasConfig),s("design:type",Object)],gt.prototype,"canvasConfig",void 0),u([e.inject(e.DefaultCamera),s("design:type",e.Camera)],gt.prototype,"camera",void 0),u([e.inject(e.ContextService),s("design:type",Object)],gt.prototype,"contextService",void 0),u([e.inject(e.RenderingContext),s("design:type",Object)],gt.prototype,"renderingContext",void 0),u([e.inject(X),s("design:type",Object)],gt.prototype,"createElementContribution",void 0),u([e.inject(dt),s("design:type",dt)],gt.prototype,"defElementManager",void 0),gt=ct=u([e.singleton({contrib:e.RenderingPluginContribution})],gt);var yt,mt,bt=e.Module((function(t){t(dt),t(K),t(gt)})),wt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="svg-renderer",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,j(e,r);var i=n.prototype;return i.init=function(){this.container.load(bt,!0)},i.destroy=function(){this.container.unload(bt)},n}(e.AbstractRendererPlugin),Et=Object.freeze({__proto__:null,CreateElementContribution:X,DEFAULT_VALUE_MAP:pt,get DefaultCreateElementContribution(){return K},ElementSVG:N,G_SVG_PREFIX:vt,Plugin:wt,SHAPE2TAGS:Q,SHAPE_UPDATE_DEPS:q,get SVGRendererPlugin(){return gt},SVG_ATTR_MAP:ht,containerModule:bt,createSVGElement:z,updateImageElementAttribute:M,updateLineElementAttribute:$,updatePathElementAttribute:D,updatePolylineElementAttribute:R,updateRectElementAttribute:I,updateTextElementAttribute:B});function At(){
|
|
8
8
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-svg",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "A renderer implemented by SVG",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antv",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@antv/g-plugin-dom-interaction": "^1.6.
|
|
32
|
-
"@antv/g-plugin-svg-picker": "^1.6.
|
|
33
|
-
"@antv/g-plugin-svg-renderer": "^1.6.
|
|
31
|
+
"@antv/g-plugin-dom-interaction": "^1.6.4",
|
|
32
|
+
"@antv/g-plugin-svg-picker": "^1.6.4",
|
|
33
|
+
"@antv/g-plugin-svg-renderer": "^1.6.4",
|
|
34
34
|
"tslib": "^2.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "996b3f3fb678a624832af1966870d63fcdb896a3"
|
|
47
47
|
}
|