Version Description
Release date: May 11, 2022
Changelog: - Added a new button action: Tiktok. - Added a new button action: Download. - Updated Page Rules. - Improved the design of the templates dialog. - Disabled tour when there are no buttons. - More UI improvements. - Fixed some issues with the starter Hints - Fixed an issue where using both "Label inside button" and "Label same height as button" causes the button to get bigger on hover. - Some other minor fixes
If you experience bugs, problems or you just have some feedback, let us know on our Buttonizer community!
Download this release
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 2.8.0 |
Comparing to | |
See all releases |
Code changes from version 2.7.0 to 2.8.0
- app/Api/PageRules/WordPressData/ApiDebug.php +1 -1
- app/Utils/Update.php +106 -0
- assets/dashboard.css +9 -9
- assets/dashboard.js +12488 -9770
app/Api/PageRules/WordPressData/ApiDebug.php
CHANGED
@@ -34,7 +34,7 @@ class ApiDebug
|
|
34 |
'args' => [
|
35 |
'rule' => [
|
36 |
'required' => true,
|
37 |
-
"type" => "
|
38 |
],
|
39 |
'user_role' => [
|
40 |
'required' => true,
|
34 |
'args' => [
|
35 |
'rule' => [
|
36 |
'required' => true,
|
37 |
+
"type" => "string",
|
38 |
],
|
39 |
'user_role' => [
|
40 |
'required' => true,
|
app/Utils/Update.php
CHANGED
@@ -95,6 +95,9 @@ class Update
|
|
95 |
case "4":
|
96 |
$this->migration5();
|
97 |
break;
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
// No need for migration. Set to current migration version otherwise we're going into a LoOoOoOoOoP
|
@@ -1101,5 +1104,108 @@ class Update
|
|
1101 |
|
1102 |
return $groups;
|
1103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1105 |
}
|
95 |
case "4":
|
96 |
$this->migration5();
|
97 |
break;
|
98 |
+
case "5":
|
99 |
+
$this->migration6();
|
100 |
+
break;
|
101 |
}
|
102 |
|
103 |
// No need for migration. Set to current migration version otherwise we're going into a LoOoOoOoOoP
|
1104 |
|
1105 |
return $groups;
|
1106 |
}
|
1107 |
+
|
1108 |
+
/**
|
1109 |
+
* Run update 2.6.2
|
1110 |
+
*/
|
1111 |
+
public function migration6()
|
1112 |
+
{
|
1113 |
+
// $this->registerSettings();
|
1114 |
+
|
1115 |
+
|
1116 |
+
// Back it up
|
1117 |
+
update_option('buttonizer_rules_backup_6', get_option('buttonizer_rules'));
|
1118 |
+
|
1119 |
+
$rules = $this->migration6UpdateData(get_option('buttonizer_rules'));
|
1120 |
+
|
1121 |
+
// If buttonizer was already published, update published.
|
1122 |
+
if(get_option('buttonizer_rules_published')) {
|
1123 |
+
// Back it up
|
1124 |
+
update_option('buttonizer_rules_backup_6', get_option('buttonizer_rules_published'));
|
1125 |
+
|
1126 |
+
$published = $this->migration6UpdateData(get_option('buttonizer_rules_published'));
|
1127 |
+
update_option('buttonizer_rules_published', $published);
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
// Get all current settings first
|
1131 |
+
$settings = get_option('buttonizer_settings');
|
1132 |
+
|
1133 |
+
// Set migration version to 6
|
1134 |
+
$settings["migration_version"] = 6;
|
1135 |
+
update_option('buttonizer_settings', $settings);
|
1136 |
+
|
1137 |
+
// Overwrite new settings
|
1138 |
+
update_option('buttonizer_rules', $rules);
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
/**
|
1142 |
+
* Convert rules
|
1143 |
+
*/
|
1144 |
+
public function migration6UpdateData($array) {
|
1145 |
+
$rules = [];
|
1146 |
+
|
1147 |
+
// Loop through the groups
|
1148 |
+
foreach ($array as $rule)
|
1149 |
+
{
|
1150 |
+
$conditions = [];
|
1151 |
+
|
1152 |
+
if(isset($rule["rules"])) {
|
1153 |
+
foreach($rule["rules"] as $condition) {
|
1154 |
+
switch($condition["type"]) {
|
1155 |
+
case "page_title":
|
1156 |
+
case "blog_title":
|
1157 |
+
$condition["operator"] = "contains";
|
1158 |
+
break;
|
1159 |
+
case "url_match":
|
1160 |
+
$condition["type"] = "path";
|
1161 |
+
$condition["operator"] = "match";
|
1162 |
+
break;
|
1163 |
+
case "url_match_exact":
|
1164 |
+
$condition["type"] = "path_query";
|
1165 |
+
$condition["operator"] = "match";
|
1166 |
+
break;
|
1167 |
+
case "url_contains":
|
1168 |
+
$condition["type"] = "url";
|
1169 |
+
$condition["operator"] = "contains";
|
1170 |
+
break;
|
1171 |
+
case "url_starts":
|
1172 |
+
$condition["type"] = "path";
|
1173 |
+
$condition["operator"] = "begins_with";
|
1174 |
+
$condition["value"] = (substr($condition['value'], 0, 1) !== '/' ? '/' : '') . $condition["value"];
|
1175 |
+
break;
|
1176 |
+
case "url_ends":
|
1177 |
+
$condition["type"] = "path";
|
1178 |
+
$condition["operator"] = "ends_with";
|
1179 |
+
$condition["value"] = $condition["value"] . (substr($condition["value"], -1) !== '/' ? '/' : '');
|
1180 |
+
break;
|
1181 |
+
case "url_regex":
|
1182 |
+
$condition["type"] = "url";
|
1183 |
+
$condition["operator"] = "match_regex";
|
1184 |
+
break;
|
1185 |
+
case "page":
|
1186 |
+
case "blog":
|
1187 |
+
case "category":
|
1188 |
+
case "user_roles":
|
1189 |
+
// Add array operator to array types
|
1190 |
+
$condition["operator"] = "is_any";
|
1191 |
+
break;
|
1192 |
+
}
|
1193 |
|
1194 |
+
$conditions[] = $condition;
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
// Add the type to condition group and conditions
|
1199 |
+
$rule["groups"][0]["rules"] = $conditions;
|
1200 |
+
$rule["groups"][0]["type"] = $rule["type"];
|
1201 |
+
|
1202 |
+
// Replace rule type with default "AND" and remove rules
|
1203 |
+
$rule["type"] = "and";
|
1204 |
+
unset($rule["rules"]);
|
1205 |
+
|
1206 |
+
$rules[] = $rule;
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
return $rules;
|
1210 |
+
}
|
1211 |
}
|
assets/dashboard.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
-
* (C) 2017-2022 Buttonizer v2.
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
@@ -23,14 +23,14 @@
|
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
-
* (C) 2017-2022 Buttonizer v2.
|
27 |
*
|
28 |
*/
|
29 |
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);
|
30 |
-
.device-preview{flex-grow:1;position:relative}.device-preview .button-group{box-shadow:0 3px 10px rgba(0,0,0,.2);background-color:#fff;position:absolute;left:
|
31 |
.MuiDialog-root #alert-dialog-title i{margin-right:15px;vertical-align:middle}.MuiDialog-root.warning .MuiBackdrop-root{background-color:rgba(93,0,0,.6)}.MuiDialog-root.warning #alert-dialog-title{color:#710909}
|
32 |
._3s81HemeKZtqu65wI1fy6E{font-size:19px !important;width:30px !important;height:24px !important}._2PiruT2xp0ahiZEbiVpgcf{position:relative;margin-top:20px}._2PiruT2xp0ahiZEbiVpgcf button{position:absolute;right:10px;bottom:10px;z-index:10}._2PiruT2xp0ahiZEbiVpgcf textarea{display:block;width:100%;min-width:100%;max-width:100%;overflow-x:scroll;height:180px;border-radius:4px;margin:0 1px;background:rgba(0,0,0,.07);border:0;padding:15px;box-sizing:border-box;resize:none;font-size:12px;margin-bottom:15px}._2fpqeP5Cl7bfJ6a5Nh7IP_{background:#ffd281;border-left:4px solid #f1ad00;padding:20px;margin-bottom:15px}._2fpqeP5Cl7bfJ6a5Nh7IP_ p{font-size:14px !important}._3FErKLfln3upSA8QUvjViU{display:block !important}
|
33 |
-
.hint{background-color:#585858;padding:15px 20px;color:#fff;border-radius:10px;cursor:pointer;max-width:250px;z-index:100}.hint p{margin:0}.hint .close-button{font-size:
|
34 |
.revert-button{margin:0 5px !important}.revert-button .MuiButton-label{font-size:15px}.revert-button .spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
35 |
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
36 |
.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}
|
@@ -39,11 +39,11 @@
|
|
39 |
.button-container{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;padding:10px;border:1px solid #e2e2e2;background-color:#fff}.button-container .button-name{max-width:100%}.button-container .button-name .button-name-span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:100%}.button-container .button-name.drag-icon{min-width:10px}.button-container .button-header{display:flex}.button-container .button-header .button-actions{margin-left:auto;flex-shrink:0}.button-container .button-settings{display:flex}.button-container .button-settings .button-title{display:inline-flex;height:30px;align-items:center;margin-right:10px;font-size:14px}.button-container .button-settings button{height:30px}.button-container .button-settings .button-visibility{flex-grow:1}.button-container .button-settings .button-visibility button{width:40px;min-width:40px;margin:0 2px}.button-container .button-settings .button-actions button{min-width:35px}.button-container .button-settings .clear{clear:both}.button-container-new-button{margin:7px 0px !important}.button-container-new-button-line{height:15px;display:flex;transition:height 150ms ease-in-out}.button-container-new-button-line>button{opacity:0;height:100%}.button-container-new-button-line>button>span:not(:last-child) hr{width:100%;border-top:1px solid #f08419;border-left:0px;margin-bottom:.5em;opacity:0;transition:all 250ms ease-in-out}.button-container-new-button-line>button>span:not(:last-child)>span{opacity:0;visibility:hidden;margin:0px;padding:0;display:flex;justify-content:center;width:0px;transition:all 150ms ease-in-out}.button-container-new-button-line>button>span:not(:last-child)>span span.fas{font-size:1.4em}.button-container-new-button-line:hover{transition:height 150ms ease-in-out 500ms;height:30px}.button-container-new-button-line:hover>button{opacity:1}.button-container-new-button-line:hover>button>span:not(:last-child) hr{opacity:1}.button-container-new-button-line:hover>button>span:not(:last-child)>span{padding:0px 10px;visibility:visible;opacity:1;margin:0 10px;transition:all 150ms ease-in-out 500ms,opacity 150ms ease-in-out 750ms}
|
40 |
#group-button-extra-buttons div[class^=MuiListItemIcon-root]{min-width:45px}#group-button-extra-buttons div[class^=MuiListItemIcon-root] .fas,#group-button-extra-buttons div[class^=MuiListItemIcon-root] .far{overflow:unset;font-size:1rem;margin-left:5px;text-align:center}
|
41 |
.button-group-container{padding:10px;margin-bottom:15px;border:2px #fff solid;position:relative}.button-group-container.currentDrop{border:2px #f9bf87 solid}.button-group-container .group-info{display:flex}.button-group-container .group-info .group-arrow{display:inline-block;min-width:17px;text-align:left;font-size:12px}.button-group-container .group-info .group-arrow i{-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.button-group-container .group-info .group-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.button-group-container .group-info .group-action-spacer{flex-grow:1}.button-group-container .group-info .group-actions{flex-grow:0;flex-shrink:0;margin-left:20px}.button-group-container .buttons{display:none}.button-group-container.opened .group-info .group-arrow i{transform:rotate(90deg)}.button-group-container.opened .buttons{display:block;border-radius:10px;padding:10px;border:2px #fff solid;transition:border .5s}.button-group-container.opened .buttons.currentDrop{border:2px #f9bf87 solid}.button-group-container.opened .buttons.currentDrop .button-container{opacity:.5}.button-group-container.opened .buttons.currentDrop .button-container.currentDrag{opacity:1}.button-group-container.new-group::before,.button-group-container.new-group::after{content:"";position:absolute;inset:0px;z-index:-1;display:block;background:#f08419;border-radius:10px}.button-group-container.new-group::before{animation:buttonizer-pulse-new-group 1s 0s ease-out}.button-group-container.new-group::after{animation:buttonizer-pulse-new-group 1s .185s ease-out}@keyframes buttonizer-pulse-new-group{0%{opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";margin:0px}5%{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}100%{margin:-20px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}}
|
42 |
-
.templates-dialog ::-webkit-scrollbar{width:10px}.templates-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.templates-dialog ::-webkit-scrollbar-thumb{background:#888}.templates-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.templates-dialog .MuiDialog-paperFullWidth{padding:30px}.templates-dialog .MuiButton-outlined{background-color:#fff;color:#2a7688;border:1px solid #73a8b4}.templates-dialog .header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;position:relative}.templates-dialog .header .titles h2{color:#2a7688;text-transform:uppercase;font-size:32px}.templates-dialog .header .titles .title{padding:0}.templates-dialog .header .titles .subtitle{margin:0;color:#2a7688;font-weight:normal;font-size:18px}.templates-dialog .header .close-button{cursor:pointer;font-size:24px;color:#2a7688;position:absolute;right:0;top:0}.templates-dialog .container-filter-buttons{padding:8px 55px 0px 24px}.templates-dialog .container-filter-buttons .midsection{display:flex;align-items:center;margin:20px 0 40px;padding:0;border:none;overflow:visible}.templates-dialog .container-filter-buttons .midsection .button-group{min-width:fit-content}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers{margin:10px 20px 20px 0;display:flex}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers .current{background-color:#fce8d4;color:#f08419;border:1px solid #f08419}.templates-dialog .select-all{opacity:0;visibility:hidden}.templates-dialog .select-all.visible{opacity:1;visibility:visible}.search-results{position:absolute;margin-top:-30px}.loading{text-align:center;height:500px;justify-content:center;display:flex}.loading p{font-family:Arial,"Helvetica Neue"}.template{display:grid;grid-template-columns:repeat(auto-fit, 202px);grid-gap:1.5rem;grid-template-rows:repeat(6, 177px);height:500px}.template .type{
|
43 |
.buttonizer-premium{background:#2d7688;background:-moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:-webkit-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:linear-gradient(135deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr="#2d7688", endColorstr="#e8832c",GradientType=1 );color:#fff;font-weight:500;font-size:13px;line-height:17px;padding:4px 20px;display:inline-block;vertical-align:middle;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;margin-left:10px;cursor:pointer}.buttonizer-premium.premium-right{position:absolute;right:30px;top:19px;z-index:9}.buttonizer-premium::after{content:"PRO"}.MuiFormControl-root:not(.MuiTextField-root) .buttonizer-premium{margin-right:15px}
|
44 |
.first-button{background-color:#fff;width:full-width;height:75px;display:flex;align-items:center;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16)}
|
45 |
.item-not-found{text-align:center;padding:40px 0}.item-not-found i{font-size:50px;display:block;margin:30px auto}.item-not-found h4{font-size:15px;margin:28px 0}
|
46 |
-
.tab-bordered{position:relative;z-index:2}.use-main-button-style{padding:5px 15px;display:flex;position:relative}.use-main-button-style:before{height:2px;background:#dfdfdf;content:" ";position:absolute;top:-2px;left:0;right:0;z-index:1}.use-main-button-style .button-label{flex-grow:1;margin-left:-10px}.use-main-button-style>div{width:50px;flex-grow:0}.back-to-group{position:fixed;left:0;width:20px;z-index:1}.back-to-group::before{content:"";position:fixed;left:0;top:0;width:10px;height:100vh;background:#2f7789}.back-to-group a{position:absolute;transform-origin:top left;left:-1px;color:#f08419;text-transform:uppercase;text-decoration:none;padding:1px 8px 1px 8px;display:inline-block;transform:rotate(90deg) translateY(-100%);background-color:#fff;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16) !important;border-radius:4px 4px 0 0;height:20px;white-space:nowrap;font-weight:500;transition:padding .125s ease,box-shadow .25s ease}.back-to-group a i{margin-right:8px}.back-to-group a:hover{padding:1px 8px 5px 8px;box-shadow:0 1px 1px 0 rgba(60,64,67,.16),0 1px 3px 1px rgba(60,64,67,.32) !important}
|
47 |
.breadcrumb .mdc-select,.breadcrumb button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;line-height:28px;display:flex;align-items:center;flex-flow:row-reverse;border-radius:4px;padding:0 8px;font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-weight:500;letter-spacing:.08929em;text-decoration:none;text-transform:uppercase}.breadcrumb .mdc-select .fas.fa-chevron-down,.breadcrumb button .fas.fa-chevron-down{color:#fff !important;line-height:3.4;font-size:9px}.breadcrumb .mdc-select input,.breadcrumb .mdc-select .mdc-select__dropdown-icon,.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button input,.breadcrumb button .mdc-select__dropdown-icon,.breadcrumb button .mdc-select__selected-text{position:relative}.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button .mdc-select__selected-text{min-width:fit-content;padding:0 16px 0 0px !important;color:#fff;font-size:12px !important;height:fit-content;border-bottom:none}.breadcrumb .mdc-select .mdc-notched-outline,.breadcrumb button .mdc-notched-outline{display:none}.breadcrumb .mdc-select.mdc-select--outlined .mdc-select__selected-text,.breadcrumb button.mdc-select--outlined .mdc-select__selected-text{padding:0px}.breadcrumb .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple,.breadcrumb button:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple{background-color:#eb8119}.button-select-menu .MuiPaper-root{padding-top:6px;min-width:140px}.button-select-menu .MuiPaper-root .breadcrumb-select-options{margin-bottom:6px}
|
48 |
.collapsible-group{margin:10px 20px}.collapsible-group>button{text-align:left;justify-content:normal;padding:0 15px;height:49px}.collapsible-group>button i{margin-left:10px;font-size:12px;-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.collapsible-group .collapsible-body{padding:18px}.collapsible-group.collapsible-opened>button i{transform:rotate(-180deg)}
|
49 |
.settings-container{display:flex;position:relative;margin:15px 0}.settings-container.disabled{opacity:.5;user-select:none}.settings-title{padding-right:15px;padding:4.9px 15px 4.9px 0;margin-right:auto;flex-shrink:0;font-size:14px}.settings-title span,.settings-title i{padding-left:5px;font-size:14px;line-height:14px}.settings-content{display:flex;flex-shrink:1;align-self:center}.container-full-width .settings-content{width:66.666%}
|
@@ -61,7 +61,7 @@
|
|
61 |
.position-buttons-container{margin-bottom:unset}.position-buttons-container .position-buttons{max-width:unset !important}.position-buttons-container .position-buttons button svg{width:20px;fill:currentColor}.position-buttons-container .position-buttons.position-horizontal button:nth-child(1) svg,.position-buttons-container .position-buttons.position-horizontal button:nth-child(2) svg{transform:rotate(-90deg)}.position-buttons-container .position-buttons.position-horizontal button:nth-child(3) svg{transform:rotate(90deg)}.position-buttons-container .position-buttons.position-vertical button:nth-child(3) svg{transform:rotate(180deg)}.position-buttons-container .position-advanced{margin-left:5px}.position-buttons-container .position-advanced .MuiButton-endIcon{margin-left:4px}.position-buttons-container .position-advanced .MuiButton-endIcon.MuiButton-iconSizeMedium .MuiIcon-root{font-size:15px}.position-advanced-container .position-advanced-buttons{flex-grow:1}.position-advanced-container .position-advanced-buttons button{flex-grow:1;height:32px}.position-advanced-container .position-advanced-textfield{font-size:15px;height:32px;padding:0 10px}.position-textfield{height:28px;-moz-appearance:textfield}.position-textfield ::-webkit-outer-spin-button,.position-textfield ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
|
62 |
.image-selector{display:inline-flex;width:100%;justify-content:flex-end;text-align:center}.image-selector .image{width:100%;height:101px;display:inline-flex;text-decoration:none;line-height:26px;cursor:pointer;border-radius:3px;flex-direction:column;justify-content:flex-end;background-size:cover;background-position:center;background-color:#ededed}.image-selector .image i{font-size:40px;line-height:54px;color:#4795a9bd}.image-selector .image .image-text{background-color:#2f788a;color:#fff;border-radius:0 0 3px 3px}.image-selector .image .selected{opacity:0;transition:250ms}.image-selector .image:hover .selected{opacity:1}
|
63 |
.advanced-scroll-timeout .advanced-timeout{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll .MuiTextField-root{min-width:calc(100% / 3);margin-top:auto;margin-bottom:auto}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent{display:flex;width:calc(100% / 3);flex-direction:column}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent button{padding:0;height:45%;min-width:30px;font-size:10px;margin:auto}.advanced-scroll-timeout .advanced-scroll-hide{display:flex;justify-content:flex-end}.advanced-scroll-timeout .advanced-scroll-hide .settings-container{height:35px;width:calc(900% / 10)}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .settings-title{font-size:11px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .MuiTabs-root.icon-or-image{min-height:30px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container.disabled .settings-content .MuiTabs-indicator{background-color:#747474}.advanced-scroll-timeout .advanced-scroll-container{margin:15px 0 -15px}.advanced-scroll-timeout .advanced-scroll-description{display:flex;justify-content:center}.advanced-scroll-timeout .advanced-scroll-description p{margin:0}
|
64 |
-
.buttonizer-bar{position:fixed;left:0;top:0;bottom:0;width:430px;background:#f0f0f0;border-right:1px solid #d2d2d2;transition:all 250ms ease-in-out;z-index:1}.buttonizer-bar:not(.ready){transform:translateX(-440px)}@media screen and (max-width: 769px){.buttonizer-bar{width:100%}}.buttonizer-bar.is-loading .router{opacity:0}.buttonizer-bar.is-loading .buttonizer-logo{display:none}.buttonizer-bar .router-window{position:absolute;top:0;bottom:56px;left:0;width:100%}.buttonizer-bar .router-window .simplebar-content-wrapper{height:100% !important}.buttonizer-bar .router-window .simplebar-placeholder{min-height:100vh}.buttonizer-bar .router-window .router{padding:0 30px 50px}.buttonizer-bar .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}.buttonizer-bar .bar-header{margin:10px 0}.buttonizer-bar .bar-header .breadcrumb{margin:15px 0 15px;display:flex}.buttonizer-bar .bar-header .breadcrumb button{height:28px;line-height:28px;padding:0 10px}.buttonizer-bar .bar-header .breadcrumb button .breadcrumb-text{white-space:nowrap;letter-spacing:.07em;overflow:hidden;text-overflow:ellipsis;height:100%;display:inline-block;align-items:center}.buttonizer-bar .bar-header .breadcrumb button i{margin-left:10px;color:rgba(0,0,0,.3);vertical-align:middle}.buttonizer-bar .bar-header .breadcrumb button.home-button{flex-shrink:0}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary{color:#95bac3}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary:hover{color:#2f7789}.buttonizer-bar .bar-header .MuiTabs-flexContainer a{min-width:unset}.buttonizer-bar .bar-header .MuiTabs-flexContainer a i{font-size:20px;margin-bottom:8px}.buttonizer-bar .bar-header .MuiTabs-flexContainer a .MuiTab-wrapper{font-weight:600;font-size:12px;letter-spacing:1.25006px}.buttonizer-bar .bar-footer{position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);background:#fff}.buttonizer-bar .bar-footer .bar-footer-container{display:flex;align-content:space-between;padding:10px}.buttonizer-bar .bar-footer .bar-footer-container .settings-button{font-size:
|
65 |
[data-simplebar] {
|
66 |
position: relative;
|
67 |
flex-direction: column;
|
@@ -279,7 +279,7 @@
|
|
279 |
.buttonizer-menu-item{display:block !important;width:100% !important;text-align:left;text-decoration:none;padding:10px 15px !important;border-bottom:1px solid #dbdbdb !important;transition:background .15s ease-in-out;height:auto !important;border-radius:0 !important}.buttonizer-menu-item:last-child{border:0 !important}.buttonizer-menu-item:hover{background:#eee}.buttonizer-menu-item .title{display:block;color:#3d3d3d;font-size:13px;font-weight:600;margin-bottom:5px}.buttonizer-menu-item .description{display:block;color:#545454;font-weight:400;font-size:12px;line-height:20px;letter-spacing:.5px;text-transform:none}
|
280 |
#buttonizer-menu .MuiPaper-root{max-width:430px;width:100%;background:#eee}#buttonizer-menu .menu-container{padding:20px;flex-shrink:0;display:flex;flex-direction:column}#buttonizer-menu .menu-container .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}#buttonizer-menu .menu-container .menu-group{padding:0 20px}#buttonizer-menu .menu-container .menu-group h2{font-size:20px}#buttonizer-menu .menu-container .close-button{display:block;margin:20px 0 50px;padding:20px 0;text-align:center;text-decoration:none;font-size:16px}#buttonizer-menu .menu-container .collapsible-group{margin:8px 0 !important}#buttonizer-menu .menu-container .menu-drawer-bottom{padding:5%;display:flex;flex-direction:column;flex-grow:1;justify-content:flex-end}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons{text-align:center;font-size:14px;line-height:24px;margin-top:50px}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container{margin-top:10px}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a{box-shadow:unset;outline:none;width:30px;height:30px;text-decoration:none}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.instagram span{color:#e4405f}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.youtube span{color:#c00}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.community span{-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(142deg, #f08419 0%, #f08419 15%, #2f788a 13%);background-size:400% 400%}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.facebook span{color:#3b5999}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.twitter span{color:#55acee}
|
281 |
.drawer-splitter-modal .MuiPaper-root{max-width:1100px;width:90%;height:100%}.drawer-splitter-content{display:flex;height:100%}.drawer-splitter-content .menu-items{border:1px solid rgba(0,0,0,.1);width:330px;flex-shrink:0;flex-grow:0;display:flex;flex-direction:column;overflow:hidden}.drawer-splitter-content .menu-items .menu-header{padding:30px 15px 17px 15px;border-bottom:1px solid rgba(0,0,0,.1)}.drawer-splitter-content .menu-items .menu-header .menu-back span{font-size:20px}.drawer-splitter-content .menu-items .menu-header i:not(.saved-icon){font-size:40px;color:#2f7789}.drawer-splitter-content .menu-items .menu-header h3{color:#2f7789;text-transform:uppercase;font-weight:600;font-size:22px;margin-top:20px;margin-bottom:15px}.drawer-splitter-content .menu-items .menu-header span{font-size:14px}.drawer-splitter-content .menu-items .menu-content{padding:30px 15px 17px 15px;flex-grow:0;overflow:auto}.drawer-splitter-content .menu-items .menu-content .drawer-button button{justify-content:left}.drawer-splitter-content .menu-items .menu-content .drawer-button button .MuiButton-text{padding:8px}.drawer-splitter-content .menu-items .menu-content .drawer-button button i{margin-right:10px}.drawer-splitter-content .menu-items .menu-content .menu-item{border-radius:4px;padding:5px 10px 5px 10px;transition:background-color .2s ease-in-out,color .2s ease-in-out}.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name{overflow:hidden;flex-grow:1;justify-content:left}.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name p,.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name .material-icons{font-size:.9rem}.drawer-splitter-content .menu-items .menu-content .menu-item.settings{padding:0}.drawer-splitter-content .menu-items .menu-content .menu-item.settings .drawer-button{width:100%}.drawer-splitter-content .menu-items .menu-content .menu-item.settings .drawer-button button{padding:8px 16px}.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected,.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected:hover{background-color:#f0841930}.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected .secondary-actions button,.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected:hover .secondary-actions button{color:#f08419}.drawer-splitter-content .menu-items .menu-content .menu-item .secondary-actions{font-size:1rem}.drawer-splitter-content .splitted{min-width:300px;flex-grow:1;overflow:hidden}.drawer-splitter-content .splitted .splitted-content{flex-grow:1;overflow:hidden;display:flex;flex-direction:column;height:100%}.drawer-splitter-content .splitted .splitted-content .drawer-content-header{padding-bottom:15px;border-bottom:1px solid rgba(0,0,0,.1);padding:40px 30px 0 40px}.drawer-splitter-content .splitted .splitted-content .drawer-content-header .title{font-size:35px;line-height:45px;font-weight:500;margin-bottom:20px;display:block;color:#2f7789;float:left}.drawer-splitter-content .splitted .splitted-content .drawer-content-content{padding:15px 35px 50px 40px;flex-grow:0;overflow:auto}.drawer-splitter-content .splitted .splitted-content .drawer-content-content .description{font-size:16px;line-height:25px;color:rgba(0,0,0,.8)}.drawer-splitter-content .splitted .splitted-content .MuiTypography-body1{font-weight:600;color:#2f7789}
|
282 |
-
.drawer-splitter-content-title{
|
283 |
.settings-drawer-pages .settings-page-title .title{font-size:40px;font-weight:700}.settings-drawer-pages .settings-page-title .description{font-size:16px;padding:15px 0}.settings-drawer-pages .with-secondary-action{padding-right:80px}.settings-drawer-pages .with-optin-action{padding-right:150px}.settings-drawer-pages .with-permissions{display:block}.settings-drawer-pages .with-permissions>div{flex:none}.settings-drawer-pages .settings-container.select .settings-title{flex-shrink:1;width:calc(122%/ 3)}.settings-drawer-pages .settings-container.select .settings-content{width:52.666%;padding:0 20px;margin:auto}.settings-drawer-pages h2.title{text-transform:uppercase}.settings-drawer-pages .explaination ul{list-style:disc;padding:0 40px}.settings-drawer-pages .explaination button:not(:disabled){background-color:red}.settings-drawer-pages .explaination button .fas.fa-undo{font-size:14px}.settings-drawer-pages .explaination button .fas.fa-undo.spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
284 |
.buttonizer-drawer{padding:2em}.close-button{float:right;margin:-20px !important}
|
285 |
.buttonizer-tour-options .MuiDialog-paperWidthSm{padding-bottom:20px}.buttonizer-tour-options .header{display:flex}.buttonizer-tour-options .header .MuiDialogTitle-root{padding:16px 24px 0}.buttonizer-tour-options .header h2{font-size:28px;color:#2f7789;padding:20px 0 0 10px}.buttonizer-tour-options .header h2 .fa-globe-europe{margin-right:10px}.buttonizer-tour-options .header .skip-button{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;width:38px;height:38px}.buttonizer-tour-options .header .skip-button .fa-times{font-size:18px}.buttonizer-tour-options .list-item{display:flex;color:#000;margin-right:25px}
|
@@ -706,7 +706,7 @@ tr.introjs-showElement > th {
|
|
706 |
|
707 |
.tourDialog,.videoDialog,.centerTopDialog,.centerBottomDialog,.centerVideoDialog{padding:15px;min-width:400px;background-color:#d7e5e9;background-repeat:no-repeat;background-image:url(./images/buttonizer-logo.png);background-position:left 30px bottom 20px;background-size:50px}.tourDialog .introjs-tooltip-header,.videoDialog .introjs-tooltip-header,.centerTopDialog .introjs-tooltip-header,.centerBottomDialog .introjs-tooltip-header,.centerVideoDialog .introjs-tooltip-header{position:relative}.tourDialog .introjs-tooltip-header .introjs-tooltip-title,.videoDialog .introjs-tooltip-header .introjs-tooltip-title,.centerTopDialog .introjs-tooltip-header .introjs-tooltip-title,.centerBottomDialog .introjs-tooltip-header .introjs-tooltip-title,.centerVideoDialog .introjs-tooltip-header .introjs-tooltip-title{font-size:22px;color:#2f788a}.tourDialog .introjs-tooltip-header .introjs-skipbutton,.videoDialog .introjs-tooltip-header .introjs-skipbutton,.centerTopDialog .introjs-tooltip-header .introjs-skipbutton,.centerBottomDialog .introjs-tooltip-header .introjs-skipbutton,.centerVideoDialog .introjs-tooltip-header .introjs-skipbutton{color:#000;padding:5px;position:absolute;right:0;top:0}.tourDialog .introjs-tooltiptext,.videoDialog .introjs-tooltiptext,.centerTopDialog .introjs-tooltiptext,.centerBottomDialog .introjs-tooltiptext,.centerVideoDialog .introjs-tooltiptext{font-size:14px;color:#000}.tourDialog .introjs-tooltiptext a,.videoDialog .introjs-tooltiptext a,.centerTopDialog .introjs-tooltiptext a,.centerBottomDialog .introjs-tooltiptext a,.centerVideoDialog .introjs-tooltiptext a{color:#000;text-decoration:none}.tourDialog .introjs-tooltiptext #myVideo,.videoDialog .introjs-tooltiptext #myVideo,.centerTopDialog .introjs-tooltiptext #myVideo,.centerBottomDialog .introjs-tooltiptext #myVideo,.centerVideoDialog .introjs-tooltiptext #myVideo{width:100%;margin-top:-25px}.tourDialog .introjs-tooltiptext h2,.videoDialog .introjs-tooltiptext h2,.centerTopDialog .introjs-tooltiptext h2,.centerBottomDialog .introjs-tooltiptext h2,.centerVideoDialog .introjs-tooltiptext h2{color:#2f788a;margin:50px 0 10px}.tourDialog .introjs-progress,.videoDialog .introjs-progress,.centerTopDialog .introjs-progress,.centerBottomDialog .introjs-progress,.centerVideoDialog .introjs-progress{margin:20px;height:5px;background-color:#fff}.tourDialog .introjs-progress .introjs-progressbar,.videoDialog .introjs-progress .introjs-progressbar,.centerTopDialog .introjs-progress .introjs-progressbar,.centerBottomDialog .introjs-progress .introjs-progressbar,.centerVideoDialog .introjs-progress .introjs-progressbar{background-color:gray}.tourDialog .introjs-tooltipbuttons,.videoDialog .introjs-tooltipbuttons,.centerTopDialog .introjs-tooltipbuttons,.centerBottomDialog .introjs-tooltipbuttons,.centerVideoDialog .introjs-tooltipbuttons{border:none;margin-top:20px;float:right;display:flex;align-items:center}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{border:none;text-shadow:none;text-transform:uppercase;font-weight:bolder;font-size:12px}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton{color:#2f788a;background:none}.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{color:#fff;background-color:#ef790c;box-shadow:rgba(0,0,0,.24) 0px 3px 8px;margin-left:5px;padding:10px 15px}.tourDialog .introjs-arrow.left,.videoDialog .introjs-arrow.left,.centerTopDialog .introjs-arrow.left,.centerBottomDialog .introjs-arrow.left,.centerVideoDialog .introjs-arrow.left{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.left-bottom,.videoDialog .introjs-arrow.left-bottom,.centerTopDialog .introjs-arrow.left-bottom,.centerBottomDialog .introjs-arrow.left-bottom,.centerVideoDialog .introjs-arrow.left-bottom{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.right,.videoDialog .introjs-arrow.right,.centerTopDialog .introjs-arrow.right,.centerBottomDialog .introjs-arrow.right,.centerVideoDialog .introjs-arrow.right{border-left-color:#d7e5e9}.tourDialog .introjs-arrow.top,.videoDialog .introjs-arrow.top,.centerTopDialog .introjs-arrow.top,.centerBottomDialog .introjs-arrow.top,.centerVideoDialog .introjs-arrow.top{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.top-middle,.videoDialog .introjs-arrow.top-middle,.centerTopDialog .introjs-arrow.top-middle,.centerBottomDialog .introjs-arrow.top-middle,.centerVideoDialog .introjs-arrow.top-middle{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.bottom,.videoDialog .introjs-arrow.bottom,.centerTopDialog .introjs-arrow.bottom,.centerBottomDialog .introjs-arrow.bottom,.centerVideoDialog .introjs-arrow.bottom{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-middle,.videoDialog .introjs-arrow.bottom-middle,.centerTopDialog .introjs-arrow.bottom-middle,.centerBottomDialog .introjs-arrow.bottom-middle,.centerVideoDialog .introjs-arrow.bottom-middle{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-right,.videoDialog .introjs-arrow.bottom-right,.centerTopDialog .introjs-arrow.bottom-right,.centerBottomDialog .introjs-arrow.bottom-right,.centerVideoDialog .introjs-arrow.bottom-right{border-top-color:#d7e5e9}.videoDialog,.centerVideoDialog{background-image:url(./images/white-background.jpg);background-position:inherit;background-size:620px}.centerTopDialog,.centerVideoDialog{margin-top:20px}.centerBottomDialog{margin:-20px;margin-left:0}
|
708 |
.changelog-dialog ::-webkit-scrollbar{width:10px}.changelog-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.changelog-dialog ::-webkit-scrollbar-thumb{background:#888}.changelog-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.changelog-dialog img{margin-top:-8px}.changelog-dialog .close-down{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;font-size:20px;width:38px;height:38px}.changelog-dialog .MuiDialogTitle-root{padding-bottom:0}.changelog-dialog h2{color:#2f7789;font-size:28px}.changelog-dialog .content{padding:0 24px;margin-bottom:20px}.changelog-dialog .content h3{font-size:20px;color:#535353;font-weight:500;margin:25px 0 10px}.changelog-dialog .content .list ul{margin:0;padding-left:20px;color:#535353}.changelog-dialog .content .list .name{font-weight:500}.changelog-dialog .content .list .info{margin-bottom:10px}.changelog-dialog .progress-bar{display:flex;align-items:center;margin:0 200px}.changelog-dialog .progress-bar .dot{height:10px;width:10px;background-color:#f0f0f0;border-radius:50%;margin:0 3px}.changelog-dialog .footer{flex-direction:column}.changelog-dialog .footer .primary-button{margin:10px auto}.changelog-dialog .footer .pagination{display:flex;margin:20px 0}.changelog-dialog .footer .pagination .previous,.changelog-dialog .footer .pagination .next{background:#f0f0f0;color:#f08419;font-size:14px;cursor:pointer;width:38px;height:38px}.changelog-dialog .footer .external-link{color:#2f7789;font-size:14px;margin-bottom:10px;border-radius:unset}.changelog-dialog .footer .external-link .fa-external-link-alt{margin-left:10px;font-size:14px}.changelog-dialog .footer .version{font-size:12px;margin-bottom:20px}
|
709 |
-
.buzzy-urlbar{background:#f0f0f0;border-bottom:1px solid #d2d2d2;position:absolute;top:-65px;left:0;right:0;z-index:999;max-width:1300px;height:60px;transition:all 250ms ease-in-out}.buzzy-urlbar.ready{top:0}.whitten{background:#fff}@media screen and (min-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{left:431px}}@media screen and (max-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{display:none}}
|
710 |
.GoB-rFmXaQiCtLHiw5bE0{display:inline-block;margin-right:10px;border:1px solid #444;padding:2px 5px;border-radius:4px}.QZVwpvNWXvaP4Bg5_NwrC{margin:0 10px}
|
711 |
.btnizr-wp-icon {
|
712 |
background: url(./images/wp-icon.png);
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
+
* (C) 2017-2022 Buttonizer v2.8.0
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
+
* (C) 2017-2022 Buttonizer v2.8.0
|
27 |
*
|
28 |
*/
|
29 |
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);
|
30 |
+
.device-preview{flex-grow:1;position:relative;color:#2f7789;display:flex;align-items:center;margin-left:4px}.device-preview .button-group{box-shadow:0 3px 10px rgba(0,0,0,.2);background-color:#fff;position:absolute;left:0px;bottom:0px;width:36px;border-radius:8px;cursor:pointer}.device-preview .button{border:none;opacity:.5;font-size:16px;margin:5px 0}.device-preview .button:first-of-type{margin-top:0}.device-preview .button:last-of-type{margin-bottom:0}.device-preview .button:hover{border:none;border-radius:5px}.device-preview .button:focus{border-radius:5px}.device-preview .current-device{font-size:18px}.device-preview .current-device:hover{background-color:inherit !important}.device-preview .current-device .MuiSvgIcon-root{cursor:pointer}
|
31 |
.MuiDialog-root #alert-dialog-title i{margin-right:15px;vertical-align:middle}.MuiDialog-root.warning .MuiBackdrop-root{background-color:rgba(93,0,0,.6)}.MuiDialog-root.warning #alert-dialog-title{color:#710909}
|
32 |
._3s81HemeKZtqu65wI1fy6E{font-size:19px !important;width:30px !important;height:24px !important}._2PiruT2xp0ahiZEbiVpgcf{position:relative;margin-top:20px}._2PiruT2xp0ahiZEbiVpgcf button{position:absolute;right:10px;bottom:10px;z-index:10}._2PiruT2xp0ahiZEbiVpgcf textarea{display:block;width:100%;min-width:100%;max-width:100%;overflow-x:scroll;height:180px;border-radius:4px;margin:0 1px;background:rgba(0,0,0,.07);border:0;padding:15px;box-sizing:border-box;resize:none;font-size:12px;margin-bottom:15px}._2fpqeP5Cl7bfJ6a5Nh7IP_{background:#ffd281;border-left:4px solid #f1ad00;padding:20px;margin-bottom:15px}._2fpqeP5Cl7bfJ6a5Nh7IP_ p{font-size:14px !important}._3FErKLfln3upSA8QUvjViU{display:block !important}
|
33 |
+
.hint{background-color:#585858;padding:15px 20px;color:#fff;border-radius:10px;cursor:pointer;max-width:250px;z-index:100}.hint p{margin:0}.hint .close-button{font-size:12px !important;position:absolute;right:10px;top:10px;color:#fff;background:#2f7789;padding:5px !important;height:25px !important;min-width:25px !important}.hint .close-button:hover{background:#2f7789}.hint-pulse-0::before,.hint-pulse-0::after,.hint-pulse-1::before,.hint-pulse-1::after,.hint-pulse-2::before,.hint-pulse-2::after{position:absolute;border-radius:50%;border:solid 1px #ff793f;animation:pulse-orange 2s infinite;content:""}.hint-pulse-0::before{width:55px;height:55px}.hint-pulse-0::after{width:45px;height:45px}.hint-pulse-1::before{width:75px;height:75px;margin:0 auto;right:0;left:0}.hint-pulse-1::after{width:65px;height:65px;margin:5px auto;right:0;left:0}.hint-pulse-2::before{width:70px;height:70px}.hint-pulse-2::after{width:60px;height:60px}@keyframes pulse-orange{0%{transform:scale(0.9);border:solid 2px 0 0 0 0 rgba(255,121,63,.7)}70%{transform:scale(1);border:solid 2px 0 0 0 10px rgba(255,121,63,0)}100%{transform:scale(0.9);border:solid 2px 0 0 0 0 rgba(255,121,63,0)}}
|
34 |
.revert-button{margin:0 5px !important}.revert-button .MuiButton-label{font-size:15px}.revert-button .spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
35 |
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
36 |
.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}
|
39 |
.button-container{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;padding:10px;border:1px solid #e2e2e2;background-color:#fff}.button-container .button-name{max-width:100%}.button-container .button-name .button-name-span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:100%}.button-container .button-name.drag-icon{min-width:10px}.button-container .button-header{display:flex}.button-container .button-header .button-actions{margin-left:auto;flex-shrink:0}.button-container .button-settings{display:flex}.button-container .button-settings .button-title{display:inline-flex;height:30px;align-items:center;margin-right:10px;font-size:14px}.button-container .button-settings button{height:30px}.button-container .button-settings .button-visibility{flex-grow:1}.button-container .button-settings .button-visibility button{width:40px;min-width:40px;margin:0 2px}.button-container .button-settings .button-actions button{min-width:35px}.button-container .button-settings .clear{clear:both}.button-container-new-button{margin:7px 0px !important}.button-container-new-button-line{height:15px;display:flex;transition:height 150ms ease-in-out}.button-container-new-button-line>button{opacity:0;height:100%}.button-container-new-button-line>button>span:not(:last-child) hr{width:100%;border-top:1px solid #f08419;border-left:0px;margin-bottom:.5em;opacity:0;transition:all 250ms ease-in-out}.button-container-new-button-line>button>span:not(:last-child)>span{opacity:0;visibility:hidden;margin:0px;padding:0;display:flex;justify-content:center;width:0px;transition:all 150ms ease-in-out}.button-container-new-button-line>button>span:not(:last-child)>span span.fas{font-size:1.4em}.button-container-new-button-line:hover{transition:height 150ms ease-in-out 500ms;height:30px}.button-container-new-button-line:hover>button{opacity:1}.button-container-new-button-line:hover>button>span:not(:last-child) hr{opacity:1}.button-container-new-button-line:hover>button>span:not(:last-child)>span{padding:0px 10px;visibility:visible;opacity:1;margin:0 10px;transition:all 150ms ease-in-out 500ms,opacity 150ms ease-in-out 750ms}
|
40 |
#group-button-extra-buttons div[class^=MuiListItemIcon-root]{min-width:45px}#group-button-extra-buttons div[class^=MuiListItemIcon-root] .fas,#group-button-extra-buttons div[class^=MuiListItemIcon-root] .far{overflow:unset;font-size:1rem;margin-left:5px;text-align:center}
|
41 |
.button-group-container{padding:10px;margin-bottom:15px;border:2px #fff solid;position:relative}.button-group-container.currentDrop{border:2px #f9bf87 solid}.button-group-container .group-info{display:flex}.button-group-container .group-info .group-arrow{display:inline-block;min-width:17px;text-align:left;font-size:12px}.button-group-container .group-info .group-arrow i{-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.button-group-container .group-info .group-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.button-group-container .group-info .group-action-spacer{flex-grow:1}.button-group-container .group-info .group-actions{flex-grow:0;flex-shrink:0;margin-left:20px}.button-group-container .buttons{display:none}.button-group-container.opened .group-info .group-arrow i{transform:rotate(90deg)}.button-group-container.opened .buttons{display:block;border-radius:10px;padding:10px;border:2px #fff solid;transition:border .5s}.button-group-container.opened .buttons.currentDrop{border:2px #f9bf87 solid}.button-group-container.opened .buttons.currentDrop .button-container{opacity:.5}.button-group-container.opened .buttons.currentDrop .button-container.currentDrag{opacity:1}.button-group-container.new-group::before,.button-group-container.new-group::after{content:"";position:absolute;inset:0px;z-index:-1;display:block;background:#f08419;border-radius:10px}.button-group-container.new-group::before{animation:buttonizer-pulse-new-group 1s 0s ease-out}.button-group-container.new-group::after{animation:buttonizer-pulse-new-group 1s .185s ease-out}@keyframes buttonizer-pulse-new-group{0%{opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";margin:0px}5%{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}100%{margin:-20px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}}
|
42 |
+
.templates-dialog ::-webkit-scrollbar{width:10px}.templates-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.templates-dialog ::-webkit-scrollbar-thumb{background:#888}.templates-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.templates-dialog .MuiDialog-paperFullWidth{padding:30px}.templates-dialog .MuiButton-outlined{background-color:#fff;color:#2a7688;border:1px solid #73a8b4}.templates-dialog .header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;position:relative}.templates-dialog .header .titles h2{color:#2a7688;text-transform:uppercase;font-size:32px}.templates-dialog .header .titles .title{padding:0}.templates-dialog .header .titles .subtitle{margin:0;color:#2a7688;font-weight:normal;font-size:18px}.templates-dialog .header .close-button{cursor:pointer;font-size:24px;color:#2a7688;position:absolute;right:0;top:0}.templates-dialog .container-filter-buttons{padding:8px 55px 0px 24px}.templates-dialog .container-filter-buttons .midsection{display:flex;align-items:center;margin:20px 0 40px;padding:0;border:none;overflow:visible}.templates-dialog .container-filter-buttons .midsection .button-group{min-width:fit-content}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers{margin:10px 20px 20px 0;display:flex}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers .current{background-color:#fce8d4;color:#f08419;border:1px solid #f08419}.templates-dialog .select-all{opacity:0;visibility:hidden}.templates-dialog .select-all.visible{opacity:1;visibility:visible}.search-results{position:absolute;margin-top:-30px}.loading{text-align:center;height:500px;justify-content:center;display:flex}.loading p{font-family:Arial,"Helvetica Neue"}.template{display:grid;grid-template-columns:repeat(auto-fit, 202px);grid-gap:1.5rem;grid-template-rows:repeat(6, 177px);height:500px}.template .type{box-shadow:1px 1px 6px #2f798a2b;height:175px;width:200px;color:#2a7688;position:relative;border-radius:5px;display:flex;cursor:pointer;grid-column:1;grid-row:1;margin:5px}.template .type img{max-width:100%;margin:auto;max-height:85%;user-select:none}.template .type .category{position:absolute;top:15px;right:10px;font-size:12px}.template .type .new{position:absolute;bottom:15px;right:10px;font-size:12px;background-color:#f08419;color:#fff}.template .type .buttonizer-premium{position:absolute;bottom:15px;right:10px}.template .type .default-option{width:100%;display:flex;align-items:center;flex-direction:column;justify-content:center;position:relative}.template .type .default-option span{position:absolute;bottom:35px;font-size:12px}.template .container{display:grid}.template .container .checkbox{margin:10px 0;transition:all .2s ease-in-out;opacity:1;grid-column:1;grid-row:1;height:24px;width:24px;margin:5px;z-index:1}.template .container .checkbox.hidden{opacity:0;visibility:hidden}.template .container .select{visibility:hidden;opacity:0;display:flex;align-items:center;position:absolute;bottom:0;grid-column-gap:5px;padding:5px 15px;box-shadow:1px 1px 6px #2f798a2b;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:3px;font-size:13px;transition:all .2s ease-in-out}.template .container:hover .select{visibility:visible;opacity:1}.template .container:hover .checkbox.hidden{opacity:1;visibility:visible}
|
43 |
.buttonizer-premium{background:#2d7688;background:-moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:-webkit-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:linear-gradient(135deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr="#2d7688", endColorstr="#e8832c",GradientType=1 );color:#fff;font-weight:500;font-size:13px;line-height:17px;padding:4px 20px;display:inline-block;vertical-align:middle;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;margin-left:10px;cursor:pointer}.buttonizer-premium.premium-right{position:absolute;right:30px;top:19px;z-index:9}.buttonizer-premium::after{content:"PRO"}.MuiFormControl-root:not(.MuiTextField-root) .buttonizer-premium{margin-right:15px}
|
44 |
.first-button{background-color:#fff;width:full-width;height:75px;display:flex;align-items:center;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16)}
|
45 |
.item-not-found{text-align:center;padding:40px 0}.item-not-found i{font-size:50px;display:block;margin:30px auto}.item-not-found h4{font-size:15px;margin:28px 0}
|
46 |
+
.tab-bordered{position:relative;z-index:2;overflow:visible !important}.tab-bordered .MuiTabs-fixed,.tab-bordered .MuiTab-root{overflow:visible !important}.use-main-button-style{padding:5px 15px;display:flex;position:relative}.use-main-button-style:before{height:2px;background:#dfdfdf;content:" ";position:absolute;top:-2px;left:0;right:0;z-index:1}.use-main-button-style .button-label{flex-grow:1;margin-left:-10px}.use-main-button-style>div{width:50px;flex-grow:0}.back-to-group{position:fixed;left:0;width:20px;z-index:1}.back-to-group::before{content:"";position:fixed;left:0;top:0;width:10px;height:100vh;background:#2f7789}.back-to-group a{position:absolute;transform-origin:top left;left:-1px;color:#f08419;text-transform:uppercase;text-decoration:none;padding:1px 8px 1px 8px;display:inline-block;transform:rotate(90deg) translateY(-100%);background-color:#fff;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16) !important;border-radius:4px 4px 0 0;height:20px;white-space:nowrap;font-weight:500;transition:padding .125s ease,box-shadow .25s ease}.back-to-group a i{margin-right:8px}.back-to-group a:hover{padding:1px 8px 5px 8px;box-shadow:0 1px 1px 0 rgba(60,64,67,.16),0 1px 3px 1px rgba(60,64,67,.32) !important}
|
47 |
.breadcrumb .mdc-select,.breadcrumb button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;line-height:28px;display:flex;align-items:center;flex-flow:row-reverse;border-radius:4px;padding:0 8px;font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-weight:500;letter-spacing:.08929em;text-decoration:none;text-transform:uppercase}.breadcrumb .mdc-select .fas.fa-chevron-down,.breadcrumb button .fas.fa-chevron-down{color:#fff !important;line-height:3.4;font-size:9px}.breadcrumb .mdc-select input,.breadcrumb .mdc-select .mdc-select__dropdown-icon,.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button input,.breadcrumb button .mdc-select__dropdown-icon,.breadcrumb button .mdc-select__selected-text{position:relative}.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button .mdc-select__selected-text{min-width:fit-content;padding:0 16px 0 0px !important;color:#fff;font-size:12px !important;height:fit-content;border-bottom:none}.breadcrumb .mdc-select .mdc-notched-outline,.breadcrumb button .mdc-notched-outline{display:none}.breadcrumb .mdc-select.mdc-select--outlined .mdc-select__selected-text,.breadcrumb button.mdc-select--outlined .mdc-select__selected-text{padding:0px}.breadcrumb .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple,.breadcrumb button:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple{background-color:#eb8119}.button-select-menu .MuiPaper-root{padding-top:6px;min-width:140px}.button-select-menu .MuiPaper-root .breadcrumb-select-options{margin-bottom:6px}
|
48 |
.collapsible-group{margin:10px 20px}.collapsible-group>button{text-align:left;justify-content:normal;padding:0 15px;height:49px}.collapsible-group>button i{margin-left:10px;font-size:12px;-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.collapsible-group .collapsible-body{padding:18px}.collapsible-group.collapsible-opened>button i{transform:rotate(-180deg)}
|
49 |
.settings-container{display:flex;position:relative;margin:15px 0}.settings-container.disabled{opacity:.5;user-select:none}.settings-title{padding-right:15px;padding:4.9px 15px 4.9px 0;margin-right:auto;flex-shrink:0;font-size:14px}.settings-title span,.settings-title i{padding-left:5px;font-size:14px;line-height:14px}.settings-content{display:flex;flex-shrink:1;align-self:center}.container-full-width .settings-content{width:66.666%}
|
61 |
.position-buttons-container{margin-bottom:unset}.position-buttons-container .position-buttons{max-width:unset !important}.position-buttons-container .position-buttons button svg{width:20px;fill:currentColor}.position-buttons-container .position-buttons.position-horizontal button:nth-child(1) svg,.position-buttons-container .position-buttons.position-horizontal button:nth-child(2) svg{transform:rotate(-90deg)}.position-buttons-container .position-buttons.position-horizontal button:nth-child(3) svg{transform:rotate(90deg)}.position-buttons-container .position-buttons.position-vertical button:nth-child(3) svg{transform:rotate(180deg)}.position-buttons-container .position-advanced{margin-left:5px}.position-buttons-container .position-advanced .MuiButton-endIcon{margin-left:4px}.position-buttons-container .position-advanced .MuiButton-endIcon.MuiButton-iconSizeMedium .MuiIcon-root{font-size:15px}.position-advanced-container .position-advanced-buttons{flex-grow:1}.position-advanced-container .position-advanced-buttons button{flex-grow:1;height:32px}.position-advanced-container .position-advanced-textfield{font-size:15px;height:32px;padding:0 10px}.position-textfield{height:28px;-moz-appearance:textfield}.position-textfield ::-webkit-outer-spin-button,.position-textfield ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
|
62 |
.image-selector{display:inline-flex;width:100%;justify-content:flex-end;text-align:center}.image-selector .image{width:100%;height:101px;display:inline-flex;text-decoration:none;line-height:26px;cursor:pointer;border-radius:3px;flex-direction:column;justify-content:flex-end;background-size:cover;background-position:center;background-color:#ededed}.image-selector .image i{font-size:40px;line-height:54px;color:#4795a9bd}.image-selector .image .image-text{background-color:#2f788a;color:#fff;border-radius:0 0 3px 3px}.image-selector .image .selected{opacity:0;transition:250ms}.image-selector .image:hover .selected{opacity:1}
|
63 |
.advanced-scroll-timeout .advanced-timeout{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll .MuiTextField-root{min-width:calc(100% / 3);margin-top:auto;margin-bottom:auto}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent{display:flex;width:calc(100% / 3);flex-direction:column}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent button{padding:0;height:45%;min-width:30px;font-size:10px;margin:auto}.advanced-scroll-timeout .advanced-scroll-hide{display:flex;justify-content:flex-end}.advanced-scroll-timeout .advanced-scroll-hide .settings-container{height:35px;width:calc(900% / 10)}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .settings-title{font-size:11px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .MuiTabs-root.icon-or-image{min-height:30px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container.disabled .settings-content .MuiTabs-indicator{background-color:#747474}.advanced-scroll-timeout .advanced-scroll-container{margin:15px 0 -15px}.advanced-scroll-timeout .advanced-scroll-description{display:flex;justify-content:center}.advanced-scroll-timeout .advanced-scroll-description p{margin:0}
|
64 |
+
.buttonizer-bar{position:fixed;left:0;top:0;bottom:0;width:430px;background:#f0f0f0;border-right:1px solid #d2d2d2;transition:all 250ms ease-in-out;z-index:1}.buttonizer-bar:not(.ready){transform:translateX(-440px)}@media screen and (max-width: 769px){.buttonizer-bar{width:100%}}.buttonizer-bar.is-loading .router{opacity:0}.buttonizer-bar.is-loading .buttonizer-logo{display:none}.buttonizer-bar .router-window{position:absolute;top:0;bottom:56px;left:0;width:100%}.buttonizer-bar .router-window .simplebar-content-wrapper{height:100% !important}.buttonizer-bar .router-window .simplebar-placeholder{min-height:100vh}.buttonizer-bar .router-window .router{padding:0 30px 50px}.buttonizer-bar .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}.buttonizer-bar .bar-header{margin:10px 0}.buttonizer-bar .bar-header .breadcrumb{margin:15px 0 15px;display:flex}.buttonizer-bar .bar-header .breadcrumb button{height:28px;line-height:28px;padding:0 10px}.buttonizer-bar .bar-header .breadcrumb button .breadcrumb-text{white-space:nowrap;letter-spacing:.07em;overflow:hidden;text-overflow:ellipsis;height:100%;display:inline-block;align-items:center}.buttonizer-bar .bar-header .breadcrumb button i{margin-left:10px;color:rgba(0,0,0,.3);vertical-align:middle}.buttonizer-bar .bar-header .breadcrumb button.home-button{flex-shrink:0}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary{color:#95bac3}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary:hover{color:#2f7789}.buttonizer-bar .bar-header .MuiTabs-flexContainer a{min-width:unset}.buttonizer-bar .bar-header .MuiTabs-flexContainer a i{font-size:20px;margin-bottom:8px}.buttonizer-bar .bar-header .MuiTabs-flexContainer a .MuiTab-wrapper{font-weight:600;font-size:12px;letter-spacing:1.25006px}.buttonizer-bar .bar-footer{position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);background:#fff}.buttonizer-bar .bar-footer .bar-footer-container{display:flex;align-content:space-between;padding:10px}.buttonizer-bar .bar-footer .bar-footer-container .settings-button{font-size:18px;position:relative;margin:0 8px}.buttonizer-bar .bar-footer .bar-footer-container .go-back-button{font-size:18px;display:flex;margin-right:8px;min-width:36px;align-items:center;height:100%}.buttonizer-bar .bar-footer .bar-footer-container button{min-width:36px;height:36px}.buttonizer-bar .bar-footer .bar-footer-container button.MuiIconButton-root{padding:0;font-size:16px}.buttonizer-bar .bar-footer .bar-footer-container .MuiButton-Publish{padding:6px 16px !important;font-size:.785rem !important;border-right-color:#124956}.buttonizer-bar .bar-footer .bar-footer-container .MuiButton-PublishGroup{padding:0 !important}.buttonizer-bar .bar-footer .bar-footer-container .footer-button-group-start{position:relative;border-right:#ddd 1px solid}
|
65 |
[data-simplebar] {
|
66 |
position: relative;
|
67 |
flex-direction: column;
|
279 |
.buttonizer-menu-item{display:block !important;width:100% !important;text-align:left;text-decoration:none;padding:10px 15px !important;border-bottom:1px solid #dbdbdb !important;transition:background .15s ease-in-out;height:auto !important;border-radius:0 !important}.buttonizer-menu-item:last-child{border:0 !important}.buttonizer-menu-item:hover{background:#eee}.buttonizer-menu-item .title{display:block;color:#3d3d3d;font-size:13px;font-weight:600;margin-bottom:5px}.buttonizer-menu-item .description{display:block;color:#545454;font-weight:400;font-size:12px;line-height:20px;letter-spacing:.5px;text-transform:none}
|
280 |
#buttonizer-menu .MuiPaper-root{max-width:430px;width:100%;background:#eee}#buttonizer-menu .menu-container{padding:20px;flex-shrink:0;display:flex;flex-direction:column}#buttonizer-menu .menu-container .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}#buttonizer-menu .menu-container .menu-group{padding:0 20px}#buttonizer-menu .menu-container .menu-group h2{font-size:20px}#buttonizer-menu .menu-container .close-button{display:block;margin:20px 0 50px;padding:20px 0;text-align:center;text-decoration:none;font-size:16px}#buttonizer-menu .menu-container .collapsible-group{margin:8px 0 !important}#buttonizer-menu .menu-container .menu-drawer-bottom{padding:5%;display:flex;flex-direction:column;flex-grow:1;justify-content:flex-end}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons{text-align:center;font-size:14px;line-height:24px;margin-top:50px}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container{margin-top:10px}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a{box-shadow:unset;outline:none;width:30px;height:30px;text-decoration:none}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.instagram span{color:#e4405f}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.youtube span{color:#c00}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.community span{-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(142deg, #f08419 0%, #f08419 15%, #2f788a 13%);background-size:400% 400%}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.facebook span{color:#3b5999}#buttonizer-menu .menu-container .menu-drawer-bottom .social-media-buttons .buttons-container a.twitter span{color:#55acee}
|
281 |
.drawer-splitter-modal .MuiPaper-root{max-width:1100px;width:90%;height:100%}.drawer-splitter-content{display:flex;height:100%}.drawer-splitter-content .menu-items{border:1px solid rgba(0,0,0,.1);width:330px;flex-shrink:0;flex-grow:0;display:flex;flex-direction:column;overflow:hidden}.drawer-splitter-content .menu-items .menu-header{padding:30px 15px 17px 15px;border-bottom:1px solid rgba(0,0,0,.1)}.drawer-splitter-content .menu-items .menu-header .menu-back span{font-size:20px}.drawer-splitter-content .menu-items .menu-header i:not(.saved-icon){font-size:40px;color:#2f7789}.drawer-splitter-content .menu-items .menu-header h3{color:#2f7789;text-transform:uppercase;font-weight:600;font-size:22px;margin-top:20px;margin-bottom:15px}.drawer-splitter-content .menu-items .menu-header span{font-size:14px}.drawer-splitter-content .menu-items .menu-content{padding:30px 15px 17px 15px;flex-grow:0;overflow:auto}.drawer-splitter-content .menu-items .menu-content .drawer-button button{justify-content:left}.drawer-splitter-content .menu-items .menu-content .drawer-button button .MuiButton-text{padding:8px}.drawer-splitter-content .menu-items .menu-content .drawer-button button i{margin-right:10px}.drawer-splitter-content .menu-items .menu-content .menu-item{border-radius:4px;padding:5px 10px 5px 10px;transition:background-color .2s ease-in-out,color .2s ease-in-out}.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name{overflow:hidden;flex-grow:1;justify-content:left}.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name p,.drawer-splitter-content .menu-items .menu-content .menu-item .menu-item-name .material-icons{font-size:.9rem}.drawer-splitter-content .menu-items .menu-content .menu-item.settings{padding:0}.drawer-splitter-content .menu-items .menu-content .menu-item.settings .drawer-button{width:100%}.drawer-splitter-content .menu-items .menu-content .menu-item.settings .drawer-button button{padding:8px 16px}.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected,.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected:hover{background-color:#f0841930}.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected .secondary-actions button,.drawer-splitter-content .menu-items .menu-content .menu-item.Mui-selected:hover .secondary-actions button{color:#f08419}.drawer-splitter-content .menu-items .menu-content .menu-item .secondary-actions{font-size:1rem}.drawer-splitter-content .splitted{min-width:300px;flex-grow:1;overflow:hidden}.drawer-splitter-content .splitted .splitted-content{flex-grow:1;overflow:hidden;display:flex;flex-direction:column;height:100%}.drawer-splitter-content .splitted .splitted-content .drawer-content-header{padding-bottom:15px;border-bottom:1px solid rgba(0,0,0,.1);padding:40px 30px 0 40px}.drawer-splitter-content .splitted .splitted-content .drawer-content-header .title{font-size:35px;line-height:45px;font-weight:500;margin-bottom:20px;display:block;color:#2f7789;float:left}.drawer-splitter-content .splitted .splitted-content .drawer-content-content{padding:15px 35px 50px 40px;flex-grow:0;overflow:auto}.drawer-splitter-content .splitted .splitted-content .drawer-content-content .description{font-size:16px;line-height:25px;color:rgba(0,0,0,.8)}.drawer-splitter-content .splitted .splitted-content .MuiTypography-body1{font-weight:600;color:#2f7789}
|
282 |
+
.drawer-splitter-content-title{font-size:16px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#2f7789;border-bottom:1px solid rgba(0,0,0,.1);padding:15px 0 10px;margin-bottom:15px}.drawer-splitter-content-title.top{border-top:1px solid rgba(0,0,0,.1);padding:10px 0 15px;margin-top:15px;border-bottom:unset;margin-bottom:unset}
|
283 |
.settings-drawer-pages .settings-page-title .title{font-size:40px;font-weight:700}.settings-drawer-pages .settings-page-title .description{font-size:16px;padding:15px 0}.settings-drawer-pages .with-secondary-action{padding-right:80px}.settings-drawer-pages .with-optin-action{padding-right:150px}.settings-drawer-pages .with-permissions{display:block}.settings-drawer-pages .with-permissions>div{flex:none}.settings-drawer-pages .settings-container.select .settings-title{flex-shrink:1;width:calc(122%/ 3)}.settings-drawer-pages .settings-container.select .settings-content{width:52.666%;padding:0 20px;margin:auto}.settings-drawer-pages h2.title{text-transform:uppercase}.settings-drawer-pages .explaination ul{list-style:disc;padding:0 40px}.settings-drawer-pages .explaination button:not(:disabled){background-color:red}.settings-drawer-pages .explaination button .fas.fa-undo{font-size:14px}.settings-drawer-pages .explaination button .fas.fa-undo.spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
284 |
.buttonizer-drawer{padding:2em}.close-button{float:right;margin:-20px !important}
|
285 |
.buttonizer-tour-options .MuiDialog-paperWidthSm{padding-bottom:20px}.buttonizer-tour-options .header{display:flex}.buttonizer-tour-options .header .MuiDialogTitle-root{padding:16px 24px 0}.buttonizer-tour-options .header h2{font-size:28px;color:#2f7789;padding:20px 0 0 10px}.buttonizer-tour-options .header h2 .fa-globe-europe{margin-right:10px}.buttonizer-tour-options .header .skip-button{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;width:38px;height:38px}.buttonizer-tour-options .header .skip-button .fa-times{font-size:18px}.buttonizer-tour-options .list-item{display:flex;color:#000;margin-right:25px}
|
706 |
|
707 |
.tourDialog,.videoDialog,.centerTopDialog,.centerBottomDialog,.centerVideoDialog{padding:15px;min-width:400px;background-color:#d7e5e9;background-repeat:no-repeat;background-image:url(./images/buttonizer-logo.png);background-position:left 30px bottom 20px;background-size:50px}.tourDialog .introjs-tooltip-header,.videoDialog .introjs-tooltip-header,.centerTopDialog .introjs-tooltip-header,.centerBottomDialog .introjs-tooltip-header,.centerVideoDialog .introjs-tooltip-header{position:relative}.tourDialog .introjs-tooltip-header .introjs-tooltip-title,.videoDialog .introjs-tooltip-header .introjs-tooltip-title,.centerTopDialog .introjs-tooltip-header .introjs-tooltip-title,.centerBottomDialog .introjs-tooltip-header .introjs-tooltip-title,.centerVideoDialog .introjs-tooltip-header .introjs-tooltip-title{font-size:22px;color:#2f788a}.tourDialog .introjs-tooltip-header .introjs-skipbutton,.videoDialog .introjs-tooltip-header .introjs-skipbutton,.centerTopDialog .introjs-tooltip-header .introjs-skipbutton,.centerBottomDialog .introjs-tooltip-header .introjs-skipbutton,.centerVideoDialog .introjs-tooltip-header .introjs-skipbutton{color:#000;padding:5px;position:absolute;right:0;top:0}.tourDialog .introjs-tooltiptext,.videoDialog .introjs-tooltiptext,.centerTopDialog .introjs-tooltiptext,.centerBottomDialog .introjs-tooltiptext,.centerVideoDialog .introjs-tooltiptext{font-size:14px;color:#000}.tourDialog .introjs-tooltiptext a,.videoDialog .introjs-tooltiptext a,.centerTopDialog .introjs-tooltiptext a,.centerBottomDialog .introjs-tooltiptext a,.centerVideoDialog .introjs-tooltiptext a{color:#000;text-decoration:none}.tourDialog .introjs-tooltiptext #myVideo,.videoDialog .introjs-tooltiptext #myVideo,.centerTopDialog .introjs-tooltiptext #myVideo,.centerBottomDialog .introjs-tooltiptext #myVideo,.centerVideoDialog .introjs-tooltiptext #myVideo{width:100%;margin-top:-25px}.tourDialog .introjs-tooltiptext h2,.videoDialog .introjs-tooltiptext h2,.centerTopDialog .introjs-tooltiptext h2,.centerBottomDialog .introjs-tooltiptext h2,.centerVideoDialog .introjs-tooltiptext h2{color:#2f788a;margin:50px 0 10px}.tourDialog .introjs-progress,.videoDialog .introjs-progress,.centerTopDialog .introjs-progress,.centerBottomDialog .introjs-progress,.centerVideoDialog .introjs-progress{margin:20px;height:5px;background-color:#fff}.tourDialog .introjs-progress .introjs-progressbar,.videoDialog .introjs-progress .introjs-progressbar,.centerTopDialog .introjs-progress .introjs-progressbar,.centerBottomDialog .introjs-progress .introjs-progressbar,.centerVideoDialog .introjs-progress .introjs-progressbar{background-color:gray}.tourDialog .introjs-tooltipbuttons,.videoDialog .introjs-tooltipbuttons,.centerTopDialog .introjs-tooltipbuttons,.centerBottomDialog .introjs-tooltipbuttons,.centerVideoDialog .introjs-tooltipbuttons{border:none;margin-top:20px;float:right;display:flex;align-items:center}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{border:none;text-shadow:none;text-transform:uppercase;font-weight:bolder;font-size:12px}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton{color:#2f788a;background:none}.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{color:#fff;background-color:#ef790c;box-shadow:rgba(0,0,0,.24) 0px 3px 8px;margin-left:5px;padding:10px 15px}.tourDialog .introjs-arrow.left,.videoDialog .introjs-arrow.left,.centerTopDialog .introjs-arrow.left,.centerBottomDialog .introjs-arrow.left,.centerVideoDialog .introjs-arrow.left{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.left-bottom,.videoDialog .introjs-arrow.left-bottom,.centerTopDialog .introjs-arrow.left-bottom,.centerBottomDialog .introjs-arrow.left-bottom,.centerVideoDialog .introjs-arrow.left-bottom{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.right,.videoDialog .introjs-arrow.right,.centerTopDialog .introjs-arrow.right,.centerBottomDialog .introjs-arrow.right,.centerVideoDialog .introjs-arrow.right{border-left-color:#d7e5e9}.tourDialog .introjs-arrow.top,.videoDialog .introjs-arrow.top,.centerTopDialog .introjs-arrow.top,.centerBottomDialog .introjs-arrow.top,.centerVideoDialog .introjs-arrow.top{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.top-middle,.videoDialog .introjs-arrow.top-middle,.centerTopDialog .introjs-arrow.top-middle,.centerBottomDialog .introjs-arrow.top-middle,.centerVideoDialog .introjs-arrow.top-middle{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.bottom,.videoDialog .introjs-arrow.bottom,.centerTopDialog .introjs-arrow.bottom,.centerBottomDialog .introjs-arrow.bottom,.centerVideoDialog .introjs-arrow.bottom{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-middle,.videoDialog .introjs-arrow.bottom-middle,.centerTopDialog .introjs-arrow.bottom-middle,.centerBottomDialog .introjs-arrow.bottom-middle,.centerVideoDialog .introjs-arrow.bottom-middle{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-right,.videoDialog .introjs-arrow.bottom-right,.centerTopDialog .introjs-arrow.bottom-right,.centerBottomDialog .introjs-arrow.bottom-right,.centerVideoDialog .introjs-arrow.bottom-right{border-top-color:#d7e5e9}.videoDialog,.centerVideoDialog{background-image:url(./images/white-background.jpg);background-position:inherit;background-size:620px}.centerTopDialog,.centerVideoDialog{margin-top:20px}.centerBottomDialog{margin:-20px;margin-left:0}
|
708 |
.changelog-dialog ::-webkit-scrollbar{width:10px}.changelog-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.changelog-dialog ::-webkit-scrollbar-thumb{background:#888}.changelog-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.changelog-dialog img{margin-top:-8px}.changelog-dialog .close-down{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;font-size:20px;width:38px;height:38px}.changelog-dialog .MuiDialogTitle-root{padding-bottom:0}.changelog-dialog h2{color:#2f7789;font-size:28px}.changelog-dialog .content{padding:0 24px;margin-bottom:20px}.changelog-dialog .content h3{font-size:20px;color:#535353;font-weight:500;margin:25px 0 10px}.changelog-dialog .content .list ul{margin:0;padding-left:20px;color:#535353}.changelog-dialog .content .list .name{font-weight:500}.changelog-dialog .content .list .info{margin-bottom:10px}.changelog-dialog .progress-bar{display:flex;align-items:center;margin:0 200px}.changelog-dialog .progress-bar .dot{height:10px;width:10px;background-color:#f0f0f0;border-radius:50%;margin:0 3px}.changelog-dialog .footer{flex-direction:column}.changelog-dialog .footer .primary-button{margin:10px auto}.changelog-dialog .footer .pagination{display:flex;margin:20px 0}.changelog-dialog .footer .pagination .previous,.changelog-dialog .footer .pagination .next{background:#f0f0f0;color:#f08419;font-size:14px;cursor:pointer;width:38px;height:38px}.changelog-dialog .footer .external-link{color:#2f7789;font-size:14px;margin-bottom:10px;border-radius:unset}.changelog-dialog .footer .external-link .fa-external-link-alt{margin-left:10px;font-size:14px}.changelog-dialog .footer .version{font-size:12px;margin-bottom:20px}
|
709 |
+
.buzzy-urlbar{background:#f0f0f0;border-bottom:1px solid #d2d2d2;position:absolute;top:-65px;left:0;right:0;z-index:999;max-width:1300px;height:60px;transition:all 250ms ease-in-out}.buzzy-urlbar.ready{top:0}.whitten{background:#fff}.button-preview-url{border-radius:4px !important;box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12) !important}@media screen and (min-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{left:431px}}@media screen and (max-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{display:none}}
|
710 |
.GoB-rFmXaQiCtLHiw5bE0{display:inline-block;margin-right:10px;border:1px solid #444;padding:2px 5px;border-radius:4px}.QZVwpvNWXvaP4Bg5_NwrC{margin:0 10px}
|
711 |
.btnizr-wp-icon {
|
712 |
background: url(./images/wp-icon.png);
|
assets/dashboard.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
-
* (C) 2017-2022 Buttonizer v2.
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
@@ -23,7 +23,7 @@
|
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
-
* (C) 2017-2022 Buttonizer v2.
|
27 |
*
|
28 |
*/
|
29 |
/******/ (function() { // webpackBootstrap
|
@@ -2836,6 +2836,34 @@ exports.Z = _default;
|
|
2836 |
|
2837 |
/***/ }),
|
2838 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2839 |
/***/ 66521:
|
2840 |
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2841 |
|
@@ -5191,9142 +5219,11027 @@ function formatMuiErrorMessage(code) {
|
|
5191 |
|
5192 |
/***/ }),
|
5193 |
|
5194 |
-
/***/
|
5195 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
5196 |
|
5197 |
"use strict";
|
5198 |
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
5199 |
-
/* harmony export */ "Rf": function() { return /* binding */ getGlobalObject; },
|
5200 |
-
/* harmony export */ "DM": function() { return /* binding */ uuid4; },
|
5201 |
-
/* harmony export */ "en": function() { return /* binding */ parseUrl; },
|
5202 |
-
/* harmony export */ "jH": function() { return /* binding */ getEventDescription; },
|
5203 |
-
/* harmony export */ "Cf": function() { return /* binding */ consoleSandbox; },
|
5204 |
-
/* harmony export */ "Db": function() { return /* binding */ addExceptionTypeValue; },
|
5205 |
-
/* harmony export */ "EG": function() { return /* binding */ addExceptionMechanism; },
|
5206 |
-
/* harmony export */ "l4": function() { return /* binding */ getLocationHref; },
|
5207 |
-
/* harmony export */ "JY": function() { return /* binding */ parseRetryAfterHeader; }
|
5208 |
-
/* harmony export */ });
|
5209 |
-
/* unused harmony exports parseSemver, addContextToFrame, stripUrlQueryAndFragment */
|
5210 |
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61422);
|
5211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5212 |
|
5213 |
-
|
5214 |
-
|
5215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5216 |
*
|
5217 |
-
*
|
5218 |
-
|
5219 |
-
function getGlobalObject() {
|
5220 |
-
return ((0,_node__WEBPACK_IMPORTED_MODULE_0__/* .isNodeEnv */ .KV)()
|
5221 |
-
? __webpack_require__.g
|
5222 |
-
: typeof window !== 'undefined'
|
5223 |
-
? window
|
5224 |
-
: typeof self !== 'undefined'
|
5225 |
-
? self
|
5226 |
-
: fallbackGlobalObject);
|
5227 |
-
}
|
5228 |
-
/**
|
5229 |
-
* UUID4 generator
|
5230 |
*
|
5231 |
-
*
|
|
|
|
|
|
|
|
|
5232 |
*/
|
5233 |
-
|
5234 |
-
|
5235 |
-
|
5236 |
-
|
5237 |
-
|
5238 |
-
|
5239 |
-
|
5240 |
-
|
5241 |
-
|
5242 |
-
arr[3] = (arr[3] & 0xfff) | 0x4000;
|
5243 |
-
// set 2 most significant bits of byte 9 to '10'
|
5244 |
-
// eslint-disable-next-line no-bitwise
|
5245 |
-
arr[4] = (arr[4] & 0x3fff) | 0x8000;
|
5246 |
-
var pad = function (num) {
|
5247 |
-
var v = num.toString(16);
|
5248 |
-
while (v.length < 4) {
|
5249 |
-
v = "0" + v;
|
5250 |
-
}
|
5251 |
-
return v;
|
5252 |
-
};
|
5253 |
-
return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));
|
5254 |
-
}
|
5255 |
-
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
|
5256 |
-
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
5257 |
-
// eslint-disable-next-line no-bitwise
|
5258 |
-
var r = (Math.random() * 16) | 0;
|
5259 |
-
// eslint-disable-next-line no-bitwise
|
5260 |
-
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
5261 |
-
return v.toString(16);
|
5262 |
-
});
|
5263 |
-
}
|
5264 |
/**
|
5265 |
-
*
|
5266 |
-
* // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
|
5267 |
-
* // intentionally using regex and not <a/> href parsing trick because React Native and other
|
5268 |
-
* // environments where DOM might not be available
|
5269 |
-
* @returns parsed URL object
|
5270 |
*/
|
5271 |
-
function
|
5272 |
-
|
5273 |
-
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5278 |
}
|
5279 |
-
|
5280 |
-
|
5281 |
-
|
5282 |
-
|
5283 |
-
|
5284 |
-
|
5285 |
-
|
5286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5287 |
};
|
5288 |
-
|
5289 |
-
|
5290 |
-
|
5291 |
-
|
5292 |
-
*/
|
5293 |
-
function getEventDescription(event) {
|
5294 |
-
if (event.message) {
|
5295 |
-
return event.message;
|
5296 |
-
}
|
5297 |
-
if (event.exception && event.exception.values && event.exception.values[0]) {
|
5298 |
-
var exception = event.exception.values[0];
|
5299 |
-
if (exception.type && exception.value) {
|
5300 |
-
return exception.type + ": " + exception.value;
|
5301 |
}
|
5302 |
-
|
5303 |
-
|
5304 |
-
return event.event_id || '<unknown>';
|
5305 |
-
}
|
5306 |
-
/** JSDoc */
|
5307 |
-
function consoleSandbox(callback) {
|
5308 |
-
var global = getGlobalObject();
|
5309 |
-
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
|
5310 |
-
if (!('console' in global)) {
|
5311 |
-
return callback();
|
5312 |
-
}
|
5313 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
5314 |
-
var originalConsole = global.console;
|
5315 |
-
var wrappedLevels = {};
|
5316 |
-
// Restore all wrapped console methods
|
5317 |
-
levels.forEach(function (level) {
|
5318 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
5319 |
-
if (level in global.console && originalConsole[level].__sentry_original__) {
|
5320 |
-
wrappedLevels[level] = originalConsole[level];
|
5321 |
-
originalConsole[level] = originalConsole[level].__sentry_original__;
|
5322 |
}
|
5323 |
-
|
5324 |
-
|
5325 |
-
|
5326 |
-
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
|
5338 |
-
|
5339 |
-
|
5340 |
-
|
5341 |
-
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
5345 |
-
}
|
5346 |
-
/**
|
5347 |
-
* Adds exception mechanism to a given event.
|
5348 |
-
* @param event The event to modify.
|
5349 |
-
* @param mechanism Mechanism of the mechanism.
|
5350 |
-
* @hidden
|
5351 |
-
*/
|
5352 |
-
function addExceptionMechanism(event, mechanism) {
|
5353 |
-
if (mechanism === void 0) { mechanism = {}; }
|
5354 |
-
// TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?
|
5355 |
-
try {
|
5356 |
-
// @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined'
|
5357 |
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
5358 |
-
event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};
|
5359 |
-
Object.keys(mechanism).forEach(function (key) {
|
5360 |
-
// @ts-ignore Mechanism has no index signature
|
5361 |
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
5362 |
-
event.exception.values[0].mechanism[key] = mechanism[key];
|
5363 |
});
|
5364 |
-
}
|
5365 |
-
catch (_oO) {
|
5366 |
-
// no-empty
|
5367 |
-
}
|
5368 |
-
}
|
5369 |
-
/**
|
5370 |
-
* A safe form of location.href
|
5371 |
-
*/
|
5372 |
-
function getLocationHref() {
|
5373 |
-
try {
|
5374 |
-
return document.location.href;
|
5375 |
-
}
|
5376 |
-
catch (oO) {
|
5377 |
-
return '';
|
5378 |
-
}
|
5379 |
-
}
|
5380 |
-
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
5381 |
-
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
5382 |
-
/**
|
5383 |
-
* Parses input into a SemVer interface
|
5384 |
-
* @param input string representation of a semver version
|
5385 |
-
*/
|
5386 |
-
function parseSemver(input) {
|
5387 |
-
var match = input.match(SEMVER_REGEXP) || [];
|
5388 |
-
var major = parseInt(match[1], 10);
|
5389 |
-
var minor = parseInt(match[2], 10);
|
5390 |
-
var patch = parseInt(match[3], 10);
|
5391 |
-
return {
|
5392 |
-
buildmetadata: match[5],
|
5393 |
-
major: isNaN(major) ? undefined : major,
|
5394 |
-
minor: isNaN(minor) ? undefined : minor,
|
5395 |
-
patch: isNaN(patch) ? undefined : patch,
|
5396 |
-
prerelease: match[4],
|
5397 |
};
|
5398 |
-
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
5402 |
-
|
5403 |
-
* @param header string representation of 'Retry-After' header
|
5404 |
-
*/
|
5405 |
-
function parseRetryAfterHeader(now, header) {
|
5406 |
-
if (!header) {
|
5407 |
-
return defaultRetryAfter;
|
5408 |
-
}
|
5409 |
-
var headerDelay = parseInt("" + header, 10);
|
5410 |
-
if (!isNaN(headerDelay)) {
|
5411 |
-
return headerDelay * 1000;
|
5412 |
-
}
|
5413 |
-
var headerDate = Date.parse("" + header);
|
5414 |
-
if (!isNaN(headerDate)) {
|
5415 |
-
return headerDate - now;
|
5416 |
-
}
|
5417 |
-
return defaultRetryAfter;
|
5418 |
-
}
|
5419 |
-
/**
|
5420 |
-
* This function adds context (pre/post/line) lines to the provided frame
|
5421 |
-
*
|
5422 |
-
* @param lines string[] containing all lines
|
5423 |
-
* @param frame StackFrame that will be mutated
|
5424 |
-
* @param linesOfContext number of context lines we want to add pre/post
|
5425 |
-
*/
|
5426 |
-
function addContextToFrame(lines, frame, linesOfContext) {
|
5427 |
-
if (linesOfContext === void 0) { linesOfContext = 5; }
|
5428 |
-
var lineno = frame.lineno || 0;
|
5429 |
-
var maxLines = lines.length;
|
5430 |
-
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
|
5431 |
-
frame.pre_context = lines
|
5432 |
-
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
|
5433 |
-
.map(function (line) { return snipLine(line, 0); });
|
5434 |
-
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
|
5435 |
-
frame.post_context = lines
|
5436 |
-
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
|
5437 |
-
.map(function (line) { return snipLine(line, 0); });
|
5438 |
-
}
|
5439 |
-
/**
|
5440 |
-
* Strip the query string and fragment off of a given URL or path (if present)
|
5441 |
-
*
|
5442 |
-
* @param urlPath Full URL or path, including possible query string and/or fragment
|
5443 |
-
* @returns URL or path without query string or fragment
|
5444 |
-
*/
|
5445 |
-
function stripUrlQueryAndFragment(urlPath) {
|
5446 |
-
// eslint-disable-next-line no-useless-escape
|
5447 |
-
return urlPath.split(/[\?#]/, 1)[0];
|
5448 |
-
}
|
5449 |
-
//# sourceMappingURL=misc.js.map
|
5450 |
|
5451 |
-
/***/ }),
|
5452 |
|
5453 |
-
/***/ 61422:
|
5454 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5455 |
|
5456 |
-
"use strict";
|
5457 |
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
5458 |
-
/* harmony export */ "KV": function() { return /* binding */ isNodeEnv; },
|
5459 |
-
/* harmony export */ "l$": function() { return /* binding */ dynamicRequire; }
|
5460 |
-
/* harmony export */ });
|
5461 |
-
/* unused harmony export extractNodeRequestData */
|
5462 |
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
5463 |
|
5464 |
|
5465 |
/**
|
5466 |
-
*
|
5467 |
*
|
5468 |
-
*
|
5469 |
-
|
5470 |
-
function isNodeEnv() {
|
5471 |
-
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
|
5472 |
-
}
|
5473 |
-
/**
|
5474 |
-
* Requires a module which is protected against bundler minification.
|
5475 |
*
|
5476 |
-
* @
|
5477 |
*/
|
5478 |
-
|
5479 |
-
function dynamicRequire(mod, request) {
|
5480 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
5481 |
-
return mod.require(request);
|
5482 |
-
}
|
5483 |
-
/** Default request keys that'll be used to extract data from the request */
|
5484 |
-
var DEFAULT_REQUEST_KEYS = (/* unused pure expression or super */ null && (['cookies', 'data', 'headers', 'method', 'query_string', 'url']));
|
5485 |
-
/**
|
5486 |
-
* Normalizes data from the request object, accounting for framework differences.
|
5487 |
-
*
|
5488 |
-
* @param req The request object from which to extract data
|
5489 |
-
* @param keys An optional array of keys to include in the normalized data. Defaults to DEFAULT_REQUEST_KEYS if not
|
5490 |
-
* provided.
|
5491 |
-
* @returns An object containing normalized request data
|
5492 |
-
*/
|
5493 |
-
function extractNodeRequestData(req, keys) {
|
5494 |
-
if (keys === void 0) { keys = DEFAULT_REQUEST_KEYS; }
|
5495 |
-
// make sure we can safely use dynamicRequire below
|
5496 |
-
if (!isNodeEnv()) {
|
5497 |
-
throw new Error("Can't get node request data outside of a node environment");
|
5498 |
-
}
|
5499 |
-
var requestData = {};
|
5500 |
-
// headers:
|
5501 |
-
// node, express: req.headers
|
5502 |
-
// koa: req.header
|
5503 |
-
var headers = (req.headers || req.header || {});
|
5504 |
-
// method:
|
5505 |
-
// node, express, koa: req.method
|
5506 |
-
var method = req.method;
|
5507 |
-
// host:
|
5508 |
-
// express: req.hostname in > 4 and req.host in < 4
|
5509 |
-
// koa: req.host
|
5510 |
-
// node: req.headers.host
|
5511 |
-
var host = req.hostname || req.host || headers.host || '<no host>';
|
5512 |
-
// protocol:
|
5513 |
-
// node: <n/a>
|
5514 |
-
// express, koa: req.protocol
|
5515 |
-
var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted
|
5516 |
-
? 'https'
|
5517 |
-
: 'http';
|
5518 |
-
// url (including path and query string):
|
5519 |
-
// node, express: req.originalUrl
|
5520 |
-
// koa: req.url
|
5521 |
-
var originalUrl = (req.originalUrl || req.url || '');
|
5522 |
-
// absolute url
|
5523 |
-
var absoluteUrl = protocol + "://" + host + originalUrl;
|
5524 |
-
keys.forEach(function (key) {
|
5525 |
-
switch (key) {
|
5526 |
-
case 'headers':
|
5527 |
-
requestData.headers = headers;
|
5528 |
-
break;
|
5529 |
-
case 'method':
|
5530 |
-
requestData.method = method;
|
5531 |
-
break;
|
5532 |
-
case 'url':
|
5533 |
-
requestData.url = absoluteUrl;
|
5534 |
-
break;
|
5535 |
-
case 'cookies':
|
5536 |
-
// cookies:
|
5537 |
-
// node, express, koa: req.headers.cookie
|
5538 |
-
// vercel, sails.js, express (w/ cookie middleware): req.cookies
|
5539 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
5540 |
-
requestData.cookies = req.cookies || dynamicRequire(module, 'cookie').parse(headers.cookie || '');
|
5541 |
-
break;
|
5542 |
-
case 'query_string':
|
5543 |
-
// query string:
|
5544 |
-
// node: req.url (raw)
|
5545 |
-
// express, koa: req.query
|
5546 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
5547 |
-
requestData.query_string = dynamicRequire(module, 'url').parse(originalUrl || '', false).query;
|
5548 |
-
break;
|
5549 |
-
case 'data':
|
5550 |
-
if (method === 'GET' || method === 'HEAD') {
|
5551 |
-
break;
|
5552 |
-
}
|
5553 |
-
// body data:
|
5554 |
-
// node, express, koa: req.body
|
5555 |
-
if (req.body !== undefined) {
|
5556 |
-
requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));
|
5557 |
-
}
|
5558 |
-
break;
|
5559 |
-
default:
|
5560 |
-
if ({}.hasOwnProperty.call(req, key)) {
|
5561 |
-
requestData[key] = req[key];
|
5562 |
-
}
|
5563 |
-
}
|
5564 |
-
});
|
5565 |
-
return requestData;
|
5566 |
-
}
|
5567 |
-
//# sourceMappingURL=node.js.map
|
5568 |
-
|
5569 |
-
/***/ }),
|
5570 |
-
|
5571 |
-
/***/ 21170:
|
5572 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5573 |
-
|
5574 |
-
"use strict";
|
5575 |
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
5576 |
-
/* harmony export */ "yW": function() { return /* binding */ dateTimestampInSeconds; }
|
5577 |
-
/* harmony export */ });
|
5578 |
-
/* unused harmony exports timestampInSeconds, timestampWithMs, usingPerformanceAPI, browserPerformanceTimeOrigin */
|
5579 |
-
/* harmony import */ var _misc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62844);
|
5580 |
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61422);
|
5581 |
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
5582 |
-
|
5583 |
-
|
5584 |
/**
|
5585 |
-
*
|
5586 |
-
*
|
5587 |
-
* Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier
|
5588 |
-
* than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It
|
5589 |
-
* is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration".
|
5590 |
*/
|
5591 |
-
var
|
5592 |
-
nowSeconds: function () { return Date.now() / 1000; },
|
5593 |
-
};
|
5594 |
/**
|
5595 |
-
*
|
5596 |
-
* support the API.
|
5597 |
-
*
|
5598 |
-
* Wrapping the native API works around differences in behavior from different browsers.
|
5599 |
*/
|
5600 |
-
function
|
5601 |
-
|
5602 |
-
|
5603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5604 |
}
|
5605 |
-
|
5606 |
-
|
5607 |
-
|
5608 |
-
|
5609 |
-
|
5610 |
-
// Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is
|
5611 |
-
// undefined.
|
5612 |
-
//
|
5613 |
-
// The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to
|
5614 |
-
// interact with data coming out of performance entries.
|
5615 |
-
//
|
5616 |
-
// Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that
|
5617 |
-
// might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes
|
5618 |
-
// performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have
|
5619 |
-
// observed skews that can be as long as days, weeks or months.
|
5620 |
-
//
|
5621 |
-
// See https://github.com/getsentry/sentry-javascript/issues/2590.
|
5622 |
-
//
|
5623 |
-
// BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload
|
5624 |
-
// transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation
|
5625 |
-
// transactions of long-lived web pages.
|
5626 |
-
var timeOrigin = Date.now() - performance.now();
|
5627 |
-
return {
|
5628 |
-
now: function () { return performance.now(); },
|
5629 |
-
timeOrigin: timeOrigin,
|
5630 |
};
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
-
|
5635 |
-
|
5636 |
-
|
5637 |
-
|
5638 |
-
|
5639 |
-
|
5640 |
-
}
|
5641 |
-
catch (_) {
|
5642 |
-
return undefined;
|
5643 |
-
}
|
5644 |
-
}
|
5645 |
-
/**
|
5646 |
-
* The Performance API implementation for the current platform, if available.
|
5647 |
-
*/
|
5648 |
-
var platformPerformance = (0,_node__WEBPACK_IMPORTED_MODULE_1__/* .isNodeEnv */ .KV)() ? getNodePerformance() : getBrowserPerformance();
|
5649 |
-
var timestampSource = platformPerformance === undefined
|
5650 |
-
? dateTimestampSource
|
5651 |
-
: {
|
5652 |
-
nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },
|
5653 |
};
|
5654 |
-
/**
|
5655 |
-
|
5656 |
-
|
5657 |
-
|
5658 |
-
|
5659 |
-
|
5660 |
-
|
5661 |
-
|
5662 |
-
|
5663 |
-
*
|
5664 |
-
* BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is
|
5665 |
-
* asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The
|
5666 |
-
* skew can grow to arbitrary amounts like days, weeks or months.
|
5667 |
-
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
5668 |
-
*/
|
5669 |
-
var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
5670 |
-
// Re-exported with an old name for backwards-compatibility.
|
5671 |
-
var timestampWithMs = (/* unused pure expression or super */ null && (timestampInSeconds));
|
5672 |
-
/**
|
5673 |
-
* A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
|
5674 |
-
*/
|
5675 |
-
var usingPerformanceAPI = platformPerformance !== undefined;
|
5676 |
-
/**
|
5677 |
-
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
5678 |
-
* performance API is available.
|
5679 |
-
*/
|
5680 |
-
var browserPerformanceTimeOrigin = (function () {
|
5681 |
-
var performance = (0,_misc__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .Rf)().performance;
|
5682 |
-
if (!performance) {
|
5683 |
-
return undefined;
|
5684 |
-
}
|
5685 |
-
if (performance.timeOrigin) {
|
5686 |
-
return performance.timeOrigin;
|
5687 |
-
}
|
5688 |
-
// While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin
|
5689 |
-
// is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.
|
5690 |
-
// Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always
|
5691 |
-
// a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the
|
5692 |
-
// Date API.
|
5693 |
-
// eslint-disable-next-line deprecation/deprecation
|
5694 |
-
return (performance.timing && performance.timing.navigationStart) || Date.now();
|
5695 |
-
})();
|
5696 |
-
//# sourceMappingURL=time.js.map
|
5697 |
-
|
5698 |
-
/***/ }),
|
5699 |
-
|
5700 |
-
/***/ 99601:
|
5701 |
-
/***/ (function(__unused_webpack_module, exports) {
|
5702 |
-
|
5703 |
-
"use strict";
|
5704 |
-
var __webpack_unused_export__;
|
5705 |
-
|
5706 |
-
__webpack_unused_export__ = ({ value: true });
|
5707 |
-
function composeRefs() {
|
5708 |
-
var refs = [];
|
5709 |
-
for (var _i = 0; _i < arguments.length; _i++) {
|
5710 |
-
refs[_i] = arguments[_i];
|
5711 |
-
}
|
5712 |
-
if (refs.length === 2) { // micro-optimize the hot path
|
5713 |
-
return composeTwoRefs(refs[0], refs[1]) || null;
|
5714 |
-
}
|
5715 |
-
var composedRef = refs.slice(1).reduce(function (semiCombinedRef, refToInclude) { return composeTwoRefs(semiCombinedRef, refToInclude); }, refs[0]);
|
5716 |
-
return composedRef || null;
|
5717 |
-
}
|
5718 |
-
exports.Z = composeRefs;
|
5719 |
-
var composedRefCache = new WeakMap();
|
5720 |
-
function composeTwoRefs(ref1, ref2) {
|
5721 |
-
if (ref1 && ref2) {
|
5722 |
-
var ref1Cache = composedRefCache.get(ref1) || new WeakMap();
|
5723 |
-
composedRefCache.set(ref1, ref1Cache);
|
5724 |
-
var composedRef = ref1Cache.get(ref2) || (function (instance) {
|
5725 |
-
updateRef(ref1, instance);
|
5726 |
-
updateRef(ref2, instance);
|
5727 |
});
|
5728 |
-
|
5729 |
-
|
5730 |
-
|
5731 |
-
|
5732 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5733 |
}
|
5734 |
-
|
5735 |
-
|
|
|
5736 |
}
|
|
|
|
|
5737 |
}
|
5738 |
-
|
5739 |
-
|
5740 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5741 |
}
|
5742 |
-
|
5743 |
-
|
|
|
5744 |
}
|
5745 |
}
|
5746 |
-
|
5747 |
-
|
5748 |
-
|
5749 |
-
|
5750 |
-
|
5751 |
-
|
5752 |
-
|
5753 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5754 |
|
5755 |
/***/ }),
|
5756 |
|
5757 |
-
/***/
|
5758 |
-
/***/ (function(
|
5759 |
|
5760 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5761 |
|
5762 |
|
5763 |
-
|
5764 |
-
|
5765 |
-
|
5766 |
-
|
5767 |
-
var
|
5768 |
-
|
5769 |
-
|
5770 |
-
|
5771 |
-
|
5772 |
-
|
5773 |
-
|
5774 |
-
|
5775 |
-
|
5776 |
-
|
5777 |
-
|
5778 |
-
|
5779 |
-
|
5780 |
-
|
5781 |
-
|
5782 |
-
|
5783 |
-
|
5784 |
-
|
5785 |
-
|
5786 |
-
|
5787 |
-
|
5788 |
-
|
5789 |
-
|
5790 |
-
|
5791 |
-
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
5795 |
-
request.timeout = config.timeout;
|
5796 |
-
|
5797 |
-
function onloadend() {
|
5798 |
-
if (!request) {
|
5799 |
-
return;
|
5800 |
-
}
|
5801 |
-
// Prepare the response
|
5802 |
-
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
5803 |
-
var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
5804 |
-
request.responseText : request.response;
|
5805 |
-
var response = {
|
5806 |
-
data: responseData,
|
5807 |
-
status: request.status,
|
5808 |
-
statusText: request.statusText,
|
5809 |
-
headers: responseHeaders,
|
5810 |
-
config: config,
|
5811 |
-
request: request
|
5812 |
-
};
|
5813 |
-
|
5814 |
-
settle(resolve, reject, response);
|
5815 |
-
|
5816 |
-
// Clean up request
|
5817 |
-
request = null;
|
5818 |
}
|
5819 |
-
|
5820 |
-
|
5821 |
-
|
5822 |
-
|
5823 |
-
|
5824 |
-
|
5825 |
-
|
5826 |
-
|
5827 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5828 |
}
|
5829 |
-
|
5830 |
-
|
5831 |
-
|
5832 |
-
|
5833 |
-
|
5834 |
-
|
5835 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5836 |
}
|
5837 |
-
|
5838 |
-
|
5839 |
-
|
5840 |
-
|
5841 |
-
|
5842 |
-
|
5843 |
-
|
5844 |
-
|
5845 |
-
|
5846 |
-
|
5847 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5848 |
|
5849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5850 |
|
5851 |
-
|
5852 |
-
request = null;
|
5853 |
-
};
|
5854 |
|
5855 |
-
|
5856 |
-
|
5857 |
-
// Real errors are hidden from us by the browser
|
5858 |
-
// onerror should only fire if it's a network error
|
5859 |
-
reject(createError('Network Error', config, null, request));
|
5860 |
|
5861 |
-
|
5862 |
-
|
5863 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5864 |
|
5865 |
-
|
5866 |
-
request.ontimeout = function handleTimeout() {
|
5867 |
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
5868 |
-
if (config.timeoutErrorMessage) {
|
5869 |
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
5870 |
-
}
|
5871 |
-
reject(createError(
|
5872 |
-
timeoutErrorMessage,
|
5873 |
-
config,
|
5874 |
-
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
5875 |
-
request));
|
5876 |
|
5877 |
-
|
5878 |
-
|
5879 |
-
};
|
5880 |
|
5881 |
-
|
5882 |
-
|
5883 |
-
|
5884 |
-
|
5885 |
-
|
5886 |
-
|
5887 |
-
|
5888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5889 |
|
5890 |
-
|
5891 |
-
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
5892 |
-
}
|
5893 |
-
}
|
5894 |
|
5895 |
-
|
5896 |
-
|
5897 |
-
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
5898 |
-
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
5899 |
-
// Remove Content-Type if data is undefined
|
5900 |
-
delete requestHeaders[key];
|
5901 |
-
} else {
|
5902 |
-
// Otherwise add header to the request
|
5903 |
-
request.setRequestHeader(key, val);
|
5904 |
-
}
|
5905 |
-
});
|
5906 |
-
}
|
5907 |
|
5908 |
-
|
5909 |
-
if (!utils.isUndefined(config.withCredentials)) {
|
5910 |
-
request.withCredentials = !!config.withCredentials;
|
5911 |
-
}
|
5912 |
|
5913 |
-
|
5914 |
-
|
5915 |
-
|
5916 |
-
|
|
|
5917 |
|
5918 |
-
|
5919 |
-
if (typeof config.onDownloadProgress === 'function') {
|
5920 |
-
request.addEventListener('progress', config.onDownloadProgress);
|
5921 |
-
}
|
5922 |
|
5923 |
-
|
5924 |
-
|
5925 |
-
|
5926 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5927 |
|
5928 |
-
if (config.cancelToken) {
|
5929 |
-
// Handle cancellation
|
5930 |
-
config.cancelToken.promise.then(function onCanceled(cancel) {
|
5931 |
-
if (!request) {
|
5932 |
-
return;
|
5933 |
-
}
|
5934 |
|
5935 |
-
request.abort();
|
5936 |
-
reject(cancel);
|
5937 |
-
// Clean up request
|
5938 |
-
request = null;
|
5939 |
-
});
|
5940 |
-
}
|
5941 |
|
5942 |
-
|
5943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5944 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5945 |
|
5946 |
-
// Send the request
|
5947 |
-
request.send(requestData);
|
5948 |
-
});
|
5949 |
-
};
|
5950 |
|
5951 |
|
5952 |
-
/***/ }),
|
5953 |
|
5954 |
-
/***/ 51609:
|
5955 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
5956 |
|
5957 |
-
"use strict";
|
5958 |
|
5959 |
|
5960 |
-
var utils = __webpack_require__(64867);
|
5961 |
-
var bind = __webpack_require__(91849);
|
5962 |
-
var Axios = __webpack_require__(30321);
|
5963 |
-
var mergeConfig = __webpack_require__(47185);
|
5964 |
-
var defaults = __webpack_require__(45655);
|
5965 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5966 |
/**
|
5967 |
-
*
|
5968 |
*
|
5969 |
-
*
|
5970 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
5971 |
*/
|
5972 |
-
function
|
5973 |
-
|
5974 |
-
|
5975 |
-
|
5976 |
-
|
5977 |
-
|
5978 |
-
|
5979 |
-
|
5980 |
-
|
5981 |
-
|
5982 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5983 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5984 |
|
5985 |
-
|
5986 |
-
var axios = createInstance(defaults);
|
5987 |
-
|
5988 |
-
// Expose Axios class to allow class inheritance
|
5989 |
-
axios.Axios = Axios;
|
5990 |
-
|
5991 |
-
// Factory for creating new instances
|
5992 |
-
axios.create = function create(instanceConfig) {
|
5993 |
-
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
5994 |
-
};
|
5995 |
-
|
5996 |
-
// Expose Cancel & CancelToken
|
5997 |
-
axios.Cancel = __webpack_require__(65263);
|
5998 |
-
axios.CancelToken = __webpack_require__(14972);
|
5999 |
-
axios.isCancel = __webpack_require__(26502);
|
6000 |
|
6001 |
-
|
6002 |
-
|
6003 |
-
return Promise.all(promises);
|
6004 |
-
};
|
6005 |
-
axios.spread = __webpack_require__(8713);
|
6006 |
|
6007 |
-
|
6008 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6009 |
|
6010 |
-
module.exports = axios;
|
6011 |
|
6012 |
-
// Allow use of default import syntax in TypeScript
|
6013 |
-
module.exports.default = axios;
|
6014 |
|
6015 |
|
6016 |
-
/***/ }),
|
6017 |
|
6018 |
-
/***/ 65263:
|
6019 |
-
/***/ (function(module) {
|
6020 |
|
6021 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6022 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6023 |
|
6024 |
/**
|
6025 |
-
*
|
6026 |
-
*
|
6027 |
-
* @class
|
6028 |
-
* @param {string=} message The message.
|
6029 |
*/
|
6030 |
-
function
|
6031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6032 |
}
|
6033 |
-
|
6034 |
-
Cancel.prototype.toString = function toString() {
|
6035 |
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
6036 |
-
};
|
6037 |
-
|
6038 |
-
Cancel.prototype.__CANCEL__ = true;
|
6039 |
-
|
6040 |
-
module.exports = Cancel;
|
6041 |
-
|
6042 |
|
6043 |
/***/ }),
|
6044 |
|
6045 |
-
/***/
|
6046 |
-
/***/ (function(
|
6047 |
|
6048 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6049 |
|
6050 |
|
6051 |
-
var Cancel = __webpack_require__(65263);
|
6052 |
-
|
6053 |
/**
|
6054 |
-
*
|
6055 |
-
*
|
6056 |
-
* @
|
6057 |
-
* @
|
6058 |
*/
|
6059 |
-
function
|
6060 |
-
|
6061 |
-
|
6062 |
-
|
6063 |
-
|
6064 |
-
var resolvePromise;
|
6065 |
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
6066 |
-
resolvePromise = resolve;
|
6067 |
-
});
|
6068 |
-
|
6069 |
-
var token = this;
|
6070 |
-
executor(function cancel(message) {
|
6071 |
-
if (token.reason) {
|
6072 |
-
// Cancellation has already been requested
|
6073 |
-
return;
|
6074 |
}
|
6075 |
-
|
6076 |
-
|
6077 |
-
|
6078 |
-
|
6079 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6080 |
|
6081 |
/**
|
6082 |
-
*
|
6083 |
*/
|
6084 |
-
|
6085 |
-
|
6086 |
-
|
6087 |
-
|
6088 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6089 |
|
6090 |
/**
|
6091 |
-
*
|
6092 |
-
*
|
6093 |
-
|
6094 |
-
|
6095 |
-
|
6096 |
-
|
6097 |
-
|
6098 |
-
|
6099 |
-
|
6100 |
-
|
6101 |
-
|
6102 |
-
|
6103 |
-
|
6104 |
-
|
6105 |
-
|
6106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6107 |
|
6108 |
/***/ }),
|
6109 |
|
6110 |
-
/***/
|
6111 |
-
/***/ (function(
|
6112 |
|
6113 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6114 |
|
6115 |
|
6116 |
-
module.exports = function isCancel(value) {
|
6117 |
-
return !!(value && value.__CANCEL__);
|
6118 |
-
};
|
6119 |
|
6120 |
|
6121 |
-
/***/ }),
|
6122 |
|
6123 |
-
|
6124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6125 |
|
6126 |
-
|
6127 |
|
|
|
6128 |
|
6129 |
-
|
6130 |
-
|
6131 |
-
|
6132 |
-
|
6133 |
-
|
6134 |
-
|
|
|
|
|
|
|
|
|
|
|
6135 |
|
6136 |
-
var validators = validator.validators;
|
6137 |
/**
|
6138 |
-
*
|
|
|
|
|
|
|
6139 |
*
|
6140 |
-
*
|
|
|
|
|
|
|
|
|
6141 |
*/
|
6142 |
-
function Axios(instanceConfig) {
|
6143 |
-
this.defaults = instanceConfig;
|
6144 |
-
this.interceptors = {
|
6145 |
-
request: new InterceptorManager(),
|
6146 |
-
response: new InterceptorManager()
|
6147 |
-
};
|
6148 |
-
}
|
6149 |
|
6150 |
/**
|
6151 |
-
*
|
6152 |
*
|
6153 |
-
*
|
6154 |
*/
|
6155 |
-
|
6156 |
-
|
6157 |
-
|
6158 |
-
|
6159 |
-
|
6160 |
-
|
6161 |
-
|
6162 |
-
|
6163 |
-
|
6164 |
-
|
6165 |
-
|
6166 |
-
|
6167 |
-
|
6168 |
-
|
6169 |
-
|
6170 |
-
|
6171 |
-
|
6172 |
-
|
6173 |
-
|
6174 |
-
|
6175 |
-
|
6176 |
-
|
|
|
|
|
|
|
|
|
6177 |
|
6178 |
-
|
6179 |
-
validator.assertOptions(transitional, {
|
6180 |
-
silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
6181 |
-
forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
6182 |
-
clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
|
6183 |
-
}, false);
|
6184 |
-
}
|
6185 |
|
6186 |
-
|
6187 |
-
var requestInterceptorChain = [];
|
6188 |
-
var synchronousRequestInterceptors = true;
|
6189 |
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
6190 |
-
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
6191 |
-
return;
|
6192 |
-
}
|
6193 |
|
6194 |
-
|
|
|
6195 |
|
6196 |
-
|
6197 |
-
|
|
|
|
|
|
|
|
|
|
|
6198 |
|
6199 |
-
var responseInterceptorChain = [];
|
6200 |
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
6201 |
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
6202 |
-
});
|
6203 |
|
6204 |
-
|
6205 |
-
|
6206 |
-
|
6207 |
-
|
6208 |
-
|
6209 |
-
|
6210 |
-
|
6211 |
-
|
6212 |
-
|
6213 |
-
|
6214 |
-
|
6215 |
-
}
|
6216 |
-
|
6217 |
-
return promise;
|
6218 |
-
}
|
6219 |
-
|
6220 |
-
|
6221 |
-
var newConfig = config;
|
6222 |
-
while (requestInterceptorChain.length) {
|
6223 |
-
var onFulfilled = requestInterceptorChain.shift();
|
6224 |
-
var onRejected = requestInterceptorChain.shift();
|
6225 |
try {
|
6226 |
-
|
6227 |
-
|
6228 |
-
|
6229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6230 |
}
|
6231 |
-
}
|
6232 |
-
|
6233 |
-
try {
|
6234 |
-
promise = dispatchRequest(newConfig);
|
6235 |
-
} catch (error) {
|
6236 |
-
return Promise.reject(error);
|
6237 |
-
}
|
6238 |
-
|
6239 |
-
while (responseInterceptorChain.length) {
|
6240 |
-
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
6241 |
-
}
|
6242 |
-
|
6243 |
-
return promise;
|
6244 |
-
};
|
6245 |
-
|
6246 |
-
Axios.prototype.getUri = function getUri(config) {
|
6247 |
-
config = mergeConfig(this.defaults, config);
|
6248 |
-
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
6249 |
-
};
|
6250 |
-
|
6251 |
-
// Provide aliases for supported request methods
|
6252 |
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
6253 |
-
/*eslint func-names:0*/
|
6254 |
-
Axios.prototype[method] = function(url, config) {
|
6255 |
-
return this.request(mergeConfig(config || {}, {
|
6256 |
-
method: method,
|
6257 |
-
url: url,
|
6258 |
-
data: (config || {}).data
|
6259 |
-
}));
|
6260 |
-
};
|
6261 |
-
});
|
6262 |
-
|
6263 |
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
6264 |
-
/*eslint func-names:0*/
|
6265 |
-
Axios.prototype[method] = function(url, data, config) {
|
6266 |
-
return this.request(mergeConfig(config || {}, {
|
6267 |
-
method: method,
|
6268 |
-
url: url,
|
6269 |
-
data: data
|
6270 |
-
}));
|
6271 |
-
};
|
6272 |
-
});
|
6273 |
-
|
6274 |
-
module.exports = Axios;
|
6275 |
-
|
6276 |
-
|
6277 |
-
/***/ }),
|
6278 |
-
|
6279 |
-
/***/ 80782:
|
6280 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
6281 |
-
|
6282 |
-
"use strict";
|
6283 |
-
|
6284 |
-
|
6285 |
-
var utils = __webpack_require__(64867);
|
6286 |
-
|
6287 |
-
function InterceptorManager() {
|
6288 |
-
this.handlers = [];
|
6289 |
}
|
6290 |
-
|
6291 |
-
/**
|
6292 |
-
* Add a new interceptor to the stack
|
6293 |
-
*
|
6294 |
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
6295 |
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
6296 |
-
*
|
6297 |
-
* @return {Number} An ID used to remove interceptor later
|
6298 |
-
*/
|
6299 |
-
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
6300 |
-
this.handlers.push({
|
6301 |
-
fulfilled: fulfilled,
|
6302 |
-
rejected: rejected,
|
6303 |
-
synchronous: options ? options.synchronous : false,
|
6304 |
-
runWhen: options ? options.runWhen : null
|
6305 |
-
});
|
6306 |
-
return this.handlers.length - 1;
|
6307 |
-
};
|
6308 |
-
|
6309 |
/**
|
6310 |
-
*
|
6311 |
-
*
|
6312 |
-
* @
|
6313 |
*/
|
6314 |
-
|
6315 |
-
|
6316 |
-
|
6317 |
-
|
6318 |
-
|
6319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6320 |
/**
|
6321 |
-
*
|
6322 |
-
*
|
6323 |
-
* This method is particularly useful for skipping over any
|
6324 |
-
* interceptors that may have become `null` calling `eject`.
|
6325 |
-
*
|
6326 |
-
* @param {Function} fn The function to call for each interceptor
|
6327 |
*/
|
6328 |
-
|
6329 |
-
|
6330 |
-
|
6331 |
-
|
6332 |
}
|
6333 |
-
|
6334 |
-
|
6335 |
-
|
6336 |
-
|
6337 |
-
|
6338 |
|
6339 |
/***/ }),
|
6340 |
|
6341 |
-
/***/
|
6342 |
-
/***/ (function(
|
6343 |
|
6344 |
"use strict";
|
6345 |
-
|
6346 |
-
|
6347 |
-
|
6348 |
-
|
6349 |
-
|
6350 |
-
|
6351 |
-
* Creates a new URL by combining the baseURL with the requestedURL,
|
6352 |
-
* only when the requestedURL is not already an absolute URL.
|
6353 |
-
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
6354 |
*
|
6355 |
-
*
|
6356 |
-
*
|
6357 |
-
*
|
|
|
|
|
|
|
|
|
|
|
6358 |
*/
|
6359 |
-
|
6360 |
-
|
6361 |
-
|
6362 |
-
}
|
6363 |
-
return requestedURL;
|
6364 |
-
};
|
6365 |
-
|
6366 |
|
6367 |
/***/ }),
|
6368 |
|
6369 |
-
/***/
|
6370 |
-
/***/ (function(
|
6371 |
|
6372 |
"use strict";
|
6373 |
-
|
6374 |
-
|
6375 |
-
|
6376 |
-
|
|
|
6377 |
/**
|
6378 |
-
*
|
6379 |
-
*
|
6380 |
-
* @param {string} message The error message.
|
6381 |
-
* @param {Object} config The config.
|
6382 |
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
6383 |
-
* @param {Object} [request] The request.
|
6384 |
-
* @param {Object} [response] The response.
|
6385 |
-
* @returns {Error} The created error.
|
6386 |
*/
|
6387 |
-
module.exports = function createError(message, config, code, request, response) {
|
6388 |
-
var error = new Error(message);
|
6389 |
-
return enhanceError(error, config, code, request, response);
|
6390 |
-
};
|
6391 |
-
|
6392 |
-
|
6393 |
-
/***/ }),
|
6394 |
-
|
6395 |
-
/***/ 13572:
|
6396 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
6397 |
-
|
6398 |
-
"use strict";
|
6399 |
-
|
6400 |
-
|
6401 |
-
var utils = __webpack_require__(64867);
|
6402 |
-
var transformData = __webpack_require__(18527);
|
6403 |
-
var isCancel = __webpack_require__(26502);
|
6404 |
-
var defaults = __webpack_require__(45655);
|
6405 |
|
|
|
6406 |
/**
|
6407 |
-
*
|
|
|
|
|
6408 |
*/
|
6409 |
-
function
|
6410 |
-
|
6411 |
-
|
6412 |
-
|
|
|
|
|
|
|
|
|
6413 |
}
|
6414 |
-
|
6415 |
/**
|
6416 |
-
*
|
6417 |
*
|
6418 |
-
*
|
6419 |
-
*
|
|
|
|
|
|
|
|
|
|
|
6420 |
*/
|
6421 |
-
|
6422 |
-
|
6423 |
-
|
6424 |
-
|
6425 |
-
|
6426 |
-
|
6427 |
-
|
6428 |
-
config.data = transformData.call(
|
6429 |
-
config,
|
6430 |
-
config.data,
|
6431 |
-
config.headers,
|
6432 |
-
config.transformRequest
|
6433 |
-
);
|
6434 |
-
|
6435 |
-
// Flatten headers
|
6436 |
-
config.headers = utils.merge(
|
6437 |
-
config.headers.common || {},
|
6438 |
-
config.headers[config.method] || {},
|
6439 |
-
config.headers
|
6440 |
-
);
|
6441 |
-
|
6442 |
-
utils.forEach(
|
6443 |
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
6444 |
-
function cleanHeaderConfig(method) {
|
6445 |
-
delete config.headers[method];
|
6446 |
-
}
|
6447 |
-
);
|
6448 |
-
|
6449 |
-
var adapter = config.adapter || defaults.adapter;
|
6450 |
-
|
6451 |
-
return adapter(config).then(function onAdapterResolution(response) {
|
6452 |
-
throwIfCancellationRequested(config);
|
6453 |
-
|
6454 |
-
// Transform response data
|
6455 |
-
response.data = transformData.call(
|
6456 |
-
config,
|
6457 |
-
response.data,
|
6458 |
-
response.headers,
|
6459 |
-
config.transformResponse
|
6460 |
-
);
|
6461 |
-
|
6462 |
-
return response;
|
6463 |
-
}, function onAdapterRejection(reason) {
|
6464 |
-
if (!isCancel(reason)) {
|
6465 |
-
throwIfCancellationRequested(config);
|
6466 |
-
|
6467 |
-
// Transform response data
|
6468 |
-
if (reason && reason.response) {
|
6469 |
-
reason.response.data = transformData.call(
|
6470 |
-
config,
|
6471 |
-
reason.response.data,
|
6472 |
-
reason.response.headers,
|
6473 |
-
config.transformResponse
|
6474 |
-
);
|
6475 |
-
}
|
6476 |
-
}
|
6477 |
-
|
6478 |
-
return Promise.reject(reason);
|
6479 |
-
});
|
6480 |
-
};
|
6481 |
-
|
6482 |
|
6483 |
/***/ }),
|
6484 |
|
6485 |
-
/***/
|
6486 |
-
/***/ (function(
|
6487 |
|
6488 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6489 |
|
6490 |
|
6491 |
-
/**
|
6492 |
-
* Update an Error with the specified config, error code, and response.
|
6493 |
-
*
|
6494 |
-
* @param {Error} error The error to update.
|
6495 |
-
* @param {Object} config The config.
|
6496 |
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
6497 |
-
* @param {Object} [request] The request.
|
6498 |
-
* @param {Object} [response] The response.
|
6499 |
-
* @returns {Error} The error.
|
6500 |
-
*/
|
6501 |
-
module.exports = function enhanceError(error, config, code, request, response) {
|
6502 |
-
error.config = config;
|
6503 |
-
if (code) {
|
6504 |
-
error.code = code;
|
6505 |
-
}
|
6506 |
-
|
6507 |
-
error.request = request;
|
6508 |
-
error.response = response;
|
6509 |
-
error.isAxiosError = true;
|
6510 |
-
|
6511 |
-
error.toJSON = function toJSON() {
|
6512 |
-
return {
|
6513 |
-
// Standard
|
6514 |
-
message: this.message,
|
6515 |
-
name: this.name,
|
6516 |
-
// Microsoft
|
6517 |
-
description: this.description,
|
6518 |
-
number: this.number,
|
6519 |
-
// Mozilla
|
6520 |
-
fileName: this.fileName,
|
6521 |
-
lineNumber: this.lineNumber,
|
6522 |
-
columnNumber: this.columnNumber,
|
6523 |
-
stack: this.stack,
|
6524 |
-
// Axios
|
6525 |
-
config: this.config,
|
6526 |
-
code: this.code
|
6527 |
-
};
|
6528 |
-
};
|
6529 |
-
return error;
|
6530 |
-
};
|
6531 |
-
|
6532 |
|
6533 |
-
/***/ }),
|
6534 |
|
6535 |
-
/***/ 47185:
|
6536 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
6537 |
|
6538 |
-
"use strict";
|
6539 |
|
6540 |
|
6541 |
-
var utils = __webpack_require__(64867);
|
6542 |
|
|
|
6543 |
/**
|
6544 |
-
*
|
6545 |
-
*
|
6546 |
-
*
|
6547 |
-
*
|
6548 |
-
*
|
6549 |
-
*
|
|
|
|
|
6550 |
*/
|
6551 |
-
|
6552 |
-
|
6553 |
-
|
6554 |
-
|
6555 |
-
|
6556 |
-
|
6557 |
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
6558 |
-
var defaultToConfig2Keys = [
|
6559 |
-
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
6560 |
-
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
6561 |
-
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
6562 |
-
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
6563 |
-
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
6564 |
-
];
|
6565 |
-
var directMergeKeys = ['validateStatus'];
|
6566 |
-
|
6567 |
-
function getMergedValue(target, source) {
|
6568 |
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
6569 |
-
return utils.merge(target, source);
|
6570 |
-
} else if (utils.isPlainObject(source)) {
|
6571 |
-
return utils.merge({}, source);
|
6572 |
-
} else if (utils.isArray(source)) {
|
6573 |
-
return source.slice();
|
6574 |
}
|
6575 |
-
|
6576 |
-
|
6577 |
-
|
6578 |
-
|
6579 |
-
|
6580 |
-
|
6581 |
-
|
6582 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6583 |
}
|
6584 |
-
|
6585 |
-
|
6586 |
-
|
6587 |
-
|
6588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6589 |
}
|
6590 |
-
|
6591 |
-
|
6592 |
-
|
6593 |
-
|
6594 |
-
|
6595 |
-
|
6596 |
-
|
6597 |
-
|
6598 |
-
|
|
|
|
|
6599 |
}
|
6600 |
-
|
6601 |
-
|
6602 |
-
|
6603 |
-
|
6604 |
-
|
6605 |
-
|
6606 |
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
6607 |
}
|
6608 |
-
|
6609 |
-
|
6610 |
-
|
6611 |
-
|
6612 |
-
|
6613 |
-
|
6614 |
-
|
6615 |
-
|
6616 |
-
|
6617 |
-
|
6618 |
-
|
6619 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6620 |
});
|
6621 |
-
|
6622 |
-
|
6623 |
-
|
6624 |
-
|
6625 |
-
|
6626 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6627 |
|
6628 |
/***/ }),
|
6629 |
|
6630 |
-
/***/
|
6631 |
-
/***/ (function(
|
6632 |
|
6633 |
"use strict";
|
6634 |
-
|
6635 |
-
|
6636 |
-
|
6637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6638 |
/**
|
6639 |
-
*
|
|
|
6640 |
*
|
6641 |
-
* @param
|
6642 |
-
* @
|
6643 |
-
* @param {object} response The response.
|
6644 |
*/
|
6645 |
-
|
6646 |
-
|
6647 |
-
|
6648 |
-
|
6649 |
-
|
6650 |
-
|
6651 |
-
|
6652 |
-
|
6653 |
-
|
6654 |
-
|
6655 |
-
|
6656 |
-
)
|
6657 |
-
|
6658 |
-
|
6659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6660 |
|
6661 |
/***/ }),
|
6662 |
|
6663 |
-
/***/
|
6664 |
-
/***/ (function(
|
6665 |
|
6666 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6667 |
|
6668 |
|
6669 |
-
var utils = __webpack_require__(64867);
|
6670 |
-
var defaults = __webpack_require__(45655);
|
6671 |
|
|
|
|
|
|
|
|
|
|
|
6672 |
/**
|
6673 |
-
*
|
6674 |
*
|
6675 |
-
* @param
|
6676 |
-
* @
|
6677 |
-
* @param {Array|Function} fns A single function or Array of functions
|
6678 |
-
* @returns {*} The resulting transformed data
|
6679 |
*/
|
6680 |
-
|
6681 |
-
|
6682 |
-
|
6683 |
-
|
6684 |
-
|
6685 |
-
|
6686 |
-
|
6687 |
-
|
6688 |
-
|
6689 |
-
|
6690 |
-
|
6691 |
-
|
6692 |
-
|
6693 |
-
|
6694 |
-
|
6695 |
-
|
6696 |
-
|
6697 |
-
|
6698 |
-
|
6699 |
-
|
6700 |
-
|
6701 |
-
|
6702 |
-
|
6703 |
-
|
6704 |
-
|
6705 |
-
};
|
6706 |
-
|
6707 |
-
function setContentTypeIfUnset(headers, value) {
|
6708 |
-
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
6709 |
-
headers['Content-Type'] = value;
|
6710 |
-
}
|
6711 |
}
|
6712 |
-
|
6713 |
-
|
6714 |
-
|
6715 |
-
|
6716 |
-
|
6717 |
-
|
6718 |
-
|
6719 |
-
|
6720 |
-
|
6721 |
-
|
6722 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6723 |
}
|
6724 |
|
6725 |
-
|
6726 |
-
if (utils.isString(rawValue)) {
|
6727 |
-
try {
|
6728 |
-
(parser || JSON.parse)(rawValue);
|
6729 |
-
return utils.trim(rawValue);
|
6730 |
-
} catch (e) {
|
6731 |
-
if (e.name !== 'SyntaxError') {
|
6732 |
-
throw e;
|
6733 |
-
}
|
6734 |
-
}
|
6735 |
-
}
|
6736 |
|
6737 |
-
|
6738 |
-
}
|
6739 |
|
6740 |
-
|
|
|
6741 |
|
6742 |
-
|
6743 |
-
|
6744 |
-
|
6745 |
-
|
6746 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6747 |
|
6748 |
-
adapter: getDefaultAdapter(),
|
6749 |
|
6750 |
-
transformRequest: [function transformRequest(data, headers) {
|
6751 |
-
normalizeHeaderName(headers, 'Accept');
|
6752 |
-
normalizeHeaderName(headers, 'Content-Type');
|
6753 |
|
6754 |
-
|
6755 |
-
|
6756 |
-
|
6757 |
-
|
6758 |
-
|
6759 |
-
|
6760 |
-
|
6761 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6762 |
}
|
6763 |
-
|
6764 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6765 |
}
|
6766 |
-
|
6767 |
-
|
6768 |
-
|
6769 |
}
|
6770 |
-
|
6771 |
-
|
6772 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6773 |
}
|
6774 |
-
|
6775 |
-
|
6776 |
-
|
6777 |
-
|
6778 |
-
var transitional = this.transitional;
|
6779 |
-
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
6780 |
-
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
6781 |
-
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
6782 |
-
|
6783 |
-
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
|
6784 |
-
try {
|
6785 |
-
return JSON.parse(data);
|
6786 |
-
} catch (e) {
|
6787 |
-
if (strictJSONParsing) {
|
6788 |
-
if (e.name === 'SyntaxError') {
|
6789 |
-
throw enhanceError(e, this, 'E_JSON_PARSE');
|
6790 |
-
}
|
6791 |
-
throw e;
|
6792 |
}
|
6793 |
-
|
6794 |
}
|
6795 |
-
|
6796 |
-
|
6797 |
-
|
6798 |
-
|
6799 |
-
|
6800 |
-
|
6801 |
-
|
6802 |
-
|
6803 |
-
|
6804 |
-
|
6805 |
-
|
6806 |
-
|
6807 |
-
|
6808 |
-
|
6809 |
-
|
6810 |
-
|
6811 |
-
|
6812 |
-
|
6813 |
-
}
|
6814 |
-
};
|
6815 |
-
|
6816 |
-
defaults.headers = {
|
6817 |
-
common: {
|
6818 |
-
'Accept': 'application/json, text/plain, */*'
|
6819 |
-
}
|
6820 |
-
};
|
6821 |
-
|
6822 |
-
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
6823 |
-
defaults.headers[method] = {};
|
6824 |
-
});
|
6825 |
-
|
6826 |
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
6827 |
-
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
6828 |
-
});
|
6829 |
-
|
6830 |
-
module.exports = defaults;
|
6831 |
-
|
6832 |
-
|
6833 |
-
/***/ }),
|
6834 |
-
|
6835 |
-
/***/ 91849:
|
6836 |
-
/***/ (function(module) {
|
6837 |
-
|
6838 |
-
"use strict";
|
6839 |
-
|
6840 |
-
|
6841 |
-
module.exports = function bind(fn, thisArg) {
|
6842 |
-
return function wrap() {
|
6843 |
-
var args = new Array(arguments.length);
|
6844 |
-
for (var i = 0; i < args.length; i++) {
|
6845 |
-
args[i] = arguments[i];
|
6846 |
}
|
6847 |
-
return fn.apply(thisArg, args);
|
6848 |
-
};
|
6849 |
-
};
|
6850 |
-
|
6851 |
-
|
6852 |
-
/***/ }),
|
6853 |
-
|
6854 |
-
/***/ 15327:
|
6855 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
6856 |
-
|
6857 |
-
"use strict";
|
6858 |
-
|
6859 |
-
|
6860 |
-
var utils = __webpack_require__(64867);
|
6861 |
-
|
6862 |
-
function encode(val) {
|
6863 |
-
return encodeURIComponent(val).
|
6864 |
-
replace(/%3A/gi, ':').
|
6865 |
-
replace(/%24/g, '$').
|
6866 |
-
replace(/%2C/gi, ',').
|
6867 |
-
replace(/%20/g, '+').
|
6868 |
-
replace(/%5B/gi, '[').
|
6869 |
-
replace(/%5D/gi, ']');
|
6870 |
}
|
6871 |
-
|
6872 |
/**
|
6873 |
-
*
|
6874 |
*
|
6875 |
-
* @param
|
6876 |
-
* @param
|
6877 |
-
* @
|
6878 |
*/
|
6879 |
-
|
6880 |
-
|
6881 |
-
|
6882 |
-
return url;
|
6883 |
-
}
|
6884 |
-
|
6885 |
-
var serializedParams;
|
6886 |
-
if (paramsSerializer) {
|
6887 |
-
serializedParams = paramsSerializer(params);
|
6888 |
-
} else if (utils.isURLSearchParams(params)) {
|
6889 |
-
serializedParams = params.toString();
|
6890 |
-
} else {
|
6891 |
-
var parts = [];
|
6892 |
-
|
6893 |
-
utils.forEach(params, function serialize(val, key) {
|
6894 |
-
if (val === null || typeof val === 'undefined') {
|
6895 |
return;
|
6896 |
-
}
|
6897 |
-
|
6898 |
-
if (utils.isArray(val)) {
|
6899 |
-
key = key + '[]';
|
6900 |
-
} else {
|
6901 |
-
val = [val];
|
6902 |
-
}
|
6903 |
-
|
6904 |
-
utils.forEach(val, function parseValue(v) {
|
6905 |
-
if (utils.isDate(v)) {
|
6906 |
-
v = v.toISOString();
|
6907 |
-
} else if (utils.isObject(v)) {
|
6908 |
-
v = JSON.stringify(v);
|
6909 |
-
}
|
6910 |
-
parts.push(encode(key) + '=' + encode(v));
|
6911 |
-
});
|
6912 |
-
});
|
6913 |
-
|
6914 |
-
serializedParams = parts.join('&');
|
6915 |
-
}
|
6916 |
-
|
6917 |
-
if (serializedParams) {
|
6918 |
-
var hashmarkIndex = url.indexOf('#');
|
6919 |
-
if (hashmarkIndex !== -1) {
|
6920 |
-
url = url.slice(0, hashmarkIndex);
|
6921 |
}
|
6922 |
-
|
6923 |
-
|
6924 |
-
|
6925 |
-
|
6926 |
-
|
6927 |
-
|
6928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6929 |
|
6930 |
/***/ }),
|
6931 |
|
6932 |
-
/***/
|
6933 |
-
/***/ (function(module) {
|
6934 |
|
6935 |
"use strict";
|
6936 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6937 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6938 |
/**
|
6939 |
-
*
|
6940 |
*
|
6941 |
-
* @
|
6942 |
-
|
6943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6944 |
*/
|
6945 |
-
module.exports = function combineURLs(baseURL, relativeURL) {
|
6946 |
-
return relativeURL
|
6947 |
-
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
6948 |
-
: baseURL;
|
6949 |
-
};
|
6950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6951 |
|
6952 |
/***/ }),
|
6953 |
|
6954 |
-
/***/
|
6955 |
-
/***/ (function(
|
6956 |
|
6957 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6958 |
|
6959 |
|
6960 |
-
var utils = __webpack_require__(64867);
|
6961 |
-
|
6962 |
-
module.exports = (
|
6963 |
-
utils.isStandardBrowserEnv() ?
|
6964 |
-
|
6965 |
-
// Standard browser envs support document.cookie
|
6966 |
-
(function standardBrowserEnv() {
|
6967 |
-
return {
|
6968 |
-
write: function write(name, value, expires, path, domain, secure) {
|
6969 |
-
var cookie = [];
|
6970 |
-
cookie.push(name + '=' + encodeURIComponent(value));
|
6971 |
-
|
6972 |
-
if (utils.isNumber(expires)) {
|
6973 |
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
6974 |
-
}
|
6975 |
-
|
6976 |
-
if (utils.isString(path)) {
|
6977 |
-
cookie.push('path=' + path);
|
6978 |
-
}
|
6979 |
-
|
6980 |
-
if (utils.isString(domain)) {
|
6981 |
-
cookie.push('domain=' + domain);
|
6982 |
-
}
|
6983 |
-
|
6984 |
-
if (secure === true) {
|
6985 |
-
cookie.push('secure');
|
6986 |
-
}
|
6987 |
-
|
6988 |
-
document.cookie = cookie.join('; ');
|
6989 |
-
},
|
6990 |
|
6991 |
-
read: function read(name) {
|
6992 |
-
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
6993 |
-
return (match ? decodeURIComponent(match[3]) : null);
|
6994 |
-
},
|
6995 |
|
6996 |
-
|
6997 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6998 |
}
|
6999 |
-
|
7000 |
-
|
7001 |
-
|
7002 |
-
|
7003 |
-
|
7004 |
-
|
7005 |
-
|
7006 |
-
read: function read() { return null; },
|
7007 |
-
remove: function remove() {}
|
7008 |
-
};
|
7009 |
-
})()
|
7010 |
-
);
|
7011 |
-
|
7012 |
-
|
7013 |
-
/***/ }),
|
7014 |
-
|
7015 |
-
/***/ 91793:
|
7016 |
-
/***/ (function(module) {
|
7017 |
-
|
7018 |
-
"use strict";
|
7019 |
-
|
7020 |
-
|
7021 |
/**
|
7022 |
-
*
|
7023 |
*
|
7024 |
-
* @param
|
7025 |
-
* @
|
|
|
7026 |
*/
|
7027 |
-
|
7028 |
-
|
7029 |
-
|
7030 |
-
|
7031 |
-
|
7032 |
-
|
7033 |
-
|
7034 |
-
|
7035 |
-
/***/ }),
|
7036 |
-
|
7037 |
-
/***/ 16268:
|
7038 |
-
/***/ (function(module) {
|
7039 |
-
|
7040 |
-
"use strict";
|
7041 |
-
|
7042 |
-
|
7043 |
/**
|
7044 |
-
*
|
|
|
7045 |
*
|
7046 |
-
* @param
|
7047 |
-
* @
|
7048 |
*/
|
7049 |
-
|
7050 |
-
|
7051 |
-
|
7052 |
-
|
7053 |
-
|
7054 |
-
/***/ }),
|
7055 |
-
|
7056 |
-
/***/ 67985:
|
7057 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
7058 |
-
|
7059 |
-
"use strict";
|
7060 |
-
|
7061 |
-
|
7062 |
-
var utils = __webpack_require__(64867);
|
7063 |
-
|
7064 |
-
module.exports = (
|
7065 |
-
utils.isStandardBrowserEnv() ?
|
7066 |
-
|
7067 |
-
// Standard browser envs have full support of the APIs needed to test
|
7068 |
-
// whether the request URL is of the same origin as current location.
|
7069 |
-
(function standardBrowserEnv() {
|
7070 |
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
7071 |
-
var urlParsingNode = document.createElement('a');
|
7072 |
-
var originURL;
|
7073 |
-
|
7074 |
-
/**
|
7075 |
-
* Parse a URL to discover it's components
|
7076 |
-
*
|
7077 |
-
* @param {String} url The URL to be parsed
|
7078 |
-
* @returns {Object}
|
7079 |
-
*/
|
7080 |
-
function resolveURL(url) {
|
7081 |
-
var href = url;
|
7082 |
-
|
7083 |
-
if (msie) {
|
7084 |
-
// IE needs attribute set twice to normalize properties
|
7085 |
-
urlParsingNode.setAttribute('href', href);
|
7086 |
-
href = urlParsingNode.href;
|
7087 |
-
}
|
7088 |
-
|
7089 |
-
urlParsingNode.setAttribute('href', href);
|
7090 |
-
|
7091 |
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
7092 |
-
return {
|
7093 |
-
href: urlParsingNode.href,
|
7094 |
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
7095 |
-
host: urlParsingNode.host,
|
7096 |
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
7097 |
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
7098 |
-
hostname: urlParsingNode.hostname,
|
7099 |
-
port: urlParsingNode.port,
|
7100 |
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
7101 |
-
urlParsingNode.pathname :
|
7102 |
-
'/' + urlParsingNode.pathname
|
7103 |
-
};
|
7104 |
-
}
|
7105 |
-
|
7106 |
-
originURL = resolveURL(window.location.href);
|
7107 |
-
|
7108 |
-
/**
|
7109 |
-
* Determine if a URL shares the same origin as the current location
|
7110 |
-
*
|
7111 |
-
* @param {String} requestURL The URL to test
|
7112 |
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
7113 |
-
*/
|
7114 |
-
return function isURLSameOrigin(requestURL) {
|
7115 |
-
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
7116 |
-
return (parsed.protocol === originURL.protocol &&
|
7117 |
-
parsed.host === originURL.host);
|
7118 |
-
};
|
7119 |
-
})() :
|
7120 |
-
|
7121 |
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
7122 |
-
(function nonStandardBrowserEnv() {
|
7123 |
-
return function isURLSameOrigin() {
|
7124 |
-
return true;
|
7125 |
-
};
|
7126 |
-
})()
|
7127 |
-
);
|
7128 |
-
|
7129 |
-
|
7130 |
-
/***/ }),
|
7131 |
-
|
7132 |
-
/***/ 16016:
|
7133 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
7134 |
-
|
7135 |
-
"use strict";
|
7136 |
-
|
7137 |
-
|
7138 |
-
var utils = __webpack_require__(64867);
|
7139 |
-
|
7140 |
-
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
7141 |
-
utils.forEach(headers, function processHeader(value, name) {
|
7142 |
-
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
7143 |
-
headers[normalizedName] = value;
|
7144 |
-
delete headers[name];
|
7145 |
-
}
|
7146 |
-
});
|
7147 |
-
};
|
7148 |
-
|
7149 |
-
|
7150 |
-
/***/ }),
|
7151 |
-
|
7152 |
-
/***/ 84109:
|
7153 |
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
7154 |
-
|
7155 |
-
"use strict";
|
7156 |
-
|
7157 |
-
|
7158 |
-
var utils = __webpack_require__(64867);
|
7159 |
-
|
7160 |
-
// Headers whose duplicates are ignored by node
|
7161 |
-
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
7162 |
-
var ignoreDuplicateOf = [
|
7163 |
-
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
7164 |
-
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
7165 |
-
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
7166 |
-
'referer', 'retry-after', 'user-agent'
|
7167 |
-
];
|
7168 |
-
|
7169 |
/**
|
7170 |
-
*
|
7171 |
-
*
|
7172 |
-
* ```
|
7173 |
-
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
7174 |
-
* Content-Type: application/json
|
7175 |
-
* Connection: keep-alive
|
7176 |
-
* Transfer-Encoding: chunked
|
7177 |
-
* ```
|
7178 |
*
|
7179 |
-
* @param
|
7180 |
-
* @returns
|
7181 |
*/
|
7182 |
-
|
7183 |
-
|
7184 |
-
|
7185 |
-
var val;
|
7186 |
-
var i;
|
7187 |
-
|
7188 |
-
if (!headers) { return parsed; }
|
7189 |
-
|
7190 |
-
utils.forEach(headers.split('\n'), function parser(line) {
|
7191 |
-
i = line.indexOf(':');
|
7192 |
-
key = utils.trim(line.substr(0, i)).toLowerCase();
|
7193 |
-
val = utils.trim(line.substr(i + 1));
|
7194 |
-
|
7195 |
-
if (key) {
|
7196 |
-
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
7197 |
-
return;
|
7198 |
-
}
|
7199 |
-
if (key === 'set-cookie') {
|
7200 |
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
7201 |
-
} else {
|
7202 |
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
7203 |
-
}
|
7204 |
-
}
|
7205 |
-
});
|
7206 |
-
|
7207 |
-
return parsed;
|
7208 |
-
};
|
7209 |
-
|
7210 |
-
|
7211 |
-
/***/ }),
|
7212 |
-
|
7213 |
-
/***/ 8713:
|
7214 |
-
/***/ (function(module) {
|
7215 |
-
|
7216 |
-
"use strict";
|
7217 |
-
|
7218 |
-
|
7219 |
/**
|
7220 |
-
*
|
7221 |
-
*
|
7222 |
-
* Common use case would be to use `Function.prototype.apply`.
|
7223 |
*
|
7224 |
-
*
|
7225 |
-
*
|
7226 |
-
|
7227 |
-
|
7228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7229 |
*
|
7230 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7231 |
*
|
7232 |
-
*
|
7233 |
-
*
|
7234 |
-
* ```
|
7235 |
*
|
7236 |
-
* @param
|
7237 |
-
* @returns
|
7238 |
*/
|
7239 |
-
|
7240 |
-
|
7241 |
-
|
7242 |
-
|
7243 |
-
|
7244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7245 |
|
7246 |
/***/ }),
|
7247 |
|
7248 |
-
/***/
|
7249 |
-
/***/ (function(
|
7250 |
|
7251 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
7252 |
|
7253 |
-
|
7254 |
-
var pkg = __webpack_require__(20696);
|
7255 |
-
|
7256 |
-
var validators = {};
|
7257 |
-
|
7258 |
-
// eslint-disable-next-line func-names
|
7259 |
-
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
7260 |
-
validators[type] = function validator(thing) {
|
7261 |
-
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
7262 |
-
};
|
7263 |
-
});
|
7264 |
-
|
7265 |
-
var deprecatedWarnings = {};
|
7266 |
-
var currentVerArr = pkg.version.split('.');
|
7267 |
-
|
7268 |
/**
|
7269 |
-
*
|
7270 |
-
*
|
7271 |
-
*
|
7272 |
-
*
|
|
|
7273 |
*/
|
7274 |
-
function
|
7275 |
-
|
7276 |
-
|
7277 |
-
|
7278 |
-
if (pkgVersionArr[i] > destVer[i]) {
|
7279 |
-
return true;
|
7280 |
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
7281 |
-
return false;
|
7282 |
}
|
7283 |
-
|
7284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7285 |
}
|
7286 |
-
|
7287 |
/**
|
7288 |
-
*
|
7289 |
-
* @param {function|boolean?} validator
|
7290 |
-
* @param {string?} version
|
7291 |
-
* @param {string} message
|
7292 |
-
* @returns {function}
|
7293 |
*/
|
7294 |
-
|
7295 |
-
|
7296 |
-
|
7297 |
-
function formatMessage(opt, desc) {
|
7298 |
-
return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
7299 |
-
}
|
7300 |
-
|
7301 |
-
// eslint-disable-next-line func-names
|
7302 |
-
return function(value, opt, opts) {
|
7303 |
-
if (validator === false) {
|
7304 |
-
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
7305 |
}
|
7306 |
-
|
7307 |
-
|
7308 |
-
|
7309 |
-
|
7310 |
-
|
7311 |
-
|
7312 |
-
opt,
|
7313 |
-
' has been deprecated since v' + version + ' and will be removed in the near future'
|
7314 |
-
)
|
7315 |
-
);
|
7316 |
}
|
7317 |
-
|
7318 |
-
|
7319 |
-
|
7320 |
-
}
|
7321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7322 |
/**
|
7323 |
-
*
|
7324 |
-
* @param {object} options
|
7325 |
-
* @param {object} schema
|
7326 |
-
* @param {boolean?} allowUnknown
|
7327 |
*/
|
7328 |
-
|
7329 |
-
|
7330 |
-
|
7331 |
-
|
7332 |
-
|
7333 |
-
|
7334 |
-
var i = keys.length;
|
7335 |
-
while (i-- > 0) {
|
7336 |
-
var opt = keys[i];
|
7337 |
-
var validator = schema[opt];
|
7338 |
-
if (validator) {
|
7339 |
-
var value = options[opt];
|
7340 |
-
var result = value === undefined || validator(value, opt, options);
|
7341 |
-
if (result !== true) {
|
7342 |
-
throw new TypeError('option ' + opt + ' must be ' + result);
|
7343 |
-
}
|
7344 |
-
continue;
|
7345 |
}
|
7346 |
-
|
7347 |
-
|
|
|
|
|
7348 |
}
|
7349 |
-
}
|
7350 |
}
|
7351 |
-
|
7352 |
-
module.exports = {
|
7353 |
-
isOlderVersion: isOlderVersion,
|
7354 |
-
assertOptions: assertOptions,
|
7355 |
-
validators: validators
|
7356 |
-
};
|
7357 |
-
|
7358 |
|
7359 |
/***/ }),
|
7360 |
|
7361 |
-
/***/
|
7362 |
-
/***/ (function(
|
7363 |
|
7364 |
"use strict";
|
7365 |
-
|
7366 |
-
|
7367 |
-
|
7368 |
-
|
7369 |
-
|
7370 |
-
|
7371 |
-
var
|
7372 |
|
7373 |
/**
|
7374 |
-
*
|
7375 |
*
|
7376 |
-
* @param
|
7377 |
-
* @
|
|
|
7378 |
*/
|
7379 |
-
function
|
7380 |
-
|
|
|
|
|
|
|
|
|
7381 |
}
|
7382 |
-
|
7383 |
/**
|
7384 |
-
*
|
|
|
7385 |
*
|
7386 |
-
* @param
|
7387 |
-
* @
|
7388 |
-
|
7389 |
-
function isUndefined(val) {
|
7390 |
-
return typeof val === 'undefined';
|
7391 |
-
}
|
7392 |
-
|
7393 |
-
/**
|
7394 |
-
* Determine if a value is a Buffer
|
7395 |
-
*
|
7396 |
-
* @param {Object} val The value to test
|
7397 |
-
* @returns {boolean} True if value is a Buffer, otherwise false
|
7398 |
-
*/
|
7399 |
-
function isBuffer(val) {
|
7400 |
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
7401 |
-
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
7402 |
-
}
|
7403 |
-
|
7404 |
-
/**
|
7405 |
-
* Determine if a value is an ArrayBuffer
|
7406 |
-
*
|
7407 |
-
* @param {Object} val The value to test
|
7408 |
-
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
7409 |
-
*/
|
7410 |
-
function isArrayBuffer(val) {
|
7411 |
-
return toString.call(val) === '[object ArrayBuffer]';
|
7412 |
-
}
|
7413 |
-
|
7414 |
-
/**
|
7415 |
-
* Determine if a value is a FormData
|
7416 |
-
*
|
7417 |
-
* @param {Object} val The value to test
|
7418 |
-
* @returns {boolean} True if value is an FormData, otherwise false
|
7419 |
*/
|
7420 |
-
function
|
7421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7422 |
}
|
7423 |
-
|
7424 |
/**
|
7425 |
-
*
|
7426 |
-
*
|
7427 |
-
* @param
|
7428 |
-
* @returns
|
7429 |
*/
|
7430 |
-
|
7431 |
-
|
7432 |
-
|
7433 |
-
|
7434 |
-
|
7435 |
-
|
7436 |
-
|
7437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7438 |
}
|
7439 |
-
|
7440 |
/**
|
7441 |
-
*
|
7442 |
-
*
|
7443 |
-
* @param
|
7444 |
-
* @returns {boolean} True if value is a String, otherwise false
|
7445 |
*/
|
7446 |
-
function
|
7447 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7448 |
}
|
7449 |
-
|
7450 |
/**
|
7451 |
-
*
|
|
|
7452 |
*
|
7453 |
-
*
|
7454 |
-
*
|
7455 |
-
|
7456 |
-
function isNumber(val) {
|
7457 |
-
return typeof val === 'number';
|
7458 |
-
}
|
7459 |
-
|
7460 |
-
/**
|
7461 |
-
* Determine if a value is an Object
|
7462 |
*
|
7463 |
-
* @param
|
7464 |
-
* @returns
|
7465 |
*/
|
7466 |
-
function
|
7467 |
-
|
|
|
|
|
7468 |
}
|
|
|
7469 |
|
7470 |
-
|
7471 |
-
* Determine if a value is a plain Object
|
7472 |
-
*
|
7473 |
-
* @param {Object} val The value to test
|
7474 |
-
* @return {boolean} True if value is a plain Object, otherwise false
|
7475 |
-
*/
|
7476 |
-
function isPlainObject(val) {
|
7477 |
-
if (toString.call(val) !== '[object Object]') {
|
7478 |
-
return false;
|
7479 |
-
}
|
7480 |
|
7481 |
-
|
7482 |
-
|
7483 |
-
}
|
7484 |
|
7485 |
-
|
7486 |
-
|
7487 |
-
|
7488 |
-
|
7489 |
-
|
7490 |
-
*/
|
7491 |
-
function
|
7492 |
-
|
7493 |
-
|
|
|
|
|
|
|
7494 |
|
7495 |
-
/**
|
7496 |
-
* Determine if a value is a File
|
7497 |
-
*
|
7498 |
-
* @param {Object} val The value to test
|
7499 |
-
* @returns {boolean} True if value is a File, otherwise false
|
7500 |
-
*/
|
7501 |
-
function isFile(val) {
|
7502 |
-
return toString.call(val) === '[object File]';
|
7503 |
-
}
|
7504 |
|
7505 |
-
/**
|
7506 |
-
* Determine if a value is a Blob
|
7507 |
-
*
|
7508 |
-
* @param {Object} val The value to test
|
7509 |
-
* @returns {boolean} True if value is a Blob, otherwise false
|
7510 |
-
*/
|
7511 |
-
function isBlob(val) {
|
7512 |
-
return toString.call(val) === '[object Blob]';
|
7513 |
-
}
|
7514 |
|
7515 |
/**
|
7516 |
-
*
|
|
|
7517 |
*
|
7518 |
-
* @
|
7519 |
-
* @returns {boolean} True if value is a Function, otherwise false
|
7520 |
*/
|
7521 |
-
function
|
7522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7523 |
}
|
7524 |
-
|
7525 |
/**
|
7526 |
-
*
|
|
|
7527 |
*
|
7528 |
-
* @
|
7529 |
-
* @returns {boolean} True if value is a Stream, otherwise false
|
7530 |
*/
|
7531 |
-
function
|
7532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7533 |
}
|
7534 |
-
|
7535 |
/**
|
7536 |
-
*
|
|
|
7537 |
*
|
7538 |
-
* @
|
7539 |
-
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
7540 |
*/
|
7541 |
-
function
|
7542 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7543 |
}
|
7544 |
-
|
7545 |
/**
|
7546 |
-
*
|
|
|
7547 |
*
|
7548 |
-
* @
|
7549 |
-
* @returns {String} The String freed of excess whitespace
|
7550 |
*/
|
7551 |
-
function
|
7552 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7553 |
}
|
7554 |
-
|
7555 |
/**
|
7556 |
-
*
|
7557 |
-
*
|
7558 |
-
* This allows axios to run in a web worker, and react-native.
|
7559 |
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
7560 |
-
*
|
7561 |
-
* web workers:
|
7562 |
-
* typeof window -> undefined
|
7563 |
-
* typeof document -> undefined
|
7564 |
-
*
|
7565 |
-
* react-native:
|
7566 |
-
* navigator.product -> 'ReactNative'
|
7567 |
-
* nativescript
|
7568 |
-
* navigator.product -> 'NativeScript' or 'NS'
|
7569 |
*/
|
7570 |
-
|
7571 |
-
|
7572 |
-
|
7573 |
-
navigator.product === 'NS')) {
|
7574 |
-
return false;
|
7575 |
-
}
|
7576 |
-
return (
|
7577 |
-
typeof window !== 'undefined' &&
|
7578 |
-
typeof document !== 'undefined'
|
7579 |
-
);
|
7580 |
}
|
7581 |
-
|
7582 |
/**
|
7583 |
-
*
|
7584 |
-
*
|
7585 |
-
* If `obj` is an Array callback will be called passing
|
7586 |
-
* the value, index, and complete array for each item.
|
7587 |
-
*
|
7588 |
-
* If 'obj' is an Object callback will be called passing
|
7589 |
-
* the value, key, and complete object for each property.
|
7590 |
*
|
7591 |
-
* @
|
7592 |
-
* @param {Function} fn The callback to invoke for each item
|
7593 |
*/
|
7594 |
-
function
|
7595 |
-
|
7596 |
-
|
7597 |
-
return;
|
7598 |
-
}
|
7599 |
-
|
7600 |
-
// Force an array if not already something iterable
|
7601 |
-
if (typeof obj !== 'object') {
|
7602 |
-
/*eslint no-param-reassign:0*/
|
7603 |
-
obj = [obj];
|
7604 |
-
}
|
7605 |
-
|
7606 |
-
if (isArray(obj)) {
|
7607 |
-
// Iterate over array values
|
7608 |
-
for (var i = 0, l = obj.length; i < l; i++) {
|
7609 |
-
fn.call(null, obj[i], i, obj);
|
7610 |
}
|
7611 |
-
|
7612 |
-
//
|
7613 |
-
|
7614 |
-
|
7615 |
-
|
7616 |
-
}
|
7617 |
}
|
7618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7619 |
}
|
7620 |
-
|
7621 |
/**
|
7622 |
-
*
|
7623 |
-
*
|
7624 |
-
*
|
7625 |
-
* When multiple objects contain the same key the later object in
|
7626 |
-
* the arguments list will take precedence.
|
7627 |
-
*
|
7628 |
-
* Example:
|
7629 |
-
*
|
7630 |
-
* ```js
|
7631 |
-
* var result = merge({foo: 123}, {foo: 456});
|
7632 |
-
* console.log(result.foo); // outputs 456
|
7633 |
-
* ```
|
7634 |
*
|
7635 |
-
* @
|
7636 |
-
* @returns {Object} Result of all merge properties
|
7637 |
*/
|
7638 |
-
function
|
7639 |
-
|
7640 |
-
function assignValue(val, key) {
|
7641 |
-
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
7642 |
-
result[key] = merge(result[key], val);
|
7643 |
-
} else if (isPlainObject(val)) {
|
7644 |
-
result[key] = merge({}, val);
|
7645 |
-
} else if (isArray(val)) {
|
7646 |
-
result[key] = val.slice();
|
7647 |
-
} else {
|
7648 |
-
result[key] = val;
|
7649 |
-
}
|
7650 |
-
}
|
7651 |
-
|
7652 |
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
7653 |
-
forEach(arguments[i], assignValue);
|
7654 |
-
}
|
7655 |
-
return result;
|
7656 |
}
|
7657 |
-
|
7658 |
/**
|
7659 |
-
*
|
|
|
7660 |
*
|
7661 |
-
* @
|
7662 |
-
* @param {Object} b The object to copy properties from
|
7663 |
-
* @param {Object} thisArg The object to bind function to
|
7664 |
-
* @return {Object} The resulting value of object a
|
7665 |
*/
|
7666 |
-
function
|
7667 |
-
|
7668 |
-
|
7669 |
-
|
7670 |
-
|
7671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7672 |
}
|
7673 |
-
});
|
7674 |
-
return a;
|
7675 |
}
|
7676 |
-
|
7677 |
/**
|
7678 |
-
*
|
|
|
7679 |
*
|
7680 |
-
* @
|
7681 |
-
* @return {string} content value without BOM
|
7682 |
*/
|
7683 |
-
function
|
7684 |
-
|
7685 |
-
|
7686 |
-
|
7687 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7688 |
}
|
7689 |
-
|
7690 |
-
module.exports = {
|
7691 |
-
isArray: isArray,
|
7692 |
-
isArrayBuffer: isArrayBuffer,
|
7693 |
-
isBuffer: isBuffer,
|
7694 |
-
isFormData: isFormData,
|
7695 |
-
isArrayBufferView: isArrayBufferView,
|
7696 |
-
isString: isString,
|
7697 |
-
isNumber: isNumber,
|
7698 |
-
isObject: isObject,
|
7699 |
-
isPlainObject: isPlainObject,
|
7700 |
-
isUndefined: isUndefined,
|
7701 |
-
isDate: isDate,
|
7702 |
-
isFile: isFile,
|
7703 |
-
isBlob: isBlob,
|
7704 |
-
isFunction: isFunction,
|
7705 |
-
isStream: isStream,
|
7706 |
-
isURLSearchParams: isURLSearchParams,
|
7707 |
-
isStandardBrowserEnv: isStandardBrowserEnv,
|
7708 |
-
forEach: forEach,
|
7709 |
-
merge: merge,
|
7710 |
-
extend: extend,
|
7711 |
-
trim: trim,
|
7712 |
-
stripBOM: stripBOM
|
7713 |
-
};
|
7714 |
-
|
7715 |
-
|
7716 |
-
/***/ }),
|
7717 |
-
|
7718 |
-
/***/ 20696:
|
7719 |
-
/***/ (function(module) {
|
7720 |
-
|
7721 |
-
"use strict";
|
7722 |
-
module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}');
|
7723 |
|
7724 |
/***/ }),
|
7725 |
|
7726 |
-
/***/
|
7727 |
-
/***/ (function(__unused_webpack_module,
|
7728 |
|
7729 |
"use strict";
|
7730 |
-
|
7731 |
-
|
7732 |
-
|
7733 |
-
|
7734 |
-
|
7735 |
-
|
7736 |
-
|
7737 |
-
|
7738 |
-
|
|
|
7739 |
|
7740 |
/**
|
7741 |
-
*
|
7742 |
-
*
|
7743 |
-
*
|
7744 |
-
*
|
7745 |
*/
|
7746 |
-
|
7747 |
-
|
7748 |
-
|
7749 |
-
|
7750 |
-
|
7751 |
-
INIT: "@@redux/INIT" + randomString(),
|
7752 |
-
REPLACE: "@@redux/REPLACE" + randomString(),
|
7753 |
-
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
7754 |
-
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
7755 |
-
}
|
7756 |
-
};
|
7757 |
-
|
7758 |
/**
|
7759 |
-
*
|
7760 |
-
*
|
|
|
|
|
7761 |
*/
|
7762 |
-
function
|
7763 |
-
|
7764 |
-
|
7765 |
-
|
7766 |
-
while (Object.getPrototypeOf(proto) !== null) {
|
7767 |
-
proto = Object.getPrototypeOf(proto);
|
7768 |
-
}
|
7769 |
-
|
7770 |
-
return Object.getPrototypeOf(obj) === proto;
|
7771 |
}
|
7772 |
-
|
7773 |
/**
|
7774 |
-
*
|
7775 |
-
*
|
7776 |
-
|
7777 |
-
|
7778 |
-
|
7779 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7780 |
*
|
7781 |
-
*
|
7782 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7783 |
*
|
7784 |
-
*
|
7785 |
-
|
7786 |
-
|
7787 |
-
|
7788 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7789 |
*
|
7790 |
-
*
|
7791 |
-
* to enhance the store with third-party capabilities such as middleware,
|
7792 |
-
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
7793 |
-
* is `applyMiddleware()`.
|
7794 |
*
|
7795 |
-
*
|
7796 |
-
* and
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7797 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7798 |
|
7799 |
-
|
7800 |
-
var _ref2;
|
7801 |
|
7802 |
-
|
7803 |
-
|
7804 |
-
}
|
7805 |
|
7806 |
-
|
7807 |
-
|
7808 |
-
preloadedState = undefined;
|
7809 |
-
}
|
7810 |
|
7811 |
-
|
7812 |
-
|
7813 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7814 |
}
|
|
|
|
|
7815 |
|
7816 |
-
|
7817 |
-
}
|
7818 |
|
7819 |
-
|
7820 |
-
|
7821 |
-
}
|
7822 |
|
7823 |
-
|
7824 |
-
var currentState = preloadedState;
|
7825 |
-
var currentListeners = [];
|
7826 |
-
var nextListeners = currentListeners;
|
7827 |
-
var isDispatching = false;
|
7828 |
-
/**
|
7829 |
-
* This makes a shallow copy of currentListeners so we can use
|
7830 |
-
* nextListeners as a temporary list while dispatching.
|
7831 |
-
*
|
7832 |
-
* This prevents any bugs around consumers calling
|
7833 |
-
* subscribe/unsubscribe in the middle of a dispatch.
|
7834 |
-
*/
|
7835 |
|
7836 |
-
|
7837 |
-
if (nextListeners === currentListeners) {
|
7838 |
-
nextListeners = currentListeners.slice();
|
7839 |
-
}
|
7840 |
-
}
|
7841 |
-
/**
|
7842 |
-
* Reads the state tree managed by the store.
|
7843 |
-
*
|
7844 |
-
* @returns {any} The current state tree of your application.
|
7845 |
-
*/
|
7846 |
|
|
|
|
|
7847 |
|
7848 |
-
|
7849 |
-
if (isDispatching) {
|
7850 |
-
throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
|
7851 |
-
}
|
7852 |
|
7853 |
-
return currentState;
|
7854 |
-
}
|
7855 |
-
/**
|
7856 |
-
* Adds a change listener. It will be called any time an action is dispatched,
|
7857 |
-
* and some part of the state tree may potentially have changed. You may then
|
7858 |
-
* call `getState()` to read the current state tree inside the callback.
|
7859 |
-
*
|
7860 |
-
* You may call `dispatch()` from a change listener, with the following
|
7861 |
-
* caveats:
|
7862 |
-
*
|
7863 |
-
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
7864 |
-
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
7865 |
-
* will not have any effect on the `dispatch()` that is currently in progress.
|
7866 |
-
* However, the next `dispatch()` call, whether nested or not, will use a more
|
7867 |
-
* recent snapshot of the subscription list.
|
7868 |
-
*
|
7869 |
-
* 2. The listener should not expect to see all state changes, as the state
|
7870 |
-
* might have been updated multiple times during a nested `dispatch()` before
|
7871 |
-
* the listener is called. It is, however, guaranteed that all subscribers
|
7872 |
-
* registered before the `dispatch()` started will be called with the latest
|
7873 |
-
* state by the time it exits.
|
7874 |
-
*
|
7875 |
-
* @param {Function} listener A callback to be invoked on every dispatch.
|
7876 |
-
* @returns {Function} A function to remove this change listener.
|
7877 |
-
*/
|
7878 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7879 |
|
7880 |
-
|
7881 |
-
|
7882 |
-
throw new Error('Expected the listener to be a function.');
|
7883 |
}
|
7884 |
|
7885 |
-
|
7886 |
-
|
|
|
|
|
|
|
|
|
|
|
7887 |
}
|
7888 |
|
7889 |
-
var
|
7890 |
-
|
7891 |
-
|
7892 |
-
|
7893 |
-
|
|
|
|
|
|
|
7894 |
return;
|
7895 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7896 |
|
7897 |
-
|
7898 |
-
throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
|
7899 |
-
}
|
7900 |
|
7901 |
-
|
7902 |
-
|
7903 |
-
|
7904 |
-
nextListeners.splice(index, 1);
|
7905 |
-
currentListeners = null;
|
7906 |
-
};
|
7907 |
-
}
|
7908 |
-
/**
|
7909 |
-
* Dispatches an action. It is the only way to trigger a state change.
|
7910 |
-
*
|
7911 |
-
* The `reducer` function, used to create the store, will be called with the
|
7912 |
-
* current state tree and the given `action`. Its return value will
|
7913 |
-
* be considered the **next** state of the tree, and the change listeners
|
7914 |
-
* will be notified.
|
7915 |
-
*
|
7916 |
-
* The base implementation only supports plain object actions. If you want to
|
7917 |
-
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
7918 |
-
* wrap your store creating function into the corresponding middleware. For
|
7919 |
-
* example, see the documentation for the `redux-thunk` package. Even the
|
7920 |
-
* middleware will eventually dispatch plain object actions using this method.
|
7921 |
-
*
|
7922 |
-
* @param {Object} action A plain object representing “what changed”. It is
|
7923 |
-
* a good idea to keep actions serializable so you can record and replay user
|
7924 |
-
* sessions, or use the time travelling `redux-devtools`. An action must have
|
7925 |
-
* a `type` property which may not be `undefined`. It is a good idea to use
|
7926 |
-
* string constants for action types.
|
7927 |
-
*
|
7928 |
-
* @returns {Object} For convenience, the same action object you dispatched.
|
7929 |
-
*
|
7930 |
-
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
7931 |
-
* return something else (for example, a Promise you can await).
|
7932 |
-
*/
|
7933 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7934 |
|
7935 |
-
|
7936 |
-
|
7937 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7938 |
}
|
7939 |
|
7940 |
-
|
7941 |
-
|
7942 |
-
|
|
|
|
|
7943 |
|
7944 |
-
|
7945 |
-
throw new Error('Reducers may not dispatch actions.');
|
7946 |
-
}
|
7947 |
|
7948 |
-
|
7949 |
-
|
7950 |
-
|
7951 |
-
} finally {
|
7952 |
-
isDispatching = false;
|
7953 |
-
}
|
7954 |
|
7955 |
-
|
|
|
|
|
|
|
|
|
7956 |
|
7957 |
-
|
7958 |
-
|
7959 |
-
|
7960 |
-
}
|
7961 |
|
7962 |
-
|
7963 |
-
|
7964 |
-
|
7965 |
-
|
7966 |
-
|
7967 |
-
|
7968 |
-
|
7969 |
-
|
7970 |
-
|
7971 |
-
|
7972 |
-
|
7973 |
-
*/
|
7974 |
|
|
|
|
|
|
|
7975 |
|
7976 |
-
|
7977 |
-
if
|
7978 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7979 |
}
|
7980 |
|
7981 |
-
|
7982 |
-
|
7983 |
-
|
7984 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7985 |
|
7986 |
-
|
7987 |
-
|
7988 |
-
|
7989 |
-
|
7990 |
-
/**
|
7991 |
-
* Interoperability point for observable/reactive libraries.
|
7992 |
-
* @returns {observable} A minimal observable of state changes.
|
7993 |
-
* For more information, see the observable proposal:
|
7994 |
-
* https://github.com/tc39/proposal-observable
|
7995 |
-
*/
|
7996 |
|
|
|
|
|
|
|
|
|
7997 |
|
7998 |
-
|
7999 |
-
|
|
|
|
|
8000 |
|
8001 |
-
|
8002 |
-
|
8003 |
-
|
8004 |
-
|
8005 |
-
* @param {Object} observer Any object that can be used as an observer.
|
8006 |
-
* The observer object should have a `next` method.
|
8007 |
-
* @returns {subscription} An object with an `unsubscribe` method that can
|
8008 |
-
* be used to unsubscribe the observable from the store, and prevent further
|
8009 |
-
* emission of values from the observable.
|
8010 |
-
*/
|
8011 |
-
subscribe: function subscribe(observer) {
|
8012 |
-
if (typeof observer !== 'object' || observer === null) {
|
8013 |
-
throw new TypeError('Expected the observer to be an object.');
|
8014 |
-
}
|
8015 |
|
8016 |
-
|
8017 |
-
|
8018 |
-
|
8019 |
-
|
|
|
8020 |
}
|
8021 |
|
8022 |
-
|
8023 |
-
|
8024 |
-
|
8025 |
-
|
8026 |
-
|
8027 |
-
|
8028 |
-
}, _ref[es/* default */.Z] = function () {
|
8029 |
-
return this;
|
8030 |
-
}, _ref;
|
8031 |
-
} // When a store is created, an "INIT" action is dispatched so that every
|
8032 |
-
// reducer returns their initial state. This effectively populates
|
8033 |
-
// the initial state tree.
|
8034 |
|
|
|
|
|
|
|
8035 |
|
8036 |
-
|
8037 |
-
|
8038 |
});
|
8039 |
-
|
8040 |
-
|
8041 |
-
|
8042 |
-
|
8043 |
-
|
8044 |
-
|
8045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8046 |
|
8047 |
/**
|
8048 |
-
*
|
8049 |
*
|
8050 |
-
* @param {
|
8051 |
-
* @
|
8052 |
*/
|
8053 |
-
function
|
8054 |
-
|
8055 |
-
|
8056 |
-
console.error(message);
|
8057 |
-
}
|
8058 |
-
/* eslint-enable no-console */
|
8059 |
|
|
|
|
|
8060 |
|
8061 |
-
|
8062 |
-
|
8063 |
-
// "break on all exceptions" in your console,
|
8064 |
-
// it would pause the execution at this line.
|
8065 |
-
throw new Error(message);
|
8066 |
-
} catch (e) {} // eslint-disable-line no-empty
|
8067 |
|
|
|
8068 |
}
|
8069 |
|
8070 |
-
|
8071 |
-
|
8072 |
-
var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
|
8073 |
-
return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
|
8074 |
-
}
|
8075 |
|
8076 |
-
|
8077 |
-
|
8078 |
-
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
|
8079 |
|
8080 |
-
|
8081 |
-
|
8082 |
-
|
|
|
8083 |
|
8084 |
-
|
8085 |
-
|
8086 |
-
|
|
|
8087 |
|
8088 |
-
|
8089 |
-
|
8090 |
-
|
8091 |
-
|
8092 |
-
|
8093 |
-
});
|
8094 |
-
if (action && action.type === ActionTypes.REPLACE) return;
|
8095 |
|
8096 |
-
|
8097 |
-
|
8098 |
-
}
|
8099 |
-
}
|
8100 |
|
8101 |
-
|
8102 |
-
Object.keys(reducers).forEach(function (key) {
|
8103 |
-
var reducer = reducers[key];
|
8104 |
-
var initialState = reducer(undefined, {
|
8105 |
-
type: ActionTypes.INIT
|
8106 |
-
});
|
8107 |
|
8108 |
-
|
8109 |
-
|
8110 |
-
}
|
8111 |
|
8112 |
-
if (typeof reducer(undefined, {
|
8113 |
-
type: ActionTypes.PROBE_UNKNOWN_ACTION()
|
8114 |
-
}) === 'undefined') {
|
8115 |
-
throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
|
8116 |
-
}
|
8117 |
-
});
|
8118 |
-
}
|
8119 |
-
/**
|
8120 |
-
* Turns an object whose values are different reducer functions, into a single
|
8121 |
-
* reducer function. It will call every child reducer, and gather their results
|
8122 |
-
* into a single state object, whose keys correspond to the keys of the passed
|
8123 |
-
* reducer functions.
|
8124 |
-
*
|
8125 |
-
* @param {Object} reducers An object whose values correspond to different
|
8126 |
-
* reducer functions that need to be combined into one. One handy way to obtain
|
8127 |
-
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
8128 |
-
* undefined for any action. Instead, they should return their initial state
|
8129 |
-
* if the state passed to them was undefined, and the current state for any
|
8130 |
-
* unrecognized action.
|
8131 |
-
*
|
8132 |
-
* @returns {Function} A reducer function that invokes every reducer inside the
|
8133 |
-
* passed object, and builds a state object with the same shape.
|
8134 |
-
*/
|
8135 |
|
|
|
8136 |
|
8137 |
-
|
8138 |
-
|
8139 |
-
var finalReducers = {};
|
8140 |
|
8141 |
-
|
8142 |
-
var key = reducerKeys[i];
|
8143 |
|
8144 |
-
if (false) {}
|
8145 |
|
8146 |
-
|
8147 |
-
|
8148 |
-
|
8149 |
-
|
|
|
|
|
|
|
|
|
|
|
8150 |
|
8151 |
-
|
8152 |
-
|
|
|
8153 |
|
8154 |
-
|
8155 |
|
8156 |
-
|
8157 |
|
8158 |
-
var shapeAssertionError;
|
8159 |
|
8160 |
-
|
8161 |
-
assertReducerShape(finalReducers);
|
8162 |
-
} catch (e) {
|
8163 |
-
shapeAssertionError = e;
|
8164 |
-
}
|
8165 |
|
8166 |
-
|
8167 |
-
|
8168 |
-
state = {};
|
8169 |
-
}
|
8170 |
|
8171 |
-
|
8172 |
-
throw shapeAssertionError;
|
8173 |
-
}
|
8174 |
|
8175 |
-
if (false) { var warningMessage; }
|
8176 |
|
8177 |
-
|
8178 |
-
var nextState = {};
|
8179 |
|
8180 |
-
|
8181 |
-
|
8182 |
-
|
8183 |
-
|
8184 |
-
|
|
|
|
|
|
|
|
|
|
|
8185 |
|
8186 |
-
|
8187 |
-
|
8188 |
-
|
8189 |
-
|
8190 |
|
8191 |
-
|
8192 |
-
|
|
|
|
|
|
|
8193 |
}
|
8194 |
|
8195 |
-
|
8196 |
-
|
8197 |
-
};
|
8198 |
}
|
8199 |
|
8200 |
-
function bindActionCreator(actionCreator, dispatch) {
|
8201 |
-
return function () {
|
8202 |
-
return dispatch(actionCreator.apply(this, arguments));
|
8203 |
-
};
|
8204 |
-
}
|
8205 |
/**
|
8206 |
-
*
|
8207 |
-
* same keys, but with every function wrapped into a `dispatch` call so they
|
8208 |
-
* may be invoked directly. This is just a convenience method, as you can call
|
8209 |
-
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
8210 |
-
*
|
8211 |
-
* For convenience, you can also pass an action creator as the first argument,
|
8212 |
-
* and get a dispatch wrapped function in return.
|
8213 |
-
*
|
8214 |
-
* @param {Function|Object} actionCreators An object whose values are action
|
8215 |
-
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
8216 |
-
* syntax. You may also pass a single function.
|
8217 |
-
*
|
8218 |
-
* @param {Function} dispatch The `dispatch` function available on your Redux
|
8219 |
-
* store.
|
8220 |
-
*
|
8221 |
-
* @returns {Function|Object} The object mimicking the original object, but with
|
8222 |
-
* every action creator wrapped into the `dispatch` call. If you passed a
|
8223 |
-
* function as `actionCreators`, the return value will also be a single
|
8224 |
-
* function.
|
8225 |
*/
|
|
|
|
|
|
|
|
|
|
|
8226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8227 |
|
8228 |
-
|
8229 |
-
if (typeof actionCreators === 'function') {
|
8230 |
-
return bindActionCreator(actionCreators, dispatch);
|
8231 |
-
}
|
8232 |
|
8233 |
-
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
8234 |
-
throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
|
8235 |
-
}
|
8236 |
|
8237 |
-
|
8238 |
|
8239 |
-
|
8240 |
-
|
8241 |
|
8242 |
-
|
8243 |
-
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
8244 |
-
}
|
8245 |
-
}
|
8246 |
|
8247 |
-
return boundActionCreators;
|
8248 |
-
}
|
8249 |
|
8250 |
-
function
|
8251 |
-
|
8252 |
-
|
8253 |
-
value: value,
|
8254 |
-
enumerable: true,
|
8255 |
-
configurable: true,
|
8256 |
-
writable: true
|
8257 |
-
});
|
8258 |
-
} else {
|
8259 |
-
obj[key] = value;
|
8260 |
-
}
|
8261 |
|
8262 |
-
return obj;
|
8263 |
-
}
|
8264 |
|
8265 |
-
|
8266 |
-
var keys = Object.keys(object);
|
8267 |
|
8268 |
-
|
8269 |
-
|
8270 |
-
}
|
8271 |
|
8272 |
-
|
8273 |
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
8274 |
-
});
|
8275 |
-
return keys;
|
8276 |
-
}
|
8277 |
|
8278 |
-
function _objectSpread2(target) {
|
8279 |
-
for (var i = 1; i < arguments.length; i++) {
|
8280 |
-
var source = arguments[i] != null ? arguments[i] : {};
|
8281 |
|
8282 |
-
|
8283 |
-
|
8284 |
-
|
8285 |
-
|
8286 |
-
|
8287 |
-
|
8288 |
-
} else {
|
8289 |
-
ownKeys(source).forEach(function (key) {
|
8290 |
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
8291 |
-
});
|
8292 |
-
}
|
8293 |
-
}
|
8294 |
|
8295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8296 |
}
|
8297 |
|
8298 |
/**
|
8299 |
-
*
|
8300 |
-
* function can take multiple arguments as it provides the signature for
|
8301 |
-
* the resulting composite function.
|
8302 |
*
|
8303 |
-
* @param {
|
8304 |
-
* @returns {Function} A function obtained by composing the argument functions
|
8305 |
-
* from right to left. For example, compose(f, g, h) is identical to doing
|
8306 |
-
* (...args) => f(g(h(...args))).
|
8307 |
*/
|
8308 |
-
function
|
8309 |
-
|
8310 |
-
|
|
|
|
|
|
|
|
|
|
|
8311 |
}
|
8312 |
|
8313 |
-
|
8314 |
-
return function (arg) {
|
8315 |
-
return arg;
|
8316 |
-
};
|
8317 |
-
}
|
8318 |
|
8319 |
-
|
8320 |
-
|
|
|
|
|
|
|
|
|
|
|
8321 |
}
|
8322 |
|
8323 |
-
|
8324 |
-
|
8325 |
-
|
8326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8327 |
});
|
8328 |
-
}
|
8329 |
|
8330 |
-
|
8331 |
-
|
8332 |
-
|
8333 |
-
|
8334 |
-
*
|
8335 |
-
* See `redux-thunk` package as an example of the Redux middleware.
|
8336 |
-
*
|
8337 |
-
* Because middleware is potentially asynchronous, this should be the first
|
8338 |
-
* store enhancer in the composition chain.
|
8339 |
-
*
|
8340 |
-
* Note that each middleware will be given the `dispatch` and `getState` functions
|
8341 |
-
* as named arguments.
|
8342 |
-
*
|
8343 |
-
* @param {...Function} middlewares The middleware chain to be applied.
|
8344 |
-
* @returns {Function} A store enhancer applying the middleware.
|
8345 |
-
*/
|
8346 |
|
8347 |
-
|
8348 |
-
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
8349 |
-
middlewares[_key] = arguments[_key];
|
8350 |
-
}
|
8351 |
|
8352 |
-
|
8353 |
-
|
8354 |
-
var store = createStore.apply(void 0, arguments);
|
8355 |
|
8356 |
-
|
8357 |
-
|
8358 |
-
};
|
8359 |
|
8360 |
-
|
8361 |
-
|
8362 |
-
|
8363 |
-
|
8364 |
-
}
|
8365 |
-
};
|
8366 |
-
var chain = middlewares.map(function (middleware) {
|
8367 |
-
return middleware(middlewareAPI);
|
8368 |
-
});
|
8369 |
-
_dispatch = compose.apply(void 0, chain)(store.dispatch);
|
8370 |
-
return _objectSpread2({}, store, {
|
8371 |
-
dispatch: _dispatch
|
8372 |
-
});
|
8373 |
-
};
|
8374 |
-
};
|
8375 |
-
}
|
8376 |
|
8377 |
-
|
8378 |
-
|
8379 |
-
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
8380 |
-
*/
|
8381 |
|
8382 |
-
function isCrushed() {}
|
8383 |
|
8384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8385 |
|
|
|
|
|
|
|
|
|
|
|
8386 |
|
|
|
|
|
|
|
8387 |
|
8388 |
-
|
8389 |
-
|
8390 |
|
8391 |
-
function
|
|
|
|
|
|
|
8392 |
|
8393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8394 |
|
8395 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8396 |
|
8397 |
-
|
8398 |
|
8399 |
-
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
8400 |
|
8401 |
-
|
8402 |
|
8403 |
-
|
|
|
8404 |
|
8405 |
-
|
8406 |
|
8407 |
-
var merge = __webpack_require__(82492);
|
8408 |
|
8409 |
-
var
|
8410 |
-
/**
|
8411 |
-
* Constants
|
8412 |
-
*/
|
8413 |
|
|
|
|
|
|
|
8414 |
|
8415 |
-
|
8416 |
-
|
8417 |
-
|
8418 |
-
|
8419 |
-
|
8420 |
-
|
8421 |
-
|
8422 |
-
|
8423 |
-
|
8424 |
-
|
8425 |
-
|
8426 |
-
|
8427 |
-
|
8428 |
-
|
8429 |
-
|
8430 |
-
|
8431 |
-
|
8432 |
-
SET_SETTING_VALUE: "SET_SETTING_VALUE",
|
8433 |
-
SET_MISC_VALUE: "SET_MISC_VALUE",
|
8434 |
-
//Drawer
|
8435 |
-
OPEN_DRAWER: "OPENING DRAWER",
|
8436 |
-
CLOSE_DRAWER: "CLOSING DRAWER",
|
8437 |
-
groups: {
|
8438 |
-
ADD_RECORD: "ADDING GROUP RECORD",
|
8439 |
-
REMOVE_RECORD: "REMOVING GROUP RECORD",
|
8440 |
-
SET_KEY_VALUE: "SET KEY VALUE GROUPS",
|
8441 |
-
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS GROUPS"
|
8442 |
-
},
|
8443 |
-
buttons: {
|
8444 |
-
ADD_RECORD: "ADDING BUTTON RECORD",
|
8445 |
-
REMOVE_RECORD: "REMOVING BUTTON RECORD",
|
8446 |
-
SET_KEY_VALUE: "SET KEY VALUE BUTTONS",
|
8447 |
-
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS BUTTONS"
|
8448 |
-
},
|
8449 |
-
timeSchedules: {
|
8450 |
-
// Time Schedule actionTypes
|
8451 |
-
ADD_RECORD: "ADDING TIME SCHEDULE",
|
8452 |
-
REMOVE_RECORD: "REMOVING TIME SCHEDULE",
|
8453 |
-
SET_KEY_VALUE: "SET KEY VALUE TIMESCHEDULES",
|
8454 |
-
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS TIMESCHEDULES",
|
8455 |
-
ADD_TIMESCHEDULE: "ADD_TIMESCHEDULE",
|
8456 |
-
SET_WEEKDAY: "SET_WEEKDAY",
|
8457 |
-
ADD_EXCLUDED_DATE: "ADD_EXCLUDED_DATE",
|
8458 |
-
SET_EXCLUDED_DATE: "SET_EXCLUDED_DATE",
|
8459 |
-
REMOVE_EXCLUDED_DATE: "REMOVE_EXCLUDED_DATE"
|
8460 |
-
},
|
8461 |
-
pageRules: {
|
8462 |
-
ADD_RECORD: "ADDING PAGE RULE",
|
8463 |
-
REMOVE_RECORD: "REMOVING PAGE RULE",
|
8464 |
-
SET_KEY_VALUE: "SET KEY VALUE PAGERULES",
|
8465 |
-
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS PAGERULES",
|
8466 |
-
ADD_PAGE_RULE_ROW: "ADD_PAGE_RULE_ROW",
|
8467 |
-
SET_PAGE_RULE_ROW: "SET_PAGE_RULE_ROW",
|
8468 |
-
REMOVE_PAGE_RULE_ROW: "REMOVE_PAGE_RULE_ROW"
|
8469 |
-
},
|
8470 |
-
wp: {
|
8471 |
-
//Data actionTypes
|
8472 |
-
GET_DATA_BEGIN: "GET_DATA_BEGIN_WP",
|
8473 |
-
GET_DATA_SUCCESS: "GET_DATA_SUCCESS_WP",
|
8474 |
-
GET_DATA_FAILURE: "GET_DATA_FAILURE_WP",
|
8475 |
-
GET_DATA_END: "GET_DATA_END_WP"
|
8476 |
-
},
|
8477 |
-
templates: {
|
8478 |
-
INIT: "INIT TEMPLATES",
|
8479 |
-
GET_DATA_BEGIN: "GET TEMPLATES DATA BEGIN",
|
8480 |
-
GET_DATA_FAILURE: "GET TEMPLATES DATA FAILURE",
|
8481 |
-
GET_DATA_END: "GET TEMPLATES DATA END",
|
8482 |
|
8483 |
-
|
8484 |
-
|
8485 |
-
|
8486 |
-
|
|
|
|
|
|
|
|
|
8487 |
}
|
8488 |
};
|
8489 |
-
|
8490 |
-
|
8491 |
-
|
8492 |
-
|
8493 |
-
|
8494 |
-
|
8495 |
-
|
8496 |
-
}
|
8497 |
-
|
8498 |
-
|
8499 |
-
|
8500 |
-
|
8501 |
-
|
8502 |
-
|
8503 |
-
|
8504 |
-
error: null
|
8505 |
-
},
|
8506 |
-
frameUrl: "about:blank",
|
8507 |
-
loadingIframe: false,
|
8508 |
-
settings: null,
|
8509 |
-
_premium: false,
|
8510 |
-
buttons: {},
|
8511 |
-
groups: {},
|
8512 |
-
timeSchedules: {}
|
8513 |
-
};
|
8514 |
-
var drawers = {
|
8515 |
-
MENU: "menu",
|
8516 |
-
SETTINGS: "settings",
|
8517 |
-
SETTINGS_PAGES: {
|
8518 |
-
analytics: "analytics",
|
8519 |
-
iconLibrary: "iconlibrary",
|
8520 |
-
preferences: "preferences",
|
8521 |
-
reset: "reset"
|
8522 |
-
},
|
8523 |
-
BUTTONIZER_TOUR: "buttonizertour",
|
8524 |
-
WELCOME_DIALOG: "welcome-splash",
|
8525 |
-
TIME_SCHEDULES: "timeschedules",
|
8526 |
-
PAGE_RULES: "pagerules"
|
8527 |
};
|
8528 |
-
var formats = {
|
8529 |
-
/**
|
8530 |
-
* Combine values with normal;hover.
|
8531 |
-
*/
|
8532 |
-
normal_hover: {
|
8533 |
-
format: function format(normal, hover) {
|
8534 |
-
return [normal, hover].map(function (val) {
|
8535 |
-
return val === "unset" ? "" : val == null ? "" : val;
|
8536 |
-
}).filter(function (val, key, arr) {
|
8537 |
-
return key === 0 || val !== "" && val !== arr[0];
|
8538 |
-
}) // remove duplicates
|
8539 |
-
.join(";") || "unset";
|
8540 |
-
},
|
8541 |
-
parse: function parse(val) {
|
8542 |
-
var value = val;
|
8543 |
-
if (typeof val === "boolean") value = String(val);
|
8544 |
-
if (typeof val === "number") value = String(val);
|
8545 |
-
if (typeof val === "undefined") return [];
|
8546 |
|
8547 |
-
|
8548 |
-
console.trace();
|
8549 |
-
console.log(_typeof(value), value);
|
8550 |
-
throw TypeError("'record[key]' val is not of type String, boolean or number");
|
8551 |
-
}
|
8552 |
|
8553 |
-
var match = value.split(";");
|
8554 |
-
return match.map(function (val) {
|
8555 |
-
if (!val) return undefined;
|
8556 |
-
if (val === "true") return true;
|
8557 |
-
if (val === "false") return false;
|
8558 |
-
if (!isNaN(Number(val))) return Number(val);
|
8559 |
-
return val;
|
8560 |
-
}).map(function (val, key, arr) {
|
8561 |
-
return key === 0 ? val : val === arr[0] ? undefined : val;
|
8562 |
-
}); // remove duplicates!
|
8563 |
-
}
|
8564 |
-
},
|
8565 |
|
8566 |
-
|
8567 |
-
* Px for four sides, for example for margin or padding.
|
8568 |
-
*/
|
8569 |
-
fourSidesPx: {
|
8570 |
-
format: function format(val1, val2, val3, val4) {
|
8571 |
-
return "".concat(val1, "px ").concat(val2, "px ").concat(val3, "px ").concat(val4, "px");
|
8572 |
-
},
|
8573 |
-
parse: function parse(val) {
|
8574 |
-
var reg = /\d+/g;
|
8575 |
-
var match = val.match(reg);
|
8576 |
-
return match;
|
8577 |
-
}
|
8578 |
-
},
|
8579 |
|
8580 |
-
|
8581 |
-
|
8582 |
-
*/
|
8583 |
-
position: {
|
8584 |
-
format: function format(type, mode, value) {
|
8585 |
-
return "".concat(type, ": ").concat(value).concat(mode);
|
8586 |
-
}
|
8587 |
-
}
|
8588 |
-
};
|
8589 |
-
var excludedPropertyRequests = (/* unused pure expression or super */ null && (["selected_schedule", "show_on_schedule_trigger", "selected_page_rule", "show_on_rule_trigger", "show_mobile", "show_desktop", "is_menu"]));
|
8590 |
-
var import_export = {
|
8591 |
-
propertiesToOmit: ["export_type", "selected_page_rule", "selected_schedule", "id", "parent", "show_on_rule_trigger", "show_on_schedule_trigger"]
|
8592 |
-
};
|
8593 |
-
var settingKeys = {
|
8594 |
-
// Returns all default button settings keys
|
8595 |
-
get buttonSettings() {
|
8596 |
-
var result = {
|
8597 |
-
general: [],
|
8598 |
-
styling: [],
|
8599 |
-
advanced: []
|
8600 |
-
};
|
8601 |
-
Object.entries(defaults.button).map(function (key) {
|
8602 |
-
merge(result, buttonizer_constants_defineProperty({}, key[0], Object.entries(key[1]).map(function (_ref) {
|
8603 |
-
var _ref2 = _slicedToArray(_ref, 1),
|
8604 |
-
key = _ref2[0];
|
8605 |
|
8606 |
-
|
8607 |
-
})));
|
8608 |
-
});
|
8609 |
-
return result;
|
8610 |
-
},
|
8611 |
|
8612 |
-
// Returns all default group settings keys
|
8613 |
-
get groupSettings() {
|
8614 |
-
var result = {
|
8615 |
-
general: [],
|
8616 |
-
styling: [],
|
8617 |
-
advanced: []
|
8618 |
-
};
|
8619 |
-
Object.entries(defaults.group).map(function (key) {
|
8620 |
-
merge(result, buttonizer_constants_defineProperty({}, key[0], Object.entries(key[1]).map(function (_ref3) {
|
8621 |
-
var _ref4 = _slicedToArray(_ref3, 1),
|
8622 |
-
key = _ref4[0];
|
8623 |
|
8624 |
-
|
8625 |
-
|
8626 |
-
});
|
8627 |
-
return result;
|
8628 |
-
},
|
8629 |
|
8630 |
-
|
8631 |
-
|
8632 |
-
|
8633 |
-
|
8634 |
-
|
8635 |
-
|
8636 |
-
|
8637 |
-
|
8638 |
-
|
8639 |
-
|
8640 |
-
|
|
|
|
|
|
|
|
|
8641 |
|
8642 |
-
return key;
|
8643 |
-
})));
|
8644 |
-
});
|
8645 |
-
return result;
|
8646 |
-
},
|
8647 |
|
8648 |
-
|
8649 |
-
get stylingNoGroup() {
|
8650 |
-
var _this = this;
|
8651 |
|
8652 |
-
|
8653 |
-
|
8654 |
-
})).map(function (_ref7) {
|
8655 |
-
var _ref8 = _slicedToArray(_ref7, 1),
|
8656 |
-
key = _ref8[0];
|
8657 |
|
8658 |
-
|
8659 |
-
});
|
8660 |
-
},
|
8661 |
|
8662 |
-
// Returns default hover styling setting key
|
8663 |
-
get stylingHover() {
|
8664 |
-
return Object.entries(merge({}, defaults.button.styling, defaults.group.styling)).filter(function (entry) {
|
8665 |
-
return Array.isArray(entry[1]);
|
8666 |
-
}).map(function (_ref9) {
|
8667 |
-
var _ref10 = _slicedToArray(_ref9, 1),
|
8668 |
-
key = _ref10[0];
|
8669 |
|
8670 |
-
|
8671 |
-
});
|
8672 |
-
}
|
8673 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8674 |
};
|
8675 |
-
// EXTERNAL MODULE: ./node_modules/axios/index.js
|
8676 |
-
var axios = __webpack_require__(9669);
|
8677 |
-
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
8678 |
-
;// CONCATENATED MODULE: ./src/js/utils/utils/drawer-utils.js
|
8679 |
-
function openDrawer(drawer, page) {
|
8680 |
-
closeDrawer();
|
8681 |
-
document.location.hash += "".concat(document.location.hash.match(/\/$/) ? "" : "/").concat(drawer).concat(page ? "/" + page : "");
|
8682 |
-
}
|
8683 |
-
function closeDrawer() {
|
8684 |
-
document.location.hash = document.location.hash.replace(/\/?(settings|menu|timeschedules|pagerules|buttonizertour).*$/i, "");
|
8685 |
-
}
|
8686 |
-
;// CONCATENATED MODULE: ./src/js/utils/utils/data-utils.js
|
8687 |
-
/* global Map */
|
8688 |
|
8689 |
-
var cache = new Map();
|
8690 |
-
function dateToFormat(date) {
|
8691 |
-
if (!date) return null;
|
8692 |
|
8693 |
-
|
8694 |
-
var s = String(num);
|
8695 |
|
8696 |
-
|
8697 |
-
|
8698 |
-
}
|
8699 |
|
8700 |
-
|
8701 |
-
};
|
8702 |
|
8703 |
-
return "".concat(date.getDate(), "-").concat(pad(date.getMonth() + 1, 2), "-").concat(date.getFullYear());
|
8704 |
-
}
|
8705 |
-
function formatToDate(format) {
|
8706 |
-
if (!format) return null;
|
8707 |
-
var dateParts = format.split("-");
|
8708 |
-
return new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
|
8709 |
-
}
|
8710 |
-
var importIcons = function importIcons() {
|
8711 |
-
var icon_library = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "fontawesome";
|
8712 |
-
var icon_library_version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "5.free";
|
8713 |
-
var url = buttonizer_admin.assets + "/icon_definitions/" + icon_library + "." + icon_library_version + ".json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
8714 |
-
if (cache.has(url)) return cache.get(url);
|
8715 |
-
var value = axios_default()({
|
8716 |
-
url: url,
|
8717 |
-
dataType: "json",
|
8718 |
-
method: "get"
|
8719 |
-
});
|
8720 |
-
cache.set(url, value);
|
8721 |
-
return value;
|
8722 |
-
};
|
8723 |
-
var importTemplates = function importTemplates() {
|
8724 |
-
var url = buttonizer_admin.assets + "/templates/templates.json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
8725 |
-
return new Promise(function (resolve, reject) {
|
8726 |
-
if (cache.has(url)) resolve(cache.get(url));
|
8727 |
-
axios_default()({
|
8728 |
-
url: url
|
8729 |
-
}).then(function (data) {
|
8730 |
-
cache.set(url, data.data);
|
8731 |
-
resolve(data.data);
|
8732 |
-
})["catch"](function (e) {
|
8733 |
-
return reject({
|
8734 |
-
message: "Something went wrong",
|
8735 |
-
error: e
|
8736 |
-
});
|
8737 |
-
});
|
8738 |
-
});
|
8739 |
-
};
|
8740 |
-
// EXTERNAL MODULE: ./node_modules/uuid/v4.js
|
8741 |
-
var v4 = __webpack_require__(71171);
|
8742 |
-
var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
|
8743 |
-
;// CONCATENATED MODULE: ./src/js/utils/utils/random.js
|
8744 |
-
|
8745 |
-
function GenerateUniqueId() {
|
8746 |
-
return v4_default()();
|
8747 |
-
}
|
8748 |
-
function shuffleTips(array) {
|
8749 |
-
var currentIndex = array.length,
|
8750 |
-
temporaryValue,
|
8751 |
-
randomIndex; // While there remain elements to shuffle...
|
8752 |
|
8753 |
-
|
8754 |
-
|
8755 |
-
|
8756 |
-
|
8757 |
|
8758 |
-
|
8759 |
-
|
8760 |
-
|
|
|
|
|
|
|
8761 |
}
|
8762 |
-
|
8763 |
-
return array;
|
8764 |
-
}
|
8765 |
-
function uniqueCharset() {
|
8766 |
-
return Array.apply(0, Array(15)).map(function () {
|
8767 |
-
return function (charset) {
|
8768 |
-
return charset.charAt(Math.floor(Math.random() * charset.length));
|
8769 |
-
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
8770 |
-
}).join("");
|
8771 |
}
|
8772 |
-
;// CONCATENATED MODULE: ./src/js/utils/utils/index.js
|
8773 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8774 |
|
|
|
|
|
8775 |
|
8776 |
-
//
|
8777 |
-
|
8778 |
-
|
8779 |
-
|
8780 |
-
|
8781 |
-
|
8782 |
-
|
8783 |
-
}
|
8784 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
8785 |
-
var createClass = __webpack_require__(5991);
|
8786 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
8787 |
-
var assertThisInitialized = __webpack_require__(63349);
|
8788 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
8789 |
-
var setPrototypeOf = __webpack_require__(14665);
|
8790 |
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
8791 |
|
8792 |
-
|
8793 |
-
|
8794 |
-
|
8795 |
-
|
|
|
|
|
8796 |
|
8797 |
-
|
8798 |
-
|
8799 |
-
|
8800 |
-
|
8801 |
-
configurable: true
|
8802 |
}
|
8803 |
-
|
8804 |
-
Object.defineProperty(subClass, "prototype", {
|
8805 |
-
writable: false
|
8806 |
-
});
|
8807 |
-
if (superClass) (0,setPrototypeOf/* default */.Z)(subClass, superClass);
|
8808 |
-
}
|
8809 |
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
8810 |
|
|
|
8811 |
|
8812 |
-
function
|
8813 |
-
|
8814 |
-
return call;
|
8815 |
-
} else if (call !== void 0) {
|
8816 |
-
throw new TypeError("Derived constructors may only return object or undefined");
|
8817 |
-
}
|
8818 |
|
8819 |
-
|
8820 |
-
|
8821 |
-
|
8822 |
-
|
8823 |
-
|
8824 |
-
|
8825 |
-
|
8826 |
-
return _getPrototypeOf(o);
|
8827 |
-
}
|
8828 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
8829 |
-
var defineProperty = __webpack_require__(96156);
|
8830 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
8831 |
-
var arrayWithHoles = __webpack_require__(59968);
|
8832 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
8833 |
-
var iterableToArray = __webpack_require__(96410);
|
8834 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
8835 |
-
var unsupportedIterableToArray = __webpack_require__(82961);
|
8836 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
8837 |
-
var nonIterableRest = __webpack_require__(28970);
|
8838 |
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
|
8839 |
|
|
|
|
|
|
|
|
|
8840 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8841 |
|
|
|
|
|
|
|
8842 |
|
8843 |
-
function _toArray(arr) {
|
8844 |
-
return (0,arrayWithHoles/* default */.Z)(arr) || (0,iterableToArray/* default */.Z)(arr) || (0,unsupportedIterableToArray/* default */.Z)(arr) || (0,nonIterableRest/* default */.Z)();
|
8845 |
-
}
|
8846 |
-
;// CONCATENATED MODULE: ./node_modules/i18next/dist/esm/i18next.js
|
8847 |
|
|
|
8848 |
|
|
|
|
|
8849 |
|
|
|
8850 |
|
8851 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8852 |
|
|
|
|
|
|
|
8853 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8854 |
|
8855 |
|
|
|
8856 |
|
8857 |
-
|
|
|
8858 |
|
8859 |
-
|
8860 |
|
8861 |
-
var consoleLogger = {
|
8862 |
-
type: 'logger',
|
8863 |
-
log: function log(args) {
|
8864 |
-
this.output('log', args);
|
8865 |
-
},
|
8866 |
-
warn: function warn(args) {
|
8867 |
-
this.output('warn', args);
|
8868 |
-
},
|
8869 |
-
error: function error(args) {
|
8870 |
-
this.output('error', args);
|
8871 |
-
},
|
8872 |
-
output: function output(type, args) {
|
8873 |
-
if (console && console[type]) console[type].apply(console, args);
|
8874 |
-
}
|
8875 |
-
};
|
8876 |
|
8877 |
-
var
|
8878 |
-
function Logger(concreteLogger) {
|
8879 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
8880 |
|
8881 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8882 |
|
8883 |
-
|
8884 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8885 |
|
8886 |
-
(
|
8887 |
-
|
8888 |
-
|
8889 |
-
|
8890 |
-
|
8891 |
-
|
8892 |
-
|
8893 |
-
this.debug = options.debug;
|
8894 |
-
}
|
8895 |
-
}, {
|
8896 |
-
key: "setDebug",
|
8897 |
-
value: function setDebug(bool) {
|
8898 |
-
this.debug = bool;
|
8899 |
}
|
8900 |
-
|
8901 |
-
|
8902 |
-
value: function log() {
|
8903 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
8904 |
-
args[_key] = arguments[_key];
|
8905 |
-
}
|
8906 |
|
8907 |
-
|
|
|
|
|
|
|
|
|
8908 |
}
|
8909 |
-
}
|
8910 |
-
key: "warn",
|
8911 |
-
value: function warn() {
|
8912 |
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
8913 |
-
args[_key2] = arguments[_key2];
|
8914 |
-
}
|
8915 |
|
8916 |
-
|
|
|
|
|
8917 |
}
|
8918 |
-
}
|
8919 |
-
key: "error",
|
8920 |
-
value: function error() {
|
8921 |
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
8922 |
-
args[_key3] = arguments[_key3];
|
8923 |
-
}
|
8924 |
|
8925 |
-
|
8926 |
-
}
|
8927 |
-
}, {
|
8928 |
-
key: "deprecate",
|
8929 |
-
value: function deprecate() {
|
8930 |
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
8931 |
-
args[_key4] = arguments[_key4];
|
8932 |
-
}
|
8933 |
|
8934 |
-
|
8935 |
-
|
8936 |
-
|
8937 |
-
|
8938 |
-
|
8939 |
-
if (debugOnly && !this.debug) return null;
|
8940 |
-
if (typeof args[0] === 'string') args[0] = "".concat(prefix).concat(this.prefix, " ").concat(args[0]);
|
8941 |
-
return this.logger[lvl](args);
|
8942 |
}
|
8943 |
-
}
|
8944 |
-
|
8945 |
-
|
8946 |
-
|
8947 |
-
|
8948 |
-
|
|
|
8949 |
}
|
8950 |
-
}
|
8951 |
|
8952 |
-
|
8953 |
-
|
|
|
|
|
8954 |
|
8955 |
-
var
|
|
|
|
|
|
|
|
|
|
|
8956 |
|
8957 |
-
|
8958 |
-
function EventEmitter() {
|
8959 |
-
_classCallCheck(this, EventEmitter);
|
8960 |
|
8961 |
-
|
8962 |
-
|
8963 |
|
8964 |
-
(0,createClass/* default */.Z)(EventEmitter, [{
|
8965 |
-
key: "on",
|
8966 |
-
value: function on(events, listener) {
|
8967 |
-
var _this = this;
|
8968 |
|
8969 |
-
|
8970 |
-
_this.observers[event] = _this.observers[event] || [];
|
8971 |
|
8972 |
-
|
8973 |
-
|
8974 |
-
return this;
|
8975 |
-
}
|
8976 |
-
}, {
|
8977 |
-
key: "off",
|
8978 |
-
value: function off(event, listener) {
|
8979 |
-
if (!this.observers[event]) return;
|
8980 |
|
8981 |
-
|
8982 |
-
delete this.observers[event];
|
8983 |
-
return;
|
8984 |
-
}
|
8985 |
|
8986 |
-
this.observers[event] = this.observers[event].filter(function (l) {
|
8987 |
-
return l !== listener;
|
8988 |
-
});
|
8989 |
-
}
|
8990 |
-
}, {
|
8991 |
-
key: "emit",
|
8992 |
-
value: function emit(event) {
|
8993 |
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
8994 |
-
args[_key - 1] = arguments[_key];
|
8995 |
-
}
|
8996 |
|
8997 |
-
|
8998 |
-
var cloned = [].concat(this.observers[event]);
|
8999 |
-
cloned.forEach(function (observer) {
|
9000 |
-
observer.apply(void 0, args);
|
9001 |
-
});
|
9002 |
-
}
|
9003 |
|
9004 |
-
|
9005 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9006 |
|
9007 |
-
_cloned.forEach(function (observer) {
|
9008 |
-
observer.apply(observer, [event].concat(args));
|
9009 |
-
});
|
9010 |
-
}
|
9011 |
-
}
|
9012 |
-
}]);
|
9013 |
|
9014 |
-
|
9015 |
-
}();
|
9016 |
|
9017 |
-
|
9018 |
-
|
9019 |
-
var rej;
|
9020 |
-
var promise = new Promise(function (resolve, reject) {
|
9021 |
-
res = resolve;
|
9022 |
-
rej = reject;
|
9023 |
-
});
|
9024 |
-
promise.resolve = res;
|
9025 |
-
promise.reject = rej;
|
9026 |
-
return promise;
|
9027 |
-
}
|
9028 |
-
function makeString(object) {
|
9029 |
-
if (object == null) return '';
|
9030 |
-
return '' + object;
|
9031 |
-
}
|
9032 |
-
function copy(a, s, t) {
|
9033 |
-
a.forEach(function (m) {
|
9034 |
-
if (s[m]) t[m] = s[m];
|
9035 |
-
});
|
9036 |
-
}
|
9037 |
|
9038 |
-
|
9039 |
-
function cleanKey(key) {
|
9040 |
-
return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
|
9041 |
-
}
|
9042 |
|
9043 |
-
function canNotTraverseDeeper() {
|
9044 |
-
return !object || typeof object === 'string';
|
9045 |
-
}
|
9046 |
|
9047 |
-
|
|
|
9048 |
|
9049 |
-
|
9050 |
-
|
9051 |
-
|
9052 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9053 |
|
9054 |
-
|
9055 |
-
|
9056 |
-
} else {
|
9057 |
-
object = {};
|
9058 |
-
}
|
9059 |
-
}
|
9060 |
-
|
9061 |
-
if (canNotTraverseDeeper()) return {};
|
9062 |
-
return {
|
9063 |
-
obj: object,
|
9064 |
-
k: cleanKey(stack.shift())
|
9065 |
-
};
|
9066 |
-
}
|
9067 |
|
9068 |
-
function setPath(object, path, newValue) {
|
9069 |
-
var _getLastOfPath = getLastOfPath(object, path, Object),
|
9070 |
-
obj = _getLastOfPath.obj,
|
9071 |
-
k = _getLastOfPath.k;
|
9072 |
|
9073 |
-
|
9074 |
-
}
|
9075 |
-
function pushPath(object, path, newValue, concat) {
|
9076 |
-
var _getLastOfPath2 = getLastOfPath(object, path, Object),
|
9077 |
-
obj = _getLastOfPath2.obj,
|
9078 |
-
k = _getLastOfPath2.k;
|
9079 |
|
9080 |
-
|
9081 |
-
|
9082 |
-
if (!concat) obj[k].push(newValue);
|
9083 |
-
}
|
9084 |
-
function getPath(object, path) {
|
9085 |
-
var _getLastOfPath3 = getLastOfPath(object, path),
|
9086 |
-
obj = _getLastOfPath3.obj,
|
9087 |
-
k = _getLastOfPath3.k;
|
9088 |
|
9089 |
-
|
9090 |
-
return obj[k];
|
9091 |
-
}
|
9092 |
-
function getPathWithDefaults(data, defaultData, key) {
|
9093 |
-
var value = getPath(data, key);
|
9094 |
|
9095 |
-
if (value !== undefined) {
|
9096 |
-
return value;
|
9097 |
-
}
|
9098 |
|
9099 |
-
|
9100 |
-
|
9101 |
-
|
9102 |
-
for (var prop in source) {
|
9103 |
-
if (prop !== '__proto__' && prop !== 'constructor') {
|
9104 |
-
if (prop in target) {
|
9105 |
-
if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
|
9106 |
-
if (overwrite) target[prop] = source[prop];
|
9107 |
-
} else {
|
9108 |
-
deepExtend(target[prop], source[prop], overwrite);
|
9109 |
-
}
|
9110 |
-
} else {
|
9111 |
-
target[prop] = source[prop];
|
9112 |
-
}
|
9113 |
-
}
|
9114 |
-
}
|
9115 |
|
9116 |
-
|
9117 |
-
|
9118 |
-
function regexEscape(str) {
|
9119 |
-
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
9120 |
-
}
|
9121 |
-
var _entityMap = {
|
9122 |
-
'&': '&',
|
9123 |
-
'<': '<',
|
9124 |
-
'>': '>',
|
9125 |
-
'"': '"',
|
9126 |
-
"'": ''',
|
9127 |
-
'/': '/'
|
9128 |
};
|
9129 |
-
function i18next_escape(data) {
|
9130 |
-
if (typeof data === 'string') {
|
9131 |
-
return data.replace(/[&<>"'\/]/g, function (s) {
|
9132 |
-
return _entityMap[s];
|
9133 |
-
});
|
9134 |
-
}
|
9135 |
|
9136 |
-
|
|
|
|
|
|
|
9137 |
}
|
9138 |
-
var isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
9139 |
-
var chars = [' ', ',', '?', '!', ';'];
|
9140 |
-
function looksLikeObjectPath(key, nsSeparator, keySeparator) {
|
9141 |
-
nsSeparator = nsSeparator || '';
|
9142 |
-
keySeparator = keySeparator || '';
|
9143 |
-
var possibleChars = chars.filter(function (c) {
|
9144 |
-
return nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0;
|
9145 |
-
});
|
9146 |
-
if (possibleChars.length === 0) return true;
|
9147 |
-
var r = new RegExp("(".concat(possibleChars.map(function (c) {
|
9148 |
-
return c === '?' ? '\\?' : c;
|
9149 |
-
}).join('|'), ")"));
|
9150 |
-
var matched = !r.test(key);
|
9151 |
|
9152 |
-
|
9153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9154 |
|
9155 |
-
|
9156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9157 |
}
|
9158 |
}
|
9159 |
|
9160 |
-
return
|
9161 |
}
|
9162 |
|
9163 |
-
|
9164 |
-
|
9165 |
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
9166 |
-
|
9167 |
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
9168 |
|
9169 |
-
|
|
|
|
|
|
|
|
|
9170 |
|
9171 |
-
|
9172 |
-
var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
|
9173 |
-
if (!obj) return undefined;
|
9174 |
-
if (obj[path]) return obj[path];
|
9175 |
-
var paths = path.split(keySeparator);
|
9176 |
-
var current = obj;
|
9177 |
|
9178 |
-
|
9179 |
-
|
|
|
9180 |
|
9181 |
-
if (
|
9182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9183 |
}
|
|
|
|
|
9184 |
|
9185 |
-
|
9186 |
-
|
9187 |
-
|
9188 |
-
|
|
|
9189 |
|
9190 |
-
|
9191 |
-
|
9192 |
-
|
9193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9194 |
}
|
|
|
9195 |
|
9196 |
-
|
|
|
9197 |
|
9198 |
-
|
9199 |
-
|
9200 |
-
|
9201 |
-
|
|
|
9202 |
|
9203 |
-
|
9204 |
-
|
9205 |
-
return undefined;
|
9206 |
-
}
|
9207 |
|
9208 |
-
|
9209 |
-
|
9210 |
|
9211 |
-
|
9212 |
-
|
|
|
|
|
9213 |
|
9214 |
-
|
9215 |
-
|
|
|
|
|
|
|
9216 |
|
9217 |
-
|
|
|
|
|
9218 |
|
9219 |
-
|
9220 |
-
|
|
|
9221 |
|
9222 |
-
|
9223 |
-
ns: ['translation'],
|
9224 |
-
defaultNS: 'translation'
|
9225 |
-
};
|
9226 |
|
9227 |
-
_classCallCheck(this, ResourceStore);
|
9228 |
|
9229 |
-
|
9230 |
|
9231 |
-
|
9232 |
-
|
9233 |
-
}
|
9234 |
|
9235 |
-
|
9236 |
-
_this.options = options;
|
9237 |
|
9238 |
-
if (_this.options.keySeparator === undefined) {
|
9239 |
-
_this.options.keySeparator = '.';
|
9240 |
-
}
|
9241 |
|
9242 |
-
|
9243 |
-
|
|
|
|
|
|
|
9244 |
}
|
|
|
|
|
|
|
9245 |
|
9246 |
-
return _this;
|
9247 |
-
}
|
9248 |
|
9249 |
-
|
9250 |
-
key: "addNamespaces",
|
9251 |
-
value: function addNamespaces(ns) {
|
9252 |
-
if (this.options.ns.indexOf(ns) < 0) {
|
9253 |
-
this.options.ns.push(ns);
|
9254 |
-
}
|
9255 |
-
}
|
9256 |
-
}, {
|
9257 |
-
key: "removeNamespaces",
|
9258 |
-
value: function removeNamespaces(ns) {
|
9259 |
-
var index = this.options.ns.indexOf(ns);
|
9260 |
|
9261 |
-
|
9262 |
-
|
9263 |
-
}
|
9264 |
-
}
|
9265 |
-
}, {
|
9266 |
-
key: "getResource",
|
9267 |
-
value: function getResource(lng, ns, key) {
|
9268 |
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
9269 |
-
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
9270 |
-
var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
9271 |
-
var path = [lng, ns];
|
9272 |
-
if (key && typeof key !== 'string') path = path.concat(key);
|
9273 |
-
if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
9274 |
|
9275 |
-
|
9276 |
-
path = lng.split('.');
|
9277 |
-
}
|
9278 |
|
9279 |
-
var result = getPath(this.data, path);
|
9280 |
-
if (result || !ignoreJSONStructure || typeof key !== 'string') return result;
|
9281 |
-
return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
|
9282 |
-
}
|
9283 |
-
}, {
|
9284 |
-
key: "addResource",
|
9285 |
-
value: function addResource(lng, ns, key, value) {
|
9286 |
-
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
9287 |
-
silent: false
|
9288 |
-
};
|
9289 |
-
var keySeparator = this.options.keySeparator;
|
9290 |
-
if (keySeparator === undefined) keySeparator = '.';
|
9291 |
-
var path = [lng, ns];
|
9292 |
-
if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
9293 |
|
9294 |
-
|
9295 |
-
path = lng.split('.');
|
9296 |
-
value = ns;
|
9297 |
-
ns = path[1];
|
9298 |
-
}
|
9299 |
|
9300 |
-
|
9301 |
-
|
9302 |
-
|
9303 |
-
|
9304 |
-
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
9308 |
-
|
9309 |
-
};
|
9310 |
|
9311 |
-
|
9312 |
-
|
9313 |
-
|
9314 |
-
|
9315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9316 |
|
9317 |
-
|
9318 |
-
|
9319 |
-
|
9320 |
-
|
9321 |
-
|
9322 |
-
|
9323 |
-
|
9324 |
-
};
|
9325 |
-
var path = [lng, ns];
|
9326 |
|
9327 |
-
|
9328 |
-
|
9329 |
-
|
9330 |
-
resources = ns;
|
9331 |
-
ns = path[1];
|
9332 |
}
|
9333 |
|
9334 |
-
|
9335 |
-
|
9336 |
-
|
9337 |
-
if (deep) {
|
9338 |
-
deepExtend(pack, resources, overwrite);
|
9339 |
} else {
|
9340 |
-
|
9341 |
-
}
|
9342 |
-
|
9343 |
-
setPath(this.data, path, pack);
|
9344 |
-
if (!options.silent) this.emit('added', lng, ns, resources);
|
9345 |
-
}
|
9346 |
-
}, {
|
9347 |
-
key: "removeResourceBundle",
|
9348 |
-
value: function removeResourceBundle(lng, ns) {
|
9349 |
-
if (this.hasResourceBundle(lng, ns)) {
|
9350 |
-
delete this.data[lng][ns];
|
9351 |
}
|
9352 |
|
9353 |
-
|
9354 |
-
|
9355 |
-
|
9356 |
-
|
9357 |
-
|
9358 |
-
|
9359 |
-
|
9360 |
-
}
|
9361 |
-
}, {
|
9362 |
-
key: "getResourceBundle",
|
9363 |
-
value: function getResourceBundle(lng, ns) {
|
9364 |
-
if (!ns) ns = this.options.defaultNS;
|
9365 |
-
if (this.options.compatibilityAPI === 'v1') return _objectSpread$1(_objectSpread$1({}, {}), this.getResource(lng, ns));
|
9366 |
-
return this.getResource(lng, ns);
|
9367 |
-
}
|
9368 |
-
}, {
|
9369 |
-
key: "getDataByLanguage",
|
9370 |
-
value: function getDataByLanguage(lng) {
|
9371 |
-
return this.data[lng];
|
9372 |
-
}
|
9373 |
-
}, {
|
9374 |
-
key: "hasLanguageSomeTranslations",
|
9375 |
-
value: function hasLanguageSomeTranslations(lng) {
|
9376 |
-
var data = this.getDataByLanguage(lng);
|
9377 |
-
var n = data && Object.keys(data) || [];
|
9378 |
-
return !!n.find(function (v) {
|
9379 |
-
return data[v] && Object.keys(data[v]).length > 0;
|
9380 |
});
|
9381 |
-
}
|
9382 |
-
}, {
|
9383 |
-
key: "toJSON",
|
9384 |
-
value: function toJSON() {
|
9385 |
-
return this.data;
|
9386 |
-
}
|
9387 |
-
}]);
|
9388 |
|
9389 |
-
|
9390 |
-
}
|
9391 |
|
9392 |
-
|
9393 |
-
|
9394 |
-
|
9395 |
-
|
9396 |
-
|
9397 |
-
handle: function handle(processors, value, key, options, translator) {
|
9398 |
-
var _this = this;
|
9399 |
|
9400 |
-
|
9401 |
-
if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
|
9402 |
-
});
|
9403 |
-
return value;
|
9404 |
}
|
|
|
|
|
9405 |
};
|
9406 |
|
9407 |
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
9408 |
|
9409 |
-
|
9410 |
|
9411 |
-
|
|
|
9412 |
|
9413 |
-
|
9414 |
-
var checkedLoadedFor = {};
|
9415 |
|
9416 |
-
var Translator = function (_EventEmitter) {
|
9417 |
-
_inherits(Translator, _EventEmitter);
|
9418 |
|
9419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9420 |
|
9421 |
-
function Translator(services) {
|
9422 |
-
var _this;
|
9423 |
|
9424 |
-
|
9425 |
|
9426 |
-
|
|
|
9427 |
|
9428 |
-
|
9429 |
|
9430 |
-
if (isIE10) {
|
9431 |
-
EventEmitter.call((0,assertThisInitialized/* default */.Z)(_this));
|
9432 |
-
}
|
9433 |
|
9434 |
-
|
9435 |
-
_this.options = options;
|
9436 |
|
9437 |
-
|
9438 |
-
|
9439 |
-
}
|
9440 |
|
9441 |
-
|
9442 |
-
|
9443 |
-
|
|
|
|
|
|
|
9444 |
|
9445 |
-
|
9446 |
-
|
9447 |
-
|
9448 |
-
if (lng) this.language = lng;
|
9449 |
-
}
|
9450 |
-
}, {
|
9451 |
-
key: "exists",
|
9452 |
-
value: function exists(key) {
|
9453 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
9454 |
-
interpolation: {}
|
9455 |
-
};
|
9456 |
|
9457 |
-
|
9458 |
-
|
9459 |
-
|
9460 |
|
9461 |
-
|
9462 |
-
|
9463 |
-
|
9464 |
-
}, {
|
9465 |
-
key: "extractFromKey",
|
9466 |
-
value: function extractFromKey(key, options) {
|
9467 |
-
var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
|
9468 |
-
if (nsSeparator === undefined) nsSeparator = ':';
|
9469 |
-
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
9470 |
-
var namespaces = options.ns || this.options.defaultNS || [];
|
9471 |
-
var wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;
|
9472 |
-
var seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
|
9473 |
|
9474 |
-
|
9475 |
-
|
|
|
9476 |
|
9477 |
-
|
9478 |
-
|
9479 |
-
key: key,
|
9480 |
-
namespaces: namespaces
|
9481 |
-
};
|
9482 |
-
}
|
9483 |
|
9484 |
-
|
9485 |
-
|
9486 |
-
|
9487 |
-
|
9488 |
|
9489 |
-
|
9490 |
-
|
9491 |
-
|
9492 |
-
namespaces: namespaces
|
9493 |
};
|
9494 |
-
}
|
9495 |
-
}, {
|
9496 |
-
key: "translate",
|
9497 |
-
value: function translate(keys, options, lastKey) {
|
9498 |
-
var _this2 = this;
|
9499 |
|
9500 |
-
|
9501 |
-
|
9502 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9503 |
|
9504 |
-
if (!options) options = {};
|
9505 |
-
if (keys === undefined || keys === null) return '';
|
9506 |
-
if (!Array.isArray(keys)) keys = [String(keys)];
|
9507 |
-
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
9508 |
|
9509 |
-
|
9510 |
-
key = _this$extractFromKey.key,
|
9511 |
-
namespaces = _this$extractFromKey.namespaces;
|
9512 |
|
9513 |
-
|
9514 |
-
|
9515 |
-
var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
9516 |
|
9517 |
-
|
9518 |
-
if (appendNamespaceToCIMode) {
|
9519 |
-
var nsSeparator = options.nsSeparator || this.options.nsSeparator;
|
9520 |
-
return namespace + nsSeparator + key;
|
9521 |
-
}
|
9522 |
|
9523 |
-
return key;
|
9524 |
-
}
|
9525 |
|
9526 |
-
|
9527 |
-
|
9528 |
-
|
9529 |
-
|
9530 |
-
|
9531 |
-
|
9532 |
-
|
9533 |
-
|
9534 |
-
|
|
|
|
|
|
|
9535 |
|
9536 |
-
if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {
|
9537 |
-
if (!options.returnObjects && !this.options.returnObjects) {
|
9538 |
-
if (!this.options.returnedObjectHandler) {
|
9539 |
-
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
|
9540 |
-
}
|
9541 |
|
9542 |
-
|
9543 |
-
ns: namespaces
|
9544 |
-
})) : "key '".concat(key, " (").concat(this.language, ")' returned an object instead of string.");
|
9545 |
-
}
|
9546 |
|
9547 |
-
|
9548 |
-
|
9549 |
-
var copy = resTypeIsArray ? [] : {};
|
9550 |
-
var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
|
9551 |
|
9552 |
-
|
9553 |
-
if (Object.prototype.hasOwnProperty.call(res, m)) {
|
9554 |
-
var deepKey = "".concat(newKeyToUse).concat(keySeparator).concat(m);
|
9555 |
-
copy[m] = this.translate(deepKey, _objectSpread$2(_objectSpread$2({}, options), {
|
9556 |
-
joinArrays: false,
|
9557 |
-
ns: namespaces
|
9558 |
-
}));
|
9559 |
-
if (copy[m] === deepKey) copy[m] = res[m];
|
9560 |
-
}
|
9561 |
-
}
|
9562 |
|
9563 |
-
res = copy;
|
9564 |
-
}
|
9565 |
-
} else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
|
9566 |
-
res = res.join(joinArrays);
|
9567 |
-
if (res) res = this.extendTranslation(res, keys, options, lastKey);
|
9568 |
-
} else {
|
9569 |
-
var usedDefault = false;
|
9570 |
-
var usedKey = false;
|
9571 |
-
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
9572 |
-
var hasDefaultValue = Translator.hasDefaultValue(options);
|
9573 |
-
var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';
|
9574 |
-
var defaultValue = options["defaultValue".concat(defaultValueSuffix)] || options.defaultValue;
|
9575 |
|
9576 |
-
|
9577 |
-
|
9578 |
-
|
9579 |
-
|
|
|
|
|
|
|
|
|
|
|
9580 |
|
9581 |
-
if (!this.isValidLookup(res)) {
|
9582 |
-
usedKey = true;
|
9583 |
-
res = key;
|
9584 |
-
}
|
9585 |
|
9586 |
-
|
9587 |
-
var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
|
9588 |
-
var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
|
9589 |
|
9590 |
-
|
9591 |
-
|
9592 |
|
9593 |
-
|
9594 |
-
var fk = this.resolve(key, _objectSpread$2(_objectSpread$2({}, options), {}, {
|
9595 |
-
keySeparator: false
|
9596 |
-
}));
|
9597 |
-
if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
|
9598 |
-
}
|
9599 |
|
9600 |
-
var lngs = [];
|
9601 |
-
var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
|
9602 |
|
9603 |
-
|
9604 |
-
for (var i = 0; i < fallbackLngs.length; i++) {
|
9605 |
-
lngs.push(fallbackLngs[i]);
|
9606 |
-
}
|
9607 |
-
} else if (this.options.saveMissingTo === 'all') {
|
9608 |
-
lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
|
9609 |
-
} else {
|
9610 |
-
lngs.push(options.lng || this.language);
|
9611 |
-
}
|
9612 |
|
9613 |
-
|
9614 |
-
|
9615 |
|
9616 |
-
|
9617 |
-
|
9618 |
-
|
9619 |
-
|
9620 |
-
|
|
|
9621 |
|
9622 |
-
|
9623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9624 |
|
9625 |
-
|
9626 |
-
|
9627 |
-
|
9628 |
-
|
9629 |
-
send([language], key + suffix, options["defaultValue".concat(suffix)] || defaultValue);
|
9630 |
-
});
|
9631 |
-
});
|
9632 |
-
} else {
|
9633 |
-
send(lngs, key, defaultValue);
|
9634 |
-
}
|
9635 |
-
}
|
9636 |
}
|
9637 |
|
9638 |
-
|
9639 |
-
|
9640 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9641 |
}
|
9642 |
|
9643 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9644 |
}
|
9645 |
-
}
|
9646 |
-
|
9647 |
-
value: function extendTranslation(res, key, options, resolved, lastKey) {
|
9648 |
-
var _this3 = this;
|
9649 |
|
9650 |
-
if (this.i18nFormat && this.i18nFormat.parse) {
|
9651 |
-
res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {
|
9652 |
-
resolved: resolved
|
9653 |
-
});
|
9654 |
-
} else if (!options.skipInterpolation) {
|
9655 |
-
if (options.interpolation) this.interpolator.init(_objectSpread$2(_objectSpread$2({}, options), {
|
9656 |
-
interpolation: _objectSpread$2(_objectSpread$2({}, this.options.interpolation), options.interpolation)
|
9657 |
-
}));
|
9658 |
-
var skipOnVariables = typeof res === 'string' && (options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
9659 |
-
var nestBef;
|
9660 |
|
9661 |
-
|
9662 |
-
var nb = res.match(this.interpolator.nestingRegexp);
|
9663 |
-
nestBef = nb && nb.length;
|
9664 |
-
}
|
9665 |
|
9666 |
-
|
9667 |
-
|
9668 |
-
res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
|
9669 |
|
9670 |
-
|
9671 |
-
var na = res.match(this.interpolator.nestingRegexp);
|
9672 |
-
var nestAft = na && na.length;
|
9673 |
-
if (nestBef < nestAft) options.nest = false;
|
9674 |
-
}
|
9675 |
|
9676 |
-
if (options.nest !== false) res = this.interpolator.nest(res, function () {
|
9677 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
9678 |
-
args[_key] = arguments[_key];
|
9679 |
-
}
|
9680 |
|
9681 |
-
|
9682 |
-
_this3.logger.warn("It seems you are nesting recursively key: ".concat(args[0], " in key: ").concat(key[0]));
|
9683 |
|
9684 |
-
|
9685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9686 |
|
9687 |
-
|
9688 |
-
|
9689 |
-
|
9690 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9691 |
|
9692 |
-
|
9693 |
-
var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
|
9694 |
|
9695 |
-
|
9696 |
-
|
9697 |
-
|
9698 |
-
|
9699 |
-
}
|
9700 |
|
9701 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9702 |
}
|
9703 |
-
}
|
9704 |
-
key: "resolve",
|
9705 |
-
value: function resolve(keys) {
|
9706 |
-
var _this4 = this;
|
9707 |
|
9708 |
-
|
9709 |
-
|
9710 |
-
var usedKey;
|
9711 |
-
var exactUsedKey;
|
9712 |
-
var usedLng;
|
9713 |
-
var usedNS;
|
9714 |
-
if (typeof keys === 'string') keys = [keys];
|
9715 |
-
keys.forEach(function (k) {
|
9716 |
-
if (_this4.isValidLookup(found)) return;
|
9717 |
|
9718 |
-
var extracted = _this4.extractFromKey(k, options);
|
9719 |
|
9720 |
-
|
9721 |
-
usedKey = key;
|
9722 |
-
var namespaces = extracted.namespaces;
|
9723 |
-
if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);
|
9724 |
-
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
9725 |
|
9726 |
-
|
|
|
9727 |
|
9728 |
-
|
9729 |
-
var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);
|
9730 |
-
namespaces.forEach(function (ns) {
|
9731 |
-
if (_this4.isValidLookup(found)) return;
|
9732 |
-
usedNS = ns;
|
9733 |
|
9734 |
-
if (!checkedLoadedFor["".concat(codes[0], "-").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
|
9735 |
-
checkedLoadedFor["".concat(codes[0], "-").concat(ns)] = true;
|
9736 |
|
9737 |
-
|
9738 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9739 |
|
9740 |
-
codes.forEach(function (code) {
|
9741 |
-
if (_this4.isValidLookup(found)) return;
|
9742 |
-
usedLng = code;
|
9743 |
-
var finalKeys = [key];
|
9744 |
|
9745 |
-
|
9746 |
-
_this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
|
9747 |
-
} else {
|
9748 |
-
var pluralSuffix;
|
9749 |
-
if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count, options);
|
9750 |
-
var zeroSuffix = '_zero';
|
9751 |
|
9752 |
-
|
9753 |
-
|
9754 |
|
9755 |
-
|
9756 |
-
finalKeys.push(key + zeroSuffix);
|
9757 |
-
}
|
9758 |
-
}
|
9759 |
|
9760 |
-
if (needsContextHandling) {
|
9761 |
-
var contextKey = "".concat(key).concat(_this4.options.contextSeparator).concat(options.context);
|
9762 |
-
finalKeys.push(contextKey);
|
9763 |
|
9764 |
-
|
9765 |
-
finalKeys.push(contextKey + pluralSuffix);
|
9766 |
|
9767 |
-
|
9768 |
-
finalKeys.push(contextKey + zeroSuffix);
|
9769 |
-
}
|
9770 |
-
}
|
9771 |
-
}
|
9772 |
-
}
|
9773 |
|
9774 |
-
|
|
|
|
|
|
|
|
|
|
|
9775 |
|
9776 |
-
|
9777 |
-
|
9778 |
-
exactUsedKey = possibleKey;
|
9779 |
-
found = _this4.getResource(code, ns, possibleKey, options);
|
9780 |
-
}
|
9781 |
-
}
|
9782 |
-
});
|
9783 |
-
});
|
9784 |
-
});
|
9785 |
-
return {
|
9786 |
-
res: found,
|
9787 |
-
usedKey: usedKey,
|
9788 |
-
exactUsedKey: exactUsedKey,
|
9789 |
-
usedLng: usedLng,
|
9790 |
-
usedNS: usedNS
|
9791 |
-
};
|
9792 |
-
}
|
9793 |
-
}, {
|
9794 |
-
key: "isValidLookup",
|
9795 |
-
value: function isValidLookup(res) {
|
9796 |
-
return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
|
9797 |
-
}
|
9798 |
-
}, {
|
9799 |
-
key: "getResource",
|
9800 |
-
value: function getResource(code, ns, key) {
|
9801 |
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
9802 |
-
if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
|
9803 |
-
return this.resourceStore.getResource(code, ns, key, options);
|
9804 |
-
}
|
9805 |
-
}], [{
|
9806 |
-
key: "hasDefaultValue",
|
9807 |
-
value: function hasDefaultValue(options) {
|
9808 |
-
var prefix = 'defaultValue';
|
9809 |
-
|
9810 |
-
for (var option in options) {
|
9811 |
-
if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
|
9812 |
-
return true;
|
9813 |
-
}
|
9814 |
-
}
|
9815 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9816 |
return false;
|
9817 |
}
|
9818 |
-
}
|
9819 |
-
|
9820 |
-
return Translator;
|
9821 |
-
}(EventEmitter);
|
9822 |
-
|
9823 |
-
function capitalize(string) {
|
9824 |
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
9825 |
}
|
9826 |
|
9827 |
-
|
9828 |
-
|
9829 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9830 |
|
9831 |
-
|
9832 |
-
|
9833 |
-
this.logger = baseLogger.create('languageUtils');
|
9834 |
}
|
9835 |
|
9836 |
-
|
9837 |
-
|
9838 |
-
|
9839 |
-
|
9840 |
-
var p = code.split('-');
|
9841 |
-
if (p.length === 2) return null;
|
9842 |
-
p.pop();
|
9843 |
-
if (p[p.length - 1].toLowerCase() === 'x') return null;
|
9844 |
-
return this.formatLanguageCode(p.join('-'));
|
9845 |
}
|
9846 |
-
|
9847 |
-
|
9848 |
-
|
9849 |
-
|
9850 |
-
|
9851 |
-
|
|
|
|
|
|
|
|
|
9852 |
}
|
9853 |
-
}, {
|
9854 |
-
key: "formatLanguageCode",
|
9855 |
-
value: function formatLanguageCode(code) {
|
9856 |
-
if (typeof code === 'string' && code.indexOf('-') > -1) {
|
9857 |
-
var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
|
9858 |
-
var p = code.split('-');
|
9859 |
|
9860 |
-
|
9861 |
-
|
9862 |
-
|
9863 |
-
});
|
9864 |
-
} else if (p.length === 2) {
|
9865 |
-
p[0] = p[0].toLowerCase();
|
9866 |
-
p[1] = p[1].toUpperCase();
|
9867 |
-
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
9868 |
-
} else if (p.length === 3) {
|
9869 |
-
p[0] = p[0].toLowerCase();
|
9870 |
-
if (p[1].length === 2) p[1] = p[1].toUpperCase();
|
9871 |
-
if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
|
9872 |
-
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
9873 |
-
if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
|
9874 |
-
}
|
9875 |
|
9876 |
-
|
9877 |
-
|
|
|
|
|
|
|
|
|
9878 |
|
9879 |
-
|
9880 |
-
|
9881 |
-
|
9882 |
-
|
9883 |
-
|
9884 |
-
|
9885 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9886 |
}
|
9887 |
-
|
9888 |
-
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
|
9889 |
}
|
9890 |
-
|
9891 |
-
|
9892 |
-
|
9893 |
-
|
9894 |
-
|
9895 |
-
if (!codes) return null;
|
9896 |
-
var found;
|
9897 |
-
codes.forEach(function (code) {
|
9898 |
-
if (found) return;
|
9899 |
|
9900 |
-
|
|
|
|
|
|
|
|
|
9901 |
|
9902 |
-
if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
|
9903 |
-
});
|
9904 |
|
9905 |
-
|
9906 |
-
codes.forEach(function (code) {
|
9907 |
-
if (found) return;
|
9908 |
|
9909 |
-
|
|
|
9910 |
|
9911 |
-
|
9912 |
-
found = _this.options.supportedLngs.find(function (supportedLng) {
|
9913 |
-
if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
|
9914 |
-
});
|
9915 |
-
});
|
9916 |
-
}
|
9917 |
|
9918 |
-
if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
|
9919 |
-
return found;
|
9920 |
-
}
|
9921 |
-
}, {
|
9922 |
-
key: "getFallbackCodes",
|
9923 |
-
value: function getFallbackCodes(fallbacks, code) {
|
9924 |
-
if (!fallbacks) return [];
|
9925 |
-
if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
|
9926 |
-
if (typeof fallbacks === 'string') fallbacks = [fallbacks];
|
9927 |
-
if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
|
9928 |
-
if (!code) return fallbacks["default"] || [];
|
9929 |
-
var found = fallbacks[code];
|
9930 |
-
if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
|
9931 |
-
if (!found) found = fallbacks[this.formatLanguageCode(code)];
|
9932 |
-
if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
|
9933 |
-
if (!found) found = fallbacks["default"];
|
9934 |
-
return found || [];
|
9935 |
-
}
|
9936 |
-
}, {
|
9937 |
-
key: "toResolveHierarchy",
|
9938 |
-
value: function toResolveHierarchy(code, fallbackCode) {
|
9939 |
-
var _this2 = this;
|
9940 |
|
9941 |
-
|
9942 |
-
var codes = [];
|
9943 |
|
9944 |
-
|
9945 |
-
if (!c) return;
|
9946 |
|
9947 |
-
|
9948 |
-
codes.push(c);
|
9949 |
-
} else {
|
9950 |
-
_this2.logger.warn("rejecting language code not found in supportedLngs: ".concat(c));
|
9951 |
-
}
|
9952 |
-
};
|
9953 |
|
9954 |
-
|
9955 |
-
|
9956 |
-
|
9957 |
-
|
9958 |
-
|
9959 |
-
|
9960 |
-
|
|
|
|
|
9961 |
|
9962 |
-
|
9963 |
-
|
9964 |
-
|
9965 |
-
|
9966 |
-
|
9967 |
-
|
|
|
|
|
|
|
9968 |
|
9969 |
-
|
9970 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9971 |
|
9972 |
-
|
9973 |
-
|
9974 |
-
|
9975 |
-
|
9976 |
-
},
|
9977 |
-
|
9978 |
-
|
9979 |
-
|
9980 |
-
}
|
9981 |
-
lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
|
9982 |
-
nr: [1],
|
9983 |
-
fc: 3
|
9984 |
-
}, {
|
9985 |
-
lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],
|
9986 |
-
nr: [1, 2, 5],
|
9987 |
-
fc: 4
|
9988 |
-
}, {
|
9989 |
-
lngs: ['ar'],
|
9990 |
-
nr: [0, 1, 2, 3, 11, 100],
|
9991 |
-
fc: 5
|
9992 |
-
}, {
|
9993 |
-
lngs: ['cs', 'sk'],
|
9994 |
-
nr: [1, 2, 5],
|
9995 |
-
fc: 6
|
9996 |
-
}, {
|
9997 |
-
lngs: ['csb', 'pl'],
|
9998 |
-
nr: [1, 2, 5],
|
9999 |
-
fc: 7
|
10000 |
-
}, {
|
10001 |
-
lngs: ['cy'],
|
10002 |
-
nr: [1, 2, 3, 8],
|
10003 |
-
fc: 8
|
10004 |
-
}, {
|
10005 |
-
lngs: ['fr'],
|
10006 |
-
nr: [1, 2],
|
10007 |
-
fc: 9
|
10008 |
-
}, {
|
10009 |
-
lngs: ['ga'],
|
10010 |
-
nr: [1, 2, 3, 7, 11],
|
10011 |
-
fc: 10
|
10012 |
-
}, {
|
10013 |
-
lngs: ['gd'],
|
10014 |
-
nr: [1, 2, 3, 20],
|
10015 |
-
fc: 11
|
10016 |
-
}, {
|
10017 |
-
lngs: ['is'],
|
10018 |
-
nr: [1, 2],
|
10019 |
-
fc: 12
|
10020 |
-
}, {
|
10021 |
-
lngs: ['jv'],
|
10022 |
-
nr: [0, 1],
|
10023 |
-
fc: 13
|
10024 |
-
}, {
|
10025 |
-
lngs: ['kw'],
|
10026 |
-
nr: [1, 2, 3, 4],
|
10027 |
-
fc: 14
|
10028 |
-
}, {
|
10029 |
-
lngs: ['lt'],
|
10030 |
-
nr: [1, 2, 10],
|
10031 |
-
fc: 15
|
10032 |
-
}, {
|
10033 |
-
lngs: ['lv'],
|
10034 |
-
nr: [1, 2, 0],
|
10035 |
-
fc: 16
|
10036 |
-
}, {
|
10037 |
-
lngs: ['mk'],
|
10038 |
-
nr: [1, 2],
|
10039 |
-
fc: 17
|
10040 |
-
}, {
|
10041 |
-
lngs: ['mnk'],
|
10042 |
-
nr: [0, 1, 2],
|
10043 |
-
fc: 18
|
10044 |
-
}, {
|
10045 |
-
lngs: ['mt'],
|
10046 |
-
nr: [1, 2, 11, 20],
|
10047 |
-
fc: 19
|
10048 |
-
}, {
|
10049 |
-
lngs: ['or'],
|
10050 |
-
nr: [2, 1],
|
10051 |
-
fc: 2
|
10052 |
-
}, {
|
10053 |
-
lngs: ['ro'],
|
10054 |
-
nr: [1, 2, 20],
|
10055 |
-
fc: 20
|
10056 |
-
}, {
|
10057 |
-
lngs: ['sl'],
|
10058 |
-
nr: [5, 1, 2, 3],
|
10059 |
-
fc: 21
|
10060 |
-
}, {
|
10061 |
-
lngs: ['he', 'iw'],
|
10062 |
-
nr: [1, 2, 20, 21],
|
10063 |
-
fc: 22
|
10064 |
-
}];
|
10065 |
-
var _rulesPluralsTypes = {
|
10066 |
-
1: function _(n) {
|
10067 |
-
return Number(n > 1);
|
10068 |
-
},
|
10069 |
-
2: function _(n) {
|
10070 |
-
return Number(n != 1);
|
10071 |
-
},
|
10072 |
-
3: function _(n) {
|
10073 |
-
return 0;
|
10074 |
-
},
|
10075 |
-
4: function _(n) {
|
10076 |
-
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
10077 |
-
},
|
10078 |
-
5: function _(n) {
|
10079 |
-
return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
|
10080 |
-
},
|
10081 |
-
6: function _(n) {
|
10082 |
-
return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
|
10083 |
-
},
|
10084 |
-
7: function _(n) {
|
10085 |
-
return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
10086 |
-
},
|
10087 |
-
8: function _(n) {
|
10088 |
-
return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
|
10089 |
-
},
|
10090 |
-
9: function _(n) {
|
10091 |
-
return Number(n >= 2);
|
10092 |
-
},
|
10093 |
-
10: function _(n) {
|
10094 |
-
return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
|
10095 |
-
},
|
10096 |
-
11: function _(n) {
|
10097 |
-
return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
|
10098 |
-
},
|
10099 |
-
12: function _(n) {
|
10100 |
-
return Number(n % 10 != 1 || n % 100 == 11);
|
10101 |
-
},
|
10102 |
-
13: function _(n) {
|
10103 |
-
return Number(n !== 0);
|
10104 |
-
},
|
10105 |
-
14: function _(n) {
|
10106 |
-
return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
|
10107 |
-
},
|
10108 |
-
15: function _(n) {
|
10109 |
-
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
10110 |
-
},
|
10111 |
-
16: function _(n) {
|
10112 |
-
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
|
10113 |
-
},
|
10114 |
-
17: function _(n) {
|
10115 |
-
return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
|
10116 |
-
},
|
10117 |
-
18: function _(n) {
|
10118 |
-
return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
|
10119 |
-
},
|
10120 |
-
19: function _(n) {
|
10121 |
-
return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
|
10122 |
-
},
|
10123 |
-
20: function _(n) {
|
10124 |
-
return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
|
10125 |
-
},
|
10126 |
-
21: function _(n) {
|
10127 |
-
return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
|
10128 |
-
},
|
10129 |
-
22: function _(n) {
|
10130 |
-
return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
|
10131 |
-
}
|
10132 |
-
};
|
10133 |
-
var deprecatedJsonVersions = ['v1', 'v2', 'v3'];
|
10134 |
-
var suffixesOrder = {
|
10135 |
-
zero: 0,
|
10136 |
-
one: 1,
|
10137 |
-
two: 2,
|
10138 |
-
few: 3,
|
10139 |
-
many: 4,
|
10140 |
-
other: 5
|
10141 |
-
};
|
10142 |
|
10143 |
-
|
10144 |
-
|
10145 |
-
|
10146 |
-
|
10147 |
-
|
10148 |
-
|
10149 |
-
|
10150 |
-
|
10151 |
-
});
|
10152 |
-
});
|
10153 |
-
return rules;
|
10154 |
}
|
10155 |
|
10156 |
-
|
10157 |
-
|
10158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10159 |
|
10160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10161 |
|
10162 |
-
|
10163 |
-
|
10164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10165 |
|
10166 |
-
|
10167 |
-
|
10168 |
-
|
10169 |
-
|
|
|
|
|
|
|
|
|
|
|
10170 |
|
10171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10172 |
}
|
10173 |
|
10174 |
-
|
10175 |
-
|
10176 |
-
|
10177 |
-
this.rules[lng] = obj;
|
10178 |
-
}
|
10179 |
-
}, {
|
10180 |
-
key: "getRule",
|
10181 |
-
value: function getRule(code) {
|
10182 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
10183 |
|
10184 |
-
|
10185 |
-
|
10186 |
-
|
10187 |
-
|
10188 |
-
|
10189 |
-
|
10190 |
-
|
10191 |
-
|
10192 |
-
|
10193 |
|
10194 |
-
|
10195 |
-
|
10196 |
-
|
10197 |
-
|
10198 |
-
|
10199 |
-
|
10200 |
-
|
|
|
|
|
10201 |
|
10202 |
-
|
10203 |
-
|
10204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10205 |
|
10206 |
-
|
10207 |
-
|
10208 |
-
|
10209 |
-
|
10210 |
-
|
10211 |
-
|
10212 |
-
|
10213 |
-
|
10214 |
-
|
10215 |
-
}
|
10216 |
-
}, {
|
10217 |
-
key: "getSuffixes",
|
10218 |
-
value: function getSuffixes(code) {
|
10219 |
-
var _this = this;
|
10220 |
|
10221 |
-
|
10222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10223 |
|
10224 |
-
|
10225 |
-
|
10226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10227 |
|
10228 |
-
|
10229 |
-
|
10230 |
-
|
10231 |
-
|
10232 |
-
|
10233 |
-
|
10234 |
-
|
|
|
|
|
10235 |
|
10236 |
-
|
10237 |
-
|
10238 |
-
|
10239 |
-
|
10240 |
-
|
10241 |
-
|
10242 |
-
|
10243 |
-
|
10244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10245 |
|
10246 |
-
|
10247 |
-
|
10248 |
-
|
10249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10250 |
|
10251 |
-
|
10252 |
-
|
|
|
|
|
|
|
10253 |
|
10254 |
-
|
10255 |
-
|
|
|
|
|
10256 |
}
|
10257 |
-
}
|
10258 |
-
|
10259 |
-
|
10260 |
-
|
10261 |
-
|
10262 |
-
var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
|
10263 |
-
var suffix = rule.numbers[idx];
|
10264 |
-
|
10265 |
-
if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
10266 |
-
if (suffix === 2) {
|
10267 |
-
suffix = 'plural';
|
10268 |
-
} else if (suffix === 1) {
|
10269 |
-
suffix = '';
|
10270 |
-
}
|
10271 |
-
}
|
10272 |
-
|
10273 |
-
var returnSuffix = function returnSuffix() {
|
10274 |
-
return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();
|
10275 |
-
};
|
10276 |
-
|
10277 |
-
if (this.options.compatibilityJSON === 'v1') {
|
10278 |
-
if (suffix === 1) return '';
|
10279 |
-
if (typeof suffix === 'number') return "_plural_".concat(suffix.toString());
|
10280 |
-
return returnSuffix();
|
10281 |
-
} else if (this.options.compatibilityJSON === 'v2') {
|
10282 |
-
return returnSuffix();
|
10283 |
-
} else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
10284 |
-
return returnSuffix();
|
10285 |
}
|
10286 |
-
|
10287 |
-
return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
|
10288 |
-
}
|
10289 |
-
}, {
|
10290 |
-
key: "shouldUseIntlApi",
|
10291 |
-
value: function shouldUseIntlApi() {
|
10292 |
-
return !deprecatedJsonVersions.includes(this.options.compatibilityJSON);
|
10293 |
}
|
10294 |
-
}
|
10295 |
-
|
10296 |
-
return PluralResolver;
|
10297 |
-
}();
|
10298 |
|
10299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10300 |
|
10301 |
-
|
|
|
|
|
|
|
|
|
10302 |
|
10303 |
-
|
10304 |
-
|
10305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10306 |
|
10307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10308 |
|
10309 |
-
|
10310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10311 |
|
10312 |
-
this.format = options.interpolation && options.interpolation.format || function (value) {
|
10313 |
-
return value;
|
10314 |
-
};
|
10315 |
|
10316 |
-
|
10317 |
-
}
|
10318 |
|
10319 |
-
|
10320 |
-
|
10321 |
-
value: function init() {
|
10322 |
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10323 |
-
if (!options.interpolation) options.interpolation = {
|
10324 |
-
escapeValue: true
|
10325 |
-
};
|
10326 |
-
var iOpts = options.interpolation;
|
10327 |
-
this.escape = iOpts.escape !== undefined ? iOpts.escape : i18next_escape;
|
10328 |
-
this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
|
10329 |
-
this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;
|
10330 |
-
this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
|
10331 |
-
this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
|
10332 |
-
this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
|
10333 |
-
this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
|
10334 |
-
this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
|
10335 |
-
this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
|
10336 |
-
this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
|
10337 |
-
this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
|
10338 |
-
this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
|
10339 |
-
this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
|
10340 |
-
this.resetRegExp();
|
10341 |
-
}
|
10342 |
-
}, {
|
10343 |
-
key: "reset",
|
10344 |
-
value: function reset() {
|
10345 |
-
if (this.options) this.init(this.options);
|
10346 |
-
}
|
10347 |
-
}, {
|
10348 |
-
key: "resetRegExp",
|
10349 |
-
value: function resetRegExp() {
|
10350 |
-
var regexpStr = "".concat(this.prefix, "(.+?)").concat(this.suffix);
|
10351 |
-
this.regexp = new RegExp(regexpStr, 'g');
|
10352 |
-
var regexpUnescapeStr = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
|
10353 |
-
this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
|
10354 |
-
var nestingRegexpStr = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix);
|
10355 |
-
this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
|
10356 |
-
}
|
10357 |
-
}, {
|
10358 |
-
key: "interpolate",
|
10359 |
-
value: function interpolate(str, data, lng, options) {
|
10360 |
-
var _this = this;
|
10361 |
|
10362 |
-
|
10363 |
-
|
10364 |
-
var replaces;
|
10365 |
-
var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
10366 |
|
10367 |
-
|
10368 |
-
return val.replace(/\$/g, '$$$$');
|
10369 |
-
}
|
10370 |
|
10371 |
-
|
10372 |
-
|
10373 |
-
var path = getPathWithDefaults(data, defaultData, key);
|
10374 |
-
return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
|
10375 |
-
interpolationkey: key
|
10376 |
-
})) : path;
|
10377 |
-
}
|
10378 |
|
10379 |
-
|
10380 |
-
var k = p.shift().trim();
|
10381 |
-
var f = p.join(_this.formatSeparator).trim();
|
10382 |
-
return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
|
10383 |
-
interpolationkey: k
|
10384 |
-
}));
|
10385 |
-
};
|
10386 |
|
10387 |
-
|
10388 |
-
|
10389 |
-
|
10390 |
-
|
10391 |
-
|
10392 |
-
|
10393 |
-
|
10394 |
-
}
|
10395 |
-
}, {
|
10396 |
-
regex: this.regexp,
|
10397 |
-
safeValue: function safeValue(val) {
|
10398 |
-
return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);
|
10399 |
-
}
|
10400 |
-
}];
|
10401 |
-
todos.forEach(function (todo) {
|
10402 |
-
replaces = 0;
|
10403 |
|
10404 |
-
while (match = todo.regex.exec(str)) {
|
10405 |
-
var matchedVar = match[1].trim();
|
10406 |
-
value = handleFormat(matchedVar);
|
10407 |
|
10408 |
-
|
10409 |
-
|
10410 |
-
|
10411 |
-
|
10412 |
-
|
10413 |
-
|
10414 |
-
|
10415 |
-
|
10416 |
-
|
10417 |
-
} else {
|
10418 |
-
_this.logger.warn("missed to pass in variable ".concat(matchedVar, " for interpolating ").concat(str));
|
10419 |
|
10420 |
-
|
10421 |
-
|
10422 |
-
|
10423 |
-
|
10424 |
-
|
|
|
|
|
10425 |
|
10426 |
-
|
10427 |
-
|
|
|
|
|
|
|
|
|
|
|
10428 |
|
10429 |
-
|
10430 |
-
|
10431 |
-
|
10432 |
-
} else {
|
10433 |
-
todo.regex.lastIndex = 0;
|
10434 |
-
}
|
10435 |
|
10436 |
-
|
|
|
10437 |
|
10438 |
-
|
10439 |
-
|
10440 |
-
|
10441 |
-
|
10442 |
-
|
10443 |
-
|
10444 |
-
|
10445 |
-
|
10446 |
-
|
10447 |
-
|
10448 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10449 |
|
10450 |
-
|
10451 |
-
|
10452 |
-
var value;
|
10453 |
|
10454 |
-
|
|
|
|
|
10455 |
|
10456 |
-
|
10457 |
-
|
|
|
|
|
10458 |
|
10459 |
-
|
10460 |
-
|
10461 |
-
|
10462 |
-
|
10463 |
-
var optionsString = "{".concat(c[1]);
|
10464 |
-
key = c[0];
|
10465 |
-
optionsString = this.interpolate(optionsString, clonedOptions);
|
10466 |
-
optionsString = optionsString.replace(/'/g, '"');
|
10467 |
|
10468 |
-
|
10469 |
-
|
10470 |
-
if (inheritedOptions) clonedOptions = _objectSpread$3(_objectSpread$3({}, inheritedOptions), clonedOptions);
|
10471 |
-
} catch (e) {
|
10472 |
-
this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
|
10473 |
-
return "".concat(key).concat(sep).concat(optionsString);
|
10474 |
-
}
|
10475 |
|
10476 |
-
|
10477 |
-
|
10478 |
-
|
10479 |
|
10480 |
-
|
10481 |
-
|
10482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10483 |
|
10484 |
-
|
10485 |
-
|
10486 |
-
|
10487 |
-
|
10488 |
-
|
10489 |
-
|
10490 |
-
|
10491 |
-
|
|
|
|
|
10492 |
|
10493 |
-
value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
|
10494 |
-
if (value && match[0] === str && typeof value !== 'string') return value;
|
10495 |
-
if (typeof value !== 'string') value = makeString(value);
|
10496 |
|
10497 |
-
|
10498 |
-
|
10499 |
-
|
10500 |
-
|
10501 |
|
10502 |
-
|
10503 |
-
|
10504 |
-
|
10505 |
-
|
10506 |
-
|
10507 |
-
|
10508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10509 |
|
10510 |
-
str = str.replace(match[0], value);
|
10511 |
-
this.regexp.lastIndex = 0;
|
10512 |
-
}
|
10513 |
|
10514 |
-
|
|
|
|
|
10515 |
}
|
10516 |
-
}]);
|
10517 |
|
10518 |
-
|
10519 |
-
|
|
|
10520 |
|
10521 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10522 |
|
10523 |
-
|
|
|
|
|
10524 |
|
10525 |
-
|
10526 |
-
|
10527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10528 |
|
10529 |
-
if (formatStr.indexOf('(') > -1) {
|
10530 |
-
var p = formatStr.split('(');
|
10531 |
-
formatName = p[0].toLowerCase().trim();
|
10532 |
-
var optStr = p[1].substring(0, p[1].length - 1);
|
10533 |
|
10534 |
-
|
10535 |
-
|
10536 |
-
|
10537 |
-
|
10538 |
-
} else {
|
10539 |
-
var opts = optStr.split(';');
|
10540 |
-
opts.forEach(function (opt) {
|
10541 |
-
if (!opt) return;
|
10542 |
|
10543 |
-
|
10544 |
-
|
10545 |
-
|
10546 |
-
rest = _opt$split2.slice(1);
|
10547 |
|
10548 |
-
|
10549 |
-
|
10550 |
-
if (val.trim() === 'true') formatOptions[key.trim()] = true;
|
10551 |
-
if (!isNaN(val.trim())) formatOptions[key.trim()] = parseInt(val.trim(), 10);
|
10552 |
-
if (!formatOptions[key.trim()]) formatOptions[key.trim()] = val.trim();
|
10553 |
-
});
|
10554 |
}
|
10555 |
-
}
|
10556 |
|
10557 |
-
|
10558 |
-
|
10559 |
-
|
10560 |
-
|
10561 |
-
|
|
|
10562 |
|
10563 |
-
var
|
10564 |
-
function Formatter() {
|
10565 |
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10566 |
|
10567 |
-
|
|
|
|
|
|
|
10568 |
|
10569 |
-
|
10570 |
-
this.options = options;
|
10571 |
-
this.formats = {
|
10572 |
-
number: function number(val, lng, options) {
|
10573 |
-
return new Intl.NumberFormat(lng, options).format(val);
|
10574 |
-
},
|
10575 |
-
currency: function currency(val, lng, options) {
|
10576 |
-
return new Intl.NumberFormat(lng, _objectSpread$4(_objectSpread$4({}, options), {}, {
|
10577 |
-
style: 'currency'
|
10578 |
-
})).format(val);
|
10579 |
-
},
|
10580 |
-
datetime: function datetime(val, lng, options) {
|
10581 |
-
return new Intl.DateTimeFormat(lng, _objectSpread$4({}, options)).format(val);
|
10582 |
-
},
|
10583 |
-
relativetime: function relativetime(val, lng, options) {
|
10584 |
-
return new Intl.RelativeTimeFormat(lng, _objectSpread$4({}, options)).format(val, options.range || 'day');
|
10585 |
-
},
|
10586 |
-
list: function list(val, lng, options) {
|
10587 |
-
return new Intl.ListFormat(lng, _objectSpread$4({}, options)).format(val);
|
10588 |
-
}
|
10589 |
-
};
|
10590 |
-
this.init(options);
|
10591 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10592 |
|
10593 |
-
|
10594 |
-
|
10595 |
-
|
10596 |
-
|
10597 |
-
interpolation: {}
|
10598 |
-
};
|
10599 |
-
var iOpts = options.interpolation;
|
10600 |
-
this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
|
10601 |
-
}
|
10602 |
-
}, {
|
10603 |
-
key: "add",
|
10604 |
-
value: function add(name, fc) {
|
10605 |
-
this.formats[name.toLowerCase().trim()] = fc;
|
10606 |
}
|
10607 |
-
}, {
|
10608 |
-
key: "format",
|
10609 |
-
value: function format(value, _format, lng, options) {
|
10610 |
-
var _this = this;
|
10611 |
|
10612 |
-
|
|
|
|
|
|
|
10613 |
|
10614 |
-
|
10615 |
-
|
10616 |
-
|
10617 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10618 |
|
10619 |
-
if (_this.formats[formatName]) {
|
10620 |
-
var formatted = mem;
|
10621 |
|
10622 |
-
|
10623 |
-
|
10624 |
-
var l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
|
10625 |
-
formatted = _this.formats[formatName](mem, l, _objectSpread$4(_objectSpread$4(_objectSpread$4({}, formatOptions), options), valOptions));
|
10626 |
-
} catch (error) {
|
10627 |
-
_this.logger.warn(error);
|
10628 |
-
}
|
10629 |
|
10630 |
-
|
10631 |
-
|
10632 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10633 |
}
|
10634 |
|
10635 |
-
|
10636 |
-
|
10637 |
-
|
10638 |
-
|
10639 |
-
|
10640 |
|
10641 |
-
|
10642 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10643 |
|
10644 |
-
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
10645 |
|
10646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10647 |
|
10648 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10649 |
|
10650 |
-
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
10651 |
|
10652 |
-
|
10653 |
-
|
|
|
|
|
|
|
|
|
10654 |
|
10655 |
-
while (found !== -1) {
|
10656 |
-
arr.splice(found, 1);
|
10657 |
-
found = arr.indexOf(what);
|
10658 |
-
}
|
10659 |
}
|
10660 |
|
10661 |
-
|
10662 |
-
|
|
|
|
|
|
|
10663 |
|
10664 |
-
|
|
|
|
|
10665 |
|
10666 |
-
|
10667 |
-
|
|
|
10668 |
|
10669 |
-
|
|
|
|
|
10670 |
|
10671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10672 |
|
10673 |
-
|
|
|
|
|
|
|
10674 |
|
10675 |
-
|
10676 |
-
|
10677 |
-
|
|
|
|
|
|
|
10678 |
|
10679 |
-
|
10680 |
-
|
10681 |
-
|
10682 |
-
_this.languageUtils = services.languageUtils;
|
10683 |
-
_this.options = options;
|
10684 |
-
_this.logger = baseLogger.create('backendConnector');
|
10685 |
-
_this.state = {};
|
10686 |
-
_this.queue = [];
|
10687 |
|
10688 |
-
if (
|
10689 |
-
|
|
|
|
|
10690 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10691 |
|
10692 |
-
return _this;
|
10693 |
-
}
|
10694 |
|
10695 |
-
|
10696 |
-
|
10697 |
-
|
10698 |
-
var _this2 = this;
|
10699 |
|
10700 |
-
|
10701 |
-
|
10702 |
-
var toLoadLanguages = [];
|
10703 |
-
var toLoadNamespaces = [];
|
10704 |
-
languages.forEach(function (lng) {
|
10705 |
-
var hasAllNamespaces = true;
|
10706 |
-
namespaces.forEach(function (ns) {
|
10707 |
-
var name = "".concat(lng, "|").concat(ns);
|
10708 |
-
|
10709 |
-
if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {
|
10710 |
-
_this2.state[name] = 2;
|
10711 |
-
} else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {
|
10712 |
-
if (pending.indexOf(name) < 0) pending.push(name);
|
10713 |
-
} else {
|
10714 |
-
_this2.state[name] = 1;
|
10715 |
-
hasAllNamespaces = false;
|
10716 |
-
if (pending.indexOf(name) < 0) pending.push(name);
|
10717 |
-
if (toLoad.indexOf(name) < 0) toLoad.push(name);
|
10718 |
-
if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);
|
10719 |
-
}
|
10720 |
-
});
|
10721 |
-
if (!hasAllNamespaces) toLoadLanguages.push(lng);
|
10722 |
-
});
|
10723 |
|
10724 |
-
|
10725 |
-
this.queue.push({
|
10726 |
-
pending: pending,
|
10727 |
-
loaded: {},
|
10728 |
-
errors: [],
|
10729 |
-
callback: callback
|
10730 |
-
});
|
10731 |
-
}
|
10732 |
|
10733 |
-
|
10734 |
-
|
10735 |
-
pending: pending,
|
10736 |
-
toLoadLanguages: toLoadLanguages,
|
10737 |
-
toLoadNamespaces: toLoadNamespaces
|
10738 |
-
};
|
10739 |
}
|
10740 |
-
}
|
10741 |
-
key: "loaded",
|
10742 |
-
value: function loaded(name, err, data) {
|
10743 |
-
var s = name.split('|');
|
10744 |
-
var lng = s[0];
|
10745 |
-
var ns = s[1];
|
10746 |
-
if (err) this.emit('failedLoading', lng, ns, err);
|
10747 |
|
10748 |
-
|
10749 |
-
|
10750 |
-
}
|
10751 |
|
10752 |
-
|
10753 |
-
var loaded = {};
|
10754 |
-
this.queue.forEach(function (q) {
|
10755 |
-
pushPath(q.loaded, [lng], ns);
|
10756 |
-
remove(q.pending, name);
|
10757 |
-
if (err) q.errors.push(err);
|
10758 |
|
10759 |
-
|
10760 |
-
Object.keys(q.loaded).forEach(function (l) {
|
10761 |
-
if (!loaded[l]) loaded[l] = [];
|
10762 |
|
10763 |
-
|
10764 |
-
q.loaded[l].forEach(function (ns) {
|
10765 |
-
if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);
|
10766 |
-
});
|
10767 |
-
}
|
10768 |
-
});
|
10769 |
-
q.done = true;
|
10770 |
|
10771 |
-
|
10772 |
-
|
10773 |
-
|
10774 |
-
|
10775 |
-
|
10776 |
-
}
|
10777 |
-
});
|
10778 |
-
this.emit('loaded', loaded);
|
10779 |
-
this.queue = this.queue.filter(function (q) {
|
10780 |
-
return !q.done;
|
10781 |
-
});
|
10782 |
-
}
|
10783 |
-
}, {
|
10784 |
-
key: "read",
|
10785 |
-
value: function read(lng, ns, fcName) {
|
10786 |
-
var _this3 = this;
|
10787 |
|
10788 |
-
|
10789 |
-
|
10790 |
-
|
10791 |
-
|
10792 |
-
return this.backend[fcName](lng, ns, function (err, data) {
|
10793 |
-
if (err && data && tried < 5) {
|
10794 |
-
setTimeout(function () {
|
10795 |
-
_this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
|
10796 |
-
}, wait);
|
10797 |
-
return;
|
10798 |
-
}
|
10799 |
|
10800 |
-
|
10801 |
-
|
10802 |
}
|
10803 |
-
}, {
|
10804 |
-
key: "prepareLoading",
|
10805 |
-
value: function prepareLoading(languages, namespaces) {
|
10806 |
-
var _this4 = this;
|
10807 |
|
10808 |
-
|
10809 |
-
var callback = arguments.length > 3 ? arguments[3] : undefined;
|
10810 |
|
10811 |
-
|
10812 |
-
|
10813 |
-
return callback && callback();
|
10814 |
-
}
|
10815 |
|
10816 |
-
|
10817 |
-
|
10818 |
-
var
|
|
|
|
|
10819 |
|
10820 |
-
if (
|
10821 |
-
|
10822 |
-
|
10823 |
}
|
10824 |
|
10825 |
-
|
10826 |
-
|
10827 |
-
});
|
10828 |
-
}
|
10829 |
-
}, {
|
10830 |
-
key: "load",
|
10831 |
-
value: function load(languages, namespaces, callback) {
|
10832 |
-
this.prepareLoading(languages, namespaces, {}, callback);
|
10833 |
-
}
|
10834 |
-
}, {
|
10835 |
-
key: "reload",
|
10836 |
-
value: function reload(languages, namespaces, callback) {
|
10837 |
-
this.prepareLoading(languages, namespaces, {
|
10838 |
-
reload: true
|
10839 |
-
}, callback);
|
10840 |
-
}
|
10841 |
-
}, {
|
10842 |
-
key: "loadOne",
|
10843 |
-
value: function loadOne(name) {
|
10844 |
-
var _this5 = this;
|
10845 |
-
|
10846 |
-
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
10847 |
-
var s = name.split('|');
|
10848 |
-
var lng = s[0];
|
10849 |
-
var ns = s[1];
|
10850 |
-
this.read(lng, ns, 'read', undefined, undefined, function (err, data) {
|
10851 |
-
if (err) _this5.logger.warn("".concat(prefix, "loading namespace ").concat(ns, " for language ").concat(lng, " failed"), err);
|
10852 |
-
if (!err && data) _this5.logger.log("".concat(prefix, "loaded namespace ").concat(ns, " for language ").concat(lng), data);
|
10853 |
-
|
10854 |
-
_this5.loaded(name, err, data);
|
10855 |
-
});
|
10856 |
}
|
10857 |
-
}, {
|
10858 |
-
key: "saveMissing",
|
10859 |
-
value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {
|
10860 |
-
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
10861 |
|
10862 |
-
|
10863 |
-
|
10864 |
-
|
10865 |
-
|
10866 |
|
10867 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10868 |
|
10869 |
-
if (this.backend && this.backend.create) {
|
10870 |
-
this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
10871 |
-
isUpdate: isUpdate
|
10872 |
-
}));
|
10873 |
-
}
|
10874 |
|
10875 |
-
|
10876 |
-
|
10877 |
-
|
10878 |
-
}
|
10879 |
|
10880 |
-
|
10881 |
-
|
|
|
10882 |
|
10883 |
-
|
10884 |
-
return {
|
10885 |
-
debug: false,
|
10886 |
-
initImmediate: true,
|
10887 |
-
ns: ['translation'],
|
10888 |
-
defaultNS: ['translation'],
|
10889 |
-
fallbackLng: ['dev'],
|
10890 |
-
fallbackNS: false,
|
10891 |
-
supportedLngs: false,
|
10892 |
-
nonExplicitSupportedLngs: false,
|
10893 |
-
load: 'all',
|
10894 |
-
preload: false,
|
10895 |
-
simplifyPluralSuffix: true,
|
10896 |
-
keySeparator: '.',
|
10897 |
-
nsSeparator: ':',
|
10898 |
-
pluralSeparator: '_',
|
10899 |
-
contextSeparator: '_',
|
10900 |
-
partialBundledLanguages: false,
|
10901 |
-
saveMissing: false,
|
10902 |
-
updateMissing: false,
|
10903 |
-
saveMissingTo: 'fallback',
|
10904 |
-
saveMissingPlurals: true,
|
10905 |
-
missingKeyHandler: false,
|
10906 |
-
missingInterpolationHandler: false,
|
10907 |
-
postProcess: false,
|
10908 |
-
postProcessPassResolved: false,
|
10909 |
-
returnNull: true,
|
10910 |
-
returnEmptyString: true,
|
10911 |
-
returnObjects: false,
|
10912 |
-
joinArrays: false,
|
10913 |
-
returnedObjectHandler: false,
|
10914 |
-
parseMissingKeyHandler: false,
|
10915 |
-
appendNamespaceToMissingKey: false,
|
10916 |
-
appendNamespaceToCIMode: false,
|
10917 |
-
overloadTranslationOptionHandler: function handle(args) {
|
10918 |
-
var ret = {};
|
10919 |
-
if ((0,esm_typeof/* default */.Z)(args[1]) === 'object') ret = args[1];
|
10920 |
-
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
10921 |
-
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
10922 |
|
10923 |
-
|
10924 |
-
|
10925 |
-
Object.keys(options).forEach(function (key) {
|
10926 |
-
ret[key] = options[key];
|
10927 |
-
});
|
10928 |
-
}
|
10929 |
|
10930 |
-
|
10931 |
-
|
10932 |
-
interpolation: {
|
10933 |
-
escapeValue: true,
|
10934 |
-
format: function format(value, _format, lng, options) {
|
10935 |
-
return value;
|
10936 |
-
},
|
10937 |
-
prefix: '{{',
|
10938 |
-
suffix: '}}',
|
10939 |
-
formatSeparator: ',',
|
10940 |
-
unescapePrefix: '-',
|
10941 |
-
nestingPrefix: '$t(',
|
10942 |
-
nestingSuffix: ')',
|
10943 |
-
nestingOptionsSeparator: ',',
|
10944 |
-
maxReplaces: 1000,
|
10945 |
-
skipOnVariables: true
|
10946 |
}
|
10947 |
-
}
|
|
|
|
|
10948 |
}
|
10949 |
-
function transformOptions(options) {
|
10950 |
-
if (typeof options.ns === 'string') options.ns = [options.ns];
|
10951 |
-
if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
|
10952 |
-
if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
|
10953 |
|
10954 |
-
|
10955 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10956 |
}
|
10957 |
|
10958 |
-
return
|
10959 |
}
|
10960 |
|
10961 |
-
function ownKeys
|
10962 |
-
|
10963 |
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
10964 |
|
10965 |
-
|
|
|
|
|
10966 |
|
10967 |
-
|
|
|
|
|
|
|
|
|
10968 |
|
10969 |
-
function
|
|
|
|
|
10970 |
|
10971 |
-
|
10972 |
-
|
10973 |
-
|
10974 |
-
|
10975 |
-
|
|
|
|
|
|
|
|
|
|
|
10976 |
}
|
10977 |
-
}
|
|
|
|
|
10978 |
}
|
10979 |
|
10980 |
-
|
10981 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10982 |
|
10983 |
-
|
|
|
|
|
|
|
|
|
10984 |
|
10985 |
-
|
10986 |
-
|
|
|
10987 |
|
10988 |
-
|
10989 |
-
|
|
|
|
|
|
|
|
|
10990 |
|
10991 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10992 |
|
10993 |
-
|
|
|
|
|
|
|
10994 |
|
10995 |
-
|
10996 |
-
|
10997 |
-
|
10998 |
|
10999 |
-
|
11000 |
-
|
11001 |
-
|
11002 |
-
|
11003 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11004 |
};
|
11005 |
-
|
|
|
11006 |
|
11007 |
-
|
11008 |
-
|
11009 |
-
|
|
|
11010 |
|
11011 |
-
|
11012 |
-
}
|
11013 |
|
11014 |
-
|
11015 |
-
_this.init(options, callback);
|
11016 |
-
}, 0);
|
11017 |
-
}
|
11018 |
|
11019 |
-
return _this;
|
11020 |
-
}
|
11021 |
|
11022 |
-
(0,createClass/* default */.Z)(I18n, [{
|
11023 |
-
key: "init",
|
11024 |
-
value: function init() {
|
11025 |
-
var _this2 = this;
|
11026 |
|
11027 |
-
|
11028 |
-
|
11029 |
|
11030 |
-
|
11031 |
-
callback = options;
|
11032 |
-
options = {};
|
11033 |
-
}
|
11034 |
|
11035 |
-
|
11036 |
-
if (typeof options.ns === 'string') {
|
11037 |
-
options.defaultNS = options.ns;
|
11038 |
-
} else if (options.ns.indexOf('translation') < 0) {
|
11039 |
-
options.defaultNS = options.ns[0];
|
11040 |
-
}
|
11041 |
-
}
|
11042 |
|
11043 |
-
|
11044 |
-
this.options = _objectSpread$6(_objectSpread$6(_objectSpread$6({}, defOpts), this.options), transformOptions(options));
|
11045 |
|
11046 |
-
|
11047 |
-
this.options.interpolation = _objectSpread$6(_objectSpread$6({}, defOpts.interpolation), this.options.interpolation);
|
11048 |
-
}
|
11049 |
|
11050 |
-
|
11051 |
-
this.options.userDefinedKeySeparator = options.keySeparator;
|
11052 |
-
}
|
11053 |
|
11054 |
-
|
11055 |
-
this.options.userDefinedNsSeparator = options.nsSeparator;
|
11056 |
-
}
|
11057 |
|
11058 |
-
|
11059 |
-
if (!ClassOrObject) return null;
|
11060 |
-
if (typeof ClassOrObject === 'function') return new ClassOrObject();
|
11061 |
-
return ClassOrObject;
|
11062 |
-
}
|
11063 |
|
11064 |
-
|
11065 |
-
if (this.modules.logger) {
|
11066 |
-
baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
|
11067 |
-
} else {
|
11068 |
-
baseLogger.init(null, this.options);
|
11069 |
-
}
|
11070 |
|
11071 |
-
|
11072 |
|
11073 |
-
|
11074 |
-
|
11075 |
-
|
11076 |
-
|
11077 |
-
}
|
11078 |
-
|
11079 |
-
var lu = new LanguageUtil(this.options);
|
11080 |
-
this.store = new ResourceStore(this.options.resources, this.options);
|
11081 |
-
var s = this.services;
|
11082 |
-
s.logger = baseLogger;
|
11083 |
-
s.resourceStore = this.store;
|
11084 |
-
s.languageUtils = lu;
|
11085 |
-
s.pluralResolver = new PluralResolver(lu, {
|
11086 |
-
prepend: this.options.pluralSeparator,
|
11087 |
-
compatibilityJSON: this.options.compatibilityJSON,
|
11088 |
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
11089 |
-
});
|
11090 |
|
11091 |
-
if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
|
11092 |
-
s.formatter = createClassOnDemand(formatter);
|
11093 |
-
s.formatter.init(s, this.options);
|
11094 |
-
this.options.interpolation.format = s.formatter.format.bind(s.formatter);
|
11095 |
-
}
|
11096 |
|
11097 |
-
|
11098 |
-
|
11099 |
-
|
11100 |
-
|
11101 |
-
|
11102 |
-
|
11103 |
-
|
11104 |
-
|
11105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11106 |
|
11107 |
-
|
11108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11109 |
|
11110 |
-
|
11111 |
-
|
11112 |
-
|
11113 |
-
|
|
|
11114 |
|
11115 |
-
|
11116 |
-
|
11117 |
-
|
11118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11119 |
|
11120 |
-
|
11121 |
-
|
11122 |
-
|
11123 |
-
|
11124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11125 |
|
11126 |
-
|
11127 |
-
|
11128 |
-
|
11129 |
-
|
11130 |
-
|
11131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11132 |
|
11133 |
-
|
11134 |
-
|
|
|
|
|
|
|
11135 |
|
11136 |
-
|
11137 |
-
|
11138 |
-
|
11139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11140 |
|
11141 |
-
|
11142 |
-
|
11143 |
-
|
|
|
|
|
11144 |
|
11145 |
-
|
11146 |
-
|
11147 |
-
|
11148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11149 |
|
11150 |
-
|
11151 |
-
|
11152 |
-
|
11153 |
-
|
11154 |
-
|
11155 |
-
_this2[fcName] = function () {
|
11156 |
-
var _this2$store2;
|
11157 |
|
11158 |
-
|
|
|
|
|
11159 |
|
11160 |
-
|
11161 |
-
|
11162 |
-
|
11163 |
-
var
|
|
|
11164 |
|
11165 |
-
|
11166 |
-
|
11167 |
-
|
11168 |
-
_this2.isInitialized = true;
|
11169 |
-
if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);
|
11170 |
|
11171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
11172 |
|
11173 |
-
|
11174 |
-
|
11175 |
-
|
11176 |
|
11177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11178 |
|
11179 |
-
|
11180 |
-
|
|
|
11181 |
|
11182 |
-
|
11183 |
-
|
11184 |
-
} else {
|
11185 |
-
setTimeout(load, 0);
|
11186 |
-
}
|
11187 |
|
11188 |
-
|
|
|
11189 |
}
|
11190 |
-
}, {
|
11191 |
-
key: "loadResources",
|
11192 |
-
value: function loadResources(language) {
|
11193 |
-
var _this3 = this;
|
11194 |
|
11195 |
-
|
11196 |
-
|
11197 |
-
var usedLng = typeof language === 'string' ? language : this.language;
|
11198 |
-
if (typeof language === 'function') usedCallback = language;
|
11199 |
|
11200 |
-
|
11201 |
-
|
11202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11203 |
|
11204 |
-
|
11205 |
-
|
|
|
|
|
|
|
|
|
|
|
11206 |
|
11207 |
-
|
|
|
|
|
|
|
11208 |
|
11209 |
-
|
11210 |
-
|
11211 |
-
|
11212 |
-
|
11213 |
|
11214 |
-
|
11215 |
-
|
11216 |
-
|
11217 |
-
|
11218 |
-
|
11219 |
-
|
11220 |
-
|
11221 |
-
|
|
|
|
|
11222 |
|
11223 |
-
if (this.options.preload) {
|
11224 |
-
this.options.preload.forEach(function (l) {
|
11225 |
-
return append(l);
|
11226 |
-
});
|
11227 |
-
}
|
11228 |
|
11229 |
-
this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);
|
11230 |
-
} else {
|
11231 |
-
usedCallback(null);
|
11232 |
-
}
|
11233 |
-
}
|
11234 |
-
}, {
|
11235 |
-
key: "reloadResources",
|
11236 |
-
value: function reloadResources(lngs, ns, callback) {
|
11237 |
-
var deferred = defer();
|
11238 |
-
if (!lngs) lngs = this.languages;
|
11239 |
-
if (!ns) ns = this.options.ns;
|
11240 |
-
if (!callback) callback = noop;
|
11241 |
-
this.services.backendConnector.reload(lngs, ns, function (err) {
|
11242 |
-
deferred.resolve();
|
11243 |
-
callback(err);
|
11244 |
-
});
|
11245 |
-
return deferred;
|
11246 |
-
}
|
11247 |
-
}, {
|
11248 |
-
key: "use",
|
11249 |
-
value: function use(module) {
|
11250 |
-
if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
|
11251 |
-
if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
|
11252 |
|
11253 |
-
|
11254 |
-
|
11255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11256 |
|
11257 |
-
|
11258 |
-
|
11259 |
-
|
|
|
11260 |
|
11261 |
-
|
11262 |
-
|
11263 |
-
|
11264 |
-
|
11265 |
-
|
11266 |
-
this.modules.i18nFormat = module;
|
11267 |
-
}
|
11268 |
-
|
11269 |
-
if (module.type === 'postProcessor') {
|
11270 |
-
postProcessor.addPostProcessor(module);
|
11271 |
-
}
|
11272 |
-
|
11273 |
-
if (module.type === 'formatter') {
|
11274 |
-
this.modules.formatter = module;
|
11275 |
-
}
|
11276 |
-
|
11277 |
-
if (module.type === '3rdParty') {
|
11278 |
-
this.modules.external.push(module);
|
11279 |
-
}
|
11280 |
-
|
11281 |
-
return this;
|
11282 |
}
|
11283 |
-
}
|
11284 |
-
|
11285 |
-
|
11286 |
-
|
|
|
|
|
|
|
11287 |
|
11288 |
-
this.isLanguageChangingTo = lng;
|
11289 |
-
var deferred = defer();
|
11290 |
-
this.emit('languageChanging', lng);
|
11291 |
|
11292 |
-
|
11293 |
-
|
11294 |
-
|
11295 |
-
|
11296 |
-
|
|
|
11297 |
|
11298 |
-
|
11299 |
-
|
11300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11301 |
|
11302 |
-
if (_this4.store.hasLanguageSomeTranslations(lngInLngs)) {
|
11303 |
-
_this4.resolvedLanguage = lngInLngs;
|
11304 |
-
break;
|
11305 |
-
}
|
11306 |
-
}
|
11307 |
-
};
|
11308 |
|
11309 |
-
var done = function done(err, l) {
|
11310 |
-
if (l) {
|
11311 |
-
setLngProps(l);
|
11312 |
|
11313 |
-
_this4.translator.changeLanguage(l);
|
11314 |
|
11315 |
-
|
|
|
|
|
|
|
11316 |
|
11317 |
-
_this4.emit('languageChanged', l);
|
11318 |
|
11319 |
-
_this4.logger.log('languageChanged', l);
|
11320 |
-
} else {
|
11321 |
-
_this4.isLanguageChangingTo = undefined;
|
11322 |
-
}
|
11323 |
|
11324 |
-
deferred.resolve(function () {
|
11325 |
-
return _this4.t.apply(_this4, arguments);
|
11326 |
-
});
|
11327 |
-
if (callback) callback(err, function () {
|
11328 |
-
return _this4.t.apply(_this4, arguments);
|
11329 |
-
});
|
11330 |
-
};
|
11331 |
|
11332 |
-
var setLng = function setLng(lngs) {
|
11333 |
-
if (!lng && !lngs && _this4.services.languageDetector) lngs = [];
|
11334 |
-
var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);
|
11335 |
|
11336 |
-
if (l) {
|
11337 |
-
if (!_this4.language) {
|
11338 |
-
setLngProps(l);
|
11339 |
-
}
|
11340 |
|
11341 |
-
if (!_this4.translator.language) _this4.translator.changeLanguage(l);
|
11342 |
-
if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);
|
11343 |
-
}
|
11344 |
|
11345 |
-
_this4.loadResources(l, function (err) {
|
11346 |
-
done(err, l);
|
11347 |
-
});
|
11348 |
-
};
|
11349 |
|
11350 |
-
if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
|
11351 |
-
setLng(this.services.languageDetector.detect());
|
11352 |
-
} else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
|
11353 |
-
this.services.languageDetector.detect(setLng);
|
11354 |
-
} else {
|
11355 |
-
setLng(lng);
|
11356 |
-
}
|
11357 |
|
11358 |
-
return deferred;
|
11359 |
-
}
|
11360 |
-
}, {
|
11361 |
-
key: "getFixedT",
|
11362 |
-
value: function getFixedT(lng, ns, keyPrefix) {
|
11363 |
-
var _this5 = this;
|
11364 |
|
11365 |
-
|
11366 |
-
var options;
|
11367 |
|
11368 |
-
|
11369 |
-
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
11370 |
-
rest[_key3 - 2] = arguments[_key3];
|
11371 |
-
}
|
11372 |
|
11373 |
-
|
11374 |
-
|
11375 |
-
|
11376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11377 |
|
11378 |
-
|
11379 |
-
|
11380 |
-
|
11381 |
-
var keySeparator = _this5.options.keySeparator || '.';
|
11382 |
-
var resultKey = keyPrefix ? "".concat(keyPrefix).concat(keySeparator).concat(key) : key;
|
11383 |
-
return _this5.t(resultKey, options);
|
11384 |
-
};
|
11385 |
|
11386 |
-
|
11387 |
-
fixedT.lng = lng;
|
11388 |
-
} else {
|
11389 |
-
fixedT.lngs = lng;
|
11390 |
-
}
|
11391 |
|
11392 |
-
|
11393 |
-
|
11394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11395 |
}
|
11396 |
}, {
|
11397 |
-
key: "
|
11398 |
-
value: function
|
11399 |
-
|
11400 |
-
|
11401 |
-
return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);
|
11402 |
}
|
11403 |
}, {
|
11404 |
-
key: "
|
11405 |
-
value: function
|
11406 |
-
var
|
|
|
|
|
11407 |
|
11408 |
-
return this.
|
11409 |
}
|
11410 |
}, {
|
11411 |
-
key: "
|
11412 |
-
value: function
|
11413 |
-
|
|
|
|
|
|
|
|
|
11414 |
}
|
11415 |
}, {
|
11416 |
-
key: "
|
11417 |
-
value: function
|
11418 |
-
var
|
11419 |
-
|
11420 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
11421 |
-
|
11422 |
-
if (!this.isInitialized) {
|
11423 |
-
this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
|
11424 |
-
return false;
|
11425 |
}
|
11426 |
|
11427 |
-
|
11428 |
-
|
11429 |
-
|
|
|
|
|
|
|
|
|
11430 |
}
|
11431 |
|
11432 |
-
|
11433 |
-
|
11434 |
-
|
11435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11436 |
|
11437 |
-
|
11438 |
-
|
11439 |
|
11440 |
-
|
11441 |
-
};
|
11442 |
|
11443 |
-
|
11444 |
-
|
11445 |
-
|
11446 |
-
}
|
11447 |
|
11448 |
-
|
11449 |
-
|
11450 |
-
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
11451 |
-
return false;
|
11452 |
-
}
|
11453 |
-
}, {
|
11454 |
-
key: "loadNamespaces",
|
11455 |
-
value: function loadNamespaces(ns, callback) {
|
11456 |
-
var _this7 = this;
|
11457 |
|
11458 |
-
|
|
|
|
|
|
|
11459 |
|
11460 |
-
|
11461 |
-
|
11462 |
-
return Promise.resolve();
|
11463 |
-
}
|
11464 |
|
11465 |
-
|
11466 |
-
ns.forEach(function (n) {
|
11467 |
-
if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);
|
11468 |
-
});
|
11469 |
-
this.loadResources(function (err) {
|
11470 |
-
deferred.resolve();
|
11471 |
-
if (callback) callback(err);
|
11472 |
});
|
11473 |
-
return
|
11474 |
}
|
11475 |
}, {
|
11476 |
-
key: "
|
11477 |
-
value: function
|
11478 |
-
|
11479 |
-
if (typeof lngs === 'string') lngs = [lngs];
|
11480 |
-
var preloaded = this.options.preload || [];
|
11481 |
-
var newLngs = lngs.filter(function (lng) {
|
11482 |
-
return preloaded.indexOf(lng) < 0;
|
11483 |
-
});
|
11484 |
|
11485 |
-
if (!
|
11486 |
-
|
11487 |
-
return
|
11488 |
}
|
11489 |
|
11490 |
-
this.
|
11491 |
-
|
11492 |
-
deferred.resolve();
|
11493 |
-
if (callback) callback(err);
|
11494 |
});
|
11495 |
-
return deferred;
|
11496 |
-
}
|
11497 |
-
}, {
|
11498 |
-
key: "dir",
|
11499 |
-
value: function dir(lng) {
|
11500 |
-
if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);
|
11501 |
-
if (!lng) return 'rtl';
|
11502 |
-
var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
|
11503 |
-
return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
|
11504 |
}
|
11505 |
}, {
|
11506 |
-
key: "
|
11507 |
-
value: function
|
11508 |
-
var
|
11509 |
-
|
11510 |
-
|
11511 |
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
11512 |
|
11513 |
-
|
11514 |
-
|
11515 |
-
|
|
|
|
|
|
|
11516 |
|
11517 |
-
|
11518 |
-
|
11519 |
-
membersToCopy.forEach(function (m) {
|
11520 |
-
clone[m] = _this8[m];
|
11521 |
-
});
|
11522 |
-
clone.services = _objectSpread$6({}, this.services);
|
11523 |
-
clone.services.utils = {
|
11524 |
-
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
11525 |
-
};
|
11526 |
-
clone.translator = new Translator(clone.services, clone.options);
|
11527 |
-
clone.translator.on('*', function (event) {
|
11528 |
-
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
11529 |
-
args[_key4 - 1] = arguments[_key4];
|
11530 |
-
}
|
11531 |
|
11532 |
-
|
11533 |
-
|
11534 |
-
|
11535 |
-
|
11536 |
-
clone.translator.backendConnector.services.utils = {
|
11537 |
-
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
11538 |
-
};
|
11539 |
-
return clone;
|
11540 |
-
}
|
11541 |
-
}, {
|
11542 |
-
key: "toJSON",
|
11543 |
-
value: function toJSON() {
|
11544 |
-
return {
|
11545 |
-
options: this.options,
|
11546 |
-
store: this.store,
|
11547 |
-
language: this.language,
|
11548 |
-
languages: this.languages,
|
11549 |
-
resolvedLanguage: this.resolvedLanguage
|
11550 |
-
};
|
11551 |
}
|
11552 |
}]);
|
11553 |
|
11554 |
-
return
|
11555 |
-
}(
|
11556 |
|
11557 |
-
|
11558 |
-
var
|
11559 |
-
var
|
11560 |
-
|
11561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11562 |
|
11563 |
-
|
11564 |
-
|
|
|
|
|
11565 |
|
11566 |
-
|
11567 |
-
|
11568 |
-
|
11569 |
-
var reloadResources = instance.reloadResources;
|
11570 |
-
var use = instance.use;
|
11571 |
-
var changeLanguage = instance.changeLanguage;
|
11572 |
-
var getFixedT = instance.getFixedT;
|
11573 |
-
var t = instance.t;
|
11574 |
-
var exists = instance.exists;
|
11575 |
-
var setDefaultNamespace = instance.setDefaultNamespace;
|
11576 |
-
var hasLoadedNamespace = instance.hasLoadedNamespace;
|
11577 |
-
var loadNamespaces = instance.loadNamespaces;
|
11578 |
-
var loadLanguages = instance.loadLanguages;
|
11579 |
|
11580 |
-
|
11581 |
|
|
|
|
|
|
|
|
|
11582 |
|
11583 |
-
|
|
|
|
|
|
|
|
|
|
|
11584 |
|
11585 |
-
|
11586 |
-
|
11587 |
-
|
|
|
|
|
11588 |
}
|
11589 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/store/helpers.js
|
11590 |
-
function helpers_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
11591 |
-
|
11592 |
-
function helpers_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { helpers_ownKeys(Object(source), true).forEach(function (key) { helpers_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { helpers_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
11593 |
|
11594 |
-
function
|
|
|
|
|
|
|
11595 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11597 |
|
|
|
|
|
|
|
|
|
|
|
11598 |
|
|
|
|
|
|
|
11599 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11600 |
|
11601 |
-
|
11602 |
-
|
11603 |
-
|
11604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11605 |
};
|
11606 |
-
|
11607 |
-
|
11608 |
-
|
11609 |
-
|
11610 |
-
|
11611 |
-
|
11612 |
|
11613 |
-
|
11614 |
-
|
11615 |
-
|
11616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11617 |
|
11618 |
-
if (
|
11619 |
-
|
11620 |
-
Authorization: "Bearer ".concat(buttonizer_admin.auth)
|
11621 |
-
};
|
11622 |
-
} // WordPress version
|
11623 |
-
else {
|
11624 |
-
data.headers = {
|
11625 |
-
"X-WP-Nonce": buttonizer_admin.nonce
|
11626 |
-
};
|
11627 |
-
} // With credentials
|
11628 |
|
|
|
|
|
|
|
|
|
11629 |
|
11630 |
-
|
11631 |
-
|
11632 |
-
axios_default()(data).then(function (data) {
|
11633 |
-
return resolve(data);
|
11634 |
-
})["catch"](function (err) {
|
11635 |
-
// User unauthenticated
|
11636 |
-
if (!failedEarlier && err.response && err.response.status === 401) {
|
11637 |
-
if (app.standAloneEvent) {
|
11638 |
-
app.standAloneEvent("unauthenticated");
|
11639 |
-
} // Not authenticated, but return a reject
|
11640 |
-
// Also, do not continue and re-use this request to resolve
|
11641 |
|
|
|
11642 |
|
11643 |
-
|
11644 |
-
reject("wait-for-auth");
|
11645 |
-
return;
|
11646 |
-
} // Populate failed request
|
11647 |
-
// Re-use this data after re-authorization
|
11648 |
|
|
|
11649 |
|
11650 |
-
|
11651 |
-
|
11652 |
-
|
11653 |
-
|
11654 |
-
|
11655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11656 |
}
|
11657 |
|
11658 |
-
if (
|
11659 |
-
|
|
|
|
|
|
|
11660 |
}
|
11661 |
|
11662 |
-
|
11663 |
-
|
11664 |
-
|
11665 |
-
}
|
11666 |
-
|
11667 |
-
|
11668 |
-
if (!previousFailedRequest.resolve) {
|
11669 |
-
throw new Error(previousFailedRequest);
|
11670 |
}
|
11671 |
|
11672 |
-
return
|
11673 |
-
apiRequest(previousFailedRequest.endpoint, previousFailedRequest.data, false, true).then(function (data) {
|
11674 |
-
previousFailedRequest.resolve(data);
|
11675 |
-
resolve();
|
11676 |
-
})["catch"](function (e) {
|
11677 |
-
return reject(e);
|
11678 |
-
});
|
11679 |
-
});
|
11680 |
}
|
11681 |
-
/**
|
11682 |
-
* init store
|
11683 |
-
*/
|
11684 |
|
11685 |
-
function
|
11686 |
-
|
11687 |
-
type: actionTypes.INIT,
|
11688 |
-
payload: {
|
11689 |
-
buttons: {},
|
11690 |
-
groups: {},
|
11691 |
-
timeSchedules: {},
|
11692 |
-
pageRules: {},
|
11693 |
-
settings: {}
|
11694 |
-
}
|
11695 |
-
};
|
11696 |
-
}
|
11697 |
-
/**
|
11698 |
-
* Convert data to models
|
11699 |
-
*
|
11700 |
-
* @param result
|
11701 |
-
* @return {obj} converted data
|
11702 |
-
*/
|
11703 |
|
11704 |
-
|
11705 |
-
var data = result;
|
11706 |
-
var buttons = {};
|
11707 |
-
var groups = {}; // Initializing groups
|
11708 |
|
11709 |
-
|
11710 |
-
var
|
11711 |
-
groupObject.children = []; // Initializing buttons inside the group
|
11712 |
|
11713 |
-
|
11714 |
-
|
11715 |
-
|
11716 |
-
|
11717 |
-
buttons[buttonObject.id] = buttonObject;
|
11718 |
-
groupObject.children.push(buttonObject.id);
|
11719 |
-
});
|
11720 |
-
groups[groupObject.id] = groupObject;
|
11721 |
-
});
|
11722 |
-
var timeSchedules = {};
|
11723 |
-
var pageRules = {};
|
11724 |
|
11725 |
-
|
11726 |
-
data.time_schedules.map(function (timeSchedule) {
|
11727 |
-
timeSchedules[timeSchedule.id] = {
|
11728 |
-
id: timeSchedule.id,
|
11729 |
-
name: timeSchedule.name || translate_translate("time_schedules.single_name"),
|
11730 |
-
weekdays: timeSchedule.weekdays || weekdays.map(function (weekday) {
|
11731 |
-
return {
|
11732 |
-
opened: true,
|
11733 |
-
open: "8:00",
|
11734 |
-
close: "17:00",
|
11735 |
-
weekday: weekday
|
11736 |
-
};
|
11737 |
-
}),
|
11738 |
-
start_date: timeSchedule.start_date || dateToFormat(new Date()),
|
11739 |
-
end_date: timeSchedule.end_date || null,
|
11740 |
-
dates: timeSchedule.dates || []
|
11741 |
-
};
|
11742 |
-
});
|
11743 |
-
} // Add page rules data with placeholders
|
11744 |
|
|
|
11745 |
|
11746 |
-
|
11747 |
-
|
11748 |
-
|
11749 |
-
id: pageRule.id,
|
11750 |
-
name: pageRule.name || "Unnamed pagerule",
|
11751 |
-
type: pageRule.type || "and",
|
11752 |
-
rules: pageRule.rules || [{
|
11753 |
-
type: "page_title",
|
11754 |
-
value: ""
|
11755 |
-
}]
|
11756 |
-
};
|
11757 |
-
});
|
11758 |
-
}
|
11759 |
|
11760 |
-
|
11761 |
-
|
11762 |
-
buttons: buttons,
|
11763 |
-
groups: groups,
|
11764 |
-
timeSchedules: timeSchedules,
|
11765 |
-
pageRules: pageRules,
|
11766 |
-
settings: data.settings,
|
11767 |
-
premium: data.premium,
|
11768 |
-
premium_code: data.premium_code,
|
11769 |
-
version: data.version,
|
11770 |
-
wordpress: data.wordpress,
|
11771 |
-
info: data.info,
|
11772 |
-
is_opt_in: data.is_opt_in,
|
11773 |
-
latest_tour_update: data.latest_tour_update,
|
11774 |
-
identifier: data.identifier ? data.identifier : null,
|
11775 |
-
additional_permissions: data.additional_permissions,
|
11776 |
-
domain: data.domain
|
11777 |
-
};
|
11778 |
-
}
|
11779 |
-
function createRecord(data) {
|
11780 |
-
if (data && typeof data.id !== "undefined") return data;
|
11781 |
-
return helpers_objectSpread(helpers_objectSpread({}, data), {}, {
|
11782 |
-
id: GenerateUniqueId()
|
11783 |
-
});
|
11784 |
-
}
|
11785 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/dataActions/index.js
|
11786 |
|
|
|
|
|
|
|
11787 |
|
11788 |
-
|
11789 |
-
|
11790 |
-
|
11791 |
-
* @param {string} model
|
11792 |
-
*/
|
11793 |
|
11794 |
-
|
11795 |
-
|
11796 |
-
type: actionTypes[model].ADD_MODEL,
|
11797 |
-
payload: data
|
11798 |
-
};
|
11799 |
-
}
|
11800 |
-
/**
|
11801 |
-
* Add relation between button and group
|
11802 |
-
* @param {string} button_id
|
11803 |
-
* @param {string} group_id
|
11804 |
-
*/
|
11805 |
|
11806 |
-
|
11807 |
-
|
11808 |
-
|
11809 |
-
|
11810 |
-
|
11811 |
-
|
11812 |
-
group_id: group_id,
|
11813 |
-
index: index
|
11814 |
}
|
11815 |
-
}
|
11816 |
-
|
11817 |
-
|
11818 |
-
|
11819 |
-
* @param {string} button_id button id to change relations
|
11820 |
-
* @param {string} new_group_id new group id
|
11821 |
-
*/
|
11822 |
|
11823 |
-
|
11824 |
-
|
11825 |
-
|
11826 |
-
payload: {
|
11827 |
-
button_id: button_id,
|
11828 |
-
old_group_id: old_group_id,
|
11829 |
-
new_group_id: new_group_id,
|
11830 |
-
button_index: button_index
|
11831 |
}
|
11832 |
-
}
|
11833 |
-
|
11834 |
-
|
11835 |
-
|
11836 |
-
|
11837 |
-
|
11838 |
-
|
|
|
|
|
11839 |
|
11840 |
-
|
11841 |
-
|
11842 |
-
|
11843 |
-
|
11844 |
-
|
11845 |
-
|
|
|
11846 |
}
|
11847 |
-
}
|
11848 |
-
|
11849 |
-
|
11850 |
-
|
11851 |
-
|
11852 |
-
|
11853 |
-
|
11854 |
-
|
11855 |
-
|
11856 |
-
|
11857 |
|
11858 |
-
|
11859 |
-
|
11860 |
-
|
11861 |
-
|
11862 |
-
type: buttonizer_constants_actionTypes[model].SET_KEY_FORMAT,
|
11863 |
-
payload: {
|
11864 |
-
id: id,
|
11865 |
-
format: "normal_hover",
|
11866 |
-
key: key,
|
11867 |
-
values: value
|
11868 |
}
|
11869 |
-
};
|
11870 |
-
} // if not, just set it normally
|
11871 |
|
11872 |
-
|
11873 |
-
|
11874 |
-
|
11875 |
-
payload: {
|
11876 |
-
id: id,
|
11877 |
-
key: key,
|
11878 |
-
value: value
|
11879 |
}
|
11880 |
-
}
|
11881 |
-
|
11882 |
-
|
11883 |
-
|
11884 |
-
|
11885 |
-
|
11886 |
-
|
11887 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
11888 |
}
|
11889 |
-
}
|
11890 |
-
|
11891 |
-
|
11892 |
-
|
11893 |
-
|
11894 |
-
|
11895 |
-
|
11896 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11897 |
}
|
11898 |
-
}
|
11899 |
-
|
11900 |
-
|
11901 |
-
|
11902 |
-
|
11903 |
-
|
11904 |
|
11905 |
-
|
11906 |
-
|
11907 |
-
type: actionTypes.SET_WEEKDAY,
|
11908 |
-
payload: {
|
11909 |
-
id: id,
|
11910 |
-
weekdayKey: weekdayKey,
|
11911 |
-
key: key,
|
11912 |
-
value: value
|
11913 |
}
|
11914 |
-
}
|
11915 |
-
|
11916 |
-
|
11917 |
-
|
11918 |
-
type: actionTypes.ADD_EXCLUDED_DATE,
|
11919 |
-
payload: {
|
11920 |
-
id: id
|
11921 |
}
|
11922 |
-
}
|
11923 |
-
|
11924 |
-
|
11925 |
-
|
11926 |
-
|
11927 |
-
|
11928 |
-
id: id,
|
11929 |
-
dateKey: dateKey,
|
11930 |
-
key: key,
|
11931 |
-
value: value
|
11932 |
}
|
11933 |
-
}
|
11934 |
-
|
11935 |
-
|
11936 |
-
|
11937 |
-
type: actionTypes.REMOVE_EXCLUDED_DATE,
|
11938 |
-
payload: {
|
11939 |
-
id: id,
|
11940 |
-
dateKey: dateKey
|
11941 |
}
|
11942 |
-
}
|
11943 |
-
|
11944 |
-
|
11945 |
-
|
11946 |
-
|
11947 |
-
|
11948 |
-
|
11949 |
-
|
11950 |
-
function dataActions_addRecord(data, model) {
|
11951 |
-
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
11952 |
-
return {
|
11953 |
-
type: buttonizer_constants_actionTypes[model].ADD_RECORD,
|
11954 |
-
payload: {
|
11955 |
-
record: createRecord(data),
|
11956 |
-
index: index
|
11957 |
}
|
11958 |
-
}
|
11959 |
-
|
11960 |
-
|
11961 |
-
|
11962 |
-
* @param {int} model_id id of model to remove
|
11963 |
-
* @param {String} model type of model
|
11964 |
-
*/
|
11965 |
-
|
11966 |
-
function removeRecord(model_id, model) {
|
11967 |
-
return {
|
11968 |
-
type: buttonizer_constants_actionTypes[model].REMOVE_RECORD,
|
11969 |
-
payload: {
|
11970 |
-
model_id: model_id
|
11971 |
}
|
11972 |
-
};
|
11973 |
-
}
|
11974 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/store/selectors.js
|
11975 |
|
11976 |
-
|
11977 |
-
|
11978 |
-
if (!state.groups[group_id].children) return null;
|
11979 |
-
var children = state.groups[group_id].children;
|
11980 |
-
var buttons = state.buttons;
|
11981 |
-
var result = {};
|
11982 |
-
Object.keys(buttons).map(function (obj) {
|
11983 |
-
if (children.includes(obj)) result[obj] = buttons[obj];
|
11984 |
-
});
|
11985 |
-
return result;
|
11986 |
-
}
|
11987 |
-
function selectors_getChildrenIndex(children) {
|
11988 |
-
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : dashboard_store.getState();
|
11989 |
-
if (!children) return null;
|
11990 |
-
var buttons = state.buttons;
|
11991 |
-
var result = {};
|
11992 |
-
Object.keys(buttons).map(function (obj) {
|
11993 |
-
if (children.includes(obj)) {
|
11994 |
-
children.map(function (id, index) {
|
11995 |
-
if (id === obj) result[index] = buttons[obj];
|
11996 |
-
});
|
11997 |
-
}
|
11998 |
-
});
|
11999 |
-
return result;
|
12000 |
-
}
|
12001 |
-
function selectors_getButtonsCount(group_id) {
|
12002 |
-
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.store.getState();
|
12003 |
-
if (!state.groups || !state.groups[group_id]) return 0;
|
12004 |
-
return state.groups[group_id].children.length;
|
12005 |
-
}
|
12006 |
-
function selectors_getGroupCount() {
|
12007 |
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.store.getState();
|
12008 |
-
if (!state.groups) return 0;
|
12009 |
-
return Object.keys(state.groups).length;
|
12010 |
-
}
|
12011 |
-
;// CONCATENATED MODULE: ./node_modules/immer/dist/immer.esm.js
|
12012 |
-
function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if(false){ var i, o; }throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function immer_esm_t(n){return!!n&&!!n[Q]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(r){return immer_esm_t(r)||n(23,r),r[Q].t}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:nn)(n).forEach((function(e){r&&"symbol"==typeof e||t(e,n[e],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[Q];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t,r){var e=o(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r}function c(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=tn(n);delete t[Q];for(var r=nn(t),e=0;e<r.length;e++){var i=r[e],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),t)}function d(n,e){return void 0===e&&(e=!1),y(n)||immer_esm_t(n)||!r(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(t){var r=rn[t];return r||n(18,t),r}function m(n,t){rn[n]||(rn[n]=t)}function _(){return true||0,U}function j(n,t){t&&(b("Patches"),n.u=[],n.s=[],n.v=t)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var t=n[Q];0===t.i||1===t.i?t.j():t.O=!0}function P(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||b("ES5").S(e,t,o),o?(i[Q].P&&(O(e),n(4)),r(t)&&(t=M(e,t),e.l||x(e,t)),e.u&&b("Patches").M(i[Q],t,e.u,e.s)):t=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),t!==H?t:void 0}function M(n,t,r){if(y(t))return t;var e=t[Q];if(!e)return i(t,(function(i,o){return A(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(t,i){return A(n,e,o,t,i,r)})),x(n,o,!1),r&&n.u&&b("Patches").R(e,r,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( false&&0,immer_esm_t(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!immer_esm_t(v))return;e.m=!1}if(r(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,t,r){void 0===r&&(r=!1),n.h.F&&n.m&&d(t,r)}function z(n,t){var r=n[Q];return(r?p(r):n)[t]}function I(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,t,r){var e=s(t)?b("MapSet").N(t,r):v(t)?b("MapSet").T(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;r&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):b("ES5").J(t,r);return(r?r.A:_()).p.push(e),e}function D(e){return immer_esm_t(e)||n(22,e),function n(t){if(!r(t))return t;var e,u=t[Q],c=o(t);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=F(t,c),u.I=!1}else e=F(t,c);return i(e,(function(t,r){u&&a(u.t,t)===r||f(e,t,n(r))})),3===c?new Set(e):e}(e)}function F(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function r(n,t){var r=s[n];return r?r.enumerable=t:s[n]=r={configurable:!0,enumerable:t,get:function(){var t=this[Q];return false&&0,en.get(t,n)},set:function(t){var r=this[Q]; false&&0,en.set(r,n,t)}},r}function e(n){for(var t=n.length-1;t>=0;t--){var r=n[t][Q];if(!r.P)switch(r.i){case 5:a(r)&&k(r);break;case 4:o(r)&&k(r)}}}function o(n){for(var t=n.t,r=n.k,e=nn(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=t[o];if(void 0===a&&!u(t,o))return!0;var f=r[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!t[Q];return e.length!==nn(t).length+(v?0:1)}function a(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function f(t){t.O&&n(3,JSON.stringify(p(t)))}var s={};m("ES5",{J:function(n,t){var e=Array.isArray(n),i=function(n,t){if(n){for(var e=Array(t.length),i=0;i<t.length;i++)Object.defineProperty(e,""+i,r(i,!0));return e}var o=tn(t);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=r(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(t),o)}(e,n),o={i:e?5:4,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,r,o){o?immer_esm_t(r)&&r[Q].A===n&&e(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[Q];if(r){var e=r.t,o=r.k,f=r.D,c=r.i;if(4===c)i(o,(function(t){t!==Q&&(void 0!==e[t]||u(e,t)?f[t]||n(o[t]):(f[t]=!0,k(r)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(r))}));else if(5===c){if(a(r)&&(k(r),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!r(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var t=Object.create(Object.getPrototypeOf(n));for(var i in n)t[i]=e(n[i]);return u(n,L)&&(t[L]=n[L]),t}function f(n){return immer_esm_t(n)?e(n):n}var c="add";m("Patches",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,u=r.op,f=t,s=0;s<i.length-1;s++){var v=o(f),p=""+i[s];0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(r.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(r.value);default:return delete f[h]}default:n(17,u)}})),t},R:function(n,t,r,e){switch(n.i){case 0:case 4:case 2:return function(n,t,r,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=t.concat(n);r.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,t,r,e);case 5:case 1:return function(n,t,r,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,r];r=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=t.concat([v]);r.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=t.concat([l]);r.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:t.concat(["length"]),value:i.length})}(n,t,r,e);case 3:return function(n,t,r,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=t.concat([u]);r.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=t.concat([u]);r.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,t,r,e)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t===H?void 0:t}),e.push({op:"replace",path:[],value:n.t})}})}function C(){function t(n,t){function r(){this.constructor=n}a(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=R(n.A.h,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function u(t){t.O&&n(3,JSON.stringify(p(t)))}var a=function(n,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function n(n,t){return this[Q]={i:2,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,t){var r=this[Q];return u(r),p(r).has(n)&&p(r).get(n)===t||(e(r),k(r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),e(t),k(t),t.D.set(n,!1),t.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(t){n.D.set(t,!1)})),n.o.clear())},o.forEach=function(n,t){var r=this;p(this[Q]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},o.get=function(n){var t=this[Q];u(t);var i=p(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var o=R(t.A.h,i,t);return e(t),t.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},o.entries=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,t){return this[Q]={i:3,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return p(this[Q]).size}}),r.has=function(n){var t=this[Q];return u(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[Q];return u(t),this.has(n)||(o(t),k(t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),o(t),k(t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},r.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},r.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},r.keys=function(){return this.values()},r[V]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();m("MapSet",{N:function(n,t){return new f(n,t)},T:function(n,t){return new c(n,t)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(n){var t={};return nn(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r)})),t},rn={},en={get:function(n,t){if(t===Q)return n;var e=p(n);if(!u(e,t))return function(n,t,r){var e,i=I(t,r);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.I||!r(i)?i:i===z(n.t,t)?(E(n),n.o[t]=R(n.A.h,i,n)):i},has:function(n,t){return t in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,t,r){var e=I(p(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.P){var i=z(p(n),t),o=null==i?void 0:i[Q];if(o&&o.t===r)return n.o[t]=r,n.D[t]=!1,!0;if(c(r,i)&&(void 0!==r||u(n.t,t)))return!0;E(n),k(n)}return n.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in n.o)||(n.o[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==z(n.t,t)||t in n.t?(n.D[t]=!1,E(n),k(n)):delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=p(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.i||"length"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,t){on[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),on.deleteProperty=function(t,r){return false&&0,en.deleteProperty.call(this,t[0],r)},on.set=function(t,r,e){return false&&0,en.set.call(this,t[0],r,e,t[0])};var un=function(){function e(t){var e=this;this.g=B,this.F=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var u=i;i=t;var a=e;return function(n){var t=this;void 0===n&&(n=u);for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var r;return(r=i).call.apply(r,[t,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),r(t)){var c=w(e),s=R(e,t,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!t||"object"!=typeof t){if((f=i(t))===H)return;return void 0===f&&(f=t),e.F&&d(f,!0),f}n(21,t)},this.produceWithPatches=function(n,t){return"function"==typeof n?function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))}:[e.produce(n,t,(function(n,t){r=n,i=t})),r,i];var r,i},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){r(e)||n(8),immer_esm_t(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(t,r){var e=t&&t[Q]; false&&(0);var i=e.A;return j(i,r),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(t){t&&!B&&n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=b("Patches").$;return immer_esm_t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ var immer_esm = (fn);
|
12013 |
-
//# sourceMappingURL=immer.esm.js.map
|
12014 |
|
12015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12016 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12017 |
|
|
|
12018 |
|
12019 |
-
|
12020 |
-
* Generate JSON object
|
12021 |
-
* @returns {Array}
|
12022 |
-
*/
|
12023 |
|
12024 |
-
function
|
12025 |
-
// Buttons
|
12026 |
-
var buttonGroups = Object.values(storeDataObject);
|
12027 |
-
var data = [];
|
12028 |
-
buttonGroups.forEach(function (groupObject) {
|
12029 |
-
var outputGroup = immer_esm(groupObject, function (draftObject) {
|
12030 |
-
delete draftObject.children;
|
12031 |
-
});
|
12032 |
-
var groupButtons = Object.values(selectors_getChildrenIndex(groupObject.children));
|
12033 |
-
var tempButtons = [];
|
12034 |
-
groupButtons.forEach(function (buttonObject) {
|
12035 |
-
var outputButton = immer_esm(buttonObject, function (draftObject) {
|
12036 |
-
delete draftObject.parent;
|
12037 |
-
});
|
12038 |
-
tempButtons.push(outputButton);
|
12039 |
-
});
|
12040 |
|
12041 |
-
|
12042 |
-
|
12043 |
-
name: "Button",
|
12044 |
-
show_mobile: "true",
|
12045 |
-
show_desktop: "true"
|
12046 |
-
}];
|
12047 |
-
}
|
12048 |
|
12049 |
-
|
12050 |
-
|
12051 |
-
buttons: tempButtons
|
12052 |
-
});
|
12053 |
-
});
|
12054 |
-
return data;
|
12055 |
-
}
|
12056 |
-
/**
|
12057 |
-
* Reset Buttonizer
|
12058 |
-
*/
|
12059 |
|
12060 |
-
|
12061 |
-
|
12062 |
-
|
12063 |
-
|
12064 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12065 |
}
|
12066 |
-
}).then(function () {
|
12067 |
-
location.reload();
|
12068 |
-
})["catch"](function (e) {
|
12069 |
-
console.error(e);
|
12070 |
-
throw new Error("Something went wrong trying to update this model.");
|
12071 |
-
});
|
12072 |
-
}
|
12073 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/rootActions.js
|
12074 |
|
12075 |
-
|
12076 |
-
|
12077 |
-
|
12078 |
-
|
12079 |
-
|
12080 |
}
|
12081 |
-
|
12082 |
-
|
12083 |
-
|
12084 |
-
|
12085 |
-
|
12086 |
-
|
12087 |
-
|
|
|
|
|
12088 |
}
|
12089 |
-
}
|
12090 |
-
|
12091 |
-
function
|
12092 |
-
|
12093 |
-
|
12094 |
-
|
12095 |
-
}
|
12096 |
-
;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.js
|
12097 |
-
/*! *****************************************************************************
|
12098 |
-
Copyright (c) Microsoft Corporation.
|
12099 |
-
|
12100 |
-
Permission to use, copy, modify, and/or distribute this software for any
|
12101 |
-
purpose with or without fee is hereby granted.
|
12102 |
-
|
12103 |
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
12104 |
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
12105 |
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
12106 |
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
12107 |
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
12108 |
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
12109 |
-
PERFORMANCE OF THIS SOFTWARE.
|
12110 |
-
***************************************************************************** */
|
12111 |
-
/* global Reflect, Promise */
|
12112 |
-
|
12113 |
-
var extendStatics = function(d, b) {
|
12114 |
-
extendStatics = Object.setPrototypeOf ||
|
12115 |
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
12116 |
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
12117 |
-
return extendStatics(d, b);
|
12118 |
-
};
|
12119 |
-
|
12120 |
-
function __extends(d, b) {
|
12121 |
-
extendStatics(d, b);
|
12122 |
-
function __() { this.constructor = d; }
|
12123 |
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12124 |
-
}
|
12125 |
-
|
12126 |
-
var tslib_es6_assign = function() {
|
12127 |
-
tslib_es6_assign = Object.assign || function __assign(t) {
|
12128 |
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
12129 |
-
s = arguments[i];
|
12130 |
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
12131 |
-
}
|
12132 |
-
return t;
|
12133 |
-
}
|
12134 |
-
return tslib_es6_assign.apply(this, arguments);
|
12135 |
-
}
|
12136 |
-
|
12137 |
-
function __rest(s, e) {
|
12138 |
-
var t = {};
|
12139 |
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
12140 |
-
t[p] = s[p];
|
12141 |
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
12142 |
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
12143 |
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
12144 |
-
t[p[i]] = s[p[i]];
|
12145 |
-
}
|
12146 |
-
return t;
|
12147 |
-
}
|
12148 |
-
|
12149 |
-
function __decorate(decorators, target, key, desc) {
|
12150 |
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
12151 |
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
12152 |
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
12153 |
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
12154 |
-
}
|
12155 |
-
|
12156 |
-
function __param(paramIndex, decorator) {
|
12157 |
-
return function (target, key) { decorator(target, key, paramIndex); }
|
12158 |
-
}
|
12159 |
-
|
12160 |
-
function __metadata(metadataKey, metadataValue) {
|
12161 |
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
12162 |
-
}
|
12163 |
-
|
12164 |
-
function __awaiter(thisArg, _arguments, P, generator) {
|
12165 |
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12166 |
-
return new (P || (P = Promise))(function (resolve, reject) {
|
12167 |
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
12168 |
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12169 |
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
12170 |
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
12171 |
-
});
|
12172 |
-
}
|
12173 |
-
|
12174 |
-
function __generator(thisArg, body) {
|
12175 |
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
12176 |
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
12177 |
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
12178 |
-
function step(op) {
|
12179 |
-
if (f) throw new TypeError("Generator is already executing.");
|
12180 |
-
while (_) try {
|
12181 |
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
12182 |
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
12183 |
-
switch (op[0]) {
|
12184 |
-
case 0: case 1: t = op; break;
|
12185 |
-
case 4: _.label++; return { value: op[1], done: false };
|
12186 |
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
12187 |
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
12188 |
-
default:
|
12189 |
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
12190 |
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
12191 |
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
12192 |
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
12193 |
-
if (t[2]) _.ops.pop();
|
12194 |
-
_.trys.pop(); continue;
|
12195 |
-
}
|
12196 |
-
op = body.call(thisArg, _);
|
12197 |
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
12198 |
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
12199 |
-
}
|
12200 |
-
}
|
12201 |
-
|
12202 |
-
function __createBinding(o, m, k, k2) {
|
12203 |
-
if (k2 === undefined) k2 = k;
|
12204 |
-
o[k2] = m[k];
|
12205 |
-
}
|
12206 |
-
|
12207 |
-
function __exportStar(m, exports) {
|
12208 |
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
12209 |
-
}
|
12210 |
-
|
12211 |
-
function __values(o) {
|
12212 |
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
12213 |
-
if (m) return m.call(o);
|
12214 |
-
if (o && typeof o.length === "number") return {
|
12215 |
-
next: function () {
|
12216 |
-
if (o && i >= o.length) o = void 0;
|
12217 |
-
return { value: o && o[i++], done: !o };
|
12218 |
-
}
|
12219 |
-
};
|
12220 |
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
12221 |
-
}
|
12222 |
-
|
12223 |
-
function __read(o, n) {
|
12224 |
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
12225 |
-
if (!m) return o;
|
12226 |
-
var i = m.call(o), r, ar = [], e;
|
12227 |
-
try {
|
12228 |
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
12229 |
-
}
|
12230 |
-
catch (error) { e = { error: error }; }
|
12231 |
-
finally {
|
12232 |
-
try {
|
12233 |
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
12234 |
-
}
|
12235 |
-
finally { if (e) throw e.error; }
|
12236 |
-
}
|
12237 |
-
return ar;
|
12238 |
-
}
|
12239 |
-
|
12240 |
-
function tslib_es6_spread() {
|
12241 |
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
12242 |
-
ar = ar.concat(__read(arguments[i]));
|
12243 |
-
return ar;
|
12244 |
-
}
|
12245 |
-
|
12246 |
-
function __spreadArrays() {
|
12247 |
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
12248 |
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
12249 |
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
12250 |
-
r[k] = a[j];
|
12251 |
-
return r;
|
12252 |
-
};
|
12253 |
-
|
12254 |
-
function __await(v) {
|
12255 |
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
12256 |
-
}
|
12257 |
-
|
12258 |
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
12259 |
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
12260 |
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
12261 |
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
12262 |
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
12263 |
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
12264 |
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
12265 |
-
function fulfill(value) { resume("next", value); }
|
12266 |
-
function reject(value) { resume("throw", value); }
|
12267 |
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
12268 |
-
}
|
12269 |
-
|
12270 |
-
function __asyncDelegator(o) {
|
12271 |
-
var i, p;
|
12272 |
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
12273 |
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
12274 |
-
}
|
12275 |
-
|
12276 |
-
function __asyncValues(o) {
|
12277 |
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
12278 |
-
var m = o[Symbol.asyncIterator], i;
|
12279 |
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
12280 |
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
12281 |
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
12282 |
-
}
|
12283 |
-
|
12284 |
-
function __makeTemplateObject(cooked, raw) {
|
12285 |
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
12286 |
-
return cooked;
|
12287 |
-
};
|
12288 |
-
|
12289 |
-
function __importStar(mod) {
|
12290 |
-
if (mod && mod.__esModule) return mod;
|
12291 |
-
var result = {};
|
12292 |
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
12293 |
-
result.default = mod;
|
12294 |
-
return result;
|
12295 |
-
}
|
12296 |
-
|
12297 |
-
function __importDefault(mod) {
|
12298 |
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
12299 |
-
}
|
12300 |
-
|
12301 |
-
function __classPrivateFieldGet(receiver, privateMap) {
|
12302 |
-
if (!privateMap.has(receiver)) {
|
12303 |
-
throw new TypeError("attempted to get private field on non-instance");
|
12304 |
-
}
|
12305 |
-
return privateMap.get(receiver);
|
12306 |
-
}
|
12307 |
-
|
12308 |
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
12309 |
-
if (!privateMap.has(receiver)) {
|
12310 |
-
throw new TypeError("attempted to set private field on non-instance");
|
12311 |
-
}
|
12312 |
-
privateMap.set(receiver, value);
|
12313 |
-
return value;
|
12314 |
-
}
|
12315 |
|
12316 |
-
|
12317 |
-
|
12318 |
-
|
12319 |
-
var time = __webpack_require__(21170);
|
12320 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/logger.js
|
12321 |
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
12322 |
|
12323 |
-
|
12324 |
-
|
12325 |
-
/** Prefix for logging strings */
|
12326 |
-
var PREFIX = 'Sentry Logger ';
|
12327 |
-
/** JSDoc */
|
12328 |
-
var logger_Logger = /** @class */ (function () {
|
12329 |
-
/** JSDoc */
|
12330 |
-
function Logger() {
|
12331 |
-
this._enabled = false;
|
12332 |
}
|
12333 |
-
|
12334 |
-
|
12335 |
-
|
12336 |
-
|
12337 |
-
|
12338 |
-
|
12339 |
-
|
12340 |
-
|
12341 |
-
|
12342 |
-
|
12343 |
-
|
12344 |
-
|
12345 |
-
|
12346 |
-
|
12347 |
-
|
12348 |
-
|
12349 |
-
|
12350 |
-
|
12351 |
-
logger_global.console.log(PREFIX + "[Log]: " + args.join(' '));
|
12352 |
-
});
|
12353 |
-
};
|
12354 |
-
/** JSDoc */
|
12355 |
-
Logger.prototype.warn = function () {
|
12356 |
-
var args = [];
|
12357 |
-
for (var _i = 0; _i < arguments.length; _i++) {
|
12358 |
-
args[_i] = arguments[_i];
|
12359 |
-
}
|
12360 |
-
if (!this._enabled) {
|
12361 |
-
return;
|
12362 |
-
}
|
12363 |
-
(0,misc/* consoleSandbox */.Cf)(function () {
|
12364 |
-
logger_global.console.warn(PREFIX + "[Warn]: " + args.join(' '));
|
12365 |
-
});
|
12366 |
-
};
|
12367 |
-
/** JSDoc */
|
12368 |
-
Logger.prototype.error = function () {
|
12369 |
-
var args = [];
|
12370 |
-
for (var _i = 0; _i < arguments.length; _i++) {
|
12371 |
-
args[_i] = arguments[_i];
|
12372 |
-
}
|
12373 |
-
if (!this._enabled) {
|
12374 |
-
return;
|
12375 |
}
|
12376 |
-
(0,misc/* consoleSandbox */.Cf)(function () {
|
12377 |
-
logger_global.console.error(PREFIX + "[Error]: " + args.join(' '));
|
12378 |
-
});
|
12379 |
-
};
|
12380 |
-
return Logger;
|
12381 |
-
}());
|
12382 |
-
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
12383 |
-
logger_global.__SENTRY__ = logger_global.__SENTRY__ || {};
|
12384 |
-
var logger = logger_global.__SENTRY__.logger || (logger_global.__SENTRY__.logger = new logger_Logger());
|
12385 |
|
12386 |
-
|
12387 |
-
|
12388 |
-
|
12389 |
-
|
12390 |
-
|
12391 |
-
|
12392 |
-
|
12393 |
-
|
12394 |
-
|
12395 |
-
|
12396 |
-
* @param wat A value to be checked.
|
12397 |
-
* @returns A boolean representing the result.
|
12398 |
-
*/
|
12399 |
-
function isError(wat) {
|
12400 |
-
switch (Object.prototype.toString.call(wat)) {
|
12401 |
-
case '[object Error]':
|
12402 |
-
return true;
|
12403 |
-
case '[object Exception]':
|
12404 |
-
return true;
|
12405 |
-
case '[object DOMException]':
|
12406 |
-
return true;
|
12407 |
-
default:
|
12408 |
-
return isInstanceOf(wat, Error);
|
12409 |
}
|
12410 |
-
}
|
12411 |
-
|
12412 |
-
|
12413 |
-
|
12414 |
-
*
|
12415 |
-
* @param wat A value to be checked.
|
12416 |
-
* @returns A boolean representing the result.
|
12417 |
-
*/
|
12418 |
-
function isErrorEvent(wat) {
|
12419 |
-
return Object.prototype.toString.call(wat) === '[object ErrorEvent]';
|
12420 |
-
}
|
12421 |
-
/**
|
12422 |
-
* Checks whether given value's type is DOMError
|
12423 |
-
* {@link isDOMError}.
|
12424 |
-
*
|
12425 |
-
* @param wat A value to be checked.
|
12426 |
-
* @returns A boolean representing the result.
|
12427 |
-
*/
|
12428 |
-
function isDOMError(wat) {
|
12429 |
-
return Object.prototype.toString.call(wat) === '[object DOMError]';
|
12430 |
-
}
|
12431 |
-
/**
|
12432 |
-
* Checks whether given value's type is DOMException
|
12433 |
-
* {@link isDOMException}.
|
12434 |
-
*
|
12435 |
-
* @param wat A value to be checked.
|
12436 |
-
* @returns A boolean representing the result.
|
12437 |
-
*/
|
12438 |
-
function isDOMException(wat) {
|
12439 |
-
return Object.prototype.toString.call(wat) === '[object DOMException]';
|
12440 |
-
}
|
12441 |
-
/**
|
12442 |
-
* Checks whether given value's type is a string
|
12443 |
-
* {@link isString}.
|
12444 |
-
*
|
12445 |
-
* @param wat A value to be checked.
|
12446 |
-
* @returns A boolean representing the result.
|
12447 |
-
*/
|
12448 |
-
function isString(wat) {
|
12449 |
-
return Object.prototype.toString.call(wat) === '[object String]';
|
12450 |
-
}
|
12451 |
-
/**
|
12452 |
-
* Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)
|
12453 |
-
* {@link isPrimitive}.
|
12454 |
-
*
|
12455 |
-
* @param wat A value to be checked.
|
12456 |
-
* @returns A boolean representing the result.
|
12457 |
-
*/
|
12458 |
-
function isPrimitive(wat) {
|
12459 |
-
return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
|
12460 |
-
}
|
12461 |
-
/**
|
12462 |
-
* Checks whether given value's type is an object literal
|
12463 |
-
* {@link isPlainObject}.
|
12464 |
-
*
|
12465 |
-
* @param wat A value to be checked.
|
12466 |
-
* @returns A boolean representing the result.
|
12467 |
-
*/
|
12468 |
-
function is_isPlainObject(wat) {
|
12469 |
-
return Object.prototype.toString.call(wat) === '[object Object]';
|
12470 |
-
}
|
12471 |
-
/**
|
12472 |
-
* Checks whether given value's type is an Event instance
|
12473 |
-
* {@link isEvent}.
|
12474 |
-
*
|
12475 |
-
* @param wat A value to be checked.
|
12476 |
-
* @returns A boolean representing the result.
|
12477 |
-
*/
|
12478 |
-
function isEvent(wat) {
|
12479 |
-
return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
|
12480 |
-
}
|
12481 |
-
/**
|
12482 |
-
* Checks whether given value's type is an Element instance
|
12483 |
-
* {@link isElement}.
|
12484 |
-
*
|
12485 |
-
* @param wat A value to be checked.
|
12486 |
-
* @returns A boolean representing the result.
|
12487 |
-
*/
|
12488 |
-
function isElement(wat) {
|
12489 |
-
return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
|
12490 |
-
}
|
12491 |
-
/**
|
12492 |
-
* Checks whether given value's type is an regexp
|
12493 |
-
* {@link isRegExp}.
|
12494 |
-
*
|
12495 |
-
* @param wat A value to be checked.
|
12496 |
-
* @returns A boolean representing the result.
|
12497 |
-
*/
|
12498 |
-
function isRegExp(wat) {
|
12499 |
-
return Object.prototype.toString.call(wat) === '[object RegExp]';
|
12500 |
-
}
|
12501 |
-
/**
|
12502 |
-
* Checks whether given value has a then function.
|
12503 |
-
* @param wat A value to be checked.
|
12504 |
-
*/
|
12505 |
-
function isThenable(wat) {
|
12506 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
12507 |
-
return Boolean(wat && wat.then && typeof wat.then === 'function');
|
12508 |
-
}
|
12509 |
-
/**
|
12510 |
-
* Checks whether given value's type is a SyntheticEvent
|
12511 |
-
* {@link isSyntheticEvent}.
|
12512 |
-
*
|
12513 |
-
* @param wat A value to be checked.
|
12514 |
-
* @returns A boolean representing the result.
|
12515 |
-
*/
|
12516 |
-
function isSyntheticEvent(wat) {
|
12517 |
-
return is_isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
|
12518 |
-
}
|
12519 |
-
/**
|
12520 |
-
* Checks whether given value's type is an instance of provided constructor.
|
12521 |
-
* {@link isInstanceOf}.
|
12522 |
-
*
|
12523 |
-
* @param wat A value to be checked.
|
12524 |
-
* @param base A constructor to be used in a check.
|
12525 |
-
* @returns A boolean representing the result.
|
12526 |
-
*/
|
12527 |
-
function isInstanceOf(wat, base) {
|
12528 |
-
try {
|
12529 |
-
return wat instanceof base;
|
12530 |
-
}
|
12531 |
-
catch (_e) {
|
12532 |
-
return false;
|
12533 |
-
}
|
12534 |
-
}
|
12535 |
-
//# sourceMappingURL=is.js.map
|
12536 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/syncpromise.js
|
12537 |
-
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
12538 |
-
/* eslint-disable @typescript-eslint/typedef */
|
12539 |
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
12540 |
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
12541 |
|
12542 |
-
|
12543 |
-
|
12544 |
-
|
12545 |
-
|
12546 |
-
|
12547 |
-
|
12548 |
-
|
12549 |
-
|
12550 |
-
|
12551 |
-
|
12552 |
-
|
12553 |
-
|
12554 |
-
|
12555 |
-
|
12556 |
-
var
|
12557 |
-
|
12558 |
-
|
12559 |
-
|
12560 |
-
|
12561 |
-
|
12562 |
-
|
12563 |
-
|
12564 |
-
|
12565 |
-
|
12566 |
-
|
12567 |
-
|
12568 |
-
|
12569 |
-
|
12570 |
-
|
12571 |
-
|
12572 |
-
|
12573 |
-
|
12574 |
-
|
12575 |
-
|
12576 |
-
|
12577 |
-
|
12578 |
-
|
12579 |
-
|
12580 |
-
|
12581 |
-
|
12582 |
-
|
12583 |
-
|
12584 |
-
|
12585 |
-
|
12586 |
-
|
12587 |
-
}
|
12588 |
-
|
12589 |
-
|
12590 |
-
|
12591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12592 |
}
|
12593 |
-
|
12594 |
-
|
12595 |
-
|
12596 |
-
if (handler.done) {
|
12597 |
-
return;
|
12598 |
-
}
|
12599 |
-
if (_this._state === States.RESOLVED) {
|
12600 |
-
if (handler.onfulfilled) {
|
12601 |
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
12602 |
-
handler.onfulfilled(_this._value);
|
12603 |
-
}
|
12604 |
-
}
|
12605 |
-
if (_this._state === States.REJECTED) {
|
12606 |
-
if (handler.onrejected) {
|
12607 |
-
handler.onrejected(_this._value);
|
12608 |
-
}
|
12609 |
-
}
|
12610 |
-
handler.done = true;
|
12611 |
-
});
|
12612 |
-
};
|
12613 |
-
try {
|
12614 |
-
executor(this._resolve, this._reject);
|
12615 |
}
|
12616 |
-
|
12617 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12618 |
}
|
12619 |
-
|
12620 |
-
|
12621 |
-
|
12622 |
-
|
12623 |
-
|
12624 |
-
|
12625 |
-
|
12626 |
-
|
12627 |
-
|
12628 |
-
|
12629 |
-
|
12630 |
-
|
12631 |
-
|
12632 |
-
|
12633 |
-
|
12634 |
-
|
12635 |
-
|
12636 |
-
|
12637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12638 |
}
|
12639 |
-
|
12640 |
-
|
12641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12642 |
}
|
12643 |
-
var counter = collection.length;
|
12644 |
-
var resolvedCollection = [];
|
12645 |
-
collection.forEach(function (item, index) {
|
12646 |
-
SyncPromise.resolve(item)
|
12647 |
-
.then(function (value) {
|
12648 |
-
resolvedCollection[index] = value;
|
12649 |
-
counter -= 1;
|
12650 |
-
if (counter !== 0) {
|
12651 |
-
return;
|
12652 |
-
}
|
12653 |
-
resolve(resolvedCollection);
|
12654 |
-
})
|
12655 |
-
.then(null, reject);
|
12656 |
-
});
|
12657 |
-
});
|
12658 |
-
};
|
12659 |
-
/** JSDoc */
|
12660 |
-
SyncPromise.prototype.then = function (onfulfilled, onrejected) {
|
12661 |
-
var _this = this;
|
12662 |
-
return new SyncPromise(function (resolve, reject) {
|
12663 |
-
_this._attachHandler({
|
12664 |
-
done: false,
|
12665 |
-
onfulfilled: function (result) {
|
12666 |
-
if (!onfulfilled) {
|
12667 |
-
// TODO: ¯\_(ツ)_/¯
|
12668 |
-
// TODO: FIXME
|
12669 |
-
resolve(result);
|
12670 |
-
return;
|
12671 |
-
}
|
12672 |
-
try {
|
12673 |
-
resolve(onfulfilled(result));
|
12674 |
-
return;
|
12675 |
-
}
|
12676 |
-
catch (e) {
|
12677 |
-
reject(e);
|
12678 |
-
return;
|
12679 |
-
}
|
12680 |
-
},
|
12681 |
-
onrejected: function (reason) {
|
12682 |
-
if (!onrejected) {
|
12683 |
-
reject(reason);
|
12684 |
-
return;
|
12685 |
-
}
|
12686 |
-
try {
|
12687 |
-
resolve(onrejected(reason));
|
12688 |
-
return;
|
12689 |
-
}
|
12690 |
-
catch (e) {
|
12691 |
-
reject(e);
|
12692 |
-
return;
|
12693 |
-
}
|
12694 |
-
},
|
12695 |
-
});
|
12696 |
-
});
|
12697 |
-
};
|
12698 |
-
/** JSDoc */
|
12699 |
-
SyncPromise.prototype.catch = function (onrejected) {
|
12700 |
-
return this.then(function (val) { return val; }, onrejected);
|
12701 |
-
};
|
12702 |
-
/** JSDoc */
|
12703 |
-
SyncPromise.prototype.finally = function (onfinally) {
|
12704 |
-
var _this = this;
|
12705 |
-
return new SyncPromise(function (resolve, reject) {
|
12706 |
-
var val;
|
12707 |
-
var isRejected;
|
12708 |
-
return _this.then(function (value) {
|
12709 |
-
isRejected = false;
|
12710 |
-
val = value;
|
12711 |
-
if (onfinally) {
|
12712 |
-
onfinally();
|
12713 |
-
}
|
12714 |
-
}, function (reason) {
|
12715 |
-
isRejected = true;
|
12716 |
-
val = reason;
|
12717 |
-
if (onfinally) {
|
12718 |
-
onfinally();
|
12719 |
-
}
|
12720 |
-
}).then(function () {
|
12721 |
-
if (isRejected) {
|
12722 |
-
reject(val);
|
12723 |
-
return;
|
12724 |
-
}
|
12725 |
-
resolve(val);
|
12726 |
-
});
|
12727 |
-
});
|
12728 |
-
};
|
12729 |
-
/** JSDoc */
|
12730 |
-
SyncPromise.prototype.toString = function () {
|
12731 |
-
return '[object SyncPromise]';
|
12732 |
-
};
|
12733 |
-
return SyncPromise;
|
12734 |
-
}());
|
12735 |
|
12736 |
-
|
12737 |
-
|
12738 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12739 |
|
12740 |
-
|
12741 |
-
|
12742 |
-
|
12743 |
-
|
12744 |
-
|
12745 |
-
|
12746 |
-
/** Flag if notifiying is happening. */
|
12747 |
-
this._notifyingListeners = false;
|
12748 |
-
/** Callback for client to receive scope changes. */
|
12749 |
-
this._scopeListeners = [];
|
12750 |
-
/** Callback list that will be called after {@link applyToEvent}. */
|
12751 |
-
this._eventProcessors = [];
|
12752 |
-
/** Array of breadcrumbs. */
|
12753 |
-
this._breadcrumbs = [];
|
12754 |
-
/** User */
|
12755 |
-
this._user = {};
|
12756 |
-
/** Tags */
|
12757 |
-
this._tags = {};
|
12758 |
-
/** Extra */
|
12759 |
-
this._extra = {};
|
12760 |
-
/** Contexts */
|
12761 |
-
this._contexts = {};
|
12762 |
}
|
12763 |
-
|
12764 |
-
|
12765 |
-
|
12766 |
-
|
12767 |
-
|
12768 |
-
|
12769 |
-
|
12770 |
-
|
12771 |
-
|
12772 |
-
|
12773 |
-
|
12774 |
-
|
12775 |
-
|
12776 |
-
|
12777 |
-
|
12778 |
-
|
12779 |
-
|
12780 |
-
|
|
|
12781 |
}
|
12782 |
-
|
12783 |
-
|
12784 |
-
|
12785 |
-
|
12786 |
-
|
12787 |
-
|
12788 |
-
|
12789 |
-
|
12790 |
-
|
12791 |
-
/**
|
12792 |
-
* @inheritDoc
|
12793 |
-
*/
|
12794 |
-
Scope.prototype.addEventProcessor = function (callback) {
|
12795 |
-
this._eventProcessors.push(callback);
|
12796 |
-
return this;
|
12797 |
-
};
|
12798 |
-
/**
|
12799 |
-
* @inheritDoc
|
12800 |
-
*/
|
12801 |
-
Scope.prototype.setUser = function (user) {
|
12802 |
-
this._user = user || {};
|
12803 |
-
if (this._session) {
|
12804 |
-
this._session.update({ user: user });
|
12805 |
}
|
12806 |
-
|
12807 |
-
|
12808 |
-
|
12809 |
-
|
12810 |
-
|
12811 |
-
|
12812 |
-
|
12813 |
-
|
12814 |
-
|
12815 |
-
|
12816 |
-
|
12817 |
-
|
12818 |
-
|
12819 |
-
|
12820 |
-
this.
|
12821 |
-
|
12822 |
-
|
12823 |
-
|
12824 |
-
|
12825 |
-
|
12826 |
-
|
12827 |
-
|
12828 |
-
|
12829 |
-
this
|
12830 |
-
|
12831 |
-
|
12832 |
-
|
12833 |
-
|
12834 |
-
|
12835 |
-
|
12836 |
-
|
12837 |
-
|
12838 |
-
|
12839 |
-
|
12840 |
-
|
12841 |
-
|
12842 |
-
|
12843 |
-
|
12844 |
-
|
12845 |
-
|
12846 |
-
|
12847 |
-
return
|
12848 |
-
|
12849 |
-
|
12850 |
-
|
12851 |
-
|
12852 |
-
|
12853 |
-
|
12854 |
-
|
12855 |
-
|
12856 |
-
|
12857 |
-
|
12858 |
-
|
12859 |
-
|
12860 |
-
|
12861 |
-
|
12862 |
-
|
12863 |
-
|
12864 |
-
|
12865 |
-
|
12866 |
-
|
12867 |
-
|
12868 |
-
|
12869 |
-
|
12870 |
-
|
12871 |
-
|
12872 |
-
|
12873 |
-
|
12874 |
-
|
12875 |
-
|
12876 |
-
|
12877 |
-
|
12878 |
-
|
12879 |
-
|
12880 |
-
|
12881 |
-
|
12882 |
-
|
12883 |
-
|
12884 |
-
|
12885 |
-
|
12886 |
-
|
12887 |
-
|
12888 |
-
}
|
12889 |
-
else {
|
12890 |
-
this._contexts = tslib_es6_assign(tslib_es6_assign({}, this._contexts), (_a = {}, _a[key] = context, _a));
|
12891 |
-
}
|
12892 |
-
this._notifyScopeListeners();
|
12893 |
-
return this;
|
12894 |
-
};
|
12895 |
-
/**
|
12896 |
-
* @inheritDoc
|
12897 |
-
*/
|
12898 |
-
Scope.prototype.setSpan = function (span) {
|
12899 |
-
this._span = span;
|
12900 |
-
this._notifyScopeListeners();
|
12901 |
-
return this;
|
12902 |
-
};
|
12903 |
-
/**
|
12904 |
-
* @inheritDoc
|
12905 |
-
*/
|
12906 |
-
Scope.prototype.getSpan = function () {
|
12907 |
-
return this._span;
|
12908 |
-
};
|
12909 |
-
/**
|
12910 |
-
* @inheritDoc
|
12911 |
-
*/
|
12912 |
-
Scope.prototype.getTransaction = function () {
|
12913 |
-
var _a, _b, _c, _d;
|
12914 |
-
// often, this span will be a transaction, but it's not guaranteed to be
|
12915 |
-
var span = this.getSpan();
|
12916 |
-
// try it the new way first
|
12917 |
-
if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) {
|
12918 |
-
return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction;
|
12919 |
-
}
|
12920 |
-
// fallback to the old way (known bug: this only finds transactions with sampled = true)
|
12921 |
-
if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) {
|
12922 |
-
return span.spanRecorder.spans[0];
|
12923 |
-
}
|
12924 |
-
// neither way found a transaction
|
12925 |
-
return undefined;
|
12926 |
-
};
|
12927 |
-
/**
|
12928 |
-
* @inheritDoc
|
12929 |
-
*/
|
12930 |
-
Scope.prototype.setSession = function (session) {
|
12931 |
-
if (!session) {
|
12932 |
-
delete this._session;
|
12933 |
-
}
|
12934 |
-
else {
|
12935 |
-
this._session = session;
|
12936 |
-
}
|
12937 |
-
this._notifyScopeListeners();
|
12938 |
-
return this;
|
12939 |
-
};
|
12940 |
-
/**
|
12941 |
-
* @inheritDoc
|
12942 |
-
*/
|
12943 |
-
Scope.prototype.getSession = function () {
|
12944 |
-
return this._session;
|
12945 |
-
};
|
12946 |
-
/**
|
12947 |
-
* @inheritDoc
|
12948 |
-
*/
|
12949 |
-
Scope.prototype.update = function (captureContext) {
|
12950 |
-
if (!captureContext) {
|
12951 |
-
return this;
|
12952 |
-
}
|
12953 |
-
if (typeof captureContext === 'function') {
|
12954 |
-
var updatedScope = captureContext(this);
|
12955 |
-
return updatedScope instanceof Scope ? updatedScope : this;
|
12956 |
-
}
|
12957 |
-
if (captureContext instanceof Scope) {
|
12958 |
-
this._tags = tslib_es6_assign(tslib_es6_assign({}, this._tags), captureContext._tags);
|
12959 |
-
this._extra = tslib_es6_assign(tslib_es6_assign({}, this._extra), captureContext._extra);
|
12960 |
-
this._contexts = tslib_es6_assign(tslib_es6_assign({}, this._contexts), captureContext._contexts);
|
12961 |
-
if (captureContext._user && Object.keys(captureContext._user).length) {
|
12962 |
-
this._user = captureContext._user;
|
12963 |
-
}
|
12964 |
-
if (captureContext._level) {
|
12965 |
-
this._level = captureContext._level;
|
12966 |
-
}
|
12967 |
-
if (captureContext._fingerprint) {
|
12968 |
-
this._fingerprint = captureContext._fingerprint;
|
12969 |
-
}
|
12970 |
-
}
|
12971 |
-
else if (is_isPlainObject(captureContext)) {
|
12972 |
-
// eslint-disable-next-line no-param-reassign
|
12973 |
-
captureContext = captureContext;
|
12974 |
-
this._tags = tslib_es6_assign(tslib_es6_assign({}, this._tags), captureContext.tags);
|
12975 |
-
this._extra = tslib_es6_assign(tslib_es6_assign({}, this._extra), captureContext.extra);
|
12976 |
-
this._contexts = tslib_es6_assign(tslib_es6_assign({}, this._contexts), captureContext.contexts);
|
12977 |
-
if (captureContext.user) {
|
12978 |
-
this._user = captureContext.user;
|
12979 |
-
}
|
12980 |
-
if (captureContext.level) {
|
12981 |
-
this._level = captureContext.level;
|
12982 |
-
}
|
12983 |
-
if (captureContext.fingerprint) {
|
12984 |
-
this._fingerprint = captureContext.fingerprint;
|
12985 |
-
}
|
12986 |
-
}
|
12987 |
-
return this;
|
12988 |
-
};
|
12989 |
-
/**
|
12990 |
-
* @inheritDoc
|
12991 |
-
*/
|
12992 |
-
Scope.prototype.clear = function () {
|
12993 |
-
this._breadcrumbs = [];
|
12994 |
-
this._tags = {};
|
12995 |
-
this._extra = {};
|
12996 |
-
this._user = {};
|
12997 |
-
this._contexts = {};
|
12998 |
-
this._level = undefined;
|
12999 |
-
this._transactionName = undefined;
|
13000 |
-
this._fingerprint = undefined;
|
13001 |
-
this._span = undefined;
|
13002 |
-
this._session = undefined;
|
13003 |
-
this._notifyScopeListeners();
|
13004 |
-
return this;
|
13005 |
-
};
|
13006 |
-
/**
|
13007 |
-
* @inheritDoc
|
13008 |
-
*/
|
13009 |
-
Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
|
13010 |
-
var mergedBreadcrumb = tslib_es6_assign({ timestamp: (0,time/* dateTimestampInSeconds */.yW)() }, breadcrumb);
|
13011 |
-
this._breadcrumbs =
|
13012 |
-
maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0
|
13013 |
-
? tslib_es6_spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs)
|
13014 |
-
: tslib_es6_spread(this._breadcrumbs, [mergedBreadcrumb]);
|
13015 |
-
this._notifyScopeListeners();
|
13016 |
-
return this;
|
13017 |
-
};
|
13018 |
-
/**
|
13019 |
-
* @inheritDoc
|
13020 |
-
*/
|
13021 |
-
Scope.prototype.clearBreadcrumbs = function () {
|
13022 |
-
this._breadcrumbs = [];
|
13023 |
-
this._notifyScopeListeners();
|
13024 |
-
return this;
|
13025 |
-
};
|
13026 |
-
/**
|
13027 |
-
* Applies the current context and fingerprint to the event.
|
13028 |
-
* Note that breadcrumbs will be added by the client.
|
13029 |
-
* Also if the event has already breadcrumbs on it, we do not merge them.
|
13030 |
-
* @param event Event
|
13031 |
-
* @param hint May contain additional informartion about the original exception.
|
13032 |
-
* @hidden
|
13033 |
-
*/
|
13034 |
-
Scope.prototype.applyToEvent = function (event, hint) {
|
13035 |
-
var _a;
|
13036 |
-
if (this._extra && Object.keys(this._extra).length) {
|
13037 |
-
event.extra = tslib_es6_assign(tslib_es6_assign({}, this._extra), event.extra);
|
13038 |
-
}
|
13039 |
-
if (this._tags && Object.keys(this._tags).length) {
|
13040 |
-
event.tags = tslib_es6_assign(tslib_es6_assign({}, this._tags), event.tags);
|
13041 |
-
}
|
13042 |
-
if (this._user && Object.keys(this._user).length) {
|
13043 |
-
event.user = tslib_es6_assign(tslib_es6_assign({}, this._user), event.user);
|
13044 |
-
}
|
13045 |
-
if (this._contexts && Object.keys(this._contexts).length) {
|
13046 |
-
event.contexts = tslib_es6_assign(tslib_es6_assign({}, this._contexts), event.contexts);
|
13047 |
-
}
|
13048 |
-
if (this._level) {
|
13049 |
-
event.level = this._level;
|
13050 |
-
}
|
13051 |
-
if (this._transactionName) {
|
13052 |
-
event.transaction = this._transactionName;
|
13053 |
-
}
|
13054 |
-
// We want to set the trace context for normal events only if there isn't already
|
13055 |
-
// a trace context on the event. There is a product feature in place where we link
|
13056 |
-
// errors with transaction and it relys on that.
|
13057 |
-
if (this._span) {
|
13058 |
-
event.contexts = tslib_es6_assign({ trace: this._span.getTraceContext() }, event.contexts);
|
13059 |
-
var transactionName = (_a = this._span.transaction) === null || _a === void 0 ? void 0 : _a.name;
|
13060 |
-
if (transactionName) {
|
13061 |
-
event.tags = tslib_es6_assign({ transaction: transactionName }, event.tags);
|
13062 |
-
}
|
13063 |
-
}
|
13064 |
-
this._applyFingerprint(event);
|
13065 |
-
event.breadcrumbs = tslib_es6_spread((event.breadcrumbs || []), this._breadcrumbs);
|
13066 |
-
event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
|
13067 |
-
return this._notifyEventProcessors(tslib_es6_spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);
|
13068 |
-
};
|
13069 |
-
/**
|
13070 |
-
* This will be called after {@link applyToEvent} is finished.
|
13071 |
-
*/
|
13072 |
-
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
|
13073 |
-
var _this = this;
|
13074 |
-
if (index === void 0) { index = 0; }
|
13075 |
-
return new syncpromise_SyncPromise(function (resolve, reject) {
|
13076 |
-
var processor = processors[index];
|
13077 |
-
if (event === null || typeof processor !== 'function') {
|
13078 |
-
resolve(event);
|
13079 |
-
}
|
13080 |
-
else {
|
13081 |
-
var result = processor(tslib_es6_assign({}, event), hint);
|
13082 |
-
if (isThenable(result)) {
|
13083 |
-
result
|
13084 |
-
.then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })
|
13085 |
-
.then(null, reject);
|
13086 |
}
|
13087 |
-
|
13088 |
-
|
13089 |
-
|
13090 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13091 |
}
|
|
|
13092 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13093 |
});
|
13094 |
-
|
13095 |
-
|
13096 |
-
|
13097 |
-
|
13098 |
-
|
13099 |
-
|
13100 |
-
|
13101 |
-
|
13102 |
-
|
13103 |
-
|
13104 |
-
|
13105 |
-
|
13106 |
-
|
13107 |
-
|
13108 |
-
|
13109 |
-
|
13110 |
-
|
13111 |
-
|
13112 |
-
|
13113 |
-
|
13114 |
-
|
13115 |
-
|
13116 |
-
|
13117 |
-
|
13118 |
-
|
13119 |
-
|
13120 |
-
|
13121 |
-
|
13122 |
-
|
13123 |
-
if (this._fingerprint) {
|
13124 |
-
event.fingerprint = event.fingerprint.concat(this._fingerprint);
|
13125 |
-
}
|
13126 |
-
// If we have no data at all, remove empty array default
|
13127 |
-
if (event.fingerprint && !event.fingerprint.length) {
|
13128 |
-
delete event.fingerprint;
|
13129 |
}
|
13130 |
-
|
13131 |
-
return Scope;
|
13132 |
-
}());
|
13133 |
|
13134 |
-
|
13135 |
-
|
13136 |
-
|
13137 |
-
|
13138 |
-
|
13139 |
-
|
13140 |
-
|
13141 |
-
|
13142 |
-
|
13143 |
-
/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
|
13144 |
-
}
|
13145 |
-
/**
|
13146 |
-
* Add a EventProcessor to be kept globally.
|
13147 |
-
* @param callback EventProcessor to add
|
13148 |
-
*/
|
13149 |
-
function addGlobalEventProcessor(callback) {
|
13150 |
-
getGlobalEventProcessors().push(callback);
|
13151 |
}
|
13152 |
-
//# sourceMappingURL=scope.js.map
|
13153 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/types/esm/session.js
|
13154 |
-
/**
|
13155 |
-
* Session Status
|
13156 |
-
*/
|
13157 |
-
var SessionStatus;
|
13158 |
-
(function (SessionStatus) {
|
13159 |
-
/** JSDoc */
|
13160 |
-
SessionStatus["Ok"] = "ok";
|
13161 |
-
/** JSDoc */
|
13162 |
-
SessionStatus["Exited"] = "exited";
|
13163 |
-
/** JSDoc */
|
13164 |
-
SessionStatus["Crashed"] = "crashed";
|
13165 |
-
/** JSDoc */
|
13166 |
-
SessionStatus["Abnormal"] = "abnormal";
|
13167 |
-
})(SessionStatus || (SessionStatus = {}));
|
13168 |
-
//# sourceMappingURL=session.js.map
|
13169 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/browser.js
|
13170 |
|
13171 |
-
|
13172 |
-
|
13173 |
-
|
13174 |
-
|
13175 |
-
|
13176 |
-
|
13177 |
-
|
13178 |
-
|
13179 |
-
|
13180 |
-
|
13181 |
-
|
13182 |
-
|
13183 |
-
|
13184 |
-
|
13185 |
-
|
13186 |
-
|
13187 |
-
|
13188 |
-
|
13189 |
-
|
13190 |
-
|
13191 |
-
|
13192 |
-
|
13193 |
-
|
13194 |
-
|
13195 |
-
|
13196 |
-
|
13197 |
-
|
13198 |
-
|
13199 |
-
|
13200 |
-
|
13201 |
-
|
13202 |
-
|
13203 |
-
|
13204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13205 |
}
|
13206 |
-
|
|
|
|
|
|
|
|
|
13207 |
}
|
13208 |
-
|
13209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13211 |
}
|
13212 |
-
|
13213 |
-
|
13214 |
-
|
13215 |
-
|
13216 |
-
|
13217 |
-
function
|
13218 |
-
|
13219 |
-
|
13220 |
-
|
13221 |
-
|
13222 |
-
|
13223 |
-
|
13224 |
-
|
13225 |
-
|
13226 |
-
|
|
|
13227 |
}
|
13228 |
-
|
13229 |
-
|
13230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13231 |
}
|
13232 |
-
|
13233 |
-
|
13234 |
-
|
13235 |
-
|
13236 |
-
|
13237 |
-
|
13238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13239 |
}
|
13240 |
-
|
13241 |
-
|
13242 |
-
|
13243 |
-
|
13244 |
-
|
13245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13246 |
}
|
13247 |
-
|
13248 |
-
|
13249 |
-
|
13250 |
-
|
13251 |
-
|
13252 |
-
|
13253 |
-
|
13254 |
-
|
13255 |
-
|
13256 |
-
|
13257 |
-
|
13258 |
-
|
13259 |
-
|
13260 |
-
|
13261 |
-
this.
|
13262 |
-
|
13263 |
-
|
13264 |
-
|
13265 |
-
|
13266 |
-
|
13267 |
-
|
13268 |
-
|
13269 |
-
|
13270 |
-
|
13271 |
-
|
13272 |
-
|
13273 |
-
|
|
|
13274 |
}
|
13275 |
-
|
13276 |
-
|
13277 |
-
|
13278 |
-
|
13279 |
-
|
13280 |
-
|
|
|
13281 |
}
|
13282 |
-
|
13283 |
-
|
13284 |
-
|
13285 |
-
|
13286 |
-
|
13287 |
-
|
13288 |
-
|
13289 |
-
|
13290 |
-
|
13291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13292 |
}
|
13293 |
-
|
13294 |
-
|
13295 |
-
|
13296 |
-
|
13297 |
-
|
13298 |
-
|
13299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13300 |
}
|
13301 |
-
};
|
13302 |
-
return Memo;
|
13303 |
-
}());
|
13304 |
|
13305 |
-
|
13306 |
-
|
13307 |
-
|
13308 |
-
/**
|
13309 |
-
* Safely extract function name from itself
|
13310 |
-
*/
|
13311 |
-
function getFunctionName(fn) {
|
13312 |
-
try {
|
13313 |
-
if (!fn || typeof fn !== 'function') {
|
13314 |
-
return defaultFunctionName;
|
13315 |
}
|
13316 |
-
return fn.name || defaultFunctionName;
|
13317 |
-
}
|
13318 |
-
catch (e) {
|
13319 |
-
// Just accessing custom props in some Selenium environments
|
13320 |
-
// can cause a "Permission denied" exception (see raven-js#495).
|
13321 |
-
return defaultFunctionName;
|
13322 |
-
}
|
13323 |
-
}
|
13324 |
-
//# sourceMappingURL=stacktrace.js.map
|
13325 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/string.js
|
13326 |
|
13327 |
-
|
13328 |
-
|
13329 |
-
|
13330 |
-
|
13331 |
-
|
13332 |
-
|
13333 |
-
|
13334 |
-
|
13335 |
-
|
13336 |
-
|
13337 |
-
|
13338 |
-
|
13339 |
-
|
13340 |
-
|
13341 |
-
|
13342 |
-
|
13343 |
-
|
13344 |
-
|
13345 |
-
|
13346 |
-
|
13347 |
-
|
13348 |
-
|
13349 |
-
|
13350 |
-
|
13351 |
-
|
13352 |
-
|
13353 |
-
|
13354 |
-
|
13355 |
-
|
13356 |
-
|
13357 |
-
|
13358 |
-
|
13359 |
-
|
13360 |
-
|
13361 |
-
|
13362 |
-
|
13363 |
-
|
13364 |
-
|
13365 |
-
|
13366 |
-
|
13367 |
-
|
13368 |
-
|
13369 |
-
|
13370 |
-
|
13371 |
-
|
13372 |
-
|
13373 |
-
|
13374 |
-
|
13375 |
-
|
13376 |
-
|
13377 |
-
|
13378 |
-
|
13379 |
-
|
13380 |
-
|
13381 |
-
|
13382 |
-
|
13383 |
-
|
13384 |
-
|
13385 |
-
|
13386 |
-
|
13387 |
-
|
13388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13389 |
}
|
13390 |
-
|
13391 |
-
|
13392 |
-
|
13393 |
-
|
13394 |
-
|
13395 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13396 |
}
|
13397 |
-
|
13398 |
-
|
|
|
|
|
|
|
13399 |
}
|
|
|
|
|
|
|
|
|
|
|
13400 |
}
|
13401 |
-
|
13402 |
-
|
13403 |
-
|
13404 |
-
|
13405 |
-
|
13406 |
-
|
13407 |
-
|
13408 |
-
function
|
13409 |
-
|
13410 |
-
|
13411 |
-
|
13412 |
-
|
13413 |
-
return pattern.test(value);
|
13414 |
}
|
13415 |
-
|
13416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13417 |
}
|
13418 |
-
|
13419 |
-
|
13420 |
-
|
13421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13422 |
|
|
|
|
|
|
|
13423 |
|
|
|
|
|
|
|
|
|
13424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13426 |
|
|
|
|
|
13427 |
|
13428 |
-
|
13429 |
-
|
13430 |
-
|
13431 |
-
|
13432 |
-
|
13433 |
-
|
13434 |
-
|
13435 |
-
|
13436 |
-
*/
|
13437 |
-
function fill(source, name, replacementFactory) {
|
13438 |
-
if (!(name in source)) {
|
13439 |
-
return;
|
13440 |
-
}
|
13441 |
-
var original = source[name];
|
13442 |
-
var wrapped = replacementFactory(original);
|
13443 |
-
// Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
|
13444 |
-
// otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
|
13445 |
-
if (typeof wrapped === 'function') {
|
13446 |
-
try {
|
13447 |
-
wrapped.prototype = wrapped.prototype || {};
|
13448 |
-
Object.defineProperties(wrapped, {
|
13449 |
-
__sentry_original__: {
|
13450 |
-
enumerable: false,
|
13451 |
-
value: original,
|
13452 |
-
},
|
13453 |
-
});
|
13454 |
-
}
|
13455 |
-
catch (_Oo) {
|
13456 |
-
// This can throw if multiple fill happens on a global object like XMLHttpRequest
|
13457 |
-
// Fixes https://github.com/getsentry/sentry-javascript/issues/2043
|
13458 |
-
}
|
13459 |
-
}
|
13460 |
-
source[name] = wrapped;
|
13461 |
-
}
|
13462 |
-
/**
|
13463 |
-
* Encodes given object into url-friendly format
|
13464 |
-
*
|
13465 |
-
* @param object An object that contains serializable values
|
13466 |
-
* @returns string Encoded
|
13467 |
-
*/
|
13468 |
-
function urlEncode(object) {
|
13469 |
-
return Object.keys(object)
|
13470 |
-
.map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); })
|
13471 |
-
.join('&');
|
13472 |
-
}
|
13473 |
-
/**
|
13474 |
-
* Transforms any object into an object literal with all its attributes
|
13475 |
-
* attached to it.
|
13476 |
-
*
|
13477 |
-
* @param value Initial source that we have to transform in order for it to be usable by the serializer
|
13478 |
-
*/
|
13479 |
-
function getWalkSource(value) {
|
13480 |
-
if (isError(value)) {
|
13481 |
-
var error = value;
|
13482 |
-
var err = {
|
13483 |
-
message: error.message,
|
13484 |
-
name: error.name,
|
13485 |
-
stack: error.stack,
|
13486 |
-
};
|
13487 |
-
for (var i in error) {
|
13488 |
-
if (Object.prototype.hasOwnProperty.call(error, i)) {
|
13489 |
-
err[i] = error[i];
|
13490 |
-
}
|
13491 |
-
}
|
13492 |
-
return err;
|
13493 |
-
}
|
13494 |
-
if (isEvent(value)) {
|
13495 |
-
var event_1 = value;
|
13496 |
-
var source = {};
|
13497 |
-
source.type = event_1.type;
|
13498 |
-
// Accessing event.target can throw (see getsentry/raven-js#838, #768)
|
13499 |
-
try {
|
13500 |
-
source.target = isElement(event_1.target)
|
13501 |
-
? htmlTreeAsString(event_1.target)
|
13502 |
-
: Object.prototype.toString.call(event_1.target);
|
13503 |
-
}
|
13504 |
-
catch (_oO) {
|
13505 |
-
source.target = '<unknown>';
|
13506 |
-
}
|
13507 |
-
try {
|
13508 |
-
source.currentTarget = isElement(event_1.currentTarget)
|
13509 |
-
? htmlTreeAsString(event_1.currentTarget)
|
13510 |
-
: Object.prototype.toString.call(event_1.currentTarget);
|
13511 |
-
}
|
13512 |
-
catch (_oO) {
|
13513 |
-
source.currentTarget = '<unknown>';
|
13514 |
-
}
|
13515 |
-
if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {
|
13516 |
-
source.detail = event_1.detail;
|
13517 |
-
}
|
13518 |
-
for (var i in event_1) {
|
13519 |
-
if (Object.prototype.hasOwnProperty.call(event_1, i)) {
|
13520 |
-
source[i] = event_1;
|
13521 |
-
}
|
13522 |
}
|
13523 |
-
|
13524 |
-
|
13525 |
-
|
13526 |
-
|
13527 |
-
|
13528 |
-
|
13529 |
-
|
13530 |
-
|
13531 |
-
|
13532 |
-
|
13533 |
-
|
13534 |
-
|
13535 |
-
|
13536 |
-
|
13537 |
-
|
13538 |
-
|
13539 |
-
|
13540 |
-
|
13541 |
-
maxSize) {
|
13542 |
-
if (depth === void 0) { depth = 3; }
|
13543 |
-
if (maxSize === void 0) { maxSize = 100 * 1024; }
|
13544 |
-
var serialized = normalize(object, depth);
|
13545 |
-
if (jsonSize(serialized) > maxSize) {
|
13546 |
-
return normalizeToSize(object, depth - 1, maxSize);
|
13547 |
-
}
|
13548 |
-
return serialized;
|
13549 |
-
}
|
13550 |
-
/**
|
13551 |
-
* Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,
|
13552 |
-
* booleans, null, and undefined.
|
13553 |
-
*
|
13554 |
-
* @param value The value to stringify
|
13555 |
-
* @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or
|
13556 |
-
* type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,
|
13557 |
-
* unchanged.
|
13558 |
-
*/
|
13559 |
-
function serializeValue(value) {
|
13560 |
-
var type = Object.prototype.toString.call(value);
|
13561 |
-
// Node.js REPL notation
|
13562 |
-
if (typeof value === 'string') {
|
13563 |
-
return value;
|
13564 |
-
}
|
13565 |
-
if (type === '[object Object]') {
|
13566 |
-
return '[Object]';
|
13567 |
-
}
|
13568 |
-
if (type === '[object Array]') {
|
13569 |
-
return '[Array]';
|
13570 |
-
}
|
13571 |
-
var normalized = normalizeValue(value);
|
13572 |
-
return isPrimitive(normalized) ? normalized : type;
|
13573 |
-
}
|
13574 |
-
/**
|
13575 |
-
* normalizeValue()
|
13576 |
-
*
|
13577 |
-
* Takes unserializable input and make it serializable friendly
|
13578 |
-
*
|
13579 |
-
* - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively,
|
13580 |
-
* - serializes Error objects
|
13581 |
-
* - filter global objects
|
13582 |
-
*/
|
13583 |
-
function normalizeValue(value, key) {
|
13584 |
-
if (key === 'domain' && value && typeof value === 'object' && value._events) {
|
13585 |
-
return '[Domain]';
|
13586 |
-
}
|
13587 |
-
if (key === 'domainEmitter') {
|
13588 |
-
return '[DomainEmitter]';
|
13589 |
-
}
|
13590 |
-
if (typeof __webpack_require__.g !== 'undefined' && value === __webpack_require__.g) {
|
13591 |
-
return '[Global]';
|
13592 |
-
}
|
13593 |
-
if (typeof window !== 'undefined' && value === window) {
|
13594 |
-
return '[Window]';
|
13595 |
-
}
|
13596 |
-
if (typeof document !== 'undefined' && value === document) {
|
13597 |
-
return '[Document]';
|
13598 |
-
}
|
13599 |
-
// React's SyntheticEvent thingy
|
13600 |
-
if (isSyntheticEvent(value)) {
|
13601 |
-
return '[SyntheticEvent]';
|
13602 |
-
}
|
13603 |
-
if (typeof value === 'number' && value !== value) {
|
13604 |
-
return '[NaN]';
|
13605 |
-
}
|
13606 |
-
if (value === void 0) {
|
13607 |
-
return '[undefined]';
|
13608 |
-
}
|
13609 |
-
if (typeof value === 'function') {
|
13610 |
-
return "[Function: " + getFunctionName(value) + "]";
|
13611 |
-
}
|
13612 |
-
// symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable
|
13613 |
-
if (typeof value === 'symbol') {
|
13614 |
-
return "[" + String(value) + "]";
|
13615 |
-
}
|
13616 |
-
if (typeof value === 'bigint') {
|
13617 |
-
return "[BigInt: " + String(value) + "]";
|
13618 |
-
}
|
13619 |
-
return value;
|
13620 |
-
}
|
13621 |
-
/**
|
13622 |
-
* Walks an object to perform a normalization on it
|
13623 |
-
*
|
13624 |
-
* @param key of object that's walked in current iteration
|
13625 |
-
* @param value object to be walked
|
13626 |
-
* @param depth Optional number indicating how deep should walking be performed
|
13627 |
-
* @param memo Optional Memo class handling decycling
|
13628 |
-
*/
|
13629 |
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
13630 |
-
function walk(key, value, depth, memo) {
|
13631 |
-
if (depth === void 0) { depth = +Infinity; }
|
13632 |
-
if (memo === void 0) { memo = new Memo(); }
|
13633 |
-
// If we reach the maximum depth, serialize whatever has left
|
13634 |
-
if (depth === 0) {
|
13635 |
-
return serializeValue(value);
|
13636 |
-
}
|
13637 |
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
13638 |
-
// If value implements `toJSON` method, call it and return early
|
13639 |
-
if (value !== null && value !== undefined && typeof value.toJSON === 'function') {
|
13640 |
-
return value.toJSON();
|
13641 |
-
}
|
13642 |
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
13643 |
-
// If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further
|
13644 |
-
var normalized = normalizeValue(value, key);
|
13645 |
-
if (isPrimitive(normalized)) {
|
13646 |
-
return normalized;
|
13647 |
}
|
13648 |
-
|
13649 |
-
|
13650 |
-
|
13651 |
-
|
13652 |
-
|
13653 |
-
|
13654 |
-
return '[Circular ~]';
|
13655 |
}
|
13656 |
-
|
13657 |
-
|
13658 |
-
|
13659 |
-
|
13660 |
-
|
13661 |
-
|
13662 |
-
// Recursively walk through all the child nodes
|
13663 |
-
acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);
|
13664 |
}
|
13665 |
-
|
13666 |
-
|
13667 |
-
|
13668 |
-
|
13669 |
-
}
|
13670 |
-
/**
|
13671 |
-
* normalize()
|
13672 |
-
*
|
13673 |
-
* - Creates a copy to prevent original input mutation
|
13674 |
-
* - Skip non-enumerablers
|
13675 |
-
* - Calls `toJSON` if implemented
|
13676 |
-
* - Removes circular references
|
13677 |
-
* - Translates non-serializeable values (undefined/NaN/Functions) to serializable format
|
13678 |
-
* - Translates known global objects/Classes to a string representations
|
13679 |
-
* - Takes care of Error objects serialization
|
13680 |
-
* - Optionally limit depth of final output
|
13681 |
-
*/
|
13682 |
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
13683 |
-
function normalize(input, depth) {
|
13684 |
-
try {
|
13685 |
-
return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); }));
|
13686 |
}
|
13687 |
-
|
13688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13689 |
}
|
13690 |
-
}
|
13691 |
-
|
13692 |
-
|
13693 |
-
|
13694 |
-
|
13695 |
-
|
13696 |
-
|
13697 |
-
|
13698 |
-
|
13699 |
-
|
13700 |
-
|
13701 |
-
|
13702 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13703 |
}
|
13704 |
-
|
13705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13706 |
}
|
13707 |
-
|
13708 |
-
|
13709 |
-
|
13710 |
-
|
13711 |
-
|
13712 |
-
|
13713 |
-
|
13714 |
-
}
|
13715 |
-
return truncate(serialized, maxLength);
|
13716 |
}
|
13717 |
-
|
13718 |
-
|
13719 |
-
|
13720 |
-
|
13721 |
-
|
13722 |
-
|
13723 |
-
|
13724 |
-
|
13725 |
-
|
13726 |
-
|
13727 |
-
|
13728 |
-
|
13729 |
-
|
13730 |
-
|
13731 |
-
|
13732 |
-
|
13733 |
-
|
13734 |
-
|
13735 |
-
|
13736 |
-
|
13737 |
-
|
13738 |
-
|
13739 |
-
|
13740 |
-
|
13741 |
-
|
13742 |
}
|
13743 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13744 |
}
|
13745 |
-
|
13746 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13747 |
}
|
13748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13749 |
}
|
13750 |
-
|
13751 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13752 |
|
13753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13754 |
/**
|
13755 |
-
*
|
|
|
|
|
|
|
13756 |
*/
|
13757 |
-
|
13758 |
-
|
13759 |
-
|
13760 |
-
|
13761 |
-
|
13762 |
-
|
13763 |
-
|
13764 |
-
|
13765 |
-
|
13766 |
-
|
13767 |
-
}
|
13768 |
-
}
|
13769 |
-
/** JSDoc */
|
13770 |
-
// eslint-disable-next-line complexity
|
13771 |
-
Session.prototype.update = function (context) {
|
13772 |
-
if (context === void 0) { context = {}; }
|
13773 |
-
if (context.user) {
|
13774 |
-
if (context.user.ip_address) {
|
13775 |
-
this.ipAddress = context.user.ip_address;
|
13776 |
-
}
|
13777 |
-
if (!context.did) {
|
13778 |
-
this.did = context.user.id || context.user.email || context.user.username;
|
13779 |
-
}
|
13780 |
-
}
|
13781 |
-
this.timestamp = context.timestamp || Date.now();
|
13782 |
-
if (context.sid) {
|
13783 |
-
// Good enough uuid validation. — Kamil
|
13784 |
-
this.sid = context.sid.length === 32 ? context.sid : (0,misc/* uuid4 */.DM)();
|
13785 |
-
}
|
13786 |
-
if (context.did) {
|
13787 |
-
this.did = "" + context.did;
|
13788 |
-
}
|
13789 |
-
if (typeof context.started === 'number') {
|
13790 |
-
this.started = context.started;
|
13791 |
-
}
|
13792 |
-
if (typeof context.duration === 'number') {
|
13793 |
-
this.duration = context.duration;
|
13794 |
-
}
|
13795 |
-
else {
|
13796 |
-
this.duration = this.timestamp - this.started;
|
13797 |
-
}
|
13798 |
-
if (context.release) {
|
13799 |
-
this.release = context.release;
|
13800 |
-
}
|
13801 |
-
if (context.environment) {
|
13802 |
-
this.environment = context.environment;
|
13803 |
-
}
|
13804 |
-
if (context.ipAddress) {
|
13805 |
-
this.ipAddress = context.ipAddress;
|
13806 |
-
}
|
13807 |
-
if (context.userAgent) {
|
13808 |
-
this.userAgent = context.userAgent;
|
13809 |
-
}
|
13810 |
-
if (typeof context.errors === 'number') {
|
13811 |
-
this.errors = context.errors;
|
13812 |
-
}
|
13813 |
-
if (context.status) {
|
13814 |
-
this.status = context.status;
|
13815 |
-
}
|
13816 |
-
};
|
13817 |
-
/** JSDoc */
|
13818 |
-
Session.prototype.close = function (status) {
|
13819 |
-
if (status) {
|
13820 |
-
this.update({ status: status });
|
13821 |
-
}
|
13822 |
-
else if (this.status === SessionStatus.Ok) {
|
13823 |
-
this.update({ status: SessionStatus.Exited });
|
13824 |
-
}
|
13825 |
-
else {
|
13826 |
-
this.update();
|
13827 |
-
}
|
13828 |
-
};
|
13829 |
-
/** JSDoc */
|
13830 |
-
Session.prototype.toJSON = function () {
|
13831 |
-
return dropUndefinedKeys({
|
13832 |
-
sid: "" + this.sid,
|
13833 |
-
init: true,
|
13834 |
-
started: new Date(this.started).toISOString(),
|
13835 |
-
timestamp: new Date(this.timestamp).toISOString(),
|
13836 |
-
status: this.status,
|
13837 |
-
errors: this.errors,
|
13838 |
-
did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
|
13839 |
-
duration: this.duration,
|
13840 |
-
attrs: dropUndefinedKeys({
|
13841 |
-
release: this.release,
|
13842 |
-
environment: this.environment,
|
13843 |
-
ip_address: this.ipAddress,
|
13844 |
-
user_agent: this.userAgent,
|
13845 |
-
}),
|
13846 |
-
});
|
13847 |
};
|
13848 |
-
|
13849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13850 |
|
13851 |
-
//# sourceMappingURL=session.js.map
|
13852 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/hub/esm/hub.js
|
13853 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13854 |
|
|
|
|
|
|
|
13855 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13856 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13857 |
/**
|
13858 |
-
*
|
13859 |
-
*
|
13860 |
-
* WARNING: This number should only be increased when the global interface
|
13861 |
-
* changes and new methods are introduced.
|
13862 |
-
*
|
13863 |
-
* @hidden
|
13864 |
*/
|
13865 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13866 |
/**
|
13867 |
-
*
|
13868 |
-
*
|
|
|
|
|
13869 |
*/
|
13870 |
-
|
13871 |
-
|
13872 |
-
|
13873 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13874 |
*/
|
13875 |
-
|
13876 |
-
|
13877 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13878 |
*/
|
13879 |
-
var Hub = /** @class */ (function () {
|
13880 |
-
/**
|
13881 |
-
* Creates a new instance of the hub, will push one {@link Layer} into the
|
13882 |
-
* internal stack on creation.
|
13883 |
-
*
|
13884 |
-
* @param client bound to the hub.
|
13885 |
-
* @param scope bound to the hub.
|
13886 |
-
* @param version number, higher number means higher priority.
|
13887 |
-
*/
|
13888 |
-
function Hub(client, scope, _version) {
|
13889 |
-
if (scope === void 0) { scope = new Scope(); }
|
13890 |
-
if (_version === void 0) { _version = API_VERSION; }
|
13891 |
-
this._version = _version;
|
13892 |
-
/** Is a {@link Layer}[] containing the client and scope */
|
13893 |
-
this._stack = [{}];
|
13894 |
-
this.getStackTop().scope = scope;
|
13895 |
-
this.bindClient(client);
|
13896 |
-
}
|
13897 |
-
/**
|
13898 |
-
* @inheritDoc
|
13899 |
-
*/
|
13900 |
-
Hub.prototype.isOlderThan = function (version) {
|
13901 |
-
return this._version < version;
|
13902 |
-
};
|
13903 |
-
/**
|
13904 |
-
* @inheritDoc
|
13905 |
-
*/
|
13906 |
-
Hub.prototype.bindClient = function (client) {
|
13907 |
-
var top = this.getStackTop();
|
13908 |
-
top.client = client;
|
13909 |
-
if (client && client.setupIntegrations) {
|
13910 |
-
client.setupIntegrations();
|
13911 |
-
}
|
13912 |
-
};
|
13913 |
-
/**
|
13914 |
-
* @inheritDoc
|
13915 |
-
*/
|
13916 |
-
Hub.prototype.pushScope = function () {
|
13917 |
-
// We want to clone the content of prev scope
|
13918 |
-
var scope = Scope.clone(this.getScope());
|
13919 |
-
this.getStack().push({
|
13920 |
-
client: this.getClient(),
|
13921 |
-
scope: scope,
|
13922 |
-
});
|
13923 |
-
return scope;
|
13924 |
-
};
|
13925 |
-
/**
|
13926 |
-
* @inheritDoc
|
13927 |
-
*/
|
13928 |
-
Hub.prototype.popScope = function () {
|
13929 |
-
if (this.getStack().length <= 1)
|
13930 |
-
return false;
|
13931 |
-
return !!this.getStack().pop();
|
13932 |
-
};
|
13933 |
-
/**
|
13934 |
-
* @inheritDoc
|
13935 |
-
*/
|
13936 |
-
Hub.prototype.withScope = function (callback) {
|
13937 |
-
var scope = this.pushScope();
|
13938 |
-
try {
|
13939 |
-
callback(scope);
|
13940 |
-
}
|
13941 |
-
finally {
|
13942 |
-
this.popScope();
|
13943 |
-
}
|
13944 |
-
};
|
13945 |
-
/**
|
13946 |
-
* @inheritDoc
|
13947 |
-
*/
|
13948 |
-
Hub.prototype.getClient = function () {
|
13949 |
-
return this.getStackTop().client;
|
13950 |
-
};
|
13951 |
-
/** Returns the scope of the top stack. */
|
13952 |
-
Hub.prototype.getScope = function () {
|
13953 |
-
return this.getStackTop().scope;
|
13954 |
-
};
|
13955 |
-
/** Returns the scope stack for domains or the process. */
|
13956 |
-
Hub.prototype.getStack = function () {
|
13957 |
-
return this._stack;
|
13958 |
-
};
|
13959 |
-
/** Returns the topmost scope layer in the order domain > local > process. */
|
13960 |
-
Hub.prototype.getStackTop = function () {
|
13961 |
-
return this._stack[this._stack.length - 1];
|
13962 |
-
};
|
13963 |
-
/**
|
13964 |
-
* @inheritDoc
|
13965 |
-
*/
|
13966 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
13967 |
-
Hub.prototype.captureException = function (exception, hint) {
|
13968 |
-
var eventId = (this._lastEventId = (0,misc/* uuid4 */.DM)());
|
13969 |
-
var finalHint = hint;
|
13970 |
-
// If there's no explicit hint provided, mimick the same thing that would happen
|
13971 |
-
// in the minimal itself to create a consistent behavior.
|
13972 |
-
// We don't do this in the client, as it's the lowest level API, and doing this,
|
13973 |
-
// would prevent user from having full control over direct calls.
|
13974 |
-
if (!hint) {
|
13975 |
-
var syntheticException = void 0;
|
13976 |
-
try {
|
13977 |
-
throw new Error('Sentry syntheticException');
|
13978 |
-
}
|
13979 |
-
catch (exception) {
|
13980 |
-
syntheticException = exception;
|
13981 |
-
}
|
13982 |
-
finalHint = {
|
13983 |
-
originalException: exception,
|
13984 |
-
syntheticException: syntheticException,
|
13985 |
-
};
|
13986 |
-
}
|
13987 |
-
this._invokeClient('captureException', exception, tslib_es6_assign(tslib_es6_assign({}, finalHint), { event_id: eventId }));
|
13988 |
-
return eventId;
|
13989 |
-
};
|
13990 |
-
/**
|
13991 |
-
* @inheritDoc
|
13992 |
-
*/
|
13993 |
-
Hub.prototype.captureMessage = function (message, level, hint) {
|
13994 |
-
var eventId = (this._lastEventId = (0,misc/* uuid4 */.DM)());
|
13995 |
-
var finalHint = hint;
|
13996 |
-
// If there's no explicit hint provided, mimick the same thing that would happen
|
13997 |
-
// in the minimal itself to create a consistent behavior.
|
13998 |
-
// We don't do this in the client, as it's the lowest level API, and doing this,
|
13999 |
-
// would prevent user from having full control over direct calls.
|
14000 |
-
if (!hint) {
|
14001 |
-
var syntheticException = void 0;
|
14002 |
-
try {
|
14003 |
-
throw new Error(message);
|
14004 |
-
}
|
14005 |
-
catch (exception) {
|
14006 |
-
syntheticException = exception;
|
14007 |
-
}
|
14008 |
-
finalHint = {
|
14009 |
-
originalException: message,
|
14010 |
-
syntheticException: syntheticException,
|
14011 |
-
};
|
14012 |
-
}
|
14013 |
-
this._invokeClient('captureMessage', message, level, tslib_es6_assign(tslib_es6_assign({}, finalHint), { event_id: eventId }));
|
14014 |
-
return eventId;
|
14015 |
-
};
|
14016 |
-
/**
|
14017 |
-
* @inheritDoc
|
14018 |
-
*/
|
14019 |
-
Hub.prototype.captureEvent = function (event, hint) {
|
14020 |
-
var eventId = (this._lastEventId = (0,misc/* uuid4 */.DM)());
|
14021 |
-
this._invokeClient('captureEvent', event, tslib_es6_assign(tslib_es6_assign({}, hint), { event_id: eventId }));
|
14022 |
-
return eventId;
|
14023 |
-
};
|
14024 |
-
/**
|
14025 |
-
* @inheritDoc
|
14026 |
-
*/
|
14027 |
-
Hub.prototype.lastEventId = function () {
|
14028 |
-
return this._lastEventId;
|
14029 |
-
};
|
14030 |
-
/**
|
14031 |
-
* @inheritDoc
|
14032 |
-
*/
|
14033 |
-
Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
|
14034 |
-
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
14035 |
-
if (!scope || !client)
|
14036 |
-
return;
|
14037 |
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
14038 |
-
var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;
|
14039 |
-
if (maxBreadcrumbs <= 0)
|
14040 |
-
return;
|
14041 |
-
var timestamp = (0,time/* dateTimestampInSeconds */.yW)();
|
14042 |
-
var mergedBreadcrumb = tslib_es6_assign({ timestamp: timestamp }, breadcrumb);
|
14043 |
-
var finalBreadcrumb = beforeBreadcrumb
|
14044 |
-
? (0,misc/* consoleSandbox */.Cf)(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })
|
14045 |
-
: mergedBreadcrumb;
|
14046 |
-
if (finalBreadcrumb === null)
|
14047 |
-
return;
|
14048 |
-
scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));
|
14049 |
-
};
|
14050 |
-
/**
|
14051 |
-
* @inheritDoc
|
14052 |
-
*/
|
14053 |
-
Hub.prototype.setUser = function (user) {
|
14054 |
-
var scope = this.getScope();
|
14055 |
-
if (scope)
|
14056 |
-
scope.setUser(user);
|
14057 |
-
};
|
14058 |
-
/**
|
14059 |
-
* @inheritDoc
|
14060 |
-
*/
|
14061 |
-
Hub.prototype.setTags = function (tags) {
|
14062 |
-
var scope = this.getScope();
|
14063 |
-
if (scope)
|
14064 |
-
scope.setTags(tags);
|
14065 |
-
};
|
14066 |
-
/**
|
14067 |
-
* @inheritDoc
|
14068 |
-
*/
|
14069 |
-
Hub.prototype.setExtras = function (extras) {
|
14070 |
-
var scope = this.getScope();
|
14071 |
-
if (scope)
|
14072 |
-
scope.setExtras(extras);
|
14073 |
-
};
|
14074 |
-
/**
|
14075 |
-
* @inheritDoc
|
14076 |
-
*/
|
14077 |
-
Hub.prototype.setTag = function (key, value) {
|
14078 |
-
var scope = this.getScope();
|
14079 |
-
if (scope)
|
14080 |
-
scope.setTag(key, value);
|
14081 |
-
};
|
14082 |
-
/**
|
14083 |
-
* @inheritDoc
|
14084 |
-
*/
|
14085 |
-
Hub.prototype.setExtra = function (key, extra) {
|
14086 |
-
var scope = this.getScope();
|
14087 |
-
if (scope)
|
14088 |
-
scope.setExtra(key, extra);
|
14089 |
-
};
|
14090 |
-
/**
|
14091 |
-
* @inheritDoc
|
14092 |
-
*/
|
14093 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
14094 |
-
Hub.prototype.setContext = function (name, context) {
|
14095 |
-
var scope = this.getScope();
|
14096 |
-
if (scope)
|
14097 |
-
scope.setContext(name, context);
|
14098 |
-
};
|
14099 |
-
/**
|
14100 |
-
* @inheritDoc
|
14101 |
-
*/
|
14102 |
-
Hub.prototype.configureScope = function (callback) {
|
14103 |
-
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
14104 |
-
if (scope && client) {
|
14105 |
-
callback(scope);
|
14106 |
-
}
|
14107 |
-
};
|
14108 |
-
/**
|
14109 |
-
* @inheritDoc
|
14110 |
-
*/
|
14111 |
-
Hub.prototype.run = function (callback) {
|
14112 |
-
var oldHub = makeMain(this);
|
14113 |
-
try {
|
14114 |
-
callback(this);
|
14115 |
-
}
|
14116 |
-
finally {
|
14117 |
-
makeMain(oldHub);
|
14118 |
-
}
|
14119 |
-
};
|
14120 |
-
/**
|
14121 |
-
* @inheritDoc
|
14122 |
-
*/
|
14123 |
-
Hub.prototype.getIntegration = function (integration) {
|
14124 |
-
var client = this.getClient();
|
14125 |
-
if (!client)
|
14126 |
-
return null;
|
14127 |
-
try {
|
14128 |
-
return client.getIntegration(integration);
|
14129 |
-
}
|
14130 |
-
catch (_oO) {
|
14131 |
-
logger.warn("Cannot retrieve integration " + integration.id + " from the current Hub");
|
14132 |
-
return null;
|
14133 |
-
}
|
14134 |
-
};
|
14135 |
-
/**
|
14136 |
-
* @inheritDoc
|
14137 |
-
*/
|
14138 |
-
Hub.prototype.startSpan = function (context) {
|
14139 |
-
return this._callExtensionMethod('startSpan', context);
|
14140 |
-
};
|
14141 |
-
/**
|
14142 |
-
* @inheritDoc
|
14143 |
-
*/
|
14144 |
-
Hub.prototype.startTransaction = function (context, customSamplingContext) {
|
14145 |
-
return this._callExtensionMethod('startTransaction', context, customSamplingContext);
|
14146 |
-
};
|
14147 |
-
/**
|
14148 |
-
* @inheritDoc
|
14149 |
-
*/
|
14150 |
-
Hub.prototype.traceHeaders = function () {
|
14151 |
-
return this._callExtensionMethod('traceHeaders');
|
14152 |
-
};
|
14153 |
-
/**
|
14154 |
-
* @inheritDoc
|
14155 |
-
*/
|
14156 |
-
Hub.prototype.startSession = function (context) {
|
14157 |
-
// End existing session if there's one
|
14158 |
-
this.endSession();
|
14159 |
-
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
14160 |
-
var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;
|
14161 |
-
var session = new Session(tslib_es6_assign(tslib_es6_assign({ release: release,
|
14162 |
-
environment: environment }, (scope && { user: scope.getUser() })), context));
|
14163 |
-
if (scope) {
|
14164 |
-
scope.setSession(session);
|
14165 |
-
}
|
14166 |
-
return session;
|
14167 |
-
};
|
14168 |
-
/**
|
14169 |
-
* @inheritDoc
|
14170 |
-
*/
|
14171 |
-
Hub.prototype.endSession = function () {
|
14172 |
-
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
14173 |
-
if (!scope)
|
14174 |
-
return;
|
14175 |
-
var session = scope.getSession && scope.getSession();
|
14176 |
-
if (session) {
|
14177 |
-
session.close();
|
14178 |
-
if (client && client.captureSession) {
|
14179 |
-
client.captureSession(session);
|
14180 |
-
}
|
14181 |
-
scope.setSession();
|
14182 |
-
}
|
14183 |
-
};
|
14184 |
-
/**
|
14185 |
-
* Internal helper function to call a method on the top client if it exists.
|
14186 |
-
*
|
14187 |
-
* @param method The method to call on the client.
|
14188 |
-
* @param args Arguments to pass to the client function.
|
14189 |
-
*/
|
14190 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
14191 |
-
Hub.prototype._invokeClient = function (method) {
|
14192 |
-
var _a;
|
14193 |
-
var args = [];
|
14194 |
-
for (var _i = 1; _i < arguments.length; _i++) {
|
14195 |
-
args[_i - 1] = arguments[_i];
|
14196 |
-
}
|
14197 |
-
var _b = this.getStackTop(), scope = _b.scope, client = _b.client;
|
14198 |
-
if (client && client[method]) {
|
14199 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
14200 |
-
(_a = client)[method].apply(_a, tslib_es6_spread(args, [scope]));
|
14201 |
-
}
|
14202 |
-
};
|
14203 |
-
/**
|
14204 |
-
* Calls global extension method and binding current instance to the function call
|
14205 |
-
*/
|
14206 |
-
// @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
|
14207 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
14208 |
-
Hub.prototype._callExtensionMethod = function (method) {
|
14209 |
-
var args = [];
|
14210 |
-
for (var _i = 1; _i < arguments.length; _i++) {
|
14211 |
-
args[_i - 1] = arguments[_i];
|
14212 |
-
}
|
14213 |
-
var carrier = getMainCarrier();
|
14214 |
-
var sentry = carrier.__SENTRY__;
|
14215 |
-
if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
|
14216 |
-
return sentry.extensions[method].apply(this, args);
|
14217 |
-
}
|
14218 |
-
logger.warn("Extension method " + method + " couldn't be found, doing nothing.");
|
14219 |
-
};
|
14220 |
-
return Hub;
|
14221 |
-
}());
|
14222 |
|
14223 |
-
|
14224 |
-
|
14225 |
-
|
14226 |
-
|
14227 |
-
|
14228 |
-
|
14229 |
-
|
14230 |
-
|
|
|
|
|
14231 |
}
|
14232 |
-
/**
|
14233 |
-
*
|
14234 |
-
*
|
14235 |
-
* @
|
14236 |
*/
|
14237 |
-
|
14238 |
-
|
14239 |
-
|
14240 |
-
|
14241 |
-
|
|
|
|
|
|
|
|
|
14242 |
}
|
14243 |
-
/**
|
14244 |
-
*
|
14245 |
-
*
|
14246 |
-
*
|
14247 |
-
*
|
14248 |
-
*
|
|
|
14249 |
*/
|
14250 |
-
|
14251 |
-
|
14252 |
-
|
14253 |
-
|
14254 |
-
|
14255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14256 |
}
|
14257 |
-
|
14258 |
-
|
14259 |
-
|
|
|
|
|
|
|
|
|
|
|
14260 |
}
|
14261 |
-
|
14262 |
-
|
14263 |
-
|
14264 |
-
|
14265 |
-
|
14266 |
-
|
14267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14268 |
*/
|
14269 |
-
|
14270 |
-
|
14271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14272 |
}
|
14273 |
-
/**
|
14274 |
-
*
|
14275 |
-
* @
|
|
|
14276 |
*/
|
14277 |
-
|
14278 |
-
|
14279 |
-
|
14280 |
-
|
14281 |
-
|
14282 |
-
|
14283 |
-
}
|
14284 |
-
// If there's no hub on current domain, or it's an old API, assign a new one
|
14285 |
-
if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
|
14286 |
-
var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
|
14287 |
-
setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));
|
14288 |
-
}
|
14289 |
-
// Return hub that lives on a domain
|
14290 |
-
return getHubFromCarrier(activeDomain);
|
14291 |
}
|
14292 |
-
|
14293 |
-
|
14294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14295 |
}
|
|
|
|
|
14296 |
}
|
14297 |
-
|
14298 |
-
|
14299 |
-
|
14300 |
-
|
14301 |
-
function hasHubOnCarrier(carrier) {
|
14302 |
-
return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
|
14303 |
}
|
14304 |
-
|
14305 |
-
|
14306 |
-
|
14307 |
-
|
14308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14309 |
*/
|
14310 |
-
|
14311 |
-
|
14312 |
-
|
14313 |
-
|
14314 |
-
|
14315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14316 |
}
|
14317 |
-
/**
|
14318 |
-
*
|
14319 |
-
* @param carrier object
|
14320 |
-
* @param hub Hub
|
14321 |
*/
|
14322 |
-
|
14323 |
-
|
14324 |
-
|
14325 |
-
|
14326 |
-
|
14327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14328 |
}
|
14329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14330 |
;// CONCATENATED MODULE: ./node_modules/@sentry/minimal/esm/index.js
|
14331 |
|
14332 |
|
@@ -14341,10 +16254,10 @@ function callOnHub(method) {
|
|
14341 |
for (var _i = 1; _i < arguments.length; _i++) {
|
14342 |
args[_i - 1] = arguments[_i];
|
14343 |
}
|
14344 |
-
var hub =
|
14345 |
if (hub && hub[method]) {
|
14346 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
14347 |
-
return hub[method].apply(hub,
|
14348 |
}
|
14349 |
throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report.");
|
14350 |
}
|
@@ -14356,13 +16269,7 @@ function callOnHub(method) {
|
|
14356 |
*/
|
14357 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
14358 |
function captureException(exception, captureContext) {
|
14359 |
-
var syntheticException;
|
14360 |
-
try {
|
14361 |
-
throw new Error('Sentry syntheticException');
|
14362 |
-
}
|
14363 |
-
catch (exception) {
|
14364 |
-
syntheticException = exception;
|
14365 |
-
}
|
14366 |
return callOnHub('captureException', exception, {
|
14367 |
captureContext: captureContext,
|
14368 |
originalException: exception,
|
@@ -14373,17 +16280,11 @@ function captureException(exception, captureContext) {
|
|
14373 |
* Captures a message event and sends it to Sentry.
|
14374 |
*
|
14375 |
* @param message The message to send to Sentry.
|
14376 |
-
* @param
|
14377 |
* @returns The generated eventId.
|
14378 |
*/
|
14379 |
function captureMessage(message, captureContext) {
|
14380 |
-
var syntheticException;
|
14381 |
-
try {
|
14382 |
-
throw new Error(message);
|
14383 |
-
}
|
14384 |
-
catch (exception) {
|
14385 |
-
syntheticException = exception;
|
14386 |
-
}
|
14387 |
// This is necessary to provide explicit scopes upgrade, without changing the original
|
14388 |
// arity of the `captureMessage(message, level)` method.
|
14389 |
var level = typeof captureContext === 'string' ? captureContext : undefined;
|
@@ -14977,13 +16878,38 @@ var defaultStore = {
|
|
14977 |
draftStore[action.payload.id][action.payload.key] = action.payload.value;
|
14978 |
break;
|
14979 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14980 |
// Add page rule row
|
14981 |
|
14982 |
case buttonizer_constants_actionTypes.pageRules.ADD_PAGE_RULE_ROW:
|
14983 |
{
|
14984 |
-
draftStore[action.payload.id].rules.push({
|
14985 |
type: "page_title",
|
14986 |
-
value: ""
|
|
|
14987 |
});
|
14988 |
break;
|
14989 |
}
|
@@ -14991,14 +16917,14 @@ var defaultStore = {
|
|
14991 |
|
14992 |
case buttonizer_constants_actionTypes.pageRules.SET_PAGE_RULE_ROW:
|
14993 |
{
|
14994 |
-
draftStore[action.payload.id].rules[action.payload.ruleRowKey][action.payload.key] = action.payload.value;
|
14995 |
break;
|
14996 |
}
|
14997 |
// Remove page rule row
|
14998 |
|
14999 |
case buttonizer_constants_actionTypes.pageRules.REMOVE_PAGE_RULE_ROW:
|
15000 |
{
|
15001 |
-
draftStore[action.payload.id].rules.splice(action.payload.ruleRowKey, 1);
|
15002 |
break;
|
15003 |
}
|
15004 |
}
|
@@ -17000,6 +18926,146 @@ var ButtonGroup = /*#__PURE__*/react.forwardRef(function ButtonGroup(props, ref)
|
|
17000 |
/* harmony default export */ var ButtonGroup_ButtonGroup = ((0,withStyles/* default */.Z)(ButtonGroup_styles, {
|
17001 |
name: 'MuiButtonGroup'
|
17002 |
})(ButtonGroup));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17003 |
// EXTERNAL MODULE: ./node_modules/@material-ui/icons/LaptopMac.js
|
17004 |
var LaptopMac = __webpack_require__(89974);
|
17005 |
// EXTERNAL MODULE: ./node_modules/@material-ui/icons/TabletMac.js
|
@@ -17096,15 +19162,17 @@ function DevicePreview() {
|
|
17096 |
} : null,
|
17097 |
"data-testid": device.type,
|
17098 |
className: "button"
|
17099 |
-
},
|
17100 |
-
|
17101 |
-
|
17102 |
-
|
|
|
17103 |
onMouseOver: function onMouseOver() {
|
17104 |
return setShowDeviceViews(true);
|
17105 |
},
|
17106 |
className: "current-device",
|
17107 |
-
"data-testid": "device:current-device"
|
|
|
17108 |
}, showDeviceViews === false && chosenDeviceView()));
|
17109 |
}
|
17110 |
// EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/debounce.js
|
@@ -23713,7 +25781,7 @@ var SnackbarProvider = /*#__PURE__*/function (_Component) {
|
|
23713 |
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
23714 |
var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
23715 |
|
23716 |
-
var
|
23717 |
var match = ("" + fn).match(fnNameMatchRegex);
|
23718 |
var name = match && match[1];
|
23719 |
return name || '';
|
@@ -23730,7 +25798,7 @@ var getFunctionComponentName = function getFunctionComponentName(Component, fall
|
|
23730 |
fallback = '';
|
23731 |
}
|
23732 |
|
23733 |
-
return Component.displayName || Component.name ||
|
23734 |
};
|
23735 |
|
23736 |
var getWrappedName = function getWrappedName(outerType, innerType, wrapperName) {
|
@@ -23972,146 +26040,6 @@ var Accordion = /*#__PURE__*/react.forwardRef(function Accordion(props, ref) {
|
|
23972 |
/* harmony default export */ var Accordion_Accordion = ((0,withStyles/* default */.Z)(Accordion_styles, {
|
23973 |
name: 'MuiAccordion'
|
23974 |
})(Accordion));
|
23975 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/IconButton/IconButton.js
|
23976 |
-
|
23977 |
-
|
23978 |
-
|
23979 |
-
|
23980 |
-
|
23981 |
-
|
23982 |
-
|
23983 |
-
|
23984 |
-
|
23985 |
-
|
23986 |
-
var IconButton_styles = function styles(theme) {
|
23987 |
-
return {
|
23988 |
-
/* Styles applied to the root element. */
|
23989 |
-
root: {
|
23990 |
-
textAlign: 'center',
|
23991 |
-
flex: '0 0 auto',
|
23992 |
-
fontSize: theme.typography.pxToRem(24),
|
23993 |
-
padding: 12,
|
23994 |
-
borderRadius: '50%',
|
23995 |
-
overflow: 'visible',
|
23996 |
-
// Explicitly set the default value to solve a bug on IE 11.
|
23997 |
-
color: theme.palette.action.active,
|
23998 |
-
transition: theme.transitions.create('background-color', {
|
23999 |
-
duration: theme.transitions.duration.shortest
|
24000 |
-
}),
|
24001 |
-
'&:hover': {
|
24002 |
-
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
24003 |
-
// Reset on touch devices, it doesn't add specificity
|
24004 |
-
'@media (hover: none)': {
|
24005 |
-
backgroundColor: 'transparent'
|
24006 |
-
}
|
24007 |
-
},
|
24008 |
-
'&$disabled': {
|
24009 |
-
backgroundColor: 'transparent',
|
24010 |
-
color: theme.palette.action.disabled
|
24011 |
-
}
|
24012 |
-
},
|
24013 |
-
|
24014 |
-
/* Styles applied to the root element if `edge="start"`. */
|
24015 |
-
edgeStart: {
|
24016 |
-
marginLeft: -12,
|
24017 |
-
'$sizeSmall&': {
|
24018 |
-
marginLeft: -3
|
24019 |
-
}
|
24020 |
-
},
|
24021 |
-
|
24022 |
-
/* Styles applied to the root element if `edge="end"`. */
|
24023 |
-
edgeEnd: {
|
24024 |
-
marginRight: -12,
|
24025 |
-
'$sizeSmall&': {
|
24026 |
-
marginRight: -3
|
24027 |
-
}
|
24028 |
-
},
|
24029 |
-
|
24030 |
-
/* Styles applied to the root element if `color="inherit"`. */
|
24031 |
-
colorInherit: {
|
24032 |
-
color: 'inherit'
|
24033 |
-
},
|
24034 |
-
|
24035 |
-
/* Styles applied to the root element if `color="primary"`. */
|
24036 |
-
colorPrimary: {
|
24037 |
-
color: theme.palette.primary.main,
|
24038 |
-
'&:hover': {
|
24039 |
-
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
24040 |
-
// Reset on touch devices, it doesn't add specificity
|
24041 |
-
'@media (hover: none)': {
|
24042 |
-
backgroundColor: 'transparent'
|
24043 |
-
}
|
24044 |
-
}
|
24045 |
-
},
|
24046 |
-
|
24047 |
-
/* Styles applied to the root element if `color="secondary"`. */
|
24048 |
-
colorSecondary: {
|
24049 |
-
color: theme.palette.secondary.main,
|
24050 |
-
'&:hover': {
|
24051 |
-
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
24052 |
-
// Reset on touch devices, it doesn't add specificity
|
24053 |
-
'@media (hover: none)': {
|
24054 |
-
backgroundColor: 'transparent'
|
24055 |
-
}
|
24056 |
-
}
|
24057 |
-
},
|
24058 |
-
|
24059 |
-
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
24060 |
-
disabled: {},
|
24061 |
-
|
24062 |
-
/* Styles applied to the root element if `size="small"`. */
|
24063 |
-
sizeSmall: {
|
24064 |
-
padding: 3,
|
24065 |
-
fontSize: theme.typography.pxToRem(18)
|
24066 |
-
},
|
24067 |
-
|
24068 |
-
/* Styles applied to the children container element. */
|
24069 |
-
label: {
|
24070 |
-
width: '100%',
|
24071 |
-
display: 'flex',
|
24072 |
-
alignItems: 'inherit',
|
24073 |
-
justifyContent: 'inherit'
|
24074 |
-
}
|
24075 |
-
};
|
24076 |
-
};
|
24077 |
-
/**
|
24078 |
-
* Refer to the [Icons](/components/icons/) section of the documentation
|
24079 |
-
* regarding the available icon options.
|
24080 |
-
*/
|
24081 |
-
|
24082 |
-
var IconButton_IconButton = /*#__PURE__*/react.forwardRef(function IconButton(props, ref) {
|
24083 |
-
var _props$edge = props.edge,
|
24084 |
-
edge = _props$edge === void 0 ? false : _props$edge,
|
24085 |
-
children = props.children,
|
24086 |
-
classes = props.classes,
|
24087 |
-
className = props.className,
|
24088 |
-
_props$color = props.color,
|
24089 |
-
color = _props$color === void 0 ? 'default' : _props$color,
|
24090 |
-
_props$disabled = props.disabled,
|
24091 |
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
24092 |
-
_props$disableFocusRi = props.disableFocusRipple,
|
24093 |
-
disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
24094 |
-
_props$size = props.size,
|
24095 |
-
size = _props$size === void 0 ? 'medium' : _props$size,
|
24096 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]);
|
24097 |
-
|
24098 |
-
return /*#__PURE__*/react.createElement(ButtonBase_ButtonBase, (0,esm_extends/* default */.Z)({
|
24099 |
-
className: (0,clsx_m/* default */.Z)(classes.root, className, color !== 'default' && classes["color".concat((0,utils_capitalize/* default */.Z)(color))], disabled && classes.disabled, size === "small" && classes["size".concat((0,utils_capitalize/* default */.Z)(size))], {
|
24100 |
-
'start': classes.edgeStart,
|
24101 |
-
'end': classes.edgeEnd
|
24102 |
-
}[edge]),
|
24103 |
-
centerRipple: true,
|
24104 |
-
focusRipple: !disableFocusRipple,
|
24105 |
-
disabled: disabled,
|
24106 |
-
ref: ref
|
24107 |
-
}, other), /*#__PURE__*/react.createElement("span", {
|
24108 |
-
className: classes.label
|
24109 |
-
}, children));
|
24110 |
-
});
|
24111 |
-
false ? 0 : void 0;
|
24112 |
-
/* harmony default export */ var esm_IconButton_IconButton = ((0,withStyles/* default */.Z)(IconButton_styles, {
|
24113 |
-
name: 'MuiIconButton'
|
24114 |
-
})(IconButton_IconButton));
|
24115 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js
|
24116 |
|
24117 |
|
@@ -27497,7 +29425,7 @@ function getWindow(node) {
|
|
27497 |
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
|
27498 |
|
27499 |
|
27500 |
-
function
|
27501 |
var OwnElement = getWindow(node).Element;
|
27502 |
return node instanceof OwnElement || node instanceof Element;
|
27503 |
}
|
@@ -27597,7 +29525,7 @@ function getNodeName(element) {
|
|
27597 |
|
27598 |
function getDocumentElement(element) {
|
27599 |
// $FlowFixMe[incompatible-return]: assume body is always available
|
27600 |
-
return ((
|
27601 |
element.document) || window.document).documentElement;
|
27602 |
}
|
27603 |
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
|
@@ -28030,7 +29958,7 @@ function popperGenerator(generatorOptions) {
|
|
28030 |
cleanupModifierEffects();
|
28031 |
state.options = Object.assign({}, defaultOptions, state.options, options);
|
28032 |
state.scrollParents = {
|
28033 |
-
reference:
|
28034 |
popper: listScrollParents(popper)
|
28035 |
}; // Orders the modifiers based on their dependencies and `phase`
|
28036 |
// properties
|
@@ -28809,7 +30737,7 @@ function getInnerBoundingClientRect(element) {
|
|
28809 |
}
|
28810 |
|
28811 |
function getClientRectFromMixedType(element, clippingParent) {
|
28812 |
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
28813 |
} // A "clipping parent" is an overflowable container with the characteristic of
|
28814 |
// clipping (or hiding) overflowing elements with a position different from
|
28815 |
// `initial`
|
@@ -28820,13 +30748,13 @@ function getClippingParents(element) {
|
|
28820 |
var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;
|
28821 |
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
28822 |
|
28823 |
-
if (!
|
28824 |
return [];
|
28825 |
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
|
28826 |
|
28827 |
|
28828 |
return clippingParents.filter(function (clippingParent) {
|
28829 |
-
return
|
28830 |
});
|
28831 |
} // Gets the maximum area that the element is visible in due to any number of
|
28832 |
// clipping parents
|
@@ -28904,7 +30832,7 @@ function detectOverflow(state, options) {
|
|
28904 |
var altContext = elementContext === popper ? reference : popper;
|
28905 |
var popperRect = state.rects.popper;
|
28906 |
var element = state.elements[altBoundary ? altContext : elementContext];
|
28907 |
-
var clippingClientRect = getClippingRect(
|
28908 |
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
28909 |
var popperOffsets = computeOffsets({
|
28910 |
reference: referenceClientRect,
|
@@ -29644,34 +31572,24 @@ function Hints_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29644 |
|
29645 |
|
29646 |
var Hints = function Hints(_ref) {
|
29647 |
-
var
|
|
|
|
|
29648 |
_ref$anchorEl = _ref.anchorEl,
|
29649 |
anchorEl = _ref$anchorEl === void 0 ? null : _ref$anchorEl,
|
29650 |
-
_ref$nextHintStepInde = _ref.nextHintStepIndex,
|
29651 |
-
nextHintStepIndex = _ref$nextHintStepInde === void 0 ? false : _ref$nextHintStepInde,
|
29652 |
text = _ref.text,
|
29653 |
setHintStep = _ref.setHintStep,
|
29654 |
_ref$position = _ref.position,
|
29655 |
position = _ref$position === void 0 ? [0, 20] : _ref$position;
|
29656 |
-
|
29657 |
-
|
29658 |
-
|
29659 |
-
|
29660 |
-
|
29661 |
-
|
29662 |
-
|
29663 |
-
|
29664 |
-
|
29665 |
-
styleTab === null || styleTab === void 0 ? void 0 : styleTab.addEventListener("click", function () {
|
29666 |
-
setHintStep(2);
|
29667 |
-
anchorEl.classList.remove("hint-pulse-1");
|
29668 |
-
});
|
29669 |
-
var publishBtn = document.querySelector(".MuiButton-Publish");
|
29670 |
-
publishBtn === null || publishBtn === void 0 ? void 0 : publishBtn.addEventListener("click", function () {
|
29671 |
-
setHintStep(false);
|
29672 |
-
anchorEl.classList.remove("hint-pulse-2");
|
29673 |
-
});
|
29674 |
-
}
|
29675 |
|
29676 |
var _useState = (0,react.useState)(null),
|
29677 |
_useState2 = Hints_slicedToArray(_useState, 2),
|
@@ -29680,7 +31598,6 @@ var Hints = function Hints(_ref) {
|
|
29680 |
|
29681 |
var _usePopper = usePopper(anchorEl, popperElement, {
|
29682 |
placement: "top",
|
29683 |
-
strategy: "fixed",
|
29684 |
modifiers: [{
|
29685 |
name: "offset",
|
29686 |
options: {
|
@@ -29691,7 +31608,7 @@ var Hints = function Hints(_ref) {
|
|
29691 |
styles = _usePopper.styles,
|
29692 |
attributes = _usePopper.attributes;
|
29693 |
|
29694 |
-
return
|
29695 |
ref: setPopperElement,
|
29696 |
style: styles.popper
|
29697 |
}, attributes.popper, {
|
@@ -29700,9 +31617,8 @@ var Hints = function Hints(_ref) {
|
|
29700 |
}), /*#__PURE__*/react.createElement("p", null, text), /*#__PURE__*/react.createElement(esm_IconButton_IconButton, {
|
29701 |
className: "close-button",
|
29702 |
onClick: function onClick() {
|
29703 |
-
setHintStep(false);
|
29704 |
-
|
29705 |
-
anchorEl.classList.remove("hint-pulse-".concat(currentHintStep));
|
29706 |
anchorEl = null;
|
29707 |
},
|
29708 |
size: "small",
|
@@ -29716,7 +31632,7 @@ var Hints = function Hints(_ref) {
|
|
29716 |
|
29717 |
/* harmony default export */ var Hints_Hints = (connect(function (state) {
|
29718 |
return {
|
29719 |
-
|
29720 |
welcome: state.settings.welcome
|
29721 |
};
|
29722 |
}, function (dispatch) {
|
@@ -29974,7 +31890,7 @@ function PublishButton(_ref) {
|
|
29974 |
}
|
29975 |
|
29976 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Hints_Hints, {
|
29977 |
-
|
29978 |
anchorEl: anchorEl,
|
29979 |
position: [0, 20],
|
29980 |
text: translate_translate("buttonizer_tour.hint.step_2")
|
@@ -29997,7 +31913,7 @@ function PublishButton(_ref) {
|
|
29997 |
nextHintStepIndex: state.misc.hint_step
|
29998 |
};
|
29999 |
})(PublishButton));
|
30000 |
-
;// CONCATENATED MODULE: ./node_modules
|
30001 |
/**!
|
30002 |
* tippy.js v6.3.1
|
30003 |
* (c) 2017-2021 atomiks
|
@@ -38815,14 +40731,14 @@ function ButtonContainer(_ref) {
|
|
38815 |
}, button.name)), /*#__PURE__*/react.createElement("div", {
|
38816 |
className: "button-actions"
|
38817 |
}, groupIndex === 0 && groups[groupId].children.indexOf(buttonId) === 0 && /*#__PURE__*/react.createElement(Hints_Hints, {
|
38818 |
-
|
38819 |
anchorEl: anchorEl,
|
38820 |
position: [0, 20],
|
38821 |
text: translate_translate("buttonizer_tour.hint.step_0")
|
38822 |
}), /*#__PURE__*/react.createElement(ContainerActions_EditButton, {
|
38823 |
ref: ref,
|
38824 |
onClick: function onClick() {
|
38825 |
-
document.location.hash = "
|
38826 |
},
|
38827 |
text: translate_translate("buttonizer_tour.hint.step_0"),
|
38828 |
nextHintStepIndex: nextHintStepIndex,
|
@@ -49300,7 +51216,9 @@ function TemplateOptions(_ref) {
|
|
49300 |
repeatCount: "indefinite"
|
49301 |
}))))), /*#__PURE__*/react.createElement("p", null, translate_translate("loading.loading")))), !isLoading && /*#__PURE__*/react.createElement("div", {
|
49302 |
className: "template"
|
49303 |
-
}, filteredTemplateList.
|
|
|
|
|
49304 |
return /*#__PURE__*/react.createElement("div", {
|
49305 |
key: key,
|
49306 |
className: "container",
|
@@ -49340,6 +51258,10 @@ function TemplateOptions(_ref) {
|
|
49340 |
size: "small",
|
49341 |
key: key,
|
49342 |
label: filterButtons === "button" ? template.name : template.group_type.charAt(0).toUpperCase() + template.group_type.slice(1).replace(/[^\w\s]/gi, " ")
|
|
|
|
|
|
|
|
|
49343 |
}), !canUseTemplate(template) && /*#__PURE__*/react.createElement(PremiumTag, null), canUseTemplate(template) && /*#__PURE__*/react.createElement("div", {
|
49344 |
className: "select"
|
49345 |
}, selected.includes(key) ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("i", {
|
@@ -49409,19 +51331,6 @@ var popular = [{
|
|
49409 |
}, {
|
49410 |
value: "whatsapp",
|
49411 |
label: "settings.button_action.actions.whatsapp_chat"
|
49412 |
-
}, {
|
49413 |
-
value: "backtotop",
|
49414 |
-
label: "settings.button_action.actions.back_to_top"
|
49415 |
-
}, {
|
49416 |
-
value: "gotobottom",
|
49417 |
-
label: "settings.button_action.actions.go_to_bottom"
|
49418 |
-
}, {
|
49419 |
-
value: "gobackpage",
|
49420 |
-
label: "settings.button_action.actions.go_back_one_page"
|
49421 |
-
}, {
|
49422 |
-
value: "javascript_pro",
|
49423 |
-
label: "settings.button_action.actions.javascript.name",
|
49424 |
-
isPro: true
|
49425 |
}, {
|
49426 |
value: "socialsharing",
|
49427 |
label: "settings.button_action.actions.social_sharing.social_sharing"
|
@@ -49485,6 +51394,9 @@ var socialMedia = [{
|
|
49485 |
}, {
|
49486 |
value: "waze",
|
49487 |
label: "settings.button_action.actions.social_media.waze"
|
|
|
|
|
|
|
49488 |
}].map(function (obj) {
|
49489 |
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
49490 |
group: "social_media"
|
@@ -49511,11 +51423,27 @@ var popup = [{
|
|
49511 |
});
|
49512 |
});
|
49513 |
var other = [{
|
|
|
|
|
|
|
|
|
49514 |
value: "clipboard",
|
49515 |
label: "settings.button_action.actions.clipboard"
|
|
|
|
|
|
|
49516 |
}, {
|
49517 |
value: "print",
|
49518 |
label: "settings.button_action.actions.print_page"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49519 |
}].map(function (obj) {
|
49520 |
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
49521 |
group: "actions"
|
@@ -54086,6 +56014,11 @@ var FilterTemplateOptions = function FilterTemplateOptions(_ref) {
|
|
54086 |
marginLeft: 20,
|
54087 |
width: "100%"
|
54088 |
},
|
|
|
|
|
|
|
|
|
|
|
54089 |
options: isLoading ? [] : button ? filterList.filter(function (action) {
|
54090 |
return importFilteredList.find(function (template) {
|
54091 |
return action.value === template.type;
|
@@ -56009,7 +57942,7 @@ function ButtonHeader(_ref) {
|
|
56009 |
setAnchorEl = _useState2[1];
|
56010 |
|
56011 |
(0,react.useEffect)(function () {
|
56012 |
-
setAnchorEl(ref.current);
|
56013 |
}, [ref]);
|
56014 |
return /*#__PURE__*/react.createElement("div", {
|
56015 |
className: "bar-header"
|
@@ -56075,11 +58008,6 @@ function ButtonHeader(_ref) {
|
|
56075 |
icon: /*#__PURE__*/react.createElement("i", {
|
56076 |
className: "fas fa-wrench"
|
56077 |
})
|
56078 |
-
}), /*#__PURE__*/react.createElement(Hints_Hints, {
|
56079 |
-
currentHintStep: 1,
|
56080 |
-
anchorEl: anchorEl,
|
56081 |
-
position: [0, 10],
|
56082 |
-
text: translate_translate("buttonizer_tour.hint.step_1")
|
56083 |
}), /*#__PURE__*/react.createElement(Tab_Tab, {
|
56084 |
component: "a",
|
56085 |
onClick: function onClick() {
|
@@ -56120,7 +58048,12 @@ function ButtonHeader(_ref) {
|
|
56120 |
icon: /*#__PURE__*/react.createElement("i", {
|
56121 |
className: "fas fa-sliders-h"
|
56122 |
})
|
56123 |
-
})))
|
|
|
|
|
|
|
|
|
|
|
56124 |
}
|
56125 |
|
56126 |
/* harmony default export */ var ButtonHeader_ButtonHeader = (withRouter(ButtonHeader));
|
@@ -57361,6 +59294,95 @@ function MessengerChat(_ref) {
|
|
57361 |
buttons: state.buttons
|
57362 |
};
|
57363 |
})(MessengerChat));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57364 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionRelAttributes/ButtonActionRelAttributes.js
|
57365 |
function ButtonActionRelAttributes_extends() { ButtonActionRelAttributes_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonActionRelAttributes_extends.apply(this, arguments); }
|
57366 |
|
@@ -57470,6 +59492,8 @@ function isValidURL(value) {
|
|
57470 |
require_host: false
|
57471 |
}) || value.substr(0, 1) === "#";
|
57472 |
}
|
|
|
|
|
57473 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Url/Url.js
|
57474 |
function Url_slicedToArray(arr, i) { return Url_arrayWithHoles(arr) || Url_iterableToArrayLimit(arr, i) || Url_unsupportedIterableToArray(arr, i) || Url_nonIterableRest(); }
|
57475 |
|
@@ -57489,6 +59513,8 @@ function Url_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57489 |
|
57490 |
|
57491 |
|
|
|
|
|
57492 |
var validatorTimeout = setTimeout(function () {}, 0);
|
57493 |
function Url(_ref) {
|
57494 |
var _ref$value = _ref.value,
|
@@ -57501,6 +59527,8 @@ function Url(_ref) {
|
|
57501 |
newTabValue = _ref.newTabValue,
|
57502 |
_ref$showRelAttribute = _ref.showRelAttributes,
|
57503 |
showRelAttributes = _ref$showRelAttribute === void 0 ? false : _ref$showRelAttribute,
|
|
|
|
|
57504 |
relAttributesValue = _ref.relAttributesValue,
|
57505 |
_onChange = _ref.onChange;
|
57506 |
|
@@ -57516,6 +59544,29 @@ function Url(_ref) {
|
|
57516 |
(0,react.useEffect)(function () {
|
57517 |
validator(value);
|
57518 |
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57519 |
return /*#__PURE__*/react.createElement("div", {
|
57520 |
className: "button-action-value"
|
57521 |
}, /*#__PURE__*/react.createElement(esm_TextField_TextField, {
|
@@ -57548,6 +59599,9 @@ function Url(_ref) {
|
|
57548 |
},
|
57549 |
inputProps: {
|
57550 |
"data-testid": "action:field"
|
|
|
|
|
|
|
57551 |
}
|
57552 |
}), showNewTab && /*#__PURE__*/react.createElement(ButtonActionNewTab, {
|
57553 |
value: newTabValue,
|
@@ -58120,6 +60174,7 @@ function ButtonActionValue(_ref) {
|
|
58120 |
case "twitter":
|
58121 |
case "snapchat":
|
58122 |
case "instagram":
|
|
|
58123 |
case "vk":
|
58124 |
return /*#__PURE__*/react.createElement(DefaultTextField, {
|
58125 |
value: button.action,
|
@@ -58129,6 +60184,19 @@ function ButtonActionValue(_ref) {
|
|
58129 |
}
|
58130 |
});
|
58131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58132 |
case "signal_group":
|
58133 |
return /*#__PURE__*/react.createElement(Url, {
|
58134 |
value: button.action,
|
@@ -72922,95 +74990,6 @@ var Slider_Slider = /*#__PURE__*/react.forwardRef(function Slider(props, ref) {
|
|
72922 |
/* harmony default export */ var esm_Slider_Slider = ((0,withStyles/* default */.Z)(Slider_styles, {
|
72923 |
name: 'MuiSlider'
|
72924 |
})(Slider_Slider));
|
72925 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js
|
72926 |
-
|
72927 |
-
|
72928 |
-
|
72929 |
-
|
72930 |
-
|
72931 |
-
|
72932 |
-
|
72933 |
-
|
72934 |
-
var InputAdornment_styles = {
|
72935 |
-
/* Styles applied to the root element. */
|
72936 |
-
root: {
|
72937 |
-
display: 'flex',
|
72938 |
-
height: '0.01em',
|
72939 |
-
// Fix IE 11 flexbox alignment. To remove at some point.
|
72940 |
-
maxHeight: '2em',
|
72941 |
-
alignItems: 'center',
|
72942 |
-
whiteSpace: 'nowrap'
|
72943 |
-
},
|
72944 |
-
|
72945 |
-
/* Styles applied to the root element if `variant="filled"`. */
|
72946 |
-
filled: {
|
72947 |
-
'&$positionStart:not($hiddenLabel)': {
|
72948 |
-
marginTop: 16
|
72949 |
-
}
|
72950 |
-
},
|
72951 |
-
|
72952 |
-
/* Styles applied to the root element if `position="start"`. */
|
72953 |
-
positionStart: {
|
72954 |
-
marginRight: 8
|
72955 |
-
},
|
72956 |
-
|
72957 |
-
/* Styles applied to the root element if `position="end"`. */
|
72958 |
-
positionEnd: {
|
72959 |
-
marginLeft: 8
|
72960 |
-
},
|
72961 |
-
|
72962 |
-
/* Styles applied to the root element if `disablePointerEvents=true`. */
|
72963 |
-
disablePointerEvents: {
|
72964 |
-
pointerEvents: 'none'
|
72965 |
-
},
|
72966 |
-
|
72967 |
-
/* Styles applied if the adornment is used inside <FormControl hiddenLabel />. */
|
72968 |
-
hiddenLabel: {},
|
72969 |
-
|
72970 |
-
/* Styles applied if the adornment is used inside <FormControl margin="dense" />. */
|
72971 |
-
marginDense: {}
|
72972 |
-
};
|
72973 |
-
var InputAdornment = /*#__PURE__*/react.forwardRef(function InputAdornment(props, ref) {
|
72974 |
-
var children = props.children,
|
72975 |
-
classes = props.classes,
|
72976 |
-
className = props.className,
|
72977 |
-
_props$component = props.component,
|
72978 |
-
Component = _props$component === void 0 ? 'div' : _props$component,
|
72979 |
-
_props$disablePointer = props.disablePointerEvents,
|
72980 |
-
disablePointerEvents = _props$disablePointer === void 0 ? false : _props$disablePointer,
|
72981 |
-
_props$disableTypogra = props.disableTypography,
|
72982 |
-
disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,
|
72983 |
-
position = props.position,
|
72984 |
-
variantProp = props.variant,
|
72985 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["children", "classes", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"]);
|
72986 |
-
|
72987 |
-
var muiFormControl = useFormControl() || {};
|
72988 |
-
var variant = variantProp;
|
72989 |
-
|
72990 |
-
if (variantProp && muiFormControl.variant) {
|
72991 |
-
if (false) {}
|
72992 |
-
}
|
72993 |
-
|
72994 |
-
if (muiFormControl && !variant) {
|
72995 |
-
variant = muiFormControl.variant;
|
72996 |
-
}
|
72997 |
-
|
72998 |
-
return /*#__PURE__*/react.createElement(FormControl_FormControlContext.Provider, {
|
72999 |
-
value: null
|
73000 |
-
}, /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
73001 |
-
className: (0,clsx_m/* default */.Z)(classes.root, className, disablePointerEvents && classes.disablePointerEvents, muiFormControl.hiddenLabel && classes.hiddenLabel, variant === 'filled' && classes.filled, {
|
73002 |
-
'start': classes.positionStart,
|
73003 |
-
'end': classes.positionEnd
|
73004 |
-
}[position], muiFormControl.margin === 'dense' && classes.marginDense),
|
73005 |
-
ref: ref
|
73006 |
-
}, other), typeof children === 'string' && !disableTypography ? /*#__PURE__*/react.createElement(Typography_Typography, {
|
73007 |
-
color: "textSecondary"
|
73008 |
-
}, children) : children));
|
73009 |
-
});
|
73010 |
-
false ? 0 : void 0;
|
73011 |
-
/* harmony default export */ var InputAdornment_InputAdornment = ((0,withStyles/* default */.Z)(InputAdornment_styles, {
|
73012 |
-
name: 'MuiInputAdornment'
|
73013 |
-
})(InputAdornment));
|
73014 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Form/SliderContainer/SliderContainer.js
|
73015 |
function SliderContainer_extends() { SliderContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return SliderContainer_extends.apply(this, arguments); }
|
73016 |
|
@@ -73294,6 +75273,12 @@ function IconType(_ref) {
|
|
73294 |
}));
|
73295 |
}
|
73296 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/DisableSetting/DisableSetting.js
|
|
|
|
|
|
|
|
|
|
|
|
|
73297 |
|
73298 |
|
73299 |
|
@@ -73311,9 +75296,11 @@ function DisableSetting(_ref) {
|
|
73311 |
premiumTag = _ref$premiumTag === void 0 ? false : _ref$premiumTag,
|
73312 |
_ref$children = _ref.children,
|
73313 |
children = _ref$children === void 0 ? null : _ref$children,
|
73314 |
-
_onClick = _ref.onClick
|
|
|
|
|
73315 |
var visibility = condition ? setOpacity : 1;
|
73316 |
-
return /*#__PURE__*/react.createElement("div", {
|
73317 |
className: (0,clsx_m/* default */.Z)("disable-setting ".concat(condition ? "disabled" : ""), className),
|
73318 |
"data-testid": "disable-setting",
|
73319 |
onClick: function onClick(e) {
|
@@ -73322,7 +75309,7 @@ function DisableSetting(_ref) {
|
|
73322 |
}
|
73323 |
},
|
73324 |
disabled: condition
|
73325 |
-
}, /*#__PURE__*/react.createElement("div", {
|
73326 |
style: {
|
73327 |
opacity: visibility
|
73328 |
},
|
@@ -75620,7 +77607,7 @@ function Advanced(_ref) {
|
|
75620 |
title: translate_translate("settings.custom_id.title") + " & " + translate_translate("settings.custom_class.title"),
|
75621 |
"data-testid": "group:custom-class-id",
|
75622 |
icon: "far fa-clock",
|
75623 |
-
opened: openedGroup === "customClassId",
|
75624 |
onSetIsOpened: function onSetIsOpened(val) {
|
75625 |
return setOpenedGroup(val ? "customClassId" : "");
|
75626 |
}
|
@@ -75631,7 +77618,7 @@ function Advanced(_ref) {
|
|
75631 |
}, translate_translate("settings.custom_id.title")), /*#__PURE__*/react.createElement("hr", null), settings.styling.id(), settings.styling.editor()), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
75632 |
title: translate_translate("time_schedules.name"),
|
75633 |
icon: "far fa-clock",
|
75634 |
-
opened: openedGroup === "timeSchedules",
|
75635 |
"data-testid": "group:time-schedules",
|
75636 |
onSetIsOpened: function onSetIsOpened(val) {
|
75637 |
return setOpenedGroup(val ? "timeSchedules" : "");
|
@@ -75639,7 +77626,7 @@ function Advanced(_ref) {
|
|
75639 |
}, settings.filters.timeSchedules()), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
75640 |
title: translate_translate("page_rules.name"),
|
75641 |
icon: "fas fa-filter",
|
75642 |
-
opened: openedGroup === "pageRules",
|
75643 |
"data-testid": "group:page-rules",
|
75644 |
onSetIsOpened: function onSetIsOpened(val) {
|
75645 |
return setOpenedGroup(val ? "pageRules" : "");
|
@@ -77794,7 +79781,8 @@ function ExitIntent(_ref) {
|
|
77794 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DisableSetting, {
|
77795 |
onClick: function onClick(e) {
|
77796 |
onChange(e.currentTarget);
|
77797 |
-
}
|
|
|
77798 |
}, /*#__PURE__*/react.createElement("p", null, translate_translate("settings.exit_intent.description")), /*#__PURE__*/react.createElement(SettingsContainer, {
|
77799 |
title: translate_translate("settings.exit_intent.trigger_window"),
|
77800 |
fullWidth: false
|
@@ -78573,7 +80561,7 @@ function Advanced_Advanced(_ref) {
|
|
78573 |
};
|
78574 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
78575 |
title: "".concat(translate_translate("settings.menu_animation.title")),
|
78576 |
-
opened: openedGroup === "animation",
|
78577 |
onSetIsOpened: function onSetIsOpened(val) {
|
78578 |
return setOpenedGroup(val ? "animation" : "");
|
78579 |
},
|
@@ -78595,7 +80583,7 @@ function Advanced_Advanced(_ref) {
|
|
78595 |
title: translate_translate("settings.custom_id.title") + " & " + translate_translate("settings.custom_class.title"),
|
78596 |
"data-testid": "group:custom-class-id",
|
78597 |
icon: "far fa-clock",
|
78598 |
-
opened: openedGroup === "customIdClass",
|
78599 |
onSetIsOpened: function onSetIsOpened(val) {
|
78600 |
return setOpenedGroup(val ? "customIdClass" : "");
|
78601 |
}
|
@@ -78607,7 +80595,7 @@ function Advanced_Advanced(_ref) {
|
|
78607 |
title: translate_translate("time_schedules.name"),
|
78608 |
icon: "far fa-clock",
|
78609 |
"data-testid": "group:time-schedules",
|
78610 |
-
opened: openedGroup === "timeSchedules",
|
78611 |
onSetIsOpened: function onSetIsOpened(val) {
|
78612 |
return setOpenedGroup(val ? "timeSchedules" : "");
|
78613 |
}
|
@@ -78615,7 +80603,7 @@ function Advanced_Advanced(_ref) {
|
|
78615 |
title: translate_translate("page_rules.name"),
|
78616 |
"data-testid": "group:page-rules",
|
78617 |
icon: "fas fa-filter",
|
78618 |
-
opened: openedGroup === "pageRules",
|
78619 |
onSetIsOpened: function onSetIsOpened(val) {
|
78620 |
return setOpenedGroup(val ? "pageRules" : "");
|
78621 |
}
|
@@ -78623,7 +80611,7 @@ function Advanced_Advanced(_ref) {
|
|
78623 |
title: translate_translate("settings.button_group_window.timeout_scroll"),
|
78624 |
icon: "fas fa-stopwatch",
|
78625 |
"data-testid": "group:timeout-scroll",
|
78626 |
-
opened: openedGroup === "timeOutScroll",
|
78627 |
onSetIsOpened: function onSetIsOpened(val) {
|
78628 |
return setOpenedGroup(val ? "timeOutScroll" : "");
|
78629 |
}
|
@@ -78631,7 +80619,7 @@ function Advanced_Advanced(_ref) {
|
|
78631 |
title: translate_translate("settings.exit_intent.title"),
|
78632 |
icon: "fas fa-running",
|
78633 |
"data-testid": "group:exit-intent",
|
78634 |
-
opened: openedGroup === "exitIntent",
|
78635 |
onSetIsOpened: function onSetIsOpened(val) {
|
78636 |
return setOpenedGroup(val ? "exitIntent" : "");
|
78637 |
}
|
@@ -78782,6 +80770,168 @@ function Router_Router(_ref) {
|
|
78782 |
component: ItemNotFound
|
78783 |
}));
|
78784 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78785 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Badge/Badge.js
|
78786 |
|
78787 |
|
@@ -79065,8 +81215,11 @@ function EventsButton() {
|
|
79065 |
badgeContent: messages.length,
|
79066 |
color: "secondary",
|
79067 |
invisible: hasRead || messages.length === 0
|
79068 |
-
}, /*#__PURE__*/react.createElement(
|
79069 |
-
className: "far fa-lightbulb"
|
|
|
|
|
|
|
79070 |
})))), /*#__PURE__*/react.createElement(Popover_Popover, {
|
79071 |
open: popperOpened !== null,
|
79072 |
anchorEl: popperOpened,
|
@@ -79114,168 +81267,6 @@ function EventsButton() {
|
|
79114 |
}));
|
79115 |
}))));
|
79116 |
}
|
79117 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/SavingDialog/SavingDialog.js
|
79118 |
-
function SavingDialog_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
79119 |
-
|
79120 |
-
function SavingDialog_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { SavingDialog_ownKeys(Object(source), true).forEach(function (key) { SavingDialog_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { SavingDialog_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
79121 |
-
|
79122 |
-
function SavingDialog_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
79123 |
-
|
79124 |
-
function SavingDialog_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SavingDialog_typeof = function _typeof(obj) { return typeof obj; }; } else { SavingDialog_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SavingDialog_typeof(obj); }
|
79125 |
-
|
79126 |
-
function SavingDialog_slicedToArray(arr, i) { return SavingDialog_arrayWithHoles(arr) || SavingDialog_iterableToArrayLimit(arr, i) || SavingDialog_unsupportedIterableToArray(arr, i) || SavingDialog_nonIterableRest(); }
|
79127 |
-
|
79128 |
-
function SavingDialog_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
79129 |
-
|
79130 |
-
function SavingDialog_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SavingDialog_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SavingDialog_arrayLikeToArray(o, minLen); }
|
79131 |
-
|
79132 |
-
function SavingDialog_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
79133 |
-
|
79134 |
-
function SavingDialog_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
79135 |
-
|
79136 |
-
function SavingDialog_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
79137 |
-
|
79138 |
-
|
79139 |
-
|
79140 |
-
|
79141 |
-
|
79142 |
-
|
79143 |
-
|
79144 |
-
var SavingDialog_useStyles = styles_makeStyles(function () {
|
79145 |
-
return {
|
79146 |
-
failed: {
|
79147 |
-
background: "#fcd4d4",
|
79148 |
-
color: "#f01919",
|
79149 |
-
border: "1px solid #f01919"
|
79150 |
-
},
|
79151 |
-
"default": {
|
79152 |
-
background: "#fce8d4"
|
79153 |
-
}
|
79154 |
-
};
|
79155 |
-
});
|
79156 |
-
|
79157 |
-
function SavingDialog(_ref) {
|
79158 |
-
var style = _ref.style,
|
79159 |
-
_ref$isUpdating = _ref.isUpdating,
|
79160 |
-
isUpdating = _ref$isUpdating === void 0 ? false : _ref$isUpdating;
|
79161 |
-
|
79162 |
-
var _useState = (0,react.useState)(isUpdating),
|
79163 |
-
_useState2 = SavingDialog_slicedToArray(_useState, 2),
|
79164 |
-
updating = _useState2[0],
|
79165 |
-
setUpdating = _useState2[1];
|
79166 |
-
|
79167 |
-
var _useState3 = (0,react.useState)(false),
|
79168 |
-
_useState4 = SavingDialog_slicedToArray(_useState3, 2),
|
79169 |
-
openDialog = _useState4[0],
|
79170 |
-
setOpenDialog = _useState4[1];
|
79171 |
-
|
79172 |
-
(0,react.useEffect)(function () {
|
79173 |
-
setUpdating(isUpdating);
|
79174 |
-
}, [isUpdating]);
|
79175 |
-
var classes = SavingDialog_useStyles();
|
79176 |
-
|
79177 |
-
var label = function label() {
|
79178 |
-
if (updating) {
|
79179 |
-
if (updating === "failed") {
|
79180 |
-
return translate_translate("saving.failed");
|
79181 |
-
} else if (SavingDialog_typeof(updating) === "object") {
|
79182 |
-
return /*#__PURE__*/react.createElement("div", {
|
79183 |
-
style: {
|
79184 |
-
display: "inline-grid"
|
79185 |
-
}
|
79186 |
-
}, /*#__PURE__*/react.createElement("span", null, updating.status, ": ", updating.statusText), /*#__PURE__*/react.createElement(Link_Link, {
|
79187 |
-
component: "button",
|
79188 |
-
style: {
|
79189 |
-
fontSize: "0.7rem",
|
79190 |
-
textDecoration: "none",
|
79191 |
-
color: "#2186de"
|
79192 |
-
},
|
79193 |
-
onClick: function onClick() {
|
79194 |
-
setOpenDialog(true);
|
79195 |
-
}
|
79196 |
-
}, "Show error message..."));
|
79197 |
-
} else {
|
79198 |
-
return translate_translate("saving.saving");
|
79199 |
-
}
|
79200 |
-
}
|
79201 |
-
|
79202 |
-
return translate_translate("saving.completed");
|
79203 |
-
};
|
79204 |
-
|
79205 |
-
var icon = function icon() {
|
79206 |
-
if (updating) {
|
79207 |
-
if (updating === "failed" || SavingDialog_typeof(updating) === "object") {
|
79208 |
-
return /*#__PURE__*/react.createElement("i", {
|
79209 |
-
style: {
|
79210 |
-
width: "20px",
|
79211 |
-
height: "20px",
|
79212 |
-
textAlign: "center",
|
79213 |
-
lineHeight: "24px"
|
79214 |
-
},
|
79215 |
-
className: "fas fa-times saved-icon"
|
79216 |
-
});
|
79217 |
-
} else {
|
79218 |
-
return /*#__PURE__*/react.createElement(CircularProgress_CircularProgress, {
|
79219 |
-
style: {
|
79220 |
-
width: "20px",
|
79221 |
-
height: "20px"
|
79222 |
-
},
|
79223 |
-
color: "secondary"
|
79224 |
-
});
|
79225 |
-
}
|
79226 |
-
}
|
79227 |
-
|
79228 |
-
return /*#__PURE__*/react.createElement("i", {
|
79229 |
-
style: {
|
79230 |
-
width: "20px",
|
79231 |
-
height: "20px",
|
79232 |
-
textAlign: "center",
|
79233 |
-
lineHeight: "24px"
|
79234 |
-
},
|
79235 |
-
className: "fas fa-check saved-icon"
|
79236 |
-
});
|
79237 |
-
};
|
79238 |
-
|
79239 |
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Chip_Chip, {
|
79240 |
-
variant: "outlined",
|
79241 |
-
color: "secondary",
|
79242 |
-
label: label(),
|
79243 |
-
classes: {
|
79244 |
-
root: updating === "failed" || SavingDialog_typeof(updating) === "object" ? classes.failed : classes["default"]
|
79245 |
-
},
|
79246 |
-
icon: icon(),
|
79247 |
-
style: SavingDialog_objectSpread({
|
79248 |
-
position: "absolute",
|
79249 |
-
top: "60px",
|
79250 |
-
right: "10px",
|
79251 |
-
transition: updating ? "250ms ease-in-out" : "2s ease-in-out",
|
79252 |
-
zIndex: 1,
|
79253 |
-
opacity: updating ? 1 : 0,
|
79254 |
-
minWidth: "92px",
|
79255 |
-
visibility: updating ? "visible" : "hidden"
|
79256 |
-
}, style),
|
79257 |
-
className: (0,clsx_m/* default */.Z)("saving-dialog", updating && "show")
|
79258 |
-
}), /*#__PURE__*/react.createElement(ConfirmDialog, {
|
79259 |
-
title: "".concat(updating.status, ": ").concat(updating.statusText),
|
79260 |
-
open: openDialog,
|
79261 |
-
maxWidth: "sm",
|
79262 |
-
className: "warning",
|
79263 |
-
buttons: [{
|
79264 |
-
value: "confirm",
|
79265 |
-
text: translate_translate("modal.ok"),
|
79266 |
-
variant: "contained"
|
79267 |
-
}],
|
79268 |
-
onClose: function onClose() {
|
79269 |
-
setOpenDialog(false);
|
79270 |
-
}
|
79271 |
-
}, SavingDialog_typeof(updating) === "object" ? updating.message : translate_translate("modal.lost")));
|
79272 |
-
}
|
79273 |
-
|
79274 |
-
/* harmony default export */ var SavingDialog_SavingDialog = (connect(function (store) {
|
79275 |
-
return {
|
79276 |
-
isUpdating: store.saving.isUpdating
|
79277 |
-
};
|
79278 |
-
})(SavingDialog));
|
79279 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Bar/Bar.js
|
79280 |
|
79281 |
|
@@ -79368,7 +81359,7 @@ function Bar(_ref) {
|
|
79368 |
className: "footer-button-group device-preview"
|
79369 |
}, /*#__PURE__*/react.createElement(DevicePreview, null)), /*#__PURE__*/react.createElement("div", {
|
79370 |
className: "footer-button-group save-group"
|
79371 |
-
}, /*#__PURE__*/react.createElement(EventsButton, null), /*#__PURE__*/react.createElement(RevertButton_RevertButton, null), /*#__PURE__*/react.createElement(PublishButton_PublishButton, null)))));
|
79372 |
}
|
79373 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Loader/Loader.js
|
79374 |
|
@@ -79770,6 +81761,7 @@ function MenuDrawer_defineProperty(obj, key, value) { if (key in obj) { Object.d
|
|
79770 |
|
79771 |
|
79772 |
|
|
|
79773 |
var MenuDrawer_useStyles = styles_makeStyles(function () {
|
79774 |
return MenuDrawer_defineProperty({
|
79775 |
hideButton: {
|
@@ -79788,7 +81780,8 @@ var MenuDrawer_useStyles = styles_makeStyles(function () {
|
|
79788 |
});
|
79789 |
function MenuDrawer(_ref2) {
|
79790 |
var onClose = _ref2.onClose,
|
79791 |
-
open = _ref2.open
|
|
|
79792 |
|
79793 |
var _useState = (0,react.useState)("menu_settings"),
|
79794 |
_useState2 = MenuDrawer_slicedToArray(_useState, 2),
|
@@ -79885,7 +81878,12 @@ function MenuDrawer(_ref2) {
|
|
79885 |
return openDrawer(drawers.SETTINGS, drawers.SETTINGS_PAGES.reset);
|
79886 |
},
|
79887 |
dataTestid: "menuitem:".concat(drawers.SETTINGS_PAGES.reset)
|
79888 |
-
}), /*#__PURE__*/react.createElement(
|
|
|
|
|
|
|
|
|
|
|
79889 |
title: translate_translate("settings_window.buttonizer_tour.title"),
|
79890 |
description: translate_translate("settings_window.buttonizer_tour.description"),
|
79891 |
onClick: function onClick() {
|
@@ -79893,7 +81891,7 @@ function MenuDrawer(_ref2) {
|
|
79893 |
},
|
79894 |
dataTestid: "menuitem:".concat(drawers.BUTTONIZER_TOUR),
|
79895 |
className: "menu-item buttonizer-tour"
|
79896 |
-
})), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
79897 |
title: "".concat(translate_translate("page_rules.name"), " & ").concat(translate_translate("time_schedules.name")),
|
79898 |
opened: openedGroup === "pageRules",
|
79899 |
onSetIsOpened: function onSetIsOpened(val) {
|
@@ -80394,11 +82392,14 @@ function Analytics(_ref) {
|
|
80394 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Drawers/DrawerSplitter/DrawerSplitterContentTitle/DrawerSplitterContentTitle.js
|
80395 |
|
80396 |
|
|
|
80397 |
function DrawerSplitterContentTitle(_ref) {
|
80398 |
var _ref$title = _ref.title,
|
80399 |
-
title = _ref$title === void 0 ? "" : _ref$title
|
|
|
|
|
80400 |
return /*#__PURE__*/react.createElement("div", {
|
80401 |
-
className: "drawer-splitter-content-title"
|
80402 |
}, title);
|
80403 |
}
|
80404 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Drawers/SettingsDialog/SettingsPages/Reset.js
|
@@ -81365,7 +83366,8 @@ function ButtonizerTourOptions(_ref) {
|
|
81365 |
|
81366 |
function Drawers(_ref) {
|
81367 |
var _ref$loaded = _ref.loaded,
|
81368 |
-
loaded = _ref$loaded === void 0 ? false : _ref$loaded
|
|
|
81369 |
var match = useRouteMatch({
|
81370 |
path: "(.*)/(".concat(Object.values(drawers).filter(function (drawer) {
|
81371 |
return typeof drawer == "string";
|
@@ -81378,6 +83380,7 @@ function Drawers(_ref) {
|
|
81378 |
};
|
81379 |
|
81380 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MenuDrawer, {
|
|
|
81381 |
open: loaded && match !== null && match.params[1] === drawers.MENU,
|
81382 |
page: match !== null && match.params[1] === drawers.MENU && match.params.page !== null && match.params.page,
|
81383 |
onClose: function onClose() {
|
@@ -82680,6 +84683,7 @@ function UrlBar_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
82680 |
|
82681 |
|
82682 |
|
|
|
82683 |
function UrlBar(_ref) {
|
82684 |
var _ref$loading = _ref.loading,
|
82685 |
loading = _ref$loading === void 0 ? true : _ref$loading;
|
@@ -82773,17 +84777,32 @@ function UrlBar(_ref) {
|
|
82773 |
}
|
82774 |
}
|
82775 |
})), /*#__PURE__*/react.createElement(Grid_Grid, {
|
|
|
|
|
|
|
|
|
|
|
82776 |
item: true
|
82777 |
}, /*#__PURE__*/react.createElement(ButtonGroup_ButtonGroup, {
|
82778 |
-
variant: "contained",
|
82779 |
ref: buttonRef,
|
82780 |
"aria-label": "split button"
|
82781 |
}, /*#__PURE__*/react.createElement(esm_Button_Button, {
|
|
|
82782 |
onClick: function onClick() {
|
82783 |
return handlePageChange();
|
82784 |
},
|
|
|
82785 |
color: "primary"
|
82786 |
-
}, "Preview")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82787 |
}
|
82788 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/AdminNotifications/style.module.scss
|
82789 |
// extracted by mini-css-extract-plugin
|
@@ -82987,6 +85006,7 @@ function App_getPrototypeOf(o) { App_getPrototypeOf = Object.setPrototypeOf ? Ob
|
|
82987 |
|
82988 |
|
82989 |
|
|
|
82990 |
|
82991 |
|
82992 |
|
@@ -83011,6 +85031,7 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
83011 |
|
83012 |
_this.frameUrl = props.frameUrl;
|
83013 |
_this.loading = props.loading;
|
|
|
83014 |
_this.state = {
|
83015 |
hasError: false,
|
83016 |
error: "",
|
@@ -83126,7 +85147,8 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
83126 |
slowWebsite: this.props.loading.loadingSlowWebsite,
|
83127 |
show: this.props.loading.showLoading
|
83128 |
}), /*#__PURE__*/react.createElement(Drawers, {
|
83129 |
-
loaded: this.props.loading.loaded
|
|
|
83130 |
}), /*#__PURE__*/react.createElement(Bar, {
|
83131 |
loading: !this.props.loading.loaded,
|
83132 |
isLoadingSite: this.props.loading.showLoading
|
@@ -83358,7 +85380,10 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
83358 |
_premium: store.misc._premium,
|
83359 |
isPremiumCode: store.misc._premiumCode,
|
83360 |
hasChanges: store.misc.hasChanges,
|
83361 |
-
welcome: store.settings.welcome
|
|
|
|
|
|
|
83362 |
};
|
83363 |
}, {
|
83364 |
addRecord: dataActions_addRecord,
|
@@ -83367,9 +85392,29 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
83367 |
changeHasChanges: changeHasChanges,
|
83368 |
stopLoading: stopLoading
|
83369 |
})(App_App));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83370 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/sdk.js
|
83371 |
|
83372 |
|
|
|
83373 |
/**
|
83374 |
* Internal function to create a new SDK client instance. The client is
|
83375 |
* installed and then bound to the current scope.
|
@@ -83379,13 +85424,28 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
83379 |
*/
|
83380 |
function initAndBind(clientClass, options) {
|
83381 |
if (options.debug === true) {
|
83382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83383 |
}
|
83384 |
-
var hub = hub_getCurrentHub();
|
83385 |
var client = new clientClass(options);
|
83386 |
hub.bindClient(client);
|
83387 |
}
|
83388 |
//# sourceMappingURL=sdk.js.map
|
|
|
|
|
|
|
|
|
83389 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integrations/inboundfilters.js
|
83390 |
|
83391 |
|
@@ -83406,143 +85466,149 @@ var InboundFilters = /** @class */ (function () {
|
|
83406 |
/**
|
83407 |
* @inheritDoc
|
83408 |
*/
|
83409 |
-
InboundFilters.prototype.setupOnce = function () {
|
83410 |
addGlobalEventProcessor(function (event) {
|
83411 |
-
var hub =
|
83412 |
-
if (
|
83413 |
-
|
83414 |
-
|
83415 |
-
|
83416 |
-
|
83417 |
-
|
83418 |
-
|
83419 |
-
var options = self._mergeOptions(clientOptions);
|
83420 |
-
if (self._shouldDropEvent(event, options)) {
|
83421 |
-
return null;
|
83422 |
}
|
83423 |
}
|
83424 |
return event;
|
83425 |
});
|
83426 |
};
|
83427 |
-
/**
|
83428 |
-
|
83429 |
-
|
83430 |
-
|
83431 |
-
|
83432 |
-
|
83433 |
-
|
83434 |
-
|
83435 |
-
|
83436 |
-
|
83437 |
-
|
83438 |
-
|
83439 |
-
|
83440 |
-
|
83441 |
-
|
83442 |
-
|
83443 |
-
return true;
|
83444 |
-
}
|
83445 |
-
return false;
|
83446 |
-
};
|
83447 |
-
/** JSDoc */
|
83448 |
-
InboundFilters.prototype._isSentryError = function (event, options) {
|
83449 |
-
if (!options.ignoreInternal) {
|
83450 |
-
return false;
|
83451 |
-
}
|
83452 |
-
try {
|
83453 |
-
return ((event &&
|
83454 |
-
event.exception &&
|
83455 |
-
event.exception.values &&
|
83456 |
-
event.exception.values[0] &&
|
83457 |
-
event.exception.values[0].type === 'SentryError') ||
|
83458 |
-
false);
|
83459 |
-
}
|
83460 |
-
catch (_oO) {
|
83461 |
-
return false;
|
83462 |
-
}
|
83463 |
-
};
|
83464 |
-
/** JSDoc */
|
83465 |
-
InboundFilters.prototype._isIgnoredError = function (event, options) {
|
83466 |
-
if (!options.ignoreErrors || !options.ignoreErrors.length) {
|
83467 |
-
return false;
|
83468 |
-
}
|
83469 |
-
return this._getPossibleEventMessages(event).some(function (message) {
|
83470 |
-
// Not sure why TypeScript complains here...
|
83471 |
-
return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });
|
83472 |
-
});
|
83473 |
-
};
|
83474 |
-
/** JSDoc */
|
83475 |
-
InboundFilters.prototype._isDeniedUrl = function (event, options) {
|
83476 |
-
// TODO: Use Glob instead?
|
83477 |
-
if (!options.denyUrls || !options.denyUrls.length) {
|
83478 |
-
return false;
|
83479 |
-
}
|
83480 |
-
var url = this._getEventFilterUrl(event);
|
83481 |
-
return !url ? false : options.denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });
|
83482 |
-
};
|
83483 |
-
/** JSDoc */
|
83484 |
-
InboundFilters.prototype._isAllowedUrl = function (event, options) {
|
83485 |
-
// TODO: Use Glob instead?
|
83486 |
-
if (!options.allowUrls || !options.allowUrls.length) {
|
83487 |
-
return true;
|
83488 |
-
}
|
83489 |
-
var url = this._getEventFilterUrl(event);
|
83490 |
-
return !url ? true : options.allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });
|
83491 |
-
};
|
83492 |
-
/** JSDoc */
|
83493 |
-
InboundFilters.prototype._mergeOptions = function (clientOptions) {
|
83494 |
-
if (clientOptions === void 0) { clientOptions = {}; }
|
83495 |
-
return {
|
83496 |
-
allowUrls: tslib_es6_spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),
|
83497 |
-
denyUrls: tslib_es6_spread((this._options.blacklistUrls || []), (this._options.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),
|
83498 |
-
ignoreErrors: tslib_es6_spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),
|
83499 |
-
ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,
|
83500 |
-
};
|
83501 |
};
|
83502 |
-
|
83503 |
-
|
83504 |
-
|
83505 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83506 |
}
|
83507 |
-
|
83508 |
-
|
83509 |
-
|
83510 |
-
return ["" + value, type + ": " + value];
|
83511 |
-
}
|
83512 |
-
catch (oO) {
|
83513 |
-
logger.error("Cannot extract message for event " + (0,misc/* getEventDescription */.jH)(event));
|
83514 |
-
return [];
|
83515 |
-
}
|
83516 |
}
|
83517 |
-
|
83518 |
-
|
83519 |
-
|
83520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83521 |
try {
|
83522 |
-
if
|
83523 |
-
|
83524 |
-
return (frames_1 && frames_1[frames_1.length - 1].filename) || null;
|
83525 |
-
}
|
83526 |
-
if (event.exception) {
|
83527 |
-
var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;
|
83528 |
-
return (frames_2 && frames_2[frames_2.length - 1].filename) || null;
|
83529 |
-
}
|
83530 |
-
return null;
|
83531 |
}
|
83532 |
-
catch (
|
83533 |
-
|
83534 |
-
return null;
|
83535 |
}
|
83536 |
-
|
83537 |
-
|
83538 |
-
|
83539 |
-
|
83540 |
-
|
83541 |
-
|
83542 |
-
}
|
83543 |
-
|
83544 |
//# sourceMappingURL=inboundfilters.js.map
|
|
|
|
|
83545 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integrations/functiontostring.js
|
|
|
83546 |
var originalFunctionToString;
|
83547 |
/** Patch toString calls to return proper name for wrapped functions */
|
83548 |
var FunctionToString = /** @class */ (function () {
|
@@ -83564,7 +85630,7 @@ var FunctionToString = /** @class */ (function () {
|
|
83564 |
for (var _i = 0; _i < arguments.length; _i++) {
|
83565 |
args[_i] = arguments[_i];
|
83566 |
}
|
83567 |
-
var context = this
|
83568 |
return originalFunctionToString.apply(context, args);
|
83569 |
};
|
83570 |
};
|
@@ -83576,6 +85642,15 @@ var FunctionToString = /** @class */ (function () {
|
|
83576 |
}());
|
83577 |
|
83578 |
//# sourceMappingURL=functiontostring.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83579 |
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/polyfill.js
|
83580 |
var polyfill_setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
|
83581 |
/**
|
@@ -83593,8 +85668,7 @@ function setProtoOf(obj, proto) {
|
|
83593 |
// eslint-disable-next-line @typescript-eslint/ban-types
|
83594 |
function mixinProperties(obj, proto) {
|
83595 |
for (var prop in proto) {
|
83596 |
-
|
83597 |
-
if (!obj.hasOwnProperty(prop)) {
|
83598 |
// @ts-ignore typescript complains about indexing so we remove
|
83599 |
obj[prop] = proto[prop];
|
83600 |
}
|
@@ -83607,7 +85681,7 @@ function mixinProperties(obj, proto) {
|
|
83607 |
|
83608 |
/** An error emitted by Sentry SDKs and related utilities. */
|
83609 |
var SentryError = /** @class */ (function (_super) {
|
83610 |
-
__extends(SentryError, _super);
|
83611 |
function SentryError(message) {
|
83612 |
var _newTarget = this.constructor;
|
83613 |
var _this = _super.call(this, message) || this;
|
@@ -83620,135 +85694,382 @@ var SentryError = /** @class */ (function (_super) {
|
|
83620 |
}(Error));
|
83621 |
|
83622 |
//# sourceMappingURL=error.js.map
|
|
|
|
|
83623 |
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/dsn.js
|
83624 |
|
83625 |
|
|
|
83626 |
/** Regular expression used to parse a Dsn. */
|
83627 |
var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
83628 |
-
|
83629 |
-
|
83630 |
-
|
83631 |
-
|
83632 |
-
|
83633 |
-
|
83634 |
-
|
83635 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83636 |
}
|
83637 |
-
|
83638 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83639 |
}
|
83640 |
-
|
|
|
|
|
83641 |
}
|
83642 |
-
|
83643 |
-
|
83644 |
-
|
83645 |
-
|
83646 |
-
|
83647 |
-
|
83648 |
-
|
83649 |
-
|
83650 |
-
|
83651 |
-
|
83652 |
-
|
83653 |
-
|
83654 |
-
|
83655 |
-
|
83656 |
-
|
83657 |
-
|
83658 |
-
|
83659 |
-
|
83660 |
-
|
83661 |
-
|
83662 |
-
|
83663 |
-
|
83664 |
-
|
83665 |
-
|
83666 |
-
|
83667 |
-
|
83668 |
-
|
83669 |
-
|
83670 |
-
|
83671 |
-
|
83672 |
-
|
83673 |
-
|
83674 |
-
|
|
|
83675 |
}
|
|
|
|
|
83676 |
}
|
83677 |
-
|
83678 |
-
|
83679 |
-
|
83680 |
-
|
83681 |
-
|
83682 |
-
this.user = components.user;
|
83683 |
-
this.pass = components.pass || '';
|
83684 |
-
this.host = components.host;
|
83685 |
-
this.port = components.port || '';
|
83686 |
-
this.path = components.path || '';
|
83687 |
-
this.projectId = components.projectId;
|
83688 |
-
};
|
83689 |
-
/** Validates this Dsn and throws on error. */
|
83690 |
-
Dsn.prototype._validate = function () {
|
83691 |
-
var _this = this;
|
83692 |
-
['protocol', 'user', 'host', 'projectId'].forEach(function (component) {
|
83693 |
-
if (!_this[component]) {
|
83694 |
-
throw new SentryError(ERROR_MESSAGE + ": " + component + " missing");
|
83695 |
}
|
83696 |
-
});
|
83697 |
-
if (!this.projectId.match(/^\d+$/)) {
|
83698 |
-
throw new SentryError(ERROR_MESSAGE + ": Invalid projectId " + this.projectId);
|
83699 |
}
|
83700 |
-
|
83701 |
-
|
|
|
|
|
|
|
|
|
83702 |
}
|
83703 |
-
|
83704 |
-
|
|
|
|
|
|
|
|
|
|
|
83705 |
}
|
83706 |
-
}
|
83707 |
-
return
|
83708 |
-
}
|
|
|
|
|
|
|
|
|
83709 |
|
83710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83711 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integration.js
|
83712 |
|
83713 |
|
83714 |
|
|
|
83715 |
var installedIntegrations = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83716 |
/** Gets integration to install */
|
83717 |
function getIntegrationsToSetup(options) {
|
83718 |
-
var defaultIntegrations = (options.defaultIntegrations &&
|
83719 |
var userIntegrations = options.integrations;
|
83720 |
-
var integrations =
|
83721 |
if (Array.isArray(userIntegrations)) {
|
83722 |
-
|
83723 |
-
|
83724 |
-
|
83725 |
-
|
83726 |
-
if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&
|
83727 |
-
pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {
|
83728 |
-
integrations.push(defaultIntegration);
|
83729 |
-
pickedIntegrationsNames_1.push(defaultIntegration.name);
|
83730 |
-
}
|
83731 |
-
});
|
83732 |
-
// Don't add same user integration twice
|
83733 |
-
userIntegrations.forEach(function (userIntegration) {
|
83734 |
-
if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {
|
83735 |
-
integrations.push(userIntegration);
|
83736 |
-
pickedIntegrationsNames_1.push(userIntegration.name);
|
83737 |
-
}
|
83738 |
-
});
|
83739 |
}
|
83740 |
else if (typeof userIntegrations === 'function') {
|
83741 |
-
integrations = userIntegrations(
|
83742 |
integrations = Array.isArray(integrations) ? integrations : [integrations];
|
83743 |
}
|
83744 |
-
else {
|
83745 |
-
integrations = tslib_es6_spread(defaultIntegrations);
|
83746 |
-
}
|
83747 |
// Make sure that if present, `Debug` integration will always run last
|
83748 |
var integrationsNames = integrations.map(function (i) { return i.name; });
|
83749 |
var alwaysLastToRun = 'Debug';
|
83750 |
if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
|
83751 |
-
integrations.push.apply(integrations,
|
83752 |
}
|
83753 |
return integrations;
|
83754 |
}
|
@@ -83757,9 +86078,9 @@ function setupIntegration(integration) {
|
|
83757 |
if (installedIntegrations.indexOf(integration.name) !== -1) {
|
83758 |
return;
|
83759 |
}
|
83760 |
-
integration.setupOnce(addGlobalEventProcessor,
|
83761 |
installedIntegrations.push(integration.name);
|
83762 |
-
logger.log("Integration installed: " + integration.name);
|
83763 |
}
|
83764 |
/**
|
83765 |
* Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
|
@@ -83773,6 +86094,10 @@ function setupIntegrations(options) {
|
|
83773 |
integrations[integration.name] = integration;
|
83774 |
setupIntegration(integration);
|
83775 |
});
|
|
|
|
|
|
|
|
|
83776 |
return integrations;
|
83777 |
}
|
83778 |
//# sourceMappingURL=integration.js.map
|
@@ -83783,6 +86108,7 @@ function setupIntegrations(options) {
|
|
83783 |
|
83784 |
|
83785 |
|
|
|
83786 |
/**
|
83787 |
* Base implementation for all JavaScript SDK clients.
|
83788 |
*
|
@@ -83797,7 +86123,7 @@ function setupIntegrations(options) {
|
|
83797 |
* without a valid Dsn, the SDK will not send any events to Sentry.
|
83798 |
*
|
83799 |
* Before sending an event via the backend, it is passed through
|
83800 |
-
* {@link BaseClient.
|
83801 |
* (breadcrumbs and context). To add more custom information, override this
|
83802 |
* method and extend the resulting prepared event.
|
83803 |
*
|
@@ -83825,12 +86151,12 @@ var BaseClient = /** @class */ (function () {
|
|
83825 |
function BaseClient(backendClass, options) {
|
83826 |
/** Array of used integrations. */
|
83827 |
this._integrations = {};
|
83828 |
-
/** Number of
|
83829 |
-
this.
|
83830 |
this._backend = new backendClass(options);
|
83831 |
this._options = options;
|
83832 |
if (options.dsn) {
|
83833 |
-
this._dsn =
|
83834 |
}
|
83835 |
}
|
83836 |
/**
|
@@ -83839,6 +86165,11 @@ var BaseClient = /** @class */ (function () {
|
|
83839 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
83840 |
BaseClient.prototype.captureException = function (exception, hint, scope) {
|
83841 |
var _this = this;
|
|
|
|
|
|
|
|
|
|
|
83842 |
var eventId = hint && hint.event_id;
|
83843 |
this._process(this._getBackend()
|
83844 |
.eventFromException(exception, hint)
|
@@ -83854,7 +86185,7 @@ var BaseClient = /** @class */ (function () {
|
|
83854 |
BaseClient.prototype.captureMessage = function (message, level, hint, scope) {
|
83855 |
var _this = this;
|
83856 |
var eventId = hint && hint.event_id;
|
83857 |
-
var promisedEvent = isPrimitive(message)
|
83858 |
? this._getBackend().eventFromMessage(String(message), level, hint)
|
83859 |
: this._getBackend().eventFromException(message, hint);
|
83860 |
this._process(promisedEvent
|
@@ -83868,6 +86199,11 @@ var BaseClient = /** @class */ (function () {
|
|
83868 |
* @inheritDoc
|
83869 |
*/
|
83870 |
BaseClient.prototype.captureEvent = function (event, hint, scope) {
|
|
|
|
|
|
|
|
|
|
|
83871 |
var eventId = hint && hint.event_id;
|
83872 |
this._process(this._captureEvent(event, hint, scope).then(function (result) {
|
83873 |
eventId = result;
|
@@ -83878,11 +86214,17 @@ var BaseClient = /** @class */ (function () {
|
|
83878 |
* @inheritDoc
|
83879 |
*/
|
83880 |
BaseClient.prototype.captureSession = function (session) {
|
83881 |
-
if (!
|
83882 |
-
logger.warn('
|
|
|
|
|
|
|
|
|
83883 |
}
|
83884 |
else {
|
83885 |
this._sendSession(session);
|
|
|
|
|
83886 |
}
|
83887 |
};
|
83888 |
/**
|
@@ -83897,16 +86239,21 @@ var BaseClient = /** @class */ (function () {
|
|
83897 |
BaseClient.prototype.getOptions = function () {
|
83898 |
return this._options;
|
83899 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
83900 |
/**
|
83901 |
* @inheritDoc
|
83902 |
*/
|
83903 |
BaseClient.prototype.flush = function (timeout) {
|
83904 |
var _this = this;
|
83905 |
-
return this.
|
83906 |
-
return _this.
|
83907 |
-
.getTransport()
|
83908 |
.close(timeout)
|
83909 |
-
.then(function (transportFlushed) { return
|
83910 |
});
|
83911 |
};
|
83912 |
/**
|
@@ -83923,7 +86270,7 @@ var BaseClient = /** @class */ (function () {
|
|
83923 |
* Sets up the integrations
|
83924 |
*/
|
83925 |
BaseClient.prototype.setupIntegrations = function () {
|
83926 |
-
if (this._isEnabled()) {
|
83927 |
this._integrations = setupIntegrations(this._options);
|
83928 |
}
|
83929 |
};
|
@@ -83935,7 +86282,7 @@ var BaseClient = /** @class */ (function () {
|
|
83935 |
return this._integrations[integration.id] || null;
|
83936 |
}
|
83937 |
catch (_oO) {
|
83938 |
-
logger.warn("Cannot retrieve integration " + integration.id + " from the current Client");
|
83939 |
return null;
|
83940 |
}
|
83941 |
};
|
@@ -83944,12 +86291,11 @@ var BaseClient = /** @class */ (function () {
|
|
83944 |
var e_1, _a;
|
83945 |
var crashed = false;
|
83946 |
var errored = false;
|
83947 |
-
var userAgent;
|
83948 |
var exceptions = event.exception && event.exception.values;
|
83949 |
if (exceptions) {
|
83950 |
errored = true;
|
83951 |
try {
|
83952 |
-
for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {
|
83953 |
var ex = exceptions_1_1.value;
|
83954 |
var mechanism = ex.mechanism;
|
83955 |
if (mechanism && mechanism.handled === false) {
|
@@ -83966,31 +86312,37 @@ var BaseClient = /** @class */ (function () {
|
|
83966 |
finally { if (e_1) throw e_1.error; }
|
83967 |
}
|
83968 |
}
|
83969 |
-
|
83970 |
-
|
83971 |
-
|
83972 |
-
|
83973 |
-
|
83974 |
-
|
83975 |
-
|
83976 |
-
|
83977 |
-
}
|
83978 |
}
|
83979 |
-
session.update(tslib_es6_assign(tslib_es6_assign({}, (crashed && { status: SessionStatus.Crashed })), { user: user,
|
83980 |
-
userAgent: userAgent, errors: session.errors + Number(errored || crashed) }));
|
83981 |
};
|
83982 |
/** Deliver captured session to Sentry */
|
83983 |
BaseClient.prototype._sendSession = function (session) {
|
83984 |
this._getBackend().sendSession(session);
|
83985 |
};
|
83986 |
-
/**
|
83987 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83988 |
var _this = this;
|
83989 |
-
return new
|
83990 |
var ticked = 0;
|
83991 |
var tick = 1;
|
83992 |
var interval = setInterval(function () {
|
83993 |
-
if (_this.
|
83994 |
clearInterval(interval);
|
83995 |
resolve(true);
|
83996 |
}
|
@@ -84028,18 +86380,18 @@ var BaseClient = /** @class */ (function () {
|
|
84028 |
*/
|
84029 |
BaseClient.prototype._prepareEvent = function (event, scope, hint) {
|
84030 |
var _this = this;
|
84031 |
-
var _a = this.getOptions().normalizeDepth, normalizeDepth =
|
84032 |
-
var prepared =
|
84033 |
this._applyClientOptions(prepared);
|
84034 |
this._applyIntegrationsMetadata(prepared);
|
84035 |
// If we have scope given to us, use it as the base for further modifications.
|
84036 |
// This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
|
84037 |
var finalScope = scope;
|
84038 |
if (hint && hint.captureContext) {
|
84039 |
-
finalScope = Scope.clone(finalScope).update(hint.captureContext);
|
84040 |
}
|
84041 |
// We prepare the result here with a resolved Event.
|
84042 |
-
var result =
|
84043 |
// This should be the last thing called, since we want that
|
84044 |
// {@link Hub.addEventProcessor} gets the finished prepared event.
|
84045 |
if (finalScope) {
|
@@ -84047,8 +86399,13 @@ var BaseClient = /** @class */ (function () {
|
|
84047 |
result = finalScope.applyToEvent(prepared, hint);
|
84048 |
}
|
84049 |
return result.then(function (evt) {
|
|
|
|
|
|
|
|
|
|
|
84050 |
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
|
84051 |
-
return _this._normalizeEvent(evt, normalizeDepth);
|
84052 |
}
|
84053 |
return evt;
|
84054 |
});
|
@@ -84063,20 +86420,20 @@ var BaseClient = /** @class */ (function () {
|
|
84063 |
* @param event Event
|
84064 |
* @returns Normalized event
|
84065 |
*/
|
84066 |
-
BaseClient.prototype._normalizeEvent = function (event, depth) {
|
84067 |
if (!event) {
|
84068 |
return null;
|
84069 |
}
|
84070 |
-
var normalized =
|
84071 |
-
breadcrumbs: event.breadcrumbs.map(function (b) { return (
|
84072 |
-
data: normalize(b.data, depth),
|
84073 |
}))); }),
|
84074 |
})), (event.user && {
|
84075 |
-
user: normalize(event.user, depth),
|
84076 |
})), (event.contexts && {
|
84077 |
-
contexts: normalize(event.contexts, depth),
|
84078 |
})), (event.extra && {
|
84079 |
-
extra: normalize(event.extra, depth),
|
84080 |
}));
|
84081 |
// event.contexts.trace stores information about a Transaction. Similarly,
|
84082 |
// event.spans[] stores information about child Spans. Given that a
|
@@ -84089,6 +86446,7 @@ var BaseClient = /** @class */ (function () {
|
|
84089 |
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
84090 |
normalized.contexts.trace = event.contexts.trace;
|
84091 |
}
|
|
|
84092 |
return normalized;
|
84093 |
};
|
84094 |
/**
|
@@ -84110,26 +86468,26 @@ var BaseClient = /** @class */ (function () {
|
|
84110 |
event.dist = dist;
|
84111 |
}
|
84112 |
if (event.message) {
|
84113 |
-
event.message = truncate(event.message, maxValueLength);
|
84114 |
}
|
84115 |
var exception = event.exception && event.exception.values && event.exception.values[0];
|
84116 |
if (exception && exception.value) {
|
84117 |
-
exception.value = truncate(exception.value, maxValueLength);
|
84118 |
}
|
84119 |
var request = event.request;
|
84120 |
if (request && request.url) {
|
84121 |
-
request.url = truncate(request.url, maxValueLength);
|
84122 |
}
|
84123 |
};
|
84124 |
/**
|
84125 |
* This function adds all used integrations to the SDK info in the event.
|
84126 |
-
* @param
|
84127 |
*/
|
84128 |
BaseClient.prototype._applyIntegrationsMetadata = function (event) {
|
84129 |
-
var sdkInfo = event.sdk;
|
84130 |
var integrationsArray = Object.keys(this._integrations);
|
84131 |
-
if (
|
84132 |
-
|
|
|
84133 |
}
|
84134 |
};
|
84135 |
/**
|
@@ -84149,7 +86507,7 @@ var BaseClient = /** @class */ (function () {
|
|
84149 |
return this._processEvent(event, hint, scope).then(function (finalEvent) {
|
84150 |
return finalEvent.event_id;
|
84151 |
}, function (reason) {
|
84152 |
-
logger.error(reason);
|
84153 |
return undefined;
|
84154 |
});
|
84155 |
};
|
@@ -84170,19 +86528,27 @@ var BaseClient = /** @class */ (function () {
|
|
84170 |
var _this = this;
|
84171 |
// eslint-disable-next-line @typescript-eslint/unbound-method
|
84172 |
var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;
|
|
|
|
|
|
|
|
|
|
|
|
|
84173 |
if (!this._isEnabled()) {
|
84174 |
-
return
|
84175 |
}
|
84176 |
var isTransaction = event.type === 'transaction';
|
84177 |
// 1.0 === 100% events are sent
|
84178 |
// 0.0 === 0% events are sent
|
84179 |
// Sampling for transaction happens somewhere else
|
84180 |
if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
|
84181 |
-
|
|
|
84182 |
}
|
84183 |
return this._prepareEvent(event, scope, hint)
|
84184 |
.then(function (prepared) {
|
84185 |
if (prepared === null) {
|
|
|
84186 |
throw new SentryError('An event processor returned null, will not send event.');
|
84187 |
}
|
84188 |
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
|
@@ -84190,18 +86556,11 @@ var BaseClient = /** @class */ (function () {
|
|
84190 |
return prepared;
|
84191 |
}
|
84192 |
var beforeSendResult = beforeSend(prepared, hint);
|
84193 |
-
|
84194 |
-
throw new SentryError('`beforeSend` method has to return `null` or a valid event.');
|
84195 |
-
}
|
84196 |
-
else if (isThenable(beforeSendResult)) {
|
84197 |
-
return beforeSendResult.then(function (event) { return event; }, function (e) {
|
84198 |
-
throw new SentryError("beforeSend rejected with " + e);
|
84199 |
-
});
|
84200 |
-
}
|
84201 |
-
return beforeSendResult;
|
84202 |
})
|
84203 |
.then(function (processedEvent) {
|
84204 |
if (processedEvent === null) {
|
|
|
84205 |
throw new SentryError('`beforeSend` returned `null`, will not send event.');
|
84206 |
}
|
84207 |
var session = scope && scope.getSession && scope.getSession();
|
@@ -84229,609 +86588,707 @@ var BaseClient = /** @class */ (function () {
|
|
84229 |
*/
|
84230 |
BaseClient.prototype._process = function (promise) {
|
84231 |
var _this = this;
|
84232 |
-
this.
|
84233 |
-
promise.then(function (value) {
|
84234 |
-
_this.
|
84235 |
return value;
|
84236 |
}, function (reason) {
|
84237 |
-
_this.
|
84238 |
return reason;
|
84239 |
});
|
84240 |
};
|
84241 |
return BaseClient;
|
84242 |
}());
|
84243 |
|
84244 |
-
|
84245 |
-
|
84246 |
-
|
84247 |
-
|
84248 |
-
var
|
84249 |
-
(
|
84250 |
-
|
84251 |
-
|
84252 |
-
|
84253 |
-
|
84254 |
-
|
84255 |
-
|
84256 |
-
|
84257 |
-
|
84258 |
-
/** The event could not be processed. */
|
84259 |
-
Status["Invalid"] = "invalid";
|
84260 |
-
/** A server-side error ocurred during submission. */
|
84261 |
-
Status["Failed"] = "failed";
|
84262 |
-
})(Status || (Status = {}));
|
84263 |
-
// eslint-disable-next-line @typescript-eslint/no-namespace, import/export
|
84264 |
-
(function (Status) {
|
84265 |
-
/**
|
84266 |
-
* Converts a HTTP status code into a {@link Status}.
|
84267 |
-
*
|
84268 |
-
* @param code The HTTP response status code.
|
84269 |
-
* @returns The send status or {@link Status.Unknown}.
|
84270 |
-
*/
|
84271 |
-
function fromHttpCode(code) {
|
84272 |
-
if (code >= 200 && code < 300) {
|
84273 |
-
return Status.Success;
|
84274 |
-
}
|
84275 |
-
if (code === 429) {
|
84276 |
-
return Status.RateLimit;
|
84277 |
-
}
|
84278 |
-
if (code >= 400 && code < 500) {
|
84279 |
-
return Status.Invalid;
|
84280 |
-
}
|
84281 |
-
if (code >= 500) {
|
84282 |
-
return Status.Failed;
|
84283 |
-
}
|
84284 |
-
return Status.Unknown;
|
84285 |
}
|
84286 |
-
|
84287 |
-
|
84288 |
-
//# sourceMappingURL=status.js.map
|
84289 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/transports/noop.js
|
84290 |
-
|
84291 |
-
|
84292 |
-
/** Noop transport */
|
84293 |
-
var NoopTransport = /** @class */ (function () {
|
84294 |
-
function NoopTransport() {
|
84295 |
}
|
84296 |
-
|
84297 |
-
|
84298 |
-
|
84299 |
-
|
84300 |
-
return syncpromise_SyncPromise.resolve({
|
84301 |
-
reason: "NoopTransport: Event has been skipped because no Dsn is configured.",
|
84302 |
-
status: Status.Skipped,
|
84303 |
-
});
|
84304 |
-
};
|
84305 |
-
/**
|
84306 |
-
* @inheritDoc
|
84307 |
-
*/
|
84308 |
-
NoopTransport.prototype.close = function (_) {
|
84309 |
-
return syncpromise_SyncPromise.resolve(true);
|
84310 |
-
};
|
84311 |
-
return NoopTransport;
|
84312 |
-
}());
|
84313 |
-
|
84314 |
-
//# sourceMappingURL=noop.js.map
|
84315 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/basebackend.js
|
84316 |
-
|
84317 |
|
|
|
84318 |
/**
|
84319 |
-
*
|
84320 |
-
*
|
84321 |
-
|
84322 |
-
|
84323 |
-
|
84324 |
-
|
84325 |
-
|
84326 |
-
|
84327 |
-
|
84328 |
-
}
|
84329 |
-
this.
|
|
|
|
|
|
|
84330 |
}
|
84331 |
-
/**
|
84332 |
-
|
84333 |
-
|
84334 |
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
84335 |
-
BaseBackend.prototype.eventFromException = function (_exception, _hint) {
|
84336 |
-
throw new SentryError('Backend has to implement `eventFromException` method');
|
84337 |
};
|
84338 |
-
/**
|
84339 |
-
|
84340 |
-
|
84341 |
-
BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {
|
84342 |
-
throw new SentryError('Backend has to implement `eventFromMessage` method');
|
84343 |
};
|
84344 |
-
/**
|
84345 |
-
|
84346 |
-
|
84347 |
-
BaseBackend.prototype.sendEvent = function (event) {
|
84348 |
-
this._transport.sendEvent(event).then(null, function (reason) {
|
84349 |
-
logger.error("Error while sending event: " + reason);
|
84350 |
-
});
|
84351 |
};
|
84352 |
-
/**
|
84353 |
-
|
84354 |
-
|
84355 |
-
BaseBackend.prototype.sendSession = function (session) {
|
84356 |
-
if (!this._transport.sendSession) {
|
84357 |
-
logger.warn("Dropping session because custom transport doesn't implement sendSession");
|
84358 |
-
return;
|
84359 |
-
}
|
84360 |
-
this._transport.sendSession(session).then(null, function (reason) {
|
84361 |
-
logger.error("Error while sending session: " + reason);
|
84362 |
-
});
|
84363 |
};
|
84364 |
/**
|
84365 |
-
*
|
|
|
|
|
84366 |
*/
|
84367 |
-
|
84368 |
-
return this.
|
84369 |
};
|
84370 |
/**
|
84371 |
-
*
|
|
|
|
|
84372 |
*/
|
84373 |
-
|
84374 |
-
return
|
84375 |
};
|
84376 |
-
return
|
84377 |
}());
|
84378 |
|
84379 |
-
|
84380 |
-
|
84381 |
-
|
84382 |
-
|
84383 |
-
|
84384 |
-
|
84385 |
-
|
84386 |
-
|
84387 |
-
|
84388 |
-
|
84389 |
-
|
84390 |
-
|
84391 |
-
|
84392 |
-
|
84393 |
-
|
84394 |
-
|
84395 |
-
|
84396 |
-
|
84397 |
-
|
84398 |
-
|
84399 |
-
|
84400 |
-
|
84401 |
-
|
84402 |
-
|
84403 |
-
|
84404 |
-
|
84405 |
-
|
84406 |
-
|
84407 |
-
|
84408 |
-
|
84409 |
-
|
84410 |
-
case 'debug':
|
84411 |
-
return Severity.Debug;
|
84412 |
-
case 'info':
|
84413 |
-
return Severity.Info;
|
84414 |
-
case 'warn':
|
84415 |
-
case 'warning':
|
84416 |
-
return Severity.Warning;
|
84417 |
-
case 'error':
|
84418 |
-
return Severity.Error;
|
84419 |
-
case 'fatal':
|
84420 |
-
return Severity.Fatal;
|
84421 |
-
case 'critical':
|
84422 |
-
return Severity.Critical;
|
84423 |
-
case 'log':
|
84424 |
-
default:
|
84425 |
-
return Severity.Log;
|
84426 |
-
}
|
84427 |
-
}
|
84428 |
-
Severity.fromString = fromString;
|
84429 |
-
})(Severity || (Severity = {}));
|
84430 |
-
//# sourceMappingURL=severity.js.map
|
84431 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/supports.js
|
84432 |
-
|
84433 |
-
|
84434 |
-
/**
|
84435 |
-
* Tells whether current environment supports ErrorEvent objects
|
84436 |
-
* {@link supportsErrorEvent}.
|
84437 |
-
*
|
84438 |
-
* @returns Answer to the given question.
|
84439 |
-
*/
|
84440 |
-
function supportsErrorEvent() {
|
84441 |
-
try {
|
84442 |
-
new ErrorEvent('');
|
84443 |
-
return true;
|
84444 |
-
}
|
84445 |
-
catch (e) {
|
84446 |
-
return false;
|
84447 |
-
}
|
84448 |
}
|
84449 |
/**
|
84450 |
-
*
|
84451 |
-
* {@link supportsDOMError}.
|
84452 |
*
|
84453 |
-
*
|
84454 |
*/
|
84455 |
-
function
|
84456 |
-
|
84457 |
-
|
84458 |
-
|
84459 |
-
|
84460 |
-
|
84461 |
-
return true;
|
84462 |
-
}
|
84463 |
-
catch (e) {
|
84464 |
-
return false;
|
84465 |
-
}
|
84466 |
}
|
84467 |
/**
|
84468 |
-
*
|
84469 |
-
* {@link supportsDOMException}.
|
84470 |
*
|
84471 |
-
*
|
84472 |
*/
|
84473 |
-
function
|
84474 |
-
|
84475 |
-
new DOMException('');
|
84476 |
-
return true;
|
84477 |
-
}
|
84478 |
-
catch (e) {
|
84479 |
-
return false;
|
84480 |
-
}
|
84481 |
}
|
84482 |
/**
|
84483 |
-
*
|
84484 |
-
*
|
84485 |
-
*
|
84486 |
-
* @returns Answer to the given question.
|
84487 |
*/
|
84488 |
-
function
|
84489 |
-
|
84490 |
-
|
84491 |
-
|
84492 |
-
|
84493 |
-
|
84494 |
-
|
84495 |
-
new Response();
|
84496 |
-
return true;
|
84497 |
}
|
84498 |
-
|
84499 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84500 |
}
|
|
|
84501 |
}
|
|
|
|
|
|
|
|
|
84502 |
/**
|
84503 |
-
*
|
|
|
|
|
84504 |
*/
|
84505 |
-
|
84506 |
-
|
84507 |
-
return
|
84508 |
}
|
84509 |
/**
|
84510 |
-
*
|
84511 |
-
*
|
84512 |
-
*
|
84513 |
-
* @returns true if `window.fetch` is natively implemented, false otherwise
|
84514 |
*/
|
84515 |
-
function
|
84516 |
-
|
84517 |
-
|
84518 |
-
}
|
84519 |
-
var global = (0,misc/* getGlobalObject */.Rf)();
|
84520 |
-
// Fast path to avoid DOM I/O
|
84521 |
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
84522 |
-
if (isNativeFetch(global.fetch)) {
|
84523 |
-
return true;
|
84524 |
-
}
|
84525 |
-
// window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
|
84526 |
-
// so create a "pure" iframe to see if that has native fetch
|
84527 |
-
var result = false;
|
84528 |
-
var doc = global.document;
|
84529 |
-
// eslint-disable-next-line deprecation/deprecation
|
84530 |
-
if (doc && typeof doc.createElement === "function") {
|
84531 |
-
try {
|
84532 |
-
var sandbox = doc.createElement('iframe');
|
84533 |
-
sandbox.hidden = true;
|
84534 |
-
doc.head.appendChild(sandbox);
|
84535 |
-
if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
|
84536 |
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
84537 |
-
result = isNativeFetch(sandbox.contentWindow.fetch);
|
84538 |
-
}
|
84539 |
-
doc.head.removeChild(sandbox);
|
84540 |
-
}
|
84541 |
-
catch (err) {
|
84542 |
-
logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
|
84543 |
-
}
|
84544 |
-
}
|
84545 |
-
return result;
|
84546 |
}
|
84547 |
/**
|
84548 |
-
*
|
84549 |
-
* {@link supportsReportingObserver}.
|
84550 |
-
*
|
84551 |
-
* @returns Answer to the given question.
|
84552 |
*/
|
84553 |
-
function
|
84554 |
-
|
|
|
84555 |
}
|
84556 |
/**
|
84557 |
-
*
|
84558 |
-
* {@link supportsReferrerPolicy}.
|
84559 |
-
*
|
84560 |
-
* @returns Answer to the given question.
|
84561 |
*/
|
84562 |
-
function
|
84563 |
-
|
84564 |
-
|
84565 |
-
//
|
84566 |
-
//
|
84567 |
-
|
84568 |
-
|
84569 |
-
|
84570 |
-
|
84571 |
-
|
84572 |
-
|
84573 |
-
|
84574 |
-
return
|
84575 |
-
}
|
84576 |
-
|
84577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84578 |
}
|
|
|
|
|
84579 |
}
|
84580 |
/**
|
84581 |
-
*
|
84582 |
-
*
|
84583 |
-
|
84584 |
-
|
84585 |
-
|
84586 |
-
|
84587 |
-
|
84588 |
-
|
84589 |
-
|
84590 |
-
|
84591 |
-
/*
|
84592 |
-
|
84593 |
-
|
84594 |
-
|
84595 |
-
|
84596 |
-
|
84597 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84598 |
}
|
84599 |
-
//# sourceMappingURL=supports.js.map
|
84600 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/tracekit.js
|
84601 |
/**
|
84602 |
-
*
|
84603 |
-
*
|
84604 |
*/
|
84605 |
-
|
84606 |
-
|
84607 |
-
var
|
84608 |
-
|
84609 |
-
var
|
84610 |
-
//
|
84611 |
-
//
|
84612 |
-
//
|
84613 |
-
|
84614 |
-
|
84615 |
-
|
84616 |
-
|
84617 |
-
//
|
84618 |
-
|
84619 |
-
|
84620 |
-
//
|
84621 |
-
|
84622 |
-
|
84623 |
-
|
84624 |
-
|
84625 |
-
|
84626 |
-
|
84627 |
-
|
84628 |
-
|
84629 |
-
|
84630 |
-
|
84631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84632 |
try {
|
84633 |
-
//
|
84634 |
-
|
84635 |
-
// property first!!
|
84636 |
-
stack = computeStackTraceFromStacktraceProp(ex);
|
84637 |
-
if (stack) {
|
84638 |
-
return popFrames(stack, popSize);
|
84639 |
-
}
|
84640 |
-
}
|
84641 |
-
catch (e) {
|
84642 |
-
// no-empty
|
84643 |
}
|
84644 |
-
|
84645 |
-
|
84646 |
-
|
84647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84648 |
}
|
84649 |
}
|
84650 |
-
|
84651 |
-
//
|
84652 |
-
|
84653 |
-
|
84654 |
-
|
84655 |
-
|
84656 |
-
|
84657 |
-
|
|
|
84658 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84659 |
}
|
84660 |
-
|
84661 |
-
|
84662 |
-
|
84663 |
-
|
84664 |
-
|
|
|
84665 |
}
|
84666 |
-
|
84667 |
-
|
84668 |
-
|
84669 |
-
|
84670 |
-
|
84671 |
-
|
84672 |
-
|
84673 |
-
|
84674 |
-
|
84675 |
-
|
84676 |
-
|
84677 |
-
|
84678 |
-
|
84679 |
-
|
84680 |
-
|
84681 |
-
|
84682 |
-
|
84683 |
-
|
84684 |
-
|
84685 |
-
|
84686 |
-
|
84687 |
-
|
84688 |
-
|
84689 |
-
|
84690 |
-
|
84691 |
-
|
84692 |
-
|
84693 |
-
|
84694 |
-
|
84695 |
-
|
84696 |
-
|
84697 |
-
|
84698 |
-
|
84699 |
-
|
|
|
|
|
84700 |
}
|
84701 |
-
|
84702 |
-
|
84703 |
-
|
84704 |
-
|
84705 |
-
|
84706 |
-
|
84707 |
-
|
84708 |
-
|
84709 |
-
|
84710 |
-
|
84711 |
-
|
84712 |
-
|
84713 |
-
|
84714 |
-
|
84715 |
-
|
84716 |
-
|
84717 |
-
|
84718 |
-
|
84719 |
-
|
84720 |
-
|
84721 |
-
|
84722 |
-
|
84723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
84724 |
}
|
84725 |
else {
|
84726 |
-
|
84727 |
-
|
84728 |
-
|
84729 |
-
element.func = UNKNOWN_FUNCTION;
|
84730 |
}
|
84731 |
-
stack.push(element);
|
84732 |
-
}
|
84733 |
-
if (!stack.length) {
|
84734 |
-
return null;
|
84735 |
-
}
|
84736 |
-
return {
|
84737 |
-
message: extractMessage(ex),
|
84738 |
-
name: ex.name,
|
84739 |
-
stack: stack,
|
84740 |
};
|
84741 |
-
|
84742 |
-
|
84743 |
-
|
84744 |
-
function
|
84745 |
-
|
84746 |
-
|
84747 |
-
|
84748 |
-
// Access and store the stacktrace property before doing ANYTHING
|
84749 |
-
// else to it because Opera is not very good at providing it
|
84750 |
-
// reliably in other circumstances.
|
84751 |
-
var stacktrace = ex.stacktrace;
|
84752 |
-
var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
84753 |
-
var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i;
|
84754 |
-
var lines = stacktrace.split('\n');
|
84755 |
-
var stack = [];
|
84756 |
-
var parts;
|
84757 |
-
for (var line = 0; line < lines.length; line += 2) {
|
84758 |
-
var element = null;
|
84759 |
-
if ((parts = opera10Regex.exec(lines[line]))) {
|
84760 |
-
element = {
|
84761 |
-
url: parts[2],
|
84762 |
-
func: parts[3],
|
84763 |
-
args: [],
|
84764 |
-
line: +parts[1],
|
84765 |
-
column: null,
|
84766 |
-
};
|
84767 |
}
|
84768 |
-
|
84769 |
-
|
84770 |
-
|
84771 |
-
|
84772 |
-
|
84773 |
-
|
84774 |
-
|
84775 |
-
|
|
|
|
|
84776 |
}
|
84777 |
-
|
84778 |
-
|
84779 |
-
|
84780 |
-
}
|
84781 |
-
stack.push(element);
|
84782 |
}
|
84783 |
-
}
|
84784 |
-
if (!stack.length) {
|
84785 |
-
return null;
|
84786 |
-
}
|
84787 |
-
return {
|
84788 |
-
message: extractMessage(ex),
|
84789 |
-
name: ex.name,
|
84790 |
-
stack: stack,
|
84791 |
};
|
84792 |
-
|
84793 |
-
|
84794 |
-
|
84795 |
-
|
84796 |
-
return
|
84797 |
-
}
|
84798 |
-
|
84799 |
-
|
84800 |
-
|
84801 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84802 |
/**
|
84803 |
-
*
|
84804 |
-
* https://github.com/getsentry/sentry-javascript/issues/1949
|
84805 |
-
* In this specific case we try to extract stacktrace.message.error.message
|
84806 |
*/
|
84807 |
-
|
84808 |
-
function
|
84809 |
-
|
84810 |
-
|
84811 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84812 |
}
|
84813 |
-
if (
|
84814 |
-
|
84815 |
}
|
84816 |
-
return
|
84817 |
}
|
84818 |
-
|
84819 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84820 |
|
84821 |
|
84822 |
-
var STACKTRACE_LIMIT = 50;
|
84823 |
/**
|
84824 |
* This function creates an exception from an TraceKitStackTrace
|
84825 |
* @param stacktrace TraceKitStackTrace that will be converted to an exception
|
84826 |
* @hidden
|
84827 |
*/
|
84828 |
-
function
|
84829 |
-
|
|
|
84830 |
var exception = {
|
84831 |
-
type:
|
84832 |
-
value:
|
84833 |
};
|
84834 |
-
if (frames
|
84835 |
exception.stacktrace = { frames: frames };
|
84836 |
}
|
84837 |
if (exception.type === undefined && exception.value === '') {
|
@@ -84842,13 +87299,13 @@ function exceptionFromStacktrace(stacktrace) {
|
|
84842 |
/**
|
84843 |
* @hidden
|
84844 |
*/
|
84845 |
-
function eventFromPlainObject(exception, syntheticException,
|
84846 |
var event = {
|
84847 |
exception: {
|
84848 |
values: [
|
84849 |
{
|
84850 |
-
type: isEvent(exception) ? exception.constructor.name :
|
84851 |
-
value: "Non-Error " + (
|
84852 |
},
|
84853 |
],
|
84854 |
},
|
@@ -84857,137 +87314,137 @@ function eventFromPlainObject(exception, syntheticException, rejection) {
|
|
84857 |
},
|
84858 |
};
|
84859 |
if (syntheticException) {
|
84860 |
-
var
|
84861 |
-
|
84862 |
-
|
84863 |
-
|
84864 |
-
};
|
84865 |
}
|
84866 |
return event;
|
84867 |
}
|
84868 |
/**
|
84869 |
* @hidden
|
84870 |
*/
|
84871 |
-
function
|
84872 |
-
var exception = exceptionFromStacktrace(stacktrace);
|
84873 |
return {
|
84874 |
exception: {
|
84875 |
-
values: [
|
84876 |
},
|
84877 |
};
|
84878 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84879 |
/**
|
84880 |
-
*
|
|
|
|
|
84881 |
*/
|
84882 |
-
function
|
84883 |
-
|
84884 |
-
|
84885 |
-
|
84886 |
-
var localStack = stack;
|
84887 |
-
var firstFrameFunction = localStack[0].func || '';
|
84888 |
-
var lastFrameFunction = localStack[localStack.length - 1].func || '';
|
84889 |
-
// If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)
|
84890 |
-
if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
|
84891 |
-
localStack = localStack.slice(1);
|
84892 |
}
|
84893 |
-
|
84894 |
-
|
84895 |
-
localStack = localStack.slice(0, -1);
|
84896 |
}
|
84897 |
-
|
84898 |
-
return localStack
|
84899 |
-
.slice(0, STACKTRACE_LIMIT)
|
84900 |
-
.map(function (frame) { return ({
|
84901 |
-
colno: frame.column === null ? undefined : frame.column,
|
84902 |
-
filename: frame.url || localStack[0].url,
|
84903 |
-
function: frame.func || '?',
|
84904 |
-
in_app: true,
|
84905 |
-
lineno: frame.line === null ? undefined : frame.line,
|
84906 |
-
}); })
|
84907 |
-
.reverse();
|
84908 |
}
|
84909 |
-
//# sourceMappingURL=parsers.js.map
|
84910 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/eventbuilder.js
|
84911 |
-
|
84912 |
-
|
84913 |
-
|
84914 |
-
|
84915 |
-
|
84916 |
/**
|
84917 |
-
*
|
84918 |
* @hidden
|
84919 |
*/
|
84920 |
-
function eventFromException(
|
84921 |
var syntheticException = (hint && hint.syntheticException) || undefined;
|
84922 |
-
var event = eventFromUnknownInput(exception, syntheticException,
|
84923 |
-
|
84924 |
-
});
|
84925 |
-
(0,misc/* addExceptionMechanism */.EG)(event, {
|
84926 |
-
handled: true,
|
84927 |
-
type: 'generic',
|
84928 |
-
});
|
84929 |
event.level = Severity.Error;
|
84930 |
if (hint && hint.event_id) {
|
84931 |
event.event_id = hint.event_id;
|
84932 |
}
|
84933 |
-
return
|
84934 |
}
|
84935 |
/**
|
84936 |
* Builds and Event from a Message
|
84937 |
* @hidden
|
84938 |
*/
|
84939 |
-
function eventFromMessage(
|
84940 |
if (level === void 0) { level = Severity.Info; }
|
84941 |
var syntheticException = (hint && hint.syntheticException) || undefined;
|
84942 |
-
var event = eventFromString(message, syntheticException,
|
84943 |
-
attachStacktrace: options.attachStacktrace,
|
84944 |
-
});
|
84945 |
event.level = level;
|
84946 |
if (hint && hint.event_id) {
|
84947 |
event.event_id = hint.event_id;
|
84948 |
}
|
84949 |
-
return
|
84950 |
}
|
84951 |
/**
|
84952 |
* @hidden
|
84953 |
*/
|
84954 |
-
function eventFromUnknownInput(exception, syntheticException,
|
84955 |
-
if (options === void 0) { options = {}; }
|
84956 |
var event;
|
84957 |
-
if (isErrorEvent(exception) && exception.error) {
|
84958 |
// If it is an ErrorEvent with `error` property, extract it to get actual Error
|
84959 |
var errorEvent = exception;
|
84960 |
-
|
84961 |
-
exception = errorEvent.error;
|
84962 |
-
event = eventFromStacktrace(computeStackTrace(exception));
|
84963 |
-
return event;
|
84964 |
}
|
84965 |
-
|
84966 |
-
|
84967 |
-
|
84968 |
-
|
84969 |
-
|
|
|
|
|
|
|
84970 |
var domException = exception;
|
84971 |
-
|
84972 |
-
|
84973 |
-
|
84974 |
-
|
|
|
|
|
|
|
|
|
|
|
84975 |
if ('code' in domException) {
|
84976 |
-
event.tags =
|
84977 |
}
|
84978 |
return event;
|
84979 |
}
|
84980 |
-
if (isError(exception)) {
|
84981 |
// we have a real Error object, do nothing
|
84982 |
-
|
84983 |
-
return event;
|
84984 |
}
|
84985 |
-
if (
|
84986 |
-
// If it
|
84987 |
-
// This will allow us to group events based on top-level keys
|
84988 |
-
//
|
84989 |
var objectException = exception;
|
84990 |
-
event = eventFromPlainObject(objectException, syntheticException,
|
84991 |
(0,misc/* addExceptionMechanism */.EG)(event, {
|
84992 |
synthetic: true,
|
84993 |
});
|
@@ -85002,7 +87459,7 @@ function eventFromUnknownInput(exception, syntheticException, options) {
|
|
85002 |
// - a plain Object
|
85003 |
//
|
85004 |
// So bail out and capture it as a simple message:
|
85005 |
-
event = eventFromString(exception, syntheticException,
|
85006 |
(0,misc/* addExceptionTypeValue */.Db)(event, "" + exception, undefined);
|
85007 |
(0,misc/* addExceptionMechanism */.EG)(event, {
|
85008 |
synthetic: true,
|
@@ -85012,299 +87469,511 @@ function eventFromUnknownInput(exception, syntheticException, options) {
|
|
85012 |
/**
|
85013 |
* @hidden
|
85014 |
*/
|
85015 |
-
function eventFromString(input, syntheticException,
|
85016 |
-
if (options === void 0) { options = {}; }
|
85017 |
var event = {
|
85018 |
message: input,
|
85019 |
};
|
85020 |
-
if (
|
85021 |
-
var
|
85022 |
-
|
85023 |
-
|
85024 |
-
|
85025 |
-
};
|
85026 |
}
|
85027 |
return event;
|
85028 |
}
|
85029 |
//# sourceMappingURL=eventbuilder.js.map
|
85030 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/
|
85031 |
|
85032 |
-
/** Creates a SentryRequest from an event. */
|
85033 |
-
function sessionToSentryRequest(session, api) {
|
85034 |
-
var envelopeHeaders = JSON.stringify({
|
85035 |
-
sent_at: new Date().toISOString(),
|
85036 |
-
});
|
85037 |
-
var itemHeaders = JSON.stringify({
|
85038 |
-
type: 'session',
|
85039 |
-
});
|
85040 |
-
return {
|
85041 |
-
body: envelopeHeaders + "\n" + itemHeaders + "\n" + JSON.stringify(session),
|
85042 |
-
type: 'session',
|
85043 |
-
url: api.getEnvelopeEndpointWithUrlEncodedAuth(),
|
85044 |
-
};
|
85045 |
-
}
|
85046 |
-
/** Creates a SentryRequest from an event. */
|
85047 |
-
function eventToSentryRequest(event, api) {
|
85048 |
-
// since JS has no Object.prototype.pop()
|
85049 |
-
var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = __rest(_a, ["__sentry_samplingMethod", "__sentry_sampleRate"]);
|
85050 |
-
event.tags = otherTags;
|
85051 |
-
var useEnvelope = event.type === 'transaction';
|
85052 |
-
var req = {
|
85053 |
-
body: JSON.stringify(event),
|
85054 |
-
type: event.type || 'event',
|
85055 |
-
url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),
|
85056 |
-
};
|
85057 |
-
// https://develop.sentry.dev/sdk/envelopes/
|
85058 |
-
// Since we don't need to manipulate envelopes nor store them, there is no
|
85059 |
-
// exported concept of an Envelope with operations including serialization and
|
85060 |
-
// deserialization. Instead, we only implement a minimal subset of the spec to
|
85061 |
-
// serialize events inline here.
|
85062 |
-
if (useEnvelope) {
|
85063 |
-
var envelopeHeaders = JSON.stringify({
|
85064 |
-
event_id: event.event_id,
|
85065 |
-
sent_at: new Date().toISOString(),
|
85066 |
-
});
|
85067 |
-
var itemHeaders = JSON.stringify({
|
85068 |
-
type: event.type,
|
85069 |
-
// TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and
|
85070 |
-
// explicitly-set sampling decisions). Are we good with that?
|
85071 |
-
sample_rates: [{ id: samplingMethod, rate: sampleRate }],
|
85072 |
-
});
|
85073 |
-
// The trailing newline is optional. We intentionally don't send it to avoid
|
85074 |
-
// sending unnecessary bytes.
|
85075 |
-
//
|
85076 |
-
// const envelope = `${envelopeHeaders}\n${itemHeaders}\n${req.body}\n`;
|
85077 |
-
var envelope = envelopeHeaders + "\n" + itemHeaders + "\n" + req.body;
|
85078 |
-
req.body = envelope;
|
85079 |
-
}
|
85080 |
-
return req;
|
85081 |
-
}
|
85082 |
-
//# sourceMappingURL=request.js.map
|
85083 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/api.js
|
85084 |
|
85085 |
-
|
85086 |
-
|
85087 |
-
|
85088 |
-
|
85089 |
-
|
85090 |
-
|
85091 |
-
|
|
|
85092 |
}
|
85093 |
-
/** Returns the Dsn object. */
|
85094 |
-
API.prototype.getDsn = function () {
|
85095 |
-
return this._dsnObject;
|
85096 |
-
};
|
85097 |
-
/** Returns the prefix to construct Sentry ingestion API endpoints. */
|
85098 |
-
API.prototype.getBaseApiEndpoint = function () {
|
85099 |
-
var dsn = this._dsnObject;
|
85100 |
-
var protocol = dsn.protocol ? dsn.protocol + ":" : '';
|
85101 |
-
var port = dsn.port ? ":" + dsn.port : '';
|
85102 |
-
return protocol + "//" + dsn.host + port + (dsn.path ? "/" + dsn.path : '') + "/api/";
|
85103 |
-
};
|
85104 |
-
/** Returns the store endpoint URL. */
|
85105 |
-
API.prototype.getStoreEndpoint = function () {
|
85106 |
-
return this._getIngestEndpoint('store');
|
85107 |
-
};
|
85108 |
-
/**
|
85109 |
-
* Returns the store endpoint URL with auth in the query string.
|
85110 |
-
*
|
85111 |
-
* Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
|
85112 |
-
*/
|
85113 |
-
API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
|
85114 |
-
return this.getStoreEndpoint() + "?" + this._encodedAuth();
|
85115 |
-
};
|
85116 |
/**
|
85117 |
-
*
|
85118 |
*
|
85119 |
-
*
|
85120 |
-
|
85121 |
-
API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
|
85122 |
-
return this._getEnvelopeEndpoint() + "?" + this._encodedAuth();
|
85123 |
-
};
|
85124 |
-
/** Returns only the path component for the store endpoint. */
|
85125 |
-
API.prototype.getStoreEndpointPath = function () {
|
85126 |
-
var dsn = this._dsnObject;
|
85127 |
-
return (dsn.path ? "/" + dsn.path : '') + "/api/" + dsn.projectId + "/store/";
|
85128 |
-
};
|
85129 |
-
/**
|
85130 |
-
* Returns an object that can be used in request headers.
|
85131 |
-
* This is needed for node and the old /store endpoint in sentry
|
85132 |
*/
|
85133 |
-
|
85134 |
-
|
85135 |
-
var header = ["Sentry sentry_version=" + SENTRY_API_VERSION];
|
85136 |
-
header.push("sentry_client=" + clientName + "/" + clientVersion);
|
85137 |
-
header.push("sentry_key=" + dsn.user);
|
85138 |
-
if (dsn.pass) {
|
85139 |
-
header.push("sentry_secret=" + dsn.pass);
|
85140 |
-
}
|
85141 |
-
return {
|
85142 |
-
'Content-Type': 'application/json',
|
85143 |
-
'X-Sentry-Auth': header.join(', '),
|
85144 |
-
};
|
85145 |
-
};
|
85146 |
-
/** Returns the url to the report dialog endpoint. */
|
85147 |
-
API.prototype.getReportDialogEndpoint = function (dialogOptions) {
|
85148 |
-
if (dialogOptions === void 0) { dialogOptions = {}; }
|
85149 |
-
var dsn = this._dsnObject;
|
85150 |
-
var endpoint = this.getBaseApiEndpoint() + "embed/error-page/";
|
85151 |
-
var encodedOptions = [];
|
85152 |
-
encodedOptions.push("dsn=" + dsn.toString());
|
85153 |
-
for (var key in dialogOptions) {
|
85154 |
-
if (key === 'dsn') {
|
85155 |
-
continue;
|
85156 |
-
}
|
85157 |
-
if (key === 'user') {
|
85158 |
-
if (!dialogOptions.user) {
|
85159 |
-
continue;
|
85160 |
-
}
|
85161 |
-
if (dialogOptions.user.name) {
|
85162 |
-
encodedOptions.push("name=" + encodeURIComponent(dialogOptions.user.name));
|
85163 |
-
}
|
85164 |
-
if (dialogOptions.user.email) {
|
85165 |
-
encodedOptions.push("email=" + encodeURIComponent(dialogOptions.user.email));
|
85166 |
-
}
|
85167 |
-
}
|
85168 |
-
else {
|
85169 |
-
encodedOptions.push(encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key]));
|
85170 |
-
}
|
85171 |
-
}
|
85172 |
-
if (encodedOptions.length) {
|
85173 |
-
return endpoint + "?" + encodedOptions.join('&');
|
85174 |
-
}
|
85175 |
-
return endpoint;
|
85176 |
-
};
|
85177 |
-
/** Returns the envelope endpoint URL. */
|
85178 |
-
API.prototype._getEnvelopeEndpoint = function () {
|
85179 |
-
return this._getIngestEndpoint('envelope');
|
85180 |
-
};
|
85181 |
-
/** Returns the ingest API endpoint for target. */
|
85182 |
-
API.prototype._getIngestEndpoint = function (target) {
|
85183 |
-
var base = this.getBaseApiEndpoint();
|
85184 |
-
var dsn = this._dsnObject;
|
85185 |
-
return "" + base + dsn.projectId + "/" + target + "/";
|
85186 |
-
};
|
85187 |
-
/** Returns a URL-encoded string with auth config suitable for a query string. */
|
85188 |
-
API.prototype._encodedAuth = function () {
|
85189 |
-
var dsn = this._dsnObject;
|
85190 |
-
var auth = {
|
85191 |
-
// We send only the minimum set of required information. See
|
85192 |
-
// https://github.com/getsentry/sentry-javascript/issues/2572.
|
85193 |
-
sentry_key: dsn.user,
|
85194 |
-
sentry_version: SENTRY_API_VERSION,
|
85195 |
-
};
|
85196 |
-
return urlEncode(auth);
|
85197 |
-
};
|
85198 |
-
return API;
|
85199 |
-
}());
|
85200 |
-
|
85201 |
-
//# sourceMappingURL=api.js.map
|
85202 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/promisebuffer.js
|
85203 |
-
|
85204 |
-
|
85205 |
-
/** A simple queue that holds promises. */
|
85206 |
-
var PromiseBuffer = /** @class */ (function () {
|
85207 |
-
function PromiseBuffer(_limit) {
|
85208 |
-
this._limit = _limit;
|
85209 |
-
/** Internal set of queued Promises */
|
85210 |
-
this._buffer = [];
|
85211 |
}
|
85212 |
/**
|
85213 |
-
*
|
85214 |
-
*/
|
85215 |
-
PromiseBuffer.prototype.isReady = function () {
|
85216 |
-
return this._limit === undefined || this.length() < this._limit;
|
85217 |
-
};
|
85218 |
-
/**
|
85219 |
-
* Add a promise to the queue.
|
85220 |
*
|
85221 |
-
* @param
|
|
|
|
|
|
|
|
|
85222 |
* @returns The original promise.
|
85223 |
*/
|
85224 |
-
|
85225 |
-
|
85226 |
-
|
85227 |
-
|
85228 |
-
|
85229 |
-
|
85230 |
-
|
85231 |
-
|
85232 |
-
|
85233 |
-
|
|
|
|
|
|
|
|
|
85234 |
.then(null, function () {
|
85235 |
-
return
|
85236 |
-
// We have to add
|
85237 |
-
// because it's a new Promise chain.
|
85238 |
});
|
85239 |
});
|
85240 |
return task;
|
85241 |
-
}
|
85242 |
-
/**
|
85243 |
-
* Remove a promise to the queue.
|
85244 |
-
*
|
85245 |
-
* @param task Can be any PromiseLike<T>
|
85246 |
-
* @returns Removed promise.
|
85247 |
-
*/
|
85248 |
-
PromiseBuffer.prototype.remove = function (task) {
|
85249 |
-
var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];
|
85250 |
-
return removedTask;
|
85251 |
-
};
|
85252 |
-
/**
|
85253 |
-
* This function returns the number of unresolved promises in the queue.
|
85254 |
-
*/
|
85255 |
-
PromiseBuffer.prototype.length = function () {
|
85256 |
-
return this._buffer.length;
|
85257 |
-
};
|
85258 |
/**
|
85259 |
-
*
|
85260 |
-
* If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.
|
85261 |
*
|
85262 |
-
* @param timeout
|
|
|
|
|
|
|
|
|
85263 |
*/
|
85264 |
-
|
85265 |
-
|
85266 |
-
|
|
|
|
|
|
|
|
|
85267 |
var capturedSetTimeout = setTimeout(function () {
|
85268 |
if (timeout && timeout > 0) {
|
85269 |
resolve(false);
|
85270 |
}
|
85271 |
}, timeout);
|
85272 |
-
|
85273 |
-
|
85274 |
-
|
85275 |
-
|
85276 |
-
|
85277 |
-
|
85278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85279 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85280 |
});
|
85281 |
-
}
|
85282 |
-
return
|
85283 |
-
}
|
|
|
|
|
85284 |
|
85285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85286 |
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/base.js
|
85287 |
|
85288 |
|
85289 |
|
85290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
85291 |
/** Base Transport class implementation */
|
85292 |
var BaseTransport = /** @class */ (function () {
|
85293 |
function BaseTransport(options) {
|
|
|
85294 |
this.options = options;
|
85295 |
/** A simple buffer holding all requests. */
|
85296 |
-
this._buffer =
|
85297 |
/** Locks transport after receiving rate limits in a response */
|
85298 |
this._rateLimits = {};
|
85299 |
-
this.
|
|
|
85300 |
// eslint-disable-next-line deprecation/deprecation
|
85301 |
-
this.url = this._api.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85302 |
}
|
85303 |
/**
|
85304 |
* @inheritDoc
|
85305 |
*/
|
85306 |
-
BaseTransport.prototype.sendEvent = function (
|
85307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
85308 |
};
|
85309 |
/**
|
85310 |
* @inheritDoc
|
@@ -85312,20 +87981,70 @@ var BaseTransport = /** @class */ (function () {
|
|
85312 |
BaseTransport.prototype.close = function (timeout) {
|
85313 |
return this._buffer.drain(timeout);
|
85314 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85315 |
/**
|
85316 |
* Handle Sentry repsonse for promise-based transports.
|
85317 |
*/
|
85318 |
BaseTransport.prototype._handleResponse = function (_a) {
|
85319 |
var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;
|
85320 |
-
var status =
|
85321 |
-
|
85322 |
-
|
85323 |
-
|
85324 |
-
|
85325 |
-
|
85326 |
-
|
85327 |
-
|
85328 |
-
if (status ===
|
85329 |
resolve({ status: status });
|
85330 |
return;
|
85331 |
}
|
@@ -85333,70 +88052,21 @@ var BaseTransport = /** @class */ (function () {
|
|
85333 |
};
|
85334 |
/**
|
85335 |
* Gets the time that given category is disabled until for rate limiting
|
|
|
|
|
85336 |
*/
|
85337 |
-
BaseTransport.prototype._disabledUntil = function (
|
85338 |
-
|
|
|
85339 |
};
|
85340 |
/**
|
85341 |
* Checks if a category is rate limited
|
|
|
|
|
85342 |
*/
|
85343 |
-
BaseTransport.prototype._isRateLimited = function (
|
85344 |
-
|
85345 |
-
|
85346 |
-
/**
|
85347 |
-
* Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.
|
85348 |
-
*/
|
85349 |
-
BaseTransport.prototype._handleRateLimit = function (headers) {
|
85350 |
-
var e_1, _a, e_2, _b;
|
85351 |
-
var now = Date.now();
|
85352 |
-
var rlHeader = headers['x-sentry-rate-limits'];
|
85353 |
-
var raHeader = headers['retry-after'];
|
85354 |
-
if (rlHeader) {
|
85355 |
-
try {
|
85356 |
-
// rate limit headers are of the form
|
85357 |
-
// <header>,<header>,..
|
85358 |
-
// where each <header> is of the form
|
85359 |
-
// <retry_after>: <categories>: <scope>: <reason_code>
|
85360 |
-
// where
|
85361 |
-
// <retry_after> is a delay in ms
|
85362 |
-
// <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
|
85363 |
-
// <category>;<category>;...
|
85364 |
-
// <scope> is what's being limited (org, project, or key) - ignored by SDK
|
85365 |
-
// <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
|
85366 |
-
for (var _c = __values(rlHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {
|
85367 |
-
var limit = _d.value;
|
85368 |
-
var parameters = limit.split(':', 2);
|
85369 |
-
var headerDelay = parseInt(parameters[0], 10);
|
85370 |
-
var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
|
85371 |
-
try {
|
85372 |
-
for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
85373 |
-
var category = _f.value;
|
85374 |
-
this._rateLimits[category || 'all'] = new Date(now + delay);
|
85375 |
-
}
|
85376 |
-
}
|
85377 |
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
85378 |
-
finally {
|
85379 |
-
try {
|
85380 |
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
85381 |
-
}
|
85382 |
-
finally { if (e_2) throw e_2.error; }
|
85383 |
-
}
|
85384 |
-
}
|
85385 |
-
}
|
85386 |
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
85387 |
-
finally {
|
85388 |
-
try {
|
85389 |
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
85390 |
-
}
|
85391 |
-
finally { if (e_1) throw e_1.error; }
|
85392 |
-
}
|
85393 |
-
return true;
|
85394 |
-
}
|
85395 |
-
else if (raHeader) {
|
85396 |
-
this._rateLimits.all = new Date(now + (0,misc/* parseRetryAfterHeader */.JY)(now, raHeader));
|
85397 |
-
return true;
|
85398 |
-
}
|
85399 |
-
return false;
|
85400 |
};
|
85401 |
return BaseTransport;
|
85402 |
}());
|
@@ -85407,47 +88077,40 @@ var BaseTransport = /** @class */ (function () {
|
|
85407 |
|
85408 |
|
85409 |
|
85410 |
-
var fetch_global = (0,misc/* getGlobalObject */.Rf)();
|
85411 |
/** `fetch` based transport */
|
85412 |
var FetchTransport = /** @class */ (function (_super) {
|
85413 |
-
__extends(FetchTransport, _super);
|
85414 |
-
function FetchTransport() {
|
85415 |
-
|
|
|
|
|
|
|
85416 |
}
|
85417 |
-
/**
|
85418 |
-
* @inheritDoc
|
85419 |
-
*/
|
85420 |
-
FetchTransport.prototype.sendEvent = function (event) {
|
85421 |
-
return this._sendRequest(eventToSentryRequest(event, this._api), event);
|
85422 |
-
};
|
85423 |
-
/**
|
85424 |
-
* @inheritDoc
|
85425 |
-
*/
|
85426 |
-
FetchTransport.prototype.sendSession = function (session) {
|
85427 |
-
return this._sendRequest(sessionToSentryRequest(session, this._api), session);
|
85428 |
-
};
|
85429 |
/**
|
85430 |
* @param sentryRequest Prepared SentryRequest to be delivered
|
85431 |
* @param originalPayload Original payload used to create SentryRequest
|
85432 |
*/
|
85433 |
FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
|
85434 |
var _this = this;
|
|
|
85435 |
if (this._isRateLimited(sentryRequest.type)) {
|
|
|
85436 |
return Promise.reject({
|
85437 |
event: originalPayload,
|
85438 |
type: sentryRequest.type,
|
85439 |
-
|
|
|
85440 |
status: 429,
|
85441 |
});
|
85442 |
}
|
85443 |
var options = {
|
85444 |
body: sentryRequest.body,
|
85445 |
method: 'POST',
|
85446 |
-
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
|
85447 |
-
// https://caniuse.com/#feat=referrer-policy
|
85448 |
-
//
|
85449 |
// REF: https://github.com/getsentry/raven-js/issues/1233
|
85450 |
-
referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),
|
85451 |
};
|
85452 |
if (this.options.fetchParameters !== undefined) {
|
85453 |
Object.assign(options, this.options.fetchParameters);
|
@@ -85455,85 +88118,145 @@ var FetchTransport = /** @class */ (function (_super) {
|
|
85455 |
if (this.options.headers !== undefined) {
|
85456 |
options.headers = this.options.headers;
|
85457 |
}
|
85458 |
-
return this._buffer
|
85459 |
-
|
85460 |
-
|
85461 |
-
.
|
85462 |
-
|
85463 |
-
|
85464 |
-
|
85465 |
-
|
85466 |
-
|
85467 |
-
|
85468 |
-
|
85469 |
-
|
85470 |
-
|
85471 |
-
|
85472 |
-
|
85473 |
-
|
85474 |
-
|
85475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85476 |
};
|
85477 |
return FetchTransport;
|
85478 |
}(BaseTransport));
|
85479 |
|
85480 |
//# sourceMappingURL=fetch.js.map
|
85481 |
-
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/xhr.js
|
85482 |
|
85483 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85484 |
|
85485 |
|
85486 |
/** `XHR` based transport */
|
85487 |
var XHRTransport = /** @class */ (function (_super) {
|
85488 |
-
__extends(XHRTransport, _super);
|
85489 |
function XHRTransport() {
|
85490 |
return _super !== null && _super.apply(this, arguments) || this;
|
85491 |
}
|
85492 |
-
/**
|
85493 |
-
* @inheritDoc
|
85494 |
-
*/
|
85495 |
-
XHRTransport.prototype.sendEvent = function (event) {
|
85496 |
-
return this._sendRequest(eventToSentryRequest(event, this._api), event);
|
85497 |
-
};
|
85498 |
-
/**
|
85499 |
-
* @inheritDoc
|
85500 |
-
*/
|
85501 |
-
XHRTransport.prototype.sendSession = function (session) {
|
85502 |
-
return this._sendRequest(sessionToSentryRequest(session, this._api), session);
|
85503 |
-
};
|
85504 |
/**
|
85505 |
* @param sentryRequest Prepared SentryRequest to be delivered
|
85506 |
* @param originalPayload Original payload used to create SentryRequest
|
85507 |
*/
|
85508 |
XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
|
85509 |
var _this = this;
|
|
|
85510 |
if (this._isRateLimited(sentryRequest.type)) {
|
|
|
85511 |
return Promise.reject({
|
85512 |
event: originalPayload,
|
85513 |
type: sentryRequest.type,
|
85514 |
-
|
|
|
85515 |
status: 429,
|
85516 |
});
|
85517 |
}
|
85518 |
-
return this._buffer
|
85519 |
-
|
85520 |
-
|
85521 |
-
|
85522 |
-
|
85523 |
-
|
85524 |
-
|
85525 |
-
|
85526 |
-
|
85527 |
-
|
85528 |
-
|
85529 |
-
|
85530 |
-
|
85531 |
-
|
85532 |
-
|
|
|
|
|
|
|
85533 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85534 |
}
|
85535 |
-
|
85536 |
-
|
|
|
|
|
|
|
85537 |
};
|
85538 |
return XHRTransport;
|
85539 |
}(BaseTransport));
|
@@ -85551,7 +88274,7 @@ var XHRTransport = /** @class */ (function (_super) {
|
|
85551 |
* @hidden
|
85552 |
*/
|
85553 |
var BrowserBackend = /** @class */ (function (_super) {
|
85554 |
-
__extends(BrowserBackend, _super);
|
85555 |
function BrowserBackend() {
|
85556 |
return _super !== null && _super.apply(this, arguments) || this;
|
85557 |
}
|
@@ -85559,14 +88282,14 @@ var BrowserBackend = /** @class */ (function (_super) {
|
|
85559 |
* @inheritDoc
|
85560 |
*/
|
85561 |
BrowserBackend.prototype.eventFromException = function (exception, hint) {
|
85562 |
-
return eventFromException(
|
85563 |
};
|
85564 |
/**
|
85565 |
* @inheritDoc
|
85566 |
*/
|
85567 |
BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
|
85568 |
if (level === void 0) { level = Severity.Info; }
|
85569 |
-
return eventFromMessage(
|
85570 |
};
|
85571 |
/**
|
85572 |
* @inheritDoc
|
@@ -85576,13 +88299,21 @@ var BrowserBackend = /** @class */ (function (_super) {
|
|
85576 |
// We return the noop transport here in case there is no Dsn.
|
85577 |
return _super.prototype._setupTransport.call(this);
|
85578 |
}
|
85579 |
-
var transportOptions =
|
|
|
|
|
85580 |
if (this._options.transport) {
|
85581 |
return new this._options.transport(transportOptions);
|
85582 |
}
|
85583 |
-
if (supportsFetch()) {
|
|
|
|
|
85584 |
return new FetchTransport(transportOptions);
|
85585 |
}
|
|
|
|
|
|
|
|
|
85586 |
return new XHRTransport(transportOptions);
|
85587 |
};
|
85588 |
return BrowserBackend;
|
@@ -85593,6 +88324,8 @@ var BrowserBackend = /** @class */ (function (_super) {
|
|
85593 |
|
85594 |
|
85595 |
|
|
|
|
|
85596 |
var ignoreOnError = 0;
|
85597 |
/**
|
85598 |
* @hidden
|
@@ -85619,19 +88352,27 @@ function ignoreNextOnError() {
|
|
85619 |
* @hidden
|
85620 |
*/
|
85621 |
function wrap(fn, options, before) {
|
|
|
|
|
|
|
|
|
|
|
|
|
85622 |
if (options === void 0) { options = {}; }
|
85623 |
if (typeof fn !== 'function') {
|
85624 |
return fn;
|
85625 |
}
|
85626 |
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
85627 |
// We don't wanna wrap it twice
|
85628 |
-
if (fn
|
85629 |
return fn;
|
85630 |
}
|
85631 |
-
// If this has already been wrapped in the past, return that wrapped function
|
85632 |
-
if (fn.__sentry_wrapped__) {
|
85633 |
-
return fn.__sentry_wrapped__;
|
85634 |
-
}
|
85635 |
}
|
85636 |
catch (e) {
|
85637 |
// Just accessing custom props in some Selenium environments
|
@@ -85649,14 +88390,6 @@ function wrap(fn, options, before) {
|
|
85649 |
}
|
85650 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
85651 |
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
85652 |
-
if (fn.handleEvent) {
|
85653 |
-
// Attempt to invoke user-land function
|
85654 |
-
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
85655 |
-
// means the sentry.javascript SDK caught an error invoking your application code. This
|
85656 |
-
// is expected behavior and NOT indicative of a bug with sentry.javascript.
|
85657 |
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
85658 |
-
return fn.handleEvent.apply(this, wrappedArguments);
|
85659 |
-
}
|
85660 |
// Attempt to invoke user-land function
|
85661 |
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
85662 |
// means the sentry.javascript SDK caught an error invoking your application code. This
|
@@ -85667,13 +88400,12 @@ function wrap(fn, options, before) {
|
|
85667 |
ignoreNextOnError();
|
85668 |
withScope(function (scope) {
|
85669 |
scope.addEventProcessor(function (event) {
|
85670 |
-
var processedEvent = tslib_es6_assign({}, event);
|
85671 |
if (options.mechanism) {
|
85672 |
-
(0,misc/* addExceptionTypeValue */.Db)(
|
85673 |
-
(0,misc/* addExceptionMechanism */.EG)(
|
85674 |
}
|
85675 |
-
|
85676 |
-
return
|
85677 |
});
|
85678 |
captureException(ex);
|
85679 |
});
|
@@ -85691,24 +88423,10 @@ function wrap(fn, options, before) {
|
|
85691 |
}
|
85692 |
}
|
85693 |
catch (_oO) { } // eslint-disable-line no-empty
|
85694 |
-
fn.prototype = fn.prototype || {};
|
85695 |
-
sentryWrapped.prototype = fn.prototype;
|
85696 |
-
Object.defineProperty(fn, '__sentry_wrapped__', {
|
85697 |
-
enumerable: false,
|
85698 |
-
value: sentryWrapped,
|
85699 |
-
});
|
85700 |
// Signal that this function has been wrapped/filled already
|
85701 |
// for both debugging and to prevent it to being wrapped/filled twice
|
85702 |
-
|
85703 |
-
|
85704 |
-
enumerable: false,
|
85705 |
-
value: true,
|
85706 |
-
},
|
85707 |
-
__sentry_original__: {
|
85708 |
-
enumerable: false,
|
85709 |
-
value: fn,
|
85710 |
-
},
|
85711 |
-
});
|
85712 |
// Restore original function name (not all browsers allow that)
|
85713 |
try {
|
85714 |
var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');
|
@@ -85730,515 +88448,56 @@ function wrap(fn, opti
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
+
* (C) 2017-2022 Buttonizer v2.8.0
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
+
* (C) 2017-2022 Buttonizer v2.8.0
|
27 |
*
|
28 |
*/
|
29 |
/******/ (function() { // webpackBootstrap
|
2836 |
|
2837 |
/***/ }),
|
2838 |
|
2839 |
+
/***/ 37726:
|
2840 |
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2841 |
+
|
2842 |
+
"use strict";
|
2843 |
+
var __webpack_unused_export__;
|
2844 |
+
|
2845 |
+
|
2846 |
+
var _interopRequireDefault = __webpack_require__(95318);
|
2847 |
+
|
2848 |
+
var _interopRequireWildcard = __webpack_require__(20862);
|
2849 |
+
|
2850 |
+
__webpack_unused_export__ = ({
|
2851 |
+
value: true
|
2852 |
+
});
|
2853 |
+
exports.Z = void 0;
|
2854 |
+
|
2855 |
+
var React = _interopRequireWildcard(__webpack_require__(67294));
|
2856 |
+
|
2857 |
+
var _createSvgIcon = _interopRequireDefault(__webpack_require__(2108));
|
2858 |
+
|
2859 |
+
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", {
|
2860 |
+
d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"
|
2861 |
+
}), 'AttachFile');
|
2862 |
+
|
2863 |
+
exports.Z = _default;
|
2864 |
+
|
2865 |
+
/***/ }),
|
2866 |
+
|
2867 |
/***/ 66521:
|
2868 |
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2869 |
|
5219 |
|
5220 |
/***/ }),
|
5221 |
|
5222 |
+
/***/ 36879:
|
5223 |
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
5224 |
|
5225 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5226 |
|
5227 |
+
// EXPORTS
|
5228 |
+
__webpack_require__.d(__webpack_exports__, {
|
5229 |
+
"Xb": function() { return /* binding */ Hub; },
|
5230 |
+
"Gd": function() { return /* binding */ getCurrentHub; },
|
5231 |
+
"cu": function() { return /* binding */ getMainCarrier; }
|
5232 |
+
});
|
5233 |
|
5234 |
+
// UNUSED EXPORTS: API_VERSION, getActiveDomain, getHubFromCarrier, makeMain, setHubOnCarrier
|
5235 |
+
|
5236 |
+
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
5237 |
+
var tslib_es6 = __webpack_require__(70655);
|
5238 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/misc.js
|
5239 |
+
var misc = __webpack_require__(62844);
|
5240 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/time.js
|
5241 |
+
var time = __webpack_require__(21170);
|
5242 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/logger.js
|
5243 |
+
var esm_logger = __webpack_require__(12343);
|
5244 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/global.js
|
5245 |
+
var esm_global = __webpack_require__(82991);
|
5246 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/node.js + 1 modules
|
5247 |
+
var node = __webpack_require__(72176);
|
5248 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/hub/esm/flags.js
|
5249 |
+
/*
|
5250 |
+
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
|
5251 |
+
* for users.
|
5252 |
*
|
5253 |
+
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
|
5254 |
+
* because some build tools have trouble tree-shaking imported guards.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5255 |
*
|
5256 |
+
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
|
5257 |
+
*
|
5258 |
+
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
|
5259 |
+
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
|
5260 |
+
* replaced.
|
5261 |
*/
|
5262 |
+
/** Flag that is true for debug builds, false otherwise. */
|
5263 |
+
var flags_IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
|
5264 |
+
//# sourceMappingURL=flags.js.map
|
5265 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/hub/esm/scope.js
|
5266 |
+
var esm_scope = __webpack_require__(46769);
|
5267 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/object.js
|
5268 |
+
var object = __webpack_require__(20535);
|
5269 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/hub/esm/session.js
|
5270 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5271 |
/**
|
5272 |
+
* @inheritdoc
|
|
|
|
|
|
|
|
|
5273 |
*/
|
5274 |
+
var Session = /** @class */ (function () {
|
5275 |
+
function Session(context) {
|
5276 |
+
this.errors = 0;
|
5277 |
+
this.sid = (0,misc/* uuid4 */.DM)();
|
5278 |
+
this.duration = 0;
|
5279 |
+
this.status = 'ok';
|
5280 |
+
this.init = true;
|
5281 |
+
this.ignoreDuration = false;
|
5282 |
+
// Both timestamp and started are in seconds since the UNIX epoch.
|
5283 |
+
var startingTime = (0,time/* timestampInSeconds */.ph)();
|
5284 |
+
this.timestamp = startingTime;
|
5285 |
+
this.started = startingTime;
|
5286 |
+
if (context) {
|
5287 |
+
this.update(context);
|
5288 |
+
}
|
5289 |
}
|
5290 |
+
/** JSDoc */
|
5291 |
+
// eslint-disable-next-line complexity
|
5292 |
+
Session.prototype.update = function (context) {
|
5293 |
+
if (context === void 0) { context = {}; }
|
5294 |
+
if (context.user) {
|
5295 |
+
if (!this.ipAddress && context.user.ip_address) {
|
5296 |
+
this.ipAddress = context.user.ip_address;
|
5297 |
+
}
|
5298 |
+
if (!this.did && !context.did) {
|
5299 |
+
this.did = context.user.id || context.user.email || context.user.username;
|
5300 |
+
}
|
5301 |
+
}
|
5302 |
+
this.timestamp = context.timestamp || (0,time/* timestampInSeconds */.ph)();
|
5303 |
+
if (context.ignoreDuration) {
|
5304 |
+
this.ignoreDuration = context.ignoreDuration;
|
5305 |
+
}
|
5306 |
+
if (context.sid) {
|
5307 |
+
// Good enough uuid validation. — Kamil
|
5308 |
+
this.sid = context.sid.length === 32 ? context.sid : (0,misc/* uuid4 */.DM)();
|
5309 |
+
}
|
5310 |
+
if (context.init !== undefined) {
|
5311 |
+
this.init = context.init;
|
5312 |
+
}
|
5313 |
+
if (!this.did && context.did) {
|
5314 |
+
this.did = "" + context.did;
|
5315 |
+
}
|
5316 |
+
if (typeof context.started === 'number') {
|
5317 |
+
this.started = context.started;
|
5318 |
+
}
|
5319 |
+
if (this.ignoreDuration) {
|
5320 |
+
this.duration = undefined;
|
5321 |
+
}
|
5322 |
+
else if (typeof context.duration === 'number') {
|
5323 |
+
this.duration = context.duration;
|
5324 |
+
}
|
5325 |
+
else {
|
5326 |
+
var duration = this.timestamp - this.started;
|
5327 |
+
this.duration = duration >= 0 ? duration : 0;
|
5328 |
+
}
|
5329 |
+
if (context.release) {
|
5330 |
+
this.release = context.release;
|
5331 |
+
}
|
5332 |
+
if (context.environment) {
|
5333 |
+
this.environment = context.environment;
|
5334 |
+
}
|
5335 |
+
if (!this.ipAddress && context.ipAddress) {
|
5336 |
+
this.ipAddress = context.ipAddress;
|
5337 |
+
}
|
5338 |
+
if (!this.userAgent && context.userAgent) {
|
5339 |
+
this.userAgent = context.userAgent;
|
5340 |
+
}
|
5341 |
+
if (typeof context.errors === 'number') {
|
5342 |
+
this.errors = context.errors;
|
5343 |
+
}
|
5344 |
+
if (context.status) {
|
5345 |
+
this.status = context.status;
|
5346 |
+
}
|
5347 |
};
|
5348 |
+
/** JSDoc */
|
5349 |
+
Session.prototype.close = function (status) {
|
5350 |
+
if (status) {
|
5351 |
+
this.update({ status: status });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5352 |
}
|
5353 |
+
else if (this.status === 'ok') {
|
5354 |
+
this.update({ status: 'exited' });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5355 |
}
|
5356 |
+
else {
|
5357 |
+
this.update();
|
5358 |
+
}
|
5359 |
+
};
|
5360 |
+
/** JSDoc */
|
5361 |
+
Session.prototype.toJSON = function () {
|
5362 |
+
return (0,object/* dropUndefinedKeys */.Jr)({
|
5363 |
+
sid: "" + this.sid,
|
5364 |
+
init: this.init,
|
5365 |
+
// Make sure that sec is converted to ms for date constructor
|
5366 |
+
started: new Date(this.started * 1000).toISOString(),
|
5367 |
+
timestamp: new Date(this.timestamp * 1000).toISOString(),
|
5368 |
+
status: this.status,
|
5369 |
+
errors: this.errors,
|
5370 |
+
did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
|
5371 |
+
duration: this.duration,
|
5372 |
+
attrs: {
|
5373 |
+
release: this.release,
|
5374 |
+
environment: this.environment,
|
5375 |
+
ip_address: this.ipAddress,
|
5376 |
+
user_agent: this.userAgent,
|
5377 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5378 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5379 |
};
|
5380 |
+
return Session;
|
5381 |
+
}());
|
5382 |
+
|
5383 |
+
//# sourceMappingURL=session.js.map
|
5384 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/hub/esm/hub.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5385 |
|
|
|
5386 |
|
|
|
|
|
5387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5388 |
|
5389 |
|
5390 |
/**
|
5391 |
+
* API compatibility version of this hub.
|
5392 |
*
|
5393 |
+
* WARNING: This number should only be increased when the global interface
|
5394 |
+
* changes and new methods are introduced.
|
|
|
|
|
|
|
|
|
|
|
5395 |
*
|
5396 |
+
* @hidden
|
5397 |
*/
|
5398 |
+
var API_VERSION = 4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5399 |
/**
|
5400 |
+
* Default maximum number of breadcrumbs added to an event. Can be overwritten
|
5401 |
+
* with {@link Options.maxBreadcrumbs}.
|
|
|
|
|
|
|
5402 |
*/
|
5403 |
+
var DEFAULT_BREADCRUMBS = 100;
|
|
|
|
|
5404 |
/**
|
5405 |
+
* @inheritDoc
|
|
|
|
|
|
|
5406 |
*/
|
5407 |
+
var Hub = /** @class */ (function () {
|
5408 |
+
/**
|
5409 |
+
* Creates a new instance of the hub, will push one {@link Layer} into the
|
5410 |
+
* internal stack on creation.
|
5411 |
+
*
|
5412 |
+
* @param client bound to the hub.
|
5413 |
+
* @param scope bound to the hub.
|
5414 |
+
* @param version number, higher number means higher priority.
|
5415 |
+
*/
|
5416 |
+
function Hub(client, scope, _version) {
|
5417 |
+
if (scope === void 0) { scope = new esm_scope/* Scope */.s(); }
|
5418 |
+
if (_version === void 0) { _version = API_VERSION; }
|
5419 |
+
this._version = _version;
|
5420 |
+
/** Is a {@link Layer}[] containing the client and scope */
|
5421 |
+
this._stack = [{}];
|
5422 |
+
this.getStackTop().scope = scope;
|
5423 |
+
if (client) {
|
5424 |
+
this.bindClient(client);
|
5425 |
+
}
|
5426 |
}
|
5427 |
+
/**
|
5428 |
+
* @inheritDoc
|
5429 |
+
*/
|
5430 |
+
Hub.prototype.isOlderThan = function (version) {
|
5431 |
+
return this._version < version;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5432 |
};
|
5433 |
+
/**
|
5434 |
+
* @inheritDoc
|
5435 |
+
*/
|
5436 |
+
Hub.prototype.bindClient = function (client) {
|
5437 |
+
var top = this.getStackTop();
|
5438 |
+
top.client = client;
|
5439 |
+
if (client && client.setupIntegrations) {
|
5440 |
+
client.setupIntegrations();
|
5441 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5442 |
};
|
5443 |
+
/**
|
5444 |
+
* @inheritDoc
|
5445 |
+
*/
|
5446 |
+
Hub.prototype.pushScope = function () {
|
5447 |
+
// We want to clone the content of prev scope
|
5448 |
+
var scope = esm_scope/* Scope.clone */.s.clone(this.getScope());
|
5449 |
+
this.getStack().push({
|
5450 |
+
client: this.getClient(),
|
5451 |
+
scope: scope,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5452 |
});
|
5453 |
+
return scope;
|
5454 |
+
};
|
5455 |
+
/**
|
5456 |
+
* @inheritDoc
|
5457 |
+
*/
|
5458 |
+
Hub.prototype.popScope = function () {
|
5459 |
+
if (this.getStack().length <= 1)
|
5460 |
+
return false;
|
5461 |
+
return !!this.getStack().pop();
|
5462 |
+
};
|
5463 |
+
/**
|
5464 |
+
* @inheritDoc
|
5465 |
+
*/
|
5466 |
+
Hub.prototype.withScope = function (callback) {
|
5467 |
+
var scope = this.pushScope();
|
5468 |
+
try {
|
5469 |
+
callback(scope);
|
5470 |
+
}
|
5471 |
+
finally {
|
5472 |
+
this.popScope();
|
5473 |
+
}
|
5474 |
+
};
|
5475 |
+
/**
|
5476 |
+
* @inheritDoc
|
5477 |
+
*/
|
5478 |
+
Hub.prototype.getClient = function () {
|
5479 |
+
return this.getStackTop().client;
|
5480 |
+
};
|
5481 |
+
/** Returns the scope of the top stack. */
|
5482 |
+
Hub.prototype.getScope = function () {
|
5483 |
+
return this.getStackTop().scope;
|
5484 |
+
};
|
5485 |
+
/** Returns the scope stack for domains or the process. */
|
5486 |
+
Hub.prototype.getStack = function () {
|
5487 |
+
return this._stack;
|
5488 |
+
};
|
5489 |
+
/** Returns the topmost scope layer in the order domain > local > process. */
|
5490 |
+
Hub.prototype.getStackTop = function () {
|
5491 |
+
return this._stack[this._stack.length - 1];
|
5492 |
+
};
|
5493 |
+
/**
|
5494 |
+
* @inheritDoc
|
5495 |
+
*/
|
5496 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
5497 |
+
Hub.prototype.captureException = function (exception, hint) {
|
5498 |
+
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,misc/* uuid4 */.DM)());
|
5499 |
+
var finalHint = hint;
|
5500 |
+
// If there's no explicit hint provided, mimic the same thing that would happen
|
5501 |
+
// in the minimal itself to create a consistent behavior.
|
5502 |
+
// We don't do this in the client, as it's the lowest level API, and doing this,
|
5503 |
+
// would prevent user from having full control over direct calls.
|
5504 |
+
if (!hint) {
|
5505 |
+
var syntheticException = void 0;
|
5506 |
+
try {
|
5507 |
+
throw new Error('Sentry syntheticException');
|
5508 |
+
}
|
5509 |
+
catch (exception) {
|
5510 |
+
syntheticException = exception;
|
5511 |
+
}
|
5512 |
+
finalHint = {
|
5513 |
+
originalException: exception,
|
5514 |
+
syntheticException: syntheticException,
|
5515 |
+
};
|
5516 |
+
}
|
5517 |
+
this._invokeClient('captureException', exception, (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, finalHint), { event_id: eventId }));
|
5518 |
+
return eventId;
|
5519 |
+
};
|
5520 |
+
/**
|
5521 |
+
* @inheritDoc
|
5522 |
+
*/
|
5523 |
+
Hub.prototype.captureMessage = function (message, level, hint) {
|
5524 |
+
var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,misc/* uuid4 */.DM)());
|
5525 |
+
var finalHint = hint;
|
5526 |
+
// If there's no explicit hint provided, mimic the same thing that would happen
|
5527 |
+
// in the minimal itself to create a consistent behavior.
|
5528 |
+
// We don't do this in the client, as it's the lowest level API, and doing this,
|
5529 |
+
// would prevent user from having full control over direct calls.
|
5530 |
+
if (!hint) {
|
5531 |
+
var syntheticException = void 0;
|
5532 |
+
try {
|
5533 |
+
throw new Error(message);
|
5534 |
+
}
|
5535 |
+
catch (exception) {
|
5536 |
+
syntheticException = exception;
|
5537 |
+
}
|
5538 |
+
finalHint = {
|
5539 |
+
originalException: message,
|
5540 |
+
syntheticException: syntheticException,
|
5541 |
+
};
|
5542 |
+
}
|
5543 |
+
this._invokeClient('captureMessage', message, level, (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, finalHint), { event_id: eventId }));
|
5544 |
+
return eventId;
|
5545 |
+
};
|
5546 |
+
/**
|
5547 |
+
* @inheritDoc
|
5548 |
+
*/
|
5549 |
+
Hub.prototype.captureEvent = function (event, hint) {
|
5550 |
+
var eventId = hint && hint.event_id ? hint.event_id : (0,misc/* uuid4 */.DM)();
|
5551 |
+
if (event.type !== 'transaction') {
|
5552 |
+
this._lastEventId = eventId;
|
5553 |
+
}
|
5554 |
+
this._invokeClient('captureEvent', event, (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, hint), { event_id: eventId }));
|
5555 |
+
return eventId;
|
5556 |
+
};
|
5557 |
+
/**
|
5558 |
+
* @inheritDoc
|
5559 |
+
*/
|
5560 |
+
Hub.prototype.lastEventId = function () {
|
5561 |
+
return this._lastEventId;
|
5562 |
+
};
|
5563 |
+
/**
|
5564 |
+
* @inheritDoc
|
5565 |
+
*/
|
5566 |
+
Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
|
5567 |
+
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
5568 |
+
if (!scope || !client)
|
5569 |
+
return;
|
5570 |
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
5571 |
+
var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;
|
5572 |
+
if (maxBreadcrumbs <= 0)
|
5573 |
+
return;
|
5574 |
+
var timestamp = (0,time/* dateTimestampInSeconds */.yW)();
|
5575 |
+
var mergedBreadcrumb = (0,tslib_es6/* __assign */.pi)({ timestamp: timestamp }, breadcrumb);
|
5576 |
+
var finalBreadcrumb = beforeBreadcrumb
|
5577 |
+
? (0,esm_logger/* consoleSandbox */.Cf)(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })
|
5578 |
+
: mergedBreadcrumb;
|
5579 |
+
if (finalBreadcrumb === null)
|
5580 |
+
return;
|
5581 |
+
scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
|
5582 |
+
};
|
5583 |
+
/**
|
5584 |
+
* @inheritDoc
|
5585 |
+
*/
|
5586 |
+
Hub.prototype.setUser = function (user) {
|
5587 |
+
var scope = this.getScope();
|
5588 |
+
if (scope)
|
5589 |
+
scope.setUser(user);
|
5590 |
+
};
|
5591 |
+
/**
|
5592 |
+
* @inheritDoc
|
5593 |
+
*/
|
5594 |
+
Hub.prototype.setTags = function (tags) {
|
5595 |
+
var scope = this.getScope();
|
5596 |
+
if (scope)
|
5597 |
+
scope.setTags(tags);
|
5598 |
+
};
|
5599 |
+
/**
|
5600 |
+
* @inheritDoc
|
5601 |
+
*/
|
5602 |
+
Hub.prototype.setExtras = function (extras) {
|
5603 |
+
var scope = this.getScope();
|
5604 |
+
if (scope)
|
5605 |
+
scope.setExtras(extras);
|
5606 |
+
};
|
5607 |
+
/**
|
5608 |
+
* @inheritDoc
|
5609 |
+
*/
|
5610 |
+
Hub.prototype.setTag = function (key, value) {
|
5611 |
+
var scope = this.getScope();
|
5612 |
+
if (scope)
|
5613 |
+
scope.setTag(key, value);
|
5614 |
+
};
|
5615 |
+
/**
|
5616 |
+
* @inheritDoc
|
5617 |
+
*/
|
5618 |
+
Hub.prototype.setExtra = function (key, extra) {
|
5619 |
+
var scope = this.getScope();
|
5620 |
+
if (scope)
|
5621 |
+
scope.setExtra(key, extra);
|
5622 |
+
};
|
5623 |
+
/**
|
5624 |
+
* @inheritDoc
|
5625 |
+
*/
|
5626 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
5627 |
+
Hub.prototype.setContext = function (name, context) {
|
5628 |
+
var scope = this.getScope();
|
5629 |
+
if (scope)
|
5630 |
+
scope.setContext(name, context);
|
5631 |
+
};
|
5632 |
+
/**
|
5633 |
+
* @inheritDoc
|
5634 |
+
*/
|
5635 |
+
Hub.prototype.configureScope = function (callback) {
|
5636 |
+
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
5637 |
+
if (scope && client) {
|
5638 |
+
callback(scope);
|
5639 |
+
}
|
5640 |
+
};
|
5641 |
+
/**
|
5642 |
+
* @inheritDoc
|
5643 |
+
*/
|
5644 |
+
Hub.prototype.run = function (callback) {
|
5645 |
+
var oldHub = makeMain(this);
|
5646 |
+
try {
|
5647 |
+
callback(this);
|
5648 |
+
}
|
5649 |
+
finally {
|
5650 |
+
makeMain(oldHub);
|
5651 |
+
}
|
5652 |
+
};
|
5653 |
+
/**
|
5654 |
+
* @inheritDoc
|
5655 |
+
*/
|
5656 |
+
Hub.prototype.getIntegration = function (integration) {
|
5657 |
+
var client = this.getClient();
|
5658 |
+
if (!client)
|
5659 |
+
return null;
|
5660 |
+
try {
|
5661 |
+
return client.getIntegration(integration);
|
5662 |
+
}
|
5663 |
+
catch (_oO) {
|
5664 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn("Cannot retrieve integration " + integration.id + " from the current Hub");
|
5665 |
+
return null;
|
5666 |
+
}
|
5667 |
+
};
|
5668 |
+
/**
|
5669 |
+
* @inheritDoc
|
5670 |
+
*/
|
5671 |
+
Hub.prototype.startSpan = function (context) {
|
5672 |
+
return this._callExtensionMethod('startSpan', context);
|
5673 |
+
};
|
5674 |
+
/**
|
5675 |
+
* @inheritDoc
|
5676 |
+
*/
|
5677 |
+
Hub.prototype.startTransaction = function (context, customSamplingContext) {
|
5678 |
+
return this._callExtensionMethod('startTransaction', context, customSamplingContext);
|
5679 |
+
};
|
5680 |
+
/**
|
5681 |
+
* @inheritDoc
|
5682 |
+
*/
|
5683 |
+
Hub.prototype.traceHeaders = function () {
|
5684 |
+
return this._callExtensionMethod('traceHeaders');
|
5685 |
+
};
|
5686 |
+
/**
|
5687 |
+
* @inheritDoc
|
5688 |
+
*/
|
5689 |
+
Hub.prototype.captureSession = function (endSession) {
|
5690 |
+
if (endSession === void 0) { endSession = false; }
|
5691 |
+
// both send the update and pull the session from the scope
|
5692 |
+
if (endSession) {
|
5693 |
+
return this.endSession();
|
5694 |
+
}
|
5695 |
+
// only send the update
|
5696 |
+
this._sendSessionUpdate();
|
5697 |
+
};
|
5698 |
+
/**
|
5699 |
+
* @inheritDoc
|
5700 |
+
*/
|
5701 |
+
Hub.prototype.endSession = function () {
|
5702 |
+
var layer = this.getStackTop();
|
5703 |
+
var scope = layer && layer.scope;
|
5704 |
+
var session = scope && scope.getSession();
|
5705 |
+
if (session) {
|
5706 |
+
session.close();
|
5707 |
+
}
|
5708 |
+
this._sendSessionUpdate();
|
5709 |
+
// the session is over; take it off of the scope
|
5710 |
+
if (scope) {
|
5711 |
+
scope.setSession();
|
5712 |
+
}
|
5713 |
+
};
|
5714 |
+
/**
|
5715 |
+
* @inheritDoc
|
5716 |
+
*/
|
5717 |
+
Hub.prototype.startSession = function (context) {
|
5718 |
+
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
5719 |
+
var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;
|
5720 |
+
// Will fetch userAgent if called from browser sdk
|
5721 |
+
var global = (0,esm_global/* getGlobalObject */.R)();
|
5722 |
+
var userAgent = (global.navigator || {}).userAgent;
|
5723 |
+
var session = new Session((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({ release: release,
|
5724 |
+
environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));
|
5725 |
+
if (scope) {
|
5726 |
+
// End existing session if there's one
|
5727 |
+
var currentSession = scope.getSession && scope.getSession();
|
5728 |
+
if (currentSession && currentSession.status === 'ok') {
|
5729 |
+
currentSession.update({ status: 'exited' });
|
5730 |
+
}
|
5731 |
+
this.endSession();
|
5732 |
+
// Afterwards we set the new session on the scope
|
5733 |
+
scope.setSession(session);
|
5734 |
+
}
|
5735 |
+
return session;
|
5736 |
+
};
|
5737 |
+
/**
|
5738 |
+
* Sends the current Session on the scope
|
5739 |
+
*/
|
5740 |
+
Hub.prototype._sendSessionUpdate = function () {
|
5741 |
+
var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
|
5742 |
+
if (!scope)
|
5743 |
+
return;
|
5744 |
+
var session = scope.getSession && scope.getSession();
|
5745 |
+
if (session) {
|
5746 |
+
if (client && client.captureSession) {
|
5747 |
+
client.captureSession(session);
|
5748 |
+
}
|
5749 |
+
}
|
5750 |
+
};
|
5751 |
+
/**
|
5752 |
+
* Internal helper function to call a method on the top client if it exists.
|
5753 |
+
*
|
5754 |
+
* @param method The method to call on the client.
|
5755 |
+
* @param args Arguments to pass to the client function.
|
5756 |
+
*/
|
5757 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
5758 |
+
Hub.prototype._invokeClient = function (method) {
|
5759 |
+
var _a;
|
5760 |
+
var args = [];
|
5761 |
+
for (var _i = 1; _i < arguments.length; _i++) {
|
5762 |
+
args[_i - 1] = arguments[_i];
|
5763 |
+
}
|
5764 |
+
var _b = this.getStackTop(), scope = _b.scope, client = _b.client;
|
5765 |
+
if (client && client[method]) {
|
5766 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
5767 |
+
(_a = client)[method].apply(_a, (0,tslib_es6/* __spread */.fl)(args, [scope]));
|
5768 |
+
}
|
5769 |
+
};
|
5770 |
+
/**
|
5771 |
+
* Calls global extension method and binding current instance to the function call
|
5772 |
+
*/
|
5773 |
+
// @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
|
5774 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
5775 |
+
Hub.prototype._callExtensionMethod = function (method) {
|
5776 |
+
var args = [];
|
5777 |
+
for (var _i = 1; _i < arguments.length; _i++) {
|
5778 |
+
args[_i - 1] = arguments[_i];
|
5779 |
+
}
|
5780 |
+
var carrier = getMainCarrier();
|
5781 |
+
var sentry = carrier.__SENTRY__;
|
5782 |
+
if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
|
5783 |
+
return sentry.extensions[method].apply(this, args);
|
5784 |
+
}
|
5785 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn("Extension method " + method + " couldn't be found, doing nothing.");
|
5786 |
+
};
|
5787 |
+
return Hub;
|
5788 |
+
}());
|
5789 |
+
|
5790 |
+
/**
|
5791 |
+
* Returns the global shim registry.
|
5792 |
+
*
|
5793 |
+
* FIXME: This function is problematic, because despite always returning a valid Carrier,
|
5794 |
+
* it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
|
5795 |
+
* at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
|
5796 |
+
**/
|
5797 |
+
function getMainCarrier() {
|
5798 |
+
var carrier = (0,esm_global/* getGlobalObject */.R)();
|
5799 |
+
carrier.__SENTRY__ = carrier.__SENTRY__ || {
|
5800 |
+
extensions: {},
|
5801 |
+
hub: undefined,
|
5802 |
+
};
|
5803 |
+
return carrier;
|
5804 |
+
}
|
5805 |
+
/**
|
5806 |
+
* Replaces the current main hub with the passed one on the global object
|
5807 |
+
*
|
5808 |
+
* @returns The old replaced hub
|
5809 |
+
*/
|
5810 |
+
function makeMain(hub) {
|
5811 |
+
var registry = getMainCarrier();
|
5812 |
+
var oldHub = getHubFromCarrier(registry);
|
5813 |
+
setHubOnCarrier(registry, hub);
|
5814 |
+
return oldHub;
|
5815 |
+
}
|
5816 |
+
/**
|
5817 |
+
* Returns the default hub instance.
|
5818 |
+
*
|
5819 |
+
* If a hub is already registered in the global carrier but this module
|
5820 |
+
* contains a more recent version, it replaces the registered version.
|
5821 |
+
* Otherwise, the currently registered hub will be returned.
|
5822 |
+
*/
|
5823 |
+
function getCurrentHub() {
|
5824 |
+
// Get main carrier (global for every environment)
|
5825 |
+
var registry = getMainCarrier();
|
5826 |
+
// If there's no hub, or its an old API, assign a new one
|
5827 |
+
if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
|
5828 |
+
setHubOnCarrier(registry, new Hub());
|
5829 |
}
|
5830 |
+
// Prefer domains over global if they are there (applicable only to Node environment)
|
5831 |
+
if ((0,node/* isNodeEnv */.KV)()) {
|
5832 |
+
return getHubFromActiveDomain(registry);
|
5833 |
}
|
5834 |
+
// Return hub that lives on a global object
|
5835 |
+
return getHubFromCarrier(registry);
|
5836 |
}
|
5837 |
+
/**
|
5838 |
+
* Returns the active domain, if one exists
|
5839 |
+
* @deprecated No longer used; remove in v7
|
5840 |
+
* @returns The domain, or undefined if there is no active domain
|
5841 |
+
*/
|
5842 |
+
// eslint-disable-next-line deprecation/deprecation
|
5843 |
+
function getActiveDomain() {
|
5844 |
+
IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
|
5845 |
+
var sentry = getMainCarrier().__SENTRY__;
|
5846 |
+
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
|
5847 |
+
}
|
5848 |
+
/**
|
5849 |
+
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
|
5850 |
+
* @returns discovered hub
|
5851 |
+
*/
|
5852 |
+
function getHubFromActiveDomain(registry) {
|
5853 |
+
try {
|
5854 |
+
var sentry = getMainCarrier().__SENTRY__;
|
5855 |
+
var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
|
5856 |
+
// If there's no active domain, just return global hub
|
5857 |
+
if (!activeDomain) {
|
5858 |
+
return getHubFromCarrier(registry);
|
5859 |
+
}
|
5860 |
+
// If there's no hub on current domain, or it's an old API, assign a new one
|
5861 |
+
if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
|
5862 |
+
var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
|
5863 |
+
setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, esm_scope/* Scope.clone */.s.clone(registryHubTopStack.scope)));
|
5864 |
+
}
|
5865 |
+
// Return hub that lives on a domain
|
5866 |
+
return getHubFromCarrier(activeDomain);
|
5867 |
}
|
5868 |
+
catch (_Oo) {
|
5869 |
+
// Return hub that lives on a global object
|
5870 |
+
return getHubFromCarrier(registry);
|
5871 |
}
|
5872 |
}
|
5873 |
+
/**
|
5874 |
+
* This will tell whether a carrier has a hub on it or not
|
5875 |
+
* @param carrier object
|
5876 |
+
*/
|
5877 |
+
function hasHubOnCarrier(carrier) {
|
5878 |
+
return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
|
5879 |
+
}
|
5880 |
+
/**
|
5881 |
+
* This will create a new {@link Hub} and add to the passed object on
|
5882 |
+
* __SENTRY__.hub.
|
5883 |
+
* @param carrier object
|
5884 |
+
* @hidden
|
5885 |
+
*/
|
5886 |
+
function getHubFromCarrier(carrier) {
|
5887 |
+
return (0,esm_global/* getGlobalSingleton */.Y)('hub', function () { return new Hub(); }, carrier);
|
5888 |
+
}
|
5889 |
+
/**
|
5890 |
+
* This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
|
5891 |
+
* @param carrier object
|
5892 |
+
* @param hub Hub
|
5893 |
+
* @returns A boolean indicating success or failure
|
5894 |
+
*/
|
5895 |
+
function setHubOnCarrier(carrier, hub) {
|
5896 |
+
if (!carrier)
|
5897 |
+
return false;
|
5898 |
+
var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
|
5899 |
+
__SENTRY__.hub = hub;
|
5900 |
+
return true;
|
5901 |
+
}
|
5902 |
+
//# sourceMappingURL=hub.js.map
|
5903 |
|
5904 |
/***/ }),
|
5905 |
|
5906 |
+
/***/ 46769:
|
5907 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
5908 |
|
5909 |
"use strict";
|
5910 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
5911 |
+
/* harmony export */ "s": function() { return /* binding */ Scope; },
|
5912 |
+
/* harmony export */ "c": function() { return /* binding */ addGlobalEventProcessor; }
|
5913 |
+
/* harmony export */ });
|
5914 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70655);
|
5915 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67597);
|
5916 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21170);
|
5917 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96893);
|
5918 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82991);
|
5919 |
|
5920 |
|
5921 |
+
/**
|
5922 |
+
* Absolute maximum number of breadcrumbs added to an event.
|
5923 |
+
* The `maxBreadcrumbs` option cannot be higher than this value.
|
5924 |
+
*/
|
5925 |
+
var MAX_BREADCRUMBS = 100;
|
5926 |
+
/**
|
5927 |
+
* Holds additional event information. {@link Scope.applyToEvent} will be
|
5928 |
+
* called by the client before an event will be sent.
|
5929 |
+
*/
|
5930 |
+
var Scope = /** @class */ (function () {
|
5931 |
+
function Scope() {
|
5932 |
+
/** Flag if notifying is happening. */
|
5933 |
+
this._notifyingListeners = false;
|
5934 |
+
/** Callback for client to receive scope changes. */
|
5935 |
+
this._scopeListeners = [];
|
5936 |
+
/** Callback list that will be called after {@link applyToEvent}. */
|
5937 |
+
this._eventProcessors = [];
|
5938 |
+
/** Array of breadcrumbs. */
|
5939 |
+
this._breadcrumbs = [];
|
5940 |
+
/** User */
|
5941 |
+
this._user = {};
|
5942 |
+
/** Tags */
|
5943 |
+
this._tags = {};
|
5944 |
+
/** Extra */
|
5945 |
+
this._extra = {};
|
5946 |
+
/** Contexts */
|
5947 |
+
this._contexts = {};
|
5948 |
+
/**
|
5949 |
+
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
|
5950 |
+
* sent to Sentry
|
5951 |
+
*/
|
5952 |
+
this._sdkProcessingMetadata = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5953 |
}
|
5954 |
+
/**
|
5955 |
+
* Inherit values from the parent scope.
|
5956 |
+
* @param scope to clone.
|
5957 |
+
*/
|
5958 |
+
Scope.clone = function (scope) {
|
5959 |
+
var newScope = new Scope();
|
5960 |
+
if (scope) {
|
5961 |
+
newScope._breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(scope._breadcrumbs);
|
5962 |
+
newScope._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._tags);
|
5963 |
+
newScope._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._extra);
|
5964 |
+
newScope._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._contexts);
|
5965 |
+
newScope._user = scope._user;
|
5966 |
+
newScope._level = scope._level;
|
5967 |
+
newScope._span = scope._span;
|
5968 |
+
newScope._session = scope._session;
|
5969 |
+
newScope._transactionName = scope._transactionName;
|
5970 |
+
newScope._fingerprint = scope._fingerprint;
|
5971 |
+
newScope._eventProcessors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(scope._eventProcessors);
|
5972 |
+
newScope._requestSession = scope._requestSession;
|
5973 |
}
|
5974 |
+
return newScope;
|
5975 |
+
};
|
5976 |
+
/**
|
5977 |
+
* Add internal on change listener. Used for sub SDKs that need to store the scope.
|
5978 |
+
* @hidden
|
5979 |
+
*/
|
5980 |
+
Scope.prototype.addScopeListener = function (callback) {
|
5981 |
+
this._scopeListeners.push(callback);
|
5982 |
+
};
|
5983 |
+
/**
|
5984 |
+
* @inheritDoc
|
5985 |
+
*/
|
5986 |
+
Scope.prototype.addEventProcessor = function (callback) {
|
5987 |
+
this._eventProcessors.push(callback);
|
5988 |
+
return this;
|
5989 |
+
};
|
5990 |
+
/**
|
5991 |
+
* @inheritDoc
|
5992 |
+
*/
|
5993 |
+
Scope.prototype.setUser = function (user) {
|
5994 |
+
this._user = user || {};
|
5995 |
+
if (this._session) {
|
5996 |
+
this._session.update({ user: user });
|
5997 |
}
|
5998 |
+
this._notifyScopeListeners();
|
5999 |
+
return this;
|
6000 |
+
};
|
6001 |
+
/**
|
6002 |
+
* @inheritDoc
|
6003 |
+
*/
|
6004 |
+
Scope.prototype.getUser = function () {
|
6005 |
+
return this._user;
|
6006 |
+
};
|
6007 |
+
/**
|
6008 |
+
* @inheritDoc
|
6009 |
+
*/
|
6010 |
+
Scope.prototype.getRequestSession = function () {
|
6011 |
+
return this._requestSession;
|
6012 |
+
};
|
6013 |
+
/**
|
6014 |
+
* @inheritDoc
|
6015 |
+
*/
|
6016 |
+
Scope.prototype.setRequestSession = function (requestSession) {
|
6017 |
+
this._requestSession = requestSession;
|
6018 |
+
return this;
|
6019 |
+
};
|
6020 |
+
/**
|
6021 |
+
* @inheritDoc
|
6022 |
+
*/
|
6023 |
+
Scope.prototype.setTags = function (tags) {
|
6024 |
+
this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), tags);
|
6025 |
+
this._notifyScopeListeners();
|
6026 |
+
return this;
|
6027 |
+
};
|
6028 |
+
/**
|
6029 |
+
* @inheritDoc
|
6030 |
+
*/
|
6031 |
+
Scope.prototype.setTag = function (key, value) {
|
6032 |
+
var _a;
|
6033 |
+
this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), (_a = {}, _a[key] = value, _a));
|
6034 |
+
this._notifyScopeListeners();
|
6035 |
+
return this;
|
6036 |
+
};
|
6037 |
+
/**
|
6038 |
+
* @inheritDoc
|
6039 |
+
*/
|
6040 |
+
Scope.prototype.setExtras = function (extras) {
|
6041 |
+
this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), extras);
|
6042 |
+
this._notifyScopeListeners();
|
6043 |
+
return this;
|
6044 |
+
};
|
6045 |
+
/**
|
6046 |
+
* @inheritDoc
|
6047 |
+
*/
|
6048 |
+
Scope.prototype.setExtra = function (key, extra) {
|
6049 |
+
var _a;
|
6050 |
+
this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), (_a = {}, _a[key] = extra, _a));
|
6051 |
+
this._notifyScopeListeners();
|
6052 |
+
return this;
|
6053 |
+
};
|
6054 |
+
/**
|
6055 |
+
* @inheritDoc
|
6056 |
+
*/
|
6057 |
+
Scope.prototype.setFingerprint = function (fingerprint) {
|
6058 |
+
this._fingerprint = fingerprint;
|
6059 |
+
this._notifyScopeListeners();
|
6060 |
+
return this;
|
6061 |
+
};
|
6062 |
+
/**
|
6063 |
+
* @inheritDoc
|
6064 |
+
*/
|
6065 |
+
Scope.prototype.setLevel = function (level) {
|
6066 |
+
this._level = level;
|
6067 |
+
this._notifyScopeListeners();
|
6068 |
+
return this;
|
6069 |
+
};
|
6070 |
+
/**
|
6071 |
+
* @inheritDoc
|
6072 |
+
*/
|
6073 |
+
Scope.prototype.setTransactionName = function (name) {
|
6074 |
+
this._transactionName = name;
|
6075 |
+
this._notifyScopeListeners();
|
6076 |
+
return this;
|
6077 |
+
};
|
6078 |
+
/**
|
6079 |
+
* Can be removed in major version.
|
6080 |
+
* @deprecated in favor of {@link this.setTransactionName}
|
6081 |
+
*/
|
6082 |
+
Scope.prototype.setTransaction = function (name) {
|
6083 |
+
return this.setTransactionName(name);
|
6084 |
+
};
|
6085 |
+
/**
|
6086 |
+
* @inheritDoc
|
6087 |
+
*/
|
6088 |
+
Scope.prototype.setContext = function (key, context) {
|
6089 |
+
var _a;
|
6090 |
+
if (context === null) {
|
6091 |
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
6092 |
+
delete this._contexts[key];
|
6093 |
+
}
|
6094 |
+
else {
|
6095 |
+
this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), (_a = {}, _a[key] = context, _a));
|
6096 |
+
}
|
6097 |
+
this._notifyScopeListeners();
|
6098 |
+
return this;
|
6099 |
+
};
|
6100 |
+
/**
|
6101 |
+
* @inheritDoc
|
6102 |
+
*/
|
6103 |
+
Scope.prototype.setSpan = function (span) {
|
6104 |
+
this._span = span;
|
6105 |
+
this._notifyScopeListeners();
|
6106 |
+
return this;
|
6107 |
+
};
|
6108 |
+
/**
|
6109 |
+
* @inheritDoc
|
6110 |
+
*/
|
6111 |
+
Scope.prototype.getSpan = function () {
|
6112 |
+
return this._span;
|
6113 |
+
};
|
6114 |
+
/**
|
6115 |
+
* @inheritDoc
|
6116 |
+
*/
|
6117 |
+
Scope.prototype.getTransaction = function () {
|
6118 |
+
// Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
|
6119 |
+
// have a pointer to the currently-active transaction.
|
6120 |
+
var span = this.getSpan();
|
6121 |
+
return span && span.transaction;
|
6122 |
+
};
|
6123 |
+
/**
|
6124 |
+
* @inheritDoc
|
6125 |
+
*/
|
6126 |
+
Scope.prototype.setSession = function (session) {
|
6127 |
+
if (!session) {
|
6128 |
+
delete this._session;
|
6129 |
+
}
|
6130 |
+
else {
|
6131 |
+
this._session = session;
|
6132 |
+
}
|
6133 |
+
this._notifyScopeListeners();
|
6134 |
+
return this;
|
6135 |
+
};
|
6136 |
+
/**
|
6137 |
+
* @inheritDoc
|
6138 |
+
*/
|
6139 |
+
Scope.prototype.getSession = function () {
|
6140 |
+
return this._session;
|
6141 |
+
};
|
6142 |
+
/**
|
6143 |
+
* @inheritDoc
|
6144 |
+
*/
|
6145 |
+
Scope.prototype.update = function (captureContext) {
|
6146 |
+
if (!captureContext) {
|
6147 |
+
return this;
|
6148 |
+
}
|
6149 |
+
if (typeof captureContext === 'function') {
|
6150 |
+
var updatedScope = captureContext(this);
|
6151 |
+
return updatedScope instanceof Scope ? updatedScope : this;
|
6152 |
+
}
|
6153 |
+
if (captureContext instanceof Scope) {
|
6154 |
+
this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), captureContext._tags);
|
6155 |
+
this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), captureContext._extra);
|
6156 |
+
this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), captureContext._contexts);
|
6157 |
+
if (captureContext._user && Object.keys(captureContext._user).length) {
|
6158 |
+
this._user = captureContext._user;
|
6159 |
+
}
|
6160 |
+
if (captureContext._level) {
|
6161 |
+
this._level = captureContext._level;
|
6162 |
+
}
|
6163 |
+
if (captureContext._fingerprint) {
|
6164 |
+
this._fingerprint = captureContext._fingerprint;
|
6165 |
+
}
|
6166 |
+
if (captureContext._requestSession) {
|
6167 |
+
this._requestSession = captureContext._requestSession;
|
6168 |
+
}
|
6169 |
+
}
|
6170 |
+
else if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isPlainObject */ .PO)(captureContext)) {
|
6171 |
+
// eslint-disable-next-line no-param-reassign
|
6172 |
+
captureContext = captureContext;
|
6173 |
+
this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), captureContext.tags);
|
6174 |
+
this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), captureContext.extra);
|
6175 |
+
this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), captureContext.contexts);
|
6176 |
+
if (captureContext.user) {
|
6177 |
+
this._user = captureContext.user;
|
6178 |
+
}
|
6179 |
+
if (captureContext.level) {
|
6180 |
+
this._level = captureContext.level;
|
6181 |
+
}
|
6182 |
+
if (captureContext.fingerprint) {
|
6183 |
+
this._fingerprint = captureContext.fingerprint;
|
6184 |
+
}
|
6185 |
+
if (captureContext.requestSession) {
|
6186 |
+
this._requestSession = captureContext.requestSession;
|
6187 |
+
}
|
6188 |
+
}
|
6189 |
+
return this;
|
6190 |
+
};
|
6191 |
+
/**
|
6192 |
+
* @inheritDoc
|
6193 |
+
*/
|
6194 |
+
Scope.prototype.clear = function () {
|
6195 |
+
this._breadcrumbs = [];
|
6196 |
+
this._tags = {};
|
6197 |
+
this._extra = {};
|
6198 |
+
this._user = {};
|
6199 |
+
this._contexts = {};
|
6200 |
+
this._level = undefined;
|
6201 |
+
this._transactionName = undefined;
|
6202 |
+
this._fingerprint = undefined;
|
6203 |
+
this._requestSession = undefined;
|
6204 |
+
this._span = undefined;
|
6205 |
+
this._session = undefined;
|
6206 |
+
this._notifyScopeListeners();
|
6207 |
+
return this;
|
6208 |
+
};
|
6209 |
+
/**
|
6210 |
+
* @inheritDoc
|
6211 |
+
*/
|
6212 |
+
Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
|
6213 |
+
var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
|
6214 |
+
// No data has been changed, so don't notify scope listeners
|
6215 |
+
if (maxCrumbs <= 0) {
|
6216 |
+
return this;
|
6217 |
+
}
|
6218 |
+
var mergedBreadcrumb = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ timestamp: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dateTimestampInSeconds */ .yW)() }, breadcrumb);
|
6219 |
+
this._breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);
|
6220 |
+
this._notifyScopeListeners();
|
6221 |
+
return this;
|
6222 |
+
};
|
6223 |
+
/**
|
6224 |
+
* @inheritDoc
|
6225 |
+
*/
|
6226 |
+
Scope.prototype.clearBreadcrumbs = function () {
|
6227 |
+
this._breadcrumbs = [];
|
6228 |
+
this._notifyScopeListeners();
|
6229 |
+
return this;
|
6230 |
+
};
|
6231 |
+
/**
|
6232 |
+
* Applies the current context and fingerprint to the event.
|
6233 |
+
* Note that breadcrumbs will be added by the client.
|
6234 |
+
* Also if the event has already breadcrumbs on it, we do not merge them.
|
6235 |
+
* @param event Event
|
6236 |
+
* @param hint May contain additional information about the original exception.
|
6237 |
+
* @hidden
|
6238 |
+
*/
|
6239 |
+
Scope.prototype.applyToEvent = function (event, hint) {
|
6240 |
+
if (this._extra && Object.keys(this._extra).length) {
|
6241 |
+
event.extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), event.extra);
|
6242 |
+
}
|
6243 |
+
if (this._tags && Object.keys(this._tags).length) {
|
6244 |
+
event.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), event.tags);
|
6245 |
+
}
|
6246 |
+
if (this._user && Object.keys(this._user).length) {
|
6247 |
+
event.user = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._user), event.user);
|
6248 |
+
}
|
6249 |
+
if (this._contexts && Object.keys(this._contexts).length) {
|
6250 |
+
event.contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), event.contexts);
|
6251 |
+
}
|
6252 |
+
if (this._level) {
|
6253 |
+
event.level = this._level;
|
6254 |
+
}
|
6255 |
+
if (this._transactionName) {
|
6256 |
+
event.transaction = this._transactionName;
|
6257 |
+
}
|
6258 |
+
// We want to set the trace context for normal events only if there isn't already
|
6259 |
+
// a trace context on the event. There is a product feature in place where we link
|
6260 |
+
// errors with transaction and it relies on that.
|
6261 |
+
if (this._span) {
|
6262 |
+
event.contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ trace: this._span.getTraceContext() }, event.contexts);
|
6263 |
+
var transactionName = this._span.transaction && this._span.transaction.name;
|
6264 |
+
if (transactionName) {
|
6265 |
+
event.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ transaction: transactionName }, event.tags);
|
6266 |
+
}
|
6267 |
+
}
|
6268 |
+
this._applyFingerprint(event);
|
6269 |
+
event.breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((event.breadcrumbs || []), this._breadcrumbs);
|
6270 |
+
event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
|
6271 |
+
event.sdkProcessingMetadata = this._sdkProcessingMetadata;
|
6272 |
+
return this._notifyEventProcessors((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(getGlobalEventProcessors(), this._eventProcessors), event, hint);
|
6273 |
+
};
|
6274 |
+
/**
|
6275 |
+
* Add data which will be accessible during event processing but won't get sent to Sentry
|
6276 |
+
*/
|
6277 |
+
Scope.prototype.setSDKProcessingMetadata = function (newData) {
|
6278 |
+
this._sdkProcessingMetadata = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._sdkProcessingMetadata), newData);
|
6279 |
+
return this;
|
6280 |
+
};
|
6281 |
+
/**
|
6282 |
+
* This will be called after {@link applyToEvent} is finished.
|
6283 |
+
*/
|
6284 |
+
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
|
6285 |
+
var _this = this;
|
6286 |
+
if (index === void 0) { index = 0; }
|
6287 |
+
return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .SyncPromise */ .cW(function (resolve, reject) {
|
6288 |
+
var processor = processors[index];
|
6289 |
+
if (event === null || typeof processor !== 'function') {
|
6290 |
+
resolve(event);
|
6291 |
+
}
|
6292 |
+
else {
|
6293 |
+
var result = processor((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, event), hint);
|
6294 |
+
if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isThenable */ .J8)(result)) {
|
6295 |
+
void result
|
6296 |
+
.then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })
|
6297 |
+
.then(null, reject);
|
6298 |
+
}
|
6299 |
+
else {
|
6300 |
+
void _this._notifyEventProcessors(processors, result, hint, index + 1)
|
6301 |
+
.then(resolve)
|
6302 |
+
.then(null, reject);
|
6303 |
+
}
|
6304 |
+
}
|
6305 |
+
});
|
6306 |
+
};
|
6307 |
+
/**
|
6308 |
+
* This will be called on every set call.
|
6309 |
+
*/
|
6310 |
+
Scope.prototype._notifyScopeListeners = function () {
|
6311 |
+
var _this = this;
|
6312 |
+
// We need this check for this._notifyingListeners to be able to work on scope during updates
|
6313 |
+
// If this check is not here we'll produce endless recursion when something is done with the scope
|
6314 |
+
// during the callback.
|
6315 |
+
if (!this._notifyingListeners) {
|
6316 |
+
this._notifyingListeners = true;
|
6317 |
+
this._scopeListeners.forEach(function (callback) {
|
6318 |
+
callback(_this);
|
6319 |
+
});
|
6320 |
+
this._notifyingListeners = false;
|
6321 |
+
}
|
6322 |
+
};
|
6323 |
+
/**
|
6324 |
+
* Applies fingerprint from the scope to the event if there's one,
|
6325 |
+
* uses message if there's one instead or get rid of empty fingerprint
|
6326 |
+
*/
|
6327 |
+
Scope.prototype._applyFingerprint = function (event) {
|
6328 |
+
// Make sure it's an array first and we actually have something in place
|
6329 |
+
event.fingerprint = event.fingerprint
|
6330 |
+
? Array.isArray(event.fingerprint)
|
6331 |
+
? event.fingerprint
|
6332 |
+
: [event.fingerprint]
|
6333 |
+
: [];
|
6334 |
+
// If we have something on the scope, then merge it with event
|
6335 |
+
if (this._fingerprint) {
|
6336 |
+
event.fingerprint = event.fingerprint.concat(this._fingerprint);
|
6337 |
+
}
|
6338 |
+
// If we have no data at all, remove empty array default
|
6339 |
+
if (event.fingerprint && !event.fingerprint.length) {
|
6340 |
+
delete event.fingerprint;
|
6341 |
+
}
|
6342 |
+
};
|
6343 |
+
return Scope;
|
6344 |
+
}());
|
6345 |
|
6346 |
+
/**
|
6347 |
+
* Returns the global event processors.
|
6348 |
+
*/
|
6349 |
+
function getGlobalEventProcessors() {
|
6350 |
+
return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getGlobalSingleton */ .Y)('globalEventProcessors', function () { return []; });
|
6351 |
+
}
|
6352 |
+
/**
|
6353 |
+
* Add a EventProcessor to be kept globally.
|
6354 |
+
* @param callback EventProcessor to add
|
6355 |
+
*/
|
6356 |
+
function addGlobalEventProcessor(callback) {
|
6357 |
+
getGlobalEventProcessors().push(callback);
|
6358 |
+
}
|
6359 |
+
//# sourceMappingURL=scope.js.map
|
6360 |
|
6361 |
+
/***/ }),
|
|
|
|
|
6362 |
|
6363 |
+
/***/ 26257:
|
6364 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
6365 |
|
6366 |
+
"use strict";
|
6367 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
6368 |
+
/* harmony export */ "d": function() { return /* binding */ FINISH_REASON_TAG; },
|
6369 |
+
/* harmony export */ "x": function() { return /* binding */ IDLE_TRANSACTION_FINISH_REASONS; }
|
6370 |
+
/* harmony export */ });
|
6371 |
+
// Store finish reasons in tuple to save on bundle size
|
6372 |
+
// Readonly type should enforce that this is not mutated.
|
6373 |
+
var FINISH_REASON_TAG = 'finishReason';
|
6374 |
+
var IDLE_TRANSACTION_FINISH_REASONS = ['heartbeatFailed', 'idleTimeout', 'documentHidden'];
|
6375 |
+
//# sourceMappingURL=constants.js.map
|
6376 |
|
6377 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6378 |
|
6379 |
+
/***/ 78955:
|
6380 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
6381 |
|
6382 |
+
"use strict";
|
6383 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
6384 |
+
/* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
|
6385 |
+
/* harmony export */ });
|
6386 |
+
/*
|
6387 |
+
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
|
6388 |
+
* for users.
|
6389 |
+
*
|
6390 |
+
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
|
6391 |
+
* because some build tools have trouble tree-shaking imported guards.
|
6392 |
+
*
|
6393 |
+
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
|
6394 |
+
*
|
6395 |
+
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
|
6396 |
+
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
|
6397 |
+
* replaced.
|
6398 |
+
*/
|
6399 |
+
/** Flag that is true for debug builds, false otherwise. */
|
6400 |
+
var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
|
6401 |
+
//# sourceMappingURL=flags.js.map
|
6402 |
|
6403 |
+
/***/ }),
|
|
|
|
|
|
|
6404 |
|
6405 |
+
/***/ 50790:
|
6406 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6407 |
|
6408 |
+
"use strict";
|
|
|
|
|
|
|
6409 |
|
6410 |
+
// EXPORTS
|
6411 |
+
__webpack_require__.d(__webpack_exports__, {
|
6412 |
+
"ro": function() { return /* binding */ addExtensionMethods; },
|
6413 |
+
"lb": function() { return /* binding */ startIdleTransaction; }
|
6414 |
+
});
|
6415 |
|
6416 |
+
// UNUSED EXPORTS: _addTracingExtensions
|
|
|
|
|
|
|
6417 |
|
6418 |
+
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
6419 |
+
var tslib_es6 = __webpack_require__(70655);
|
6420 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/hub/esm/hub.js + 2 modules
|
6421 |
+
var hub = __webpack_require__(36879);
|
6422 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/logger.js
|
6423 |
+
var logger = __webpack_require__(12343);
|
6424 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/is.js
|
6425 |
+
var is = __webpack_require__(67597);
|
6426 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/node.js + 1 modules
|
6427 |
+
var node = __webpack_require__(72176);
|
6428 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/instrument.js
|
6429 |
+
var instrument = __webpack_require__(9732);
|
6430 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/tracing/esm/flags.js
|
6431 |
+
var flags = __webpack_require__(78955);
|
6432 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/tracing/esm/utils.js
|
6433 |
+
var utils = __webpack_require__(63233);
|
6434 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/tracing/esm/errors.js
|
6435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6437 |
|
6438 |
+
/**
|
6439 |
+
* Configures global error listeners
|
6440 |
+
*/
|
6441 |
+
function registerErrorInstrumentation() {
|
6442 |
+
(0,instrument/* addInstrumentationHandler */.o)('error', errorCallback);
|
6443 |
+
(0,instrument/* addInstrumentationHandler */.o)('unhandledrejection', errorCallback);
|
6444 |
+
}
|
6445 |
+
/**
|
6446 |
+
* If an error or unhandled promise occurs, we mark the active transaction as failed
|
6447 |
+
*/
|
6448 |
+
function errorCallback() {
|
6449 |
+
var activeTransaction = (0,utils/* getActiveTransaction */.x1)();
|
6450 |
+
if (activeTransaction) {
|
6451 |
+
var status_1 = 'internal_error';
|
6452 |
+
flags/* IS_DEBUG_BUILD */.h && logger/* logger.log */.kg.log("[Tracing] Transaction: " + status_1 + " -> Global error occured");
|
6453 |
+
activeTransaction.setStatus(status_1);
|
6454 |
}
|
6455 |
+
}
|
6456 |
+
//# sourceMappingURL=errors.js.map
|
6457 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/tracing/esm/idletransaction.js
|
6458 |
+
var idletransaction = __webpack_require__(16458);
|
6459 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/tracing/esm/transaction.js
|
6460 |
+
var esm_transaction = __webpack_require__(33391);
|
6461 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/tracing/esm/hubextensions.js
|
6462 |
+
/* module decorator */ module = __webpack_require__.hmd(module);
|
6463 |
|
|
|
|
|
|
|
|
|
6464 |
|
6465 |
|
|
|
6466 |
|
|
|
|
|
6467 |
|
|
|
6468 |
|
6469 |
|
|
|
|
|
|
|
|
|
|
|
6470 |
|
6471 |
+
/** Returns all trace headers that are currently on the top scope. */
|
6472 |
+
function traceHeaders() {
|
6473 |
+
var scope = this.getScope();
|
6474 |
+
if (scope) {
|
6475 |
+
var span = scope.getSpan();
|
6476 |
+
if (span) {
|
6477 |
+
return {
|
6478 |
+
'sentry-trace': span.toTraceparent(),
|
6479 |
+
};
|
6480 |
+
}
|
6481 |
+
}
|
6482 |
+
return {};
|
6483 |
+
}
|
6484 |
/**
|
6485 |
+
* Makes a sampling decision for the given transaction and stores it on the transaction.
|
6486 |
*
|
6487 |
+
* Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
|
6488 |
+
* sent to Sentry.
|
6489 |
+
*
|
6490 |
+
* @param transaction: The transaction needing a sampling decision
|
6491 |
+
* @param options: The current client's options, so we can access `tracesSampleRate` and/or `tracesSampler`
|
6492 |
+
* @param samplingContext: Default and user-provided data which may be used to help make the decision
|
6493 |
+
*
|
6494 |
+
* @returns The given transaction with its `sampled` value set
|
6495 |
*/
|
6496 |
+
function sample(transaction, options, samplingContext) {
|
6497 |
+
// nothing to do if tracing is not enabled
|
6498 |
+
if (!(0,utils/* hasTracingEnabled */.zu)(options)) {
|
6499 |
+
transaction.sampled = false;
|
6500 |
+
return transaction;
|
6501 |
+
}
|
6502 |
+
// if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that
|
6503 |
+
if (transaction.sampled !== undefined) {
|
6504 |
+
transaction.setMetadata({
|
6505 |
+
transactionSampling: { method: 'explicitly_set' },
|
6506 |
+
});
|
6507 |
+
return transaction;
|
6508 |
+
}
|
6509 |
+
// we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should
|
6510 |
+
// work; prefer the hook if so
|
6511 |
+
var sampleRate;
|
6512 |
+
if (typeof options.tracesSampler === 'function') {
|
6513 |
+
sampleRate = options.tracesSampler(samplingContext);
|
6514 |
+
transaction.setMetadata({
|
6515 |
+
transactionSampling: {
|
6516 |
+
method: 'client_sampler',
|
6517 |
+
// cast to number in case it's a boolean
|
6518 |
+
rate: Number(sampleRate),
|
6519 |
+
},
|
6520 |
+
});
|
6521 |
+
}
|
6522 |
+
else if (samplingContext.parentSampled !== undefined) {
|
6523 |
+
sampleRate = samplingContext.parentSampled;
|
6524 |
+
transaction.setMetadata({
|
6525 |
+
transactionSampling: { method: 'inheritance' },
|
6526 |
+
});
|
6527 |
+
}
|
6528 |
+
else {
|
6529 |
+
sampleRate = options.tracesSampleRate;
|
6530 |
+
transaction.setMetadata({
|
6531 |
+
transactionSampling: {
|
6532 |
+
method: 'client_rate',
|
6533 |
+
// cast to number in case it's a boolean
|
6534 |
+
rate: Number(sampleRate),
|
6535 |
+
},
|
6536 |
+
});
|
6537 |
+
}
|
6538 |
+
// Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The
|
6539 |
+
// only valid values are booleans or numbers between 0 and 1.)
|
6540 |
+
if (!isValidSampleRate(sampleRate)) {
|
6541 |
+
flags/* IS_DEBUG_BUILD */.h && logger/* logger.warn */.kg.warn('[Tracing] Discarding transaction because of invalid sample rate.');
|
6542 |
+
transaction.sampled = false;
|
6543 |
+
return transaction;
|
6544 |
+
}
|
6545 |
+
// if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped
|
6546 |
+
if (!sampleRate) {
|
6547 |
+
flags/* IS_DEBUG_BUILD */.h &&
|
6548 |
+
logger/* logger.log */.kg.log("[Tracing] Discarding transaction because " + (typeof options.tracesSampler === 'function'
|
6549 |
+
? 'tracesSampler returned 0 or false'
|
6550 |
+
: 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));
|
6551 |
+
transaction.sampled = false;
|
6552 |
+
return transaction;
|
6553 |
+
}
|
6554 |
+
// Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is
|
6555 |
+
// a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.
|
6556 |
+
transaction.sampled = Math.random() < sampleRate;
|
6557 |
+
// if we're not going to keep it, we're done
|
6558 |
+
if (!transaction.sampled) {
|
6559 |
+
flags/* IS_DEBUG_BUILD */.h &&
|
6560 |
+
logger/* logger.log */.kg.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = " + Number(sampleRate) + ")");
|
6561 |
+
return transaction;
|
6562 |
+
}
|
6563 |
+
flags/* IS_DEBUG_BUILD */.h && logger/* logger.log */.kg.log("[Tracing] starting " + transaction.op + " transaction - " + transaction.name);
|
6564 |
+
return transaction;
|
6565 |
+
}
|
6566 |
+
/**
|
6567 |
+
* Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
|
6568 |
+
*/
|
6569 |
+
function isValidSampleRate(rate) {
|
6570 |
+
// we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck
|
6571 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
6572 |
+
if ((0,is/* isNaN */.i2)(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {
|
6573 |
+
flags/* IS_DEBUG_BUILD */.h &&
|
6574 |
+
logger/* logger.warn */.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got " + JSON.stringify(rate) + " of type " + JSON.stringify(typeof rate) + ".");
|
6575 |
+
return false;
|
6576 |
+
}
|
6577 |
+
// in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false
|
6578 |
+
if (rate < 0 || rate > 1) {
|
6579 |
+
flags/* IS_DEBUG_BUILD */.h &&
|
6580 |
+
logger/* logger.warn */.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got " + rate + ".");
|
6581 |
+
return false;
|
6582 |
+
}
|
6583 |
+
return true;
|
6584 |
}
|
6585 |
+
/**
|
6586 |
+
* Creates a new transaction and adds a sampling decision if it doesn't yet have one.
|
6587 |
+
*
|
6588 |
+
* The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if
|
6589 |
+
* it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an
|
6590 |
+
* "extension method."
|
6591 |
+
*
|
6592 |
+
* @param this: The Hub starting the transaction
|
6593 |
+
* @param transactionContext: Data used to configure the transaction
|
6594 |
+
* @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)
|
6595 |
+
*
|
6596 |
+
* @returns The new transaction
|
6597 |
+
*
|
6598 |
+
* @see {@link Hub.startTransaction}
|
6599 |
+
*/
|
6600 |
+
function _startTransaction(transactionContext, customSamplingContext) {
|
6601 |
+
var client = this.getClient();
|
6602 |
+
var options = (client && client.getOptions()) || {};
|
6603 |
+
var transaction = new esm_transaction/* Transaction */.Y(transactionContext, this);
|
6604 |
+
transaction = sample(transaction, options, (0,tslib_es6/* __assign */.pi)({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));
|
6605 |
+
if (transaction.sampled) {
|
6606 |
+
transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);
|
6607 |
+
}
|
6608 |
+
return transaction;
|
6609 |
+
}
|
6610 |
+
/**
|
6611 |
+
* Create new idle transaction.
|
6612 |
+
*/
|
6613 |
+
function startIdleTransaction(hub, transactionContext, idleTimeout, onScope, customSamplingContext) {
|
6614 |
+
var client = hub.getClient();
|
6615 |
+
var options = (client && client.getOptions()) || {};
|
6616 |
+
var transaction = new idletransaction/* IdleTransaction */.io(transactionContext, hub, idleTimeout, onScope);
|
6617 |
+
transaction = sample(transaction, options, (0,tslib_es6/* __assign */.pi)({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));
|
6618 |
+
if (transaction.sampled) {
|
6619 |
+
transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);
|
6620 |
+
}
|
6621 |
+
return transaction;
|
6622 |
+
}
|
6623 |
+
/**
|
6624 |
+
* @private
|
6625 |
+
*/
|
6626 |
+
function _addTracingExtensions() {
|
6627 |
+
var carrier = (0,hub/* getMainCarrier */.cu)();
|
6628 |
+
if (!carrier.__SENTRY__) {
|
6629 |
+
return;
|
6630 |
+
}
|
6631 |
+
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
|
6632 |
+
if (!carrier.__SENTRY__.extensions.startTransaction) {
|
6633 |
+
carrier.__SENTRY__.extensions.startTransaction = _startTransaction;
|
6634 |
+
}
|
6635 |
+
if (!carrier.__SENTRY__.extensions.traceHeaders) {
|
6636 |
+
carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;
|
6637 |
+
}
|
6638 |
+
}
|
6639 |
+
/**
|
6640 |
+
* @private
|
6641 |
+
*/
|
6642 |
+
function _autoloadDatabaseIntegrations() {
|
6643 |
+
var carrier = (0,hub/* getMainCarrier */.cu)();
|
6644 |
+
if (!carrier.__SENTRY__) {
|
6645 |
+
return;
|
6646 |
+
}
|
6647 |
+
var packageToIntegrationMapping = {
|
6648 |
+
mongodb: function () {
|
6649 |
+
var integration = (0,node/* dynamicRequire */.l$)(module, './integrations/node/mongo');
|
6650 |
+
return new integration.Mongo();
|
6651 |
+
},
|
6652 |
+
mongoose: function () {
|
6653 |
+
var integration = (0,node/* dynamicRequire */.l$)(module, './integrations/node/mongo');
|
6654 |
+
return new integration.Mongo({ mongoose: true });
|
6655 |
+
},
|
6656 |
+
mysql: function () {
|
6657 |
+
var integration = (0,node/* dynamicRequire */.l$)(module, './integrations/node/mysql');
|
6658 |
+
return new integration.Mysql();
|
6659 |
+
},
|
6660 |
+
pg: function () {
|
6661 |
+
var integration = (0,node/* dynamicRequire */.l$)(module, './integrations/node/postgres');
|
6662 |
+
return new integration.Postgres();
|
6663 |
+
},
|
6664 |
+
};
|
6665 |
+
var mappedPackages = Object.keys(packageToIntegrationMapping)
|
6666 |
+
.filter(function (moduleName) { return !!(0,node/* loadModule */.$y)(moduleName); })
|
6667 |
+
.map(function (pkg) {
|
6668 |
+
try {
|
6669 |
+
return packageToIntegrationMapping[pkg]();
|
6670 |
+
}
|
6671 |
+
catch (e) {
|
6672 |
+
return undefined;
|
6673 |
+
}
|
6674 |
+
})
|
6675 |
+
.filter(function (p) { return p; });
|
6676 |
+
if (mappedPackages.length > 0) {
|
6677 |
+
carrier.__SENTRY__.integrations = (0,tslib_es6/* __spread */.fl)((carrier.__SENTRY__.integrations || []), mappedPackages);
|
6678 |
+
}
|
6679 |
+
}
|
6680 |
+
/**
|
6681 |
+
* This patches the global object and injects the Tracing extensions methods
|
6682 |
+
*/
|
6683 |
+
function addExtensionMethods() {
|
6684 |
+
_addTracingExtensions();
|
6685 |
+
// Detect and automatically load specified integrations.
|
6686 |
+
if ((0,node/* isNodeEnv */.KV)()) {
|
6687 |
+
_autoloadDatabaseIntegrations();
|
6688 |
+
}
|
6689 |
+
// If an error happens globally, we should make sure transaction status is set to error.
|
6690 |
+
registerErrorInstrumentation();
|
6691 |
+
}
|
6692 |
+
//# sourceMappingURL=hubextensions.js.map
|
6693 |
|
6694 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6695 |
|
6696 |
+
/***/ 16458:
|
6697 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
6698 |
|
6699 |
+
"use strict";
|
6700 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
6701 |
+
/* harmony export */ "nT": function() { return /* binding */ DEFAULT_IDLE_TIMEOUT; },
|
6702 |
+
/* harmony export */ "io": function() { return /* binding */ IdleTransaction; }
|
6703 |
+
/* harmony export */ });
|
6704 |
+
/* unused harmony exports HEARTBEAT_INTERVAL, IdleTransactionSpanRecorder */
|
6705 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70655);
|
6706 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21170);
|
6707 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12343);
|
6708 |
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26257);
|
6709 |
+
/* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78955);
|
6710 |
+
/* harmony import */ var _span__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55334);
|
6711 |
+
/* harmony import */ var _transaction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33391);
|
6712 |
|
|
|
6713 |
|
|
|
|
|
6714 |
|
6715 |
|
|
|
6716 |
|
|
|
|
|
6717 |
|
6718 |
+
var DEFAULT_IDLE_TIMEOUT = 1000;
|
6719 |
+
var HEARTBEAT_INTERVAL = 5000;
|
6720 |
+
/**
|
6721 |
+
* @inheritDoc
|
6722 |
+
*/
|
6723 |
+
var IdleTransactionSpanRecorder = /** @class */ (function (_super) {
|
6724 |
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(IdleTransactionSpanRecorder, _super);
|
6725 |
+
function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {
|
6726 |
+
if (transactionSpanId === void 0) { transactionSpanId = ''; }
|
6727 |
+
var _this = _super.call(this, maxlen) || this;
|
6728 |
+
_this._pushActivity = _pushActivity;
|
6729 |
+
_this._popActivity = _popActivity;
|
6730 |
+
_this.transactionSpanId = transactionSpanId;
|
6731 |
+
return _this;
|
6732 |
+
}
|
6733 |
+
/**
|
6734 |
+
* @inheritDoc
|
6735 |
+
*/
|
6736 |
+
IdleTransactionSpanRecorder.prototype.add = function (span) {
|
6737 |
+
var _this = this;
|
6738 |
+
// We should make sure we do not push and pop activities for
|
6739 |
+
// the transaction that this span recorder belongs to.
|
6740 |
+
if (span.spanId !== this.transactionSpanId) {
|
6741 |
+
// We patch span.finish() to pop an activity after setting an endTimestamp.
|
6742 |
+
span.finish = function (endTimestamp) {
|
6743 |
+
span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampWithMs */ ._I)();
|
6744 |
+
_this._popActivity(span.spanId);
|
6745 |
+
};
|
6746 |
+
// We should only push new activities if the span does not have an end timestamp.
|
6747 |
+
if (span.endTimestamp === undefined) {
|
6748 |
+
this._pushActivity(span.spanId);
|
6749 |
+
}
|
6750 |
+
}
|
6751 |
+
_super.prototype.add.call(this, span);
|
6752 |
+
};
|
6753 |
+
return IdleTransactionSpanRecorder;
|
6754 |
+
}(_span__WEBPACK_IMPORTED_MODULE_2__/* .SpanRecorder */ .gB));
|
6755 |
|
6756 |
+
/**
|
6757 |
+
* An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.
|
6758 |
+
* You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will
|
6759 |
+
* put itself on the scope on creation.
|
6760 |
+
*/
|
6761 |
+
var IdleTransaction = /** @class */ (function (_super) {
|
6762 |
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(IdleTransaction, _super);
|
6763 |
+
function IdleTransaction(transactionContext, _idleHub,
|
6764 |
+
/**
|
6765 |
+
* The time to wait in ms until the idle transaction will be finished.
|
6766 |
+
* @default 1000
|
6767 |
+
*/
|
6768 |
+
_idleTimeout,
|
6769 |
+
// Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends
|
6770 |
+
_onScope) {
|
6771 |
+
if (_idleTimeout === void 0) { _idleTimeout = DEFAULT_IDLE_TIMEOUT; }
|
6772 |
+
if (_onScope === void 0) { _onScope = false; }
|
6773 |
+
var _this = _super.call(this, transactionContext, _idleHub) || this;
|
6774 |
+
_this._idleHub = _idleHub;
|
6775 |
+
_this._idleTimeout = _idleTimeout;
|
6776 |
+
_this._onScope = _onScope;
|
6777 |
+
// Activities store a list of active spans
|
6778 |
+
_this.activities = {};
|
6779 |
+
// Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.
|
6780 |
+
_this._heartbeatCounter = 0;
|
6781 |
+
// We should not use heartbeat if we finished a transaction
|
6782 |
+
_this._finished = false;
|
6783 |
+
_this._beforeFinishCallbacks = [];
|
6784 |
+
if (_idleHub && _onScope) {
|
6785 |
+
// There should only be one active transaction on the scope
|
6786 |
+
clearActiveTransaction(_idleHub);
|
6787 |
+
// We set the transaction here on the scope so error events pick up the trace
|
6788 |
+
// context and attach it to the error.
|
6789 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log("Setting idle transaction on scope. Span ID: " + _this.spanId);
|
6790 |
+
_idleHub.configureScope(function (scope) { return scope.setSpan(_this); });
|
6791 |
+
}
|
6792 |
+
_this._initTimeout = setTimeout(function () {
|
6793 |
+
if (!_this._finished) {
|
6794 |
+
_this.finish();
|
6795 |
+
}
|
6796 |
+
}, _this._idleTimeout);
|
6797 |
+
return _this;
|
6798 |
+
}
|
6799 |
+
/** {@inheritDoc} */
|
6800 |
+
IdleTransaction.prototype.finish = function (endTimestamp) {
|
6801 |
+
var e_1, _a;
|
6802 |
+
var _this = this;
|
6803 |
+
if (endTimestamp === void 0) { endTimestamp = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampWithMs */ ._I)(); }
|
6804 |
+
this._finished = true;
|
6805 |
+
this.activities = {};
|
6806 |
+
if (this.spanRecorder) {
|
6807 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h &&
|
6808 |
+
_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);
|
6809 |
+
try {
|
6810 |
+
for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {
|
6811 |
+
var callback = _c.value;
|
6812 |
+
callback(this, endTimestamp);
|
6813 |
+
}
|
6814 |
+
}
|
6815 |
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
6816 |
+
finally {
|
6817 |
+
try {
|
6818 |
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
6819 |
+
}
|
6820 |
+
finally { if (e_1) throw e_1.error; }
|
6821 |
+
}
|
6822 |
+
this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {
|
6823 |
+
// If we are dealing with the transaction itself, we just return it
|
6824 |
+
if (span.spanId === _this.spanId) {
|
6825 |
+
return true;
|
6826 |
+
}
|
6827 |
+
// We cancel all pending spans with status "cancelled" to indicate the idle transaction was finished early
|
6828 |
+
if (!span.endTimestamp) {
|
6829 |
+
span.endTimestamp = endTimestamp;
|
6830 |
+
span.setStatus('cancelled');
|
6831 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h &&
|
6832 |
+
_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));
|
6833 |
+
}
|
6834 |
+
var keepSpan = span.startTimestamp < endTimestamp;
|
6835 |
+
if (!keepSpan) {
|
6836 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h &&
|
6837 |
+
_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));
|
6838 |
+
}
|
6839 |
+
return keepSpan;
|
6840 |
+
});
|
6841 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] flushing IdleTransaction');
|
6842 |
+
}
|
6843 |
+
else {
|
6844 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] No active IdleTransaction');
|
6845 |
+
}
|
6846 |
+
// if `this._onScope` is `true`, the transaction put itself on the scope when it started
|
6847 |
+
if (this._onScope) {
|
6848 |
+
clearActiveTransaction(this._idleHub);
|
6849 |
+
}
|
6850 |
+
return _super.prototype.finish.call(this, endTimestamp);
|
6851 |
+
};
|
6852 |
+
/**
|
6853 |
+
* Register a callback function that gets excecuted before the transaction finishes.
|
6854 |
+
* Useful for cleanup or if you want to add any additional spans based on current context.
|
6855 |
+
*
|
6856 |
+
* This is exposed because users have no other way of running something before an idle transaction
|
6857 |
+
* finishes.
|
6858 |
+
*/
|
6859 |
+
IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {
|
6860 |
+
this._beforeFinishCallbacks.push(callback);
|
6861 |
+
};
|
6862 |
+
/**
|
6863 |
+
* @inheritDoc
|
6864 |
+
*/
|
6865 |
+
IdleTransaction.prototype.initSpanRecorder = function (maxlen) {
|
6866 |
+
var _this = this;
|
6867 |
+
if (!this.spanRecorder) {
|
6868 |
+
var pushActivity = function (id) {
|
6869 |
+
if (_this._finished) {
|
6870 |
+
return;
|
6871 |
+
}
|
6872 |
+
_this._pushActivity(id);
|
6873 |
+
};
|
6874 |
+
var popActivity = function (id) {
|
6875 |
+
if (_this._finished) {
|
6876 |
+
return;
|
6877 |
+
}
|
6878 |
+
_this._popActivity(id);
|
6879 |
+
};
|
6880 |
+
this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);
|
6881 |
+
// Start heartbeat so that transactions do not run forever.
|
6882 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('Starting heartbeat');
|
6883 |
+
this._pingHeartbeat();
|
6884 |
+
}
|
6885 |
+
this.spanRecorder.add(this);
|
6886 |
+
};
|
6887 |
+
/**
|
6888 |
+
* Start tracking a specific activity.
|
6889 |
+
* @param spanId The span id that represents the activity
|
6890 |
+
*/
|
6891 |
+
IdleTransaction.prototype._pushActivity = function (spanId) {
|
6892 |
+
if (this._initTimeout) {
|
6893 |
+
clearTimeout(this._initTimeout);
|
6894 |
+
this._initTimeout = undefined;
|
6895 |
+
}
|
6896 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log("[Tracing] pushActivity: " + spanId);
|
6897 |
+
this.activities[spanId] = true;
|
6898 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] new activities count', Object.keys(this.activities).length);
|
6899 |
+
};
|
6900 |
+
/**
|
6901 |
+
* Remove an activity from usage
|
6902 |
+
* @param spanId The span id that represents the activity
|
6903 |
+
*/
|
6904 |
+
IdleTransaction.prototype._popActivity = function (spanId) {
|
6905 |
+
var _this = this;
|
6906 |
+
if (this.activities[spanId]) {
|
6907 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log("[Tracing] popActivity " + spanId);
|
6908 |
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
6909 |
+
delete this.activities[spanId];
|
6910 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] new activities count', Object.keys(this.activities).length);
|
6911 |
+
}
|
6912 |
+
if (Object.keys(this.activities).length === 0) {
|
6913 |
+
var timeout = this._idleTimeout;
|
6914 |
+
// We need to add the timeout here to have the real endtimestamp of the transaction
|
6915 |
+
// Remember timestampWithMs is in seconds, timeout is in ms
|
6916 |
+
var end_1 = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampWithMs */ ._I)() + timeout / 1000;
|
6917 |
+
setTimeout(function () {
|
6918 |
+
if (!_this._finished) {
|
6919 |
+
_this.setTag(_constants__WEBPACK_IMPORTED_MODULE_5__/* .FINISH_REASON_TAG */ .d, _constants__WEBPACK_IMPORTED_MODULE_5__/* .IDLE_TRANSACTION_FINISH_REASONS[1] */ .x[1]);
|
6920 |
+
_this.finish(end_1);
|
6921 |
+
}
|
6922 |
+
}, timeout);
|
6923 |
+
}
|
6924 |
+
};
|
6925 |
+
/**
|
6926 |
+
* Checks when entries of this.activities are not changing for 3 beats.
|
6927 |
+
* If this occurs we finish the transaction.
|
6928 |
+
*/
|
6929 |
+
IdleTransaction.prototype._beat = function () {
|
6930 |
+
// We should not be running heartbeat if the idle transaction is finished.
|
6931 |
+
if (this._finished) {
|
6932 |
+
return;
|
6933 |
+
}
|
6934 |
+
var heartbeatString = Object.keys(this.activities).join('');
|
6935 |
+
if (heartbeatString === this._prevHeartbeatString) {
|
6936 |
+
this._heartbeatCounter += 1;
|
6937 |
+
}
|
6938 |
+
else {
|
6939 |
+
this._heartbeatCounter = 1;
|
6940 |
+
}
|
6941 |
+
this._prevHeartbeatString = heartbeatString;
|
6942 |
+
if (this._heartbeatCounter >= 3) {
|
6943 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log('[Tracing] Transaction finished because of no change for 3 heart beats');
|
6944 |
+
this.setStatus('deadline_exceeded');
|
6945 |
+
this.setTag(_constants__WEBPACK_IMPORTED_MODULE_5__/* .FINISH_REASON_TAG */ .d, _constants__WEBPACK_IMPORTED_MODULE_5__/* .IDLE_TRANSACTION_FINISH_REASONS[0] */ .x[0]);
|
6946 |
+
this.finish();
|
6947 |
+
}
|
6948 |
+
else {
|
6949 |
+
this._pingHeartbeat();
|
6950 |
+
}
|
6951 |
+
};
|
6952 |
+
/**
|
6953 |
+
* Pings the heartbeat
|
6954 |
+
*/
|
6955 |
+
IdleTransaction.prototype._pingHeartbeat = function () {
|
6956 |
+
var _this = this;
|
6957 |
+
_flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log("pinging Heartbeat -> current counter: " + this._heartbeatCounter);
|
6958 |
+
setTimeout(function () {
|
6959 |
+
_this._beat();
|
6960 |
+
}, HEARTBEAT_INTERVAL);
|
6961 |
+
};
|
6962 |
+
return IdleTransaction;
|
6963 |
+
}(_transaction__WEBPACK_IMPORTED_MODULE_6__/* .Transaction */ .Y));
|
6964 |
|
6965 |
/**
|
6966 |
+
* Reset transaction on scope to `undefined`
|
|
|
|
|
|
|
6967 |
*/
|
6968 |
+
function clearActiveTransaction(hub) {
|
6969 |
+
if (hub) {
|
6970 |
+
var scope = hub.getScope();
|
6971 |
+
if (scope) {
|
6972 |
+
var transaction = scope.getTransaction();
|
6973 |
+
if (transaction) {
|
6974 |
+
scope.setSpan(undefined);
|
6975 |
+
}
|
6976 |
+
}
|
6977 |
+
}
|
6978 |
}
|
6979 |
+
//# sourceMappingURL=idletransaction.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6980 |
|
6981 |
/***/ }),
|
6982 |
|
6983 |
+
/***/ 55334:
|
6984 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
6985 |
|
6986 |
"use strict";
|
6987 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
6988 |
+
/* harmony export */ "gB": function() { return /* binding */ SpanRecorder; },
|
6989 |
+
/* harmony export */ "Dr": function() { return /* binding */ Span; }
|
6990 |
+
/* harmony export */ });
|
6991 |
+
/* unused harmony export spanStatusfromHttpCode */
|
6992 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70655);
|
6993 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62844);
|
6994 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21170);
|
6995 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20535);
|
6996 |
|
6997 |
|
|
|
|
|
6998 |
/**
|
6999 |
+
* Keeps track of finished spans for a given transaction
|
7000 |
+
* @internal
|
7001 |
+
* @hideconstructor
|
7002 |
+
* @hidden
|
7003 |
*/
|
7004 |
+
var SpanRecorder = /** @class */ (function () {
|
7005 |
+
function SpanRecorder(maxlen) {
|
7006 |
+
if (maxlen === void 0) { maxlen = 1000; }
|
7007 |
+
this.spans = [];
|
7008 |
+
this._maxlen = maxlen;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7009 |
}
|
7010 |
+
/**
|
7011 |
+
* This is just so that we don't run out of memory while recording a lot
|
7012 |
+
* of spans. At some point we just stop and flush out the start of the
|
7013 |
+
* trace tree (i.e.the first n spans with the smallest
|
7014 |
+
* start_timestamp).
|
7015 |
+
*/
|
7016 |
+
SpanRecorder.prototype.add = function (span) {
|
7017 |
+
if (this.spans.length > this._maxlen) {
|
7018 |
+
span.spanRecorder = undefined;
|
7019 |
+
}
|
7020 |
+
else {
|
7021 |
+
this.spans.push(span);
|
7022 |
+
}
|
7023 |
+
};
|
7024 |
+
return SpanRecorder;
|
7025 |
+
}());
|
7026 |
|
7027 |
/**
|
7028 |
+
* Span contains all data about a span
|
7029 |
*/
|
7030 |
+
var Span = /** @class */ (function () {
|
7031 |
+
/**
|
7032 |
+
* You should never call the constructor manually, always use `Sentry.startTransaction()`
|
7033 |
+
* or call `startChild()` on an existing span.
|
7034 |
+
* @internal
|
7035 |
+
* @hideconstructor
|
7036 |
+
* @hidden
|
7037 |
+
*/
|
7038 |
+
function Span(spanContext) {
|
7039 |
+
/**
|
7040 |
+
* @inheritDoc
|
7041 |
+
*/
|
7042 |
+
this.traceId = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .uuid4 */ .DM)();
|
7043 |
+
/**
|
7044 |
+
* @inheritDoc
|
7045 |
+
*/
|
7046 |
+
this.spanId = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .uuid4 */ .DM)().substring(16);
|
7047 |
+
/**
|
7048 |
+
* Timestamp in seconds when the span was created.
|
7049 |
+
*/
|
7050 |
+
this.startTimestamp = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampWithMs */ ._I)();
|
7051 |
+
/**
|
7052 |
+
* @inheritDoc
|
7053 |
+
*/
|
7054 |
+
this.tags = {};
|
7055 |
+
/**
|
7056 |
+
* @inheritDoc
|
7057 |
+
*/
|
7058 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7059 |
+
this.data = {};
|
7060 |
+
if (!spanContext) {
|
7061 |
+
return this;
|
7062 |
+
}
|
7063 |
+
if (spanContext.traceId) {
|
7064 |
+
this.traceId = spanContext.traceId;
|
7065 |
+
}
|
7066 |
+
if (spanContext.spanId) {
|
7067 |
+
this.spanId = spanContext.spanId;
|
7068 |
+
}
|
7069 |
+
if (spanContext.parentSpanId) {
|
7070 |
+
this.parentSpanId = spanContext.parentSpanId;
|
7071 |
+
}
|
7072 |
+
// We want to include booleans as well here
|
7073 |
+
if ('sampled' in spanContext) {
|
7074 |
+
this.sampled = spanContext.sampled;
|
7075 |
+
}
|
7076 |
+
if (spanContext.op) {
|
7077 |
+
this.op = spanContext.op;
|
7078 |
+
}
|
7079 |
+
if (spanContext.description) {
|
7080 |
+
this.description = spanContext.description;
|
7081 |
+
}
|
7082 |
+
if (spanContext.data) {
|
7083 |
+
this.data = spanContext.data;
|
7084 |
+
}
|
7085 |
+
if (spanContext.tags) {
|
7086 |
+
this.tags = spanContext.tags;
|
7087 |
+
}
|
7088 |
+
if (spanContext.status) {
|
7089 |
+
this.status = spanContext.status;
|
7090 |
+
}
|
7091 |
+
if (spanContext.startTimestamp) {
|
7092 |
+
this.startTimestamp = spanContext.startTimestamp;
|
7093 |
+
}
|
7094 |
+
if (spanContext.endTimestamp) {
|
7095 |
+
this.endTimestamp = spanContext.endTimestamp;
|
7096 |
+
}
|
7097 |
+
}
|
7098 |
+
/**
|
7099 |
+
* @inheritDoc
|
7100 |
+
* @deprecated
|
7101 |
+
*/
|
7102 |
+
Span.prototype.child = function (spanContext) {
|
7103 |
+
return this.startChild(spanContext);
|
7104 |
+
};
|
7105 |
+
/**
|
7106 |
+
* @inheritDoc
|
7107 |
+
*/
|
7108 |
+
Span.prototype.startChild = function (spanContext) {
|
7109 |
+
var childSpan = new Span((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, spanContext), { parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId }));
|
7110 |
+
childSpan.spanRecorder = this.spanRecorder;
|
7111 |
+
if (childSpan.spanRecorder) {
|
7112 |
+
childSpan.spanRecorder.add(childSpan);
|
7113 |
+
}
|
7114 |
+
childSpan.transaction = this.transaction;
|
7115 |
+
return childSpan;
|
7116 |
+
};
|
7117 |
+
/**
|
7118 |
+
* @inheritDoc
|
7119 |
+
*/
|
7120 |
+
Span.prototype.setTag = function (key, value) {
|
7121 |
+
var _a;
|
7122 |
+
this.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, this.tags), (_a = {}, _a[key] = value, _a));
|
7123 |
+
return this;
|
7124 |
+
};
|
7125 |
+
/**
|
7126 |
+
* @inheritDoc
|
7127 |
+
*/
|
7128 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
7129 |
+
Span.prototype.setData = function (key, value) {
|
7130 |
+
var _a;
|
7131 |
+
this.data = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, this.data), (_a = {}, _a[key] = value, _a));
|
7132 |
+
return this;
|
7133 |
+
};
|
7134 |
+
/**
|
7135 |
+
* @inheritDoc
|
7136 |
+
*/
|
7137 |
+
Span.prototype.setStatus = function (value) {
|
7138 |
+
this.status = value;
|
7139 |
+
return this;
|
7140 |
+
};
|
7141 |
+
/**
|
7142 |
+
* @inheritDoc
|
7143 |
+
*/
|
7144 |
+
Span.prototype.setHttpStatus = function (httpStatus) {
|
7145 |
+
this.setTag('http.status_code', String(httpStatus));
|
7146 |
+
var spanStatus = spanStatusfromHttpCode(httpStatus);
|
7147 |
+
if (spanStatus !== 'unknown_error') {
|
7148 |
+
this.setStatus(spanStatus);
|
7149 |
+
}
|
7150 |
+
return this;
|
7151 |
+
};
|
7152 |
+
/**
|
7153 |
+
* @inheritDoc
|
7154 |
+
*/
|
7155 |
+
Span.prototype.isSuccess = function () {
|
7156 |
+
return this.status === 'ok';
|
7157 |
+
};
|
7158 |
+
/**
|
7159 |
+
* @inheritDoc
|
7160 |
+
*/
|
7161 |
+
Span.prototype.finish = function (endTimestamp) {
|
7162 |
+
this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampWithMs */ ._I)();
|
7163 |
+
};
|
7164 |
+
/**
|
7165 |
+
* @inheritDoc
|
7166 |
+
*/
|
7167 |
+
Span.prototype.toTraceparent = function () {
|
7168 |
+
var sampledString = '';
|
7169 |
+
if (this.sampled !== undefined) {
|
7170 |
+
sampledString = this.sampled ? '-1' : '-0';
|
7171 |
+
}
|
7172 |
+
return this.traceId + "-" + this.spanId + sampledString;
|
7173 |
+
};
|
7174 |
+
/**
|
7175 |
+
* @inheritDoc
|
7176 |
+
*/
|
7177 |
+
Span.prototype.toContext = function () {
|
7178 |
+
return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .dropUndefinedKeys */ .Jr)({
|
7179 |
+
data: this.data,
|
7180 |
+
description: this.description,
|
7181 |
+
endTimestamp: this.endTimestamp,
|
7182 |
+
op: this.op,
|
7183 |
+
parentSpanId: this.parentSpanId,
|
7184 |
+
sampled: this.sampled,
|
7185 |
+
spanId: this.spanId,
|
7186 |
+
startTimestamp: this.startTimestamp,
|
7187 |
+
status: this.status,
|
7188 |
+
tags: this.tags,
|
7189 |
+
traceId: this.traceId,
|
7190 |
+
});
|
7191 |
+
};
|
7192 |
+
/**
|
7193 |
+
* @inheritDoc
|
7194 |
+
*/
|
7195 |
+
Span.prototype.updateWithContext = function (spanContext) {
|
7196 |
+
var _a, _b, _c, _d, _e;
|
7197 |
+
this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {}));
|
7198 |
+
this.description = spanContext.description;
|
7199 |
+
this.endTimestamp = spanContext.endTimestamp;
|
7200 |
+
this.op = spanContext.op;
|
7201 |
+
this.parentSpanId = spanContext.parentSpanId;
|
7202 |
+
this.sampled = spanContext.sampled;
|
7203 |
+
this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId));
|
7204 |
+
this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp));
|
7205 |
+
this.status = spanContext.status;
|
7206 |
+
this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {}));
|
7207 |
+
this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId));
|
7208 |
+
return this;
|
7209 |
+
};
|
7210 |
+
/**
|
7211 |
+
* @inheritDoc
|
7212 |
+
*/
|
7213 |
+
Span.prototype.getTraceContext = function () {
|
7214 |
+
return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .dropUndefinedKeys */ .Jr)({
|
7215 |
+
data: Object.keys(this.data).length > 0 ? this.data : undefined,
|
7216 |
+
description: this.description,
|
7217 |
+
op: this.op,
|
7218 |
+
parent_span_id: this.parentSpanId,
|
7219 |
+
span_id: this.spanId,
|
7220 |
+
status: this.status,
|
7221 |
+
tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,
|
7222 |
+
trace_id: this.traceId,
|
7223 |
+
});
|
7224 |
+
};
|
7225 |
+
/**
|
7226 |
+
* @inheritDoc
|
7227 |
+
*/
|
7228 |
+
Span.prototype.toJSON = function () {
|
7229 |
+
return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .dropUndefinedKeys */ .Jr)({
|
7230 |
+
data: Object.keys(this.data).length > 0 ? this.data : undefined,
|
7231 |
+
description: this.description,
|
7232 |
+
op: this.op,
|
7233 |
+
parent_span_id: this.parentSpanId,
|
7234 |
+
span_id: this.spanId,
|
7235 |
+
start_timestamp: this.startTimestamp,
|
7236 |
+
status: this.status,
|
7237 |
+
tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,
|
7238 |
+
timestamp: this.endTimestamp,
|
7239 |
+
trace_id: this.traceId,
|
7240 |
+
});
|
7241 |
+
};
|
7242 |
+
return Span;
|
7243 |
+
}());
|
7244 |
|
7245 |
/**
|
7246 |
+
* Converts a HTTP status code into a {@link SpanStatusType}.
|
7247 |
+
*
|
7248 |
+
* @param httpStatus The HTTP response status code.
|
7249 |
+
* @returns The span status or unknown_error.
|
7250 |
+
*/
|
7251 |
+
function spanStatusfromHttpCode(httpStatus) {
|
7252 |
+
if (httpStatus < 400 && httpStatus >= 100) {
|
7253 |
+
return 'ok';
|
7254 |
+
}
|
7255 |
+
if (httpStatus >= 400 && httpStatus < 500) {
|
7256 |
+
switch (httpStatus) {
|
7257 |
+
case 401:
|
7258 |
+
return 'unauthenticated';
|
7259 |
+
case 403:
|
7260 |
+
return 'permission_denied';
|
7261 |
+
case 404:
|
7262 |
+
return 'not_found';
|
7263 |
+
case 409:
|
7264 |
+
return 'already_exists';
|
7265 |
+
case 413:
|
7266 |
+
return 'failed_precondition';
|
7267 |
+
case 429:
|
7268 |
+
return 'resource_exhausted';
|
7269 |
+
default:
|
7270 |
+
return 'invalid_argument';
|
7271 |
+
}
|
7272 |
+
}
|
7273 |
+
if (httpStatus >= 500 && httpStatus < 600) {
|
7274 |
+
switch (httpStatus) {
|
7275 |
+
case 501:
|
7276 |
+
return 'unimplemented';
|
7277 |
+
case 503:
|
7278 |
+
return 'unavailable';
|
7279 |
+
case 504:
|
7280 |
+
return 'deadline_exceeded';
|
7281 |
+
default:
|
7282 |
+
return 'internal_error';
|
7283 |
+
}
|
7284 |
+
}
|
7285 |
+
return 'unknown_error';
|
7286 |
+
}
|
7287 |
+
//# sourceMappingURL=span.js.map
|
7288 |
|
7289 |
/***/ }),
|
7290 |
|
7291 |
+
/***/ 33391:
|
7292 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7293 |
|
7294 |
"use strict";
|
7295 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7296 |
+
/* harmony export */ "Y": function() { return /* binding */ Transaction; }
|
7297 |
+
/* harmony export */ });
|
7298 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70655);
|
7299 |
+
/* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36879);
|
7300 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67597);
|
7301 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12343);
|
7302 |
+
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20535);
|
7303 |
+
/* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78955);
|
7304 |
+
/* harmony import */ var _span__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55334);
|
7305 |
|
7306 |
|
|
|
|
|
|
|
7307 |
|
7308 |
|
|
|
7309 |
|
7310 |
+
/** JSDoc */
|
7311 |
+
var Transaction = /** @class */ (function (_super) {
|
7312 |
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(Transaction, _super);
|
7313 |
+
/**
|
7314 |
+
* This constructor should never be called manually. Those instrumenting tracing should use
|
7315 |
+
* `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.
|
7316 |
+
* @internal
|
7317 |
+
* @hideconstructor
|
7318 |
+
* @hidden
|
7319 |
+
*/
|
7320 |
+
function Transaction(transactionContext, hub) {
|
7321 |
+
var _this = _super.call(this, transactionContext) || this;
|
7322 |
+
_this._measurements = {};
|
7323 |
+
/**
|
7324 |
+
* The reference to the current hub.
|
7325 |
+
*/
|
7326 |
+
_this._hub = (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)();
|
7327 |
+
if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isInstanceOf */ .V9)(hub, _sentry_hub__WEBPACK_IMPORTED_MODULE_1__/* .Hub */ .Xb)) {
|
7328 |
+
_this._hub = hub;
|
7329 |
+
}
|
7330 |
+
_this.name = transactionContext.name || '';
|
7331 |
+
_this.metadata = transactionContext.metadata || {};
|
7332 |
+
_this._trimEnd = transactionContext.trimEnd;
|
7333 |
+
// this is because transactions are also spans, and spans have a transaction pointer
|
7334 |
+
_this.transaction = _this;
|
7335 |
+
return _this;
|
7336 |
+
}
|
7337 |
+
/**
|
7338 |
+
* JSDoc
|
7339 |
+
*/
|
7340 |
+
Transaction.prototype.setName = function (name) {
|
7341 |
+
this.name = name;
|
7342 |
+
};
|
7343 |
+
/**
|
7344 |
+
* Attaches SpanRecorder to the span itself
|
7345 |
+
* @param maxlen maximum number of spans that can be recorded
|
7346 |
+
*/
|
7347 |
+
Transaction.prototype.initSpanRecorder = function (maxlen) {
|
7348 |
+
if (maxlen === void 0) { maxlen = 1000; }
|
7349 |
+
if (!this.spanRecorder) {
|
7350 |
+
this.spanRecorder = new _span__WEBPACK_IMPORTED_MODULE_3__/* .SpanRecorder */ .gB(maxlen);
|
7351 |
+
}
|
7352 |
+
this.spanRecorder.add(this);
|
7353 |
+
};
|
7354 |
+
/**
|
7355 |
+
* Set observed measurements for this transaction.
|
7356 |
+
* @hidden
|
7357 |
+
*/
|
7358 |
+
Transaction.prototype.setMeasurements = function (measurements) {
|
7359 |
+
this._measurements = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, measurements);
|
7360 |
+
};
|
7361 |
+
/**
|
7362 |
+
* Set metadata for this transaction.
|
7363 |
+
* @hidden
|
7364 |
+
*/
|
7365 |
+
Transaction.prototype.setMetadata = function (newMetadata) {
|
7366 |
+
this.metadata = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this.metadata), newMetadata);
|
7367 |
+
};
|
7368 |
+
/**
|
7369 |
+
* @inheritDoc
|
7370 |
+
*/
|
7371 |
+
Transaction.prototype.finish = function (endTimestamp) {
|
7372 |
+
var _this = this;
|
7373 |
+
// This transaction is already finished, so we should not flush it again.
|
7374 |
+
if (this.endTimestamp !== undefined) {
|
7375 |
+
return undefined;
|
7376 |
+
}
|
7377 |
+
if (!this.name) {
|
7378 |
+
_flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.warn */ .kg.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');
|
7379 |
+
this.name = '<unlabeled transaction>';
|
7380 |
+
}
|
7381 |
+
// just sets the end timestamp
|
7382 |
+
_super.prototype.finish.call(this, endTimestamp);
|
7383 |
+
if (this.sampled !== true) {
|
7384 |
+
// At this point if `sampled !== true` we want to discard the transaction.
|
7385 |
+
_flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');
|
7386 |
+
var client = this._hub.getClient();
|
7387 |
+
var transport = client && client.getTransport && client.getTransport();
|
7388 |
+
if (transport && transport.recordLostEvent) {
|
7389 |
+
transport.recordLostEvent('sample_rate', 'transaction');
|
7390 |
+
}
|
7391 |
+
return undefined;
|
7392 |
+
}
|
7393 |
+
var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) { return s !== _this && s.endTimestamp; }) : [];
|
7394 |
+
if (this._trimEnd && finishedSpans.length > 0) {
|
7395 |
+
this.endTimestamp = finishedSpans.reduce(function (prev, current) {
|
7396 |
+
if (prev.endTimestamp && current.endTimestamp) {
|
7397 |
+
return prev.endTimestamp > current.endTimestamp ? prev : current;
|
7398 |
+
}
|
7399 |
+
return prev;
|
7400 |
+
}).endTimestamp;
|
7401 |
+
}
|
7402 |
+
var transaction = {
|
7403 |
+
contexts: {
|
7404 |
+
trace: this.getTraceContext(),
|
7405 |
+
},
|
7406 |
+
spans: finishedSpans,
|
7407 |
+
start_timestamp: this.startTimestamp,
|
7408 |
+
tags: this.tags,
|
7409 |
+
timestamp: this.endTimestamp,
|
7410 |
+
transaction: this.name,
|
7411 |
+
type: 'transaction',
|
7412 |
+
sdkProcessingMetadata: this.metadata,
|
7413 |
+
};
|
7414 |
+
var hasMeasurements = Object.keys(this._measurements).length > 0;
|
7415 |
+
if (hasMeasurements) {
|
7416 |
+
_flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h &&
|
7417 |
+
_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));
|
7418 |
+
transaction.measurements = this._measurements;
|
7419 |
+
}
|
7420 |
+
_flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log("[Tracing] Finishing " + this.op + " transaction: " + this.name + ".");
|
7421 |
+
return this._hub.captureEvent(transaction);
|
7422 |
+
};
|
7423 |
+
/**
|
7424 |
+
* @inheritDoc
|
7425 |
+
*/
|
7426 |
+
Transaction.prototype.toContext = function () {
|
7427 |
+
var spanContext = _super.prototype.toContext.call(this);
|
7428 |
+
return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .dropUndefinedKeys */ .Jr)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, spanContext), { name: this.name, trimEnd: this._trimEnd }));
|
7429 |
+
};
|
7430 |
+
/**
|
7431 |
+
* @inheritDoc
|
7432 |
+
*/
|
7433 |
+
Transaction.prototype.updateWithContext = function (transactionContext) {
|
7434 |
+
var _a;
|
7435 |
+
_super.prototype.updateWithContext.call(this, transactionContext);
|
7436 |
+
this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : ''));
|
7437 |
+
this._trimEnd = transactionContext.trimEnd;
|
7438 |
+
return this;
|
7439 |
+
};
|
7440 |
+
return Transaction;
|
7441 |
+
}(_span__WEBPACK_IMPORTED_MODULE_3__/* .Span */ .Dr));
|
7442 |
|
7443 |
+
//# sourceMappingURL=transaction.js.map
|
7444 |
|
7445 |
+
/***/ }),
|
7446 |
|
7447 |
+
/***/ 63233:
|
7448 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7449 |
+
|
7450 |
+
"use strict";
|
7451 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7452 |
+
/* harmony export */ "zu": function() { return /* binding */ hasTracingEnabled; },
|
7453 |
+
/* harmony export */ "x1": function() { return /* binding */ getActiveTransaction; },
|
7454 |
+
/* harmony export */ "XL": function() { return /* binding */ msToSec; },
|
7455 |
+
/* harmony export */ "WB": function() { return /* binding */ secToMs; }
|
7456 |
+
/* harmony export */ });
|
7457 |
+
/* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36879);
|
7458 |
|
|
|
7459 |
/**
|
7460 |
+
* The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used
|
7461 |
+
* to be declared in this file. It was later moved into `@sentry/utils` as part of a
|
7462 |
+
* move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`
|
7463 |
+
* is the only tracing function used by `@sentry/node`).
|
7464 |
*
|
7465 |
+
* These exports are kept here for backwards compatability's sake.
|
7466 |
+
*
|
7467 |
+
* TODO(v7): Reorganize these exports
|
7468 |
+
*
|
7469 |
+
* See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.
|
7470 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7471 |
|
7472 |
/**
|
7473 |
+
* Determines if tracing is currently enabled.
|
7474 |
*
|
7475 |
+
* Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.
|
7476 |
*/
|
7477 |
+
function hasTracingEnabled(maybeOptions) {
|
7478 |
+
var client = (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)().getClient();
|
7479 |
+
var options = maybeOptions || (client && client.getOptions());
|
7480 |
+
return !!options && ('tracesSampleRate' in options || 'tracesSampler' in options);
|
7481 |
+
}
|
7482 |
+
/** Grabs active transaction off scope, if any */
|
7483 |
+
function getActiveTransaction(maybeHub) {
|
7484 |
+
var hub = maybeHub || (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)();
|
7485 |
+
var scope = hub.getScope();
|
7486 |
+
return scope && scope.getTransaction();
|
7487 |
+
}
|
7488 |
+
/**
|
7489 |
+
* Converts from milliseconds to seconds
|
7490 |
+
* @param time time in ms
|
7491 |
+
*/
|
7492 |
+
function msToSec(time) {
|
7493 |
+
return time / 1000;
|
7494 |
+
}
|
7495 |
+
/**
|
7496 |
+
* Converts from seconds to milliseconds
|
7497 |
+
* @param time time in seconds
|
7498 |
+
*/
|
7499 |
+
function secToMs(time) {
|
7500 |
+
return time * 1000;
|
7501 |
+
}
|
7502 |
+
// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils
|
7503 |
|
7504 |
+
//# sourceMappingURL=utils.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
7505 |
|
7506 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
7507 |
|
7508 |
+
/***/ 58464:
|
7509 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7510 |
|
7511 |
+
"use strict";
|
7512 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7513 |
+
/* harmony export */ "R": function() { return /* binding */ htmlTreeAsString; },
|
7514 |
+
/* harmony export */ "l": function() { return /* binding */ getLocationHref; }
|
7515 |
+
/* harmony export */ });
|
7516 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82991);
|
7517 |
+
/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67597);
|
7518 |
|
|
|
|
|
|
|
|
|
7519 |
|
7520 |
+
/**
|
7521 |
+
* Given a child DOM element, returns a query-selector statement describing that
|
7522 |
+
* and its ancestors
|
7523 |
+
* e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
|
7524 |
+
* @returns generated DOM path
|
7525 |
+
*/
|
7526 |
+
function htmlTreeAsString(elem, keyAttrs) {
|
7527 |
+
// try/catch both:
|
7528 |
+
// - accessing event.target (see getsentry/raven-js#838, #768)
|
7529 |
+
// - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
|
7530 |
+
// - can throw an exception in some circumstances.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7531 |
try {
|
7532 |
+
var currentElem = elem;
|
7533 |
+
var MAX_TRAVERSE_HEIGHT = 5;
|
7534 |
+
var MAX_OUTPUT_LEN = 80;
|
7535 |
+
var out = [];
|
7536 |
+
var height = 0;
|
7537 |
+
var len = 0;
|
7538 |
+
var separator = ' > ';
|
7539 |
+
var sepLength = separator.length;
|
7540 |
+
var nextStr = void 0;
|
7541 |
+
// eslint-disable-next-line no-plusplus
|
7542 |
+
while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
|
7543 |
+
nextStr = _htmlElementAsString(currentElem, keyAttrs);
|
7544 |
+
// bail out if
|
7545 |
+
// - nextStr is the 'html' element
|
7546 |
+
// - the length of the string that would be created exceeds MAX_OUTPUT_LEN
|
7547 |
+
// (ignore this limit if we are on the first iteration)
|
7548 |
+
if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
|
7549 |
+
break;
|
7550 |
+
}
|
7551 |
+
out.push(nextStr);
|
7552 |
+
len += nextStr.length;
|
7553 |
+
currentElem = currentElem.parentNode;
|
7554 |
+
}
|
7555 |
+
return out.reverse().join(separator);
|
7556 |
+
}
|
7557 |
+
catch (_oO) {
|
7558 |
+
return '<unknown>';
|
7559 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7560 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7561 |
/**
|
7562 |
+
* Returns a simple, query-selector representation of a DOM element
|
7563 |
+
* e.g. [HTMLElement] => input#foo.btn[name=baz]
|
7564 |
+
* @returns generated DOM path
|
7565 |
*/
|
7566 |
+
function _htmlElementAsString(el, keyAttrs) {
|
7567 |
+
var elem = el;
|
7568 |
+
var out = [];
|
7569 |
+
var className;
|
7570 |
+
var classes;
|
7571 |
+
var key;
|
7572 |
+
var attr;
|
7573 |
+
var i;
|
7574 |
+
if (!elem || !elem.tagName) {
|
7575 |
+
return '';
|
7576 |
+
}
|
7577 |
+
out.push(elem.tagName.toLowerCase());
|
7578 |
+
// Pairs of attribute keys defined in `serializeAttribute` and their values on element.
|
7579 |
+
var keyAttrPairs = keyAttrs && keyAttrs.length
|
7580 |
+
? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })
|
7581 |
+
: null;
|
7582 |
+
if (keyAttrPairs && keyAttrPairs.length) {
|
7583 |
+
keyAttrPairs.forEach(function (keyAttrPair) {
|
7584 |
+
out.push("[" + keyAttrPair[0] + "=\"" + keyAttrPair[1] + "\"]");
|
7585 |
+
});
|
7586 |
+
}
|
7587 |
+
else {
|
7588 |
+
if (elem.id) {
|
7589 |
+
out.push("#" + elem.id);
|
7590 |
+
}
|
7591 |
+
// eslint-disable-next-line prefer-const
|
7592 |
+
className = elem.className;
|
7593 |
+
if (className && (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(className)) {
|
7594 |
+
classes = className.split(/\s+/);
|
7595 |
+
for (i = 0; i < classes.length; i++) {
|
7596 |
+
out.push("." + classes[i]);
|
7597 |
+
}
|
7598 |
+
}
|
7599 |
+
}
|
7600 |
+
var allowedAttrs = ['type', 'name', 'title', 'alt'];
|
7601 |
+
for (i = 0; i < allowedAttrs.length; i++) {
|
7602 |
+
key = allowedAttrs[i];
|
7603 |
+
attr = elem.getAttribute(key);
|
7604 |
+
if (attr) {
|
7605 |
+
out.push("[" + key + "=\"" + attr + "\"]");
|
7606 |
+
}
|
7607 |
+
}
|
7608 |
+
return out.join('');
|
7609 |
+
}
|
7610 |
/**
|
7611 |
+
* A safe form of location.href
|
|
|
|
|
|
|
|
|
|
|
7612 |
*/
|
7613 |
+
function getLocationHref() {
|
7614 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_1__/* .getGlobalObject */ .R)();
|
7615 |
+
try {
|
7616 |
+
return global.document.location.href;
|
7617 |
}
|
7618 |
+
catch (oO) {
|
7619 |
+
return '';
|
7620 |
+
}
|
7621 |
+
}
|
7622 |
+
//# sourceMappingURL=browser.js.map
|
7623 |
|
7624 |
/***/ }),
|
7625 |
|
7626 |
+
/***/ 88795:
|
7627 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7628 |
|
7629 |
"use strict";
|
7630 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7631 |
+
/* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
|
7632 |
+
/* harmony export */ });
|
7633 |
+
/*
|
7634 |
+
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
|
7635 |
+
* for users.
|
|
|
|
|
|
|
7636 |
*
|
7637 |
+
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
|
7638 |
+
* because some build tools have trouble tree-shaking imported guards.
|
7639 |
+
*
|
7640 |
+
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
|
7641 |
+
*
|
7642 |
+
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
|
7643 |
+
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
|
7644 |
+
* replaced.
|
7645 |
*/
|
7646 |
+
/** Flag that is true for debug builds, false otherwise. */
|
7647 |
+
var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
|
7648 |
+
//# sourceMappingURL=flags.js.map
|
|
|
|
|
|
|
|
|
7649 |
|
7650 |
/***/ }),
|
7651 |
|
7652 |
+
/***/ 82991:
|
7653 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7654 |
|
7655 |
"use strict";
|
7656 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7657 |
+
/* harmony export */ "R": function() { return /* binding */ getGlobalObject; },
|
7658 |
+
/* harmony export */ "Y": function() { return /* binding */ getGlobalSingleton; }
|
7659 |
+
/* harmony export */ });
|
7660 |
+
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72176);
|
7661 |
/**
|
7662 |
+
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
|
7663 |
+
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
7664 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7665 |
|
7666 |
+
var fallbackGlobalObject = {};
|
7667 |
/**
|
7668 |
+
* Safely get global scope object
|
7669 |
+
*
|
7670 |
+
* @returns Global scope object
|
7671 |
*/
|
7672 |
+
function getGlobalObject() {
|
7673 |
+
return ((0,_node__WEBPACK_IMPORTED_MODULE_0__/* .isNodeEnv */ .KV)()
|
7674 |
+
? __webpack_require__.g
|
7675 |
+
: typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
|
7676 |
+
? window // eslint-disable-line no-restricted-globals
|
7677 |
+
: typeof self !== 'undefined'
|
7678 |
+
? self
|
7679 |
+
: fallbackGlobalObject);
|
7680 |
}
|
|
|
7681 |
/**
|
7682 |
+
* Returns a global singleton contained in the global `__SENTRY__` object.
|
7683 |
*
|
7684 |
+
* If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory
|
7685 |
+
* function and added to the `__SENTRY__` object.
|
7686 |
+
*
|
7687 |
+
* @param name name of the global singleton on __SENTRY__
|
7688 |
+
* @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`
|
7689 |
+
* @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value
|
7690 |
+
* @returns the singleton
|
7691 |
*/
|
7692 |
+
function getGlobalSingleton(name, creator, obj) {
|
7693 |
+
var global = (obj || getGlobalObject());
|
7694 |
+
var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});
|
7695 |
+
var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
|
7696 |
+
return singleton;
|
7697 |
+
}
|
7698 |
+
//# sourceMappingURL=global.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7699 |
|
7700 |
/***/ }),
|
7701 |
|
7702 |
+
/***/ 9732:
|
7703 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7704 |
|
7705 |
"use strict";
|
7706 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7707 |
+
/* harmony export */ "o": function() { return /* binding */ addInstrumentationHandler; }
|
7708 |
+
/* harmony export */ });
|
7709 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70655);
|
7710 |
+
/* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88795);
|
7711 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82991);
|
7712 |
+
/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67597);
|
7713 |
+
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12343);
|
7714 |
+
/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20535);
|
7715 |
+
/* harmony import */ var _stacktrace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30360);
|
7716 |
+
/* harmony import */ var _supports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8823);
|
7717 |
|
7718 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7719 |
|
|
|
7720 |
|
|
|
|
|
7721 |
|
|
|
7722 |
|
7723 |
|
|
|
7724 |
|
7725 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
7726 |
/**
|
7727 |
+
* Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
|
7728 |
+
* - Console API
|
7729 |
+
* - Fetch API
|
7730 |
+
* - XHR API
|
7731 |
+
* - History API
|
7732 |
+
* - DOM API (click/typing)
|
7733 |
+
* - Error API
|
7734 |
+
* - UnhandledRejection API
|
7735 |
*/
|
7736 |
+
var handlers = {};
|
7737 |
+
var instrumented = {};
|
7738 |
+
/** Instruments given API */
|
7739 |
+
function instrument(type) {
|
7740 |
+
if (instrumented[type]) {
|
7741 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7742 |
}
|
7743 |
+
instrumented[type] = true;
|
7744 |
+
switch (type) {
|
7745 |
+
case 'console':
|
7746 |
+
instrumentConsole();
|
7747 |
+
break;
|
7748 |
+
case 'dom':
|
7749 |
+
instrumentDOM();
|
7750 |
+
break;
|
7751 |
+
case 'xhr':
|
7752 |
+
instrumentXHR();
|
7753 |
+
break;
|
7754 |
+
case 'fetch':
|
7755 |
+
instrumentFetch();
|
7756 |
+
break;
|
7757 |
+
case 'history':
|
7758 |
+
instrumentHistory();
|
7759 |
+
break;
|
7760 |
+
case 'error':
|
7761 |
+
instrumentError();
|
7762 |
+
break;
|
7763 |
+
case 'unhandledrejection':
|
7764 |
+
instrumentUnhandledRejection();
|
7765 |
+
break;
|
7766 |
+
default:
|
7767 |
+
_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h && _logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('unknown instrumentation type:', type);
|
7768 |
+
return;
|
7769 |
}
|
7770 |
+
}
|
7771 |
+
/**
|
7772 |
+
* Add handler that will be called when given type of instrumentation triggers.
|
7773 |
+
* Use at your own risk, this might break without changelog notice, only used internally.
|
7774 |
+
* @hidden
|
7775 |
+
*/
|
7776 |
+
function addInstrumentationHandler(type, callback) {
|
7777 |
+
handlers[type] = handlers[type] || [];
|
7778 |
+
handlers[type].push(callback);
|
7779 |
+
instrument(type);
|
7780 |
+
}
|
7781 |
+
/** JSDoc */
|
7782 |
+
function triggerHandlers(type, data) {
|
7783 |
+
var e_1, _a;
|
7784 |
+
if (!type || !handlers[type]) {
|
7785 |
+
return;
|
7786 |
}
|
7787 |
+
try {
|
7788 |
+
for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__values */ .XA)(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {
|
7789 |
+
var handler = _c.value;
|
7790 |
+
try {
|
7791 |
+
handler(data);
|
7792 |
+
}
|
7793 |
+
catch (e) {
|
7794 |
+
_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
|
7795 |
+
_logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + (0,_stacktrace__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(handler) + "\nError:", e);
|
7796 |
+
}
|
7797 |
+
}
|
7798 |
}
|
7799 |
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
7800 |
+
finally {
|
7801 |
+
try {
|
7802 |
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
7803 |
+
}
|
7804 |
+
finally { if (e_1) throw e_1.error; }
|
|
|
7805 |
}
|
7806 |
+
}
|
7807 |
+
/** JSDoc */
|
7808 |
+
function instrumentConsole() {
|
7809 |
+
if (!('console' in global)) {
|
7810 |
+
return;
|
7811 |
+
}
|
7812 |
+
_logger__WEBPACK_IMPORTED_MODULE_2__/* .CONSOLE_LEVELS.forEach */ .RU.forEach(function (level) {
|
7813 |
+
if (!(level in global.console)) {
|
7814 |
+
return;
|
7815 |
+
}
|
7816 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.console, level, function (originalConsoleMethod) {
|
7817 |
+
return function () {
|
7818 |
+
var args = [];
|
7819 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7820 |
+
args[_i] = arguments[_i];
|
7821 |
+
}
|
7822 |
+
triggerHandlers('console', { args: args, level: level });
|
7823 |
+
// this fails for some browsers. :(
|
7824 |
+
if (originalConsoleMethod) {
|
7825 |
+
originalConsoleMethod.apply(global.console, args);
|
7826 |
+
}
|
7827 |
+
};
|
7828 |
+
});
|
7829 |
});
|
7830 |
+
}
|
7831 |
+
/** JSDoc */
|
7832 |
+
function instrumentFetch() {
|
7833 |
+
if (!(0,_supports__WEBPACK_IMPORTED_MODULE_6__/* .supportsNativeFetch */ .t$)()) {
|
7834 |
+
return;
|
7835 |
+
}
|
7836 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global, 'fetch', function (originalFetch) {
|
7837 |
+
return function () {
|
7838 |
+
var args = [];
|
7839 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7840 |
+
args[_i] = arguments[_i];
|
7841 |
+
}
|
7842 |
+
var handlerData = {
|
7843 |
+
args: args,
|
7844 |
+
fetchData: {
|
7845 |
+
method: getFetchMethod(args),
|
7846 |
+
url: getFetchUrl(args),
|
7847 |
+
},
|
7848 |
+
startTimestamp: Date.now(),
|
7849 |
+
};
|
7850 |
+
triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData));
|
7851 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
7852 |
+
return originalFetch.apply(global, args).then(function (response) {
|
7853 |
+
triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData), { endTimestamp: Date.now(), response: response }));
|
7854 |
+
return response;
|
7855 |
+
}, function (error) {
|
7856 |
+
triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData), { endTimestamp: Date.now(), error: error }));
|
7857 |
+
// NOTE: If you are a Sentry user, and you are seeing this stack frame,
|
7858 |
+
// it means the sentry.javascript SDK caught an error invoking your application code.
|
7859 |
+
// This is expected behavior and NOT indicative of a bug with sentry.javascript.
|
7860 |
+
throw error;
|
7861 |
+
});
|
7862 |
+
};
|
7863 |
+
});
|
7864 |
+
}
|
7865 |
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
7866 |
+
/** Extract `method` from fetch call arguments */
|
7867 |
+
function getFetchMethod(fetchArgs) {
|
7868 |
+
if (fetchArgs === void 0) { fetchArgs = []; }
|
7869 |
+
if ('Request' in global && (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isInstanceOf */ .V9)(fetchArgs[0], Request) && fetchArgs[0].method) {
|
7870 |
+
return String(fetchArgs[0].method).toUpperCase();
|
7871 |
+
}
|
7872 |
+
if (fetchArgs[1] && fetchArgs[1].method) {
|
7873 |
+
return String(fetchArgs[1].method).toUpperCase();
|
7874 |
+
}
|
7875 |
+
return 'GET';
|
7876 |
+
}
|
7877 |
+
/** Extract `url` from fetch call arguments */
|
7878 |
+
function getFetchUrl(fetchArgs) {
|
7879 |
+
if (fetchArgs === void 0) { fetchArgs = []; }
|
7880 |
+
if (typeof fetchArgs[0] === 'string') {
|
7881 |
+
return fetchArgs[0];
|
7882 |
+
}
|
7883 |
+
if ('Request' in global && (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isInstanceOf */ .V9)(fetchArgs[0], Request)) {
|
7884 |
+
return fetchArgs[0].url;
|
7885 |
+
}
|
7886 |
+
return String(fetchArgs[0]);
|
7887 |
+
}
|
7888 |
+
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
7889 |
+
/** JSDoc */
|
7890 |
+
function instrumentXHR() {
|
7891 |
+
if (!('XMLHttpRequest' in global)) {
|
7892 |
+
return;
|
7893 |
+
}
|
7894 |
+
var xhrproto = XMLHttpRequest.prototype;
|
7895 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhrproto, 'open', function (originalOpen) {
|
7896 |
+
return function () {
|
7897 |
+
var args = [];
|
7898 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7899 |
+
args[_i] = arguments[_i];
|
7900 |
+
}
|
7901 |
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
7902 |
+
var xhr = this;
|
7903 |
+
var url = args[1];
|
7904 |
+
var xhrInfo = (xhr.__sentry_xhr__ = {
|
7905 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
7906 |
+
method: (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .HD)(args[0]) ? args[0].toUpperCase() : args[0],
|
7907 |
+
url: args[1],
|
7908 |
+
});
|
7909 |
+
// if Sentry key appears in URL, don't capture it as a request
|
7910 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
7911 |
+
if ((0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .HD)(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {
|
7912 |
+
xhr.__sentry_own_request__ = true;
|
7913 |
+
}
|
7914 |
+
var onreadystatechangeHandler = function () {
|
7915 |
+
if (xhr.readyState === 4) {
|
7916 |
+
try {
|
7917 |
+
// touching statusCode in some platforms throws
|
7918 |
+
// an exception
|
7919 |
+
xhrInfo.status_code = xhr.status;
|
7920 |
+
}
|
7921 |
+
catch (e) {
|
7922 |
+
/* do nothing */
|
7923 |
+
}
|
7924 |
+
triggerHandlers('xhr', {
|
7925 |
+
args: args,
|
7926 |
+
endTimestamp: Date.now(),
|
7927 |
+
startTimestamp: Date.now(),
|
7928 |
+
xhr: xhr,
|
7929 |
+
});
|
7930 |
+
}
|
7931 |
+
};
|
7932 |
+
if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
|
7933 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhr, 'onreadystatechange', function (original) {
|
7934 |
+
return function () {
|
7935 |
+
var readyStateArgs = [];
|
7936 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7937 |
+
readyStateArgs[_i] = arguments[_i];
|
7938 |
+
}
|
7939 |
+
onreadystatechangeHandler();
|
7940 |
+
return original.apply(xhr, readyStateArgs);
|
7941 |
+
};
|
7942 |
+
});
|
7943 |
+
}
|
7944 |
+
else {
|
7945 |
+
xhr.addEventListener('readystatechange', onreadystatechangeHandler);
|
7946 |
+
}
|
7947 |
+
return originalOpen.apply(xhr, args);
|
7948 |
+
};
|
7949 |
+
});
|
7950 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhrproto, 'send', function (originalSend) {
|
7951 |
+
return function () {
|
7952 |
+
var args = [];
|
7953 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7954 |
+
args[_i] = arguments[_i];
|
7955 |
+
}
|
7956 |
+
if (this.__sentry_xhr__ && args[0] !== undefined) {
|
7957 |
+
this.__sentry_xhr__.body = args[0];
|
7958 |
+
}
|
7959 |
+
triggerHandlers('xhr', {
|
7960 |
+
args: args,
|
7961 |
+
startTimestamp: Date.now(),
|
7962 |
+
xhr: this,
|
7963 |
+
});
|
7964 |
+
return originalSend.apply(this, args);
|
7965 |
+
};
|
7966 |
+
});
|
7967 |
+
}
|
7968 |
+
var lastHref;
|
7969 |
+
/** JSDoc */
|
7970 |
+
function instrumentHistory() {
|
7971 |
+
if (!(0,_supports__WEBPACK_IMPORTED_MODULE_6__/* .supportsHistory */ .Bf)()) {
|
7972 |
+
return;
|
7973 |
+
}
|
7974 |
+
var oldOnPopState = global.onpopstate;
|
7975 |
+
global.onpopstate = function () {
|
7976 |
+
var args = [];
|
7977 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
7978 |
+
args[_i] = arguments[_i];
|
7979 |
+
}
|
7980 |
+
var to = global.location.href;
|
7981 |
+
// keep track of the current URL state, as we always receive only the updated state
|
7982 |
+
var from = lastHref;
|
7983 |
+
lastHref = to;
|
7984 |
+
triggerHandlers('history', {
|
7985 |
+
from: from,
|
7986 |
+
to: to,
|
7987 |
+
});
|
7988 |
+
if (oldOnPopState) {
|
7989 |
+
// Apparently this can throw in Firefox when incorrectly implemented plugin is installed.
|
7990 |
+
// https://github.com/getsentry/sentry-javascript/issues/3344
|
7991 |
+
// https://github.com/bugsnag/bugsnag-js/issues/469
|
7992 |
+
try {
|
7993 |
+
return oldOnPopState.apply(this, args);
|
7994 |
+
}
|
7995 |
+
catch (_oO) {
|
7996 |
+
// no-empty
|
7997 |
+
}
|
7998 |
+
}
|
7999 |
+
};
|
8000 |
+
/** @hidden */
|
8001 |
+
function historyReplacementFunction(originalHistoryFunction) {
|
8002 |
+
return function () {
|
8003 |
+
var args = [];
|
8004 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
8005 |
+
args[_i] = arguments[_i];
|
8006 |
+
}
|
8007 |
+
var url = args.length > 2 ? args[2] : undefined;
|
8008 |
+
if (url) {
|
8009 |
+
// coerce to string (this is what pushState does)
|
8010 |
+
var from = lastHref;
|
8011 |
+
var to = String(url);
|
8012 |
+
// keep track of the current URL state, as we always receive only the updated state
|
8013 |
+
lastHref = to;
|
8014 |
+
triggerHandlers('history', {
|
8015 |
+
from: from,
|
8016 |
+
to: to,
|
8017 |
+
});
|
8018 |
+
}
|
8019 |
+
return originalHistoryFunction.apply(this, args);
|
8020 |
+
};
|
8021 |
+
}
|
8022 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.history, 'pushState', historyReplacementFunction);
|
8023 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.history, 'replaceState', historyReplacementFunction);
|
8024 |
+
}
|
8025 |
+
var debounceDuration = 1000;
|
8026 |
+
var debounceTimerID;
|
8027 |
+
var lastCapturedEvent;
|
8028 |
+
/**
|
8029 |
+
* Decide whether the current event should finish the debounce of previously captured one.
|
8030 |
+
* @param previous previously captured event
|
8031 |
+
* @param current event to be captured
|
8032 |
+
*/
|
8033 |
+
function shouldShortcircuitPreviousDebounce(previous, current) {
|
8034 |
+
// If there was no previous event, it should always be swapped for the new one.
|
8035 |
+
if (!previous) {
|
8036 |
+
return true;
|
8037 |
+
}
|
8038 |
+
// If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.
|
8039 |
+
if (previous.type !== current.type) {
|
8040 |
+
return true;
|
8041 |
+
}
|
8042 |
+
try {
|
8043 |
+
// If both events have the same type, it's still possible that actions were performed on different targets.
|
8044 |
+
// e.g. 2 clicks on different buttons.
|
8045 |
+
if (previous.target !== current.target) {
|
8046 |
+
return true;
|
8047 |
+
}
|
8048 |
+
}
|
8049 |
+
catch (e) {
|
8050 |
+
// just accessing `target` property can throw an exception in some rare circumstances
|
8051 |
+
// see: https://github.com/getsentry/sentry-javascript/issues/838
|
8052 |
+
}
|
8053 |
+
// If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_
|
8054 |
+
// to which an event listener was attached), we treat them as the same action, as we want to capture
|
8055 |
+
// only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.
|
8056 |
+
return false;
|
8057 |
+
}
|
8058 |
+
/**
|
8059 |
+
* Decide whether an event should be captured.
|
8060 |
+
* @param event event to be captured
|
8061 |
+
*/
|
8062 |
+
function shouldSkipDOMEvent(event) {
|
8063 |
+
// We are only interested in filtering `keypress` events for now.
|
8064 |
+
if (event.type !== 'keypress') {
|
8065 |
+
return false;
|
8066 |
+
}
|
8067 |
+
try {
|
8068 |
+
var target = event.target;
|
8069 |
+
if (!target || !target.tagName) {
|
8070 |
+
return true;
|
8071 |
+
}
|
8072 |
+
// Only consider keypress events on actual input elements. This will disregard keypresses targeting body
|
8073 |
+
// e.g.tabbing through elements, hotkeys, etc.
|
8074 |
+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
|
8075 |
+
return false;
|
8076 |
+
}
|
8077 |
+
}
|
8078 |
+
catch (e) {
|
8079 |
+
// just accessing `target` property can throw an exception in some rare circumstances
|
8080 |
+
// see: https://github.com/getsentry/sentry-javascript/issues/838
|
8081 |
+
}
|
8082 |
+
return true;
|
8083 |
+
}
|
8084 |
+
/**
|
8085 |
+
* Wraps addEventListener to capture UI breadcrumbs
|
8086 |
+
* @param handler function that will be triggered
|
8087 |
+
* @param globalListener indicates whether event was captured by the global event listener
|
8088 |
+
* @returns wrapped breadcrumb events handler
|
8089 |
+
* @hidden
|
8090 |
+
*/
|
8091 |
+
function makeDOMEventHandler(handler, globalListener) {
|
8092 |
+
if (globalListener === void 0) { globalListener = false; }
|
8093 |
+
return function (event) {
|
8094 |
+
// It's possible this handler might trigger multiple times for the same
|
8095 |
+
// event (e.g. event propagation through node ancestors).
|
8096 |
+
// Ignore if we've already captured that event.
|
8097 |
+
if (!event || lastCapturedEvent === event) {
|
8098 |
+
return;
|
8099 |
+
}
|
8100 |
+
// We always want to skip _some_ events.
|
8101 |
+
if (shouldSkipDOMEvent(event)) {
|
8102 |
+
return;
|
8103 |
+
}
|
8104 |
+
var name = event.type === 'keypress' ? 'input' : event.type;
|
8105 |
+
// If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.
|
8106 |
+
if (debounceTimerID === undefined) {
|
8107 |
+
handler({
|
8108 |
+
event: event,
|
8109 |
+
name: name,
|
8110 |
+
global: globalListener,
|
8111 |
+
});
|
8112 |
+
lastCapturedEvent = event;
|
8113 |
+
}
|
8114 |
+
// If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
|
8115 |
+
// If that's the case, emit the previous event and store locally the newly-captured DOM event.
|
8116 |
+
else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
|
8117 |
+
handler({
|
8118 |
+
event: event,
|
8119 |
+
name: name,
|
8120 |
+
global: globalListener,
|
8121 |
+
});
|
8122 |
+
lastCapturedEvent = event;
|
8123 |
+
}
|
8124 |
+
// Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
|
8125 |
+
clearTimeout(debounceTimerID);
|
8126 |
+
debounceTimerID = global.setTimeout(function () {
|
8127 |
+
debounceTimerID = undefined;
|
8128 |
+
}, debounceDuration);
|
8129 |
+
};
|
8130 |
+
}
|
8131 |
+
/** JSDoc */
|
8132 |
+
function instrumentDOM() {
|
8133 |
+
if (!('document' in global)) {
|
8134 |
+
return;
|
8135 |
+
}
|
8136 |
+
// Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
|
8137 |
+
// handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before
|
8138 |
+
// we instrument `addEventListener` so that we don't end up attaching this handler twice.
|
8139 |
+
var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
|
8140 |
+
var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
|
8141 |
+
global.document.addEventListener('click', globalDOMEventHandler, false);
|
8142 |
+
global.document.addEventListener('keypress', globalDOMEventHandler, false);
|
8143 |
+
// After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
|
8144 |
+
// clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
|
8145 |
+
// way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
|
8146 |
+
// could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still
|
8147 |
+
// guaranteed to fire at least once.)
|
8148 |
+
['EventTarget', 'Node'].forEach(function (target) {
|
8149 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
8150 |
+
var proto = global[target] && global[target].prototype;
|
8151 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
|
8152 |
+
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
|
8153 |
+
return;
|
8154 |
+
}
|
8155 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(proto, 'addEventListener', function (originalAddEventListener) {
|
8156 |
+
return function (type, listener, options) {
|
8157 |
+
if (type === 'click' || type == 'keypress') {
|
8158 |
+
try {
|
8159 |
+
var el = this;
|
8160 |
+
var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});
|
8161 |
+
var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });
|
8162 |
+
if (!handlerForType.handler) {
|
8163 |
+
var handler = makeDOMEventHandler(triggerDOMHandler);
|
8164 |
+
handlerForType.handler = handler;
|
8165 |
+
originalAddEventListener.call(this, type, handler, options);
|
8166 |
+
}
|
8167 |
+
handlerForType.refCount += 1;
|
8168 |
+
}
|
8169 |
+
catch (e) {
|
8170 |
+
// Accessing dom properties is always fragile.
|
8171 |
+
// Also allows us to skip `addEventListenrs` calls with no proper `this` context.
|
8172 |
+
}
|
8173 |
+
}
|
8174 |
+
return originalAddEventListener.call(this, type, listener, options);
|
8175 |
+
};
|
8176 |
+
});
|
8177 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(proto, 'removeEventListener', function (originalRemoveEventListener) {
|
8178 |
+
return function (type, listener, options) {
|
8179 |
+
if (type === 'click' || type == 'keypress') {
|
8180 |
+
try {
|
8181 |
+
var el = this;
|
8182 |
+
var handlers_2 = el.__sentry_instrumentation_handlers__ || {};
|
8183 |
+
var handlerForType = handlers_2[type];
|
8184 |
+
if (handlerForType) {
|
8185 |
+
handlerForType.refCount -= 1;
|
8186 |
+
// If there are no longer any custom handlers of the current type on this element, we can remove ours, too.
|
8187 |
+
if (handlerForType.refCount <= 0) {
|
8188 |
+
originalRemoveEventListener.call(this, type, handlerForType.handler, options);
|
8189 |
+
handlerForType.handler = undefined;
|
8190 |
+
delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete
|
8191 |
+
}
|
8192 |
+
// If there are no longer any custom handlers of any type on this element, cleanup everything.
|
8193 |
+
if (Object.keys(handlers_2).length === 0) {
|
8194 |
+
delete el.__sentry_instrumentation_handlers__;
|
8195 |
+
}
|
8196 |
+
}
|
8197 |
+
}
|
8198 |
+
catch (e) {
|
8199 |
+
// Accessing dom properties is always fragile.
|
8200 |
+
// Also allows us to skip `addEventListenrs` calls with no proper `this` context.
|
8201 |
+
}
|
8202 |
+
}
|
8203 |
+
return originalRemoveEventListener.call(this, type, listener, options);
|
8204 |
+
};
|
8205 |
+
});
|
8206 |
+
});
|
8207 |
+
}
|
8208 |
+
var _oldOnErrorHandler = null;
|
8209 |
+
/** JSDoc */
|
8210 |
+
function instrumentError() {
|
8211 |
+
_oldOnErrorHandler = global.onerror;
|
8212 |
+
global.onerror = function (msg, url, line, column, error) {
|
8213 |
+
triggerHandlers('error', {
|
8214 |
+
column: column,
|
8215 |
+
error: error,
|
8216 |
+
line: line,
|
8217 |
+
msg: msg,
|
8218 |
+
url: url,
|
8219 |
+
});
|
8220 |
+
if (_oldOnErrorHandler) {
|
8221 |
+
// eslint-disable-next-line prefer-rest-params
|
8222 |
+
return _oldOnErrorHandler.apply(this, arguments);
|
8223 |
+
}
|
8224 |
+
return false;
|
8225 |
+
};
|
8226 |
+
}
|
8227 |
+
var _oldOnUnhandledRejectionHandler = null;
|
8228 |
+
/** JSDoc */
|
8229 |
+
function instrumentUnhandledRejection() {
|
8230 |
+
_oldOnUnhandledRejectionHandler = global.onunhandledrejection;
|
8231 |
+
global.onunhandledrejection = function (e) {
|
8232 |
+
triggerHandlers('unhandledrejection', e);
|
8233 |
+
if (_oldOnUnhandledRejectionHandler) {
|
8234 |
+
// eslint-disable-next-line prefer-rest-params
|
8235 |
+
return _oldOnUnhandledRejectionHandler.apply(this, arguments);
|
8236 |
+
}
|
8237 |
+
return true;
|
8238 |
+
};
|
8239 |
+
}
|
8240 |
+
//# sourceMappingURL=instrument.js.map
|
8241 |
|
8242 |
/***/ }),
|
8243 |
|
8244 |
+
/***/ 67597:
|
8245 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
8246 |
|
8247 |
"use strict";
|
8248 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
8249 |
+
/* harmony export */ "VZ": function() { return /* binding */ isError; },
|
8250 |
+
/* harmony export */ "VW": function() { return /* binding */ isErrorEvent; },
|
8251 |
+
/* harmony export */ "TX": function() { return /* binding */ isDOMError; },
|
8252 |
+
/* harmony export */ "fm": function() { return /* binding */ isDOMException; },
|
8253 |
+
/* harmony export */ "HD": function() { return /* binding */ isString; },
|
8254 |
+
/* harmony export */ "pt": function() { return /* binding */ isPrimitive; },
|
8255 |
+
/* harmony export */ "PO": function() { return /* binding */ isPlainObject; },
|
8256 |
+
/* harmony export */ "cO": function() { return /* binding */ isEvent; },
|
8257 |
+
/* harmony export */ "kK": function() { return /* binding */ isElement; },
|
8258 |
+
/* harmony export */ "Kj": function() { return /* binding */ isRegExp; },
|
8259 |
+
/* harmony export */ "J8": function() { return /* binding */ isThenable; },
|
8260 |
+
/* harmony export */ "Cy": function() { return /* binding */ isSyntheticEvent; },
|
8261 |
+
/* harmony export */ "i2": function() { return /* binding */ isNaN; },
|
8262 |
+
/* harmony export */ "V9": function() { return /* binding */ isInstanceOf; }
|
8263 |
+
/* harmony export */ });
|
8264 |
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
8265 |
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
8266 |
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
8267 |
+
var objectToString = Object.prototype.toString;
|
8268 |
/**
|
8269 |
+
* Checks whether given value's type is one of a few Error or Error-like
|
8270 |
+
* {@link isError}.
|
8271 |
*
|
8272 |
+
* @param wat A value to be checked.
|
8273 |
+
* @returns A boolean representing the result.
|
|
|
8274 |
*/
|
8275 |
+
function isError(wat) {
|
8276 |
+
switch (objectToString.call(wat)) {
|
8277 |
+
case '[object Error]':
|
8278 |
+
case '[object Exception]':
|
8279 |
+
case '[object DOMException]':
|
8280 |
+
return true;
|
8281 |
+
default:
|
8282 |
+
return isInstanceOf(wat, Error);
|
8283 |
+
}
|
8284 |
+
}
|
8285 |
+
function isBuiltin(wat, ty) {
|
8286 |
+
return objectToString.call(wat) === "[object " + ty + "]";
|
8287 |
+
}
|
8288 |
+
/**
|
8289 |
+
* Checks whether given value's type is ErrorEvent
|
8290 |
+
* {@link isErrorEvent}.
|
8291 |
+
*
|
8292 |
+
* @param wat A value to be checked.
|
8293 |
+
* @returns A boolean representing the result.
|
8294 |
+
*/
|
8295 |
+
function isErrorEvent(wat) {
|
8296 |
+
return isBuiltin(wat, 'ErrorEvent');
|
8297 |
+
}
|
8298 |
+
/**
|
8299 |
+
* Checks whether given value's type is DOMError
|
8300 |
+
* {@link isDOMError}.
|
8301 |
+
*
|
8302 |
+
* @param wat A value to be checked.
|
8303 |
+
* @returns A boolean representing the result.
|
8304 |
+
*/
|
8305 |
+
function isDOMError(wat) {
|
8306 |
+
return isBuiltin(wat, 'DOMError');
|
8307 |
+
}
|
8308 |
+
/**
|
8309 |
+
* Checks whether given value's type is DOMException
|
8310 |
+
* {@link isDOMException}.
|
8311 |
+
*
|
8312 |
+
* @param wat A value to be checked.
|
8313 |
+
* @returns A boolean representing the result.
|
8314 |
+
*/
|
8315 |
+
function isDOMException(wat) {
|
8316 |
+
return isBuiltin(wat, 'DOMException');
|
8317 |
+
}
|
8318 |
+
/**
|
8319 |
+
* Checks whether given value's type is a string
|
8320 |
+
* {@link isString}.
|
8321 |
+
*
|
8322 |
+
* @param wat A value to be checked.
|
8323 |
+
* @returns A boolean representing the result.
|
8324 |
+
*/
|
8325 |
+
function isString(wat) {
|
8326 |
+
return isBuiltin(wat, 'String');
|
8327 |
+
}
|
8328 |
+
/**
|
8329 |
+
* Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
|
8330 |
+
* {@link isPrimitive}.
|
8331 |
+
*
|
8332 |
+
* @param wat A value to be checked.
|
8333 |
+
* @returns A boolean representing the result.
|
8334 |
+
*/
|
8335 |
+
function isPrimitive(wat) {
|
8336 |
+
return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
|
8337 |
+
}
|
8338 |
+
/**
|
8339 |
+
* Checks whether given value's type is an object literal
|
8340 |
+
* {@link isPlainObject}.
|
8341 |
+
*
|
8342 |
+
* @param wat A value to be checked.
|
8343 |
+
* @returns A boolean representing the result.
|
8344 |
+
*/
|
8345 |
+
function isPlainObject(wat) {
|
8346 |
+
return isBuiltin(wat, 'Object');
|
8347 |
+
}
|
8348 |
+
/**
|
8349 |
+
* Checks whether given value's type is an Event instance
|
8350 |
+
* {@link isEvent}.
|
8351 |
+
*
|
8352 |
+
* @param wat A value to be checked.
|
8353 |
+
* @returns A boolean representing the result.
|
8354 |
+
*/
|
8355 |
+
function isEvent(wat) {
|
8356 |
+
return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
|
8357 |
+
}
|
8358 |
+
/**
|
8359 |
+
* Checks whether given value's type is an Element instance
|
8360 |
+
* {@link isElement}.
|
8361 |
+
*
|
8362 |
+
* @param wat A value to be checked.
|
8363 |
+
* @returns A boolean representing the result.
|
8364 |
+
*/
|
8365 |
+
function isElement(wat) {
|
8366 |
+
return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
|
8367 |
+
}
|
8368 |
+
/**
|
8369 |
+
* Checks whether given value's type is an regexp
|
8370 |
+
* {@link isRegExp}.
|
8371 |
+
*
|
8372 |
+
* @param wat A value to be checked.
|
8373 |
+
* @returns A boolean representing the result.
|
8374 |
+
*/
|
8375 |
+
function isRegExp(wat) {
|
8376 |
+
return isBuiltin(wat, 'RegExp');
|
8377 |
+
}
|
8378 |
+
/**
|
8379 |
+
* Checks whether given value has a then function.
|
8380 |
+
* @param wat A value to be checked.
|
8381 |
+
*/
|
8382 |
+
function isThenable(wat) {
|
8383 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
8384 |
+
return Boolean(wat && wat.then && typeof wat.then === 'function');
|
8385 |
+
}
|
8386 |
+
/**
|
8387 |
+
* Checks whether given value's type is a SyntheticEvent
|
8388 |
+
* {@link isSyntheticEvent}.
|
8389 |
+
*
|
8390 |
+
* @param wat A value to be checked.
|
8391 |
+
* @returns A boolean representing the result.
|
8392 |
+
*/
|
8393 |
+
function isSyntheticEvent(wat) {
|
8394 |
+
return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
|
8395 |
+
}
|
8396 |
+
/**
|
8397 |
+
* Checks whether given value is NaN
|
8398 |
+
* {@link isNaN}.
|
8399 |
+
*
|
8400 |
+
* @param wat A value to be checked.
|
8401 |
+
* @returns A boolean representing the result.
|
8402 |
+
*/
|
8403 |
+
function isNaN(wat) {
|
8404 |
+
return typeof wat === 'number' && wat !== wat;
|
8405 |
+
}
|
8406 |
+
/**
|
8407 |
+
* Checks whether given value's type is an instance of provided constructor.
|
8408 |
+
* {@link isInstanceOf}.
|
8409 |
+
*
|
8410 |
+
* @param wat A value to be checked.
|
8411 |
+
* @param base A constructor to be used in a check.
|
8412 |
+
* @returns A boolean representing the result.
|
8413 |
+
*/
|
8414 |
+
function isInstanceOf(wat, base) {
|
8415 |
+
try {
|
8416 |
+
return wat instanceof base;
|
8417 |
+
}
|
8418 |
+
catch (_e) {
|
8419 |
+
return false;
|
8420 |
+
}
|
8421 |
+
}
|
8422 |
+
//# sourceMappingURL=is.js.map
|
8423 |
|
8424 |
/***/ }),
|
8425 |
|
8426 |
+
/***/ 12343:
|
8427 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
8428 |
|
8429 |
"use strict";
|
8430 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
8431 |
+
/* harmony export */ "RU": function() { return /* binding */ CONSOLE_LEVELS; },
|
8432 |
+
/* harmony export */ "Cf": function() { return /* binding */ consoleSandbox; },
|
8433 |
+
/* harmony export */ "kg": function() { return /* binding */ logger; }
|
8434 |
+
/* harmony export */ });
|
8435 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70655);
|
8436 |
+
/* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88795);
|
8437 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82991);
|
8438 |
|
8439 |
|
|
|
|
|
8440 |
|
8441 |
+
// TODO: Implement different loggers for different environments
|
8442 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
8443 |
+
/** Prefix for logging strings */
|
8444 |
+
var PREFIX = 'Sentry Logger ';
|
8445 |
+
var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
|
8446 |
/**
|
8447 |
+
* Temporarily disable sentry console instrumentations.
|
8448 |
*
|
8449 |
+
* @param callback The function to run against the original `console` messages
|
8450 |
+
* @returns The results of the callback
|
|
|
|
|
8451 |
*/
|
8452 |
+
function consoleSandbox(callback) {
|
8453 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
8454 |
+
if (!('console' in global)) {
|
8455 |
+
return callback();
|
8456 |
+
}
|
8457 |
+
var originalConsole = global.console;
|
8458 |
+
var wrappedLevels = {};
|
8459 |
+
// Restore all wrapped console methods
|
8460 |
+
CONSOLE_LEVELS.forEach(function (level) {
|
8461 |
+
// TODO(v7): Remove this check as it's only needed for Node 6
|
8462 |
+
var originalWrappedFunc = originalConsole[level] && originalConsole[level].__sentry_original__;
|
8463 |
+
if (level in global.console && originalWrappedFunc) {
|
8464 |
+
wrappedLevels[level] = originalConsole[level];
|
8465 |
+
originalConsole[level] = originalWrappedFunc;
|
8466 |
+
}
|
8467 |
+
});
|
8468 |
+
try {
|
8469 |
+
return callback();
|
8470 |
+
}
|
8471 |
+
finally {
|
8472 |
+
// Revert restoration to wrapped state
|
8473 |
+
Object.keys(wrappedLevels).forEach(function (level) {
|
8474 |
+
originalConsole[level] = wrappedLevels[level];
|
8475 |
+
});
|
8476 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8477 |
}
|
8478 |
+
function makeLogger() {
|
8479 |
+
var enabled = false;
|
8480 |
+
var logger = {
|
8481 |
+
enable: function () {
|
8482 |
+
enabled = true;
|
8483 |
+
},
|
8484 |
+
disable: function () {
|
8485 |
+
enabled = false;
|
8486 |
+
},
|
8487 |
+
};
|
8488 |
+
if (_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h) {
|
8489 |
+
CONSOLE_LEVELS.forEach(function (name) {
|
8490 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
8491 |
+
logger[name] = function () {
|
8492 |
+
var args = [];
|
8493 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
8494 |
+
args[_i] = arguments[_i];
|
8495 |
+
}
|
8496 |
+
if (enabled) {
|
8497 |
+
consoleSandbox(function () {
|
8498 |
+
var _a;
|
8499 |
+
(_a = global.console)[name].apply(_a, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__spread */ .fl)([PREFIX + "[" + name + "]:"], args));
|
8500 |
+
});
|
8501 |
+
}
|
8502 |
+
};
|
8503 |
+
});
|
8504 |
+
}
|
8505 |
+
else {
|
8506 |
+
CONSOLE_LEVELS.forEach(function (name) {
|
8507 |
+
logger[name] = function () { return undefined; };
|
8508 |
+
});
|
8509 |
+
}
|
8510 |
+
return logger;
|
8511 |
+
}
|
8512 |
+
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
8513 |
+
var logger;
|
8514 |
+
if (_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h) {
|
8515 |
+
logger = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalSingleton */ .Y)('logger', makeLogger);
|
8516 |
+
}
|
8517 |
+
else {
|
8518 |
+
logger = makeLogger();
|
8519 |
}
|
8520 |
|
8521 |
+
//# sourceMappingURL=logger.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8522 |
|
8523 |
+
/***/ }),
|
|
|
8524 |
|
8525 |
+
/***/ 62844:
|
8526 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
8527 |
|
8528 |
+
"use strict";
|
8529 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
8530 |
+
/* harmony export */ "DM": function() { return /* binding */ uuid4; },
|
8531 |
+
/* harmony export */ "en": function() { return /* binding */ parseUrl; },
|
8532 |
+
/* harmony export */ "jH": function() { return /* binding */ getEventDescription; },
|
8533 |
+
/* harmony export */ "Db": function() { return /* binding */ addExceptionTypeValue; },
|
8534 |
+
/* harmony export */ "EG": function() { return /* binding */ addExceptionMechanism; },
|
8535 |
+
/* harmony export */ "YO": function() { return /* binding */ checkOrSetAlreadyCaught; }
|
8536 |
+
/* harmony export */ });
|
8537 |
+
/* unused harmony exports parseSemver, addContextToFrame, stripUrlQueryAndFragment */
|
8538 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70655);
|
8539 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82991);
|
8540 |
+
/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20535);
|
8541 |
|
|
|
8542 |
|
|
|
|
|
|
|
8543 |
|
8544 |
+
|
8545 |
+
/**
|
8546 |
+
* UUID4 generator
|
8547 |
+
*
|
8548 |
+
* @returns string Generated UUID4.
|
8549 |
+
*/
|
8550 |
+
function uuid4() {
|
8551 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
8552 |
+
var crypto = global.crypto || global.msCrypto;
|
8553 |
+
if (!(crypto === void 0) && crypto.getRandomValues) {
|
8554 |
+
// Use window.crypto API if available
|
8555 |
+
var arr = new Uint16Array(8);
|
8556 |
+
crypto.getRandomValues(arr);
|
8557 |
+
// set 4 in byte 7
|
8558 |
+
// eslint-disable-next-line no-bitwise
|
8559 |
+
arr[3] = (arr[3] & 0xfff) | 0x4000;
|
8560 |
+
// set 2 most significant bits of byte 9 to '10'
|
8561 |
+
// eslint-disable-next-line no-bitwise
|
8562 |
+
arr[4] = (arr[4] & 0x3fff) | 0x8000;
|
8563 |
+
var pad = function (num) {
|
8564 |
+
var v = num.toString(16);
|
8565 |
+
while (v.length < 4) {
|
8566 |
+
v = "0" + v;
|
8567 |
+
}
|
8568 |
+
return v;
|
8569 |
+
};
|
8570 |
+
return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));
|
8571 |
}
|
8572 |
+
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
|
8573 |
+
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
8574 |
+
// eslint-disable-next-line no-bitwise
|
8575 |
+
var r = (Math.random() * 16) | 0;
|
8576 |
+
// eslint-disable-next-line no-bitwise
|
8577 |
+
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
8578 |
+
return v.toString(16);
|
8579 |
+
});
|
8580 |
+
}
|
8581 |
+
/**
|
8582 |
+
* Parses string form of URL into an object
|
8583 |
+
* // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
|
8584 |
+
* // intentionally using regex and not <a/> href parsing trick because React Native and other
|
8585 |
+
* // environments where DOM might not be available
|
8586 |
+
* @returns parsed URL object
|
8587 |
+
*/
|
8588 |
+
function parseUrl(url) {
|
8589 |
+
if (!url) {
|
8590 |
+
return {};
|
8591 |
}
|
8592 |
+
var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
|
8593 |
+
if (!match) {
|
8594 |
+
return {};
|
8595 |
}
|
8596 |
+
// coerce to undefined values to empty string so we don't get 'undefined'
|
8597 |
+
var query = match[6] || '';
|
8598 |
+
var fragment = match[8] || '';
|
8599 |
+
return {
|
8600 |
+
host: match[4],
|
8601 |
+
path: match[5],
|
8602 |
+
protocol: match[2],
|
8603 |
+
relative: match[5] + query + fragment,
|
8604 |
+
};
|
8605 |
+
}
|
8606 |
+
function getFirstException(event) {
|
8607 |
+
return event.exception && event.exception.values ? event.exception.values[0] : undefined;
|
8608 |
+
}
|
8609 |
+
/**
|
8610 |
+
* Extracts either message or type+value from an event that can be used for user-facing logs
|
8611 |
+
* @returns event's description
|
8612 |
+
*/
|
8613 |
+
function getEventDescription(event) {
|
8614 |
+
var message = event.message, eventId = event.event_id;
|
8615 |
+
if (message) {
|
8616 |
+
return message;
|
8617 |
}
|
8618 |
+
var firstException = getFirstException(event);
|
8619 |
+
if (firstException) {
|
8620 |
+
if (firstException.type && firstException.value) {
|
8621 |
+
return firstException.type + ": " + firstException.value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8622 |
}
|
8623 |
+
return firstException.type || firstException.value || eventId || '<unknown>';
|
8624 |
}
|
8625 |
+
return eventId || '<unknown>';
|
8626 |
+
}
|
8627 |
+
/**
|
8628 |
+
* Adds exception values, type and value to an synthetic Exception.
|
8629 |
+
* @param event The event to modify.
|
8630 |
+
* @param value Value of the exception.
|
8631 |
+
* @param type Type of the exception.
|
8632 |
+
* @hidden
|
8633 |
+
*/
|
8634 |
+
function addExceptionTypeValue(event, value, type) {
|
8635 |
+
var exception = (event.exception = event.exception || {});
|
8636 |
+
var values = (exception.values = exception.values || []);
|
8637 |
+
var firstException = (values[0] = values[0] || {});
|
8638 |
+
if (!firstException.value) {
|
8639 |
+
firstException.value = value || '';
|
8640 |
+
}
|
8641 |
+
if (!firstException.type) {
|
8642 |
+
firstException.type = type || 'Error';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8643 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8644 |
}
|
|
|
8645 |
/**
|
8646 |
+
* Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
|
8647 |
*
|
8648 |
+
* @param event The event to modify.
|
8649 |
+
* @param newMechanism Mechanism data to add to the event.
|
8650 |
+
* @hidden
|
8651 |
*/
|
8652 |
+
function addExceptionMechanism(event, newMechanism) {
|
8653 |
+
var firstException = getFirstException(event);
|
8654 |
+
if (!firstException) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8655 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8656 |
}
|
8657 |
+
var defaultMechanism = { type: 'generic', handled: true };
|
8658 |
+
var currentMechanism = firstException.mechanism;
|
8659 |
+
firstException.mechanism = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({}, defaultMechanism), currentMechanism), newMechanism);
|
8660 |
+
if (newMechanism && 'data' in newMechanism) {
|
8661 |
+
var mergedData = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({}, (currentMechanism && currentMechanism.data)), newMechanism.data);
|
8662 |
+
firstException.mechanism.data = mergedData;
|
8663 |
+
}
|
8664 |
+
}
|
8665 |
+
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
8666 |
+
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
8667 |
+
/**
|
8668 |
+
* Parses input into a SemVer interface
|
8669 |
+
* @param input string representation of a semver version
|
8670 |
+
*/
|
8671 |
+
function parseSemver(input) {
|
8672 |
+
var match = input.match(SEMVER_REGEXP) || [];
|
8673 |
+
var major = parseInt(match[1], 10);
|
8674 |
+
var minor = parseInt(match[2], 10);
|
8675 |
+
var patch = parseInt(match[3], 10);
|
8676 |
+
return {
|
8677 |
+
buildmetadata: match[5],
|
8678 |
+
major: isNaN(major) ? undefined : major,
|
8679 |
+
minor: isNaN(minor) ? undefined : minor,
|
8680 |
+
patch: isNaN(patch) ? undefined : patch,
|
8681 |
+
prerelease: match[4],
|
8682 |
+
};
|
8683 |
+
}
|
8684 |
+
/**
|
8685 |
+
* This function adds context (pre/post/line) lines to the provided frame
|
8686 |
+
*
|
8687 |
+
* @param lines string[] containing all lines
|
8688 |
+
* @param frame StackFrame that will be mutated
|
8689 |
+
* @param linesOfContext number of context lines we want to add pre/post
|
8690 |
+
*/
|
8691 |
+
function addContextToFrame(lines, frame, linesOfContext) {
|
8692 |
+
if (linesOfContext === void 0) { linesOfContext = 5; }
|
8693 |
+
var lineno = frame.lineno || 0;
|
8694 |
+
var maxLines = lines.length;
|
8695 |
+
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
|
8696 |
+
frame.pre_context = lines
|
8697 |
+
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
|
8698 |
+
.map(function (line) { return snipLine(line, 0); });
|
8699 |
+
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
|
8700 |
+
frame.post_context = lines
|
8701 |
+
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
|
8702 |
+
.map(function (line) { return snipLine(line, 0); });
|
8703 |
+
}
|
8704 |
+
/**
|
8705 |
+
* Strip the query string and fragment off of a given URL or path (if present)
|
8706 |
+
*
|
8707 |
+
* @param urlPath Full URL or path, including possible query string and/or fragment
|
8708 |
+
* @returns URL or path without query string or fragment
|
8709 |
+
*/
|
8710 |
+
function stripUrlQueryAndFragment(urlPath) {
|
8711 |
+
// eslint-disable-next-line no-useless-escape
|
8712 |
+
return urlPath.split(/[\?#]/, 1)[0];
|
8713 |
+
}
|
8714 |
+
/**
|
8715 |
+
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
|
8716 |
+
* in question), and marks it captured if not.
|
8717 |
+
*
|
8718 |
+
* This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
|
8719 |
+
* record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
|
8720 |
+
* that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
|
8721 |
+
* the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
|
8722 |
+
* caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
|
8723 |
+
* function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
|
8724 |
+
* see it.
|
8725 |
+
*
|
8726 |
+
* Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
|
8727 |
+
* them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
|
8728 |
+
* object wrapper forms so that this check will always work. However, because we need to flag the exact object which
|
8729 |
+
* will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification
|
8730 |
+
* must be done before the exception captured.
|
8731 |
+
*
|
8732 |
+
* @param A thrown exception to check or flag as having been seen
|
8733 |
+
* @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
|
8734 |
+
*/
|
8735 |
+
function checkOrSetAlreadyCaught(exception) {
|
8736 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
8737 |
+
if (exception && exception.__sentry_captured__) {
|
8738 |
+
return true;
|
8739 |
+
}
|
8740 |
+
try {
|
8741 |
+
// set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
|
8742 |
+
// `ExtraErrorData` integration
|
8743 |
+
(0,_object__WEBPACK_IMPORTED_MODULE_2__/* .addNonEnumerableProperty */ .xp)(exception, '__sentry_captured__', true);
|
8744 |
+
}
|
8745 |
+
catch (err) {
|
8746 |
+
// `exception` is a primitive, so we can't mark it seen
|
8747 |
+
}
|
8748 |
+
return false;
|
8749 |
+
}
|
8750 |
+
//# sourceMappingURL=misc.js.map
|
8751 |
|
8752 |
/***/ }),
|
8753 |
|
8754 |
+
/***/ 72176:
|
8755 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8756 |
|
8757 |
"use strict";
|
8758 |
|
8759 |
+
// EXPORTS
|
8760 |
+
__webpack_require__.d(__webpack_exports__, {
|
8761 |
+
"l$": function() { return /* binding */ dynamicRequire; },
|
8762 |
+
"KV": function() { return /* binding */ isNodeEnv; },
|
8763 |
+
"$y": function() { return /* binding */ loadModule; }
|
8764 |
+
});
|
8765 |
|
8766 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/env.js
|
8767 |
+
/*
|
8768 |
+
* This module exists for optimizations in the build process through rollup and terser. We define some global
|
8769 |
+
* constants, which can be overridden during build. By guarding certain pieces of code with functions that return these
|
8770 |
+
* constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will
|
8771 |
+
* never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to
|
8772 |
+
* `logger` and preventing node-related code from appearing in browser bundles.
|
8773 |
+
*
|
8774 |
+
* Attention:
|
8775 |
+
* This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by
|
8776 |
+
* users. These fags should live in their respective packages, as we identified user tooling (specifically webpack)
|
8777 |
+
* having issues tree-shaking these constants across package boundaries.
|
8778 |
+
* An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want
|
8779 |
+
* users to be able to shake away expressions that it guards.
|
8780 |
+
*/
|
8781 |
/**
|
8782 |
+
* Figures out if we're building a browser bundle.
|
8783 |
*
|
8784 |
+
* @returns true if this is a browser bundle build.
|
8785 |
+
*/
|
8786 |
+
function isBrowserBundle() {
|
8787 |
+
return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
|
8788 |
+
}
|
8789 |
+
//# sourceMappingURL=env.js.map
|
8790 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/node.js
|
8791 |
+
/* module decorator */ module = __webpack_require__.hmd(module);
|
8792 |
+
/**
|
8793 |
+
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
|
8794 |
+
* you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
|
8795 |
*/
|
|
|
|
|
|
|
|
|
|
|
8796 |
|
8797 |
+
/**
|
8798 |
+
* Checks whether we're in the Node.js or Browser environment
|
8799 |
+
*
|
8800 |
+
* @returns Answer to given question
|
8801 |
+
*/
|
8802 |
+
function isNodeEnv() {
|
8803 |
+
// explicitly check for browser bundles as those can be optimized statically
|
8804 |
+
// by terser/rollup.
|
8805 |
+
return (!isBrowserBundle() &&
|
8806 |
+
Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');
|
8807 |
+
}
|
8808 |
+
/**
|
8809 |
+
* Requires a module which is protected against bundler minification.
|
8810 |
+
*
|
8811 |
+
* @param request The module path to resolve
|
8812 |
+
*/
|
8813 |
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
8814 |
+
function dynamicRequire(mod, request) {
|
8815 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
8816 |
+
return mod.require(request);
|
8817 |
+
}
|
8818 |
+
/**
|
8819 |
+
* Helper for dynamically loading module that should work with linked dependencies.
|
8820 |
+
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
|
8821 |
+
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
|
8822 |
+
* build time. `require.resolve` is also not available in any other way, so we cannot create,
|
8823 |
+
* a fake helper like we do with `dynamicRequire`.
|
8824 |
+
*
|
8825 |
+
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
|
8826 |
+
* That is to mimic the behavior of `require.resolve` exactly.
|
8827 |
+
*
|
8828 |
+
* @param moduleName module name to require
|
8829 |
+
* @returns possibly required module
|
8830 |
+
*/
|
8831 |
+
function loadModule(moduleName) {
|
8832 |
+
var mod;
|
8833 |
+
try {
|
8834 |
+
mod = dynamicRequire(module, moduleName);
|
8835 |
+
}
|
8836 |
+
catch (e) {
|
8837 |
+
// no-empty
|
8838 |
+
}
|
8839 |
+
try {
|
8840 |
+
var cwd = dynamicRequire(module, 'process').cwd;
|
8841 |
+
mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
|
8842 |
+
}
|
8843 |
+
catch (e) {
|
8844 |
+
// no-empty
|
8845 |
+
}
|
8846 |
+
return mod;
|
8847 |
+
}
|
8848 |
+
//# sourceMappingURL=node.js.map
|
8849 |
|
8850 |
/***/ }),
|
8851 |
|
8852 |
+
/***/ 20535:
|
8853 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
8854 |
|
8855 |
"use strict";
|
8856 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
8857 |
+
/* harmony export */ "hl": function() { return /* binding */ fill; },
|
8858 |
+
/* harmony export */ "xp": function() { return /* binding */ addNonEnumerableProperty; },
|
8859 |
+
/* harmony export */ "$Q": function() { return /* binding */ markFunctionWrapped; },
|
8860 |
+
/* harmony export */ "HK": function() { return /* binding */ getOriginalFunction; },
|
8861 |
+
/* harmony export */ "_j": function() { return /* binding */ urlEncode; },
|
8862 |
+
/* harmony export */ "Sh": function() { return /* binding */ convertToPlainObject; },
|
8863 |
+
/* harmony export */ "zf": function() { return /* binding */ extractExceptionKeysForMessage; },
|
8864 |
+
/* harmony export */ "Jr": function() { return /* binding */ dropUndefinedKeys; }
|
8865 |
+
/* harmony export */ });
|
8866 |
+
/* unused harmony export objectify */
|
8867 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70655);
|
8868 |
+
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58464);
|
8869 |
+
/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67597);
|
8870 |
+
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57321);
|
8871 |
|
8872 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8873 |
|
|
|
|
|
|
|
|
|
8874 |
|
8875 |
+
/**
|
8876 |
+
* Replace a method in an object with a wrapped version of itself.
|
8877 |
+
*
|
8878 |
+
* @param source An object that contains a method to be wrapped.
|
8879 |
+
* @param name The name of the method to be wrapped.
|
8880 |
+
* @param replacementFactory A higher-order function that takes the original version of the given method and returns a
|
8881 |
+
* wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to
|
8882 |
+
* preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other
|
8883 |
+
* args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.
|
8884 |
+
* @returns void
|
8885 |
+
*/
|
8886 |
+
function fill(source, name, replacementFactory) {
|
8887 |
+
if (!(name in source)) {
|
8888 |
+
return;
|
8889 |
+
}
|
8890 |
+
var original = source[name];
|
8891 |
+
var wrapped = replacementFactory(original);
|
8892 |
+
// Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
|
8893 |
+
// otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
|
8894 |
+
if (typeof wrapped === 'function') {
|
8895 |
+
try {
|
8896 |
+
markFunctionWrapped(wrapped, original);
|
8897 |
}
|
8898 |
+
catch (_Oo) {
|
8899 |
+
// This can throw if multiple fill happens on a global object like XMLHttpRequest
|
8900 |
+
// Fixes https://github.com/getsentry/sentry-javascript/issues/2043
|
8901 |
+
}
|
8902 |
+
}
|
8903 |
+
source[name] = wrapped;
|
8904 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8905 |
/**
|
8906 |
+
* Defines a non-enumerable property on the given object.
|
8907 |
*
|
8908 |
+
* @param obj The object on which to set the property
|
8909 |
+
* @param name The name of the property to be set
|
8910 |
+
* @param value The value to which to set the property
|
8911 |
*/
|
8912 |
+
function addNonEnumerableProperty(obj, name, value) {
|
8913 |
+
Object.defineProperty(obj, name, {
|
8914 |
+
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
|
8915 |
+
value: value,
|
8916 |
+
writable: true,
|
8917 |
+
configurable: true,
|
8918 |
+
});
|
8919 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8920 |
/**
|
8921 |
+
* Remembers the original function on the wrapped function and
|
8922 |
+
* patches up the prototype.
|
8923 |
*
|
8924 |
+
* @param wrapped the wrapper function
|
8925 |
+
* @param original the original function that gets wrapped
|
8926 |
*/
|
8927 |
+
function markFunctionWrapped(wrapped, original) {
|
8928 |
+
var proto = original.prototype || {};
|
8929 |
+
wrapped.prototype = original.prototype = proto;
|
8930 |
+
addNonEnumerableProperty(wrapped, '__sentry_original__', original);
|
8931 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8932 |
/**
|
8933 |
+
* This extracts the original function if available. See
|
8934 |
+
* `markFunctionWrapped` for more information.
|
|
|
|
|
|
|
|
|
|
|
|
|
8935 |
*
|
8936 |
+
* @param func the function to unwrap
|
8937 |
+
* @returns the unwrapped version of the function if available.
|
8938 |
*/
|
8939 |
+
function getOriginalFunction(func) {
|
8940 |
+
return func.__sentry_original__;
|
8941 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8942 |
/**
|
8943 |
+
* Encodes given object into url-friendly format
|
|
|
|
|
8944 |
*
|
8945 |
+
* @param object An object that contains serializable values
|
8946 |
+
* @returns string Encoded
|
8947 |
+
*/
|
8948 |
+
function urlEncode(object) {
|
8949 |
+
return Object.keys(object)
|
8950 |
+
.map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); })
|
8951 |
+
.join('&');
|
8952 |
+
}
|
8953 |
+
/**
|
8954 |
+
* Transforms any object into an object literal with all its attributes
|
8955 |
+
* attached to it.
|
8956 |
*
|
8957 |
+
* @param value Initial source that we have to transform in order for it to be usable by the serializer
|
8958 |
+
*/
|
8959 |
+
function convertToPlainObject(value) {
|
8960 |
+
var newObj = value;
|
8961 |
+
if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isError */ .VZ)(value)) {
|
8962 |
+
newObj = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));
|
8963 |
+
}
|
8964 |
+
else if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(value)) {
|
8965 |
+
var event_1 = value;
|
8966 |
+
newObj = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));
|
8967 |
+
if (typeof CustomEvent !== 'undefined' && (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isInstanceOf */ .V9)(value, CustomEvent)) {
|
8968 |
+
newObj.detail = event_1.detail;
|
8969 |
+
}
|
8970 |
+
}
|
8971 |
+
return newObj;
|
8972 |
+
}
|
8973 |
+
/** Creates a string representation of the target of an `Event` object */
|
8974 |
+
function serializeEventTarget(target) {
|
8975 |
+
try {
|
8976 |
+
return (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isElement */ .kK)(target) ? (0,_browser__WEBPACK_IMPORTED_MODULE_2__/* .htmlTreeAsString */ .R)(target) : Object.prototype.toString.call(target);
|
8977 |
+
}
|
8978 |
+
catch (_oO) {
|
8979 |
+
return '<unknown>';
|
8980 |
+
}
|
8981 |
+
}
|
8982 |
+
/** Filters out all but an object's own properties */
|
8983 |
+
function getOwnProperties(obj) {
|
8984 |
+
var extractedProps = {};
|
8985 |
+
for (var property in obj) {
|
8986 |
+
if (Object.prototype.hasOwnProperty.call(obj, property)) {
|
8987 |
+
extractedProps[property] = obj[property];
|
8988 |
+
}
|
8989 |
+
}
|
8990 |
+
return extractedProps;
|
8991 |
+
}
|
8992 |
+
/**
|
8993 |
+
* Given any captured exception, extract its keys and create a sorted
|
8994 |
+
* and truncated list that will be used inside the event message.
|
8995 |
+
* eg. `Non-error exception captured with keys: foo, bar, baz`
|
8996 |
+
*/
|
8997 |
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
8998 |
+
function extractExceptionKeysForMessage(exception, maxLength) {
|
8999 |
+
if (maxLength === void 0) { maxLength = 40; }
|
9000 |
+
var keys = Object.keys(convertToPlainObject(exception));
|
9001 |
+
keys.sort();
|
9002 |
+
if (!keys.length) {
|
9003 |
+
return '[object has no keys]';
|
9004 |
+
}
|
9005 |
+
if (keys[0].length >= maxLength) {
|
9006 |
+
return (0,_string__WEBPACK_IMPORTED_MODULE_3__/* .truncate */ .$G)(keys[0], maxLength);
|
9007 |
+
}
|
9008 |
+
for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {
|
9009 |
+
var serialized = keys.slice(0, includedKeys).join(', ');
|
9010 |
+
if (serialized.length > maxLength) {
|
9011 |
+
continue;
|
9012 |
+
}
|
9013 |
+
if (includedKeys === keys.length) {
|
9014 |
+
return serialized;
|
9015 |
+
}
|
9016 |
+
return (0,_string__WEBPACK_IMPORTED_MODULE_3__/* .truncate */ .$G)(serialized, maxLength);
|
9017 |
+
}
|
9018 |
+
return '';
|
9019 |
+
}
|
9020 |
+
/**
|
9021 |
+
* Given any object, return the new object with removed keys that value was `undefined`.
|
9022 |
+
* Works recursively on objects and arrays.
|
9023 |
+
*/
|
9024 |
+
function dropUndefinedKeys(val) {
|
9025 |
+
var e_1, _a;
|
9026 |
+
if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isPlainObject */ .PO)(val)) {
|
9027 |
+
var rv = {};
|
9028 |
+
try {
|
9029 |
+
for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__values */ .XA)(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
9030 |
+
var key = _c.value;
|
9031 |
+
if (typeof val[key] !== 'undefined') {
|
9032 |
+
rv[key] = dropUndefinedKeys(val[key]);
|
9033 |
+
}
|
9034 |
+
}
|
9035 |
+
}
|
9036 |
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
9037 |
+
finally {
|
9038 |
+
try {
|
9039 |
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
9040 |
+
}
|
9041 |
+
finally { if (e_1) throw e_1.error; }
|
9042 |
+
}
|
9043 |
+
return rv;
|
9044 |
+
}
|
9045 |
+
if (Array.isArray(val)) {
|
9046 |
+
return val.map(dropUndefinedKeys);
|
9047 |
+
}
|
9048 |
+
return val;
|
9049 |
+
}
|
9050 |
+
/**
|
9051 |
+
* Ensure that something is an object.
|
9052 |
*
|
9053 |
+
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
|
9054 |
+
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
|
|
|
9055 |
*
|
9056 |
+
* @param wat The subject of the objectification
|
9057 |
+
* @returns A version of `wat` which can safely be used with `Object` class methods
|
9058 |
*/
|
9059 |
+
function objectify(wat) {
|
9060 |
+
var objectified;
|
9061 |
+
switch (true) {
|
9062 |
+
case wat === undefined || wat === null:
|
9063 |
+
objectified = new String(wat);
|
9064 |
+
break;
|
9065 |
+
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
|
9066 |
+
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
|
9067 |
+
// an object in order to wrap it.
|
9068 |
+
case typeof wat === 'symbol' || typeof wat === 'bigint':
|
9069 |
+
objectified = Object(wat);
|
9070 |
+
break;
|
9071 |
+
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
|
9072 |
+
case isPrimitive(wat):
|
9073 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
9074 |
+
objectified = new wat.constructor(wat);
|
9075 |
+
break;
|
9076 |
+
// by process of elimination, at this point we know that `wat` must already be an object
|
9077 |
+
default:
|
9078 |
+
objectified = wat;
|
9079 |
+
break;
|
9080 |
+
}
|
9081 |
+
return objectified;
|
9082 |
+
}
|
9083 |
+
//# sourceMappingURL=object.js.map
|
9084 |
|
9085 |
/***/ }),
|
9086 |
|
9087 |
+
/***/ 30360:
|
9088 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
9089 |
|
9090 |
"use strict";
|
9091 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
9092 |
+
/* harmony export */ "pE": function() { return /* binding */ createStackParser; },
|
9093 |
+
/* harmony export */ "$P": function() { return /* binding */ getFunctionName; }
|
9094 |
+
/* harmony export */ });
|
9095 |
+
/* unused harmony export stripSentryFramesAndReverse */
|
9096 |
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70655);
|
9097 |
|
9098 |
+
var STACKTRACE_LIMIT = 50;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9099 |
/**
|
9100 |
+
* Creates a stack parser with the supplied line parsers
|
9101 |
+
*
|
9102 |
+
* StackFrames are returned in the correct order for Sentry Exception
|
9103 |
+
* frames and with Sentry SDK internal frames removed from the top and bottom
|
9104 |
+
*
|
9105 |
*/
|
9106 |
+
function createStackParser() {
|
9107 |
+
var parsers = [];
|
9108 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
9109 |
+
parsers[_i] = arguments[_i];
|
|
|
|
|
|
|
|
|
9110 |
}
|
9111 |
+
var sortedParsers = parsers.sort(function (a, b) { return a[0] - b[0]; }).map(function (p) { return p[1]; });
|
9112 |
+
return function (stack, skipFirst) {
|
9113 |
+
var e_1, _a, e_2, _b;
|
9114 |
+
if (skipFirst === void 0) { skipFirst = 0; }
|
9115 |
+
var frames = [];
|
9116 |
+
try {
|
9117 |
+
for (var _c = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(stack.split('\n').slice(skipFirst)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
9118 |
+
var line = _d.value;
|
9119 |
+
try {
|
9120 |
+
for (var sortedParsers_1 = (e_2 = void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(sortedParsers)), sortedParsers_1_1 = sortedParsers_1.next(); !sortedParsers_1_1.done; sortedParsers_1_1 = sortedParsers_1.next()) {
|
9121 |
+
var parser = sortedParsers_1_1.value;
|
9122 |
+
var frame = parser(line);
|
9123 |
+
if (frame) {
|
9124 |
+
frames.push(frame);
|
9125 |
+
break;
|
9126 |
+
}
|
9127 |
+
}
|
9128 |
+
}
|
9129 |
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
9130 |
+
finally {
|
9131 |
+
try {
|
9132 |
+
if (sortedParsers_1_1 && !sortedParsers_1_1.done && (_b = sortedParsers_1.return)) _b.call(sortedParsers_1);
|
9133 |
+
}
|
9134 |
+
finally { if (e_2) throw e_2.error; }
|
9135 |
+
}
|
9136 |
+
}
|
9137 |
+
}
|
9138 |
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
9139 |
+
finally {
|
9140 |
+
try {
|
9141 |
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
9142 |
+
}
|
9143 |
+
finally { if (e_1) throw e_1.error; }
|
9144 |
+
}
|
9145 |
+
return stripSentryFramesAndReverse(frames);
|
9146 |
+
};
|
9147 |
}
|
|
|
9148 |
/**
|
9149 |
+
* @hidden
|
|
|
|
|
|
|
|
|
9150 |
*/
|
9151 |
+
function stripSentryFramesAndReverse(stack) {
|
9152 |
+
if (!stack.length) {
|
9153 |
+
return [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9154 |
}
|
9155 |
+
var localStack = stack;
|
9156 |
+
var firstFrameFunction = localStack[0].function || '';
|
9157 |
+
var lastFrameFunction = localStack[localStack.length - 1].function || '';
|
9158 |
+
// If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)
|
9159 |
+
if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
|
9160 |
+
localStack = localStack.slice(1);
|
|
|
|
|
|
|
|
|
9161 |
}
|
9162 |
+
// If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)
|
9163 |
+
if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {
|
9164 |
+
localStack = localStack.slice(0, -1);
|
9165 |
+
}
|
9166 |
+
// The frame where the crash happened, should be the last entry in the array
|
9167 |
+
return localStack
|
9168 |
+
.slice(0, STACKTRACE_LIMIT)
|
9169 |
+
.map(function (frame) { return ((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, frame), { filename: frame.filename || localStack[0].filename, function: frame.function || '?' })); })
|
9170 |
+
.reverse();
|
9171 |
+
}
|
9172 |
+
var defaultFunctionName = '<anonymous>';
|
9173 |
/**
|
9174 |
+
* Safely extract function name from itself
|
|
|
|
|
|
|
9175 |
*/
|
9176 |
+
function getFunctionName(fn) {
|
9177 |
+
try {
|
9178 |
+
if (!fn || typeof fn !== 'function') {
|
9179 |
+
return defaultFunctionName;
|
9180 |
+
}
|
9181 |
+
return fn.name || defaultFunctionName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9182 |
}
|
9183 |
+
catch (e) {
|
9184 |
+
// Just accessing custom props in some Selenium environments
|
9185 |
+
// can cause a "Permission denied" exception (see raven-js#495).
|
9186 |
+
return defaultFunctionName;
|
9187 |
}
|
|
|
9188 |
}
|
9189 |
+
//# sourceMappingURL=stacktrace.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
9190 |
|
9191 |
/***/ }),
|
9192 |
|
9193 |
+
/***/ 57321:
|
9194 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
9195 |
|
9196 |
"use strict";
|
9197 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
9198 |
+
/* harmony export */ "$G": function() { return /* binding */ truncate; },
|
9199 |
+
/* harmony export */ "nK": function() { return /* binding */ safeJoin; },
|
9200 |
+
/* harmony export */ "zC": function() { return /* binding */ isMatchingPattern; }
|
9201 |
+
/* harmony export */ });
|
9202 |
+
/* unused harmony exports snipLine, escapeStringForRegex */
|
9203 |
+
/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67597);
|
9204 |
|
9205 |
/**
|
9206 |
+
* Truncates given string to the maximum characters count
|
9207 |
*
|
9208 |
+
* @param str An object that contains serializable values
|
9209 |
+
* @param max Maximum number of characters in truncated string (0 = unlimited)
|
9210 |
+
* @returns string Encoded
|
9211 |
*/
|
9212 |
+
function truncate(str, max) {
|
9213 |
+
if (max === void 0) { max = 0; }
|
9214 |
+
if (typeof str !== 'string' || max === 0) {
|
9215 |
+
return str;
|
9216 |
+
}
|
9217 |
+
return str.length <= max ? str : str.substr(0, max) + "...";
|
9218 |
}
|
|
|
9219 |
/**
|
9220 |
+
* This is basically just `trim_line` from
|
9221 |
+
* https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
|
9222 |
*
|
9223 |
+
* @param str An object that contains serializable values
|
9224 |
+
* @param max Maximum number of characters in truncated string
|
9225 |
+
* @returns string Encoded
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9226 |
*/
|
9227 |
+
function snipLine(line, colno) {
|
9228 |
+
var newLine = line;
|
9229 |
+
var lineLength = newLine.length;
|
9230 |
+
if (lineLength <= 150) {
|
9231 |
+
return newLine;
|
9232 |
+
}
|
9233 |
+
if (colno > lineLength) {
|
9234 |
+
// eslint-disable-next-line no-param-reassign
|
9235 |
+
colno = lineLength;
|
9236 |
+
}
|
9237 |
+
var start = Math.max(colno - 60, 0);
|
9238 |
+
if (start < 5) {
|
9239 |
+
start = 0;
|
9240 |
+
}
|
9241 |
+
var end = Math.min(start + 140, lineLength);
|
9242 |
+
if (end > lineLength - 5) {
|
9243 |
+
end = lineLength;
|
9244 |
+
}
|
9245 |
+
if (end === lineLength) {
|
9246 |
+
start = Math.max(end - 140, 0);
|
9247 |
+
}
|
9248 |
+
newLine = newLine.slice(start, end);
|
9249 |
+
if (start > 0) {
|
9250 |
+
newLine = "'{snip} " + newLine;
|
9251 |
+
}
|
9252 |
+
if (end < lineLength) {
|
9253 |
+
newLine += ' {snip}';
|
9254 |
+
}
|
9255 |
+
return newLine;
|
9256 |
}
|
|
|
9257 |
/**
|
9258 |
+
* Join values in array
|
9259 |
+
* @param input array of values to be joined together
|
9260 |
+
* @param delimiter string to be placed in-between values
|
9261 |
+
* @returns Joined values
|
9262 |
*/
|
9263 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9264 |
+
function safeJoin(input, delimiter) {
|
9265 |
+
if (!Array.isArray(input)) {
|
9266 |
+
return '';
|
9267 |
+
}
|
9268 |
+
var output = [];
|
9269 |
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
9270 |
+
for (var i = 0; i < input.length; i++) {
|
9271 |
+
var value = input[i];
|
9272 |
+
try {
|
9273 |
+
output.push(String(value));
|
9274 |
+
}
|
9275 |
+
catch (e) {
|
9276 |
+
output.push('[value cannot be serialized]');
|
9277 |
+
}
|
9278 |
+
}
|
9279 |
+
return output.join(delimiter);
|
9280 |
}
|
|
|
9281 |
/**
|
9282 |
+
* Checks if the value matches a regex or includes the string
|
9283 |
+
* @param value The string value to be checked against
|
9284 |
+
* @param pattern Either a regex or a string that must be contained in value
|
|
|
9285 |
*/
|
9286 |
+
function isMatchingPattern(value, pattern) {
|
9287 |
+
if (!(0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(value)) {
|
9288 |
+
return false;
|
9289 |
+
}
|
9290 |
+
if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isRegExp */ .Kj)(pattern)) {
|
9291 |
+
return pattern.test(value);
|
9292 |
+
}
|
9293 |
+
if (typeof pattern === 'string') {
|
9294 |
+
return value.indexOf(pattern) !== -1;
|
9295 |
+
}
|
9296 |
+
return false;
|
9297 |
}
|
|
|
9298 |
/**
|
9299 |
+
* Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
|
9300 |
+
* `new RegExp()`.
|
9301 |
*
|
9302 |
+
* Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime
|
9303 |
+
* type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node
|
9304 |
+
* 12+).
|
|
|
|
|
|
|
|
|
|
|
|
|
9305 |
*
|
9306 |
+
* @param regexString The string to escape
|
9307 |
+
* @returns An version of the string with all special regex characters escaped
|
9308 |
*/
|
9309 |
+
function escapeStringForRegex(regexString) {
|
9310 |
+
// escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
|
9311 |
+
// discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
|
9312 |
+
return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
|
9313 |
}
|
9314 |
+
//# sourceMappingURL=string.js.map
|
9315 |
|
9316 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9317 |
|
9318 |
+
/***/ 8823:
|
9319 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
9320 |
|
9321 |
+
"use strict";
|
9322 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
9323 |
+
/* harmony export */ "Ak": function() { return /* binding */ supportsFetch; },
|
9324 |
+
/* harmony export */ "Du": function() { return /* binding */ isNativeFetch; },
|
9325 |
+
/* harmony export */ "t$": function() { return /* binding */ supportsNativeFetch; },
|
9326 |
+
/* harmony export */ "hv": function() { return /* binding */ supportsReferrerPolicy; },
|
9327 |
+
/* harmony export */ "Bf": function() { return /* binding */ supportsHistory; }
|
9328 |
+
/* harmony export */ });
|
9329 |
+
/* unused harmony exports supportsErrorEvent, supportsDOMError, supportsDOMException, supportsReportingObserver */
|
9330 |
+
/* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88795);
|
9331 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82991);
|
9332 |
+
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12343);
|
9333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9335 |
|
9336 |
/**
|
9337 |
+
* Tells whether current environment supports ErrorEvent objects
|
9338 |
+
* {@link supportsErrorEvent}.
|
9339 |
*
|
9340 |
+
* @returns Answer to the given question.
|
|
|
9341 |
*/
|
9342 |
+
function supportsErrorEvent() {
|
9343 |
+
try {
|
9344 |
+
new ErrorEvent('');
|
9345 |
+
return true;
|
9346 |
+
}
|
9347 |
+
catch (e) {
|
9348 |
+
return false;
|
9349 |
+
}
|
9350 |
}
|
|
|
9351 |
/**
|
9352 |
+
* Tells whether current environment supports DOMError objects
|
9353 |
+
* {@link supportsDOMError}.
|
9354 |
*
|
9355 |
+
* @returns Answer to the given question.
|
|
|
9356 |
*/
|
9357 |
+
function supportsDOMError() {
|
9358 |
+
try {
|
9359 |
+
// Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
|
9360 |
+
// 1 argument required, but only 0 present.
|
9361 |
+
// @ts-ignore It really needs 1 argument, not 0.
|
9362 |
+
new DOMError('');
|
9363 |
+
return true;
|
9364 |
+
}
|
9365 |
+
catch (e) {
|
9366 |
+
return false;
|
9367 |
+
}
|
9368 |
}
|
|
|
9369 |
/**
|
9370 |
+
* Tells whether current environment supports DOMException objects
|
9371 |
+
* {@link supportsDOMException}.
|
9372 |
*
|
9373 |
+
* @returns Answer to the given question.
|
|
|
9374 |
*/
|
9375 |
+
function supportsDOMException() {
|
9376 |
+
try {
|
9377 |
+
new DOMException('');
|
9378 |
+
return true;
|
9379 |
+
}
|
9380 |
+
catch (e) {
|
9381 |
+
return false;
|
9382 |
+
}
|
9383 |
}
|
|
|
9384 |
/**
|
9385 |
+
* Tells whether current environment supports Fetch API
|
9386 |
+
* {@link supportsFetch}.
|
9387 |
*
|
9388 |
+
* @returns Answer to the given question.
|
|
|
9389 |
*/
|
9390 |
+
function supportsFetch() {
|
9391 |
+
if (!('fetch' in (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)())) {
|
9392 |
+
return false;
|
9393 |
+
}
|
9394 |
+
try {
|
9395 |
+
new Headers();
|
9396 |
+
new Request('');
|
9397 |
+
new Response();
|
9398 |
+
return true;
|
9399 |
+
}
|
9400 |
+
catch (e) {
|
9401 |
+
return false;
|
9402 |
+
}
|
9403 |
}
|
|
|
9404 |
/**
|
9405 |
+
* isNativeFetch checks if the given function is a native implementation of fetch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9406 |
*/
|
9407 |
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
9408 |
+
function isNativeFetch(func) {
|
9409 |
+
return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9410 |
}
|
|
|
9411 |
/**
|
9412 |
+
* Tells whether current environment supports Fetch API natively
|
9413 |
+
* {@link supportsNativeFetch}.
|
|
|
|
|
|
|
|
|
|
|
9414 |
*
|
9415 |
+
* @returns true if `window.fetch` is natively implemented, false otherwise
|
|
|
9416 |
*/
|
9417 |
+
function supportsNativeFetch() {
|
9418 |
+
if (!supportsFetch()) {
|
9419 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9420 |
}
|
9421 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
9422 |
+
// Fast path to avoid DOM I/O
|
9423 |
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
9424 |
+
if (isNativeFetch(global.fetch)) {
|
9425 |
+
return true;
|
|
|
9426 |
}
|
9427 |
+
// window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
|
9428 |
+
// so create a "pure" iframe to see if that has native fetch
|
9429 |
+
var result = false;
|
9430 |
+
var doc = global.document;
|
9431 |
+
// eslint-disable-next-line deprecation/deprecation
|
9432 |
+
if (doc && typeof doc.createElement === 'function') {
|
9433 |
+
try {
|
9434 |
+
var sandbox = doc.createElement('iframe');
|
9435 |
+
sandbox.hidden = true;
|
9436 |
+
doc.head.appendChild(sandbox);
|
9437 |
+
if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
|
9438 |
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
9439 |
+
result = isNativeFetch(sandbox.contentWindow.fetch);
|
9440 |
+
}
|
9441 |
+
doc.head.removeChild(sandbox);
|
9442 |
+
}
|
9443 |
+
catch (err) {
|
9444 |
+
_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
|
9445 |
+
_logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
|
9446 |
+
}
|
9447 |
+
}
|
9448 |
+
return result;
|
9449 |
}
|
|
|
9450 |
/**
|
9451 |
+
* Tells whether current environment supports ReportingObserver API
|
9452 |
+
* {@link supportsReportingObserver}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9453 |
*
|
9454 |
+
* @returns Answer to the given question.
|
|
|
9455 |
*/
|
9456 |
+
function supportsReportingObserver() {
|
9457 |
+
return 'ReportingObserver' in getGlobalObject();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9458 |
}
|
|
|
9459 |
/**
|
9460 |
+
* Tells whether current environment supports Referrer Policy API
|
9461 |
+
* {@link supportsReferrerPolicy}.
|
9462 |
*
|
9463 |
+
* @returns Answer to the given question.
|
|
|
|
|
|
|
9464 |
*/
|
9465 |
+
function supportsReferrerPolicy() {
|
9466 |
+
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
|
9467 |
+
// (see https://caniuse.com/#feat=referrer-policy),
|
9468 |
+
// it doesn't. And it throws an exception instead of ignoring this parameter...
|
9469 |
+
// REF: https://github.com/getsentry/raven-js/issues/1233
|
9470 |
+
if (!supportsFetch()) {
|
9471 |
+
return false;
|
9472 |
+
}
|
9473 |
+
try {
|
9474 |
+
new Request('_', {
|
9475 |
+
referrerPolicy: 'origin',
|
9476 |
+
});
|
9477 |
+
return true;
|
9478 |
+
}
|
9479 |
+
catch (e) {
|
9480 |
+
return false;
|
9481 |
}
|
|
|
|
|
9482 |
}
|
|
|
9483 |
/**
|
9484 |
+
* Tells whether current environment supports History API
|
9485 |
+
* {@link supportsHistory}.
|
9486 |
*
|
9487 |
+
* @returns Answer to the given question.
|
|
|
9488 |
*/
|
9489 |
+
function supportsHistory() {
|
9490 |
+
// NOTE: in Chrome App environment, touching history.pushState, *even inside
|
9491 |
+
// a try/catch block*, will cause Chrome to output an error to console.error
|
9492 |
+
// borrowed from: https://github.com/angular/angular.js/pull/13945/files
|
9493 |
+
var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
|
9494 |
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
9495 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9496 |
+
var chrome = global.chrome;
|
9497 |
+
var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
|
9498 |
+
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
9499 |
+
var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;
|
9500 |
+
return !isChromePackagedApp && hasHistoryApi;
|
9501 |
}
|
9502 |
+
//# sourceMappingURL=supports.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9503 |
|
9504 |
/***/ }),
|
9505 |
|
9506 |
+
/***/ 96893:
|
9507 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
9508 |
|
9509 |
"use strict";
|
9510 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
9511 |
+
/* harmony export */ "WD": function() { return /* binding */ resolvedSyncPromise; },
|
9512 |
+
/* harmony export */ "$2": function() { return /* binding */ rejectedSyncPromise; },
|
9513 |
+
/* harmony export */ "cW": function() { return /* binding */ SyncPromise; }
|
9514 |
+
/* harmony export */ });
|
9515 |
+
/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67597);
|
9516 |
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
9517 |
+
/* eslint-disable @typescript-eslint/typedef */
|
9518 |
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
9519 |
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9520 |
|
9521 |
/**
|
9522 |
+
* Creates a resolved sync promise.
|
9523 |
+
*
|
9524 |
+
* @param value the value to resolve the promise with
|
9525 |
+
* @returns the resolved sync promise
|
9526 |
*/
|
9527 |
+
function resolvedSyncPromise(value) {
|
9528 |
+
return new SyncPromise(function (resolve) {
|
9529 |
+
resolve(value);
|
9530 |
+
});
|
9531 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9532 |
/**
|
9533 |
+
* Creates a rejected sync promise.
|
9534 |
+
*
|
9535 |
+
* @param value the value to reject the promise with
|
9536 |
+
* @returns the rejected sync promise
|
9537 |
*/
|
9538 |
+
function rejectedSyncPromise(reason) {
|
9539 |
+
return new SyncPromise(function (_, reject) {
|
9540 |
+
reject(reason);
|
9541 |
+
});
|
|
|
|
|
|
|
|
|
|
|
9542 |
}
|
|
|
9543 |
/**
|
9544 |
+
* Thenable class that behaves like a Promise and follows it's interface
|
9545 |
+
* but is not async internally
|
9546 |
+
*/
|
9547 |
+
var SyncPromise = /** @class */ (function () {
|
9548 |
+
function SyncPromise(executor) {
|
9549 |
+
var _this = this;
|
9550 |
+
this._state = 0 /* PENDING */;
|
9551 |
+
this._handlers = [];
|
9552 |
+
/** JSDoc */
|
9553 |
+
this._resolve = function (value) {
|
9554 |
+
_this._setResult(1 /* RESOLVED */, value);
|
9555 |
+
};
|
9556 |
+
/** JSDoc */
|
9557 |
+
this._reject = function (reason) {
|
9558 |
+
_this._setResult(2 /* REJECTED */, reason);
|
9559 |
+
};
|
9560 |
+
/** JSDoc */
|
9561 |
+
this._setResult = function (state, value) {
|
9562 |
+
if (_this._state !== 0 /* PENDING */) {
|
9563 |
+
return;
|
9564 |
+
}
|
9565 |
+
if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isThenable */ .J8)(value)) {
|
9566 |
+
void value.then(_this._resolve, _this._reject);
|
9567 |
+
return;
|
9568 |
+
}
|
9569 |
+
_this._state = state;
|
9570 |
+
_this._value = value;
|
9571 |
+
_this._executeHandlers();
|
9572 |
+
};
|
9573 |
+
/** JSDoc */
|
9574 |
+
this._executeHandlers = function () {
|
9575 |
+
if (_this._state === 0 /* PENDING */) {
|
9576 |
+
return;
|
9577 |
+
}
|
9578 |
+
var cachedHandlers = _this._handlers.slice();
|
9579 |
+
_this._handlers = [];
|
9580 |
+
cachedHandlers.forEach(function (handler) {
|
9581 |
+
if (handler[0]) {
|
9582 |
+
return;
|
9583 |
+
}
|
9584 |
+
if (_this._state === 1 /* RESOLVED */) {
|
9585 |
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
9586 |
+
handler[1](_this._value);
|
9587 |
+
}
|
9588 |
+
if (_this._state === 2 /* REJECTED */) {
|
9589 |
+
handler[2](_this._value);
|
9590 |
+
}
|
9591 |
+
handler[0] = true;
|
9592 |
+
});
|
9593 |
+
};
|
9594 |
+
try {
|
9595 |
+
executor(this._resolve, this._reject);
|
9596 |
+
}
|
9597 |
+
catch (e) {
|
9598 |
+
this._reject(e);
|
9599 |
+
}
|
9600 |
+
}
|
9601 |
+
/** JSDoc */
|
9602 |
+
SyncPromise.prototype.then = function (onfulfilled, onrejected) {
|
9603 |
+
var _this = this;
|
9604 |
+
return new SyncPromise(function (resolve, reject) {
|
9605 |
+
_this._handlers.push([
|
9606 |
+
false,
|
9607 |
+
function (result) {
|
9608 |
+
if (!onfulfilled) {
|
9609 |
+
// TODO: ¯\_(ツ)_/¯
|
9610 |
+
// TODO: FIXME
|
9611 |
+
resolve(result);
|
9612 |
+
}
|
9613 |
+
else {
|
9614 |
+
try {
|
9615 |
+
resolve(onfulfilled(result));
|
9616 |
+
}
|
9617 |
+
catch (e) {
|
9618 |
+
reject(e);
|
9619 |
+
}
|
9620 |
+
}
|
9621 |
+
},
|
9622 |
+
function (reason) {
|
9623 |
+
if (!onrejected) {
|
9624 |
+
reject(reason);
|
9625 |
+
}
|
9626 |
+
else {
|
9627 |
+
try {
|
9628 |
+
resolve(onrejected(reason));
|
9629 |
+
}
|
9630 |
+
catch (e) {
|
9631 |
+
reject(e);
|
9632 |
+
}
|
9633 |
+
}
|
9634 |
+
},
|
9635 |
+
]);
|
9636 |
+
_this._executeHandlers();
|
9637 |
+
});
|
9638 |
+
};
|
9639 |
+
/** JSDoc */
|
9640 |
+
SyncPromise.prototype.catch = function (onrejected) {
|
9641 |
+
return this.then(function (val) { return val; }, onrejected);
|
9642 |
+
};
|
9643 |
+
/** JSDoc */
|
9644 |
+
SyncPromise.prototype.finally = function (onfinally) {
|
9645 |
+
var _this = this;
|
9646 |
+
return new SyncPromise(function (resolve, reject) {
|
9647 |
+
var val;
|
9648 |
+
var isRejected;
|
9649 |
+
return _this.then(function (value) {
|
9650 |
+
isRejected = false;
|
9651 |
+
val = value;
|
9652 |
+
if (onfinally) {
|
9653 |
+
onfinally();
|
9654 |
+
}
|
9655 |
+
}, function (reason) {
|
9656 |
+
isRejected = true;
|
9657 |
+
val = reason;
|
9658 |
+
if (onfinally) {
|
9659 |
+
onfinally();
|
9660 |
+
}
|
9661 |
+
}).then(function () {
|
9662 |
+
if (isRejected) {
|
9663 |
+
reject(val);
|
9664 |
+
return;
|
9665 |
+
}
|
9666 |
+
resolve(val);
|
9667 |
+
});
|
9668 |
+
});
|
9669 |
+
};
|
9670 |
+
return SyncPromise;
|
9671 |
+
}());
|
9672 |
+
|
9673 |
+
//# sourceMappingURL=syncpromise.js.map
|
9674 |
+
|
9675 |
+
/***/ }),
|
9676 |
+
|
9677 |
+
/***/ 21170:
|
9678 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9679 |
+
|
9680 |
+
"use strict";
|
9681 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
9682 |
+
/* harmony export */ "yW": function() { return /* binding */ dateTimestampInSeconds; },
|
9683 |
+
/* harmony export */ "ph": function() { return /* binding */ timestampInSeconds; },
|
9684 |
+
/* harmony export */ "_I": function() { return /* binding */ timestampWithMs; },
|
9685 |
+
/* harmony export */ "Z1": function() { return /* binding */ browserPerformanceTimeOrigin; }
|
9686 |
+
/* harmony export */ });
|
9687 |
+
/* unused harmony exports usingPerformanceAPI, _browserPerformanceTimeOriginMode */
|
9688 |
+
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82991);
|
9689 |
+
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72176);
|
9690 |
+
/* module decorator */ module = __webpack_require__.hmd(module);
|
9691 |
+
|
9692 |
+
|
9693 |
+
/**
|
9694 |
+
* A TimestampSource implementation for environments that do not support the Performance Web API natively.
|
9695 |
*
|
9696 |
+
* Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier
|
9697 |
+
* than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It
|
9698 |
+
* is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration".
|
9699 |
+
*/
|
9700 |
+
var dateTimestampSource = {
|
9701 |
+
nowSeconds: function () { return Date.now() / 1000; },
|
9702 |
+
};
|
9703 |
+
/**
|
9704 |
+
* Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not
|
9705 |
+
* support the API.
|
9706 |
*
|
9707 |
+
* Wrapping the native API works around differences in behavior from different browsers.
|
9708 |
+
*/
|
9709 |
+
function getBrowserPerformance() {
|
9710 |
+
var performance = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)().performance;
|
9711 |
+
if (!performance || !performance.now) {
|
9712 |
+
return undefined;
|
9713 |
+
}
|
9714 |
+
// Replace performance.timeOrigin with our own timeOrigin based on Date.now().
|
9715 |
+
//
|
9716 |
+
// This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +
|
9717 |
+
// performance.now() gives a date arbitrarily in the past.
|
9718 |
+
//
|
9719 |
+
// Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is
|
9720 |
+
// undefined.
|
9721 |
+
//
|
9722 |
+
// The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to
|
9723 |
+
// interact with data coming out of performance entries.
|
9724 |
+
//
|
9725 |
+
// Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that
|
9726 |
+
// might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes
|
9727 |
+
// performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have
|
9728 |
+
// observed skews that can be as long as days, weeks or months.
|
9729 |
+
//
|
9730 |
+
// See https://github.com/getsentry/sentry-javascript/issues/2590.
|
9731 |
+
//
|
9732 |
+
// BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload
|
9733 |
+
// transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation
|
9734 |
+
// transactions of long-lived web pages.
|
9735 |
+
var timeOrigin = Date.now() - performance.now();
|
9736 |
+
return {
|
9737 |
+
now: function () { return performance.now(); },
|
9738 |
+
timeOrigin: timeOrigin,
|
9739 |
+
};
|
9740 |
+
}
|
9741 |
+
/**
|
9742 |
+
* Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't
|
9743 |
+
* implement the API.
|
9744 |
+
*/
|
9745 |
+
function getNodePerformance() {
|
9746 |
+
try {
|
9747 |
+
var perfHooks = (0,_node__WEBPACK_IMPORTED_MODULE_1__/* .dynamicRequire */ .l$)(module, 'perf_hooks');
|
9748 |
+
return perfHooks.performance;
|
9749 |
+
}
|
9750 |
+
catch (_) {
|
9751 |
+
return undefined;
|
9752 |
+
}
|
9753 |
+
}
|
9754 |
+
/**
|
9755 |
+
* The Performance API implementation for the current platform, if available.
|
9756 |
+
*/
|
9757 |
+
var platformPerformance = (0,_node__WEBPACK_IMPORTED_MODULE_1__/* .isNodeEnv */ .KV)() ? getNodePerformance() : getBrowserPerformance();
|
9758 |
+
var timestampSource = platformPerformance === undefined
|
9759 |
+
? dateTimestampSource
|
9760 |
+
: {
|
9761 |
+
nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },
|
9762 |
+
};
|
9763 |
+
/**
|
9764 |
+
* Returns a timestamp in seconds since the UNIX epoch using the Date API.
|
9765 |
+
*/
|
9766 |
+
var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);
|
9767 |
+
/**
|
9768 |
+
* Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
|
9769 |
+
* availability of the Performance API.
|
9770 |
*
|
9771 |
+
* See `usingPerformanceAPI` to test whether the Performance API is used.
|
|
|
|
|
|
|
9772 |
*
|
9773 |
+
* BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is
|
9774 |
+
* asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The
|
9775 |
+
* skew can grow to arbitrary amounts like days, weeks or months.
|
9776 |
+
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
9777 |
+
*/
|
9778 |
+
var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
9779 |
+
// Re-exported with an old name for backwards-compatibility.
|
9780 |
+
var timestampWithMs = timestampInSeconds;
|
9781 |
+
/**
|
9782 |
+
* A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
|
9783 |
*/
|
9784 |
+
var usingPerformanceAPI = platformPerformance !== undefined;
|
9785 |
+
/**
|
9786 |
+
* Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
|
9787 |
+
*/
|
9788 |
+
var _browserPerformanceTimeOriginMode;
|
9789 |
+
/**
|
9790 |
+
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
9791 |
+
* performance API is available.
|
9792 |
+
*/
|
9793 |
+
var browserPerformanceTimeOrigin = (function () {
|
9794 |
+
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
9795 |
+
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
9796 |
+
// data as reliable if they are within a reasonable threshold of the current time.
|
9797 |
+
var performance = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)().performance;
|
9798 |
+
if (!performance || !performance.now) {
|
9799 |
+
_browserPerformanceTimeOriginMode = 'none';
|
9800 |
+
return undefined;
|
9801 |
+
}
|
9802 |
+
var threshold = 3600 * 1000;
|
9803 |
+
var performanceNow = performance.now();
|
9804 |
+
var dateNow = Date.now();
|
9805 |
+
// if timeOrigin isn't available set delta to threshold so it isn't used
|
9806 |
+
var timeOriginDelta = performance.timeOrigin
|
9807 |
+
? Math.abs(performance.timeOrigin + performanceNow - dateNow)
|
9808 |
+
: threshold;
|
9809 |
+
var timeOriginIsReliable = timeOriginDelta < threshold;
|
9810 |
+
// While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin
|
9811 |
+
// is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.
|
9812 |
+
// Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always
|
9813 |
+
// a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the
|
9814 |
+
// Date API.
|
9815 |
+
// eslint-disable-next-line deprecation/deprecation
|
9816 |
+
var navigationStart = performance.timing && performance.timing.navigationStart;
|
9817 |
+
var hasNavigationStart = typeof navigationStart === 'number';
|
9818 |
+
// if navigationStart isn't available set delta to threshold so it isn't used
|
9819 |
+
var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
|
9820 |
+
var navigationStartIsReliable = navigationStartDelta < threshold;
|
9821 |
+
if (timeOriginIsReliable || navigationStartIsReliable) {
|
9822 |
+
// Use the more reliable time origin
|
9823 |
+
if (timeOriginDelta <= navigationStartDelta) {
|
9824 |
+
_browserPerformanceTimeOriginMode = 'timeOrigin';
|
9825 |
+
return performance.timeOrigin;
|
9826 |
+
}
|
9827 |
+
else {
|
9828 |
+
_browserPerformanceTimeOriginMode = 'navigationStart';
|
9829 |
+
return navigationStart;
|
9830 |
+
}
|
9831 |
+
}
|
9832 |
+
// Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
|
9833 |
+
_browserPerformanceTimeOriginMode = 'dateNow';
|
9834 |
+
return dateNow;
|
9835 |
+
})();
|
9836 |
+
//# sourceMappingURL=time.js.map
|
9837 |
|
9838 |
+
/***/ }),
|
|
|
9839 |
|
9840 |
+
/***/ 99601:
|
9841 |
+
/***/ (function(__unused_webpack_module, exports) {
|
|
|
9842 |
|
9843 |
+
"use strict";
|
9844 |
+
var __webpack_unused_export__;
|
|
|
|
|
9845 |
|
9846 |
+
__webpack_unused_export__ = ({ value: true });
|
9847 |
+
function composeRefs() {
|
9848 |
+
var refs = [];
|
9849 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
9850 |
+
refs[_i] = arguments[_i];
|
9851 |
+
}
|
9852 |
+
if (refs.length === 2) { // micro-optimize the hot path
|
9853 |
+
return composeTwoRefs(refs[0], refs[1]) || null;
|
9854 |
+
}
|
9855 |
+
var composedRef = refs.slice(1).reduce(function (semiCombinedRef, refToInclude) { return composeTwoRefs(semiCombinedRef, refToInclude); }, refs[0]);
|
9856 |
+
return composedRef || null;
|
9857 |
+
}
|
9858 |
+
exports.Z = composeRefs;
|
9859 |
+
var composedRefCache = new WeakMap();
|
9860 |
+
function composeTwoRefs(ref1, ref2) {
|
9861 |
+
if (ref1 && ref2) {
|
9862 |
+
var ref1Cache = composedRefCache.get(ref1) || new WeakMap();
|
9863 |
+
composedRefCache.set(ref1, ref1Cache);
|
9864 |
+
var composedRef = ref1Cache.get(ref2) || (function (instance) {
|
9865 |
+
updateRef(ref1, instance);
|
9866 |
+
updateRef(ref2, instance);
|
9867 |
+
});
|
9868 |
+
ref1Cache.set(ref2, composedRef);
|
9869 |
+
return composedRef;
|
9870 |
+
}
|
9871 |
+
if (!ref1) {
|
9872 |
+
return ref2;
|
9873 |
+
}
|
9874 |
+
else {
|
9875 |
+
return ref1;
|
9876 |
+
}
|
9877 |
+
}
|
9878 |
+
function updateRef(ref, instance) {
|
9879 |
+
if (typeof ref === 'function') {
|
9880 |
+
ref(instance);
|
9881 |
+
}
|
9882 |
+
else {
|
9883 |
+
ref.current = instance;
|
9884 |
}
|
9885 |
+
}
|
9886 |
+
//# sourceMappingURL=composeRefs.js.map
|
9887 |
|
9888 |
+
/***/ }),
|
|
|
9889 |
|
9890 |
+
/***/ 9669:
|
9891 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
9892 |
|
9893 |
+
module.exports = __webpack_require__(51609);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9894 |
|
9895 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9896 |
|
9897 |
+
/***/ 55448:
|
9898 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
9899 |
|
9900 |
+
"use strict";
|
|
|
|
|
|
|
9901 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9902 |
|
9903 |
+
var utils = __webpack_require__(64867);
|
9904 |
+
var settle = __webpack_require__(36026);
|
9905 |
+
var cookies = __webpack_require__(4372);
|
9906 |
+
var buildURL = __webpack_require__(15327);
|
9907 |
+
var buildFullPath = __webpack_require__(94097);
|
9908 |
+
var parseHeaders = __webpack_require__(84109);
|
9909 |
+
var isURLSameOrigin = __webpack_require__(67985);
|
9910 |
+
var createError = __webpack_require__(85061);
|
9911 |
+
|
9912 |
+
module.exports = function xhrAdapter(config) {
|
9913 |
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
9914 |
+
var requestData = config.data;
|
9915 |
+
var requestHeaders = config.headers;
|
9916 |
+
var responseType = config.responseType;
|
9917 |
|
9918 |
+
if (utils.isFormData(requestData)) {
|
9919 |
+
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
|
9920 |
}
|
9921 |
|
9922 |
+
var request = new XMLHttpRequest();
|
9923 |
+
|
9924 |
+
// HTTP basic authentication
|
9925 |
+
if (config.auth) {
|
9926 |
+
var username = config.auth.username || '';
|
9927 |
+
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
9928 |
+
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
9929 |
}
|
9930 |
|
9931 |
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
9932 |
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
9933 |
+
|
9934 |
+
// Set the request timeout in MS
|
9935 |
+
request.timeout = config.timeout;
|
9936 |
+
|
9937 |
+
function onloadend() {
|
9938 |
+
if (!request) {
|
9939 |
return;
|
9940 |
}
|
9941 |
+
// Prepare the response
|
9942 |
+
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
9943 |
+
var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
9944 |
+
request.responseText : request.response;
|
9945 |
+
var response = {
|
9946 |
+
data: responseData,
|
9947 |
+
status: request.status,
|
9948 |
+
statusText: request.statusText,
|
9949 |
+
headers: responseHeaders,
|
9950 |
+
config: config,
|
9951 |
+
request: request
|
9952 |
+
};
|
9953 |
|
9954 |
+
settle(resolve, reject, response);
|
|
|
|
|
9955 |
|
9956 |
+
// Clean up request
|
9957 |
+
request = null;
|
9958 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9959 |
|
9960 |
+
if ('onloadend' in request) {
|
9961 |
+
// Use onloadend if available
|
9962 |
+
request.onloadend = onloadend;
|
9963 |
+
} else {
|
9964 |
+
// Listen for ready state to emulate onloadend
|
9965 |
+
request.onreadystatechange = function handleLoad() {
|
9966 |
+
if (!request || request.readyState !== 4) {
|
9967 |
+
return;
|
9968 |
+
}
|
9969 |
|
9970 |
+
// The request errored out and we didn't get a response, this will be
|
9971 |
+
// handled by onerror instead
|
9972 |
+
// With one exception: request that using file: protocol, most browsers
|
9973 |
+
// will return status as 0 even though it's a successful request
|
9974 |
+
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
9975 |
+
return;
|
9976 |
+
}
|
9977 |
+
// readystate handler is calling before onerror or ontimeout handlers,
|
9978 |
+
// so we should call onloadend on the next 'tick'
|
9979 |
+
setTimeout(onloadend);
|
9980 |
+
};
|
9981 |
}
|
9982 |
|
9983 |
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
9984 |
+
request.onabort = function handleAbort() {
|
9985 |
+
if (!request) {
|
9986 |
+
return;
|
9987 |
+
}
|
9988 |
|
9989 |
+
reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
|
|
|
|
9990 |
|
9991 |
+
// Clean up request
|
9992 |
+
request = null;
|
9993 |
+
};
|
|
|
|
|
|
|
9994 |
|
9995 |
+
// Handle low level network errors
|
9996 |
+
request.onerror = function handleError() {
|
9997 |
+
// Real errors are hidden from us by the browser
|
9998 |
+
// onerror should only fire if it's a network error
|
9999 |
+
reject(createError('Network Error', config, null, request));
|
10000 |
|
10001 |
+
// Clean up request
|
10002 |
+
request = null;
|
10003 |
+
};
|
|
|
10004 |
|
10005 |
+
// Handle timeout
|
10006 |
+
request.ontimeout = function handleTimeout() {
|
10007 |
+
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
10008 |
+
if (config.timeoutErrorMessage) {
|
10009 |
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
10010 |
+
}
|
10011 |
+
reject(createError(
|
10012 |
+
timeoutErrorMessage,
|
10013 |
+
config,
|
10014 |
+
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
10015 |
+
request));
|
|
|
10016 |
|
10017 |
+
// Clean up request
|
10018 |
+
request = null;
|
10019 |
+
};
|
10020 |
|
10021 |
+
// Add xsrf header
|
10022 |
+
// This is only done if running in a standard browser environment.
|
10023 |
+
// Specifically not if we're in a web worker, or react-native.
|
10024 |
+
if (utils.isStandardBrowserEnv()) {
|
10025 |
+
// Add xsrf header
|
10026 |
+
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
10027 |
+
cookies.read(config.xsrfCookieName) :
|
10028 |
+
undefined;
|
10029 |
+
|
10030 |
+
if (xsrfValue) {
|
10031 |
+
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
10032 |
+
}
|
10033 |
}
|
10034 |
|
10035 |
+
// Add headers to the request
|
10036 |
+
if ('setRequestHeader' in request) {
|
10037 |
+
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
10038 |
+
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
10039 |
+
// Remove Content-Type if data is undefined
|
10040 |
+
delete requestHeaders[key];
|
10041 |
+
} else {
|
10042 |
+
// Otherwise add header to the request
|
10043 |
+
request.setRequestHeader(key, val);
|
10044 |
+
}
|
10045 |
+
});
|
10046 |
+
}
|
10047 |
|
10048 |
+
// Add withCredentials to request if needed
|
10049 |
+
if (!utils.isUndefined(config.withCredentials)) {
|
10050 |
+
request.withCredentials = !!config.withCredentials;
|
10051 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
10052 |
|
10053 |
+
// Add responseType to request if needed
|
10054 |
+
if (responseType && responseType !== 'json') {
|
10055 |
+
request.responseType = config.responseType;
|
10056 |
+
}
|
10057 |
|
10058 |
+
// Handle progress if needed
|
10059 |
+
if (typeof config.onDownloadProgress === 'function') {
|
10060 |
+
request.addEventListener('progress', config.onDownloadProgress);
|
10061 |
+
}
|
10062 |
|
10063 |
+
// Not all browsers support upload events
|
10064 |
+
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
10065 |
+
request.upload.addEventListener('progress', config.onUploadProgress);
|
10066 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10067 |
|
10068 |
+
if (config.cancelToken) {
|
10069 |
+
// Handle cancellation
|
10070 |
+
config.cancelToken.promise.then(function onCanceled(cancel) {
|
10071 |
+
if (!request) {
|
10072 |
+
return;
|
10073 |
}
|
10074 |
|
10075 |
+
request.abort();
|
10076 |
+
reject(cancel);
|
10077 |
+
// Clean up request
|
10078 |
+
request = null;
|
10079 |
+
});
|
10080 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
10081 |
|
10082 |
+
if (!requestData) {
|
10083 |
+
requestData = null;
|
10084 |
+
}
|
10085 |
|
10086 |
+
// Send the request
|
10087 |
+
request.send(requestData);
|
10088 |
});
|
10089 |
+
};
|
10090 |
+
|
10091 |
+
|
10092 |
+
/***/ }),
|
10093 |
+
|
10094 |
+
/***/ 51609:
|
10095 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
10096 |
+
|
10097 |
+
"use strict";
|
10098 |
+
|
10099 |
+
|
10100 |
+
var utils = __webpack_require__(64867);
|
10101 |
+
var bind = __webpack_require__(91849);
|
10102 |
+
var Axios = __webpack_require__(30321);
|
10103 |
+
var mergeConfig = __webpack_require__(47185);
|
10104 |
+
var defaults = __webpack_require__(45655);
|
10105 |
|
10106 |
/**
|
10107 |
+
* Create an instance of Axios
|
10108 |
*
|
10109 |
+
* @param {Object} defaultConfig The default config for the instance
|
10110 |
+
* @return {Axios} A new instance of Axios
|
10111 |
*/
|
10112 |
+
function createInstance(defaultConfig) {
|
10113 |
+
var context = new Axios(defaultConfig);
|
10114 |
+
var instance = bind(Axios.prototype.request, context);
|
|
|
|
|
|
|
10115 |
|
10116 |
+
// Copy axios.prototype to instance
|
10117 |
+
utils.extend(instance, Axios.prototype, context);
|
10118 |
|
10119 |
+
// Copy context to instance
|
10120 |
+
utils.extend(instance, context);
|
|
|
|
|
|
|
|
|
10121 |
|
10122 |
+
return instance;
|
10123 |
}
|
10124 |
|
10125 |
+
// Create the default instance to be exported
|
10126 |
+
var axios = createInstance(defaults);
|
|
|
|
|
|
|
10127 |
|
10128 |
+
// Expose Axios class to allow class inheritance
|
10129 |
+
axios.Axios = Axios;
|
|
|
10130 |
|
10131 |
+
// Factory for creating new instances
|
10132 |
+
axios.create = function create(instanceConfig) {
|
10133 |
+
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
10134 |
+
};
|
10135 |
|
10136 |
+
// Expose Cancel & CancelToken
|
10137 |
+
axios.Cancel = __webpack_require__(65263);
|
10138 |
+
axios.CancelToken = __webpack_require__(14972);
|
10139 |
+
axios.isCancel = __webpack_require__(26502);
|
10140 |
|
10141 |
+
// Expose all/spread
|
10142 |
+
axios.all = function all(promises) {
|
10143 |
+
return Promise.all(promises);
|
10144 |
+
};
|
10145 |
+
axios.spread = __webpack_require__(8713);
|
|
|
|
|
10146 |
|
10147 |
+
// Expose isAxiosError
|
10148 |
+
axios.isAxiosError = __webpack_require__(16268);
|
|
|
|
|
10149 |
|
10150 |
+
module.exports = axios;
|
|
|
|
|
|
|
|
|
|
|
10151 |
|
10152 |
+
// Allow use of default import syntax in TypeScript
|
10153 |
+
module.exports.default = axios;
|
|
|
10154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10155 |
|
10156 |
+
/***/ }),
|
10157 |
|
10158 |
+
/***/ 65263:
|
10159 |
+
/***/ (function(module) {
|
|
|
10160 |
|
10161 |
+
"use strict";
|
|
|
10162 |
|
|
|
10163 |
|
10164 |
+
/**
|
10165 |
+
* A `Cancel` is an object that is thrown when an operation is canceled.
|
10166 |
+
*
|
10167 |
+
* @class
|
10168 |
+
* @param {string=} message The message.
|
10169 |
+
*/
|
10170 |
+
function Cancel(message) {
|
10171 |
+
this.message = message;
|
10172 |
+
}
|
10173 |
|
10174 |
+
Cancel.prototype.toString = function toString() {
|
10175 |
+
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
10176 |
+
};
|
10177 |
|
10178 |
+
Cancel.prototype.__CANCEL__ = true;
|
10179 |
|
10180 |
+
module.exports = Cancel;
|
10181 |
|
|
|
10182 |
|
10183 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
10184 |
|
10185 |
+
/***/ 14972:
|
10186 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
10187 |
|
10188 |
+
"use strict";
|
|
|
|
|
10189 |
|
|
|
10190 |
|
10191 |
+
var Cancel = __webpack_require__(65263);
|
|
|
10192 |
|
10193 |
+
/**
|
10194 |
+
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
10195 |
+
*
|
10196 |
+
* @class
|
10197 |
+
* @param {Function} executor The executor function.
|
10198 |
+
*/
|
10199 |
+
function CancelToken(executor) {
|
10200 |
+
if (typeof executor !== 'function') {
|
10201 |
+
throw new TypeError('executor must be a function.');
|
10202 |
+
}
|
10203 |
|
10204 |
+
var resolvePromise;
|
10205 |
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
10206 |
+
resolvePromise = resolve;
|
10207 |
+
});
|
10208 |
|
10209 |
+
var token = this;
|
10210 |
+
executor(function cancel(message) {
|
10211 |
+
if (token.reason) {
|
10212 |
+
// Cancellation has already been requested
|
10213 |
+
return;
|
10214 |
}
|
10215 |
|
10216 |
+
token.reason = new Cancel(message);
|
10217 |
+
resolvePromise(token.reason);
|
10218 |
+
});
|
10219 |
}
|
10220 |
|
|
|
|
|
|
|
|
|
|
|
10221 |
/**
|
10222 |
+
* Throws a `Cancel` if cancellation has been requested.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10223 |
*/
|
10224 |
+
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
10225 |
+
if (this.reason) {
|
10226 |
+
throw this.reason;
|
10227 |
+
}
|
10228 |
+
};
|
10229 |
|
10230 |
+
/**
|
10231 |
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
10232 |
+
* cancels the `CancelToken`.
|
10233 |
+
*/
|
10234 |
+
CancelToken.source = function source() {
|
10235 |
+
var cancel;
|
10236 |
+
var token = new CancelToken(function executor(c) {
|
10237 |
+
cancel = c;
|
10238 |
+
});
|
10239 |
+
return {
|
10240 |
+
token: token,
|
10241 |
+
cancel: cancel
|
10242 |
+
};
|
10243 |
+
};
|
10244 |
|
10245 |
+
module.exports = CancelToken;
|
|
|
|
|
|
|
10246 |
|
|
|
|
|
|
|
10247 |
|
10248 |
+
/***/ }),
|
10249 |
|
10250 |
+
/***/ 26502:
|
10251 |
+
/***/ (function(module) {
|
10252 |
|
10253 |
+
"use strict";
|
|
|
|
|
|
|
10254 |
|
|
|
|
|
10255 |
|
10256 |
+
module.exports = function isCancel(value) {
|
10257 |
+
return !!(value && value.__CANCEL__);
|
10258 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10259 |
|
|
|
|
|
10260 |
|
10261 |
+
/***/ }),
|
|
|
10262 |
|
10263 |
+
/***/ 30321:
|
10264 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
10265 |
|
10266 |
+
"use strict";
|
|
|
|
|
|
|
|
|
10267 |
|
|
|
|
|
|
|
10268 |
|
10269 |
+
var utils = __webpack_require__(64867);
|
10270 |
+
var buildURL = __webpack_require__(15327);
|
10271 |
+
var InterceptorManager = __webpack_require__(80782);
|
10272 |
+
var dispatchRequest = __webpack_require__(13572);
|
10273 |
+
var mergeConfig = __webpack_require__(47185);
|
10274 |
+
var validator = __webpack_require__(54875);
|
|
|
|
|
|
|
|
|
|
|
|
|
10275 |
|
10276 |
+
var validators = validator.validators;
|
10277 |
+
/**
|
10278 |
+
* Create a new instance of Axios
|
10279 |
+
*
|
10280 |
+
* @param {Object} instanceConfig The default config for the instance
|
10281 |
+
*/
|
10282 |
+
function Axios(instanceConfig) {
|
10283 |
+
this.defaults = instanceConfig;
|
10284 |
+
this.interceptors = {
|
10285 |
+
request: new InterceptorManager(),
|
10286 |
+
response: new InterceptorManager()
|
10287 |
+
};
|
10288 |
}
|
10289 |
|
10290 |
/**
|
10291 |
+
* Dispatch a request
|
|
|
|
|
10292 |
*
|
10293 |
+
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
|
|
|
|
|
10294 |
*/
|
10295 |
+
Axios.prototype.request = function request(config) {
|
10296 |
+
/*eslint no-param-reassign:0*/
|
10297 |
+
// Allow for axios('example/url'[, config]) a la fetch API
|
10298 |
+
if (typeof config === 'string') {
|
10299 |
+
config = arguments[1] || {};
|
10300 |
+
config.url = arguments[0];
|
10301 |
+
} else {
|
10302 |
+
config = config || {};
|
10303 |
}
|
10304 |
|
10305 |
+
config = mergeConfig(this.defaults, config);
|
|
|
|
|
|
|
|
|
10306 |
|
10307 |
+
// Set config.method
|
10308 |
+
if (config.method) {
|
10309 |
+
config.method = config.method.toLowerCase();
|
10310 |
+
} else if (this.defaults.method) {
|
10311 |
+
config.method = this.defaults.method.toLowerCase();
|
10312 |
+
} else {
|
10313 |
+
config.method = 'get';
|
10314 |
}
|
10315 |
|
10316 |
+
var transitional = config.transitional;
|
10317 |
+
|
10318 |
+
if (transitional !== undefined) {
|
10319 |
+
validator.assertOptions(transitional, {
|
10320 |
+
silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
10321 |
+
forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
|
10322 |
+
clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
|
10323 |
+
}, false);
|
10324 |
+
}
|
10325 |
+
|
10326 |
+
// filter out skipped interceptors
|
10327 |
+
var requestInterceptorChain = [];
|
10328 |
+
var synchronousRequestInterceptors = true;
|
10329 |
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
10330 |
+
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
10331 |
+
return;
|
10332 |
+
}
|
10333 |
+
|
10334 |
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
10335 |
+
|
10336 |
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
10337 |
});
|
|
|
10338 |
|
10339 |
+
var responseInterceptorChain = [];
|
10340 |
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
10341 |
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
10342 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10343 |
|
10344 |
+
var promise;
|
|
|
|
|
|
|
10345 |
|
10346 |
+
if (!synchronousRequestInterceptors) {
|
10347 |
+
var chain = [dispatchRequest, undefined];
|
|
|
10348 |
|
10349 |
+
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
10350 |
+
chain = chain.concat(responseInterceptorChain);
|
|
|
10351 |
|
10352 |
+
promise = Promise.resolve(config);
|
10353 |
+
while (chain.length) {
|
10354 |
+
promise = promise.then(chain.shift(), chain.shift());
|
10355 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10356 |
|
10357 |
+
return promise;
|
10358 |
+
}
|
|
|
|
|
10359 |
|
|
|
10360 |
|
10361 |
+
var newConfig = config;
|
10362 |
+
while (requestInterceptorChain.length) {
|
10363 |
+
var onFulfilled = requestInterceptorChain.shift();
|
10364 |
+
var onRejected = requestInterceptorChain.shift();
|
10365 |
+
try {
|
10366 |
+
newConfig = onFulfilled(newConfig);
|
10367 |
+
} catch (error) {
|
10368 |
+
onRejected(error);
|
10369 |
+
break;
|
10370 |
+
}
|
10371 |
+
}
|
10372 |
|
10373 |
+
try {
|
10374 |
+
promise = dispatchRequest(newConfig);
|
10375 |
+
} catch (error) {
|
10376 |
+
return Promise.reject(error);
|
10377 |
+
}
|
10378 |
|
10379 |
+
while (responseInterceptorChain.length) {
|
10380 |
+
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
|
10381 |
+
}
|
10382 |
|
10383 |
+
return promise;
|
10384 |
+
};
|
10385 |
|
10386 |
+
Axios.prototype.getUri = function getUri(config) {
|
10387 |
+
config = mergeConfig(this.defaults, config);
|
10388 |
+
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
10389 |
+
};
|
10390 |
|
10391 |
+
// Provide aliases for supported request methods
|
10392 |
+
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
10393 |
+
/*eslint func-names:0*/
|
10394 |
+
Axios.prototype[method] = function(url, config) {
|
10395 |
+
return this.request(mergeConfig(config || {}, {
|
10396 |
+
method: method,
|
10397 |
+
url: url,
|
10398 |
+
data: (config || {}).data
|
10399 |
+
}));
|
10400 |
+
};
|
10401 |
+
});
|
10402 |
|
10403 |
+
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
10404 |
+
/*eslint func-names:0*/
|
10405 |
+
Axios.prototype[method] = function(url, data, config) {
|
10406 |
+
return this.request(mergeConfig(config || {}, {
|
10407 |
+
method: method,
|
10408 |
+
url: url,
|
10409 |
+
data: data
|
10410 |
+
}));
|
10411 |
+
};
|
10412 |
+
});
|
10413 |
|
10414 |
+
module.exports = Axios;
|
10415 |
|
|
|
10416 |
|
10417 |
+
/***/ }),
|
10418 |
|
10419 |
+
/***/ 80782:
|
10420 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
10421 |
|
10422 |
+
"use strict";
|
10423 |
|
|
|
10424 |
|
10425 |
+
var utils = __webpack_require__(64867);
|
|
|
|
|
|
|
10426 |
|
10427 |
+
function InterceptorManager() {
|
10428 |
+
this.handlers = [];
|
10429 |
+
}
|
10430 |
|
10431 |
+
/**
|
10432 |
+
* Add a new interceptor to the stack
|
10433 |
+
*
|
10434 |
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
10435 |
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
10436 |
+
*
|
10437 |
+
* @return {Number} An ID used to remove interceptor later
|
10438 |
+
*/
|
10439 |
+
InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
|
10440 |
+
this.handlers.push({
|
10441 |
+
fulfilled: fulfilled,
|
10442 |
+
rejected: rejected,
|
10443 |
+
synchronous: options ? options.synchronous : false,
|
10444 |
+
runWhen: options ? options.runWhen : null
|
10445 |
+
});
|
10446 |
+
return this.handlers.length - 1;
|
10447 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10448 |
|
10449 |
+
/**
|
10450 |
+
* Remove an interceptor from the stack
|
10451 |
+
*
|
10452 |
+
* @param {Number} id The ID that was returned by `use`
|
10453 |
+
*/
|
10454 |
+
InterceptorManager.prototype.eject = function eject(id) {
|
10455 |
+
if (this.handlers[id]) {
|
10456 |
+
this.handlers[id] = null;
|
10457 |
}
|
10458 |
};
|
10459 |
+
|
10460 |
+
/**
|
10461 |
+
* Iterate over all the registered interceptors
|
10462 |
+
*
|
10463 |
+
* This method is particularly useful for skipping over any
|
10464 |
+
* interceptors that may have become `null` calling `eject`.
|
10465 |
+
*
|
10466 |
+
* @param {Function} fn The function to call for each interceptor
|
10467 |
+
*/
|
10468 |
+
InterceptorManager.prototype.forEach = function forEach(fn) {
|
10469 |
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
10470 |
+
if (h !== null) {
|
10471 |
+
fn(h);
|
10472 |
+
}
|
10473 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10474 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10475 |
|
10476 |
+
module.exports = InterceptorManager;
|
|
|
|
|
|
|
|
|
10477 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10478 |
|
10479 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10480 |
|
10481 |
+
/***/ 94097:
|
10482 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10483 |
|
10484 |
+
"use strict";
|
|
|
|
|
|
|
|
|
10485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10486 |
|
10487 |
+
var isAbsoluteURL = __webpack_require__(91793);
|
10488 |
+
var combineURLs = __webpack_require__(7303);
|
|
|
|
|
|
|
10489 |
|
10490 |
+
/**
|
10491 |
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
10492 |
+
* only when the requestedURL is not already an absolute URL.
|
10493 |
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
10494 |
+
*
|
10495 |
+
* @param {string} baseURL The base URL
|
10496 |
+
* @param {string} requestedURL Absolute or relative URL to combine
|
10497 |
+
* @returns {string} The combined full path
|
10498 |
+
*/
|
10499 |
+
module.exports = function buildFullPath(baseURL, requestedURL) {
|
10500 |
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
10501 |
+
return combineURLs(baseURL, requestedURL);
|
10502 |
+
}
|
10503 |
+
return requestedURL;
|
10504 |
+
};
|
10505 |
|
|
|
|
|
|
|
|
|
|
|
10506 |
|
10507 |
+
/***/ }),
|
|
|
|
|
10508 |
|
10509 |
+
/***/ 85061:
|
10510 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
10511 |
|
10512 |
+
"use strict";
|
|
|
|
|
10513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10514 |
|
10515 |
+
var enhanceError = __webpack_require__(80481);
|
|
|
|
|
10516 |
|
10517 |
+
/**
|
10518 |
+
* Create an Error with the specified message, config, error code, request and response.
|
10519 |
+
*
|
10520 |
+
* @param {string} message The error message.
|
10521 |
+
* @param {Object} config The config.
|
10522 |
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
10523 |
+
* @param {Object} [request] The request.
|
10524 |
+
* @param {Object} [response] The response.
|
10525 |
+
* @returns {Error} The created error.
|
10526 |
+
*/
|
10527 |
+
module.exports = function createError(message, config, code, request, response) {
|
10528 |
+
var error = new Error(message);
|
10529 |
+
return enhanceError(error, config, code, request, response);
|
10530 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10531 |
|
|
|
|
|
|
|
10532 |
|
10533 |
+
/***/ }),
|
|
|
10534 |
|
10535 |
+
/***/ 13572:
|
10536 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
10537 |
|
10538 |
+
"use strict";
|
|
|
10539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10540 |
|
10541 |
+
var utils = __webpack_require__(64867);
|
10542 |
+
var transformData = __webpack_require__(18527);
|
10543 |
+
var isCancel = __webpack_require__(26502);
|
10544 |
+
var defaults = __webpack_require__(45655);
|
10545 |
|
10546 |
+
/**
|
10547 |
+
* Throws a `Cancel` if cancellation has been requested.
|
10548 |
+
*/
|
10549 |
+
function throwIfCancellationRequested(config) {
|
10550 |
+
if (config.cancelToken) {
|
10551 |
+
config.cancelToken.throwIfRequested();
|
10552 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10553 |
}
|
|
|
10554 |
|
10555 |
+
/**
|
10556 |
+
* Dispatch a request to the server using the configured adapter.
|
10557 |
+
*
|
10558 |
+
* @param {object} config The config that is to be used for the request
|
10559 |
+
* @returns {Promise} The Promise to be fulfilled
|
10560 |
+
*/
|
10561 |
+
module.exports = function dispatchRequest(config) {
|
10562 |
+
throwIfCancellationRequested(config);
|
10563 |
|
10564 |
+
// Ensure headers exist
|
10565 |
+
config.headers = config.headers || {};
|
10566 |
|
10567 |
+
// Transform request data
|
10568 |
+
config.data = transformData.call(
|
10569 |
+
config,
|
10570 |
+
config.data,
|
10571 |
+
config.headers,
|
10572 |
+
config.transformRequest
|
10573 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10574 |
|
10575 |
+
// Flatten headers
|
10576 |
+
config.headers = utils.merge(
|
10577 |
+
config.headers.common || {},
|
10578 |
+
config.headers[config.method] || {},
|
10579 |
+
config.headers
|
10580 |
+
);
|
10581 |
|
10582 |
+
utils.forEach(
|
10583 |
+
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
10584 |
+
function cleanHeaderConfig(method) {
|
10585 |
+
delete config.headers[method];
|
|
|
10586 |
}
|
10587 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
10588 |
|
10589 |
+
var adapter = config.adapter || defaults.adapter;
|
10590 |
|
10591 |
+
return adapter(config).then(function onAdapterResolution(response) {
|
10592 |
+
throwIfCancellationRequested(config);
|
|
|
|
|
|
|
|
|
10593 |
|
10594 |
+
// Transform response data
|
10595 |
+
response.data = transformData.call(
|
10596 |
+
config,
|
10597 |
+
response.data,
|
10598 |
+
response.headers,
|
10599 |
+
config.transformResponse
|
10600 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10601 |
|
10602 |
+
return response;
|
10603 |
+
}, function onAdapterRejection(reason) {
|
10604 |
+
if (!isCancel(reason)) {
|
10605 |
+
throwIfCancellationRequested(config);
|
10606 |
|
10607 |
+
// Transform response data
|
10608 |
+
if (reason && reason.response) {
|
10609 |
+
reason.response.data = transformData.call(
|
10610 |
+
config,
|
10611 |
+
reason.response.data,
|
10612 |
+
reason.response.headers,
|
10613 |
+
config.transformResponse
|
10614 |
+
);
|
10615 |
+
}
|
10616 |
+
}
|
10617 |
|
10618 |
+
return Promise.reject(reason);
|
10619 |
+
});
|
10620 |
+
};
|
10621 |
|
|
|
|
|
|
|
|
|
10622 |
|
10623 |
+
/***/ }),
|
10624 |
|
10625 |
+
/***/ 80481:
|
10626 |
+
/***/ (function(module) {
|
10627 |
|
10628 |
+
"use strict";
|
10629 |
|
10630 |
|
10631 |
+
/**
|
10632 |
+
* Update an Error with the specified config, error code, and response.
|
10633 |
+
*
|
10634 |
+
* @param {Error} error The error to update.
|
10635 |
+
* @param {Object} config The config.
|
10636 |
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
10637 |
+
* @param {Object} [request] The request.
|
10638 |
+
* @param {Object} [response] The response.
|
10639 |
+
* @returns {Error} The error.
|
10640 |
+
*/
|
10641 |
+
module.exports = function enhanceError(error, config, code, request, response) {
|
10642 |
+
error.config = config;
|
10643 |
+
if (code) {
|
10644 |
+
error.code = code;
|
10645 |
+
}
|
10646 |
|
10647 |
+
error.request = request;
|
10648 |
+
error.response = response;
|
10649 |
+
error.isAxiosError = true;
|
10650 |
|
10651 |
+
error.toJSON = function toJSON() {
|
10652 |
+
return {
|
10653 |
+
// Standard
|
10654 |
+
message: this.message,
|
10655 |
+
name: this.name,
|
10656 |
+
// Microsoft
|
10657 |
+
description: this.description,
|
10658 |
+
number: this.number,
|
10659 |
+
// Mozilla
|
10660 |
+
fileName: this.fileName,
|
10661 |
+
lineNumber: this.lineNumber,
|
10662 |
+
columnNumber: this.columnNumber,
|
10663 |
+
stack: this.stack,
|
10664 |
+
// Axios
|
10665 |
+
config: this.config,
|
10666 |
+
code: this.code
|
10667 |
+
};
|
10668 |
+
};
|
10669 |
+
return error;
|
10670 |
+
};
|
10671 |
|
10672 |
|
10673 |
+
/***/ }),
|
10674 |
|
10675 |
+
/***/ 47185:
|
10676 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
10677 |
|
10678 |
+
"use strict";
|
10679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10680 |
|
10681 |
+
var utils = __webpack_require__(64867);
|
|
|
|
|
10682 |
|
10683 |
+
/**
|
10684 |
+
* Config-specific merge-function which creates a new config-object
|
10685 |
+
* by merging two configuration objects together.
|
10686 |
+
*
|
10687 |
+
* @param {Object} config1
|
10688 |
+
* @param {Object} config2
|
10689 |
+
* @returns {Object} New object resulting from merging config2 to config1
|
10690 |
+
*/
|
10691 |
+
module.exports = function mergeConfig(config1, config2) {
|
10692 |
+
// eslint-disable-next-line no-param-reassign
|
10693 |
+
config2 = config2 || {};
|
10694 |
+
var config = {};
|
10695 |
|
10696 |
+
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
10697 |
+
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
10698 |
+
var defaultToConfig2Keys = [
|
10699 |
+
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
10700 |
+
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
10701 |
+
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
10702 |
+
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
10703 |
+
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
10704 |
+
];
|
10705 |
+
var directMergeKeys = ['validateStatus'];
|
10706 |
|
10707 |
+
function getMergedValue(target, source) {
|
10708 |
+
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
10709 |
+
return utils.merge(target, source);
|
10710 |
+
} else if (utils.isPlainObject(source)) {
|
10711 |
+
return utils.merge({}, source);
|
10712 |
+
} else if (utils.isArray(source)) {
|
10713 |
+
return source.slice();
|
|
|
|
|
|
|
|
|
|
|
|
|
10714 |
}
|
10715 |
+
return source;
|
10716 |
+
}
|
|
|
|
|
|
|
|
|
10717 |
|
10718 |
+
function mergeDeepProperties(prop) {
|
10719 |
+
if (!utils.isUndefined(config2[prop])) {
|
10720 |
+
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
10721 |
+
} else if (!utils.isUndefined(config1[prop])) {
|
10722 |
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
10723 |
}
|
10724 |
+
}
|
|
|
|
|
|
|
|
|
|
|
10725 |
|
10726 |
+
utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
10727 |
+
if (!utils.isUndefined(config2[prop])) {
|
10728 |
+
config[prop] = getMergedValue(undefined, config2[prop]);
|
10729 |
}
|
10730 |
+
});
|
|
|
|
|
|
|
|
|
|
|
10731 |
|
10732 |
+
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10733 |
|
10734 |
+
utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
10735 |
+
if (!utils.isUndefined(config2[prop])) {
|
10736 |
+
config[prop] = getMergedValue(undefined, config2[prop]);
|
10737 |
+
} else if (!utils.isUndefined(config1[prop])) {
|
10738 |
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
|
|
|
|
|
10739 |
}
|
10740 |
+
});
|
10741 |
+
|
10742 |
+
utils.forEach(directMergeKeys, function merge(prop) {
|
10743 |
+
if (prop in config2) {
|
10744 |
+
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
10745 |
+
} else if (prop in config1) {
|
10746 |
+
config[prop] = getMergedValue(undefined, config1[prop]);
|
10747 |
}
|
10748 |
+
});
|
10749 |
|
10750 |
+
var axiosKeys = valueFromConfig2Keys
|
10751 |
+
.concat(mergeDeepPropertiesKeys)
|
10752 |
+
.concat(defaultToConfig2Keys)
|
10753 |
+
.concat(directMergeKeys);
|
10754 |
|
10755 |
+
var otherKeys = Object
|
10756 |
+
.keys(config1)
|
10757 |
+
.concat(Object.keys(config2))
|
10758 |
+
.filter(function filterAxiosKeys(key) {
|
10759 |
+
return axiosKeys.indexOf(key) === -1;
|
10760 |
+
});
|
10761 |
|
10762 |
+
utils.forEach(otherKeys, mergeDeepProperties);
|
|
|
|
|
10763 |
|
10764 |
+
return config;
|
10765 |
+
};
|
10766 |
|
|
|
|
|
|
|
|
|
10767 |
|
10768 |
+
/***/ }),
|
|
|
10769 |
|
10770 |
+
/***/ 36026:
|
10771 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
10772 |
|
10773 |
+
"use strict";
|
|
|
|
|
|
|
10774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10775 |
|
10776 |
+
var createError = __webpack_require__(85061);
|
|
|
|
|
|
|
|
|
|
|
10777 |
|
10778 |
+
/**
|
10779 |
+
* Resolve or reject a Promise based on response status.
|
10780 |
+
*
|
10781 |
+
* @param {Function} resolve A function that resolves the promise.
|
10782 |
+
* @param {Function} reject A function that rejects the promise.
|
10783 |
+
* @param {object} response The response.
|
10784 |
+
*/
|
10785 |
+
module.exports = function settle(resolve, reject, response) {
|
10786 |
+
var validateStatus = response.config.validateStatus;
|
10787 |
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
10788 |
+
resolve(response);
|
10789 |
+
} else {
|
10790 |
+
reject(createError(
|
10791 |
+
'Request failed with status code ' + response.status,
|
10792 |
+
response.config,
|
10793 |
+
null,
|
10794 |
+
response.request,
|
10795 |
+
response
|
10796 |
+
));
|
10797 |
+
}
|
10798 |
+
};
|
10799 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10800 |
|
10801 |
+
/***/ }),
|
|
|
10802 |
|
10803 |
+
/***/ 18527:
|
10804 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10805 |
|
10806 |
+
"use strict";
|
|
|
|
|
|
|
10807 |
|
|
|
|
|
|
|
10808 |
|
10809 |
+
var utils = __webpack_require__(64867);
|
10810 |
+
var defaults = __webpack_require__(45655);
|
10811 |
|
10812 |
+
/**
|
10813 |
+
* Transform the data for a request or a response
|
10814 |
+
*
|
10815 |
+
* @param {Object|String} data The data to be transformed
|
10816 |
+
* @param {Array} headers The headers for the request or response
|
10817 |
+
* @param {Array|Function} fns A single function or Array of functions
|
10818 |
+
* @returns {*} The resulting transformed data
|
10819 |
+
*/
|
10820 |
+
module.exports = function transformData(data, headers, fns) {
|
10821 |
+
var context = this || defaults;
|
10822 |
+
/*eslint no-param-reassign:0*/
|
10823 |
+
utils.forEach(fns, function transform(fn) {
|
10824 |
+
data = fn.call(context, data, headers);
|
10825 |
+
});
|
10826 |
|
10827 |
+
return data;
|
10828 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10829 |
|
|
|
|
|
|
|
|
|
10830 |
|
10831 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
10832 |
|
10833 |
+
/***/ 45655:
|
10834 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
10835 |
|
10836 |
+
"use strict";
|
|
|
|
|
|
|
|
|
10837 |
|
|
|
|
|
|
|
10838 |
|
10839 |
+
var utils = __webpack_require__(64867);
|
10840 |
+
var normalizeHeaderName = __webpack_require__(16016);
|
10841 |
+
var enhanceError = __webpack_require__(80481);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10842 |
|
10843 |
+
var DEFAULT_CONTENT_TYPE = {
|
10844 |
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10845 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
10846 |
|
10847 |
+
function setContentTypeIfUnset(headers, value) {
|
10848 |
+
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
10849 |
+
headers['Content-Type'] = value;
|
10850 |
+
}
|
10851 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10852 |
|
10853 |
+
function getDefaultAdapter() {
|
10854 |
+
var adapter;
|
10855 |
+
if (typeof XMLHttpRequest !== 'undefined') {
|
10856 |
+
// For browsers use XHR adapter
|
10857 |
+
adapter = __webpack_require__(55448);
|
10858 |
+
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
10859 |
+
// For node use HTTP adapter
|
10860 |
+
adapter = __webpack_require__(55448);
|
10861 |
+
}
|
10862 |
+
return adapter;
|
10863 |
+
}
|
10864 |
|
10865 |
+
function stringifySafely(rawValue, parser, encoder) {
|
10866 |
+
if (utils.isString(rawValue)) {
|
10867 |
+
try {
|
10868 |
+
(parser || JSON.parse)(rawValue);
|
10869 |
+
return utils.trim(rawValue);
|
10870 |
+
} catch (e) {
|
10871 |
+
if (e.name !== 'SyntaxError') {
|
10872 |
+
throw e;
|
10873 |
+
}
|
10874 |
}
|
10875 |
}
|
10876 |
|
10877 |
+
return (encoder || JSON.stringify)(rawValue);
|
10878 |
}
|
10879 |
|
10880 |
+
var defaults = {
|
|
|
|
|
|
|
|
|
10881 |
|
10882 |
+
transitional: {
|
10883 |
+
silentJSONParsing: true,
|
10884 |
+
forcedJSONParsing: true,
|
10885 |
+
clarifyTimeoutError: false
|
10886 |
+
},
|
10887 |
|
10888 |
+
adapter: getDefaultAdapter(),
|
|
|
|
|
|
|
|
|
|
|
10889 |
|
10890 |
+
transformRequest: [function transformRequest(data, headers) {
|
10891 |
+
normalizeHeaderName(headers, 'Accept');
|
10892 |
+
normalizeHeaderName(headers, 'Content-Type');
|
10893 |
|
10894 |
+
if (utils.isFormData(data) ||
|
10895 |
+
utils.isArrayBuffer(data) ||
|
10896 |
+
utils.isBuffer(data) ||
|
10897 |
+
utils.isStream(data) ||
|
10898 |
+
utils.isFile(data) ||
|
10899 |
+
utils.isBlob(data)
|
10900 |
+
) {
|
10901 |
+
return data;
|
10902 |
+
}
|
10903 |
+
if (utils.isArrayBufferView(data)) {
|
10904 |
+
return data.buffer;
|
10905 |
+
}
|
10906 |
+
if (utils.isURLSearchParams(data)) {
|
10907 |
+
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
10908 |
+
return data.toString();
|
10909 |
+
}
|
10910 |
+
if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
|
10911 |
+
setContentTypeIfUnset(headers, 'application/json');
|
10912 |
+
return stringifySafely(data);
|
10913 |
}
|
10914 |
+
return data;
|
10915 |
+
}],
|
10916 |
|
10917 |
+
transformResponse: [function transformResponse(data) {
|
10918 |
+
var transitional = this.transitional;
|
10919 |
+
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
10920 |
+
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
10921 |
+
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
10922 |
|
10923 |
+
if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
|
10924 |
+
try {
|
10925 |
+
return JSON.parse(data);
|
10926 |
+
} catch (e) {
|
10927 |
+
if (strictJSONParsing) {
|
10928 |
+
if (e.name === 'SyntaxError') {
|
10929 |
+
throw enhanceError(e, this, 'E_JSON_PARSE');
|
10930 |
+
}
|
10931 |
+
throw e;
|
10932 |
+
}
|
10933 |
}
|
10934 |
+
}
|
10935 |
|
10936 |
+
return data;
|
10937 |
+
}],
|
10938 |
|
10939 |
+
/**
|
10940 |
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
10941 |
+
* timeout is not created.
|
10942 |
+
*/
|
10943 |
+
timeout: 0,
|
10944 |
|
10945 |
+
xsrfCookieName: 'XSRF-TOKEN',
|
10946 |
+
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
|
|
|
10947 |
|
10948 |
+
maxContentLength: -1,
|
10949 |
+
maxBodyLength: -1,
|
10950 |
|
10951 |
+
validateStatus: function validateStatus(status) {
|
10952 |
+
return status >= 200 && status < 300;
|
10953 |
+
}
|
10954 |
+
};
|
10955 |
|
10956 |
+
defaults.headers = {
|
10957 |
+
common: {
|
10958 |
+
'Accept': 'application/json, text/plain, */*'
|
10959 |
+
}
|
10960 |
+
};
|
10961 |
|
10962 |
+
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
10963 |
+
defaults.headers[method] = {};
|
10964 |
+
});
|
10965 |
|
10966 |
+
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
10967 |
+
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
10968 |
+
});
|
10969 |
|
10970 |
+
module.exports = defaults;
|
|
|
|
|
|
|
10971 |
|
|
|
10972 |
|
10973 |
+
/***/ }),
|
10974 |
|
10975 |
+
/***/ 91849:
|
10976 |
+
/***/ (function(module) {
|
|
|
10977 |
|
10978 |
+
"use strict";
|
|
|
10979 |
|
|
|
|
|
|
|
10980 |
|
10981 |
+
module.exports = function bind(fn, thisArg) {
|
10982 |
+
return function wrap() {
|
10983 |
+
var args = new Array(arguments.length);
|
10984 |
+
for (var i = 0; i < args.length; i++) {
|
10985 |
+
args[i] = arguments[i];
|
10986 |
}
|
10987 |
+
return fn.apply(thisArg, args);
|
10988 |
+
};
|
10989 |
+
};
|
10990 |
|
|
|
|
|
10991 |
|
10992 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10993 |
|
10994 |
+
/***/ 15327:
|
10995 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10996 |
|
10997 |
+
"use strict";
|
|
|
|
|
10998 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10999 |
|
11000 |
+
var utils = __webpack_require__(64867);
|
|
|
|
|
|
|
|
|
11001 |
|
11002 |
+
function encode(val) {
|
11003 |
+
return encodeURIComponent(val).
|
11004 |
+
replace(/%3A/gi, ':').
|
11005 |
+
replace(/%24/g, '$').
|
11006 |
+
replace(/%2C/gi, ',').
|
11007 |
+
replace(/%20/g, '+').
|
11008 |
+
replace(/%5B/gi, '[').
|
11009 |
+
replace(/%5D/gi, ']');
|
11010 |
+
}
|
|
|
11011 |
|
11012 |
+
/**
|
11013 |
+
* Build a URL by appending params to the end
|
11014 |
+
*
|
11015 |
+
* @param {string} url The base of the url (e.g., http://www.google.com)
|
11016 |
+
* @param {object} [params] The params to be appended
|
11017 |
+
* @returns {string} The formatted url
|
11018 |
+
*/
|
11019 |
+
module.exports = function buildURL(url, params, paramsSerializer) {
|
11020 |
+
/*eslint no-param-reassign:0*/
|
11021 |
+
if (!params) {
|
11022 |
+
return url;
|
11023 |
+
}
|
11024 |
|
11025 |
+
var serializedParams;
|
11026 |
+
if (paramsSerializer) {
|
11027 |
+
serializedParams = paramsSerializer(params);
|
11028 |
+
} else if (utils.isURLSearchParams(params)) {
|
11029 |
+
serializedParams = params.toString();
|
11030 |
+
} else {
|
11031 |
+
var parts = [];
|
|
|
|
|
11032 |
|
11033 |
+
utils.forEach(params, function serialize(val, key) {
|
11034 |
+
if (val === null || typeof val === 'undefined') {
|
11035 |
+
return;
|
|
|
|
|
11036 |
}
|
11037 |
|
11038 |
+
if (utils.isArray(val)) {
|
11039 |
+
key = key + '[]';
|
|
|
|
|
|
|
11040 |
} else {
|
11041 |
+
val = [val];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11042 |
}
|
11043 |
|
11044 |
+
utils.forEach(val, function parseValue(v) {
|
11045 |
+
if (utils.isDate(v)) {
|
11046 |
+
v = v.toISOString();
|
11047 |
+
} else if (utils.isObject(v)) {
|
11048 |
+
v = JSON.stringify(v);
|
11049 |
+
}
|
11050 |
+
parts.push(encode(key) + '=' + encode(v));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11051 |
});
|
11052 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
11053 |
|
11054 |
+
serializedParams = parts.join('&');
|
11055 |
+
}
|
11056 |
|
11057 |
+
if (serializedParams) {
|
11058 |
+
var hashmarkIndex = url.indexOf('#');
|
11059 |
+
if (hashmarkIndex !== -1) {
|
11060 |
+
url = url.slice(0, hashmarkIndex);
|
11061 |
+
}
|
|
|
|
|
11062 |
|
11063 |
+
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
|
|
|
|
|
11064 |
}
|
11065 |
+
|
11066 |
+
return url;
|
11067 |
};
|
11068 |
|
|
|
11069 |
|
11070 |
+
/***/ }),
|
11071 |
|
11072 |
+
/***/ 7303:
|
11073 |
+
/***/ (function(module) {
|
11074 |
|
11075 |
+
"use strict";
|
|
|
11076 |
|
|
|
|
|
11077 |
|
11078 |
+
/**
|
11079 |
+
* Creates a new URL by combining the specified URLs
|
11080 |
+
*
|
11081 |
+
* @param {string} baseURL The base URL
|
11082 |
+
* @param {string} relativeURL The relative URL
|
11083 |
+
* @returns {string} The combined URL
|
11084 |
+
*/
|
11085 |
+
module.exports = function combineURLs(baseURL, relativeURL) {
|
11086 |
+
return relativeURL
|
11087 |
+
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
11088 |
+
: baseURL;
|
11089 |
+
};
|
11090 |
|
|
|
|
|
11091 |
|
11092 |
+
/***/ }),
|
11093 |
|
11094 |
+
/***/ 4372:
|
11095 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
11096 |
|
11097 |
+
"use strict";
|
11098 |
|
|
|
|
|
|
|
11099 |
|
11100 |
+
var utils = __webpack_require__(64867);
|
|
|
11101 |
|
11102 |
+
module.exports = (
|
11103 |
+
utils.isStandardBrowserEnv() ?
|
|
|
11104 |
|
11105 |
+
// Standard browser envs support document.cookie
|
11106 |
+
(function standardBrowserEnv() {
|
11107 |
+
return {
|
11108 |
+
write: function write(name, value, expires, path, domain, secure) {
|
11109 |
+
var cookie = [];
|
11110 |
+
cookie.push(name + '=' + encodeURIComponent(value));
|
11111 |
|
11112 |
+
if (utils.isNumber(expires)) {
|
11113 |
+
cookie.push('expires=' + new Date(expires).toGMTString());
|
11114 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11115 |
|
11116 |
+
if (utils.isString(path)) {
|
11117 |
+
cookie.push('path=' + path);
|
11118 |
+
}
|
11119 |
|
11120 |
+
if (utils.isString(domain)) {
|
11121 |
+
cookie.push('domain=' + domain);
|
11122 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11123 |
|
11124 |
+
if (secure === true) {
|
11125 |
+
cookie.push('secure');
|
11126 |
+
}
|
11127 |
|
11128 |
+
document.cookie = cookie.join('; ');
|
11129 |
+
},
|
|
|
|
|
|
|
|
|
11130 |
|
11131 |
+
read: function read(name) {
|
11132 |
+
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
11133 |
+
return (match ? decodeURIComponent(match[3]) : null);
|
11134 |
+
},
|
11135 |
|
11136 |
+
remove: function remove(name) {
|
11137 |
+
this.write(name, '', Date.now() - 86400000);
|
11138 |
+
}
|
|
|
11139 |
};
|
11140 |
+
})() :
|
|
|
|
|
|
|
|
|
11141 |
|
11142 |
+
// Non standard browser env (web workers, react-native) lack needed support.
|
11143 |
+
(function nonStandardBrowserEnv() {
|
11144 |
+
return {
|
11145 |
+
write: function write() {},
|
11146 |
+
read: function read() { return null; },
|
11147 |
+
remove: function remove() {}
|
11148 |
+
};
|
11149 |
+
})()
|
11150 |
+
);
|
11151 |
|
|
|
|
|
|
|
|
|
11152 |
|
11153 |
+
/***/ }),
|
|
|
|
|
11154 |
|
11155 |
+
/***/ 91793:
|
11156 |
+
/***/ (function(module) {
|
|
|
11157 |
|
11158 |
+
"use strict";
|
|
|
|
|
|
|
|
|
11159 |
|
|
|
|
|
11160 |
|
11161 |
+
/**
|
11162 |
+
* Determines whether the specified URL is absolute
|
11163 |
+
*
|
11164 |
+
* @param {string} url The URL to test
|
11165 |
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
11166 |
+
*/
|
11167 |
+
module.exports = function isAbsoluteURL(url) {
|
11168 |
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
11169 |
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
11170 |
+
// by any combination of letters, digits, plus, period, or hyphen.
|
11171 |
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
11172 |
+
};
|
11173 |
|
|
|
|
|
|
|
|
|
|
|
11174 |
|
11175 |
+
/***/ }),
|
|
|
|
|
|
|
11176 |
|
11177 |
+
/***/ 16268:
|
11178 |
+
/***/ (function(module) {
|
|
|
|
|
11179 |
|
11180 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11182 |
|
11183 |
+
/**
|
11184 |
+
* Determines whether the payload is an error thrown by Axios
|
11185 |
+
*
|
11186 |
+
* @param {*} payload The value to test
|
11187 |
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
11188 |
+
*/
|
11189 |
+
module.exports = function isAxiosError(payload) {
|
11190 |
+
return (typeof payload === 'object') && (payload.isAxiosError === true);
|
11191 |
+
};
|
11192 |
|
|
|
|
|
|
|
|
|
11193 |
|
11194 |
+
/***/ }),
|
|
|
|
|
11195 |
|
11196 |
+
/***/ 67985:
|
11197 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
11198 |
|
11199 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
11200 |
|
|
|
|
|
11201 |
|
11202 |
+
var utils = __webpack_require__(64867);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11203 |
|
11204 |
+
module.exports = (
|
11205 |
+
utils.isStandardBrowserEnv() ?
|
11206 |
|
11207 |
+
// Standard browser envs have full support of the APIs needed to test
|
11208 |
+
// whether the request URL is of the same origin as current location.
|
11209 |
+
(function standardBrowserEnv() {
|
11210 |
+
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
11211 |
+
var urlParsingNode = document.createElement('a');
|
11212 |
+
var originURL;
|
11213 |
|
11214 |
+
/**
|
11215 |
+
* Parse a URL to discover it's components
|
11216 |
+
*
|
11217 |
+
* @param {String} url The URL to be parsed
|
11218 |
+
* @returns {Object}
|
11219 |
+
*/
|
11220 |
+
function resolveURL(url) {
|
11221 |
+
var href = url;
|
11222 |
|
11223 |
+
if (msie) {
|
11224 |
+
// IE needs attribute set twice to normalize properties
|
11225 |
+
urlParsingNode.setAttribute('href', href);
|
11226 |
+
href = urlParsingNode.href;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11227 |
}
|
11228 |
|
11229 |
+
urlParsingNode.setAttribute('href', href);
|
11230 |
+
|
11231 |
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
11232 |
+
return {
|
11233 |
+
href: urlParsingNode.href,
|
11234 |
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
11235 |
+
host: urlParsingNode.host,
|
11236 |
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
11237 |
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
11238 |
+
hostname: urlParsingNode.hostname,
|
11239 |
+
port: urlParsingNode.port,
|
11240 |
+
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
11241 |
+
urlParsingNode.pathname :
|
11242 |
+
'/' + urlParsingNode.pathname
|
11243 |
+
};
|
11244 |
}
|
11245 |
|
11246 |
+
originURL = resolveURL(window.location.href);
|
11247 |
+
|
11248 |
+
/**
|
11249 |
+
* Determine if a URL shares the same origin as the current location
|
11250 |
+
*
|
11251 |
+
* @param {String} requestURL The URL to test
|
11252 |
+
* @returns {boolean} True if URL shares the same origin, otherwise false
|
11253 |
+
*/
|
11254 |
+
return function isURLSameOrigin(requestURL) {
|
11255 |
+
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
11256 |
+
return (parsed.protocol === originURL.protocol &&
|
11257 |
+
parsed.host === originURL.host);
|
11258 |
+
};
|
11259 |
+
})() :
|
11260 |
+
|
11261 |
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
11262 |
+
(function nonStandardBrowserEnv() {
|
11263 |
+
return function isURLSameOrigin() {
|
11264 |
+
return true;
|
11265 |
+
};
|
11266 |
+
})()
|
11267 |
+
);
|
11268 |
+
|
11269 |
+
|
11270 |
+
/***/ }),
|
11271 |
+
|
11272 |
+
/***/ 16016:
|
11273 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
11274 |
+
|
11275 |
+
"use strict";
|
11276 |
+
|
11277 |
+
|
11278 |
+
var utils = __webpack_require__(64867);
|
11279 |
+
|
11280 |
+
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
11281 |
+
utils.forEach(headers, function processHeader(value, name) {
|
11282 |
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
11283 |
+
headers[normalizedName] = value;
|
11284 |
+
delete headers[name];
|
11285 |
}
|
11286 |
+
});
|
11287 |
+
};
|
|
|
|
|
11288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11289 |
|
11290 |
+
/***/ }),
|
|
|
|
|
|
|
11291 |
|
11292 |
+
/***/ 84109:
|
11293 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
11294 |
|
11295 |
+
"use strict";
|
|
|
|
|
|
|
|
|
11296 |
|
|
|
|
|
|
|
|
|
11297 |
|
11298 |
+
var utils = __webpack_require__(64867);
|
|
|
11299 |
|
11300 |
+
// Headers whose duplicates are ignored by node
|
11301 |
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
11302 |
+
var ignoreDuplicateOf = [
|
11303 |
+
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
11304 |
+
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
11305 |
+
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
11306 |
+
'referer', 'retry-after', 'user-agent'
|
11307 |
+
];
|
11308 |
|
11309 |
+
/**
|
11310 |
+
* Parse headers into an object
|
11311 |
+
*
|
11312 |
+
* ```
|
11313 |
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
11314 |
+
* Content-Type: application/json
|
11315 |
+
* Connection: keep-alive
|
11316 |
+
* Transfer-Encoding: chunked
|
11317 |
+
* ```
|
11318 |
+
*
|
11319 |
+
* @param {String} headers Headers needing to be parsed
|
11320 |
+
* @returns {Object} Headers parsed into an object
|
11321 |
+
*/
|
11322 |
+
module.exports = function parseHeaders(headers) {
|
11323 |
+
var parsed = {};
|
11324 |
+
var key;
|
11325 |
+
var val;
|
11326 |
+
var i;
|
11327 |
|
11328 |
+
if (!headers) { return parsed; }
|
|
|
11329 |
|
11330 |
+
utils.forEach(headers.split('\n'), function parser(line) {
|
11331 |
+
i = line.indexOf(':');
|
11332 |
+
key = utils.trim(line.substr(0, i)).toLowerCase();
|
11333 |
+
val = utils.trim(line.substr(i + 1));
|
|
|
11334 |
|
11335 |
+
if (key) {
|
11336 |
+
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
11337 |
+
return;
|
11338 |
+
}
|
11339 |
+
if (key === 'set-cookie') {
|
11340 |
+
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
11341 |
+
} else {
|
11342 |
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
11343 |
+
}
|
11344 |
}
|
11345 |
+
});
|
|
|
|
|
|
|
11346 |
|
11347 |
+
return parsed;
|
11348 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11349 |
|
|
|
11350 |
|
11351 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
11352 |
|
11353 |
+
/***/ 8713:
|
11354 |
+
/***/ (function(module) {
|
11355 |
|
11356 |
+
"use strict";
|
|
|
|
|
|
|
|
|
11357 |
|
|
|
|
|
11358 |
|
11359 |
+
/**
|
11360 |
+
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
11361 |
+
*
|
11362 |
+
* Common use case would be to use `Function.prototype.apply`.
|
11363 |
+
*
|
11364 |
+
* ```js
|
11365 |
+
* function f(x, y, z) {}
|
11366 |
+
* var args = [1, 2, 3];
|
11367 |
+
* f.apply(null, args);
|
11368 |
+
* ```
|
11369 |
+
*
|
11370 |
+
* With `spread` this example can be re-written.
|
11371 |
+
*
|
11372 |
+
* ```js
|
11373 |
+
* spread(function(x, y, z) {})([1, 2, 3]);
|
11374 |
+
* ```
|
11375 |
+
*
|
11376 |
+
* @param {Function} callback
|
11377 |
+
* @returns {Function}
|
11378 |
+
*/
|
11379 |
+
module.exports = function spread(callback) {
|
11380 |
+
return function wrap(arr) {
|
11381 |
+
return callback.apply(null, arr);
|
11382 |
+
};
|
11383 |
+
};
|
11384 |
|
|
|
|
|
|
|
|
|
11385 |
|
11386 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
11387 |
|
11388 |
+
/***/ 54875:
|
11389 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
11390 |
|
11391 |
+
"use strict";
|
|
|
|
|
|
|
11392 |
|
|
|
|
|
|
|
11393 |
|
11394 |
+
var pkg = __webpack_require__(20696);
|
|
|
11395 |
|
11396 |
+
var validators = {};
|
|
|
|
|
|
|
|
|
|
|
11397 |
|
11398 |
+
// eslint-disable-next-line func-names
|
11399 |
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
11400 |
+
validators[type] = function validator(thing) {
|
11401 |
+
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
11402 |
+
};
|
11403 |
+
});
|
11404 |
|
11405 |
+
var deprecatedWarnings = {};
|
11406 |
+
var currentVerArr = pkg.version.split('.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11407 |
|
11408 |
+
/**
|
11409 |
+
* Compare package versions
|
11410 |
+
* @param {string} version
|
11411 |
+
* @param {string?} thanVersion
|
11412 |
+
* @returns {boolean}
|
11413 |
+
*/
|
11414 |
+
function isOlderVersion(version, thanVersion) {
|
11415 |
+
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
11416 |
+
var destVer = version.split('.');
|
11417 |
+
for (var i = 0; i < 3; i++) {
|
11418 |
+
if (pkgVersionArr[i] > destVer[i]) {
|
11419 |
+
return true;
|
11420 |
+
} else if (pkgVersionArr[i] < destVer[i]) {
|
11421 |
return false;
|
11422 |
}
|
11423 |
+
}
|
11424 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
11425 |
}
|
11426 |
|
11427 |
+
/**
|
11428 |
+
* Transitional option validator
|
11429 |
+
* @param {function|boolean?} validator
|
11430 |
+
* @param {string?} version
|
11431 |
+
* @param {string} message
|
11432 |
+
* @returns {function}
|
11433 |
+
*/
|
11434 |
+
validators.transitional = function transitional(validator, version, message) {
|
11435 |
+
var isDeprecated = version && isOlderVersion(version);
|
11436 |
|
11437 |
+
function formatMessage(opt, desc) {
|
11438 |
+
return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
|
11439 |
}
|
11440 |
|
11441 |
+
// eslint-disable-next-line func-names
|
11442 |
+
return function(value, opt, opts) {
|
11443 |
+
if (validator === false) {
|
11444 |
+
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
|
|
|
|
|
|
|
|
|
|
11445 |
}
|
11446 |
+
|
11447 |
+
if (isDeprecated && !deprecatedWarnings[opt]) {
|
11448 |
+
deprecatedWarnings[opt] = true;
|
11449 |
+
// eslint-disable-next-line no-console
|
11450 |
+
console.warn(
|
11451 |
+
formatMessage(
|
11452 |
+
opt,
|
11453 |
+
' has been deprecated since v' + version + ' and will be removed in the near future'
|
11454 |
+
)
|
11455 |
+
);
|
11456 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
11457 |
|
11458 |
+
return validator ? validator(value, opt, opts) : true;
|
11459 |
+
};
|
11460 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11461 |
|
11462 |
+
/**
|
11463 |
+
* Assert object's properties type
|
11464 |
+
* @param {object} options
|
11465 |
+
* @param {object} schema
|
11466 |
+
* @param {boolean?} allowUnknown
|
11467 |
+
*/
|
11468 |
|
11469 |
+
function assertOptions(options, schema, allowUnknown) {
|
11470 |
+
if (typeof options !== 'object') {
|
11471 |
+
throw new TypeError('options must be an object');
|
11472 |
+
}
|
11473 |
+
var keys = Object.keys(options);
|
11474 |
+
var i = keys.length;
|
11475 |
+
while (i-- > 0) {
|
11476 |
+
var opt = keys[i];
|
11477 |
+
var validator = schema[opt];
|
11478 |
+
if (validator) {
|
11479 |
+
var value = options[opt];
|
11480 |
+
var result = value === undefined || validator(value, opt, options);
|
11481 |
+
if (result !== true) {
|
11482 |
+
throw new TypeError('option ' + opt + ' must be ' + result);
|
11483 |
}
|
11484 |
+
continue;
|
|
|
11485 |
}
|
11486 |
+
if (allowUnknown !== true) {
|
11487 |
+
throw Error('Unknown option ' + opt);
|
11488 |
+
}
|
11489 |
+
}
|
11490 |
+
}
|
|
|
|
|
|
|
|
|
11491 |
|
11492 |
+
module.exports = {
|
11493 |
+
isOlderVersion: isOlderVersion,
|
11494 |
+
assertOptions: assertOptions,
|
11495 |
+
validators: validators
|
11496 |
+
};
|
11497 |
|
|
|
|
|
11498 |
|
11499 |
+
/***/ }),
|
|
|
|
|
11500 |
|
11501 |
+
/***/ 64867:
|
11502 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
11503 |
|
11504 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
11505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11506 |
|
11507 |
+
var bind = __webpack_require__(91849);
|
|
|
11508 |
|
11509 |
+
// utils is a library of generic helper functions non-specific to axios
|
|
|
11510 |
|
11511 |
+
var toString = Object.prototype.toString;
|
|
|
|
|
|
|
|
|
|
|
11512 |
|
11513 |
+
/**
|
11514 |
+
* Determine if a value is an Array
|
11515 |
+
*
|
11516 |
+
* @param {Object} val The value to test
|
11517 |
+
* @returns {boolean} True if value is an Array, otherwise false
|
11518 |
+
*/
|
11519 |
+
function isArray(val) {
|
11520 |
+
return toString.call(val) === '[object Array]';
|
11521 |
+
}
|
11522 |
|
11523 |
+
/**
|
11524 |
+
* Determine if a value is undefined
|
11525 |
+
*
|
11526 |
+
* @param {Object} val The value to test
|
11527 |
+
* @returns {boolean} True if the value is undefined, otherwise false
|
11528 |
+
*/
|
11529 |
+
function isUndefined(val) {
|
11530 |
+
return typeof val === 'undefined';
|
11531 |
+
}
|
11532 |
|
11533 |
+
/**
|
11534 |
+
* Determine if a value is a Buffer
|
11535 |
+
*
|
11536 |
+
* @param {Object} val The value to test
|
11537 |
+
* @returns {boolean} True if value is a Buffer, otherwise false
|
11538 |
+
*/
|
11539 |
+
function isBuffer(val) {
|
11540 |
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
11541 |
+
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
11542 |
+
}
|
11543 |
|
11544 |
+
/**
|
11545 |
+
* Determine if a value is an ArrayBuffer
|
11546 |
+
*
|
11547 |
+
* @param {Object} val The value to test
|
11548 |
+
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
11549 |
+
*/
|
11550 |
+
function isArrayBuffer(val) {
|
11551 |
+
return toString.call(val) === '[object ArrayBuffer]';
|
11552 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11553 |
|
11554 |
+
/**
|
11555 |
+
* Determine if a value is a FormData
|
11556 |
+
*
|
11557 |
+
* @param {Object} val The value to test
|
11558 |
+
* @returns {boolean} True if value is an FormData, otherwise false
|
11559 |
+
*/
|
11560 |
+
function isFormData(val) {
|
11561 |
+
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
|
|
|
|
|
|
11562 |
}
|
11563 |
|
11564 |
+
/**
|
11565 |
+
* Determine if a value is a view on an ArrayBuffer
|
11566 |
+
*
|
11567 |
+
* @param {Object} val The value to test
|
11568 |
+
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
11569 |
+
*/
|
11570 |
+
function isArrayBufferView(val) {
|
11571 |
+
var result;
|
11572 |
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
11573 |
+
result = ArrayBuffer.isView(val);
|
11574 |
+
} else {
|
11575 |
+
result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
11576 |
+
}
|
11577 |
+
return result;
|
11578 |
+
}
|
11579 |
|
11580 |
+
/**
|
11581 |
+
* Determine if a value is a String
|
11582 |
+
*
|
11583 |
+
* @param {Object} val The value to test
|
11584 |
+
* @returns {boolean} True if value is a String, otherwise false
|
11585 |
+
*/
|
11586 |
+
function isString(val) {
|
11587 |
+
return typeof val === 'string';
|
11588 |
+
}
|
11589 |
|
11590 |
+
/**
|
11591 |
+
* Determine if a value is a Number
|
11592 |
+
*
|
11593 |
+
* @param {Object} val The value to test
|
11594 |
+
* @returns {boolean} True if value is a Number, otherwise false
|
11595 |
+
*/
|
11596 |
+
function isNumber(val) {
|
11597 |
+
return typeof val === 'number';
|
11598 |
+
}
|
11599 |
|
11600 |
+
/**
|
11601 |
+
* Determine if a value is an Object
|
11602 |
+
*
|
11603 |
+
* @param {Object} val The value to test
|
11604 |
+
* @returns {boolean} True if value is an Object, otherwise false
|
11605 |
+
*/
|
11606 |
+
function isObject(val) {
|
11607 |
+
return val !== null && typeof val === 'object';
|
11608 |
+
}
|
11609 |
|
11610 |
+
/**
|
11611 |
+
* Determine if a value is a plain Object
|
11612 |
+
*
|
11613 |
+
* @param {Object} val The value to test
|
11614 |
+
* @return {boolean} True if value is a plain Object, otherwise false
|
11615 |
+
*/
|
11616 |
+
function isPlainObject(val) {
|
11617 |
+
if (toString.call(val) !== '[object Object]') {
|
11618 |
+
return false;
|
11619 |
}
|
11620 |
|
11621 |
+
var prototype = Object.getPrototypeOf(val);
|
11622 |
+
return prototype === null || prototype === Object.prototype;
|
11623 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
11624 |
|
11625 |
+
/**
|
11626 |
+
* Determine if a value is a Date
|
11627 |
+
*
|
11628 |
+
* @param {Object} val The value to test
|
11629 |
+
* @returns {boolean} True if value is a Date, otherwise false
|
11630 |
+
*/
|
11631 |
+
function isDate(val) {
|
11632 |
+
return toString.call(val) === '[object Date]';
|
11633 |
+
}
|
11634 |
|
11635 |
+
/**
|
11636 |
+
* Determine if a value is a File
|
11637 |
+
*
|
11638 |
+
* @param {Object} val The value to test
|
11639 |
+
* @returns {boolean} True if value is a File, otherwise false
|
11640 |
+
*/
|
11641 |
+
function isFile(val) {
|
11642 |
+
return toString.call(val) === '[object File]';
|
11643 |
+
}
|
11644 |
|
11645 |
+
/**
|
11646 |
+
* Determine if a value is a Blob
|
11647 |
+
*
|
11648 |
+
* @param {Object} val The value to test
|
11649 |
+
* @returns {boolean} True if value is a Blob, otherwise false
|
11650 |
+
*/
|
11651 |
+
function isBlob(val) {
|
11652 |
+
return toString.call(val) === '[object Blob]';
|
11653 |
+
}
|
11654 |
|
11655 |
+
/**
|
11656 |
+
* Determine if a value is a Function
|
11657 |
+
*
|
11658 |
+
* @param {Object} val The value to test
|
11659 |
+
* @returns {boolean} True if value is a Function, otherwise false
|
11660 |
+
*/
|
11661 |
+
function isFunction(val) {
|
11662 |
+
return toString.call(val) === '[object Function]';
|
11663 |
+
}
|
|
|
|
|
|
|
|
|
|
|
11664 |
|
11665 |
+
/**
|
11666 |
+
* Determine if a value is a Stream
|
11667 |
+
*
|
11668 |
+
* @param {Object} val The value to test
|
11669 |
+
* @returns {boolean} True if value is a Stream, otherwise false
|
11670 |
+
*/
|
11671 |
+
function isStream(val) {
|
11672 |
+
return isObject(val) && isFunction(val.pipe);
|
11673 |
+
}
|
11674 |
|
11675 |
+
/**
|
11676 |
+
* Determine if a value is a URLSearchParams object
|
11677 |
+
*
|
11678 |
+
* @param {Object} val The value to test
|
11679 |
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
11680 |
+
*/
|
11681 |
+
function isURLSearchParams(val) {
|
11682 |
+
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
11683 |
+
}
|
11684 |
|
11685 |
+
/**
|
11686 |
+
* Trim excess whitespace off the beginning and end of a string
|
11687 |
+
*
|
11688 |
+
* @param {String} str The String to trim
|
11689 |
+
* @returns {String} The String freed of excess whitespace
|
11690 |
+
*/
|
11691 |
+
function trim(str) {
|
11692 |
+
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
|
11693 |
+
}
|
11694 |
|
11695 |
+
/**
|
11696 |
+
* Determine if we're running in a standard browser environment
|
11697 |
+
*
|
11698 |
+
* This allows axios to run in a web worker, and react-native.
|
11699 |
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
11700 |
+
*
|
11701 |
+
* web workers:
|
11702 |
+
* typeof window -> undefined
|
11703 |
+
* typeof document -> undefined
|
11704 |
+
*
|
11705 |
+
* react-native:
|
11706 |
+
* navigator.product -> 'ReactNative'
|
11707 |
+
* nativescript
|
11708 |
+
* navigator.product -> 'NativeScript' or 'NS'
|
11709 |
+
*/
|
11710 |
+
function isStandardBrowserEnv() {
|
11711 |
+
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
11712 |
+
navigator.product === 'NativeScript' ||
|
11713 |
+
navigator.product === 'NS')) {
|
11714 |
+
return false;
|
11715 |
+
}
|
11716 |
+
return (
|
11717 |
+
typeof window !== 'undefined' &&
|
11718 |
+
typeof document !== 'undefined'
|
11719 |
+
);
|
11720 |
+
}
|
11721 |
|
11722 |
+
/**
|
11723 |
+
* Iterate over an Array or an Object invoking a function for each item.
|
11724 |
+
*
|
11725 |
+
* If `obj` is an Array callback will be called passing
|
11726 |
+
* the value, index, and complete array for each item.
|
11727 |
+
*
|
11728 |
+
* If 'obj' is an Object callback will be called passing
|
11729 |
+
* the value, key, and complete object for each property.
|
11730 |
+
*
|
11731 |
+
* @param {Object|Array} obj The object to iterate
|
11732 |
+
* @param {Function} fn The callback to invoke for each item
|
11733 |
+
*/
|
11734 |
+
function forEach(obj, fn) {
|
11735 |
+
// Don't bother if no value provided
|
11736 |
+
if (obj === null || typeof obj === 'undefined') {
|
11737 |
+
return;
|
11738 |
+
}
|
11739 |
|
11740 |
+
// Force an array if not already something iterable
|
11741 |
+
if (typeof obj !== 'object') {
|
11742 |
+
/*eslint no-param-reassign:0*/
|
11743 |
+
obj = [obj];
|
11744 |
+
}
|
11745 |
|
11746 |
+
if (isArray(obj)) {
|
11747 |
+
// Iterate over array values
|
11748 |
+
for (var i = 0, l = obj.length; i < l; i++) {
|
11749 |
+
fn.call(null, obj[i], i, obj);
|
11750 |
}
|
11751 |
+
} else {
|
11752 |
+
// Iterate over object keys
|
11753 |
+
for (var key in obj) {
|
11754 |
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
11755 |
+
fn.call(null, obj[key], key, obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11756 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11757 |
}
|
11758 |
+
}
|
11759 |
+
}
|
|
|
|
|
11760 |
|
11761 |
+
/**
|
11762 |
+
* Accepts varargs expecting each argument to be an object, then
|
11763 |
+
* immutably merges the properties of each object and returns result.
|
11764 |
+
*
|
11765 |
+
* When multiple objects contain the same key the later object in
|
11766 |
+
* the arguments list will take precedence.
|
11767 |
+
*
|
11768 |
+
* Example:
|
11769 |
+
*
|
11770 |
+
* ```js
|
11771 |
+
* var result = merge({foo: 123}, {foo: 456});
|
11772 |
+
* console.log(result.foo); // outputs 456
|
11773 |
+
* ```
|
11774 |
+
*
|
11775 |
+
* @param {Object} obj1 Object to merge
|
11776 |
+
* @returns {Object} Result of all merge properties
|
11777 |
+
*/
|
11778 |
+
function merge(/* obj1, obj2, obj3, ... */) {
|
11779 |
+
var result = {};
|
11780 |
+
function assignValue(val, key) {
|
11781 |
+
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
11782 |
+
result[key] = merge(result[key], val);
|
11783 |
+
} else if (isPlainObject(val)) {
|
11784 |
+
result[key] = merge({}, val);
|
11785 |
+
} else if (isArray(val)) {
|
11786 |
+
result[key] = val.slice();
|
11787 |
+
} else {
|
11788 |
+
result[key] = val;
|
11789 |
+
}
|
11790 |
+
}
|
11791 |
|
11792 |
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
11793 |
+
forEach(arguments[i], assignValue);
|
11794 |
+
}
|
11795 |
+
return result;
|
11796 |
+
}
|
11797 |
|
11798 |
+
/**
|
11799 |
+
* Extends object a by mutably adding to it the properties of object b.
|
11800 |
+
*
|
11801 |
+
* @param {Object} a The object to be extended
|
11802 |
+
* @param {Object} b The object to copy properties from
|
11803 |
+
* @param {Object} thisArg The object to bind function to
|
11804 |
+
* @return {Object} The resulting value of object a
|
11805 |
+
*/
|
11806 |
+
function extend(a, b, thisArg) {
|
11807 |
+
forEach(b, function assignValue(val, key) {
|
11808 |
+
if (thisArg && typeof val === 'function') {
|
11809 |
+
a[key] = bind(val, thisArg);
|
11810 |
+
} else {
|
11811 |
+
a[key] = val;
|
11812 |
+
}
|
11813 |
+
});
|
11814 |
+
return a;
|
11815 |
+
}
|
11816 |
|
11817 |
+
/**
|
11818 |
+
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
11819 |
+
*
|
11820 |
+
* @param {string} content with BOM
|
11821 |
+
* @return {string} content value without BOM
|
11822 |
+
*/
|
11823 |
+
function stripBOM(content) {
|
11824 |
+
if (content.charCodeAt(0) === 0xFEFF) {
|
11825 |
+
content = content.slice(1);
|
11826 |
+
}
|
11827 |
+
return content;
|
11828 |
+
}
|
11829 |
|
11830 |
+
module.exports = {
|
11831 |
+
isArray: isArray,
|
11832 |
+
isArrayBuffer: isArrayBuffer,
|
11833 |
+
isBuffer: isBuffer,
|
11834 |
+
isFormData: isFormData,
|
11835 |
+
isArrayBufferView: isArrayBufferView,
|
11836 |
+
isString: isString,
|
11837 |
+
isNumber: isNumber,
|
11838 |
+
isObject: isObject,
|
11839 |
+
isPlainObject: isPlainObject,
|
11840 |
+
isUndefined: isUndefined,
|
11841 |
+
isDate: isDate,
|
11842 |
+
isFile: isFile,
|
11843 |
+
isBlob: isBlob,
|
11844 |
+
isFunction: isFunction,
|
11845 |
+
isStream: isStream,
|
11846 |
+
isURLSearchParams: isURLSearchParams,
|
11847 |
+
isStandardBrowserEnv: isStandardBrowserEnv,
|
11848 |
+
forEach: forEach,
|
11849 |
+
merge: merge,
|
11850 |
+
extend: extend,
|
11851 |
+
trim: trim,
|
11852 |
+
stripBOM: stripBOM
|
11853 |
+
};
|
11854 |
|
|
|
|
|
|
|
11855 |
|
11856 |
+
/***/ }),
|
|
|
11857 |
|
11858 |
+
/***/ 20696:
|
11859 |
+
/***/ (function(module) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11860 |
|
11861 |
+
"use strict";
|
11862 |
+
module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}');
|
|
|
|
|
11863 |
|
11864 |
+
/***/ }),
|
|
|
|
|
11865 |
|
11866 |
+
/***/ 52430:
|
11867 |
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
11868 |
|
11869 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
11870 |
|
11871 |
+
// EXTERNAL MODULE: ./node_modules/react/index.js
|
11872 |
+
var react = __webpack_require__(67294);
|
11873 |
+
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
|
11874 |
+
var react_dom = __webpack_require__(73935);
|
11875 |
+
// EXTERNAL MODULE: ./node_modules/symbol-observable/es/index.js + 1 modules
|
11876 |
+
var es = __webpack_require__(67121);
|
11877 |
+
;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11878 |
|
|
|
|
|
|
|
11879 |
|
11880 |
+
/**
|
11881 |
+
* These are private action types reserved by Redux.
|
11882 |
+
* For any unknown actions, you must return the current state.
|
11883 |
+
* If the current state is undefined, you must return the initial state.
|
11884 |
+
* Do not reference these action types directly in your code.
|
11885 |
+
*/
|
11886 |
+
var randomString = function randomString() {
|
11887 |
+
return Math.random().toString(36).substring(7).split('').join('.');
|
11888 |
+
};
|
|
|
|
|
11889 |
|
11890 |
+
var ActionTypes = {
|
11891 |
+
INIT: "@@redux/INIT" + randomString(),
|
11892 |
+
REPLACE: "@@redux/REPLACE" + randomString(),
|
11893 |
+
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
11894 |
+
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
11895 |
+
}
|
11896 |
+
};
|
11897 |
|
11898 |
+
/**
|
11899 |
+
* @param {any} obj The object to inspect.
|
11900 |
+
* @returns {boolean} True if the argument appears to be a plain object.
|
11901 |
+
*/
|
11902 |
+
function isPlainObject(obj) {
|
11903 |
+
if (typeof obj !== 'object' || obj === null) return false;
|
11904 |
+
var proto = obj;
|
11905 |
|
11906 |
+
while (Object.getPrototypeOf(proto) !== null) {
|
11907 |
+
proto = Object.getPrototypeOf(proto);
|
11908 |
+
}
|
|
|
|
|
|
|
11909 |
|
11910 |
+
return Object.getPrototypeOf(obj) === proto;
|
11911 |
+
}
|
11912 |
|
11913 |
+
/**
|
11914 |
+
* Creates a Redux store that holds the state tree.
|
11915 |
+
* The only way to change the data in the store is to call `dispatch()` on it.
|
11916 |
+
*
|
11917 |
+
* There should only be a single store in your app. To specify how different
|
11918 |
+
* parts of the state tree respond to actions, you may combine several reducers
|
11919 |
+
* into a single reducer function by using `combineReducers`.
|
11920 |
+
*
|
11921 |
+
* @param {Function} reducer A function that returns the next state tree, given
|
11922 |
+
* the current state tree and the action to handle.
|
11923 |
+
*
|
11924 |
+
* @param {any} [preloadedState] The initial state. You may optionally specify it
|
11925 |
+
* to hydrate the state from the server in universal apps, or to restore a
|
11926 |
+
* previously serialized user session.
|
11927 |
+
* If you use `combineReducers` to produce the root reducer function, this must be
|
11928 |
+
* an object with the same shape as `combineReducers` keys.
|
11929 |
+
*
|
11930 |
+
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
|
11931 |
+
* to enhance the store with third-party capabilities such as middleware,
|
11932 |
+
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
11933 |
+
* is `applyMiddleware()`.
|
11934 |
+
*
|
11935 |
+
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
11936 |
+
* and subscribe to changes.
|
11937 |
+
*/
|
11938 |
|
11939 |
+
function createStore(reducer, preloadedState, enhancer) {
|
11940 |
+
var _ref2;
|
|
|
11941 |
|
11942 |
+
if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
|
11943 |
+
throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');
|
11944 |
+
}
|
11945 |
|
11946 |
+
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
|
11947 |
+
enhancer = preloadedState;
|
11948 |
+
preloadedState = undefined;
|
11949 |
+
}
|
11950 |
|
11951 |
+
if (typeof enhancer !== 'undefined') {
|
11952 |
+
if (typeof enhancer !== 'function') {
|
11953 |
+
throw new Error('Expected the enhancer to be a function.');
|
11954 |
+
}
|
|
|
|
|
|
|
|
|
11955 |
|
11956 |
+
return enhancer(createStore)(reducer, preloadedState);
|
11957 |
+
}
|
|
|
|
|
|
|
|
|
|
|
11958 |
|
11959 |
+
if (typeof reducer !== 'function') {
|
11960 |
+
throw new Error('Expected the reducer to be a function.');
|
11961 |
+
}
|
11962 |
|
11963 |
+
var currentReducer = reducer;
|
11964 |
+
var currentState = preloadedState;
|
11965 |
+
var currentListeners = [];
|
11966 |
+
var nextListeners = currentListeners;
|
11967 |
+
var isDispatching = false;
|
11968 |
+
/**
|
11969 |
+
* This makes a shallow copy of currentListeners so we can use
|
11970 |
+
* nextListeners as a temporary list while dispatching.
|
11971 |
+
*
|
11972 |
+
* This prevents any bugs around consumers calling
|
11973 |
+
* subscribe/unsubscribe in the middle of a dispatch.
|
11974 |
+
*/
|
11975 |
|
11976 |
+
function ensureCanMutateNextListeners() {
|
11977 |
+
if (nextListeners === currentListeners) {
|
11978 |
+
nextListeners = currentListeners.slice();
|
11979 |
+
}
|
11980 |
+
}
|
11981 |
+
/**
|
11982 |
+
* Reads the state tree managed by the store.
|
11983 |
+
*
|
11984 |
+
* @returns {any} The current state tree of your application.
|
11985 |
+
*/
|
11986 |
|
|
|
|
|
|
|
11987 |
|
11988 |
+
function getState() {
|
11989 |
+
if (isDispatching) {
|
11990 |
+
throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
|
11991 |
+
}
|
11992 |
|
11993 |
+
return currentState;
|
11994 |
+
}
|
11995 |
+
/**
|
11996 |
+
* Adds a change listener. It will be called any time an action is dispatched,
|
11997 |
+
* and some part of the state tree may potentially have changed. You may then
|
11998 |
+
* call `getState()` to read the current state tree inside the callback.
|
11999 |
+
*
|
12000 |
+
* You may call `dispatch()` from a change listener, with the following
|
12001 |
+
* caveats:
|
12002 |
+
*
|
12003 |
+
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
12004 |
+
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
12005 |
+
* will not have any effect on the `dispatch()` that is currently in progress.
|
12006 |
+
* However, the next `dispatch()` call, whether nested or not, will use a more
|
12007 |
+
* recent snapshot of the subscription list.
|
12008 |
+
*
|
12009 |
+
* 2. The listener should not expect to see all state changes, as the state
|
12010 |
+
* might have been updated multiple times during a nested `dispatch()` before
|
12011 |
+
* the listener is called. It is, however, guaranteed that all subscribers
|
12012 |
+
* registered before the `dispatch()` started will be called with the latest
|
12013 |
+
* state by the time it exits.
|
12014 |
+
*
|
12015 |
+
* @param {Function} listener A callback to be invoked on every dispatch.
|
12016 |
+
* @returns {Function} A function to remove this change listener.
|
12017 |
+
*/
|
12018 |
|
|
|
|
|
|
|
12019 |
|
12020 |
+
function subscribe(listener) {
|
12021 |
+
if (typeof listener !== 'function') {
|
12022 |
+
throw new Error('Expected the listener to be a function.');
|
12023 |
}
|
|
|
12024 |
|
12025 |
+
if (isDispatching) {
|
12026 |
+
throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
|
12027 |
+
}
|
12028 |
|
12029 |
+
var isSubscribed = true;
|
12030 |
+
ensureCanMutateNextListeners();
|
12031 |
+
nextListeners.push(listener);
|
12032 |
+
return function unsubscribe() {
|
12033 |
+
if (!isSubscribed) {
|
12034 |
+
return;
|
12035 |
+
}
|
12036 |
|
12037 |
+
if (isDispatching) {
|
12038 |
+
throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
|
12039 |
+
}
|
12040 |
|
12041 |
+
isSubscribed = false;
|
12042 |
+
ensureCanMutateNextListeners();
|
12043 |
+
var index = nextListeners.indexOf(listener);
|
12044 |
+
nextListeners.splice(index, 1);
|
12045 |
+
currentListeners = null;
|
12046 |
+
};
|
12047 |
+
}
|
12048 |
+
/**
|
12049 |
+
* Dispatches an action. It is the only way to trigger a state change.
|
12050 |
+
*
|
12051 |
+
* The `reducer` function, used to create the store, will be called with the
|
12052 |
+
* current state tree and the given `action`. Its return value will
|
12053 |
+
* be considered the **next** state of the tree, and the change listeners
|
12054 |
+
* will be notified.
|
12055 |
+
*
|
12056 |
+
* The base implementation only supports plain object actions. If you want to
|
12057 |
+
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
12058 |
+
* wrap your store creating function into the corresponding middleware. For
|
12059 |
+
* example, see the documentation for the `redux-thunk` package. Even the
|
12060 |
+
* middleware will eventually dispatch plain object actions using this method.
|
12061 |
+
*
|
12062 |
+
* @param {Object} action A plain object representing “what changed”. It is
|
12063 |
+
* a good idea to keep actions serializable so you can record and replay user
|
12064 |
+
* sessions, or use the time travelling `redux-devtools`. An action must have
|
12065 |
+
* a `type` property which may not be `undefined`. It is a good idea to use
|
12066 |
+
* string constants for action types.
|
12067 |
+
*
|
12068 |
+
* @returns {Object} For convenience, the same action object you dispatched.
|
12069 |
+
*
|
12070 |
+
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
12071 |
+
* return something else (for example, a Promise you can await).
|
12072 |
+
*/
|
12073 |
|
|
|
|
|
|
|
|
|
12074 |
|
12075 |
+
function dispatch(action) {
|
12076 |
+
if (!isPlainObject(action)) {
|
12077 |
+
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
12078 |
+
}
|
|
|
|
|
|
|
|
|
12079 |
|
12080 |
+
if (typeof action.type === 'undefined') {
|
12081 |
+
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
12082 |
+
}
|
|
|
12083 |
|
12084 |
+
if (isDispatching) {
|
12085 |
+
throw new Error('Reducers may not dispatch actions.');
|
|
|
|
|
|
|
|
|
12086 |
}
|
|
|
12087 |
|
12088 |
+
try {
|
12089 |
+
isDispatching = true;
|
12090 |
+
currentState = currentReducer(currentState, action);
|
12091 |
+
} finally {
|
12092 |
+
isDispatching = false;
|
12093 |
+
}
|
12094 |
|
12095 |
+
var listeners = currentListeners = nextListeners;
|
|
|
|
|
12096 |
|
12097 |
+
for (var i = 0; i < listeners.length; i++) {
|
12098 |
+
var listener = listeners[i];
|
12099 |
+
listener();
|
12100 |
+
}
|
12101 |
|
12102 |
+
return action;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12103 |
}
|
12104 |
+
/**
|
12105 |
+
* Replaces the reducer currently used by the store to calculate the state.
|
12106 |
+
*
|
12107 |
+
* You might need this if your app implements code splitting and you want to
|
12108 |
+
* load some of the reducers dynamically. You might also need this if you
|
12109 |
+
* implement a hot reloading mechanism for Redux.
|
12110 |
+
*
|
12111 |
+
* @param {Function} nextReducer The reducer for the store to use instead.
|
12112 |
+
* @returns {void}
|
12113 |
+
*/
|
12114 |
|
12115 |
+
|
12116 |
+
function replaceReducer(nextReducer) {
|
12117 |
+
if (typeof nextReducer !== 'function') {
|
12118 |
+
throw new Error('Expected the nextReducer to be a function.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12119 |
}
|
|
|
|
|
|
|
|
|
12120 |
|
12121 |
+
currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
|
12122 |
+
// Any reducers that existed in both the new and old rootReducer
|
12123 |
+
// will receive the previous state. This effectively populates
|
12124 |
+
// the new state tree with any relevant data from the old one.
|
12125 |
|
12126 |
+
dispatch({
|
12127 |
+
type: ActionTypes.REPLACE
|
12128 |
+
});
|
12129 |
+
}
|
12130 |
+
/**
|
12131 |
+
* Interoperability point for observable/reactive libraries.
|
12132 |
+
* @returns {observable} A minimal observable of state changes.
|
12133 |
+
* For more information, see the observable proposal:
|
12134 |
+
* https://github.com/tc39/proposal-observable
|
12135 |
+
*/
|
12136 |
|
|
|
|
|
12137 |
|
12138 |
+
function observable() {
|
12139 |
+
var _ref;
|
|
|
|
|
|
|
|
|
|
|
12140 |
|
12141 |
+
var outerSubscribe = subscribe;
|
12142 |
+
return _ref = {
|
12143 |
+
/**
|
12144 |
+
* The minimal observable subscription method.
|
12145 |
+
* @param {Object} observer Any object that can be used as an observer.
|
12146 |
+
* The observer object should have a `next` method.
|
12147 |
+
* @returns {subscription} An object with an `unsubscribe` method that can
|
12148 |
+
* be used to unsubscribe the observable from the store, and prevent further
|
12149 |
+
* emission of values from the observable.
|
12150 |
+
*/
|
12151 |
+
subscribe: function subscribe(observer) {
|
12152 |
+
if (typeof observer !== 'object' || observer === null) {
|
12153 |
+
throw new TypeError('Expected the observer to be an object.');
|
12154 |
}
|
12155 |
|
12156 |
+
function observeState() {
|
12157 |
+
if (observer.next) {
|
12158 |
+
observer.next(getState());
|
12159 |
+
}
|
12160 |
+
}
|
12161 |
|
12162 |
+
observeState();
|
12163 |
+
var unsubscribe = outerSubscribe(observeState);
|
12164 |
+
return {
|
12165 |
+
unsubscribe: unsubscribe
|
12166 |
+
};
|
12167 |
+
}
|
12168 |
+
}, _ref[es/* default */.Z] = function () {
|
12169 |
+
return this;
|
12170 |
+
}, _ref;
|
12171 |
+
} // When a store is created, an "INIT" action is dispatched so that every
|
12172 |
+
// reducer returns their initial state. This effectively populates
|
12173 |
+
// the initial state tree.
|
12174 |
|
|
|
12175 |
|
12176 |
+
dispatch({
|
12177 |
+
type: ActionTypes.INIT
|
12178 |
+
});
|
12179 |
+
return _ref2 = {
|
12180 |
+
dispatch: dispatch,
|
12181 |
+
subscribe: subscribe,
|
12182 |
+
getState: getState,
|
12183 |
+
replaceReducer: replaceReducer
|
12184 |
+
}, _ref2[es/* default */.Z] = observable, _ref2;
|
12185 |
+
}
|
12186 |
|
12187 |
+
/**
|
12188 |
+
* Prints a warning in the console if it exists.
|
12189 |
+
*
|
12190 |
+
* @param {String} message The warning message.
|
12191 |
+
* @returns {void}
|
12192 |
+
*/
|
12193 |
+
function warning(message) {
|
12194 |
+
/* eslint-disable no-console */
|
12195 |
+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
12196 |
+
console.error(message);
|
12197 |
+
}
|
12198 |
+
/* eslint-enable no-console */
|
12199 |
|
|
|
12200 |
|
12201 |
+
try {
|
12202 |
+
// This error was thrown as a convenience so that if you enable
|
12203 |
+
// "break on all exceptions" in your console,
|
12204 |
+
// it would pause the execution at this line.
|
12205 |
+
throw new Error(message);
|
12206 |
+
} catch (e) {} // eslint-disable-line no-empty
|
12207 |
|
|
|
|
|
|
|
|
|
12208 |
}
|
12209 |
|
12210 |
+
function getUndefinedStateErrorMessage(key, action) {
|
12211 |
+
var actionType = action && action.type;
|
12212 |
+
var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
|
12213 |
+
return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
|
12214 |
+
}
|
12215 |
|
12216 |
+
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
12217 |
+
var reducerKeys = Object.keys(reducers);
|
12218 |
+
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
|
12219 |
|
12220 |
+
if (reducerKeys.length === 0) {
|
12221 |
+
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
12222 |
+
}
|
12223 |
|
12224 |
+
if (!isPlainObject(inputState)) {
|
12225 |
+
return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
|
12226 |
+
}
|
12227 |
|
12228 |
+
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
12229 |
+
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
|
12230 |
+
});
|
12231 |
+
unexpectedKeys.forEach(function (key) {
|
12232 |
+
unexpectedKeyCache[key] = true;
|
12233 |
+
});
|
12234 |
+
if (action && action.type === ActionTypes.REPLACE) return;
|
12235 |
|
12236 |
+
if (unexpectedKeys.length > 0) {
|
12237 |
+
return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
|
12238 |
+
}
|
12239 |
+
}
|
12240 |
|
12241 |
+
function assertReducerShape(reducers) {
|
12242 |
+
Object.keys(reducers).forEach(function (key) {
|
12243 |
+
var reducer = reducers[key];
|
12244 |
+
var initialState = reducer(undefined, {
|
12245 |
+
type: ActionTypes.INIT
|
12246 |
+
});
|
12247 |
|
12248 |
+
if (typeof initialState === 'undefined') {
|
12249 |
+
throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
|
12250 |
+
}
|
|
|
|
|
|
|
|
|
|
|
12251 |
|
12252 |
+
if (typeof reducer(undefined, {
|
12253 |
+
type: ActionTypes.PROBE_UNKNOWN_ACTION()
|
12254 |
+
}) === 'undefined') {
|
12255 |
+
throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
|
12256 |
}
|
12257 |
+
});
|
12258 |
+
}
|
12259 |
+
/**
|
12260 |
+
* Turns an object whose values are different reducer functions, into a single
|
12261 |
+
* reducer function. It will call every child reducer, and gather their results
|
12262 |
+
* into a single state object, whose keys correspond to the keys of the passed
|
12263 |
+
* reducer functions.
|
12264 |
+
*
|
12265 |
+
* @param {Object} reducers An object whose values correspond to different
|
12266 |
+
* reducer functions that need to be combined into one. One handy way to obtain
|
12267 |
+
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
12268 |
+
* undefined for any action. Instead, they should return their initial state
|
12269 |
+
* if the state passed to them was undefined, and the current state for any
|
12270 |
+
* unrecognized action.
|
12271 |
+
*
|
12272 |
+
* @returns {Function} A reducer function that invokes every reducer inside the
|
12273 |
+
* passed object, and builds a state object with the same shape.
|
12274 |
+
*/
|
12275 |
|
|
|
|
|
12276 |
|
12277 |
+
function combineReducers(reducers) {
|
12278 |
+
var reducerKeys = Object.keys(reducers);
|
12279 |
+
var finalReducers = {};
|
|
|
12280 |
|
12281 |
+
for (var i = 0; i < reducerKeys.length; i++) {
|
12282 |
+
var key = reducerKeys[i];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12283 |
|
12284 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12285 |
|
12286 |
+
if (typeof reducers[key] === 'function') {
|
12287 |
+
finalReducers[key] = reducers[key];
|
|
|
|
|
|
|
|
|
12288 |
}
|
12289 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
12290 |
|
12291 |
+
var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
|
12292 |
+
// keys multiple times.
|
|
|
12293 |
|
12294 |
+
var unexpectedKeyCache;
|
|
|
|
|
|
|
|
|
|
|
12295 |
|
12296 |
+
if (false) {}
|
|
|
|
|
12297 |
|
12298 |
+
var shapeAssertionError;
|
|
|
|
|
|
|
|
|
|
|
|
|
12299 |
|
12300 |
+
try {
|
12301 |
+
assertReducerShape(finalReducers);
|
12302 |
+
} catch (e) {
|
12303 |
+
shapeAssertionError = e;
|
12304 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12305 |
|
12306 |
+
return function combination(state, action) {
|
12307 |
+
if (state === void 0) {
|
12308 |
+
state = {};
|
12309 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12310 |
|
12311 |
+
if (shapeAssertionError) {
|
12312 |
+
throw shapeAssertionError;
|
12313 |
}
|
|
|
|
|
|
|
|
|
12314 |
|
12315 |
+
if (false) { var warningMessage; }
|
|
|
12316 |
|
12317 |
+
var hasChanged = false;
|
12318 |
+
var nextState = {};
|
|
|
|
|
12319 |
|
12320 |
+
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
|
12321 |
+
var _key = finalReducerKeys[_i];
|
12322 |
+
var reducer = finalReducers[_key];
|
12323 |
+
var previousStateForKey = state[_key];
|
12324 |
+
var nextStateForKey = reducer(previousStateForKey, action);
|
12325 |
|
12326 |
+
if (typeof nextStateForKey === 'undefined') {
|
12327 |
+
var errorMessage = getUndefinedStateErrorMessage(_key, action);
|
12328 |
+
throw new Error(errorMessage);
|
12329 |
}
|
12330 |
|
12331 |
+
nextState[_key] = nextStateForKey;
|
12332 |
+
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12333 |
}
|
|
|
|
|
|
|
|
|
12334 |
|
12335 |
+
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
12336 |
+
return hasChanged ? nextState : state;
|
12337 |
+
};
|
12338 |
+
}
|
12339 |
|
12340 |
+
function bindActionCreator(actionCreator, dispatch) {
|
12341 |
+
return function () {
|
12342 |
+
return dispatch(actionCreator.apply(this, arguments));
|
12343 |
+
};
|
12344 |
+
}
|
12345 |
+
/**
|
12346 |
+
* Turns an object whose values are action creators, into an object with the
|
12347 |
+
* same keys, but with every function wrapped into a `dispatch` call so they
|
12348 |
+
* may be invoked directly. This is just a convenience method, as you can call
|
12349 |
+
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
12350 |
+
*
|
12351 |
+
* For convenience, you can also pass an action creator as the first argument,
|
12352 |
+
* and get a dispatch wrapped function in return.
|
12353 |
+
*
|
12354 |
+
* @param {Function|Object} actionCreators An object whose values are action
|
12355 |
+
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
12356 |
+
* syntax. You may also pass a single function.
|
12357 |
+
*
|
12358 |
+
* @param {Function} dispatch The `dispatch` function available on your Redux
|
12359 |
+
* store.
|
12360 |
+
*
|
12361 |
+
* @returns {Function|Object} The object mimicking the original object, but with
|
12362 |
+
* every action creator wrapped into the `dispatch` call. If you passed a
|
12363 |
+
* function as `actionCreators`, the return value will also be a single
|
12364 |
+
* function.
|
12365 |
+
*/
|
12366 |
|
|
|
|
|
|
|
|
|
|
|
12367 |
|
12368 |
+
function bindActionCreators(actionCreators, dispatch) {
|
12369 |
+
if (typeof actionCreators === 'function') {
|
12370 |
+
return bindActionCreator(actionCreators, dispatch);
|
12371 |
+
}
|
12372 |
|
12373 |
+
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
12374 |
+
throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
|
12375 |
+
}
|
12376 |
|
12377 |
+
var boundActionCreators = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12378 |
|
12379 |
+
for (var key in actionCreators) {
|
12380 |
+
var actionCreator = actionCreators[key];
|
|
|
|
|
|
|
|
|
12381 |
|
12382 |
+
if (typeof actionCreator === 'function') {
|
12383 |
+
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12384 |
}
|
12385 |
+
}
|
12386 |
+
|
12387 |
+
return boundActionCreators;
|
12388 |
}
|
|
|
|
|
|
|
|
|
12389 |
|
12390 |
+
function _defineProperty(obj, key, value) {
|
12391 |
+
if (key in obj) {
|
12392 |
+
Object.defineProperty(obj, key, {
|
12393 |
+
value: value,
|
12394 |
+
enumerable: true,
|
12395 |
+
configurable: true,
|
12396 |
+
writable: true
|
12397 |
+
});
|
12398 |
+
} else {
|
12399 |
+
obj[key] = value;
|
12400 |
}
|
12401 |
|
12402 |
+
return obj;
|
12403 |
}
|
12404 |
|
12405 |
+
function ownKeys(object, enumerableOnly) {
|
12406 |
+
var keys = Object.keys(object);
|
|
|
12407 |
|
12408 |
+
if (Object.getOwnPropertySymbols) {
|
12409 |
+
keys.push.apply(keys, Object.getOwnPropertySymbols(object));
|
12410 |
+
}
|
12411 |
|
12412 |
+
if (enumerableOnly) keys = keys.filter(function (sym) {
|
12413 |
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
12414 |
+
});
|
12415 |
+
return keys;
|
12416 |
+
}
|
12417 |
|
12418 |
+
function _objectSpread2(target) {
|
12419 |
+
for (var i = 1; i < arguments.length; i++) {
|
12420 |
+
var source = arguments[i] != null ? arguments[i] : {};
|
12421 |
|
12422 |
+
if (i % 2) {
|
12423 |
+
ownKeys(source, true).forEach(function (key) {
|
12424 |
+
_defineProperty(target, key, source[key]);
|
12425 |
+
});
|
12426 |
+
} else if (Object.getOwnPropertyDescriptors) {
|
12427 |
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
12428 |
+
} else {
|
12429 |
+
ownKeys(source).forEach(function (key) {
|
12430 |
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
12431 |
+
});
|
12432 |
}
|
12433 |
+
}
|
12434 |
+
|
12435 |
+
return target;
|
12436 |
}
|
12437 |
|
12438 |
+
/**
|
12439 |
+
* Composes single-argument functions from right to left. The rightmost
|
12440 |
+
* function can take multiple arguments as it provides the signature for
|
12441 |
+
* the resulting composite function.
|
12442 |
+
*
|
12443 |
+
* @param {...Function} funcs The functions to compose.
|
12444 |
+
* @returns {Function} A function obtained by composing the argument functions
|
12445 |
+
* from right to left. For example, compose(f, g, h) is identical to doing
|
12446 |
+
* (...args) => f(g(h(...args))).
|
12447 |
+
*/
|
12448 |
+
function compose() {
|
12449 |
+
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
12450 |
+
funcs[_key] = arguments[_key];
|
12451 |
+
}
|
12452 |
|
12453 |
+
if (funcs.length === 0) {
|
12454 |
+
return function (arg) {
|
12455 |
+
return arg;
|
12456 |
+
};
|
12457 |
+
}
|
12458 |
|
12459 |
+
if (funcs.length === 1) {
|
12460 |
+
return funcs[0];
|
12461 |
+
}
|
12462 |
|
12463 |
+
return funcs.reduce(function (a, b) {
|
12464 |
+
return function () {
|
12465 |
+
return a(b.apply(void 0, arguments));
|
12466 |
+
};
|
12467 |
+
});
|
12468 |
+
}
|
12469 |
|
12470 |
+
/**
|
12471 |
+
* Creates a store enhancer that applies middleware to the dispatch method
|
12472 |
+
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
12473 |
+
* asynchronous actions in a concise manner, or logging every action payload.
|
12474 |
+
*
|
12475 |
+
* See `redux-thunk` package as an example of the Redux middleware.
|
12476 |
+
*
|
12477 |
+
* Because middleware is potentially asynchronous, this should be the first
|
12478 |
+
* store enhancer in the composition chain.
|
12479 |
+
*
|
12480 |
+
* Note that each middleware will be given the `dispatch` and `getState` functions
|
12481 |
+
* as named arguments.
|
12482 |
+
*
|
12483 |
+
* @param {...Function} middlewares The middleware chain to be applied.
|
12484 |
+
* @returns {Function} A store enhancer applying the middleware.
|
12485 |
+
*/
|
12486 |
|
12487 |
+
function applyMiddleware() {
|
12488 |
+
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
12489 |
+
middlewares[_key] = arguments[_key];
|
12490 |
+
}
|
12491 |
|
12492 |
+
return function (createStore) {
|
12493 |
+
return function () {
|
12494 |
+
var store = createStore.apply(void 0, arguments);
|
12495 |
|
12496 |
+
var _dispatch = function dispatch() {
|
12497 |
+
throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
|
12498 |
+
};
|
12499 |
+
|
12500 |
+
var middlewareAPI = {
|
12501 |
+
getState: store.getState,
|
12502 |
+
dispatch: function dispatch() {
|
12503 |
+
return _dispatch.apply(void 0, arguments);
|
12504 |
+
}
|
12505 |
+
};
|
12506 |
+
var chain = middlewares.map(function (middleware) {
|
12507 |
+
return middleware(middlewareAPI);
|
12508 |
+
});
|
12509 |
+
_dispatch = compose.apply(void 0, chain)(store.dispatch);
|
12510 |
+
return _objectSpread2({}, store, {
|
12511 |
+
dispatch: _dispatch
|
12512 |
+
});
|
12513 |
};
|
12514 |
+
};
|
12515 |
+
}
|
12516 |
|
12517 |
+
/*
|
12518 |
+
* This is a dummy function to check if the function name has been altered by minification.
|
12519 |
+
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
12520 |
+
*/
|
12521 |
|
12522 |
+
function isCrushed() {}
|
|
|
12523 |
|
12524 |
+
if (false) {}
|
|
|
|
|
|
|
12525 |
|
|
|
|
|
12526 |
|
|
|
|
|
|
|
|
|
12527 |
|
12528 |
+
;// CONCATENATED MODULE: ./src/js/utils/buttonizer-constants.js
|
12529 |
+
function buttonizer_constants_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
12530 |
|
12531 |
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
|
|
|
|
|
12532 |
|
12533 |
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
|
|
|
|
|
|
|
|
|
12534 |
|
12535 |
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
|
12536 |
|
12537 |
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
|
|
12538 |
|
12539 |
+
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
12540 |
|
12541 |
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
12542 |
|
12543 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
12544 |
|
12545 |
+
var defaults = __webpack_require__(46314);
|
|
|
|
|
|
|
|
|
|
|
12546 |
|
12547 |
+
var merge = __webpack_require__(82492);
|
12548 |
|
12549 |
+
var omitBy = __webpack_require__(14176);
|
12550 |
+
/**
|
12551 |
+
* Constants
|
12552 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12553 |
|
|
|
|
|
|
|
|
|
|
|
12554 |
|
12555 |
+
var buttonizer_constants_actionTypes = {
|
12556 |
+
INIT: "INIT",
|
12557 |
+
// Adding and removing buttons/groups
|
12558 |
+
ADD_MODEL: "ADD_MODEL",
|
12559 |
+
//Relation actionTypes
|
12560 |
+
ADD_RELATION: "ADD_RELATION",
|
12561 |
+
CHANGE_RELATION: "CHANGE_RELATION",
|
12562 |
+
REMOVE_RELATION: "REMOVE_RELATION",
|
12563 |
+
//Data actionTypes
|
12564 |
+
GET_DATA_BEGIN: "GET_DATA_BEGIN",
|
12565 |
+
GET_DATA_SUCCESS: "GET_DATA_SUCCESS",
|
12566 |
+
GET_DATA_FAILURE: "GET_DATA_FAILURE",
|
12567 |
+
GET_DATA_END: "GET_DATA_END",
|
12568 |
+
HAS_CHANGES: "HAS_CHANGES",
|
12569 |
+
IS_UPDATING: "IS_UPDATING",
|
12570 |
+
STOP_LOADING: "STOP_LOADING",
|
12571 |
+
//Setting values
|
12572 |
+
SET_SETTING_VALUE: "SET_SETTING_VALUE",
|
12573 |
+
SET_MISC_VALUE: "SET_MISC_VALUE",
|
12574 |
+
//Drawer
|
12575 |
+
OPEN_DRAWER: "OPENING DRAWER",
|
12576 |
+
CLOSE_DRAWER: "CLOSING DRAWER",
|
12577 |
+
groups: {
|
12578 |
+
ADD_RECORD: "ADDING GROUP RECORD",
|
12579 |
+
REMOVE_RECORD: "REMOVING GROUP RECORD",
|
12580 |
+
SET_KEY_VALUE: "SET KEY VALUE GROUPS",
|
12581 |
+
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS GROUPS"
|
12582 |
+
},
|
12583 |
+
buttons: {
|
12584 |
+
ADD_RECORD: "ADDING BUTTON RECORD",
|
12585 |
+
REMOVE_RECORD: "REMOVING BUTTON RECORD",
|
12586 |
+
SET_KEY_VALUE: "SET KEY VALUE BUTTONS",
|
12587 |
+
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS BUTTONS"
|
12588 |
+
},
|
12589 |
+
timeSchedules: {
|
12590 |
+
// Time Schedule actionTypes
|
12591 |
+
ADD_RECORD: "ADDING TIME SCHEDULE",
|
12592 |
+
REMOVE_RECORD: "REMOVING TIME SCHEDULE",
|
12593 |
+
SET_KEY_VALUE: "SET KEY VALUE TIMESCHEDULES",
|
12594 |
+
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS TIMESCHEDULES",
|
12595 |
+
ADD_TIMESCHEDULE: "ADD_TIMESCHEDULE",
|
12596 |
+
SET_WEEKDAY: "SET_WEEKDAY",
|
12597 |
+
ADD_EXCLUDED_DATE: "ADD_EXCLUDED_DATE",
|
12598 |
+
SET_EXCLUDED_DATE: "SET_EXCLUDED_DATE",
|
12599 |
+
REMOVE_EXCLUDED_DATE: "REMOVE_EXCLUDED_DATE"
|
12600 |
+
},
|
12601 |
+
pageRules: {
|
12602 |
+
ADD_RECORD: "ADDING PAGE RULE",
|
12603 |
+
REMOVE_RECORD: "REMOVING PAGE RULE",
|
12604 |
+
SET_KEY_VALUE: "SET KEY VALUE PAGERULES",
|
12605 |
+
SET_KEY_FORMAT: "SET FORMATTED KEY VALUE PAIRS PAGERULES",
|
12606 |
+
ADD_PAGE_RULE_GROUP: "ADD_PAGE_RULE_GROUP",
|
12607 |
+
REMOVE_PAGE_RULE_GROUP: "REMOVE_PAGE_RULE_GROUP",
|
12608 |
+
SET_PAGE_RULE_GROUP_TYPE: "SET_PAGE_RULE_GROUP_TYPE",
|
12609 |
+
ADD_PAGE_RULE_ROW: "ADD_PAGE_RULE_ROW",
|
12610 |
+
SET_PAGE_RULE_ROW: "SET_PAGE_RULE_ROW",
|
12611 |
+
REMOVE_PAGE_RULE_ROW: "REMOVE_PAGE_RULE_ROW"
|
12612 |
+
},
|
12613 |
+
wp: {
|
12614 |
+
//Data actionTypes
|
12615 |
+
GET_DATA_BEGIN: "GET_DATA_BEGIN_WP",
|
12616 |
+
GET_DATA_SUCCESS: "GET_DATA_SUCCESS_WP",
|
12617 |
+
GET_DATA_FAILURE: "GET_DATA_FAILURE_WP",
|
12618 |
+
GET_DATA_END: "GET_DATA_END_WP"
|
12619 |
+
},
|
12620 |
+
templates: {
|
12621 |
+
INIT: "INIT TEMPLATES",
|
12622 |
+
GET_DATA_BEGIN: "GET TEMPLATES DATA BEGIN",
|
12623 |
+
GET_DATA_FAILURE: "GET TEMPLATES DATA FAILURE",
|
12624 |
+
GET_DATA_END: "GET TEMPLATES DATA END",
|
12625 |
|
12626 |
+
/**
|
12627 |
+
* Not used
|
12628 |
+
*/
|
12629 |
+
ADD_RECORD: "ADDING TEMPLATE"
|
12630 |
+
}
|
12631 |
+
};
|
12632 |
+
var wpActionTypes = {};
|
12633 |
+
var weekdays = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
12634 |
+
var models = {
|
12635 |
+
BUTTON: "buttons",
|
12636 |
+
GROUP: "groups",
|
12637 |
+
TIME_SCHEDULE: "timeSchedules",
|
12638 |
+
PAGE_RULE: "pageRules"
|
12639 |
+
};
|
12640 |
+
var initialStore = {
|
12641 |
+
name: "peter",
|
12642 |
+
loading: {
|
12643 |
+
showLoading: false,
|
12644 |
+
loadingString: "",
|
12645 |
+
loadingSlowWebsite: false,
|
12646 |
+
loaded: false,
|
12647 |
+
error: null
|
12648 |
+
},
|
12649 |
+
frameUrl: "about:blank",
|
12650 |
+
loadingIframe: false,
|
12651 |
+
settings: null,
|
12652 |
+
_premium: false,
|
12653 |
+
buttons: {},
|
12654 |
+
groups: {},
|
12655 |
+
timeSchedules: {}
|
12656 |
+
};
|
12657 |
+
var drawers = {
|
12658 |
+
MENU: "menu",
|
12659 |
+
SETTINGS: "settings",
|
12660 |
+
SETTINGS_PAGES: {
|
12661 |
+
analytics: "analytics",
|
12662 |
+
iconLibrary: "iconlibrary",
|
12663 |
+
preferences: "preferences",
|
12664 |
+
reset: "reset"
|
12665 |
+
},
|
12666 |
+
BUTTONIZER_TOUR: "buttonizertour",
|
12667 |
+
WELCOME_DIALOG: "welcome-splash",
|
12668 |
+
TIME_SCHEDULES: "timeschedules",
|
12669 |
+
PAGE_RULES: "pagerules"
|
12670 |
+
};
|
12671 |
+
var formats = {
|
12672 |
+
/**
|
12673 |
+
* Combine values with normal;hover.
|
12674 |
+
*/
|
12675 |
+
normal_hover: {
|
12676 |
+
format: function format(normal, hover) {
|
12677 |
+
return [normal, hover].map(function (val) {
|
12678 |
+
return val === "unset" ? "" : val == null ? "" : val;
|
12679 |
+
}).filter(function (val, key, arr) {
|
12680 |
+
return key === 0 || val !== "" && val !== arr[0];
|
12681 |
+
}) // remove duplicates
|
12682 |
+
.join(";") || "unset";
|
12683 |
+
},
|
12684 |
+
parse: function parse(val) {
|
12685 |
+
var value = val;
|
12686 |
+
if (typeof val === "boolean") value = String(val);
|
12687 |
+
if (typeof val === "number") value = String(val);
|
12688 |
+
if (typeof val === "undefined") return [];
|
12689 |
|
12690 |
+
if (typeof value !== "string") {
|
12691 |
+
console.trace();
|
12692 |
+
console.log(_typeof(value), value);
|
12693 |
+
throw TypeError("'record[key]' val is not of type String, boolean or number");
|
12694 |
+
}
|
12695 |
|
12696 |
+
var match = value.split(";");
|
12697 |
+
return match.map(function (val) {
|
12698 |
+
if (!val) return undefined;
|
12699 |
+
if (val === "true") return true;
|
12700 |
+
if (val === "false") return false;
|
12701 |
+
if (!isNaN(Number(val))) return Number(val);
|
12702 |
+
return val;
|
12703 |
+
}).map(function (val, key, arr) {
|
12704 |
+
return key === 0 ? val : val === arr[0] ? undefined : val;
|
12705 |
+
}); // remove duplicates!
|
12706 |
+
}
|
12707 |
+
},
|
12708 |
|
12709 |
+
/**
|
12710 |
+
* Px for four sides, for example for margin or padding.
|
12711 |
+
*/
|
12712 |
+
fourSidesPx: {
|
12713 |
+
format: function format(val1, val2, val3, val4) {
|
12714 |
+
return "".concat(val1, "px ").concat(val2, "px ").concat(val3, "px ").concat(val4, "px");
|
12715 |
+
},
|
12716 |
+
parse: function parse(val) {
|
12717 |
+
var reg = /\d+/g;
|
12718 |
+
var match = val.match(reg);
|
12719 |
+
return match;
|
12720 |
+
}
|
12721 |
+
},
|
12722 |
|
12723 |
+
/**
|
12724 |
+
* Position format, example: 'bottom: 5px', or 'left: 10%'
|
12725 |
+
*/
|
12726 |
+
position: {
|
12727 |
+
format: function format(type, mode, value) {
|
12728 |
+
return "".concat(type, ": ").concat(value).concat(mode);
|
12729 |
+
}
|
12730 |
+
}
|
12731 |
+
};
|
12732 |
+
var excludedPropertyRequests = (/* unused pure expression or super */ null && (["selected_schedule", "show_on_schedule_trigger", "selected_page_rule", "show_on_rule_trigger", "show_mobile", "show_desktop", "is_menu"]));
|
12733 |
+
var import_export = {
|
12734 |
+
propertiesToOmit: ["export_type", "selected_page_rule", "selected_schedule", "id", "parent", "show_on_rule_trigger", "show_on_schedule_trigger"]
|
12735 |
+
};
|
12736 |
+
var settingKeys = {
|
12737 |
+
// Returns all default button settings keys
|
12738 |
+
get buttonSettings() {
|
12739 |
+
var result = {
|
12740 |
+
general: [],
|
12741 |
+
styling: [],
|
12742 |
+
advanced: []
|
12743 |
+
};
|
12744 |
+
Object.entries(defaults.button).map(function (key) {
|
12745 |
+
merge(result, buttonizer_constants_defineProperty({}, key[0], Object.entries(key[1]).map(function (_ref) {
|
12746 |
+
var _ref2 = _slicedToArray(_ref, 1),
|
12747 |
+
key = _ref2[0];
|
12748 |
|
12749 |
+
return key;
|
12750 |
+
})));
|
12751 |
+
});
|
12752 |
+
return result;
|
12753 |
+
},
|
12754 |
|
12755 |
+
// Returns all default group settings keys
|
12756 |
+
get groupSettings() {
|
12757 |
+
var result = {
|
12758 |
+
general: [],
|
12759 |
+
styling: [],
|
12760 |
+
advanced: []
|
12761 |
+
};
|
12762 |
+
Object.entries(defaults.group).map(function (key) {
|
12763 |
+
merge(result, buttonizer_constants_defineProperty({}, key[0], Object.entries(key[1]).map(function (_ref3) {
|
12764 |
+
var _ref4 = _slicedToArray(_ref3, 1),
|
12765 |
+
key = _ref4[0];
|
12766 |
|
12767 |
+
return key;
|
12768 |
+
})));
|
12769 |
+
});
|
12770 |
+
return result;
|
12771 |
+
},
|
12772 |
|
12773 |
+
// Returns all default setting keys
|
12774 |
+
get allSettings() {
|
12775 |
+
var result = {
|
12776 |
+
general: [],
|
12777 |
+
styling: [],
|
12778 |
+
advanced: []
|
12779 |
+
};
|
12780 |
+
Object.entries(merge({}, defaults.button, defaults.group)).map(function (key) {
|
12781 |
+
merge(result, buttonizer_constants_defineProperty({}, key[0], Object.entries(key[1]).map(function (_ref5) {
|
12782 |
+
var _ref6 = _slicedToArray(_ref5, 1),
|
12783 |
+
key = _ref6[0];
|
12784 |
|
12785 |
+
return key;
|
12786 |
+
})));
|
12787 |
+
});
|
12788 |
+
return result;
|
12789 |
+
},
|
|
|
|
|
12790 |
|
12791 |
+
// Returns default styling setting keys excluding the overwritten keys by group
|
12792 |
+
get stylingNoGroup() {
|
12793 |
+
var _this = this;
|
12794 |
|
12795 |
+
return Object.entries(omitBy(merge({}, defaults.button.styling, defaults.group.styling), function (value, key) {
|
12796 |
+
return _this.groupSettings.styling.includes(key) && _this.buttonSettings.styling.includes(key) || key.includes("icon");
|
12797 |
+
})).map(function (_ref7) {
|
12798 |
+
var _ref8 = _slicedToArray(_ref7, 1),
|
12799 |
+
key = _ref8[0];
|
12800 |
|
12801 |
+
return key;
|
12802 |
+
});
|
12803 |
+
},
|
|
|
|
|
12804 |
|
12805 |
+
// Returns default hover styling setting key
|
12806 |
+
get stylingHover() {
|
12807 |
+
return Object.entries(merge({}, defaults.button.styling, defaults.group.styling)).filter(function (entry) {
|
12808 |
+
return Array.isArray(entry[1]);
|
12809 |
+
}).map(function (_ref9) {
|
12810 |
+
var _ref10 = _slicedToArray(_ref9, 1),
|
12811 |
+
key = _ref10[0];
|
12812 |
|
12813 |
+
return key;
|
12814 |
+
});
|
12815 |
+
}
|
12816 |
|
12817 |
+
};
|
12818 |
+
// EXTERNAL MODULE: ./node_modules/axios/index.js
|
12819 |
+
var axios = __webpack_require__(9669);
|
12820 |
+
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
12821 |
+
;// CONCATENATED MODULE: ./src/js/utils/utils/drawer-utils.js
|
12822 |
+
function openDrawer(drawer, page) {
|
12823 |
+
closeDrawer();
|
12824 |
+
document.location.hash += "".concat(document.location.hash.match(/\/$/) ? "" : "/").concat(drawer).concat(page ? "/" + page : "");
|
12825 |
+
}
|
12826 |
+
function closeDrawer() {
|
12827 |
+
document.location.hash = document.location.hash.replace(/\/?(settings|menu|timeschedules|pagerules|buttonizertour).*$/i, "");
|
12828 |
+
}
|
12829 |
+
;// CONCATENATED MODULE: ./src/js/utils/utils/data-utils.js
|
12830 |
+
/* global Map */
|
12831 |
|
12832 |
+
var cache = new Map();
|
12833 |
+
function dateToFormat(date) {
|
12834 |
+
if (!date) return null;
|
12835 |
|
12836 |
+
var pad = function pad(num, size) {
|
12837 |
+
var s = String(num);
|
|
|
|
|
|
|
12838 |
|
12839 |
+
while (s.length < (size || 2)) {
|
12840 |
+
s = "0" + s;
|
12841 |
}
|
|
|
|
|
|
|
|
|
12842 |
|
12843 |
+
return s;
|
12844 |
+
};
|
|
|
|
|
12845 |
|
12846 |
+
return "".concat(date.getDate(), "-").concat(pad(date.getMonth() + 1, 2), "-").concat(date.getFullYear());
|
12847 |
+
}
|
12848 |
+
function formatToDate(format) {
|
12849 |
+
if (!format) return null;
|
12850 |
+
var dateParts = format.split("-");
|
12851 |
+
return new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
|
12852 |
+
}
|
12853 |
+
var importIcons = function importIcons() {
|
12854 |
+
var icon_library = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "fontawesome";
|
12855 |
+
var icon_library_version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "5.free";
|
12856 |
+
var url = buttonizer_admin.assets + "/icon_definitions/" + icon_library + "." + icon_library_version + ".json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
12857 |
+
if (cache.has(url)) return cache.get(url);
|
12858 |
+
var value = axios_default()({
|
12859 |
+
url: url,
|
12860 |
+
dataType: "json",
|
12861 |
+
method: "get"
|
12862 |
+
});
|
12863 |
+
cache.set(url, value);
|
12864 |
+
return value;
|
12865 |
+
};
|
12866 |
+
var importTemplates = function importTemplates() {
|
12867 |
+
var url = buttonizer_admin.assets + "/templates/templates.json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
12868 |
+
return new Promise(function (resolve, reject) {
|
12869 |
+
if (cache.has(url)) resolve(cache.get(url));
|
12870 |
+
axios_default()({
|
12871 |
+
url: url
|
12872 |
+
}).then(function (data) {
|
12873 |
+
cache.set(url, data.data);
|
12874 |
+
resolve(data.data);
|
12875 |
+
})["catch"](function (e) {
|
12876 |
+
return reject({
|
12877 |
+
message: "Something went wrong",
|
12878 |
+
error: e
|
12879 |
+
});
|
12880 |
+
});
|
12881 |
+
});
|
12882 |
+
};
|
12883 |
+
// EXTERNAL MODULE: ./node_modules/uuid/v4.js
|
12884 |
+
var v4 = __webpack_require__(71171);
|
12885 |
+
var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
|
12886 |
+
;// CONCATENATED MODULE: ./src/js/utils/utils/random.js
|
12887 |
|
12888 |
+
function GenerateUniqueId() {
|
12889 |
+
return v4_default()();
|
12890 |
+
}
|
12891 |
+
function shuffleTips(array) {
|
12892 |
+
var currentIndex = array.length,
|
12893 |
+
temporaryValue,
|
12894 |
+
randomIndex; // While there remain elements to shuffle...
|
12895 |
|
12896 |
+
while (0 !== currentIndex) {
|
12897 |
+
// Pick a remaining element...
|
12898 |
+
randomIndex = Math.floor(Math.random() * currentIndex);
|
12899 |
+
currentIndex -= 1; // And swap it with the current element.
|
12900 |
|
12901 |
+
temporaryValue = array[currentIndex];
|
12902 |
+
array[currentIndex] = array[randomIndex];
|
12903 |
+
array[randomIndex] = temporaryValue;
|
12904 |
+
}
|
12905 |
|
12906 |
+
return array;
|
12907 |
+
}
|
12908 |
+
function uniqueCharset() {
|
12909 |
+
return Array.apply(0, Array(15)).map(function () {
|
12910 |
+
return function (charset) {
|
12911 |
+
return charset.charAt(Math.floor(Math.random() * charset.length));
|
12912 |
+
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
12913 |
+
}).join("");
|
12914 |
+
}
|
12915 |
+
;// CONCATENATED MODULE: ./src/js/utils/utils/index.js
|
12916 |
|
|
|
|
|
|
|
|
|
|
|
12917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12918 |
|
12919 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
12920 |
+
var esm_typeof = __webpack_require__(90484);
|
12921 |
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
12922 |
+
function _classCallCheck(instance, Constructor) {
|
12923 |
+
if (!(instance instanceof Constructor)) {
|
12924 |
+
throw new TypeError("Cannot call a class as a function");
|
12925 |
+
}
|
12926 |
+
}
|
12927 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
12928 |
+
var createClass = __webpack_require__(5991);
|
12929 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
12930 |
+
var assertThisInitialized = __webpack_require__(63349);
|
12931 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
12932 |
+
var setPrototypeOf = __webpack_require__(14665);
|
12933 |
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
12934 |
|
12935 |
+
function _inherits(subClass, superClass) {
|
12936 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
12937 |
+
throw new TypeError("Super expression must either be null or a function");
|
12938 |
+
}
|
12939 |
|
12940 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
12941 |
+
constructor: {
|
12942 |
+
value: subClass,
|
12943 |
+
writable: true,
|
12944 |
+
configurable: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12945 |
}
|
12946 |
+
});
|
12947 |
+
Object.defineProperty(subClass, "prototype", {
|
12948 |
+
writable: false
|
12949 |
+
});
|
12950 |
+
if (superClass) (0,setPrototypeOf/* default */.Z)(subClass, superClass);
|
12951 |
+
}
|
12952 |
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
12953 |
|
|
|
|
|
|
|
12954 |
|
12955 |
+
function _possibleConstructorReturn(self, call) {
|
12956 |
+
if (call && ((0,esm_typeof/* default */.Z)(call) === "object" || typeof call === "function")) {
|
12957 |
+
return call;
|
12958 |
+
} else if (call !== void 0) {
|
12959 |
+
throw new TypeError("Derived constructors may only return object or undefined");
|
12960 |
+
}
|
12961 |
|
12962 |
+
return (0,assertThisInitialized/* default */.Z)(self);
|
12963 |
+
}
|
12964 |
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
12965 |
+
function _getPrototypeOf(o) {
|
12966 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
12967 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
12968 |
+
};
|
12969 |
+
return _getPrototypeOf(o);
|
12970 |
+
}
|
12971 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
12972 |
+
var defineProperty = __webpack_require__(96156);
|
12973 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
12974 |
+
var arrayWithHoles = __webpack_require__(59968);
|
12975 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
12976 |
+
var iterableToArray = __webpack_require__(96410);
|
12977 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
12978 |
+
var unsupportedIterableToArray = __webpack_require__(82961);
|
12979 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
12980 |
+
var nonIterableRest = __webpack_require__(28970);
|
12981 |
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
|
12982 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12983 |
|
|
|
|
|
|
|
12984 |
|
|
|
12985 |
|
12986 |
+
function _toArray(arr) {
|
12987 |
+
return (0,arrayWithHoles/* default */.Z)(arr) || (0,iterableToArray/* default */.Z)(arr) || (0,unsupportedIterableToArray/* default */.Z)(arr) || (0,nonIterableRest/* default */.Z)();
|
12988 |
+
}
|
12989 |
+
;// CONCATENATED MODULE: ./node_modules/i18next/dist/esm/i18next.js
|
12990 |
|
|
|
12991 |
|
|
|
|
|
|
|
|
|
12992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12993 |
|
|
|
|
|
|
|
12994 |
|
|
|
|
|
|
|
|
|
12995 |
|
|
|
|
|
|
|
12996 |
|
|
|
|
|
|
|
|
|
12997 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12998 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12999 |
|
13000 |
+
function i18next_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
|
13001 |
|
13002 |
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { i18next_ownKeys(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { i18next_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
|
|
|
13003 |
|
13004 |
+
var consoleLogger = {
|
13005 |
+
type: 'logger',
|
13006 |
+
log: function log(args) {
|
13007 |
+
this.output('log', args);
|
13008 |
+
},
|
13009 |
+
warn: function warn(args) {
|
13010 |
+
this.output('warn', args);
|
13011 |
+
},
|
13012 |
+
error: function error(args) {
|
13013 |
+
this.output('error', args);
|
13014 |
+
},
|
13015 |
+
output: function output(type, args) {
|
13016 |
+
if (console && console[type]) console[type].apply(console, args);
|
13017 |
+
}
|
13018 |
+
};
|
13019 |
|
13020 |
+
var Logger = function () {
|
13021 |
+
function Logger(concreteLogger) {
|
13022 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
|
|
|
|
|
13023 |
|
13024 |
+
_classCallCheck(this, Logger);
|
|
|
|
|
|
|
|
|
13025 |
|
13026 |
+
this.init(concreteLogger, options);
|
13027 |
+
}
|
13028 |
+
|
13029 |
+
(0,createClass/* default */.Z)(Logger, [{
|
13030 |
+
key: "init",
|
13031 |
+
value: function init(concreteLogger) {
|
13032 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
13033 |
+
this.prefix = options.prefix || 'i18next:';
|
13034 |
+
this.logger = concreteLogger || consoleLogger;
|
13035 |
+
this.options = options;
|
13036 |
+
this.debug = options.debug;
|
13037 |
}
|
13038 |
}, {
|
13039 |
+
key: "setDebug",
|
13040 |
+
value: function setDebug(bool) {
|
13041 |
+
this.debug = bool;
|
|
|
|
|
13042 |
}
|
13043 |
}, {
|
13044 |
+
key: "log",
|
13045 |
+
value: function log() {
|
13046 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
13047 |
+
args[_key] = arguments[_key];
|
13048 |
+
}
|
13049 |
|
13050 |
+
return this.forward(args, 'log', '', true);
|
13051 |
}
|
13052 |
}, {
|
13053 |
+
key: "warn",
|
13054 |
+
value: function warn() {
|
13055 |
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
13056 |
+
args[_key2] = arguments[_key2];
|
13057 |
+
}
|
13058 |
+
|
13059 |
+
return this.forward(args, 'warn', '', true);
|
13060 |
}
|
13061 |
}, {
|
13062 |
+
key: "error",
|
13063 |
+
value: function error() {
|
13064 |
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
13065 |
+
args[_key3] = arguments[_key3];
|
|
|
|
|
|
|
|
|
|
|
13066 |
}
|
13067 |
|
13068 |
+
return this.forward(args, 'error', '');
|
13069 |
+
}
|
13070 |
+
}, {
|
13071 |
+
key: "deprecate",
|
13072 |
+
value: function deprecate() {
|
13073 |
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
13074 |
+
args[_key4] = arguments[_key4];
|
13075 |
}
|
13076 |
|
13077 |
+
return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
|
13078 |
+
}
|
13079 |
+
}, {
|
13080 |
+
key: "forward",
|
13081 |
+
value: function forward(args, lvl, prefix, debugOnly) {
|
13082 |
+
if (debugOnly && !this.debug) return null;
|
13083 |
+
if (typeof args[0] === 'string') args[0] = "".concat(prefix).concat(this.prefix, " ").concat(args[0]);
|
13084 |
+
return this.logger[lvl](args);
|
13085 |
+
}
|
13086 |
+
}, {
|
13087 |
+
key: "create",
|
13088 |
+
value: function create(moduleName) {
|
13089 |
+
return new Logger(this.logger, _objectSpread(_objectSpread({}, {
|
13090 |
+
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
13091 |
+
}), this.options));
|
13092 |
+
}
|
13093 |
+
}]);
|
13094 |
|
13095 |
+
return Logger;
|
13096 |
+
}();
|
13097 |
|
13098 |
+
var baseLogger = new Logger();
|
|
|
13099 |
|
13100 |
+
var EventEmitter = function () {
|
13101 |
+
function EventEmitter() {
|
13102 |
+
_classCallCheck(this, EventEmitter);
|
|
|
13103 |
|
13104 |
+
this.observers = {};
|
13105 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13106 |
|
13107 |
+
(0,createClass/* default */.Z)(EventEmitter, [{
|
13108 |
+
key: "on",
|
13109 |
+
value: function on(events, listener) {
|
13110 |
+
var _this = this;
|
13111 |
|
13112 |
+
events.split(' ').forEach(function (event) {
|
13113 |
+
_this.observers[event] = _this.observers[event] || [];
|
|
|
|
|
13114 |
|
13115 |
+
_this.observers[event].push(listener);
|
|
|
|
|
|
|
|
|
|
|
|
|
13116 |
});
|
13117 |
+
return this;
|
13118 |
}
|
13119 |
}, {
|
13120 |
+
key: "off",
|
13121 |
+
value: function off(event, listener) {
|
13122 |
+
if (!this.observers[event]) return;
|
|
|
|
|
|
|
|
|
|
|
13123 |
|
13124 |
+
if (!listener) {
|
13125 |
+
delete this.observers[event];
|
13126 |
+
return;
|
13127 |
}
|
13128 |
|
13129 |
+
this.observers[event] = this.observers[event].filter(function (l) {
|
13130 |
+
return l !== listener;
|
|
|
|
|
13131 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13132 |
}
|
13133 |
}, {
|
13134 |
+
key: "emit",
|
13135 |
+
value: function emit(event) {
|
13136 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
13137 |
+
args[_key - 1] = arguments[_key];
|
13138 |
+
}
|
|
|
13139 |
|
13140 |
+
if (this.observers[event]) {
|
13141 |
+
var cloned = [].concat(this.observers[event]);
|
13142 |
+
cloned.forEach(function (observer) {
|
13143 |
+
observer.apply(void 0, args);
|
13144 |
+
});
|
13145 |
+
}
|
13146 |
|
13147 |
+
if (this.observers['*']) {
|
13148 |
+
var _cloned = [].concat(this.observers['*']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13149 |
|
13150 |
+
_cloned.forEach(function (observer) {
|
13151 |
+
observer.apply(observer, [event].concat(args));
|
13152 |
+
});
|
13153 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13154 |
}
|
13155 |
}]);
|
13156 |
|
13157 |
+
return EventEmitter;
|
13158 |
+
}();
|
13159 |
|
13160 |
+
function defer() {
|
13161 |
+
var res;
|
13162 |
+
var rej;
|
13163 |
+
var promise = new Promise(function (resolve, reject) {
|
13164 |
+
res = resolve;
|
13165 |
+
rej = reject;
|
13166 |
+
});
|
13167 |
+
promise.resolve = res;
|
13168 |
+
promise.reject = rej;
|
13169 |
+
return promise;
|
13170 |
+
}
|
13171 |
+
function makeString(object) {
|
13172 |
+
if (object == null) return '';
|
13173 |
+
return '' + object;
|
13174 |
+
}
|
13175 |
+
function copy(a, s, t) {
|
13176 |
+
a.forEach(function (m) {
|
13177 |
+
if (s[m]) t[m] = s[m];
|
13178 |
+
});
|
13179 |
+
}
|
13180 |
|
13181 |
+
function getLastOfPath(object, path, Empty) {
|
13182 |
+
function cleanKey(key) {
|
13183 |
+
return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
|
13184 |
+
}
|
13185 |
|
13186 |
+
function canNotTraverseDeeper() {
|
13187 |
+
return !object || typeof object === 'string';
|
13188 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13189 |
|
13190 |
+
var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');
|
13191 |
|
13192 |
+
while (stack.length > 1) {
|
13193 |
+
if (canNotTraverseDeeper()) return {};
|
13194 |
+
var key = cleanKey(stack.shift());
|
13195 |
+
if (!object[key] && Empty) object[key] = new Empty();
|
13196 |
|
13197 |
+
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
13198 |
+
object = object[key];
|
13199 |
+
} else {
|
13200 |
+
object = {};
|
13201 |
+
}
|
13202 |
+
}
|
13203 |
|
13204 |
+
if (canNotTraverseDeeper()) return {};
|
13205 |
+
return {
|
13206 |
+
obj: object,
|
13207 |
+
k: cleanKey(stack.shift())
|
13208 |
+
};
|
13209 |
}
|
|
|
|
|
|
|
|
|
13210 |
|
13211 |
+
function setPath(object, path, newValue) {
|
13212 |
+
var _getLastOfPath = getLastOfPath(object, path, Object),
|
13213 |
+
obj = _getLastOfPath.obj,
|
13214 |
+
k = _getLastOfPath.k;
|
13215 |
|
13216 |
+
obj[k] = newValue;
|
13217 |
+
}
|
13218 |
+
function pushPath(object, path, newValue, concat) {
|
13219 |
+
var _getLastOfPath2 = getLastOfPath(object, path, Object),
|
13220 |
+
obj = _getLastOfPath2.obj,
|
13221 |
+
k = _getLastOfPath2.k;
|
13222 |
|
13223 |
+
obj[k] = obj[k] || [];
|
13224 |
+
if (concat) obj[k] = obj[k].concat(newValue);
|
13225 |
+
if (!concat) obj[k].push(newValue);
|
13226 |
+
}
|
13227 |
+
function getPath(object, path) {
|
13228 |
+
var _getLastOfPath3 = getLastOfPath(object, path),
|
13229 |
+
obj = _getLastOfPath3.obj,
|
13230 |
+
k = _getLastOfPath3.k;
|
13231 |
|
13232 |
+
if (!obj) return undefined;
|
13233 |
+
return obj[k];
|
13234 |
+
}
|
13235 |
+
function getPathWithDefaults(data, defaultData, key) {
|
13236 |
+
var value = getPath(data, key);
|
13237 |
|
13238 |
+
if (value !== undefined) {
|
13239 |
+
return value;
|
13240 |
+
}
|
13241 |
|
13242 |
+
return getPath(defaultData, key);
|
13243 |
+
}
|
13244 |
+
function deepExtend(target, source, overwrite) {
|
13245 |
+
for (var prop in source) {
|
13246 |
+
if (prop !== '__proto__' && prop !== 'constructor') {
|
13247 |
+
if (prop in target) {
|
13248 |
+
if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
|
13249 |
+
if (overwrite) target[prop] = source[prop];
|
13250 |
+
} else {
|
13251 |
+
deepExtend(target[prop], source[prop], overwrite);
|
13252 |
+
}
|
13253 |
+
} else {
|
13254 |
+
target[prop] = source[prop];
|
13255 |
+
}
|
13256 |
+
}
|
13257 |
+
}
|
13258 |
|
13259 |
+
return target;
|
13260 |
+
}
|
13261 |
+
function regexEscape(str) {
|
13262 |
+
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
13263 |
+
}
|
13264 |
+
var _entityMap = {
|
13265 |
+
'&': '&',
|
13266 |
+
'<': '<',
|
13267 |
+
'>': '>',
|
13268 |
+
'"': '"',
|
13269 |
+
"'": ''',
|
13270 |
+
'/': '/'
|
13271 |
};
|
13272 |
+
function i18next_escape(data) {
|
13273 |
+
if (typeof data === 'string') {
|
13274 |
+
return data.replace(/[&<>"'\/]/g, function (s) {
|
13275 |
+
return _entityMap[s];
|
13276 |
+
});
|
13277 |
+
}
|
13278 |
|
13279 |
+
return data;
|
13280 |
+
}
|
13281 |
+
var isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
13282 |
+
var chars = [' ', ',', '?', '!', ';'];
|
13283 |
+
function looksLikeObjectPath(key, nsSeparator, keySeparator) {
|
13284 |
+
nsSeparator = nsSeparator || '';
|
13285 |
+
keySeparator = keySeparator || '';
|
13286 |
+
var possibleChars = chars.filter(function (c) {
|
13287 |
+
return nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0;
|
13288 |
+
});
|
13289 |
+
if (possibleChars.length === 0) return true;
|
13290 |
+
var r = new RegExp("(".concat(possibleChars.map(function (c) {
|
13291 |
+
return c === '?' ? '\\?' : c;
|
13292 |
+
}).join('|'), ")"));
|
13293 |
+
var matched = !r.test(key);
|
13294 |
|
13295 |
+
if (!matched) {
|
13296 |
+
var ki = key.indexOf(keySeparator);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13297 |
|
13298 |
+
if (ki > 0 && !r.test(key.substring(0, ki))) {
|
13299 |
+
matched = true;
|
13300 |
+
}
|
13301 |
+
}
|
13302 |
|
13303 |
+
return matched;
|
13304 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13305 |
|
13306 |
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
13307 |
|
13308 |
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
|
|
|
|
|
13309 |
|
13310 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
13311 |
|
13312 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
13313 |
+
|
13314 |
+
function deepFind(obj, path) {
|
13315 |
+
var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
|
13316 |
+
if (!obj) return undefined;
|
13317 |
+
if (obj[path]) return obj[path];
|
13318 |
+
var paths = path.split(keySeparator);
|
13319 |
+
var current = obj;
|
13320 |
+
|
13321 |
+
for (var i = 0; i < paths.length; ++i) {
|
13322 |
+
if (!current) return undefined;
|
13323 |
+
|
13324 |
+
if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {
|
13325 |
+
return undefined;
|
13326 |
+
}
|
13327 |
+
|
13328 |
+
if (current[paths[i]] === undefined) {
|
13329 |
+
var j = 2;
|
13330 |
+
var p = paths.slice(i, i + j).join(keySeparator);
|
13331 |
+
var mix = current[p];
|
13332 |
+
|
13333 |
+
while (mix === undefined && paths.length > i + j) {
|
13334 |
+
j++;
|
13335 |
+
p = paths.slice(i, i + j).join(keySeparator);
|
13336 |
+
mix = current[p];
|
13337 |
}
|
13338 |
|
13339 |
+
if (mix === undefined) return undefined;
|
13340 |
+
|
13341 |
+
if (path.endsWith(p)) {
|
13342 |
+
if (typeof mix === 'string') return mix;
|
13343 |
+
if (p && typeof mix[p] === 'string') return mix[p];
|
13344 |
}
|
13345 |
|
13346 |
+
var joinedPath = paths.slice(i + j).join(keySeparator);
|
13347 |
+
if (joinedPath) return deepFind(mix, joinedPath, keySeparator);
|
13348 |
+
return undefined;
|
13349 |
+
}
|
13350 |
+
|
13351 |
+
current = current[paths[i]];
|
|
|
|
|
13352 |
}
|
13353 |
|
13354 |
+
return current;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13355 |
}
|
|
|
|
|
|
|
13356 |
|
13357 |
+
var ResourceStore = function (_EventEmitter) {
|
13358 |
+
_inherits(ResourceStore, _EventEmitter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13359 |
|
13360 |
+
var _super = _createSuper(ResourceStore);
|
|
|
|
|
|
|
13361 |
|
13362 |
+
function ResourceStore(data) {
|
13363 |
+
var _this;
|
|
|
13364 |
|
13365 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
13366 |
+
ns: ['translation'],
|
13367 |
+
defaultNS: 'translation'
|
13368 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13369 |
|
13370 |
+
_classCallCheck(this, ResourceStore);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13371 |
|
13372 |
+
_this = _super.call(this);
|
13373 |
|
13374 |
+
if (isIE10) {
|
13375 |
+
EventEmitter.call((0,assertThisInitialized/* default */.Z)(_this));
|
13376 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13377 |
|
13378 |
+
_this.data = data || {};
|
13379 |
+
_this.options = options;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13380 |
|
13381 |
+
if (_this.options.keySeparator === undefined) {
|
13382 |
+
_this.options.keySeparator = '.';
|
13383 |
+
}
|
13384 |
|
13385 |
+
if (_this.options.ignoreJSONStructure === undefined) {
|
13386 |
+
_this.options.ignoreJSONStructure = true;
|
13387 |
+
}
|
|
|
|
|
13388 |
|
13389 |
+
return _this;
|
13390 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13391 |
|
13392 |
+
(0,createClass/* default */.Z)(ResourceStore, [{
|
13393 |
+
key: "addNamespaces",
|
13394 |
+
value: function addNamespaces(ns) {
|
13395 |
+
if (this.options.ns.indexOf(ns) < 0) {
|
13396 |
+
this.options.ns.push(ns);
|
13397 |
+
}
|
|
|
|
|
13398 |
}
|
13399 |
+
}, {
|
13400 |
+
key: "removeNamespaces",
|
13401 |
+
value: function removeNamespaces(ns) {
|
13402 |
+
var index = this.options.ns.indexOf(ns);
|
|
|
|
|
|
|
13403 |
|
13404 |
+
if (index > -1) {
|
13405 |
+
this.options.ns.splice(index, 1);
|
13406 |
+
}
|
|
|
|
|
|
|
|
|
|
|
13407 |
}
|
13408 |
+
}, {
|
13409 |
+
key: "getResource",
|
13410 |
+
value: function getResource(lng, ns, key) {
|
13411 |
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
13412 |
+
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
13413 |
+
var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
13414 |
+
var path = [lng, ns];
|
13415 |
+
if (key && typeof key !== 'string') path = path.concat(key);
|
13416 |
+
if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
13417 |
|
13418 |
+
if (lng.indexOf('.') > -1) {
|
13419 |
+
path = lng.split('.');
|
13420 |
+
}
|
13421 |
+
|
13422 |
+
var result = getPath(this.data, path);
|
13423 |
+
if (result || !ignoreJSONStructure || typeof key !== 'string') return result;
|
13424 |
+
return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
|
13425 |
}
|
13426 |
+
}, {
|
13427 |
+
key: "addResource",
|
13428 |
+
value: function addResource(lng, ns, key, value) {
|
13429 |
+
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
13430 |
+
silent: false
|
13431 |
+
};
|
13432 |
+
var keySeparator = this.options.keySeparator;
|
13433 |
+
if (keySeparator === undefined) keySeparator = '.';
|
13434 |
+
var path = [lng, ns];
|
13435 |
+
if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
13436 |
|
13437 |
+
if (lng.indexOf('.') > -1) {
|
13438 |
+
path = lng.split('.');
|
13439 |
+
value = ns;
|
13440 |
+
ns = path[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
13441 |
}
|
|
|
|
|
13442 |
|
13443 |
+
this.addNamespaces(ns);
|
13444 |
+
setPath(this.data, path, value);
|
13445 |
+
if (!options.silent) this.emit('added', lng, ns, key, value);
|
|
|
|
|
|
|
|
|
13446 |
}
|
13447 |
+
}, {
|
13448 |
+
key: "addResources",
|
13449 |
+
value: function addResources(lng, ns, resources) {
|
13450 |
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
|
13451 |
+
silent: false
|
13452 |
+
};
|
13453 |
+
|
13454 |
+
for (var m in resources) {
|
13455 |
+
if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {
|
13456 |
+
silent: true
|
13457 |
+
});
|
13458 |
+
}
|
13459 |
+
|
13460 |
+
if (!options.silent) this.emit('added', lng, ns, resources);
|
13461 |
}
|
13462 |
+
}, {
|
13463 |
+
key: "addResourceBundle",
|
13464 |
+
value: function addResourceBundle(lng, ns, resources, deep, overwrite) {
|
13465 |
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
|
13466 |
+
silent: false
|
13467 |
+
};
|
13468 |
+
var path = [lng, ns];
|
13469 |
+
|
13470 |
+
if (lng.indexOf('.') > -1) {
|
13471 |
+
path = lng.split('.');
|
13472 |
+
deep = resources;
|
13473 |
+
resources = ns;
|
13474 |
+
ns = path[1];
|
13475 |
+
}
|
13476 |
+
|
13477 |
+
this.addNamespaces(ns);
|
13478 |
+
var pack = getPath(this.data, path) || {};
|
13479 |
+
|
13480 |
+
if (deep) {
|
13481 |
+
deepExtend(pack, resources, overwrite);
|
13482 |
+
} else {
|
13483 |
+
pack = _objectSpread$1(_objectSpread$1({}, pack), resources);
|
13484 |
+
}
|
13485 |
+
|
13486 |
+
setPath(this.data, path, pack);
|
13487 |
+
if (!options.silent) this.emit('added', lng, ns, resources);
|
13488 |
}
|
13489 |
+
}, {
|
13490 |
+
key: "removeResourceBundle",
|
13491 |
+
value: function removeResourceBundle(lng, ns) {
|
13492 |
+
if (this.hasResourceBundle(lng, ns)) {
|
13493 |
+
delete this.data[lng][ns];
|
13494 |
+
}
|
13495 |
|
13496 |
+
this.removeNamespaces(ns);
|
13497 |
+
this.emit('removed', lng, ns);
|
|
|
|
|
|
|
|
|
|
|
|
|
13498 |
}
|
13499 |
+
}, {
|
13500 |
+
key: "hasResourceBundle",
|
13501 |
+
value: function hasResourceBundle(lng, ns) {
|
13502 |
+
return this.getResource(lng, ns) !== undefined;
|
|
|
|
|
|
|
13503 |
}
|
13504 |
+
}, {
|
13505 |
+
key: "getResourceBundle",
|
13506 |
+
value: function getResourceBundle(lng, ns) {
|
13507 |
+
if (!ns) ns = this.options.defaultNS;
|
13508 |
+
if (this.options.compatibilityAPI === 'v1') return _objectSpread$1(_objectSpread$1({}, {}), this.getResource(lng, ns));
|
13509 |
+
return this.getResource(lng, ns);
|
|
|
|
|
|
|
|
|
13510 |
}
|
13511 |
+
}, {
|
13512 |
+
key: "getDataByLanguage",
|
13513 |
+
value: function getDataByLanguage(lng) {
|
13514 |
+
return this.data[lng];
|
|
|
|
|
|
|
|
|
13515 |
}
|
13516 |
+
}, {
|
13517 |
+
key: "hasLanguageSomeTranslations",
|
13518 |
+
value: function hasLanguageSomeTranslations(lng) {
|
13519 |
+
var data = this.getDataByLanguage(lng);
|
13520 |
+
var n = data && Object.keys(data) || [];
|
13521 |
+
return !!n.find(function (v) {
|
13522 |
+
return data[v] && Object.keys(data[v]).length > 0;
|
13523 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13524 |
}
|
13525 |
+
}, {
|
13526 |
+
key: "toJSON",
|
13527 |
+
value: function toJSON() {
|
13528 |
+
return this.data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13529 |
}
|
13530 |
+
}]);
|
|
|
|
|
13531 |
|
13532 |
+
return ResourceStore;
|
13533 |
+
}(EventEmitter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13534 |
|
13535 |
+
var postProcessor = {
|
13536 |
+
processors: {},
|
13537 |
+
addPostProcessor: function addPostProcessor(module) {
|
13538 |
+
this.processors[module.name] = module;
|
13539 |
+
},
|
13540 |
+
handle: function handle(processors, value, key, options, translator) {
|
13541 |
+
var _this = this;
|
13542 |
|
13543 |
+
processors.forEach(function (processor) {
|
13544 |
+
if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
|
13545 |
+
});
|
13546 |
+
return value;
|
13547 |
+
}
|
13548 |
+
};
|
13549 |
|
13550 |
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
13551 |
|
13552 |
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
|
|
|
13553 |
|
13554 |
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13555 |
|
13556 |
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
13557 |
+
var checkedLoadedFor = {};
|
|
|
|
|
|
|
|
|
|
|
13558 |
|
13559 |
+
var Translator = function (_EventEmitter) {
|
13560 |
+
_inherits(Translator, _EventEmitter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13561 |
|
13562 |
+
var _super = _createSuper$1(Translator);
|
13563 |
+
|
13564 |
+
function Translator(services) {
|
13565 |
+
var _this;
|
13566 |
+
|
13567 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
13568 |
+
|
13569 |
+
_classCallCheck(this, Translator);
|
13570 |
+
|
13571 |
+
_this = _super.call(this);
|
13572 |
+
|
13573 |
+
if (isIE10) {
|
13574 |
+
EventEmitter.call((0,assertThisInitialized/* default */.Z)(_this));
|
13575 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13576 |
|
13577 |
+
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, (0,assertThisInitialized/* default */.Z)(_this));
|
13578 |
+
_this.options = options;
|
13579 |
+
|
13580 |
+
if (_this.options.keySeparator === undefined) {
|
13581 |
+
_this.options.keySeparator = '.';
|
13582 |
}
|
13583 |
+
|
13584 |
+
_this.logger = baseLogger.create('translator');
|
13585 |
+
return _this;
|
13586 |
+
}
|
13587 |
+
|
13588 |
+
(0,createClass/* default */.Z)(Translator, [{
|
13589 |
+
key: "changeLanguage",
|
13590 |
+
value: function changeLanguage(lng) {
|
13591 |
+
if (lng) this.language = lng;
|
13592 |
}
|
13593 |
+
}, {
|
13594 |
+
key: "exists",
|
13595 |
+
value: function exists(key) {
|
13596 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
13597 |
+
interpolation: {}
|
13598 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13599 |
|
13600 |
+
if (key === undefined || key === null) {
|
13601 |
+
return false;
|
13602 |
+
}
|
|
|
|
|
|
|
13603 |
|
13604 |
+
var resolved = this.resolve(key, options);
|
13605 |
+
return resolved && resolved.res !== undefined;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13606 |
}
|
13607 |
+
}, {
|
13608 |
+
key: "extractFromKey",
|
13609 |
+
value: function extractFromKey(key, options) {
|
13610 |
+
var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
|
13611 |
+
if (nsSeparator === undefined) nsSeparator = ':';
|
13612 |
+
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
13613 |
+
var namespaces = options.ns || this.options.defaultNS || [];
|
13614 |
+
var wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;
|
13615 |
+
var seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
|
13616 |
+
|
13617 |
+
if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
|
13618 |
+
var m = key.match(this.interpolator.nestingRegexp);
|
13619 |
+
|
13620 |
+
if (m && m.length > 0) {
|
13621 |
+
return {
|
13622 |
+
key: key,
|
13623 |
+
namespaces: namespaces
|
13624 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13625 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13626 |
|
13627 |
+
var parts = key.split(nsSeparator);
|
13628 |
+
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
|
13629 |
+
key = parts.join(keySeparator);
|
13630 |
+
}
|
13631 |
+
|
13632 |
+
if (typeof namespaces === 'string') namespaces = [namespaces];
|
13633 |
+
return {
|
13634 |
+
key: key,
|
13635 |
+
namespaces: namespaces
|
13636 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13637 |
}
|
13638 |
+
}, {
|
13639 |
+
key: "translate",
|
13640 |
+
value: function translate(keys, options, lastKey) {
|
13641 |
+
var _this2 = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13642 |
|
13643 |
+
if ((0,esm_typeof/* default */.Z)(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
13644 |
+
options = this.options.overloadTranslationOptionHandler(arguments);
|
13645 |
+
}
|
13646 |
+
|
13647 |
+
if (!options) options = {};
|
13648 |
+
if (keys === undefined || keys === null) return '';
|
13649 |
+
if (!Array.isArray(keys)) keys = [String(keys)];
|
13650 |
+
var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
13651 |
+
|
13652 |
+
var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),
|
13653 |
+
key = _this$extractFromKey.key,
|
13654 |
+
namespaces = _this$extractFromKey.namespaces;
|
13655 |
+
|
13656 |
+
var namespace = namespaces[namespaces.length - 1];
|
13657 |
+
var lng = options.lng || this.language;
|
13658 |
+
var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
13659 |
+
|
13660 |
+
if (lng && lng.toLowerCase() === 'cimode') {
|
13661 |
+
if (appendNamespaceToCIMode) {
|
13662 |
+
var nsSeparator = options.nsSeparator || this.options.nsSeparator;
|
13663 |
+
return namespace + nsSeparator + key;
|
13664 |
+
}
|
13665 |
+
|
13666 |
+
return key;
|
13667 |
+
}
|
13668 |
+
|
13669 |
+
var resolved = this.resolve(keys, options);
|
13670 |
+
var res = resolved && resolved.res;
|
13671 |
+
var resUsedKey = resolved && resolved.usedKey || key;
|
13672 |
+
var resExactUsedKey = resolved && resolved.exactUsedKey || key;
|
13673 |
+
var resType = Object.prototype.toString.apply(res);
|
13674 |
+
var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
|
13675 |
+
var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
|
13676 |
+
var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
|
13677 |
+
var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';
|
13678 |
+
|
13679 |
+
if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {
|
13680 |
+
if (!options.returnObjects && !this.options.returnObjects) {
|
13681 |
+
if (!this.options.returnedObjectHandler) {
|
13682 |
+
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
|
13683 |
+
}
|
13684 |
+
|
13685 |
+
return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread$2(_objectSpread$2({}, options), {}, {
|
13686 |
+
ns: namespaces
|
13687 |
+
})) : "key '".concat(key, " (").concat(this.language, ")' returned an object instead of string.");
|
13688 |
+
}
|
13689 |
+
|
13690 |
+
if (keySeparator) {
|
13691 |
+
var resTypeIsArray = resType === '[object Array]';
|
13692 |
+
var copy = resTypeIsArray ? [] : {};
|
13693 |
+
var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
|
13694 |
+
|
13695 |
+
for (var m in res) {
|
13696 |
+
if (Object.prototype.hasOwnProperty.call(res, m)) {
|
13697 |
+
var deepKey = "".concat(newKeyToUse).concat(keySeparator).concat(m);
|
13698 |
+
copy[m] = this.translate(deepKey, _objectSpread$2(_objectSpread$2({}, options), {
|
13699 |
+
joinArrays: false,
|
13700 |
+
ns: namespaces
|
13701 |
+
}));
|
13702 |
+
if (copy[m] === deepKey) copy[m] = res[m];
|
13703 |
}
|
13704 |
+
}
|
13705 |
+
|
13706 |
+
res = copy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13707 |
}
|
13708 |
+
} else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
|
13709 |
+
res = res.join(joinArrays);
|
13710 |
+
if (res) res = this.extendTranslation(res, keys, options, lastKey);
|
13711 |
+
} else {
|
13712 |
+
var usedDefault = false;
|
13713 |
+
var usedKey = false;
|
13714 |
+
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
13715 |
+
var hasDefaultValue = Translator.hasDefaultValue(options);
|
13716 |
+
var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';
|
13717 |
+
var defaultValue = options["defaultValue".concat(defaultValueSuffix)] || options.defaultValue;
|
13718 |
+
|
13719 |
+
if (!this.isValidLookup(res) && hasDefaultValue) {
|
13720 |
+
usedDefault = true;
|
13721 |
+
res = defaultValue;
|
13722 |
}
|
13723 |
+
|
13724 |
+
if (!this.isValidLookup(res)) {
|
13725 |
+
usedKey = true;
|
13726 |
+
res = key;
|
13727 |
+
}
|
13728 |
+
|
13729 |
+
var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
|
13730 |
+
var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
|
13731 |
+
var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
|
13732 |
+
|
13733 |
+
if (usedKey || usedDefault || updateMissing) {
|
13734 |
+
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
|
13735 |
+
|
13736 |
+
if (keySeparator) {
|
13737 |
+
var fk = this.resolve(key, _objectSpread$2(_objectSpread$2({}, options), {}, {
|
13738 |
+
keySeparator: false
|
13739 |
+
}));
|
13740 |
+
if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
|
13741 |
+
}
|
13742 |
+
|
13743 |
+
var lngs = [];
|
13744 |
+
var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
|
13745 |
+
|
13746 |
+
if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
|
13747 |
+
for (var i = 0; i < fallbackLngs.length; i++) {
|
13748 |
+
lngs.push(fallbackLngs[i]);
|
13749 |
}
|
13750 |
+
} else if (this.options.saveMissingTo === 'all') {
|
13751 |
+
lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
|
13752 |
+
} else {
|
13753 |
+
lngs.push(options.lng || this.language);
|
13754 |
+
}
|
13755 |
+
|
13756 |
+
var send = function send(l, k, specificDefaultValue) {
|
13757 |
+
var defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
|
13758 |
+
|
13759 |
+
if (_this2.options.missingKeyHandler) {
|
13760 |
+
_this2.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);
|
13761 |
+
} else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {
|
13762 |
+
_this2.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);
|
13763 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13764 |
|
13765 |
+
_this2.emit('missingKey', l, namespace, k, res);
|
13766 |
+
};
|
13767 |
|
13768 |
+
if (this.options.saveMissing) {
|
13769 |
+
if (this.options.saveMissingPlurals && needsPluralHandling) {
|
13770 |
+
lngs.forEach(function (language) {
|
13771 |
+
_this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {
|
13772 |
+
send([language], key + suffix, options["defaultValue".concat(suffix)] || defaultValue);
|
13773 |
+
});
|
13774 |
+
});
|
13775 |
+
} else {
|
13776 |
+
send(lngs, key, defaultValue);
|
13777 |
+
}
|
13778 |
+
}
|
13779 |
+
}
|
13780 |
|
13781 |
+
res = this.extendTranslation(res, keys, options, resolved, lastKey);
|
13782 |
+
if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = "".concat(namespace, ":").concat(key);
|
13783 |
+
if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);
|
13784 |
+
}
|
13785 |
+
|
13786 |
+
return res;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13787 |
}
|
13788 |
+
}, {
|
13789 |
+
key: "extendTranslation",
|
13790 |
+
value: function extendTranslation(res, key, options, resolved, lastKey) {
|
13791 |
+
var _this3 = this;
|
13792 |
+
|
13793 |
+
if (this.i18nFormat && this.i18nFormat.parse) {
|
13794 |
+
res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {
|
13795 |
+
resolved: resolved
|
13796 |
+
});
|
13797 |
+
} else if (!options.skipInterpolation) {
|
13798 |
+
if (options.interpolation) this.interpolator.init(_objectSpread$2(_objectSpread$2({}, options), {
|
13799 |
+
interpolation: _objectSpread$2(_objectSpread$2({}, this.options.interpolation), options.interpolation)
|
13800 |
+
}));
|
13801 |
+
var skipOnVariables = typeof res === 'string' && (options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
13802 |
+
var nestBef;
|
13803 |
+
|
13804 |
+
if (skipOnVariables) {
|
13805 |
+
var nb = res.match(this.interpolator.nestingRegexp);
|
13806 |
+
nestBef = nb && nb.length;
|
13807 |
}
|
13808 |
+
|
13809 |
+
var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
|
13810 |
+
if (this.options.interpolation.defaultVariables) data = _objectSpread$2(_objectSpread$2({}, this.options.interpolation.defaultVariables), data);
|
13811 |
+
res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
|
13812 |
+
|
13813 |
+
if (skipOnVariables) {
|
13814 |
+
var na = res.match(this.interpolator.nestingRegexp);
|
13815 |
+
var nestAft = na && na.length;
|
13816 |
+
if (nestBef < nestAft) options.nest = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13817 |
}
|
13818 |
+
|
13819 |
+
if (options.nest !== false) res = this.interpolator.nest(res, function () {
|
13820 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
13821 |
+
args[_key] = arguments[_key];
|
13822 |
+
}
|
13823 |
+
|
13824 |
+
if (lastKey && lastKey[0] === args[0] && !options.context) {
|
13825 |
+
_this3.logger.warn("It seems you are nesting recursively key: ".concat(args[0], " in key: ").concat(key[0]));
|
13826 |
+
|
13827 |
+
return null;
|
13828 |
+
}
|
13829 |
+
|
13830 |
+
return _this3.translate.apply(_this3, args.concat([key]));
|
13831 |
+
}, options);
|
13832 |
+
if (options.interpolation) this.interpolator.reset();
|
13833 |
+
}
|
13834 |
+
|
13835 |
+
var postProcess = options.postProcess || this.options.postProcess;
|
13836 |
+
var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
|
13837 |
+
|
13838 |
+
if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
|
13839 |
+
res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread$2({
|
13840 |
+
i18nResolved: resolved
|
13841 |
+
}, options) : options, this);
|
13842 |
+
}
|
13843 |
+
|
13844 |
+
return res;
|
13845 |
+
}
|
13846 |
+
}, {
|
13847 |
+
key: "resolve",
|
13848 |
+
value: function resolve(keys) {
|
13849 |
+
var _this4 = this;
|
13850 |
+
|
13851 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
13852 |
+
var found;
|
13853 |
+
var usedKey;
|
13854 |
+
var exactUsedKey;
|
13855 |
+
var usedLng;
|
13856 |
+
var usedNS;
|
13857 |
+
if (typeof keys === 'string') keys = [keys];
|
13858 |
+
keys.forEach(function (k) {
|
13859 |
+
if (_this4.isValidLookup(found)) return;
|
13860 |
+
|
13861 |
+
var extracted = _this4.extractFromKey(k, options);
|
13862 |
+
|
13863 |
+
var key = extracted.key;
|
13864 |
+
usedKey = key;
|
13865 |
+
var namespaces = extracted.namespaces;
|
13866 |
+
if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);
|
13867 |
+
var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
|
13868 |
+
|
13869 |
+
var needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && _this4.pluralResolver.shouldUseIntlApi();
|
13870 |
+
|
13871 |
+
var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';
|
13872 |
+
var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);
|
13873 |
+
namespaces.forEach(function (ns) {
|
13874 |
+
if (_this4.isValidLookup(found)) return;
|
13875 |
+
usedNS = ns;
|
13876 |
+
|
13877 |
+
if (!checkedLoadedFor["".concat(codes[0], "-").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
|
13878 |
+
checkedLoadedFor["".concat(codes[0], "-").concat(ns)] = true;
|
13879 |
+
|
13880 |
+
_this4.logger.warn("key \"".concat(usedKey, "\" for languages \"").concat(codes.join(', '), "\" won't get resolved as namespace \"").concat(usedNS, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
|
13881 |
+
}
|
13882 |
+
|
13883 |
+
codes.forEach(function (code) {
|
13884 |
+
if (_this4.isValidLookup(found)) return;
|
13885 |
+
usedLng = code;
|
13886 |
+
var finalKeys = [key];
|
13887 |
+
|
13888 |
+
if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {
|
13889 |
+
_this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
|
13890 |
+
} else {
|
13891 |
+
var pluralSuffix;
|
13892 |
+
if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count, options);
|
13893 |
+
var zeroSuffix = '_zero';
|
13894 |
+
|
13895 |
+
if (needsPluralHandling) {
|
13896 |
+
finalKeys.push(key + pluralSuffix);
|
13897 |
+
|
13898 |
+
if (needsZeroSuffixLookup) {
|
13899 |
+
finalKeys.push(key + zeroSuffix);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13900 |
}
|
13901 |
+
}
|
13902 |
+
|
13903 |
+
if (needsContextHandling) {
|
13904 |
+
var contextKey = "".concat(key).concat(_this4.options.contextSeparator).concat(options.context);
|
13905 |
+
finalKeys.push(contextKey);
|
13906 |
+
|
13907 |
+
if (needsPluralHandling) {
|
13908 |
+
finalKeys.push(contextKey + pluralSuffix);
|
13909 |
+
|
13910 |
+
if (needsZeroSuffixLookup) {
|
13911 |
+
finalKeys.push(contextKey + zeroSuffix);
|
13912 |
+
}
|
13913 |
}
|
13914 |
+
}
|
13915 |
}
|
13916 |
+
|
13917 |
+
var possibleKey;
|
13918 |
+
|
13919 |
+
while (possibleKey = finalKeys.pop()) {
|
13920 |
+
if (!_this4.isValidLookup(found)) {
|
13921 |
+
exactUsedKey = possibleKey;
|
13922 |
+
found = _this4.getResource(code, ns, possibleKey, options);
|
13923 |
+
}
|
13924 |
+
}
|
13925 |
+
});
|
13926 |
});
|
13927 |
+
});
|
13928 |
+
return {
|
13929 |
+
res: found,
|
13930 |
+
usedKey: usedKey,
|
13931 |
+
exactUsedKey: exactUsedKey,
|
13932 |
+
usedLng: usedLng,
|
13933 |
+
usedNS: usedNS
|
13934 |
+
};
|
13935 |
+
}
|
13936 |
+
}, {
|
13937 |
+
key: "isValidLookup",
|
13938 |
+
value: function isValidLookup(res) {
|
13939 |
+
return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
|
13940 |
+
}
|
13941 |
+
}, {
|
13942 |
+
key: "getResource",
|
13943 |
+
value: function getResource(code, ns, key) {
|
13944 |
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
13945 |
+
if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
|
13946 |
+
return this.resourceStore.getResource(code, ns, key, options);
|
13947 |
+
}
|
13948 |
+
}], [{
|
13949 |
+
key: "hasDefaultValue",
|
13950 |
+
value: function hasDefaultValue(options) {
|
13951 |
+
var prefix = 'defaultValue';
|
13952 |
+
|
13953 |
+
for (var option in options) {
|
13954 |
+
if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
|
13955 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
13956 |
}
|
13957 |
+
}
|
|
|
|
|
13958 |
|
13959 |
+
return false;
|
13960 |
+
}
|
13961 |
+
}]);
|
13962 |
+
|
13963 |
+
return Translator;
|
13964 |
+
}(EventEmitter);
|
13965 |
+
|
13966 |
+
function capitalize(string) {
|
13967 |
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13968 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13969 |
|
13970 |
+
var LanguageUtil = function () {
|
13971 |
+
function LanguageUtil(options) {
|
13972 |
+
_classCallCheck(this, LanguageUtil);
|
13973 |
+
|
13974 |
+
this.options = options;
|
13975 |
+
this.supportedLngs = this.options.supportedLngs || false;
|
13976 |
+
this.logger = baseLogger.create('languageUtils');
|
13977 |
+
}
|
13978 |
+
|
13979 |
+
(0,createClass/* default */.Z)(LanguageUtil, [{
|
13980 |
+
key: "getScriptPartFromCode",
|
13981 |
+
value: function getScriptPartFromCode(code) {
|
13982 |
+
if (!code || code.indexOf('-') < 0) return null;
|
13983 |
+
var p = code.split('-');
|
13984 |
+
if (p.length === 2) return null;
|
13985 |
+
p.pop();
|
13986 |
+
if (p[p.length - 1].toLowerCase() === 'x') return null;
|
13987 |
+
return this.formatLanguageCode(p.join('-'));
|
13988 |
+
}
|
13989 |
+
}, {
|
13990 |
+
key: "getLanguagePartFromCode",
|
13991 |
+
value: function getLanguagePartFromCode(code) {
|
13992 |
+
if (!code || code.indexOf('-') < 0) return code;
|
13993 |
+
var p = code.split('-');
|
13994 |
+
return this.formatLanguageCode(p[0]);
|
13995 |
+
}
|
13996 |
+
}, {
|
13997 |
+
key: "formatLanguageCode",
|
13998 |
+
value: function formatLanguageCode(code) {
|
13999 |
+
if (typeof code === 'string' && code.indexOf('-') > -1) {
|
14000 |
+
var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
|
14001 |
+
var p = code.split('-');
|
14002 |
+
|
14003 |
+
if (this.options.lowerCaseLng) {
|
14004 |
+
p = p.map(function (part) {
|
14005 |
+
return part.toLowerCase();
|
14006 |
+
});
|
14007 |
+
} else if (p.length === 2) {
|
14008 |
+
p[0] = p[0].toLowerCase();
|
14009 |
+
p[1] = p[1].toUpperCase();
|
14010 |
+
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
14011 |
+
} else if (p.length === 3) {
|
14012 |
+
p[0] = p[0].toLowerCase();
|
14013 |
+
if (p[1].length === 2) p[1] = p[1].toUpperCase();
|
14014 |
+
if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
|
14015 |
+
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
14016 |
+
if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
|
14017 |
}
|
14018 |
+
|
14019 |
+
return p.join('-');
|
14020 |
+
}
|
14021 |
+
|
14022 |
+
return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
|
14023 |
}
|
14024 |
+
}, {
|
14025 |
+
key: "isSupportedCode",
|
14026 |
+
value: function isSupportedCode(code) {
|
14027 |
+
if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
|
14028 |
+
code = this.getLanguagePartFromCode(code);
|
14029 |
+
}
|
14030 |
+
|
14031 |
+
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
|
14032 |
}
|
14033 |
+
}, {
|
14034 |
+
key: "getBestMatchFromCodes",
|
14035 |
+
value: function getBestMatchFromCodes(codes) {
|
14036 |
+
var _this = this;
|
14037 |
+
|
14038 |
+
if (!codes) return null;
|
14039 |
+
var found;
|
14040 |
+
codes.forEach(function (code) {
|
14041 |
+
if (found) return;
|
14042 |
+
|
14043 |
+
var cleanedLng = _this.formatLanguageCode(code);
|
14044 |
+
|
14045 |
+
if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
|
14046 |
+
});
|
14047 |
+
|
14048 |
+
if (!found && this.options.supportedLngs) {
|
14049 |
+
codes.forEach(function (code) {
|
14050 |
+
if (found) return;
|
14051 |
+
|
14052 |
+
var lngOnly = _this.getLanguagePartFromCode(code);
|
14053 |
+
|
14054 |
+
if (_this.isSupportedCode(lngOnly)) return found = lngOnly;
|
14055 |
+
found = _this.options.supportedLngs.find(function (supportedLng) {
|
14056 |
+
if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
|
14057 |
+
});
|
14058 |
+
});
|
14059 |
+
}
|
14060 |
+
|
14061 |
+
if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
|
14062 |
+
return found;
|
14063 |
+
}
|
14064 |
+
}, {
|
14065 |
+
key: "getFallbackCodes",
|
14066 |
+
value: function getFallbackCodes(fallbacks, code) {
|
14067 |
+
if (!fallbacks) return [];
|
14068 |
+
if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
|
14069 |
+
if (typeof fallbacks === 'string') fallbacks = [fallbacks];
|
14070 |
+
if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
|
14071 |
+
if (!code) return fallbacks["default"] || [];
|
14072 |
+
var found = fallbacks[code];
|
14073 |
+
if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
|
14074 |
+
if (!found) found = fallbacks[this.formatLanguageCode(code)];
|
14075 |
+
if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
|
14076 |
+
if (!found) found = fallbacks["default"];
|
14077 |
+
return found || [];
|
14078 |
+
}
|
14079 |
+
}, {
|
14080 |
+
key: "toResolveHierarchy",
|
14081 |
+
value: function toResolveHierarchy(code, fallbackCode) {
|
14082 |
+
var _this2 = this;
|
14083 |
+
|
14084 |
+
var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
|
14085 |
+
var codes = [];
|
14086 |
+
|
14087 |
+
var addCode = function addCode(c) {
|
14088 |
+
if (!c) return;
|
14089 |
+
|
14090 |
+
if (_this2.isSupportedCode(c)) {
|
14091 |
+
codes.push(c);
|
14092 |
+
} else {
|
14093 |
+
_this2.logger.warn("rejecting language code not found in supportedLngs: ".concat(c));
|
14094 |
+
}
|
14095 |
+
};
|
14096 |
+
|
14097 |
+
if (typeof code === 'string' && code.indexOf('-') > -1) {
|
14098 |
+
if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
|
14099 |
+
if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
|
14100 |
+
if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
|
14101 |
+
} else if (typeof code === 'string') {
|
14102 |
+
addCode(this.formatLanguageCode(code));
|
14103 |
+
}
|
14104 |
+
|
14105 |
+
fallbackCodes.forEach(function (fc) {
|
14106 |
+
if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));
|
14107 |
+
});
|
14108 |
+
return codes;
|
14109 |
+
}
|
14110 |
+
}]);
|
14111 |
+
|
14112 |
+
return LanguageUtil;
|
14113 |
+
}();
|
14114 |
+
|
14115 |
+
var sets = [{
|
14116 |
+
lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],
|
14117 |
+
nr: [1, 2],
|
14118 |
+
fc: 1
|
14119 |
+
}, {
|
14120 |
+
lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],
|
14121 |
+
nr: [1, 2],
|
14122 |
+
fc: 2
|
14123 |
+
}, {
|
14124 |
+
lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
|
14125 |
+
nr: [1],
|
14126 |
+
fc: 3
|
14127 |
+
}, {
|
14128 |
+
lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],
|
14129 |
+
nr: [1, 2, 5],
|
14130 |
+
fc: 4
|
14131 |
+
}, {
|
14132 |
+
lngs: ['ar'],
|
14133 |
+
nr: [0, 1, 2, 3, 11, 100],
|
14134 |
+
fc: 5
|
14135 |
+
}, {
|
14136 |
+
lngs: ['cs', 'sk'],
|
14137 |
+
nr: [1, 2, 5],
|
14138 |
+
fc: 6
|
14139 |
+
}, {
|
14140 |
+
lngs: ['csb', 'pl'],
|
14141 |
+
nr: [1, 2, 5],
|
14142 |
+
fc: 7
|
14143 |
+
}, {
|
14144 |
+
lngs: ['cy'],
|
14145 |
+
nr: [1, 2, 3, 8],
|
14146 |
+
fc: 8
|
14147 |
+
}, {
|
14148 |
+
lngs: ['fr'],
|
14149 |
+
nr: [1, 2],
|
14150 |
+
fc: 9
|
14151 |
+
}, {
|
14152 |
+
lngs: ['ga'],
|
14153 |
+
nr: [1, 2, 3, 7, 11],
|
14154 |
+
fc: 10
|
14155 |
+
}, {
|
14156 |
+
lngs: ['gd'],
|
14157 |
+
nr: [1, 2, 3, 20],
|
14158 |
+
fc: 11
|
14159 |
+
}, {
|
14160 |
+
lngs: ['is'],
|
14161 |
+
nr: [1, 2],
|
14162 |
+
fc: 12
|
14163 |
+
}, {
|
14164 |
+
lngs: ['jv'],
|
14165 |
+
nr: [0, 1],
|
14166 |
+
fc: 13
|
14167 |
+
}, {
|
14168 |
+
lngs: ['kw'],
|
14169 |
+
nr: [1, 2, 3, 4],
|
14170 |
+
fc: 14
|
14171 |
+
}, {
|
14172 |
+
lngs: ['lt'],
|
14173 |
+
nr: [1, 2, 10],
|
14174 |
+
fc: 15
|
14175 |
+
}, {
|
14176 |
+
lngs: ['lv'],
|
14177 |
+
nr: [1, 2, 0],
|
14178 |
+
fc: 16
|
14179 |
+
}, {
|
14180 |
+
lngs: ['mk'],
|
14181 |
+
nr: [1, 2],
|
14182 |
+
fc: 17
|
14183 |
+
}, {
|
14184 |
+
lngs: ['mnk'],
|
14185 |
+
nr: [0, 1, 2],
|
14186 |
+
fc: 18
|
14187 |
+
}, {
|
14188 |
+
lngs: ['mt'],
|
14189 |
+
nr: [1, 2, 11, 20],
|
14190 |
+
fc: 19
|
14191 |
+
}, {
|
14192 |
+
lngs: ['or'],
|
14193 |
+
nr: [2, 1],
|
14194 |
+
fc: 2
|
14195 |
+
}, {
|
14196 |
+
lngs: ['ro'],
|
14197 |
+
nr: [1, 2, 20],
|
14198 |
+
fc: 20
|
14199 |
+
}, {
|
14200 |
+
lngs: ['sl'],
|
14201 |
+
nr: [5, 1, 2, 3],
|
14202 |
+
fc: 21
|
14203 |
+
}, {
|
14204 |
+
lngs: ['he', 'iw'],
|
14205 |
+
nr: [1, 2, 20, 21],
|
14206 |
+
fc: 22
|
14207 |
+
}];
|
14208 |
+
var _rulesPluralsTypes = {
|
14209 |
+
1: function _(n) {
|
14210 |
+
return Number(n > 1);
|
14211 |
+
},
|
14212 |
+
2: function _(n) {
|
14213 |
+
return Number(n != 1);
|
14214 |
+
},
|
14215 |
+
3: function _(n) {
|
14216 |
+
return 0;
|
14217 |
+
},
|
14218 |
+
4: function _(n) {
|
14219 |
+
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
14220 |
+
},
|
14221 |
+
5: function _(n) {
|
14222 |
+
return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
|
14223 |
+
},
|
14224 |
+
6: function _(n) {
|
14225 |
+
return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
|
14226 |
+
},
|
14227 |
+
7: function _(n) {
|
14228 |
+
return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
14229 |
+
},
|
14230 |
+
8: function _(n) {
|
14231 |
+
return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
|
14232 |
+
},
|
14233 |
+
9: function _(n) {
|
14234 |
+
return Number(n >= 2);
|
14235 |
+
},
|
14236 |
+
10: function _(n) {
|
14237 |
+
return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
|
14238 |
+
},
|
14239 |
+
11: function _(n) {
|
14240 |
+
return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
|
14241 |
+
},
|
14242 |
+
12: function _(n) {
|
14243 |
+
return Number(n % 10 != 1 || n % 100 == 11);
|
14244 |
+
},
|
14245 |
+
13: function _(n) {
|
14246 |
+
return Number(n !== 0);
|
14247 |
+
},
|
14248 |
+
14: function _(n) {
|
14249 |
+
return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
|
14250 |
+
},
|
14251 |
+
15: function _(n) {
|
14252 |
+
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
14253 |
+
},
|
14254 |
+
16: function _(n) {
|
14255 |
+
return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
|
14256 |
+
},
|
14257 |
+
17: function _(n) {
|
14258 |
+
return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
|
14259 |
+
},
|
14260 |
+
18: function _(n) {
|
14261 |
+
return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
|
14262 |
+
},
|
14263 |
+
19: function _(n) {
|
14264 |
+
return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
|
14265 |
+
},
|
14266 |
+
20: function _(n) {
|
14267 |
+
return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
|
14268 |
+
},
|
14269 |
+
21: function _(n) {
|
14270 |
+
return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
|
14271 |
+
},
|
14272 |
+
22: function _(n) {
|
14273 |
+
return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
|
14274 |
+
}
|
14275 |
+
};
|
14276 |
+
var deprecatedJsonVersions = ['v1', 'v2', 'v3'];
|
14277 |
+
var suffixesOrder = {
|
14278 |
+
zero: 0,
|
14279 |
+
one: 1,
|
14280 |
+
two: 2,
|
14281 |
+
few: 3,
|
14282 |
+
many: 4,
|
14283 |
+
other: 5
|
14284 |
+
};
|
14285 |
+
|
14286 |
+
function createRules() {
|
14287 |
+
var rules = {};
|
14288 |
+
sets.forEach(function (set) {
|
14289 |
+
set.lngs.forEach(function (l) {
|
14290 |
+
rules[l] = {
|
14291 |
+
numbers: set.nr,
|
14292 |
+
plurals: _rulesPluralsTypes[set.fc]
|
14293 |
+
};
|
14294 |
+
});
|
14295 |
+
});
|
14296 |
+
return rules;
|
14297 |
+
}
|
14298 |
+
|
14299 |
+
var PluralResolver = function () {
|
14300 |
+
function PluralResolver(languageUtils) {
|
14301 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
14302 |
+
|
14303 |
+
_classCallCheck(this, PluralResolver);
|
14304 |
+
|
14305 |
+
this.languageUtils = languageUtils;
|
14306 |
+
this.options = options;
|
14307 |
+
this.logger = baseLogger.create('pluralResolver');
|
14308 |
+
|
14309 |
+
if ((!this.options.compatibilityJSON || this.options.compatibilityJSON === 'v4') && (typeof Intl === 'undefined' || !Intl.PluralRules)) {
|
14310 |
+
this.options.compatibilityJSON = 'v3';
|
14311 |
+
this.logger.error('Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.');
|
14312 |
+
}
|
14313 |
+
|
14314 |
+
this.rules = createRules();
|
14315 |
+
}
|
14316 |
+
|
14317 |
+
(0,createClass/* default */.Z)(PluralResolver, [{
|
14318 |
+
key: "addRule",
|
14319 |
+
value: function addRule(lng, obj) {
|
14320 |
+
this.rules[lng] = obj;
|
14321 |
+
}
|
14322 |
+
}, {
|
14323 |
+
key: "getRule",
|
14324 |
+
value: function getRule(code) {
|
14325 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
14326 |
+
|
14327 |
+
if (this.shouldUseIntlApi()) {
|
14328 |
+
try {
|
14329 |
+
return new Intl.PluralRules(code, {
|
14330 |
+
type: options.ordinal ? 'ordinal' : 'cardinal'
|
14331 |
+
});
|
14332 |
+
} catch (_unused) {
|
14333 |
+
return;
|
14334 |
+
}
|
14335 |
+
}
|
14336 |
+
|
14337 |
+
return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];
|
14338 |
+
}
|
14339 |
+
}, {
|
14340 |
+
key: "needsPlural",
|
14341 |
+
value: function needsPlural(code) {
|
14342 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
14343 |
+
var rule = this.getRule(code, options);
|
14344 |
+
|
14345 |
+
if (this.shouldUseIntlApi()) {
|
14346 |
+
return rule && rule.resolvedOptions().pluralCategories.length > 1;
|
14347 |
+
}
|
14348 |
+
|
14349 |
+
return rule && rule.numbers.length > 1;
|
14350 |
+
}
|
14351 |
+
}, {
|
14352 |
+
key: "getPluralFormsOfKey",
|
14353 |
+
value: function getPluralFormsOfKey(code, key) {
|
14354 |
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
14355 |
+
return this.getSuffixes(code, options).map(function (suffix) {
|
14356 |
+
return "".concat(key).concat(suffix);
|
14357 |
+
});
|
14358 |
+
}
|
14359 |
+
}, {
|
14360 |
+
key: "getSuffixes",
|
14361 |
+
value: function getSuffixes(code) {
|
14362 |
+
var _this = this;
|
14363 |
+
|
14364 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
14365 |
+
var rule = this.getRule(code, options);
|
14366 |
+
|
14367 |
+
if (!rule) {
|
14368 |
+
return [];
|
14369 |
+
}
|
14370 |
+
|
14371 |
+
if (this.shouldUseIntlApi()) {
|
14372 |
+
return rule.resolvedOptions().pluralCategories.sort(function (pluralCategory1, pluralCategory2) {
|
14373 |
+
return suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2];
|
14374 |
+
}).map(function (pluralCategory) {
|
14375 |
+
return "".concat(_this.options.prepend).concat(pluralCategory);
|
14376 |
+
});
|
14377 |
+
}
|
14378 |
+
|
14379 |
+
return rule.numbers.map(function (number) {
|
14380 |
+
return _this.getSuffix(code, number, options);
|
14381 |
+
});
|
14382 |
+
}
|
14383 |
+
}, {
|
14384 |
+
key: "getSuffix",
|
14385 |
+
value: function getSuffix(code, count) {
|
14386 |
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
14387 |
+
var rule = this.getRule(code, options);
|
14388 |
+
|
14389 |
+
if (rule) {
|
14390 |
+
if (this.shouldUseIntlApi()) {
|
14391 |
+
return "".concat(this.options.prepend).concat(rule.select(count));
|
14392 |
+
}
|
14393 |
+
|
14394 |
+
return this.getSuffixRetroCompatible(rule, count);
|
14395 |
+
}
|
14396 |
+
|
14397 |
+
this.logger.warn("no plural rule found for: ".concat(code));
|
14398 |
+
return '';
|
14399 |
+
}
|
14400 |
+
}, {
|
14401 |
+
key: "getSuffixRetroCompatible",
|
14402 |
+
value: function getSuffixRetroCompatible(rule, count) {
|
14403 |
+
var _this2 = this;
|
14404 |
+
|
14405 |
+
var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
|
14406 |
+
var suffix = rule.numbers[idx];
|
14407 |
+
|
14408 |
+
if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
14409 |
+
if (suffix === 2) {
|
14410 |
+
suffix = 'plural';
|
14411 |
+
} else if (suffix === 1) {
|
14412 |
+
suffix = '';
|
14413 |
+
}
|
14414 |
+
}
|
14415 |
+
|
14416 |
+
var returnSuffix = function returnSuffix() {
|
14417 |
+
return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();
|
14418 |
+
};
|
14419 |
+
|
14420 |
+
if (this.options.compatibilityJSON === 'v1') {
|
14421 |
+
if (suffix === 1) return '';
|
14422 |
+
if (typeof suffix === 'number') return "_plural_".concat(suffix.toString());
|
14423 |
+
return returnSuffix();
|
14424 |
+
} else if (this.options.compatibilityJSON === 'v2') {
|
14425 |
+
return returnSuffix();
|
14426 |
+
} else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
14427 |
+
return returnSuffix();
|
14428 |
+
}
|
14429 |
+
|
14430 |
+
return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
|
14431 |
+
}
|
14432 |
+
}, {
|
14433 |
+
key: "shouldUseIntlApi",
|
14434 |
+
value: function shouldUseIntlApi() {
|
14435 |
+
return !deprecatedJsonVersions.includes(this.options.compatibilityJSON);
|
14436 |
+
}
|
14437 |
+
}]);
|
14438 |
+
|
14439 |
+
return PluralResolver;
|
14440 |
+
}();
|
14441 |
+
|
14442 |
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
14443 |
+
|
14444 |
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
14445 |
+
|
14446 |
+
var Interpolator = function () {
|
14447 |
+
function Interpolator() {
|
14448 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
14449 |
+
|
14450 |
+
_classCallCheck(this, Interpolator);
|
14451 |
+
|
14452 |
+
this.logger = baseLogger.create('interpolator');
|
14453 |
+
this.options = options;
|
14454 |
+
|
14455 |
+
this.format = options.interpolation && options.interpolation.format || function (value) {
|
14456 |
+
return value;
|
14457 |
+
};
|
14458 |
+
|
14459 |
+
this.init(options);
|
14460 |
+
}
|
14461 |
+
|
14462 |
+
(0,createClass/* default */.Z)(Interpolator, [{
|
14463 |
+
key: "init",
|
14464 |
+
value: function init() {
|
14465 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
14466 |
+
if (!options.interpolation) options.interpolation = {
|
14467 |
+
escapeValue: true
|
14468 |
+
};
|
14469 |
+
var iOpts = options.interpolation;
|
14470 |
+
this.escape = iOpts.escape !== undefined ? iOpts.escape : i18next_escape;
|
14471 |
+
this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
|
14472 |
+
this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;
|
14473 |
+
this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
|
14474 |
+
this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
|
14475 |
+
this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
|
14476 |
+
this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
|
14477 |
+
this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
|
14478 |
+
this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
|
14479 |
+
this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
|
14480 |
+
this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
|
14481 |
+
this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
|
14482 |
+
this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
|
14483 |
+
this.resetRegExp();
|
14484 |
+
}
|
14485 |
+
}, {
|
14486 |
+
key: "reset",
|
14487 |
+
value: function reset() {
|
14488 |
+
if (this.options) this.init(this.options);
|
14489 |
+
}
|
14490 |
+
}, {
|
14491 |
+
key: "resetRegExp",
|
14492 |
+
value: function resetRegExp() {
|
14493 |
+
var regexpStr = "".concat(this.prefix, "(.+?)").concat(this.suffix);
|
14494 |
+
this.regexp = new RegExp(regexpStr, 'g');
|
14495 |
+
var regexpUnescapeStr = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
|
14496 |
+
this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
|
14497 |
+
var nestingRegexpStr = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix);
|
14498 |
+
this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
|
14499 |
+
}
|
14500 |
+
}, {
|
14501 |
+
key: "interpolate",
|
14502 |
+
value: function interpolate(str, data, lng, options) {
|
14503 |
+
var _this = this;
|
14504 |
+
|
14505 |
+
var match;
|
14506 |
+
var value;
|
14507 |
+
var replaces;
|
14508 |
+
var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
14509 |
+
|
14510 |
+
function regexSafe(val) {
|
14511 |
+
return val.replace(/\$/g, '$$$$');
|
14512 |
+
}
|
14513 |
+
|
14514 |
+
var handleFormat = function handleFormat(key) {
|
14515 |
+
if (key.indexOf(_this.formatSeparator) < 0) {
|
14516 |
+
var path = getPathWithDefaults(data, defaultData, key);
|
14517 |
+
return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
|
14518 |
+
interpolationkey: key
|
14519 |
+
})) : path;
|
14520 |
+
}
|
14521 |
+
|
14522 |
+
var p = key.split(_this.formatSeparator);
|
14523 |
+
var k = p.shift().trim();
|
14524 |
+
var f = p.join(_this.formatSeparator).trim();
|
14525 |
+
return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
|
14526 |
+
interpolationkey: k
|
14527 |
+
}));
|
14528 |
+
};
|
14529 |
+
|
14530 |
+
this.resetRegExp();
|
14531 |
+
var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
14532 |
+
var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
14533 |
+
var todos = [{
|
14534 |
+
regex: this.regexpUnescape,
|
14535 |
+
safeValue: function safeValue(val) {
|
14536 |
+
return regexSafe(val);
|
14537 |
+
}
|
14538 |
+
}, {
|
14539 |
+
regex: this.regexp,
|
14540 |
+
safeValue: function safeValue(val) {
|
14541 |
+
return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);
|
14542 |
+
}
|
14543 |
+
}];
|
14544 |
+
todos.forEach(function (todo) {
|
14545 |
+
replaces = 0;
|
14546 |
+
|
14547 |
+
while (match = todo.regex.exec(str)) {
|
14548 |
+
var matchedVar = match[1].trim();
|
14549 |
+
value = handleFormat(matchedVar);
|
14550 |
+
|
14551 |
+
if (value === undefined) {
|
14552 |
+
if (typeof missingInterpolationHandler === 'function') {
|
14553 |
+
var temp = missingInterpolationHandler(str, match, options);
|
14554 |
+
value = typeof temp === 'string' ? temp : '';
|
14555 |
+
} else if (options && options.hasOwnProperty(matchedVar)) {
|
14556 |
+
value = '';
|
14557 |
+
} else if (skipOnVariables) {
|
14558 |
+
value = match[0];
|
14559 |
+
continue;
|
14560 |
+
} else {
|
14561 |
+
_this.logger.warn("missed to pass in variable ".concat(matchedVar, " for interpolating ").concat(str));
|
14562 |
+
|
14563 |
+
value = '';
|
14564 |
+
}
|
14565 |
+
} else if (typeof value !== 'string' && !_this.useRawValueToEscape) {
|
14566 |
+
value = makeString(value);
|
14567 |
+
}
|
14568 |
+
|
14569 |
+
var safeValue = todo.safeValue(value);
|
14570 |
+
str = str.replace(match[0], safeValue);
|
14571 |
+
|
14572 |
+
if (skipOnVariables) {
|
14573 |
+
todo.regex.lastIndex += safeValue.length;
|
14574 |
+
todo.regex.lastIndex -= match[0].length;
|
14575 |
+
} else {
|
14576 |
+
todo.regex.lastIndex = 0;
|
14577 |
+
}
|
14578 |
+
|
14579 |
+
replaces++;
|
14580 |
+
|
14581 |
+
if (replaces >= _this.maxReplaces) {
|
14582 |
+
break;
|
14583 |
+
}
|
14584 |
+
}
|
14585 |
+
});
|
14586 |
+
return str;
|
14587 |
+
}
|
14588 |
+
}, {
|
14589 |
+
key: "nest",
|
14590 |
+
value: function nest(str, fc) {
|
14591 |
+
var _this2 = this;
|
14592 |
+
|
14593 |
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
14594 |
+
var match;
|
14595 |
+
var value;
|
14596 |
+
|
14597 |
+
var clonedOptions = _objectSpread$3({}, options);
|
14598 |
+
|
14599 |
+
clonedOptions.applyPostProcessor = false;
|
14600 |
+
delete clonedOptions.defaultValue;
|
14601 |
+
|
14602 |
+
function handleHasOptions(key, inheritedOptions) {
|
14603 |
+
var sep = this.nestingOptionsSeparator;
|
14604 |
+
if (key.indexOf(sep) < 0) return key;
|
14605 |
+
var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
|
14606 |
+
var optionsString = "{".concat(c[1]);
|
14607 |
+
key = c[0];
|
14608 |
+
optionsString = this.interpolate(optionsString, clonedOptions);
|
14609 |
+
optionsString = optionsString.replace(/'/g, '"');
|
14610 |
+
|
14611 |
+
try {
|
14612 |
+
clonedOptions = JSON.parse(optionsString);
|
14613 |
+
if (inheritedOptions) clonedOptions = _objectSpread$3(_objectSpread$3({}, inheritedOptions), clonedOptions);
|
14614 |
+
} catch (e) {
|
14615 |
+
this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
|
14616 |
+
return "".concat(key).concat(sep).concat(optionsString);
|
14617 |
+
}
|
14618 |
+
|
14619 |
+
delete clonedOptions.defaultValue;
|
14620 |
+
return key;
|
14621 |
+
}
|
14622 |
+
|
14623 |
+
while (match = this.nestingRegexp.exec(str)) {
|
14624 |
+
var formatters = [];
|
14625 |
+
var doReduce = false;
|
14626 |
+
|
14627 |
+
if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
|
14628 |
+
var r = match[1].split(this.formatSeparator).map(function (elem) {
|
14629 |
+
return elem.trim();
|
14630 |
+
});
|
14631 |
+
match[1] = r.shift();
|
14632 |
+
formatters = r;
|
14633 |
+
doReduce = true;
|
14634 |
+
}
|
14635 |
+
|
14636 |
+
value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
|
14637 |
+
if (value && match[0] === str && typeof value !== 'string') return value;
|
14638 |
+
if (typeof value !== 'string') value = makeString(value);
|
14639 |
+
|
14640 |
+
if (!value) {
|
14641 |
+
this.logger.warn("missed to resolve ".concat(match[1], " for nesting ").concat(str));
|
14642 |
+
value = '';
|
14643 |
+
}
|
14644 |
+
|
14645 |
+
if (doReduce) {
|
14646 |
+
value = formatters.reduce(function (v, f) {
|
14647 |
+
return _this2.format(v, f, options.lng, _objectSpread$3(_objectSpread$3({}, options), {}, {
|
14648 |
+
interpolationkey: match[1].trim()
|
14649 |
+
}));
|
14650 |
+
}, value.trim());
|
14651 |
+
}
|
14652 |
+
|
14653 |
+
str = str.replace(match[0], value);
|
14654 |
+
this.regexp.lastIndex = 0;
|
14655 |
+
}
|
14656 |
+
|
14657 |
+
return str;
|
14658 |
+
}
|
14659 |
+
}]);
|
14660 |
+
|
14661 |
+
return Interpolator;
|
14662 |
+
}();
|
14663 |
+
|
14664 |
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
14665 |
+
|
14666 |
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
14667 |
+
|
14668 |
+
function parseFormatStr(formatStr) {
|
14669 |
+
var formatName = formatStr.toLowerCase().trim();
|
14670 |
+
var formatOptions = {};
|
14671 |
+
|
14672 |
+
if (formatStr.indexOf('(') > -1) {
|
14673 |
+
var p = formatStr.split('(');
|
14674 |
+
formatName = p[0].toLowerCase().trim();
|
14675 |
+
var optStr = p[1].substring(0, p[1].length - 1);
|
14676 |
+
|
14677 |
+
if (formatName === 'currency' && optStr.indexOf(':') < 0) {
|
14678 |
+
if (!formatOptions.currency) formatOptions.currency = optStr.trim();
|
14679 |
+
} else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {
|
14680 |
+
if (!formatOptions.range) formatOptions.range = optStr.trim();
|
14681 |
+
} else {
|
14682 |
+
var opts = optStr.split(';');
|
14683 |
+
opts.forEach(function (opt) {
|
14684 |
+
if (!opt) return;
|
14685 |
+
|
14686 |
+
var _opt$split = opt.split(':'),
|
14687 |
+
_opt$split2 = _toArray(_opt$split),
|
14688 |
+
key = _opt$split2[0],
|
14689 |
+
rest = _opt$split2.slice(1);
|
14690 |
+
|
14691 |
+
var val = rest.join(':');
|
14692 |
+
if (val.trim() === 'false') formatOptions[key.trim()] = false;
|
14693 |
+
if (val.trim() === 'true') formatOptions[key.trim()] = true;
|
14694 |
+
if (!isNaN(val.trim())) formatOptions[key.trim()] = parseInt(val.trim(), 10);
|
14695 |
+
if (!formatOptions[key.trim()]) formatOptions[key.trim()] = val.trim();
|
14696 |
+
});
|
14697 |
+
}
|
14698 |
+
}
|
14699 |
+
|
14700 |
+
return {
|
14701 |
+
formatName: formatName,
|
14702 |
+
formatOptions: formatOptions
|
14703 |
+
};
|
14704 |
+
}
|
14705 |
+
|
14706 |
+
var Formatter = function () {
|
14707 |
+
function Formatter() {
|
14708 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
14709 |
+
|
14710 |
+
_classCallCheck(this, Formatter);
|
14711 |
+
|
14712 |
+
this.logger = baseLogger.create('formatter');
|
14713 |
+
this.options = options;
|
14714 |
+
this.formats = {
|
14715 |
+
number: function number(val, lng, options) {
|
14716 |
+
return new Intl.NumberFormat(lng, options).format(val);
|
14717 |
+
},
|
14718 |
+
currency: function currency(val, lng, options) {
|
14719 |
+
return new Intl.NumberFormat(lng, _objectSpread$4(_objectSpread$4({}, options), {}, {
|
14720 |
+
style: 'currency'
|
14721 |
+
})).format(val);
|
14722 |
+
},
|
14723 |
+
datetime: function datetime(val, lng, options) {
|
14724 |
+
return new Intl.DateTimeFormat(lng, _objectSpread$4({}, options)).format(val);
|
14725 |
+
},
|
14726 |
+
relativetime: function relativetime(val, lng, options) {
|
14727 |
+
return new Intl.RelativeTimeFormat(lng, _objectSpread$4({}, options)).format(val, options.range || 'day');
|
14728 |
+
},
|
14729 |
+
list: function list(val, lng, options) {
|
14730 |
+
return new Intl.ListFormat(lng, _objectSpread$4({}, options)).format(val);
|
14731 |
+
}
|
14732 |
+
};
|
14733 |
+
this.init(options);
|
14734 |
+
}
|
14735 |
+
|
14736 |
+
(0,createClass/* default */.Z)(Formatter, [{
|
14737 |
+
key: "init",
|
14738 |
+
value: function init(services) {
|
14739 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
14740 |
+
interpolation: {}
|
14741 |
+
};
|
14742 |
+
var iOpts = options.interpolation;
|
14743 |
+
this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
|
14744 |
+
}
|
14745 |
+
}, {
|
14746 |
+
key: "add",
|
14747 |
+
value: function add(name, fc) {
|
14748 |
+
this.formats[name.toLowerCase().trim()] = fc;
|
14749 |
+
}
|
14750 |
+
}, {
|
14751 |
+
key: "format",
|
14752 |
+
value: function format(value, _format, lng, options) {
|
14753 |
+
var _this = this;
|
14754 |
+
|
14755 |
+
var formats = _format.split(this.formatSeparator);
|
14756 |
+
|
14757 |
+
var result = formats.reduce(function (mem, f) {
|
14758 |
+
var _parseFormatStr = parseFormatStr(f),
|
14759 |
+
formatName = _parseFormatStr.formatName,
|
14760 |
+
formatOptions = _parseFormatStr.formatOptions;
|
14761 |
+
|
14762 |
+
if (_this.formats[formatName]) {
|
14763 |
+
var formatted = mem;
|
14764 |
+
|
14765 |
+
try {
|
14766 |
+
var valOptions = options && options.formatParams && options.formatParams[options.interpolationkey] || {};
|
14767 |
+
var l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
|
14768 |
+
formatted = _this.formats[formatName](mem, l, _objectSpread$4(_objectSpread$4(_objectSpread$4({}, formatOptions), options), valOptions));
|
14769 |
+
} catch (error) {
|
14770 |
+
_this.logger.warn(error);
|
14771 |
+
}
|
14772 |
+
|
14773 |
+
return formatted;
|
14774 |
+
} else {
|
14775 |
+
_this.logger.warn("there was no format function for ".concat(formatName));
|
14776 |
+
}
|
14777 |
+
|
14778 |
+
return mem;
|
14779 |
+
}, value);
|
14780 |
+
return result;
|
14781 |
+
}
|
14782 |
+
}]);
|
14783 |
+
|
14784 |
+
return Formatter;
|
14785 |
+
}();
|
14786 |
+
|
14787 |
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
14788 |
+
|
14789 |
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
14790 |
+
|
14791 |
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
14792 |
+
|
14793 |
+
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
14794 |
+
|
14795 |
+
function remove(arr, what) {
|
14796 |
+
var found = arr.indexOf(what);
|
14797 |
+
|
14798 |
+
while (found !== -1) {
|
14799 |
+
arr.splice(found, 1);
|
14800 |
+
found = arr.indexOf(what);
|
14801 |
+
}
|
14802 |
+
}
|
14803 |
+
|
14804 |
+
var Connector = function (_EventEmitter) {
|
14805 |
+
_inherits(Connector, _EventEmitter);
|
14806 |
+
|
14807 |
+
var _super = _createSuper$2(Connector);
|
14808 |
+
|
14809 |
+
function Connector(backend, store, services) {
|
14810 |
+
var _this;
|
14811 |
+
|
14812 |
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
14813 |
+
|
14814 |
+
_classCallCheck(this, Connector);
|
14815 |
+
|
14816 |
+
_this = _super.call(this);
|
14817 |
+
|
14818 |
+
if (isIE10) {
|
14819 |
+
EventEmitter.call((0,assertThisInitialized/* default */.Z)(_this));
|
14820 |
+
}
|
14821 |
+
|
14822 |
+
_this.backend = backend;
|
14823 |
+
_this.store = store;
|
14824 |
+
_this.services = services;
|
14825 |
+
_this.languageUtils = services.languageUtils;
|
14826 |
+
_this.options = options;
|
14827 |
+
_this.logger = baseLogger.create('backendConnector');
|
14828 |
+
_this.state = {};
|
14829 |
+
_this.queue = [];
|
14830 |
+
|
14831 |
+
if (_this.backend && _this.backend.init) {
|
14832 |
+
_this.backend.init(services, options.backend, options);
|
14833 |
+
}
|
14834 |
+
|
14835 |
+
return _this;
|
14836 |
+
}
|
14837 |
+
|
14838 |
+
(0,createClass/* default */.Z)(Connector, [{
|
14839 |
+
key: "queueLoad",
|
14840 |
+
value: function queueLoad(languages, namespaces, options, callback) {
|
14841 |
+
var _this2 = this;
|
14842 |
+
|
14843 |
+
var toLoad = [];
|
14844 |
+
var pending = [];
|
14845 |
+
var toLoadLanguages = [];
|
14846 |
+
var toLoadNamespaces = [];
|
14847 |
+
languages.forEach(function (lng) {
|
14848 |
+
var hasAllNamespaces = true;
|
14849 |
+
namespaces.forEach(function (ns) {
|
14850 |
+
var name = "".concat(lng, "|").concat(ns);
|
14851 |
+
|
14852 |
+
if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {
|
14853 |
+
_this2.state[name] = 2;
|
14854 |
+
} else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {
|
14855 |
+
if (pending.indexOf(name) < 0) pending.push(name);
|
14856 |
+
} else {
|
14857 |
+
_this2.state[name] = 1;
|
14858 |
+
hasAllNamespaces = false;
|
14859 |
+
if (pending.indexOf(name) < 0) pending.push(name);
|
14860 |
+
if (toLoad.indexOf(name) < 0) toLoad.push(name);
|
14861 |
+
if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);
|
14862 |
+
}
|
14863 |
+
});
|
14864 |
+
if (!hasAllNamespaces) toLoadLanguages.push(lng);
|
14865 |
+
});
|
14866 |
+
|
14867 |
+
if (toLoad.length || pending.length) {
|
14868 |
+
this.queue.push({
|
14869 |
+
pending: pending,
|
14870 |
+
loaded: {},
|
14871 |
+
errors: [],
|
14872 |
+
callback: callback
|
14873 |
+
});
|
14874 |
+
}
|
14875 |
+
|
14876 |
+
return {
|
14877 |
+
toLoad: toLoad,
|
14878 |
+
pending: pending,
|
14879 |
+
toLoadLanguages: toLoadLanguages,
|
14880 |
+
toLoadNamespaces: toLoadNamespaces
|
14881 |
+
};
|
14882 |
+
}
|
14883 |
+
}, {
|
14884 |
+
key: "loaded",
|
14885 |
+
value: function loaded(name, err, data) {
|
14886 |
+
var s = name.split('|');
|
14887 |
+
var lng = s[0];
|
14888 |
+
var ns = s[1];
|
14889 |
+
if (err) this.emit('failedLoading', lng, ns, err);
|
14890 |
+
|
14891 |
+
if (data) {
|
14892 |
+
this.store.addResourceBundle(lng, ns, data);
|
14893 |
+
}
|
14894 |
+
|
14895 |
+
this.state[name] = err ? -1 : 2;
|
14896 |
+
var loaded = {};
|
14897 |
+
this.queue.forEach(function (q) {
|
14898 |
+
pushPath(q.loaded, [lng], ns);
|
14899 |
+
remove(q.pending, name);
|
14900 |
+
if (err) q.errors.push(err);
|
14901 |
+
|
14902 |
+
if (q.pending.length === 0 && !q.done) {
|
14903 |
+
Object.keys(q.loaded).forEach(function (l) {
|
14904 |
+
if (!loaded[l]) loaded[l] = [];
|
14905 |
+
|
14906 |
+
if (q.loaded[l].length) {
|
14907 |
+
q.loaded[l].forEach(function (ns) {
|
14908 |
+
if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);
|
14909 |
+
});
|
14910 |
+
}
|
14911 |
+
});
|
14912 |
+
q.done = true;
|
14913 |
+
|
14914 |
+
if (q.errors.length) {
|
14915 |
+
q.callback(q.errors);
|
14916 |
+
} else {
|
14917 |
+
q.callback();
|
14918 |
+
}
|
14919 |
+
}
|
14920 |
+
});
|
14921 |
+
this.emit('loaded', loaded);
|
14922 |
+
this.queue = this.queue.filter(function (q) {
|
14923 |
+
return !q.done;
|
14924 |
+
});
|
14925 |
+
}
|
14926 |
+
}, {
|
14927 |
+
key: "read",
|
14928 |
+
value: function read(lng, ns, fcName) {
|
14929 |
+
var _this3 = this;
|
14930 |
+
|
14931 |
+
var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
14932 |
+
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;
|
14933 |
+
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
14934 |
+
if (!lng.length) return callback(null, {});
|
14935 |
+
return this.backend[fcName](lng, ns, function (err, data) {
|
14936 |
+
if (err && data && tried < 5) {
|
14937 |
+
setTimeout(function () {
|
14938 |
+
_this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
|
14939 |
+
}, wait);
|
14940 |
+
return;
|
14941 |
+
}
|
14942 |
+
|
14943 |
+
callback(err, data);
|
14944 |
+
});
|
14945 |
+
}
|
14946 |
+
}, {
|
14947 |
+
key: "prepareLoading",
|
14948 |
+
value: function prepareLoading(languages, namespaces) {
|
14949 |
+
var _this4 = this;
|
14950 |
+
|
14951 |
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
14952 |
+
var callback = arguments.length > 3 ? arguments[3] : undefined;
|
14953 |
+
|
14954 |
+
if (!this.backend) {
|
14955 |
+
this.logger.warn('No backend was added via i18next.use. Will not load resources.');
|
14956 |
+
return callback && callback();
|
14957 |
+
}
|
14958 |
+
|
14959 |
+
if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);
|
14960 |
+
if (typeof namespaces === 'string') namespaces = [namespaces];
|
14961 |
+
var toLoad = this.queueLoad(languages, namespaces, options, callback);
|
14962 |
+
|
14963 |
+
if (!toLoad.toLoad.length) {
|
14964 |
+
if (!toLoad.pending.length) callback();
|
14965 |
+
return null;
|
14966 |
+
}
|
14967 |
+
|
14968 |
+
toLoad.toLoad.forEach(function (name) {
|
14969 |
+
_this4.loadOne(name);
|
14970 |
+
});
|
14971 |
+
}
|
14972 |
+
}, {
|
14973 |
+
key: "load",
|
14974 |
+
value: function load(languages, namespaces, callback) {
|
14975 |
+
this.prepareLoading(languages, namespaces, {}, callback);
|
14976 |
+
}
|
14977 |
+
}, {
|
14978 |
+
key: "reload",
|
14979 |
+
value: function reload(languages, namespaces, callback) {
|
14980 |
+
this.prepareLoading(languages, namespaces, {
|
14981 |
+
reload: true
|
14982 |
+
}, callback);
|
14983 |
+
}
|
14984 |
+
}, {
|
14985 |
+
key: "loadOne",
|
14986 |
+
value: function loadOne(name) {
|
14987 |
+
var _this5 = this;
|
14988 |
+
|
14989 |
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
14990 |
+
var s = name.split('|');
|
14991 |
+
var lng = s[0];
|
14992 |
+
var ns = s[1];
|
14993 |
+
this.read(lng, ns, 'read', undefined, undefined, function (err, data) {
|
14994 |
+
if (err) _this5.logger.warn("".concat(prefix, "loading namespace ").concat(ns, " for language ").concat(lng, " failed"), err);
|
14995 |
+
if (!err && data) _this5.logger.log("".concat(prefix, "loaded namespace ").concat(ns, " for language ").concat(lng), data);
|
14996 |
+
|
14997 |
+
_this5.loaded(name, err, data);
|
14998 |
+
});
|
14999 |
+
}
|
15000 |
+
}, {
|
15001 |
+
key: "saveMissing",
|
15002 |
+
value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {
|
15003 |
+
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
15004 |
+
|
15005 |
+
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
|
15006 |
+
this.logger.warn("did not save key \"".concat(key, "\" as the namespace \"").concat(namespace, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
|
15007 |
+
return;
|
15008 |
+
}
|
15009 |
+
|
15010 |
+
if (key === undefined || key === null || key === '') return;
|
15011 |
+
|
15012 |
+
if (this.backend && this.backend.create) {
|
15013 |
+
this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread$5(_objectSpread$5({}, options), {}, {
|
15014 |
+
isUpdate: isUpdate
|
15015 |
+
}));
|
15016 |
+
}
|
15017 |
+
|
15018 |
+
if (!languages || !languages[0]) return;
|
15019 |
+
this.store.addResource(languages[0], namespace, key, fallbackValue);
|
15020 |
+
}
|
15021 |
+
}]);
|
15022 |
+
|
15023 |
+
return Connector;
|
15024 |
+
}(EventEmitter);
|
15025 |
+
|
15026 |
+
function get() {
|
15027 |
+
return {
|
15028 |
+
debug: false,
|
15029 |
+
initImmediate: true,
|
15030 |
+
ns: ['translation'],
|
15031 |
+
defaultNS: ['translation'],
|
15032 |
+
fallbackLng: ['dev'],
|
15033 |
+
fallbackNS: false,
|
15034 |
+
supportedLngs: false,
|
15035 |
+
nonExplicitSupportedLngs: false,
|
15036 |
+
load: 'all',
|
15037 |
+
preload: false,
|
15038 |
+
simplifyPluralSuffix: true,
|
15039 |
+
keySeparator: '.',
|
15040 |
+
nsSeparator: ':',
|
15041 |
+
pluralSeparator: '_',
|
15042 |
+
contextSeparator: '_',
|
15043 |
+
partialBundledLanguages: false,
|
15044 |
+
saveMissing: false,
|
15045 |
+
updateMissing: false,
|
15046 |
+
saveMissingTo: 'fallback',
|
15047 |
+
saveMissingPlurals: true,
|
15048 |
+
missingKeyHandler: false,
|
15049 |
+
missingInterpolationHandler: false,
|
15050 |
+
postProcess: false,
|
15051 |
+
postProcessPassResolved: false,
|
15052 |
+
returnNull: true,
|
15053 |
+
returnEmptyString: true,
|
15054 |
+
returnObjects: false,
|
15055 |
+
joinArrays: false,
|
15056 |
+
returnedObjectHandler: false,
|
15057 |
+
parseMissingKeyHandler: false,
|
15058 |
+
appendNamespaceToMissingKey: false,
|
15059 |
+
appendNamespaceToCIMode: false,
|
15060 |
+
overloadTranslationOptionHandler: function handle(args) {
|
15061 |
+
var ret = {};
|
15062 |
+
if ((0,esm_typeof/* default */.Z)(args[1]) === 'object') ret = args[1];
|
15063 |
+
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
15064 |
+
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
15065 |
+
|
15066 |
+
if ((0,esm_typeof/* default */.Z)(args[2]) === 'object' || (0,esm_typeof/* default */.Z)(args[3]) === 'object') {
|
15067 |
+
var options = args[3] || args[2];
|
15068 |
+
Object.keys(options).forEach(function (key) {
|
15069 |
+
ret[key] = options[key];
|
15070 |
+
});
|
15071 |
+
}
|
15072 |
+
|
15073 |
+
return ret;
|
15074 |
+
},
|
15075 |
+
interpolation: {
|
15076 |
+
escapeValue: true,
|
15077 |
+
format: function format(value, _format, lng, options) {
|
15078 |
+
return value;
|
15079 |
+
},
|
15080 |
+
prefix: '{{',
|
15081 |
+
suffix: '}}',
|
15082 |
+
formatSeparator: ',',
|
15083 |
+
unescapePrefix: '-',
|
15084 |
+
nestingPrefix: '$t(',
|
15085 |
+
nestingSuffix: ')',
|
15086 |
+
nestingOptionsSeparator: ',',
|
15087 |
+
maxReplaces: 1000,
|
15088 |
+
skipOnVariables: true
|
15089 |
+
}
|
15090 |
+
};
|
15091 |
+
}
|
15092 |
+
function transformOptions(options) {
|
15093 |
+
if (typeof options.ns === 'string') options.ns = [options.ns];
|
15094 |
+
if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
|
15095 |
+
if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
|
15096 |
+
|
15097 |
+
if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {
|
15098 |
+
options.supportedLngs = options.supportedLngs.concat(['cimode']);
|
15099 |
+
}
|
15100 |
+
|
15101 |
+
return options;
|
15102 |
}
|
15103 |
+
|
15104 |
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
15105 |
+
|
15106 |
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
15107 |
+
|
15108 |
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
15109 |
+
|
15110 |
+
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
15111 |
+
|
15112 |
+
function noop() {}
|
15113 |
+
|
15114 |
+
function bindMemberFunctions(inst) {
|
15115 |
+
var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
|
15116 |
+
mems.forEach(function (mem) {
|
15117 |
+
if (typeof inst[mem] === 'function') {
|
15118 |
+
inst[mem] = inst[mem].bind(inst);
|
15119 |
}
|
15120 |
+
});
|
15121 |
+
}
|
15122 |
+
|
15123 |
+
var I18n = function (_EventEmitter) {
|
15124 |
+
_inherits(I18n, _EventEmitter);
|
15125 |
+
|
15126 |
+
var _super = _createSuper$3(I18n);
|
15127 |
+
|
15128 |
+
function I18n() {
|
15129 |
+
var _this;
|
15130 |
+
|
15131 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15132 |
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
15133 |
+
|
15134 |
+
_classCallCheck(this, I18n);
|
15135 |
+
|
15136 |
+
_this = _super.call(this);
|
15137 |
+
|
15138 |
+
if (isIE10) {
|
15139 |
+
EventEmitter.call((0,assertThisInitialized/* default */.Z)(_this));
|
15140 |
}
|
15141 |
+
|
15142 |
+
_this.options = transformOptions(options);
|
15143 |
+
_this.services = {};
|
15144 |
+
_this.logger = baseLogger;
|
15145 |
+
_this.modules = {
|
15146 |
+
external: []
|
15147 |
+
};
|
15148 |
+
bindMemberFunctions((0,assertThisInitialized/* default */.Z)(_this));
|
15149 |
+
|
15150 |
+
if (callback && !_this.isInitialized && !options.isClone) {
|
15151 |
+
if (!_this.options.initImmediate) {
|
15152 |
+
_this.init(options, callback);
|
15153 |
+
|
15154 |
+
return _possibleConstructorReturn(_this, (0,assertThisInitialized/* default */.Z)(_this));
|
15155 |
+
}
|
15156 |
+
|
15157 |
+
setTimeout(function () {
|
15158 |
+
_this.init(options, callback);
|
15159 |
+
}, 0);
|
15160 |
}
|
15161 |
+
|
15162 |
+
return _this;
|
15163 |
+
}
|
15164 |
+
|
15165 |
+
(0,createClass/* default */.Z)(I18n, [{
|
15166 |
+
key: "init",
|
15167 |
+
value: function init() {
|
15168 |
+
var _this2 = this;
|
15169 |
+
|
15170 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15171 |
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
15172 |
+
|
15173 |
+
if (typeof options === 'function') {
|
15174 |
+
callback = options;
|
15175 |
+
options = {};
|
15176 |
+
}
|
15177 |
+
|
15178 |
+
if (!options.defaultNS && options.ns) {
|
15179 |
+
if (typeof options.ns === 'string') {
|
15180 |
+
options.defaultNS = options.ns;
|
15181 |
+
} else if (options.ns.indexOf('translation') < 0) {
|
15182 |
+
options.defaultNS = options.ns[0];
|
15183 |
}
|
15184 |
+
}
|
15185 |
+
|
15186 |
+
var defOpts = get();
|
15187 |
+
this.options = _objectSpread$6(_objectSpread$6(_objectSpread$6({}, defOpts), this.options), transformOptions(options));
|
15188 |
+
|
15189 |
+
if (this.options.compatibilityAPI !== 'v1') {
|
15190 |
+
this.options.interpolation = _objectSpread$6(_objectSpread$6({}, defOpts.interpolation), this.options.interpolation);
|
15191 |
+
}
|
15192 |
+
|
15193 |
+
if (options.keySeparator !== undefined) {
|
15194 |
+
this.options.userDefinedKeySeparator = options.keySeparator;
|
15195 |
+
}
|
15196 |
+
|
15197 |
+
if (options.nsSeparator !== undefined) {
|
15198 |
+
this.options.userDefinedNsSeparator = options.nsSeparator;
|
15199 |
+
}
|
15200 |
+
|
15201 |
+
function createClassOnDemand(ClassOrObject) {
|
15202 |
+
if (!ClassOrObject) return null;
|
15203 |
+
if (typeof ClassOrObject === 'function') return new ClassOrObject();
|
15204 |
+
return ClassOrObject;
|
15205 |
+
}
|
15206 |
+
|
15207 |
+
if (!this.options.isClone) {
|
15208 |
+
if (this.modules.logger) {
|
15209 |
+
baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
|
15210 |
+
} else {
|
15211 |
+
baseLogger.init(null, this.options);
|
15212 |
}
|
15213 |
+
|
15214 |
+
var formatter;
|
15215 |
+
|
15216 |
+
if (this.modules.formatter) {
|
15217 |
+
formatter = this.modules.formatter;
|
15218 |
+
} else if (typeof Intl !== 'undefined') {
|
15219 |
+
formatter = Formatter;
|
15220 |
}
|
15221 |
+
|
15222 |
+
var lu = new LanguageUtil(this.options);
|
15223 |
+
this.store = new ResourceStore(this.options.resources, this.options);
|
15224 |
+
var s = this.services;
|
15225 |
+
s.logger = baseLogger;
|
15226 |
+
s.resourceStore = this.store;
|
15227 |
+
s.languageUtils = lu;
|
15228 |
+
s.pluralResolver = new PluralResolver(lu, {
|
15229 |
+
prepend: this.options.pluralSeparator,
|
15230 |
+
compatibilityJSON: this.options.compatibilityJSON,
|
15231 |
+
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
15232 |
+
});
|
15233 |
+
|
15234 |
+
if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
|
15235 |
+
s.formatter = createClassOnDemand(formatter);
|
15236 |
+
s.formatter.init(s, this.options);
|
15237 |
+
this.options.interpolation.format = s.formatter.format.bind(s.formatter);
|
15238 |
}
|
15239 |
+
|
15240 |
+
s.interpolator = new Interpolator(this.options);
|
15241 |
+
s.utils = {
|
15242 |
+
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
15243 |
+
};
|
15244 |
+
s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
|
15245 |
+
s.backendConnector.on('*', function (event) {
|
15246 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
15247 |
+
args[_key - 1] = arguments[_key];
|
15248 |
+
}
|
15249 |
+
|
15250 |
+
_this2.emit.apply(_this2, [event].concat(args));
|
15251 |
+
});
|
15252 |
+
|
15253 |
+
if (this.modules.languageDetector) {
|
15254 |
+
s.languageDetector = createClassOnDemand(this.modules.languageDetector);
|
15255 |
+
s.languageDetector.init(s, this.options.detection, this.options);
|
15256 |
}
|
|
|
|
|
|
|
15257 |
|
15258 |
+
if (this.modules.i18nFormat) {
|
15259 |
+
s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
|
15260 |
+
if (s.i18nFormat.init) s.i18nFormat.init(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15262 |
|
15263 |
+
this.translator = new Translator(this.services, this.options);
|
15264 |
+
this.translator.on('*', function (event) {
|
15265 |
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
15266 |
+
args[_key2 - 1] = arguments[_key2];
|
15267 |
+
}
|
15268 |
+
|
15269 |
+
_this2.emit.apply(_this2, [event].concat(args));
|
15270 |
+
});
|
15271 |
+
this.modules.external.forEach(function (m) {
|
15272 |
+
if (m.init) m.init(_this2);
|
15273 |
+
});
|
15274 |
+
}
|
15275 |
+
|
15276 |
+
this.format = this.options.interpolation.format;
|
15277 |
+
if (!callback) callback = noop;
|
15278 |
+
|
15279 |
+
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
15280 |
+
var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
15281 |
+
if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
|
15282 |
+
}
|
15283 |
+
|
15284 |
+
if (!this.services.languageDetector && !this.options.lng) {
|
15285 |
+
this.logger.warn('init: no languageDetector is used and no lng is defined');
|
15286 |
+
}
|
15287 |
+
|
15288 |
+
var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
|
15289 |
+
storeApi.forEach(function (fcName) {
|
15290 |
+
_this2[fcName] = function () {
|
15291 |
+
var _this2$store;
|
15292 |
+
|
15293 |
+
return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);
|
15294 |
+
};
|
15295 |
+
});
|
15296 |
+
var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
|
15297 |
+
storeApiChained.forEach(function (fcName) {
|
15298 |
+
_this2[fcName] = function () {
|
15299 |
+
var _this2$store2;
|
15300 |
+
|
15301 |
+
(_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);
|
15302 |
+
|
15303 |
+
return _this2;
|
15304 |
+
};
|
15305 |
+
});
|
15306 |
+
var deferred = defer();
|
15307 |
+
|
15308 |
+
var load = function load() {
|
15309 |
+
var finish = function finish(err, t) {
|
15310 |
+
if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');
|
15311 |
+
_this2.isInitialized = true;
|
15312 |
+
if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);
|
15313 |
+
|
15314 |
+
_this2.emit('initialized', _this2.options);
|
15315 |
+
|
15316 |
+
deferred.resolve(t);
|
15317 |
+
callback(err, t);
|
15318 |
+
};
|
15319 |
+
|
15320 |
+
if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));
|
15321 |
+
|
15322 |
+
_this2.changeLanguage(_this2.options.lng, finish);
|
15323 |
+
};
|
15324 |
+
|
15325 |
+
if (this.options.resources || !this.options.initImmediate) {
|
15326 |
+
load();
|
15327 |
+
} else {
|
15328 |
+
setTimeout(load, 0);
|
15329 |
+
}
|
15330 |
+
|
15331 |
+
return deferred;
|
15332 |
}
|
15333 |
+
}, {
|
15334 |
+
key: "loadResources",
|
15335 |
+
value: function loadResources(language) {
|
15336 |
+
var _this3 = this;
|
15337 |
+
|
15338 |
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
15339 |
+
var usedCallback = callback;
|
15340 |
+
var usedLng = typeof language === 'string' ? language : this.language;
|
15341 |
+
if (typeof language === 'function') usedCallback = language;
|
15342 |
+
|
15343 |
+
if (!this.options.resources || this.options.partialBundledLanguages) {
|
15344 |
+
if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();
|
15345 |
+
var toLoad = [];
|
15346 |
+
|
15347 |
+
var append = function append(lng) {
|
15348 |
+
if (!lng) return;
|
15349 |
+
|
15350 |
+
var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);
|
15351 |
+
|
15352 |
+
lngs.forEach(function (l) {
|
15353 |
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
15354 |
+
});
|
15355 |
+
};
|
15356 |
+
|
15357 |
+
if (!usedLng) {
|
15358 |
+
var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
15359 |
+
fallbacks.forEach(function (l) {
|
15360 |
+
return append(l);
|
15361 |
+
});
|
15362 |
+
} else {
|
15363 |
+
append(usedLng);
|
15364 |
}
|
15365 |
+
|
15366 |
+
if (this.options.preload) {
|
15367 |
+
this.options.preload.forEach(function (l) {
|
15368 |
+
return append(l);
|
15369 |
+
});
|
15370 |
}
|
15371 |
+
|
15372 |
+
this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);
|
15373 |
+
} else {
|
15374 |
+
usedCallback(null);
|
15375 |
+
}
|
15376 |
}
|
15377 |
+
}, {
|
15378 |
+
key: "reloadResources",
|
15379 |
+
value: function reloadResources(lngs, ns, callback) {
|
15380 |
+
var deferred = defer();
|
15381 |
+
if (!lngs) lngs = this.languages;
|
15382 |
+
if (!ns) ns = this.options.ns;
|
15383 |
+
if (!callback) callback = noop;
|
15384 |
+
this.services.backendConnector.reload(lngs, ns, function (err) {
|
15385 |
+
deferred.resolve();
|
15386 |
+
callback(err);
|
15387 |
+
});
|
15388 |
+
return deferred;
|
|
|
15389 |
}
|
15390 |
+
}, {
|
15391 |
+
key: "use",
|
15392 |
+
value: function use(module) {
|
15393 |
+
if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
|
15394 |
+
if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
|
15395 |
+
|
15396 |
+
if (module.type === 'backend') {
|
15397 |
+
this.modules.backend = module;
|
15398 |
+
}
|
15399 |
+
|
15400 |
+
if (module.type === 'logger' || module.log && module.warn && module.error) {
|
15401 |
+
this.modules.logger = module;
|
15402 |
+
}
|
15403 |
+
|
15404 |
+
if (module.type === 'languageDetector') {
|
15405 |
+
this.modules.languageDetector = module;
|
15406 |
+
}
|
15407 |
+
|
15408 |
+
if (module.type === 'i18nFormat') {
|
15409 |
+
this.modules.i18nFormat = module;
|
15410 |
+
}
|
15411 |
+
|
15412 |
+
if (module.type === 'postProcessor') {
|
15413 |
+
postProcessor.addPostProcessor(module);
|
15414 |
+
}
|
15415 |
+
|
15416 |
+
if (module.type === 'formatter') {
|
15417 |
+
this.modules.formatter = module;
|
15418 |
+
}
|
15419 |
+
|
15420 |
+
if (module.type === '3rdParty') {
|
15421 |
+
this.modules.external.push(module);
|
15422 |
+
}
|
15423 |
+
|
15424 |
+
return this;
|
15425 |
}
|
15426 |
+
}, {
|
15427 |
+
key: "changeLanguage",
|
15428 |
+
value: function changeLanguage(lng, callback) {
|
15429 |
+
var _this4 = this;
|
15430 |
+
|
15431 |
+
this.isLanguageChangingTo = lng;
|
15432 |
+
var deferred = defer();
|
15433 |
+
this.emit('languageChanging', lng);
|
15434 |
+
|
15435 |
+
var setLngProps = function setLngProps(l) {
|
15436 |
+
_this4.language = l;
|
15437 |
+
_this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
|
15438 |
+
_this4.resolvedLanguage = undefined;
|
15439 |
+
if (['cimode', 'dev'].indexOf(l) > -1) return;
|
15440 |
+
|
15441 |
+
for (var li = 0; li < _this4.languages.length; li++) {
|
15442 |
+
var lngInLngs = _this4.languages[li];
|
15443 |
+
if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;
|
15444 |
+
|
15445 |
+
if (_this4.store.hasLanguageSomeTranslations(lngInLngs)) {
|
15446 |
+
_this4.resolvedLanguage = lngInLngs;
|
15447 |
+
break;
|
15448 |
+
}
|
15449 |
+
}
|
15450 |
+
};
|
15451 |
+
|
15452 |
+
var done = function done(err, l) {
|
15453 |
+
if (l) {
|
15454 |
+
setLngProps(l);
|
15455 |
+
|
15456 |
+
_this4.translator.changeLanguage(l);
|
15457 |
+
|
15458 |
+
_this4.isLanguageChangingTo = undefined;
|
15459 |
+
|
15460 |
+
_this4.emit('languageChanged', l);
|
15461 |
+
|
15462 |
+
_this4.logger.log('languageChanged', l);
|
15463 |
+
} else {
|
15464 |
+
_this4.isLanguageChangingTo = undefined;
|
15465 |
+
}
|
15466 |
+
|
15467 |
+
deferred.resolve(function () {
|
15468 |
+
return _this4.t.apply(_this4, arguments);
|
15469 |
+
});
|
15470 |
+
if (callback) callback(err, function () {
|
15471 |
+
return _this4.t.apply(_this4, arguments);
|
15472 |
+
});
|
15473 |
+
};
|
15474 |
+
|
15475 |
+
var setLng = function setLng(lngs) {
|
15476 |
+
if (!lng && !lngs && _this4.services.languageDetector) lngs = [];
|
15477 |
+
var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);
|
15478 |
+
|
15479 |
+
if (l) {
|
15480 |
+
if (!_this4.language) {
|
15481 |
+
setLngProps(l);
|
15482 |
+
}
|
15483 |
|
15484 |
+
if (!_this4.translator.language) _this4.translator.changeLanguage(l);
|
15485 |
+
if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);
|
15486 |
+
}
|
15487 |
|
15488 |
+
_this4.loadResources(l, function (err) {
|
15489 |
+
done(err, l);
|
15490 |
+
});
|
15491 |
+
};
|
15492 |
|
15493 |
+
if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
|
15494 |
+
setLng(this.services.languageDetector.detect());
|
15495 |
+
} else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
|
15496 |
+
this.services.languageDetector.detect(setLng);
|
15497 |
+
} else {
|
15498 |
+
setLng(lng);
|
15499 |
+
}
|
15500 |
|
15501 |
+
return deferred;
|
15502 |
+
}
|
15503 |
+
}, {
|
15504 |
+
key: "getFixedT",
|
15505 |
+
value: function getFixedT(lng, ns, keyPrefix) {
|
15506 |
+
var _this5 = this;
|
15507 |
|
15508 |
+
var fixedT = function fixedT(key, opts) {
|
15509 |
+
var options;
|
15510 |
|
15511 |
+
if ((0,esm_typeof/* default */.Z)(opts) !== 'object') {
|
15512 |
+
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
15513 |
+
rest[_key3 - 2] = arguments[_key3];
|
15514 |
+
}
|
15515 |
+
|
15516 |
+
options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));
|
15517 |
+
} else {
|
15518 |
+
options = _objectSpread$6({}, opts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15519 |
}
|
15520 |
+
|
15521 |
+
options.lng = options.lng || fixedT.lng;
|
15522 |
+
options.lngs = options.lngs || fixedT.lngs;
|
15523 |
+
options.ns = options.ns || fixedT.ns;
|
15524 |
+
var keySeparator = _this5.options.keySeparator || '.';
|
15525 |
+
var resultKey = keyPrefix ? "".concat(keyPrefix).concat(keySeparator).concat(key) : key;
|
15526 |
+
return _this5.t(resultKey, options);
|
15527 |
+
};
|
15528 |
+
|
15529 |
+
if (typeof lng === 'string') {
|
15530 |
+
fixedT.lng = lng;
|
15531 |
+
} else {
|
15532 |
+
fixedT.lngs = lng;
|
15533 |
+
}
|
15534 |
+
|
15535 |
+
fixedT.ns = ns;
|
15536 |
+
fixedT.keyPrefix = keyPrefix;
|
15537 |
+
return fixedT;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15538 |
}
|
15539 |
+
}, {
|
15540 |
+
key: "t",
|
15541 |
+
value: function t() {
|
15542 |
+
var _this$translator;
|
15543 |
+
|
15544 |
+
return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);
|
|
|
15545 |
}
|
15546 |
+
}, {
|
15547 |
+
key: "exists",
|
15548 |
+
value: function exists() {
|
15549 |
+
var _this$translator2;
|
15550 |
+
|
15551 |
+
return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);
|
|
|
|
|
15552 |
}
|
15553 |
+
}, {
|
15554 |
+
key: "setDefaultNamespace",
|
15555 |
+
value: function setDefaultNamespace(ns) {
|
15556 |
+
this.options.defaultNS = ns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15557 |
}
|
15558 |
+
}, {
|
15559 |
+
key: "hasLoadedNamespace",
|
15560 |
+
value: function hasLoadedNamespace(ns) {
|
15561 |
+
var _this6 = this;
|
15562 |
+
|
15563 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
15564 |
+
|
15565 |
+
if (!this.isInitialized) {
|
15566 |
+
this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
|
15567 |
+
return false;
|
15568 |
+
}
|
15569 |
+
|
15570 |
+
if (!this.languages || !this.languages.length) {
|
15571 |
+
this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
|
15572 |
+
return false;
|
15573 |
+
}
|
15574 |
+
|
15575 |
+
var lng = this.resolvedLanguage || this.languages[0];
|
15576 |
+
var fallbackLng = this.options ? this.options.fallbackLng : false;
|
15577 |
+
var lastLng = this.languages[this.languages.length - 1];
|
15578 |
+
if (lng.toLowerCase() === 'cimode') return true;
|
15579 |
+
|
15580 |
+
var loadNotPending = function loadNotPending(l, n) {
|
15581 |
+
var loadState = _this6.services.backendConnector.state["".concat(l, "|").concat(n)];
|
15582 |
+
|
15583 |
+
return loadState === -1 || loadState === 2;
|
15584 |
+
};
|
15585 |
+
|
15586 |
+
if (options.precheck) {
|
15587 |
+
var preResult = options.precheck(this, loadNotPending);
|
15588 |
+
if (preResult !== undefined) return preResult;
|
15589 |
+
}
|
15590 |
+
|
15591 |
+
if (this.hasResourceBundle(lng, ns)) return true;
|
15592 |
+
if (!this.services.backendConnector.backend) return true;
|
15593 |
+
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
15594 |
+
return false;
|
15595 |
}
|
15596 |
+
}, {
|
15597 |
+
key: "loadNamespaces",
|
15598 |
+
value: function loadNamespaces(ns, callback) {
|
15599 |
+
var _this7 = this;
|
15600 |
+
|
15601 |
+
var deferred = defer();
|
15602 |
+
|
15603 |
+
if (!this.options.ns) {
|
15604 |
+
callback && callback();
|
15605 |
+
return Promise.resolve();
|
15606 |
+
}
|
15607 |
+
|
15608 |
+
if (typeof ns === 'string') ns = [ns];
|
15609 |
+
ns.forEach(function (n) {
|
15610 |
+
if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);
|
15611 |
+
});
|
15612 |
+
this.loadResources(function (err) {
|
15613 |
+
deferred.resolve();
|
15614 |
+
if (callback) callback(err);
|
15615 |
+
});
|
15616 |
+
return deferred;
|
15617 |
}
|
15618 |
+
}, {
|
15619 |
+
key: "loadLanguages",
|
15620 |
+
value: function loadLanguages(lngs, callback) {
|
15621 |
+
var deferred = defer();
|
15622 |
+
if (typeof lngs === 'string') lngs = [lngs];
|
15623 |
+
var preloaded = this.options.preload || [];
|
15624 |
+
var newLngs = lngs.filter(function (lng) {
|
15625 |
+
return preloaded.indexOf(lng) < 0;
|
15626 |
+
});
|
15627 |
+
|
15628 |
+
if (!newLngs.length) {
|
15629 |
+
if (callback) callback();
|
15630 |
+
return Promise.resolve();
|
15631 |
+
}
|
15632 |
+
|
15633 |
+
this.options.preload = preloaded.concat(newLngs);
|
15634 |
+
this.loadResources(function (err) {
|
15635 |
+
deferred.resolve();
|
15636 |
+
if (callback) callback(err);
|
15637 |
+
});
|
15638 |
+
return deferred;
|
15639 |
}
|
15640 |
+
}, {
|
15641 |
+
key: "dir",
|
15642 |
+
value: function dir(lng) {
|
15643 |
+
if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);
|
15644 |
+
if (!lng) return 'rtl';
|
15645 |
+
var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
|
15646 |
+
return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
|
|
|
|
|
15647 |
}
|
15648 |
+
}, {
|
15649 |
+
key: "cloneInstance",
|
15650 |
+
value: function cloneInstance() {
|
15651 |
+
var _this8 = this;
|
15652 |
+
|
15653 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15654 |
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
15655 |
+
|
15656 |
+
var mergedOptions = _objectSpread$6(_objectSpread$6(_objectSpread$6({}, this.options), options), {
|
15657 |
+
isClone: true
|
15658 |
+
});
|
15659 |
+
|
15660 |
+
var clone = new I18n(mergedOptions);
|
15661 |
+
var membersToCopy = ['store', 'services', 'language'];
|
15662 |
+
membersToCopy.forEach(function (m) {
|
15663 |
+
clone[m] = _this8[m];
|
15664 |
+
});
|
15665 |
+
clone.services = _objectSpread$6({}, this.services);
|
15666 |
+
clone.services.utils = {
|
15667 |
+
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
15668 |
+
};
|
15669 |
+
clone.translator = new Translator(clone.services, clone.options);
|
15670 |
+
clone.translator.on('*', function (event) {
|
15671 |
+
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
15672 |
+
args[_key4 - 1] = arguments[_key4];
|
15673 |
}
|
15674 |
+
|
15675 |
+
clone.emit.apply(clone, [event].concat(args));
|
15676 |
+
});
|
15677 |
+
clone.init(mergedOptions, callback);
|
15678 |
+
clone.translator.options = clone.options;
|
15679 |
+
clone.translator.backendConnector.services.utils = {
|
15680 |
+
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
15681 |
+
};
|
15682 |
+
return clone;
|
15683 |
}
|
15684 |
+
}, {
|
15685 |
+
key: "toJSON",
|
15686 |
+
value: function toJSON() {
|
15687 |
+
return {
|
15688 |
+
options: this.options,
|
15689 |
+
store: this.store,
|
15690 |
+
language: this.language,
|
15691 |
+
languages: this.languages,
|
15692 |
+
resolvedLanguage: this.resolvedLanguage
|
15693 |
+
};
|
15694 |
}
|
15695 |
+
}]);
|
15696 |
+
|
15697 |
+
return I18n;
|
15698 |
+
}(EventEmitter);
|
15699 |
+
|
15700 |
+
(0,defineProperty/* default */.Z)(I18n, "createInstance", function () {
|
15701 |
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
15702 |
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
15703 |
+
return new I18n(options, callback);
|
15704 |
+
});
|
15705 |
+
|
15706 |
+
var instance = I18n.createInstance();
|
15707 |
+
instance.createInstance = I18n.createInstance;
|
15708 |
+
|
15709 |
+
var createInstance = instance.createInstance;
|
15710 |
+
var init = instance.init;
|
15711 |
+
var loadResources = instance.loadResources;
|
15712 |
+
var reloadResources = instance.reloadResources;
|
15713 |
+
var use = instance.use;
|
15714 |
+
var changeLanguage = instance.changeLanguage;
|
15715 |
+
var getFixedT = instance.getFixedT;
|
15716 |
+
var t = instance.t;
|
15717 |
+
var exists = instance.exists;
|
15718 |
+
var setDefaultNamespace = instance.setDefaultNamespace;
|
15719 |
+
var hasLoadedNamespace = instance.hasLoadedNamespace;
|
15720 |
+
var loadNamespaces = instance.loadNamespaces;
|
15721 |
+
var loadLanguages = instance.loadLanguages;
|
15722 |
+
|
15723 |
+
/* harmony default export */ var i18next = (instance);
|
15724 |
+
|
15725 |
+
|
15726 |
+
;// CONCATENATED MODULE: ./src/js/utils/translate.js
|
15727 |
+
|
15728 |
+
function translate_translate(key) {
|
15729 |
+
var objects = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
15730 |
+
return i18next.t(key, objects);
|
15731 |
}
|
15732 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/store/helpers.js
|
15733 |
+
function helpers_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
15734 |
+
|
15735 |
+
function helpers_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { helpers_ownKeys(Object(source), true).forEach(function (key) { helpers_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { helpers_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
15736 |
+
|
15737 |
+
function helpers_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15738 |
+
|
15739 |
+
|
15740 |
+
|
15741 |
|
15742 |
|
15743 |
+
|
15744 |
+
var previousFailedRequest = {
|
15745 |
+
resolve: null,
|
15746 |
+
endpoint: null,
|
15747 |
+
data: null
|
15748 |
+
};
|
15749 |
/**
|
15750 |
+
* Create api request
|
15751 |
+
*maar j
|
15752 |
+
* @param {*} endpoint
|
15753 |
+
* @param {*} data
|
15754 |
*/
|
15755 |
+
|
15756 |
+
function apiRequest(endpoint, data) {
|
15757 |
+
var failedEarlier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
15758 |
+
var forceReturnReject = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
15759 |
+
data.url = buttonizer_admin.api + endpoint; // Stand alone version
|
15760 |
+
|
15761 |
+
if (buttonizer_admin.is_stand_alone) {
|
15762 |
+
data.withCredentials = true;
|
15763 |
+
data.headers = {
|
15764 |
+
Authorization: "Bearer ".concat(buttonizer_admin.auth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15765 |
};
|
15766 |
+
} // WordPress version
|
15767 |
+
else {
|
15768 |
+
data.headers = {
|
15769 |
+
"X-WP-Nonce": buttonizer_admin.nonce
|
15770 |
+
};
|
15771 |
+
} // With credentials
|
15772 |
+
|
15773 |
+
|
15774 |
+
data.withCredentials = true;
|
15775 |
+
return new Promise(function (resolve, reject) {
|
15776 |
+
axios_default()(data).then(function (data) {
|
15777 |
+
return resolve(data);
|
15778 |
+
})["catch"](function (err) {
|
15779 |
+
// User unauthenticated
|
15780 |
+
if (!failedEarlier && err.response && err.response.status === 401) {
|
15781 |
+
if (app.standAloneEvent) {
|
15782 |
+
app.standAloneEvent("unauthenticated");
|
15783 |
+
} // Not authenticated, but return a reject
|
15784 |
+
// Also, do not continue and re-use this request to resolve
|
15785 |
+
|
15786 |
+
|
15787 |
+
if (forceReturnReject) {
|
15788 |
+
reject("wait-for-auth");
|
15789 |
+
return;
|
15790 |
+
} // Populate failed request
|
15791 |
+
// Re-use this data after re-authorization
|
15792 |
|
|
|
|
|
15793 |
|
15794 |
+
previousFailedRequest = {
|
15795 |
+
resolve: resolve,
|
15796 |
+
endpoint: endpoint,
|
15797 |
+
data: data
|
15798 |
+
};
|
15799 |
+
return;
|
15800 |
+
}
|
15801 |
|
15802 |
+
if (app.standAloneEvent) {
|
15803 |
+
app.standAloneEvent("unauthenticated");
|
15804 |
+
}
|
15805 |
|
15806 |
+
reject(err);
|
15807 |
+
});
|
15808 |
+
});
|
15809 |
+
}
|
15810 |
+
function retryApiRequest() {
|
15811 |
+
// Data empty
|
15812 |
+
if (!previousFailedRequest.resolve) {
|
15813 |
+
throw new Error(previousFailedRequest);
|
15814 |
+
}
|
15815 |
|
15816 |
+
return new Promise(function (resolve, reject) {
|
15817 |
+
apiRequest(previousFailedRequest.endpoint, previousFailedRequest.data, false, true).then(function (data) {
|
15818 |
+
previousFailedRequest.resolve(data);
|
15819 |
+
resolve();
|
15820 |
+
})["catch"](function (e) {
|
15821 |
+
return reject(e);
|
15822 |
+
});
|
15823 |
+
});
|
15824 |
+
}
|
15825 |
/**
|
15826 |
+
* init store
|
|
|
|
|
|
|
|
|
|
|
15827 |
*/
|
15828 |
+
|
15829 |
+
function helpers_init() {
|
15830 |
+
return {
|
15831 |
+
type: actionTypes.INIT,
|
15832 |
+
payload: {
|
15833 |
+
buttons: {},
|
15834 |
+
groups: {},
|
15835 |
+
timeSchedules: {},
|
15836 |
+
pageRules: {},
|
15837 |
+
settings: {}
|
15838 |
+
}
|
15839 |
+
};
|
15840 |
+
}
|
15841 |
/**
|
15842 |
+
* Convert data to models
|
15843 |
+
*
|
15844 |
+
* @param result
|
15845 |
+
* @return {obj} converted data
|
15846 |
*/
|
15847 |
+
|
15848 |
+
function convertData(result) {
|
15849 |
+
var data = result;
|
15850 |
+
var buttons = {};
|
15851 |
+
var groups = {}; // Initializing groups
|
15852 |
+
|
15853 |
+
data.groups.map(function (group) {
|
15854 |
+
var groupObject = createRecord(group.data);
|
15855 |
+
groupObject.children = []; // Initializing buttons inside the group
|
15856 |
+
|
15857 |
+
Object.keys(group.buttons).map(function (key) {
|
15858 |
+
var button = group.buttons[key];
|
15859 |
+
var buttonObject = createRecord(button);
|
15860 |
+
buttonObject.parent = groupObject.id;
|
15861 |
+
buttons[buttonObject.id] = buttonObject;
|
15862 |
+
groupObject.children.push(buttonObject.id);
|
15863 |
+
});
|
15864 |
+
groups[groupObject.id] = groupObject;
|
15865 |
+
});
|
15866 |
+
var timeSchedules = {};
|
15867 |
+
var pageRules = {};
|
15868 |
+
|
15869 |
+
if (data.time_schedules) {
|
15870 |
+
data.time_schedules.map(function (timeSchedule) {
|
15871 |
+
timeSchedules[timeSchedule.id] = {
|
15872 |
+
id: timeSchedule.id,
|
15873 |
+
name: timeSchedule.name || translate_translate("time_schedules.single_name"),
|
15874 |
+
weekdays: timeSchedule.weekdays || weekdays.map(function (weekday) {
|
15875 |
+
return {
|
15876 |
+
opened: true,
|
15877 |
+
open: "8:00",
|
15878 |
+
close: "17:00",
|
15879 |
+
weekday: weekday
|
15880 |
+
};
|
15881 |
+
}),
|
15882 |
+
start_date: timeSchedule.start_date || dateToFormat(new Date()),
|
15883 |
+
end_date: timeSchedule.end_date || null,
|
15884 |
+
dates: timeSchedule.dates || []
|
15885 |
+
};
|
15886 |
+
});
|
15887 |
+
} // Add page rules data with placeholders
|
15888 |
+
|
15889 |
+
|
15890 |
+
if (data.page_rules) {
|
15891 |
+
data.page_rules.map(function (pageRule) {
|
15892 |
+
pageRules[pageRule.id] = {
|
15893 |
+
id: pageRule.id,
|
15894 |
+
name: pageRule.name || "Unnamed pagerule",
|
15895 |
+
type: pageRule.type || "and",
|
15896 |
+
groups: pageRule.groups || [{
|
15897 |
+
rules: pageRule.rules || []
|
15898 |
+
}]
|
15899 |
+
};
|
15900 |
+
});
|
15901 |
+
}
|
15902 |
+
|
15903 |
+
return {
|
15904 |
+
hasChanges: data.changes,
|
15905 |
+
buttons: buttons,
|
15906 |
+
groups: groups,
|
15907 |
+
timeSchedules: timeSchedules,
|
15908 |
+
pageRules: pageRules,
|
15909 |
+
settings: data.settings,
|
15910 |
+
premium: data.premium,
|
15911 |
+
premium_code: data.premium_code,
|
15912 |
+
version: data.version,
|
15913 |
+
wordpress: data.wordpress,
|
15914 |
+
info: data.info,
|
15915 |
+
is_opt_in: data.is_opt_in,
|
15916 |
+
latest_tour_update: data.latest_tour_update,
|
15917 |
+
identifier: data.identifier ? data.identifier : null,
|
15918 |
+
additional_permissions: data.additional_permissions,
|
15919 |
+
domain: data.domain
|
15920 |
+
};
|
15921 |
+
}
|
15922 |
+
function createRecord(data) {
|
15923 |
+
if (data && typeof data.id !== "undefined") return data;
|
15924 |
+
return helpers_objectSpread(helpers_objectSpread({}, data), {}, {
|
15925 |
+
id: GenerateUniqueId()
|
15926 |
+
});
|
15927 |
+
}
|
15928 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/dataActions/index.js
|
15929 |
+
|
15930 |
+
|
15931 |
+
/**
|
15932 |
+
* Add model to store
|
15933 |
+
* @param {object} data
|
15934 |
+
* @param {string} model
|
15935 |
*/
|
15936 |
+
|
15937 |
+
function addModel(data, model) {
|
15938 |
+
return {
|
15939 |
+
type: actionTypes[model].ADD_MODEL,
|
15940 |
+
payload: data
|
15941 |
+
};
|
15942 |
+
}
|
15943 |
+
/**
|
15944 |
+
* Add relation between button and group
|
15945 |
+
* @param {string} button_id
|
15946 |
+
* @param {string} group_id
|
15947 |
+
*/
|
15948 |
+
|
15949 |
+
function dataActions_addRelation(button_id, group_id) {
|
15950 |
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
15951 |
+
return {
|
15952 |
+
type: buttonizer_constants_actionTypes.ADD_RELATION,
|
15953 |
+
payload: {
|
15954 |
+
button_id: button_id,
|
15955 |
+
group_id: group_id,
|
15956 |
+
index: index
|
15957 |
+
}
|
15958 |
+
};
|
15959 |
+
}
|
15960 |
+
/**
|
15961 |
+
* Change relations (for drag n drop)
|
15962 |
+
* @param {string} button_id button id to change relations
|
15963 |
+
* @param {string} new_group_id new group id
|
15964 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15965 |
|
15966 |
+
function dataActions_changeRelation(button_id, old_group_id, new_group_id, button_index) {
|
15967 |
+
return {
|
15968 |
+
type: buttonizer_constants_actionTypes.CHANGE_RELATION,
|
15969 |
+
payload: {
|
15970 |
+
button_id: button_id,
|
15971 |
+
old_group_id: old_group_id,
|
15972 |
+
new_group_id: new_group_id,
|
15973 |
+
button_index: button_index
|
15974 |
+
}
|
15975 |
+
};
|
15976 |
}
|
15977 |
+
/**
|
15978 |
+
* Remove relation between button and group
|
15979 |
+
* @param {string} button_id
|
15980 |
+
* @param {string} group_id
|
15981 |
*/
|
15982 |
+
|
15983 |
+
function removeRelation(button_id, group_id) {
|
15984 |
+
return {
|
15985 |
+
type: buttonizer_constants_actionTypes.REMOVE_RELATION,
|
15986 |
+
payload: {
|
15987 |
+
button_id: button_id,
|
15988 |
+
group_id: group_id
|
15989 |
+
}
|
15990 |
+
};
|
15991 |
}
|
15992 |
+
/**
|
15993 |
+
* Set key of model id to value specified
|
15994 |
+
*
|
15995 |
+
* @param {string} model model of object to change value on
|
15996 |
+
* @param {string} id button or group id
|
15997 |
+
* @param {string} key key of value to change
|
15998 |
+
* @param {any} value new value to set
|
15999 |
*/
|
16000 |
+
|
16001 |
+
var dataActions_set = function set(model, id, key, value) {
|
16002 |
+
// Check is value is an array
|
16003 |
+
if (Array.isArray(value)) {
|
16004 |
+
return {
|
16005 |
+
type: buttonizer_constants_actionTypes[model].SET_KEY_FORMAT,
|
16006 |
+
payload: {
|
16007 |
+
id: id,
|
16008 |
+
format: "normal_hover",
|
16009 |
+
key: key,
|
16010 |
+
values: value
|
16011 |
+
}
|
16012 |
+
};
|
16013 |
+
} // if not, just set it normally
|
16014 |
+
|
16015 |
+
|
16016 |
+
return {
|
16017 |
+
type: buttonizer_constants_actionTypes[model].SET_KEY_VALUE,
|
16018 |
+
payload: {
|
16019 |
+
id: id,
|
16020 |
+
key: key,
|
16021 |
+
value: value
|
16022 |
}
|
16023 |
+
};
|
16024 |
+
};
|
16025 |
+
var dataActions_setSetting = function setSetting(setting, value) {
|
16026 |
+
return {
|
16027 |
+
type: buttonizer_constants_actionTypes.SET_SETTING_VALUE,
|
16028 |
+
payload: {
|
16029 |
+
setting: setting,
|
16030 |
+
value: value
|
16031 |
}
|
16032 |
+
};
|
16033 |
+
};
|
16034 |
+
var dataActions_setMisc = function setMisc(setting, value) {
|
16035 |
+
return {
|
16036 |
+
type: buttonizer_constants_actionTypes.SET_MISC_VALUE,
|
16037 |
+
payload: {
|
16038 |
+
setting: setting,
|
16039 |
+
value: value
|
16040 |
+
}
|
16041 |
+
};
|
16042 |
+
};
|
16043 |
+
/**
|
16044 |
+
* Time Schedule Actions
|
16045 |
*/
|
16046 |
+
//
|
16047 |
+
|
16048 |
+
var setWeekday = function setWeekday(id, weekdayKey, key, value) {
|
16049 |
+
return {
|
16050 |
+
type: actionTypes.SET_WEEKDAY,
|
16051 |
+
payload: {
|
16052 |
+
id: id,
|
16053 |
+
weekdayKey: weekdayKey,
|
16054 |
+
key: key,
|
16055 |
+
value: value
|
16056 |
+
}
|
16057 |
+
};
|
16058 |
+
};
|
16059 |
+
var addExcludedDate = function addExcludedDate(id) {
|
16060 |
+
return {
|
16061 |
+
type: actionTypes.ADD_EXCLUDED_DATE,
|
16062 |
+
payload: {
|
16063 |
+
id: id
|
16064 |
+
}
|
16065 |
+
};
|
16066 |
+
};
|
16067 |
+
var setExcludedDate = function setExcludedDate(id, dateKey, key, value) {
|
16068 |
+
return {
|
16069 |
+
type: actionTypes.SET_EXCLUDED_DATE,
|
16070 |
+
payload: {
|
16071 |
+
id: id,
|
16072 |
+
dateKey: dateKey,
|
16073 |
+
key: key,
|
16074 |
+
value: value
|
16075 |
+
}
|
16076 |
+
};
|
16077 |
+
};
|
16078 |
+
var removeExcludedDate = function removeExcludedDate(id, dateKey) {
|
16079 |
+
return {
|
16080 |
+
type: actionTypes.REMOVE_EXCLUDED_DATE,
|
16081 |
+
payload: {
|
16082 |
+
id: id,
|
16083 |
+
dateKey: dateKey
|
16084 |
+
}
|
16085 |
+
};
|
16086 |
+
};
|
16087 |
+
/**
|
16088 |
+
* Adds record to store
|
16089 |
+
* @param {object} payload data for new record
|
16090 |
+
* @param {String} model type of model
|
16091 |
+
*/
|
16092 |
+
|
16093 |
+
function dataActions_addRecord(data, model) {
|
16094 |
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
16095 |
+
return {
|
16096 |
+
type: buttonizer_constants_actionTypes[model].ADD_RECORD,
|
16097 |
+
payload: {
|
16098 |
+
record: createRecord(data),
|
16099 |
+
index: index
|
16100 |
+
}
|
16101 |
+
};
|
16102 |
}
|
16103 |
+
/**
|
16104 |
+
* Removes record to store
|
16105 |
+
* @param {int} model_id id of model to remove
|
16106 |
+
* @param {String} model type of model
|
16107 |
*/
|
16108 |
+
|
16109 |
+
function removeRecord(model_id, model) {
|
16110 |
+
return {
|
16111 |
+
type: buttonizer_constants_actionTypes[model].REMOVE_RECORD,
|
16112 |
+
payload: {
|
16113 |
+
model_id: model_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16114 |
}
|
16115 |
+
};
|
16116 |
+
}
|
16117 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/store/selectors.js
|
16118 |
+
|
16119 |
+
function getButtons(group_id) {
|
16120 |
+
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.store.getState();
|
16121 |
+
if (!state.groups[group_id].children) return null;
|
16122 |
+
var children = state.groups[group_id].children;
|
16123 |
+
var buttons = state.buttons;
|
16124 |
+
var result = {};
|
16125 |
+
Object.keys(buttons).map(function (obj) {
|
16126 |
+
if (children.includes(obj)) result[obj] = buttons[obj];
|
16127 |
+
});
|
16128 |
+
return result;
|
16129 |
+
}
|
16130 |
+
function selectors_getChildrenIndex(children) {
|
16131 |
+
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : dashboard_store.getState();
|
16132 |
+
if (!children) return null;
|
16133 |
+
var buttons = state.buttons;
|
16134 |
+
var result = {};
|
16135 |
+
Object.keys(buttons).map(function (obj) {
|
16136 |
+
if (children.includes(obj)) {
|
16137 |
+
children.map(function (id, index) {
|
16138 |
+
if (id === obj) result[index] = buttons[obj];
|
16139 |
+
});
|
16140 |
}
|
16141 |
+
});
|
16142 |
+
return result;
|
16143 |
}
|
16144 |
+
function selectors_getButtonsCount(group_id) {
|
16145 |
+
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.store.getState();
|
16146 |
+
if (!state.groups || !state.groups[group_id]) return 0;
|
16147 |
+
return state.groups[group_id].children.length;
|
|
|
|
|
16148 |
}
|
16149 |
+
function selectors_getGroupCount() {
|
16150 |
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.store.getState();
|
16151 |
+
if (!state.groups) return 0;
|
16152 |
+
return Object.keys(state.groups).length;
|
16153 |
+
}
|
16154 |
+
;// CONCATENATED MODULE: ./node_modules/immer/dist/immer.esm.js
|
16155 |
+
function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if(false){ var i, o; }throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function immer_esm_t(n){return!!n&&!!n[Q]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(r){return immer_esm_t(r)||n(23,r),r[Q].t}function i(n,t,r){void 0===r&&(r=!1),0===o(n)?(r?Object.keys:nn)(n).forEach((function(e){r&&"symbol"==typeof e||t(e,n[e],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[Q];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t,r){var e=o(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r}function c(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=tn(n);delete t[Q];for(var r=nn(t),e=0;e<r.length;e++){var i=r[e],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),t)}function d(n,e){return void 0===e&&(e=!1),y(n)||immer_esm_t(n)||!r(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(t){var r=rn[t];return r||n(18,t),r}function m(n,t){rn[n]||(rn[n]=t)}function _(){return true||0,U}function j(n,t){t&&(b("Patches"),n.u=[],n.s=[],n.v=t)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var t=n[Q];0===t.i||1===t.i?t.j():t.O=!0}function P(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.g||b("ES5").S(e,t,o),o?(i[Q].P&&(O(e),n(4)),r(t)&&(t=M(e,t),e.l||x(e,t)),e.u&&b("Patches").M(i[Q],t,e.u,e.s)):t=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),t!==H?t:void 0}function M(n,t,r){if(y(t))return t;var e=t[Q];if(!e)return i(t,(function(i,o){return A(n,e,t,i,o,r)}),!0),t;if(e.A!==n)return t;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(t,i){return A(n,e,o,t,i,r)})),x(n,o,!1),r&&n.u&&b("Patches").R(e,r,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( false&&0,immer_esm_t(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!immer_esm_t(v))return;e.m=!1}if(r(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,t,r){void 0===r&&(r=!1),n.h.F&&n.m&&d(t,r)}function z(n,t){var r=n[Q];return(r?p(r):n)[t]}function I(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,t,r){var e=s(t)?b("MapSet").N(t,r):v(t)?b("MapSet").T(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;r&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):b("ES5").J(t,r);return(r?r.A:_()).p.push(e),e}function D(e){return immer_esm_t(e)||n(22,e),function n(t){if(!r(t))return t;var e,u=t[Q],c=o(t);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=F(t,c),u.I=!1}else e=F(t,c);return i(e,(function(t,r){u&&a(u.t,t)===r||f(e,t,n(r))})),3===c?new Set(e):e}(e)}function F(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function r(n,t){var r=s[n];return r?r.enumerable=t:s[n]=r={configurable:!0,enumerable:t,get:function(){var t=this[Q];return false&&0,en.get(t,n)},set:function(t){var r=this[Q]; false&&0,en.set(r,n,t)}},r}function e(n){for(var t=n.length-1;t>=0;t--){var r=n[t][Q];if(!r.P)switch(r.i){case 5:a(r)&&k(r);break;case 4:o(r)&&k(r)}}}function o(n){for(var t=n.t,r=n.k,e=nn(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=t[o];if(void 0===a&&!u(t,o))return!0;var f=r[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!t[Q];return e.length!==nn(t).length+(v?0:1)}function a(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function f(t){t.O&&n(3,JSON.stringify(p(t)))}var s={};m("ES5",{J:function(n,t){var e=Array.isArray(n),i=function(n,t){if(n){for(var e=Array(t.length),i=0;i<t.length;i++)Object.defineProperty(e,""+i,r(i,!0));return e}var o=tn(t);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=r(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(t),o)}(e,n),o={i:e?5:4,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,r,o){o?immer_esm_t(r)&&r[Q].A===n&&e(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[Q];if(r){var e=r.t,o=r.k,f=r.D,c=r.i;if(4===c)i(o,(function(t){t!==Q&&(void 0!==e[t]||u(e,t)?f[t]||n(o[t]):(f[t]=!0,k(r)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(r))}));else if(5===c){if(a(r)&&(k(r),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!r(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var t=Object.create(Object.getPrototypeOf(n));for(var i in n)t[i]=e(n[i]);return u(n,L)&&(t[L]=n[L]),t}function f(n){return immer_esm_t(n)?e(n):n}var c="add";m("Patches",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,u=r.op,f=t,s=0;s<i.length-1;s++){var v=o(f),p=""+i[s];0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(r.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(r.value);default:return delete f[h]}default:n(17,u)}})),t},R:function(n,t,r,e){switch(n.i){case 0:case 4:case 2:return function(n,t,r,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=t.concat(n);r.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,t,r,e);case 5:case 1:return function(n,t,r,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,r];r=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=t.concat([v]);r.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=t.concat([l]);r.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:t.concat(["length"]),value:i.length})}(n,t,r,e);case 3:return function(n,t,r,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=t.concat([u]);r.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=t.concat([u]);r.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,t,r,e)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t===H?void 0:t}),e.push({op:"replace",path:[],value:n.t})}})}function C(){function t(n,t){function r(){this.constructor=n}a(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=R(n.A.h,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function u(t){t.O&&n(3,JSON.stringify(p(t)))}var a=function(n,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function n(n,t){return this[Q]={i:2,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,t){var r=this[Q];return u(r),p(r).has(n)&&p(r).get(n)===t||(e(r),k(r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),e(t),k(t),t.D.set(n,!1),t.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(t){n.D.set(t,!1)})),n.o.clear())},o.forEach=function(n,t){var r=this;p(this[Q]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},o.get=function(n){var t=this[Q];u(t);var i=p(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var o=R(t.A.h,i,t);return e(t),t.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},o.entries=function(){var n,t=this,r=this.keys();return(n={})[V]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,t){return this[Q]={i:3,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return p(this[Q]).size}}),r.has=function(n){var t=this[Q];return u(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[Q];return u(t),this.has(n)||(o(t),k(t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[Q];return u(t),o(t),k(t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},r.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},r.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},r.keys=function(){return this.values()},r[V]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();m("MapSet",{N:function(n,t){return new f(n,t)},T:function(n,t){return new c(n,t)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(n){var t={};return nn(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r)})),t},rn={},en={get:function(n,t){if(t===Q)return n;var e=p(n);if(!u(e,t))return function(n,t,r){var e,i=I(t,r);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.I||!r(i)?i:i===z(n.t,t)?(E(n),n.o[t]=R(n.A.h,i,n)):i},has:function(n,t){return t in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,t,r){var e=I(p(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.P){var i=z(p(n),t),o=null==i?void 0:i[Q];if(o&&o.t===r)return n.o[t]=r,n.D[t]=!1,!0;if(c(r,i)&&(void 0!==r||u(n.t,t)))return!0;E(n),k(n)}return n.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in n.o)||(n.o[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==z(n.t,t)||t in n.t?(n.D[t]=!1,E(n),k(n)):delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=p(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.i||"length"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,t){on[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),on.deleteProperty=function(t,r){return false&&0,en.deleteProperty.call(this,t[0],r)},on.set=function(t,r,e){return false&&0,en.set.call(this,t[0],r,e,t[0])};var un=function(){function e(t){var e=this;this.g=B,this.F=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var u=i;i=t;var a=e;return function(n){var t=this;void 0===n&&(n=u);for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var r;return(r=i).call.apply(r,[t,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),r(t)){var c=w(e),s=R(e,t,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!t||"object"!=typeof t){if((f=i(t))===H)return;return void 0===f&&(f=t),e.F&&d(f,!0),f}n(21,t)},this.produceWithPatches=function(n,t){return"function"==typeof n?function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))}:[e.produce(n,t,(function(n,t){r=n,i=t})),r,i];var r,i},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){r(e)||n(8),immer_esm_t(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(t,r){var e=t&&t[Q]; false&&(0);var i=e.A;return j(i,r),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(t){t&&!B&&n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=b("Patches").$;return immer_esm_t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ var immer_esm = (fn);
|
16156 |
+
//# sourceMappingURL=immer.esm.js.map
|
16157 |
+
|
16158 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/savingHelpers.js
|
16159 |
+
|
16160 |
+
|
16161 |
+
|
16162 |
+
/**
|
16163 |
+
* Generate JSON object
|
16164 |
+
* @returns {Array}
|
16165 |
*/
|
16166 |
+
|
16167 |
+
function generateJSONObject(storeDataObject) {
|
16168 |
+
// Buttons
|
16169 |
+
var buttonGroups = Object.values(storeDataObject);
|
16170 |
+
var data = [];
|
16171 |
+
buttonGroups.forEach(function (groupObject) {
|
16172 |
+
var outputGroup = immer_esm(groupObject, function (draftObject) {
|
16173 |
+
delete draftObject.children;
|
16174 |
+
});
|
16175 |
+
var groupButtons = Object.values(selectors_getChildrenIndex(groupObject.children));
|
16176 |
+
var tempButtons = [];
|
16177 |
+
groupButtons.forEach(function (buttonObject) {
|
16178 |
+
var outputButton = immer_esm(buttonObject, function (draftObject) {
|
16179 |
+
delete draftObject.parent;
|
16180 |
+
});
|
16181 |
+
tempButtons.push(outputButton);
|
16182 |
+
});
|
16183 |
+
|
16184 |
+
if (tempButtons.length === 0) {
|
16185 |
+
tempButtons = [{
|
16186 |
+
name: "Button",
|
16187 |
+
show_mobile: "true",
|
16188 |
+
show_desktop: "true"
|
16189 |
+
}];
|
16190 |
+
}
|
16191 |
+
|
16192 |
+
data.push({
|
16193 |
+
data: outputGroup,
|
16194 |
+
buttons: tempButtons
|
16195 |
+
});
|
16196 |
+
});
|
16197 |
+
return data;
|
16198 |
}
|
16199 |
+
/**
|
16200 |
+
* Reset Buttonizer
|
|
|
|
|
16201 |
*/
|
16202 |
+
|
16203 |
+
function resetSettings() {
|
16204 |
+
return apiRequest("/reset", {
|
16205 |
+
method: "POST",
|
16206 |
+
data: {
|
16207 |
+
nonce: buttonizer_admin.nonce
|
16208 |
+
}
|
16209 |
+
}).then(function () {
|
16210 |
+
location.reload();
|
16211 |
+
})["catch"](function (e) {
|
16212 |
+
console.error(e);
|
16213 |
+
throw new Error("Something went wrong trying to update this model.");
|
16214 |
+
});
|
16215 |
}
|
16216 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/rootActions.js
|
16217 |
+
|
16218 |
+
function changeHasChanges(status) {
|
16219 |
+
return {
|
16220 |
+
type: buttonizer_constants_actionTypes.HAS_CHANGES,
|
16221 |
+
payload: {
|
16222 |
+
hasChanges: status
|
16223 |
+
}
|
16224 |
+
};
|
16225 |
+
}
|
16226 |
+
function changeIsUpdating(status) {
|
16227 |
+
return {
|
16228 |
+
type: buttonizer_constants_actionTypes.IS_UPDATING,
|
16229 |
+
payload: {
|
16230 |
+
isUpdating: status
|
16231 |
+
}
|
16232 |
+
};
|
16233 |
+
}
|
16234 |
+
function stopLoading() {
|
16235 |
+
return {
|
16236 |
+
type: buttonizer_constants_actionTypes.STOP_LOADING
|
16237 |
+
};
|
16238 |
+
}
|
16239 |
+
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
|
16240 |
+
var tslib_es6 = __webpack_require__(70655);
|
16241 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/hub/esm/hub.js + 2 modules
|
16242 |
+
var esm_hub = __webpack_require__(36879);
|
16243 |
;// CONCATENATED MODULE: ./node_modules/@sentry/minimal/esm/index.js
|
16244 |
|
16245 |
|
16254 |
for (var _i = 1; _i < arguments.length; _i++) {
|
16255 |
args[_i - 1] = arguments[_i];
|
16256 |
}
|
16257 |
+
var hub = (0,esm_hub/* getCurrentHub */.Gd)();
|
16258 |
if (hub && hub[method]) {
|
16259 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16260 |
+
return hub[method].apply(hub, (0,tslib_es6/* __spread */.fl)(args));
|
16261 |
}
|
16262 |
throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report.");
|
16263 |
}
|
16269 |
*/
|
16270 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
16271 |
function captureException(exception, captureContext) {
|
16272 |
+
var syntheticException = new Error('Sentry syntheticException');
|
|
|
|
|
|
|
|
|
|
|
|
|
16273 |
return callOnHub('captureException', exception, {
|
16274 |
captureContext: captureContext,
|
16275 |
originalException: exception,
|
16280 |
* Captures a message event and sends it to Sentry.
|
16281 |
*
|
16282 |
* @param message The message to send to Sentry.
|
16283 |
+
* @param Severity Define the level of the message.
|
16284 |
* @returns The generated eventId.
|
16285 |
*/
|
16286 |
function captureMessage(message, captureContext) {
|
16287 |
+
var syntheticException = new Error(message);
|
|
|
|
|
|
|
|
|
|
|
|
|
16288 |
// This is necessary to provide explicit scopes upgrade, without changing the original
|
16289 |
// arity of the `captureMessage(message, level)` method.
|
16290 |
var level = typeof captureContext === 'string' ? captureContext : undefined;
|
16878 |
draftStore[action.payload.id][action.payload.key] = action.payload.value;
|
16879 |
break;
|
16880 |
}
|
16881 |
+
// Add page rule group
|
16882 |
+
|
16883 |
+
case buttonizer_constants_actionTypes.pageRules.ADD_PAGE_RULE_GROUP:
|
16884 |
+
{
|
16885 |
+
draftStore[action.payload.id].groups.push({
|
16886 |
+
type: "and",
|
16887 |
+
rules: []
|
16888 |
+
});
|
16889 |
+
break;
|
16890 |
+
}
|
16891 |
+
// Remove page rule group
|
16892 |
+
|
16893 |
+
case buttonizer_constants_actionTypes.pageRules.REMOVE_PAGE_RULE_GROUP:
|
16894 |
+
{
|
16895 |
+
draftStore[action.payload.id].groups.splice(action.payload.groupKey, 1);
|
16896 |
+
break;
|
16897 |
+
}
|
16898 |
+
// Set page rule group type
|
16899 |
+
|
16900 |
+
case buttonizer_constants_actionTypes.pageRules.SET_PAGE_RULE_GROUP_TYPE:
|
16901 |
+
{
|
16902 |
+
draftStore[action.payload.id].groups[action.payload.groupKey].type = action.payload.type;
|
16903 |
+
break;
|
16904 |
+
}
|
16905 |
// Add page rule row
|
16906 |
|
16907 |
case buttonizer_constants_actionTypes.pageRules.ADD_PAGE_RULE_ROW:
|
16908 |
{
|
16909 |
+
draftStore[action.payload.id].groups[action.payload.groupRowKey].rules.push({
|
16910 |
type: "page_title",
|
16911 |
+
value: "",
|
16912 |
+
operator: "contains"
|
16913 |
});
|
16914 |
break;
|
16915 |
}
|
16917 |
|
16918 |
case buttonizer_constants_actionTypes.pageRules.SET_PAGE_RULE_ROW:
|
16919 |
{
|
16920 |
+
draftStore[action.payload.id].groups[action.payload.groupRowKey].rules[action.payload.ruleRowKey][action.payload.key] = action.payload.value;
|
16921 |
break;
|
16922 |
}
|
16923 |
// Remove page rule row
|
16924 |
|
16925 |
case buttonizer_constants_actionTypes.pageRules.REMOVE_PAGE_RULE_ROW:
|
16926 |
{
|
16927 |
+
draftStore[action.payload.id].groups[action.payload.groupRowKey].rules.splice(action.payload.ruleRowKey, 1);
|
16928 |
break;
|
16929 |
}
|
16930 |
}
|
18926 |
/* harmony default export */ var ButtonGroup_ButtonGroup = ((0,withStyles/* default */.Z)(ButtonGroup_styles, {
|
18927 |
name: 'MuiButtonGroup'
|
18928 |
})(ButtonGroup));
|
18929 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/IconButton/IconButton.js
|
18930 |
+
|
18931 |
+
|
18932 |
+
|
18933 |
+
|
18934 |
+
|
18935 |
+
|
18936 |
+
|
18937 |
+
|
18938 |
+
|
18939 |
+
|
18940 |
+
var IconButton_styles = function styles(theme) {
|
18941 |
+
return {
|
18942 |
+
/* Styles applied to the root element. */
|
18943 |
+
root: {
|
18944 |
+
textAlign: 'center',
|
18945 |
+
flex: '0 0 auto',
|
18946 |
+
fontSize: theme.typography.pxToRem(24),
|
18947 |
+
padding: 12,
|
18948 |
+
borderRadius: '50%',
|
18949 |
+
overflow: 'visible',
|
18950 |
+
// Explicitly set the default value to solve a bug on IE 11.
|
18951 |
+
color: theme.palette.action.active,
|
18952 |
+
transition: theme.transitions.create('background-color', {
|
18953 |
+
duration: theme.transitions.duration.shortest
|
18954 |
+
}),
|
18955 |
+
'&:hover': {
|
18956 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
18957 |
+
// Reset on touch devices, it doesn't add specificity
|
18958 |
+
'@media (hover: none)': {
|
18959 |
+
backgroundColor: 'transparent'
|
18960 |
+
}
|
18961 |
+
},
|
18962 |
+
'&$disabled': {
|
18963 |
+
backgroundColor: 'transparent',
|
18964 |
+
color: theme.palette.action.disabled
|
18965 |
+
}
|
18966 |
+
},
|
18967 |
+
|
18968 |
+
/* Styles applied to the root element if `edge="start"`. */
|
18969 |
+
edgeStart: {
|
18970 |
+
marginLeft: -12,
|
18971 |
+
'$sizeSmall&': {
|
18972 |
+
marginLeft: -3
|
18973 |
+
}
|
18974 |
+
},
|
18975 |
+
|
18976 |
+
/* Styles applied to the root element if `edge="end"`. */
|
18977 |
+
edgeEnd: {
|
18978 |
+
marginRight: -12,
|
18979 |
+
'$sizeSmall&': {
|
18980 |
+
marginRight: -3
|
18981 |
+
}
|
18982 |
+
},
|
18983 |
+
|
18984 |
+
/* Styles applied to the root element if `color="inherit"`. */
|
18985 |
+
colorInherit: {
|
18986 |
+
color: 'inherit'
|
18987 |
+
},
|
18988 |
+
|
18989 |
+
/* Styles applied to the root element if `color="primary"`. */
|
18990 |
+
colorPrimary: {
|
18991 |
+
color: theme.palette.primary.main,
|
18992 |
+
'&:hover': {
|
18993 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
18994 |
+
// Reset on touch devices, it doesn't add specificity
|
18995 |
+
'@media (hover: none)': {
|
18996 |
+
backgroundColor: 'transparent'
|
18997 |
+
}
|
18998 |
+
}
|
18999 |
+
},
|
19000 |
+
|
19001 |
+
/* Styles applied to the root element if `color="secondary"`. */
|
19002 |
+
colorSecondary: {
|
19003 |
+
color: theme.palette.secondary.main,
|
19004 |
+
'&:hover': {
|
19005 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
19006 |
+
// Reset on touch devices, it doesn't add specificity
|
19007 |
+
'@media (hover: none)': {
|
19008 |
+
backgroundColor: 'transparent'
|
19009 |
+
}
|
19010 |
+
}
|
19011 |
+
},
|
19012 |
+
|
19013 |
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
19014 |
+
disabled: {},
|
19015 |
+
|
19016 |
+
/* Styles applied to the root element if `size="small"`. */
|
19017 |
+
sizeSmall: {
|
19018 |
+
padding: 3,
|
19019 |
+
fontSize: theme.typography.pxToRem(18)
|
19020 |
+
},
|
19021 |
+
|
19022 |
+
/* Styles applied to the children container element. */
|
19023 |
+
label: {
|
19024 |
+
width: '100%',
|
19025 |
+
display: 'flex',
|
19026 |
+
alignItems: 'inherit',
|
19027 |
+
justifyContent: 'inherit'
|
19028 |
+
}
|
19029 |
+
};
|
19030 |
+
};
|
19031 |
+
/**
|
19032 |
+
* Refer to the [Icons](/components/icons/) section of the documentation
|
19033 |
+
* regarding the available icon options.
|
19034 |
+
*/
|
19035 |
+
|
19036 |
+
var IconButton_IconButton = /*#__PURE__*/react.forwardRef(function IconButton(props, ref) {
|
19037 |
+
var _props$edge = props.edge,
|
19038 |
+
edge = _props$edge === void 0 ? false : _props$edge,
|
19039 |
+
children = props.children,
|
19040 |
+
classes = props.classes,
|
19041 |
+
className = props.className,
|
19042 |
+
_props$color = props.color,
|
19043 |
+
color = _props$color === void 0 ? 'default' : _props$color,
|
19044 |
+
_props$disabled = props.disabled,
|
19045 |
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
19046 |
+
_props$disableFocusRi = props.disableFocusRipple,
|
19047 |
+
disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
19048 |
+
_props$size = props.size,
|
19049 |
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
19050 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]);
|
19051 |
+
|
19052 |
+
return /*#__PURE__*/react.createElement(ButtonBase_ButtonBase, (0,esm_extends/* default */.Z)({
|
19053 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, color !== 'default' && classes["color".concat((0,utils_capitalize/* default */.Z)(color))], disabled && classes.disabled, size === "small" && classes["size".concat((0,utils_capitalize/* default */.Z)(size))], {
|
19054 |
+
'start': classes.edgeStart,
|
19055 |
+
'end': classes.edgeEnd
|
19056 |
+
}[edge]),
|
19057 |
+
centerRipple: true,
|
19058 |
+
focusRipple: !disableFocusRipple,
|
19059 |
+
disabled: disabled,
|
19060 |
+
ref: ref
|
19061 |
+
}, other), /*#__PURE__*/react.createElement("span", {
|
19062 |
+
className: classes.label
|
19063 |
+
}, children));
|
19064 |
+
});
|
19065 |
+
false ? 0 : void 0;
|
19066 |
+
/* harmony default export */ var esm_IconButton_IconButton = ((0,withStyles/* default */.Z)(IconButton_styles, {
|
19067 |
+
name: 'MuiIconButton'
|
19068 |
+
})(IconButton_IconButton));
|
19069 |
// EXTERNAL MODULE: ./node_modules/@material-ui/icons/LaptopMac.js
|
19070 |
var LaptopMac = __webpack_require__(89974);
|
19071 |
// EXTERNAL MODULE: ./node_modules/@material-ui/icons/TabletMac.js
|
19162 |
} : null,
|
19163 |
"data-testid": device.type,
|
19164 |
className: "button"
|
19165 |
+
}, device.icon);
|
19166 |
+
})), /*#__PURE__*/react.createElement(esm_IconButton_IconButton, {
|
19167 |
+
onClick: function onClick() {
|
19168 |
+
return setDevice("desktop");
|
19169 |
+
},
|
19170 |
onMouseOver: function onMouseOver() {
|
19171 |
return setShowDeviceViews(true);
|
19172 |
},
|
19173 |
className: "current-device",
|
19174 |
+
"data-testid": "device:current-device",
|
19175 |
+
color: "primary"
|
19176 |
}, showDeviceViews === false && chosenDeviceView()));
|
19177 |
}
|
19178 |
// EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/debounce.js
|
25781 |
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
25782 |
var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
25783 |
|
25784 |
+
var getFunctionName = function getFunctionName(fn) {
|
25785 |
var match = ("" + fn).match(fnNameMatchRegex);
|
25786 |
var name = match && match[1];
|
25787 |
return name || '';
|
25798 |
fallback = '';
|
25799 |
}
|
25800 |
|
25801 |
+
return Component.displayName || Component.name || getFunctionName(Component) || fallback;
|
25802 |
};
|
25803 |
|
25804 |
var getWrappedName = function getWrappedName(outerType, innerType, wrapperName) {
|
26040 |
/* harmony default export */ var Accordion_Accordion = ((0,withStyles/* default */.Z)(Accordion_styles, {
|
26041 |
name: 'MuiAccordion'
|
26042 |
})(Accordion));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26043 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js
|
26044 |
|
26045 |
|
29425 |
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
|
29426 |
|
29427 |
|
29428 |
+
function isElement(node) {
|
29429 |
var OwnElement = getWindow(node).Element;
|
29430 |
return node instanceof OwnElement || node instanceof Element;
|
29431 |
}
|
29525 |
|
29526 |
function getDocumentElement(element) {
|
29527 |
// $FlowFixMe[incompatible-return]: assume body is always available
|
29528 |
+
return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
|
29529 |
element.document) || window.document).documentElement;
|
29530 |
}
|
29531 |
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
|
29958 |
cleanupModifierEffects();
|
29959 |
state.options = Object.assign({}, defaultOptions, state.options, options);
|
29960 |
state.scrollParents = {
|
29961 |
+
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
29962 |
popper: listScrollParents(popper)
|
29963 |
}; // Orders the modifiers based on their dependencies and `phase`
|
29964 |
// properties
|
30737 |
}
|
30738 |
|
30739 |
function getClientRectFromMixedType(element, clippingParent) {
|
30740 |
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
30741 |
} // A "clipping parent" is an overflowable container with the characteristic of
|
30742 |
// clipping (or hiding) overflowing elements with a position different from
|
30743 |
// `initial`
|
30748 |
var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;
|
30749 |
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
30750 |
|
30751 |
+
if (!isElement(clipperElement)) {
|
30752 |
return [];
|
30753 |
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
|
30754 |
|
30755 |
|
30756 |
return clippingParents.filter(function (clippingParent) {
|
30757 |
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
30758 |
});
|
30759 |
} // Gets the maximum area that the element is visible in due to any number of
|
30760 |
// clipping parents
|
30832 |
var altContext = elementContext === popper ? reference : popper;
|
30833 |
var popperRect = state.rects.popper;
|
30834 |
var element = state.elements[altBoundary ? altContext : elementContext];
|
30835 |
+
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
30836 |
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
30837 |
var popperOffsets = computeOffsets({
|
30838 |
reference: referenceClientRect,
|
31572 |
|
31573 |
|
31574 |
var Hints = function Hints(_ref) {
|
31575 |
+
var stepTrigger = _ref.stepTrigger,
|
31576 |
+
_ref$currentStep = _ref.currentStep,
|
31577 |
+
currentStep = _ref$currentStep === void 0 ? false : _ref$currentStep,
|
31578 |
_ref$anchorEl = _ref.anchorEl,
|
31579 |
anchorEl = _ref$anchorEl === void 0 ? null : _ref$anchorEl,
|
|
|
|
|
31580 |
text = _ref.text,
|
31581 |
setHintStep = _ref.setHintStep,
|
31582 |
_ref$position = _ref.position,
|
31583 |
position = _ref$position === void 0 ? [0, 20] : _ref$position;
|
31584 |
+
if (currentStep === false || !anchorEl || stepTrigger !== currentStep) return null;
|
31585 |
+
anchorEl.classList.add("hint-pulse-".concat(stepTrigger));
|
31586 |
+
anchorEl.addEventListener("click", function () {
|
31587 |
+
anchorEl.classList.remove("hint-pulse-".concat(stepTrigger));
|
31588 |
+
if (stepTrigger === 2) return setHintStep(false);
|
31589 |
+
setHintStep(stepTrigger + 1);
|
31590 |
+
}, {
|
31591 |
+
once: true
|
31592 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31593 |
|
31594 |
var _useState = (0,react.useState)(null),
|
31595 |
_useState2 = Hints_slicedToArray(_useState, 2),
|
31598 |
|
31599 |
var _usePopper = usePopper(anchorEl, popperElement, {
|
31600 |
placement: "top",
|
|
|
31601 |
modifiers: [{
|
31602 |
name: "offset",
|
31603 |
options: {
|
31608 |
styles = _usePopper.styles,
|
31609 |
attributes = _usePopper.attributes;
|
31610 |
|
31611 |
+
return /*#__PURE__*/react.createElement("div", Hints_extends({
|
31612 |
ref: setPopperElement,
|
31613 |
style: styles.popper
|
31614 |
}, attributes.popper, {
|
31617 |
}), /*#__PURE__*/react.createElement("p", null, text), /*#__PURE__*/react.createElement(esm_IconButton_IconButton, {
|
31618 |
className: "close-button",
|
31619 |
onClick: function onClick() {
|
31620 |
+
setHintStep(false);
|
31621 |
+
anchorEl.classList.remove("hint-pulse-".concat(stepTrigger));
|
|
|
31622 |
anchorEl = null;
|
31623 |
},
|
31624 |
size: "small",
|
31632 |
|
31633 |
/* harmony default export */ var Hints_Hints = (connect(function (state) {
|
31634 |
return {
|
31635 |
+
currentStep: state.misc.hint_step,
|
31636 |
welcome: state.settings.welcome
|
31637 |
};
|
31638 |
}, function (dispatch) {
|
31890 |
}
|
31891 |
|
31892 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Hints_Hints, {
|
31893 |
+
stepTrigger: 2,
|
31894 |
anchorEl: anchorEl,
|
31895 |
position: [0, 20],
|
31896 |
text: translate_translate("buttonizer_tour.hint.step_2")
|
31913 |
nextHintStepIndex: state.misc.hint_step
|
31914 |
};
|
31915 |
})(PublishButton));
|
31916 |
+
;// CONCATENATED MODULE: ./node_modules/tippy.js/dist/tippy.esm.js
|
31917 |
/**!
|
31918 |
* tippy.js v6.3.1
|
31919 |
* (c) 2017-2021 atomiks
|
40731 |
}, button.name)), /*#__PURE__*/react.createElement("div", {
|
40732 |
className: "button-actions"
|
40733 |
}, groupIndex === 0 && groups[groupId].children.indexOf(buttonId) === 0 && /*#__PURE__*/react.createElement(Hints_Hints, {
|
40734 |
+
stepTrigger: 0,
|
40735 |
anchorEl: anchorEl,
|
40736 |
position: [0, 20],
|
40737 |
text: translate_translate("buttonizer_tour.hint.step_0")
|
40738 |
}), /*#__PURE__*/react.createElement(ContainerActions_EditButton, {
|
40739 |
ref: ref,
|
40740 |
onClick: function onClick() {
|
40741 |
+
document.location.hash = "#" + path;
|
40742 |
},
|
40743 |
text: translate_translate("buttonizer_tour.hint.step_0"),
|
40744 |
nextHintStepIndex: nextHintStepIndex,
|
51216 |
repeatCount: "indefinite"
|
51217 |
}))))), /*#__PURE__*/react.createElement("p", null, translate_translate("loading.loading")))), !isLoading && /*#__PURE__*/react.createElement("div", {
|
51218 |
className: "template"
|
51219 |
+
}, filteredTemplateList.sort(function (a, b) {
|
51220 |
+
return b.is_new - a.is_new;
|
51221 |
+
}).map(function (template, key) {
|
51222 |
return /*#__PURE__*/react.createElement("div", {
|
51223 |
key: key,
|
51224 |
className: "container",
|
51258 |
size: "small",
|
51259 |
key: key,
|
51260 |
label: filterButtons === "button" ? template.name : template.group_type.charAt(0).toUpperCase() + template.group_type.slice(1).replace(/[^\w\s]/gi, " ")
|
51261 |
+
}), template.is_new && /*#__PURE__*/react.createElement(Chip_Chip, {
|
51262 |
+
className: "new",
|
51263 |
+
size: "small",
|
51264 |
+
label: "New"
|
51265 |
}), !canUseTemplate(template) && /*#__PURE__*/react.createElement(PremiumTag, null), canUseTemplate(template) && /*#__PURE__*/react.createElement("div", {
|
51266 |
className: "select"
|
51267 |
}, selected.includes(key) ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("i", {
|
51331 |
}, {
|
51332 |
value: "whatsapp",
|
51333 |
label: "settings.button_action.actions.whatsapp_chat"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51334 |
}, {
|
51335 |
value: "socialsharing",
|
51336 |
label: "settings.button_action.actions.social_sharing.social_sharing"
|
51394 |
}, {
|
51395 |
value: "waze",
|
51396 |
label: "settings.button_action.actions.social_media.waze"
|
51397 |
+
}, {
|
51398 |
+
value: "tiktok",
|
51399 |
+
label: "settings.button_action.actions.social_media.tiktok"
|
51400 |
}].map(function (obj) {
|
51401 |
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
51402 |
group: "social_media"
|
51423 |
});
|
51424 |
});
|
51425 |
var other = [{
|
51426 |
+
value: "javascript_pro",
|
51427 |
+
label: "settings.button_action.actions.javascript.name",
|
51428 |
+
isPro: true
|
51429 |
+
}, {
|
51430 |
value: "clipboard",
|
51431 |
label: "settings.button_action.actions.clipboard"
|
51432 |
+
}, {
|
51433 |
+
value: "download",
|
51434 |
+
label: "settings.button_action.actions.download.name"
|
51435 |
}, {
|
51436 |
value: "print",
|
51437 |
label: "settings.button_action.actions.print_page"
|
51438 |
+
}, {
|
51439 |
+
value: "backtotop",
|
51440 |
+
label: "settings.button_action.actions.back_to_top"
|
51441 |
+
}, {
|
51442 |
+
value: "gotobottom",
|
51443 |
+
label: "settings.button_action.actions.go_to_bottom"
|
51444 |
+
}, {
|
51445 |
+
value: "gobackpage",
|
51446 |
+
label: "settings.button_action.actions.go_back_one_page"
|
51447 |
}].map(function (obj) {
|
51448 |
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
51449 |
group: "actions"
|
56014 |
marginLeft: 20,
|
56015 |
width: "100%"
|
56016 |
},
|
56017 |
+
ListboxProps: {
|
56018 |
+
style: {
|
56019 |
+
overflowY: "scroll"
|
56020 |
+
}
|
56021 |
+
},
|
56022 |
options: isLoading ? [] : button ? filterList.filter(function (action) {
|
56023 |
return importFilteredList.find(function (template) {
|
56024 |
return action.value === template.type;
|
57942 |
setAnchorEl = _useState2[1];
|
57943 |
|
57944 |
(0,react.useEffect)(function () {
|
57945 |
+
if (ref.current) setAnchorEl(ref.current.querySelector(".style-tab"));
|
57946 |
}, [ref]);
|
57947 |
return /*#__PURE__*/react.createElement("div", {
|
57948 |
className: "bar-header"
|
58008 |
icon: /*#__PURE__*/react.createElement("i", {
|
58009 |
className: "fas fa-wrench"
|
58010 |
})
|
|
|
|
|
|
|
|
|
|
|
58011 |
}), /*#__PURE__*/react.createElement(Tab_Tab, {
|
58012 |
component: "a",
|
58013 |
onClick: function onClick() {
|
58048 |
icon: /*#__PURE__*/react.createElement("i", {
|
58049 |
className: "fas fa-sliders-h"
|
58050 |
})
|
58051 |
+
}))), anchorEl && /*#__PURE__*/react.createElement(Hints_Hints, {
|
58052 |
+
stepTrigger: 1,
|
58053 |
+
anchorEl: anchorEl,
|
58054 |
+
position: [0, 10],
|
58055 |
+
text: translate_translate("buttonizer_tour.hint.step_1")
|
58056 |
+
}));
|
58057 |
}
|
58058 |
|
58059 |
/* harmony default export */ var ButtonHeader_ButtonHeader = (withRouter(ButtonHeader));
|
59294 |
buttons: state.buttons
|
59295 |
};
|
59296 |
})(MessengerChat));
|
59297 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js
|
59298 |
+
|
59299 |
+
|
59300 |
+
|
59301 |
+
|
59302 |
+
|
59303 |
+
|
59304 |
+
|
59305 |
+
|
59306 |
+
var InputAdornment_styles = {
|
59307 |
+
/* Styles applied to the root element. */
|
59308 |
+
root: {
|
59309 |
+
display: 'flex',
|
59310 |
+
height: '0.01em',
|
59311 |
+
// Fix IE 11 flexbox alignment. To remove at some point.
|
59312 |
+
maxHeight: '2em',
|
59313 |
+
alignItems: 'center',
|
59314 |
+
whiteSpace: 'nowrap'
|
59315 |
+
},
|
59316 |
+
|
59317 |
+
/* Styles applied to the root element if `variant="filled"`. */
|
59318 |
+
filled: {
|
59319 |
+
'&$positionStart:not($hiddenLabel)': {
|
59320 |
+
marginTop: 16
|
59321 |
+
}
|
59322 |
+
},
|
59323 |
+
|
59324 |
+
/* Styles applied to the root element if `position="start"`. */
|
59325 |
+
positionStart: {
|
59326 |
+
marginRight: 8
|
59327 |
+
},
|
59328 |
+
|
59329 |
+
/* Styles applied to the root element if `position="end"`. */
|
59330 |
+
positionEnd: {
|
59331 |
+
marginLeft: 8
|
59332 |
+
},
|
59333 |
+
|
59334 |
+
/* Styles applied to the root element if `disablePointerEvents=true`. */
|
59335 |
+
disablePointerEvents: {
|
59336 |
+
pointerEvents: 'none'
|
59337 |
+
},
|
59338 |
+
|
59339 |
+
/* Styles applied if the adornment is used inside <FormControl hiddenLabel />. */
|
59340 |
+
hiddenLabel: {},
|
59341 |
+
|
59342 |
+
/* Styles applied if the adornment is used inside <FormControl margin="dense" />. */
|
59343 |
+
marginDense: {}
|
59344 |
+
};
|
59345 |
+
var InputAdornment = /*#__PURE__*/react.forwardRef(function InputAdornment(props, ref) {
|
59346 |
+
var children = props.children,
|
59347 |
+
classes = props.classes,
|
59348 |
+
className = props.className,
|
59349 |
+
_props$component = props.component,
|
59350 |
+
Component = _props$component === void 0 ? 'div' : _props$component,
|
59351 |
+
_props$disablePointer = props.disablePointerEvents,
|
59352 |
+
disablePointerEvents = _props$disablePointer === void 0 ? false : _props$disablePointer,
|
59353 |
+
_props$disableTypogra = props.disableTypography,
|
59354 |
+
disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,
|
59355 |
+
position = props.position,
|
59356 |
+
variantProp = props.variant,
|
59357 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["children", "classes", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"]);
|
59358 |
+
|
59359 |
+
var muiFormControl = useFormControl() || {};
|
59360 |
+
var variant = variantProp;
|
59361 |
+
|
59362 |
+
if (variantProp && muiFormControl.variant) {
|
59363 |
+
if (false) {}
|
59364 |
+
}
|
59365 |
+
|
59366 |
+
if (muiFormControl && !variant) {
|
59367 |
+
variant = muiFormControl.variant;
|
59368 |
+
}
|
59369 |
+
|
59370 |
+
return /*#__PURE__*/react.createElement(FormControl_FormControlContext.Provider, {
|
59371 |
+
value: null
|
59372 |
+
}, /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
59373 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, disablePointerEvents && classes.disablePointerEvents, muiFormControl.hiddenLabel && classes.hiddenLabel, variant === 'filled' && classes.filled, {
|
59374 |
+
'start': classes.positionStart,
|
59375 |
+
'end': classes.positionEnd
|
59376 |
+
}[position], muiFormControl.margin === 'dense' && classes.marginDense),
|
59377 |
+
ref: ref
|
59378 |
+
}, other), typeof children === 'string' && !disableTypography ? /*#__PURE__*/react.createElement(Typography_Typography, {
|
59379 |
+
color: "textSecondary"
|
59380 |
+
}, children) : children));
|
59381 |
+
});
|
59382 |
+
false ? 0 : void 0;
|
59383 |
+
/* harmony default export */ var InputAdornment_InputAdornment = ((0,withStyles/* default */.Z)(InputAdornment_styles, {
|
59384 |
+
name: 'MuiInputAdornment'
|
59385 |
+
})(InputAdornment));
|
59386 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionRelAttributes/ButtonActionRelAttributes.js
|
59387 |
function ButtonActionRelAttributes_extends() { ButtonActionRelAttributes_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonActionRelAttributes_extends.apply(this, arguments); }
|
59388 |
|
59492 |
require_host: false
|
59493 |
}) || value.substr(0, 1) === "#";
|
59494 |
}
|
59495 |
+
// EXTERNAL MODULE: ./node_modules/@material-ui/icons/AttachFile.js
|
59496 |
+
var AttachFile = __webpack_require__(37726);
|
59497 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Url/Url.js
|
59498 |
function Url_slicedToArray(arr, i) { return Url_arrayWithHoles(arr) || Url_iterableToArrayLimit(arr, i) || Url_unsupportedIterableToArray(arr, i) || Url_nonIterableRest(); }
|
59499 |
|
59513 |
|
59514 |
|
59515 |
|
59516 |
+
|
59517 |
+
|
59518 |
var validatorTimeout = setTimeout(function () {}, 0);
|
59519 |
function Url(_ref) {
|
59520 |
var _ref$value = _ref.value,
|
59527 |
newTabValue = _ref.newTabValue,
|
59528 |
_ref$showRelAttribute = _ref.showRelAttributes,
|
59529 |
showRelAttributes = _ref$showRelAttribute === void 0 ? false : _ref$showRelAttribute,
|
59530 |
+
_ref$showFileExplorer = _ref.showFileExplorer,
|
59531 |
+
showFileExplorer = _ref$showFileExplorer === void 0 ? false : _ref$showFileExplorer,
|
59532 |
relAttributesValue = _ref.relAttributesValue,
|
59533 |
_onChange = _ref.onChange;
|
59534 |
|
59544 |
(0,react.useEffect)(function () {
|
59545 |
validator(value);
|
59546 |
}, []);
|
59547 |
+
var endAdornment = null; // Show file explorer
|
59548 |
+
|
59549 |
+
if (showFileExplorer) {
|
59550 |
+
endAdornment = /*#__PURE__*/react.createElement(InputAdornment_InputAdornment, {
|
59551 |
+
position: "end"
|
59552 |
+
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
59553 |
+
content: translate_translate("utils.select_file")
|
59554 |
+
}, /*#__PURE__*/react.createElement(esm_IconButton_IconButton, {
|
59555 |
+
"aria-label": translate_translate("utils.select_file"),
|
59556 |
+
onClick: function onClick() {
|
59557 |
+
var imageSelector = wp.media({
|
59558 |
+
title: translate_translate("utils.select_file"),
|
59559 |
+
multiple: false
|
59560 |
+
}).on("select", function () {
|
59561 |
+
var attachmentUrl = imageSelector.state().get("selection").first().toJSON().url;
|
59562 |
+
|
59563 |
+
_onChange(attachmentUrl);
|
59564 |
+
}).open();
|
59565 |
+
},
|
59566 |
+
edge: "end"
|
59567 |
+
}, /*#__PURE__*/react.createElement(AttachFile/* default */.Z, null))));
|
59568 |
+
}
|
59569 |
+
|
59570 |
return /*#__PURE__*/react.createElement("div", {
|
59571 |
className: "button-action-value"
|
59572 |
}, /*#__PURE__*/react.createElement(esm_TextField_TextField, {
|
59599 |
},
|
59600 |
inputProps: {
|
59601 |
"data-testid": "action:field"
|
59602 |
+
},
|
59603 |
+
InputProps: {
|
59604 |
+
endAdornment: endAdornment
|
59605 |
}
|
59606 |
}), showNewTab && /*#__PURE__*/react.createElement(ButtonActionNewTab, {
|
59607 |
value: newTabValue,
|
60174 |
case "twitter":
|
60175 |
case "snapchat":
|
60176 |
case "instagram":
|
60177 |
+
case "tiktok":
|
60178 |
case "vk":
|
60179 |
return /*#__PURE__*/react.createElement(DefaultTextField, {
|
60180 |
value: button.action,
|
60184 |
}
|
60185 |
});
|
60186 |
|
60187 |
+
case "download":
|
60188 |
+
return /*#__PURE__*/react.createElement(Url, {
|
60189 |
+
value: button.action,
|
60190 |
+
placeholder: "https://domain.tld/path/to/file.pdf",
|
60191 |
+
onChange: function onChange(val, type) {
|
60192 |
+
_onChange(val, type);
|
60193 |
+
},
|
60194 |
+
showFileExplorer: !window.buttonizer_admin.is_stand_alone,
|
60195 |
+
paragraph: /*#__PURE__*/react.createElement("p", null, /*#__PURE__*/react.createElement(Trans, {
|
60196 |
+
i18nKey: "settings.button_action.actions.download.description"
|
60197 |
+
}))
|
60198 |
+
});
|
60199 |
+
|
60200 |
case "signal_group":
|
60201 |
return /*#__PURE__*/react.createElement(Url, {
|
60202 |
value: button.action,
|
74990 |
/* harmony default export */ var esm_Slider_Slider = ((0,withStyles/* default */.Z)(Slider_styles, {
|
74991 |
name: 'MuiSlider'
|
74992 |
})(Slider_Slider));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74993 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Form/SliderContainer/SliderContainer.js
|
74994 |
function SliderContainer_extends() { SliderContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return SliderContainer_extends.apply(this, arguments); }
|
74995 |
|
75273 |
}));
|
75274 |
}
|
75275 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/DisableSetting/DisableSetting.js
|
75276 |
+
function DisableSetting_extends() { DisableSetting_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return DisableSetting_extends.apply(this, arguments); }
|
75277 |
+
|
75278 |
+
function DisableSetting_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = DisableSetting_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
75279 |
+
|
75280 |
+
function DisableSetting_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
75281 |
+
|
75282 |
|
75283 |
|
75284 |
|
75296 |
premiumTag = _ref$premiumTag === void 0 ? false : _ref$premiumTag,
|
75297 |
_ref$children = _ref.children,
|
75298 |
children = _ref$children === void 0 ? null : _ref$children,
|
75299 |
+
_onClick = _ref.onClick,
|
75300 |
+
props = DisableSetting_objectWithoutProperties(_ref, ["setOpacity", "condition", "className", "content", "premiumTag", "children", "onClick"]);
|
75301 |
+
|
75302 |
var visibility = condition ? setOpacity : 1;
|
75303 |
+
return /*#__PURE__*/react.createElement("div", DisableSetting_extends({
|
75304 |
className: (0,clsx_m/* default */.Z)("disable-setting ".concat(condition ? "disabled" : ""), className),
|
75305 |
"data-testid": "disable-setting",
|
75306 |
onClick: function onClick(e) {
|
75309 |
}
|
75310 |
},
|
75311 |
disabled: condition
|
75312 |
+
}, props), /*#__PURE__*/react.createElement("div", {
|
75313 |
style: {
|
75314 |
opacity: visibility
|
75315 |
},
|
77607 |
title: translate_translate("settings.custom_id.title") + " & " + translate_translate("settings.custom_class.title"),
|
77608 |
"data-testid": "group:custom-class-id",
|
77609 |
icon: "far fa-clock",
|
77610 |
+
opened: !app.hasPremium() || openedGroup === "customClassId",
|
77611 |
onSetIsOpened: function onSetIsOpened(val) {
|
77612 |
return setOpenedGroup(val ? "customClassId" : "");
|
77613 |
}
|
77618 |
}, translate_translate("settings.custom_id.title")), /*#__PURE__*/react.createElement("hr", null), settings.styling.id(), settings.styling.editor()), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
77619 |
title: translate_translate("time_schedules.name"),
|
77620 |
icon: "far fa-clock",
|
77621 |
+
opened: !app.hasPremium() || openedGroup === "timeSchedules",
|
77622 |
"data-testid": "group:time-schedules",
|
77623 |
onSetIsOpened: function onSetIsOpened(val) {
|
77624 |
return setOpenedGroup(val ? "timeSchedules" : "");
|
77626 |
}, settings.filters.timeSchedules()), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
77627 |
title: translate_translate("page_rules.name"),
|
77628 |
icon: "fas fa-filter",
|
77629 |
+
opened: !app.hasPremium() || openedGroup === "pageRules",
|
77630 |
"data-testid": "group:page-rules",
|
77631 |
onSetIsOpened: function onSetIsOpened(val) {
|
77632 |
return setOpenedGroup(val ? "pageRules" : "");
|
79781 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DisableSetting, {
|
79782 |
onClick: function onClick(e) {
|
79783 |
onChange(e.currentTarget);
|
79784 |
+
},
|
79785 |
+
"data-testid": "disable-setting-exit-intent"
|
79786 |
}, /*#__PURE__*/react.createElement("p", null, translate_translate("settings.exit_intent.description")), /*#__PURE__*/react.createElement(SettingsContainer, {
|
79787 |
title: translate_translate("settings.exit_intent.trigger_window"),
|
79788 |
fullWidth: false
|
80561 |
};
|
80562 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
80563 |
title: "".concat(translate_translate("settings.menu_animation.title")),
|
80564 |
+
opened: !app.hasPremium() || openedGroup === "animation",
|
80565 |
onSetIsOpened: function onSetIsOpened(val) {
|
80566 |
return setOpenedGroup(val ? "animation" : "");
|
80567 |
},
|
80583 |
title: translate_translate("settings.custom_id.title") + " & " + translate_translate("settings.custom_class.title"),
|
80584 |
"data-testid": "group:custom-class-id",
|
80585 |
icon: "far fa-clock",
|
80586 |
+
opened: !app.hasPremium() || openedGroup === "customIdClass",
|
80587 |
onSetIsOpened: function onSetIsOpened(val) {
|
80588 |
return setOpenedGroup(val ? "customIdClass" : "");
|
80589 |
}
|
80595 |
title: translate_translate("time_schedules.name"),
|
80596 |
icon: "far fa-clock",
|
80597 |
"data-testid": "group:time-schedules",
|
80598 |
+
opened: !app.hasPremium() || openedGroup === "timeSchedules",
|
80599 |
onSetIsOpened: function onSetIsOpened(val) {
|
80600 |
return setOpenedGroup(val ? "timeSchedules" : "");
|
80601 |
}
|
80603 |
title: translate_translate("page_rules.name"),
|
80604 |
"data-testid": "group:page-rules",
|
80605 |
icon: "fas fa-filter",
|
80606 |
+
opened: !app.hasPremium() || openedGroup === "pageRules",
|
80607 |
onSetIsOpened: function onSetIsOpened(val) {
|
80608 |
return setOpenedGroup(val ? "pageRules" : "");
|
80609 |
}
|
80611 |
title: translate_translate("settings.button_group_window.timeout_scroll"),
|
80612 |
icon: "fas fa-stopwatch",
|
80613 |
"data-testid": "group:timeout-scroll",
|
80614 |
+
opened: !app.hasPremium() || openedGroup === "timeOutScroll",
|
80615 |
onSetIsOpened: function onSetIsOpened(val) {
|
80616 |
return setOpenedGroup(val ? "timeOutScroll" : "");
|
80617 |
}
|
80619 |
title: translate_translate("settings.exit_intent.title"),
|
80620 |
icon: "fas fa-running",
|
80621 |
"data-testid": "group:exit-intent",
|
80622 |
+
opened: !app.hasPremium() || openedGroup === "exitIntent",
|
80623 |
onSetIsOpened: function onSetIsOpened(val) {
|
80624 |
return setOpenedGroup(val ? "exitIntent" : "");
|
80625 |
}
|
80770 |
component: ItemNotFound
|
80771 |
}));
|
80772 |
}
|
80773 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/SavingDialog/SavingDialog.js
|
80774 |
+
function SavingDialog_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
80775 |
+
|
80776 |
+
function SavingDialog_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { SavingDialog_ownKeys(Object(source), true).forEach(function (key) { SavingDialog_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { SavingDialog_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
80777 |
+
|
80778 |
+
function SavingDialog_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
80779 |
+
|
80780 |
+
function SavingDialog_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SavingDialog_typeof = function _typeof(obj) { return typeof obj; }; } else { SavingDialog_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SavingDialog_typeof(obj); }
|
80781 |
+
|
80782 |
+
function SavingDialog_slicedToArray(arr, i) { return SavingDialog_arrayWithHoles(arr) || SavingDialog_iterableToArrayLimit(arr, i) || SavingDialog_unsupportedIterableToArray(arr, i) || SavingDialog_nonIterableRest(); }
|
80783 |
+
|
80784 |
+
function SavingDialog_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
80785 |
+
|
80786 |
+
function SavingDialog_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SavingDialog_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SavingDialog_arrayLikeToArray(o, minLen); }
|
80787 |
+
|
80788 |
+
function SavingDialog_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
80789 |
+
|
80790 |
+
function SavingDialog_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
80791 |
+
|
80792 |
+
function SavingDialog_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
80793 |
+
|
80794 |
+
|
80795 |
+
|
80796 |
+
|
80797 |
+
|
80798 |
+
|
80799 |
+
|
80800 |
+
var SavingDialog_useStyles = styles_makeStyles(function () {
|
80801 |
+
return {
|
80802 |
+
failed: {
|
80803 |
+
background: "#fcd4d4",
|
80804 |
+
color: "#f01919",
|
80805 |
+
border: "1px solid #f01919"
|
80806 |
+
},
|
80807 |
+
"default": {
|
80808 |
+
background: "#fce8d4"
|
80809 |
+
}
|
80810 |
+
};
|
80811 |
+
});
|
80812 |
+
|
80813 |
+
function SavingDialog(_ref) {
|
80814 |
+
var style = _ref.style,
|
80815 |
+
_ref$isUpdating = _ref.isUpdating,
|
80816 |
+
isUpdating = _ref$isUpdating === void 0 ? false : _ref$isUpdating;
|
80817 |
+
|
80818 |
+
var _useState = (0,react.useState)(isUpdating),
|
80819 |
+
_useState2 = SavingDialog_slicedToArray(_useState, 2),
|
80820 |
+
updating = _useState2[0],
|
80821 |
+
setUpdating = _useState2[1];
|
80822 |
+
|
80823 |
+
var _useState3 = (0,react.useState)(false),
|
80824 |
+
_useState4 = SavingDialog_slicedToArray(_useState3, 2),
|
80825 |
+
openDialog = _useState4[0],
|
80826 |
+
setOpenDialog = _useState4[1];
|
80827 |
+
|
80828 |
+
(0,react.useEffect)(function () {
|
80829 |
+
setUpdating(isUpdating);
|
80830 |
+
}, [isUpdating]);
|
80831 |
+
var classes = SavingDialog_useStyles();
|
80832 |
+
|
80833 |
+
var label = function label() {
|
80834 |
+
if (updating) {
|
80835 |
+
if (updating === "failed") {
|
80836 |
+
return translate_translate("saving.failed");
|
80837 |
+
} else if (SavingDialog_typeof(updating) === "object") {
|
80838 |
+
return /*#__PURE__*/react.createElement("div", {
|
80839 |
+
style: {
|
80840 |
+
display: "inline-grid"
|
80841 |
+
}
|
80842 |
+
}, /*#__PURE__*/react.createElement("span", null, updating.status, ": ", updating.statusText), /*#__PURE__*/react.createElement(Link_Link, {
|
80843 |
+
component: "button",
|
80844 |
+
style: {
|
80845 |
+
fontSize: "0.7rem",
|
80846 |
+
textDecoration: "none",
|
80847 |
+
color: "#2186de"
|
80848 |
+
},
|
80849 |
+
onClick: function onClick() {
|
80850 |
+
setOpenDialog(true);
|
80851 |
+
}
|
80852 |
+
}, "Show error message..."));
|
80853 |
+
} else {
|
80854 |
+
return translate_translate("saving.saving");
|
80855 |
+
}
|
80856 |
+
}
|
80857 |
+
|
80858 |
+
return translate_translate("saving.completed");
|
80859 |
+
};
|
80860 |
+
|
80861 |
+
var icon = function icon() {
|
80862 |
+
if (updating) {
|
80863 |
+
if (updating === "failed" || SavingDialog_typeof(updating) === "object") {
|
80864 |
+
return /*#__PURE__*/react.createElement("i", {
|
80865 |
+
style: {
|
80866 |
+
width: "20px",
|
80867 |
+
height: "20px",
|
80868 |
+
textAlign: "center",
|
80869 |
+
lineHeight: "24px"
|
80870 |
+
},
|
80871 |
+
className: "fas fa-times saved-icon"
|
80872 |
+
});
|
80873 |
+
} else {
|
80874 |
+
return /*#__PURE__*/react.createElement(CircularProgress_CircularProgress, {
|
80875 |
+
style: {
|
80876 |
+
width: "20px",
|
80877 |
+
height: "20px"
|
80878 |
+
},
|
80879 |
+
color: "secondary"
|
80880 |
+
});
|
80881 |
+
}
|
80882 |
+
}
|
80883 |
+
|
80884 |
+
return /*#__PURE__*/react.createElement("i", {
|
80885 |
+
style: {
|
80886 |
+
width: "20px",
|
80887 |
+
height: "20px",
|
80888 |
+
textAlign: "center",
|
80889 |
+
lineHeight: "24px"
|
80890 |
+
},
|
80891 |
+
className: "fas fa-check saved-icon"
|
80892 |
+
});
|
80893 |
+
};
|
80894 |
+
|
80895 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Chip_Chip, {
|
80896 |
+
variant: "outlined",
|
80897 |
+
color: "secondary",
|
80898 |
+
label: label(),
|
80899 |
+
classes: {
|
80900 |
+
root: updating === "failed" || SavingDialog_typeof(updating) === "object" ? classes.failed : classes["default"]
|
80901 |
+
},
|
80902 |
+
icon: icon(),
|
80903 |
+
style: SavingDialog_objectSpread({
|
80904 |
+
position: "absolute",
|
80905 |
+
top: "60px",
|
80906 |
+
right: "10px",
|
80907 |
+
transition: updating ? "250ms ease-in-out" : "2s ease-in-out",
|
80908 |
+
zIndex: 1,
|
80909 |
+
opacity: updating ? 1 : 0,
|
80910 |
+
minWidth: "92px",
|
80911 |
+
visibility: updating ? "visible" : "hidden"
|
80912 |
+
}, style),
|
80913 |
+
className: (0,clsx_m/* default */.Z)("saving-dialog", updating && "show")
|
80914 |
+
}), /*#__PURE__*/react.createElement(ConfirmDialog, {
|
80915 |
+
title: "".concat(updating.status, ": ").concat(updating.statusText),
|
80916 |
+
open: openDialog,
|
80917 |
+
maxWidth: "sm",
|
80918 |
+
className: "warning",
|
80919 |
+
buttons: [{
|
80920 |
+
value: "confirm",
|
80921 |
+
text: translate_translate("modal.ok"),
|
80922 |
+
variant: "contained"
|
80923 |
+
}],
|
80924 |
+
onClose: function onClose() {
|
80925 |
+
setOpenDialog(false);
|
80926 |
+
}
|
80927 |
+
}, SavingDialog_typeof(updating) === "object" ? updating.message : translate_translate("modal.lost")));
|
80928 |
+
}
|
80929 |
+
|
80930 |
+
/* harmony default export */ var SavingDialog_SavingDialog = (connect(function (store) {
|
80931 |
+
return {
|
80932 |
+
isUpdating: store.saving.isUpdating
|
80933 |
+
};
|
80934 |
+
})(SavingDialog));
|
80935 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Badge/Badge.js
|
80936 |
|
80937 |
|
81215 |
badgeContent: messages.length,
|
81216 |
color: "secondary",
|
81217 |
invisible: hasRead || messages.length === 0
|
81218 |
+
}, /*#__PURE__*/react.createElement(esm_Icon_Icon, {
|
81219 |
+
className: "far fa-lightbulb",
|
81220 |
+
style: {
|
81221 |
+
fontSize: 18
|
81222 |
+
}
|
81223 |
})))), /*#__PURE__*/react.createElement(Popover_Popover, {
|
81224 |
open: popperOpened !== null,
|
81225 |
anchorEl: popperOpened,
|
81267 |
}));
|
81268 |
}))));
|
81269 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81270 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Bar/Bar.js
|
81271 |
|
81272 |
|
81359 |
className: "footer-button-group device-preview"
|
81360 |
}, /*#__PURE__*/react.createElement(DevicePreview, null)), /*#__PURE__*/react.createElement("div", {
|
81361 |
className: "footer-button-group save-group"
|
81362 |
+
}, !window.buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(EventsButton, null), /*#__PURE__*/react.createElement(RevertButton_RevertButton, null), /*#__PURE__*/react.createElement(PublishButton_PublishButton, null)))));
|
81363 |
}
|
81364 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Loader/Loader.js
|
81365 |
|
81761 |
|
81762 |
|
81763 |
|
81764 |
+
|
81765 |
var MenuDrawer_useStyles = styles_makeStyles(function () {
|
81766 |
return MenuDrawer_defineProperty({
|
81767 |
hideButton: {
|
81780 |
});
|
81781 |
function MenuDrawer(_ref2) {
|
81782 |
var onClose = _ref2.onClose,
|
81783 |
+
open = _ref2.open,
|
81784 |
+
getGroupCount = _ref2.getGroupCount;
|
81785 |
|
81786 |
var _useState = (0,react.useState)("menu_settings"),
|
81787 |
_useState2 = MenuDrawer_slicedToArray(_useState, 2),
|
81878 |
return openDrawer(drawers.SETTINGS, drawers.SETTINGS_PAGES.reset);
|
81879 |
},
|
81880 |
dataTestid: "menuitem:".concat(drawers.SETTINGS_PAGES.reset)
|
81881 |
+
}), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
81882 |
+
content: translate_translate("buttonizer_tour.tour_disabled"),
|
81883 |
+
disabled: !getGroupCount() < 1
|
81884 |
+
}, /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement(DisableSetting, {
|
81885 |
+
condition: getGroupCount() < 1
|
81886 |
+
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
81887 |
title: translate_translate("settings_window.buttonizer_tour.title"),
|
81888 |
description: translate_translate("settings_window.buttonizer_tour.description"),
|
81889 |
onClick: function onClick() {
|
81891 |
},
|
81892 |
dataTestid: "menuitem:".concat(drawers.BUTTONIZER_TOUR),
|
81893 |
className: "menu-item buttonizer-tour"
|
81894 |
+
}))))), /*#__PURE__*/react.createElement(CollapsibleGroup, {
|
81895 |
title: "".concat(translate_translate("page_rules.name"), " & ").concat(translate_translate("time_schedules.name")),
|
81896 |
opened: openedGroup === "pageRules",
|
81897 |
onSetIsOpened: function onSetIsOpened(val) {
|
82392 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Drawers/DrawerSplitter/DrawerSplitterContentTitle/DrawerSplitterContentTitle.js
|
82393 |
|
82394 |
|
82395 |
+
|
82396 |
function DrawerSplitterContentTitle(_ref) {
|
82397 |
var _ref$title = _ref.title,
|
82398 |
+
title = _ref$title === void 0 ? "" : _ref$title,
|
82399 |
+
_ref$top = _ref.top,
|
82400 |
+
top = _ref$top === void 0 ? false : _ref$top;
|
82401 |
return /*#__PURE__*/react.createElement("div", {
|
82402 |
+
className: (0,clsx_m/* default */.Z)("drawer-splitter-content-title", top && "top")
|
82403 |
}, title);
|
82404 |
}
|
82405 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Drawers/SettingsDialog/SettingsPages/Reset.js
|
83366 |
|
83367 |
function Drawers(_ref) {
|
83368 |
var _ref$loaded = _ref.loaded,
|
83369 |
+
loaded = _ref$loaded === void 0 ? false : _ref$loaded,
|
83370 |
+
getGroupCount = _ref.getGroupCount;
|
83371 |
var match = useRouteMatch({
|
83372 |
path: "(.*)/(".concat(Object.values(drawers).filter(function (drawer) {
|
83373 |
return typeof drawer == "string";
|
83380 |
};
|
83381 |
|
83382 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MenuDrawer, {
|
83383 |
+
getGroupCount: getGroupCount,
|
83384 |
open: loaded && match !== null && match.params[1] === drawers.MENU,
|
83385 |
page: match !== null && match.params[1] === drawers.MENU && match.params.page !== null && match.params.page,
|
83386 |
onClose: function onClose() {
|
84683 |
|
84684 |
|
84685 |
|
84686 |
+
|
84687 |
function UrlBar(_ref) {
|
84688 |
var _ref$loading = _ref.loading,
|
84689 |
loading = _ref$loading === void 0 ? true : _ref$loading;
|
84777 |
}
|
84778 |
}
|
84779 |
})), /*#__PURE__*/react.createElement(Grid_Grid, {
|
84780 |
+
item: true,
|
84781 |
+
style: {
|
84782 |
+
padding: "8px 0"
|
84783 |
+
}
|
84784 |
+
}, /*#__PURE__*/react.createElement(EventsButton, null)), /*#__PURE__*/react.createElement(Grid_Grid, {
|
84785 |
item: true
|
84786 |
}, /*#__PURE__*/react.createElement(ButtonGroup_ButtonGroup, {
|
|
|
84787 |
ref: buttonRef,
|
84788 |
"aria-label": "split button"
|
84789 |
}, /*#__PURE__*/react.createElement(esm_Button_Button, {
|
84790 |
+
className: "button-preview-url",
|
84791 |
onClick: function onClick() {
|
84792 |
return handlePageChange();
|
84793 |
},
|
84794 |
+
variant: "contained",
|
84795 |
color: "primary"
|
84796 |
+
}, "Preview")), !app.hasPremium() && /*#__PURE__*/react.createElement(esm_Button_Button, {
|
84797 |
+
className: "button-preview-url",
|
84798 |
+
style: {
|
84799 |
+
marginLeft: "5px"
|
84800 |
+
},
|
84801 |
+
href: "https://app.buttonizer.pro/upgrade",
|
84802 |
+
target: "_blank",
|
84803 |
+
variant: "contained",
|
84804 |
+
color: "secondary"
|
84805 |
+
}, "Upgrade"))));
|
84806 |
}
|
84807 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/AdminNotifications/style.module.scss
|
84808 |
// extracted by mini-css-extract-plugin
|
85006 |
|
85007 |
|
85008 |
|
85009 |
+
|
85010 |
|
85011 |
|
85012 |
|
85031 |
|
85032 |
_this.frameUrl = props.frameUrl;
|
85033 |
_this.loading = props.loading;
|
85034 |
+
_this.getGroupCount = props.getGroupCount;
|
85035 |
_this.state = {
|
85036 |
hasError: false,
|
85037 |
error: "",
|
85147 |
slowWebsite: this.props.loading.loadingSlowWebsite,
|
85148 |
show: this.props.loading.showLoading
|
85149 |
}), /*#__PURE__*/react.createElement(Drawers, {
|
85150 |
+
loaded: this.props.loading.loaded,
|
85151 |
+
getGroupCount: this.props.getGroupCount
|
85152 |
}), /*#__PURE__*/react.createElement(Bar, {
|
85153 |
loading: !this.props.loading.loaded,
|
85154 |
isLoadingSite: this.props.loading.showLoading
|
85380 |
_premium: store.misc._premium,
|
85381 |
isPremiumCode: store.misc._premiumCode,
|
85382 |
hasChanges: store.misc.hasChanges,
|
85383 |
+
welcome: store.settings.welcome,
|
85384 |
+
getGroupCount: function getGroupCount() {
|
85385 |
+
return selectors_getGroupCount(store);
|
85386 |
+
}
|
85387 |
};
|
85388 |
}, {
|
85389 |
addRecord: dataActions_addRecord,
|
85392 |
changeHasChanges: changeHasChanges,
|
85393 |
stopLoading: stopLoading
|
85394 |
})(App_App));
|
85395 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/logger.js
|
85396 |
+
var esm_logger = __webpack_require__(12343);
|
85397 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/flags.js
|
85398 |
+
/*
|
85399 |
+
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
|
85400 |
+
* for users.
|
85401 |
+
*
|
85402 |
+
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
|
85403 |
+
* because some build tools have trouble tree-shaking imported guards.
|
85404 |
+
*
|
85405 |
+
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
|
85406 |
+
*
|
85407 |
+
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
|
85408 |
+
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
|
85409 |
+
* replaced.
|
85410 |
+
*/
|
85411 |
+
/** Flag that is true for debug builds, false otherwise. */
|
85412 |
+
var flags_IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
|
85413 |
+
//# sourceMappingURL=flags.js.map
|
85414 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/sdk.js
|
85415 |
|
85416 |
|
85417 |
+
|
85418 |
/**
|
85419 |
* Internal function to create a new SDK client instance. The client is
|
85420 |
* installed and then bound to the current scope.
|
85424 |
*/
|
85425 |
function initAndBind(clientClass, options) {
|
85426 |
if (options.debug === true) {
|
85427 |
+
if (flags_IS_DEBUG_BUILD) {
|
85428 |
+
esm_logger/* logger.enable */.kg.enable();
|
85429 |
+
}
|
85430 |
+
else {
|
85431 |
+
// use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped
|
85432 |
+
// eslint-disable-next-line no-console
|
85433 |
+
console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
|
85434 |
+
}
|
85435 |
+
}
|
85436 |
+
var hub = (0,esm_hub/* getCurrentHub */.Gd)();
|
85437 |
+
var scope = hub.getScope();
|
85438 |
+
if (scope) {
|
85439 |
+
scope.update(options.initialScope);
|
85440 |
}
|
|
|
85441 |
var client = new clientClass(options);
|
85442 |
hub.bindClient(client);
|
85443 |
}
|
85444 |
//# sourceMappingURL=sdk.js.map
|
85445 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/misc.js
|
85446 |
+
var misc = __webpack_require__(62844);
|
85447 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/string.js
|
85448 |
+
var string = __webpack_require__(57321);
|
85449 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integrations/inboundfilters.js
|
85450 |
|
85451 |
|
85466 |
/**
|
85467 |
* @inheritDoc
|
85468 |
*/
|
85469 |
+
InboundFilters.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {
|
85470 |
addGlobalEventProcessor(function (event) {
|
85471 |
+
var hub = getCurrentHub();
|
85472 |
+
if (hub) {
|
85473 |
+
var self_1 = hub.getIntegration(InboundFilters);
|
85474 |
+
if (self_1) {
|
85475 |
+
var client = hub.getClient();
|
85476 |
+
var clientOptions = client ? client.getOptions() : {};
|
85477 |
+
var options = _mergeOptions(self_1._options, clientOptions);
|
85478 |
+
return _shouldDropEvent(event, options) ? null : event;
|
|
|
|
|
|
|
85479 |
}
|
85480 |
}
|
85481 |
return event;
|
85482 |
});
|
85483 |
};
|
85484 |
+
/**
|
85485 |
+
* @inheritDoc
|
85486 |
+
*/
|
85487 |
+
InboundFilters.id = 'InboundFilters';
|
85488 |
+
return InboundFilters;
|
85489 |
+
}());
|
85490 |
+
|
85491 |
+
/** JSDoc */
|
85492 |
+
function _mergeOptions(internalOptions, clientOptions) {
|
85493 |
+
if (internalOptions === void 0) { internalOptions = {}; }
|
85494 |
+
if (clientOptions === void 0) { clientOptions = {}; }
|
85495 |
+
return {
|
85496 |
+
allowUrls: (0,tslib_es6/* __spread */.fl)((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),
|
85497 |
+
denyUrls: (0,tslib_es6/* __spread */.fl)((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),
|
85498 |
+
ignoreErrors: (0,tslib_es6/* __spread */.fl)((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),
|
85499 |
+
ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85500 |
};
|
85501 |
+
}
|
85502 |
+
/** JSDoc */
|
85503 |
+
function _shouldDropEvent(event, options) {
|
85504 |
+
if (options.ignoreInternal && _isSentryError(event)) {
|
85505 |
+
flags_IS_DEBUG_BUILD &&
|
85506 |
+
esm_logger/* logger.warn */.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: " + (0,misc/* getEventDescription */.jH)(event));
|
85507 |
+
return true;
|
85508 |
+
}
|
85509 |
+
if (_isIgnoredError(event, options.ignoreErrors)) {
|
85510 |
+
flags_IS_DEBUG_BUILD &&
|
85511 |
+
esm_logger/* logger.warn */.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + (0,misc/* getEventDescription */.jH)(event));
|
85512 |
+
return true;
|
85513 |
+
}
|
85514 |
+
if (_isDeniedUrl(event, options.denyUrls)) {
|
85515 |
+
flags_IS_DEBUG_BUILD &&
|
85516 |
+
esm_logger/* logger.warn */.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: " + (0,misc/* getEventDescription */.jH)(event) + ".\nUrl: " + _getEventFilterUrl(event));
|
85517 |
+
return true;
|
85518 |
+
}
|
85519 |
+
if (!_isAllowedUrl(event, options.allowUrls)) {
|
85520 |
+
flags_IS_DEBUG_BUILD &&
|
85521 |
+
esm_logger/* logger.warn */.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: " + (0,misc/* getEventDescription */.jH)(event) + ".\nUrl: " + _getEventFilterUrl(event));
|
85522 |
+
return true;
|
85523 |
+
}
|
85524 |
+
return false;
|
85525 |
+
}
|
85526 |
+
function _isIgnoredError(event, ignoreErrors) {
|
85527 |
+
if (!ignoreErrors || !ignoreErrors.length) {
|
85528 |
+
return false;
|
85529 |
+
}
|
85530 |
+
return _getPossibleEventMessages(event).some(function (message) {
|
85531 |
+
return ignoreErrors.some(function (pattern) { return (0,string/* isMatchingPattern */.zC)(message, pattern); });
|
85532 |
+
});
|
85533 |
+
}
|
85534 |
+
function _isDeniedUrl(event, denyUrls) {
|
85535 |
+
// TODO: Use Glob instead?
|
85536 |
+
if (!denyUrls || !denyUrls.length) {
|
85537 |
+
return false;
|
85538 |
+
}
|
85539 |
+
var url = _getEventFilterUrl(event);
|
85540 |
+
return !url ? false : denyUrls.some(function (pattern) { return (0,string/* isMatchingPattern */.zC)(url, pattern); });
|
85541 |
+
}
|
85542 |
+
function _isAllowedUrl(event, allowUrls) {
|
85543 |
+
// TODO: Use Glob instead?
|
85544 |
+
if (!allowUrls || !allowUrls.length) {
|
85545 |
+
return true;
|
85546 |
+
}
|
85547 |
+
var url = _getEventFilterUrl(event);
|
85548 |
+
return !url ? true : allowUrls.some(function (pattern) { return (0,string/* isMatchingPattern */.zC)(url, pattern); });
|
85549 |
+
}
|
85550 |
+
function _getPossibleEventMessages(event) {
|
85551 |
+
if (event.message) {
|
85552 |
+
return [event.message];
|
85553 |
+
}
|
85554 |
+
if (event.exception) {
|
85555 |
+
try {
|
85556 |
+
var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;
|
85557 |
+
return ["" + value, type + ": " + value];
|
85558 |
}
|
85559 |
+
catch (oO) {
|
85560 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error("Cannot extract message for event " + (0,misc/* getEventDescription */.jH)(event));
|
85561 |
+
return [];
|
|
|
|
|
|
|
|
|
|
|
|
|
85562 |
}
|
85563 |
+
}
|
85564 |
+
return [];
|
85565 |
+
}
|
85566 |
+
function _isSentryError(event) {
|
85567 |
+
try {
|
85568 |
+
// @ts-ignore can't be a sentry error if undefined
|
85569 |
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
85570 |
+
return event.exception.values[0].type === 'SentryError';
|
85571 |
+
}
|
85572 |
+
catch (e) {
|
85573 |
+
// ignore
|
85574 |
+
}
|
85575 |
+
return false;
|
85576 |
+
}
|
85577 |
+
function _getLastValidUrl(frames) {
|
85578 |
+
if (frames === void 0) { frames = []; }
|
85579 |
+
for (var i = frames.length - 1; i >= 0; i--) {
|
85580 |
+
var frame = frames[i];
|
85581 |
+
if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {
|
85582 |
+
return frame.filename || null;
|
85583 |
+
}
|
85584 |
+
}
|
85585 |
+
return null;
|
85586 |
+
}
|
85587 |
+
function _getEventFilterUrl(event) {
|
85588 |
+
try {
|
85589 |
+
if (event.stacktrace) {
|
85590 |
+
return _getLastValidUrl(event.stacktrace.frames);
|
85591 |
+
}
|
85592 |
+
var frames_1;
|
85593 |
try {
|
85594 |
+
// @ts-ignore we only care about frames if the whole thing here is defined
|
85595 |
+
frames_1 = event.exception.values[0].stacktrace.frames;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85596 |
}
|
85597 |
+
catch (e) {
|
85598 |
+
// ignore
|
|
|
85599 |
}
|
85600 |
+
return frames_1 ? _getLastValidUrl(frames_1) : null;
|
85601 |
+
}
|
85602 |
+
catch (oO) {
|
85603 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error("Cannot extract url for event " + (0,misc/* getEventDescription */.jH)(event));
|
85604 |
+
return null;
|
85605 |
+
}
|
85606 |
+
}
|
|
|
85607 |
//# sourceMappingURL=inboundfilters.js.map
|
85608 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/object.js
|
85609 |
+
var object = __webpack_require__(20535);
|
85610 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integrations/functiontostring.js
|
85611 |
+
|
85612 |
var originalFunctionToString;
|
85613 |
/** Patch toString calls to return proper name for wrapped functions */
|
85614 |
var FunctionToString = /** @class */ (function () {
|
85630 |
for (var _i = 0; _i < arguments.length; _i++) {
|
85631 |
args[_i] = arguments[_i];
|
85632 |
}
|
85633 |
+
var context = (0,object/* getOriginalFunction */.HK)(this) || this;
|
85634 |
return originalFunctionToString.apply(context, args);
|
85635 |
};
|
85636 |
};
|
85642 |
}());
|
85643 |
|
85644 |
//# sourceMappingURL=functiontostring.js.map
|
85645 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/global.js
|
85646 |
+
var esm_global = __webpack_require__(82991);
|
85647 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/instrument.js
|
85648 |
+
var instrument = __webpack_require__(9732);
|
85649 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/version.js
|
85650 |
+
var SDK_VERSION = '6.19.7';
|
85651 |
+
//# sourceMappingURL=version.js.map
|
85652 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/hub/esm/scope.js
|
85653 |
+
var esm_scope = __webpack_require__(46769);
|
85654 |
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/polyfill.js
|
85655 |
var polyfill_setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
|
85656 |
/**
|
85668 |
// eslint-disable-next-line @typescript-eslint/ban-types
|
85669 |
function mixinProperties(obj, proto) {
|
85670 |
for (var prop in proto) {
|
85671 |
+
if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
|
|
|
85672 |
// @ts-ignore typescript complains about indexing so we remove
|
85673 |
obj[prop] = proto[prop];
|
85674 |
}
|
85681 |
|
85682 |
/** An error emitted by Sentry SDKs and related utilities. */
|
85683 |
var SentryError = /** @class */ (function (_super) {
|
85684 |
+
(0,tslib_es6/* __extends */.ZT)(SentryError, _super);
|
85685 |
function SentryError(message) {
|
85686 |
var _newTarget = this.constructor;
|
85687 |
var _this = _super.call(this, message) || this;
|
85694 |
}(Error));
|
85695 |
|
85696 |
//# sourceMappingURL=error.js.map
|
85697 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/flags.js
|
85698 |
+
var flags = __webpack_require__(88795);
|
85699 |
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/dsn.js
|
85700 |
|
85701 |
|
85702 |
+
|
85703 |
/** Regular expression used to parse a Dsn. */
|
85704 |
var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
85705 |
+
function isValidProtocol(protocol) {
|
85706 |
+
return protocol === 'http' || protocol === 'https';
|
85707 |
+
}
|
85708 |
+
/**
|
85709 |
+
* Renders the string representation of this Dsn.
|
85710 |
+
*
|
85711 |
+
* By default, this will render the public representation without the password
|
85712 |
+
* component. To get the deprecated private representation, set `withPassword`
|
85713 |
+
* to true.
|
85714 |
+
*
|
85715 |
+
* @param withPassword When set to true, the password will be included.
|
85716 |
+
*/
|
85717 |
+
function dsnToString(dsn, withPassword) {
|
85718 |
+
if (withPassword === void 0) { withPassword = false; }
|
85719 |
+
var host = dsn.host, path = dsn.path, pass = dsn.pass, port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol, publicKey = dsn.publicKey;
|
85720 |
+
return (protocol + "://" + publicKey + (withPassword && pass ? ":" + pass : '') +
|
85721 |
+
("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId));
|
85722 |
+
}
|
85723 |
+
function dsnFromString(str) {
|
85724 |
+
var match = DSN_REGEX.exec(str);
|
85725 |
+
if (!match) {
|
85726 |
+
throw new SentryError("Invalid Sentry Dsn: " + str);
|
85727 |
+
}
|
85728 |
+
var _a = (0,tslib_es6/* __read */.CR)(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];
|
85729 |
+
var path = '';
|
85730 |
+
var projectId = lastPath;
|
85731 |
+
var split = projectId.split('/');
|
85732 |
+
if (split.length > 1) {
|
85733 |
+
path = split.slice(0, -1).join('/');
|
85734 |
+
projectId = split.pop();
|
85735 |
+
}
|
85736 |
+
if (projectId) {
|
85737 |
+
var projectMatch = projectId.match(/^\d+/);
|
85738 |
+
if (projectMatch) {
|
85739 |
+
projectId = projectMatch[0];
|
85740 |
}
|
85741 |
+
}
|
85742 |
+
return dsnFromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });
|
85743 |
+
}
|
85744 |
+
function dsnFromComponents(components) {
|
85745 |
+
// TODO this is for backwards compatibility, and can be removed in a future version
|
85746 |
+
if ('user' in components && !('publicKey' in components)) {
|
85747 |
+
components.publicKey = components.user;
|
85748 |
+
}
|
85749 |
+
return {
|
85750 |
+
user: components.publicKey || '',
|
85751 |
+
protocol: components.protocol,
|
85752 |
+
publicKey: components.publicKey || '',
|
85753 |
+
pass: components.pass || '',
|
85754 |
+
host: components.host,
|
85755 |
+
port: components.port || '',
|
85756 |
+
path: components.path || '',
|
85757 |
+
projectId: components.projectId,
|
85758 |
+
};
|
85759 |
+
}
|
85760 |
+
function validateDsn(dsn) {
|
85761 |
+
if (!flags/* IS_DEBUG_BUILD */.h) {
|
85762 |
+
return;
|
85763 |
+
}
|
85764 |
+
var port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol;
|
85765 |
+
var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
|
85766 |
+
requiredComponents.forEach(function (component) {
|
85767 |
+
if (!dsn[component]) {
|
85768 |
+
throw new SentryError("Invalid Sentry Dsn: " + component + " missing");
|
85769 |
}
|
85770 |
+
});
|
85771 |
+
if (!projectId.match(/^\d+$/)) {
|
85772 |
+
throw new SentryError("Invalid Sentry Dsn: Invalid projectId " + projectId);
|
85773 |
}
|
85774 |
+
if (!isValidProtocol(protocol)) {
|
85775 |
+
throw new SentryError("Invalid Sentry Dsn: Invalid protocol " + protocol);
|
85776 |
+
}
|
85777 |
+
if (port && isNaN(parseInt(port, 10))) {
|
85778 |
+
throw new SentryError("Invalid Sentry Dsn: Invalid port " + port);
|
85779 |
+
}
|
85780 |
+
return true;
|
85781 |
+
}
|
85782 |
+
/** The Sentry Dsn, identifying a Sentry instance and project. */
|
85783 |
+
function makeDsn(from) {
|
85784 |
+
var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
|
85785 |
+
validateDsn(components);
|
85786 |
+
return components;
|
85787 |
+
}
|
85788 |
+
//# sourceMappingURL=dsn.js.map
|
85789 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/is.js
|
85790 |
+
var esm_is = __webpack_require__(67597);
|
85791 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/syncpromise.js
|
85792 |
+
var syncpromise = __webpack_require__(96893);
|
85793 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/time.js
|
85794 |
+
var time = __webpack_require__(21170);
|
85795 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/memo.js
|
85796 |
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
85797 |
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
85798 |
+
/**
|
85799 |
+
* Helper to decycle json objects
|
85800 |
+
*/
|
85801 |
+
function memoBuilder() {
|
85802 |
+
var hasWeakSet = typeof WeakSet === 'function';
|
85803 |
+
var inner = hasWeakSet ? new WeakSet() : [];
|
85804 |
+
function memoize(obj) {
|
85805 |
+
if (hasWeakSet) {
|
85806 |
+
if (inner.has(obj)) {
|
85807 |
+
return true;
|
85808 |
}
|
85809 |
+
inner.add(obj);
|
85810 |
+
return false;
|
85811 |
}
|
85812 |
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
85813 |
+
for (var i = 0; i < inner.length; i++) {
|
85814 |
+
var value = inner[i];
|
85815 |
+
if (value === obj) {
|
85816 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85817 |
}
|
|
|
|
|
|
|
85818 |
}
|
85819 |
+
inner.push(obj);
|
85820 |
+
return false;
|
85821 |
+
}
|
85822 |
+
function unmemoize(obj) {
|
85823 |
+
if (hasWeakSet) {
|
85824 |
+
inner.delete(obj);
|
85825 |
}
|
85826 |
+
else {
|
85827 |
+
for (var i = 0; i < inner.length; i++) {
|
85828 |
+
if (inner[i] === obj) {
|
85829 |
+
inner.splice(i, 1);
|
85830 |
+
break;
|
85831 |
+
}
|
85832 |
+
}
|
85833 |
}
|
85834 |
+
}
|
85835 |
+
return [memoize, unmemoize];
|
85836 |
+
}
|
85837 |
+
//# sourceMappingURL=memo.js.map
|
85838 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/stacktrace.js
|
85839 |
+
var esm_stacktrace = __webpack_require__(30360);
|
85840 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/normalize.js
|
85841 |
|
85842 |
+
|
85843 |
+
|
85844 |
+
|
85845 |
+
|
85846 |
+
/**
|
85847 |
+
* Recursively normalizes the given object.
|
85848 |
+
*
|
85849 |
+
* - Creates a copy to prevent original input mutation
|
85850 |
+
* - Skips non-enumerable properties
|
85851 |
+
* - When stringifying, calls `toJSON` if implemented
|
85852 |
+
* - Removes circular references
|
85853 |
+
* - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format
|
85854 |
+
* - Translates known global objects/classes to a string representations
|
85855 |
+
* - Takes care of `Error` object serialization
|
85856 |
+
* - Optionally limits depth of final output
|
85857 |
+
* - Optionally limits number of properties/elements included in any single object/array
|
85858 |
+
*
|
85859 |
+
* @param input The object to be normalized.
|
85860 |
+
* @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)
|
85861 |
+
* @param maxProperties The max number of elements or properties to be included in any single array or
|
85862 |
+
* object in the normallized output..
|
85863 |
+
* @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization.
|
85864 |
+
*/
|
85865 |
+
function normalize(input, depth, maxProperties) {
|
85866 |
+
if (depth === void 0) { depth = +Infinity; }
|
85867 |
+
if (maxProperties === void 0) { maxProperties = +Infinity; }
|
85868 |
+
try {
|
85869 |
+
// since we're at the outermost level, there is no key
|
85870 |
+
return visit('', input, depth, maxProperties);
|
85871 |
+
}
|
85872 |
+
catch (err) {
|
85873 |
+
return { ERROR: "**non-serializable** (" + err + ")" };
|
85874 |
+
}
|
85875 |
+
}
|
85876 |
+
/** JSDoc */
|
85877 |
+
function normalizeToSize(object,
|
85878 |
+
// Default Node.js REPL depth
|
85879 |
+
depth,
|
85880 |
+
// 100kB, as 200kB is max payload size, so half sounds reasonable
|
85881 |
+
maxSize) {
|
85882 |
+
if (depth === void 0) { depth = 3; }
|
85883 |
+
if (maxSize === void 0) { maxSize = 100 * 1024; }
|
85884 |
+
var normalized = normalize(object, depth);
|
85885 |
+
if (jsonSize(normalized) > maxSize) {
|
85886 |
+
return normalizeToSize(object, depth - 1, maxSize);
|
85887 |
+
}
|
85888 |
+
return normalized;
|
85889 |
+
}
|
85890 |
+
/**
|
85891 |
+
* Visits a node to perform normalization on it
|
85892 |
+
*
|
85893 |
+
* @param key The key corresponding to the given node
|
85894 |
+
* @param value The node to be visited
|
85895 |
+
* @param depth Optional number indicating the maximum recursion depth
|
85896 |
+
* @param maxProperties Optional maximum number of properties/elements included in any single object/array
|
85897 |
+
* @param memo Optional Memo class handling decycling
|
85898 |
+
*/
|
85899 |
+
function visit(key, value, depth, maxProperties, memo) {
|
85900 |
+
if (depth === void 0) { depth = +Infinity; }
|
85901 |
+
if (maxProperties === void 0) { maxProperties = +Infinity; }
|
85902 |
+
if (memo === void 0) { memo = memoBuilder(); }
|
85903 |
+
var _a = (0,tslib_es6/* __read */.CR)(memo, 2), memoize = _a[0], unmemoize = _a[1];
|
85904 |
+
// If the value has a `toJSON` method, see if we can bail and let it do the work
|
85905 |
+
var valueWithToJSON = value;
|
85906 |
+
if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {
|
85907 |
+
try {
|
85908 |
+
return valueWithToJSON.toJSON();
|
85909 |
+
}
|
85910 |
+
catch (err) {
|
85911 |
+
// pass (The built-in `toJSON` failed, but we can still try to do it ourselves)
|
85912 |
+
}
|
85913 |
+
}
|
85914 |
+
// Get the simple cases out of the way first
|
85915 |
+
if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !(0,esm_is/* isNaN */.i2)(value))) {
|
85916 |
+
return value;
|
85917 |
+
}
|
85918 |
+
var stringified = stringifyValue(key, value);
|
85919 |
+
// Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`.
|
85920 |
+
// Everything else will have already been serialized, so if we don't see that pattern, we're done.
|
85921 |
+
if (!stringified.startsWith('[object ')) {
|
85922 |
+
return stringified;
|
85923 |
+
}
|
85924 |
+
// We're also done if we've reached the max depth
|
85925 |
+
if (depth === 0) {
|
85926 |
+
// At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`.
|
85927 |
+
return stringified.replace('object ', '');
|
85928 |
+
}
|
85929 |
+
// If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.
|
85930 |
+
if (memoize(value)) {
|
85931 |
+
return '[Circular ~]';
|
85932 |
+
}
|
85933 |
+
// At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse
|
85934 |
+
// because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each
|
85935 |
+
// property/entry, and keep track of the number of items we add to it.
|
85936 |
+
var normalized = (Array.isArray(value) ? [] : {});
|
85937 |
+
var numAdded = 0;
|
85938 |
+
// Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant
|
85939 |
+
// properties are non-enumerable and otherwise would get missed.
|
85940 |
+
var visitable = ((0,esm_is/* isError */.VZ)(value) || (0,esm_is/* isEvent */.cO)(value) ? (0,object/* convertToPlainObject */.Sh)(value) : value);
|
85941 |
+
for (var visitKey in visitable) {
|
85942 |
+
// Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.
|
85943 |
+
if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
|
85944 |
+
continue;
|
85945 |
+
}
|
85946 |
+
if (numAdded >= maxProperties) {
|
85947 |
+
normalized[visitKey] = '[MaxProperties ~]';
|
85948 |
+
break;
|
85949 |
+
}
|
85950 |
+
// Recursively visit all the child nodes
|
85951 |
+
var visitValue = visitable[visitKey];
|
85952 |
+
normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);
|
85953 |
+
numAdded += 1;
|
85954 |
+
}
|
85955 |
+
// Once we've visited all the branches, remove the parent from memo storage
|
85956 |
+
unmemoize(value);
|
85957 |
+
// Return accumulated values
|
85958 |
+
return normalized;
|
85959 |
+
}
|
85960 |
+
// TODO remove this in v7 (this means the method will no longer be exported, under any name)
|
85961 |
+
|
85962 |
+
/**
|
85963 |
+
* Stringify the given value. Handles various known special values and types.
|
85964 |
+
*
|
85965 |
+
* Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn
|
85966 |
+
* the number 1231 into "[Object Number]", nor on `null`, as it will throw.
|
85967 |
+
*
|
85968 |
+
* @param value The value to stringify
|
85969 |
+
* @returns A stringified representation of the given value
|
85970 |
+
*/
|
85971 |
+
function stringifyValue(key,
|
85972 |
+
// this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for
|
85973 |
+
// our internal use, it'll do
|
85974 |
+
value) {
|
85975 |
+
try {
|
85976 |
+
if (key === 'domain' && value && typeof value === 'object' && value._events) {
|
85977 |
+
return '[Domain]';
|
85978 |
+
}
|
85979 |
+
if (key === 'domainEmitter') {
|
85980 |
+
return '[DomainEmitter]';
|
85981 |
+
}
|
85982 |
+
// It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first
|
85983 |
+
// which won't throw if they are not present.
|
85984 |
+
if (typeof __webpack_require__.g !== 'undefined' && value === __webpack_require__.g) {
|
85985 |
+
return '[Global]';
|
85986 |
+
}
|
85987 |
+
// eslint-disable-next-line no-restricted-globals
|
85988 |
+
if (typeof window !== 'undefined' && value === window) {
|
85989 |
+
return '[Window]';
|
85990 |
+
}
|
85991 |
+
// eslint-disable-next-line no-restricted-globals
|
85992 |
+
if (typeof document !== 'undefined' && value === document) {
|
85993 |
+
return '[Document]';
|
85994 |
+
}
|
85995 |
+
// React's SyntheticEvent thingy
|
85996 |
+
if ((0,esm_is/* isSyntheticEvent */.Cy)(value)) {
|
85997 |
+
return '[SyntheticEvent]';
|
85998 |
+
}
|
85999 |
+
if (typeof value === 'number' && value !== value) {
|
86000 |
+
return '[NaN]';
|
86001 |
+
}
|
86002 |
+
// this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)
|
86003 |
+
if (value === void 0) {
|
86004 |
+
return '[undefined]';
|
86005 |
+
}
|
86006 |
+
if (typeof value === 'function') {
|
86007 |
+
return "[Function: " + (0,esm_stacktrace/* getFunctionName */.$P)(value) + "]";
|
86008 |
+
}
|
86009 |
+
if (typeof value === 'symbol') {
|
86010 |
+
return "[" + String(value) + "]";
|
86011 |
+
}
|
86012 |
+
// stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion
|
86013 |
+
if (typeof value === 'bigint') {
|
86014 |
+
return "[BigInt: " + String(value) + "]";
|
86015 |
+
}
|
86016 |
+
// Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting
|
86017 |
+
// them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as
|
86018 |
+
// `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class),
|
86019 |
+
// we can make sure that only plain objects come out that way.
|
86020 |
+
return "[object " + Object.getPrototypeOf(value).constructor.name + "]";
|
86021 |
+
}
|
86022 |
+
catch (err) {
|
86023 |
+
return "**non-serializable** (" + err + ")";
|
86024 |
+
}
|
86025 |
+
}
|
86026 |
+
/** Calculates bytes size of input string */
|
86027 |
+
function utf8Length(value) {
|
86028 |
+
// eslint-disable-next-line no-bitwise
|
86029 |
+
return ~-encodeURI(value).split(/%..|./).length;
|
86030 |
+
}
|
86031 |
+
/** Calculates bytes size of input object */
|
86032 |
+
function jsonSize(value) {
|
86033 |
+
return utf8Length(JSON.stringify(value));
|
86034 |
+
}
|
86035 |
+
//# sourceMappingURL=normalize.js.map
|
86036 |
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/integration.js
|
86037 |
|
86038 |
|
86039 |
|
86040 |
+
|
86041 |
var installedIntegrations = [];
|
86042 |
+
/**
|
86043 |
+
* @private
|
86044 |
+
*/
|
86045 |
+
function filterDuplicates(integrations) {
|
86046 |
+
return integrations.reduce(function (acc, integrations) {
|
86047 |
+
if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {
|
86048 |
+
acc.push(integrations);
|
86049 |
+
}
|
86050 |
+
return acc;
|
86051 |
+
}, []);
|
86052 |
+
}
|
86053 |
/** Gets integration to install */
|
86054 |
function getIntegrationsToSetup(options) {
|
86055 |
+
var defaultIntegrations = (options.defaultIntegrations && (0,tslib_es6/* __spread */.fl)(options.defaultIntegrations)) || [];
|
86056 |
var userIntegrations = options.integrations;
|
86057 |
+
var integrations = (0,tslib_es6/* __spread */.fl)(filterDuplicates(defaultIntegrations));
|
86058 |
if (Array.isArray(userIntegrations)) {
|
86059 |
+
// Filter out integrations that are also included in user options
|
86060 |
+
integrations = (0,tslib_es6/* __spread */.fl)(integrations.filter(function (integrations) {
|
86061 |
+
return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });
|
86062 |
+
}), filterDuplicates(userIntegrations));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86063 |
}
|
86064 |
else if (typeof userIntegrations === 'function') {
|
86065 |
+
integrations = userIntegrations(integrations);
|
86066 |
integrations = Array.isArray(integrations) ? integrations : [integrations];
|
86067 |
}
|
|
|
|
|
|
|
86068 |
// Make sure that if present, `Debug` integration will always run last
|
86069 |
var integrationsNames = integrations.map(function (i) { return i.name; });
|
86070 |
var alwaysLastToRun = 'Debug';
|
86071 |
if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
|
86072 |
+
integrations.push.apply(integrations, (0,tslib_es6/* __spread */.fl)(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));
|
86073 |
}
|
86074 |
return integrations;
|
86075 |
}
|
86078 |
if (installedIntegrations.indexOf(integration.name) !== -1) {
|
86079 |
return;
|
86080 |
}
|
86081 |
+
integration.setupOnce(esm_scope/* addGlobalEventProcessor */.c, esm_hub/* getCurrentHub */.Gd);
|
86082 |
installedIntegrations.push(integration.name);
|
86083 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log("Integration installed: " + integration.name);
|
86084 |
}
|
86085 |
/**
|
86086 |
* Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
|
86094 |
integrations[integration.name] = integration;
|
86095 |
setupIntegration(integration);
|
86096 |
});
|
86097 |
+
// set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`
|
86098 |
+
// because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be
|
86099 |
+
// considered a member of the index the way the actual integrations are
|
86100 |
+
(0,object/* addNonEnumerableProperty */.xp)(integrations, 'initialized', true);
|
86101 |
return integrations;
|
86102 |
}
|
86103 |
//# sourceMappingURL=integration.js.map
|
86108 |
|
86109 |
|
86110 |
|
86111 |
+
var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
|
86112 |
/**
|
86113 |
* Base implementation for all JavaScript SDK clients.
|
86114 |
*
|
86123 |
* without a valid Dsn, the SDK will not send any events to Sentry.
|
86124 |
*
|
86125 |
* Before sending an event via the backend, it is passed through
|
86126 |
+
* {@link BaseClient._prepareEvent} to add SDK information and scope data
|
86127 |
* (breadcrumbs and context). To add more custom information, override this
|
86128 |
* method and extend the resulting prepared event.
|
86129 |
*
|
86151 |
function BaseClient(backendClass, options) {
|
86152 |
/** Array of used integrations. */
|
86153 |
this._integrations = {};
|
86154 |
+
/** Number of calls being processed */
|
86155 |
+
this._numProcessing = 0;
|
86156 |
this._backend = new backendClass(options);
|
86157 |
this._options = options;
|
86158 |
if (options.dsn) {
|
86159 |
+
this._dsn = makeDsn(options.dsn);
|
86160 |
}
|
86161 |
}
|
86162 |
/**
|
86165 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
86166 |
BaseClient.prototype.captureException = function (exception, hint, scope) {
|
86167 |
var _this = this;
|
86168 |
+
// ensure we haven't captured this very object before
|
86169 |
+
if ((0,misc/* checkOrSetAlreadyCaught */.YO)(exception)) {
|
86170 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log(ALREADY_SEEN_ERROR);
|
86171 |
+
return;
|
86172 |
+
}
|
86173 |
var eventId = hint && hint.event_id;
|
86174 |
this._process(this._getBackend()
|
86175 |
.eventFromException(exception, hint)
|
86185 |
BaseClient.prototype.captureMessage = function (message, level, hint, scope) {
|
86186 |
var _this = this;
|
86187 |
var eventId = hint && hint.event_id;
|
86188 |
+
var promisedEvent = (0,esm_is/* isPrimitive */.pt)(message)
|
86189 |
? this._getBackend().eventFromMessage(String(message), level, hint)
|
86190 |
: this._getBackend().eventFromException(message, hint);
|
86191 |
this._process(promisedEvent
|
86199 |
* @inheritDoc
|
86200 |
*/
|
86201 |
BaseClient.prototype.captureEvent = function (event, hint, scope) {
|
86202 |
+
// ensure we haven't captured this very object before
|
86203 |
+
if (hint && hint.originalException && (0,misc/* checkOrSetAlreadyCaught */.YO)(hint.originalException)) {
|
86204 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log(ALREADY_SEEN_ERROR);
|
86205 |
+
return;
|
86206 |
+
}
|
86207 |
var eventId = hint && hint.event_id;
|
86208 |
this._process(this._captureEvent(event, hint, scope).then(function (result) {
|
86209 |
eventId = result;
|
86214 |
* @inheritDoc
|
86215 |
*/
|
86216 |
BaseClient.prototype.captureSession = function (session) {
|
86217 |
+
if (!this._isEnabled()) {
|
86218 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn('SDK not enabled, will not capture session.');
|
86219 |
+
return;
|
86220 |
+
}
|
86221 |
+
if (!(typeof session.release === 'string')) {
|
86222 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn('Discarded session because of missing or non-string release');
|
86223 |
}
|
86224 |
else {
|
86225 |
this._sendSession(session);
|
86226 |
+
// After sending, we set init false to indicate it's not the first occurrence
|
86227 |
+
session.update({ init: false });
|
86228 |
}
|
86229 |
};
|
86230 |
/**
|
86239 |
BaseClient.prototype.getOptions = function () {
|
86240 |
return this._options;
|
86241 |
};
|
86242 |
+
/**
|
86243 |
+
* @inheritDoc
|
86244 |
+
*/
|
86245 |
+
BaseClient.prototype.getTransport = function () {
|
86246 |
+
return this._getBackend().getTransport();
|
86247 |
+
};
|
86248 |
/**
|
86249 |
* @inheritDoc
|
86250 |
*/
|
86251 |
BaseClient.prototype.flush = function (timeout) {
|
86252 |
var _this = this;
|
86253 |
+
return this._isClientDoneProcessing(timeout).then(function (clientFinished) {
|
86254 |
+
return _this.getTransport()
|
|
|
86255 |
.close(timeout)
|
86256 |
+
.then(function (transportFlushed) { return clientFinished && transportFlushed; });
|
86257 |
});
|
86258 |
};
|
86259 |
/**
|
86270 |
* Sets up the integrations
|
86271 |
*/
|
86272 |
BaseClient.prototype.setupIntegrations = function () {
|
86273 |
+
if (this._isEnabled() && !this._integrations.initialized) {
|
86274 |
this._integrations = setupIntegrations(this._options);
|
86275 |
}
|
86276 |
};
|
86282 |
return this._integrations[integration.id] || null;
|
86283 |
}
|
86284 |
catch (_oO) {
|
86285 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn("Cannot retrieve integration " + integration.id + " from the current Client");
|
86286 |
return null;
|
86287 |
}
|
86288 |
};
|
86291 |
var e_1, _a;
|
86292 |
var crashed = false;
|
86293 |
var errored = false;
|
|
|
86294 |
var exceptions = event.exception && event.exception.values;
|
86295 |
if (exceptions) {
|
86296 |
errored = true;
|
86297 |
try {
|
86298 |
+
for (var exceptions_1 = (0,tslib_es6/* __values */.XA)(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {
|
86299 |
var ex = exceptions_1_1.value;
|
86300 |
var mechanism = ex.mechanism;
|
86301 |
if (mechanism && mechanism.handled === false) {
|
86312 |
finally { if (e_1) throw e_1.error; }
|
86313 |
}
|
86314 |
}
|
86315 |
+
// A session is updated and that session update is sent in only one of the two following scenarios:
|
86316 |
+
// 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
|
86317 |
+
// 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
|
86318 |
+
var sessionNonTerminal = session.status === 'ok';
|
86319 |
+
var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);
|
86320 |
+
if (shouldUpdateAndSend) {
|
86321 |
+
session.update((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));
|
86322 |
+
this.captureSession(session);
|
|
|
86323 |
}
|
|
|
|
|
86324 |
};
|
86325 |
/** Deliver captured session to Sentry */
|
86326 |
BaseClient.prototype._sendSession = function (session) {
|
86327 |
this._getBackend().sendSession(session);
|
86328 |
};
|
86329 |
+
/**
|
86330 |
+
* Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
|
86331 |
+
* "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
|
86332 |
+
*
|
86333 |
+
* @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
|
86334 |
+
* passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
|
86335 |
+
* `true`.
|
86336 |
+
* @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
|
86337 |
+
* `false` otherwise
|
86338 |
+
*/
|
86339 |
+
BaseClient.prototype._isClientDoneProcessing = function (timeout) {
|
86340 |
var _this = this;
|
86341 |
+
return new syncpromise/* SyncPromise */.cW(function (resolve) {
|
86342 |
var ticked = 0;
|
86343 |
var tick = 1;
|
86344 |
var interval = setInterval(function () {
|
86345 |
+
if (_this._numProcessing == 0) {
|
86346 |
clearInterval(interval);
|
86347 |
resolve(true);
|
86348 |
}
|
86380 |
*/
|
86381 |
BaseClient.prototype._prepareEvent = function (event, scope, hint) {
|
86382 |
var _this = this;
|
86383 |
+
var _a = this.getOptions(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;
|
86384 |
+
var prepared = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : (0,misc/* uuid4 */.DM)()), timestamp: event.timestamp || (0,time/* dateTimestampInSeconds */.yW)() });
|
86385 |
this._applyClientOptions(prepared);
|
86386 |
this._applyIntegrationsMetadata(prepared);
|
86387 |
// If we have scope given to us, use it as the base for further modifications.
|
86388 |
// This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
|
86389 |
var finalScope = scope;
|
86390 |
if (hint && hint.captureContext) {
|
86391 |
+
finalScope = esm_scope/* Scope.clone */.s.clone(finalScope).update(hint.captureContext);
|
86392 |
}
|
86393 |
// We prepare the result here with a resolved Event.
|
86394 |
+
var result = (0,syncpromise/* resolvedSyncPromise */.WD)(prepared);
|
86395 |
// This should be the last thing called, since we want that
|
86396 |
// {@link Hub.addEventProcessor} gets the finished prepared event.
|
86397 |
if (finalScope) {
|
86399 |
result = finalScope.applyToEvent(prepared, hint);
|
86400 |
}
|
86401 |
return result.then(function (evt) {
|
86402 |
+
if (evt) {
|
86403 |
+
// TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809
|
86404 |
+
// it is only attached as extra data to the event if the event somehow skips being normalized
|
86405 |
+
evt.sdkProcessingMetadata = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, evt.sdkProcessingMetadata), { normalizeDepth: normalize(normalizeDepth) + " (" + typeof normalizeDepth + ")" });
|
86406 |
+
}
|
86407 |
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
|
86408 |
+
return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
|
86409 |
}
|
86410 |
return evt;
|
86411 |
});
|
86420 |
* @param event Event
|
86421 |
* @returns Normalized event
|
86422 |
*/
|
86423 |
+
BaseClient.prototype._normalizeEvent = function (event, depth, maxBreadth) {
|
86424 |
if (!event) {
|
86425 |
return null;
|
86426 |
}
|
86427 |
+
var normalized = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, event), (event.breadcrumbs && {
|
86428 |
+
breadcrumbs: event.breadcrumbs.map(function (b) { return ((0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, b), (b.data && {
|
86429 |
+
data: normalize(b.data, depth, maxBreadth),
|
86430 |
}))); }),
|
86431 |
})), (event.user && {
|
86432 |
+
user: normalize(event.user, depth, maxBreadth),
|
86433 |
})), (event.contexts && {
|
86434 |
+
contexts: normalize(event.contexts, depth, maxBreadth),
|
86435 |
})), (event.extra && {
|
86436 |
+
extra: normalize(event.extra, depth, maxBreadth),
|
86437 |
}));
|
86438 |
// event.contexts.trace stores information about a Transaction. Similarly,
|
86439 |
// event.spans[] stores information about child Spans. Given that a
|
86446 |
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
86447 |
normalized.contexts.trace = event.contexts.trace;
|
86448 |
}
|
86449 |
+
normalized.sdkProcessingMetadata = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, normalized.sdkProcessingMetadata), { baseClientNormalized: true });
|
86450 |
return normalized;
|
86451 |
};
|
86452 |
/**
|
86468 |
event.dist = dist;
|
86469 |
}
|
86470 |
if (event.message) {
|
86471 |
+
event.message = (0,string/* truncate */.$G)(event.message, maxValueLength);
|
86472 |
}
|
86473 |
var exception = event.exception && event.exception.values && event.exception.values[0];
|
86474 |
if (exception && exception.value) {
|
86475 |
+
exception.value = (0,string/* truncate */.$G)(exception.value, maxValueLength);
|
86476 |
}
|
86477 |
var request = event.request;
|
86478 |
if (request && request.url) {
|
86479 |
+
request.url = (0,string/* truncate */.$G)(request.url, maxValueLength);
|
86480 |
}
|
86481 |
};
|
86482 |
/**
|
86483 |
* This function adds all used integrations to the SDK info in the event.
|
86484 |
+
* @param event The event that will be filled with all integrations.
|
86485 |
*/
|
86486 |
BaseClient.prototype._applyIntegrationsMetadata = function (event) {
|
|
|
86487 |
var integrationsArray = Object.keys(this._integrations);
|
86488 |
+
if (integrationsArray.length > 0) {
|
86489 |
+
event.sdk = event.sdk || {};
|
86490 |
+
event.sdk.integrations = (0,tslib_es6/* __spread */.fl)((event.sdk.integrations || []), integrationsArray);
|
86491 |
}
|
86492 |
};
|
86493 |
/**
|
86507 |
return this._processEvent(event, hint, scope).then(function (finalEvent) {
|
86508 |
return finalEvent.event_id;
|
86509 |
}, function (reason) {
|
86510 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error(reason);
|
86511 |
return undefined;
|
86512 |
});
|
86513 |
};
|
86528 |
var _this = this;
|
86529 |
// eslint-disable-next-line @typescript-eslint/unbound-method
|
86530 |
var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;
|
86531 |
+
var transport = this.getTransport();
|
86532 |
+
function recordLostEvent(outcome, category) {
|
86533 |
+
if (transport.recordLostEvent) {
|
86534 |
+
transport.recordLostEvent(outcome, category);
|
86535 |
+
}
|
86536 |
+
}
|
86537 |
if (!this._isEnabled()) {
|
86538 |
+
return (0,syncpromise/* rejectedSyncPromise */.$2)(new SentryError('SDK not enabled, will not capture event.'));
|
86539 |
}
|
86540 |
var isTransaction = event.type === 'transaction';
|
86541 |
// 1.0 === 100% events are sent
|
86542 |
// 0.0 === 0% events are sent
|
86543 |
// Sampling for transaction happens somewhere else
|
86544 |
if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
|
86545 |
+
recordLostEvent('sample_rate', 'event');
|
86546 |
+
return (0,syncpromise/* rejectedSyncPromise */.$2)(new SentryError("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")"));
|
86547 |
}
|
86548 |
return this._prepareEvent(event, scope, hint)
|
86549 |
.then(function (prepared) {
|
86550 |
if (prepared === null) {
|
86551 |
+
recordLostEvent('event_processor', event.type || 'event');
|
86552 |
throw new SentryError('An event processor returned null, will not send event.');
|
86553 |
}
|
86554 |
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
|
86556 |
return prepared;
|
86557 |
}
|
86558 |
var beforeSendResult = beforeSend(prepared, hint);
|
86559 |
+
return _ensureBeforeSendRv(beforeSendResult);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86560 |
})
|
86561 |
.then(function (processedEvent) {
|
86562 |
if (processedEvent === null) {
|
86563 |
+
recordLostEvent('before_send', event.type || 'event');
|
86564 |
throw new SentryError('`beforeSend` returned `null`, will not send event.');
|
86565 |
}
|
86566 |
var session = scope && scope.getSession && scope.getSession();
|
86588 |
*/
|
86589 |
BaseClient.prototype._process = function (promise) {
|
86590 |
var _this = this;
|
86591 |
+
this._numProcessing += 1;
|
86592 |
+
void promise.then(function (value) {
|
86593 |
+
_this._numProcessing -= 1;
|
86594 |
return value;
|
86595 |
}, function (reason) {
|
86596 |
+
_this._numProcessing -= 1;
|
86597 |
return reason;
|
86598 |
});
|
86599 |
};
|
86600 |
return BaseClient;
|
86601 |
}());
|
86602 |
|
86603 |
+
/**
|
86604 |
+
* Verifies that return value of configured `beforeSend` is of expected type.
|
86605 |
+
*/
|
86606 |
+
function _ensureBeforeSendRv(rv) {
|
86607 |
+
var nullErr = '`beforeSend` method has to return `null` or a valid event.';
|
86608 |
+
if ((0,esm_is/* isThenable */.J8)(rv)) {
|
86609 |
+
return rv.then(function (event) {
|
86610 |
+
if (!((0,esm_is/* isPlainObject */.PO)(event) || event === null)) {
|
86611 |
+
throw new SentryError(nullErr);
|
86612 |
+
}
|
86613 |
+
return event;
|
86614 |
+
}, function (e) {
|
86615 |
+
throw new SentryError("beforeSend rejected with " + e);
|
86616 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86617 |
}
|
86618 |
+
else if (!((0,esm_is/* isPlainObject */.PO)(rv) || rv === null)) {
|
86619 |
+
throw new SentryError(nullErr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86620 |
}
|
86621 |
+
return rv;
|
86622 |
+
}
|
86623 |
+
//# sourceMappingURL=baseclient.js.map
|
86624 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/api.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86625 |
|
86626 |
+
var SENTRY_API_VERSION = '7';
|
86627 |
/**
|
86628 |
+
* Helper class to provide urls, headers and metadata that can be used to form
|
86629 |
+
* different types of requests to Sentry endpoints.
|
86630 |
+
* Supports both envelopes and regular event requests.
|
86631 |
+
*
|
86632 |
+
* @deprecated Please use APIDetails
|
86633 |
+
**/
|
86634 |
+
var API = /** @class */ (function () {
|
86635 |
+
/** Create a new instance of API */
|
86636 |
+
function API(dsn, metadata, tunnel) {
|
86637 |
+
if (metadata === void 0) { metadata = {}; }
|
86638 |
+
this.dsn = dsn;
|
86639 |
+
this._dsnObject = makeDsn(dsn);
|
86640 |
+
this.metadata = metadata;
|
86641 |
+
this._tunnel = tunnel;
|
86642 |
}
|
86643 |
+
/** Returns the Dsn object. */
|
86644 |
+
API.prototype.getDsn = function () {
|
86645 |
+
return this._dsnObject;
|
|
|
|
|
|
|
86646 |
};
|
86647 |
+
/** Does this transport force envelopes? */
|
86648 |
+
API.prototype.forceEnvelope = function () {
|
86649 |
+
return !!this._tunnel;
|
|
|
|
|
86650 |
};
|
86651 |
+
/** Returns the prefix to construct Sentry ingestion API endpoints. */
|
86652 |
+
API.prototype.getBaseApiEndpoint = function () {
|
86653 |
+
return getBaseApiEndpoint(this._dsnObject);
|
|
|
|
|
|
|
|
|
86654 |
};
|
86655 |
+
/** Returns the store endpoint URL. */
|
86656 |
+
API.prototype.getStoreEndpoint = function () {
|
86657 |
+
return getStoreEndpoint(this._dsnObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86658 |
};
|
86659 |
/**
|
86660 |
+
* Returns the store endpoint URL with auth in the query string.
|
86661 |
+
*
|
86662 |
+
* Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
|
86663 |
*/
|
86664 |
+
API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
|
86665 |
+
return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);
|
86666 |
};
|
86667 |
/**
|
86668 |
+
* Returns the envelope endpoint URL with auth in the query string.
|
86669 |
+
*
|
86670 |
+
* Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
|
86671 |
*/
|
86672 |
+
API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
|
86673 |
+
return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);
|
86674 |
};
|
86675 |
+
return API;
|
86676 |
}());
|
86677 |
|
86678 |
+
/** Initializes API Details */
|
86679 |
+
function initAPIDetails(dsn, metadata, tunnel) {
|
86680 |
+
return {
|
86681 |
+
initDsn: dsn,
|
86682 |
+
metadata: metadata || {},
|
86683 |
+
dsn: makeDsn(dsn),
|
86684 |
+
tunnel: tunnel,
|
86685 |
+
};
|
86686 |
+
}
|
86687 |
+
/** Returns the prefix to construct Sentry ingestion API endpoints. */
|
86688 |
+
function getBaseApiEndpoint(dsn) {
|
86689 |
+
var protocol = dsn.protocol ? dsn.protocol + ":" : '';
|
86690 |
+
var port = dsn.port ? ":" + dsn.port : '';
|
86691 |
+
return protocol + "//" + dsn.host + port + (dsn.path ? "/" + dsn.path : '') + "/api/";
|
86692 |
+
}
|
86693 |
+
/** Returns the ingest API endpoint for target. */
|
86694 |
+
function _getIngestEndpoint(dsn, target) {
|
86695 |
+
return "" + getBaseApiEndpoint(dsn) + dsn.projectId + "/" + target + "/";
|
86696 |
+
}
|
86697 |
+
/** Returns a URL-encoded string with auth config suitable for a query string. */
|
86698 |
+
function _encodedAuth(dsn) {
|
86699 |
+
return (0,object/* urlEncode */._j)({
|
86700 |
+
// We send only the minimum set of required information. See
|
86701 |
+
// https://github.com/getsentry/sentry-javascript/issues/2572.
|
86702 |
+
sentry_key: dsn.publicKey,
|
86703 |
+
sentry_version: SENTRY_API_VERSION,
|
86704 |
+
});
|
86705 |
+
}
|
86706 |
+
/** Returns the store endpoint URL. */
|
86707 |
+
function getStoreEndpoint(dsn) {
|
86708 |
+
return _getIngestEndpoint(dsn, 'store');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86709 |
}
|
86710 |
/**
|
86711 |
+
* Returns the store endpoint URL with auth in the query string.
|
|
|
86712 |
*
|
86713 |
+
* Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
|
86714 |
*/
|
86715 |
+
function getStoreEndpointWithUrlEncodedAuth(dsn) {
|
86716 |
+
return getStoreEndpoint(dsn) + "?" + _encodedAuth(dsn);
|
86717 |
+
}
|
86718 |
+
/** Returns the envelope endpoint URL. */
|
86719 |
+
function _getEnvelopeEndpoint(dsn) {
|
86720 |
+
return _getIngestEndpoint(dsn, 'envelope');
|
|
|
|
|
|
|
|
|
|
|
86721 |
}
|
86722 |
/**
|
86723 |
+
* Returns the envelope endpoint URL with auth in the query string.
|
|
|
86724 |
*
|
86725 |
+
* Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
|
86726 |
*/
|
86727 |
+
function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {
|
86728 |
+
return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + "?" + _encodedAuth(dsn);
|
|
|
|
|
|
|
|
|
|
|
|
|
86729 |
}
|
86730 |
/**
|
86731 |
+
* Returns an object that can be used in request headers.
|
86732 |
+
* This is needed for node and the old /store endpoint in sentry
|
|
|
|
|
86733 |
*/
|
86734 |
+
function getRequestHeaders(dsn, clientName, clientVersion) {
|
86735 |
+
// CHANGE THIS to use metadata but keep clientName and clientVersion compatible
|
86736 |
+
var header = ["Sentry sentry_version=" + SENTRY_API_VERSION];
|
86737 |
+
header.push("sentry_client=" + clientName + "/" + clientVersion);
|
86738 |
+
header.push("sentry_key=" + dsn.publicKey);
|
86739 |
+
if (dsn.pass) {
|
86740 |
+
header.push("sentry_secret=" + dsn.pass);
|
|
|
|
|
86741 |
}
|
86742 |
+
return {
|
86743 |
+
'Content-Type': 'application/json',
|
86744 |
+
'X-Sentry-Auth': header.join(', '),
|
86745 |
+
};
|
86746 |
+
}
|
86747 |
+
/** Returns the url to the report dialog endpoint. */
|
86748 |
+
function getReportDialogEndpoint(dsnLike, dialogOptions) {
|
86749 |
+
var dsn = makeDsn(dsnLike);
|
86750 |
+
var endpoint = getBaseApiEndpoint(dsn) + "embed/error-page/";
|
86751 |
+
var encodedOptions = "dsn=" + dsnToString(dsn);
|
86752 |
+
for (var key in dialogOptions) {
|
86753 |
+
if (key === 'dsn') {
|
86754 |
+
continue;
|
86755 |
+
}
|
86756 |
+
if (key === 'user') {
|
86757 |
+
if (!dialogOptions.user) {
|
86758 |
+
continue;
|
86759 |
+
}
|
86760 |
+
if (dialogOptions.user.name) {
|
86761 |
+
encodedOptions += "&name=" + encodeURIComponent(dialogOptions.user.name);
|
86762 |
+
}
|
86763 |
+
if (dialogOptions.user.email) {
|
86764 |
+
encodedOptions += "&email=" + encodeURIComponent(dialogOptions.user.email);
|
86765 |
+
}
|
86766 |
+
}
|
86767 |
+
else {
|
86768 |
+
encodedOptions += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key]);
|
86769 |
+
}
|
86770 |
}
|
86771 |
+
return endpoint + "?" + encodedOptions;
|
86772 |
}
|
86773 |
+
//# sourceMappingURL=api.js.map
|
86774 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/envelope.js
|
86775 |
+
|
86776 |
+
|
86777 |
/**
|
86778 |
+
* Creates an envelope.
|
86779 |
+
* Make sure to always explicitly provide the generic to this function
|
86780 |
+
* so that the envelope types resolve correctly.
|
86781 |
*/
|
86782 |
+
function createEnvelope(headers, items) {
|
86783 |
+
if (items === void 0) { items = []; }
|
86784 |
+
return [headers, items];
|
86785 |
}
|
86786 |
/**
|
86787 |
+
* Add an item to an envelope.
|
86788 |
+
* Make sure to always explicitly provide the generic to this function
|
86789 |
+
* so that the envelope types resolve correctly.
|
|
|
86790 |
*/
|
86791 |
+
function addItemToEnvelope(envelope, newItem) {
|
86792 |
+
var _a = __read(envelope, 2), headers = _a[0], items = _a[1];
|
86793 |
+
return [headers, __spread(items, [newItem])];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86794 |
}
|
86795 |
/**
|
86796 |
+
* Get the type of the envelope. Grabs the type from the first envelope item.
|
|
|
|
|
|
|
86797 |
*/
|
86798 |
+
function getEnvelopeType(envelope) {
|
86799 |
+
var _a = (0,tslib_es6/* __read */.CR)(envelope, 2), _b = (0,tslib_es6/* __read */.CR)(_a[1], 1), _c = (0,tslib_es6/* __read */.CR)(_b[0], 1), firstItemHeader = _c[0];
|
86800 |
+
return firstItemHeader.type;
|
86801 |
}
|
86802 |
/**
|
86803 |
+
* Serializes an envelope into a string.
|
|
|
|
|
|
|
86804 |
*/
|
86805 |
+
function serializeEnvelope(envelope) {
|
86806 |
+
var _a = (0,tslib_es6/* __read */.CR)(envelope, 2), headers = _a[0], items = _a[1];
|
86807 |
+
var serializedHeaders = JSON.stringify(headers);
|
86808 |
+
// Have to cast items to any here since Envelope is a union type
|
86809 |
+
// Fixed in Typescript 4.2
|
86810 |
+
// TODO: Remove any[] cast when we upgrade to TS 4.2
|
86811 |
+
// https://github.com/microsoft/TypeScript/issues/36390
|
86812 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
86813 |
+
return items.reduce(function (acc, item) {
|
86814 |
+
var _a = (0,tslib_es6/* __read */.CR)(item, 2), itemHeaders = _a[0], payload = _a[1];
|
86815 |
+
// We do not serialize payloads that are primitives
|
86816 |
+
var serializedPayload = (0,esm_is/* isPrimitive */.pt)(payload) ? String(payload) : JSON.stringify(payload);
|
86817 |
+
return acc + "\n" + JSON.stringify(itemHeaders) + "\n" + serializedPayload;
|
86818 |
+
}, serializedHeaders);
|
86819 |
+
}
|
86820 |
+
//# sourceMappingURL=envelope.js.map
|
86821 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/request.js
|
86822 |
+
|
86823 |
+
|
86824 |
+
|
86825 |
+
/** Extract sdk info from from the API metadata */
|
86826 |
+
function getSdkMetadataForEnvelopeHeader(api) {
|
86827 |
+
if (!api.metadata || !api.metadata.sdk) {
|
86828 |
+
return;
|
86829 |
}
|
86830 |
+
var _a = api.metadata.sdk, name = _a.name, version = _a.version;
|
86831 |
+
return { name: name, version: version };
|
86832 |
}
|
86833 |
/**
|
86834 |
+
* Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
|
86835 |
+
* Merge with existing data if any.
|
86836 |
+
**/
|
86837 |
+
function enhanceEventWithSdkInfo(event, sdkInfo) {
|
86838 |
+
if (!sdkInfo) {
|
86839 |
+
return event;
|
86840 |
+
}
|
86841 |
+
event.sdk = event.sdk || {};
|
86842 |
+
event.sdk.name = event.sdk.name || sdkInfo.name;
|
86843 |
+
event.sdk.version = event.sdk.version || sdkInfo.version;
|
86844 |
+
event.sdk.integrations = (0,tslib_es6/* __spread */.fl)((event.sdk.integrations || []), (sdkInfo.integrations || []));
|
86845 |
+
event.sdk.packages = (0,tslib_es6/* __spread */.fl)((event.sdk.packages || []), (sdkInfo.packages || []));
|
86846 |
+
return event;
|
86847 |
+
}
|
86848 |
+
/** Creates an envelope from a Session */
|
86849 |
+
function createSessionEnvelope(session, api) {
|
86850 |
+
var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
|
86851 |
+
var envelopeHeaders = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));
|
86852 |
+
// I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited
|
86853 |
+
var type = 'aggregates' in session ? 'sessions' : 'session';
|
86854 |
+
// TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`
|
86855 |
+
var envelopeItem = [{ type: type }, session];
|
86856 |
+
var envelope = createEnvelope(envelopeHeaders, [envelopeItem]);
|
86857 |
+
return [envelope, type];
|
86858 |
+
}
|
86859 |
+
/** Creates a SentryRequest from a Session. */
|
86860 |
+
function sessionToSentryRequest(session, api) {
|
86861 |
+
var _a = (0,tslib_es6/* __read */.CR)(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];
|
86862 |
+
return {
|
86863 |
+
body: serializeEnvelope(envelope),
|
86864 |
+
type: type,
|
86865 |
+
url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),
|
86866 |
+
};
|
86867 |
}
|
|
|
|
|
86868 |
/**
|
86869 |
+
* Create an Envelope from an event. Note that this is duplicated from below,
|
86870 |
+
* but on purpose as this will be refactored in v7.
|
86871 |
*/
|
86872 |
+
function createEventEnvelope(event, api) {
|
86873 |
+
var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
|
86874 |
+
var eventType = event.type || 'event';
|
86875 |
+
var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;
|
86876 |
+
var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;
|
86877 |
+
// TODO: Below is a temporary hack in order to debug a serialization error - see
|
86878 |
+
// https://github.com/getsentry/sentry-javascript/issues/2809,
|
86879 |
+
// https://github.com/getsentry/sentry-javascript/pull/4425, and
|
86880 |
+
// https://github.com/getsentry/sentry-javascript/pull/4574.
|
86881 |
+
//
|
86882 |
+
// TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
|
86883 |
+
// throw a circular reference error.
|
86884 |
+
//
|
86885 |
+
// When it's time to remove it:
|
86886 |
+
// 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
|
86887 |
+
// `sdkProcessingMetadata`
|
86888 |
+
// 2. Restore the original version of the request body, which is commented out
|
86889 |
+
// 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
|
86890 |
+
// baseClient tests in this package
|
86891 |
+
enhanceEventWithSdkInfo(event, api.metadata.sdk);
|
86892 |
+
event.tags = event.tags || {};
|
86893 |
+
event.extra = event.extra || {};
|
86894 |
+
// In theory, all events should be marked as having gone through normalization and so
|
86895 |
+
// we should never set this tag/extra data
|
86896 |
+
if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
|
86897 |
+
event.tags.skippedNormalization = true;
|
86898 |
+
event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';
|
86899 |
+
}
|
86900 |
+
// prevent this data from being sent to sentry
|
86901 |
+
// TODO: This is NOT part of the hack - DO NOT DELETE
|
86902 |
+
delete event.sdkProcessingMetadata;
|
86903 |
+
var envelopeHeaders = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));
|
86904 |
+
var eventItem = [
|
86905 |
+
{
|
86906 |
+
type: eventType,
|
86907 |
+
sample_rates: [{ id: samplingMethod, rate: sampleRate }],
|
86908 |
+
},
|
86909 |
+
event,
|
86910 |
+
];
|
86911 |
+
return createEnvelope(envelopeHeaders, [eventItem]);
|
86912 |
+
}
|
86913 |
+
/** Creates a SentryRequest from an event. */
|
86914 |
+
function eventToSentryRequest(event, api) {
|
86915 |
+
var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
|
86916 |
+
var eventType = event.type || 'event';
|
86917 |
+
var useEnvelope = eventType === 'transaction' || !!api.tunnel;
|
86918 |
+
var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;
|
86919 |
+
var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;
|
86920 |
+
// TODO: Below is a temporary hack in order to debug a serialization error - see
|
86921 |
+
// https://github.com/getsentry/sentry-javascript/issues/2809,
|
86922 |
+
// https://github.com/getsentry/sentry-javascript/pull/4425, and
|
86923 |
+
// https://github.com/getsentry/sentry-javascript/pull/4574.
|
86924 |
+
//
|
86925 |
+
// TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
|
86926 |
+
// throw a circular reference error.
|
86927 |
+
//
|
86928 |
+
// When it's time to remove it:
|
86929 |
+
// 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
|
86930 |
+
// `sdkProcessingMetadata`
|
86931 |
+
// 2. Restore the original version of the request body, which is commented out
|
86932 |
+
// 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
|
86933 |
+
// baseClient tests in this package
|
86934 |
+
enhanceEventWithSdkInfo(event, api.metadata.sdk);
|
86935 |
+
event.tags = event.tags || {};
|
86936 |
+
event.extra = event.extra || {};
|
86937 |
+
// In theory, all events should be marked as having gone through normalization and so
|
86938 |
+
// we should never set this tag/extra data
|
86939 |
+
if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
|
86940 |
+
event.tags.skippedNormalization = true;
|
86941 |
+
event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';
|
86942 |
+
}
|
86943 |
+
// prevent this data from being sent to sentry
|
86944 |
+
// TODO: This is NOT part of the hack - DO NOT DELETE
|
86945 |
+
delete event.sdkProcessingMetadata;
|
86946 |
+
var body;
|
86947 |
try {
|
86948 |
+
// 99.9% of events should get through just fine - no change in behavior for them
|
86949 |
+
body = JSON.stringify(event);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86950 |
}
|
86951 |
+
catch (err) {
|
86952 |
+
// Record data about the error without replacing original event data, then force renormalization
|
86953 |
+
event.tags.JSONStringifyError = true;
|
86954 |
+
event.extra.JSONStringifyError = err;
|
86955 |
+
try {
|
86956 |
+
body = JSON.stringify(normalize(event));
|
86957 |
+
}
|
86958 |
+
catch (newErr) {
|
86959 |
+
// At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.
|
86960 |
+
// Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to
|
86961 |
+
// debug with this hack, we won't ever land here.
|
86962 |
+
var innerErr = newErr;
|
86963 |
+
body = JSON.stringify({
|
86964 |
+
message: 'JSON.stringify error after renormalization',
|
86965 |
+
// setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually
|
86966 |
+
extra: { message: innerErr.message, stack: innerErr.stack },
|
86967 |
+
});
|
86968 |
}
|
86969 |
}
|
86970 |
+
var req = {
|
86971 |
+
// this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved
|
86972 |
+
// the mystery
|
86973 |
+
// body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),
|
86974 |
+
body: body,
|
86975 |
+
type: eventType,
|
86976 |
+
url: useEnvelope
|
86977 |
+
? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)
|
86978 |
+
: getStoreEndpointWithUrlEncodedAuth(api.dsn),
|
86979 |
};
|
86980 |
+
// https://develop.sentry.dev/sdk/envelopes/
|
86981 |
+
// Since we don't need to manipulate envelopes nor store them, there is no
|
86982 |
+
// exported concept of an Envelope with operations including serialization and
|
86983 |
+
// deserialization. Instead, we only implement a minimal subset of the spec to
|
86984 |
+
// serialize events inline here.
|
86985 |
+
if (useEnvelope) {
|
86986 |
+
var envelopeHeaders = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));
|
86987 |
+
var eventItem = [
|
86988 |
+
{
|
86989 |
+
type: eventType,
|
86990 |
+
sample_rates: [{ id: samplingMethod, rate: sampleRate }],
|
86991 |
+
},
|
86992 |
+
req.body,
|
86993 |
+
];
|
86994 |
+
var envelope = createEnvelope(envelopeHeaders, [eventItem]);
|
86995 |
+
req.body = serializeEnvelope(envelope);
|
86996 |
+
}
|
86997 |
+
return req;
|
86998 |
}
|
86999 |
+
//# sourceMappingURL=request.js.map
|
87000 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/transports/noop.js
|
87001 |
+
|
87002 |
+
/** Noop transport */
|
87003 |
+
var NoopTransport = /** @class */ (function () {
|
87004 |
+
function NoopTransport() {
|
87005 |
}
|
87006 |
+
/**
|
87007 |
+
* @inheritDoc
|
87008 |
+
*/
|
87009 |
+
NoopTransport.prototype.sendEvent = function (_) {
|
87010 |
+
return (0,syncpromise/* resolvedSyncPromise */.WD)({
|
87011 |
+
reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',
|
87012 |
+
status: 'skipped',
|
87013 |
+
});
|
87014 |
+
};
|
87015 |
+
/**
|
87016 |
+
* @inheritDoc
|
87017 |
+
*/
|
87018 |
+
NoopTransport.prototype.close = function (_) {
|
87019 |
+
return (0,syncpromise/* resolvedSyncPromise */.WD)(true);
|
87020 |
+
};
|
87021 |
+
return NoopTransport;
|
87022 |
+
}());
|
87023 |
+
|
87024 |
+
//# sourceMappingURL=noop.js.map
|
87025 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/basebackend.js
|
87026 |
+
|
87027 |
+
|
87028 |
+
|
87029 |
+
|
87030 |
+
|
87031 |
+
|
87032 |
+
/**
|
87033 |
+
* This is the base implemention of a Backend.
|
87034 |
+
* @hidden
|
87035 |
+
*/
|
87036 |
+
var BaseBackend = /** @class */ (function () {
|
87037 |
+
/** Creates a new backend instance. */
|
87038 |
+
function BaseBackend(options) {
|
87039 |
+
this._options = options;
|
87040 |
+
if (!this._options.dsn) {
|
87041 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn('No DSN provided, backend will not do anything.');
|
87042 |
}
|
87043 |
+
this._transport = this._setupTransport();
|
87044 |
+
}
|
87045 |
+
/**
|
87046 |
+
* @inheritDoc
|
87047 |
+
*/
|
87048 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
87049 |
+
BaseBackend.prototype.eventFromException = function (_exception, _hint) {
|
87050 |
+
throw new SentryError('Backend has to implement `eventFromException` method');
|
87051 |
+
};
|
87052 |
+
/**
|
87053 |
+
* @inheritDoc
|
87054 |
+
*/
|
87055 |
+
BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {
|
87056 |
+
throw new SentryError('Backend has to implement `eventFromMessage` method');
|
87057 |
+
};
|
87058 |
+
/**
|
87059 |
+
* @inheritDoc
|
87060 |
+
*/
|
87061 |
+
BaseBackend.prototype.sendEvent = function (event) {
|
87062 |
+
// TODO(v7): Remove the if-else
|
87063 |
+
if (this._newTransport &&
|
87064 |
+
this._options.dsn &&
|
87065 |
+
this._options._experiments &&
|
87066 |
+
this._options._experiments.newTransport) {
|
87067 |
+
var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);
|
87068 |
+
var env = createEventEnvelope(event, api);
|
87069 |
+
void this._newTransport.send(env).then(null, function (reason) {
|
87070 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error('Error while sending event:', reason);
|
87071 |
+
});
|
87072 |
}
|
87073 |
else {
|
87074 |
+
void this._transport.sendEvent(event).then(null, function (reason) {
|
87075 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error('Error while sending event:', reason);
|
87076 |
+
});
|
|
|
87077 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87078 |
};
|
87079 |
+
/**
|
87080 |
+
* @inheritDoc
|
87081 |
+
*/
|
87082 |
+
BaseBackend.prototype.sendSession = function (session) {
|
87083 |
+
if (!this._transport.sendSession) {
|
87084 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.warn */.kg.warn("Dropping session because custom transport doesn't implement sendSession");
|
87085 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87086 |
}
|
87087 |
+
// TODO(v7): Remove the if-else
|
87088 |
+
if (this._newTransport &&
|
87089 |
+
this._options.dsn &&
|
87090 |
+
this._options._experiments &&
|
87091 |
+
this._options._experiments.newTransport) {
|
87092 |
+
var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);
|
87093 |
+
var _a = (0,tslib_es6/* __read */.CR)(createSessionEnvelope(session, api), 1), env = _a[0];
|
87094 |
+
void this._newTransport.send(env).then(null, function (reason) {
|
87095 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error('Error while sending session:', reason);
|
87096 |
+
});
|
87097 |
}
|
87098 |
+
else {
|
87099 |
+
void this._transport.sendSession(session).then(null, function (reason) {
|
87100 |
+
flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error('Error while sending session:', reason);
|
87101 |
+
});
|
|
|
87102 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87103 |
};
|
87104 |
+
/**
|
87105 |
+
* @inheritDoc
|
87106 |
+
*/
|
87107 |
+
BaseBackend.prototype.getTransport = function () {
|
87108 |
+
return this._transport;
|
87109 |
+
};
|
87110 |
+
/**
|
87111 |
+
* Sets up the transport so it can be used later to send requests.
|
87112 |
+
*/
|
87113 |
+
BaseBackend.prototype._setupTransport = function () {
|
87114 |
+
return new NoopTransport();
|
87115 |
+
};
|
87116 |
+
return BaseBackend;
|
87117 |
+
}());
|
87118 |
+
|
87119 |
+
//# sourceMappingURL=basebackend.js.map
|
87120 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/types/esm/severity.js
|
87121 |
/**
|
87122 |
+
* TODO(v7): Remove this enum and replace with SeverityLevel
|
|
|
|
|
87123 |
*/
|
87124 |
+
var Severity;
|
87125 |
+
(function (Severity) {
|
87126 |
+
/** JSDoc */
|
87127 |
+
Severity["Fatal"] = "fatal";
|
87128 |
+
/** JSDoc */
|
87129 |
+
Severity["Error"] = "error";
|
87130 |
+
/** JSDoc */
|
87131 |
+
Severity["Warning"] = "warning";
|
87132 |
+
/** JSDoc */
|
87133 |
+
Severity["Log"] = "log";
|
87134 |
+
/** JSDoc */
|
87135 |
+
Severity["Info"] = "info";
|
87136 |
+
/** JSDoc */
|
87137 |
+
Severity["Debug"] = "debug";
|
87138 |
+
/** JSDoc */
|
87139 |
+
Severity["Critical"] = "critical";
|
87140 |
+
})(Severity || (Severity = {}));
|
87141 |
+
// TODO: in v7, these can disappear, because they now also exist in `@sentry/utils`. (Having them there rather than here
|
87142 |
+
// is nice because then it enforces the idea that only types are exported from `@sentry/types`.)
|
87143 |
+
var SeverityLevels = (/* unused pure expression or super */ null && (['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical']));
|
87144 |
+
//# sourceMappingURL=severity.js.map
|
87145 |
+
// EXTERNAL MODULE: ./node_modules/@sentry/utils/esm/supports.js
|
87146 |
+
var supports = __webpack_require__(8823);
|
87147 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/stack-parsers.js
|
87148 |
+
|
87149 |
+
// global reference to slice
|
87150 |
+
var UNKNOWN_FUNCTION = '?';
|
87151 |
+
var OPERA10_PRIORITY = 10;
|
87152 |
+
var OPERA11_PRIORITY = 20;
|
87153 |
+
var CHROME_PRIORITY = 30;
|
87154 |
+
var WINJS_PRIORITY = 40;
|
87155 |
+
var GECKO_PRIORITY = 50;
|
87156 |
+
function createFrame(filename, func, lineno, colno) {
|
87157 |
+
var frame = {
|
87158 |
+
filename: filename,
|
87159 |
+
function: func,
|
87160 |
+
// All browser frames are considered in_app
|
87161 |
+
in_app: true,
|
87162 |
+
};
|
87163 |
+
if (lineno !== undefined) {
|
87164 |
+
frame.lineno = lineno;
|
87165 |
}
|
87166 |
+
if (colno !== undefined) {
|
87167 |
+
frame.colno = colno;
|
87168 |
}
|
87169 |
+
return frame;
|
87170 |
}
|
87171 |
+
// Chromium based browsers: Chrome, Brave, new Opera, new Edge
|
87172 |
+
var chromeRegex = /^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
|
87173 |
+
var chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
|
87174 |
+
var chrome = function (line) {
|
87175 |
+
var parts = chromeRegex.exec(line);
|
87176 |
+
if (parts) {
|
87177 |
+
var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
|
87178 |
+
if (isEval) {
|
87179 |
+
var subMatch = chromeEvalRegex.exec(parts[2]);
|
87180 |
+
if (subMatch) {
|
87181 |
+
// throw out eval line/column and use top-most line/column number
|
87182 |
+
parts[2] = subMatch[1]; // url
|
87183 |
+
parts[3] = subMatch[2]; // line
|
87184 |
+
parts[4] = subMatch[3]; // column
|
87185 |
+
}
|
87186 |
+
}
|
87187 |
+
// Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now
|
87188 |
+
// would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)
|
87189 |
+
var _a = (0,tslib_es6/* __read */.CR)(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];
|
87190 |
+
return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);
|
87191 |
+
}
|
87192 |
+
return;
|
87193 |
+
};
|
87194 |
+
var chromeStackParser = [CHROME_PRIORITY, chrome];
|
87195 |
+
// gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it
|
87196 |
+
// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js
|
87197 |
+
// We need this specific case for now because we want no other regex to match.
|
87198 |
+
var geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
87199 |
+
var geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
|
87200 |
+
var gecko = function (line) {
|
87201 |
+
var _a;
|
87202 |
+
var parts = geckoREgex.exec(line);
|
87203 |
+
if (parts) {
|
87204 |
+
var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
|
87205 |
+
if (isEval) {
|
87206 |
+
var subMatch = geckoEvalRegex.exec(parts[3]);
|
87207 |
+
if (subMatch) {
|
87208 |
+
// throw out eval line/column and use top-most line number
|
87209 |
+
parts[1] = parts[1] || 'eval';
|
87210 |
+
parts[3] = subMatch[1];
|
87211 |
+
parts[4] = subMatch[2];
|
87212 |
+
parts[5] = ''; // no column when eval
|
87213 |
+
}
|
87214 |
+
}
|
87215 |
+
var filename = parts[3];
|
87216 |
+
var func = parts[1] || UNKNOWN_FUNCTION;
|
87217 |
+
_a = (0,tslib_es6/* __read */.CR)(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];
|
87218 |
+
return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);
|
87219 |
+
}
|
87220 |
+
return;
|
87221 |
+
};
|
87222 |
+
var geckoStackParser = [GECKO_PRIORITY, gecko];
|
87223 |
+
var winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
87224 |
+
var winjs = function (line) {
|
87225 |
+
var parts = winjsRegex.exec(line);
|
87226 |
+
return parts
|
87227 |
+
? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)
|
87228 |
+
: undefined;
|
87229 |
+
};
|
87230 |
+
var winjsStackParser = [WINJS_PRIORITY, winjs];
|
87231 |
+
var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
87232 |
+
var opera10 = function (line) {
|
87233 |
+
var parts = opera10Regex.exec(line);
|
87234 |
+
return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;
|
87235 |
+
};
|
87236 |
+
var opera10StackParser = [OPERA10_PRIORITY, opera10];
|
87237 |
+
var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
|
87238 |
+
var opera11 = function (line) {
|
87239 |
+
var parts = opera11Regex.exec(line);
|
87240 |
+
return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;
|
87241 |
+
};
|
87242 |
+
var opera11StackParser = [OPERA11_PRIORITY, opera11];
|
87243 |
+
/**
|
87244 |
+
* Safari web extensions, starting version unknown, can produce "frames-only" stacktraces.
|
87245 |
+
* What it means, is that instead of format like:
|
87246 |
+
*
|
87247 |
+
* Error: wat
|
87248 |
+
* at function@url:row:col
|
87249 |
+
* at function@url:row:col
|
87250 |
+
* at function@url:row:col
|
87251 |
+
*
|
87252 |
+
* it produces something like:
|
87253 |
+
*
|
87254 |
+
* function@url:row:col
|
87255 |
+
* function@url:row:col
|
87256 |
+
* function@url:row:col
|
87257 |
+
*
|
87258 |
+
* Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.
|
87259 |
+
* This function is extracted so that we can use it in both places without duplicating the logic.
|
87260 |
+
* Unfortunately "just" changing RegExp is too complicated now and making it pass all tests
|
87261 |
+
* and fix this case seems like an impossible, or at least way too time-consuming task.
|
87262 |
+
*/
|
87263 |
+
var extractSafariExtensionDetails = function (func, filename) {
|
87264 |
+
var isSafariExtension = func.indexOf('safari-extension') !== -1;
|
87265 |
+
var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;
|
87266 |
+
return isSafariExtension || isSafariWebExtension
|
87267 |
+
? [
|
87268 |
+
func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,
|
87269 |
+
isSafariExtension ? "safari-extension:" + filename : "safari-web-extension:" + filename,
|
87270 |
+
]
|
87271 |
+
: [func, filename];
|
87272 |
+
};
|
87273 |
+
//# sourceMappingURL=stack-parsers.js.map
|
87274 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/eventbuilder.js
|
87275 |
+
|
87276 |
+
|
87277 |
|
87278 |
|
|
|
87279 |
/**
|
87280 |
* This function creates an exception from an TraceKitStackTrace
|
87281 |
* @param stacktrace TraceKitStackTrace that will be converted to an exception
|
87282 |
* @hidden
|
87283 |
*/
|
87284 |
+
function exceptionFromError(ex) {
|
87285 |
+
// Get the frames first since Opera can lose the stack if we touch anything else first
|
87286 |
+
var frames = parseStackFrames(ex);
|
87287 |
var exception = {
|
87288 |
+
type: ex && ex.name,
|
87289 |
+
value: extractMessage(ex),
|
87290 |
};
|
87291 |
+
if (frames.length) {
|
87292 |
exception.stacktrace = { frames: frames };
|
87293 |
}
|
87294 |
if (exception.type === undefined && exception.value === '') {
|
87299 |
/**
|
87300 |
* @hidden
|
87301 |
*/
|
87302 |
+
function eventFromPlainObject(exception, syntheticException, isUnhandledRejection) {
|
87303 |
var event = {
|
87304 |
exception: {
|
87305 |
values: [
|
87306 |
{
|
87307 |
+
type: (0,esm_is/* isEvent */.cO)(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',
|
87308 |
+
value: "Non-Error " + (isUnhandledRejection ? 'promise rejection' : 'exception') + " captured with keys: " + (0,object/* extractExceptionKeysForMessage */.zf)(exception),
|
87309 |
},
|
87310 |
],
|
87311 |
},
|
87314 |
},
|
87315 |
};
|
87316 |
if (syntheticException) {
|
87317 |
+
var frames_1 = parseStackFrames(syntheticException);
|
87318 |
+
if (frames_1.length) {
|
87319 |
+
event.stacktrace = { frames: frames_1 };
|
87320 |
+
}
|
|
|
87321 |
}
|
87322 |
return event;
|
87323 |
}
|
87324 |
/**
|
87325 |
* @hidden
|
87326 |
*/
|
87327 |
+
function eventFromError(ex) {
|
|
|
87328 |
return {
|
87329 |
exception: {
|
87330 |
+
values: [exceptionFromError(ex)],
|
87331 |
},
|
87332 |
};
|
87333 |
}
|
87334 |
+
/** Parses stack frames from an error */
|
87335 |
+
function parseStackFrames(ex) {
|
87336 |
+
// Access and store the stacktrace property before doing ANYTHING
|
87337 |
+
// else to it because Opera is not very good at providing it
|
87338 |
+
// reliably in other circumstances.
|
87339 |
+
var stacktrace = ex.stacktrace || ex.stack || '';
|
87340 |
+
var popSize = getPopSize(ex);
|
87341 |
+
try {
|
87342 |
+
return (0,esm_stacktrace/* createStackParser */.pE)(opera10StackParser, opera11StackParser, chromeStackParser, winjsStackParser, geckoStackParser)(stacktrace, popSize);
|
87343 |
+
}
|
87344 |
+
catch (e) {
|
87345 |
+
// no-empty
|
87346 |
+
}
|
87347 |
+
return [];
|
87348 |
+
}
|
87349 |
+
// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108
|
87350 |
+
var reactMinifiedRegexp = /Minified React error #\d+;/i;
|
87351 |
+
function getPopSize(ex) {
|
87352 |
+
if (ex) {
|
87353 |
+
if (typeof ex.framesToPop === 'number') {
|
87354 |
+
return ex.framesToPop;
|
87355 |
+
}
|
87356 |
+
if (reactMinifiedRegexp.test(ex.message)) {
|
87357 |
+
return 1;
|
87358 |
+
}
|
87359 |
+
}
|
87360 |
+
return 0;
|
87361 |
+
}
|
87362 |
/**
|
87363 |
+
* There are cases where stacktrace.message is an Event object
|
87364 |
+
* https://github.com/getsentry/sentry-javascript/issues/1949
|
87365 |
+
* In this specific case we try to extract stacktrace.message.error.message
|
87366 |
*/
|
87367 |
+
function extractMessage(ex) {
|
87368 |
+
var message = ex && ex.message;
|
87369 |
+
if (!message) {
|
87370 |
+
return 'No error message';
|
|
|
|
|
|
|
|
|
|
|
|
|
87371 |
}
|
87372 |
+
if (message.error && typeof message.error.message === 'string') {
|
87373 |
+
return message.error.message;
|
|
|
87374 |
}
|
87375 |
+
return message;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87376 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87377 |
/**
|
87378 |
+
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
|
87379 |
* @hidden
|
87380 |
*/
|
87381 |
+
function eventFromException(exception, hint, attachStacktrace) {
|
87382 |
var syntheticException = (hint && hint.syntheticException) || undefined;
|
87383 |
+
var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);
|
87384 |
+
(0,misc/* addExceptionMechanism */.EG)(event); // defaults to { type: 'generic', handled: true }
|
|
|
|
|
|
|
|
|
|
|
87385 |
event.level = Severity.Error;
|
87386 |
if (hint && hint.event_id) {
|
87387 |
event.event_id = hint.event_id;
|
87388 |
}
|
87389 |
+
return (0,syncpromise/* resolvedSyncPromise */.WD)(event);
|
87390 |
}
|
87391 |
/**
|
87392 |
* Builds and Event from a Message
|
87393 |
* @hidden
|
87394 |
*/
|
87395 |
+
function eventFromMessage(message, level, hint, attachStacktrace) {
|
87396 |
if (level === void 0) { level = Severity.Info; }
|
87397 |
var syntheticException = (hint && hint.syntheticException) || undefined;
|
87398 |
+
var event = eventFromString(message, syntheticException, attachStacktrace);
|
|
|
|
|
87399 |
event.level = level;
|
87400 |
if (hint && hint.event_id) {
|
87401 |
event.event_id = hint.event_id;
|
87402 |
}
|
87403 |
+
return (0,syncpromise/* resolvedSyncPromise */.WD)(event);
|
87404 |
}
|
87405 |
/**
|
87406 |
* @hidden
|
87407 |
*/
|
87408 |
+
function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {
|
|
|
87409 |
var event;
|
87410 |
+
if ((0,esm_is/* isErrorEvent */.VW)(exception) && exception.error) {
|
87411 |
// If it is an ErrorEvent with `error` property, extract it to get actual Error
|
87412 |
var errorEvent = exception;
|
87413 |
+
return eventFromError(errorEvent.error);
|
|
|
|
|
|
|
87414 |
}
|
87415 |
+
// If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name
|
87416 |
+
// and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be
|
87417 |
+
// `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.
|
87418 |
+
//
|
87419 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
|
87420 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
|
87421 |
+
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
|
87422 |
+
if ((0,esm_is/* isDOMError */.TX)(exception) || (0,esm_is/* isDOMException */.fm)(exception)) {
|
87423 |
var domException = exception;
|
87424 |
+
if ('stack' in exception) {
|
87425 |
+
event = eventFromError(exception);
|
87426 |
+
}
|
87427 |
+
else {
|
87428 |
+
var name_1 = domException.name || ((0,esm_is/* isDOMError */.TX)(domException) ? 'DOMError' : 'DOMException');
|
87429 |
+
var message = domException.message ? name_1 + ": " + domException.message : name_1;
|
87430 |
+
event = eventFromString(message, syntheticException, attachStacktrace);
|
87431 |
+
(0,misc/* addExceptionTypeValue */.Db)(event, message);
|
87432 |
+
}
|
87433 |
if ('code' in domException) {
|
87434 |
+
event.tags = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, event.tags), { 'DOMException.code': "" + domException.code });
|
87435 |
}
|
87436 |
return event;
|
87437 |
}
|
87438 |
+
if ((0,esm_is/* isError */.VZ)(exception)) {
|
87439 |
// we have a real Error object, do nothing
|
87440 |
+
return eventFromError(exception);
|
|
|
87441 |
}
|
87442 |
+
if ((0,esm_is/* isPlainObject */.PO)(exception) || (0,esm_is/* isEvent */.cO)(exception)) {
|
87443 |
+
// If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
|
87444 |
+
// it manually. This will allow us to group events based on top-level keys which is much better than creating a new
|
87445 |
+
// group on any key/value change.
|
87446 |
var objectException = exception;
|
87447 |
+
event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);
|
87448 |
(0,misc/* addExceptionMechanism */.EG)(event, {
|
87449 |
synthetic: true,
|
87450 |
});
|
87459 |
// - a plain Object
|
87460 |
//
|
87461 |
// So bail out and capture it as a simple message:
|
87462 |
+
event = eventFromString(exception, syntheticException, attachStacktrace);
|
87463 |
(0,misc/* addExceptionTypeValue */.Db)(event, "" + exception, undefined);
|
87464 |
(0,misc/* addExceptionMechanism */.EG)(event, {
|
87465 |
synthetic: true,
|
87469 |
/**
|
87470 |
* @hidden
|
87471 |
*/
|
87472 |
+
function eventFromString(input, syntheticException, attachStacktrace) {
|
|
|
87473 |
var event = {
|
87474 |
message: input,
|
87475 |
};
|
87476 |
+
if (attachStacktrace && syntheticException) {
|
87477 |
+
var frames_2 = parseStackFrames(syntheticException);
|
87478 |
+
if (frames_2.length) {
|
87479 |
+
event.stacktrace = { frames: frames_2 };
|
87480 |
+
}
|
|
|
87481 |
}
|
87482 |
return event;
|
87483 |
}
|
87484 |
//# sourceMappingURL=eventbuilder.js.map
|
87485 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/promisebuffer.js
|
87486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87487 |
|
87488 |
+
/**
|
87489 |
+
* Creates an new PromiseBuffer object with the specified limit
|
87490 |
+
* @param limit max number of promises that can be stored in the buffer
|
87491 |
+
*/
|
87492 |
+
function makePromiseBuffer(limit) {
|
87493 |
+
var buffer = [];
|
87494 |
+
function isReady() {
|
87495 |
+
return limit === undefined || buffer.length < limit;
|
87496 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87497 |
/**
|
87498 |
+
* Remove a promise from the queue.
|
87499 |
*
|
87500 |
+
* @param task Can be any PromiseLike<T>
|
87501 |
+
* @returns Removed promise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87502 |
*/
|
87503 |
+
function remove(task) {
|
87504 |
+
return buffer.splice(buffer.indexOf(task), 1)[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87505 |
}
|
87506 |
/**
|
87507 |
+
* Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.
|
|
|
|
|
|
|
|
|
|
|
|
|
87508 |
*
|
87509 |
+
* @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:
|
87510 |
+
* PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor
|
87511 |
+
* functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By
|
87512 |
+
* requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer
|
87513 |
+
* limit check.
|
87514 |
* @returns The original promise.
|
87515 |
*/
|
87516 |
+
function add(taskProducer) {
|
87517 |
+
if (!isReady()) {
|
87518 |
+
return (0,syncpromise/* rejectedSyncPromise */.$2)(new SentryError('Not adding Promise due to buffer limit reached.'));
|
87519 |
+
}
|
87520 |
+
// start the task and add its promise to the queue
|
87521 |
+
var task = taskProducer();
|
87522 |
+
if (buffer.indexOf(task) === -1) {
|
87523 |
+
buffer.push(task);
|
87524 |
+
}
|
87525 |
+
void task
|
87526 |
+
.then(function () { return remove(task); })
|
87527 |
+
// Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`
|
87528 |
+
// rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't
|
87529 |
+
// have promises, so TS has to polyfill when down-compiling.)
|
87530 |
.then(null, function () {
|
87531 |
+
return remove(task).then(null, function () {
|
87532 |
+
// We have to add another catch here because `remove()` starts a new promise chain.
|
|
|
87533 |
});
|
87534 |
});
|
87535 |
return task;
|
87536 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87537 |
/**
|
87538 |
+
* Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.
|
|
|
87539 |
*
|
87540 |
+
* @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or
|
87541 |
+
* not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to
|
87542 |
+
* `true`.
|
87543 |
+
* @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and
|
87544 |
+
* `false` otherwise
|
87545 |
*/
|
87546 |
+
function drain(timeout) {
|
87547 |
+
return new syncpromise/* SyncPromise */.cW(function (resolve, reject) {
|
87548 |
+
var counter = buffer.length;
|
87549 |
+
if (!counter) {
|
87550 |
+
return resolve(true);
|
87551 |
+
}
|
87552 |
+
// wait for `timeout` ms and then resolve to `false` (if not cancelled first)
|
87553 |
var capturedSetTimeout = setTimeout(function () {
|
87554 |
if (timeout && timeout > 0) {
|
87555 |
resolve(false);
|
87556 |
}
|
87557 |
}, timeout);
|
87558 |
+
// if all promises resolve in time, cancel the timer and resolve to `true`
|
87559 |
+
buffer.forEach(function (item) {
|
87560 |
+
void (0,syncpromise/* resolvedSyncPromise */.WD)(item).then(function () {
|
87561 |
+
// eslint-disable-next-line no-plusplus
|
87562 |
+
if (!--counter) {
|
87563 |
+
clearTimeout(capturedSetTimeout);
|
87564 |
+
resolve(true);
|
87565 |
+
}
|
87566 |
+
}, reject);
|
87567 |
+
});
|
87568 |
+
});
|
87569 |
+
}
|
87570 |
+
return {
|
87571 |
+
$: buffer,
|
87572 |
+
add: add,
|
87573 |
+
drain: drain,
|
87574 |
+
};
|
87575 |
+
}
|
87576 |
+
//# sourceMappingURL=promisebuffer.js.map
|
87577 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/ratelimit.js
|
87578 |
+
|
87579 |
+
var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds
|
87580 |
+
/**
|
87581 |
+
* Extracts Retry-After value from the request header or returns default value
|
87582 |
+
* @param header string representation of 'Retry-After' header
|
87583 |
+
* @param now current unix timestamp
|
87584 |
+
*
|
87585 |
+
*/
|
87586 |
+
function parseRetryAfterHeader(header, now) {
|
87587 |
+
if (now === void 0) { now = Date.now(); }
|
87588 |
+
var headerDelay = parseInt("" + header, 10);
|
87589 |
+
if (!isNaN(headerDelay)) {
|
87590 |
+
return headerDelay * 1000;
|
87591 |
+
}
|
87592 |
+
var headerDate = Date.parse("" + header);
|
87593 |
+
if (!isNaN(headerDate)) {
|
87594 |
+
return headerDate - now;
|
87595 |
+
}
|
87596 |
+
return DEFAULT_RETRY_AFTER;
|
87597 |
+
}
|
87598 |
+
/**
|
87599 |
+
* Gets the time that given category is disabled until for rate limiting
|
87600 |
+
*/
|
87601 |
+
function disabledUntil(limits, category) {
|
87602 |
+
return limits[category] || limits.all || 0;
|
87603 |
+
}
|
87604 |
+
/**
|
87605 |
+
* Checks if a category is rate limited
|
87606 |
+
*/
|
87607 |
+
function isRateLimited(limits, category, now) {
|
87608 |
+
if (now === void 0) { now = Date.now(); }
|
87609 |
+
return disabledUntil(limits, category) > now;
|
87610 |
+
}
|
87611 |
+
/**
|
87612 |
+
* Update ratelimits from incoming headers.
|
87613 |
+
* Returns true if headers contains a non-empty rate limiting header.
|
87614 |
+
*/
|
87615 |
+
function updateRateLimits(limits, headers, now) {
|
87616 |
+
var e_1, _a, e_2, _b;
|
87617 |
+
if (now === void 0) { now = Date.now(); }
|
87618 |
+
var updatedRateLimits = (0,tslib_es6/* __assign */.pi)({}, limits);
|
87619 |
+
// "The name is case-insensitive."
|
87620 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
|
87621 |
+
var rateLimitHeader = headers['x-sentry-rate-limits'];
|
87622 |
+
var retryAfterHeader = headers['retry-after'];
|
87623 |
+
if (rateLimitHeader) {
|
87624 |
+
try {
|
87625 |
+
/**
|
87626 |
+
* rate limit headers are of the form
|
87627 |
+
* <header>,<header>,..
|
87628 |
+
* where each <header> is of the form
|
87629 |
+
* <retry_after>: <categories>: <scope>: <reason_code>
|
87630 |
+
* where
|
87631 |
+
* <retry_after> is a delay in seconds
|
87632 |
+
* <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
|
87633 |
+
* <category>;<category>;...
|
87634 |
+
* <scope> is what's being limited (org, project, or key) - ignored by SDK
|
87635 |
+
* <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
|
87636 |
+
*/
|
87637 |
+
for (var _c = (0,tslib_es6/* __values */.XA)(rateLimitHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {
|
87638 |
+
var limit = _d.value;
|
87639 |
+
var parameters = limit.split(':', 2);
|
87640 |
+
var headerDelay = parseInt(parameters[0], 10);
|
87641 |
+
var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
|
87642 |
+
if (!parameters[1]) {
|
87643 |
+
updatedRateLimits.all = now + delay;
|
87644 |
+
}
|
87645 |
+
else {
|
87646 |
+
try {
|
87647 |
+
for (var _e = (e_2 = void 0, (0,tslib_es6/* __values */.XA)(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
87648 |
+
var category = _f.value;
|
87649 |
+
updatedRateLimits[category] = now + delay;
|
87650 |
+
}
|
87651 |
+
}
|
87652 |
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
87653 |
+
finally {
|
87654 |
+
try {
|
87655 |
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
87656 |
+
}
|
87657 |
+
finally { if (e_2) throw e_2.error; }
|
87658 |
+
}
|
87659 |
+
}
|
87660 |
+
}
|
87661 |
+
}
|
87662 |
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
87663 |
+
finally {
|
87664 |
+
try {
|
87665 |
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
87666 |
+
}
|
87667 |
+
finally { if (e_1) throw e_1.error; }
|
87668 |
+
}
|
87669 |
+
}
|
87670 |
+
else if (retryAfterHeader) {
|
87671 |
+
updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
|
87672 |
+
}
|
87673 |
+
return updatedRateLimits;
|
87674 |
+
}
|
87675 |
+
//# sourceMappingURL=ratelimit.js.map
|
87676 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/status.js
|
87677 |
+
/**
|
87678 |
+
* Converts an HTTP status code to sentry status {@link EventStatus}.
|
87679 |
+
*
|
87680 |
+
* @param code number HTTP status code
|
87681 |
+
* @returns EventStatus
|
87682 |
+
*/
|
87683 |
+
function eventStatusFromHttpCode(code) {
|
87684 |
+
if (code >= 200 && code < 300) {
|
87685 |
+
return 'success';
|
87686 |
+
}
|
87687 |
+
if (code === 429) {
|
87688 |
+
return 'rate_limit';
|
87689 |
+
}
|
87690 |
+
if (code >= 400 && code < 500) {
|
87691 |
+
return 'invalid';
|
87692 |
+
}
|
87693 |
+
if (code >= 500) {
|
87694 |
+
return 'failed';
|
87695 |
+
}
|
87696 |
+
return 'unknown';
|
87697 |
+
}
|
87698 |
+
//# sourceMappingURL=status.js.map
|
87699 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/transports/base.js
|
87700 |
+
|
87701 |
+
var ERROR_TRANSPORT_CATEGORY = 'error';
|
87702 |
+
var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';
|
87703 |
+
var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';
|
87704 |
+
var SESSION_TRANSPORT_CATEGORY = 'session';
|
87705 |
+
var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;
|
87706 |
+
/**
|
87707 |
+
* Creates a `NewTransport`
|
87708 |
+
*
|
87709 |
+
* @param options
|
87710 |
+
* @param makeRequest
|
87711 |
+
*/
|
87712 |
+
function createTransport(options, makeRequest, buffer) {
|
87713 |
+
if (buffer === void 0) { buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }
|
87714 |
+
var rateLimits = {};
|
87715 |
+
var flush = function (timeout) { return buffer.drain(timeout); };
|
87716 |
+
function send(envelope) {
|
87717 |
+
var envCategory = getEnvelopeType(envelope);
|
87718 |
+
var category = envCategory === 'event' ? 'error' : envCategory;
|
87719 |
+
var request = {
|
87720 |
+
category: category,
|
87721 |
+
body: serializeEnvelope(envelope),
|
87722 |
+
};
|
87723 |
+
// Don't add to buffer if transport is already rate-limited
|
87724 |
+
if (isRateLimited(rateLimits, category)) {
|
87725 |
+
return (0,syncpromise/* rejectedSyncPromise */.$2)({
|
87726 |
+
status: 'rate_limit',
|
87727 |
+
reason: getRateLimitReason(rateLimits, category),
|
87728 |
+
});
|
87729 |
+
}
|
87730 |
+
var requestTask = function () {
|
87731 |
+
return makeRequest(request).then(function (_a) {
|
87732 |
+
var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;
|
87733 |
+
var status = eventStatusFromHttpCode(statusCode);
|
87734 |
+
if (headers) {
|
87735 |
+
rateLimits = updateRateLimits(rateLimits, headers);
|
87736 |
+
}
|
87737 |
+
if (status === 'success') {
|
87738 |
+
return (0,syncpromise/* resolvedSyncPromise */.WD)({ status: status, reason: reason });
|
87739 |
+
}
|
87740 |
+
return (0,syncpromise/* rejectedSyncPromise */.$2)({
|
87741 |
+
status: status,
|
87742 |
+
reason: reason ||
|
87743 |
+
body ||
|
87744 |
+
(status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),
|
87745 |
+
});
|
87746 |
});
|
87747 |
+
};
|
87748 |
+
return buffer.add(requestTask);
|
87749 |
+
}
|
87750 |
+
return {
|
87751 |
+
send: send,
|
87752 |
+
flush: flush,
|
87753 |
+
};
|
87754 |
+
}
|
87755 |
+
function getRateLimitReason(rateLimits, category) {
|
87756 |
+
return "Too many " + category + " requests, backing off until: " + new Date(disabledUntil(rateLimits, category)).toISOString();
|
87757 |
+
}
|
87758 |
+
//# sourceMappingURL=base.js.map
|
87759 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/async.js
|
87760 |
+
/**
|
87761 |
+
* Consumes the promise and logs the error when it rejects.
|
87762 |
+
* @param promise A promise to forget.
|
87763 |
+
*/
|
87764 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
87765 |
+
function forget(promise) {
|
87766 |
+
void promise.then(null, function (e) {
|
87767 |
+
// TODO: Use a better logging mechanism
|
87768 |
+
// eslint-disable-next-line no-console
|
87769 |
+
console.error(e);
|
87770 |
+
});
|
87771 |
+
}
|
87772 |
+
//# sourceMappingURL=async.js.map
|
87773 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/flags.js
|
87774 |
+
/*
|
87775 |
+
* This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
|
87776 |
+
* for users.
|
87777 |
+
*
|
87778 |
+
* Debug flags need to be declared in each package individually and must not be imported across package boundaries,
|
87779 |
+
* because some build tools have trouble tree-shaking imported guards.
|
87780 |
+
*
|
87781 |
+
* As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
|
87782 |
+
*
|
87783 |
+
* Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
|
87784 |
+
* our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
|
87785 |
+
* replaced.
|
87786 |
+
*/
|
87787 |
+
/** Flag that is true for debug builds, false otherwise. */
|
87788 |
+
var esm_flags_IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
|
87789 |
+
//# sourceMappingURL=flags.js.map
|
87790 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/utils.js
|
87791 |
+
|
87792 |
+
|
87793 |
+
var utils_global = (0,esm_global/* getGlobalObject */.R)();
|
87794 |
+
var cachedFetchImpl;
|
87795 |
+
/**
|
87796 |
+
* A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
|
87797 |
+
* Whenever someone wraps the Fetch API and returns the wrong promise chain,
|
87798 |
+
* this chain becomes orphaned and there is no possible way to capture it's rejections
|
87799 |
+
* other than allowing it bubble up to this very handler. eg.
|
87800 |
+
*
|
87801 |
+
* const f = window.fetch;
|
87802 |
+
* window.fetch = function () {
|
87803 |
+
* const p = f.apply(this, arguments);
|
87804 |
+
*
|
87805 |
+
* p.then(function() {
|
87806 |
+
* console.log('hi.');
|
87807 |
+
* });
|
87808 |
+
*
|
87809 |
+
* return p;
|
87810 |
+
* }
|
87811 |
+
*
|
87812 |
+
* `p.then(function () { ... })` is producing a completely separate promise chain,
|
87813 |
+
* however, what's returned is `p` - the result of original `fetch` call.
|
87814 |
+
*
|
87815 |
+
* This mean, that whenever we use the Fetch API to send our own requests, _and_
|
87816 |
+
* some ad-blocker blocks it, this orphaned chain will _always_ reject,
|
87817 |
+
* effectively causing another event to be captured.
|
87818 |
+
* This makes a whole process become an infinite loop, which we need to somehow
|
87819 |
+
* deal with, and break it in one way or another.
|
87820 |
+
*
|
87821 |
+
* To deal with this issue, we are making sure that we _always_ use the real
|
87822 |
+
* browser Fetch API, instead of relying on what `window.fetch` exposes.
|
87823 |
+
* The only downside to this would be missing our own requests as breadcrumbs,
|
87824 |
+
* but because we are already not doing this, it should be just fine.
|
87825 |
+
*
|
87826 |
+
* Possible failed fetch error messages per-browser:
|
87827 |
+
*
|
87828 |
+
* Chrome: Failed to fetch
|
87829 |
+
* Edge: Failed to Fetch
|
87830 |
+
* Firefox: NetworkError when attempting to fetch resource
|
87831 |
+
* Safari: resource blocked by content blocker
|
87832 |
+
*/
|
87833 |
+
function getNativeFetchImplementation() {
|
87834 |
+
if (cachedFetchImpl) {
|
87835 |
+
return cachedFetchImpl;
|
87836 |
+
}
|
87837 |
+
/* eslint-disable @typescript-eslint/unbound-method */
|
87838 |
+
// Fast path to avoid DOM I/O
|
87839 |
+
if ((0,supports/* isNativeFetch */.Du)(utils_global.fetch)) {
|
87840 |
+
return (cachedFetchImpl = utils_global.fetch.bind(utils_global));
|
87841 |
+
}
|
87842 |
+
var document = utils_global.document;
|
87843 |
+
var fetchImpl = utils_global.fetch;
|
87844 |
+
// eslint-disable-next-line deprecation/deprecation
|
87845 |
+
if (document && typeof document.createElement === 'function') {
|
87846 |
+
try {
|
87847 |
+
var sandbox = document.createElement('iframe');
|
87848 |
+
sandbox.hidden = true;
|
87849 |
+
document.head.appendChild(sandbox);
|
87850 |
+
var contentWindow = sandbox.contentWindow;
|
87851 |
+
if (contentWindow && contentWindow.fetch) {
|
87852 |
+
fetchImpl = contentWindow.fetch;
|
87853 |
+
}
|
87854 |
+
document.head.removeChild(sandbox);
|
87855 |
+
}
|
87856 |
+
catch (e) {
|
87857 |
+
esm_flags_IS_DEBUG_BUILD &&
|
87858 |
+
esm_logger/* logger.warn */.kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);
|
87859 |
+
}
|
87860 |
+
}
|
87861 |
+
return (cachedFetchImpl = fetchImpl.bind(utils_global));
|
87862 |
+
/* eslint-enable @typescript-eslint/unbound-method */
|
87863 |
+
}
|
87864 |
+
/**
|
87865 |
+
* Sends sdk client report using sendBeacon or fetch as a fallback if available
|
87866 |
+
*
|
87867 |
+
* @param url report endpoint
|
87868 |
+
* @param body report payload
|
87869 |
+
*/
|
87870 |
+
function sendReport(url, body) {
|
87871 |
+
var isRealNavigator = Object.prototype.toString.call(utils_global && utils_global.navigator) === '[object Navigator]';
|
87872 |
+
var hasSendBeacon = isRealNavigator && typeof utils_global.navigator.sendBeacon === 'function';
|
87873 |
+
if (hasSendBeacon) {
|
87874 |
+
// Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
|
87875 |
+
var sendBeacon = utils_global.navigator.sendBeacon.bind(utils_global.navigator);
|
87876 |
+
return sendBeacon(url, body);
|
87877 |
+
}
|
87878 |
+
if ((0,supports/* supportsFetch */.Ak)()) {
|
87879 |
+
var fetch_1 = getNativeFetchImplementation();
|
87880 |
+
return forget(fetch_1(url, {
|
87881 |
+
body: body,
|
87882 |
+
method: 'POST',
|
87883 |
+
credentials: 'omit',
|
87884 |
+
keepalive: true,
|
87885 |
+
}));
|
87886 |
+
}
|
87887 |
+
}
|
87888 |
+
//# sourceMappingURL=utils.js.map
|
87889 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/new-fetch.js
|
87890 |
+
|
87891 |
+
|
87892 |
+
|
87893 |
+
/**
|
87894 |
+
* Creates a Transport that uses the Fetch API to send events to Sentry.
|
87895 |
+
*/
|
87896 |
+
function makeNewFetchTransport(options, nativeFetch) {
|
87897 |
+
if (nativeFetch === void 0) { nativeFetch = getNativeFetchImplementation(); }
|
87898 |
+
function makeRequest(request) {
|
87899 |
+
var requestOptions = (0,tslib_es6/* __assign */.pi)({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);
|
87900 |
+
return nativeFetch(options.url, requestOptions).then(function (response) {
|
87901 |
+
return response.text().then(function (body) { return ({
|
87902 |
+
body: body,
|
87903 |
+
headers: {
|
87904 |
+
'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
|
87905 |
+
'retry-after': response.headers.get('Retry-After'),
|
87906 |
+
},
|
87907 |
+
reason: response.statusText,
|
87908 |
+
statusCode: response.status,
|
87909 |
+
}); });
|
87910 |
});
|
87911 |
+
}
|
87912 |
+
return createTransport({ bufferSize: options.bufferSize }, makeRequest);
|
87913 |
+
}
|
87914 |
+
//# sourceMappingURL=new-fetch.js.map
|
87915 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/utils/esm/clientreport.js
|
87916 |
|
87917 |
+
|
87918 |
+
/**
|
87919 |
+
* Creates client report envelope
|
87920 |
+
* @param discarded_events An array of discard events
|
87921 |
+
* @param dsn A DSN that can be set on the header. Optional.
|
87922 |
+
*/
|
87923 |
+
function createClientReportEnvelope(discarded_events, dsn, timestamp) {
|
87924 |
+
var clientReportItem = [
|
87925 |
+
{ type: 'client_report' },
|
87926 |
+
{
|
87927 |
+
timestamp: timestamp || (0,time/* dateTimestampInSeconds */.yW)(),
|
87928 |
+
discarded_events: discarded_events,
|
87929 |
+
},
|
87930 |
+
];
|
87931 |
+
return createEnvelope(dsn ? { dsn: dsn } : {}, [clientReportItem]);
|
87932 |
+
}
|
87933 |
+
//# sourceMappingURL=clientreport.js.map
|
87934 |
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/base.js
|
87935 |
|
87936 |
|
87937 |
|
87938 |
|
87939 |
+
|
87940 |
+
function requestTypeToCategory(ty) {
|
87941 |
+
var tyStr = ty;
|
87942 |
+
return tyStr === 'event' ? 'error' : tyStr;
|
87943 |
+
}
|
87944 |
+
var base_global = (0,esm_global/* getGlobalObject */.R)();
|
87945 |
/** Base Transport class implementation */
|
87946 |
var BaseTransport = /** @class */ (function () {
|
87947 |
function BaseTransport(options) {
|
87948 |
+
var _this = this;
|
87949 |
this.options = options;
|
87950 |
/** A simple buffer holding all requests. */
|
87951 |
+
this._buffer = makePromiseBuffer(30);
|
87952 |
/** Locks transport after receiving rate limits in a response */
|
87953 |
this._rateLimits = {};
|
87954 |
+
this._outcomes = {};
|
87955 |
+
this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);
|
87956 |
// eslint-disable-next-line deprecation/deprecation
|
87957 |
+
this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);
|
87958 |
+
if (this.options.sendClientReports && base_global.document) {
|
87959 |
+
base_global.document.addEventListener('visibilitychange', function () {
|
87960 |
+
if (base_global.document.visibilityState === 'hidden') {
|
87961 |
+
_this._flushOutcomes();
|
87962 |
+
}
|
87963 |
+
});
|
87964 |
+
}
|
87965 |
}
|
87966 |
/**
|
87967 |
* @inheritDoc
|
87968 |
*/
|
87969 |
+
BaseTransport.prototype.sendEvent = function (event) {
|
87970 |
+
return this._sendRequest(eventToSentryRequest(event, this._api), event);
|
87971 |
+
};
|
87972 |
+
/**
|
87973 |
+
* @inheritDoc
|
87974 |
+
*/
|
87975 |
+
BaseTransport.prototype.sendSession = function (session) {
|
87976 |
+
return this._sendRequest(sessionToSentryRequest(session, this._api), session);
|
87977 |
};
|
87978 |
/**
|
87979 |
* @inheritDoc
|
87981 |
BaseTransport.prototype.close = function (timeout) {
|
87982 |
return this._buffer.drain(timeout);
|
87983 |
};
|
87984 |
+
/**
|
87985 |
+
* @inheritDoc
|
87986 |
+
*/
|
87987 |
+
BaseTransport.prototype.recordLostEvent = function (reason, category) {
|
87988 |
+
var _a;
|
87989 |
+
if (!this.options.sendClientReports) {
|
87990 |
+
return;
|
87991 |
+
}
|
87992 |
+
// We want to track each category (event, transaction, session) separately
|
87993 |
+
// but still keep the distinction between different type of outcomes.
|
87994 |
+
// We could use nested maps, but it's much easier to read and type this way.
|
87995 |
+
// A correct type for map-based implementation if we want to go that route
|
87996 |
+
// would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
|
87997 |
+
var key = requestTypeToCategory(category) + ":" + reason;
|
87998 |
+
esm_flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log("Adding outcome: " + key);
|
87999 |
+
this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;
|
88000 |
+
};
|
88001 |
+
/**
|
88002 |
+
* Send outcomes as an envelope
|
88003 |
+
*/
|
88004 |
+
BaseTransport.prototype._flushOutcomes = function () {
|
88005 |
+
if (!this.options.sendClientReports) {
|
88006 |
+
return;
|
88007 |
+
}
|
88008 |
+
var outcomes = this._outcomes;
|
88009 |
+
this._outcomes = {};
|
88010 |
+
// Nothing to send
|
88011 |
+
if (!Object.keys(outcomes).length) {
|
88012 |
+
esm_flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log('No outcomes to flush');
|
88013 |
+
return;
|
88014 |
+
}
|
88015 |
+
esm_flags_IS_DEBUG_BUILD && esm_logger/* logger.log */.kg.log("Flushing outcomes:\n" + JSON.stringify(outcomes, null, 2));
|
88016 |
+
var url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);
|
88017 |
+
var discardedEvents = Object.keys(outcomes).map(function (key) {
|
88018 |
+
var _a = (0,tslib_es6/* __read */.CR)(key.split(':'), 2), category = _a[0], reason = _a[1];
|
88019 |
+
return {
|
88020 |
+
reason: reason,
|
88021 |
+
category: category,
|
88022 |
+
quantity: outcomes[key],
|
88023 |
+
};
|
88024 |
+
// TODO: Improve types on discarded_events to get rid of cast
|
88025 |
+
});
|
88026 |
+
var envelope = createClientReportEnvelope(discardedEvents, this._api.tunnel && dsnToString(this._api.dsn));
|
88027 |
+
try {
|
88028 |
+
sendReport(url, serializeEnvelope(envelope));
|
88029 |
+
}
|
88030 |
+
catch (e) {
|
88031 |
+
esm_flags_IS_DEBUG_BUILD && esm_logger/* logger.error */.kg.error(e);
|
88032 |
+
}
|
88033 |
+
};
|
88034 |
/**
|
88035 |
* Handle Sentry repsonse for promise-based transports.
|
88036 |
*/
|
88037 |
BaseTransport.prototype._handleResponse = function (_a) {
|
88038 |
var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;
|
88039 |
+
var status = eventStatusFromHttpCode(response.status);
|
88040 |
+
this._rateLimits = updateRateLimits(this._rateLimits, headers);
|
88041 |
+
// eslint-disable-next-line deprecation/deprecation
|
88042 |
+
if (this._isRateLimited(requestType)) {
|
88043 |
+
esm_flags_IS_DEBUG_BUILD &&
|
88044 |
+
// eslint-disable-next-line deprecation/deprecation
|
88045 |
+
esm_logger/* logger.warn */.kg.warn("Too many " + requestType + " requests, backing off until: " + this._disabledUntil(requestType));
|
88046 |
+
}
|
88047 |
+
if (status === 'success') {
|
88048 |
resolve({ status: status });
|
88049 |
return;
|
88050 |
}
|
88052 |
};
|
88053 |
/**
|
88054 |
* Gets the time that given category is disabled until for rate limiting
|
88055 |
+
*
|
88056 |
+
* @deprecated Please use `disabledUntil` from @sentry/utils
|
88057 |
*/
|
88058 |
+
BaseTransport.prototype._disabledUntil = function (requestType) {
|
88059 |
+
var category = requestTypeToCategory(requestType);
|
88060 |
+
return new Date(disabledUntil(this._rateLimits, category));
|
88061 |
};
|
88062 |
/**
|
88063 |
* Checks if a category is rate limited
|
88064 |
+
*
|
88065 |
+
* @deprecated Please use `isRateLimited` from @sentry/utils
|
88066 |
*/
|
88067 |
+
BaseTransport.prototype._isRateLimited = function (requestType) {
|
88068 |
+
var category = requestTypeToCategory(requestType);
|
88069 |
+
return isRateLimited(this._rateLimits, category);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88070 |
};
|
88071 |
return BaseTransport;
|
88072 |
}());
|
88077 |
|
88078 |
|
88079 |
|
|
|
88080 |
/** `fetch` based transport */
|
88081 |
var FetchTransport = /** @class */ (function (_super) {
|
88082 |
+
(0,tslib_es6/* __extends */.ZT)(FetchTransport, _super);
|
88083 |
+
function FetchTransport(options, fetchImpl) {
|
88084 |
+
if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }
|
88085 |
+
var _this = _super.call(this, options) || this;
|
88086 |
+
_this._fetch = fetchImpl;
|
88087 |
+
return _this;
|
88088 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88089 |
/**
|
88090 |
* @param sentryRequest Prepared SentryRequest to be delivered
|
88091 |
* @param originalPayload Original payload used to create SentryRequest
|
88092 |
*/
|
88093 |
FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
|
88094 |
var _this = this;
|
88095 |
+
// eslint-disable-next-line deprecation/deprecation
|
88096 |
if (this._isRateLimited(sentryRequest.type)) {
|
88097 |
+
this.recordLostEvent('ratelimit_backoff', sentryRequest.type);
|
88098 |
return Promise.reject({
|
88099 |
event: originalPayload,
|
88100 |
type: sentryRequest.type,
|
88101 |
+
// eslint-disable-next-line deprecation/deprecation
|
88102 |
+
reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
|
88103 |
status: 429,
|
88104 |
});
|
88105 |
}
|
88106 |
var options = {
|
88107 |
body: sentryRequest.body,
|
88108 |
method: 'POST',
|
88109 |
+
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
|
88110 |
+
// (see https://caniuse.com/#feat=referrer-policy),
|
88111 |
+
// it doesn't. And it throws an exception instead of ignoring this parameter...
|
88112 |
// REF: https://github.com/getsentry/raven-js/issues/1233
|
88113 |
+
referrerPolicy: ((0,supports/* supportsReferrerPolicy */.hv)() ? 'origin' : ''),
|
88114 |
};
|
88115 |
if (this.options.fetchParameters !== undefined) {
|
88116 |
Object.assign(options, this.options.fetchParameters);
|
88118 |
if (this.options.headers !== undefined) {
|
88119 |
options.headers = this.options.headers;
|
88120 |
}
|
88121 |
+
return this._buffer
|
88122 |
+
.add(function () {
|
88123 |
+
return new syncpromise/* SyncPromise */.cW(function (resolve, reject) {
|
88124 |
+
void _this._fetch(sentryRequest.url, options)
|
88125 |
+
.then(function (response) {
|
88126 |
+
var headers = {
|
88127 |
+
'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
|
88128 |
+
'retry-after': response.headers.get('Retry-After'),
|
88129 |
+
};
|
88130 |
+
_this._handleResponse({
|
88131 |
+
requestType: sentryRequest.type,
|
88132 |
+
response: response,
|
88133 |
+
headers: headers,
|
88134 |
+
resolve: resolve,
|
88135 |
+
reject: reject,
|
88136 |
+
});
|
88137 |
+
})
|
88138 |
+
.catch(reject);
|
88139 |
+
});
|
88140 |
+
})
|
88141 |
+
.then(undefined, function (reason) {
|
88142 |
+
// It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
|
88143 |
+
if (reason instanceof SentryError) {
|
88144 |
+
_this.recordLostEvent('queue_overflow', sentryRequest.type);
|
88145 |
+
}
|
88146 |
+
else {
|
88147 |
+
_this.recordLostEvent('network_error', sentryRequest.type);
|
88148 |
+
}
|
88149 |
+
throw reason;
|
88150 |
+
});
|
88151 |
};
|
88152 |
return FetchTransport;
|
88153 |
}(BaseTransport));
|
88154 |
|
88155 |
//# sourceMappingURL=fetch.js.map
|
88156 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/new-xhr.js
|
88157 |
|
88158 |
|
88159 |
+
/**
|
88160 |
+
* The DONE ready state for XmlHttpRequest
|
88161 |
+
*
|
88162 |
+
* Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined
|
88163 |
+
* (e.g. during testing, it is `undefined`)
|
88164 |
+
*
|
88165 |
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}
|
88166 |
+
*/
|
88167 |
+
var XHR_READYSTATE_DONE = 4;
|
88168 |
+
/**
|
88169 |
+
* Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.
|
88170 |
+
*/
|
88171 |
+
function makeNewXHRTransport(options) {
|
88172 |
+
function makeRequest(request) {
|
88173 |
+
return new syncpromise/* SyncPromise */.cW(function (resolve, _reject) {
|
88174 |
+
var xhr = new XMLHttpRequest();
|
88175 |
+
xhr.onreadystatechange = function () {
|
88176 |
+
if (xhr.readyState === XHR_READYSTATE_DONE) {
|
88177 |
+
var response = {
|
88178 |
+
body: xhr.response,
|
88179 |
+
headers: {
|
88180 |
+
'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),
|
88181 |
+
'retry-after': xhr.getResponseHeader('Retry-After'),
|
88182 |
+
},
|
88183 |
+
reason: xhr.statusText,
|
88184 |
+
statusCode: xhr.status,
|
88185 |
+
};
|
88186 |
+
resolve(response);
|
88187 |
+
}
|
88188 |
+
};
|
88189 |
+
xhr.open('POST', options.url);
|
88190 |
+
for (var header in options.headers) {
|
88191 |
+
if (Object.prototype.hasOwnProperty.call(options.headers, header)) {
|
88192 |
+
xhr.setRequestHeader(header, options.headers[header]);
|
88193 |
+
}
|
88194 |
+
}
|
88195 |
+
xhr.send(request.body);
|
88196 |
+
});
|
88197 |
+
}
|
88198 |
+
return createTransport({ bufferSize: options.bufferSize }, makeRequest);
|
88199 |
+
}
|
88200 |
+
//# sourceMappingURL=new-xhr.js.map
|
88201 |
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/transports/xhr.js
|
88202 |
+
|
88203 |
|
88204 |
|
88205 |
/** `XHR` based transport */
|
88206 |
var XHRTransport = /** @class */ (function (_super) {
|
88207 |
+
(0,tslib_es6/* __extends */.ZT)(XHRTransport, _super);
|
88208 |
function XHRTransport() {
|
88209 |
return _super !== null && _super.apply(this, arguments) || this;
|
88210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88211 |
/**
|
88212 |
* @param sentryRequest Prepared SentryRequest to be delivered
|
88213 |
* @param originalPayload Original payload used to create SentryRequest
|
88214 |
*/
|
88215 |
XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
|
88216 |
var _this = this;
|
88217 |
+
// eslint-disable-next-line deprecation/deprecation
|
88218 |
if (this._isRateLimited(sentryRequest.type)) {
|
88219 |
+
this.recordLostEvent('ratelimit_backoff', sentryRequest.type);
|
88220 |
return Promise.reject({
|
88221 |
event: originalPayload,
|
88222 |
type: sentryRequest.type,
|
88223 |
+
// eslint-disable-next-line deprecation/deprecation
|
88224 |
+
reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
|
88225 |
status: 429,
|
88226 |
});
|
88227 |
}
|
88228 |
+
return this._buffer
|
88229 |
+
.add(function () {
|
88230 |
+
return new syncpromise/* SyncPromise */.cW(function (resolve, reject) {
|
88231 |
+
var request = new XMLHttpRequest();
|
88232 |
+
request.onreadystatechange = function () {
|
88233 |
+
if (request.readyState === 4) {
|
88234 |
+
var headers = {
|
88235 |
+
'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),
|
88236 |
+
'retry-after': request.getResponseHeader('Retry-After'),
|
88237 |
+
};
|
88238 |
+
_this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });
|
88239 |
+
}
|
88240 |
+
};
|
88241 |
+
request.open('POST', sentryRequest.url);
|
88242 |
+
for (var header in _this.options.headers) {
|
88243 |
+
if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {
|
88244 |
+
request.setRequestHeader(header, _this.options.headers[header]);
|
88245 |
+
}
|
88246 |
}
|
88247 |
+
request.send(sentryRequest.body);
|
88248 |
+
});
|
88249 |
+
})
|
88250 |
+
.then(undefined, function (reason) {
|
88251 |
+
// It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
|
88252 |
+
if (reason instanceof SentryError) {
|
88253 |
+
_this.recordLostEvent('queue_overflow', sentryRequest.type);
|
88254 |
}
|
88255 |
+
else {
|
88256 |
+
_this.recordLostEvent('network_error', sentryRequest.type);
|
88257 |
+
}
|
88258 |
+
throw reason;
|
88259 |
+
});
|
88260 |
};
|
88261 |
return XHRTransport;
|
88262 |
}(BaseTransport));
|
88274 |
* @hidden
|
88275 |
*/
|
88276 |
var BrowserBackend = /** @class */ (function (_super) {
|
88277 |
+
(0,tslib_es6/* __extends */.ZT)(BrowserBackend, _super);
|
88278 |
function BrowserBackend() {
|
88279 |
return _super !== null && _super.apply(this, arguments) || this;
|
88280 |
}
|
88282 |
* @inheritDoc
|
88283 |
*/
|
88284 |
BrowserBackend.prototype.eventFromException = function (exception, hint) {
|
88285 |
+
return eventFromException(exception, hint, this._options.attachStacktrace);
|
88286 |
};
|
88287 |
/**
|
88288 |
* @inheritDoc
|
88289 |
*/
|
88290 |
BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
|
88291 |
if (level === void 0) { level = Severity.Info; }
|
88292 |
+
return eventFromMessage(message, level, hint, this._options.attachStacktrace);
|
88293 |
};
|
88294 |
/**
|
88295 |
* @inheritDoc
|
88299 |
// We return the noop transport here in case there is no Dsn.
|
88300 |
return _super.prototype._setupTransport.call(this);
|
88301 |
}
|
88302 |
+
var transportOptions = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });
|
88303 |
+
var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);
|
88304 |
+
var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);
|
88305 |
if (this._options.transport) {
|
88306 |
return new this._options.transport(transportOptions);
|
88307 |
}
|
88308 |
+
if ((0,supports/* supportsFetch */.Ak)()) {
|
88309 |
+
var requestOptions = (0,tslib_es6/* __assign */.pi)({}, transportOptions.fetchParameters);
|
88310 |
+
this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });
|
88311 |
return new FetchTransport(transportOptions);
|
88312 |
}
|
88313 |
+
this._newTransport = makeNewXHRTransport({
|
88314 |
+
url: url,
|
88315 |
+
headers: transportOptions.headers,
|
88316 |
+
});
|
88317 |
return new XHRTransport(transportOptions);
|
88318 |
};
|
88319 |
return BrowserBackend;
|
88324 |
|
88325 |
|
88326 |
|
88327 |
+
|
88328 |
+
var helpers_global = (0,esm_global/* getGlobalObject */.R)();
|
88329 |
var ignoreOnError = 0;
|
88330 |
/**
|
88331 |
* @hidden
|
88352 |
* @hidden
|
88353 |
*/
|
88354 |
function wrap(fn, options, before) {
|
88355 |
+
// for future readers what this does is wrap a function and then create
|
88356 |
+
// a bi-directional wrapping between them.
|
88357 |
+
//
|
88358 |
+
// example: wrapped = wrap(original);
|
88359 |
+
// original.__sentry_wrapped__ -> wrapped
|
88360 |
+
// wrapped.__sentry_original__ -> original
|
88361 |
if (options === void 0) { options = {}; }
|
88362 |
if (typeof fn !== 'function') {
|
88363 |
return fn;
|
88364 |
}
|
88365 |
try {
|
88366 |
+
// if we're dealing with a function that was previously wrapped, return
|
88367 |
+
// the original wrapper.
|
88368 |
+
var wrapper = fn.__sentry_wrapped__;
|
88369 |
+
if (wrapper) {
|
88370 |
+
return wrapper;
|
88371 |
+
}
|
88372 |
// We don't wanna wrap it twice
|
88373 |
+
if ((0,object/* getOriginalFunction */.HK)(fn)) {
|
88374 |
return fn;
|
88375 |
}
|
|
|
|
|
|
|
|
|
88376 |
}
|
88377 |
catch (e) {
|
88378 |
// Just accessing custom props in some Selenium environments
|
88390 |
}
|
88391 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
88392 |
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88393 |
// Attempt to invoke user-land function
|
88394 |
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
88395 |
// means the sentry.javascript SDK caught an error invoking your application code. This
|
88400 |
ignoreNextOnError();
|
88401 |
withScope(function (scope) {
|
88402 |
scope.addEventProcessor(function (event) {
|
|
|
88403 |
if (options.mechanism) {
|
88404 |
+
(0,misc/* addExceptionTypeValue */.Db)(event, undefined, undefined);
|
88405 |
+
(0,misc/* addExceptionMechanism */.EG)(event, options.mechanism);
|
88406 |
}
|
88407 |
+
event.extra = (0,tslib_es6/* __assign */.pi)((0,tslib_es6/* __assign */.pi)({}, event.extra), { arguments: args });
|
88408 |
+
return event;
|
88409 |
});
|
88410 |
captureException(ex);
|
88411 |
});
|
88423 |
}
|
88424 |
}
|
88425 |
catch (_oO) { } // eslint-disable-line no-empty
|
|
|
|
|
|
|
|
|
|
|
|
|
88426 |
// Signal that this function has been wrapped/filled already
|
88427 |
// for both debugging and to prevent it to being wrapped/filled twice
|
88428 |
+
(0,object/* markFunctionWrapped */.$Q)(sentryWrapped, fn);
|
88429 |
+
(0,object/* addNonEnumerableProperty */.xp)(fn, '__sentry_wrapped__', sentryWrapped);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88430 |
// Restore original function name (not all browsers allow that)
|
88431 |
try {
|
88432 |
var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');
|