| 1 |
/*! elementor - v3.31.0 - 06-08-2025 */ |
| 2 |
/******/ (() => { // webpackBootstrap |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js": |
| 6 |
/*!***************************************************************************!*\ |
| 7 |
!*** ../assets/dev/js/editor/components/dynamic-tags/control-behavior.js ***! |
| 8 |
\***************************************************************************/ |
| 9 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 10 |
|
| 11 |
"use strict"; |
| 12 |
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 13 |
|
| 14 |
|
| 15 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 16 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 17 |
var TagPanelView = __webpack_require__(/*! elementor-dynamic-tags/tag-panel-view */ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js"); |
| 18 |
module.exports = Marionette.Behavior.extend({ |
| 19 |
tagView: null, |
| 20 |
listenerAttached: false, |
| 21 |
initialize: function initialize() { |
| 22 |
if (!this.listenerAttached) { |
| 23 |
this.listenTo(this.view.options.container.settings, 'change:external:__dynamic__', this.onAfterExternalChange); |
| 24 |
this.listenerAttached = true; |
| 25 |
} |
| 26 |
}, |
| 27 |
shouldRenderTools: function shouldRenderTools() { |
| 28 |
var hasDefault = this.getOption('dynamicSettings').default; |
| 29 |
if (hasDefault) { |
| 30 |
return false; |
| 31 |
} |
| 32 |
var isFeatureAvailableToUser = elementor.helpers.hasPro() && !elementor.helpers.hasProAndNotConnected(), |
| 33 |
hasTags = this.getOption('tags').length > 0; |
| 34 |
return !isFeatureAvailableToUser || hasTags; |
| 35 |
}, |
| 36 |
renderTools: function renderTools() { |
| 37 |
var _this = this; |
| 38 |
if (!this.shouldRenderTools()) { |
| 39 |
return; |
| 40 |
} |
| 41 |
var $dynamicSwitcher = jQuery(Marionette.Renderer.render('#tmpl-elementor-control-dynamic-switcher')); |
| 42 |
$dynamicSwitcher.on('click', function (event) { |
| 43 |
return _this.onDynamicSwitcherClick(event); |
| 44 |
}); |
| 45 |
this.$el.find('.elementor-control-dynamic-switcher-wrapper').append($dynamicSwitcher); |
| 46 |
this.ui.dynamicSwitcher = $dynamicSwitcher; |
| 47 |
if ('color' === this.view.model.get('type')) { |
| 48 |
if (this.view.colorPicker) { |
| 49 |
this.moveDynamicSwitcherToColorPicker(); |
| 50 |
} else { |
| 51 |
setTimeout(function () { |
| 52 |
return _this.moveDynamicSwitcherToColorPicker(); |
| 53 |
}); |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
// Add a Tipsy Tooltip to the Dynamic Switcher |
| 58 |
this.ui.dynamicSwitcher.tipsy({ |
| 59 |
title: function title() { |
| 60 |
return this.getAttribute('data-tooltip'); |
| 61 |
}, |
| 62 |
gravity: 's' |
| 63 |
}); |
| 64 |
}, |
| 65 |
moveDynamicSwitcherToColorPicker: function moveDynamicSwitcherToColorPicker() { |
| 66 |
var $colorPickerToolsContainer = this.view.colorPicker.$pickerToolsContainer; |
| 67 |
this.ui.dynamicSwitcher.removeClass('elementor-control-unit-1').addClass('e-control-tool'); |
| 68 |
var $eyedropper = $colorPickerToolsContainer.find('.elementor-control-element-color-picker'); |
| 69 |
if ($eyedropper.length) { |
| 70 |
this.ui.dynamicSwitcher.insertBefore($eyedropper); |
| 71 |
} else { |
| 72 |
$colorPickerToolsContainer.append(this.ui.dynamicSwitcher); |
| 73 |
} |
| 74 |
}, |
| 75 |
toggleDynamicClass: function toggleDynamicClass() { |
| 76 |
this.$el.toggleClass('elementor-control-dynamic-value', this.isDynamicMode()); |
| 77 |
}, |
| 78 |
isDynamicMode: function isDynamicMode() { |
| 79 |
var dynamicSettings = this.view.container.settings.get('__dynamic__'); |
| 80 |
return !!(dynamicSettings && dynamicSettings[this.view.model.get('name')]); |
| 81 |
}, |
| 82 |
createTagsList: function createTagsList() { |
| 83 |
var tags = _.groupBy(this.getOption('tags'), 'group'), |
| 84 |
groups = elementor.dynamicTags.getConfig('groups'), |
| 85 |
$tagsList = this.ui.tagsList = jQuery('<div>', { |
| 86 |
class: 'elementor-tags-list' |
| 87 |
}), |
| 88 |
$tagsListInner = jQuery('<div>', { |
| 89 |
class: 'elementor-tags-list__inner' |
| 90 |
}); |
| 91 |
$tagsList.append($tagsListInner); |
| 92 |
jQuery.each(groups, function (groupName) { |
| 93 |
var groupTags = tags[groupName]; |
| 94 |
if (!groupTags) { |
| 95 |
return; |
| 96 |
} |
| 97 |
var group = this, |
| 98 |
$groupTitle = jQuery('<div>', { |
| 99 |
class: 'elementor-tags-list__group-title' |
| 100 |
}).text(group.title); |
| 101 |
$tagsListInner.append($groupTitle); |
| 102 |
groupTags.forEach(function (tag) { |
| 103 |
var $tag = jQuery('<div>', { |
| 104 |
class: 'elementor-tags-list__item' |
| 105 |
}); |
| 106 |
$tag.text(tag.title).attr('data-tag-name', tag.name); |
| 107 |
$tagsListInner.append($tag); |
| 108 |
}); |
| 109 |
}); |
| 110 |
|
| 111 |
// Create and inject pro dynamic teaser template if Pro is not installed |
| 112 |
if (!elementor.helpers.hasPro() && Object.keys(tags).length) { |
| 113 |
var proTeaser = Marionette.Renderer.render('#tmpl-elementor-dynamic-tags-promo', { |
| 114 |
promotionUrl: elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name')) |
| 115 |
}); |
| 116 |
$tagsListInner.append(proTeaser); |
| 117 |
} |
| 118 |
$tagsListInner.on('click', '.elementor-tags-list__item', this.onTagsListItemClick.bind(this)); |
| 119 |
elementorCommon.elements.$body.append($tagsList); |
| 120 |
}, |
| 121 |
getTagsList: function getTagsList() { |
| 122 |
if (!this.ui.tagsList) { |
| 123 |
this.createTagsList(); |
| 124 |
} |
| 125 |
return this.ui.tagsList; |
| 126 |
}, |
| 127 |
toggleTagsList: function toggleTagsList() { |
| 128 |
var $tagsList = this.getTagsList(); |
| 129 |
if ($tagsList.is(':visible')) { |
| 130 |
$tagsList.hide(); |
| 131 |
return; |
| 132 |
} |
| 133 |
var direction = elementorCommon.config.isRTL ? 'left' : 'right'; |
| 134 |
$tagsList.show().position({ |
| 135 |
my: "".concat(direction, " top"), |
| 136 |
at: "".concat(direction, " bottom+5"), |
| 137 |
of: this.ui.dynamicSwitcher |
| 138 |
}); |
| 139 |
}, |
| 140 |
setTagView: function setTagView(id, name, settings) { |
| 141 |
if (this.tagView) { |
| 142 |
this.tagView.destroy(); |
| 143 |
} |
| 144 |
var tagView = this.tagView = new TagPanelView({ |
| 145 |
id: id, |
| 146 |
name: name, |
| 147 |
settings: settings, |
| 148 |
controlName: this.view.model.get('name'), |
| 149 |
dynamicSettings: this.getOption('dynamicSettings') |
| 150 |
}), |
| 151 |
elementContainer = this.view.options.container, |
| 152 |
tagViewLabel = elementContainer.controls[tagView.options.controlName].label; |
| 153 |
tagView.options.container = new elementorModules.editor.Container({ |
| 154 |
type: 'dynamic', |
| 155 |
id: id, |
| 156 |
model: tagView.model, |
| 157 |
settings: tagView.model, |
| 158 |
view: tagView, |
| 159 |
parent: elementContainer, |
| 160 |
label: elementContainer.label + ' ' + tagViewLabel, |
| 161 |
controls: tagView.model.options.controls, |
| 162 |
renderer: elementContainer |
| 163 |
}); |
| 164 |
tagView.render(); |
| 165 |
this.$el.find('.elementor-control-tag-area').after(tagView.el); |
| 166 |
this.listenTo(tagView, 'remove', this.onTagViewRemove.bind(this)); |
| 167 |
}, |
| 168 |
setDefaultTagView: function setDefaultTagView() { |
| 169 |
var tagData = elementor.dynamicTags.tagTextToTagData(this.getDynamicValue()); |
| 170 |
this.setTagView(tagData.id, tagData.name, tagData.settings); |
| 171 |
}, |
| 172 |
tagViewToTagText: function tagViewToTagText() { |
| 173 |
var tagView = this.tagView; |
| 174 |
return elementor.dynamicTags.tagDataToTagText(tagView.getOption('id'), tagView.getOption('name'), tagView.model); |
| 175 |
}, |
| 176 |
getDynamicValue: function getDynamicValue() { |
| 177 |
return this.view.container.dynamic.get(this.view.model.get('name')); |
| 178 |
}, |
| 179 |
destroyTagView: function destroyTagView() { |
| 180 |
if (this.tagView) { |
| 181 |
this.tagView.destroy(); |
| 182 |
this.tagView = null; |
| 183 |
} |
| 184 |
}, |
| 185 |
showPromotion: function showPromotion() { |
| 186 |
var hasProAndNotConnected = elementor.helpers.hasProAndNotConnected(), |
| 187 |
dialogOptions = { |
| 188 |
title: __('Dynamic Content', 'elementor'), |
| 189 |
content: __('Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.', 'elementor'), |
| 190 |
targetElement: this.ui.dynamicSwitcher, |
| 191 |
position: { |
| 192 |
blockStart: '-10' |
| 193 |
}, |
| 194 |
actionButton: { |
| 195 |
url: hasProAndNotConnected ? elementorProEditorConfig.urls.connect : elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name')), |
| 196 |
text: hasProAndNotConnected ? __('Connect & Activate', 'elementor') : __('Upgrade', 'elementor') |
| 197 |
} |
| 198 |
}; |
| 199 |
elementor.promotion.showDialog(dialogOptions); |
| 200 |
}, |
| 201 |
onRender: function onRender() { |
| 202 |
this.$el.addClass('elementor-control-dynamic'); |
| 203 |
this.renderTools(); |
| 204 |
this.toggleDynamicClass(); |
| 205 |
if (this.isDynamicMode()) { |
| 206 |
this.setDefaultTagView(); |
| 207 |
} |
| 208 |
}, |
| 209 |
onDynamicSwitcherClick: function onDynamicSwitcherClick(event) { |
| 210 |
event.stopPropagation(); |
| 211 |
if (this.getOption('tags').length) { |
| 212 |
this.toggleTagsList(); |
| 213 |
} else { |
| 214 |
this.showPromotion(); |
| 215 |
} |
| 216 |
}, |
| 217 |
onTagsListItemClick: function onTagsListItemClick(event) { |
| 218 |
var $tag = jQuery(event.currentTarget); |
| 219 |
this.setTagView(elementorCommon.helpers.getUniqueId(), $tag.data('tagName'), {}); |
| 220 |
|
| 221 |
// If an element has an active global value, disable it before applying the dynamic value. |
| 222 |
if (this.view.getGlobalKey()) { |
| 223 |
this.view.triggerMethod('unset:global:value'); |
| 224 |
} |
| 225 |
if (this.isDynamicMode()) { |
| 226 |
$e.run('document/dynamic/settings', { |
| 227 |
container: this.view.options.container, |
| 228 |
settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText()) |
| 229 |
}); |
| 230 |
} else { |
| 231 |
$e.run('document/dynamic/enable', { |
| 232 |
container: this.view.options.container, |
| 233 |
settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText()) |
| 234 |
}); |
| 235 |
} |
| 236 |
this.toggleDynamicClass(); |
| 237 |
this.toggleTagsList(); |
| 238 |
if (this.tagView.getTagConfig().settings_required) { |
| 239 |
this.tagView.showSettingsPopup(); |
| 240 |
} |
| 241 |
}, |
| 242 |
onTagViewRemove: function onTagViewRemove() { |
| 243 |
$e.run('document/dynamic/disable', { |
| 244 |
container: this.view.options.container, |
| 245 |
settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText()) |
| 246 |
}); |
| 247 |
this.toggleDynamicClass(); |
| 248 |
}, |
| 249 |
onAfterExternalChange: function onAfterExternalChange() { |
| 250 |
this.destroyTagView(); |
| 251 |
if (this.isDynamicMode()) { |
| 252 |
this.setDefaultTagView(); |
| 253 |
} |
| 254 |
this.toggleDynamicClass(); |
| 255 |
}, |
| 256 |
onDestroy: function onDestroy() { |
| 257 |
this.destroyTagView(); |
| 258 |
if (this.ui.tagsList) { |
| 259 |
this.ui.tagsList.remove(); |
| 260 |
} |
| 261 |
} |
| 262 |
}); |
| 263 |
|
| 264 |
/***/ }), |
| 265 |
|
| 266 |
/***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js": |
| 267 |
/*!***********************************************************************************!*\ |
| 268 |
!*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js ***! |
| 269 |
\***********************************************************************************/ |
| 270 |
/***/ ((module) => { |
| 271 |
|
| 272 |
"use strict"; |
| 273 |
|
| 274 |
|
| 275 |
module.exports = Marionette.ItemView.extend({ |
| 276 |
className: 'elementor-tag-controls-stack-empty', |
| 277 |
template: '#tmpl-elementor-tag-controls-stack-empty' |
| 278 |
}); |
| 279 |
|
| 280 |
/***/ }), |
| 281 |
|
| 282 |
/***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js": |
| 283 |
/*!*****************************************************************************!*\ |
| 284 |
!*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js ***! |
| 285 |
\*****************************************************************************/ |
| 286 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 287 |
|
| 288 |
"use strict"; |
| 289 |
|
| 290 |
|
| 291 |
var EmptyView = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack-empty */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js"); |
| 292 |
module.exports = elementorModules.editor.views.ControlsStack.extend({ |
| 293 |
activeTab: 'content', |
| 294 |
template: _.noop, |
| 295 |
emptyView: EmptyView, |
| 296 |
isEmpty: function isEmpty() { |
| 297 |
// Ignore the section control |
| 298 |
return this.collection.length < 2; |
| 299 |
}, |
| 300 |
childViewOptions: function childViewOptions() { |
| 301 |
return { |
| 302 |
container: this.options.container |
| 303 |
}; |
| 304 |
}, |
| 305 |
getNamespaceArray: function getNamespaceArray() { |
| 306 |
var currentPageView = elementor.getPanelView().getCurrentPageView(), |
| 307 |
eventNamespace = currentPageView.getNamespaceArray(); |
| 308 |
eventNamespace.push(currentPageView.activeSection); |
| 309 |
eventNamespace.push(this.getOption('controlName')); |
| 310 |
eventNamespace.push(this.getOption('name')); |
| 311 |
return eventNamespace; |
| 312 |
}, |
| 313 |
onRenderTemplate: function onRenderTemplate() { |
| 314 |
this.activateFirstSection(); |
| 315 |
} |
| 316 |
}); |
| 317 |
|
| 318 |
/***/ }), |
| 319 |
|
| 320 |
/***/ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js": |
| 321 |
/*!*************************************************************************!*\ |
| 322 |
!*** ../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js ***! |
| 323 |
\*************************************************************************/ |
| 324 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 325 |
|
| 326 |
"use strict"; |
| 327 |
|
| 328 |
|
| 329 |
var TagControlsStack = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js"); |
| 330 |
module.exports = Marionette.ItemView.extend({ |
| 331 |
className: 'elementor-dynamic-cover e-input-style', |
| 332 |
tagControlsStack: null, |
| 333 |
templateHelpers: function templateHelpers() { |
| 334 |
var helpers = {}; |
| 335 |
if (this.model) { |
| 336 |
helpers.controls = this.model.options.controls; |
| 337 |
} |
| 338 |
return helpers; |
| 339 |
}, |
| 340 |
ui: { |
| 341 |
remove: '.elementor-dynamic-cover__remove' |
| 342 |
}, |
| 343 |
events: function events() { |
| 344 |
var events = { |
| 345 |
'click @ui.remove': 'onRemoveClick' |
| 346 |
}; |
| 347 |
if (this.hasSettings()) { |
| 348 |
events.click = 'onClick'; |
| 349 |
} |
| 350 |
return events; |
| 351 |
}, |
| 352 |
getTemplate: function getTemplate() { |
| 353 |
var config = this.getTagConfig(), |
| 354 |
templateFunction = Marionette.TemplateCache.get('#tmpl-elementor-control-dynamic-cover'), |
| 355 |
renderedTemplate = Marionette.Renderer.render(templateFunction, { |
| 356 |
hasSettings: this.hasSettings(), |
| 357 |
isRemovable: !this.getOption('dynamicSettings').default, |
| 358 |
title: config.title, |
| 359 |
content: config.panel_template |
| 360 |
}); |
| 361 |
return Marionette.TemplateCache.prototype.compileTemplate(renderedTemplate.trim()); |
| 362 |
}, |
| 363 |
getTagConfig: function getTagConfig() { |
| 364 |
return elementor.dynamicTags.getConfig('tags.' + this.getOption('name')); |
| 365 |
}, |
| 366 |
initSettingsPopup: function initSettingsPopup() { |
| 367 |
var settingsPopupOptions = { |
| 368 |
className: 'elementor-tag-settings-popup', |
| 369 |
position: { |
| 370 |
my: 'left top+5', |
| 371 |
at: 'left bottom', |
| 372 |
of: this.$el, |
| 373 |
autoRefresh: true |
| 374 |
}, |
| 375 |
hide: { |
| 376 |
ignore: '.select2-container' |
| 377 |
} |
| 378 |
}; |
| 379 |
var settingsPopup = elementorCommon.dialogsManager.createWidget('buttons', settingsPopupOptions); |
| 380 |
this.getSettingsPopup = function () { |
| 381 |
return settingsPopup; |
| 382 |
}; |
| 383 |
}, |
| 384 |
hasSettings: function hasSettings() { |
| 385 |
return !!Object.values(this.getTagConfig().controls).length; |
| 386 |
}, |
| 387 |
showSettingsPopup: function showSettingsPopup() { |
| 388 |
if (!this.tagControlsStack) { |
| 389 |
this.initTagControlsStack(); |
| 390 |
} |
| 391 |
var settingsPopup = this.getSettingsPopup(); |
| 392 |
if (settingsPopup.isVisible()) { |
| 393 |
return; |
| 394 |
} |
| 395 |
settingsPopup.show(); |
| 396 |
}, |
| 397 |
initTagControlsStack: function initTagControlsStack() { |
| 398 |
this.tagControlsStack = new TagControlsStack({ |
| 399 |
model: this.model, |
| 400 |
controls: this.model.controls, |
| 401 |
name: this.options.name, |
| 402 |
controlName: this.options.controlName, |
| 403 |
container: this.options.container, |
| 404 |
el: this.getSettingsPopup().getElements('message')[0] |
| 405 |
}); |
| 406 |
this.tagControlsStack.render(); |
| 407 |
}, |
| 408 |
initModel: function initModel() { |
| 409 |
this.model = new elementorModules.editor.elements.models.BaseSettings(this.getOption('settings'), { |
| 410 |
controls: this.getTagConfig().controls |
| 411 |
}); |
| 412 |
}, |
| 413 |
initialize: function initialize() { |
| 414 |
// The `model` should always be available. |
| 415 |
this.initModel(); |
| 416 |
if (!this.hasSettings()) { |
| 417 |
return; |
| 418 |
} |
| 419 |
this.initSettingsPopup(); |
| 420 |
this.listenTo(this.model, 'change', this.render); |
| 421 |
}, |
| 422 |
onClick: function onClick() { |
| 423 |
this.showSettingsPopup(); |
| 424 |
}, |
| 425 |
onRemoveClick: function onRemoveClick(event) { |
| 426 |
event.stopPropagation(); |
| 427 |
this.destroy(); |
| 428 |
this.trigger('remove'); |
| 429 |
}, |
| 430 |
onDestroy: function onDestroy() { |
| 431 |
if (this.hasSettings()) { |
| 432 |
this.getSettingsPopup().destroy(); |
| 433 |
} |
| 434 |
if (this.tagControlsStack) { |
| 435 |
this.tagControlsStack.destroy(); |
| 436 |
} |
| 437 |
} |
| 438 |
}); |
| 439 |
|
| 440 |
/***/ }), |
| 441 |
|
| 442 |
/***/ "../assets/dev/js/editor/components/validator/base.js": |
| 443 |
/*!************************************************************!*\ |
| 444 |
!*** ../assets/dev/js/editor/components/validator/base.js ***! |
| 445 |
\************************************************************/ |
| 446 |
/***/ ((module) => { |
| 447 |
|
| 448 |
"use strict"; |
| 449 |
|
| 450 |
|
| 451 |
module.exports = elementorModules.Module.extend({ |
| 452 |
errors: [], |
| 453 |
__construct: function __construct(settings) { |
| 454 |
var customValidationMethod = settings.customValidationMethod; |
| 455 |
if (customValidationMethod) { |
| 456 |
this.validationMethod = customValidationMethod; |
| 457 |
} |
| 458 |
}, |
| 459 |
getDefaultSettings: function getDefaultSettings() { |
| 460 |
return { |
| 461 |
validationTerms: {} |
| 462 |
}; |
| 463 |
}, |
| 464 |
isValid: function isValid() { |
| 465 |
var validationErrors = this.validationMethod.apply(this, arguments); |
| 466 |
if (validationErrors.length) { |
| 467 |
this.errors = validationErrors; |
| 468 |
return false; |
| 469 |
} |
| 470 |
return true; |
| 471 |
}, |
| 472 |
validationMethod: function validationMethod(newValue) { |
| 473 |
var validationTerms = this.getSettings('validationTerms'), |
| 474 |
errors = []; |
| 475 |
if (validationTerms.required) { |
| 476 |
if (!('' + newValue).length) { |
| 477 |
errors.push('Required value is empty'); |
| 478 |
} |
| 479 |
} |
| 480 |
return errors; |
| 481 |
} |
| 482 |
}); |
| 483 |
|
| 484 |
/***/ }), |
| 485 |
|
| 486 |
/***/ "../assets/dev/js/editor/components/validator/breakpoint.js": |
| 487 |
/*!******************************************************************!*\ |
| 488 |
!*** ../assets/dev/js/editor/components/validator/breakpoint.js ***! |
| 489 |
\******************************************************************/ |
| 490 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 491 |
|
| 492 |
"use strict"; |
| 493 |
|
| 494 |
|
| 495 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 496 |
Object.defineProperty(exports, "__esModule", ({ |
| 497 |
value: true |
| 498 |
})); |
| 499 |
exports["default"] = void 0; |
| 500 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 501 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 502 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 503 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 504 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 505 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 506 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 507 |
var NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js"); |
| 508 |
var BreakpointValidator = exports["default"] = /*#__PURE__*/function (_NumberValidator) { |
| 509 |
function BreakpointValidator() { |
| 510 |
(0, _classCallCheck2.default)(this, BreakpointValidator); |
| 511 |
return _callSuper(this, BreakpointValidator, arguments); |
| 512 |
} |
| 513 |
(0, _inherits2.default)(BreakpointValidator, _NumberValidator); |
| 514 |
return (0, _createClass2.default)(BreakpointValidator, [{ |
| 515 |
key: "getDefaultSettings", |
| 516 |
value: function getDefaultSettings() { |
| 517 |
return { |
| 518 |
validationTerms: { |
| 519 |
// Max width we allow in general |
| 520 |
max: 5120 |
| 521 |
} |
| 522 |
}; |
| 523 |
} |
| 524 |
|
| 525 |
/** |
| 526 |
* Get Panel Active Breakpoints |
| 527 |
* |
| 528 |
* Since the active kit used in the Site Settings panel could be a draft, we need to use the panel's active |
| 529 |
* breakpoints settings and not the elementorFrontend.config values (which come from the DB). |
| 530 |
* |
| 531 |
* @return {*} Object |
| 532 |
*/ |
| 533 |
}, { |
| 534 |
key: "getPanelActiveBreakpoints", |
| 535 |
value: function getPanelActiveBreakpoints() { |
| 536 |
var panelBreakpoints = elementor.documents.currentDocument.config.settings.settings.active_breakpoints.map(function (breakpointName) { |
| 537 |
return breakpointName.replace('viewport_', ''); |
| 538 |
}), |
| 539 |
panelActiveBreakpoints = {}; |
| 540 |
panelBreakpoints.forEach(function (breakpointName) { |
| 541 |
panelActiveBreakpoints[breakpointName] = elementorFrontend.config.responsive.breakpoints[breakpointName]; |
| 542 |
}); |
| 543 |
return panelActiveBreakpoints; |
| 544 |
} |
| 545 |
}, { |
| 546 |
key: "initBreakpointProperties", |
| 547 |
value: function initBreakpointProperties() { |
| 548 |
var _activeBreakpoints$br, _activeBreakpoints$br2; |
| 549 |
var validationTerms = this.getSettings('validationTerms'), |
| 550 |
activeBreakpoints = this.getPanelActiveBreakpoints(), |
| 551 |
breakpointKeys = Object.keys(activeBreakpoints); |
| 552 |
this.breakpointIndex = breakpointKeys.indexOf(validationTerms.breakpointName); |
| 553 |
this.topBreakpoint = (_activeBreakpoints$br = activeBreakpoints[breakpointKeys[this.breakpointIndex + 1]]) === null || _activeBreakpoints$br === void 0 ? void 0 : _activeBreakpoints$br.value; |
| 554 |
this.bottomBreakpoint = (_activeBreakpoints$br2 = activeBreakpoints[breakpointKeys[this.breakpointIndex - 1]]) === null || _activeBreakpoints$br2 === void 0 ? void 0 : _activeBreakpoints$br2.value; |
| 555 |
} |
| 556 |
}, { |
| 557 |
key: "validationMethod", |
| 558 |
value: function validationMethod(newValue) { |
| 559 |
var validationTerms = this.getSettings('validationTerms'), |
| 560 |
errors = NumberValidator.prototype.validationMethod.call(this, newValue); |
| 561 |
|
| 562 |
// Validate both numeric and empty values, since breakpoints utilize default values when empty. |
| 563 |
if (_.isFinite(newValue) || '' === newValue) { |
| 564 |
if (!this.validateMinMaxForBreakpoint(newValue, validationTerms)) { |
| 565 |
errors.push('Value is not between the breakpoints above or under the edited breakpoint'); |
| 566 |
} |
| 567 |
} |
| 568 |
return errors; |
| 569 |
} |
| 570 |
}, { |
| 571 |
key: "validateMinMaxForBreakpoint", |
| 572 |
value: function validateMinMaxForBreakpoint(newValue, validationTerms) { |
| 573 |
var breakpointDefaultValue = elementorFrontend.config.responsive.breakpoints[validationTerms.breakpointName].default_value; |
| 574 |
var isValid = true; |
| 575 |
this.initBreakpointProperties(); |
| 576 |
|
| 577 |
// Since the following comparison is <=, allow usage of the 320px value for the mobile breakpoint. |
| 578 |
if ('mobile' === validationTerms.breakpointName && 320 === this.bottomBreakpoint) { |
| 579 |
this.bottomBreakpoint -= 1; |
| 580 |
} |
| 581 |
|
| 582 |
// If there is a breakpoint below the currently edited breakpoint |
| 583 |
if (this.bottomBreakpoint) { |
| 584 |
// Check that the new value is not under the bottom breakpoint's value. |
| 585 |
if ('' !== newValue && newValue <= this.bottomBreakpoint) { |
| 586 |
isValid = false; |
| 587 |
} |
| 588 |
|
| 589 |
// If the new value is empty, check that the default breakpoint value is not below the bottom breakpoint. |
| 590 |
if ('' === newValue && breakpointDefaultValue <= this.bottomBreakpoint) { |
| 591 |
isValid = false; |
| 592 |
} |
| 593 |
} |
| 594 |
|
| 595 |
// If there is a breakpoint above the currently edited breakpoint. |
| 596 |
if (this.topBreakpoint) { |
| 597 |
// Check that the value is not above the top breakpoint's value. |
| 598 |
if ('' !== newValue && newValue >= this.topBreakpoint) { |
| 599 |
isValid = false; |
| 600 |
} |
| 601 |
|
| 602 |
// If the new value is empty, check that the default breakpoint value is not above the top breakpoint. |
| 603 |
if ('' === newValue && breakpointDefaultValue >= this.topBreakpoint) { |
| 604 |
isValid = false; |
| 605 |
} |
| 606 |
} |
| 607 |
return isValid; |
| 608 |
} |
| 609 |
}]); |
| 610 |
}(NumberValidator); |
| 611 |
|
| 612 |
/***/ }), |
| 613 |
|
| 614 |
/***/ "../assets/dev/js/editor/components/validator/number.js": |
| 615 |
/*!**************************************************************!*\ |
| 616 |
!*** ../assets/dev/js/editor/components/validator/number.js ***! |
| 617 |
\**************************************************************/ |
| 618 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 619 |
|
| 620 |
"use strict"; |
| 621 |
|
| 622 |
|
| 623 |
var Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js"); |
| 624 |
module.exports = Validator.extend({ |
| 625 |
validationMethod: function validationMethod(newValue) { |
| 626 |
var validationTerms = this.getSettings('validationTerms'), |
| 627 |
errors = []; |
| 628 |
if (_.isFinite(newValue)) { |
| 629 |
if (undefined !== validationTerms.min && newValue < validationTerms.min) { |
| 630 |
errors.push('Value is less than minimum'); |
| 631 |
} |
| 632 |
if (undefined !== validationTerms.max && newValue > validationTerms.max) { |
| 633 |
errors.push('Value is greater than maximum'); |
| 634 |
} |
| 635 |
} |
| 636 |
return errors; |
| 637 |
} |
| 638 |
}); |
| 639 |
|
| 640 |
/***/ }), |
| 641 |
|
| 642 |
/***/ "../assets/dev/js/editor/controls/base-data.js": |
| 643 |
/*!*****************************************************!*\ |
| 644 |
!*** ../assets/dev/js/editor/controls/base-data.js ***! |
| 645 |
\*****************************************************/ |
| 646 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 647 |
|
| 648 |
"use strict"; |
| 649 |
|
| 650 |
|
| 651 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 652 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 653 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 654 |
var _breakpoint = _interopRequireDefault(__webpack_require__(/*! elementor-validator/breakpoint */ "../assets/dev/js/editor/components/validator/breakpoint.js")); |
| 655 |
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } |
| 656 |
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } |
| 657 |
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } |
| 658 |
var ControlBaseView = __webpack_require__(/*! elementor-controls/base */ "../assets/dev/js/editor/controls/base.js"), |
| 659 |
TagsBehavior = __webpack_require__(/*! elementor-dynamic-tags/control-behavior */ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js"), |
| 660 |
Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js"), |
| 661 |
NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js"), |
| 662 |
ControlBaseDataView; |
| 663 |
ControlBaseDataView = ControlBaseView.extend({ |
| 664 |
validatorTypes: { |
| 665 |
Base: Validator, |
| 666 |
Number: NumberValidator, |
| 667 |
Breakpoint: _breakpoint.default |
| 668 |
}, |
| 669 |
ui: function ui() { |
| 670 |
var ui = ControlBaseView.prototype.ui.apply(this, arguments); |
| 671 |
_.extend(ui, { |
| 672 |
input: 'input[data-setting][type!="checkbox"][type!="radio"]', |
| 673 |
checkbox: 'input[data-setting][type="checkbox"]', |
| 674 |
radio: 'input[data-setting][type="radio"]', |
| 675 |
select: 'select[data-setting]', |
| 676 |
textarea: 'textarea[data-setting]', |
| 677 |
responsiveSwitchersSibling: "".concat(ui.controlTitle, "[data-e-responsive-switcher-sibling!=\"false\"]"), |
| 678 |
responsiveSwitchers: '.elementor-responsive-switcher', |
| 679 |
contentEditable: '[contenteditable="true"]' |
| 680 |
}); |
| 681 |
return ui; |
| 682 |
}, |
| 683 |
templateHelpers: function templateHelpers() { |
| 684 |
var controlData = ControlBaseView.prototype.templateHelpers.apply(this, arguments); |
| 685 |
controlData.data.controlValue = this.getControlValue(); |
| 686 |
return controlData; |
| 687 |
}, |
| 688 |
events: function events() { |
| 689 |
return { |
| 690 |
'input @ui.input': 'onBaseInputTextChange', |
| 691 |
'change @ui.checkbox': 'onBaseInputChange', |
| 692 |
'change @ui.radio': 'onBaseInputChange', |
| 693 |
'input @ui.textarea': 'onBaseInputTextChange', |
| 694 |
'change @ui.select': 'onBaseInputChange', |
| 695 |
'input @ui.contentEditable': 'onBaseInputTextChange', |
| 696 |
'click @ui.responsiveSwitchers': 'onResponsiveSwitchersClick' |
| 697 |
}; |
| 698 |
}, |
| 699 |
behaviors: function behaviors() { |
| 700 |
var behaviors = ControlBaseView.prototype.behaviors.apply(this, arguments), |
| 701 |
dynamicSettings = this.options.model.get('dynamic'); |
| 702 |
if (dynamicSettings && dynamicSettings.active) { |
| 703 |
var tags = _.filter(elementor.dynamicTags.getConfig('tags'), function (tag) { |
| 704 |
return tag.editable && _.intersection(tag.categories, dynamicSettings.categories).length; |
| 705 |
}); |
| 706 |
if (tags.length || elementor.config.user.is_administrator) { |
| 707 |
behaviors.tags = { |
| 708 |
behaviorClass: TagsBehavior, |
| 709 |
tags: tags, |
| 710 |
dynamicSettings: dynamicSettings |
| 711 |
}; |
| 712 |
} |
| 713 |
} |
| 714 |
return behaviors; |
| 715 |
}, |
| 716 |
initialize: function initialize() { |
| 717 |
ControlBaseView.prototype.initialize.apply(this, arguments); |
| 718 |
this.registerValidators(); |
| 719 |
if (this.model.get('responsive')) { |
| 720 |
this.setPlaceholderFromParent(); |
| 721 |
} |
| 722 |
if (undefined === this.model.get('inherit_placeholders')) { |
| 723 |
this.model.set('inherit_placeholders', true); |
| 724 |
} |
| 725 |
|
| 726 |
// TODO: this.elementSettingsModel is deprecated since 2.8.0. |
| 727 |
var settings = this.container ? this.container.settings : this.elementSettingsModel; |
| 728 |
this.listenTo(settings, 'change:external:' + this.model.get('name'), this.onAfterExternalChange); |
| 729 |
}, |
| 730 |
getControlValue: function getControlValue() { |
| 731 |
return this.container.settings.get(this.model.get('name')); |
| 732 |
}, |
| 733 |
getGlobalKey: function getGlobalKey() { |
| 734 |
return this.container.globals.get(this.model.get('name')); |
| 735 |
}, |
| 736 |
getGlobalValue: function getGlobalValue() { |
| 737 |
return this.globalValue; |
| 738 |
}, |
| 739 |
getGlobalDefault: function getGlobalDefault() { |
| 740 |
var controlGlobalArgs = this.model.get('global'); |
| 741 |
if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) { |
| 742 |
// If the control is a color/typography control and default colors/typography are disabled, don't return the global value. |
| 743 |
if (!elementor.config.globals.defaults_enabled[this.getGlobalMeta().controlType]) { |
| 744 |
return ''; |
| 745 |
} |
| 746 |
var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default), |
| 747 |
command = _$e$data$commandExtra.command, |
| 748 |
args = _$e$data$commandExtra.args, |
| 749 |
result = $e.data.getCache($e.components.get('globals'), command, args.query); |
| 750 |
return result === null || result === void 0 ? void 0 : result.value; |
| 751 |
} |
| 752 |
|
| 753 |
// No global default. |
| 754 |
return ''; |
| 755 |
}, |
| 756 |
getCurrentValue: function getCurrentValue() { |
| 757 |
if (this.getGlobalKey() && !this.globalValue) { |
| 758 |
return ''; |
| 759 |
} |
| 760 |
if (this.globalValue) { |
| 761 |
return this.globalValue; |
| 762 |
} |
| 763 |
var controlValue = this.getControlValue(); |
| 764 |
if (controlValue) { |
| 765 |
return controlValue; |
| 766 |
} |
| 767 |
return this.getGlobalDefault(); |
| 768 |
}, |
| 769 |
isGlobalActive: function isGlobalActive() { |
| 770 |
var _this$options$model$g; |
| 771 |
return (_this$options$model$g = this.options.model.get('global')) === null || _this$options$model$g === void 0 ? void 0 : _this$options$model$g.active; |
| 772 |
}, |
| 773 |
setValue: function setValue(value) { |
| 774 |
this.setSettingsModel(value); |
| 775 |
}, |
| 776 |
setSettingsModel: function setSettingsModel(value) { |
| 777 |
var key = this.model.get('name'); |
| 778 |
$e.run('document/elements/settings', { |
| 779 |
container: this.options.container, |
| 780 |
settings: (0, _defineProperty2.default)({}, key, value) |
| 781 |
}); |
| 782 |
this.triggerMethod('settings:change'); |
| 783 |
}, |
| 784 |
applySavedValue: function applySavedValue() { |
| 785 |
this.setInputValue('[data-setting="' + this.model.get('name') + '"]', this.getControlValue()); |
| 786 |
}, |
| 787 |
getEditSettings: function getEditSettings(setting) { |
| 788 |
var settings = this.getOption('elementEditSettings').toJSON(); |
| 789 |
if (setting) { |
| 790 |
return settings[setting]; |
| 791 |
} |
| 792 |
return settings; |
| 793 |
}, |
| 794 |
setEditSetting: function setEditSetting(settingKey, settingValue) { |
| 795 |
var settings = this.getOption('elementEditSettings') || this.getOption('container').settings; |
| 796 |
settings.set(settingKey, settingValue); |
| 797 |
}, |
| 798 |
/** |
| 799 |
* Get the placeholder for the current control. |
| 800 |
* |
| 801 |
* @return {*} placeholder |
| 802 |
*/ |
| 803 |
getControlPlaceholder: function getControlPlaceholder() { |
| 804 |
var placeholder = this.model.get('placeholder'); |
| 805 |
if (this.model.get('responsive') && this.model.get('inherit_placeholders')) { |
| 806 |
placeholder = placeholder || this.container.placeholders[this.model.get('name')]; |
| 807 |
} |
| 808 |
return placeholder; |
| 809 |
}, |
| 810 |
/** |
| 811 |
* Get the responsive parent view if exists. |
| 812 |
* |
| 813 |
* @return {ControlBaseDataView|undefined} responsive parent view if exists |
| 814 |
*/ |
| 815 |
getResponsiveParentView: function getResponsiveParentView() { |
| 816 |
var parent = this.model.get('parent'); |
| 817 |
try { |
| 818 |
return parent && this.container.panel.getControlView(parent); |
| 819 |
// eslint-disable-next-line no-empty |
| 820 |
} catch (e) {} |
| 821 |
}, |
| 822 |
/** |
| 823 |
* Get the responsive children views if exists. |
| 824 |
* |
| 825 |
* @return {ControlBaseDataView|null} responsive children views if exists |
| 826 |
*/ |
| 827 |
getResponsiveChildrenViews: function getResponsiveChildrenViews() { |
| 828 |
var children = this.model.get('inheritors'), |
| 829 |
views = []; |
| 830 |
try { |
| 831 |
var _iterator = _createForOfIteratorHelper(children), |
| 832 |
_step; |
| 833 |
try { |
| 834 |
for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 835 |
var child = _step.value; |
| 836 |
views.push(this.container.panel.getControlView(child)); |
| 837 |
} |
| 838 |
// eslint-disable-next-line no-empty |
| 839 |
} catch (err) { |
| 840 |
_iterator.e(err); |
| 841 |
} finally { |
| 842 |
_iterator.f(); |
| 843 |
} |
| 844 |
} catch (e) {} |
| 845 |
return views; |
| 846 |
}, |
| 847 |
/** |
| 848 |
* Get prepared placeholder from the responsive parent, and put it into current |
| 849 |
* control model as placeholder. |
| 850 |
*/ |
| 851 |
setPlaceholderFromParent: function setPlaceholderFromParent() { |
| 852 |
var parent = this.getResponsiveParentView(); |
| 853 |
if (parent) { |
| 854 |
this.container.placeholders[this.model.get('name')] = parent.preparePlaceholderForChildren(); |
| 855 |
} |
| 856 |
}, |
| 857 |
/** |
| 858 |
* Returns the value of the current control if exists, or the parent value if not, |
| 859 |
* so responsive children can set it as their placeholder. When there are multiple |
| 860 |
* inputs, the inputs which are empty on this control will inherit their values |
| 861 |
* from the responsive parent. |
| 862 |
* For example, if on desktop the padding of all edges is 10, and on tablet only |
| 863 |
* padding right and left is set to 15, the mobile control placeholder will |
| 864 |
* eventually be: { top: 10, right: 15, left: 15, bottom: 10 }, because of the |
| 865 |
* inheritance of multiple values. |
| 866 |
* |
| 867 |
* @return {*} value of the current control if exists, or the parent value if not |
| 868 |
*/ |
| 869 |
preparePlaceholderForChildren: function preparePlaceholderForChildren() { |
| 870 |
var _this$getResponsivePa; |
| 871 |
var cleanValue = this.getCleanControlValue(), |
| 872 |
parentValue = (_this$getResponsivePa = this.getResponsiveParentView()) === null || _this$getResponsivePa === void 0 ? void 0 : _this$getResponsivePa.preparePlaceholderForChildren(); |
| 873 |
if (cleanValue instanceof Object) { |
| 874 |
return Object.assign({}, parentValue, cleanValue); |
| 875 |
} |
| 876 |
return cleanValue || parentValue; |
| 877 |
}, |
| 878 |
/** |
| 879 |
* Start the re-rendering recursive chain from the responsive child of this |
| 880 |
* control. It's useful when the current control value is changed and we want |
| 881 |
* to update all responsive children. In this case, the re-rendering is supposed |
| 882 |
* to be applied only from the responsive child of this control and on. |
| 883 |
*/ |
| 884 |
propagatePlaceholder: function propagatePlaceholder() { |
| 885 |
var children = this.getResponsiveChildrenViews(); |
| 886 |
var _iterator2 = _createForOfIteratorHelper(children), |
| 887 |
_step2; |
| 888 |
try { |
| 889 |
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { |
| 890 |
var child = _step2.value; |
| 891 |
child.renderWithChildren(); |
| 892 |
} |
| 893 |
} catch (err) { |
| 894 |
_iterator2.e(err); |
| 895 |
} finally { |
| 896 |
_iterator2.f(); |
| 897 |
} |
| 898 |
}, |
| 899 |
/** |
| 900 |
* Re-render current control and trigger this method on the responsive child. |
| 901 |
* The purpose of those actions is to recursively re-render all responsive |
| 902 |
* children. |
| 903 |
*/ |
| 904 |
renderWithChildren: function renderWithChildren() { |
| 905 |
this.render(); |
| 906 |
this.propagatePlaceholder(); |
| 907 |
}, |
| 908 |
/** |
| 909 |
* Get control value without empty properties, and without default values. |
| 910 |
* |
| 911 |
* @return {{}} control value without empty properties, and without default values |
| 912 |
*/ |
| 913 |
getCleanControlValue: function getCleanControlValue() { |
| 914 |
var value = this.getControlValue(); |
| 915 |
return value && value !== this.model.get('default') ? value : undefined; |
| 916 |
}, |
| 917 |
onAfterChange: function onAfterChange(control) { |
| 918 |
if (Object.keys(control.changed).includes(this.model.get('name'))) { |
| 919 |
this.propagatePlaceholder(); |
| 920 |
} |
| 921 |
ControlBaseView.prototype.onAfterChange.apply(this, arguments); |
| 922 |
}, |
| 923 |
getInputValue: function getInputValue(input) { |
| 924 |
var $input = this.$(input); |
| 925 |
if ($input.is('[contenteditable="true"]')) { |
| 926 |
return $input.html(); |
| 927 |
} |
| 928 |
var inputValue = $input.val(), |
| 929 |
inputType = $input.attr('type'); |
| 930 |
if (-1 !== ['radio', 'checkbox'].indexOf(inputType)) { |
| 931 |
return $input.prop('checked') ? inputValue : ''; |
| 932 |
} |
| 933 |
if ('number' === inputType && _.isFinite(inputValue)) { |
| 934 |
return +inputValue; |
| 935 |
} |
| 936 |
|
| 937 |
// Temp fix for jQuery (< 3.0) that return null instead of empty array |
| 938 |
if ('SELECT' === input.tagName && $input.prop('multiple') && null === inputValue) { |
| 939 |
inputValue = []; |
| 940 |
} |
| 941 |
return inputValue; |
| 942 |
}, |
| 943 |
setInputValue: function setInputValue(input, value) { |
| 944 |
var $input = this.$(input), |
| 945 |
inputType = $input.attr('type'); |
| 946 |
if ('checkbox' === inputType) { |
| 947 |
$input.prop('checked', !!value); |
| 948 |
} else if ('radio' === inputType) { |
| 949 |
$input.filter('[value="' + value + '"]').prop('checked', true); |
| 950 |
} else { |
| 951 |
$input.val(value); |
| 952 |
} |
| 953 |
}, |
| 954 |
addValidator: function addValidator(validator) { |
| 955 |
this.validators.push(validator); |
| 956 |
}, |
| 957 |
registerValidators: function registerValidators() { |
| 958 |
var _this = this; |
| 959 |
this.validators = []; |
| 960 |
var validationTerms = {}; |
| 961 |
if (this.model.get('required')) { |
| 962 |
validationTerms.required = true; |
| 963 |
} |
| 964 |
if (!jQuery.isEmptyObject(validationTerms)) { |
| 965 |
this.addValidator(new this.validatorTypes.Base({ |
| 966 |
validationTerms: validationTerms |
| 967 |
})); |
| 968 |
} |
| 969 |
var validators = this.model.get('validators'); |
| 970 |
if (validators) { |
| 971 |
Object.entries(validators).forEach(function (_ref) { |
| 972 |
var _ref2 = (0, _slicedToArray2.default)(_ref, 2), |
| 973 |
key = _ref2[0], |
| 974 |
args = _ref2[1]; |
| 975 |
_this.addValidator(new _this.validatorTypes[key]({ |
| 976 |
validationTerms: args |
| 977 |
})); |
| 978 |
}); |
| 979 |
} |
| 980 |
}, |
| 981 |
onBeforeRender: function onBeforeRender() { |
| 982 |
this.setPlaceholderFromParent(); |
| 983 |
}, |
| 984 |
onRender: function onRender() { |
| 985 |
ControlBaseView.prototype.onRender.apply(this, arguments); |
| 986 |
if (this.model.get('responsive')) { |
| 987 |
this.renderResponsiveSwitchers(); |
| 988 |
} |
| 989 |
this.applySavedValue(); |
| 990 |
this.triggerMethod('ready'); |
| 991 |
this.toggleControlVisibility(); |
| 992 |
this.addTooltip(); |
| 993 |
}, |
| 994 |
onBaseInputTextChange: function onBaseInputTextChange(event) { |
| 995 |
this.onBaseInputChange(event); |
| 996 |
}, |
| 997 |
onBaseInputChange: function onBaseInputChange(event) { |
| 998 |
clearTimeout(this.correctionTimeout); |
| 999 |
var input = event.currentTarget, |
| 1000 |
value = this.getInputValue(input), |
| 1001 |
validators = this.validators.slice(0), |
| 1002 |
settingsValidators = this.container.settings.validators[this.model.get('name')]; |
| 1003 |
if (settingsValidators) { |
| 1004 |
validators = validators.concat(settingsValidators); |
| 1005 |
} |
| 1006 |
if (validators) { |
| 1007 |
var oldValue = this.getControlValue(input.dataset.setting); |
| 1008 |
var isValidValue = validators.every(function (validator) { |
| 1009 |
return validator.isValid(value, oldValue); |
| 1010 |
}); |
| 1011 |
if (!isValidValue) { |
| 1012 |
this.correctionTimeout = setTimeout(this.setInputValue.bind(this, input, oldValue), 1200); |
| 1013 |
return; |
| 1014 |
} |
| 1015 |
} |
| 1016 |
this.updateElementModel(value, input); |
| 1017 |
this.triggerMethod('input:change', event); |
| 1018 |
}, |
| 1019 |
onResponsiveSwitchersClick: function onResponsiveSwitchersClick(event) { |
| 1020 |
var $switcher = jQuery(event.currentTarget), |
| 1021 |
device = $switcher.data('device'), |
| 1022 |
$switchersWrapper = this.ui.responsiveSwitchersWrapper, |
| 1023 |
selectedOption = $switcher.index(); |
| 1024 |
$switchersWrapper.toggleClass('elementor-responsive-switchers-open'); |
| 1025 |
$switchersWrapper[0].style.setProperty('--selected-option', selectedOption); |
| 1026 |
this.triggerMethod('responsive:switcher:click', device); |
| 1027 |
elementor.changeDeviceMode(device); |
| 1028 |
}, |
| 1029 |
renderResponsiveSwitchers: function renderResponsiveSwitchers() { |
| 1030 |
var templateHtml = Marionette.Renderer.render('#tmpl-elementor-control-responsive-switchers', this.model.attributes); |
| 1031 |
this.ui.responsiveSwitchersSibling.after(templateHtml); |
| 1032 |
this.ui.responsiveSwitchersWrapper = this.$el.find('.elementor-control-responsive-switchers'); |
| 1033 |
}, |
| 1034 |
onAfterExternalChange: function onAfterExternalChange() { |
| 1035 |
this.hideTooltip(); |
| 1036 |
this.applySavedValue(); |
| 1037 |
}, |
| 1038 |
addTooltip: function addTooltip() { |
| 1039 |
this.ui.tooltipTargets = this.$el.find('.tooltip-target'); |
| 1040 |
if (!this.ui.tooltipTargets.length) { |
| 1041 |
return; |
| 1042 |
} |
| 1043 |
|
| 1044 |
// Create tooltip on controls |
| 1045 |
this.ui.tooltipTargets.tipsy({ |
| 1046 |
gravity: function gravity() { |
| 1047 |
// `n` for down, `s` for up |
| 1048 |
var gravity = jQuery(this).data('tooltip-pos'); |
| 1049 |
if (undefined !== gravity) { |
| 1050 |
return gravity; |
| 1051 |
} |
| 1052 |
return 's'; |
| 1053 |
}, |
| 1054 |
title: function title() { |
| 1055 |
return this.getAttribute('data-tooltip'); |
| 1056 |
} |
| 1057 |
}); |
| 1058 |
}, |
| 1059 |
hideTooltip: function hideTooltip() { |
| 1060 |
if (this.ui.tooltipTargets.length) { |
| 1061 |
this.ui.tooltipTargets.tipsy('hide'); |
| 1062 |
} |
| 1063 |
}, |
| 1064 |
updateElementModel: function updateElementModel(value) { |
| 1065 |
this.setValue(value); |
| 1066 |
} |
| 1067 |
}, { |
| 1068 |
// Static methods |
| 1069 |
getStyleValue: function getStyleValue(placeholder, controlValue, controlData) { |
| 1070 |
if ('DEFAULT' === placeholder) { |
| 1071 |
return controlData.default; |
| 1072 |
} |
| 1073 |
return controlValue; |
| 1074 |
}, |
| 1075 |
onPasteStyle: function onPasteStyle() { |
| 1076 |
return true; |
| 1077 |
} |
| 1078 |
}); |
| 1079 |
module.exports = ControlBaseDataView; |
| 1080 |
|
| 1081 |
/***/ }), |
| 1082 |
|
| 1083 |
/***/ "../assets/dev/js/editor/controls/base.js": |
| 1084 |
/*!************************************************!*\ |
| 1085 |
!*** ../assets/dev/js/editor/controls/base.js ***! |
| 1086 |
\************************************************/ |
| 1087 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1088 |
|
| 1089 |
"use strict"; |
| 1090 |
|
| 1091 |
|
| 1092 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1093 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1094 |
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } |
| 1095 |
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } |
| 1096 |
var ControlBaseView; |
| 1097 |
ControlBaseView = Marionette.CompositeView.extend({ |
| 1098 |
ui: function ui() { |
| 1099 |
return { |
| 1100 |
controlTitle: '.elementor-control-title' |
| 1101 |
}; |
| 1102 |
}, |
| 1103 |
behaviors: function behaviors() { |
| 1104 |
var behaviors = {}; |
| 1105 |
return elementor.hooks.applyFilters('controls/base/behaviors', behaviors, this); |
| 1106 |
}, |
| 1107 |
getBehavior: function getBehavior(name) { |
| 1108 |
return this._behaviors[Object.keys(this.behaviors()).indexOf(name)]; |
| 1109 |
}, |
| 1110 |
className: function className() { |
| 1111 |
// TODO: Any better classes for that? |
| 1112 |
var classes = 'elementor-control elementor-control-' + this.model.get('name') + ' elementor-control-type-' + this.model.get('type'), |
| 1113 |
modelClasses = this.model.get('classes'), |
| 1114 |
responsive = this.model.get('responsive'); |
| 1115 |
if (!_.isEmpty(modelClasses)) { |
| 1116 |
classes += ' ' + modelClasses; |
| 1117 |
} |
| 1118 |
if (!_.isEmpty(responsive)) { |
| 1119 |
var responsiveControlName = responsive.max || responsive.min; |
| 1120 |
classes += ' elementor-control-responsive-' + responsiveControlName; |
| 1121 |
} |
| 1122 |
return classes; |
| 1123 |
}, |
| 1124 |
templateHelpers: function templateHelpers() { |
| 1125 |
var controlData = { |
| 1126 |
_cid: this.model.cid |
| 1127 |
}; |
| 1128 |
return { |
| 1129 |
view: this, |
| 1130 |
data: _.extend({}, this.model.toJSON(), controlData) |
| 1131 |
}; |
| 1132 |
}, |
| 1133 |
getTemplate: function getTemplate() { |
| 1134 |
return Marionette.TemplateCache.get('#tmpl-elementor-control-' + this.model.get('type') + '-content'); |
| 1135 |
}, |
| 1136 |
initialize: function initialize(options) { |
| 1137 |
var label = this.model.get('label'); |
| 1138 |
|
| 1139 |
// TODO: Temp backwards compatibility. since 2.8.0. |
| 1140 |
Object.defineProperty(this, 'container', { |
| 1141 |
get: function get() { |
| 1142 |
if (!options.container) { |
| 1143 |
var settingsModel = options.elementSettingsModel, |
| 1144 |
view = $e.components.get('document').utils.findViewById(settingsModel.id); |
| 1145 |
|
| 1146 |
// Element control. |
| 1147 |
if (view && view.getContainer) { |
| 1148 |
options.container = view.getContainer(); |
| 1149 |
} else { |
| 1150 |
if (!settingsModel.id) { |
| 1151 |
settingsModel.id = 'bc-' + elementorCommon.helpers.getUniqueId(); |
| 1152 |
} |
| 1153 |
|
| 1154 |
// Document/General/Other control. |
| 1155 |
options.container = new elementorModules.editor.Container({ |
| 1156 |
type: 'bc-container', |
| 1157 |
id: settingsModel.id, |
| 1158 |
model: settingsModel, |
| 1159 |
settings: settingsModel, |
| 1160 |
label: label, |
| 1161 |
view: false, |
| 1162 |
parent: false, |
| 1163 |
renderer: false, |
| 1164 |
controls: settingsModel.options.controls |
| 1165 |
}); |
| 1166 |
} |
| 1167 |
} |
| 1168 |
return options.container; |
| 1169 |
} |
| 1170 |
}); |
| 1171 |
|
| 1172 |
// Use `defineProperty` because `get elementSettingsModel()` fails during the `Marionette.CompositeView.extend`. |
| 1173 |
Object.defineProperty(this, 'elementSettingsModel', { |
| 1174 |
get: function get() { |
| 1175 |
elementorDevTools.deprecation.deprecated('elementSettingsModel', '2.8.0', 'container.settings'); |
| 1176 |
return options.container ? options.container.settings : options.elementSettingsModel; |
| 1177 |
} |
| 1178 |
}); |
| 1179 |
var controlType = this.model.get('type'), |
| 1180 |
controlSettings = jQuery.extend(true, {}, elementor.config.controls[controlType], this.model.attributes); |
| 1181 |
this.model.set(controlSettings); |
| 1182 |
|
| 1183 |
// TODO: this.elementSettingsModel is deprecated since 2.8.0. |
| 1184 |
var settings = this.container ? this.container.settings : this.elementSettingsModel; |
| 1185 |
this.listenTo(settings, 'change', this.onAfterChange); |
| 1186 |
if (this.model.attributes.responsive) { |
| 1187 |
this.onDeviceModeChange = this.onDeviceModeChange.bind(this); |
| 1188 |
elementor.listenTo(elementor.channels.deviceMode, 'change', this.onDeviceModeChange); |
| 1189 |
} |
| 1190 |
}, |
| 1191 |
onDestroy: function onDestroy() { |
| 1192 |
elementor.stopListening(elementor.channels.deviceMode, 'change', this.onDeviceModeChange); |
| 1193 |
}, |
| 1194 |
onDeviceModeChange: function onDeviceModeChange() { |
| 1195 |
this.toggleControlVisibility(); |
| 1196 |
}, |
| 1197 |
onAfterChange: function onAfterChange() { |
| 1198 |
this.toggleControlVisibility(); |
| 1199 |
}, |
| 1200 |
toggleControlVisibility: function toggleControlVisibility() { |
| 1201 |
// TODO: this.elementSettingsModel is deprecated since 2.8.0. |
| 1202 |
var settings = this.container ? this.container.settings : this.elementSettingsModel; |
| 1203 |
var isVisible = elementor.helpers.isActiveControl(this.model, settings.attributes, settings.controls); |
| 1204 |
this.$el.toggleClass('elementor-hidden-control', !isVisible); |
| 1205 |
elementor.getPanelView().updateScrollbar(); |
| 1206 |
}, |
| 1207 |
onRender: function onRender() { |
| 1208 |
var layoutType = this.model.get('label_block') ? 'block' : 'inline', |
| 1209 |
showLabel = this.model.get('show_label'), |
| 1210 |
elClasses = 'elementor-label-' + layoutType; |
| 1211 |
elClasses += ' elementor-control-separator-' + this.model.get('separator'); |
| 1212 |
if (!showLabel) { |
| 1213 |
elClasses += ' elementor-control-hidden-label'; |
| 1214 |
} |
| 1215 |
this.$el.addClass(elClasses); |
| 1216 |
this.toggleControlVisibility(); |
| 1217 |
}, |
| 1218 |
reRoute: function reRoute(controlActive) { |
| 1219 |
$e.route($e.routes.getCurrent('panel'), this.getControlInRouteArgs(controlActive ? this.getControlPath() : ''), { |
| 1220 |
history: false |
| 1221 |
}); |
| 1222 |
}, |
| 1223 |
getControlInRouteArgs: function getControlInRouteArgs(path) { |
| 1224 |
return _objectSpread(_objectSpread({}, $e.routes.getCurrentArgs('panel')), {}, { |
| 1225 |
activeControl: path |
| 1226 |
}); |
| 1227 |
}, |
| 1228 |
getControlPath: function getControlPath() { |
| 1229 |
var controlPath = this.model.get('name'), |
| 1230 |
parent = this._parent; |
| 1231 |
while (!parent.$el.hasClass('elementor-controls-stack')) { |
| 1232 |
var parentName = parent.model.get('name') || parent.model.get('_id'); |
| 1233 |
controlPath = parentName + '/' + controlPath; |
| 1234 |
parent = parent._parent; |
| 1235 |
} |
| 1236 |
return controlPath; |
| 1237 |
} |
| 1238 |
}); |
| 1239 |
module.exports = ControlBaseView; |
| 1240 |
|
| 1241 |
/***/ }), |
| 1242 |
|
| 1243 |
/***/ "../modules/promotions/assets/js/react/app-manager.js": |
| 1244 |
/*!************************************************************!*\ |
| 1245 |
!*** ../modules/promotions/assets/js/react/app-manager.js ***! |
| 1246 |
\************************************************************/ |
| 1247 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1248 |
|
| 1249 |
"use strict"; |
| 1250 |
|
| 1251 |
|
| 1252 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1253 |
Object.defineProperty(exports, "__esModule", ({ |
| 1254 |
value: true |
| 1255 |
})); |
| 1256 |
exports.AppManager = void 0; |
| 1257 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1258 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1259 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1260 |
var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/promotions/assets/js/react/app.js")); |
| 1261 |
var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); |
| 1262 |
var AppManager = exports.AppManager = /*#__PURE__*/function () { |
| 1263 |
function AppManager() { |
| 1264 |
(0, _classCallCheck2.default)(this, AppManager); |
| 1265 |
this.promotionInfoTip = null; |
| 1266 |
this.onRoute = function () {}; |
| 1267 |
} |
| 1268 |
return (0, _createClass2.default)(AppManager, [{ |
| 1269 |
key: "getPromotionData", |
| 1270 |
value: function getPromotionData(promotionType) { |
| 1271 |
return elementorPromotionsData[promotionType] || {}; |
| 1272 |
} |
| 1273 |
}, { |
| 1274 |
key: "mount", |
| 1275 |
value: function mount(targetNode, selectors) { |
| 1276 |
var _elementor, |
| 1277 |
_elementor$getPrefere, |
| 1278 |
_rootElement$getAttri, |
| 1279 |
_this = this; |
| 1280 |
if (this.promotionInfoTip) { |
| 1281 |
return; |
| 1282 |
} |
| 1283 |
var wrapperElement = targetNode === null || targetNode === void 0 ? void 0 : targetNode.closest(selectors.wrapperElement); |
| 1284 |
var rootElement = wrapperElement === null || wrapperElement === void 0 ? void 0 : wrapperElement.querySelector(selectors.reactAnchor); |
| 1285 |
if (!rootElement) { |
| 1286 |
return; |
| 1287 |
} |
| 1288 |
this.attachEditorEventListeners(); |
| 1289 |
this.promotionInfoTip = (0, _client.createRoot)(rootElement); |
| 1290 |
var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 || (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto'; |
| 1291 |
var isRTL = elementorCommon.config.isRTL; |
| 1292 |
var promotionType = (_rootElement$getAttri = rootElement.getAttribute('data-promotion')) === null || _rootElement$getAttri === void 0 ? void 0 : _rootElement$getAttri.replace('_promotion', ''); |
| 1293 |
this.promotionInfoTip.render(/*#__PURE__*/_react.default.createElement(_app.default, { |
| 1294 |
colorScheme: colorScheme, |
| 1295 |
isRTL: isRTL, |
| 1296 |
promotionsData: this.getPromotionData(promotionType), |
| 1297 |
onClose: function onClose() { |
| 1298 |
return _this.unmount(); |
| 1299 |
} |
| 1300 |
})); |
| 1301 |
} |
| 1302 |
}, { |
| 1303 |
key: "unmount", |
| 1304 |
value: function unmount() { |
| 1305 |
if (this.promotionInfoTip) { |
| 1306 |
this.detachEditorEventListeners(); |
| 1307 |
this.promotionInfoTip.unmount(); |
| 1308 |
} |
| 1309 |
this.promotionInfoTip = null; |
| 1310 |
} |
| 1311 |
}, { |
| 1312 |
key: "attachEditorEventListeners", |
| 1313 |
value: function attachEditorEventListeners() { |
| 1314 |
var _this2 = this; |
| 1315 |
this.onRoute = function (component, route) { |
| 1316 |
if (route !== 'panel/elements/categories' && route !== 'panel/editor/content') { |
| 1317 |
return; |
| 1318 |
} |
| 1319 |
_this2.unmount(); |
| 1320 |
}; |
| 1321 |
$e.routes.on('run:after', this.onRoute); |
| 1322 |
} |
| 1323 |
}, { |
| 1324 |
key: "detachEditorEventListeners", |
| 1325 |
value: function detachEditorEventListeners() { |
| 1326 |
$e.routes.off('run:after', this.onRoute); |
| 1327 |
} |
| 1328 |
}]); |
| 1329 |
}(); |
| 1330 |
|
| 1331 |
/***/ }), |
| 1332 |
|
| 1333 |
/***/ "../modules/promotions/assets/js/react/app.js": |
| 1334 |
/*!****************************************************!*\ |
| 1335 |
!*** ../modules/promotions/assets/js/react/app.js ***! |
| 1336 |
\****************************************************/ |
| 1337 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1338 |
|
| 1339 |
"use strict"; |
| 1340 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 1341 |
|
| 1342 |
|
| 1343 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1344 |
Object.defineProperty(exports, "__esModule", ({ |
| 1345 |
value: true |
| 1346 |
})); |
| 1347 |
exports["default"] = void 0; |
| 1348 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1349 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1350 |
var _promotionCard = _interopRequireDefault(__webpack_require__(/*! ./components/promotion-card */ "../modules/promotions/assets/js/react/components/promotion-card.js")); |
| 1351 |
var App = function App(props) { |
| 1352 |
return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { |
| 1353 |
rtl: props.isRTL |
| 1354 |
}, /*#__PURE__*/_react.default.createElement(_ui.LocalizationProvider, null, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { |
| 1355 |
colorScheme: props.colorScheme |
| 1356 |
}, /*#__PURE__*/_react.default.createElement(_ui.Infotip, { |
| 1357 |
content: /*#__PURE__*/_react.default.createElement(_promotionCard.default, { |
| 1358 |
doClose: props.onClose, |
| 1359 |
promotionsData: props.promotionsData |
| 1360 |
}), |
| 1361 |
placement: "right", |
| 1362 |
arrow: true, |
| 1363 |
open: true, |
| 1364 |
disableHoverListener: true, |
| 1365 |
PopperProps: { |
| 1366 |
modifiers: [{ |
| 1367 |
name: 'offset', |
| 1368 |
options: { |
| 1369 |
offset: [-24, 8] |
| 1370 |
} |
| 1371 |
}] |
| 1372 |
} |
| 1373 |
}, /*#__PURE__*/_react.default.createElement("span", null))))); |
| 1374 |
}; |
| 1375 |
App.propTypes = { |
| 1376 |
colorScheme: PropTypes.oneOf(['auto', 'light', 'dark']), |
| 1377 |
isRTL: PropTypes.bool, |
| 1378 |
promotionsData: PropTypes.object, |
| 1379 |
onClose: PropTypes.func.isRequired |
| 1380 |
}; |
| 1381 |
var _default = exports["default"] = App; |
| 1382 |
|
| 1383 |
/***/ }), |
| 1384 |
|
| 1385 |
/***/ "../modules/promotions/assets/js/react/components/promotion-card.js": |
| 1386 |
/*!**************************************************************************!*\ |
| 1387 |
!*** ../modules/promotions/assets/js/react/components/promotion-card.js ***! |
| 1388 |
\**************************************************************************/ |
| 1389 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1390 |
|
| 1391 |
"use strict"; |
| 1392 |
/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); |
| 1393 |
|
| 1394 |
|
| 1395 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1396 |
Object.defineProperty(exports, "__esModule", ({ |
| 1397 |
value: true |
| 1398 |
})); |
| 1399 |
exports["default"] = void 0; |
| 1400 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1401 |
var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1402 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1403 |
var PromotionCard = function PromotionCard(_ref) { |
| 1404 |
var doClose = _ref.doClose, |
| 1405 |
promotionsData = _ref.promotionsData; |
| 1406 |
var title = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.title, |
| 1407 |
description = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.description, |
| 1408 |
imgSrc = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image, |
| 1409 |
imgAlt = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image_alt, |
| 1410 |
ctaText = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_text, |
| 1411 |
ctaUrl = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_url; |
| 1412 |
var redirectHandler = function redirectHandler() { |
| 1413 |
window.open(ctaUrl, '_blank'); |
| 1414 |
return doClose(); |
| 1415 |
}; |
| 1416 |
return /*#__PURE__*/_react.default.createElement(_ui.ClickAwayListener, { |
| 1417 |
disableReactTree: true, |
| 1418 |
mouseEvent: "onMouseDown", |
| 1419 |
touchEvent: "onTouchStart", |
| 1420 |
onClickAway: doClose |
| 1421 |
}, /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 1422 |
sx: { |
| 1423 |
width: 296 |
| 1424 |
}, |
| 1425 |
"data-testid": "e-promotion-card" |
| 1426 |
}, /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 1427 |
direction: "row", |
| 1428 |
alignItems: "center", |
| 1429 |
py: 1, |
| 1430 |
px: 2 |
| 1431 |
}, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 1432 |
variant: "subtitle2" |
| 1433 |
}, title), /*#__PURE__*/_react.default.createElement(_ui.Chip, { |
| 1434 |
label: (0, _i18n.__)('PRO', 'elementor'), |
| 1435 |
size: "small", |
| 1436 |
variant: "outlined", |
| 1437 |
color: "promotion", |
| 1438 |
sx: { |
| 1439 |
ml: 1 |
| 1440 |
} |
| 1441 |
}), /*#__PURE__*/_react.default.createElement(_ui.CloseButton, { |
| 1442 |
edge: "end", |
| 1443 |
sx: { |
| 1444 |
ml: 'auto' |
| 1445 |
}, |
| 1446 |
slotProps: { |
| 1447 |
icon: { |
| 1448 |
fontSize: 'small' |
| 1449 |
} |
| 1450 |
}, |
| 1451 |
onClick: doClose |
| 1452 |
})), /*#__PURE__*/_react.default.createElement(_ui.Image, { |
| 1453 |
src: imgSrc, |
| 1454 |
alt: imgAlt, |
| 1455 |
sx: { |
| 1456 |
height: 150, |
| 1457 |
width: '100%' |
| 1458 |
} |
| 1459 |
}), /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 1460 |
px: 2 |
| 1461 |
}, 1 === description.length ? /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 1462 |
variant: "body2", |
| 1463 |
color: "secondary", |
| 1464 |
sx: { |
| 1465 |
pt: 1.5, |
| 1466 |
pb: 1 |
| 1467 |
} |
| 1468 |
}, description[0]) : /*#__PURE__*/_react.default.createElement(_ui.List, { |
| 1469 |
sx: { |
| 1470 |
pl: 2 |
| 1471 |
} |
| 1472 |
}, description.map(function (text, index) { |
| 1473 |
return /*#__PURE__*/_react.default.createElement(_ui.ListItem, { |
| 1474 |
key: index, |
| 1475 |
sx: { |
| 1476 |
listStyle: 'disc', |
| 1477 |
display: 'list-item', |
| 1478 |
color: 'text.secondary', |
| 1479 |
p: 0 |
| 1480 |
} |
| 1481 |
}, /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 1482 |
variant: "body2", |
| 1483 |
color: "secondary" |
| 1484 |
}, text)); |
| 1485 |
}))), /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 1486 |
pt: 1, |
| 1487 |
pb: 1.5, |
| 1488 |
px: 2 |
| 1489 |
}, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 1490 |
variant: "contained", |
| 1491 |
size: "small", |
| 1492 |
color: "promotion", |
| 1493 |
onClick: redirectHandler, |
| 1494 |
sx: { |
| 1495 |
ml: 'auto' |
| 1496 |
} |
| 1497 |
}, ctaText)))); |
| 1498 |
}; |
| 1499 |
PromotionCard.propTypes = { |
| 1500 |
doClose: PropTypes.func, |
| 1501 |
promotionsData: PropTypes.object |
| 1502 |
}; |
| 1503 |
var _default = exports["default"] = PromotionCard; |
| 1504 |
|
| 1505 |
/***/ }), |
| 1506 |
|
| 1507 |
/***/ "../modules/promotions/assets/js/react/controls/promotion.js": |
| 1508 |
/*!*******************************************************************!*\ |
| 1509 |
!*** ../modules/promotions/assets/js/react/controls/promotion.js ***! |
| 1510 |
\*******************************************************************/ |
| 1511 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1512 |
|
| 1513 |
"use strict"; |
| 1514 |
|
| 1515 |
|
| 1516 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1517 |
Object.defineProperty(exports, "__esModule", ({ |
| 1518 |
value: true |
| 1519 |
})); |
| 1520 |
exports["default"] = void 0; |
| 1521 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1522 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1523 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1524 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1525 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1526 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1527 |
var _baseData = _interopRequireDefault(__webpack_require__(/*! elementor-controls/base-data */ "../assets/dev/js/editor/controls/base-data.js")); |
| 1528 |
var _appManager = __webpack_require__(/*! ../app-manager */ "../modules/promotions/assets/js/react/app-manager.js"); |
| 1529 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1530 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1531 |
var _default = exports["default"] = /*#__PURE__*/function (_ControlBaseDataView) { |
| 1532 |
function _default(options) { |
| 1533 |
var _this; |
| 1534 |
(0, _classCallCheck2.default)(this, _default); |
| 1535 |
_this = _callSuper(this, _default, [options]); |
| 1536 |
(0, _defineProperty2.default)(_this, "promotionInfoTip", null); |
| 1537 |
(0, _defineProperty2.default)(_this, "selectors", { |
| 1538 |
wrapperElement: '.elementor-control-type-switcher', |
| 1539 |
reactAnchor: '.e-promotion-react-wrapper' |
| 1540 |
}); |
| 1541 |
_this.AppManager = new _appManager.AppManager(); |
| 1542 |
return _this; |
| 1543 |
} |
| 1544 |
(0, _inherits2.default)(_default, _ControlBaseDataView); |
| 1545 |
return (0, _createClass2.default)(_default, [{ |
| 1546 |
key: "ui", |
| 1547 |
value: function ui() { |
| 1548 |
return { |
| 1549 |
switcher: '[data-promotion].elementor-control-type-switcher' |
| 1550 |
}; |
| 1551 |
} |
| 1552 |
}, { |
| 1553 |
key: "events", |
| 1554 |
value: function events() { |
| 1555 |
return { |
| 1556 |
'click @ui.switcher': 'onClickControlSwitcher' |
| 1557 |
}; |
| 1558 |
} |
| 1559 |
}, { |
| 1560 |
key: "promotionData", |
| 1561 |
value: function promotionData(promotionType) { |
| 1562 |
return elementorPromotionsData[promotionType] || {}; |
| 1563 |
} |
| 1564 |
}, { |
| 1565 |
key: "onClickControlSwitcher", |
| 1566 |
value: function onClickControlSwitcher(event) { |
| 1567 |
event.stopPropagation(); |
| 1568 |
this.AppManager.mount(event.target, this.selectors); |
| 1569 |
} |
| 1570 |
}]); |
| 1571 |
}(_baseData.default); |
| 1572 |
|
| 1573 |
/***/ }), |
| 1574 |
|
| 1575 |
/***/ "../modules/promotions/assets/js/react/module.js": |
| 1576 |
/*!*******************************************************!*\ |
| 1577 |
!*** ../modules/promotions/assets/js/react/module.js ***! |
| 1578 |
\*******************************************************/ |
| 1579 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1580 |
|
| 1581 |
"use strict"; |
| 1582 |
|
| 1583 |
|
| 1584 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1585 |
Object.defineProperty(exports, "__esModule", ({ |
| 1586 |
value: true |
| 1587 |
})); |
| 1588 |
exports["default"] = void 0; |
| 1589 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1590 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1591 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1592 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1593 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1594 |
var _promotion = _interopRequireDefault(__webpack_require__(/*! ./controls/promotion */ "../modules/promotions/assets/js/react/controls/promotion.js")); |
| 1595 |
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1596 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1597 |
var Module = exports["default"] = /*#__PURE__*/function (_elementorModules$edi) { |
| 1598 |
function Module() { |
| 1599 |
(0, _classCallCheck2.default)(this, Module); |
| 1600 |
return _callSuper(this, Module, arguments); |
| 1601 |
} |
| 1602 |
(0, _inherits2.default)(Module, _elementorModules$edi); |
| 1603 |
return (0, _createClass2.default)(Module, [{ |
| 1604 |
key: "onElementorInit", |
| 1605 |
value: function onElementorInit() { |
| 1606 |
elementor.addControlView('promotion_control', _promotion.default); |
| 1607 |
} |
| 1608 |
}]); |
| 1609 |
}(elementorModules.editor.utils.Module); |
| 1610 |
|
| 1611 |
/***/ }), |
| 1612 |
|
| 1613 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1614 |
/*!******************************************************************!*\ |
| 1615 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1616 |
\******************************************************************/ |
| 1617 |
/***/ ((module) => { |
| 1618 |
|
| 1619 |
function _arrayLikeToArray(r, a) { |
| 1620 |
(null == a || a > r.length) && (a = r.length); |
| 1621 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 1622 |
return n; |
| 1623 |
} |
| 1624 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1625 |
|
| 1626 |
/***/ }), |
| 1627 |
|
| 1628 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1629 |
/*!****************************************************************!*\ |
| 1630 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1631 |
\****************************************************************/ |
| 1632 |
/***/ ((module) => { |
| 1633 |
|
| 1634 |
function _arrayWithHoles(r) { |
| 1635 |
if (Array.isArray(r)) return r; |
| 1636 |
} |
| 1637 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1638 |
|
| 1639 |
/***/ }), |
| 1640 |
|
| 1641 |
/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 1642 |
/*!***********************************************************************!*\ |
| 1643 |
!*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 1644 |
\***********************************************************************/ |
| 1645 |
/***/ ((module) => { |
| 1646 |
|
| 1647 |
function _assertThisInitialized(e) { |
| 1648 |
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 1649 |
return e; |
| 1650 |
} |
| 1651 |
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1652 |
|
| 1653 |
/***/ }), |
| 1654 |
|
| 1655 |
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 1656 |
/*!****************************************************************!*\ |
| 1657 |
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 1658 |
\****************************************************************/ |
| 1659 |
/***/ ((module) => { |
| 1660 |
|
| 1661 |
function _classCallCheck(a, n) { |
| 1662 |
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 1663 |
} |
| 1664 |
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1665 |
|
| 1666 |
/***/ }), |
| 1667 |
|
| 1668 |
/***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 1669 |
/*!*************************************************************!*\ |
| 1670 |
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 1671 |
\*************************************************************/ |
| 1672 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1673 |
|
| 1674 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1675 |
function _defineProperties(e, r) { |
| 1676 |
for (var t = 0; t < r.length; t++) { |
| 1677 |
var o = r[t]; |
| 1678 |
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 1679 |
} |
| 1680 |
} |
| 1681 |
function _createClass(e, r, t) { |
| 1682 |
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 1683 |
writable: !1 |
| 1684 |
}), e; |
| 1685 |
} |
| 1686 |
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1687 |
|
| 1688 |
/***/ }), |
| 1689 |
|
| 1690 |
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 1691 |
/*!****************************************************************!*\ |
| 1692 |
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 1693 |
\****************************************************************/ |
| 1694 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1695 |
|
| 1696 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1697 |
function _defineProperty(e, r, t) { |
| 1698 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 1699 |
value: t, |
| 1700 |
enumerable: !0, |
| 1701 |
configurable: !0, |
| 1702 |
writable: !0 |
| 1703 |
}) : e[r] = t, e; |
| 1704 |
} |
| 1705 |
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1706 |
|
| 1707 |
/***/ }), |
| 1708 |
|
| 1709 |
/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": |
| 1710 |
/*!****************************************************************!*\ |
| 1711 |
!*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 1712 |
\****************************************************************/ |
| 1713 |
/***/ ((module) => { |
| 1714 |
|
| 1715 |
function _getPrototypeOf(t) { |
| 1716 |
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { |
| 1717 |
return t.__proto__ || Object.getPrototypeOf(t); |
| 1718 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); |
| 1719 |
} |
| 1720 |
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1721 |
|
| 1722 |
/***/ }), |
| 1723 |
|
| 1724 |
/***/ "../node_modules/@babel/runtime/helpers/inherits.js": |
| 1725 |
/*!**********************************************************!*\ |
| 1726 |
!*** ../node_modules/@babel/runtime/helpers/inherits.js ***! |
| 1727 |
\**********************************************************/ |
| 1728 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1729 |
|
| 1730 |
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 1731 |
function _inherits(t, e) { |
| 1732 |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 1733 |
t.prototype = Object.create(e && e.prototype, { |
| 1734 |
constructor: { |
| 1735 |
value: t, |
| 1736 |
writable: !0, |
| 1737 |
configurable: !0 |
| 1738 |
} |
| 1739 |
}), Object.defineProperty(t, "prototype", { |
| 1740 |
writable: !1 |
| 1741 |
}), e && setPrototypeOf(t, e); |
| 1742 |
} |
| 1743 |
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1744 |
|
| 1745 |
/***/ }), |
| 1746 |
|
| 1747 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 1748 |
/*!***********************************************************************!*\ |
| 1749 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1750 |
\***********************************************************************/ |
| 1751 |
/***/ ((module) => { |
| 1752 |
|
| 1753 |
function _interopRequireDefault(e) { |
| 1754 |
return e && e.__esModule ? e : { |
| 1755 |
"default": e |
| 1756 |
}; |
| 1757 |
} |
| 1758 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1759 |
|
| 1760 |
/***/ }), |
| 1761 |
|
| 1762 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 1763 |
/*!**********************************************************************!*\ |
| 1764 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1765 |
\**********************************************************************/ |
| 1766 |
/***/ ((module) => { |
| 1767 |
|
| 1768 |
function _iterableToArrayLimit(r, l) { |
| 1769 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 1770 |
if (null != t) { |
| 1771 |
var e, |
| 1772 |
n, |
| 1773 |
i, |
| 1774 |
u, |
| 1775 |
a = [], |
| 1776 |
f = !0, |
| 1777 |
o = !1; |
| 1778 |
try { |
| 1779 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 1780 |
if (Object(t) !== t) return; |
| 1781 |
f = !1; |
| 1782 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 1783 |
} catch (r) { |
| 1784 |
o = !0, n = r; |
| 1785 |
} finally { |
| 1786 |
try { |
| 1787 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 1788 |
} finally { |
| 1789 |
if (o) throw n; |
| 1790 |
} |
| 1791 |
} |
| 1792 |
return a; |
| 1793 |
} |
| 1794 |
} |
| 1795 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1796 |
|
| 1797 |
/***/ }), |
| 1798 |
|
| 1799 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 1800 |
/*!*****************************************************************!*\ |
| 1801 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 1802 |
\*****************************************************************/ |
| 1803 |
/***/ ((module) => { |
| 1804 |
|
| 1805 |
function _nonIterableRest() { |
| 1806 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1807 |
} |
| 1808 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1809 |
|
| 1810 |
/***/ }), |
| 1811 |
|
| 1812 |
/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 1813 |
/*!***************************************************************************!*\ |
| 1814 |
!*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 1815 |
\***************************************************************************/ |
| 1816 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1817 |
|
| 1818 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 1819 |
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 1820 |
function _possibleConstructorReturn(t, e) { |
| 1821 |
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 1822 |
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 1823 |
return assertThisInitialized(t); |
| 1824 |
} |
| 1825 |
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1826 |
|
| 1827 |
/***/ }), |
| 1828 |
|
| 1829 |
/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 1830 |
/*!****************************************************************!*\ |
| 1831 |
!*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 1832 |
\****************************************************************/ |
| 1833 |
/***/ ((module) => { |
| 1834 |
|
| 1835 |
function _setPrototypeOf(t, e) { |
| 1836 |
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { |
| 1837 |
return t.__proto__ = e, t; |
| 1838 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); |
| 1839 |
} |
| 1840 |
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1841 |
|
| 1842 |
/***/ }), |
| 1843 |
|
| 1844 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 1845 |
/*!***************************************************************!*\ |
| 1846 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 1847 |
\***************************************************************/ |
| 1848 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1849 |
|
| 1850 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 1851 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 1852 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 1853 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 1854 |
function _slicedToArray(r, e) { |
| 1855 |
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 1856 |
} |
| 1857 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1858 |
|
| 1859 |
/***/ }), |
| 1860 |
|
| 1861 |
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 1862 |
/*!*************************************************************!*\ |
| 1863 |
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 1864 |
\*************************************************************/ |
| 1865 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1866 |
|
| 1867 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 1868 |
function toPrimitive(t, r) { |
| 1869 |
if ("object" != _typeof(t) || !t) return t; |
| 1870 |
var e = t[Symbol.toPrimitive]; |
| 1871 |
if (void 0 !== e) { |
| 1872 |
var i = e.call(t, r || "default"); |
| 1873 |
if ("object" != _typeof(i)) return i; |
| 1874 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 1875 |
} |
| 1876 |
return ("string" === r ? String : Number)(t); |
| 1877 |
} |
| 1878 |
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1879 |
|
| 1880 |
/***/ }), |
| 1881 |
|
| 1882 |
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 1883 |
/*!***************************************************************!*\ |
| 1884 |
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 1885 |
\***************************************************************/ |
| 1886 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1887 |
|
| 1888 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 1889 |
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 1890 |
function toPropertyKey(t) { |
| 1891 |
var i = toPrimitive(t, "string"); |
| 1892 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 1893 |
} |
| 1894 |
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1895 |
|
| 1896 |
/***/ }), |
| 1897 |
|
| 1898 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 1899 |
/*!********************************************************!*\ |
| 1900 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 1901 |
\********************************************************/ |
| 1902 |
/***/ ((module) => { |
| 1903 |
|
| 1904 |
function _typeof(o) { |
| 1905 |
"@babel/helpers - typeof"; |
| 1906 |
|
| 1907 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 1908 |
return typeof o; |
| 1909 |
} : function (o) { |
| 1910 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 1911 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 1912 |
} |
| 1913 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1914 |
|
| 1915 |
/***/ }), |
| 1916 |
|
| 1917 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 1918 |
/*!****************************************************************************!*\ |
| 1919 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 1920 |
\****************************************************************************/ |
| 1921 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1922 |
|
| 1923 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1924 |
function _unsupportedIterableToArray(r, a) { |
| 1925 |
if (r) { |
| 1926 |
if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 1927 |
var t = {}.toString.call(r).slice(8, -1); |
| 1928 |
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; |
| 1929 |
} |
| 1930 |
} |
| 1931 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1932 |
|
| 1933 |
/***/ }), |
| 1934 |
|
| 1935 |
/***/ "../node_modules/object-assign/index.js": |
| 1936 |
/*!**********************************************!*\ |
| 1937 |
!*** ../node_modules/object-assign/index.js ***! |
| 1938 |
\**********************************************/ |
| 1939 |
/***/ ((module) => { |
| 1940 |
|
| 1941 |
"use strict"; |
| 1942 |
/* |
| 1943 |
object-assign |
| 1944 |
(c) Sindre Sorhus |
| 1945 |
@license MIT |
| 1946 |
*/ |
| 1947 |
|
| 1948 |
|
| 1949 |
/* eslint-disable no-unused-vars */ |
| 1950 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 1951 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 1952 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 1953 |
|
| 1954 |
function toObject(val) { |
| 1955 |
if (val === null || val === undefined) { |
| 1956 |
throw new TypeError('Object.assign cannot be called with null or undefined'); |
| 1957 |
} |
| 1958 |
|
| 1959 |
return Object(val); |
| 1960 |
} |
| 1961 |
|
| 1962 |
function shouldUseNative() { |
| 1963 |
try { |
| 1964 |
if (!Object.assign) { |
| 1965 |
return false; |
| 1966 |
} |
| 1967 |
|
| 1968 |
// Detect buggy property enumeration order in older V8 versions. |
| 1969 |
|
| 1970 |
// https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
| 1971 |
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
| 1972 |
test1[5] = 'de'; |
| 1973 |
if (Object.getOwnPropertyNames(test1)[0] === '5') { |
| 1974 |
return false; |
| 1975 |
} |
| 1976 |
|
| 1977 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 1978 |
var test2 = {}; |
| 1979 |
for (var i = 0; i < 10; i++) { |
| 1980 |
test2['_' + String.fromCharCode(i)] = i; |
| 1981 |
} |
| 1982 |
var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
| 1983 |
return test2[n]; |
| 1984 |
}); |
| 1985 |
if (order2.join('') !== '0123456789') { |
| 1986 |
return false; |
| 1987 |
} |
| 1988 |
|
| 1989 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 1990 |
var test3 = {}; |
| 1991 |
'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
| 1992 |
test3[letter] = letter; |
| 1993 |
}); |
| 1994 |
if (Object.keys(Object.assign({}, test3)).join('') !== |
| 1995 |
'abcdefghijklmnopqrst') { |
| 1996 |
return false; |
| 1997 |
} |
| 1998 |
|
| 1999 |
return true; |
| 2000 |
} catch (err) { |
| 2001 |
// We don't expect any of the above to throw, but better to be safe. |
| 2002 |
return false; |
| 2003 |
} |
| 2004 |
} |
| 2005 |
|
| 2006 |
module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
| 2007 |
var from; |
| 2008 |
var to = toObject(target); |
| 2009 |
var symbols; |
| 2010 |
|
| 2011 |
for (var s = 1; s < arguments.length; s++) { |
| 2012 |
from = Object(arguments[s]); |
| 2013 |
|
| 2014 |
for (var key in from) { |
| 2015 |
if (hasOwnProperty.call(from, key)) { |
| 2016 |
to[key] = from[key]; |
| 2017 |
} |
| 2018 |
} |
| 2019 |
|
| 2020 |
if (getOwnPropertySymbols) { |
| 2021 |
symbols = getOwnPropertySymbols(from); |
| 2022 |
for (var i = 0; i < symbols.length; i++) { |
| 2023 |
if (propIsEnumerable.call(from, symbols[i])) { |
| 2024 |
to[symbols[i]] = from[symbols[i]]; |
| 2025 |
} |
| 2026 |
} |
| 2027 |
} |
| 2028 |
} |
| 2029 |
|
| 2030 |
return to; |
| 2031 |
}; |
| 2032 |
|
| 2033 |
|
| 2034 |
/***/ }), |
| 2035 |
|
| 2036 |
/***/ "../node_modules/prop-types/checkPropTypes.js": |
| 2037 |
/*!****************************************************!*\ |
| 2038 |
!*** ../node_modules/prop-types/checkPropTypes.js ***! |
| 2039 |
\****************************************************/ |
| 2040 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2041 |
|
| 2042 |
"use strict"; |
| 2043 |
/** |
| 2044 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 2045 |
* |
| 2046 |
* This source code is licensed under the MIT license found in the |
| 2047 |
* LICENSE file in the root directory of this source tree. |
| 2048 |
*/ |
| 2049 |
|
| 2050 |
|
| 2051 |
|
| 2052 |
var printWarning = function() {}; |
| 2053 |
|
| 2054 |
if (true) { |
| 2055 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 2056 |
var loggedTypeFailures = {}; |
| 2057 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 2058 |
|
| 2059 |
printWarning = function(text) { |
| 2060 |
var message = 'Warning: ' + text; |
| 2061 |
if (typeof console !== 'undefined') { |
| 2062 |
console.error(message); |
| 2063 |
} |
| 2064 |
try { |
| 2065 |
// --- Welcome to debugging React --- |
| 2066 |
// This error was thrown as a convenience so that you can use this stack |
| 2067 |
// to find the callsite that caused this warning to fire. |
| 2068 |
throw new Error(message); |
| 2069 |
} catch (x) { /**/ } |
| 2070 |
}; |
| 2071 |
} |
| 2072 |
|
| 2073 |
/** |
| 2074 |
* Assert that the values match with the type specs. |
| 2075 |
* Error messages are memorized and will only be shown once. |
| 2076 |
* |
| 2077 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 2078 |
* @param {object} values Runtime values that need to be type-checked |
| 2079 |
* @param {string} location e.g. "prop", "context", "child context" |
| 2080 |
* @param {string} componentName Name of the component for error messages. |
| 2081 |
* @param {?Function} getStack Returns the component stack. |
| 2082 |
* @private |
| 2083 |
*/ |
| 2084 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 2085 |
if (true) { |
| 2086 |
for (var typeSpecName in typeSpecs) { |
| 2087 |
if (has(typeSpecs, typeSpecName)) { |
| 2088 |
var error; |
| 2089 |
// Prop type validation may throw. In case they do, we don't want to |
| 2090 |
// fail the render phase where it didn't fail before. So we log it. |
| 2091 |
// After these have been cleaned up, we'll let them throw. |
| 2092 |
try { |
| 2093 |
// This is intentionally an invariant that gets caught. It's the same |
| 2094 |
// behavior as without this statement except with a better message. |
| 2095 |
if (typeof typeSpecs[typeSpecName] !== 'function') { |
| 2096 |
var err = Error( |
| 2097 |
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
| 2098 |
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + |
| 2099 |
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' |
| 2100 |
); |
| 2101 |
err.name = 'Invariant Violation'; |
| 2102 |
throw err; |
| 2103 |
} |
| 2104 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 2105 |
} catch (ex) { |
| 2106 |
error = ex; |
| 2107 |
} |
| 2108 |
if (error && !(error instanceof Error)) { |
| 2109 |
printWarning( |
| 2110 |
(componentName || 'React class') + ': type specification of ' + |
| 2111 |
location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
| 2112 |
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
| 2113 |
'You may have forgotten to pass an argument to the type checker ' + |
| 2114 |
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
| 2115 |
'shape all require an argument).' |
| 2116 |
); |
| 2117 |
} |
| 2118 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 2119 |
// Only monitor this failure once because there tends to be a lot of the |
| 2120 |
// same error. |
| 2121 |
loggedTypeFailures[error.message] = true; |
| 2122 |
|
| 2123 |
var stack = getStack ? getStack() : ''; |
| 2124 |
|
| 2125 |
printWarning( |
| 2126 |
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
| 2127 |
); |
| 2128 |
} |
| 2129 |
} |
| 2130 |
} |
| 2131 |
} |
| 2132 |
} |
| 2133 |
|
| 2134 |
/** |
| 2135 |
* Resets warning cache when testing. |
| 2136 |
* |
| 2137 |
* @private |
| 2138 |
*/ |
| 2139 |
checkPropTypes.resetWarningCache = function() { |
| 2140 |
if (true) { |
| 2141 |
loggedTypeFailures = {}; |
| 2142 |
} |
| 2143 |
} |
| 2144 |
|
| 2145 |
module.exports = checkPropTypes; |
| 2146 |
|
| 2147 |
|
| 2148 |
/***/ }), |
| 2149 |
|
| 2150 |
/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": |
| 2151 |
/*!*************************************************************!*\ |
| 2152 |
!*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! |
| 2153 |
\*************************************************************/ |
| 2154 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2155 |
|
| 2156 |
"use strict"; |
| 2157 |
/** |
| 2158 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 2159 |
* |
| 2160 |
* This source code is licensed under the MIT license found in the |
| 2161 |
* LICENSE file in the root directory of this source tree. |
| 2162 |
*/ |
| 2163 |
|
| 2164 |
|
| 2165 |
|
| 2166 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 2167 |
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); |
| 2168 |
|
| 2169 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 2170 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 2171 |
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); |
| 2172 |
|
| 2173 |
var printWarning = function() {}; |
| 2174 |
|
| 2175 |
if (true) { |
| 2176 |
printWarning = function(text) { |
| 2177 |
var message = 'Warning: ' + text; |
| 2178 |
if (typeof console !== 'undefined') { |
| 2179 |
console.error(message); |
| 2180 |
} |
| 2181 |
try { |
| 2182 |
// --- Welcome to debugging React --- |
| 2183 |
// This error was thrown as a convenience so that you can use this stack |
| 2184 |
// to find the callsite that caused this warning to fire. |
| 2185 |
throw new Error(message); |
| 2186 |
} catch (x) {} |
| 2187 |
}; |
| 2188 |
} |
| 2189 |
|
| 2190 |
function emptyFunctionThatReturnsNull() { |
| 2191 |
return null; |
| 2192 |
} |
| 2193 |
|
| 2194 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 2195 |
/* global Symbol */ |
| 2196 |
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
| 2197 |
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
| 2198 |
|
| 2199 |
/** |
| 2200 |
* Returns the iterator method function contained on the iterable object. |
| 2201 |
* |
| 2202 |
* Be sure to invoke the function with the iterable as context: |
| 2203 |
* |
| 2204 |
* var iteratorFn = getIteratorFn(myIterable); |
| 2205 |
* if (iteratorFn) { |
| 2206 |
* var iterator = iteratorFn.call(myIterable); |
| 2207 |
* ... |
| 2208 |
* } |
| 2209 |
* |
| 2210 |
* @param {?object} maybeIterable |
| 2211 |
* @return {?function} |
| 2212 |
*/ |
| 2213 |
function getIteratorFn(maybeIterable) { |
| 2214 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 2215 |
if (typeof iteratorFn === 'function') { |
| 2216 |
return iteratorFn; |
| 2217 |
} |
| 2218 |
} |
| 2219 |
|
| 2220 |
/** |
| 2221 |
* Collection of methods that allow declaration and validation of props that are |
| 2222 |
* supplied to React components. Example usage: |
| 2223 |
* |
| 2224 |
* var Props = require('ReactPropTypes'); |
| 2225 |
* var MyArticle = React.createClass({ |
| 2226 |
* propTypes: { |
| 2227 |
* // An optional string prop named "description". |
| 2228 |
* description: Props.string, |
| 2229 |
* |
| 2230 |
* // A required enum prop named "category". |
| 2231 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 2232 |
* |
| 2233 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 2234 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 2235 |
* }, |
| 2236 |
* render: function() { ... } |
| 2237 |
* }); |
| 2238 |
* |
| 2239 |
* A more formal specification of how these methods are used: |
| 2240 |
* |
| 2241 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 2242 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 2243 |
* |
| 2244 |
* Each and every declaration produces a function with the same signature. This |
| 2245 |
* allows the creation of custom validation functions. For example: |
| 2246 |
* |
| 2247 |
* var MyLink = React.createClass({ |
| 2248 |
* propTypes: { |
| 2249 |
* // An optional string or URI prop named "href". |
| 2250 |
* href: function(props, propName, componentName) { |
| 2251 |
* var propValue = props[propName]; |
| 2252 |
* if (propValue != null && typeof propValue !== 'string' && |
| 2253 |
* !(propValue instanceof URI)) { |
| 2254 |
* return new Error( |
| 2255 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 2256 |
* componentName |
| 2257 |
* ); |
| 2258 |
* } |
| 2259 |
* } |
| 2260 |
* }, |
| 2261 |
* render: function() {...} |
| 2262 |
* }); |
| 2263 |
* |
| 2264 |
* @internal |
| 2265 |
*/ |
| 2266 |
|
| 2267 |
var ANONYMOUS = '<<anonymous>>'; |
| 2268 |
|
| 2269 |
// Important! |
| 2270 |
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
| 2271 |
var ReactPropTypes = { |
| 2272 |
array: createPrimitiveTypeChecker('array'), |
| 2273 |
bigint: createPrimitiveTypeChecker('bigint'), |
| 2274 |
bool: createPrimitiveTypeChecker('boolean'), |
| 2275 |
func: createPrimitiveTypeChecker('function'), |
| 2276 |
number: createPrimitiveTypeChecker('number'), |
| 2277 |
object: createPrimitiveTypeChecker('object'), |
| 2278 |
string: createPrimitiveTypeChecker('string'), |
| 2279 |
symbol: createPrimitiveTypeChecker('symbol'), |
| 2280 |
|
| 2281 |
any: createAnyTypeChecker(), |
| 2282 |
arrayOf: createArrayOfTypeChecker, |
| 2283 |
element: createElementTypeChecker(), |
| 2284 |
elementType: createElementTypeTypeChecker(), |
| 2285 |
instanceOf: createInstanceTypeChecker, |
| 2286 |
node: createNodeChecker(), |
| 2287 |
objectOf: createObjectOfTypeChecker, |
| 2288 |
oneOf: createEnumTypeChecker, |
| 2289 |
oneOfType: createUnionTypeChecker, |
| 2290 |
shape: createShapeTypeChecker, |
| 2291 |
exact: createStrictShapeTypeChecker, |
| 2292 |
}; |
| 2293 |
|
| 2294 |
/** |
| 2295 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 2296 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 2297 |
*/ |
| 2298 |
/*eslint-disable no-self-compare*/ |
| 2299 |
function is(x, y) { |
| 2300 |
// SameValue algorithm |
| 2301 |
if (x === y) { |
| 2302 |
// Steps 1-5, 7-10 |
| 2303 |
// Steps 6.b-6.e: +0 != -0 |
| 2304 |
return x !== 0 || 1 / x === 1 / y; |
| 2305 |
} else { |
| 2306 |
// Step 6.a: NaN == NaN |
| 2307 |
return x !== x && y !== y; |
| 2308 |
} |
| 2309 |
} |
| 2310 |
/*eslint-enable no-self-compare*/ |
| 2311 |
|
| 2312 |
/** |
| 2313 |
* We use an Error-like object for backward compatibility as people may call |
| 2314 |
* PropTypes directly and inspect their output. However, we don't use real |
| 2315 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 2316 |
* is prohibitively expensive if they are created too often, such as what |
| 2317 |
* happens in oneOfType() for any type before the one that matched. |
| 2318 |
*/ |
| 2319 |
function PropTypeError(message, data) { |
| 2320 |
this.message = message; |
| 2321 |
this.data = data && typeof data === 'object' ? data: {}; |
| 2322 |
this.stack = ''; |
| 2323 |
} |
| 2324 |
// Make `instanceof Error` still work for returned errors. |
| 2325 |
PropTypeError.prototype = Error.prototype; |
| 2326 |
|
| 2327 |
function createChainableTypeChecker(validate) { |
| 2328 |
if (true) { |
| 2329 |
var manualPropTypeCallCache = {}; |
| 2330 |
var manualPropTypeWarningCount = 0; |
| 2331 |
} |
| 2332 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 2333 |
componentName = componentName || ANONYMOUS; |
| 2334 |
propFullName = propFullName || propName; |
| 2335 |
|
| 2336 |
if (secret !== ReactPropTypesSecret) { |
| 2337 |
if (throwOnDirectAccess) { |
| 2338 |
// New behavior only for users of `prop-types` package |
| 2339 |
var err = new Error( |
| 2340 |
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
| 2341 |
'Use `PropTypes.checkPropTypes()` to call them. ' + |
| 2342 |
'Read more at http://fb.me/use-check-prop-types' |
| 2343 |
); |
| 2344 |
err.name = 'Invariant Violation'; |
| 2345 |
throw err; |
| 2346 |
} else if ( true && typeof console !== 'undefined') { |
| 2347 |
// Old behavior for people using React.PropTypes |
| 2348 |
var cacheKey = componentName + ':' + propName; |
| 2349 |
if ( |
| 2350 |
!manualPropTypeCallCache[cacheKey] && |
| 2351 |
// Avoid spamming the console because they are often not actionable except for lib authors |
| 2352 |
manualPropTypeWarningCount < 3 |
| 2353 |
) { |
| 2354 |
printWarning( |
| 2355 |
'You are manually calling a React.PropTypes validation ' + |
| 2356 |
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
| 2357 |
'and will throw in the standalone `prop-types` package. ' + |
| 2358 |
'You may be seeing this warning due to a third-party PropTypes ' + |
| 2359 |
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
| 2360 |
); |
| 2361 |
manualPropTypeCallCache[cacheKey] = true; |
| 2362 |
manualPropTypeWarningCount++; |
| 2363 |
} |
| 2364 |
} |
| 2365 |
} |
| 2366 |
if (props[propName] == null) { |
| 2367 |
if (isRequired) { |
| 2368 |
if (props[propName] === null) { |
| 2369 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
| 2370 |
} |
| 2371 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
| 2372 |
} |
| 2373 |
return null; |
| 2374 |
} else { |
| 2375 |
return validate(props, propName, componentName, location, propFullName); |
| 2376 |
} |
| 2377 |
} |
| 2378 |
|
| 2379 |
var chainedCheckType = checkType.bind(null, false); |
| 2380 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 2381 |
|
| 2382 |
return chainedCheckType; |
| 2383 |
} |
| 2384 |
|
| 2385 |
function createPrimitiveTypeChecker(expectedType) { |
| 2386 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 2387 |
var propValue = props[propName]; |
| 2388 |
var propType = getPropType(propValue); |
| 2389 |
if (propType !== expectedType) { |
| 2390 |
// `propValue` being instance of, say, date/regexp, pass the 'object' |
| 2391 |
// check, but we can offer a more precise error message here rather than |
| 2392 |
// 'of type `object`'. |
| 2393 |
var preciseType = getPreciseType(propValue); |
| 2394 |
|
| 2395 |
return new PropTypeError( |
| 2396 |
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), |
| 2397 |
{expectedType: expectedType} |
| 2398 |
); |
| 2399 |
} |
| 2400 |
return null; |
| 2401 |
} |
| 2402 |
return createChainableTypeChecker(validate); |
| 2403 |
} |
| 2404 |
|
| 2405 |
function createAnyTypeChecker() { |
| 2406 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 2407 |
} |
| 2408 |
|
| 2409 |
function createArrayOfTypeChecker(typeChecker) { |
| 2410 |
function validate(props, propName, componentName, location, propFullName) { |
| 2411 |
if (typeof typeChecker !== 'function') { |
| 2412 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
| 2413 |
} |
| 2414 |
var propValue = props[propName]; |
| 2415 |
if (!Array.isArray(propValue)) { |
| 2416 |
var propType = getPropType(propValue); |
| 2417 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
| 2418 |
} |
| 2419 |
for (var i = 0; i < propValue.length; i++) { |
| 2420 |
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
| 2421 |
if (error instanceof Error) { |
| 2422 |
return error; |
| 2423 |
} |
| 2424 |
} |
| 2425 |
return null; |
| 2426 |
} |
| 2427 |
return createChainableTypeChecker(validate); |
| 2428 |
} |
| 2429 |
|
| 2430 |
function createElementTypeChecker() { |
| 2431 |
function validate(props, propName, componentName, location, propFullName) { |
| 2432 |
var propValue = props[propName]; |
| 2433 |
if (!isValidElement(propValue)) { |
| 2434 |
var propType = getPropType(propValue); |
| 2435 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 2436 |
} |
| 2437 |
return null; |
| 2438 |
} |
| 2439 |
return createChainableTypeChecker(validate); |
| 2440 |
} |
| 2441 |
|
| 2442 |
function createElementTypeTypeChecker() { |
| 2443 |
function validate(props, propName, componentName, location, propFullName) { |
| 2444 |
var propValue = props[propName]; |
| 2445 |
if (!ReactIs.isValidElementType(propValue)) { |
| 2446 |
var propType = getPropType(propValue); |
| 2447 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 2448 |
} |
| 2449 |
return null; |
| 2450 |
} |
| 2451 |
return createChainableTypeChecker(validate); |
| 2452 |
} |
| 2453 |
|
| 2454 |
function createInstanceTypeChecker(expectedClass) { |
| 2455 |
function validate(props, propName, componentName, location, propFullName) { |
| 2456 |
if (!(props[propName] instanceof expectedClass)) { |
| 2457 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 2458 |
var actualClassName = getClassName(props[propName]); |
| 2459 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
| 2460 |
} |
| 2461 |
return null; |
| 2462 |
} |
| 2463 |
return createChainableTypeChecker(validate); |
| 2464 |
} |
| 2465 |
|
| 2466 |
function createEnumTypeChecker(expectedValues) { |
| 2467 |
if (!Array.isArray(expectedValues)) { |
| 2468 |
if (true) { |
| 2469 |
if (arguments.length > 1) { |
| 2470 |
printWarning( |
| 2471 |
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + |
| 2472 |
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' |
| 2473 |
); |
| 2474 |
} else { |
| 2475 |
printWarning('Invalid argument supplied to oneOf, expected an array.'); |
| 2476 |
} |
| 2477 |
} |
| 2478 |
return emptyFunctionThatReturnsNull; |
| 2479 |
} |
| 2480 |
|
| 2481 |
function validate(props, propName, componentName, location, propFullName) { |
| 2482 |
var propValue = props[propName]; |
| 2483 |
for (var i = 0; i < expectedValues.length; i++) { |
| 2484 |
if (is(propValue, expectedValues[i])) { |
| 2485 |
return null; |
| 2486 |
} |
| 2487 |
} |
| 2488 |
|
| 2489 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 2490 |
var type = getPreciseType(value); |
| 2491 |
if (type === 'symbol') { |
| 2492 |
return String(value); |
| 2493 |
} |
| 2494 |
return value; |
| 2495 |
}); |
| 2496 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
| 2497 |
} |
| 2498 |
return createChainableTypeChecker(validate); |
| 2499 |
} |
| 2500 |
|
| 2501 |
function createObjectOfTypeChecker(typeChecker) { |
| 2502 |
function validate(props, propName, componentName, location, propFullName) { |
| 2503 |
if (typeof typeChecker !== 'function') { |
| 2504 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
| 2505 |
} |
| 2506 |
var propValue = props[propName]; |
| 2507 |
var propType = getPropType(propValue); |
| 2508 |
if (propType !== 'object') { |
| 2509 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
| 2510 |
} |
| 2511 |
for (var key in propValue) { |
| 2512 |
if (has(propValue, key)) { |
| 2513 |
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 2514 |
if (error instanceof Error) { |
| 2515 |
return error; |
| 2516 |
} |
| 2517 |
} |
| 2518 |
} |
| 2519 |
return null; |
| 2520 |
} |
| 2521 |
return createChainableTypeChecker(validate); |
| 2522 |
} |
| 2523 |
|
| 2524 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 2525 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 2526 |
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; |
| 2527 |
return emptyFunctionThatReturnsNull; |
| 2528 |
} |
| 2529 |
|
| 2530 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 2531 |
var checker = arrayOfTypeCheckers[i]; |
| 2532 |
if (typeof checker !== 'function') { |
| 2533 |
printWarning( |
| 2534 |
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
| 2535 |
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
| 2536 |
); |
| 2537 |
return emptyFunctionThatReturnsNull; |
| 2538 |
} |
| 2539 |
} |
| 2540 |
|
| 2541 |
function validate(props, propName, componentName, location, propFullName) { |
| 2542 |
var expectedTypes = []; |
| 2543 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 2544 |
var checker = arrayOfTypeCheckers[i]; |
| 2545 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 2546 |
if (checkerResult == null) { |
| 2547 |
return null; |
| 2548 |
} |
| 2549 |
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { |
| 2550 |
expectedTypes.push(checkerResult.data.expectedType); |
| 2551 |
} |
| 2552 |
} |
| 2553 |
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; |
| 2554 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); |
| 2555 |
} |
| 2556 |
return createChainableTypeChecker(validate); |
| 2557 |
} |
| 2558 |
|
| 2559 |
function createNodeChecker() { |
| 2560 |
function validate(props, propName, componentName, location, propFullName) { |
| 2561 |
if (!isNode(props[propName])) { |
| 2562 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
| 2563 |
} |
| 2564 |
return null; |
| 2565 |
} |
| 2566 |
return createChainableTypeChecker(validate); |
| 2567 |
} |
| 2568 |
|
| 2569 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 2570 |
return new PropTypeError( |
| 2571 |
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + |
| 2572 |
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' |
| 2573 |
); |
| 2574 |
} |
| 2575 |
|
| 2576 |
function createShapeTypeChecker(shapeTypes) { |
| 2577 |
function validate(props, propName, componentName, location, propFullName) { |
| 2578 |
var propValue = props[propName]; |
| 2579 |
var propType = getPropType(propValue); |
| 2580 |
if (propType !== 'object') { |
| 2581 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 2582 |
} |
| 2583 |
for (var key in shapeTypes) { |
| 2584 |
var checker = shapeTypes[key]; |
| 2585 |
if (typeof checker !== 'function') { |
| 2586 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 2587 |
} |
| 2588 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 2589 |
if (error) { |
| 2590 |
return error; |
| 2591 |
} |
| 2592 |
} |
| 2593 |
return null; |
| 2594 |
} |
| 2595 |
return createChainableTypeChecker(validate); |
| 2596 |
} |
| 2597 |
|
| 2598 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 2599 |
function validate(props, propName, componentName, location, propFullName) { |
| 2600 |
var propValue = props[propName]; |
| 2601 |
var propType = getPropType(propValue); |
| 2602 |
if (propType !== 'object') { |
| 2603 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 2604 |
} |
| 2605 |
// We need to check all keys in case some are required but missing from props. |
| 2606 |
var allKeys = assign({}, props[propName], shapeTypes); |
| 2607 |
for (var key in allKeys) { |
| 2608 |
var checker = shapeTypes[key]; |
| 2609 |
if (has(shapeTypes, key) && typeof checker !== 'function') { |
| 2610 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 2611 |
} |
| 2612 |
if (!checker) { |
| 2613 |
return new PropTypeError( |
| 2614 |
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
| 2615 |
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
| 2616 |
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
| 2617 |
); |
| 2618 |
} |
| 2619 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 2620 |
if (error) { |
| 2621 |
return error; |
| 2622 |
} |
| 2623 |
} |
| 2624 |
return null; |
| 2625 |
} |
| 2626 |
|
| 2627 |
return createChainableTypeChecker(validate); |
| 2628 |
} |
| 2629 |
|
| 2630 |
function isNode(propValue) { |
| 2631 |
switch (typeof propValue) { |
| 2632 |
case 'number': |
| 2633 |
case 'string': |
| 2634 |
case 'undefined': |
| 2635 |
return true; |
| 2636 |
case 'boolean': |
| 2637 |
return !propValue; |
| 2638 |
case 'object': |
| 2639 |
if (Array.isArray(propValue)) { |
| 2640 |
return propValue.every(isNode); |
| 2641 |
} |
| 2642 |
if (propValue === null || isValidElement(propValue)) { |
| 2643 |
return true; |
| 2644 |
} |
| 2645 |
|
| 2646 |
var iteratorFn = getIteratorFn(propValue); |
| 2647 |
if (iteratorFn) { |
| 2648 |
var iterator = iteratorFn.call(propValue); |
| 2649 |
var step; |
| 2650 |
if (iteratorFn !== propValue.entries) { |
| 2651 |
while (!(step = iterator.next()).done) { |
| 2652 |
if (!isNode(step.value)) { |
| 2653 |
return false; |
| 2654 |
} |
| 2655 |
} |
| 2656 |
} else { |
| 2657 |
// Iterator will provide entry [k,v] tuples rather than values. |
| 2658 |
while (!(step = iterator.next()).done) { |
| 2659 |
var entry = step.value; |
| 2660 |
if (entry) { |
| 2661 |
if (!isNode(entry[1])) { |
| 2662 |
return false; |
| 2663 |
} |
| 2664 |
} |
| 2665 |
} |
| 2666 |
} |
| 2667 |
} else { |
| 2668 |
return false; |
| 2669 |
} |
| 2670 |
|
| 2671 |
return true; |
| 2672 |
default: |
| 2673 |
return false; |
| 2674 |
} |
| 2675 |
} |
| 2676 |
|
| 2677 |
function isSymbol(propType, propValue) { |
| 2678 |
// Native Symbol. |
| 2679 |
if (propType === 'symbol') { |
| 2680 |
return true; |
| 2681 |
} |
| 2682 |
|
| 2683 |
// falsy value can't be a Symbol |
| 2684 |
if (!propValue) { |
| 2685 |
return false; |
| 2686 |
} |
| 2687 |
|
| 2688 |
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
| 2689 |
if (propValue['@@toStringTag'] === 'Symbol') { |
| 2690 |
return true; |
| 2691 |
} |
| 2692 |
|
| 2693 |
// Fallback for non-spec compliant Symbols which are polyfilled. |
| 2694 |
if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
| 2695 |
return true; |
| 2696 |
} |
| 2697 |
|
| 2698 |
return false; |
| 2699 |
} |
| 2700 |
|
| 2701 |
// Equivalent of `typeof` but with special handling for array and regexp. |
| 2702 |
function getPropType(propValue) { |
| 2703 |
var propType = typeof propValue; |
| 2704 |
if (Array.isArray(propValue)) { |
| 2705 |
return 'array'; |
| 2706 |
} |
| 2707 |
if (propValue instanceof RegExp) { |
| 2708 |
// Old webkits (at least until Android 4.0) return 'function' rather than |
| 2709 |
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
| 2710 |
// passes PropTypes.object. |
| 2711 |
return 'object'; |
| 2712 |
} |
| 2713 |
if (isSymbol(propType, propValue)) { |
| 2714 |
return 'symbol'; |
| 2715 |
} |
| 2716 |
return propType; |
| 2717 |
} |
| 2718 |
|
| 2719 |
// This handles more types than `getPropType`. Only used for error messages. |
| 2720 |
// See `createPrimitiveTypeChecker`. |
| 2721 |
function getPreciseType(propValue) { |
| 2722 |
if (typeof propValue === 'undefined' || propValue === null) { |
| 2723 |
return '' + propValue; |
| 2724 |
} |
| 2725 |
var propType = getPropType(propValue); |
| 2726 |
if (propType === 'object') { |
| 2727 |
if (propValue instanceof Date) { |
| 2728 |
return 'date'; |
| 2729 |
} else if (propValue instanceof RegExp) { |
| 2730 |
return 'regexp'; |
| 2731 |
} |
| 2732 |
} |
| 2733 |
return propType; |
| 2734 |
} |
| 2735 |
|
| 2736 |
// Returns a string that is postfixed to a warning about an invalid type. |
| 2737 |
// For example, "undefined" or "of type array" |
| 2738 |
function getPostfixForTypeWarning(value) { |
| 2739 |
var type = getPreciseType(value); |
| 2740 |
switch (type) { |
| 2741 |
case 'array': |
| 2742 |
case 'object': |
| 2743 |
return 'an ' + type; |
| 2744 |
case 'boolean': |
| 2745 |
case 'date': |
| 2746 |
case 'regexp': |
| 2747 |
return 'a ' + type; |
| 2748 |
default: |
| 2749 |
return type; |
| 2750 |
} |
| 2751 |
} |
| 2752 |
|
| 2753 |
// Returns class name of the object, if any. |
| 2754 |
function getClassName(propValue) { |
| 2755 |
if (!propValue.constructor || !propValue.constructor.name) { |
| 2756 |
return ANONYMOUS; |
| 2757 |
} |
| 2758 |
return propValue.constructor.name; |
| 2759 |
} |
| 2760 |
|
| 2761 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 2762 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 2763 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 2764 |
|
| 2765 |
return ReactPropTypes; |
| 2766 |
}; |
| 2767 |
|
| 2768 |
|
| 2769 |
/***/ }), |
| 2770 |
|
| 2771 |
/***/ "../node_modules/prop-types/index.js": |
| 2772 |
/*!*******************************************!*\ |
| 2773 |
!*** ../node_modules/prop-types/index.js ***! |
| 2774 |
\*******************************************/ |
| 2775 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2776 |
|
| 2777 |
/** |
| 2778 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 2779 |
* |
| 2780 |
* This source code is licensed under the MIT license found in the |
| 2781 |
* LICENSE file in the root directory of this source tree. |
| 2782 |
*/ |
| 2783 |
|
| 2784 |
if (true) { |
| 2785 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 2786 |
|
| 2787 |
// By explicitly using `prop-types` you are opting into new development behavior. |
| 2788 |
// http://fb.me/prop-types-in-prod |
| 2789 |
var throwOnDirectAccess = true; |
| 2790 |
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 2791 |
} else // removed by dead control flow |
| 2792 |
{} |
| 2793 |
|
| 2794 |
|
| 2795 |
/***/ }), |
| 2796 |
|
| 2797 |
/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": |
| 2798 |
/*!**************************************************************!*\ |
| 2799 |
!*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! |
| 2800 |
\**************************************************************/ |
| 2801 |
/***/ ((module) => { |
| 2802 |
|
| 2803 |
"use strict"; |
| 2804 |
/** |
| 2805 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 2806 |
* |
| 2807 |
* This source code is licensed under the MIT license found in the |
| 2808 |
* LICENSE file in the root directory of this source tree. |
| 2809 |
*/ |
| 2810 |
|
| 2811 |
|
| 2812 |
|
| 2813 |
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
| 2814 |
|
| 2815 |
module.exports = ReactPropTypesSecret; |
| 2816 |
|
| 2817 |
|
| 2818 |
/***/ }), |
| 2819 |
|
| 2820 |
/***/ "../node_modules/prop-types/lib/has.js": |
| 2821 |
/*!*********************************************!*\ |
| 2822 |
!*** ../node_modules/prop-types/lib/has.js ***! |
| 2823 |
\*********************************************/ |
| 2824 |
/***/ ((module) => { |
| 2825 |
|
| 2826 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 2827 |
|
| 2828 |
|
| 2829 |
/***/ }), |
| 2830 |
|
| 2831 |
/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": |
| 2832 |
/*!************************************************************************************!*\ |
| 2833 |
!*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! |
| 2834 |
\************************************************************************************/ |
| 2835 |
/***/ ((__unused_webpack_module, exports) => { |
| 2836 |
|
| 2837 |
"use strict"; |
| 2838 |
/** @license React v16.13.1 |
| 2839 |
* react-is.development.js |
| 2840 |
* |
| 2841 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 2842 |
* |
| 2843 |
* This source code is licensed under the MIT license found in the |
| 2844 |
* LICENSE file in the root directory of this source tree. |
| 2845 |
*/ |
| 2846 |
|
| 2847 |
|
| 2848 |
|
| 2849 |
|
| 2850 |
|
| 2851 |
if (true) { |
| 2852 |
(function() { |
| 2853 |
'use strict'; |
| 2854 |
|
| 2855 |
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol |
| 2856 |
// nor polyfill, then a plain number is used for performance. |
| 2857 |
var hasSymbol = typeof Symbol === 'function' && Symbol.for; |
| 2858 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; |
| 2859 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; |
| 2860 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; |
| 2861 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; |
| 2862 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; |
| 2863 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; |
| 2864 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary |
| 2865 |
// (unstable) APIs that have been removed. Can we remove the symbols? |
| 2866 |
|
| 2867 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; |
| 2868 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; |
| 2869 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; |
| 2870 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; |
| 2871 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; |
| 2872 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; |
| 2873 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; |
| 2874 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; |
| 2875 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; |
| 2876 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; |
| 2877 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; |
| 2878 |
|
| 2879 |
function isValidElementType(type) { |
| 2880 |
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. |
| 2881 |
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); |
| 2882 |
} |
| 2883 |
|
| 2884 |
function typeOf(object) { |
| 2885 |
if (typeof object === 'object' && object !== null) { |
| 2886 |
var $$typeof = object.$$typeof; |
| 2887 |
|
| 2888 |
switch ($$typeof) { |
| 2889 |
case REACT_ELEMENT_TYPE: |
| 2890 |
var type = object.type; |
| 2891 |
|
| 2892 |
switch (type) { |
| 2893 |
case REACT_ASYNC_MODE_TYPE: |
| 2894 |
case REACT_CONCURRENT_MODE_TYPE: |
| 2895 |
case REACT_FRAGMENT_TYPE: |
| 2896 |
case REACT_PROFILER_TYPE: |
| 2897 |
case REACT_STRICT_MODE_TYPE: |
| 2898 |
case REACT_SUSPENSE_TYPE: |
| 2899 |
return type; |
| 2900 |
|
| 2901 |
default: |
| 2902 |
var $$typeofType = type && type.$$typeof; |
| 2903 |
|
| 2904 |
switch ($$typeofType) { |
| 2905 |
case REACT_CONTEXT_TYPE: |
| 2906 |
case REACT_FORWARD_REF_TYPE: |
| 2907 |
case REACT_LAZY_TYPE: |
| 2908 |
case REACT_MEMO_TYPE: |
| 2909 |
case REACT_PROVIDER_TYPE: |
| 2910 |
return $$typeofType; |
| 2911 |
|
| 2912 |
default: |
| 2913 |
return $$typeof; |
| 2914 |
} |
| 2915 |
|
| 2916 |
} |
| 2917 |
|
| 2918 |
case REACT_PORTAL_TYPE: |
| 2919 |
return $$typeof; |
| 2920 |
} |
| 2921 |
} |
| 2922 |
|
| 2923 |
return undefined; |
| 2924 |
} // AsyncMode is deprecated along with isAsyncMode |
| 2925 |
|
| 2926 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 2927 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 2928 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 2929 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 2930 |
var Element = REACT_ELEMENT_TYPE; |
| 2931 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 2932 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 2933 |
var Lazy = REACT_LAZY_TYPE; |
| 2934 |
var Memo = REACT_MEMO_TYPE; |
| 2935 |
var Portal = REACT_PORTAL_TYPE; |
| 2936 |
var Profiler = REACT_PROFILER_TYPE; |
| 2937 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 2938 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 2939 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated |
| 2940 |
|
| 2941 |
function isAsyncMode(object) { |
| 2942 |
{ |
| 2943 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 2944 |
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint |
| 2945 |
|
| 2946 |
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); |
| 2947 |
} |
| 2948 |
} |
| 2949 |
|
| 2950 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 2951 |
} |
| 2952 |
function isConcurrentMode(object) { |
| 2953 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 2954 |
} |
| 2955 |
function isContextConsumer(object) { |
| 2956 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 2957 |
} |
| 2958 |
function isContextProvider(object) { |
| 2959 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 2960 |
} |
| 2961 |
function isElement(object) { |
| 2962 |
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 2963 |
} |
| 2964 |
function isForwardRef(object) { |
| 2965 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 2966 |
} |
| 2967 |
function isFragment(object) { |
| 2968 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 2969 |
} |
| 2970 |
function isLazy(object) { |
| 2971 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 2972 |
} |
| 2973 |
function isMemo(object) { |
| 2974 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 2975 |
} |
| 2976 |
function isPortal(object) { |
| 2977 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 2978 |
} |
| 2979 |
function isProfiler(object) { |
| 2980 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 2981 |
} |
| 2982 |
function isStrictMode(object) { |
| 2983 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 2984 |
} |
| 2985 |
function isSuspense(object) { |
| 2986 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 2987 |
} |
| 2988 |
|
| 2989 |
exports.AsyncMode = AsyncMode; |
| 2990 |
exports.ConcurrentMode = ConcurrentMode; |
| 2991 |
exports.ContextConsumer = ContextConsumer; |
| 2992 |
exports.ContextProvider = ContextProvider; |
| 2993 |
exports.Element = Element; |
| 2994 |
exports.ForwardRef = ForwardRef; |
| 2995 |
exports.Fragment = Fragment; |
| 2996 |
exports.Lazy = Lazy; |
| 2997 |
exports.Memo = Memo; |
| 2998 |
exports.Portal = Portal; |
| 2999 |
exports.Profiler = Profiler; |
| 3000 |
exports.StrictMode = StrictMode; |
| 3001 |
exports.Suspense = Suspense; |
| 3002 |
exports.isAsyncMode = isAsyncMode; |
| 3003 |
exports.isConcurrentMode = isConcurrentMode; |
| 3004 |
exports.isContextConsumer = isContextConsumer; |
| 3005 |
exports.isContextProvider = isContextProvider; |
| 3006 |
exports.isElement = isElement; |
| 3007 |
exports.isForwardRef = isForwardRef; |
| 3008 |
exports.isFragment = isFragment; |
| 3009 |
exports.isLazy = isLazy; |
| 3010 |
exports.isMemo = isMemo; |
| 3011 |
exports.isPortal = isPortal; |
| 3012 |
exports.isProfiler = isProfiler; |
| 3013 |
exports.isStrictMode = isStrictMode; |
| 3014 |
exports.isSuspense = isSuspense; |
| 3015 |
exports.isValidElementType = isValidElementType; |
| 3016 |
exports.typeOf = typeOf; |
| 3017 |
})(); |
| 3018 |
} |
| 3019 |
|
| 3020 |
|
| 3021 |
/***/ }), |
| 3022 |
|
| 3023 |
/***/ "../node_modules/prop-types/node_modules/react-is/index.js": |
| 3024 |
/*!*****************************************************************!*\ |
| 3025 |
!*** ../node_modules/prop-types/node_modules/react-is/index.js ***! |
| 3026 |
\*****************************************************************/ |
| 3027 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3028 |
|
| 3029 |
"use strict"; |
| 3030 |
|
| 3031 |
|
| 3032 |
if (false) // removed by dead control flow |
| 3033 |
{} else { |
| 3034 |
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 3035 |
} |
| 3036 |
|
| 3037 |
|
| 3038 |
/***/ }), |
| 3039 |
|
| 3040 |
/***/ "../node_modules/react-dom/client.js": |
| 3041 |
/*!*******************************************!*\ |
| 3042 |
!*** ../node_modules/react-dom/client.js ***! |
| 3043 |
\*******************************************/ |
| 3044 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 3045 |
|
| 3046 |
"use strict"; |
| 3047 |
|
| 3048 |
|
| 3049 |
var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 3050 |
if (false) // removed by dead control flow |
| 3051 |
{} else { |
| 3052 |
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 3053 |
exports.createRoot = function(c, o) { |
| 3054 |
i.usingClientEntryPoint = true; |
| 3055 |
try { |
| 3056 |
return m.createRoot(c, o); |
| 3057 |
} finally { |
| 3058 |
i.usingClientEntryPoint = false; |
| 3059 |
} |
| 3060 |
}; |
| 3061 |
exports.hydrateRoot = function(c, h, o) { |
| 3062 |
i.usingClientEntryPoint = true; |
| 3063 |
try { |
| 3064 |
return m.hydrateRoot(c, h, o); |
| 3065 |
} finally { |
| 3066 |
i.usingClientEntryPoint = false; |
| 3067 |
} |
| 3068 |
}; |
| 3069 |
} |
| 3070 |
|
| 3071 |
|
| 3072 |
/***/ }), |
| 3073 |
|
| 3074 |
/***/ "@elementor/ui": |
| 3075 |
/*!*********************************!*\ |
| 3076 |
!*** external "elementorV2.ui" ***! |
| 3077 |
\*********************************/ |
| 3078 |
/***/ ((module) => { |
| 3079 |
|
| 3080 |
"use strict"; |
| 3081 |
module.exports = elementorV2.ui; |
| 3082 |
|
| 3083 |
/***/ }), |
| 3084 |
|
| 3085 |
/***/ "@wordpress/i18n": |
| 3086 |
/*!**************************!*\ |
| 3087 |
!*** external "wp.i18n" ***! |
| 3088 |
\**************************/ |
| 3089 |
/***/ ((module) => { |
| 3090 |
|
| 3091 |
"use strict"; |
| 3092 |
module.exports = wp.i18n; |
| 3093 |
|
| 3094 |
/***/ }), |
| 3095 |
|
| 3096 |
/***/ "react": |
| 3097 |
/*!************************!*\ |
| 3098 |
!*** external "React" ***! |
| 3099 |
\************************/ |
| 3100 |
/***/ ((module) => { |
| 3101 |
|
| 3102 |
"use strict"; |
| 3103 |
module.exports = React; |
| 3104 |
|
| 3105 |
/***/ }), |
| 3106 |
|
| 3107 |
/***/ "react-dom": |
| 3108 |
/*!***************************!*\ |
| 3109 |
!*** external "ReactDOM" ***! |
| 3110 |
\***************************/ |
| 3111 |
/***/ ((module) => { |
| 3112 |
|
| 3113 |
"use strict"; |
| 3114 |
module.exports = ReactDOM; |
| 3115 |
|
| 3116 |
/***/ }) |
| 3117 |
|
| 3118 |
/******/ }); |
| 3119 |
/************************************************************************/ |
| 3120 |
/******/ // The module cache |
| 3121 |
/******/ var __webpack_module_cache__ = {}; |
| 3122 |
/******/ |
| 3123 |
/******/ // The require function |
| 3124 |
/******/ function __webpack_require__(moduleId) { |
| 3125 |
/******/ // Check if module is in cache |
| 3126 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 3127 |
/******/ if (cachedModule !== undefined) { |
| 3128 |
/******/ return cachedModule.exports; |
| 3129 |
/******/ } |
| 3130 |
/******/ // Create a new module (and put it into the cache) |
| 3131 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 3132 |
/******/ // no module.id needed |
| 3133 |
/******/ // no module.loaded needed |
| 3134 |
/******/ exports: {} |
| 3135 |
/******/ }; |
| 3136 |
/******/ |
| 3137 |
/******/ // Execute the module function |
| 3138 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 3139 |
/******/ |
| 3140 |
/******/ // Return the exports of the module |
| 3141 |
/******/ return module.exports; |
| 3142 |
/******/ } |
| 3143 |
/******/ |
| 3144 |
/************************************************************************/ |
| 3145 |
var __webpack_exports__ = {}; |
| 3146 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 3147 |
(() => { |
| 3148 |
"use strict"; |
| 3149 |
/*!******************************************************!*\ |
| 3150 |
!*** ../modules/promotions/assets/js/react/index.js ***! |
| 3151 |
\******************************************************/ |
| 3152 |
|
| 3153 |
|
| 3154 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 3155 |
var _module = _interopRequireDefault(__webpack_require__(/*! ./module.js */ "../modules/promotions/assets/js/react/module.js")); |
| 3156 |
new _module.default(); |
| 3157 |
})(); |
| 3158 |
|
| 3159 |
/******/ })() |
| 3160 |
; |
| 3161 |
//# sourceMappingURL=e-react-promotions.js.map |