wonder-image 1.2.0
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/DOCS.md +12 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/babel.config.json +3 -0
- package/demo/backend/body-end.php +10 -0
- package/demo/backend/head.php +93 -0
- package/demo/frontend/body-end.php +19 -0
- package/demo/frontend/head.php +244 -0
- package/demo/wonder-image.php +41 -0
- package/dist/0d01fa889dc2b0202b98.png +0 -0
- package/dist/203d1199e7aef04c0a34.gif +0 -0
- package/dist/26d6ed3fa1c815e4c78f.png +0 -0
- package/dist/39795c0b4513de014cf8.woff +0 -0
- package/dist/40b30ca122107c2852be.png +0 -0
- package/dist/4a7b4107b62ef059ba65.png +0 -0
- package/dist/4dce7f71b08755f19759.png +0 -0
- package/dist/60af14fddca897f348bb.png +0 -0
- package/dist/67172a36bcdeaca8592a.png +0 -0
- package/dist/a85c6dc53638f894de38.png +0 -0
- package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
- package/dist/backend/body-end.js +3 -0
- package/dist/backend/body-end.js.LICENSE.txt +44 -0
- package/dist/backend/body-end.js.map +1 -0
- package/dist/backend/head.css +2 -0
- package/dist/backend/head.css.map +1 -0
- package/dist/backend/head.js +3 -0
- package/dist/backend/head.js.LICENSE.txt +46 -0
- package/dist/backend/head.js.map +1 -0
- package/dist/backend/lib.js +2 -0
- package/dist/backend/lib.js.LICENSE.txt +1 -0
- package/dist/frontend/body-end.js +3 -0
- package/dist/frontend/body-end.js.LICENSE.txt +46 -0
- package/dist/frontend/body-end.js.map +1 -0
- package/dist/frontend/head.css +2 -0
- package/dist/frontend/head.css.map +1 -0
- package/dist/frontend/head.js +3 -0
- package/dist/frontend/head.js.LICENSE.txt +46 -0
- package/dist/frontend/head.js.map +1 -0
- package/dist/frontend/lib.css +2 -0
- package/dist/frontend/lib.css.map +1 -0
- package/dist/frontend/lib.js +3 -0
- package/dist/frontend/lib.js.LICENSE.txt +151 -0
- package/dist/frontend/lib.js.map +1 -0
- package/dist/lib/autonumeric/autonumeric.js +3 -0
- package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
- package/dist/lib/autonumeric/autonumeric.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
- package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
- package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
- package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
- package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
- package/dist/lib/bootstrap/bootstrap.css +2 -0
- package/dist/lib/bootstrap/bootstrap.css.map +1 -0
- package/dist/lib/bootstrap/bootstrap.js +3 -0
- package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
- package/dist/lib/bootstrap/bootstrap.js.map +1 -0
- package/dist/lib/chartjs/chart.js +3 -0
- package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
- package/dist/lib/chartjs/chart.js.map +1 -0
- package/dist/lib/datatables/datatables.css +2 -0
- package/dist/lib/datatables/datatables.css.map +1 -0
- package/dist/lib/datatables/datatables.js +3 -0
- package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
- package/dist/lib/datatables/datatables.js.map +1 -0
- package/dist/lib/editorjs/editor.js +3 -0
- package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
- package/dist/lib/editorjs/editor.js.map +1 -0
- package/dist/lib/fancyapps/fancyapps.css +2 -0
- package/dist/lib/fancyapps/fancyapps.css.map +1 -0
- package/dist/lib/fancyapps/fancyapps.js +3 -0
- package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
- package/dist/lib/fancyapps/fancyapps.js.map +1 -0
- package/dist/lib/filepond/filepond.css +2 -0
- package/dist/lib/filepond/filepond.css.map +1 -0
- package/dist/lib/filepond/filepond.js +3 -0
- package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
- package/dist/lib/filepond/filepond.js.map +1 -0
- package/dist/lib/fullcalendar/fullcalendar.js +3 -0
- package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
- package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
- package/dist/lib/jquery/jquery-plugin.css +2 -0
- package/dist/lib/jquery/jquery-plugin.css.map +1 -0
- package/dist/lib/jquery/jquery-plugin.js +3 -0
- package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
- package/dist/lib/jquery/jquery-plugin.js.map +1 -0
- package/dist/lib/jquery/jquery.js +3 -0
- package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
- package/dist/lib/jquery/jquery.js.map +1 -0
- package/dist/lib/jstree/jstree.css +2 -0
- package/dist/lib/jstree/jstree.css.map +1 -0
- package/dist/lib/jstree/jstree.js +3 -0
- package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
- package/dist/lib/jstree/jstree.js.map +1 -0
- package/dist/lib/moment/moment.js +3 -0
- package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
- package/dist/lib/moment/moment.js.map +1 -0
- package/dist/lib/quilljs/quill.css +2 -0
- package/dist/lib/quilljs/quill.css.map +1 -0
- package/dist/lib/quilljs/quill.js +3 -0
- package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
- package/dist/lib/quilljs/quill.js.map +1 -0
- package/dist/lib/swiperjs/swiper-plugin.css +2 -0
- package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
- package/dist/lib/swiperjs/swiper-plugin.js +3 -0
- package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
- package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
- package/dist/lib/swiperjs/swiper.css +2 -0
- package/dist/lib/swiperjs/swiper.css.map +1 -0
- package/dist/lib/swiperjs/swiper.js +3 -0
- package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
- package/dist/lib/swiperjs/swiper.js.map +1 -0
- package/dist/lib/videojs/video.css +2 -0
- package/dist/lib/videojs/video.css.map +1 -0
- package/dist/lib/videojs/video.js +3 -0
- package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
- package/dist/lib/videojs/video.js.map +1 -0
- package/package.json +95 -0
- package/src/build/backend/css/header.css +252 -0
- package/src/build/backend/css/input.css +295 -0
- package/src/build/backend/css/list.css +57 -0
- package/src/build/backend/css/order.css +99 -0
- package/src/build/backend/js/ajax.js +96 -0
- package/src/build/backend/js/alert.js +78 -0
- package/src/build/backend/js/bootstrap.js +52 -0
- package/src/build/backend/js/form/editor.js +293 -0
- package/src/build/backend/js/form/file.js +142 -0
- package/src/build/backend/js/form/filepond.js +11 -0
- package/src/build/backend/js/form/input.js +313 -0
- package/src/build/backend/js/form/inputRow.js +164 -0
- package/src/build/backend/js/form/send.js +14 -0
- package/src/build/backend/js/form/set.js +314 -0
- package/src/build/backend/js/jquery.js +15 -0
- package/src/build/backend/js/list.js +19 -0
- package/src/build/backend/js/modal.js +31 -0
- package/src/build/backend/js/pageSetUp.js +125 -0
- package/src/build/backend/js/utility.js +38 -0
- package/src/build/frontend/css/class/dimension.css +3376 -0
- package/src/build/frontend/css/class/function.css +316 -0
- package/src/build/frontend/css/class/grid.css +240 -0
- package/src/build/frontend/css/class/margin.css +823 -0
- package/src/build/frontend/css/class/padding.css +760 -0
- package/src/build/frontend/css/class/position.css +351 -0
- package/src/build/frontend/css/class/resize.css +24 -0
- package/src/build/frontend/css/class/section.css +41 -0
- package/src/build/frontend/css/class/text.css +244 -0
- package/src/build/frontend/css/components/alert.css +42 -0
- package/src/build/frontend/css/components/button.css +107 -0
- package/src/build/frontend/css/components/dropdown.css +118 -0
- package/src/build/frontend/css/components/form/address.css +26 -0
- package/src/build/frontend/css/components/form/checkbox.css +65 -0
- package/src/build/frontend/css/components/form/date.css +133 -0
- package/src/build/frontend/css/components/form/input.css +176 -0
- package/src/build/frontend/css/components/form/select.css +69 -0
- package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
- package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
- package/src/build/frontend/css/components/header/header.css +57 -0
- package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
- package/src/build/frontend/css/components/modal.css +76 -0
- package/src/build/frontend/css/components/spinner.css +37 -0
- package/src/build/frontend/css/generator/dimension.php +93 -0
- package/src/build/frontend/css/generator/margin.php +48 -0
- package/src/build/frontend/css/generator/padding.php +48 -0
- package/src/build/frontend/css/lib.css +3 -0
- package/src/build/frontend/css/main.css +37 -0
- package/src/build/frontend/js/alert.js +64 -0
- package/src/build/frontend/js/aos.js +9 -0
- package/src/build/frontend/js/dropdown.js +73 -0
- package/src/build/frontend/js/form/input.js +211 -0
- package/src/build/frontend/js/form/list.js +155 -0
- package/src/build/frontend/js/form/select.js +108 -0
- package/src/build/frontend/js/form/send.js +137 -0
- package/src/build/frontend/js/header.js +12 -0
- package/src/build/frontend/js/modal.js +26 -0
- package/src/build/frontend/js/pageSetUp.js +35 -0
- package/src/build/frontend/js/scroll.js +70 -0
- package/src/build/frontend/js/utility.js +21 -0
- package/src/build/global/js/canvas.js +82 -0
- package/src/build/global/js/fetch.js +47 -0
- package/src/build/global/js/form/autonumeric.js +136 -0
- package/src/build/global/js/form/phone.js +19 -0
- package/src/build/global/js/utility.js +88 -0
- package/src/build/global/js/video.js +7 -0
- package/src/build/lib/editorjs/gallery.js +39 -0
- package/src/build/lib/editorjs/hyperlink.js +170 -0
- package/src/build/lib/editorjs/video.js +61 -0
- package/src/build/lib/swiperjs/effect-carousel.css +24 -0
- package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
- package/src/build/lib/swiperjs/effect-shutters.css +33 -0
- package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
- package/src/build/lib/swiperjs/effect-slicer.css +39 -0
- package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
- package/src/build/lib/swiperjs/swiper-gl.css +44 -0
- package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
- package/src/export/backend/body-end.js +4 -0
- package/src/export/backend/head.js +25 -0
- package/src/export/backend/lib.js +0 -0
- package/src/export/frontend/body-end.js +9 -0
- package/src/export/frontend/head.js +42 -0
- package/src/export/frontend/lib.js +17 -0
- package/src/export/lib/autonumeric/autonumeric.js +3 -0
- package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
- package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
- package/src/export/lib/bootstrap/bootstrap.js +3 -0
- package/src/export/lib/chartjs/chart.js +4 -0
- package/src/export/lib/datatables/datatables.js +6 -0
- package/src/export/lib/editorjs/editor.js +48 -0
- package/src/export/lib/fancyapps/fancyapps.js +7 -0
- package/src/export/lib/filepond/filepond.js +51 -0
- package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
- package/src/export/lib/jquery/jquery-plugin.js +14 -0
- package/src/export/lib/jquery/jquery.js +4 -0
- package/src/export/lib/jstree/jstree.js +2 -0
- package/src/export/lib/moment/moment.js +12 -0
- package/src/export/lib/quilljs/quill.js +4 -0
- package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
- package/src/export/lib/swiperjs/swiper.js +4 -0
- package/src/export/lib/videojs/video.js +3 -0
- package/webpack.config.js +79 -0
|
@@ -0,0 +1,3038 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* https://www.iana.org/assignments/media-types/text/uri-list
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* @__PURE__ */
|
|
6
|
+
|
|
7
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
8
|
+
|
|
9
|
+
/* Node.js helper references. */
|
|
10
|
+
|
|
11
|
+
/* harmony default export */
|
|
12
|
+
|
|
13
|
+
/* module decorator */
|
|
14
|
+
|
|
15
|
+
/* webpack/runtime/define property getters */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use Quill#scrollSelectionIntoView() instead.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Called during construction, should fill its own children LinkedList.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Does a substring of shorttext exist within longtext such that the substring
|
|
27
|
+
* is at least half the length of longtext?
|
|
28
|
+
* Closure, but does not reference any external variables.
|
|
29
|
+
* @param {string} longtext Longer string.
|
|
30
|
+
* @param {string} shorttext Shorter string.
|
|
31
|
+
* @param {number} i Start index of quarter length substring within longtext.
|
|
32
|
+
* @return {Array.<string>} Five element Array, containing the prefix of
|
|
33
|
+
* longtext, the suffix of longtext, the prefix of shorttext, the suffix
|
|
34
|
+
* of shorttext and the common middle. Or null if there was no match.
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Given index to location within blot, return node and offset representing
|
|
40
|
+
* that location, consumable by DOM Selection Range
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Given location represented by node and offset from DOM Selection Range,
|
|
45
|
+
* return index to that location.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Given two strings, compute a score representing whether the internal
|
|
50
|
+
* boundary falls on logical boundaries.
|
|
51
|
+
* Scores range from 6 (best) to 0 (worst).
|
|
52
|
+
* Closure, but does not reference any external variables.
|
|
53
|
+
* @param {string} one First string.
|
|
54
|
+
* @param {string} two Second string.
|
|
55
|
+
* @return {number} The score.
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Return value represented by this blot
|
|
61
|
+
* Should not change without interaction from API or
|
|
62
|
+
* user change detectable by update()
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Returns the value represented by domNode if it is this Blot's type
|
|
67
|
+
* No checking that domNode can represent this Blot type is required so
|
|
68
|
+
* applications needing it should check externally before calling.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Scroll the current selection into the visible area.
|
|
73
|
+
* If the selection is already visible, no scrolling will occur.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* We only listen to the `selectionchange` event when
|
|
78
|
+
* there is an intention of moving the caret to the beginning using shortcuts.
|
|
79
|
+
* This is primarily implemented to prevent infinite loops, as we are changing
|
|
80
|
+
* the selection within the handler of a `selectionchange` event.
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* Creates an array cache object to store unique values.
|
|
86
|
+
*
|
|
87
|
+
* @private
|
|
88
|
+
* @constructor
|
|
89
|
+
* @param {Array} [values] The values to cache.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
94
|
+
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
95
|
+
*
|
|
96
|
+
* @private
|
|
97
|
+
* @param {Function} func The function to invoke.
|
|
98
|
+
* @param {*} thisArg The `this` binding of `func`.
|
|
99
|
+
* @param {Array} args The arguments to invoke `func` with.
|
|
100
|
+
* @returns {*} Returns the result of `func`.
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
105
|
+
* iteratee shorthands.
|
|
106
|
+
*
|
|
107
|
+
* @private
|
|
108
|
+
* @param {Array} [array] The array to iterate over.
|
|
109
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
110
|
+
* @returns {Array} Returns the new filtered array.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A specialized version of `_.forEach` for arrays without support for
|
|
115
|
+
* iteratee shorthands.
|
|
116
|
+
*
|
|
117
|
+
* @private
|
|
118
|
+
* @param {Array} [array] The array to iterate over.
|
|
119
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
120
|
+
* @returns {Array} Returns `array`.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
125
|
+
* iteratee shorthands.
|
|
126
|
+
*
|
|
127
|
+
* @private
|
|
128
|
+
* @param {Array} [array] The array to iterate over.
|
|
129
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
130
|
+
* @param {*} [accumulator] The initial value.
|
|
131
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
132
|
+
* the initial value.
|
|
133
|
+
* @returns {*} Returns the accumulated value.
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* A specialized version of `_.some` for arrays without support for iteratee
|
|
138
|
+
* shorthands.
|
|
139
|
+
*
|
|
140
|
+
* @private
|
|
141
|
+
* @param {Array} [array] The array to iterate over.
|
|
142
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
143
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
144
|
+
* else `false`.
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
149
|
+
*
|
|
150
|
+
* @private
|
|
151
|
+
* @param {*} value The value to query.
|
|
152
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
157
|
+
* partial deep comparisons.
|
|
158
|
+
*
|
|
159
|
+
* @private
|
|
160
|
+
* @param {Array} array The array to compare.
|
|
161
|
+
* @param {Array} other The other array to compare.
|
|
162
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
163
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
164
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
165
|
+
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
166
|
+
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
171
|
+
* the same `toStringTag`.
|
|
172
|
+
*
|
|
173
|
+
* **Note:** This function only supports comparing values with tags of
|
|
174
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
175
|
+
*
|
|
176
|
+
* @private
|
|
177
|
+
* @param {Object} object The object to compare.
|
|
178
|
+
* @param {Object} other The other object to compare.
|
|
179
|
+
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
180
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
181
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
182
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
183
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
184
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
185
|
+
*/
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
189
|
+
* partial deep comparisons.
|
|
190
|
+
*
|
|
191
|
+
* @private
|
|
192
|
+
* @param {Object} object The object to compare.
|
|
193
|
+
* @param {Object} other The other object to compare.
|
|
194
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
195
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
196
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
197
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
198
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
203
|
+
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
204
|
+
* references to be compared.
|
|
205
|
+
*
|
|
206
|
+
* @private
|
|
207
|
+
* @param {Object} object The object to compare.
|
|
208
|
+
* @param {Object} other The other object to compare.
|
|
209
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
210
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
211
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
212
|
+
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
213
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* A specialized version of `baseMerge` for arrays and objects which performs
|
|
218
|
+
* deep merges and tracks traversed objects enabling objects with circular
|
|
219
|
+
* references to be merged.
|
|
220
|
+
*
|
|
221
|
+
* @private
|
|
222
|
+
* @param {Object} object The destination object.
|
|
223
|
+
* @param {Object} source The source object.
|
|
224
|
+
* @param {string} key The key of the value to merge.
|
|
225
|
+
* @param {number} srcIndex The index of `source`.
|
|
226
|
+
* @param {Function} mergeFunc The function to merge values.
|
|
227
|
+
* @param {Function} [customizer] The function to customize assigned values.
|
|
228
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
229
|
+
* counterparts.
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* A specialized version of `baseRest` which transforms the rest array.
|
|
234
|
+
*
|
|
235
|
+
* @private
|
|
236
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
237
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
238
|
+
* @param {Function} transform The rest array transform.
|
|
239
|
+
* @returns {Function} Returns the new function.
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Add a listener for a given event.
|
|
244
|
+
*
|
|
245
|
+
* @param {(String|Symbol)} event The event name.
|
|
246
|
+
* @param {Function} fn The listener function.
|
|
247
|
+
* @param {*} [context=this] The context to invoke the listener with.
|
|
248
|
+
* @returns {EventEmitter} `this`.
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Add a listener for a given event.
|
|
254
|
+
*
|
|
255
|
+
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
256
|
+
* @param {(String|Symbol)} event The event name.
|
|
257
|
+
* @param {Function} fn The listener function.
|
|
258
|
+
* @param {*} context The context to invoke the listener with.
|
|
259
|
+
* @param {Boolean} once Specify if the listener is a one-time listener.
|
|
260
|
+
* @returns {EventEmitter}
|
|
261
|
+
* @private
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Add a one-time listener for a given event.
|
|
266
|
+
*
|
|
267
|
+
* @param {(String|Symbol)} event The event name.
|
|
268
|
+
* @param {Function} fn The listener function.
|
|
269
|
+
* @param {*} [context=this] The context to invoke the listener with.
|
|
270
|
+
* @returns {EventEmitter} `this`.
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Adds `value` to `set`.
|
|
276
|
+
*
|
|
277
|
+
* @private
|
|
278
|
+
* @param {Object} set The set to modify.
|
|
279
|
+
* @param {*} value The value to add.
|
|
280
|
+
* @returns {Object} Returns `set`.
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Adds `value` to the array cache.
|
|
285
|
+
*
|
|
286
|
+
* @private
|
|
287
|
+
* @name add
|
|
288
|
+
* @memberOf SetCache
|
|
289
|
+
* @alias push
|
|
290
|
+
* @param {*} value The value to cache.
|
|
291
|
+
* @returns {Object} Returns the cache instance.
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Adds the key-value `pair` to `map`.
|
|
296
|
+
*
|
|
297
|
+
* @private
|
|
298
|
+
* @param {Object} map The map to modify.
|
|
299
|
+
* @param {Array} pair The key-value pair to add.
|
|
300
|
+
* @returns {Object} Returns `map`.
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Appends the elements of `values` to `array`.
|
|
305
|
+
*
|
|
306
|
+
* @private
|
|
307
|
+
* @param {Array} array The array to modify.
|
|
308
|
+
* @param {Array} values The values to append.
|
|
309
|
+
* @returns {Array} Returns `array`.
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
314
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
315
|
+
* for equality comparisons.
|
|
316
|
+
*
|
|
317
|
+
* @private
|
|
318
|
+
* @param {Object} object The object to modify.
|
|
319
|
+
* @param {string} key The key of the property to assign.
|
|
320
|
+
* @param {*} value The value to assign.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Calls each of the listeners registered for a given event.
|
|
325
|
+
*
|
|
326
|
+
* @param {(String|Symbol)} event The event name.
|
|
327
|
+
* @returns {Boolean} `true` if the event had listeners, else `false`.
|
|
328
|
+
* @public
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Checks if `func` has its source masked.
|
|
333
|
+
*
|
|
334
|
+
* @private
|
|
335
|
+
* @param {Function} func The function to check.
|
|
336
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Checks if `value` is a buffer.
|
|
341
|
+
*
|
|
342
|
+
* @static
|
|
343
|
+
* @memberOf _
|
|
344
|
+
* @since 4.3.0
|
|
345
|
+
* @category Lang
|
|
346
|
+
* @param {*} value The value to check.
|
|
347
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
348
|
+
* @example
|
|
349
|
+
*
|
|
350
|
+
* _.isBuffer(new Buffer(2));
|
|
351
|
+
* // => true
|
|
352
|
+
*
|
|
353
|
+
* _.isBuffer(new Uint8Array(2));
|
|
354
|
+
* // => false
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Checks if `value` is a host object in IE < 9.
|
|
359
|
+
*
|
|
360
|
+
* @private
|
|
361
|
+
* @param {*} value The value to check.
|
|
362
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
363
|
+
*/
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
367
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
368
|
+
*
|
|
369
|
+
* @static
|
|
370
|
+
* @memberOf _
|
|
371
|
+
* @since 0.8.0
|
|
372
|
+
* @category Lang
|
|
373
|
+
* @param {*} value The value to check.
|
|
374
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
375
|
+
* @example
|
|
376
|
+
*
|
|
377
|
+
* function Foo() {
|
|
378
|
+
* this.a = 1;
|
|
379
|
+
* }
|
|
380
|
+
*
|
|
381
|
+
* _.isPlainObject(new Foo);
|
|
382
|
+
* // => false
|
|
383
|
+
*
|
|
384
|
+
* _.isPlainObject([1, 2, 3]);
|
|
385
|
+
* // => false
|
|
386
|
+
*
|
|
387
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
388
|
+
* // => true
|
|
389
|
+
*
|
|
390
|
+
* _.isPlainObject(Object.create(null));
|
|
391
|
+
* // => true
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Checks if `value` is a valid array-like index.
|
|
396
|
+
*
|
|
397
|
+
* @private
|
|
398
|
+
* @param {*} value The value to check.
|
|
399
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
400
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
401
|
+
*/
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Checks if `value` is a valid array-like length.
|
|
405
|
+
*
|
|
406
|
+
* **Note:** This method is loosely based on
|
|
407
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
408
|
+
*
|
|
409
|
+
* @static
|
|
410
|
+
* @memberOf _
|
|
411
|
+
* @since 4.0.0
|
|
412
|
+
* @category Lang
|
|
413
|
+
* @param {*} value The value to check.
|
|
414
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
415
|
+
* @example
|
|
416
|
+
*
|
|
417
|
+
* _.isLength(3);
|
|
418
|
+
* // => true
|
|
419
|
+
*
|
|
420
|
+
* _.isLength(Number.MIN_VALUE);
|
|
421
|
+
* // => false
|
|
422
|
+
*
|
|
423
|
+
* _.isLength(Infinity);
|
|
424
|
+
* // => false
|
|
425
|
+
*
|
|
426
|
+
* _.isLength('3');
|
|
427
|
+
* // => false
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
432
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
433
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
434
|
+
*
|
|
435
|
+
* @static
|
|
436
|
+
* @memberOf _
|
|
437
|
+
* @since 4.0.0
|
|
438
|
+
* @category Lang
|
|
439
|
+
* @param {*} value The value to check.
|
|
440
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
441
|
+
* @example
|
|
442
|
+
*
|
|
443
|
+
* _.isArrayLike([1, 2, 3]);
|
|
444
|
+
* // => true
|
|
445
|
+
*
|
|
446
|
+
* _.isArrayLike(document.body.children);
|
|
447
|
+
* // => true
|
|
448
|
+
*
|
|
449
|
+
* _.isArrayLike('abc');
|
|
450
|
+
* // => true
|
|
451
|
+
*
|
|
452
|
+
* _.isArrayLike(_.noop);
|
|
453
|
+
* // => false
|
|
454
|
+
*/
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Checks if `value` is classified as a `Function` object.
|
|
458
|
+
*
|
|
459
|
+
* @static
|
|
460
|
+
* @memberOf _
|
|
461
|
+
* @since 0.1.0
|
|
462
|
+
* @category Lang
|
|
463
|
+
* @param {*} value The value to check.
|
|
464
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
465
|
+
* @example
|
|
466
|
+
*
|
|
467
|
+
* _.isFunction(_);
|
|
468
|
+
* // => true
|
|
469
|
+
*
|
|
470
|
+
* _.isFunction(/abc/);
|
|
471
|
+
* // => false
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Checks if `value` is classified as a `Map` object.
|
|
476
|
+
*
|
|
477
|
+
* @static
|
|
478
|
+
* @memberOf _
|
|
479
|
+
* @since 4.3.0
|
|
480
|
+
* @category Lang
|
|
481
|
+
* @param {*} value The value to check.
|
|
482
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
483
|
+
* @example
|
|
484
|
+
*
|
|
485
|
+
* _.isMap(new Map);
|
|
486
|
+
* // => true
|
|
487
|
+
*
|
|
488
|
+
* _.isMap(new WeakMap);
|
|
489
|
+
* // => false
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Checks if `value` is classified as a `Set` object.
|
|
494
|
+
*
|
|
495
|
+
* @static
|
|
496
|
+
* @memberOf _
|
|
497
|
+
* @since 4.3.0
|
|
498
|
+
* @category Lang
|
|
499
|
+
* @param {*} value The value to check.
|
|
500
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
501
|
+
* @example
|
|
502
|
+
*
|
|
503
|
+
* _.isSet(new Set);
|
|
504
|
+
* // => true
|
|
505
|
+
*
|
|
506
|
+
* _.isSet(new WeakSet);
|
|
507
|
+
* // => false
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Checks if `value` is classified as a typed array.
|
|
512
|
+
*
|
|
513
|
+
* @static
|
|
514
|
+
* @memberOf _
|
|
515
|
+
* @since 3.0.0
|
|
516
|
+
* @category Lang
|
|
517
|
+
* @param {*} value The value to check.
|
|
518
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
519
|
+
* @example
|
|
520
|
+
*
|
|
521
|
+
* _.isTypedArray(new Uint8Array);
|
|
522
|
+
* // => true
|
|
523
|
+
*
|
|
524
|
+
* _.isTypedArray([]);
|
|
525
|
+
* // => false
|
|
526
|
+
*/
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Checks if `value` is classified as an `Array` object.
|
|
530
|
+
*
|
|
531
|
+
* @static
|
|
532
|
+
* @memberOf _
|
|
533
|
+
* @since 0.1.0
|
|
534
|
+
* @category Lang
|
|
535
|
+
* @param {*} value The value to check.
|
|
536
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
537
|
+
* @example
|
|
538
|
+
*
|
|
539
|
+
* _.isArray([1, 2, 3]);
|
|
540
|
+
* // => true
|
|
541
|
+
*
|
|
542
|
+
* _.isArray(document.body.children);
|
|
543
|
+
* // => false
|
|
544
|
+
*
|
|
545
|
+
* _.isArray('abc');
|
|
546
|
+
* // => false
|
|
547
|
+
*
|
|
548
|
+
* _.isArray(_.noop);
|
|
549
|
+
* // => false
|
|
550
|
+
*/
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Checks if `value` is in the array cache.
|
|
554
|
+
*
|
|
555
|
+
* @private
|
|
556
|
+
* @name has
|
|
557
|
+
* @memberOf SetCache
|
|
558
|
+
* @param {*} value The value to search for.
|
|
559
|
+
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
560
|
+
*/
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Checks if `value` is likely a prototype object.
|
|
564
|
+
*
|
|
565
|
+
* @private
|
|
566
|
+
* @param {*} value The value to check.
|
|
567
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Checks if `value` is likely an `arguments` object.
|
|
572
|
+
*
|
|
573
|
+
* @static
|
|
574
|
+
* @memberOf _
|
|
575
|
+
* @since 0.1.0
|
|
576
|
+
* @category Lang
|
|
577
|
+
* @param {*} value The value to check.
|
|
578
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
579
|
+
* else `false`.
|
|
580
|
+
* @example
|
|
581
|
+
*
|
|
582
|
+
* _.isArguments(function() { return arguments; }());
|
|
583
|
+
* // => true
|
|
584
|
+
*
|
|
585
|
+
* _.isArguments([1, 2, 3]);
|
|
586
|
+
* // => false
|
|
587
|
+
*/
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
591
|
+
* and has a `typeof` result of "object".
|
|
592
|
+
*
|
|
593
|
+
* @static
|
|
594
|
+
* @memberOf _
|
|
595
|
+
* @since 4.0.0
|
|
596
|
+
* @category Lang
|
|
597
|
+
* @param {*} value The value to check.
|
|
598
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
599
|
+
* @example
|
|
600
|
+
*
|
|
601
|
+
* _.isObjectLike({});
|
|
602
|
+
* // => true
|
|
603
|
+
*
|
|
604
|
+
* _.isObjectLike([1, 2, 3]);
|
|
605
|
+
* // => true
|
|
606
|
+
*
|
|
607
|
+
* _.isObjectLike(_.noop);
|
|
608
|
+
* // => false
|
|
609
|
+
*
|
|
610
|
+
* _.isObjectLike(null);
|
|
611
|
+
* // => false
|
|
612
|
+
*/
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
616
|
+
*
|
|
617
|
+
* @private
|
|
618
|
+
* @param {*} value The value to check.
|
|
619
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Checks if `value` is the
|
|
624
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
625
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
626
|
+
*
|
|
627
|
+
* @static
|
|
628
|
+
* @memberOf _
|
|
629
|
+
* @since 0.1.0
|
|
630
|
+
* @category Lang
|
|
631
|
+
* @param {*} value The value to check.
|
|
632
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
633
|
+
* @example
|
|
634
|
+
*
|
|
635
|
+
* _.isObject({});
|
|
636
|
+
* // => true
|
|
637
|
+
*
|
|
638
|
+
* _.isObject([1, 2, 3]);
|
|
639
|
+
* // => true
|
|
640
|
+
*
|
|
641
|
+
* _.isObject(_.noop);
|
|
642
|
+
* // => true
|
|
643
|
+
*
|
|
644
|
+
* _.isObject(null);
|
|
645
|
+
* // => false
|
|
646
|
+
*/
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Checks if a `cache` value for `key` exists.
|
|
650
|
+
*
|
|
651
|
+
* @private
|
|
652
|
+
* @param {Object} cache The cache to query.
|
|
653
|
+
* @param {string} key The key of the entry to check.
|
|
654
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
655
|
+
*/
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Checks if a hash value for `key` exists.
|
|
659
|
+
*
|
|
660
|
+
* @private
|
|
661
|
+
* @name has
|
|
662
|
+
* @memberOf Hash
|
|
663
|
+
* @param {string} key The key of the entry to check.
|
|
664
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
665
|
+
*/
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Checks if a list cache value for `key` exists.
|
|
669
|
+
*
|
|
670
|
+
* @private
|
|
671
|
+
* @name has
|
|
672
|
+
* @memberOf ListCache
|
|
673
|
+
* @param {string} key The key of the entry to check.
|
|
674
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
675
|
+
*/
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Checks if a map value for `key` exists.
|
|
679
|
+
*
|
|
680
|
+
* @private
|
|
681
|
+
* @name has
|
|
682
|
+
* @memberOf MapCache
|
|
683
|
+
* @param {string} key The key of the entry to check.
|
|
684
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
685
|
+
*/
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Checks if a stack value for `key` exists.
|
|
689
|
+
*
|
|
690
|
+
* @private
|
|
691
|
+
* @name has
|
|
692
|
+
* @memberOf Stack
|
|
693
|
+
* @param {string} key The key of the entry to check.
|
|
694
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
695
|
+
*/
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Checks if the given arguments are from an iteratee call.
|
|
699
|
+
*
|
|
700
|
+
* @private
|
|
701
|
+
* @param {*} value The potential iteratee value argument.
|
|
702
|
+
* @param {*} index The potential iteratee index or key argument.
|
|
703
|
+
* @param {*} object The potential iteratee object argument.
|
|
704
|
+
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
705
|
+
* else `false`.
|
|
706
|
+
*/
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Clear event by name.
|
|
710
|
+
*
|
|
711
|
+
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
|
|
712
|
+
* @param {(String|Symbol)} evt The Event name.
|
|
713
|
+
* @private
|
|
714
|
+
*/
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Constructor to create a storage for our `EE` objects.
|
|
718
|
+
* An `Events` instance is a plain object whose properties are event names.
|
|
719
|
+
*
|
|
720
|
+
* @constructor
|
|
721
|
+
* @private
|
|
722
|
+
*/
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Converts `func` to its source code.
|
|
726
|
+
*
|
|
727
|
+
* @private
|
|
728
|
+
* @param {Function} func The function to convert.
|
|
729
|
+
* @returns {string} Returns the source code.
|
|
730
|
+
*/
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Converts `func` to its source code.
|
|
734
|
+
*
|
|
735
|
+
* @private
|
|
736
|
+
* @param {Function} func The function to process.
|
|
737
|
+
* @returns {string} Returns the source code.
|
|
738
|
+
*/
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Converts `map` to its key-value pairs.
|
|
742
|
+
*
|
|
743
|
+
* @private
|
|
744
|
+
* @param {Object} map The map to convert.
|
|
745
|
+
* @returns {Array} Returns the key-value pairs.
|
|
746
|
+
*/
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Converts `set` to an array of its values.
|
|
750
|
+
*
|
|
751
|
+
* @private
|
|
752
|
+
* @param {Object} set The set to convert.
|
|
753
|
+
* @returns {Array} Returns the values.
|
|
754
|
+
*/
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Converts `value` to a plain object flattening inherited enumerable string
|
|
758
|
+
* keyed properties of `value` to own properties of the plain object.
|
|
759
|
+
*
|
|
760
|
+
* @static
|
|
761
|
+
* @memberOf _
|
|
762
|
+
* @since 3.0.0
|
|
763
|
+
* @category Lang
|
|
764
|
+
* @param {*} value The value to convert.
|
|
765
|
+
* @returns {Object} Returns the converted plain object.
|
|
766
|
+
* @example
|
|
767
|
+
*
|
|
768
|
+
* function Foo() {
|
|
769
|
+
* this.b = 2;
|
|
770
|
+
* }
|
|
771
|
+
*
|
|
772
|
+
* Foo.prototype.c = 3;
|
|
773
|
+
*
|
|
774
|
+
* _.assign({ 'a': 1 }, new Foo);
|
|
775
|
+
* // => { 'a': 1, 'b': 2 }
|
|
776
|
+
*
|
|
777
|
+
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
|
|
778
|
+
* // => { 'a': 1, 'b': 2, 'c': 3 }
|
|
779
|
+
*/
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
783
|
+
*
|
|
784
|
+
* @private
|
|
785
|
+
* @param {*} value The value to convert.
|
|
786
|
+
* @returns {string} Returns the converted string.
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Copies own and inherited symbols of `source` to `object`.
|
|
791
|
+
*
|
|
792
|
+
* @private
|
|
793
|
+
* @param {Object} source The object to copy symbols from.
|
|
794
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
795
|
+
* @returns {Object} Returns `object`.
|
|
796
|
+
*/
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Copies own symbol properties of `source` to `object`.
|
|
800
|
+
*
|
|
801
|
+
* @private
|
|
802
|
+
* @param {Object} source The object to copy symbols from.
|
|
803
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
804
|
+
* @returns {Object} Returns `object`.
|
|
805
|
+
*/
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Copies own symbols of `source` to `object`.
|
|
809
|
+
*
|
|
810
|
+
* @private
|
|
811
|
+
* @param {Object} source The object to copy symbols from.
|
|
812
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
813
|
+
* @returns {Object} Returns `object`.
|
|
814
|
+
*/
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Copies properties of `source` to `object`.
|
|
818
|
+
*
|
|
819
|
+
* @private
|
|
820
|
+
* @param {Object} source The object to copy properties from.
|
|
821
|
+
* @param {Array} props The property identifiers to copy.
|
|
822
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
823
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
824
|
+
* @returns {Object} Returns `object`.
|
|
825
|
+
*/
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Copies the values of `source` to `array`.
|
|
829
|
+
*
|
|
830
|
+
* @private
|
|
831
|
+
* @param {Array} source The array to copy values from.
|
|
832
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
833
|
+
* @returns {Array} Returns `array`.
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
838
|
+
*
|
|
839
|
+
* @private
|
|
840
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
841
|
+
* @returns {Function} Returns the new base function.
|
|
842
|
+
*/
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Creates a clone of `buffer`.
|
|
846
|
+
*
|
|
847
|
+
* @private
|
|
848
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
849
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
850
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
851
|
+
*/
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Creates a clone of `arrayBuffer`.
|
|
855
|
+
*
|
|
856
|
+
* @private
|
|
857
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
858
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
859
|
+
*/
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Creates a clone of `dataView`.
|
|
863
|
+
*
|
|
864
|
+
* @private
|
|
865
|
+
* @param {Object} dataView The data view to clone.
|
|
866
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
867
|
+
* @returns {Object} Returns the cloned data view.
|
|
868
|
+
*/
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Creates a clone of `map`.
|
|
872
|
+
*
|
|
873
|
+
* @private
|
|
874
|
+
* @param {Object} map The map to clone.
|
|
875
|
+
* @param {Function} cloneFunc The function to clone values.
|
|
876
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
877
|
+
* @returns {Object} Returns the cloned map.
|
|
878
|
+
*/
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Creates a clone of `regexp`.
|
|
882
|
+
*
|
|
883
|
+
* @private
|
|
884
|
+
* @param {Object} regexp The regexp to clone.
|
|
885
|
+
* @returns {Object} Returns the cloned regexp.
|
|
886
|
+
*/
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Creates a clone of `set`.
|
|
890
|
+
*
|
|
891
|
+
* @private
|
|
892
|
+
* @param {Object} set The set to clone.
|
|
893
|
+
* @param {Function} cloneFunc The function to clone values.
|
|
894
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
895
|
+
* @returns {Object} Returns the cloned set.
|
|
896
|
+
*/
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Creates a clone of `typedArray`.
|
|
900
|
+
*
|
|
901
|
+
* @private
|
|
902
|
+
* @param {Object} typedArray The typed array to clone.
|
|
903
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
904
|
+
* @returns {Object} Returns the cloned typed array.
|
|
905
|
+
*/
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Creates a clone of the `symbol` object.
|
|
909
|
+
*
|
|
910
|
+
* @private
|
|
911
|
+
* @param {Object} symbol The symbol object to clone.
|
|
912
|
+
* @returns {Object} Returns the cloned symbol object.
|
|
913
|
+
*/
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Creates a function like `_.assign`.
|
|
917
|
+
*
|
|
918
|
+
* @private
|
|
919
|
+
* @param {Function} assigner The function to assign values.
|
|
920
|
+
* @returns {Function} Returns the new assigner function.
|
|
921
|
+
*/
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Creates a function that returns `value`.
|
|
925
|
+
*
|
|
926
|
+
* @static
|
|
927
|
+
* @memberOf _
|
|
928
|
+
* @since 2.4.0
|
|
929
|
+
* @category Util
|
|
930
|
+
* @param {*} value The value to return from the new function.
|
|
931
|
+
* @returns {Function} Returns the new constant function.
|
|
932
|
+
* @example
|
|
933
|
+
*
|
|
934
|
+
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
935
|
+
*
|
|
936
|
+
* console.log(objects);
|
|
937
|
+
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
938
|
+
*
|
|
939
|
+
* console.log(objects[0] === objects[1]);
|
|
940
|
+
* // => true
|
|
941
|
+
*/
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Creates a function that'll short out and invoke `identity` instead
|
|
945
|
+
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
946
|
+
* milliseconds.
|
|
947
|
+
*
|
|
948
|
+
* @private
|
|
949
|
+
* @param {Function} func The function to restrict.
|
|
950
|
+
* @returns {Function} Returns the new shortable function.
|
|
951
|
+
*/
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Creates a hash object.
|
|
955
|
+
*
|
|
956
|
+
* @private
|
|
957
|
+
* @constructor
|
|
958
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
959
|
+
*/
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Creates a map cache object to store key-value pairs.
|
|
963
|
+
*
|
|
964
|
+
* @private
|
|
965
|
+
* @constructor
|
|
966
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
967
|
+
*/
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Creates a stack cache object to store key-value pairs.
|
|
971
|
+
*
|
|
972
|
+
* @private
|
|
973
|
+
* @constructor
|
|
974
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
975
|
+
*/
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
979
|
+
*
|
|
980
|
+
* @private
|
|
981
|
+
* @param {Function} func The function to wrap.
|
|
982
|
+
* @param {Function} transform The argument transform.
|
|
983
|
+
* @returns {Function} Returns the new function.
|
|
984
|
+
*/
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Creates an array of own and inherited enumerable property names and
|
|
988
|
+
* symbols of `object`.
|
|
989
|
+
*
|
|
990
|
+
* @private
|
|
991
|
+
* @param {Object} object The object to query.
|
|
992
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
993
|
+
*/
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
997
|
+
*
|
|
998
|
+
* @private
|
|
999
|
+
* @param {Object} object The object to query.
|
|
1000
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
1001
|
+
*/
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
1005
|
+
*
|
|
1006
|
+
* @private
|
|
1007
|
+
* @param {*} value The value to query.
|
|
1008
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
1009
|
+
* @returns {Array} Returns the array of property names.
|
|
1010
|
+
*/
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
1014
|
+
*
|
|
1015
|
+
* **Note:** Non-object values are coerced to objects.
|
|
1016
|
+
*
|
|
1017
|
+
* @static
|
|
1018
|
+
* @memberOf _
|
|
1019
|
+
* @since 3.0.0
|
|
1020
|
+
* @category Object
|
|
1021
|
+
* @param {Object} object The object to query.
|
|
1022
|
+
* @returns {Array} Returns the array of property names.
|
|
1023
|
+
* @example
|
|
1024
|
+
*
|
|
1025
|
+
* function Foo() {
|
|
1026
|
+
* this.a = 1;
|
|
1027
|
+
* this.b = 2;
|
|
1028
|
+
* }
|
|
1029
|
+
*
|
|
1030
|
+
* Foo.prototype.c = 3;
|
|
1031
|
+
*
|
|
1032
|
+
* _.keysIn(new Foo);
|
|
1033
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
1034
|
+
*/
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
1038
|
+
*
|
|
1039
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
1040
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
1041
|
+
* for more details.
|
|
1042
|
+
*
|
|
1043
|
+
* @static
|
|
1044
|
+
* @since 0.1.0
|
|
1045
|
+
* @memberOf _
|
|
1046
|
+
* @category Object
|
|
1047
|
+
* @param {Object} object The object to query.
|
|
1048
|
+
* @returns {Array} Returns the array of property names.
|
|
1049
|
+
* @example
|
|
1050
|
+
*
|
|
1051
|
+
* function Foo() {
|
|
1052
|
+
* this.a = 1;
|
|
1053
|
+
* this.b = 2;
|
|
1054
|
+
* }
|
|
1055
|
+
*
|
|
1056
|
+
* Foo.prototype.c = 3;
|
|
1057
|
+
*
|
|
1058
|
+
* _.keys(new Foo);
|
|
1059
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
1060
|
+
*
|
|
1061
|
+
* _.keys('hi');
|
|
1062
|
+
* // => ['0', '1']
|
|
1063
|
+
*/
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Creates an array of the own enumerable symbol properties of `object`.
|
|
1067
|
+
*
|
|
1068
|
+
* @private
|
|
1069
|
+
* @param {Object} object The object to query.
|
|
1070
|
+
* @returns {Array} Returns the array of symbols.
|
|
1071
|
+
*/
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
1075
|
+
*
|
|
1076
|
+
* @private
|
|
1077
|
+
* @param {Object} object The object to query.
|
|
1078
|
+
* @returns {Array} Returns the array of symbols.
|
|
1079
|
+
*/
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Creates an list cache object.
|
|
1083
|
+
*
|
|
1084
|
+
* @private
|
|
1085
|
+
* @constructor
|
|
1086
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1087
|
+
*/
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Determine if the suffix of one string is the prefix of another.
|
|
1091
|
+
* @param {string} text1 First string.
|
|
1092
|
+
* @param {string} text2 Second string.
|
|
1093
|
+
* @return {number} The number of characters common to the end of the first
|
|
1094
|
+
* string and the start of the second string.
|
|
1095
|
+
* @private
|
|
1096
|
+
*/
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Determine the common prefix of two strings.
|
|
1100
|
+
* @param {string} text1 First string.
|
|
1101
|
+
* @param {string} text2 Second string.
|
|
1102
|
+
* @return {number} The number of characters common to the start of each
|
|
1103
|
+
* string.
|
|
1104
|
+
*/
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Determine the common suffix of two strings.
|
|
1108
|
+
* @param {string} text1 First string.
|
|
1109
|
+
* @param {string} text2 Second string.
|
|
1110
|
+
* @return {number} The number of characters common to the end of each string.
|
|
1111
|
+
*/
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Do the two texts share a substring which is at least half the length of the
|
|
1115
|
+
* longer text?
|
|
1116
|
+
* This speedup can produce non-minimal diffs.
|
|
1117
|
+
* @param {string} text1 First string.
|
|
1118
|
+
* @param {string} text2 Second string.
|
|
1119
|
+
* @return {Array.<string>} Five element Array, containing the prefix of
|
|
1120
|
+
* text1, the suffix of text1, the prefix of text2, the suffix of
|
|
1121
|
+
* text2 and the common middle. Or null if there was no match.
|
|
1122
|
+
*/
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Find the 'middle snake' of a diff, split the problem in two
|
|
1126
|
+
* and return the recursively constructed diff.
|
|
1127
|
+
* See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
|
|
1128
|
+
* @param {string} text1 Old string to be diffed.
|
|
1129
|
+
* @param {string} text2 New string to be diffed.
|
|
1130
|
+
* @return {Array} Array of diff tuples.
|
|
1131
|
+
* @private
|
|
1132
|
+
*/
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Find the differences between two texts. Assumes that the texts do not
|
|
1136
|
+
* have any common prefix or suffix.
|
|
1137
|
+
* @param {string} text1 Old string to be diffed.
|
|
1138
|
+
* @param {string} text2 New string to be diffed.
|
|
1139
|
+
* @return {Array} Array of diff tuples.
|
|
1140
|
+
*/
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* Find the differences between two texts. Simplifies the problem by stripping
|
|
1144
|
+
* any common prefix or suffix off the texts before diffing.
|
|
1145
|
+
* @param {string} text1 Old string to be diffed.
|
|
1146
|
+
* @param {string} text2 New string to be diffed.
|
|
1147
|
+
* @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info
|
|
1148
|
+
* @param {boolean} [cleanup] Apply semantic cleanup before returning.
|
|
1149
|
+
* @return {Array} Array of diff tuples.
|
|
1150
|
+
*/
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Gets the `toStringTag` of `value`.
|
|
1154
|
+
*
|
|
1155
|
+
* @private
|
|
1156
|
+
* @param {*} value The value to query.
|
|
1157
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1158
|
+
*/
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Gets the data for `map`.
|
|
1162
|
+
*
|
|
1163
|
+
* @private
|
|
1164
|
+
* @param {Object} map The map to query.
|
|
1165
|
+
* @param {string} key The reference key.
|
|
1166
|
+
* @returns {*} Returns the map data.
|
|
1167
|
+
*/
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Gets the hash value for `key`.
|
|
1171
|
+
*
|
|
1172
|
+
* @private
|
|
1173
|
+
* @name get
|
|
1174
|
+
* @memberOf Hash
|
|
1175
|
+
* @param {string} key The key of the value to get.
|
|
1176
|
+
* @returns {*} Returns the entry value.
|
|
1177
|
+
*/
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1181
|
+
*
|
|
1182
|
+
* @private
|
|
1183
|
+
* @param {Array} array The array to inspect.
|
|
1184
|
+
* @param {*} key The key to search for.
|
|
1185
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1186
|
+
*/
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Gets the list cache value for `key`.
|
|
1190
|
+
*
|
|
1191
|
+
* @private
|
|
1192
|
+
* @name get
|
|
1193
|
+
* @memberOf ListCache
|
|
1194
|
+
* @param {string} key The key of the value to get.
|
|
1195
|
+
* @returns {*} Returns the entry value.
|
|
1196
|
+
*/
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Gets the map value for `key`.
|
|
1200
|
+
*
|
|
1201
|
+
* @private
|
|
1202
|
+
* @name get
|
|
1203
|
+
* @memberOf MapCache
|
|
1204
|
+
* @param {string} key The key of the value to get.
|
|
1205
|
+
* @returns {*} Returns the entry value.
|
|
1206
|
+
*/
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Gets the native function at `key` of `object`.
|
|
1210
|
+
*
|
|
1211
|
+
* @private
|
|
1212
|
+
* @param {Object} object The object to query.
|
|
1213
|
+
* @param {string} key The key of the method to get.
|
|
1214
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1215
|
+
*/
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Gets the stack value for `key`.
|
|
1219
|
+
*
|
|
1220
|
+
* @private
|
|
1221
|
+
* @name get
|
|
1222
|
+
* @memberOf Stack
|
|
1223
|
+
* @param {string} key The key of the value to get.
|
|
1224
|
+
* @returns {*} Returns the entry value.
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Gets the value at `key` of `object`.
|
|
1229
|
+
*
|
|
1230
|
+
* @private
|
|
1231
|
+
* @param {Object} [object] The object to query.
|
|
1232
|
+
* @param {string} key The key of the property to get.
|
|
1233
|
+
* @returns {*} Returns the property value.
|
|
1234
|
+
*/
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
1238
|
+
*
|
|
1239
|
+
* @private
|
|
1240
|
+
* @param {Object} object The object to query.
|
|
1241
|
+
* @param {string} key The key of the property to get.
|
|
1242
|
+
* @returns {*} Returns the property value.
|
|
1243
|
+
*/
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Given the location of the 'middle snake', split the diff in two parts
|
|
1247
|
+
* and recurse.
|
|
1248
|
+
* @param {string} text1 Old string to be diffed.
|
|
1249
|
+
* @param {string} text2 New string to be diffed.
|
|
1250
|
+
* @param {number} x Index of split point in text1.
|
|
1251
|
+
* @param {number} y Index of split point in text2.
|
|
1252
|
+
* @return {Array} Array of diff tuples.
|
|
1253
|
+
*/
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Initializes an array clone.
|
|
1257
|
+
*
|
|
1258
|
+
* @private
|
|
1259
|
+
* @param {Array} array The array to clone.
|
|
1260
|
+
* @returns {Array} Returns the initialized clone.
|
|
1261
|
+
*/
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Initializes an object clone based on its `toStringTag`.
|
|
1265
|
+
*
|
|
1266
|
+
* **Note:** This function only supports cloning values with tags of
|
|
1267
|
+
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
1268
|
+
*
|
|
1269
|
+
* @private
|
|
1270
|
+
* @param {Object} object The object to clone.
|
|
1271
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
|
1272
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
1273
|
+
* @returns {Object} Returns the initialized clone.
|
|
1274
|
+
*/
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Initializes an object clone based on its `toStringTag`.
|
|
1278
|
+
*
|
|
1279
|
+
* **Note:** This function only supports cloning values with tags of
|
|
1280
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
1281
|
+
*
|
|
1282
|
+
* @private
|
|
1283
|
+
* @param {Object} object The object to clone.
|
|
1284
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
|
1285
|
+
* @param {Function} cloneFunc The function to clone values.
|
|
1286
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
1287
|
+
* @returns {Object} Returns the initialized clone.
|
|
1288
|
+
*/
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Initializes an object clone.
|
|
1292
|
+
*
|
|
1293
|
+
* @private
|
|
1294
|
+
* @param {Object} object The object to clone.
|
|
1295
|
+
* @returns {Object} Returns the initialized clone.
|
|
1296
|
+
*/
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
1300
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1301
|
+
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|
1302
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1303
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1304
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1305
|
+
*/
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Look for single edits surrounded on both sides by equalities
|
|
1309
|
+
* which can be shifted sideways to align the edit to a word boundary.
|
|
1310
|
+
* e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.
|
|
1311
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
|
1312
|
+
*/
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
1316
|
+
* `EventEmitter` interface.
|
|
1317
|
+
*
|
|
1318
|
+
* @constructor
|
|
1319
|
+
* @public
|
|
1320
|
+
*/
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* Options for initializing a Quill instance
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Performs a
|
|
1328
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1329
|
+
* comparison between two values to determine if they are equivalent.
|
|
1330
|
+
*
|
|
1331
|
+
* @static
|
|
1332
|
+
* @memberOf _
|
|
1333
|
+
* @since 4.0.0
|
|
1334
|
+
* @category Lang
|
|
1335
|
+
* @param {*} value The value to compare.
|
|
1336
|
+
* @param {*} other The other value to compare.
|
|
1337
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1338
|
+
* @example
|
|
1339
|
+
*
|
|
1340
|
+
* var object = { 'a': 1 };
|
|
1341
|
+
* var other = { 'a': 1 };
|
|
1342
|
+
*
|
|
1343
|
+
* _.eq(object, object);
|
|
1344
|
+
* // => true
|
|
1345
|
+
*
|
|
1346
|
+
* _.eq(object, other);
|
|
1347
|
+
* // => false
|
|
1348
|
+
*
|
|
1349
|
+
* _.eq('a', 'a');
|
|
1350
|
+
* // => true
|
|
1351
|
+
*
|
|
1352
|
+
* _.eq('a', Object('a'));
|
|
1353
|
+
* // => false
|
|
1354
|
+
*
|
|
1355
|
+
* _.eq(NaN, NaN);
|
|
1356
|
+
* // => true
|
|
1357
|
+
*/
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Performs a deep comparison between two values to determine if they are
|
|
1361
|
+
* equivalent.
|
|
1362
|
+
*
|
|
1363
|
+
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
1364
|
+
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
1365
|
+
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
1366
|
+
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
1367
|
+
* nodes are compared by strict equality, i.e. `===`.
|
|
1368
|
+
*
|
|
1369
|
+
* @static
|
|
1370
|
+
* @memberOf _
|
|
1371
|
+
* @since 0.1.0
|
|
1372
|
+
* @category Lang
|
|
1373
|
+
* @param {*} value The value to compare.
|
|
1374
|
+
* @param {*} other The other value to compare.
|
|
1375
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1376
|
+
* @example
|
|
1377
|
+
*
|
|
1378
|
+
* var object = { 'a': 1 };
|
|
1379
|
+
* var other = { 'a': 1 };
|
|
1380
|
+
*
|
|
1381
|
+
* _.isEqual(object, other);
|
|
1382
|
+
* // => true
|
|
1383
|
+
*
|
|
1384
|
+
* object === other;
|
|
1385
|
+
* // => false
|
|
1386
|
+
*/
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Reduce the number of edits by eliminating semantically trivial equalities.
|
|
1390
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
|
1391
|
+
*/
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Remove all listeners, or those of the specified event.
|
|
1395
|
+
*
|
|
1396
|
+
* @param {(String|Symbol)} [event] The event name.
|
|
1397
|
+
* @returns {EventEmitter} `this`.
|
|
1398
|
+
* @public
|
|
1399
|
+
*/
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* Remove the listeners of a given event.
|
|
1403
|
+
*
|
|
1404
|
+
* @param {(String|Symbol)} event The event name.
|
|
1405
|
+
* @param {Function} fn Only remove the listeners that match this function.
|
|
1406
|
+
* @param {*} context Only remove the listeners that have this context.
|
|
1407
|
+
* @param {Boolean} once Only remove one-time listeners.
|
|
1408
|
+
* @returns {EventEmitter} `this`.
|
|
1409
|
+
* @public
|
|
1410
|
+
*/
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* Removes `key` and its value from the hash.
|
|
1414
|
+
*
|
|
1415
|
+
* @private
|
|
1416
|
+
* @name delete
|
|
1417
|
+
* @memberOf Hash
|
|
1418
|
+
* @param {Object} hash The hash to modify.
|
|
1419
|
+
* @param {string} key The key of the value to remove.
|
|
1420
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1421
|
+
*/
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Removes `key` and its value from the list cache.
|
|
1425
|
+
*
|
|
1426
|
+
* @private
|
|
1427
|
+
* @name delete
|
|
1428
|
+
* @memberOf ListCache
|
|
1429
|
+
* @param {string} key The key of the value to remove.
|
|
1430
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1431
|
+
*/
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Removes `key` and its value from the map.
|
|
1435
|
+
*
|
|
1436
|
+
* @private
|
|
1437
|
+
* @name delete
|
|
1438
|
+
* @memberOf MapCache
|
|
1439
|
+
* @param {string} key The key of the value to remove.
|
|
1440
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1441
|
+
*/
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Removes `key` and its value from the stack.
|
|
1445
|
+
*
|
|
1446
|
+
* @private
|
|
1447
|
+
* @name delete
|
|
1448
|
+
* @memberOf Stack
|
|
1449
|
+
* @param {string} key The key of the value to remove.
|
|
1450
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1451
|
+
*/
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Removes all key-value entries from the hash.
|
|
1455
|
+
*
|
|
1456
|
+
* @private
|
|
1457
|
+
* @name clear
|
|
1458
|
+
* @memberOf Hash
|
|
1459
|
+
*/
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* Removes all key-value entries from the list cache.
|
|
1463
|
+
*
|
|
1464
|
+
* @private
|
|
1465
|
+
* @name clear
|
|
1466
|
+
* @memberOf ListCache
|
|
1467
|
+
*/
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Removes all key-value entries from the map.
|
|
1471
|
+
*
|
|
1472
|
+
* @private
|
|
1473
|
+
* @name clear
|
|
1474
|
+
* @memberOf MapCache
|
|
1475
|
+
*/
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* Removes all key-value entries from the stack.
|
|
1479
|
+
*
|
|
1480
|
+
* @private
|
|
1481
|
+
* @name clear
|
|
1482
|
+
* @memberOf Stack
|
|
1483
|
+
*/
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* Reorder and merge like edit sections. Merge equalities.
|
|
1487
|
+
* Any edit section can move as long as it doesn't cross an equality.
|
|
1488
|
+
* @param {Array} diffs Array of diff tuples.
|
|
1489
|
+
* @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff
|
|
1490
|
+
*/
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Representation of a single event listener.
|
|
1494
|
+
*
|
|
1495
|
+
* @param {Function} fn The listener function.
|
|
1496
|
+
* @param {*} context The context to invoke the listener with.
|
|
1497
|
+
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
|
|
1498
|
+
* @constructor
|
|
1499
|
+
* @private
|
|
1500
|
+
*/
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Return an array listing the events for which the emitter has registered
|
|
1504
|
+
* listeners.
|
|
1505
|
+
*
|
|
1506
|
+
* @returns {Array}
|
|
1507
|
+
* @public
|
|
1508
|
+
*/
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* Return the listeners registered for a given event.
|
|
1512
|
+
*
|
|
1513
|
+
* @param {(String|Symbol)} event The event name.
|
|
1514
|
+
* @returns {Array} The registered listeners.
|
|
1515
|
+
* @public
|
|
1516
|
+
*/
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Return the number of listeners listening to a given event.
|
|
1520
|
+
*
|
|
1521
|
+
* @param {(String|Symbol)} event The event name.
|
|
1522
|
+
* @returns {Number} The number of listeners.
|
|
1523
|
+
* @public
|
|
1524
|
+
*/
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Sets the hash `key` to `value`.
|
|
1528
|
+
*
|
|
1529
|
+
* @private
|
|
1530
|
+
* @name set
|
|
1531
|
+
* @memberOf Hash
|
|
1532
|
+
* @param {string} key The key of the value to set.
|
|
1533
|
+
* @param {*} value The value to set.
|
|
1534
|
+
* @returns {Object} Returns the hash instance.
|
|
1535
|
+
*/
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Sets the list cache `key` to `value`.
|
|
1539
|
+
*
|
|
1540
|
+
* @private
|
|
1541
|
+
* @name set
|
|
1542
|
+
* @memberOf ListCache
|
|
1543
|
+
* @param {string} key The key of the value to set.
|
|
1544
|
+
* @param {*} value The value to set.
|
|
1545
|
+
* @returns {Object} Returns the list cache instance.
|
|
1546
|
+
*/
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Sets the map `key` to `value`.
|
|
1550
|
+
*
|
|
1551
|
+
* @private
|
|
1552
|
+
* @name set
|
|
1553
|
+
* @memberOf MapCache
|
|
1554
|
+
* @param {string} key The key of the value to set.
|
|
1555
|
+
* @param {*} value The value to set.
|
|
1556
|
+
* @returns {Object} Returns the map cache instance.
|
|
1557
|
+
*/
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Sets the stack `key` to `value`.
|
|
1561
|
+
*
|
|
1562
|
+
* @private
|
|
1563
|
+
* @name set
|
|
1564
|
+
* @memberOf Stack
|
|
1565
|
+
* @param {string} key The key of the value to set.
|
|
1566
|
+
* @param {*} value The value to set.
|
|
1567
|
+
* @returns {Object} Returns the stack cache instance.
|
|
1568
|
+
*/
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* Similar to QuillOptions, but with all properties expanded to their default values,
|
|
1572
|
+
* and all selectors resolved to HTMLElements.
|
|
1573
|
+
*/
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* The base implementation of `_.assignIn` without support for multiple sources
|
|
1577
|
+
* or `customizer` functions.
|
|
1578
|
+
*
|
|
1579
|
+
* @private
|
|
1580
|
+
* @param {Object} object The destination object.
|
|
1581
|
+
* @param {Object} source The source object.
|
|
1582
|
+
* @returns {Object} Returns `object`.
|
|
1583
|
+
*/
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* The base implementation of `_.assign` without support for multiple sources
|
|
1587
|
+
* or `customizer` functions.
|
|
1588
|
+
*
|
|
1589
|
+
* @private
|
|
1590
|
+
* @param {Object} object The destination object.
|
|
1591
|
+
* @param {Object} source The source object.
|
|
1592
|
+
* @returns {Object} Returns `object`.
|
|
1593
|
+
*/
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
1597
|
+
* traversed objects.
|
|
1598
|
+
*
|
|
1599
|
+
* @private
|
|
1600
|
+
* @param {*} value The value to clone.
|
|
1601
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
1602
|
+
* @param {boolean} [isFull] Specify a clone including symbols.
|
|
1603
|
+
* @param {Function} [customizer] The function to customize cloning.
|
|
1604
|
+
* @param {string} [key] The key of `value`.
|
|
1605
|
+
* @param {Object} [object] The parent object of `value`.
|
|
1606
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
1607
|
+
* @returns {*} Returns the cloned value.
|
|
1608
|
+
*/
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
1612
|
+
* traversed objects.
|
|
1613
|
+
*
|
|
1614
|
+
* @private
|
|
1615
|
+
* @param {*} value The value to clone.
|
|
1616
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
1617
|
+
* 1 - Deep clone
|
|
1618
|
+
* 2 - Flatten inherited properties
|
|
1619
|
+
* 4 - Clone symbols
|
|
1620
|
+
* @param {Function} [customizer] The function to customize cloning.
|
|
1621
|
+
* @param {string} [key] The key of `value`.
|
|
1622
|
+
* @param {Object} [object] The parent object of `value`.
|
|
1623
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
1624
|
+
* @returns {*} Returns the cloned value.
|
|
1625
|
+
*/
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* The base implementation of `_.create` without support for assigning
|
|
1629
|
+
* properties to the created object.
|
|
1630
|
+
*
|
|
1631
|
+
* @private
|
|
1632
|
+
* @param {Object} proto The object to inherit from.
|
|
1633
|
+
* @returns {Object} Returns the new object.
|
|
1634
|
+
*/
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* The base implementation of `_.create` without support for assigning
|
|
1638
|
+
* properties to the created object.
|
|
1639
|
+
*
|
|
1640
|
+
* @private
|
|
1641
|
+
* @param {Object} prototype The object to inherit from.
|
|
1642
|
+
* @returns {Object} Returns the new object.
|
|
1643
|
+
*/
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* The base implementation of `_.isArguments`.
|
|
1647
|
+
*
|
|
1648
|
+
* @private
|
|
1649
|
+
* @param {*} value The value to check.
|
|
1650
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1651
|
+
*/
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
1655
|
+
* and tracks traversed objects.
|
|
1656
|
+
*
|
|
1657
|
+
* @private
|
|
1658
|
+
* @param {*} value The value to compare.
|
|
1659
|
+
* @param {*} other The other value to compare.
|
|
1660
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
1661
|
+
* 1 - Unordered comparison
|
|
1662
|
+
* 2 - Partial comparison
|
|
1663
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
1664
|
+
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
1665
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1666
|
+
*/
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
1670
|
+
*
|
|
1671
|
+
* @private
|
|
1672
|
+
* @param {*} value The value to check.
|
|
1673
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
1674
|
+
*/
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
1678
|
+
*
|
|
1679
|
+
* @private
|
|
1680
|
+
* @param {*} value The value to check.
|
|
1681
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1682
|
+
* else `false`.
|
|
1683
|
+
*/
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
1687
|
+
*
|
|
1688
|
+
* @private
|
|
1689
|
+
* @param {*} value The value to check.
|
|
1690
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
1691
|
+
*/
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
1695
|
+
*
|
|
1696
|
+
* @private
|
|
1697
|
+
* @param {*} value The value to check.
|
|
1698
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1699
|
+
*/
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
1703
|
+
*
|
|
1704
|
+
* @private
|
|
1705
|
+
* @param {Object} object The object to query.
|
|
1706
|
+
* @returns {Array} Returns the array of property names.
|
|
1707
|
+
*/
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
1711
|
+
*
|
|
1712
|
+
* @private
|
|
1713
|
+
* @param {Object} object The object to query.
|
|
1714
|
+
* @returns {Array} Returns the array of property names.
|
|
1715
|
+
*/
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* The base implementation of `_.merge` without support for multiple sources.
|
|
1719
|
+
*
|
|
1720
|
+
* @private
|
|
1721
|
+
* @param {Object} object The destination object.
|
|
1722
|
+
* @param {Object} source The source object.
|
|
1723
|
+
* @param {number} srcIndex The index of `source`.
|
|
1724
|
+
* @param {Function} [customizer] The function to customize merged values.
|
|
1725
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
1726
|
+
* counterparts.
|
|
1727
|
+
*/
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
1731
|
+
*
|
|
1732
|
+
* @private
|
|
1733
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
1734
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
1735
|
+
* @returns {Function} Returns the new function.
|
|
1736
|
+
*/
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
1740
|
+
* or max array length checks.
|
|
1741
|
+
*
|
|
1742
|
+
* @private
|
|
1743
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
1744
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
1745
|
+
* @returns {Array} Returns the array of results.
|
|
1746
|
+
*/
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
1750
|
+
*
|
|
1751
|
+
* @private
|
|
1752
|
+
* @param {Function} func The function to cap arguments for.
|
|
1753
|
+
* @returns {Function} Returns the new capped function.
|
|
1754
|
+
*/
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
1758
|
+
* value checks.
|
|
1759
|
+
*
|
|
1760
|
+
* @private
|
|
1761
|
+
* @param {Object} object The object to modify.
|
|
1762
|
+
* @param {string} key The key of the property to assign.
|
|
1763
|
+
* @param {*} value The value to assign.
|
|
1764
|
+
*/
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
1768
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
1769
|
+
* symbols of `object`.
|
|
1770
|
+
*
|
|
1771
|
+
* @private
|
|
1772
|
+
* @param {Object} object The object to query.
|
|
1773
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
1774
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
1775
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
1776
|
+
*/
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1780
|
+
*
|
|
1781
|
+
* @private
|
|
1782
|
+
* @param {*} value The value to query.
|
|
1783
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1784
|
+
*/
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* The base implementation of `getTag`.
|
|
1788
|
+
*
|
|
1789
|
+
* @private
|
|
1790
|
+
* @param {*} value The value to query.
|
|
1791
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1792
|
+
*/
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* The data structure representing a diff is an array of tuples:
|
|
1796
|
+
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
|
|
1797
|
+
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
|
|
1798
|
+
*/
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* This function is like
|
|
1802
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
1803
|
+
* except that it includes inherited enumerable properties.
|
|
1804
|
+
*
|
|
1805
|
+
* @private
|
|
1806
|
+
* @param {Object} object The object to query.
|
|
1807
|
+
* @returns {Array} Returns the array of property names.
|
|
1808
|
+
*/
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* This function is like `assignValue` except that it doesn't assign
|
|
1812
|
+
* `undefined` values.
|
|
1813
|
+
*
|
|
1814
|
+
* @private
|
|
1815
|
+
* @param {Object} object The object to modify.
|
|
1816
|
+
* @param {string} key The key of the property to assign.
|
|
1817
|
+
* @param {*} value The value to assign.
|
|
1818
|
+
*/
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* This library modifies the diff-patch-match library by Neil Fraser
|
|
1822
|
+
* by removing the patch and match functionality and certain advanced
|
|
1823
|
+
* options in the diff function. The original license is as follows:
|
|
1824
|
+
*
|
|
1825
|
+
* ===
|
|
1826
|
+
*
|
|
1827
|
+
* Diff Match and Patch
|
|
1828
|
+
*
|
|
1829
|
+
* Copyright 2006 Google Inc.
|
|
1830
|
+
* http://code.google.com/p/google-diff-match-patch/
|
|
1831
|
+
*
|
|
1832
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1833
|
+
* you may not use this file except in compliance with the License.
|
|
1834
|
+
* You may obtain a copy of the License at
|
|
1835
|
+
*
|
|
1836
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1837
|
+
*
|
|
1838
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1839
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1840
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1841
|
+
* See the License for the specific language governing permissions and
|
|
1842
|
+
* limitations under the License.
|
|
1843
|
+
*/
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* This method is like `_.clone` except that it recursively clones `value`.
|
|
1847
|
+
*
|
|
1848
|
+
* @static
|
|
1849
|
+
* @memberOf _
|
|
1850
|
+
* @since 1.0.0
|
|
1851
|
+
* @category Lang
|
|
1852
|
+
* @param {*} value The value to recursively clone.
|
|
1853
|
+
* @returns {*} Returns the deep cloned value.
|
|
1854
|
+
* @see _.clone
|
|
1855
|
+
* @example
|
|
1856
|
+
*
|
|
1857
|
+
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
1858
|
+
*
|
|
1859
|
+
* var deep = _.cloneDeep(objects);
|
|
1860
|
+
* console.log(deep[0] === objects[0]);
|
|
1861
|
+
* // => false
|
|
1862
|
+
*/
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
1866
|
+
* is an object.
|
|
1867
|
+
*
|
|
1868
|
+
* @static
|
|
1869
|
+
* @memberOf _
|
|
1870
|
+
* @since 4.0.0
|
|
1871
|
+
* @category Lang
|
|
1872
|
+
* @param {*} value The value to check.
|
|
1873
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
1874
|
+
* else `false`.
|
|
1875
|
+
* @example
|
|
1876
|
+
*
|
|
1877
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
1878
|
+
* // => true
|
|
1879
|
+
*
|
|
1880
|
+
* _.isArrayLikeObject(document.body.children);
|
|
1881
|
+
* // => true
|
|
1882
|
+
*
|
|
1883
|
+
* _.isArrayLikeObject('abc');
|
|
1884
|
+
* // => false
|
|
1885
|
+
*
|
|
1886
|
+
* _.isArrayLikeObject(_.noop);
|
|
1887
|
+
* // => false
|
|
1888
|
+
*/
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* This method returns `false`.
|
|
1892
|
+
*
|
|
1893
|
+
* @static
|
|
1894
|
+
* @memberOf _
|
|
1895
|
+
* @since 4.13.0
|
|
1896
|
+
* @category Util
|
|
1897
|
+
* @returns {boolean} Returns `false`.
|
|
1898
|
+
* @example
|
|
1899
|
+
*
|
|
1900
|
+
* _.times(2, _.stubFalse);
|
|
1901
|
+
* // => [false, false]
|
|
1902
|
+
*/
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* This method returns a new empty array.
|
|
1906
|
+
*
|
|
1907
|
+
* @static
|
|
1908
|
+
* @memberOf _
|
|
1909
|
+
* @since 4.13.0
|
|
1910
|
+
* @category Util
|
|
1911
|
+
* @returns {Array} Returns the new empty array.
|
|
1912
|
+
* @example
|
|
1913
|
+
*
|
|
1914
|
+
* var arrays = _.times(2, _.stubArray);
|
|
1915
|
+
*
|
|
1916
|
+
* console.log(arrays);
|
|
1917
|
+
* // => [[], []]
|
|
1918
|
+
*
|
|
1919
|
+
* console.log(arrays[0] === arrays[1]);
|
|
1920
|
+
* // => false
|
|
1921
|
+
*/
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* This method returns the first argument it receives.
|
|
1925
|
+
*
|
|
1926
|
+
* @static
|
|
1927
|
+
* @since 0.1.0
|
|
1928
|
+
* @memberOf _
|
|
1929
|
+
* @category Util
|
|
1930
|
+
* @param {*} value Any value.
|
|
1931
|
+
* @returns {*} Returns `value`.
|
|
1932
|
+
* @example
|
|
1933
|
+
*
|
|
1934
|
+
* var object = { 'a': 1 };
|
|
1935
|
+
*
|
|
1936
|
+
* console.log(_.identity(object) === object);
|
|
1937
|
+
* // => true
|
|
1938
|
+
*/
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Used to match `RegExp`
|
|
1942
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1943
|
+
*/
|
|
1944
|
+
|
|
1945
|
+
/**
|
|
1946
|
+
* Used to resolve the
|
|
1947
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1948
|
+
* of values.
|
|
1949
|
+
*/
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
1953
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1954
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
1955
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1956
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1957
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1958
|
+
*/
|
|
1959
|
+
|
|
1960
|
+
/** Built-in value references. */
|
|
1961
|
+
|
|
1962
|
+
/** Detect free variable `exports`. */
|
|
1963
|
+
|
|
1964
|
+
/** Detect free variable `global` from Node.js. */
|
|
1965
|
+
|
|
1966
|
+
/** Detect free variable `module`. */
|
|
1967
|
+
|
|
1968
|
+
/** Detect free variable `self`. */
|
|
1969
|
+
|
|
1970
|
+
/** Used as a reference to the global object. */
|
|
1971
|
+
|
|
1972
|
+
/** Used as references for various `Number` constants. */
|
|
1973
|
+
|
|
1974
|
+
/** Used as the size to enable large array optimizations. */
|
|
1975
|
+
|
|
1976
|
+
/** Used for built-in method references. */
|
|
1977
|
+
|
|
1978
|
+
/** Used to check objects for own properties. */
|
|
1979
|
+
|
|
1980
|
+
/** Used to compose bitmasks for cloning. */
|
|
1981
|
+
|
|
1982
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
1983
|
+
|
|
1984
|
+
/** Used to convert symbols to primitives and strings. */
|
|
1985
|
+
|
|
1986
|
+
/** Used to detect host constructors (Safari). */
|
|
1987
|
+
|
|
1988
|
+
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
1989
|
+
|
|
1990
|
+
/** Used to detect methods masquerading as native. */
|
|
1991
|
+
|
|
1992
|
+
/** Used to detect overreaching core-js shims. */
|
|
1993
|
+
|
|
1994
|
+
/** Used to detect unsigned integer values. */
|
|
1995
|
+
|
|
1996
|
+
/** Used to match `RegExp` flags from their coerced string values. */
|
|
1997
|
+
|
|
1998
|
+
/** Used to resolve the decompiled source of functions. */
|
|
1999
|
+
|
|
2000
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
2001
|
+
|
|
2002
|
+
/** `Object#toString` result references. */
|
|
2003
|
+
|
|
2004
|
+
/************************************************************************/
|
|
2005
|
+
|
|
2006
|
+
/******/
|
|
2007
|
+
|
|
2008
|
+
/***/
|
|
2009
|
+
|
|
2010
|
+
//
|
|
2011
|
+
|
|
2012
|
+
// <a><span class="ql-cursor">\uFEFF{I}</span></a>
|
|
2013
|
+
|
|
2014
|
+
// <span class="ql-cursor"><a>\uFEFF</a>d{I}</span>
|
|
2015
|
+
|
|
2016
|
+
// <span class="ql-cursor"><a>\uFEFF{I}</a></span>
|
|
2017
|
+
|
|
2018
|
+
// -> <del>abc</del>xxx<ins>def</ins>
|
|
2019
|
+
|
|
2020
|
+
// -> <ins>def</ins>xxx<del>abc</del>
|
|
2021
|
+
|
|
2022
|
+
// '1' should match with 1 (headers)
|
|
2023
|
+
|
|
2024
|
+
// 'whitespace'. Since this function's purpose is largely cosmetic,
|
|
2025
|
+
|
|
2026
|
+
// - `event.dataTransfer` should be null.
|
|
2027
|
+
|
|
2028
|
+
// - `event.dataTransfer` should contain "text/plain" data.
|
|
2029
|
+
|
|
2030
|
+
// - `event.data` should be null.
|
|
2031
|
+
|
|
2032
|
+
// - `event.data` should be string (Safari uses `event.dataTransfer`).
|
|
2033
|
+
|
|
2034
|
+
// @ts-expect-error
|
|
2035
|
+
|
|
2036
|
+
// @ts-expect-error -- TODO: add a better type guard around `index`
|
|
2037
|
+
|
|
2038
|
+
// @ts-expect-error Fix me later
|
|
2039
|
+
|
|
2040
|
+
// @ts-expect-error TODO fix me later
|
|
2041
|
+
|
|
2042
|
+
// @ts-expect-error TODO: Scroll#query() should return Attributor when scope is attribute
|
|
2043
|
+
|
|
2044
|
+
// @ts-expect-error TODO: allow empty context in Parchment
|
|
2045
|
+
|
|
2046
|
+
// @ts-expect-error TODO: make descendant() generic
|
|
2047
|
+
|
|
2048
|
+
// @ts-expect-error TODO: make isolate generic
|
|
2049
|
+
|
|
2050
|
+
// @ts-expect-error TODO: nativeRange.start.node doesn't seem to match function signature
|
|
2051
|
+
|
|
2052
|
+
// @ts-expect-error TODO: parameters of optimize() should be a optional
|
|
2053
|
+
|
|
2054
|
+
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/22609
|
|
2055
|
+
|
|
2056
|
+
// @ts-expect-error index should always be number
|
|
2057
|
+
|
|
2058
|
+
// A half-match was found, sort out the return data.
|
|
2059
|
+
|
|
2060
|
+
// Add a dummy entry at the end.
|
|
2061
|
+
|
|
2062
|
+
// Add break blot
|
|
2063
|
+
|
|
2064
|
+
// Add methods to `Hash`.
|
|
2065
|
+
|
|
2066
|
+
// Add methods to `ListCache`.
|
|
2067
|
+
|
|
2068
|
+
// Add methods to `MapCache`.
|
|
2069
|
+
|
|
2070
|
+
// Add methods to `SetCache`.
|
|
2071
|
+
|
|
2072
|
+
// Add methods to `Stack`.
|
|
2073
|
+
|
|
2074
|
+
// Add properties assigned by `RegExp#exec`.
|
|
2075
|
+
|
|
2076
|
+
// After the previous speedup, the character can't be an equality.
|
|
2077
|
+
|
|
2078
|
+
// Alias methods names because people roll like that.
|
|
2079
|
+
|
|
2080
|
+
// Allow `EventEmitter` to be imported as module namespace.
|
|
2081
|
+
|
|
2082
|
+
// Allow for throwaway end (used by insertText/insertEmbed)
|
|
2083
|
+
|
|
2084
|
+
// Always deleting newline here, length always 1
|
|
2085
|
+
|
|
2086
|
+
// An insertion or deletion.
|
|
2087
|
+
|
|
2088
|
+
// And then "x" will be inserted after `<a/>`:
|
|
2089
|
+
|
|
2090
|
+
// Assume cyclic values are equal.
|
|
2091
|
+
|
|
2092
|
+
// Assume we are given a well formed ops
|
|
2093
|
+
|
|
2094
|
+
// Avoid .ql-cursor being a descendant of `<a/>`.
|
|
2095
|
+
|
|
2096
|
+
// Binary search.
|
|
2097
|
+
|
|
2098
|
+
// Both matched. Select the longest.
|
|
2099
|
+
|
|
2100
|
+
// Browser may push down styles/nodes inside the cursor blot.
|
|
2101
|
+
|
|
2102
|
+
// CONCATENATED MODULE: ./node_modules/eventemitter3/index.mjs
|
|
2103
|
+
|
|
2104
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_Hash.js
|
|
2105
|
+
|
|
2106
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_ListCache.js
|
|
2107
|
+
|
|
2108
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_MapCache.js
|
|
2109
|
+
|
|
2110
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js
|
|
2111
|
+
|
|
2112
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_Stack.js
|
|
2113
|
+
|
|
2114
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_apply.js
|
|
2115
|
+
|
|
2116
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayEach.js
|
|
2117
|
+
|
|
2118
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayFilter.js
|
|
2119
|
+
|
|
2120
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayLikeKeys.js
|
|
2121
|
+
|
|
2122
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayPush.js
|
|
2123
|
+
|
|
2124
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js
|
|
2125
|
+
|
|
2126
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_assignMergeValue.js
|
|
2127
|
+
|
|
2128
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_assignValue.js
|
|
2129
|
+
|
|
2130
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_assocIndexOf.js
|
|
2131
|
+
|
|
2132
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js
|
|
2133
|
+
|
|
2134
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js
|
|
2135
|
+
|
|
2136
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignValue.js
|
|
2137
|
+
|
|
2138
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js
|
|
2139
|
+
|
|
2140
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseCreate.js
|
|
2141
|
+
|
|
2142
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js
|
|
2143
|
+
|
|
2144
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGetTag.js
|
|
2145
|
+
|
|
2146
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js
|
|
2147
|
+
|
|
2148
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js
|
|
2149
|
+
|
|
2150
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNative.js
|
|
2151
|
+
|
|
2152
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsTypedArray.js
|
|
2153
|
+
|
|
2154
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseKeys.js
|
|
2155
|
+
|
|
2156
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseKeysIn.js
|
|
2157
|
+
|
|
2158
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMerge.js
|
|
2159
|
+
|
|
2160
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMergeDeep.js
|
|
2161
|
+
|
|
2162
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRest.js
|
|
2163
|
+
|
|
2164
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTimes.js
|
|
2165
|
+
|
|
2166
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUnary.js
|
|
2167
|
+
|
|
2168
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cacheHas.js
|
|
2169
|
+
|
|
2170
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js
|
|
2171
|
+
|
|
2172
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneBuffer.js
|
|
2173
|
+
|
|
2174
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js
|
|
2175
|
+
|
|
2176
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js
|
|
2177
|
+
|
|
2178
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js
|
|
2179
|
+
|
|
2180
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneTypedArray.js
|
|
2181
|
+
|
|
2182
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_copyArray.js
|
|
2183
|
+
|
|
2184
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_copyObject.js
|
|
2185
|
+
|
|
2186
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js
|
|
2187
|
+
|
|
2188
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js
|
|
2189
|
+
|
|
2190
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_createAssigner.js
|
|
2191
|
+
|
|
2192
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseFor.js
|
|
2193
|
+
|
|
2194
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js
|
|
2195
|
+
|
|
2196
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js
|
|
2197
|
+
|
|
2198
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeys.js
|
|
2199
|
+
|
|
2200
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js
|
|
2201
|
+
|
|
2202
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getMapData.js
|
|
2203
|
+
|
|
2204
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getNative.js
|
|
2205
|
+
|
|
2206
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getRawTag.js
|
|
2207
|
+
|
|
2208
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbols.js
|
|
2209
|
+
|
|
2210
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getTag.js
|
|
2211
|
+
|
|
2212
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_getValue.js
|
|
2213
|
+
|
|
2214
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_hashClear.js
|
|
2215
|
+
|
|
2216
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_hashDelete.js
|
|
2217
|
+
|
|
2218
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_hashGet.js
|
|
2219
|
+
|
|
2220
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_hashHas.js
|
|
2221
|
+
|
|
2222
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js
|
|
2223
|
+
|
|
2224
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneObject.js
|
|
2225
|
+
|
|
2226
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_isIndex.js
|
|
2227
|
+
|
|
2228
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_isIterateeCall.js
|
|
2229
|
+
|
|
2230
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_isKeyable.js
|
|
2231
|
+
|
|
2232
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_isMasked.js
|
|
2233
|
+
|
|
2234
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_isPrototype.js
|
|
2235
|
+
|
|
2236
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheClear.js
|
|
2237
|
+
|
|
2238
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheDelete.js
|
|
2239
|
+
|
|
2240
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheGet.js
|
|
2241
|
+
|
|
2242
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheHas.js
|
|
2243
|
+
|
|
2244
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_listCacheSet.js
|
|
2245
|
+
|
|
2246
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheClear.js
|
|
2247
|
+
|
|
2248
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheDelete.js
|
|
2249
|
+
|
|
2250
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheGet.js
|
|
2251
|
+
|
|
2252
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheHas.js
|
|
2253
|
+
|
|
2254
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapCacheSet.js
|
|
2255
|
+
|
|
2256
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js
|
|
2257
|
+
|
|
2258
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeKeysIn.js
|
|
2259
|
+
|
|
2260
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_nodeUtil.js
|
|
2261
|
+
|
|
2262
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_objectToString.js
|
|
2263
|
+
|
|
2264
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_overArg.js
|
|
2265
|
+
|
|
2266
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_overRest.js
|
|
2267
|
+
|
|
2268
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_root.js
|
|
2269
|
+
|
|
2270
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_safeGet.js
|
|
2271
|
+
|
|
2272
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js
|
|
2273
|
+
|
|
2274
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_setToArray.js
|
|
2275
|
+
|
|
2276
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_shortOut.js
|
|
2277
|
+
|
|
2278
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_stackClear.js
|
|
2279
|
+
|
|
2280
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_stackDelete.js
|
|
2281
|
+
|
|
2282
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_stackGet.js
|
|
2283
|
+
|
|
2284
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_stackHas.js
|
|
2285
|
+
|
|
2286
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/_toSource.js
|
|
2287
|
+
|
|
2288
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/constant.js
|
|
2289
|
+
|
|
2290
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/eq.js
|
|
2291
|
+
|
|
2292
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/identity.js
|
|
2293
|
+
|
|
2294
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isArguments.js
|
|
2295
|
+
|
|
2296
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isArrayLike.js
|
|
2297
|
+
|
|
2298
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isArrayLikeObject.js
|
|
2299
|
+
|
|
2300
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isBuffer.js
|
|
2301
|
+
|
|
2302
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isEqual.js
|
|
2303
|
+
|
|
2304
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js
|
|
2305
|
+
|
|
2306
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isObject.js
|
|
2307
|
+
|
|
2308
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isObjectLike.js
|
|
2309
|
+
|
|
2310
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isPlainObject.js
|
|
2311
|
+
|
|
2312
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js
|
|
2313
|
+
|
|
2314
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/isTypedArray.js
|
|
2315
|
+
|
|
2316
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/keys.js
|
|
2317
|
+
|
|
2318
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/keysIn.js
|
|
2319
|
+
|
|
2320
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/stubArray.js
|
|
2321
|
+
|
|
2322
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/stubFalse.js
|
|
2323
|
+
|
|
2324
|
+
// CONCATENATED MODULE: ./node_modules/lodash-es/toPlainObject.js
|
|
2325
|
+
|
|
2326
|
+
// CONCATENATED MODULE: ./node_modules/parchment/dist/parchment.js
|
|
2327
|
+
|
|
2328
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/break.js
|
|
2329
|
+
|
|
2330
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/container.js
|
|
2331
|
+
|
|
2332
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/cursor.js
|
|
2333
|
+
|
|
2334
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/inline.js
|
|
2335
|
+
|
|
2336
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/scroll.js
|
|
2337
|
+
|
|
2338
|
+
// CONCATENATED MODULE: ./node_modules/quill/blots/text.js
|
|
2339
|
+
|
|
2340
|
+
// CONCATENATED MODULE: ./node_modules/quill/core.js
|
|
2341
|
+
|
|
2342
|
+
// CONCATENATED MODULE: ./node_modules/quill/core/composition.js
|
|
2343
|
+
|
|
2344
|
+
// CONCATENATED MODULE: ./node_modules/quill/core/module.js
|
|
2345
|
+
|
|
2346
|
+
// CONCATENATED MODULE: ./node_modules/quill/core/theme.js
|
|
2347
|
+
|
|
2348
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/blockquote.js
|
|
2349
|
+
|
|
2350
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/bold.js
|
|
2351
|
+
|
|
2352
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/code.js
|
|
2353
|
+
|
|
2354
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/color.js
|
|
2355
|
+
|
|
2356
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/direction.js
|
|
2357
|
+
|
|
2358
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/formula.js
|
|
2359
|
+
|
|
2360
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/header.js
|
|
2361
|
+
|
|
2362
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/indent.js
|
|
2363
|
+
|
|
2364
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/italic.js
|
|
2365
|
+
|
|
2366
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/link.js
|
|
2367
|
+
|
|
2368
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/list.js
|
|
2369
|
+
|
|
2370
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/script.js
|
|
2371
|
+
|
|
2372
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/strike.js
|
|
2373
|
+
|
|
2374
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/table.js
|
|
2375
|
+
|
|
2376
|
+
// CONCATENATED MODULE: ./node_modules/quill/formats/underline.js
|
|
2377
|
+
|
|
2378
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/history.js
|
|
2379
|
+
|
|
2380
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/normalizeExternalHTML/index.js
|
|
2381
|
+
|
|
2382
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/normalizeExternalHTML/normalizers/googleDocs.js
|
|
2383
|
+
|
|
2384
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/normalizeExternalHTML/normalizers/msWord.js
|
|
2385
|
+
|
|
2386
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/table.js
|
|
2387
|
+
|
|
2388
|
+
// CONCATENATED MODULE: ./node_modules/quill/modules/uploader.js
|
|
2389
|
+
|
|
2390
|
+
// CONCATENATED MODULE: ./node_modules/quill/quill.js
|
|
2391
|
+
|
|
2392
|
+
// CONCATENATED MODULE: ./node_modules/quill/themes/bubble.js
|
|
2393
|
+
|
|
2394
|
+
// CONCATENATED MODULE: ./node_modules/quill/themes/snow.js
|
|
2395
|
+
|
|
2396
|
+
// CONCATENATED MODULE: ./node_modules/quill/ui/color-picker.js
|
|
2397
|
+
|
|
2398
|
+
// CONCATENATED MODULE: ./node_modules/quill/ui/icon-picker.js
|
|
2399
|
+
|
|
2400
|
+
// CONCATENATED MODULE: ./node_modules/quill/ui/icons.js
|
|
2401
|
+
|
|
2402
|
+
// CONCATENATED MODULE: ./src/export/lib/quilljs/quill.js
|
|
2403
|
+
|
|
2404
|
+
// Cache the text lengths to prevent multiple calls.
|
|
2405
|
+
|
|
2406
|
+
// Change second copy to insert.
|
|
2407
|
+
|
|
2408
|
+
// Check again based on the third quarter.
|
|
2409
|
+
|
|
2410
|
+
// Check for astral symbols
|
|
2411
|
+
|
|
2412
|
+
// Check for circular references and return its corresponding clone.
|
|
2413
|
+
|
|
2414
|
+
// Check for equality
|
|
2415
|
+
|
|
2416
|
+
// Check if module is in cache
|
|
2417
|
+
|
|
2418
|
+
// Check that cyclic values are equal.
|
|
2419
|
+
|
|
2420
|
+
// Check to see if the problem can be split in two.
|
|
2421
|
+
|
|
2422
|
+
// Chrome wants <a> to be lower
|
|
2423
|
+
|
|
2424
|
+
// Clean functionality in existing apps only clean inline formats
|
|
2425
|
+
|
|
2426
|
+
// Close menu and return focus to trigger label
|
|
2427
|
+
|
|
2428
|
+
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
2429
|
+
|
|
2430
|
+
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
2431
|
+
|
|
2432
|
+
// Could be 0.5in
|
|
2433
|
+
|
|
2434
|
+
// Create a new module (and put it into the cache)
|
|
2435
|
+
|
|
2436
|
+
// Currently it only supports top-level embeds (BlockEmbed).
|
|
2437
|
+
|
|
2438
|
+
// Delete the offending records and add the merged ones.
|
|
2439
|
+
|
|
2440
|
+
// Diff took too long and hit the deadline or
|
|
2441
|
+
|
|
2442
|
+
// Different id means the next item doesn't belong to this group.
|
|
2443
|
+
|
|
2444
|
+
// Don't return NaN
|
|
2445
|
+
|
|
2446
|
+
// Don't return `map.set` because it's not chainable in IE 11.
|
|
2447
|
+
|
|
2448
|
+
// Don't return `set.add` because it's not chainable in IE 11.
|
|
2449
|
+
|
|
2450
|
+
// Don't want screen readers to read this until options are visible
|
|
2451
|
+
|
|
2452
|
+
// Duplicate record.
|
|
2453
|
+
|
|
2454
|
+
// ESM COMPAT FLAG
|
|
2455
|
+
|
|
2456
|
+
// EXTERNAL MODULE: ./node_modules/eventemitter3/index.js
|
|
2457
|
+
|
|
2458
|
+
// EXTERNAL MODULE: ./node_modules/quill-delta/dist/Delta.js
|
|
2459
|
+
|
|
2460
|
+
// Each list item contains a marker wrapped with "mso-list: Ignore".
|
|
2461
|
+
|
|
2462
|
+
// Each port of this function behaves slightly differently due to
|
|
2463
|
+
|
|
2464
|
+
// Edges are the best.
|
|
2465
|
+
|
|
2466
|
+
// Eliminate an equality that is smaller or equal to the edits on both
|
|
2467
|
+
|
|
2468
|
+
// Eliminate the null case.
|
|
2469
|
+
|
|
2470
|
+
// Empty text nodes are most likely caused by TextBlot#optimize()
|
|
2471
|
+
|
|
2472
|
+
// Equality found.
|
|
2473
|
+
|
|
2474
|
+
// Exclude self
|
|
2475
|
+
|
|
2476
|
+
// Execute the module function
|
|
2477
|
+
|
|
2478
|
+
// Expose the prefix.
|
|
2479
|
+
|
|
2480
|
+
// Factor out any common prefixes.
|
|
2481
|
+
|
|
2482
|
+
// Factor out any common suffixes.
|
|
2483
|
+
|
|
2484
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
2485
|
+
|
|
2486
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
|
2487
|
+
|
|
2488
|
+
// Find any overlaps between deletions and insertions.
|
|
2489
|
+
|
|
2490
|
+
// Firefox inserts inaccessible nodes around video elements
|
|
2491
|
+
|
|
2492
|
+
// First check if the second quarter is the seed for a half-match.
|
|
2493
|
+
|
|
2494
|
+
// Flag the module as loaded
|
|
2495
|
+
|
|
2496
|
+
// Follow the native behavior that inherits the formats of the first character
|
|
2497
|
+
|
|
2498
|
+
// For example ({I} is the caret), given the markup:
|
|
2499
|
+
|
|
2500
|
+
// Gboard with English input on Android triggers `compositionstart` sometimes even
|
|
2501
|
+
|
|
2502
|
+
// Group continuous items into the same group (aka "ul")
|
|
2503
|
+
|
|
2504
|
+
// Hack for accessing inherited static methods
|
|
2505
|
+
|
|
2506
|
+
// Handle format being object, two format name/value strings or excluded
|
|
2507
|
+
|
|
2508
|
+
// Handle optional source
|
|
2509
|
+
|
|
2510
|
+
// Handle selection preservation and TEXT_CHANGE emission
|
|
2511
|
+
|
|
2512
|
+
// If `Object.create(null)` is not supported we prefix the event names with a
|
|
2513
|
+
|
|
2514
|
+
// If shifts were made, the diff needs reordering and another shift sweep.
|
|
2515
|
+
|
|
2516
|
+
// If style already exists, don't add to an array, but don't lose other styles
|
|
2517
|
+
|
|
2518
|
+
// If the total number of characters is odd, then the front path will collide
|
|
2519
|
+
|
|
2520
|
+
// Ignore non-index properties.
|
|
2521
|
+
|
|
2522
|
+
// Ignore type bits, force attribute bit
|
|
2523
|
+
|
|
2524
|
+
// Insert + delete cancels out
|
|
2525
|
+
|
|
2526
|
+
// Insert an equality and swap and trim the surrounding edits.
|
|
2527
|
+
|
|
2528
|
+
// Intentionally ignore the first and last element (don't need checking).
|
|
2529
|
+
|
|
2530
|
+
// Invalid dates are coerced to `NaN`.
|
|
2531
|
+
|
|
2532
|
+
// It is important for cursor behavior BlockEmbeds use tags that are block level elements
|
|
2533
|
+
|
|
2534
|
+
// Just add some text (speedup).
|
|
2535
|
+
|
|
2536
|
+
// Just delete some text (speedup).
|
|
2537
|
+
|
|
2538
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
2539
|
+
|
|
2540
|
+
// Let selection be restored by toolbar handlers before repositioning
|
|
2541
|
+
|
|
2542
|
+
// Lock our width so we will expand beyond our offsetParent boundaries
|
|
2543
|
+
|
|
2544
|
+
// Lower index means deeper in the DOM tree, since not found (-1) is for embeds
|
|
2545
|
+
|
|
2546
|
+
// Make sure we access getRange with editor in consistent state
|
|
2547
|
+
|
|
2548
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
2549
|
+
|
|
2550
|
+
// Merge the results.
|
|
2551
|
+
|
|
2552
|
+
// Merge this equality with the previous one.
|
|
2553
|
+
|
|
2554
|
+
// Mirror x2 onto top-left coordinate system.
|
|
2555
|
+
|
|
2556
|
+
// Must be lower
|
|
2557
|
+
|
|
2558
|
+
// NAMESPACE OBJECT: ./node_modules/parchment/dist/parchment.js
|
|
2559
|
+
|
|
2560
|
+
// Need a unique id for aria-controls
|
|
2561
|
+
|
|
2562
|
+
// Need setTimeout for accessibility to ensure that the browser executes
|
|
2563
|
+
|
|
2564
|
+
// Need to handle delete and backspace for Firefox in the general case #1171
|
|
2565
|
+
|
|
2566
|
+
// Never remove self
|
|
2567
|
+
|
|
2568
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2569
|
+
|
|
2570
|
+
// Non `Object` object instances with different constructors are not equal.
|
|
2571
|
+
|
|
2572
|
+
// Normalize the diff.
|
|
2573
|
+
|
|
2574
|
+
// Only extract an overlap if it is as big as the edit ahead or behind it.
|
|
2575
|
+
|
|
2576
|
+
// Optimization for character changes
|
|
2577
|
+
|
|
2578
|
+
// Optimization if rest of other is just retain
|
|
2579
|
+
|
|
2580
|
+
// Other op should be delete, we could be an insert or retain
|
|
2581
|
+
|
|
2582
|
+
// Our delete either makes their delete redundant or removes their retain
|
|
2583
|
+
|
|
2584
|
+
// Overlap detected.
|
|
2585
|
+
|
|
2586
|
+
// Overlap found. Insert an equality and trim the surrounding edits.
|
|
2587
|
+
|
|
2588
|
+
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
|
|
2589
|
+
|
|
2590
|
+
// Performance analysis: http://neil.fraser.name/news/2010/11/04/
|
|
2591
|
+
|
|
2592
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2593
|
+
|
|
2594
|
+
// Placeholder char for embed in diff()
|
|
2595
|
+
|
|
2596
|
+
// Pointless.
|
|
2597
|
+
|
|
2598
|
+
// Post-order
|
|
2599
|
+
|
|
2600
|
+
// Preserve null when composing with a retain, otherwise remove it for inserts
|
|
2601
|
+
|
|
2602
|
+
// Prevent scrolling
|
|
2603
|
+
|
|
2604
|
+
// Quick check for common null cases.
|
|
2605
|
+
|
|
2606
|
+
// Quick check for the worst case.
|
|
2607
|
+
|
|
2608
|
+
// Quill will set empty editor to \n
|
|
2609
|
+
|
|
2610
|
+
// RTL scripts or moving from the end of the previous line
|
|
2611
|
+
|
|
2612
|
+
// Ran off the bottom of the graph.
|
|
2613
|
+
|
|
2614
|
+
// Ran off the left of the graph.
|
|
2615
|
+
|
|
2616
|
+
// Ran off the right of the graph.
|
|
2617
|
+
|
|
2618
|
+
// Ran off the top of the graph.
|
|
2619
|
+
|
|
2620
|
+
// Recursively compare arrays (susceptible to call stack limits).
|
|
2621
|
+
|
|
2622
|
+
// Recursively compare objects (susceptible to call stack limits).
|
|
2623
|
+
|
|
2624
|
+
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
2625
|
+
|
|
2626
|
+
// Recursively populate clone (susceptible to call stack limits).
|
|
2627
|
+
|
|
2628
|
+
// Remove trailing newline
|
|
2629
|
+
|
|
2630
|
+
// Requisite prev lines are empty
|
|
2631
|
+
|
|
2632
|
+
// Reset the array, or remove it completely if we have no more listeners.
|
|
2633
|
+
|
|
2634
|
+
// Reset the counters.
|
|
2635
|
+
|
|
2636
|
+
// Restore the prefix and suffix.
|
|
2637
|
+
|
|
2638
|
+
// Return null if the text node is empty because it is
|
|
2639
|
+
|
|
2640
|
+
// Return the exports of the module
|
|
2641
|
+
|
|
2642
|
+
// Reverse overlap found.
|
|
2643
|
+
|
|
2644
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
2645
|
+
|
|
2646
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2647
|
+
|
|
2648
|
+
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
|
2649
|
+
|
|
2650
|
+
// Second pass: look for single edits surrounded on both sides by equalities
|
|
2651
|
+
|
|
2652
|
+
// Second, step character by character right, looking for the best fit.
|
|
2653
|
+
|
|
2654
|
+
// Setting all elements to -1 is faster in Chrome & Firefox than mixing
|
|
2655
|
+
|
|
2656
|
+
// Shift the edit over the next equality.
|
|
2657
|
+
|
|
2658
|
+
// Shift the edit over the previous equality.
|
|
2659
|
+
|
|
2660
|
+
// Shorter text is inside the longer text (speedup).
|
|
2661
|
+
|
|
2662
|
+
// Should be all retains
|
|
2663
|
+
|
|
2664
|
+
// Should never happen
|
|
2665
|
+
|
|
2666
|
+
// Since it does not matter if we insert before or after deleting at the same index,
|
|
2667
|
+
|
|
2668
|
+
// Single character string.
|
|
2669
|
+
|
|
2670
|
+
// Skip index properties.
|
|
2671
|
+
|
|
2672
|
+
// Special case toolbar shorthand
|
|
2673
|
+
|
|
2674
|
+
// Start by looking for a single character match
|
|
2675
|
+
|
|
2676
|
+
// Start with a 1/4 length substring at position i as a seed.
|
|
2677
|
+
|
|
2678
|
+
// Swap insertions for deletions if diff is reversed.
|
|
2679
|
+
|
|
2680
|
+
// Syntax module will register
|
|
2681
|
+
|
|
2682
|
+
// TODO Give blot ability to not split
|
|
2683
|
+
|
|
2684
|
+
// TODO cleanup
|
|
2685
|
+
|
|
2686
|
+
// TODO fix API
|
|
2687
|
+
|
|
2688
|
+
// TODO make configurable?
|
|
2689
|
+
|
|
2690
|
+
// TODO move to table module
|
|
2691
|
+
|
|
2692
|
+
// TODO this is usually undefined
|
|
2693
|
+
|
|
2694
|
+
// TODO: Fix this next time the file is edited.
|
|
2695
|
+
|
|
2696
|
+
// TODO: Move into quill.ts or editor.ts
|
|
2697
|
+
|
|
2698
|
+
// That will cause DOM nodes not sync with the model.
|
|
2699
|
+
|
|
2700
|
+
// The >= encourages trailing rather than leading whitespace on edits.
|
|
2701
|
+
|
|
2702
|
+
// The list stype is not defined inline with the tag, instead, it's in the
|
|
2703
|
+
|
|
2704
|
+
// The module cache
|
|
2705
|
+
|
|
2706
|
+
// The reason is Safari pushes down `<a/>` on text insertion.
|
|
2707
|
+
|
|
2708
|
+
// The require function
|
|
2709
|
+
|
|
2710
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
2711
|
+
|
|
2712
|
+
// There should only be one key
|
|
2713
|
+
|
|
2714
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
2715
|
+
|
|
2716
|
+
// This hack is needed because the `__proto__` property is still inherited in
|
|
2717
|
+
|
|
2718
|
+
// This is a single edit surrounded by equalities.
|
|
2719
|
+
|
|
2720
|
+
// Throw away the equality we just deleted.
|
|
2721
|
+
|
|
2722
|
+
// Throw away the previous equality (it needs to be reevaluated).
|
|
2723
|
+
|
|
2724
|
+
// Toggle aria-expanded and aria-hidden to make the picker accessible
|
|
2725
|
+
|
|
2726
|
+
// Trim off common prefix (speedup).
|
|
2727
|
+
|
|
2728
|
+
// Trim off common suffix (speedup).
|
|
2729
|
+
|
|
2730
|
+
// Truncate the longer string.
|
|
2731
|
+
|
|
2732
|
+
// Use `util.types` for Node.js 10+.
|
|
2733
|
+
|
|
2734
|
+
// Walk the front path one step.
|
|
2735
|
+
|
|
2736
|
+
// Walk the reverse path one step.
|
|
2737
|
+
|
|
2738
|
+
// We can update `ParentBlot` in parchment to support inline embeds.
|
|
2739
|
+
|
|
2740
|
+
// We have an improvement, save it back to the diff.
|
|
2741
|
+
|
|
2742
|
+
// We might be able to merge with prev now
|
|
2743
|
+
|
|
2744
|
+
// We retain either their retain or insert
|
|
2745
|
+
|
|
2746
|
+
// We try to not inherit from `Object.prototype`. In some engines creating an
|
|
2747
|
+
|
|
2748
|
+
// Webkit makes DOM changes after compositionend, so we use microtask to
|
|
2749
|
+
|
|
2750
|
+
// When `inputType` is "insertReplacementText":
|
|
2751
|
+
|
|
2752
|
+
// When `inputType` is "insertText":
|
|
2753
|
+
|
|
2754
|
+
// When typing a char "x", `<a/>` will be pushed down inside the `<span>` first:
|
|
2755
|
+
|
|
2756
|
+
// Will update selection before selection.update() does if text changes
|
|
2757
|
+
|
|
2758
|
+
// Word represents empty line with <o:p> </o:p>
|
|
2759
|
+
|
|
2760
|
+
// Zero width no break space
|
|
2761
|
+
|
|
2762
|
+
// \u00a0 is nbsp;
|
|
2763
|
+
|
|
2764
|
+
// `\n`s are needed in order to support empty lines at the beginning and the end.
|
|
2765
|
+
|
|
2766
|
+
// always prefer to insert first
|
|
2767
|
+
|
|
2768
|
+
// and increase length until no match is found.
|
|
2769
|
+
|
|
2770
|
+
// and we keep scanning for the next equality before rewriting the tuples.
|
|
2771
|
+
|
|
2772
|
+
// any format is present
|
|
2773
|
+
|
|
2774
|
+
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
2775
|
+
|
|
2776
|
+
// b simply overwrites us without priority
|
|
2777
|
+
|
|
2778
|
+
// both being null should match (default values)
|
|
2779
|
+
|
|
2780
|
+
// calculate selection to restore
|
|
2781
|
+
|
|
2782
|
+
// character to make sure that the built-in object properties are not
|
|
2783
|
+
|
|
2784
|
+
// collapse whitespace
|
|
2785
|
+
|
|
2786
|
+
// common to modification APIs
|
|
2787
|
+
|
|
2788
|
+
// could be that the user clicked in prevTextBlot or nextTextBlot, or
|
|
2789
|
+
|
|
2790
|
+
// cursor.restore() will handle
|
|
2791
|
+
|
|
2792
|
+
// define __esModule on exports
|
|
2793
|
+
|
|
2794
|
+
// define getter functions for harmony exports
|
|
2795
|
+
|
|
2796
|
+
// despite having improperly defined `toString` methods.
|
|
2797
|
+
|
|
2798
|
+
// document.getSelection() forces layout on Blink, so we trend to
|
|
2799
|
+
|
|
2800
|
+
// doesn't lose the cursor. the reason we are here in cursor.restore
|
|
2801
|
+
|
|
2802
|
+
// e.g: <del>abcxxx</del><ins>xxxdef</ins>
|
|
2803
|
+
|
|
2804
|
+
// e.g: <del>xxxabc</del><ins>defxxx</ins>
|
|
2805
|
+
|
|
2806
|
+
// e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
|
|
2807
|
+
|
|
2808
|
+
// emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and
|
|
2809
|
+
|
|
2810
|
+
// emptied out previous equality, so delete it and include previous delete/insert
|
|
2811
|
+
|
|
2812
|
+
// empty equalities or a common prefix or suffix. for example, if AB and AC are
|
|
2813
|
+
|
|
2814
|
+
// ensure the order.
|
|
2815
|
+
|
|
2816
|
+
// eslint-disable-line @typescript-eslint/no-unused-expressions
|
|
2817
|
+
|
|
2818
|
+
// eslint-disable-line new-cap
|
|
2819
|
+
|
|
2820
|
+
// eslint-disable-line no-alert
|
|
2821
|
+
|
|
2822
|
+
// eslint-disable-line prefer-destructuring
|
|
2823
|
+
|
|
2824
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2825
|
+
|
|
2826
|
+
// eslint-disable-next-line no-cond-assign
|
|
2827
|
+
|
|
2828
|
+
// eslint-disable-next-line no-fallthrough
|
|
2829
|
+
|
|
2830
|
+
// eslint-disable-next-line prefer-const
|
|
2831
|
+
|
|
2832
|
+
// exclude syntax highlighting from deltas and getFormat()
|
|
2833
|
+
|
|
2834
|
+
// focus on the next process thread and after any DOM content changes
|
|
2835
|
+
|
|
2836
|
+
// for data views in Edge < 14, and promises in Node.js.
|
|
2837
|
+
|
|
2838
|
+
// for empty equality not at end, wait for next equality
|
|
2839
|
+
|
|
2840
|
+
// for more details.
|
|
2841
|
+
|
|
2842
|
+
// highlight tab or tab at beginning of list, indent or blockquote
|
|
2843
|
+
|
|
2844
|
+
// https://bugs.webkit.org/show_bug.cgi?id=31902
|
|
2845
|
+
|
|
2846
|
+
// https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#push-down-values
|
|
2847
|
+
|
|
2848
|
+
// https://github.com/w3c/csswg-drafts/issues/2514.
|
|
2849
|
+
|
|
2850
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#element-restrictions
|
|
2851
|
+
|
|
2852
|
+
// ignore
|
|
2853
|
+
|
|
2854
|
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
2855
|
+
|
|
2856
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
2857
|
+
|
|
2858
|
+
// inserting 'AC', and then the common suffix 'AC' will be eliminated. in this
|
|
2859
|
+
|
|
2860
|
+
// instance in this way is faster than calling `Object.create(null)` directly.
|
|
2861
|
+
|
|
2862
|
+
// integers and undefined.
|
|
2863
|
+
|
|
2864
|
+
// is this an insert or delete right after oldCursor?
|
|
2865
|
+
|
|
2866
|
+
// line.length() - 1 targets \n in line, another -1 for newline being deleted
|
|
2867
|
+
|
|
2868
|
+
// not able to get a useful client rect:
|
|
2869
|
+
|
|
2870
|
+
// not calling it.
|
|
2871
|
+
|
|
2872
|
+
// not getting called when editor content changes.
|
|
2873
|
+
|
|
2874
|
+
// note that diff_commonPrefix and diff_commonSuffix are unicode-aware
|
|
2875
|
+
|
|
2876
|
+
// note: this runs after equality check has ruled out exact equality
|
|
2877
|
+
|
|
2878
|
+
// number of diffs equals number of characters, no commonality at all.
|
|
2879
|
+
|
|
2880
|
+
// of the previous equality and the beginning of this equality. this may create
|
|
2881
|
+
|
|
2882
|
+
// offset should === 0, length should === 1
|
|
2883
|
+
|
|
2884
|
+
// only pass fix_unicode=true at the top level, not when diff_main is
|
|
2885
|
+
|
|
2886
|
+
// overridden or used as an attack vector.
|
|
2887
|
+
|
|
2888
|
+
// particular case, both equalities go away, we absorb any previous inequalities,
|
|
2889
|
+
|
|
2890
|
+
// pass copy
|
|
2891
|
+
|
|
2892
|
+
// prevent splitting of unicode surrogate pairs. when fix_unicode is true,
|
|
2893
|
+
|
|
2894
|
+
// proactively merge TextBlots around cursor so that optimization
|
|
2895
|
+
|
|
2896
|
+
// quill.getSelection triggers update
|
|
2897
|
+
|
|
2898
|
+
// range.length contributes to delta.length()
|
|
2899
|
+
|
|
2900
|
+
// rather than force total conformity.
|
|
2901
|
+
|
|
2902
|
+
// recursively invoked
|
|
2903
|
+
|
|
2904
|
+
// register(Blot | Attributor, overwrite)
|
|
2905
|
+
|
|
2906
|
+
// root.scrollTop should be 0 if scrollContainer !== root
|
|
2907
|
+
|
|
2908
|
+
// savedRange is last non-null range
|
|
2909
|
+
|
|
2910
|
+
// see if diff could be a splice of the old selection range
|
|
2911
|
+
|
|
2912
|
+
// see if we have an insert or delete before or after cursor
|
|
2913
|
+
|
|
2914
|
+
// sides of it.
|
|
2915
|
+
|
|
2916
|
+
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
|
|
2917
|
+
|
|
2918
|
+
// style tag so we need to pass the html as a string.
|
|
2919
|
+
|
|
2920
|
+
// subtle differences in each language's definition of things like
|
|
2921
|
+
|
|
2922
|
+
// super.detach() will also clear domNode.__blot
|
|
2923
|
+
|
|
2924
|
+
// surrogate pairs. we fix this by shaving off stray surrogates from the end
|
|
2925
|
+
|
|
2926
|
+
// the choice has been made to use each language's native features
|
|
2927
|
+
|
|
2928
|
+
// the user typed something.
|
|
2929
|
+
|
|
2930
|
+
// unicode-encoded JS strings, but the tuple boundaries may fall between
|
|
2931
|
+
|
|
2932
|
+
// users are not going to type anything.
|
|
2933
|
+
|
|
2934
|
+
// we assume that the old and new text in the diff are complete and correct
|
|
2935
|
+
|
|
2936
|
+
// webpackBootstrap
|
|
2937
|
+
|
|
2938
|
+
// which can be shifted sideways to eliminate an equality.
|
|
2939
|
+
|
|
2940
|
+
// with the reverse path.
|
|
2941
|
+
|
|
2942
|
+
//# sourceMappingURL=AttributeMap.js.map
|
|
2943
|
+
|
|
2944
|
+
//# sourceMappingURL=Delta.js.map
|
|
2945
|
+
|
|
2946
|
+
//# sourceMappingURL=Op.js.map
|
|
2947
|
+
|
|
2948
|
+
//# sourceMappingURL=OpIterator.js.map
|
|
2949
|
+
|
|
2950
|
+
//# sourceMappingURL=base.js.map
|
|
2951
|
+
|
|
2952
|
+
//# sourceMappingURL=block.js.map
|
|
2953
|
+
|
|
2954
|
+
//# sourceMappingURL=blockquote.js.map
|
|
2955
|
+
|
|
2956
|
+
//# sourceMappingURL=bold.js.map
|
|
2957
|
+
|
|
2958
|
+
//# sourceMappingURL=break.js.map
|
|
2959
|
+
|
|
2960
|
+
//# sourceMappingURL=clipboard.js.map
|
|
2961
|
+
|
|
2962
|
+
//# sourceMappingURL=color-picker.js.map
|
|
2963
|
+
|
|
2964
|
+
//# sourceMappingURL=composition.js.map
|
|
2965
|
+
|
|
2966
|
+
//# sourceMappingURL=container.js.map
|
|
2967
|
+
|
|
2968
|
+
//# sourceMappingURL=core.js.map
|
|
2969
|
+
|
|
2970
|
+
//# sourceMappingURL=cursor.js.map
|
|
2971
|
+
|
|
2972
|
+
//# sourceMappingURL=editor.js.map
|
|
2973
|
+
|
|
2974
|
+
//# sourceMappingURL=embed.js.map
|
|
2975
|
+
|
|
2976
|
+
//# sourceMappingURL=emitter.js.map
|
|
2977
|
+
|
|
2978
|
+
//# sourceMappingURL=font.js.map
|
|
2979
|
+
|
|
2980
|
+
//# sourceMappingURL=formula.js.map
|
|
2981
|
+
|
|
2982
|
+
//# sourceMappingURL=googleDocs.js.map
|
|
2983
|
+
|
|
2984
|
+
//# sourceMappingURL=header.js.map
|
|
2985
|
+
|
|
2986
|
+
//# sourceMappingURL=history.js.map
|
|
2987
|
+
|
|
2988
|
+
//# sourceMappingURL=icon-picker.js.map
|
|
2989
|
+
|
|
2990
|
+
//# sourceMappingURL=image.js.map
|
|
2991
|
+
|
|
2992
|
+
//# sourceMappingURL=inline.js.map
|
|
2993
|
+
|
|
2994
|
+
//# sourceMappingURL=input.js.map
|
|
2995
|
+
|
|
2996
|
+
//# sourceMappingURL=italic.js.map
|
|
2997
|
+
|
|
2998
|
+
//# sourceMappingURL=keyboard.js.map
|
|
2999
|
+
|
|
3000
|
+
//# sourceMappingURL=link.js.map
|
|
3001
|
+
|
|
3002
|
+
//# sourceMappingURL=logger.js.map
|
|
3003
|
+
|
|
3004
|
+
//# sourceMappingURL=module.js.map
|
|
3005
|
+
|
|
3006
|
+
//# sourceMappingURL=msWord.js.map
|
|
3007
|
+
|
|
3008
|
+
//# sourceMappingURL=parchment.js.map
|
|
3009
|
+
|
|
3010
|
+
//# sourceMappingURL=picker.js.map
|
|
3011
|
+
|
|
3012
|
+
//# sourceMappingURL=quill.js.map
|
|
3013
|
+
|
|
3014
|
+
//# sourceMappingURL=script.js.map
|
|
3015
|
+
|
|
3016
|
+
//# sourceMappingURL=scroll.js.map
|
|
3017
|
+
|
|
3018
|
+
//# sourceMappingURL=selection.js.map
|
|
3019
|
+
|
|
3020
|
+
//# sourceMappingURL=snow.js.map
|
|
3021
|
+
|
|
3022
|
+
//# sourceMappingURL=strike.js.map
|
|
3023
|
+
|
|
3024
|
+
//# sourceMappingURL=table.js.map
|
|
3025
|
+
|
|
3026
|
+
//# sourceMappingURL=text.js.map
|
|
3027
|
+
|
|
3028
|
+
//# sourceMappingURL=theme.js.map
|
|
3029
|
+
|
|
3030
|
+
//# sourceMappingURL=tooltip.js.map
|
|
3031
|
+
|
|
3032
|
+
//# sourceMappingURL=uiNode.js.map
|
|
3033
|
+
|
|
3034
|
+
//# sourceMappingURL=underline.js.map
|
|
3035
|
+
|
|
3036
|
+
//# sourceMappingURL=uploader.js.map
|
|
3037
|
+
|
|
3038
|
+
//# sourceMappingURL=video.js.map
|