ordering-ui-external 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.4daed536057dd0fbaf15.js → 0.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{1.ordering-ui.4daed536057dd0fbaf15.js → 1.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{2.ordering-ui.4daed536057dd0fbaf15.js → 2.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{4.ordering-ui.4daed536057dd0fbaf15.js → 4.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{5.ordering-ui.4daed536057dd0fbaf15.js → 5.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{6.ordering-ui.4daed536057dd0fbaf15.js → 6.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/7.ordering-ui.eec38d66166bc4458215.js +2 -0
- package/_bundles/{7.ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt → 7.ordering-ui.eec38d66166bc4458215.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.4daed536057dd0fbaf15.js → 8.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{9.ordering-ui.4daed536057dd0fbaf15.js → 9.ordering-ui.eec38d66166bc4458215.js} +1 -1
- package/_bundles/{ordering-ui.4daed536057dd0fbaf15.js → ordering-ui.eec38d66166bc4458215.js} +2 -2
- package/_bundles/{ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt → ordering-ui.eec38d66166bc4458215.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/src/components/Checkout/index.js +6 -6
- package/package.json +1 -1
- package/src/themes/five/src/components/Checkout/index.js +3 -2
- package/_bundles/7.ordering-ui.4daed536057dd0fbaf15.js +0 -2
|
File without changes
|
|
@@ -56,7 +56,7 @@ var mapConfigs = {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
var CheckoutUI = function CheckoutUI(props) {
|
|
59
|
-
var _businessDetails$busi, _businessDetails$busi2, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _businessDetails$busi3, _businessDetails$busi4, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi9, _businessDetails$busi10, _businessDetails$busi11, _cartState$cart$spot_, _cartState$
|
|
59
|
+
var _businessDetails$busi, _businessDetails$busi2, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _cartState$cart, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _businessDetails$busi3, _businessDetails$busi4, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi9, _businessDetails$busi10, _businessDetails$busi11, _cartState$cart$spot_, _cartState$cart2, _validationFields$fie15, _validationFields$fie16, _validationFields$fie17, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cart$products2, _validationFields$fie18, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _validationFields$fie22, _validationFields$fie23, _customerState$user3;
|
|
60
60
|
var cart = props.cart,
|
|
61
61
|
errors = props.errors,
|
|
62
62
|
placing = props.placing,
|
|
@@ -151,7 +151,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
151
151
|
var placeSpotsEnabled = placeSpotTypes.includes(options === null || options === void 0 ? void 0 : options.type) && !useKioskApp;
|
|
152
152
|
// const [hasBusinessPlaces, setHasBusinessPlaces] = useState(null)
|
|
153
153
|
|
|
154
|
-
var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || placing || errorCash || loading || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
|
|
154
|
+
var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || placing || errorCash || loading || (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
|
|
155
155
|
// (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
|
|
156
156
|
options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.checkout) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.driver_tip) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.driver_tip) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0;
|
|
157
157
|
var driverTipsOptions = typeof (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o = configs.driver_tip_options) === null || _configs$driver_tip_o === void 0 ? void 0 : _configs$driver_tip_o.value) === 'string' ? JSON.parse(configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o2 = configs.driver_tip_options) === null || _configs$driver_tip_o2 === void 0 ? void 0 : _configs$driver_tip_o2.value) || [] : (configs === null || configs === void 0 ? void 0 : (_configs$driver_tip_o3 = configs.driver_tip_options) === null || _configs$driver_tip_o3 === void 0 ? void 0 : _configs$driver_tip_o3.value) || [];
|
|
@@ -391,7 +391,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
391
391
|
isInputMode: true,
|
|
392
392
|
isHomeStyle: true,
|
|
393
393
|
cart: cart,
|
|
394
|
-
spotNumberDefault: (_cartState$cart$spot_ = cartState === null || cartState === void 0 ? void 0 : (_cartState$
|
|
394
|
+
spotNumberDefault: (_cartState$cart$spot_ = cartState === null || cartState === void 0 ? void 0 : (_cartState$cart2 = cartState.cart) === null || _cartState$cart2 === void 0 ? void 0 : _cartState$cart2.spot_number) !== null && _cartState$cart$spot_ !== void 0 ? _cartState$cart$spot_ : cart === null || cart === void 0 ? void 0 : cart.spot_number,
|
|
395
395
|
vehicleDefault: cart === null || cart === void 0 ? void 0 : cart.vehicle
|
|
396
396
|
})), !cartState.loading && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && options.type === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie15 = validationFields.fields) === null || _validationFields$fie15 === void 0 ? void 0 : (_validationFields$fie16 = _validationFields$fie15.checkout) === null || _validationFields$fie16 === void 0 ? void 0 : (_validationFields$fie17 = _validationFields$fie16.driver_tip) === null || _validationFields$fie17 === void 0 ? void 0 : _validationFields$fie17.enabled) && driverTipsOptions.length > 0 && !useKioskApp && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
397
397
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
@@ -418,7 +418,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
418
418
|
onClick: function onClick() {
|
|
419
419
|
return handlePlaceOrder();
|
|
420
420
|
}
|
|
421
|
-
}, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie18 = validationFields.fields) === null || _validationFields$fie18 === void 0 ? void 0 : (_validationFields$fie19 = _validationFields$fie18.checkout) === null || _validationFields$fie19 === void 0 ? void 0 : (_validationFields$fie20 = _validationFields$fie19.driver_tip) === null || _validationFields$fie20 === void 0 ? void 0 : _validationFields$fie20.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie21 = validationFields.fields) === null || _validationFields$fie21 === void 0 ? void 0 : (_validationFields$fie22 = _validationFields$fie21.checkout) === null || _validationFields$fie22 === void 0 ? void 0 : (_validationFields$fie23 = _validationFields$fie22.driver_tip) === null || _validationFields$fie23 === void 0 ? void 0 : _validationFields$fie23.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.'))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
421
|
+
}, !(cart !== null && cart !== void 0 && cart.valid_maximum) ? "".concat(t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order'), ": ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.maximum)) : !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ? "".concat(t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:'), " ").concat(parsePrice(cart === null || cart === void 0 ? void 0 : cart.minimum)) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order'))), !(cart !== null && cart !== void 0 && cart.valid_address) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')), !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_NOT_PAYMENT_SELECTED', 'Please, select a payment method to place order.')), !(cart !== null && cart !== void 0 && cart.valid_products) && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')), (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cart !== null && cart !== void 0 && cart.spot_number) && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')), options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie18 = validationFields.fields) === null || _validationFields$fie18 === void 0 ? void 0 : (_validationFields$fie19 = _validationFields$fie18.checkout) === null || _validationFields$fie19 === void 0 ? void 0 : (_validationFields$fie20 = _validationFields$fie19.driver_tip) === null || _validationFields$fie20 === void 0 ? void 0 : _validationFields$fie20.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie21 = validationFields.fields) === null || _validationFields$fie21 === void 0 ? void 0 : (_validationFields$fie22 = _validationFields$fie21.checkout) === null || _validationFields$fie22 === void 0 ? void 0 : (_validationFields$fie23 = _validationFields$fie22.driver_tip) === null || _validationFields$fie23 === void 0 ? void 0 : _validationFields$fie23.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 && /*#__PURE__*/_react.default.createElement(_styles.WarningText, null, t('WARNING_INVALID_DRIVER_TIP', 'Driver Tip is required.'))), /*#__PURE__*/_react.default.createElement(_Confirm.Alert, {
|
|
422
422
|
title: t('CUSTOMER_DETAILS', 'Customer Details'),
|
|
423
423
|
content: alertState.content,
|
|
424
424
|
acceptText: t('ACCEPT', 'Accept'),
|
|
@@ -458,7 +458,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
458
458
|
})));
|
|
459
459
|
};
|
|
460
460
|
var Checkout = function Checkout(props) {
|
|
461
|
-
var _Object$values2, _cartState$error, _cartState$
|
|
461
|
+
var _Object$values2, _cartState$error, _cartState$cart3;
|
|
462
462
|
var errors = props.errors,
|
|
463
463
|
clearErrors = props.clearErrors,
|
|
464
464
|
cartUuid = props.cartUuid,
|
|
@@ -740,7 +740,7 @@ var Checkout = function Checkout(props) {
|
|
|
740
740
|
}
|
|
741
741
|
}), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
|
|
742
742
|
height: 25
|
|
743
|
-
}))), cartUuid && cartState.cart && ((_cartState$
|
|
743
|
+
}))), cartUuid && cartState.cart && ((_cartState$cart3 = cartState.cart) === null || _cartState$cart3 === void 0 ? void 0 : _cartState$cart3.status) !== 1 && /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.Checkout, checkoutProps), (currentCart === null || currentCart === void 0 ? void 0 : currentCart.products) && /*#__PURE__*/_react.default.createElement(_UpsellingPage.UpsellingPage, {
|
|
744
744
|
businessId: currentCart === null || currentCart === void 0 ? void 0 : currentCart.business_id,
|
|
745
745
|
cartProducts: currentCart === null || currentCart === void 0 ? void 0 : currentCart.products,
|
|
746
746
|
business: currentCart === null || currentCart === void 0 ? void 0 : currentCart.business,
|
package/package.json
CHANGED
|
@@ -125,6 +125,7 @@ const CheckoutUI = (props) => {
|
|
|
125
125
|
placing ||
|
|
126
126
|
errorCash ||
|
|
127
127
|
loading ||
|
|
128
|
+
(options?.type === 3 && !(cartState?.cart?.spot_number || cart?.spot_number)) ||
|
|
128
129
|
!cart?.valid_maximum ||
|
|
129
130
|
(!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ||
|
|
130
131
|
// (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
|
|
@@ -507,11 +508,11 @@ const CheckoutUI = (props) => {
|
|
|
507
508
|
</WarningText>
|
|
508
509
|
)}
|
|
509
510
|
|
|
510
|
-
{
|
|
511
|
+
{options?.type === 3 && !cart?.spot_number && (
|
|
511
512
|
<WarningText>
|
|
512
513
|
{t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
|
|
513
514
|
</WarningText>
|
|
514
|
-
)}
|
|
515
|
+
)}
|
|
515
516
|
|
|
516
517
|
{options.type === 1 &&
|
|
517
518
|
validationFields?.fields?.checkout?.driver_tip?.enabled &&
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7.ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt */
|
|
2
|
-
(window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[7],{590:function(t,r,e){"use strict";var n,o=e(625),i=e(629),u=e(630);n=o()?u:i,t.exports=n},591:function(t,r,e){t.exports=function(t,r,e,n,o){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)t=t?t[r[n]]:o;return t===o?e:t}},592:function(t,r,e){"use strict";var n,o=e(621),i=e(636),u=e(637);n=o()?i:u,t.exports=n},593:function(t,r,e){"use strict";var n,o=e(638),i=e(643),u=e(644);n=o()?i:u,t.exports=n},594:function(t,r,e){"use strict";var n=e(646);t.exports=n},596:function(t,r,e){"use strict";var n=Number.POSITIVE_INFINITY;t.exports=n},597:function(t,r,e){"use strict";var n=e(610).NEGATIVE_INFINITY;t.exports=n},598:function(t,r,e){"use strict";t.exports=1023},599:function(t,r,e){"use strict";var n=e(615);t.exports=n},600:function(t,r,e){"use strict";var n=e(616);t.exports=n},601:function(t,r,e){"use strict";var n=e(619);t.exports=n},602:function(t,r,e){"use strict";var n=Object.prototype.toString;t.exports=n},603:function(t,r,e){"use strict";var n=e(666);t.exports=n},604:function(t,r,e){"use strict";var n=e(668);t.exports=n},605:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=e(606);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return n(o).default}});var i=e(680);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return n(i).default}});var u=e(681);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return n(u).default}})},606:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(607)),i=n(e(591)),u=n(e(608)),s=e(87),c=e(679);function a(t,r){for(var e in r.drop)if(r.drop.hasOwnProperty(e)){var n=""===e?t:(0,i.default)(t,e);if("object"==typeof n&&null!==n)for(var o=0,u=r.drop[e];o<u.length;o++){delete n[u[o]]}}}function f(t,r){for(var e in r.allow)if(r.allow.hasOwnProperty(e)){var n=""===e?t:(0,i.default)(t,e);if("object"==typeof n&&null!==n)for(var o in n)n.hasOwnProperty(o)&&-1===r.allow[e].indexOf(o)&&delete n[o]}}function p(t,r){var e=JSON.parse(JSON.stringify(t));for(var n in r.map)if(r.map.hasOwnProperty(n)){var o=r.map[n],u=n.split("."),a=void 0;if(u.length>1?(u.pop(),a=(0,i.default)(e,u.join("."))):a=t,"object"==typeof a){if(o.copy){var f=(0,i.default)(e,o.copy);void 0!==f&&(0,s.dset)(t,n,f)}else if(o.move){var p=(0,i.default)(e,o.move);void 0!==p&&(0,s.dset)(t,n,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,s.dset)(t,n,o.set);if(o.to_string){var l=(0,i.default)(t,n);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,s.dset)(t,n,JSON.stringify(l)):(0,s.dset)(t,n,"undefined")}}}}function l(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var e=(0,i.default)(t,r.sample.path),n=(0,o.default)(JSON.stringify(e)),s=-64,c=[];v(n.slice(0,8),c);for(var a=0,f=0;f<64&&1!==c[f];f++)a++;if(0!==a){var p=[];v(n.slice(9,16),p),s-=a,c.splice(0,a),p.splice(64-a),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),s)<r.sample.percent}(t,r):(e=r.sample.percent,Math.random()<=e)));var e}function v(t,r){for(var e=0;e<8;e++)for(var n=t[e],o=128;o>=1;o/=2)n-o>=0?(n-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var e=t,n=0,o=r;n<o.length;n++){var i=o[n];switch(i.type){case"drop":return null;case"drop_properties":a(e,i.config);break;case"allow_properties":f(e,i.config);break;case"sample_event":if(l(e,i.config))break;return null;case"map_properties":p(e,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return e}},607:function(t,r,e){"use strict";e.r(r);for(var n=[],o=0;o<64;)n[o]=0|4294967296*Math.sin(++o%Math.PI);r.default=function(t){var r,e,i,u=[r=1732584193,e=4023233417,~r,~e],s=[],c=unescape(encodeURI(t))+"",a=c.length;for(t=--a/4+2|15,s[--t]=8*a;~a;)s[a>>2]|=c.charCodeAt(a)<<8*a--;for(o=c=0;o<t;o+=16){for(a=u;c<64;a=[i=a[3],r+((i=a[0]+[r&e|~r&i,i&r|~i&e,r^e^i,e^(r|~i)][a=c>>4]+n[c]+~~s[o|15&[c,5*c+1,3*c+5,7*c][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+c++%4])|i>>>-a),r,e])r=0|a[1],e=a[2];for(c=4;c;)u[--c]+=a[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}},608:function(t,r,e){"use strict";var n=e(609);t.exports=n},609:function(t,r,e){"use strict";var n=e(596),o=e(597),i=e(598),u=e(612),s=e(613),c=e(614),a=e(599),f=e(600),p=e(617),l=e(670),v=e(676),y=e(601),h=e(604),d=[0,0],x=[0,0];t.exports=function(t,r){var e,g;return 0===t||a(t)||f(t)?t:(l(d,t),r+=d[1],(r+=v(t=d[0]))<c?p(0,t):r>u?t<0?o:n:(r<=s?(r+=52,g=2220446049250313e-31):g=1,y(x,t),e=x[0],e&=2148532223,g*h(e|=r+i<<20,x[1])))}},610:function(t,r,e){"use strict";var n=e(611);t.exports=n},611:function(t,r,e){"use strict";t.exports=Number},612:function(t,r,e){"use strict";t.exports=1023},613:function(t,r,e){"use strict";t.exports=-1023},614:function(t,r,e){"use strict";t.exports=-1074},615:function(t,r,e){"use strict";t.exports=function(t){return t!=t}},616:function(t,r,e){"use strict";var n=e(596),o=e(597);t.exports=function(t){return t===n||t===o}},617:function(t,r,e){"use strict";var n=e(618);t.exports=n},618:function(t,r,e){"use strict";var n=e(601),o=e(603),i=e(604),u=[0,0];t.exports=function(t,r){var e,s;return n(u,t),e=u[0],e&=2147483647,s=o(r),i(e|=s&=2147483648,u[1])}},619:function(t,r,e){"use strict";var n=e(620);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},620:function(t,r,e){"use strict";var n=e(592),o=e(593),i=e(645),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return u[0]=r,t[0]=s[c],t[1]=s[a],t}},621:function(t,r,e){"use strict";var n=e(622);t.exports=n},622:function(t,r,e){"use strict";var n=e(623),o=e(634),i=e(635);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},623:function(t,r,e){"use strict";var n=e(624);t.exports=n},624:function(t,r,e){"use strict";var n=e(590),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===n(t)}},625:function(t,r,e){"use strict";var n=e(626);t.exports=n},626:function(t,r,e){"use strict";var n=e(627)();t.exports=function(){return n&&"symbol"==typeof Symbol.toStringTag}},627:function(t,r,e){"use strict";var n=e(628);t.exports=n},628:function(t,r,e){"use strict";t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},629:function(t,r,e){"use strict";var n=e(602);t.exports=function(t){return n.call(t)}},630:function(t,r,e){"use strict";var n=e(631),o=e(633),i=e(602);t.exports=function(t){var r,e,u;if(null==t)return i.call(t);e=t[o],r=n(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=e:delete t[o],u}},631:function(t,r,e){"use strict";var n=e(632);t.exports=n},632:function(t,r,e){"use strict";var n=Object.prototype.hasOwnProperty;t.exports=function(t,r){return null!=t&&n.call(t,r)}},633:function(t,r,e){"use strict";var n="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=n},634:function(t,r,e){"use strict";t.exports=4294967295},635:function(t,r,e){"use strict";var n="function"==typeof Uint32Array?Uint32Array:null;t.exports=n},636:function(t,r,e){"use strict";var n="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=n},637:function(t,r,e){"use strict";t.exports=function(){throw new Error("not implemented")}},638:function(t,r,e){"use strict";var n=e(639);t.exports=n},639:function(t,r,e){"use strict";var n=e(640),o=e(642);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=n(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},640:function(t,r,e){"use strict";var n=e(641);t.exports=n},641:function(t,r,e){"use strict";var n=e(590),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===n(t)}},642:function(t,r,e){"use strict";var n="function"==typeof Float64Array?Float64Array:null;t.exports=n},643:function(t,r,e){"use strict";var n="function"==typeof Float64Array?Float64Array:void 0;t.exports=n},644:function(t,r,e){"use strict";t.exports=function(){throw new Error("not implemented")}},645:function(t,r,e){"use strict";var n,o,i;!0===e(594)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},646:function(t,r,e){"use strict";var n,o,i=e(647);(o=new i.uint16(1))[0]=4660,n=52===new i.uint8(o.buffer)[0],t.exports=n},647:function(t,r,e){"use strict";var n=e(648),o={uint16:e(657),uint8:n};t.exports=o},648:function(t,r,e){"use strict";var n,o=e(649),i=e(655),u=e(656);n=o()?i:u,t.exports=n},649:function(t,r,e){"use strict";var n=e(650);t.exports=n},650:function(t,r,e){"use strict";var n=e(651),o=e(653),i=e(654);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},651:function(t,r,e){"use strict";var n=e(652);t.exports=n},652:function(t,r,e){"use strict";var n=e(590),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===n(t)}},653:function(t,r,e){"use strict";t.exports=255},654:function(t,r,e){"use strict";var n="function"==typeof Uint8Array?Uint8Array:null;t.exports=n},655:function(t,r,e){"use strict";var n="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=n},656:function(t,r,e){"use strict";t.exports=function(){throw new Error("not implemented")}},657:function(t,r,e){"use strict";var n,o=e(658),i=e(664),u=e(665);n=o()?i:u,t.exports=n},658:function(t,r,e){"use strict";var n=e(659);t.exports=n},659:function(t,r,e){"use strict";var n=e(660),o=e(662),i=e(663);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},660:function(t,r,e){"use strict";var n=e(661);t.exports=n},661:function(t,r,e){"use strict";var n=e(590),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===n(t)}},662:function(t,r,e){"use strict";t.exports=65535},663:function(t,r,e){"use strict";var n="function"==typeof Uint16Array?Uint16Array:null;t.exports=n},664:function(t,r,e){"use strict";var n="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=n},665:function(t,r,e){"use strict";t.exports=function(){throw new Error("not implemented")}},666:function(t,r,e){"use strict";var n=e(592),o=e(593),i=e(667),u=new o(1),s=new n(u.buffer);t.exports=function(t){return u[0]=t,s[i]}},667:function(t,r,e){"use strict";var n;n=!0===e(594)?1:0,t.exports=n},668:function(t,r,e){"use strict";var n=e(592),o=e(593),i=e(669),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return s[c]=t,s[a]=r,u[0]}},669:function(t,r,e){"use strict";var n,o,i;!0===e(594)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},670:function(t,r,e){"use strict";var n=e(671);t.exports=n},671:function(t,r,e){"use strict";var n=e(672);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},672:function(t,r,e){"use strict";var n=e(673),o=e(600),i=e(599),u=e(674);t.exports=function(t,r){return i(r)||o(r)?(t[0]=r,t[1]=0,t):0!==r&&u(r)<n?(t[0]=4503599627370496*r,t[1]=-52,t):(t[0]=r,t[1]=0,t)}},673:function(t,r,e){"use strict";t.exports=22250738585072014e-324},674:function(t,r,e){"use strict";var n=e(675);t.exports=n},675:function(t,r,e){"use strict";t.exports=function(t){return Math.abs(t)}},676:function(t,r,e){"use strict";var n=e(677);t.exports=n},677:function(t,r,e){"use strict";var n=e(603),o=e(678),i=e(598);t.exports=function(t){var r=n(t);return(r=(r&o)>>>20)-i|0}},678:function(t,r,e){"use strict";t.exports=2146435072},679:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=n(e(591));r.unset=function(t,r){if((0,o.default)(t,r)){for(var e=r.split("."),n=e.pop();e.length&&"\\"===e[e.length-1].slice(-1);)n=e.pop().slice(0,-1)+"."+n;for(;e.length;)t=t[r=e.shift()];return delete t[n]}return!0}},680:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(591));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var e=t[0];switch(e){case"!":return!i(t[1],r);case"or":for(var n=1;n<t.length;n++)if(i(t[n],r))return!0;return!1;case"and":for(n=1;n<t.length;n++)if(!i(t[n],r))return!1;return!0;case"=":case"!=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r));switch(e){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"<=":case"<":case">":case">=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));if("number"!=typeof t||"number"!=typeof r)return!1;switch(e){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"contains":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return-1!==t.indexOf(r)}(u(t[1],r),u(t[2],r));case"match":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return function(t,r){var e,n;t:for(;t.length>0;){var o=void 0,i=void 0;if(o=(e=c(t)).star,i=e.chunk,t=e.pattern,o&&""===i)return!0;var u=a(i,r),s=u.t,f=u.ok,p=u.err;if(p)return!1;if(!f||!(0===s.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(s=(n=a(i,r.slice(l+1))).t,f=n.ok,p=n.err,f){if(0===t.length&&s.length>0)continue;r=s;continue t}if(p)return!1}return!1}r=s}return 0===r.length}(r,t)}(u(t[1],r),u(t[2],r));case"lowercase":var o=u(t[1],r);return"string"!=typeof o?null:o.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){if(null===t)return 0;if(!Array.isArray(t)&&"string"!=typeof t)return NaN;return t.length}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(e))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function s(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var e,n=!1;t:for(e=0;e<t.length;e++)switch(t[e]){case"\\":e+1<t.length&&e++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break t}return r.chunk=t.slice(0,e),r.pattern=t.slice(e),r}function a(t,r){for(var e,n,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var s=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var a,p="";if(a=(e=f(t)).char,t=e.newChunk,e.err)return o;if(p=a,"-"===t[0]&&(p=(n=f(t.slice(1))).char,t=n.newChunk,n.err))return o;a<=i&&i<=p&&(s=!0),c++}if(s!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function f(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var e=i(t,r);if("boolean"!=typeof e)return!1;return e}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},681:function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],e=0,n=this.rules;e<n.length;e++){var o=n[e];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=n},684:function(t,r,e){"use strict";e.r(r),e.d(r,"tsubMiddleware",(function(){return o}));var n=e(605),o=function(t){return function(r){var e=r.payload,o=r.integration,i=r.next;new n.Store(t).getRulesByDestinationName(o).forEach((function(t){for(var r=t.matchers,o=t.transformers,u=0;u<r.length;u++)if(n.matches(e.obj,r[u])&&(e.obj=n.transform(e.obj,o[u]),null===e.obj))return i(null)})),i(e)}}}}]);
|