@harbour-enterprises/superdoc 0.13.2-rev5 → 0.13.2-rev6
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/chunks/{index-B4J7wgs6.cjs → index-B0t3i_io.cjs} +1 -1
- package/dist/chunks/{index-Cdsq63Xq.cjs → index-Bk160jQ2.cjs} +2 -2
- package/dist/chunks/{index-Diu6UKHt.es.js → index-D_HUrFWV.es.js} +2 -2
- package/dist/chunks/{index-Hr3Um-Bg.es.js → index-KzH9VKHh.es.js} +1 -1
- package/dist/chunks/{super-editor.es-8qHwmdQ6.cjs → super-editor.es-BTxObl3D.cjs} +30 -8
- package/dist/chunks/{super-editor.es-Dz4VUz6_.es.js → super-editor.es-Dc89JIQn.es.js} +30 -8
- package/dist/chunks/{url-BIzg4y2i.cjs → url-CWyTQ-Xy.cjs} +1 -1
- package/dist/chunks/{url-CHayXMZH.es.js → url-DsBQArCl.es.js} +1 -1
- package/dist/chunks/{xml-js-BjqmFOSP.cjs → xml-js-Bu1ZZzmb.cjs} +79 -100
- package/dist/chunks/{xml-js-CfClL-1b.es.js → xml-js-CdiD26MJ.es.js} +79 -100
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CtLZIbF7.js → converter-DZFBaVFd.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-JbUHPfi1.js → docx-zipper-dbI_Pbue.js} +1 -1
- package/dist/super-editor/chunks/{editor-CNrlIkRQ.js → editor-Bz5BbOEe.js} +30 -8
- package/dist/super-editor/chunks/{toolbar-BhoFnMH2.js → toolbar-C07jc7pa.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts +6 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +5 -5
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +31 -9
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
3
|
const vue = require("./vue-HIY1g7dm.cjs");
|
|
4
|
-
const xmlJs = require("./xml-js-
|
|
5
|
-
const url = require("./url-
|
|
4
|
+
const xmlJs = require("./xml-js-Bu1ZZzmb.cjs");
|
|
5
|
+
const url = require("./url-CWyTQ-Xy.cjs");
|
|
6
6
|
function _mergeNamespaces(n, m) {
|
|
7
7
|
for (var i = 0; i < m.length; i++) {
|
|
8
8
|
const e = m[i];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
|
|
2
2
|
import { p as process$1 } from "./vue-Bi1uWinj.es.js";
|
|
3
|
-
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-
|
|
4
|
-
import { u as url } from "./url-
|
|
3
|
+
import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-CdiD26MJ.es.js";
|
|
4
|
+
import { u as url } from "./url-DsBQArCl.es.js";
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
6
6
|
for (var i = 0; i < m.length; i++) {
|
|
7
7
|
const e = m[i];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
|
|
2
|
-
import { s as streamHttp, r as require$$1 } from "./index-
|
|
2
|
+
import { s as streamHttp, r as require$$1 } from "./index-D_HUrFWV.es.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
5
5
|
const e = m[i];
|
|
@@ -23989,7 +23989,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23989
23989
|
return;
|
|
23990
23990
|
}
|
|
23991
23991
|
}
|
|
23992
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-
|
|
23992
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev6") {
|
|
23993
23993
|
const customLocation = "docProps/custom.xml";
|
|
23994
23994
|
if (!docx[customLocation]) {
|
|
23995
23995
|
docx[customLocation] = generateCustomXml();
|
|
@@ -24456,7 +24456,7 @@ function storeSuperdocVersion(docx) {
|
|
|
24456
24456
|
function generateCustomXml() {
|
|
24457
24457
|
return DEFAULT_CUSTOM_XML;
|
|
24458
24458
|
}
|
|
24459
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-
|
|
24459
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev6") {
|
|
24460
24460
|
return {
|
|
24461
24461
|
type: "element",
|
|
24462
24462
|
name: "property",
|
|
@@ -39287,14 +39287,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
|
39287
39287
|
});
|
|
39288
39288
|
});
|
|
39289
39289
|
};
|
|
39290
|
-
const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
|
|
39290
|
+
const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
|
|
39291
39291
|
editor.converter.headerEditors.forEach((item) => {
|
|
39292
39292
|
item.editor.setEditable(isEditMode, false);
|
|
39293
39293
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39294
|
+
item.editor.view.dom.setAttribute("documentmode", documentMode);
|
|
39294
39295
|
});
|
|
39295
39296
|
editor.converter.footerEditors.forEach((item) => {
|
|
39296
39297
|
item.editor.setEditable(isEditMode, false);
|
|
39297
39298
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39299
|
+
item.editor.view.dom.setAttribute("documentmode", documentMode);
|
|
39298
39300
|
});
|
|
39299
39301
|
if (isEditMode) {
|
|
39300
39302
|
const pm = document.querySelector(".ProseMirror");
|
|
@@ -40826,7 +40828,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40826
40828
|
this.commands.toggleTrackChangesShowOriginal();
|
|
40827
40829
|
this.setEditable(false, false);
|
|
40828
40830
|
this.setOptions({ documentMode: "viewing" });
|
|
40829
|
-
toggleHeaderFooterEditMode(
|
|
40831
|
+
toggleHeaderFooterEditMode({
|
|
40832
|
+
editor: this,
|
|
40833
|
+
focusedSectionEditor: null,
|
|
40834
|
+
isEditMode: false,
|
|
40835
|
+
documentMode: cleanedMode
|
|
40836
|
+
});
|
|
40830
40837
|
} else if (cleanedMode === "suggesting") {
|
|
40831
40838
|
__privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
|
|
40832
40839
|
this.commands.disableTrackChangesShowOriginal();
|
|
@@ -40839,7 +40846,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40839
40846
|
this.commands.disableTrackChanges();
|
|
40840
40847
|
this.setEditable(true, false);
|
|
40841
40848
|
this.setOptions({ documentMode: "editing" });
|
|
40842
|
-
toggleHeaderFooterEditMode(
|
|
40849
|
+
toggleHeaderFooterEditMode({
|
|
40850
|
+
editor: this,
|
|
40851
|
+
focusedSectionEditor: null,
|
|
40852
|
+
isEditMode: false,
|
|
40853
|
+
documentMode: cleanedMode
|
|
40854
|
+
});
|
|
40843
40855
|
}
|
|
40844
40856
|
}
|
|
40845
40857
|
/**
|
|
@@ -41313,7 +41325,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41313
41325
|
* @returns {Object | void} Migration results
|
|
41314
41326
|
*/
|
|
41315
41327
|
processCollaborationMigrations() {
|
|
41316
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-
|
|
41328
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev6");
|
|
41317
41329
|
if (!this.options.ydoc) return;
|
|
41318
41330
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41319
41331
|
let docVersion = metaMap.get("version");
|
|
@@ -41696,7 +41708,12 @@ createView_fn = function(element) {
|
|
|
41696
41708
|
event.stopPropagation();
|
|
41697
41709
|
if (!this.options.editable) {
|
|
41698
41710
|
this.setEditable(true, false);
|
|
41699
|
-
toggleHeaderFooterEditMode(
|
|
41711
|
+
toggleHeaderFooterEditMode({
|
|
41712
|
+
editor: this,
|
|
41713
|
+
focusedSectionEditor: null,
|
|
41714
|
+
isEditMode: false,
|
|
41715
|
+
documentMode: this.options.documentMode
|
|
41716
|
+
});
|
|
41700
41717
|
const pm = document.querySelector(".ProseMirror");
|
|
41701
41718
|
pm.classList.remove("header-footer-edit");
|
|
41702
41719
|
pm.setAttribute("aria-readonly", false);
|
|
@@ -54757,7 +54774,12 @@ const getHeaderFooterEditorKey = ({
|
|
|
54757
54774
|
const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
|
|
54758
54775
|
if (editor.options.documentMode !== "editing") return;
|
|
54759
54776
|
editor.setEditable(false, false);
|
|
54760
|
-
toggleHeaderFooterEditMode(
|
|
54777
|
+
toggleHeaderFooterEditMode({
|
|
54778
|
+
editor,
|
|
54779
|
+
focusedSectionEditor: currentFocusedSectionEditor,
|
|
54780
|
+
isEditMode: true,
|
|
54781
|
+
documentMode: editor.options.documentMode
|
|
54782
|
+
});
|
|
54761
54783
|
};
|
|
54762
54784
|
function createPageBreak({ editor, header, footer, footerBottom = null, isFirstHeader, isLastFooter, isInTable: isInTable2 = false }) {
|
|
54763
54785
|
const { pageSize, pageMargins } = editor.converter.pageStyles;
|
|
@@ -23972,7 +23972,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
23972
23972
|
return;
|
|
23973
23973
|
}
|
|
23974
23974
|
}
|
|
23975
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-
|
|
23975
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev6") {
|
|
23976
23976
|
const customLocation = "docProps/custom.xml";
|
|
23977
23977
|
if (!docx[customLocation]) {
|
|
23978
23978
|
docx[customLocation] = generateCustomXml();
|
|
@@ -24439,7 +24439,7 @@ function storeSuperdocVersion(docx) {
|
|
|
24439
24439
|
function generateCustomXml() {
|
|
24440
24440
|
return DEFAULT_CUSTOM_XML;
|
|
24441
24441
|
}
|
|
24442
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-
|
|
24442
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev6") {
|
|
24443
24443
|
return {
|
|
24444
24444
|
type: "element",
|
|
24445
24445
|
name: "property",
|
|
@@ -39270,14 +39270,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
|
|
|
39270
39270
|
});
|
|
39271
39271
|
});
|
|
39272
39272
|
};
|
|
39273
|
-
const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
|
|
39273
|
+
const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
|
|
39274
39274
|
editor.converter.headerEditors.forEach((item) => {
|
|
39275
39275
|
item.editor.setEditable(isEditMode, false);
|
|
39276
39276
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39277
|
+
item.editor.view.dom.setAttribute("documentmode", documentMode);
|
|
39277
39278
|
});
|
|
39278
39279
|
editor.converter.footerEditors.forEach((item) => {
|
|
39279
39280
|
item.editor.setEditable(isEditMode, false);
|
|
39280
39281
|
item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
|
|
39282
|
+
item.editor.view.dom.setAttribute("documentmode", documentMode);
|
|
39281
39283
|
});
|
|
39282
39284
|
if (isEditMode) {
|
|
39283
39285
|
const pm = document.querySelector(".ProseMirror");
|
|
@@ -40809,7 +40811,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40809
40811
|
this.commands.toggleTrackChangesShowOriginal();
|
|
40810
40812
|
this.setEditable(false, false);
|
|
40811
40813
|
this.setOptions({ documentMode: "viewing" });
|
|
40812
|
-
toggleHeaderFooterEditMode(
|
|
40814
|
+
toggleHeaderFooterEditMode({
|
|
40815
|
+
editor: this,
|
|
40816
|
+
focusedSectionEditor: null,
|
|
40817
|
+
isEditMode: false,
|
|
40818
|
+
documentMode: cleanedMode
|
|
40819
|
+
});
|
|
40813
40820
|
} else if (cleanedMode === "suggesting") {
|
|
40814
40821
|
__privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
|
|
40815
40822
|
this.commands.disableTrackChangesShowOriginal();
|
|
@@ -40822,7 +40829,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
40822
40829
|
this.commands.disableTrackChanges();
|
|
40823
40830
|
this.setEditable(true, false);
|
|
40824
40831
|
this.setOptions({ documentMode: "editing" });
|
|
40825
|
-
toggleHeaderFooterEditMode(
|
|
40832
|
+
toggleHeaderFooterEditMode({
|
|
40833
|
+
editor: this,
|
|
40834
|
+
focusedSectionEditor: null,
|
|
40835
|
+
isEditMode: false,
|
|
40836
|
+
documentMode: cleanedMode
|
|
40837
|
+
});
|
|
40826
40838
|
}
|
|
40827
40839
|
}
|
|
40828
40840
|
/**
|
|
@@ -41296,7 +41308,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
41296
41308
|
* @returns {Object | void} Migration results
|
|
41297
41309
|
*/
|
|
41298
41310
|
processCollaborationMigrations() {
|
|
41299
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-
|
|
41311
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev6");
|
|
41300
41312
|
if (!this.options.ydoc) return;
|
|
41301
41313
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
41302
41314
|
let docVersion = metaMap.get("version");
|
|
@@ -41679,7 +41691,12 @@ createView_fn = function(element) {
|
|
|
41679
41691
|
event.stopPropagation();
|
|
41680
41692
|
if (!this.options.editable) {
|
|
41681
41693
|
this.setEditable(true, false);
|
|
41682
|
-
toggleHeaderFooterEditMode(
|
|
41694
|
+
toggleHeaderFooterEditMode({
|
|
41695
|
+
editor: this,
|
|
41696
|
+
focusedSectionEditor: null,
|
|
41697
|
+
isEditMode: false,
|
|
41698
|
+
documentMode: this.options.documentMode
|
|
41699
|
+
});
|
|
41683
41700
|
const pm = document.querySelector(".ProseMirror");
|
|
41684
41701
|
pm.classList.remove("header-footer-edit");
|
|
41685
41702
|
pm.setAttribute("aria-readonly", false);
|
|
@@ -54740,7 +54757,12 @@ const getHeaderFooterEditorKey = ({
|
|
|
54740
54757
|
const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
|
|
54741
54758
|
if (editor.options.documentMode !== "editing") return;
|
|
54742
54759
|
editor.setEditable(false, false);
|
|
54743
|
-
toggleHeaderFooterEditMode(
|
|
54760
|
+
toggleHeaderFooterEditMode({
|
|
54761
|
+
editor,
|
|
54762
|
+
focusedSectionEditor: currentFocusedSectionEditor,
|
|
54763
|
+
isEditMode: true,
|
|
54764
|
+
documentMode: editor.options.documentMode
|
|
54765
|
+
});
|
|
54744
54766
|
};
|
|
54745
54767
|
function createPageBreak({ editor, header, footer, footerBottom = null, isFirstHeader, isLastFooter, isInTable: isInTable2 = false }) {
|
|
54746
54768
|
const { pageSize, pageMargins } = editor.converter.pageStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-BTAcmbVg.cjs");
|
|
3
|
-
const xmlJs = require("./xml-js-
|
|
3
|
+
const xmlJs = require("./xml-js-Bu1ZZzmb.cjs");
|
|
4
4
|
const __viteBrowserExternal = require("./__vite-browser-external-DWbQq7bv.cjs");
|
|
5
5
|
var punycode$1 = { exports: {} };
|
|
6
6
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-DckFs3A7.es.js";
|
|
2
|
-
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-
|
|
2
|
+
import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-CdiD26MJ.es.js";
|
|
3
3
|
import { _ as __viteBrowserExternal } from "./__vite-browser-external-CURh0WXD.es.js";
|
|
4
4
|
var punycode$1 = { exports: {} };
|
|
5
5
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
@@ -457,7 +457,7 @@ var type = TypeError;
|
|
|
457
457
|
var uri = URIError;
|
|
458
458
|
var abs$1 = Math.abs;
|
|
459
459
|
var floor$1 = Math.floor;
|
|
460
|
-
var max$
|
|
460
|
+
var max$2 = Math.max;
|
|
461
461
|
var min$1 = Math.min;
|
|
462
462
|
var pow$1 = Math.pow;
|
|
463
463
|
var round$1 = Math.round;
|
|
@@ -517,99 +517,78 @@ function requireHasSymbols() {
|
|
|
517
517
|
var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
518
518
|
var $Object$2 = esObjectAtoms;
|
|
519
519
|
var Object_getPrototypeOf = $Object$2.getPrototypeOf || null;
|
|
520
|
-
var
|
|
521
|
-
var
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
var
|
|
526
|
-
var
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
var str = "";
|
|
548
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
549
|
-
str += arr[i];
|
|
550
|
-
if (i + 1 < arr.length) {
|
|
551
|
-
str += joiner;
|
|
552
|
-
}
|
|
520
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
521
|
+
var toStr$3 = Object.prototype.toString;
|
|
522
|
+
var max$1 = Math.max;
|
|
523
|
+
var funcType = "[object Function]";
|
|
524
|
+
var concatty = function concatty2(a, b) {
|
|
525
|
+
var arr = [];
|
|
526
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
527
|
+
arr[i] = a[i];
|
|
528
|
+
}
|
|
529
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
530
|
+
arr[j + a.length] = b[j];
|
|
531
|
+
}
|
|
532
|
+
return arr;
|
|
533
|
+
};
|
|
534
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
535
|
+
var arr = [];
|
|
536
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
537
|
+
arr[j] = arrLike[i];
|
|
538
|
+
}
|
|
539
|
+
return arr;
|
|
540
|
+
};
|
|
541
|
+
var joiny = function(arr, joiner) {
|
|
542
|
+
var str = "";
|
|
543
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
544
|
+
str += arr[i];
|
|
545
|
+
if (i + 1 < arr.length) {
|
|
546
|
+
str += joiner;
|
|
553
547
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
);
|
|
569
|
-
if (Object(result) === result) {
|
|
570
|
-
return result;
|
|
571
|
-
}
|
|
572
|
-
return this;
|
|
573
|
-
}
|
|
574
|
-
return target.apply(
|
|
575
|
-
that,
|
|
548
|
+
}
|
|
549
|
+
return str;
|
|
550
|
+
};
|
|
551
|
+
var implementation$1 = function bind(that) {
|
|
552
|
+
var target = this;
|
|
553
|
+
if (typeof target !== "function" || toStr$3.apply(target) !== funcType) {
|
|
554
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
555
|
+
}
|
|
556
|
+
var args = slicy(arguments, 1);
|
|
557
|
+
var bound;
|
|
558
|
+
var binder = function() {
|
|
559
|
+
if (this instanceof bound) {
|
|
560
|
+
var result = target.apply(
|
|
561
|
+
this,
|
|
576
562
|
concatty(args, arguments)
|
|
577
563
|
);
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
boundArgs[i] = "$" + i;
|
|
583
|
-
}
|
|
584
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
585
|
-
if (target.prototype) {
|
|
586
|
-
var Empty = function Empty2() {
|
|
587
|
-
};
|
|
588
|
-
Empty.prototype = target.prototype;
|
|
589
|
-
bound.prototype = new Empty();
|
|
590
|
-
Empty.prototype = null;
|
|
564
|
+
if (Object(result) === result) {
|
|
565
|
+
return result;
|
|
566
|
+
}
|
|
567
|
+
return this;
|
|
591
568
|
}
|
|
592
|
-
return
|
|
569
|
+
return target.apply(
|
|
570
|
+
that,
|
|
571
|
+
concatty(args, arguments)
|
|
572
|
+
);
|
|
593
573
|
};
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
574
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
575
|
+
var boundArgs = [];
|
|
576
|
+
for (var i = 0; i < boundLength; i++) {
|
|
577
|
+
boundArgs[i] = "$" + i;
|
|
578
|
+
}
|
|
579
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
580
|
+
if (target.prototype) {
|
|
581
|
+
var Empty = function Empty2() {
|
|
582
|
+
};
|
|
583
|
+
Empty.prototype = target.prototype;
|
|
584
|
+
bound.prototype = new Empty();
|
|
585
|
+
Empty.prototype = null;
|
|
586
|
+
}
|
|
587
|
+
return bound;
|
|
588
|
+
};
|
|
589
|
+
var implementation = implementation$1;
|
|
590
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
591
|
+
var functionCall = Function.prototype.call;
|
|
613
592
|
var functionApply;
|
|
614
593
|
var hasRequiredFunctionApply;
|
|
615
594
|
function requireFunctionApply() {
|
|
@@ -619,14 +598,14 @@ function requireFunctionApply() {
|
|
|
619
598
|
return functionApply;
|
|
620
599
|
}
|
|
621
600
|
var reflectApply$1 = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
622
|
-
var bind$3 =
|
|
601
|
+
var bind$3 = functionBind;
|
|
623
602
|
var $apply$2 = requireFunctionApply();
|
|
624
|
-
var $call$2 =
|
|
603
|
+
var $call$2 = functionCall;
|
|
625
604
|
var $reflectApply = reflectApply$1;
|
|
626
605
|
var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
|
|
627
|
-
var bind$2 =
|
|
606
|
+
var bind$2 = functionBind;
|
|
628
607
|
var $TypeError$4 = type;
|
|
629
|
-
var $call$1 =
|
|
608
|
+
var $call$1 = functionCall;
|
|
630
609
|
var $actualApply = actualApply$1;
|
|
631
610
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
632
611
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -678,8 +657,8 @@ function requireHasown() {
|
|
|
678
657
|
hasRequiredHasown = 1;
|
|
679
658
|
var call = Function.prototype.call;
|
|
680
659
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
681
|
-
var
|
|
682
|
-
hasown =
|
|
660
|
+
var bind3 = functionBind;
|
|
661
|
+
hasown = bind3.call(call, $hasOwn);
|
|
683
662
|
return hasown;
|
|
684
663
|
}
|
|
685
664
|
var undefined$1;
|
|
@@ -693,7 +672,7 @@ var $TypeError$3 = type;
|
|
|
693
672
|
var $URIError = uri;
|
|
694
673
|
var abs = abs$1;
|
|
695
674
|
var floor = floor$1;
|
|
696
|
-
var max = max$
|
|
675
|
+
var max = max$2;
|
|
697
676
|
var min = min$1;
|
|
698
677
|
var pow = pow$1;
|
|
699
678
|
var round = round$1;
|
|
@@ -727,7 +706,7 @@ var getProto$2 = getProto$3;
|
|
|
727
706
|
var $ObjectGPO = Object_getPrototypeOf;
|
|
728
707
|
var $ReflectGPO = Reflect_getPrototypeOf;
|
|
729
708
|
var $apply$1 = requireFunctionApply();
|
|
730
|
-
var $call =
|
|
709
|
+
var $call = functionCall;
|
|
731
710
|
var needsEval = {};
|
|
732
711
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto$2 ? undefined$1 : getProto$2(Uint8Array);
|
|
733
712
|
var INTRINSICS = {
|
|
@@ -898,7 +877,7 @@ var LEGACY_ALIASES = {
|
|
|
898
877
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
899
878
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
900
879
|
};
|
|
901
|
-
var bind$1 =
|
|
880
|
+
var bind$1 = functionBind;
|
|
902
881
|
var hasOwn$1 = requireHasown();
|
|
903
882
|
var $concat = bind$1.call($call, Array.prototype.concat);
|
|
904
883
|
var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
|
|
@@ -1440,11 +1419,11 @@ var setFunctionLength = function setFunctionLength2(fn2, length) {
|
|
|
1440
1419
|
}
|
|
1441
1420
|
return fn2;
|
|
1442
1421
|
};
|
|
1443
|
-
var
|
|
1422
|
+
var bind2 = functionBind;
|
|
1444
1423
|
var $apply = requireFunctionApply();
|
|
1445
1424
|
var actualApply = actualApply$1;
|
|
1446
1425
|
var applyBind = function applyBind2() {
|
|
1447
|
-
return actualApply(
|
|
1426
|
+
return actualApply(bind2, $apply, arguments);
|
|
1448
1427
|
};
|
|
1449
1428
|
(function(module2) {
|
|
1450
1429
|
var setFunctionLength$1 = setFunctionLength;
|