@gaoding/editor-sdk
Advanced tools
Comparing version 0.2.4 to 0.2.5-beta
@@ -85,3 +85,3 @@ module.exports = | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 17); | ||
/******/ return __webpack_require__(__webpack_require__.s = 26); | ||
/******/ }) | ||
@@ -112,9 +112,21 @@ /************************************************************************/ | ||
/* 2 */ | ||
/***/ (function(module, exports) { | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
var global = module.exports = typeof window != 'undefined' && window.Math == Math | ||
? window : typeof self != 'undefined' && self.Math == Math ? self | ||
// eslint-disable-next-line no-new-func | ||
: Function('return this')(); | ||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | ||
/***/ }), | ||
/* 3 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var global = __webpack_require__(3); | ||
var global = __webpack_require__(4); | ||
var core = __webpack_require__(0); | ||
var ctx = __webpack_require__(21); | ||
var hide = __webpack_require__(23); | ||
var has = __webpack_require__(8); | ||
var ctx = __webpack_require__(30); | ||
var hide = __webpack_require__(32); | ||
var has = __webpack_require__(13); | ||
var PROTOTYPE = 'prototype'; | ||
@@ -180,3 +192,3 @@ | ||
/***/ }), | ||
/* 3 */ | ||
/* 4 */ | ||
/***/ (function(module, exports) { | ||
@@ -193,3 +205,3 @@ | ||
/***/ }), | ||
/* 4 */ | ||
/* 5 */ | ||
/***/ (function(module, exports) { | ||
@@ -203,3 +215,3 @@ | ||
/***/ }), | ||
/* 5 */ | ||
/* 6 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -214,3 +226,3 @@ | ||
/***/ }), | ||
/* 6 */ | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
@@ -226,11 +238,52 @@ | ||
/***/ }), | ||
/* 7 */ | ||
/* 8 */ | ||
/***/ (function(module, exports) { | ||
var core = module.exports = { version: '2.6.5' }; | ||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(47); | ||
var dP = __webpack_require__(61); | ||
var createDesc = __webpack_require__(66); | ||
module.exports = __webpack_require__(11) ? function (object, key, value) { | ||
return dP.f(object, key, createDesc(1, value)); | ||
} : function (object, key, value) { | ||
object[key] = value; | ||
return object; | ||
}; | ||
/***/ }), | ||
/* 8 */ | ||
/* 10 */ | ||
/***/ (function(module, exports) { | ||
module.exports = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
}; | ||
/***/ }), | ||
/* 11 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// Thank's IE8 for his funny defineProperty | ||
module.exports = !__webpack_require__(20)(function () { | ||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/* 12 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(56); | ||
/***/ }), | ||
/* 13 */ | ||
/***/ (function(module, exports) { | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
@@ -243,3 +296,3 @@ module.exports = function (it, key) { | ||
/***/ }), | ||
/* 9 */ | ||
/* 14 */ | ||
/***/ (function(module, exports) { | ||
@@ -252,8 +305,8 @@ | ||
/***/ }), | ||
/* 10 */ | ||
/* 15 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 19.1.2.14 / 15.2.3.14 Object.keys(O) | ||
var $keys = __webpack_require__(35); | ||
var enumBugKeys = __webpack_require__(44); | ||
var $keys = __webpack_require__(44); | ||
var enumBugKeys = __webpack_require__(53); | ||
@@ -266,8 +319,8 @@ module.exports = Object.keys || function keys(O) { | ||
/***/ }), | ||
/* 11 */ | ||
/* 16 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// to indexed object, toObject with fallback for non-array-like ES3 strings | ||
var IObject = __webpack_require__(12); | ||
var defined = __webpack_require__(6); | ||
var IObject = __webpack_require__(17); | ||
var defined = __webpack_require__(7); | ||
module.exports = function (it) { | ||
@@ -279,7 +332,7 @@ return IObject(defined(it)); | ||
/***/ }), | ||
/* 12 */ | ||
/* 17 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var cof = __webpack_require__(36); | ||
var cof = __webpack_require__(45); | ||
// eslint-disable-next-line no-prototype-builtins | ||
@@ -292,3 +345,3 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | ||
/***/ }), | ||
/* 13 */ | ||
/* 18 */ | ||
/***/ (function(module, exports) { | ||
@@ -305,7 +358,7 @@ | ||
/***/ }), | ||
/* 14 */ | ||
/* 19 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.13 ToObject(argument) | ||
var defined = __webpack_require__(6); | ||
var defined = __webpack_require__(7); | ||
module.exports = function (it) { | ||
@@ -317,22 +370,76 @@ return Object(defined(it)); | ||
/***/ }), | ||
/* 15 */ | ||
/* 20 */ | ||
/***/ (function(module, exports) { | ||
module.exports = function (exec) { | ||
try { | ||
return !!exec(); | ||
} catch (e) { | ||
return true; | ||
} | ||
}; | ||
/***/ }), | ||
/* 21 */ | ||
/***/ (function(module, exports) { | ||
var id = 0; | ||
var px = Math.random(); | ||
module.exports = function (key) { | ||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | ||
}; | ||
/***/ }), | ||
/* 22 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(19); | ||
var core = __webpack_require__(8); | ||
var global = __webpack_require__(2); | ||
var SHARED = '__core-js_shared__'; | ||
var store = global[SHARED] || (global[SHARED] = {}); | ||
(module.exports = function (key, value) { | ||
return store[key] || (store[key] = value !== undefined ? value : {}); | ||
})('versions', []).push({ | ||
version: core.version, | ||
mode: __webpack_require__(70) ? 'pure' : 'global', | ||
copyright: '© 2019 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
/***/ }), | ||
/* 16 */ | ||
/* 23 */ | ||
/***/ (function(module, exports) { | ||
// 7.1.4 ToInteger | ||
var ceil = Math.ceil; | ||
var floor = Math.floor; | ||
module.exports = function (it) { | ||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | ||
}; | ||
/***/ }), | ||
/* 24 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(32); | ||
module.exports = __webpack_require__(28); | ||
/***/ }), | ||
/* 17 */ | ||
/* 25 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(18); | ||
module.exports = __webpack_require__(41); | ||
/***/ }), | ||
/* 26 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(27); | ||
/***/ }), | ||
/* 18 */ | ||
/* 27 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -343,11 +450,14 @@ | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GdEditorSdk", function() { return GdEditorSdk; }); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_parse_float__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_parse_float__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_parse_float__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_parse_float__WEBPACK_IMPORTED_MODULE_0__); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1__); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12); | ||
/* harmony import */ var _Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__); | ||
/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59); | ||
/* harmony import */ var core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__); | ||
var GdEditorSdk = | ||
@@ -365,3 +475,3 @@ /*#__PURE__*/ | ||
this.cb = function (event) { | ||
if (event.origin !== 'https://www.gaoding.com') { | ||
if (!event.origin.includes('.gaoding.com')) { | ||
return false; | ||
@@ -371,3 +481,3 @@ } | ||
if (event.data.action === 'editor.download') { | ||
_this.config.onUpload(event.data.blob); | ||
_this.config.onUpload(event.data.file); | ||
@@ -460,3 +570,4 @@ _this.config.autoClose !== false && _this.close(); | ||
_Users_facai_Desktop_github_editor_sdk_node_modules_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1___default()(ext, { | ||
filterFont: options.filterFont | ||
filterFont: options.filterFont, | ||
buttonText: this.config.buttonText | ||
}); | ||
@@ -479,3 +590,4 @@ | ||
queryUrl += "" + extQuery; | ||
this.frame.src = "https://www.gaoding.com/utm-editors/" + (this.config.appId ? this.config.appId : encodeURIComponent(location.hostname)) + "?" + queryUrl; | ||
this.frame.src = "https://www.gaoding.com/utm-editors/" + (this.config.appId ? this.config.appId : encodeURIComponent(location.hostname)) + "?" + queryUrl; // this.frame!.src = 'http://design.dev.gaoding.com/design?id=112070&third_party=1&' + queryUrl; | ||
document.body.appendChild(this.wrapper); | ||
@@ -554,6 +666,6 @@ } | ||
/***/ }), | ||
/* 19 */ | ||
/* 28 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
__webpack_require__(20); | ||
__webpack_require__(29); | ||
module.exports = __webpack_require__(0).parseFloat; | ||
@@ -563,7 +675,7 @@ | ||
/***/ }), | ||
/* 20 */ | ||
/* 29 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var $export = __webpack_require__(2); | ||
var $parseFloat = __webpack_require__(30); | ||
var $export = __webpack_require__(3); | ||
var $parseFloat = __webpack_require__(39); | ||
// 18.2.4 parseFloat(string) | ||
@@ -574,7 +686,7 @@ $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); | ||
/***/ }), | ||
/* 21 */ | ||
/* 30 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// optional / simple context binding | ||
var aFunction = __webpack_require__(22); | ||
var aFunction = __webpack_require__(31); | ||
module.exports = function (fn, that, length) { | ||
@@ -601,3 +713,3 @@ aFunction(fn); | ||
/***/ }), | ||
/* 22 */ | ||
/* 31 */ | ||
/***/ (function(module, exports) { | ||
@@ -612,8 +724,8 @@ | ||
/***/ }), | ||
/* 23 */ | ||
/* 32 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var dP = __webpack_require__(24); | ||
var createDesc = __webpack_require__(29); | ||
module.exports = __webpack_require__(5) ? function (object, key, value) { | ||
var dP = __webpack_require__(33); | ||
var createDesc = __webpack_require__(38); | ||
module.exports = __webpack_require__(6) ? function (object, key, value) { | ||
return dP.f(object, key, createDesc(1, value)); | ||
@@ -627,11 +739,11 @@ } : function (object, key, value) { | ||
/***/ }), | ||
/* 24 */ | ||
/* 33 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__(25); | ||
var IE8_DOM_DEFINE = __webpack_require__(26); | ||
var toPrimitive = __webpack_require__(28); | ||
var anObject = __webpack_require__(34); | ||
var IE8_DOM_DEFINE = __webpack_require__(35); | ||
var toPrimitive = __webpack_require__(37); | ||
var dP = Object.defineProperty; | ||
exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | ||
exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
@@ -650,6 +762,6 @@ P = toPrimitive(P, true); | ||
/***/ }), | ||
/* 25 */ | ||
/* 34 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(4); | ||
var isObject = __webpack_require__(5); | ||
module.exports = function (it) { | ||
@@ -662,7 +774,7 @@ if (!isObject(it)) throw TypeError(it + ' is not an object!'); | ||
/***/ }), | ||
/* 26 */ | ||
/* 35 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = !__webpack_require__(5) && !__webpack_require__(1)(function () { | ||
return Object.defineProperty(__webpack_require__(27)('div'), 'a', { get: function () { return 7; } }).a != 7; | ||
module.exports = !__webpack_require__(6) && !__webpack_require__(1)(function () { | ||
return Object.defineProperty(__webpack_require__(36)('div'), 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
@@ -672,7 +784,7 @@ | ||
/***/ }), | ||
/* 27 */ | ||
/* 36 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(4); | ||
var document = __webpack_require__(3).document; | ||
var isObject = __webpack_require__(5); | ||
var document = __webpack_require__(4).document; | ||
// typeof document.createElement is 'object' in old IE | ||
@@ -686,7 +798,7 @@ var is = isObject(document) && isObject(document.createElement); | ||
/***/ }), | ||
/* 28 */ | ||
/* 37 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.1 ToPrimitive(input [, PreferredType]) | ||
var isObject = __webpack_require__(4); | ||
var isObject = __webpack_require__(5); | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
@@ -705,3 +817,3 @@ // and the second argument - flag - preferred type is a string | ||
/***/ }), | ||
/* 29 */ | ||
/* 38 */ | ||
/***/ (function(module, exports) { | ||
@@ -720,9 +832,9 @@ | ||
/***/ }), | ||
/* 30 */ | ||
/* 39 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var $parseFloat = __webpack_require__(3).parseFloat; | ||
var $trim = __webpack_require__(31).trim; | ||
var $parseFloat = __webpack_require__(4).parseFloat; | ||
var $trim = __webpack_require__(40).trim; | ||
module.exports = 1 / $parseFloat(__webpack_require__(9) + '-0') !== -Infinity ? function parseFloat(str) { | ||
module.exports = 1 / $parseFloat(__webpack_require__(14) + '-0') !== -Infinity ? function parseFloat(str) { | ||
var string = $trim(String(str), 3); | ||
@@ -735,9 +847,9 @@ var result = $parseFloat(string); | ||
/***/ }), | ||
/* 31 */ | ||
/* 40 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var $export = __webpack_require__(2); | ||
var defined = __webpack_require__(6); | ||
var $export = __webpack_require__(3); | ||
var defined = __webpack_require__(7); | ||
var fails = __webpack_require__(1); | ||
var spaces = __webpack_require__(9); | ||
var spaces = __webpack_require__(14); | ||
var space = '[' + spaces + ']'; | ||
@@ -772,6 +884,6 @@ var non = '\u200b\u0085'; | ||
/***/ }), | ||
/* 32 */ | ||
/* 41 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
__webpack_require__(33); | ||
__webpack_require__(42); | ||
module.exports = __webpack_require__(0).Object.assign; | ||
@@ -781,13 +893,13 @@ | ||
/***/ }), | ||
/* 33 */ | ||
/* 42 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 19.1.3.1 Object.assign(target, source) | ||
var $export = __webpack_require__(2); | ||
var $export = __webpack_require__(3); | ||
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(34) }); | ||
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(43) }); | ||
/***/ }), | ||
/* 34 */ | ||
/* 43 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -798,7 +910,7 @@ | ||
// 19.1.2.1 Object.assign(target, source, ...) | ||
var getKeys = __webpack_require__(10); | ||
var gOPS = __webpack_require__(45); | ||
var pIE = __webpack_require__(46); | ||
var toObject = __webpack_require__(14); | ||
var IObject = __webpack_require__(12); | ||
var getKeys = __webpack_require__(15); | ||
var gOPS = __webpack_require__(54); | ||
var pIE = __webpack_require__(55); | ||
var toObject = __webpack_require__(19); | ||
var IObject = __webpack_require__(17); | ||
var $assign = Object.assign; | ||
@@ -834,9 +946,9 @@ | ||
/***/ }), | ||
/* 35 */ | ||
/* 44 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var has = __webpack_require__(8); | ||
var toIObject = __webpack_require__(11); | ||
var arrayIndexOf = __webpack_require__(37)(false); | ||
var IE_PROTO = __webpack_require__(40)('IE_PROTO'); | ||
var has = __webpack_require__(13); | ||
var toIObject = __webpack_require__(16); | ||
var arrayIndexOf = __webpack_require__(46)(false); | ||
var IE_PROTO = __webpack_require__(49)('IE_PROTO'); | ||
@@ -858,3 +970,3 @@ module.exports = function (object, names) { | ||
/***/ }), | ||
/* 36 */ | ||
/* 45 */ | ||
/***/ (function(module, exports) { | ||
@@ -870,3 +982,3 @@ | ||
/***/ }), | ||
/* 37 */ | ||
/* 46 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -876,5 +988,5 @@ | ||
// true -> Array#includes | ||
var toIObject = __webpack_require__(11); | ||
var toLength = __webpack_require__(38); | ||
var toAbsoluteIndex = __webpack_require__(39); | ||
var toIObject = __webpack_require__(16); | ||
var toLength = __webpack_require__(47); | ||
var toAbsoluteIndex = __webpack_require__(48); | ||
module.exports = function (IS_INCLUDES) { | ||
@@ -901,7 +1013,7 @@ return function ($this, el, fromIndex) { | ||
/***/ }), | ||
/* 38 */ | ||
/* 47 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.15 ToLength | ||
var toInteger = __webpack_require__(13); | ||
var toInteger = __webpack_require__(18); | ||
var min = Math.min; | ||
@@ -914,6 +1026,6 @@ module.exports = function (it) { | ||
/***/ }), | ||
/* 39 */ | ||
/* 48 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toInteger = __webpack_require__(13); | ||
var toInteger = __webpack_require__(18); | ||
var max = Math.max; | ||
@@ -928,7 +1040,7 @@ var min = Math.min; | ||
/***/ }), | ||
/* 40 */ | ||
/* 49 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var shared = __webpack_require__(41)('keys'); | ||
var uid = __webpack_require__(43); | ||
var shared = __webpack_require__(50)('keys'); | ||
var uid = __webpack_require__(52); | ||
module.exports = function (key) { | ||
@@ -940,7 +1052,7 @@ return shared[key] || (shared[key] = uid(key)); | ||
/***/ }), | ||
/* 41 */ | ||
/* 50 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var core = __webpack_require__(0); | ||
var global = __webpack_require__(3); | ||
var global = __webpack_require__(4); | ||
var SHARED = '__core-js_shared__'; | ||
@@ -953,3 +1065,3 @@ var store = global[SHARED] || (global[SHARED] = {}); | ||
version: core.version, | ||
mode: __webpack_require__(42) ? 'pure' : 'global', | ||
mode: __webpack_require__(51) ? 'pure' : 'global', | ||
copyright: '© 2019 Denis Pushkarev (zloirock.ru)' | ||
@@ -960,3 +1072,3 @@ }); | ||
/***/ }), | ||
/* 42 */ | ||
/* 51 */ | ||
/***/ (function(module, exports) { | ||
@@ -968,3 +1080,3 @@ | ||
/***/ }), | ||
/* 43 */ | ||
/* 52 */ | ||
/***/ (function(module, exports) { | ||
@@ -980,3 +1092,3 @@ | ||
/***/ }), | ||
/* 44 */ | ||
/* 53 */ | ||
/***/ (function(module, exports) { | ||
@@ -991,3 +1103,3 @@ | ||
/***/ }), | ||
/* 45 */ | ||
/* 54 */ | ||
/***/ (function(module, exports) { | ||
@@ -999,3 +1111,3 @@ | ||
/***/ }), | ||
/* 46 */ | ||
/* 55 */ | ||
/***/ (function(module, exports) { | ||
@@ -1007,6 +1119,6 @@ | ||
/***/ }), | ||
/* 47 */ | ||
/* 56 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
__webpack_require__(48); | ||
__webpack_require__(57); | ||
module.exports = __webpack_require__(0).Object.keys; | ||
@@ -1016,10 +1128,10 @@ | ||
/***/ }), | ||
/* 48 */ | ||
/* 57 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 19.1.2.14 Object.keys(O) | ||
var toObject = __webpack_require__(14); | ||
var $keys = __webpack_require__(10); | ||
var toObject = __webpack_require__(19); | ||
var $keys = __webpack_require__(15); | ||
__webpack_require__(49)('keys', function () { | ||
__webpack_require__(58)('keys', function () { | ||
return function keys(it) { | ||
@@ -1032,7 +1144,7 @@ return $keys(toObject(it)); | ||
/***/ }), | ||
/* 49 */ | ||
/* 58 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// most Object methods by ES6 should accept primitives | ||
var $export = __webpack_require__(2); | ||
var $export = __webpack_require__(3); | ||
var core = __webpack_require__(0); | ||
@@ -1048,3 +1160,385 @@ var fails = __webpack_require__(1); | ||
/***/ }), | ||
/* 59 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
// https://github.com/tc39/Array.prototype.includes | ||
var $export = __webpack_require__(60); | ||
var $includes = __webpack_require__(73)(true); | ||
$export($export.P, 'Array', { | ||
includes: function includes(el /* , fromIndex = 0 */) { | ||
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); | ||
} | ||
}); | ||
__webpack_require__(80)('includes'); | ||
/***/ }), | ||
/* 60 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var global = __webpack_require__(2); | ||
var core = __webpack_require__(8); | ||
var hide = __webpack_require__(9); | ||
var redefine = __webpack_require__(67); | ||
var ctx = __webpack_require__(71); | ||
var PROTOTYPE = 'prototype'; | ||
var $export = function (type, name, source) { | ||
var IS_FORCED = type & $export.F; | ||
var IS_GLOBAL = type & $export.G; | ||
var IS_STATIC = type & $export.S; | ||
var IS_PROTO = type & $export.P; | ||
var IS_BIND = type & $export.B; | ||
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; | ||
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); | ||
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); | ||
var key, own, out, exp; | ||
if (IS_GLOBAL) source = name; | ||
for (key in source) { | ||
// contains in native | ||
own = !IS_FORCED && target && target[key] !== undefined; | ||
// export native or passed | ||
out = (own ? target : source)[key]; | ||
// bind timers to global for call from export context | ||
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | ||
// extend global | ||
if (target) redefine(target, key, out, type & $export.U); | ||
// export | ||
if (exports[key] != out) hide(exports, key, exp); | ||
if (IS_PROTO && expProto[key] != out) expProto[key] = out; | ||
} | ||
}; | ||
global.core = core; | ||
// type bitmap | ||
$export.F = 1; // forced | ||
$export.G = 2; // global | ||
$export.S = 4; // static | ||
$export.P = 8; // proto | ||
$export.B = 16; // bind | ||
$export.W = 32; // wrap | ||
$export.U = 64; // safe | ||
$export.R = 128; // real proto method for `library` | ||
module.exports = $export; | ||
/***/ }), | ||
/* 61 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var anObject = __webpack_require__(62); | ||
var IE8_DOM_DEFINE = __webpack_require__(63); | ||
var toPrimitive = __webpack_require__(65); | ||
var dP = Object.defineProperty; | ||
exports.f = __webpack_require__(11) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (IE8_DOM_DEFINE) try { | ||
return dP(O, P, Attributes); | ||
} catch (e) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; | ||
/***/ }), | ||
/* 62 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(10); | ||
module.exports = function (it) { | ||
if (!isObject(it)) throw TypeError(it + ' is not an object!'); | ||
return it; | ||
}; | ||
/***/ }), | ||
/* 63 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = !__webpack_require__(11) && !__webpack_require__(20)(function () { | ||
return Object.defineProperty(__webpack_require__(64)('div'), 'a', { get: function () { return 7; } }).a != 7; | ||
}); | ||
/***/ }), | ||
/* 64 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObject = __webpack_require__(10); | ||
var document = __webpack_require__(2).document; | ||
// typeof document.createElement is 'object' in old IE | ||
var is = isObject(document) && isObject(document.createElement); | ||
module.exports = function (it) { | ||
return is ? document.createElement(it) : {}; | ||
}; | ||
/***/ }), | ||
/* 65 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.1 ToPrimitive(input [, PreferredType]) | ||
var isObject = __webpack_require__(10); | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
module.exports = function (it, S) { | ||
if (!isObject(it)) return it; | ||
var fn, val; | ||
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | ||
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
}; | ||
/***/ }), | ||
/* 66 */ | ||
/***/ (function(module, exports) { | ||
module.exports = function (bitmap, value) { | ||
return { | ||
enumerable: !(bitmap & 1), | ||
configurable: !(bitmap & 2), | ||
writable: !(bitmap & 4), | ||
value: value | ||
}; | ||
}; | ||
/***/ }), | ||
/* 67 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var global = __webpack_require__(2); | ||
var hide = __webpack_require__(9); | ||
var has = __webpack_require__(68); | ||
var SRC = __webpack_require__(21)('src'); | ||
var $toString = __webpack_require__(69); | ||
var TO_STRING = 'toString'; | ||
var TPL = ('' + $toString).split(TO_STRING); | ||
__webpack_require__(8).inspectSource = function (it) { | ||
return $toString.call(it); | ||
}; | ||
(module.exports = function (O, key, val, safe) { | ||
var isFunction = typeof val == 'function'; | ||
if (isFunction) has(val, 'name') || hide(val, 'name', key); | ||
if (O[key] === val) return; | ||
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | ||
if (O === global) { | ||
O[key] = val; | ||
} else if (!safe) { | ||
delete O[key]; | ||
hide(O, key, val); | ||
} else if (O[key]) { | ||
O[key] = val; | ||
} else { | ||
hide(O, key, val); | ||
} | ||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, TO_STRING, function toString() { | ||
return typeof this == 'function' && this[SRC] || $toString.call(this); | ||
}); | ||
/***/ }), | ||
/* 68 */ | ||
/***/ (function(module, exports) { | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
module.exports = function (it, key) { | ||
return hasOwnProperty.call(it, key); | ||
}; | ||
/***/ }), | ||
/* 69 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(22)('native-function-to-string', Function.toString); | ||
/***/ }), | ||
/* 70 */ | ||
/***/ (function(module, exports) { | ||
module.exports = false; | ||
/***/ }), | ||
/* 71 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// optional / simple context binding | ||
var aFunction = __webpack_require__(72); | ||
module.exports = function (fn, that, length) { | ||
aFunction(fn); | ||
if (that === undefined) return fn; | ||
switch (length) { | ||
case 1: return function (a) { | ||
return fn.call(that, a); | ||
}; | ||
case 2: return function (a, b) { | ||
return fn.call(that, a, b); | ||
}; | ||
case 3: return function (a, b, c) { | ||
return fn.call(that, a, b, c); | ||
}; | ||
} | ||
return function (/* ...args */) { | ||
return fn.apply(that, arguments); | ||
}; | ||
}; | ||
/***/ }), | ||
/* 72 */ | ||
/***/ (function(module, exports) { | ||
module.exports = function (it) { | ||
if (typeof it != 'function') throw TypeError(it + ' is not a function!'); | ||
return it; | ||
}; | ||
/***/ }), | ||
/* 73 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// false -> Array#indexOf | ||
// true -> Array#includes | ||
var toIObject = __webpack_require__(74); | ||
var toLength = __webpack_require__(78); | ||
var toAbsoluteIndex = __webpack_require__(79); | ||
module.exports = function (IS_INCLUDES) { | ||
return function ($this, el, fromIndex) { | ||
var O = toIObject($this); | ||
var length = toLength(O.length); | ||
var index = toAbsoluteIndex(fromIndex, length); | ||
var value; | ||
// Array#includes uses SameValueZero equality algorithm | ||
// eslint-disable-next-line no-self-compare | ||
if (IS_INCLUDES && el != el) while (length > index) { | ||
value = O[index++]; | ||
// eslint-disable-next-line no-self-compare | ||
if (value != value) return true; | ||
// Array#indexOf ignores holes, Array#includes - not | ||
} else for (;length > index; index++) if (IS_INCLUDES || index in O) { | ||
if (O[index] === el) return IS_INCLUDES || index || 0; | ||
} return !IS_INCLUDES && -1; | ||
}; | ||
}; | ||
/***/ }), | ||
/* 74 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// to indexed object, toObject with fallback for non-array-like ES3 strings | ||
var IObject = __webpack_require__(75); | ||
var defined = __webpack_require__(77); | ||
module.exports = function (it) { | ||
return IObject(defined(it)); | ||
}; | ||
/***/ }), | ||
/* 75 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var cof = __webpack_require__(76); | ||
// eslint-disable-next-line no-prototype-builtins | ||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | ||
return cof(it) == 'String' ? it.split('') : Object(it); | ||
}; | ||
/***/ }), | ||
/* 76 */ | ||
/***/ (function(module, exports) { | ||
var toString = {}.toString; | ||
module.exports = function (it) { | ||
return toString.call(it).slice(8, -1); | ||
}; | ||
/***/ }), | ||
/* 77 */ | ||
/***/ (function(module, exports) { | ||
// 7.2.1 RequireObjectCoercible(argument) | ||
module.exports = function (it) { | ||
if (it == undefined) throw TypeError("Can't call method on " + it); | ||
return it; | ||
}; | ||
/***/ }), | ||
/* 78 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 7.1.15 ToLength | ||
var toInteger = __webpack_require__(23); | ||
var min = Math.min; | ||
module.exports = function (it) { | ||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | ||
}; | ||
/***/ }), | ||
/* 79 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toInteger = __webpack_require__(23); | ||
var max = Math.max; | ||
var min = Math.min; | ||
module.exports = function (index, length) { | ||
index = toInteger(index); | ||
return index < 0 ? max(index + length, 0) : min(index, length); | ||
}; | ||
/***/ }), | ||
/* 80 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
// 22.1.3.31 Array.prototype[@@unscopables] | ||
var UNSCOPABLES = __webpack_require__(81)('unscopables'); | ||
var ArrayProto = Array.prototype; | ||
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(9)(ArrayProto, UNSCOPABLES, {}); | ||
module.exports = function (key) { | ||
ArrayProto[UNSCOPABLES][key] = true; | ||
}; | ||
/***/ }), | ||
/* 81 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var store = __webpack_require__(22)('wks'); | ||
var uid = __webpack_require__(21); | ||
var Symbol = __webpack_require__(2).Symbol; | ||
var USE_SYMBOL = typeof Symbol == 'function'; | ||
var $exports = module.exports = function (name) { | ||
return store[name] || (store[name] = | ||
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | ||
}; | ||
$exports.store = store; | ||
/***/ }) | ||
/******/ ]); |
@@ -1,1 +0,1 @@ | ||
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["gd-editor-sdk"]=e():t["gd-editor-sdk"]=e()})(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=17)}([function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(3),o=n(0),i=n(21),u=n(23),c=n(8),s="prototype",a=function(t,e,n){var f,l,p,d=t&a.F,h=t&a.G,y=t&a.S,m=t&a.P,v=t&a.B,x=t&a.W,g=h?o:o[e]||(o[e]={}),b=g[s],w=h?r:y?r[e]:(r[e]||{})[s];for(f in h&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&c(g,f)||(p=l?w[f]:n[f],g[f]=h&&"function"!=typeof w[f]?n[f]:v&&l?i(p,r):x&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(p):m&&"function"==typeof p?i(Function.call,p):p,m&&((g.virtual||(g.virtual={}))[f]=p,t&a.R&&b&&!b[f]&&u(b,f,p)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){t.exports=!n(1)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){t.exports=n(47)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(35),o=n(44);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(12),o=n(6);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(36);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(6);t.exports=function(t){return Object(r(t))}},function(t,e,n){t.exports=n(19)},function(t,e,n){t.exports=n(32)},function(t,e,n){t.exports=n(18)},function(t,e,n){"use strict";n.r(e),n.d(e,"GdEditorSdk",function(){return a});var r=n(15),o=n.n(r),i=n(16),u=n.n(i),c=n(7),s=n.n(c),a=function(){function t(t){var e=this;if(this.wrapper=null,this.frame=null,this.mask=null,this.container=null,this.cb=function(t){if("https://www.gaoding.com"!==t.origin)return!1;"editor.download"===t.data.action&&(e.config.onUpload(t.data.blob),!1!==e.config.autoClose&&e.close())},!t.onUpload)throw new Error("缺少必填参数 onUpload");this.config=t,this.autoResize(),window.addEventListener("resize",this.autoResize.bind(this))}var e=t.prototype;return e.autoResize=function(){var t=this.container;t&&(t.style.width=Math.max(document.documentElement.clientWidth-100,1280)+"px",t.style.height=Math.max(document.documentElement.clientHeight-80,604)+"px")},e.open=function(t){var e=this;if(window.addEventListener("message",this.cb),!this.wrapper){var n=document.createElement("div");n.className="gaoding-iframe",n.style.position="absolute",n.style.top="0px",n.style.right="0px",n.style.bottom="0px",n.style.left="0px",n.style.zIndex="1000",document.documentElement.clientHeight>800&&(n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center"),this.wrapper=n;var r=this.container=document.createElement("div");r.style.position="relative",r.style.width=Math.max(document.documentElement.clientWidth-100,1280)+"px",r.style.height=Math.max(document.documentElement.clientHeight-80,604)+"px",r.style.minHeight="604px",r.style.margin="50px auto",r.style.background="#fff",r.style.display="block",r.appendChild(this.createCloseBtn()),this.config.style&&s()(this.config.style).forEach(function(t){r.style[t]=e.config.style[t]});var o=document.createElement("iframe");o.style.display="block",o.style.width="100%",o.style.height="100%",o.setAttribute("frameborder","0"),this.frame=o,r.appendChild(o),n.append(r)}this.createMask();var i=t.ext||{};u()(i,{filterFont:t.filterFont});var c=s()(i).reduce(function(t,e){return void 0!==i[e]&&(t+="&"+e+"="+i[e]),t},""),a="";t.filterFont&&(a+="filterFont="+Number(t.filterFont)),a+=""+c,this.frame.src="https://www.gaoding.com/utm-editors/"+(this.config.appId?this.config.appId:encodeURIComponent(location.hostname))+"?"+a,document.body.appendChild(this.wrapper)},e.close=function(){window.removeEventListener("message",this.cb),this.wrapper&&this.wrapper.parentElement&&this.wrapper.parentElement.removeChild(this.wrapper),this.mask&&this.mask.parentElement&&this.mask.parentElement.removeChild(this.mask),window.removeEventListener("resize",this.autoResize.bind(this))},e.createMask=function(){var t=document.createElement("div");t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.bottom="0px",t.style.right="0px",t.style.zIndex=o()(this.wrapper.style.zIndex)-1+"",t.style.backgroundColor="#000",t.style.opacity=".5",this.mask=t,document.body.appendChild(t)},e.createCloseBtn=function(){var t=this,e=document.createElement("div");e.style.fontSize="13px",e.style.width="42px",e.style.height="42px",e.style.textAlign="right",e.style.position="absolute",e.style.right="-42px",e.style.top="0px",e.style.background="#000",e.style.cursor="pointer",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.backgroundRepeat="no-repeat";var n=document.createElement("img");return n.style.display="block",n.style.width="24px",n.src="https://st-gdx.dancf.com/gaodingx/34555636/design/20190509-142237-249d.png",e.appendChild(n),e.addEventListener("click",function(){return t.close()}),e},t}();window&&(window.GdEditorSdk=a)},function(t,e,n){n(20),t.exports=n(0).parseFloat},function(t,e,n){var r=n(2),o=n(30);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){var r=n(22);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(24),o=n(29);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(25),o=n(26),i=n(28),u=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(5)&&!n(1)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(4),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(3).parseFloat,o=n(31).trim;t.exports=1/r(n(9)+"-0")!==-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(2),o=n(6),i=n(1),u=n(9),c="["+u+"]",s=" ",a=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var o={},c=i(function(){return!!u[t]()||s[t]()!=s}),a=o[t]=c?e(p):u[t];n&&(o[n]=a),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},function(t,e,n){n(33),t.exports=n(0).Object.assign},function(t,e,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(34)})},function(t,e,n){"use strict";var r=n(10),o=n(45),i=n(46),u=n(14),c=n(12),s=Object.assign;t.exports=!s||n(1)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){var n=u(t),s=arguments.length,a=1,f=o.f,l=i.f;while(s>a){var p,d=c(arguments[a++]),h=f?r(d).concat(f(d)):r(d),y=h.length,m=0;while(y>m)l.call(d,p=h[m++])&&(n[p]=d[p])}return n}:s},function(t,e,n){var r=n(8),o=n(11),i=n(37)(!1),u=n(40)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,a=[];for(n in c)n!=u&&r(c,n)&&a.push(n);while(e.length>s)r(c,n=e[s++])&&(~i(a,n)||a.push(n));return a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(11),o=n(38),i=n(39);t.exports=function(t){return function(e,n,u){var c,s=r(e),a=o(s.length),f=i(u,a);if(t&&n!=n){while(a>f)if(c=s[f++],c!=c)return!0}else for(;a>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(13),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(13),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(41)("keys"),o=n(43);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(3),i="__core-js_shared__",u=o[i]||(o[i]={});(t.exports=function(t,e){return u[t]||(u[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(42)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){n(48),t.exports=n(0).Object.keys},function(t,e,n){var r=n(14),o=n(10);n(49)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(2),o=n(0),i=n(1);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}}])}); | ||
(function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["gd-editor-sdk"]=n():t["gd-editor-sdk"]=n()})(this,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=26)}([function(t,n){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(4),o=e(0),i=e(30),u=e(32),c=e(13),f="prototype",s=function(t,n,e){var a,l,p,d=t&s.F,h=t&s.G,y=t&s.S,v=t&s.P,x=t&s.B,m=t&s.W,g=h?o:o[n]||(o[n]={}),b=g[f],w=h?r:y?r[n]:(r[n]||{})[f];for(a in h&&(e=n),e)l=!d&&w&&void 0!==w[a],l&&c(g,a)||(p=l?w[a]:e[a],g[a]=h&&"function"!=typeof w[a]?e[a]:x&&l?i(p,r):m&&w[a]==p?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n[f]=t[f],n}(p):v&&"function"==typeof p?i(Function.call,p):p,v&&((g.virtual||(g.virtual={}))[a]=p,t&s.R&&b&&!b[a]&&u(b,a,p)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,n,e){t.exports=!e(1)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(61),o=e(66);t.exports=e(11)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,n,e){t.exports=!e(20)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){t.exports=e(56)},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,n,e){var r=e(44),o=e(53);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(17),o=e(7);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(45);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(7);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){var r=e(8),o=e(2),i="__core-js_shared__",u=o[i]||(o[i]={});(t.exports=function(t,n){return u[t]||(u[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(70)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){t.exports=e(28)},function(t,n,e){t.exports=e(41)},function(t,n,e){t.exports=e(27)},function(t,n,e){"use strict";e.r(n),e.d(n,"GdEditorSdk",function(){return s});var r=e(24),o=e.n(r),i=e(25),u=e.n(i),c=e(12),f=e.n(c),s=(e(59),function(){function t(t){var n=this;if(this.wrapper=null,this.frame=null,this.mask=null,this.container=null,this.cb=function(t){if(!t.origin.includes(".gaoding.com"))return!1;"editor.download"===t.data.action&&(n.config.onUpload(t.data.file),!1!==n.config.autoClose&&n.close())},!t.onUpload)throw new Error("缺少必填参数 onUpload");this.config=t,this.autoResize(),window.addEventListener("resize",this.autoResize.bind(this))}var n=t.prototype;return n.autoResize=function(){var t=this.container;t&&(t.style.width=Math.max(document.documentElement.clientWidth-100,1280)+"px",t.style.height=Math.max(document.documentElement.clientHeight-80,604)+"px")},n.open=function(t){var n=this;if(window.addEventListener("message",this.cb),!this.wrapper){var e=document.createElement("div");e.className="gaoding-iframe",e.style.position="absolute",e.style.top="0px",e.style.right="0px",e.style.bottom="0px",e.style.left="0px",e.style.zIndex="1000",document.documentElement.clientHeight>800&&(e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center"),this.wrapper=e;var r=this.container=document.createElement("div");r.style.position="relative",r.style.width=Math.max(document.documentElement.clientWidth-100,1280)+"px",r.style.height=Math.max(document.documentElement.clientHeight-80,604)+"px",r.style.minHeight="604px",r.style.margin="50px auto",r.style.background="#fff",r.style.display="block",r.appendChild(this.createCloseBtn()),this.config.style&&f()(this.config.style).forEach(function(t){r.style[t]=n.config.style[t]});var o=document.createElement("iframe");o.style.display="block",o.style.width="100%",o.style.height="100%",o.setAttribute("frameborder","0"),this.frame=o,r.appendChild(o),e.append(r)}this.createMask();var i=t.ext||{};u()(i,{filterFont:t.filterFont,buttonText:this.config.buttonText});var c=f()(i).reduce(function(t,n){return void 0!==i[n]&&(t+="&"+n+"="+i[n]),t},""),s="";t.filterFont&&(s+="filterFont="+Number(t.filterFont)),s+=""+c,this.frame.src="https://www.gaoding.com/utm-editors/"+(this.config.appId?this.config.appId:encodeURIComponent(location.hostname))+"?"+s,document.body.appendChild(this.wrapper)},n.close=function(){window.removeEventListener("message",this.cb),this.wrapper&&this.wrapper.parentElement&&this.wrapper.parentElement.removeChild(this.wrapper),this.mask&&this.mask.parentElement&&this.mask.parentElement.removeChild(this.mask),window.removeEventListener("resize",this.autoResize.bind(this))},n.createMask=function(){var t=document.createElement("div");t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.bottom="0px",t.style.right="0px",t.style.zIndex=o()(this.wrapper.style.zIndex)-1+"",t.style.backgroundColor="#000",t.style.opacity=".5",this.mask=t,document.body.appendChild(t)},n.createCloseBtn=function(){var t=this,n=document.createElement("div");n.style.fontSize="13px",n.style.width="42px",n.style.height="42px",n.style.textAlign="right",n.style.position="absolute",n.style.right="-42px",n.style.top="0px",n.style.background="#000",n.style.cursor="pointer",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.backgroundRepeat="no-repeat";var e=document.createElement("img");return e.style.display="block",e.style.width="24px",e.src="https://st-gdx.dancf.com/gaodingx/34555636/design/20190509-142237-249d.png",n.appendChild(e),n.addEventListener("click",function(){return t.close()}),n},t}());window&&(window.GdEditorSdk=s)},function(t,n,e){e(29),t.exports=e(0).parseFloat},function(t,n,e){var r=e(3),o=e(39);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,n,e){var r=e(31);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(33),o=e(38);t.exports=e(6)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(34),o=e(35),i=e(37),u=Object.defineProperty;n.f=e(6)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(6)&&!e(1)(function(){return 7!=Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(5),o=e(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(5);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(4).parseFloat,o=e(40).trim;t.exports=1/r(e(14)+"-0")!==-1/0?function(t){var n=o(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(3),o=e(7),i=e(1),u=e(14),c="["+u+"]",f=" ",s=RegExp("^"+c+c+"*"),a=RegExp(c+c+"*$"),l=function(t,n,e){var o={},c=i(function(){return!!u[t]()||f[t]()!=f}),s=o[t]=c?n(p):u[t];e&&(o[e]=s),r(r.P+r.F*c,"String",o)},p=l.trim=function(t,n){return t=String(o(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(a,"")),t};t.exports=l},function(t,n,e){e(42),t.exports=e(0).Object.assign},function(t,n,e){var r=e(3);r(r.S+r.F,"Object",{assign:e(43)})},function(t,n,e){"use strict";var r=e(15),o=e(54),i=e(55),u=e(19),c=e(17),f=Object.assign;t.exports=!f||e(1)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=f({},t)[e]||Object.keys(f({},n)).join("")!=r})?function(t,n){var e=u(t),f=arguments.length,s=1,a=o.f,l=i.f;while(f>s){var p,d=c(arguments[s++]),h=a?r(d).concat(a(d)):r(d),y=h.length,v=0;while(y>v)l.call(d,p=h[v++])&&(e[p]=d[p])}return e}:f},function(t,n,e){var r=e(13),o=e(16),i=e(46)(!1),u=e(49)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),f=0,s=[];for(e in c)e!=u&&r(c,e)&&s.push(e);while(n.length>f)r(c,e=n[f++])&&(~i(s,e)||s.push(e));return s}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(16),o=e(47),i=e(48);t.exports=function(t){return function(n,e,u){var c,f=r(n),s=o(f.length),a=i(u,s);if(t&&e!=e){while(s>a)if(c=f[a++],c!=c)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===e)return t||a||0;return!t&&-1}}},function(t,n,e){var r=e(18),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(18),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(50)("keys"),o=e(52);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(0),o=e(4),i="__core-js_shared__",u=o[i]||(o[i]={});(t.exports=function(t,n){return u[t]||(u[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(51)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!0},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){e(57),t.exports=e(0).Object.keys},function(t,n,e){var r=e(19),o=e(15);e(58)("keys",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(3),o=e(0),i=e(1);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){"use strict";var r=e(60),o=e(73)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e(80)("includes")},function(t,n,e){var r=e(2),o=e(8),i=e(9),u=e(67),c=e(71),f="prototype",s=function(t,n,e){var a,l,p,d,h=t&s.F,y=t&s.G,v=t&s.S,x=t&s.P,m=t&s.B,g=y?r:v?r[n]||(r[n]={}):(r[n]||{})[f],b=y?o:o[n]||(o[n]={}),w=b[f]||(b[f]={});for(a in y&&(e=n),e)l=!h&&g&&void 0!==g[a],p=(l?g:e)[a],d=m&&l?c(p,r):x&&"function"==typeof p?c(Function.call,p):p,g&&u(g,a,p,t&s.U),b[a]!=p&&i(b,a,d),x&&w[a]!=p&&(w[a]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n,e){var r=e(62),o=e(63),i=e(65),u=Object.defineProperty;n.f=e(11)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(10);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){t.exports=!e(11)&&!e(20)(function(){return 7!=Object.defineProperty(e(64)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(10),o=e(2).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(10);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(2),o=e(9),i=e(68),u=e(21)("src"),c=e(69),f="toString",s=(""+c).split(f);e(8).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var f="function"==typeof e;f&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(f&&(i(e,u)||o(e,u,t[n]?""+t[n]:s.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,f,function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){t.exports=e(22)("native-function-to-string",Function.toString)},function(t,n){t.exports=!1},function(t,n,e){var r=e(72);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(74),o=e(78),i=e(79);t.exports=function(t){return function(n,e,u){var c,f=r(n),s=o(f.length),a=i(u,s);if(t&&e!=e){while(s>a)if(c=f[a++],c!=c)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===e)return t||a||0;return!t&&-1}}},function(t,n,e){var r=e(75),o=e(77);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(76);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(23),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(23),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(81)("unscopables"),o=Array.prototype;void 0==o[r]&&e(9)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,n,e){var r=e(22)("wks"),o=e(21),i=e(2).Symbol,u="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))};c.store=r}])}); |
@@ -16,2 +16,8 @@ interface IConfig { | ||
/** | ||
* 提供按钮文案自定义,默认为“完成” | ||
* @type {{[k: string]: string}} | ||
* @memberof IConfig | ||
*/ | ||
buttonText?: string; | ||
/** | ||
* 自定义iFrame样式 | ||
@@ -18,0 +24,0 @@ * @type {{[k: string]: string}} |
@@ -11,7 +11,7 @@ "use strict"; | ||
this.cb = function (event) { | ||
if (event.origin !== 'https://www.gaoding.com') { | ||
if (!event.origin.includes('.gaoding.com')) { | ||
return false; | ||
} | ||
if (event.data.action === 'editor.download') { | ||
_this.config.onUpload(event.data.blob); | ||
_this.config.onUpload(event.data.file); | ||
_this.config.autoClose !== false && _this.close(); | ||
@@ -88,2 +88,3 @@ } | ||
filterFont: options.filterFont, | ||
buttonText: this.config.buttonText | ||
}); | ||
@@ -104,2 +105,3 @@ var extQuery = Object.keys(ext).reduce(function (str, key) { | ||
: encodeURIComponent(location.hostname)) + "?" + queryUrl; | ||
// this.frame!.src = 'http://design.dev.gaoding.com/design?id=112070&third_party=1&' + queryUrl; | ||
document.body.appendChild(this.wrapper); | ||
@@ -106,0 +108,0 @@ }; |
{ | ||
"name": "@gaoding/editor-sdk", | ||
"version": "0.2.4", | ||
"version": "0.2.5-beta", | ||
"description": "稿定编辑器对外 SDK", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
# 稿定编辑器 SDK 接入说明 | ||
稿定编辑器 `SDK` 是对稿定能力的封装,以实现对设计服务的无缝对接,目前支持以下服务: | ||
稿定编辑器 SDK 是对稿定能力的封装,以实现对设计服务的无缝对接,目前支持以下服务: | ||
@@ -9,2 +9,4 @@ - [x] 平面编辑器 | ||
NPM 包参见:[@gaoding/editor-sdk](https://www.npmjs.com/package/@gaoding/editor-sdk) | ||
### 平面编辑器 | ||
@@ -25,3 +27,5 @@ 1. 海量创意模板快速生成 | ||
### 在接入前,要做什么? | ||
请先与我们联系(邮箱:`bd@gaoding.com`),以便我们安排专人接待,为合作方预设一些关键数据,如: `APPID`、`模板类目ID` | ||
请先与我们联系(邮箱:`bd@gaoding.com`), | ||
**我们需要合作方提供企业以及接入域名等信息**, | ||
以便我们安排专人接待,为合作方预设一些关键数据,如: `APPID`、`模板类目ID` | ||
@@ -42,9 +46,11 @@ ### 对接与调试 | ||
const sdk = new GdEditorSdk({ | ||
const gdEditorSDK = new GdEditorSdk({ | ||
// 区分编辑器类型 (图片编辑器、平面编辑器、H5编辑器) | ||
appId: '由SDK方提供', | ||
// onUpload 执行后,是否自动关闭弹窗,默认为 true | ||
autoClose: true; | ||
autoClose: true, | ||
// 完成按钮文案默认“完成” | ||
buttonText: '完成', | ||
// 完成编辑器下载时触发 | ||
onUpload(blob) { | ||
onUpload({ filename, blob, workId, sourceId }) { | ||
// 直接展示 | ||
@@ -69,6 +75,6 @@ const url = window.URL.createObjectURL(blob); | ||
style: {} | ||
}) | ||
}); | ||
// 打开弹窗 | ||
sdk.open({ | ||
gdEditorSDK.open({ | ||
ext: { | ||
@@ -84,3 +90,3 @@ // 指定海报模板类目(图片、简历、GIF、LOGO、海报、表情头像、文章配图、适配封面。。。) | ||
// 关闭弹窗 | ||
sdk.close(); | ||
gdEditorSDK.close(); | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
72563
1421
88
0