notificare-react-preview-components 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=i(t),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},a(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)};function c(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function l(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{c(i.next(e))}catch(e){a(e)}}function s(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((i=i.apply(e,t||[])).next())}))}function p(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function d(e,t){var n=t&&t.cache?t.cache:y,i=t&&t.serializer?t.serializer:b;return(t&&t.strategy?t.strategy:h)(e,{cache:n,serializer:i})}function u(e,t,n,i){var r,a=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:n(i),o=t.get(a);return void 0===o&&(o=e.call(this,i),t.set(a,o)),o}function _(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return void 0===a&&(a=e.apply(this,i),t.set(r,a)),a}function f(e,t,n,i,r){return n.bind(t,e,i,r)}function h(e,t){return f(e,this,1===e.length?u:_,t.cache.create(),t.serializer)}"function"==typeof SuppressedError&&SuppressedError;var m,g,v,b=function(){return JSON.stringify(arguments)},w=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),y={create:function(){return new w}},x={variadic:function(e,t){return f(e,this,_,t.cache.create(),t.serializer)}};function k(e){return e.type===g.literal}function E(e){return e.type===g.argument}function j(e){return e.type===g.number}function N(e){return e.type===g.date}function S(e){return e.type===g.time}function T(e){return e.type===g.select}function M(e){return e.type===g.plural}function A(e){return e.type===g.pound}function C(e){return e.type===g.tag}function P(e){return!(!e||"object"!=typeof e||e.type!==v.number)}function L(e){return!(!e||"object"!=typeof e||e.type!==v.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(m||(m={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(g||(g={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(v||(v={}));var O=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,R=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function I(e){var t={};return e.replace(R,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var U=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var B=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,H=/^(@+)?(\+|#+)?[rs]?$/g,F=/(\*)(0+)|(#+)(0+)|(0+)/g,D=/^(0+)$/;function G(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(H,(function(e,n,i){return"string"!=typeof i?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===i?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof i?i.length:0)),""})),t}function z(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function V(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!D.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Z(e){var t=z(e);return t||{}}function $(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=s(s(s({},t),{notation:"scientific"}),r.options.reduce((function(e,t){return s(s({},e),Z(t))}),{}));continue;case"engineering":t=s(s(s({},t),{notation:"engineering"}),r.options.reduce((function(e,t){return s(s({},e),Z(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(F,(function(e,n,i,r,a,o){if(n)t.minimumIntegerDigits=i.length;else{if(r&&a)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(D.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(B.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(B,(function(e,n,i,r,a,o){return"*"===i?t.minimumFractionDigits=n.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var a=r.options[0];"w"===a?t=s(s({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=s(s({},t),G(a)))}else if(H.test(r.stem))t=s(s({},t),G(r.stem));else{var o=z(r.stem);o&&(t=s(s({},t),o));var c=V(r.stem);c&&(t=s(s({},t),c))}}return t}var W,K={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function q(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,i=e.language;return"root"!==i&&(n=e.maximize().region),(K[n||""]||K[i||""]||K["".concat(i,"-001")]||K["001"])[0]}var X=new RegExp("^".concat(O.source,"*")),Y=new RegExp("".concat(O.source,"*$"));function J(e,t){return{start:e,end:t}}var Q=!!String.prototype.startsWith&&"_a".startsWith("a",1),ee=!!String.fromCodePoint,te=!!Object.fromEntries,ne=!!String.prototype.codePointAt,ie=!!String.prototype.trimStart,re=!!String.prototype.trimEnd,ae=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},oe=!0;try{oe="a"===(null===(W=fe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===W?void 0:W[0])}catch(e){oe=!1}var se,ce=Q?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},le=ee?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,i="",r=e.length,a=0;r>a;){if((n=e[a++])>1114111)throw RangeError(n+" is not a valid code point");i+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return i},pe=te?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],o=r[1];t[a]=o}return t},de=ne?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i,r=e.charCodeAt(t);return r<55296||r>56319||t+1===n||(i=e.charCodeAt(t+1))<56320||i>57343?r:i-56320+(r-55296<<10)+65536}},ue=ie?function(e){return e.trimStart()}:function(e){return e.replace(X,"")},_e=re?function(e){return e.trimEnd()}:function(e){return e.replace(Y,"")};function fe(e,t){return new RegExp(e,t)}if(oe){var he=fe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");se=function(e,t){var n;return he.lastIndex=t,null!==(n=he.exec(e)[1])&&void 0!==n?n:""}}else se=function(e,t){for(var n=[];;){var i=de(e,t);if(void 0===i||be(i)||we(i))break;n.push(i),t+=i>=65536?2:1}return le.apply(void 0,n)};var me,ge=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var i=[];!this.isEOF();){var r=this.char();if(123===r){if((a=this.parseArgument(e,n)).err)return a;i.push(a.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(m.UNMATCHED_CLOSING_TAG,J(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&ve(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;i.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;i.push(a.val)}}else{var o=this.clonePosition();this.bump(),i.push({type:g.pound,location:J(o,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:g.literal,value:"<".concat(i,"/>"),location:J(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var a=r.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ve(this.char()))return this.error(m.INVALID_TAG,J(o,this.clonePosition()));var s=this.clonePosition();return i!==this.parseTagName()?this.error(m.UNMATCHED_CLOSING_TAG,J(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:g.tag,value:i,children:a,location:J(n,this.clonePosition())},err:null}:this.error(m.INVALID_TAG,J(o,this.clonePosition())))}return this.error(m.UNCLOSED_TAG,J(n,this.clonePosition()))}return this.error(m.INVALID_TAG,J(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),i="";;){var r=this.tryParseQuote(t);if(r)i+=r;else{var a=this.tryParseUnquoted(e,t);if(a)i+=a;else{var o=this.tryParseLeftAngleBracket();if(!o)break;i+=o}}}var s=J(n,this.clonePosition());return{val:{type:g.literal,value:i,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ve(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return le.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),le(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(m.EMPTY_ARGUMENT,J(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(m.MALFORMED_ARGUMENT,J(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:g.argument,value:i,location:J(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(m.MALFORMED_ARGUMENT,J(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=se(this.message,t),i=t+n.length;return this.bumpTo(i),{value:n,location:J(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var r,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(o){case"":return this.error(m.EXPECT_ARGUMENT_TYPE,J(a,c));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=_e(y.val)).length)return this.error(m.EXPECT_ARGUMENT_STYLE,J(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:J(p,this.clonePosition())}}if((x=this.tryParseArgumentClose(i)).err)return x;var d=J(i,this.clonePosition());if(l&&ce(null==l?void 0:l.style,"::",0)){var u=ue(l.style.slice(2));if("number"===o)return(y=this.parseNumberSkeletonFromString(u,l.styleLocation)).err?y:{val:{type:g.number,value:n,location:d,style:y.val},err:null};if(0===u.length)return this.error(m.EXPECT_DATE_TIME_SKELETON,d);var _=u;this.locale&&(_=function(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if("j"===r){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var o=1+(1&a),s=a<2?1:3+(a>>1),c=q(t);for("H"!=c&&"k"!=c||(s=0);s-- >0;)n+="a";for(;o-- >0;)n=c+n}else n+="J"===r?"H":r}return n}(u,this.locale));var f={type:v.dateTime,pattern:_,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?I(_):{}};return{val:{type:"date"===o?g.date:g.time,value:n,location:d,style:f},err:null}}return{val:{type:"number"===o?g.number:"date"===o?g.date:g.time,value:n,location:d,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":var h=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(m.EXPECT_SELECT_ARGUMENT_OPTIONS,J(h,s({},h)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),w=0;if("select"!==o&&"offset"===b.value){if(!this.bumpIf(":"))return this.error(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,m.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),b=this.parseIdentifierIfPossible(),w=y.val}var x,k=this.tryParsePluralOrSelectOptions(e,o,t,b);if(k.err)return k;if((x=this.tryParseArgumentClose(i)).err)return x;var E=J(i,this.clonePosition());return"select"===o?{val:{type:g.select,value:n,options:pe(k.val),location:E},err:null}:{val:{type:g.plural,value:n,options:pe(k.val),offset:w,pluralType:"plural"===o?"cardinal":"ordinal",location:E},err:null};default:return this.error(m.INVALID_ARGUMENT_TYPE,J(a,c))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(m.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,J(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,i=e.split(U).filter((function(e){return e.length>0}));n<i.length;n++){var r=i[n].split("/");if(0===r.length)throw new Error("Invalid number skeleton");for(var a=r[0],o=r.slice(1),s=0,c=o;s<c.length;s++)if(0===c[s].length)throw new Error("Invalid number skeleton");t.push({stem:a,options:o})}return t}(e)}catch(e){return this.error(m.INVALID_NUMBER_SKELETON,t)}return{val:{type:v.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?$(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var r,a=!1,o=[],s=new Set,c=i.value,l=i.location;;){if(0===c.length){var p=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_SELECTOR,m.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;l=J(p,this.clonePosition()),c=this.message.slice(p.offset,this.offset())}if(s.has(c))return this.error("select"===t?m.DUPLICATE_SELECT_ARGUMENT_SELECTOR:m.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(a=!0),this.bumpSpace();var u=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?m.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:m.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,J(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(e+1,t,n);if(_.err)return _;var f=this.tryParseArgumentClose(u);if(f.err)return f;o.push([c,{value:_.val,location:J(u,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(r=this.parseIdentifierIfPossible()).value,l=r.location}return 0===o.length?this.error("select"===t?m.EXPECT_SELECT_ARGUMENT_SELECTOR:m.EXPECT_PLURAL_ARGUMENT_SELECTOR,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(m.MISSING_OTHER_CLAUSE,J(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var r=!1,a=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;r=!0,a=10*a+(o-48),this.bump()}var s=J(i,this.clonePosition());return r?ae(a*=n)?{val:a,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=de(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(ce(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&be(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ve(e){return e>=97&&e<=122||e>=65&&e<=90}function be(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function we(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ye(e){e.forEach((function(e){if(delete e.location,T(e)||M(e))for(var t in e.options)delete e.options[t].location,ye(e.options[t].value);else j(e)&&P(e.style)||(N(e)||S(e))&&L(e.style)?delete e.style.location:C(e)&&ye(e.children)}))}function xe(e,t){void 0===t&&(t={}),t=s({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ge(e,t).parse();if(n.err){var i=SyntaxError(m[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||ye(n.val),n.val}!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(me||(me={}));var ke,Ee=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=i,r}return o(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),je=function(e){function t(t,n,i,r){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),me.INVALID_VALUE,r)||this}return o(t,e),t}(Ee),Ne=function(e){function t(t,n,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),me.INVALID_VALUE,i)||this}return o(t,e),t}(Ee),Se=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),me.MISSING_VALUE,n)||this}return o(t,e),t}(Ee);function Te(e){return"function"==typeof e}function Me(e,t,n,i,r,a,o){if(1===e.length&&k(e[0]))return[{type:ke.literal,value:e[0].value}];for(var s=[],c=0,l=e;c<l.length;c++){var p=l[c];if(k(p))s.push({type:ke.literal,value:p.value});else if(A(p))"number"==typeof a&&s.push({type:ke.literal,value:n.getNumberFormat(t).format(a)});else{var d=p.value;if(!r||!(d in r))throw new Se(d,o);var u=r[d];if(E(p))u&&"string"!=typeof u&&"number"!=typeof u||(u="string"==typeof u||"number"==typeof u?String(u):""),s.push({type:"string"==typeof u?ke.literal:ke.object,value:u});else if(N(p)){var _="string"==typeof p.style?i.date[p.style]:L(p.style)?p.style.parsedOptions:void 0;s.push({type:ke.literal,value:n.getDateTimeFormat(t,_).format(u)})}else if(S(p)){_="string"==typeof p.style?i.time[p.style]:L(p.style)?p.style.parsedOptions:i.time.medium;s.push({type:ke.literal,value:n.getDateTimeFormat(t,_).format(u)})}else if(j(p)){(_="string"==typeof p.style?i.number[p.style]:P(p.style)?p.style.parsedOptions:void 0)&&_.scale&&(u*=_.scale||1),s.push({type:ke.literal,value:n.getNumberFormat(t,_).format(u)})}else{if(C(p)){var f=p.children,h=p.value,m=r[h];if(!Te(m))throw new Ne(h,"function",o);var g=m(Me(f,t,n,i,r,a).map((function(e){return e.value})));Array.isArray(g)||(g=[g]),s.push.apply(s,g.map((function(e){return{type:"string"==typeof e?ke.literal:ke.object,value:e}})))}if(T(p)){if(!(v=p.options[u]||p.options.other))throw new je(p.value,u,Object.keys(p.options),o);s.push.apply(s,Me(v.value,t,n,i,r))}else if(M(p)){var v;if(!(v=p.options["=".concat(u)])){if(!Intl.PluralRules)throw new Ee('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',me.MISSING_INTL_API,o);var b=n.getPluralRules(t,{type:p.pluralType}).select(u-(p.offset||0));v=p.options[b]||p.options.other}if(!v)throw new je(p.value,u,Object.keys(p.options),o);s.push.apply(s,Me(v.value,t,n,i,r,u-(p.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===ke.literal&&t.type===ke.literal?n.value+=t.value:e.push(t),e}),[])}(s)}function Ae(e,t){return t?Object.keys(e).reduce((function(n,i){var r,a;return n[i]=(r=e[i],(a=t[i])?s(s(s({},r||{}),a||{}),Object.keys(r).reduce((function(e,t){return e[t]=s(s({},r[t]),a[t]||{}),e}),{})):r),n}),s({},e)):e}function Ce(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ke||(ke={}));var Pe,Le=function(){function e(t,n,i,r){void 0===n&&(n=e.defaultLocale);var a,o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=o.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===ke.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return Me(o.ast,o.locales,o.formatters,o.formats,e,void 0,o.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=o.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var l=r||{};l.formatters;var u=c(l,["formatters"]);this.ast=e.__parse(t,s(s({},u),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ae(e.formats,i),this.formatters=r&&r.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Ce(a.number),strategy:x.variadic}),getDateTimeFormat:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Ce(a.dateTime),strategy:x.variadic}),getPluralRules:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,p([void 0],t,!1)))}),{cache:Ce(a.pluralRules),strategy:x.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=xe,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(Pe||(Pe={}));var Oe=function(e){function t(n,i,r){var a=this,o=r?r instanceof Error?r:new Error(String(r)):void 0;return(a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(i,"\n").concat(o?"\n".concat(o.message,"\n").concat(o.stack):""))||this).code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return o(t,e),t}(Error),Re=function(e){function t(t,n){return e.call(this,Pe.UNSUPPORTED_FORMATTER,t,n)||this}return o(t,e),t}(Oe),Ie=function(e){function t(t,n){return e.call(this,Pe.INVALID_CONFIG,t,n)||this}return o(t,e),t}(Oe),Ue=function(e){function t(t,n){return e.call(this,Pe.MISSING_DATA,t,n)||this}return o(t,e),t}(Oe),Be=function(e){function t(t,n,i){var r=e.call(this,Pe.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),i)||this;return r.locale=n,r}return o(t,e),t}(Oe),He=function(e){function t(t,n,i,r){var a=e.call(this,"".concat(t,"\nMessageID: ").concat(null==i?void 0:i.id,"\nDefault Message: ").concat(null==i?void 0:i.defaultMessage,"\nDescription: ").concat(null==i?void 0:i.description,"\n"),n,r)||this;return a.descriptor=i,a.locale=n,a}return o(t,e),t}(Be),Fe=function(e){function t(t,n){var i=e.call(this,Pe.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(n,'", using ').concat(t.defaultMessage?"default message (".concat("string"==typeof t.defaultMessage?t.defaultMessage:t.defaultMessage.map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:JSON.stringify(e)})).join(),")"):"id"," as fallback."))||this;return i.descriptor=t,i}return o(t,e),t}(Oe);function De(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,i){return i in e?t[i]=e[i]:i in n&&(t[i]=n[i]),t}),{})}var Ge={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){"production"!==process.env.NODE_ENV&&console.error(e)},onWarn:function(e){"production"!==process.env.NODE_ENV&&console.warn(e)}};function ze(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ve(e,t,n,i){var r,a=e&&e[t];if(a&&(r=a[n]),r)return r;i(new Re("No ".concat(t," format named: ").concat(n)))}function Ze(e,t){return Object.keys(e).reduce((function(n,i){return n[i]=s({timeZone:t},e[i]),n}),{})}function $e(e,t){return Object.keys(s(s({},e),t)).reduce((function(n,i){return n[i]=s(s({},e[i]||{}),t[i]||{}),n}),{})}function We(e,t){if(!t)return e;var n=Le.formats;return s(s(s({},n),e),{date:$e(Ze(n.date,t),Ze(e.date||{},t)),time:$e(Ze(n.time,t),Ze(e.time||{},t))})}var Ke=function(e,t,n,i,r){var a=e.locale,o=e.formats,c=e.messages,l=e.defaultLocale,p=e.defaultFormats,d=e.fallbackOnEmptyString,u=e.onError,_=e.timeZone,f=e.defaultRichTextElements;void 0===n&&(n={id:""});var h=n.id,m=n.defaultMessage;!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}(!!h,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(h),b=c&&Object.prototype.hasOwnProperty.call(c,v)&&c[v];if(Array.isArray(b)&&1===b.length&&b[0].type===g.literal)return b[0].value;if(!i&&b&&"string"==typeof b&&!f)return b.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=s(s({},f),i||{}),o=We(o,_),p=We(p,_),!b){if(!1===d&&""===b)return b;if((!m||a&&a.toLowerCase()!==l.toLowerCase())&&u(new Fe(n,a)),m)try{return t.getMessageFormat(m,l,p,r).format(i)}catch(e){return u(new He('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),a,n,e)),"string"==typeof m?m:v}return v}try{return t.getMessageFormat(b,a,o,s({formatters:t},r||{})).format(i)}catch(e){u(new He('Error formatting message: "'.concat(v,'", using ').concat(m?"default message":"id"," as fallback."),a,n,e))}if(m)try{return t.getMessageFormat(m,l,p,r).format(i)}catch(e){u(new He('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),a,n,e))}return"string"==typeof b?b:"string"==typeof m?m:v},qe=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Xe(e,t,n,i){var r=e.locale,a=e.formats,o=e.onError,c=e.timeZone;void 0===i&&(i={});var l=i.format,p=s(s({},c&&{timeZone:c}),l&&Ve(a,t,l,o)),d=De(i,qe,p);return"time"!==t||d.hour||d.minute||d.second||d.timeStyle||d.dateStyle||(d=s(s({},d),{hour:"numeric",minute:"numeric"})),n(r,d)}function Ye(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"date",t,o).format(s)}catch(t){e.onError(new Be("Error formatting date.",e.locale,t))}return String(s)}function Je(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"time",t,o).format(s)}catch(t){e.onError(new Be("Error formatting time.",e.locale,t))}return String(s)}function Qe(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=n[2],s=void 0===o?{}:o,c="string"==typeof r?new Date(r||0):r,l="string"==typeof a?new Date(a||0):a;try{return Xe(e,"dateTimeRange",t,s).formatRange(c,l)}catch(t){e.onError(new Be("Error formatting date time range.",e.locale,t))}return String(c)}function et(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"date",t,o).formatToParts(s)}catch(t){e.onError(new Be("Error formatting date.",e.locale,t))}return[]}function tt(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"time",t,o).formatToParts(s)}catch(t){e.onError(new Be("Error formatting time.",e.locale,t))}return[]}var nt=["style","type","fallback","languageDisplay"];function it(e,t,n,i){var r=e.locale,a=e.onError;Intl.DisplayNames||a(new Ee('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',me.MISSING_INTL_API));var o=De(i,nt);try{return t(r,o).of(n)}catch(e){a(new Be("Error formatting display name.",r,e))}}var rt=["type","style"],at=Date.now();function ot(e,t,n,i){void 0===i&&(i={});var r=st(e,t,n,i).reduce((function(e,t){var n=t.value;return"string"!=typeof n?e.push(n):"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n),e}),[]);return 1===r.length?r[0]:0===r.length?"":r}function st(e,t,n,i){var r=e.locale,a=e.onError;void 0===i&&(i={}),Intl.ListFormat||a(new Ee('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',me.MISSING_INTL_API));var o=De(i,rt);try{var c={},l=n.map((function(e,t){if("object"==typeof e){var n=function(e){return"".concat(at,"_").concat(e,"_").concat(at)}(t);return c[n]=e,n}return String(e)}));return t(r,o).formatToParts(l).map((function(e){return"literal"===e.type?e:s(s({},e),{value:c[e.value]||e.value})}))}catch(e){a(new Be("Error formatting list.",r,e))}return n}var ct=["type"];function lt(e,t,n,i){var r=e.locale,a=e.onError;void 0===i&&(i={}),Intl.PluralRules||a(new Ee('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',me.MISSING_INTL_API));var o=De(i,ct);try{return t(r,o).select(n)}catch(e){a(new Be("Error formatting plural.",r,e))}return"other"}var pt=["numeric","style"];function dt(e,t,n,i,r){void 0===r&&(r={}),i||(i="second"),Intl.RelativeTimeFormat||e.onError(new Ee('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',me.MISSING_INTL_API));try{return function(e,t,n){var i=e.locale,r=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,s=!!o&&Ve(r,"relative",o,a)||{};return t(i,De(n,pt,s))}(e,t,r).format(n,i)}catch(t){e.onError(new Be("Error formatting relative time.",e.locale,t))}return String(n)}var ut=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function _t(e,t,n){var i=e.locale,r=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,s=o&&Ve(r,"number",o,a)||{};return t(i,De(n,ut,s))}function ft(e,t,n,i){void 0===i&&(i={});try{return _t(e,t,i).format(n)}catch(t){e.onError(new Be("Error formatting number.",e.locale,t))}return String(n)}function ht(e,t,n,i){void 0===i&&(i={});try{return _t(e,t,i).formatToParts(n)}catch(t){e.onError(new Be("Error formatting number.",e.locale,t))}return[]}function mt(e){var t;e.onWarn&&e.defaultRichTextElements&&"string"==typeof((t=e.messages||{})?t[Object.keys(t)[0]]:void 0)&&e.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution')}function gt(e,t){var n=function(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:ze(e.dateTime),strategy:x.variadic}),a=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:ze(e.number),strategy:x.variadic}),o=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,p([void 0],t,!1)))}),{cache:ze(e.pluralRules),strategy:x.variadic});return{getDateTimeFormat:r,getNumberFormat:a,getMessageFormat:d((function(e,t,n,i){return new Le(e,t,n,s({formatters:{getNumberFormat:a,getDateTimeFormat:r,getPluralRules:o}},i||{}))}),{cache:ze(e.message),strategy:x.variadic}),getRelativeTimeFormat:d((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,p([void 0],e,!1)))}),{cache:ze(e.relativeTime),strategy:x.variadic}),getPluralRules:o,getListFormat:d((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,p([void 0],e,!1)))}),{cache:ze(e.list),strategy:x.variadic}),getDisplayNames:d((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(i.bind.apply(i,p([void 0],e,!1)))}),{cache:ze(e.displayNames),strategy:x.variadic})}}(t),i=s(s({},Ge),e),r=i.locale,a=i.defaultLocale,o=i.onError;return r?!Intl.NumberFormat.supportedLocalesOf(r).length&&o?o(new Ue('Missing locale data for locale: "'.concat(r,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(r).length&&o&&o(new Ue('Missing locale data for locale: "'.concat(r,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(o&&o(new Ie('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),i.locale=i.defaultLocale||"en"),mt(i),s(s({},i),{formatters:n,formatNumber:ft.bind(null,i,n.getNumberFormat),formatNumberToParts:ht.bind(null,i,n.getNumberFormat),formatRelativeTime:dt.bind(null,i,n.getRelativeTimeFormat),formatDate:Ye.bind(null,i,n.getDateTimeFormat),formatDateToParts:et.bind(null,i,n.getDateTimeFormat),formatTime:Je.bind(null,i,n.getDateTimeFormat),formatDateTimeRange:Qe.bind(null,i,n.getDateTimeFormat),formatTimeToParts:tt.bind(null,i,n.getDateTimeFormat),formatPlural:lt.bind(null,i,n.getPluralRules),formatMessage:Ke.bind(null,i,n),$t:Ke.bind(null,i,n),formatList:ot.bind(null,i,n.getListFormat),formatListToParts:st.bind(null,i,n.getListFormat),formatDisplayName:it.bind(null,i,n.getDisplayNames)})}function vt(e){!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var bt=s(s({},Ge),{textComponent:r.Fragment}),wt={key:42},yt=function(e){return r.isValidElement(e)?r.createElement(r.Fragment,wt,e):e};function xt(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),i=Object.keys(t),r=n.length;if(i.length!==r)return!1;for(var a=0;a<r;a++){var o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Et,jt={exports:{}},Nt={};var St,Tt,Mt,At,Ct={};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=i(t),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},a(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)};function c(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function l(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{c(i.next(e))}catch(e){a(e)}}function s(e){try{c(i.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((i=i.apply(e,t||[])).next())}))}function p(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function d(e,t){var n=t&&t.cache?t.cache:y,i=t&&t.serializer?t.serializer:b;return(t&&t.strategy?t.strategy:h)(e,{cache:n,serializer:i})}function _(e,t,n,i){var r,a=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:n(i),o=t.get(a);return void 0===o&&(o=e.call(this,i),t.set(a,o)),o}function u(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return void 0===a&&(a=e.apply(this,i),t.set(r,a)),a}function f(e,t,n,i,r){return n.bind(t,e,i,r)}function h(e,t){return f(e,this,1===e.length?_:u,t.cache.create(),t.serializer)}"function"==typeof SuppressedError&&SuppressedError;var m,g,v,b=function(){return JSON.stringify(arguments)},w=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),y={create:function(){return new w}},x={variadic:function(e,t){return f(e,this,u,t.cache.create(),t.serializer)}};function k(e){return e.type===g.literal}function E(e){return e.type===g.argument}function j(e){return e.type===g.number}function N(e){return e.type===g.date}function S(e){return e.type===g.time}function C(e){return e.type===g.select}function T(e){return e.type===g.plural}function A(e){return e.type===g.pound}function P(e){return e.type===g.tag}function M(e){return!(!e||"object"!=typeof e||e.type!==v.number)}function L(e){return!(!e||"object"!=typeof e||e.type!==v.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(m||(m={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(g||(g={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(v||(v={}));var O=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,I=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function R(e){var t={};return e.replace(I,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var U=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var B=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,H=/^(@+)?(\+|#+)?[rs]?$/g,F=/(\*)(0+)|(#+)(0+)|(0+)/g,D=/^(0+)$/;function z(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(H,(function(e,n,i){return"string"!=typeof i?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===i?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof i?i.length:0)),""})),t}function G(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Z(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!D.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function V(e){var t=G(e);return t||{}}function $(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=s(s(s({},t),{notation:"scientific"}),r.options.reduce((function(e,t){return s(s({},e),V(t))}),{}));continue;case"engineering":t=s(s(s({},t),{notation:"engineering"}),r.options.reduce((function(e,t){return s(s({},e),V(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(F,(function(e,n,i,r,a,o){if(n)t.minimumIntegerDigits=i.length;else{if(r&&a)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(D.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(B.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(B,(function(e,n,i,r,a,o){return"*"===i?t.minimumFractionDigits=n.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var a=r.options[0];"w"===a?t=s(s({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=s(s({},t),z(a)))}else if(H.test(r.stem))t=s(s({},t),z(r.stem));else{var o=G(r.stem);o&&(t=s(s({},t),o));var c=Z(r.stem);c&&(t=s(s({},t),c))}}return t}var W,K={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function q(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,i=e.language;return"root"!==i&&(n=e.maximize().region),(K[n||""]||K[i||""]||K["".concat(i,"-001")]||K["001"])[0]}var X=new RegExp("^".concat(O.source,"*")),Y=new RegExp("".concat(O.source,"*$"));function J(e,t){return{start:e,end:t}}var Q=!!String.prototype.startsWith&&"_a".startsWith("a",1),ee=!!String.fromCodePoint,te=!!Object.fromEntries,ne=!!String.prototype.codePointAt,ie=!!String.prototype.trimStart,re=!!String.prototype.trimEnd,ae=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},oe=!0;try{oe="a"===(null===(W=fe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===W?void 0:W[0])}catch(e){oe=!1}var se,ce=Q?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},le=ee?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,i="",r=e.length,a=0;r>a;){if((n=e[a++])>1114111)throw RangeError(n+" is not a valid code point");i+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return i},pe=te?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],o=r[1];t[a]=o}return t},de=ne?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i,r=e.charCodeAt(t);return r<55296||r>56319||t+1===n||(i=e.charCodeAt(t+1))<56320||i>57343?r:i-56320+(r-55296<<10)+65536}},_e=ie?function(e){return e.trimStart()}:function(e){return e.replace(X,"")},ue=re?function(e){return e.trimEnd()}:function(e){return e.replace(Y,"")};function fe(e,t){return new RegExp(e,t)}if(oe){var he=fe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");se=function(e,t){var n;return he.lastIndex=t,null!==(n=he.exec(e)[1])&&void 0!==n?n:""}}else se=function(e,t){for(var n=[];;){var i=de(e,t);if(void 0===i||be(i)||we(i))break;n.push(i),t+=i>=65536?2:1}return le.apply(void 0,n)};var me,ge=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var i=[];!this.isEOF();){var r=this.char();if(123===r){if((a=this.parseArgument(e,n)).err)return a;i.push(a.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(m.UNMATCHED_CLOSING_TAG,J(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&ve(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;i.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;i.push(a.val)}}else{var o=this.clonePosition();this.bump(),i.push({type:g.pound,location:J(o,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:g.literal,value:"<".concat(i,"/>"),location:J(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var a=r.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ve(this.char()))return this.error(m.INVALID_TAG,J(o,this.clonePosition()));var s=this.clonePosition();return i!==this.parseTagName()?this.error(m.UNMATCHED_CLOSING_TAG,J(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:g.tag,value:i,children:a,location:J(n,this.clonePosition())},err:null}:this.error(m.INVALID_TAG,J(o,this.clonePosition())))}return this.error(m.UNCLOSED_TAG,J(n,this.clonePosition()))}return this.error(m.INVALID_TAG,J(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),i="";;){var r=this.tryParseQuote(t);if(r)i+=r;else{var a=this.tryParseUnquoted(e,t);if(a)i+=a;else{var o=this.tryParseLeftAngleBracket();if(!o)break;i+=o}}}var s=J(n,this.clonePosition());return{val:{type:g.literal,value:i,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ve(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return le.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),le(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(m.EMPTY_ARGUMENT,J(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(m.MALFORMED_ARGUMENT,J(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:g.argument,value:i,location:J(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(m.MALFORMED_ARGUMENT,J(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=se(this.message,t),i=t+n.length;return this.bumpTo(i),{value:n,location:J(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,i){var r,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(o){case"":return this.error(m.EXPECT_ARGUMENT_TYPE,J(a,c));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var p=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=ue(y.val)).length)return this.error(m.EXPECT_ARGUMENT_STYLE,J(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:J(p,this.clonePosition())}}if((x=this.tryParseArgumentClose(i)).err)return x;var d=J(i,this.clonePosition());if(l&&ce(null==l?void 0:l.style,"::",0)){var _=_e(l.style.slice(2));if("number"===o)return(y=this.parseNumberSkeletonFromString(_,l.styleLocation)).err?y:{val:{type:g.number,value:n,location:d,style:y.val},err:null};if(0===_.length)return this.error(m.EXPECT_DATE_TIME_SKELETON,d);var u=_;this.locale&&(u=function(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if("j"===r){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var o=1+(1&a),s=a<2?1:3+(a>>1),c=q(t);for("H"!=c&&"k"!=c||(s=0);s-- >0;)n+="a";for(;o-- >0;)n=c+n}else n+="J"===r?"H":r}return n}(_,this.locale));var f={type:v.dateTime,pattern:u,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?R(u):{}};return{val:{type:"date"===o?g.date:g.time,value:n,location:d,style:f},err:null}}return{val:{type:"number"===o?g.number:"date"===o?g.date:g.time,value:n,location:d,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":var h=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(m.EXPECT_SELECT_ARGUMENT_OPTIONS,J(h,s({},h)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),w=0;if("select"!==o&&"offset"===b.value){if(!this.bumpIf(":"))return this.error(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,m.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),b=this.parseIdentifierIfPossible(),w=y.val}var x,k=this.tryParsePluralOrSelectOptions(e,o,t,b);if(k.err)return k;if((x=this.tryParseArgumentClose(i)).err)return x;var E=J(i,this.clonePosition());return"select"===o?{val:{type:g.select,value:n,options:pe(k.val),location:E},err:null}:{val:{type:g.plural,value:n,options:pe(k.val),offset:w,pluralType:"plural"===o?"cardinal":"ordinal",location:E},err:null};default:return this.error(m.INVALID_ARGUMENT_TYPE,J(a,c))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(m.EXPECT_ARGUMENT_CLOSING_BRACE,J(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(m.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,J(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,i=e.split(U).filter((function(e){return e.length>0}));n<i.length;n++){var r=i[n].split("/");if(0===r.length)throw new Error("Invalid number skeleton");for(var a=r[0],o=r.slice(1),s=0,c=o;s<c.length;s++)if(0===c[s].length)throw new Error("Invalid number skeleton");t.push({stem:a,options:o})}return t}(e)}catch(e){return this.error(m.INVALID_NUMBER_SKELETON,t)}return{val:{type:v.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?$(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var r,a=!1,o=[],s=new Set,c=i.value,l=i.location;;){if(0===c.length){var p=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(m.EXPECT_PLURAL_ARGUMENT_SELECTOR,m.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;l=J(p,this.clonePosition()),c=this.message.slice(p.offset,this.offset())}if(s.has(c))return this.error("select"===t?m.DUPLICATE_SELECT_ARGUMENT_SELECTOR:m.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?m.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:m.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,J(this.clonePosition(),this.clonePosition()));var u=this.parseMessage(e+1,t,n);if(u.err)return u;var f=this.tryParseArgumentClose(_);if(f.err)return f;o.push([c,{value:u.val,location:J(_,this.clonePosition())}]),s.add(c),this.bumpSpace(),c=(r=this.parseIdentifierIfPossible()).value,l=r.location}return 0===o.length?this.error("select"===t?m.EXPECT_SELECT_ARGUMENT_SELECTOR:m.EXPECT_PLURAL_ARGUMENT_SELECTOR,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(m.MISSING_OTHER_CLAUSE,J(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var r=!1,a=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;r=!0,a=10*a+(o-48),this.bump()}var s=J(i,this.clonePosition());return r?ae(a*=n)?{val:a,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=de(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(ce(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&be(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ve(e){return e>=97&&e<=122||e>=65&&e<=90}function be(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function we(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ye(e){e.forEach((function(e){if(delete e.location,C(e)||T(e))for(var t in e.options)delete e.options[t].location,ye(e.options[t].value);else j(e)&&M(e.style)||(N(e)||S(e))&&L(e.style)?delete e.style.location:P(e)&&ye(e.children)}))}function xe(e,t){void 0===t&&(t={}),t=s({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ge(e,t).parse();if(n.err){var i=SyntaxError(m[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null==t?void 0:t.captureLocation)||ye(n.val),n.val}!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(me||(me={}));var ke,Ee=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=i,r}return o(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),je=function(e){function t(t,n,i,r){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),me.INVALID_VALUE,r)||this}return o(t,e),t}(Ee),Ne=function(e){function t(t,n,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),me.INVALID_VALUE,i)||this}return o(t,e),t}(Ee),Se=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),me.MISSING_VALUE,n)||this}return o(t,e),t}(Ee);function Ce(e){return"function"==typeof e}function Te(e,t,n,i,r,a,o){if(1===e.length&&k(e[0]))return[{type:ke.literal,value:e[0].value}];for(var s=[],c=0,l=e;c<l.length;c++){var p=l[c];if(k(p))s.push({type:ke.literal,value:p.value});else if(A(p))"number"==typeof a&&s.push({type:ke.literal,value:n.getNumberFormat(t).format(a)});else{var d=p.value;if(!r||!(d in r))throw new Se(d,o);var _=r[d];if(E(p))_&&"string"!=typeof _&&"number"!=typeof _||(_="string"==typeof _||"number"==typeof _?String(_):""),s.push({type:"string"==typeof _?ke.literal:ke.object,value:_});else if(N(p)){var u="string"==typeof p.style?i.date[p.style]:L(p.style)?p.style.parsedOptions:void 0;s.push({type:ke.literal,value:n.getDateTimeFormat(t,u).format(_)})}else if(S(p)){u="string"==typeof p.style?i.time[p.style]:L(p.style)?p.style.parsedOptions:i.time.medium;s.push({type:ke.literal,value:n.getDateTimeFormat(t,u).format(_)})}else if(j(p)){(u="string"==typeof p.style?i.number[p.style]:M(p.style)?p.style.parsedOptions:void 0)&&u.scale&&(_*=u.scale||1),s.push({type:ke.literal,value:n.getNumberFormat(t,u).format(_)})}else{if(P(p)){var f=p.children,h=p.value,m=r[h];if(!Ce(m))throw new Ne(h,"function",o);var g=m(Te(f,t,n,i,r,a).map((function(e){return e.value})));Array.isArray(g)||(g=[g]),s.push.apply(s,g.map((function(e){return{type:"string"==typeof e?ke.literal:ke.object,value:e}})))}if(C(p)){if(!(v=p.options[_]||p.options.other))throw new je(p.value,_,Object.keys(p.options),o);s.push.apply(s,Te(v.value,t,n,i,r))}else if(T(p)){var v;if(!(v=p.options["=".concat(_)])){if(!Intl.PluralRules)throw new Ee('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',me.MISSING_INTL_API,o);var b=n.getPluralRules(t,{type:p.pluralType}).select(_-(p.offset||0));v=p.options[b]||p.options.other}if(!v)throw new je(p.value,_,Object.keys(p.options),o);s.push.apply(s,Te(v.value,t,n,i,r,_-(p.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===ke.literal&&t.type===ke.literal?n.value+=t.value:e.push(t),e}),[])}(s)}function Ae(e,t){return t?Object.keys(e).reduce((function(n,i){var r,a;return n[i]=(r=e[i],(a=t[i])?s(s(s({},r||{}),a||{}),Object.keys(r).reduce((function(e,t){return e[t]=s(s({},r[t]),a[t]||{}),e}),{})):r),n}),s({},e)):e}function Pe(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ke||(ke={}));var Me,Le=function(){function e(t,n,i,r){void 0===n&&(n=e.defaultLocale);var a,o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=o.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===ke.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return Te(o.ast,o.locales,o.formatters,o.formats,e,void 0,o.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=o.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var l=r||{};l.formatters;var _=c(l,["formatters"]);this.ast=e.__parse(t,s(s({},_),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ae(e.formats,i),this.formatters=r&&r.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Pe(a.number),strategy:x.variadic}),getDateTimeFormat:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Pe(a.dateTime),strategy:x.variadic}),getPluralRules:d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,p([void 0],t,!1)))}),{cache:Pe(a.pluralRules),strategy:x.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=xe,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(Me||(Me={}));var Oe=function(e){function t(n,i,r){var a=this,o=r?r instanceof Error?r:new Error(String(r)):void 0;return(a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(i,"\n").concat(o?"\n".concat(o.message,"\n").concat(o.stack):""))||this).code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return o(t,e),t}(Error),Ie=function(e){function t(t,n){return e.call(this,Me.UNSUPPORTED_FORMATTER,t,n)||this}return o(t,e),t}(Oe),Re=function(e){function t(t,n){return e.call(this,Me.INVALID_CONFIG,t,n)||this}return o(t,e),t}(Oe),Ue=function(e){function t(t,n){return e.call(this,Me.MISSING_DATA,t,n)||this}return o(t,e),t}(Oe),Be=function(e){function t(t,n,i){var r=e.call(this,Me.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),i)||this;return r.locale=n,r}return o(t,e),t}(Oe),He=function(e){function t(t,n,i,r){var a=e.call(this,"".concat(t,"\nMessageID: ").concat(null==i?void 0:i.id,"\nDefault Message: ").concat(null==i?void 0:i.defaultMessage,"\nDescription: ").concat(null==i?void 0:i.description,"\n"),n,r)||this;return a.descriptor=i,a.locale=n,a}return o(t,e),t}(Be),Fe=function(e){function t(t,n){var i=e.call(this,Me.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(n,'", using ').concat(t.defaultMessage?"default message (".concat("string"==typeof t.defaultMessage?t.defaultMessage:t.defaultMessage.map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:JSON.stringify(e)})).join(),")"):"id"," as fallback."))||this;return i.descriptor=t,i}return o(t,e),t}(Oe);function De(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,i){return i in e?t[i]=e[i]:i in n&&(t[i]=n[i]),t}),{})}var ze={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){"production"!==process.env.NODE_ENV&&console.error(e)},onWarn:function(e){"production"!==process.env.NODE_ENV&&console.warn(e)}};function Ge(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ze(e,t,n,i){var r,a=e&&e[t];if(a&&(r=a[n]),r)return r;i(new Ie("No ".concat(t," format named: ").concat(n)))}function Ve(e,t){return Object.keys(e).reduce((function(n,i){return n[i]=s({timeZone:t},e[i]),n}),{})}function $e(e,t){return Object.keys(s(s({},e),t)).reduce((function(n,i){return n[i]=s(s({},e[i]||{}),t[i]||{}),n}),{})}function We(e,t){if(!t)return e;var n=Le.formats;return s(s(s({},n),e),{date:$e(Ve(n.date,t),Ve(e.date||{},t)),time:$e(Ve(n.time,t),Ve(e.time||{},t))})}var Ke=function(e,t,n,i,r){var a=e.locale,o=e.formats,c=e.messages,l=e.defaultLocale,p=e.defaultFormats,d=e.fallbackOnEmptyString,_=e.onError,u=e.timeZone,f=e.defaultRichTextElements;void 0===n&&(n={id:""});var h=n.id,m=n.defaultMessage;!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}(!!h,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(h),b=c&&Object.prototype.hasOwnProperty.call(c,v)&&c[v];if(Array.isArray(b)&&1===b.length&&b[0].type===g.literal)return b[0].value;if(!i&&b&&"string"==typeof b&&!f)return b.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=s(s({},f),i||{}),o=We(o,u),p=We(p,u),!b){if(!1===d&&""===b)return b;if((!m||a&&a.toLowerCase()!==l.toLowerCase())&&_(new Fe(n,a)),m)try{return t.getMessageFormat(m,l,p,r).format(i)}catch(e){return _(new He('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),a,n,e)),"string"==typeof m?m:v}return v}try{return t.getMessageFormat(b,a,o,s({formatters:t},r||{})).format(i)}catch(e){_(new He('Error formatting message: "'.concat(v,'", using ').concat(m?"default message":"id"," as fallback."),a,n,e))}if(m)try{return t.getMessageFormat(m,l,p,r).format(i)}catch(e){_(new He('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),a,n,e))}return"string"==typeof b?b:"string"==typeof m?m:v},qe=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Xe(e,t,n,i){var r=e.locale,a=e.formats,o=e.onError,c=e.timeZone;void 0===i&&(i={});var l=i.format,p=s(s({},c&&{timeZone:c}),l&&Ze(a,t,l,o)),d=De(i,qe,p);return"time"!==t||d.hour||d.minute||d.second||d.timeStyle||d.dateStyle||(d=s(s({},d),{hour:"numeric",minute:"numeric"})),n(r,d)}function Ye(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"date",t,o).format(s)}catch(t){e.onError(new Be("Error formatting date.",e.locale,t))}return String(s)}function Je(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"time",t,o).format(s)}catch(t){e.onError(new Be("Error formatting time.",e.locale,t))}return String(s)}function Qe(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=n[2],s=void 0===o?{}:o,c="string"==typeof r?new Date(r||0):r,l="string"==typeof a?new Date(a||0):a;try{return Xe(e,"dateTimeRange",t,s).formatRange(c,l)}catch(t){e.onError(new Be("Error formatting date time range.",e.locale,t))}return String(c)}function et(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"date",t,o).formatToParts(s)}catch(t){e.onError(new Be("Error formatting date.",e.locale,t))}return[]}function tt(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],o=void 0===a?{}:a,s="string"==typeof r?new Date(r||0):r;try{return Xe(e,"time",t,o).formatToParts(s)}catch(t){e.onError(new Be("Error formatting time.",e.locale,t))}return[]}var nt=["style","type","fallback","languageDisplay"];function it(e,t,n,i){var r=e.locale,a=e.onError;Intl.DisplayNames||a(new Ee('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',me.MISSING_INTL_API));var o=De(i,nt);try{return t(r,o).of(n)}catch(e){a(new Be("Error formatting display name.",r,e))}}var rt=["type","style"],at=Date.now();function ot(e,t,n,i){void 0===i&&(i={});var r=st(e,t,n,i).reduce((function(e,t){var n=t.value;return"string"!=typeof n?e.push(n):"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n),e}),[]);return 1===r.length?r[0]:0===r.length?"":r}function st(e,t,n,i){var r=e.locale,a=e.onError;void 0===i&&(i={}),Intl.ListFormat||a(new Ee('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',me.MISSING_INTL_API));var o=De(i,rt);try{var c={},l=n.map((function(e,t){if("object"==typeof e){var n=function(e){return"".concat(at,"_").concat(e,"_").concat(at)}(t);return c[n]=e,n}return String(e)}));return t(r,o).formatToParts(l).map((function(e){return"literal"===e.type?e:s(s({},e),{value:c[e.value]||e.value})}))}catch(e){a(new Be("Error formatting list.",r,e))}return n}var ct=["type"];function lt(e,t,n,i){var r=e.locale,a=e.onError;void 0===i&&(i={}),Intl.PluralRules||a(new Ee('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',me.MISSING_INTL_API));var o=De(i,ct);try{return t(r,o).select(n)}catch(e){a(new Be("Error formatting plural.",r,e))}return"other"}var pt=["numeric","style"];function dt(e,t,n,i,r){void 0===r&&(r={}),i||(i="second"),Intl.RelativeTimeFormat||e.onError(new Ee('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',me.MISSING_INTL_API));try{return function(e,t,n){var i=e.locale,r=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,s=!!o&&Ze(r,"relative",o,a)||{};return t(i,De(n,pt,s))}(e,t,r).format(n,i)}catch(t){e.onError(new Be("Error formatting relative time.",e.locale,t))}return String(n)}var _t=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function ut(e,t,n){var i=e.locale,r=e.formats,a=e.onError;void 0===n&&(n={});var o=n.format,s=o&&Ze(r,"number",o,a)||{};return t(i,De(n,_t,s))}function ft(e,t,n,i){void 0===i&&(i={});try{return ut(e,t,i).format(n)}catch(t){e.onError(new Be("Error formatting number.",e.locale,t))}return String(n)}function ht(e,t,n,i){void 0===i&&(i={});try{return ut(e,t,i).formatToParts(n)}catch(t){e.onError(new Be("Error formatting number.",e.locale,t))}return[]}function mt(e){var t;e.onWarn&&e.defaultRichTextElements&&"string"==typeof((t=e.messages||{})?t[Object.keys(t)[0]]:void 0)&&e.onWarn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution')}function gt(e,t){var n=function(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Ge(e.dateTime),strategy:x.variadic}),a=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,p([void 0],t,!1)))}),{cache:Ge(e.number),strategy:x.variadic}),o=d((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,p([void 0],t,!1)))}),{cache:Ge(e.pluralRules),strategy:x.variadic});return{getDateTimeFormat:r,getNumberFormat:a,getMessageFormat:d((function(e,t,n,i){return new Le(e,t,n,s({formatters:{getNumberFormat:a,getDateTimeFormat:r,getPluralRules:o}},i||{}))}),{cache:Ge(e.message),strategy:x.variadic}),getRelativeTimeFormat:d((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,p([void 0],e,!1)))}),{cache:Ge(e.relativeTime),strategy:x.variadic}),getPluralRules:o,getListFormat:d((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,p([void 0],e,!1)))}),{cache:Ge(e.list),strategy:x.variadic}),getDisplayNames:d((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(i.bind.apply(i,p([void 0],e,!1)))}),{cache:Ge(e.displayNames),strategy:x.variadic})}}(t),i=s(s({},ze),e),r=i.locale,a=i.defaultLocale,o=i.onError;return r?!Intl.NumberFormat.supportedLocalesOf(r).length&&o?o(new Ue('Missing locale data for locale: "'.concat(r,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(r).length&&o&&o(new Ue('Missing locale data for locale: "'.concat(r,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(o&&o(new Re('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),i.locale=i.defaultLocale||"en"),mt(i),s(s({},i),{formatters:n,formatNumber:ft.bind(null,i,n.getNumberFormat),formatNumberToParts:ht.bind(null,i,n.getNumberFormat),formatRelativeTime:dt.bind(null,i,n.getRelativeTimeFormat),formatDate:Ye.bind(null,i,n.getDateTimeFormat),formatDateToParts:et.bind(null,i,n.getDateTimeFormat),formatTime:Je.bind(null,i,n.getDateTimeFormat),formatDateTimeRange:Qe.bind(null,i,n.getDateTimeFormat),formatTimeToParts:tt.bind(null,i,n.getDateTimeFormat),formatPlural:lt.bind(null,i,n.getPluralRules),formatMessage:Ke.bind(null,i,n),$t:Ke.bind(null,i,n),formatList:ot.bind(null,i,n.getListFormat),formatListToParts:st.bind(null,i,n.getListFormat),formatDisplayName:it.bind(null,i,n.getDisplayNames)})}function vt(e){!function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var bt=s(s({},ze),{textComponent:r.Fragment}),wt={key:42},yt=function(e){return r.isValidElement(e)?r.createElement(r.Fragment,wt,e):e};function xt(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),i=Object.keys(t),r=n.length;if(i.length!==r)return!1;for(var a=0;a<r;a++){var o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Et,jt={exports:{}},Nt={};var St,Ct,Tt,At,Pt={};
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -6,5 +6,5 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Pt(){return Tt||(Tt=1,"production"===process.env.NODE_ENV?jt.exports=function(){if(Et)return Nt;Et=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case c:case l:case i:case a:case r:case d:return e;default:switch(e=e&&e.$$typeof){case s:case p:case f:case _:case o:return e;default:return u}}case n:return u}}}function w(e){return b(e)===l}return Nt.AsyncMode=c,Nt.ConcurrentMode=l,Nt.ContextConsumer=s,Nt.ContextProvider=o,Nt.Element=t,Nt.ForwardRef=p,Nt.Fragment=i,Nt.Lazy=f,Nt.Memo=_,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=d,Nt.isAsyncMode=function(e){return w(e)||b(e)===c},Nt.isConcurrentMode=w,Nt.isContextConsumer=function(e){return b(e)===s},Nt.isContextProvider=function(e){return b(e)===o},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return b(e)===p},Nt.isFragment=function(e){return b(e)===i},Nt.isLazy=function(e){return b(e)===f},Nt.isMemo=function(e){return b(e)===_},Nt.isPortal=function(e){return b(e)===n},Nt.isProfiler=function(e){return b(e)===a},Nt.isStrictMode=function(e){return b(e)===r},Nt.isSuspense=function(e){return b(e)===d},Nt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===_||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Nt.typeOf=b,Nt}():jt.exports=(St||(St=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var h=e.type;switch(h){case c:case l:case i:case a:case r:case d:return h;default:var m=h&&h.$$typeof;switch(m){case s:case p:case f:case _:case o:return m;default:return u}}case n:return u}}}var w=c,y=l,x=s,k=o,E=t,j=p,N=i,S=f,T=_,M=n,A=a,C=r,P=d,L=!1;function O(e){return b(e)===l}Ct.AsyncMode=w,Ct.ConcurrentMode=y,Ct.ContextConsumer=x,Ct.ContextProvider=k,Ct.Element=E,Ct.ForwardRef=j,Ct.Fragment=N,Ct.Lazy=S,Ct.Memo=T,Ct.Portal=M,Ct.Profiler=A,Ct.StrictMode=C,Ct.Suspense=P,Ct.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||b(e)===c},Ct.isConcurrentMode=O,Ct.isContextConsumer=function(e){return b(e)===s},Ct.isContextProvider=function(e){return b(e)===o},Ct.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ct.isForwardRef=function(e){return b(e)===p},Ct.isFragment=function(e){return b(e)===i},Ct.isLazy=function(e){return b(e)===f},Ct.isMemo=function(e){return b(e)===_},Ct.isPortal=function(e){return b(e)===n},Ct.isProfiler=function(e){return b(e)===a},Ct.isStrictMode=function(e){return b(e)===r},Ct.isSuspense=function(e){return b(e)===d},Ct.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===_||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Ct.typeOf=b}()),Ct)),jt.exports}!function(){if(At)return Mt;At=1;var e=Pt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};function a(n){return e.isMemo(n)?i:r[n.$$typeof]||t}r[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r[e.Memo]=i;var o=Object.defineProperty,s=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;Mt=function e(t,i,r){if("string"!=typeof i){if(d){var u=p(i);u&&u!==d&&e(t,u,r)}var _=s(i);c&&(_=_.concat(c(i)));for(var f=a(t),h=a(i),m=0;m<_.length;++m){var g=_[m];if(!(n[g]||r&&r[g]||h&&h[g]||f&&f[g])){var v=l(i,g);try{o(t,g,v)}catch(e){}}}}return t}}();var Lt="undefined"==typeof window||window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?r.createContext(null):window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=r.createContext(null));Lt.Consumer;var Ot,Rt,It=Lt.Provider,Ut=Lt;function Bt(){var e=r.useContext(Ut);return vt(e),e}function Ht(e){var t=function(t){var n=Bt(),i=t.value,r=t.children,a=c(t,["value","children"]),o="string"==typeof i?new Date(i||0):i;return r("formatDate"===e?n.formatDateToParts(o,a):n.formatTimeToParts(o,a))};return t.displayName=Rt[e],t}function Ft(e){var t=function(t){var n=Bt(),i=t.value,a=t.children,o=c(t,["value","children"]),s=n[e](i,o);if("function"==typeof a)return a(s);var l=n.textComponent||r.Fragment;return r.createElement(l,null,s)};return t.displayName=Ot[e],t}function Dt(e){return e?Object.keys(e).reduce((function(t,n){var i,a=e[n];return t[n]=Te(a)?(i=a,function(e){return i(r.Children.toArray(e))}):a,t}),{}):e}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(Ot||(Ot={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(Rt||(Rt={}));var Gt=function(e,t,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var s=Dt(i),c=Ke.apply(void 0,p([e,t,n,s],a,!1));return Array.isArray(c)?function(e){var t;return null!==(t=r.Children.map(e,yt))&&void 0!==t?t:[]}(c):c},zt=function(e,t){var n=e.defaultRichTextElements,i=c(e,["defaultRichTextElements"]),r=Dt(n),a=gt(s(s(s({},bt),i),{defaultRichTextElements:r}),t),o={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:r};return s(s({},a),{formatMessage:Gt.bind(null,o,a.formatters),$t:Gt.bind(null,o,a.formatters)})};function Vt(e){var t=Bt(),n=t.formatMessage,i=t.textComponent,a=void 0===i?r.Fragment:i,o=e.id,s=e.description,c=e.defaultMessage,l=e.values,p=e.children,d=e.tagName,u=void 0===d?a:d,_=n({id:o,description:s,defaultMessage:c},l,{ignoreTag:e.ignoreTag});return"function"==typeof p?p(Array.isArray(_)?_:[_]):u?r.createElement(u,null,_):r.createElement(r.Fragment,null,_)}Vt.displayName="FormattedMessage";var Zt=r.memo(Vt,(function(e,t){var n=e.values,i=c(e,["values"]),r=t.values,a=c(t,["values"]);return xt(r,n)&&xt(i,a)}));function $t(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}Zt.displayName="MemoizedFormattedMessage";var Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:zt($t(t.props),t.cache),prevConfig:$t(t.props)},t}return o(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,i=t.cache,r=$t(e);return xt(n,r)?null:{intl:zt(r,i),prevConfig:r}},t.prototype.render=function(){return vt(this.state.intl),r.createElement(It,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=bt,t}(r.PureComponent);function Kt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Ft("formatDate"),Ft("formatTime"),Ft("formatNumber"),Ft("formatList"),Ft("formatDisplayName"),Ht("formatDate"),Ht("formatTime");function qt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__android-phone-background__wrapper "+("dark"===n?"notificare__android-phone-background__wrapper--dark":""),"data-testid":"android-phone-background",children:[e.jsx("div",{className:"notificare__android-phone-background__camera"}),e.jsx("div",{className:"notificare__android-phone-background__content",children:t})]})}Kt(".notificare .notificare__android-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__android-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__android-phone-background__camera {\n width: 20px;\n height: 20px;\n background: #c6c6c6;\n border-radius: 50%;\n margin: 20px auto 10px;\n}\n\n.notificare .notificare__android-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Xt;function Yt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__ios-phone-background__wrapper "+("dark"===n?"notificare__ios-phone-background__wrapper--dark":""),"data-testid":"ios-phone-background",children:[e.jsx("div",{className:"notificare__ios-phone-background__camera"}),e.jsx("div",{className:"notificare__ios-phone-background__content",children:t})]})}function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jt.apply(null,arguments)}Kt(".notificare .notificare__ios-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__ios-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__ios-phone-background__camera {\n width: 80px;\n height: 20px;\n background: #c6c6c6;\n margin: 20px auto 10px;\n border-radius: 20px;\n}\n\n.notificare .notificare__ios-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Qt,en=function(e){return r.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Xt||(Xt=r.createElement("path",{fill:"#64706e",d:"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5"})))};function tn(){return e.jsx("div",{className:"notificare__loading__wrapper","data-testid":"loading",children:e.jsx(en,{className:"notificare__loading__icon"})})}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nn.apply(null,arguments)}Kt(".notificare .notificare__loading__wrapper {\n width: 100%;\n display: flex;\n justify-content: center;\n padding-top: 50px;\n}\n\n.notificare .notificare__loading__icon {\n width: 60px;\n height: 60px;\n animation: notificare-loading-icon-spin 2s linear infinite;\n}\n\n@keyframes notificare-loading-icon-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}");var rn=function(e){return r.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Qt||(Qt=r.createElement("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32m0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24m32 224a32 32 0 1 0-64 0 32 32 0 1 0 64 0"})))};const an={"controls.platform":"Platform","controls.formFactor":"Form Factor","controls.operatingSystem":"OS","controls.operatingSystem.macos":"macOS","controls.variant":"Variant","controls.displayMode.lockScreen":"Lock Screen","controls.displayMode.expandedLockScreen":"Lock Screen - Expanded","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information","preview.error.invalidNotification":"→ Invalid Notification","preview.error.provideGoogleMapsApiKey":"→ A Google Maps API key should be provided","preview.error.notSupportedPreviewVariant":"→ Not supported variant","preview.error.invalidUrl":"The URL is invalid.","preview.error.iosStoreAppNotFound":"The app was not found. Check the unique identifier and try again","preview.error.webshotFail":"Webshot failed to be loaded. Check console for more details.","preview.error.notSupportedNotificationTypePreviewVariant":"→ Previewing notifications of type ''{notificationType}'' is not possible in this variant","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a custom URL Scheme is not possible","preview.error.urlResolverInvalidUrl":"→ The provided URL is invalid","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with an HTTP URL without 'notificareWebView' query parameter is not possible in this variant","preview.error.notSupportedUrlResolverWithDynamicLink":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a dynamic link is not possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a relative URL (starts with '/') is not possible","preview.error.googleMapsAuthFailure":"Authentication failure. Your Google Maps API key might be invalid. Check console for more information.","preview.error.googleMapsLoadFailure":"Google Maps failed to be loaded. Check console for more information.","preview.error.noValidContentObject":"No valid content object was provided","preview.error.iosStoreAppLoadFailure":"The app failed to be loaded. Check console for more details","preview.android.alert.appUi.cancel":"Cancel","preview.android.inAppBrowser.appUi.pageTitleLoading":"Loading...","preview.android.lockscreen.time":"now","preview.ios.alert.appUi.cancel":"Cancel","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Done","preview.ios.inAppBrowser.appUi.notSecure":"Not Secure —","preview.ios.rate.appUi.rateNow":"Yes, I'll Rate Now","preview.ios.rate.appUi.doNotRate":"No, Thanks","preview.ios.store.appUi.done":"Done","preview.ios.store.appUi.install":"Install","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Ratings","preview.ios.store.appUi.age":"Age","preview.ios.store.appUi.yearsOld":"Years Old","preview.ios.store.appUi.category":"Category","preview.ios.store.appUi.developer":"Developer","preview.ios.store.appUi.whatsNew":"What's New","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Screenshots","preview.ios.lockScreen.time":"Now","preview.web.desktop.macos.lockScreen.time":"now","preview.web.desktop.macos.lockScreen.settings":"Settings","preview.web.desktop.macos.lockScreen.options":"Options"};var on;function sn({message:t}){const n=Bt();return e.jsxs("div",{className:"notificare__preview-error__wrapper","data-testid":"preview-error",children:[e.jsx(rn,{className:"notificare__preview-error__icon"}),e.jsxs("p",{className:"notificare__preview-error__text",children:[n.formatMessage({id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]}),t&&e.jsxs(e.Fragment,{children:[e.jsx("br",{})," ",e.jsx("br",{})," ",t]})]})]})}function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},cn.apply(null,arguments)}Kt(".notificare .notificare__preview-error__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 440px;\n text-align: center;\n padding: 0 20px;\n}\n\n.notificare .notificare__preview-error__icon {\n width: 72px;\n margin-bottom: 20px;\n height: auto;\n}\n\n.notificare .notificare__preview-error__text {\n font-weight: 700;\n font-size: 16px;\n color: #232c2a;\n}");var ln=function(e){return r.createElement("svg",cn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),on||(on=r.createElement("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})))};class pn extends Error{constructor(e){super(`Failed to fetch a resource with response code '${e.status}'.`),this.response=e,this.name="NetworkRequestError",Error.captureStackTrace&&Error.captureStackTrace(this,pn)}}function dn(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}const un={name:"My app",icon:void 0,androidPackageName:"com.example.app",websitePushConfig:{icon:void 0,allowedDomains:["https://my-app.com/"]}};function _n({id:e,serviceKey:n}){const[i,r]=t.useState({status:"idle"});return t.useEffect((()=>{e?function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/application/${encodeURIComponent(e)}/info`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const i=yield fetch(n);if(!i.ok)throw new pn(i);const{application:r}=yield i.json();return{name:r.name,icon:r.icon,androidPackageName:r.androidPackageName,websitePushConfig:r.websitePushConfig&&{icon:r.websitePushConfig.icon?dn(r.websitePushConfig.icon):void 0,allowedDomains:r.websitePushConfig.allowedDomains}}}))}(e,n).then((e=>{r({status:"success",data:e})})).catch((e=>{console.error("Error fetching the application: ",e),r({status:"success",data:un})})):r({status:"success",data:un})}),[e]),i}function fn(e,n){const[i,r]=t.useState(e);return t.useEffect((()=>{const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),i}function hn(e){try{return Intl.NumberFormat.supportedLocalesOf([e]).length>0}catch(e){return!1}}const mn={"preview.error.invalidInAppMessage":"→ Invalid in-app message","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},gn={"preview.error.invalidInAppMessage":"→ Message intégré invalide","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},vn={"preview.error.invalidInAppMessage":"→ Mensagem in-app inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"},bn={"controls.platform":"Plateforme","controls.formFactor":"Format","controls.operatingSystem":"SE","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Écran verrouillé","controls.displayMode.expandedLockScreen":"Écran verrouillé - Étendu","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Aperçu non généré","preview.error.checkConsole":"Consultez la console pour plus d’informations","preview.error.invalidNotification":"→ Notification invalide","preview.error.provideGoogleMapsApiKey":"→ Une clé API Google Maps doit être fournie","preview.error.notSupportedPreviewVariant":"→ Variante non prise en charge","preview.error.invalidUrl":"L’URL est invalide.","preview.error.iosStoreAppNotFound":"L'application n’a pas été trouvée. Vérifiez l’identifiant unique et réessayez","preview.error.webshotFail":"La capture Web a échoué. Consultez la console pour plus de détails.","preview.error.notSupportedNotificationTypePreviewVariant":"→ L’aperçu des notifications de type ''{notificationType}'' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un schéma d’URL personnalisé (URL Scheme) n’est pas possible","preview.error.urlResolverInvalidUrl":"→ L’URL fournie est invalide","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL HTTP sans le paramètre de requête 'notificareWebView' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un lien dynamique n’est pas possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL relative (commençant par '/') n’est pas possible","preview.error.googleMapsAuthFailure":"Échec de l’authentification. Votre clé API Google Maps pourrait être invalide. Consultez la console pour plus d’informations.","preview.error.googleMapsLoadFailure":"Échec du chargement de Google Maps. Consultez la console pour plus d’informations.","preview.error.noValidContentObject":"Aucun objet de contenu valide fourni","preview.error.iosStoreAppLoadFailure":"Échec du chargement de l’application. Consultez la console pour plus de détails","preview.android.alert.appUi.cancel":"Annuler","preview.android.inAppBrowser.appUi.pageTitleLoading":"Chargement...","preview.android.lockscreen.time":"maintenant","preview.ios.alert.appUi.cancel":"Annuler","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Terminé","preview.ios.inAppBrowser.appUi.notSecure":"Non Sécurisé —","preview.ios.rate.appUi.rateNow":"Oui, je vais noter maintenant","preview.ios.rate.appUi.doNotRate":"Non, Merci","preview.ios.store.appUi.done":"Terminé","preview.ios.store.appUi.install":"Installer","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Évaluations","preview.ios.store.appUi.age":"Âge","preview.ios.store.appUi.yearsOld":"Ans","preview.ios.store.appUi.category":"Catégorie","preview.ios.store.appUi.developer":"Développeur","preview.ios.store.appUi.whatsNew":"Nouveautés","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Captures d’écran","preview.ios.lockScreen.time":"Maintenant","preview.web.desktop.macos.lockScreen.time":"maintenant","preview.web.desktop.macos.lockScreen.settings":"Réglages","preview.web.desktop.macos.lockScreen.options":"Options"},wn={"controls.platform":"Plataforma","controls.formFactor":"Formato","controls.operatingSystem":"SO","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Ecrã de Bloqueio","controls.displayMode.expandedLockScreen":"Ecrã de Bloqueio - Expandido","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações","preview.error.invalidNotification":"→ Notificação inválida","preview.error.provideGoogleMapsApiKey":"→ Deve ser fornecida uma chave de API do Google Maps","preview.error.notSupportedPreviewVariant":"→ Variante não suportada","preview.error.invalidUrl":"A URL é inválida.","preview.error.iosStoreAppNotFound":"A aplicação não foi encontrada. Verifique o identificador único e tente novamente","preview.error.webshotFail":"Não foi possível efetuar a captura da página web. Consulte a consola para mais informações.","preview.error.notSupportedNotificationTypePreviewVariant":"→ A pré-visualização de notificações do tipo ''{notificationType}'' não é possível nesta variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um esquema de URL personalizado (URL Scheme) não é possível","preview.error.urlResolverInvalidUrl":"→ O URL fornecido é inválido","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL HTTP sem o parâmetro de query 'notificareWebView' não é possível nesta variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um link dinâmico não é possível","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL relativo (que começa por '/') não é possível","preview.error.googleMapsAuthFailure":"Falha de autenticação. A chave da API do Google Maps poderá ser inválida. Consulte a consola para mais informações.","preview.error.googleMapsLoadFailure":"Não foi possível carregar o Google Maps. Consulte a consola para mais informações.","preview.error.noValidContentObject":"Nenhum objeto válido foi fornecido","preview.error.iosStoreAppLoadFailure":"Não foi possível carregar a aplicação. Consulte a consola para mais informações","preview.android.alert.appUi.cancel":"Cancelar","preview.android.inAppBrowser.appUi.pageTitleLoading":"A carregar...","preview.android.lockscreen.time":"agora","preview.ios.alert.appUi.cancel":"Cancelar","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Concluído","preview.ios.inAppBrowser.appUi.notSecure":"Não seguro —","preview.ios.rate.appUi.rateNow":"Sim, avaliar agora","preview.ios.rate.appUi.doNotRate":"Não, obrigado","preview.ios.store.appUi.done":"OK","preview.ios.store.appUi.install":"Obter","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Classificações","preview.ios.store.appUi.age":"Idade","preview.ios.store.appUi.yearsOld":"Anos","preview.ios.store.appUi.category":"Categoria","preview.ios.store.appUi.developer":"Programador","preview.ios.store.appUi.whatsNew":"Novidades","preview.ios.store.appUi.historyVersion":"Versão {version}","preview.ios.store.appUi.screenshots":"Capturas de ecrã","preview.ios.lockScreen.time":"Agora","preview.web.desktop.macos.lockScreen.time":"agora","preview.web.desktop.macos.lockScreen.settings":"Definições","preview.web.desktop.macos.lockScreen.options":"Opções"};function yn({locale:e,customTranslations:n,type:i}){const[r,a]=t.useState({status:"idle"}),o=t.useMemo((()=>{if(!hn(e))return null;return function(e,t){switch(e){case"en":return"push"===t?an:mn;case"pt":return"push"===t?wn:vn;case"fr":return"push"===t?bn:gn;default:return null}}(new Intl.Locale(e).language,i)}),[e,i]);return t.useEffect((function(){hn(e)?a({status:"success",data:{locale:e,translations:Object.assign(Object.assign({},o),n)}}):a({status:"error",error:new Error("→ The locale you chose is invalid. Choose a different one and try again")})}),[e,n,o]),r}function xn({label:n,options:i,value:r,onValueChanged:a,disabled:o=!1}){const s=Bt(),[c,l]=t.useState(!1),[p,d]=t.useState((function(){const e=i.find((e=>e.value===r));if(!e)throw new Error(`Value "${String(r)}" not found in the Selector options.`);return s.formatMessage({id:e.labelId,defaultMessage:e.defaultLabel})})),u=t.useRef(null),_=t.useRef(null);return function({refs:e,onClickOutside:n}){t.useEffect((()=>{function t(t){e.every((e=>!e.current||!e.current.contains(t.target)))&&n()}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}}),[e])}({refs:[u,_],onClickOutside:()=>l(!1)}),e.jsxs("div",{className:"notificare__selector__wrapper",children:[e.jsx("p",{className:"notificare__selector__label",children:n}),e.jsxs("button",{className:"notificare__selector__button",onClick:()=>l(!c),disabled:o,ref:_,children:[p,e.jsx(ln,{className:"notificare__selector__button-expand-icon"})]}),c&&e.jsx("div",{className:"notificare__selector__options",ref:u,children:i.map((t=>e.jsx("button",{className:"notificare__selector__option-button "+(r===t.value?"notificare__selector__option-button--selected":""),onClick:()=>{null==a||a(t.value),l(!1),d(s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel}))},"data-testid":`selector-option-${t.value}`,children:s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel})},t.value)))})]})}Kt(".notificare .notificare__selector__wrapper {\n position: relative;\n}\n\n.notificare .notificare__selector__label {\n font-size: 14px;\n color: #6e6e6e;\n margin-bottom: 7px;\n}\n\n.notificare .notificare__selector__button {\n width: 350px;\n height: 42px;\n background-color: #F6F6F6;\n color: #1c1c1c;\n border: 1px solid #E8E8E8;\n text-align: left;\n padding-left: 14px;\n font-size: 16px;\n display: flex;\n align-items: center;\n}\n\n.notificare .notificare__selector__button:not(:disabled) {\n cursor: pointer;\n}\n\n.notificare .notificare__selector__button:disabled {\n color: #b3b3b3;\n}\n\n.notificare .notificare__selector__button-expand-icon {\n width: 16px;\n height: 16px;\n margin-left: auto;\n margin-right: 14px;\n}\n\n.notificare .notificare__selector__button:disabled .notificare__selector__button-expand-icon {\n fill: #b3b3b3;\n}\n\n.notificare .notificare__selector__options {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 63px;\n z-index: 1;\n box-shadow: 0 14px 10px -10px rgba(0, 0, 0, 0.2);\n}\n\n.notificare .notificare__selector__option-button {\n width: 350px;\n height: 42px;\n background-color: #ececec;\n color: #151515;\n border: 0;\n font-size: 15px;\n text-align: left;\n padding-left: 14px;\n}\n\n.notificare .notificare__selector__option-button--selected {\n background-color: #c8c8c8;\n}\n\n.notificare .notificare__selector__option-button:hover {\n background-color: #5E5E5E;\n color: white;\n cursor: pointer;\n}\n");function kn({label:n,options:i,value:r,onValueChanged:a}){return e.jsxs("div",{className:"notificare__toggle-group__wrapper",children:[e.jsx("p",{className:"notificare__toggle-group__label","data-testid":`toggle-group-${n}`,children:n}),e.jsx("div",{className:"notificare__toggle-group__options",children:i.map(((n,o)=>e.jsxs(t.Fragment,{children:[e.jsx("button",{className:"notificare__toggle-group__option-button "+(r===n.value?"notificare__toggle-group__option-button--selected":""),onClick:()=>a(n.value),"aria-label":`Button with option '${n.value}'`,"data-testid":`toggle-group-option-${n.value}`,children:e.jsx("div",{className:"notificare__toggle-group__option-button-icon "+(r===n.value?"notificare__toggle-group__option-button-icon--selected":""),children:n.icon})}),o!==i.length-1&&e.jsx("div",{className:"notificare__toggle-group__border"})]},n.value)))})]})}Kt(".notificare .notificare__toggle-group__wrapper {\n display: flex;\n flex-direction: column;\n row-gap: 7px;\n}\n\n.notificare .notificare__toggle-group__label {\n font-size: 14px;\n color: #6e6e6e;\n}\n\n.notificare .notificare__toggle-group__options {\n display: flex;\n border-radius: 8px;\n border: 1px solid #DADADA;\n width: max-content;\n overflow: hidden;\n background-color: #F6F6F6;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.notificare .notificare__toggle-group__option-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n transition: all 0.3s;\n background: #f6f6f6;\n color: #374151;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__toggle-group__option-button--selected {\n background: #5E5E5E;\n color: #ffffff;\n}\n\n.notificare .notificare__toggle-group__option-button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #C0C0C0;\n}\n\n.notificare .notificare__toggle-group__option-button-icon--selected {\n fill: #FFF\n}\n\n.notificare .notificare__toggle-group__border {\n width: 1px;\n height: 40px;\n background: #DADADA;\n}");function En({message:t,showConsoleWarning:n}){return e.jsxs("div",{className:"notificare__unavailable-preview__wrapper","data-testid":"unavailable-preview",children:[e.jsxs("div",{className:"notificare__unavailable-preview__warning",children:[e.jsx(rn,{className:"notificare__unavailable-preview__alert-icon"}),e.jsxs("div",{className:"notificare__unavailable-preview__text-container",children:[e.jsx("div",{className:"notificare__unavailable-preview__title",children:e.jsx(Zt,{id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]})}),e.jsx("div",{className:"notificare__unavailable-preview__reason-text","data-testid":"unavailable-preview-reason-text",children:t})]})]}),n&&e.jsx("div",{className:"notificare__unavailable-preview__check-console-text",children:e.jsx(Zt,{id:"preview.error.checkConsole",defaultMessage:an["preview.error.checkConsole"]})})]})}Kt(".notificare .notificare__unavailable-preview__wrapper {\n width: 350px;\n}\n\n.notificare .notificare__unavailable-preview__warning {\n width: 100%;\n background-color: #fff1cc;\n border: 1px solid #d5d5d5;\n display: flex;\n align-items: center;\n padding: 14px;\n border-radius: 10px;\n column-gap: 14px;\n}\n\n.notificare .notificare__unavailable-preview__text-container {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 100%;\n}\n\n.notificare .notificare__unavailable-preview__title {\n font-size: 15px;\n color: #232323;\n font-weight: bold;\n}\n\n.notificare .notificare__unavailable-preview__reason-text {\n font-size: 13px;\n color: #bd6868;\n}\n\n.notificare .notificare__unavailable-preview__alert-icon {\n width: 40px;\n height: auto;\n}\n\n.notificare .notificare__unavailable-preview__check-console-text {\n font-size: 12px;\n color: #989898;\n text-align: right;\n margin-top: 6px;\n margin-right: 3px;\n font-style: italic;\n position: relative;\n}");const jn=t.createContext(void 0);function Nn(t){var{children:n}=t,i=c(t,["children"]);return e.jsx(jn.Provider,{value:i,children:n})}function Sn(){const e=t.useContext(jn);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e}function Tn(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function Mn(e){try{const t=new URL(e).hostname,n=t.split(".");return n.length>2?n.slice(-2).join("."):t}catch(e){return console.error("Invalid URL:",e),""}}function An(e){const{serviceKey:n}=Sn(),i=Bt(),{url:r,platform:a,width:o,height:s}=fn(e,500),[c,p]=t.useState({status:"idle"}),[d,u]=t.useState();return t.useEffect((function(){!function(e){try{return new URL(e),!0}catch(e){return!1}}(r)?p({status:"error",error:new Error(i.formatMessage({id:"preview.error.invalidUrl",defaultMessage:an["preview.error.invalidUrl"]}))}):(p({status:"loading"}),u(void 0),function(e,t,n,i,r){return l(this,void 0,void 0,(function*(){const a=new URL("/webshot","https://push.notifica.re");a.searchParams.set("apiKey",r);const o=yield fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:i,type:"png",params:{width:t,height:n}})});if(!o.ok)throw new pn(o);return(yield o.json()).webshot.id}))}(r,o,s,a,n).then(u).catch((e=>{console.error("Webshot error:\n\n"+e),p({status:"error",error:new Error(i.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})})))}),[r,o,s,a,n]),t.useEffect((function(){if(!d)return;let e;return e=setInterval((()=>l(this,void 0,void 0,(function*(){try{const t=yield function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/webshot/${encodeURIComponent(e)}`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const i=yield fetch(n);if(!i.ok)throw new pn(i);return(yield i.json()).webshot}))}(d,n);if("finished"===t.status){const t=yield function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/webshot/${encodeURIComponent(e)}/result`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const i=yield fetch(n);if(!i.ok)throw new pn(i);const r=yield i.blob();return URL.createObjectURL(r)}))}(d,n);p({status:"success",data:t}),clearInterval(e)}else"error"===t.status&&(console.error("Webshot error:\n\n"+t.result),p({status:"error",error:new Error(i.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))}),clearInterval(e))}catch(t){console.error("Webshot error:\n\n"+t),p({status:"error",error:new Error(i.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))}),clearInterval(e)}}))),3e3),()=>clearInterval(e)}),[d,n]),c}var Cn;function Pn({url:n,platform:i,width:r,height:a,onLoadingChanged:o,canShow:s=!0}){const c=An({url:n,platform:i,width:r,height:a});return t.useEffect((function(){switch(c.status){case"idle":case"loading":null==o||o(!0);break;case"success":case"error":null==o||o(!1)}}),[c]),e.jsxs("div",{className:"notificare__webshot__wrapper",style:{width:r,height:a},children:["loading"===c.status&&e.jsx(tn,{}),"success"===c.status&&s&&e.jsx("img",{src:c.data,alt:"Webshot","data-testid":"webshot"}),"error"===c.status&&e.jsx(sn,{message:c.error.message})]})}function Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ln.apply(null,arguments)}Kt(".notificare .notificare__webshot__wrapper {\n background-color: #fff;\n}");var On,Rn=function(e){return r.createElement("svg",Ln({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),Cn||(Cn=r.createElement("path",{d:"M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80m-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64z"})))};function In(){return In=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},In.apply(null,arguments)}var Un=function(e){return r.createElement("svg",In({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),On||(On=r.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256z"})))};function Bn({url:n,onLoadingChanged:i,canShow:r}){const[a,o]=t.useState(""),[s,c]=t.useState({isLoading:!0}),{serviceKey:p}=Sn(),d=Bt();return t.useEffect((function(){(()=>{l(this,void 0,void 0,(function*(){Hn(!0,c,i);try{const e=yield function(e,t){return l(this,void 0,void 0,(function*(){var n,i;const r=new URL("/proxy","https://push.notifica.re");r.searchParams.set("apiKey",e),r.searchParams.set("url",t);const a=yield fetch(r),o=yield a.text();return null!==(i=null===(n=(new DOMParser).parseFromString(o,"text/html").querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:""}))}(p,n);o(e)}catch(e){console.error("Error while getting page title:\n\n",e)}Hn(!1,c,i)}))})()}),[n]),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[e.jsx(Un,{className:"notificare__push__android__in-app-browser__app-ui__x-mark-icon"}),Tn(n)?e.jsx(Rn,{className:"notificare__push__android__in-app-browser__app-ui__bar-lock-icon"}):e.jsx(rn,{className:"notificare__push__android__in-app-browser__app-ui__alert-icon"}),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!s.isLoading&&r?a:d.formatMessage({id:"preview.android.inAppBrowser.appUi.pageTitleLoading",defaultMessage:an["preview.android.inAppBrowser.appUi.pageTitleLoading"]})}),e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:Mn(n)})]})]})}function Hn(e,t,n){t({isLoading:e}),null==n||n(e)}Kt(".notificare .notificare__push__android__in-app-browser__app-ui__bar {\n display: flex;\n width: 334px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__x-mark-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-lock-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__alert-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-domain {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--title {\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--url {\n font-size: 12px;\n}");function Fn({notification:n}){const[i,r]=t.useState(!0),[a,o]=t.useState(!0),s=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[e.jsx(Bn,{url:s,onLoadingChanged:r,canShow:!a}),e.jsx(Pn,{url:s,platform:"Android",width:338,height:570,onLoadingChanged:o,canShow:!i})]})}Kt("");const Dn=t.createContext(void 0);function Gn({application:t,children:n}){return e.jsx(Dn.Provider,{value:t,children:n})}function zn(){const e=t.useContext(Dn);if(!e)throw new Error("useApplication should be used inside an ApplicationProvider");return e}function Vn(e,t){return l(this,void 0,void 0,(function*(){const n=new URL("/proxy","https://push.notifica.re");n.searchParams.set("apiKey",e),n.searchParams.set("url",t);return(yield fetch(n)).text()}))}function Zn(e){return!!(e.actions&&e.actions.length>0)}function $n(e){return!(!e.actions||1!==e.actions.length)}function Wn(e){return!!(e.actions&&e.actions.length>1)}function Kn(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function qn(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("a");let n=!1;return t.forEach((e=>{new URL(e.href,window.location.origin).searchParams.has("notificareOpenAction")&&(n=!0)})),n}var Xn;function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Yn.apply(null,arguments)}var Jn,Qn=function(e){return r.createElement("svg",Yn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),Xn||(Xn=r.createElement("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})))};function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ei.apply(null,arguments)}var ti=function(e){return r.createElement("svg",ei({xmlns:"http://www.w3.org/2000/svg","data-testid":"android-app-ui-navigation-bar-options-button",viewBox:"0 0 128 512",width:"1em",height:"1em"},e),Jn||(Jn=r.createElement("path",{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112m0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112m56-104A56 56 0 1 0 8 96a56 56 0 1 0 112 0"})))};function ni({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[e.jsx(Qn,{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon"}),e.jsx("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:t}),n&&e.jsx(ti,{"data-testid":"android-app-ui-navigation-bar-options-button",className:"notificare__push__android__app-ui__navigation-bar-options-button"})]})}Kt(".notificare .notificare__push__android__app-ui__navigation-bar {\n display: flex;\n width: 338px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n justify-content: flex-start;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-arrow-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-title {\n width: 100%;\n font-size: 18px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-options-button {\n margin-left: auto;\n height: 24px;\n}");var ii;function ri({notification:n}){const i=zn(),r=n.content[0].data,[a,o]=t.useState(""),{serviceKey:s}=Sn();return t.useEffect((function(){(()=>{l(this,void 0,void 0,(function*(){try{const e=yield Vn(s,r);o(e)}catch(e){console.error("Error fetching website markup:\n\n",e)}}))})()}),[]),e.jsxs("div",{"data-testid":"android-app-ui-url-notification",children:[e.jsx(ni,{title:n.title||i.name,showOptions:Zn(n)&&!qn(a)}),e.jsx(Pn,{url:r,platform:"Android",width:338,height:570})]})}function ai(e){if(!(e=e.trim()))return ii.INVALID_URL;if(e.startsWith("/"))return ii.RELATIVE_URL;let t;try{t=new URL(e)}catch(e){return ii.INVALID_URL}const n="http:"===t.protocol||"https:"===t.protocol,i=t.host.endsWith("ntc.re");if(!n)return ii.URL_SCHEME;if(i)return ii.DYNAMIC_LINK;const r=t.searchParams.get("notificareWebView");return"1"===r||"true"===(null==r?void 0:r.toLowerCase())?ii.WEB_VIEW:ii.IN_APP_BROWSER}function oi({notification:n,onError:i}){const r=Bt(),a=n.content[0].data,o=ai(a);switch(t.useEffect((function(){switch(o){case"invalid-url":i(r.formatMessage({id:"preview.error.urlResolverInvalidUrl",defaultMessage:an["preview.error.urlResolverInvalidUrl"]}));break;case"url-scheme":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithUrlSchemePreview",defaultMessage:an["preview.error.notSupportedUrlResolverWithUrlSchemePreview"]}));break;case"dynamic-link":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithDynamicLink",defaultMessage:an["preview.error.notSupportedUrlResolverWithDynamicLink"]}));break;case"relative-url":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithRelativeUrl",defaultMessage:an["preview.error.notSupportedUrlResolverWithRelativeUrl"]}))}}),[a]),o){case"invalid-url":case"url-scheme":case"dynamic-link":case"relative-url":return;case"web-view":return e.jsx(ri,{notification:n});case"in-app-browser":return e.jsx(Fn,{notification:n})}}Kt(""),function(e){e.INVALID_URL="invalid-url",e.DYNAMIC_LINK="dynamic-link",e.WEB_VIEW="web-view",e.IN_APP_BROWSER="in-app-browser",e.URL_SCHEME="url-scheme",e.RELATIVE_URL="relative-url"}(ii||(ii={}));function si({notification:t}){const n=zn(),i=Bt(),r=function(e){const t="https://play.google.com";for(const n of e)switch(n.type){case"re.notifica.content.GooglePlayDetails":{const e=new URL("/store/apps/details",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayDeveloper":{const e=new URL("/store/apps/dev",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayCollection":return new URL(`/store/apps/collection/${encodeURIComponent(n.data)}`,t).toString();case"re.notifica.content.GooglePlaySearch":{const e=new URL("/store/search",t);return e.searchParams.set("q",n.data),e.searchParams.set("c","apps"),e.toString()}}return null}(t.content);return e.jsxs("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:!1}),r?e.jsx(Pn,{url:r,platform:"Android",width:338,height:570}):e.jsx(sn,{message:i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]})})]})}Kt("");function ci({notification:t}){const n=zn();return e.jsxs("div",{"data-testid":"android-app-ui-passbook-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:Zn(t)}),e.jsx(Pn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}Kt("");var li,pi;function di({notification:t}){const n=zn();return e.jsxs("div",{"data-testid":"android-app-ui-images-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:Zn(t)}),e.jsx("div",{className:"notificare__push__android__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__android__image__app-ui__image-slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__android__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 570px;\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");var ui=kt(pi?li:(pi=1,li=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,a;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!==r--;){var o=a[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}));function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_i.apply(null,arguments)}function fi(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function hi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}const mi="NOT_LOADED",gi="LOADING",vi="LOADED",bi="FAILED",wi="AUTH_FAILURE";class yi{static async load(e,t){var n;const i=e.libraries?e.libraries.split(","):[],r=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=vi),this.notifyLoadingStatusListeners()):(this.serializedApiParams=r,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==r&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...i];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var i;const r=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),r.async=!0,r.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),r.nonce=(null==(i=document.querySelector("script[nonce]"))?void 0:i.nonce)||"",r.onerror=()=>{this.loadingStatus=bi,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=vi,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=wi,this.notifyLoadingStatusListeners()},this.loadingStatus=gi,this.notifyLoadingStatusListeners(),document.head.append(r)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}yi.loadingStatus=mi,yi.serializedApiParams=void 0,yi.listeners=[];const xi=["onLoad","onError","apiKey","version","libraries"],ki=["children"],Ei=t.createContext(null);const ji=e=>{const{children:n}=e,i=fi(e,ki),{mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s}=function(){const[e,n]=t.useState({});return{mapInstances:e,addMapInstance:(e,t="default")=>{n((n=>_i({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>fi(t,[e].map(hi))))},clearMapInstances:()=>{n({})}}}(),{status:c,loadedLibraries:l,importLibrary:p}=function(e){const{onLoad:n,onError:i,apiKey:r,version:a,libraries:o=[]}=e,s=fi(e,xi),[c,l]=t.useState(yi.loadingStatus),[p,d]=t.useReducer(((e,t)=>e[t.name]?e:_i({},e,{[t.name]:t.value})),{}),u=t.useMemo((()=>null==o?void 0:o.join(",")),[o]),_=t.useMemo((()=>JSON.stringify(_i({apiKey:r,version:a},s))),[r,a,s]),f=t.useCallback((async e=>{var t;if(p[e])return p[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return d({name:e,value:n}),n}),[p]);return t.useEffect((()=>{(async()=>{try{const e=_i({key:r},s);a&&(e.v=a),(null==u?void 0:u.length)>0&&(e.libraries=u),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await yi.load(e,(e=>l(e)));for(const e of["core","maps",...o])await f(e);n&&n()}catch(e){i?i(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[r,u,_]),{status:c,loadedLibraries:p,importLibrary:f}}(i),d=t.useMemo((()=>({mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s,status:c,loadedLibraries:l,importLibrary:p})),[r,a,o,s,c,l,p]);return t.createElement(Ei.Provider,{value:d},n)};function Ni(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Ti.includes(e)){const e=i,n=t.getCenter(),r=t.getZoom(),a=t.getHeading()||0,o=t.getTilt()||0,s=t.getBounds();return n&&s&&Number.isFinite(r)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:a,tilt:o,bounds:(null==s?void 0:s.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(Mi.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=i;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(r=n.latLng)?void 0:r.toJSON())||null,placeId:n.placeId},e}return i}const Si={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Ti=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Mi=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Ai=Object.keys(Si);const Ci=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Pi(e,n){const i={},r=Object.keys(n);for(const e of r)Ci.has(e)&&(i[e]=n[e]);!function(e,n){const i=t.useRef(void 0);i.current&&ui(n,i.current)||(i.current=n),t.useEffect(e,i.current)}((()=>{e&&e.setOptions(i)}),[i])}function Li(){var e;return(null==(e=t.useContext(Ei))?void 0:e.status)||mi}function Oi(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const Ri=()=>t.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},t.createElement("h2",null,"Error: AuthFailure"),t.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",t.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function Ii(){return Li()===vi}function Ui(e){const n=function(){const[,e]=t.useReducer((e=>e+1),0);return e}(),i=t.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return t.useEffect((()=>{if(!e)return;const t=google.maps.event.addListener(e,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),i=e.getZoom(),r=e.getHeading()||0,a=e.getTilt()||0,o=e.getBounds();n&&o&&Number.isFinite(i)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:i||0,heading:r,tilt:a})}(e,i),n()}));return()=>t.remove()}),[e,n]),i}const Bi=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Hi=["padding"];class Fi{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function Di(e,n){const i=Ii(),[r,a]=t.useState(null),[o,s]=function(){const[e,n]=t.useState(null);return[e,t.useCallback((e=>n(e)),[n])]}(),c=Ui(r),{id:l,defaultBounds:p,defaultCenter:d,defaultZoom:u,defaultHeading:_,defaultTilt:f,reuseMaps:h,renderingType:m,colorScheme:g}=e,v=fi(e,Bi),b=void 0!==e.zoom||void 0!==e.defaultZoom,w=void 0!==e.center||void 0!==e.defaultCenter;p||b&&w||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&d&&(v.center=d),!v.zoom&&Number.isFinite(u)&&(v.zoom=u),!v.heading&&Number.isFinite(_)&&(v.heading=_),!v.tilt&&Number.isFinite(f)&&(v.tilt=f);for(const e of Object.keys(v))void 0===v[e]&&delete v[e];const y=t.useRef(void 0);return t.useEffect((()=>{if(!o||!i)return;const{addMapInstance:t,removeMapInstance:r}=n,{mapId:s}=e,d=`${s||"default"}:${m||"default"}:${g||"LIGHT"}`;let u,_;if(h&&Fi.has(d)?(_=Fi.pop(d),u=_.getDiv(),o.appendChild(u),_.setOptions(v),setTimeout((()=>_.setCenter(_.getCenter())),0)):(u=document.createElement("div"),u.style.height="100%",o.appendChild(u),_=new google.maps.Map(u,_i({},v,m?{renderingType:m}:{},g?{colorScheme:g}:{}))),a(_),t(_,l),p){const{padding:e}=p,t=fi(p,Hi);_.fitBounds(t,e)}else b&&w||_.fitBounds({east:180,west:-180,south:-90,north:90});if(y.current){const{mapId:e,cameraState:t}=y.current;e!==s&&_.setOptions(t)}return()=>{y.current={mapId:s,cameraState:c.current},u.remove(),h?Fi.push(d,_):google.maps.event.clearInstanceListeners(_),a(null),r(l)}}),[o,i,l,e.mapId,e.renderingType,e.colorScheme]),[r,s,c]}Fi.entries={};const Gi=t.createContext(null),zi=e=>{const{children:n,id:i,className:r,style:a}=e,o=t.useContext(Ei),s=Li();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[c,l,p]=Di(e,o);!function(e,n,i){const r=i.center?Oi(i.center):null;let a=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(a=r.lat,o=r.lng);const s=Number.isFinite(i.zoom)?i.zoom:null,c=Number.isFinite(i.heading)?i.heading:null,l=Number.isFinite(i.tilt)?i.tilt:null;t.useLayoutEffect((()=>{if(!e)return;const t={};let i=!1;null===a||null===o||n.current.center.lat===a&&n.current.center.lng===o||(t.center={lat:a,lng:o},i=!0),null!==s&&n.current.zoom!==s&&(t.zoom=s,i=!0),null!==c&&n.current.heading!==c&&(t.heading=c,i=!0),null!==l&&n.current.tilt!==l&&(t.tilt=l,i=!0),i&&e.moveCamera(t)}))}(c,p,e),function(e,n){for(const i of Ai){const r=n[i],a=Si[i];t.useEffect((()=>{if(!e)return;if(!r)return;const t=google.maps.event.addListener(e,a,(t=>{r(Ni(a,e,t))}));return()=>t.remove()}),[e,a,r])}}(c,e),Pi(c,e);const d=function(e,n){const{viewport:i,viewState:r}=n,a=!!i;return t.useLayoutEffect((()=>{if(!e||!r)return;const{latitude:t,longitude:n,bearing:i,pitch:a,zoom:o}=r;e.moveCamera({center:{lat:t,lng:n},heading:i,tilt:a,zoom:o+1})}),[e,r]),a}(c,e),u=!!e.controlled;t.useEffect((()=>{if(c)return d&&c.setOptions({disableDefaultUI:!0}),(d||u)&&c.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{c.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[c,d,u,e.gestureHandling,e.keyboardShortcuts]);const _=e.center?Oi(e.center):null;let f=null,h=null;_&&Number.isFinite(_.lat)&&Number.isFinite(_.lng)&&(f=_.lat,h=_.lng);const m=t.useMemo((()=>{var t,n,i,r,a;return{center:{lat:null!=(t=f)?t:0,lng:null!=(n=h)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(r=e.heading)?r:0,tilt:null!=(a=e.tilt)?a:0}}),[f,h,e.zoom,e.heading,e.tilt]);t.useLayoutEffect((()=>{if(!c||!u)return;c.moveCamera(m);const e=c.addListener("bounds_changed",(()=>{c.moveCamera(m)}));return()=>e.remove()}),[c,u,m]);const g=t.useMemo((()=>_i({width:"100%",height:"100%",position:"relative",zIndex:d?-1:0},a)),[a,d]),v=t.useMemo((()=>({map:c})),[c]);return s===wi?t.createElement("div",{style:_i({position:"relative"},r?{}:g),className:r},t.createElement(Ri,null)):t.createElement("div",_i({ref:l,"data-testid":"map",style:r?void 0:g,className:r},i?{id:i}:{}),c?t.createElement(Gi.Provider,{value:v},n):null)};zi.deckGLViewProps=!0;const Vi=new Set;const Zi=(e=null)=>{const n=t.useContext(Ei),{map:i}=t.useContext(Gi)||{};if(null===n)return function(...e){const t=JSON.stringify(e);Vi.has(t)||(Vi.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=n;return null!==e?r[e]||null:i||(r.default||null)};function $i(e,n,i){t.useEffect((()=>{if(!e||!n||!i)return;const t=google.maps.event.addListener(e,n,i);return()=>t.remove()}),[e,n,i])}function Wi(e,n,i){t.useEffect((()=>{e&&(e[n]=i)}),[e,n,i])}function Ki(e,n,i){t.useEffect((()=>{if(e&&n&&i)return e.addEventListener(n,i),()=>e.removeEventListener(n,i)}),[e,n,i])}const qi=t.createContext(null),Xi={BOTTOM:["50%","100%"]},Yi=({children:e,styles:n,className:i,anchorPoint:r})=>{const[a,o]=null!=r?r:Xi.BOTTOM;let s=`-${a}`,c=`-${o}`;a.trimStart().startsWith("-")&&(s=a.substring(1)),o.trimStart().startsWith("-")&&(c=o.substring(1));const l=`translate(50%, 100%) translate(${s}, ${c})`;return t.createElement("div",{style:{transform:l}},t.createElement("div",{className:i,style:n},e))};function Ji(e){const[n,i]=t.useState(null),[r,a]=t.useState(null),o=Zi(),s=function(e){const n=Ii(),i=t.useContext(Ei);return t.useEffect((()=>{n&&i&&i.importLibrary(e)}),[n,i,e]),(null==i?void 0:i.loadedLibraries[e])||null}("marker"),{children:c,onClick:l,className:p,onMouseEnter:d,onMouseLeave:u,onDrag:_,onDragStart:f,onDragEnd:h,collisionBehavior:m,clickable:g,draggable:v,position:b,title:w,zIndex:y}=e,x=t.Children.count(c);return t.useEffect((()=>{if(!o||!s)return;const e=new s.AdvancedMarkerElement;e.map=o,i(e);let t=null;return x>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),i(null),a(null)}}),[o,s,x]),t.useEffect((()=>{!n||!n.content||x>0||(n.content.className=p||"")}),[n,p,x]),Wi(n,"position",b),Wi(n,"title",null!=w?w:""),Wi(n,"zIndex",y),Wi(n,"collisionBehavior",m),t.useEffect((()=>{n&&(n.gmpDraggable=void 0!==v?v:!!(_||f||h))}),[n,v,_,h,f]),t.useEffect((()=>{if(!n)return;const e=void 0!==g||Boolean(l)||Boolean(d)||Boolean(u);n.gmpClickable=e,e&&null!=n&&n.content&&n.content.nodeType===Node.ELEMENT_NODE&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,g,l,d,u]),$i(n,"click",l),$i(n,"drag",_),$i(n,"dragstart",f),$i(n,"dragend",h),Ki(null==n?void 0:n.element,"mouseenter",d),Ki(null==n?void 0:n.element,"mouseleave",u),[n,r]}t.forwardRef(((e,i)=>{const{children:r,style:a,className:o,anchorPoint:s}=e,[c,l]=Ji(e),p=t.useMemo((()=>c?{marker:c}:null),[c]);return t.useImperativeHandle(i,(()=>c),[c]),l?t.createElement(qi.Provider,{value:p},n.createPortal(t.createElement(Yi,{anchorPoint:s,styles:a,className:o},r),l)):null}));const Qi=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const er=t.forwardRef(((e,n)=>{const i=function(e){const[n,i]=t.useState(null),r=Zi(),{onClick:a,onDrag:o,onDragStart:s,onDragEnd:c,onMouseOver:l,onMouseOut:p}=e,d=fi(e,Qi),{position:u,draggable:_}=d;return t.useEffect((()=>{if(!r)return void(void 0===r&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(d);return e.setMap(r),i(e),()=>{e.setMap(null),i(null)}}),[r]),t.useEffect((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),o&&t.addListener(e,"drag",o),s&&t.addListener(e,"dragstart",s),c&&t.addListener(e,"dragend",c),l&&t.addListener(e,"mouseover",l),p&&t.addListener(e,"mouseout",p),n.setDraggable(Boolean(_)),()=>{t.clearInstanceListeners(e)}}),[n,_,a,o,s,c,l,p]),t.useEffect((()=>{n&&d&&n.setOptions(d)}),[n,d]),t.useEffect((()=>{!_&&u&&n&&n.setPosition(u)}),[_,u,n]),n}(e);return t.useImperativeHandle(n,(()=>i),[i]),t.createElement(t.Fragment,null)}));function tr({notification:n,width:i,height:r}){const{googleMapsAPIKey:a}=Sn(),[o,s]=t.useState(!1),c=t.useMemo((()=>function(e){const t=[];return e.content.forEach((e=>{t.push({title:e.data.title,latitude:e.data.latitude,longitude:e.data.longitude})})),t}(n).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title})))),[n.content]),l=t.useMemo((()=>c.length>0?{lat:c[0].lat,lng:c[0].lng}:{lat:0,lng:0}),[c]);return t.useEffect((()=>{s(!0)}),[]),0!==c.length&&o?e.jsx("div",{"data-testid":"map-notification",children:e.jsx(ji,{apiKey:a||"",children:e.jsx(nr,{markers:c,center:l,width:i,height:r})})}):e.jsx(tn,{})}function nr({markers:t,center:n,width:i,height:r}){const a=Li(),o=Bt();return e.jsxs("div",{style:{width:i,height:r,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[a===gi&&e.jsx(tn,{}),a===wi&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsAuthFailure",defaultMessage:an["preview.error.googleMapsAuthFailure"]})}),a===bi&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsLoadFailure",defaultMessage:an["preview.error.googleMapsLoadFailure"]})}),a===vi&&e.jsx(zi,{style:{width:i,height:r},defaultCenter:n,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:t.map((t=>e.jsx(er,{position:{lat:t.lat,lng:t.lng},title:t.title},t.id)))})]})}Kt("");function ir({notification:n,onError:i}){const r=zn(),{googleMapsAPIKey:a}=Sn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a]),a)return e.jsxs("div",{"data-testid":"android-app-ui-map-notification",children:[e.jsx(ni,{title:r.name,showOptions:Zn(n)}),e.jsx(tr,{notification:n,width:"100%",height:"570px"})]})}Kt("");var rr;function ar({notification:t}){const n=zn(),i=new URL("/store/apps/details","https://play.google.com");return i.searchParams.set("id",n.androidPackageName||""),e.jsxs("div",{"data-testid":"android-app-ui-rate-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:!1}),e.jsx(Pn,{url:i.toString(),platform:"Android",width:338,height:570})]})}function or(){return or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},or.apply(null,arguments)}Kt("");var sr=function(e){return r.createElement("svg",or({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid slice",viewBox:"1757.501 1648.178 806.546 806.694"},e),rr||(rr=r.createElement("rect",{width:"100%",height:"100%",fill:"transparent"})),r.createElement("path",{d:"M-33.085-33.085h66.17v66.17h-66.17z",style:{fill:"#232c2a",strokeWidth:1},transform:"translate(2160.42 2051.46)scale(12.2)"}),r.createElement("circle",{r:35,style:{fill:"#232c2a",stroke:"#444",strokeWidth:1},transform:"matrix(7.2 0 0 7.2 2160.42 2051.79)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"rotate(-135 1505.372 579.04)scale(15.19 -.07)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.71 -10.71 -.05 -.05 2160.62 2052.92)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.69 0 0 -.07 2160.36 2053.16)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 1896.9 2052.81)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 2423.68 2053.49)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.69 0 0 .07 2160.38 1790.29)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.68 0 0 .07 2160.42 2313.82)"}))};function cr({notification:t}){var n;const i=zn();return e.jsx("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e.jsxs("div",{className:"notificare__push__android__alert__app-ui__header",children:[e.jsx("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:i.icon?e.jsx("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:i.icon}):e.jsx(sr,{className:"notificare__push__android__alert__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__title",children:t.title||i.name})]}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__message",children:t.message}),Zn(t)&&e.jsxs("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(n=t.actions)||void 0===n?void 0:n.map(((t,n)=>e.jsx("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n}`,children:t.label},n))),e.jsx("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:e.jsx(Zt,{id:"preview.android.alert.appUi.cancel",defaultMessage:an["preview.android.alert.appUi.cancel"]})},"cancel-button-label")]})]})})}Kt(".notificare .notificare__push__android__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__android__alert__app-ui__wrapper {\n position: relative;\n background-color: #fff;\n width: 290px;\n border-radius: 2px;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n/* Header - App Icon and Title */\n\n.notificare .notificare__push__android__alert__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__alert__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__header {\n display: flex;\n align-items: center;\n column-gap: 10px;\n padding: 20px 20px 0;\n}\n\n.notificare .notificare__push__android__alert__app-ui__title {\n font-weight: 700;\n font-size: 18px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 208px;\n}\n\n/* Message */\n\n.notificare .notificare__push__android__alert__app-ui__message {\n font-size: 16px;\n margin-top: 20px;\n margin-bottom: 0;\n word-break: break-all;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 8;\n padding: 0 20px 20px;\n}\n\n/* Actions */\n\n.notificare .notificare__push__android__alert__app-ui__actions {\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__android__alert__app-ui__action-label {\n font-size: 14px;\n font-weight: 600;\n padding: 15px 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__alert__app-ui__cancel-label {\n font-size: 14px;\n font-weight: 600;\n color: #64706e;\n padding: 15px 20px 20px;\n}");function lr({videoData:t,width:n,height:i}){const r=()=>{switch(t.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${t.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${t.data}`;case"re.notifica.content.HTML5Video":return t.data;default:return""}};return"re.notifica.content.YouTube"===t.type||"re.notifica.content.Vimeo"===t.type?e.jsx("iframe",{className:"notificare__push__video-rich-content",src:r(),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",width:n,height:i}):e.jsx("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:e.jsx("source",{src:r(),type:"video/mp4"})})}Kt(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function pr({notification:t}){const n=zn();return e.jsxs("div",{"data-testid":"android-app-ui-video-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:Zn(t)}),e.jsx(lr,{videoData:t.content[0],width:"100%",height:"570px"})]})}Kt("");function dr({notification:t}){const n=zn(),i=t.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-web-view-notification",children:[e.jsx(ni,{title:t.title||n.name,showOptions:Zn(t)&&!qn(i)}),e.jsx("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:i,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n pointer-events: none;\n}");function ur({notification:t,expanded:n}){var i,r;const a=zn();return e.jsxs("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[e.jsx("div",{className:"notificare__push__android__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(sr,{className:"notificare__push__android__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content-top "+(Kn(t)&&!n?"notificare__push__android__lock-screen__text-content-top--has-media":""),children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__title-and-subtitle",children:[e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:n?a.name:t.title||a.name}),t.subtitle&&!Kn(t)&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:t.subtitle})]}),e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:e.jsx(Zt,{id:"preview.android.lockscreen.time",defaultMessage:an["preview.android.lockscreen.time"]})})]}),n&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:t.title}),e.jsx("p",{className:`notificare__push__android__lock-screen__text ${n?"notificare__push__android__lock-screen__text--expanded-message":""} ${Kn(t)&&!n?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:t.message}),Kn(t)&&n&&e.jsx("img",{className:"notificare__push__android__lock-screen__expanded-media",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Expanded media","data-testid":"android-lock-screen-notification-expanded-media"})]}),Kn(t)&&!n&&e.jsx("img",{className:"notificare__push__android__lock-screen__media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"android-lock-screen-notification-media"})]})}Kt(".notificare .notificare__push__android__lock-screen {\n position: absolute;\n font-family: 'Roboto', sans-serif;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n padding: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 11px;\n left: 50%;\n transform: translateX(-50%);\n top: 40px;\n}\n\n.notificare .notificare__push__android__lock-screen__wrapper {\n position: relative;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__android__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__android__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top--has-media {\n max-width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle {\n display: flex;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__android__lock-screen__text {\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__android__lock-screen__text--title {\n font-weight: 700;\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-title {\n font-weight: 700;\n font-size: 14px;\n margin-top: 5px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--subtitle {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n flex-shrink: 0;\n max-width: 135px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-without-media {\n font-size: 14px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-with-media {\n font-size: 14px;\n width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-message {\n font-size: 14px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n word-break: break-word;\n width: 252px;\n white-space: wrap;\n}\n\n/* Media */\n\n.notificare .notificare__push__android__lock-screen__media {\n width: 50px;\n border-radius: 5px;\n object-fit: cover;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media {\n width: 252px;\n max-height: 168px;\n border-radius: 15px;\n margin-top: 5px;\n}\n");function _r({notification:n,previewState:i,onError:r}){const a=Bt();if(t.useEffect((function(){hr(n.type,i.displayMode)||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[i,n.type]),hr(n.type,i.displayMode))return e.jsx(qt,{theme:fr(n.type,i.displayMode),children:e.jsx("div",{className:"notificare__push__android__preview",children:(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return e.jsx(ur,{notification:n,expanded:"lockscreen-expanded"===i.displayMode});case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return e.jsx(cr,{notification:n});case"re.notifica.notification.WebView":return e.jsx(dr,{notification:n});case"re.notifica.notification.URL":return e.jsx(ri,{notification:n});case"re.notifica.notification.InAppBrowser":return e.jsx(Fn,{notification:n});case"re.notifica.notification.Image":return e.jsx(di,{notification:n});case"re.notifica.notification.Map":return e.jsx(ir,{notification:n,onError:r});case"re.notifica.notification.Rate":return e.jsx(ar,{notification:n});case"re.notifica.notification.Passbook":return e.jsx(ci,{notification:n});case"re.notifica.notification.Video":return e.jsx(pr,{notification:n});case"re.notifica.notification.Store":return e.jsx(si,{notification:n});case"re.notifica.notification.URLResolver":return e.jsx(oi,{notification:n,onError:r})}}})()})})}function fr(e,t){return"app-ui"===t&&"re.notifica.notification.Alert"===e?"dark":"light"}function hr(e,t){if("app-ui"===t)switch(e){case"re.notifica.notification.Alert":case"re.notifica.notification.WebView":case"re.notifica.notification.URL":case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.Rate":case"re.notifica.notification.Passbook":case"re.notifica.notification.Video":case"re.notifica.notification.Store":case"re.notifica.notification.URLResolver":return!0;default:return!1}return!0}Kt(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function mr(t){const{url:n}=t;return e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:e.jsx(Zt,{id:"preview.ios.inAppBrowser.appUi.done",defaultMessage:an["preview.ios.inAppBrowser.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[Tn(n)?e.jsx(Rn,{className:"notificare__push__ios__in-app-browser__app-ui__bar-lock-icon"}):e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:e.jsx(Zt,{id:"preview.ios.inAppBrowser.appUi.notSecure",defaultMessage:an["preview.ios.inAppBrowser.appUi.notSecure"]})}),e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:Mn(n)})]})]})}Kt(".notificare .notificare__push__ios__in-app-browser__app-ui__bar {\n display: flex;\n width: 100%;\n padding: 12px 0;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n margin-top: 10px;\n background-color: #fff;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-done-button {\n font-size: 14px;\n font-weight: 700;\n position: absolute;\n left: 0;\n margin-left: 15px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-lock-icon {\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-domain {\n display: flex;\n column-gap: 5px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-not-secure {\n color: #64706e;\n font-weight: 400;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-url {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}");function gr({notification:t}){const n=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[e.jsx(mr,{url:n}),e.jsx(Pn,{url:n,platform:"iOS",width:338,height:564})]})}Kt("");function vr({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__ios__app-ui__title-bar",children:[e.jsx("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:t}),n&&e.jsx(ti,{className:"notificare__push__ios__app-ui__title-bar-options-button","data-testid":"ios-app-ui-title-bar-options-button"})]})}Kt(".notificare .notificare__push__ios__app-ui__title-bar {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n background-color: #fff;\n margin-top: 10px;\n position: relative;\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-text {\n padding: 11px 25px;\n font-size: 14px;\n font-weight: 700;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n max-width: 255px;\n position: relative;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-options-button {\n width: 20px;\n margin-left: auto;\n margin-right: 12px;\n}");var br;function wr({notification:n}){const i=n.content[0].data,r=zn(),[a,o]=t.useState(""),{serviceKey:s}=Sn();return t.useEffect((function(){(()=>{l(this,void 0,void 0,(function*(){try{const e=yield Vn(s,i);o(e)}catch(e){console.error("Error fetching website markup:\n\n",e)}}))})()}),[]),e.jsxs("div",{"data-testid":"ios-app-ui-url-notification",children:[e.jsx(vr,{title:n.title||r.name,showOptions:Zn(n)&&!qn(a)}),e.jsx(Pn,{url:i,platform:"iOS",width:338,height:566})]})}function yr({notification:n,onError:i}){const r=Bt(),a=n.content[0].data,o=ai(a);switch(t.useEffect((function(){switch(o){case"invalid-url":i(r.formatMessage({id:"preview.error.urlResolverInvalidUrl",defaultMessage:an["preview.error.urlResolverInvalidUrl"]}));break;case"url-scheme":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithUrlSchemePreview",defaultMessage:an["preview.error.notSupportedUrlResolverWithUrlSchemePreview"]}));break;case"dynamic-link":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithDynamicLink",defaultMessage:an["preview.error.notSupportedUrlResolverWithDynamicLink"]}));break;case"relative-url":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithRelativeUrl",defaultMessage:an["preview.error.notSupportedUrlResolverWithRelativeUrl"]}))}}),[a]),o){case"invalid-url":case"url-scheme":case"dynamic-link":case"relative-url":return;case"web-view":return e.jsx(wr,{notification:n});case"in-app-browser":return e.jsx(gr,{notification:n})}}function xr(){return xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xr.apply(null,arguments)}Kt("");var kr,Er=function(e){return r.createElement("svg",xr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),br||(br=r.createElement("path",{d:"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8zm212.4 204.4 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0zm-152 198.2 152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0"})))};function jr(){return jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},jr.apply(null,arguments)}var Nr,Sr=function(e){return r.createElement("svg",jr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),kr||(kr=r.createElement("path",{d:"M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"})))};function Tr(e){const{contentList:n}=fn(e,500),i=Bt(),[r,a]=t.useState({status:"idle"});return t.useEffect((function(){(()=>{l(this,void 0,void 0,(function*(){const e=function(e){for(const t of e)if("re.notifica.content.AppStore"===t.type)return t.data.identifier;return null}(n);e?(a({status:"loading"}),function(e){return l(this,void 0,void 0,(function*(){const t=new URL("/lookup","https://itunes.apple.com");t.searchParams.set("country","NL"),t.searchParams.set("id",e);const n=(Date.now()/1e3).toString();t.searchParams.set("x",n);const i=yield fetch(t);if(!i.ok)throw new pn(i);return yield i.json()}))}(e).then((e=>{0!==e.resultCount?a({status:"success",data:e.results[0]}):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppNotFound",defaultMessage:an["preview.error.iosStoreAppNotFound"]}))})})).catch((e=>{console.error("Error getting App Store app:\n\n"+e),a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppLoadFailure",defaultMessage:an["preview.error.iosStoreAppLoadFailure"]}))})}))):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]}))})}))})()}),[n]),r}function Mr(e,t){var n;const i=new Intl.RelativeTimeFormat(t,{style:"long"}),r=new Date(e),a=new Date,o=Math.floor((a.getTime()-r.getTime())/1e3),s=[{value:60,unit:"second"},{value:3600,unit:"minute"},{value:86400,unit:"hour"},{value:604800,unit:"day"},{value:2592e3,unit:"week"},{value:31536e3,unit:"month"}];for(let e=0;e<s.length;e++){const{value:t,unit:r}=s[e];if(o<t){const t=Math.floor(o/((null===(n=s[e-1])||void 0===n?void 0:n.value)||1));return i.format(-t,r)}}const c=Math.floor(o/s[s.length-1].value);return i.format(-c,"year")}function Ar(){return Ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ar.apply(null,arguments)}var Cr,Pr,Lr=function(e){return r.createElement("svg",Ar({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Nr||(Nr=r.createElement("path",{d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Or.apply(null,arguments)}var Rr=function(e){return r.createElement("svg",Or({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Cr||(Cr=r.createElement("defs",null,r.createElement("linearGradient",{id:"half-star_svg__a"},r.createElement("stop",{offset:"50%"}),r.createElement("stop",{offset:"50%",stopColor:"#ccc"})))),Pr||(Pr=r.createElement("path",{fill:"url(#half-star_svg__a)",d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Ir(t){const{rating:n}=t,i=[];for(let t=1;t<=5;t++)t<=n?i.push(e.jsx(Lr,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):t-.5<=n?i.push(e.jsx(Rr,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):i.push(e.jsx(Lr,{className:"notificare__push__ios__store__app-ui__star-icon notificare__push__ios__store__app-ui__star-icon--empty"},t));return e.jsx("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}Kt(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon {\n width: 10px;\n height: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon--empty {\n fill: #EAEAEA;\n}");function Ur({notification:t}){const n=t.content,i=Bt(),r=Tr({contentList:n});return e.jsxs("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[e.jsx("div",{className:"notificare__push__ios__store__app-ui__bar",children:e.jsx(Zt,{id:"preview.ios.store.appUi.done",defaultMessage:an["preview.ios.store.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui",children:["loading"===r.status&&e.jsx(tn,{}),"error"===r.status&&e.jsx(sn,{message:r.error.message}),"success"===r.status&&e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[e.jsx("img",{src:r.data.artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:r.data.trackName}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:r.data.primaryGenreName})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-install",children:e.jsx(Zt,{id:"preview.ios.store.appUi.install",defaultMessage:an["preview.ios.store.appUi.install"]})})]})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.ratings",defaultMessage:an["preview.ios.store.appUi.ratings"],values:{userRatingCount:r.data.userRatingCount}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.averageUserRating.toFixed(1)}),e.jsx(Ir,{rating:r.data.averageUserRating})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.age",defaultMessage:an["preview.ios.store.appUi.age"]})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.trackContentRating}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:e.jsx(Zt,{id:"preview.ios.store.appUi.yearsOld",defaultMessage:an["preview.ios.store.appUi.yearsOld"]})})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.category",defaultMessage:an["preview.ios.store.appUi.category"]})}),e.jsx(Er,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.primaryGenreName})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.developer",defaultMessage:an["preview.ios.store.appUi.developer"]})}),e.jsx(Sr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.sellerName})]})]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.whatsNew",defaultMessage:an["preview.ios.store.appUi.whatsNew"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:e.jsx(Zt,{id:"preview.ios.store.appUi.historyVersion",defaultMessage:an["preview.ios.store.appUi.historyVersion"],values:{version:r.data.version}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:Mr(r.data.currentVersionReleaseDate,i.locale)})]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:r.data.releaseNotes})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:e.jsx(Zt,{id:"preview.ios.store.appUi.screenshots",defaultMessage:an["preview.ios.store.appUi.screenshots"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[e.jsx("img",{src:r.data.screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),e.jsx("img",{src:r.data.screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})]})]})}Kt("/* Top Bar */\n\n.notificare .notificare__push__ios__store__app-ui__bar {\n display: flex;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n font-size: 14px;\n font-weight: 700;\n padding: 11px 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: #fff;\n margin-top: 10px;\n}\n\n/* --- App Recommendation Content --- */\n\n.notificare .notificare__push__ios__store__app-ui {\n height: 566px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page {\n width: 100%;\n overflow: hidden;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__store__app-ui__page-header {\n width: 100%;\n padding: 15px;\n display: flex;\n column-gap: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__app-icon {\n width: 90px;\n height: 90px;\n border-radius: 15px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-info {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-name {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-category {\n font-size: 12px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-install {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 7px 12px;\n background: #3b82f6;\n color: #fff;\n border-radius: 15px;\n width: max-content;\n}\n\n/* Other info */\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info-wrapper {\n padding: 0 15px;\n width: calc(100% - 15px);\n overflow: hidden;\n position: relative;\n margin-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info {\n display: flex;\n width: 1000px;\n border-bottom: 1px solid #f2f4f6;\n border-top: 1px solid #f2f4f6;\n position: relative;\n box-sizing: border-box;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block {\n padding: 5px;\n width: 85px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-title {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-value {\n font-size: 30px;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-icon {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-bottom-text {\n font-size: 11px;\n text-align: center;\n}\n\n/* History */\n\n.notificare .notificare__push__ios__store__app-ui__page-history {\n margin: 0 15px;\n border-bottom: 1px solid #f2f4f6;\n padding-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version-last-update {\n display: flex;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version {\n font-size: 12px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-last-update {\n font-size: 11px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-notes {\n margin-top: 5px;\n font-size: 12px;\n max-height: 60px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n padding-right: 5px;\n word-break: break-word;\n}\n\n/* Previews */\n\n.notificare .notificare__push__ios__store__app-ui__page-previews {\n margin-top: 15px;\n padding: 0 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-images {\n display: flex;\n max-height: 400px;\n overflow: hidden;\n column-gap: 8px;\n margin-top: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-preview-image {\n border-radius: 15px;\n width: 150px;\n}");function Br({notification:t}){const n=zn();return e.jsxs("div",{"data-testid":"ios-app-ui-passbook-notification",children:[e.jsx(vr,{title:t.title||n.name,showOptions:Zn(t)}),e.jsx(Pn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}Kt("");function Hr({notification:t}){const n=zn();return e.jsxs("div",{"data-testid":"ios-app-ui-images-notification",children:[e.jsx(vr,{title:t.title||n.name,showOptions:Zn(t)}),e.jsx("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__ios__image__app-ui__slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__ios__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 566px;\n background-color: white;\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");function Fr({notification:n,onError:i}){const r=zn(),{googleMapsAPIKey:a}=Sn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a]),a)return e.jsxs("div",{"data-testid":"ios-app-ui-map-notification",children:[e.jsx(vr,{title:n.title||r.name,showOptions:Zn(n)}),e.jsx(tr,{notification:n,width:"100%",height:"566px"})]})}Kt("");function Dr({title:t}){const n=zn();return e.jsx("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e.jsxs("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[e.jsx("p",{className:"notificare__push__ios__rate__app-ui__header",children:t||n.name}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Zt,{id:"preview.ios.rate.appUi.rateNow",defaultMessage:an["preview.ios.rate.appUi.rateNow"]})}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Zt,{id:"preview.ios.rate.appUi.doNotRate",defaultMessage:an["preview.ios.rate.appUi.doNotRate"]})})]})})}Kt(".notificare .notificare__push__ios__rate__app-ui {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__ios__rate__app-ui__wrapper {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__rate__app-ui__header {\n padding: 20px;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n word-break: break-word;\n}\n\n/* Actions */\n\n.notificare .notificare__push__ios__rate__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-top: 1px solid #f2f4f6;\n font-size: 14px;\n font-weight: 700;\n}");function Gr({notification:t}){var n,i;const r=zn();return e.jsx("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[e.jsx("p",{className:"notificare__push__ios__alert__app-ui__title",children:t.title||r.name}),e.jsx("p",{className:"notificare__push__ios__alert__app-ui__message",children:t.message})]}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__actions",children:$n(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[e.jsx("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:e.jsx(Zt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--single","data-testid":"ios-app-ui-text-alert-notification-single-action",children:null===(n=t.actions)||void 0===n?void 0:n[0].label})]}):Wn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(i=t.actions)||void 0===i?void 0:i.map(((t,n)=>e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--multiple","data-testid":`ios-app-ui-text-alert-notification-action-${n}`,children:t.label},n))),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:e.jsx(Zt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})})]}):e.jsx("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:e.jsx(Zt,{id:"preview.ios.alert.appUi.ok",defaultMessage:an["preview.ios.alert.appUi.ok"]})})})]})})}Kt(".notificare .notificare__push__ios__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__background {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header - Title and Message */\n\n.notificare .notificare__push__ios__alert__app-ui__title-and-message {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__title {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__message {\n margin-top: 3px;\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n\n/* --- Actions --- */\n\n.notificare .notificare__push__ios__alert__app-ui__actions {\n font-size: 14px;\n font-weight: 700;\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Single Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-single {\n display: flex;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__single-cancel {\n padding: 10px 20px;\n border-right: 1px solid #f2f4f6;\n width: 50%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--single {\n width: 50%;\n}\n\n/* Multiple Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-multiple {\n display: flex;\n flex-direction: column;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__multiple-cancel {\n padding: 10px 20px;\n width: 100%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--multiple {\n width: 100%;\n border-bottom: 1px solid #f2f4f6;\n}\n\n/* No Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__no-actions {\n width: 100%;\n text-align: center;\n padding: 10px 20px;\n}");function zr({notification:t}){const n=t.content[0],i=zn();return e.jsxs("div",{"data-testid":"ios-app-ui-video-notification",children:[e.jsx(vr,{title:t.title||i.name,showOptions:Zn(t)}),e.jsx(lr,{videoData:n,width:"100%",height:"566px"})]})}Kt("");function Vr({notification:t}){const n=t.content[0].data,i=zn();return e.jsxs("div",{"data-testid":"ios-app-ui-web-view-notification",children:[e.jsx(vr,{title:t.title||i.name,showOptions:Zn(t)&&!qn(n)}),e.jsx("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:n,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n pointer-events: none;\n}");function Zr({notification:t,expanded:n}){var i,r;const a=zn();return e.jsxs("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__ios__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(sr,{className:"notificare__push__ios__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.title||a.name}),e.jsx("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:e.jsx(Zt,{id:"preview.ios.lockScreen.time",defaultMessage:an["preview.ios.lockScreen.time"]})})]}),t.subtitle&&e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.subtitle}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(Kn(t)&&!n?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:t.message}),Kn(t)&&!n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),Kn(t)&&n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}Kt(".notificare .notificare__push__ios__lock-screen {\n position: absolute;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n left: 50%;\n transform: translateX(-50%);\n bottom: 80px;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__main-content {\n width: 100%;\n display: flex;\n align-items: center;\n column-gap: 11px;\n padding: 10px;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__ios__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n width: 35px;\n height: 35px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__ios__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__ios__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 249px;\n}\n\n.notificare .notificare__push__ios__lock-screen__title-and-time {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n position: relative;\n width: 100%;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__lock-screen__text {\n font-size: 13px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--title-or-subtitle {\n font-weight: 700;\n width: 210px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--expanded-title-or-subtitle {\n font-weight: 700;\n width: 210px;\n white-space: wrap;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n text-align: right;\n flex-shrink: 0;\n max-width: 130px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-without-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 242px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-with-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 210px;\n}\n\n/* Media */\n\n.notificare .notificare__push__ios__lock-screen__message-and-media {\n display: flex;\n column-gap: 7px;\n}\n\n.notificare .notificare__push__ios__lock-screen__media-image {\n border-radius: 5px;\n object-fit: cover;\n width: 32px;\n height: 32px;\n align-self: flex-start;\n justify-self: flex-end;\n}\n\n.notificare .notificare__push__ios__lock-screen__expanded-media {\n object-fit: cover;\n width: 100%;\n max-height: 275px;\n overflow: hidden;\n display: block;\n}\n");var $r;function Wr({notification:n,previewState:i,onError:r}){const a=Bt();if(t.useEffect((function(){qr(n.type,i.displayMode)||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[i,n.type]),qr(n.type,i.displayMode))return e.jsx(Yt,{theme:Kr(n.type,i.displayMode),children:e.jsx("div",{className:"notificare__push__ios__preview",children:(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return e.jsx(Zr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode});case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return e.jsx(Gr,{notification:n});case"re.notifica.notification.WebView":return e.jsx(Vr,{notification:n});case"re.notifica.notification.URL":return e.jsx(wr,{notification:n});case"re.notifica.notification.InAppBrowser":return e.jsx(gr,{notification:n});case"re.notifica.notification.Image":return e.jsx(Hr,{notification:n});case"re.notifica.notification.Map":return e.jsx(Fr,{notification:n,onError:r});case"re.notifica.notification.Rate":return e.jsx(Dr,{title:n.title});case"re.notifica.notification.Passbook":return e.jsx(Br,{notification:n});case"re.notifica.notification.Video":return e.jsx(zr,{notification:n});case"re.notifica.notification.Store":return e.jsx(Ur,{notification:n});case"re.notifica.notification.URLResolver":return e.jsx(yr,{notification:n,onError:r})}}})()})})}function Kr(e,t){if("app-ui"===t)switch(e){case"re.notifica.notification.Alert":case"re.notifica.notification.WebView":case"re.notifica.notification.URL":case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Image":case"re.notifica.notification.Rate":case"re.notifica.notification.Passbook":case"re.notifica.notification.Video":case"re.notifica.notification.Store":case"re.notifica.notification.Map":case"re.notifica.notification.URLResolver":return"dark";default:return"light"}return"light"}function qr(e,t){if("app-ui"===t)switch(e){case"re.notifica.notification.Alert":case"re.notifica.notification.WebView":case"re.notifica.notification.URL":case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.Rate":case"re.notifica.notification.Passbook":case"re.notifica.notification.Video":case"re.notifica.notification.Store":case"re.notifica.notification.URLResolver":return!0;default:return!1}return!0}function Xr(){return Xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Xr.apply(null,arguments)}Kt(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");var Yr=function(e){return r.createElement("svg",Xr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em"},e),$r||($r=r.createElement("path",{d:"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"})))};function Jr({notification:t}){return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Pn,{url:t.content[0].data,platform:"Web",width:268,height:430})})}function Qr({notification:n,onError:i}){const r=Bt(),a=ai(n.content[0].data);switch(t.useEffect((function(){switch(a){case"invalid-url":i(r.formatMessage({id:"preview.error.urlResolverInvalidUrl",defaultMessage:an["preview.error.urlResolverInvalidUrl"]}));break;case"url-scheme":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithUrlSchemePreview",defaultMessage:an["preview.error.notSupportedUrlResolverWithUrlSchemePreview"]}));break;case"in-app-browser":i(r.formatMessage({id:"preview.error.urlResolverNoNotificareWebViewQueryParameter",defaultMessage:an["preview.error.urlResolverNoNotificareWebViewQueryParameter"]}));break;case"dynamic-link":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithDynamicLink",defaultMessage:an["preview.error.notSupportedUrlResolverWithDynamicLink"]}));break;case"relative-url":i(r.formatMessage({id:"preview.error.notSupportedUrlResolverWithRelativeUrl",defaultMessage:an["preview.error.notSupportedUrlResolverWithRelativeUrl"]}))}}),[a]),a){case"invalid-url":case"url-scheme":case"in-app-browser":case"dynamic-link":case"relative-url":return;case"web-view":return e.jsx(Jr,{notification:n})}}function ea({notification:t}){var n;return e.jsxs("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[Kn(t)&&e.jsx("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(n=t.attachments)||void 0===n?void 0:n[0].uri,alt:"Notification attachment"}),e.jsxs("div",{children:[e.jsx("p",{className:"notificare__web__phone__alert__app-ui__title",children:t.title}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:t.subtitle}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__message",children:t.message})]})]})}Kt(".notificare .notificare__web__phone__alert__app-ui__media {\n max-width: 100%;\n max-height: 250px;\n aspect-ratio: 16 / 9;\n margin-bottom: 10px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__message {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}");function ta({notification:t}){return e.jsx("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})}Kt(".notificare .notificare__web__phone__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scroll-behavior: smooth;\n scrollbar-width: thin; /* Firefox */\n scrollbar-color: #bbb transparent; /* Firefox */\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}\n\n/* For Chrome, Edge and Safari */\n.notificare .notificare__web__phone__image__app-ui__image-slider::-webkit-scrollbar {\n height: 4px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 10px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-track {\n background: transparent;\n}");function na({notification:t}){return e.jsx("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:t.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"})}Kt(".notificare .notificare__web__phone__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 360px;\n background-color: #fff;\n pointer-events: none;\n}");var ia;function ra({notification:n,onError:i}){const r=zn(),{googleMapsAPIKey:a}=Sn(),o=Bt();return t.useEffect((function(){a||"re.notifica.notification.Map"!==n.type||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[n.type,a]),e.jsx("div",{className:"notificare__web__phone__app-ui",children:e.jsxs("div",{className:"notificare__web__phone__app-ui__background",children:[e.jsxs("div",{className:"notificare__web__phone__app-ui__header",children:[e.jsx("div",{className:"notificare__web__phone__app-ui__app-icon",children:r.websitePushConfig.icon?e.jsx("img",{className:"notificare__web__phone__app-ui__app-icon-image",src:r.websitePushConfig.icon,alt:"App icon"}):e.jsx(sr,{className:"notificare__web__phone__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__web__phone__app-ui__app-name",children:r.name}),e.jsx("button",{className:"notificare__web__phone__app-ui__close-button",children:e.jsx(Yr,{className:"notificare__web__phone__app-ui__close-button-icon"})})]}),(()=>{switch(n.type){case"re.notifica.notification.Alert":return e.jsx(ea,{notification:n});case"re.notifica.notification.WebView":return e.jsx(na,{notification:n});case"re.notifica.notification.URL":return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Pn,{url:n.content[0].data,platform:"Web",width:268,height:430})});case"re.notifica.notification.Image":return e.jsx(ta,{notification:n});case"re.notifica.notification.Map":return e.jsx(tr,{notification:n,width:"100%",height:"400px"});case"re.notifica.notification.Video":return e.jsx("div",{"data-testid":"web-mobile-app-ui-video-notification",children:e.jsx(lr,{videoData:n.content[0],width:"100%",height:"430px"})});case"re.notifica.notification.URLResolver":return e.jsx(Qr,{notification:n,onError:i})}})(),n.actions&&e.jsx("div",{className:""+(n.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row"),children:n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__web__phone__app-ui__action "+(0===n?"notificare__web__phone__app-ui__action--primary":"notificare__web__phone__app-ui__action--secondary"),"data-testid":`web-mobile-app-ui-action-${n}`,children:t.label},n)))})]})})}function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},aa.apply(null,arguments)}Kt("/* MAIN */\n\n.notificare .notificare__web__phone__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__web__phone__app-ui__background {\n width: 300px;\n background-color: white;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n/* Header */\n\n.notificare .notificare__web__phone__app-ui__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n column-gap: 16px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__app-name {\n font-size: 18px;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n border-radius: 4px;\n padding: 0;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button:hover {\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button-icon {\n width: 24px;\n height: 24px;\n}\n\n/* Actions */\n\n.notificare .notificare__web__phone__app-ui__actions-row {\n display: flex;\n flex-wrap: wrap;\n column-gap: 8px;\n row-gap: 8px;\n flex-direction: row-reverse;\n}\n\n.notificare .notificare__web__phone__app-ui__actions-column {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n align-items: stretch;\n}\n\n.notificare .notificare__web__phone__app-ui__action {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n padding: 8px 16px;\n text-overflow: ellipsis;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n white-space: nowrap;\n border-radius: 4px;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__web__phone__app-ui__action--full-width {\n width: 100%\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary {\n background-color: #2b42f7;\n color: #ffffffde;\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary {\n background-color: transparent;\n color: #2b42f7;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary:hover {\n background-color: #f4f5f9;\n}\n");var oa=function(e){return r.createElement("svg",aa({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"},e),ia||(ia=r.createElement("defs",null,r.createElement("linearGradient",{id:"google-chrome_svg__a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#d93025"}),r.createElement("stop",{offset:1,stopColor:"#ea4335"})),r.createElement("linearGradient",{id:"google-chrome_svg__b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#fcc934"}),r.createElement("stop",{offset:1,stopColor:"#fbbc04"})),r.createElement("linearGradient",{id:"google-chrome_svg__c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#1e8e3e"}),r.createElement("stop",{offset:1,stopColor:"#34a853"})))),r.createElement("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),r.createElement("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36m31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18",style:{fill:"none"}}),r.createElement("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12",style:{fill:"url(#google-chrome_svg__a)"}}),r.createElement("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),r.createElement("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99",style:{fill:"url(#google-chrome_svg__b)"}}),r.createElement("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007",style:{fill:"url(#google-chrome_svg__c)"}}))};function sa(t){const{open:n,disabled:i,onToggle:r}=t;return e.jsx("button",{disabled:i,className:"notificare__push__web__desktop__lock-screen__expand-button "+(n?"notificare__push__web__desktop__lock-screen__expand-button--rotated":""),onClick:r,"data-testid":"web-desktop-expand-button",children:e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__expand-button-svg"})})}Kt(".notificare .notificare__push__web__desktop__lock-screen__expand-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.3s ease;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button--rotated {\n transform: rotate(90deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-svg {\n width: 11px;\n height: 11px;\n fill: #9e9e9e;\n}");Kt("/* Preview Wrapper */\n\n.notificare .notificare__push__web__desktop__lock-screen {\n position: relative;\n background-color: #f4f4f4;\n width: 340px;\n border-radius: 15px;\n border: 1px solid #e4e4e4;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);\n transition: height 0.3s ease-in-out;\n align-self: start;\n}\n\n/* Expand Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n animation: fadeIn 0.5s ease-out forwards;\n}\n\n/* --- MAIN CONTENT --- */\n\n.notificare .notificare__push__web__desktop__lock-screen__main-content {\n width: 100%;\n display: flex;\n flex-direction: row;\n column-gap: 10px;\n padding: 14px;\n}\n\n/* Browser Icon */\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-background {\n background-color: #ffffff;\n border-radius: 10px;\n padding: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-svg {\n width: 30px;\n height: auto;\n}\n\n/* Text */\n\n.notificare .notificare__push__web__desktop__lock-screen__text-content {\n width: 219px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text {\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--title {\n font-weight: 700;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--domain {\n font-weight: 700;\n margin-top: 2px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--message {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n margin-top: 2px;\n -webkit-line-clamp: 3;\n line-height: 1.2;\n transition: height 0.3s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--expandable-message {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n margin-top: 2px;\n line-height: 1.2;\n transition: height 0.3s ease-in-out;\n}\n\n/* Small Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n width: 38px;\n height: 38px;\n border-radius: 25%;\n object-fit: cover;\n animation: fadeIn 0.5s ease-out forwards;\n right: 14px;\n bottom: 10px;\n}\n\n/* Expanded Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-media {\n width: 100%;\n display: block;\n}\n\n/* Time */\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container {\n position: absolute;\n top: 8px;\n right: 14px;\n animation: fadeIn 0.5s ease-out forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time {\n font-size: 12px;\n color: #64706e;\n}\n\n/* SETTINGS */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container {\n position: absolute;\n bottom: 10px;\n right: 14px;\n z-index: 10;\n}\n\n/* Settings Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button {\n min-width: 70px;\n display: flex;\n background-color: #d6d6d6;\n border-radius: 7px;\n border: 0;\n padding: 5px 10px 5px;\n font-size: 13px;\n justify-content: center;\n box-shadow: -5px -7px 10px 10px rgba(242, 244, 246, 1);\n animation: fadeIn 0.5s ease-out forwards;\n position: relative;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-expand-icon {\n width: 9px;\n margin-left: 4px;\n color: #000000;\n}\n\n/* Settings Selector */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector {\n background-color: #eaeaea;\n border-radius: 7px;\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);\n padding: 4px;\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 32px;\n width: max-content;\n right: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option {\n min-width: 70px;\n background-color: transparent;\n border-radius: 7px;\n font-size: 13px;\n border: 0;\n padding: 5px 10px;\n flex: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option:hover {\n background-color: #3b82f6;\n color: #fff;\n}\n\n/* Expanded Options - Actions & Settings */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content {\n padding: 0 14px 14px;\n width: 100%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n width: 102%;\n margin-left: -1%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button {\n font-size: 14px;\n border-radius: 7px;\n width: 100%;\n border: 0;\n padding: 8px;\n background-color: transparent;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button:hover {\n background-color: #efefef;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent {\n border-top: 1px solid transparent;\n}\n\n\n\n/* keyframes */\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n\n\n\n");function ca({notification:n}){var i,r,a;const[o,s]=t.useState(!1),[c,l]=t.useState(!1),[p,d]=t.useState(-1),[u,_]=t.useState(!1),[f,h]=t.useState(!1),[m,g]=t.useState(!1),[v,b]=t.useState(!1),[w,y]=t.useState(""),x=t.useRef(null),k=t.useRef(null),E=zn();return t.useEffect((function(){if(x.current&&k.current){const e=k.current.scrollHeight;_(e>3*16.7);const t=`${x.current.scrollHeight}px`;x.current.style.height=t,y(t)}}),[]),t.useEffect((function(){Kn(n)&&_(!0)}),[]),e.jsxs("div",{ref:x,className:"notificare__push__web__desktop__lock-screen",onMouseEnter:()=>l((()=>!0)),onMouseLeave:()=>l((()=>f)),"data-testid":"web-desktop-notification",children:[(u&&c||o||m)&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container",children:e.jsx(sa,{open:o,disabled:m||v,onToggle:function(){const e=x.current,t=k.current;e&&t&&(o?(e.style.backgroundColor="#f4f4f4",e.style.height=w,g(!0),s(!1),setTimeout((()=>{g(!1),e.style.overflow=""}),300)):(e.style.backgroundColor="#fff",e.style.overflow="hidden",b(!0),s(!0),setTimeout((()=>{e.style.height=`${e.scrollHeight}px`}),10),setTimeout((()=>{b(!1)}),300)),h(!1))}})}),!c&&!o&&!m&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__time-container",children:e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__time",children:e.jsx(Zt,{id:"preview.web.desktop.macos.lockScreen.time",defaultMessage:an["preview.web.desktop.macos.lockScreen.time"]})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:e.jsx(oa,{className:"notificare__push__web__desktop__lock-screen__browser-icon-svg","aria-label":"Google Chrome icon"})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:n.title||E.name}),e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:E.websitePushConfig.allowedDomains.length>0?la(E.websitePushConfig.allowedDomains[0]):"example.com"}),e.jsx("p",{ref:k,className:"notificare__push__web__desktop__lock-screen__text "+(o||m?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--message"),children:n.message})]}),Kn(n)&&!o&&!m&&!c&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__small-media",src:null===(i=n.attachments)||void 0===i?void 0:i[0].uri,alt:"Small media icon"}),c&&!o&&!m&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__settings-button-container",children:n.actions&&n.actions.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>h((e=>!e)),"data-testid":"web-desktop-settings-button",children:[e.jsx(Zt,{id:"preview.web.desktop.macos.lockScreen.options",defaultMessage:an["preview.web.desktop.macos.lockScreen.options"]}),e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__settings-button-expand-icon"})]}),f&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option","data-testid":`web-desktop-options-action-${n}`,children:t.label},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",children:e.jsx(Zt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]})]}):e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",children:e.jsx(Zt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})})]}),(o||m)&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content",children:[Kn(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(r=n.attachments)||void 0===r?void 0:r[0].uri,alt:"Expanded media"}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(a=n.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>d(n),onMouseLeave:()=>d(-1),"data-testid":`web-desktop-expanded-action-${n}`,children:t.label}),e.jsx("hr",{className:`notificare__push__web__desktop__lock-screen__expanded-buttons-divisor ${(p===n||p-1===n)&&"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent"}`})]},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e;return d((null===(e=n.actions)||void 0===e?void 0:e.length)||-1)},onMouseLeave:()=>d(-1),children:e.jsx(Zt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]})]})}function la(e){try{return new URL(e).hostname}catch(e){return""}}function pa({notification:n,previewState:i,onError:r}){const a=Bt();switch(t.useEffect((function(){if("phone"===i.formFactor)switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":r(a.formatMessage({id:"preview.error.notSupportedPreviewVariant",defaultMessage:an["preview.error.notSupportedPreviewVariant"]}));break;case"app-ui":switch(n.type){case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Rate":case"re.notifica.notification.Store":case"re.notifica.notification.Passbook":case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}}}),[i,n.type]),i.formFactor){case"phone":if("app-ui"===i.displayMode)switch(n.type){case"re.notifica.notification.Alert":case"re.notifica.notification.WebView":case"re.notifica.notification.URL":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.Video":case"re.notifica.notification.URLResolver":switch(i.os){case"android":return e.jsx(qt,{theme:da(n.type),children:e.jsx(ra,{notification:n,onError:r})});case"ios":return e.jsx(Yt,{theme:da(n.type),children:e.jsx(ra,{notification:n,onError:r})})}}break;case"desktop":if("macos"===i.os)return e.jsx(ca,{notification:n},n.message)}}function da(e){switch(e){case"re.notifica.notification.Alert":case"re.notifica.notification.Map":case"re.notifica.notification.WebView":case"re.notifica.notification.URL":case"re.notifica.notification.Video":case"re.notifica.notification.Image":case"re.notifica.notification.URLResolver":return"dark";default:return"light"}}function ua({notification:n,previewState:i}){const[r,a]=t.useState(null),[o,s]=t.useState(i);if(o!==i&&(a(null),s(i)),r)return e.jsx(En,{message:r,showConsoleWarning:!1});switch(i.platform){case"android":return e.jsx(_r,{notification:n,previewState:i,onError:a});case"ios":return e.jsx(Wr,{notification:n,previewState:i,onError:a});case"web":return e.jsx(pa,{notification:n,previewState:i,onError:a})}}var _a;function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fa.apply(null,arguments)}var ha,ma=function(e){return r.createElement("svg",fa({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),_a||(_a=r.createElement("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1-24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1-24 24m273.7-144.5 47.9-83a10 10 0 1 0-17.3-10l-48.5 84.1a301.3 301.3 0 0 0-246.6 0l-48.5-84a10 10 0 1 0-17.3 10l47.9 83C64.5 202.2 8.2 285.6 0 384h576c-8.2-98.5-64.5-181.8-146.9-226.6"})))};function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ga.apply(null,arguments)}var va;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ba.apply(null,arguments)}var wa;function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ya.apply(null,arguments)}var xa,ka=function(e){return r.createElement("svg",ya({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),wa||(wa=r.createElement("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"})))};function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ea.apply(null,arguments)}function ja({previewState:t,onPreviewStateChanged:n}){const i=Bt();return e.jsxs("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e.jsxs("div",{className:"notificare__push__preview-controls-toggle-groups",children:[e.jsx(kn,{label:i.formatMessage({id:"controls.platform",defaultMessage:an["controls.platform"]}),options:Na,value:t.platform,onValueChanged:function(e){if(t.platform!==e)switch(e){case"android":case"ios":n(Object.assign(Object.assign({},t),{platform:e}));break;case"web":n(Object.assign(Object.assign({},t),{platform:"web",formFactor:"desktop",os:"macos",displayMode:"lockscreen"}))}}}),"web"===t.platform&&e.jsx(kn,{label:i.formatMessage({id:"controls.formFactor",defaultMessage:an["controls.formFactor"]}),options:Sa,value:t.formFactor,onValueChanged:function(e){if("web"===t.platform&&t.formFactor!==e)switch(e){case"desktop":n(Object.assign(Object.assign({},t),{formFactor:e,os:"macos",displayMode:"lockscreen"}));break;case"phone":n(Object.assign(Object.assign({},t),{formFactor:e,os:"android",displayMode:"app-ui"}))}}}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(kn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ta,value:t.os,onValueChanged:function(e){"web"===t.platform&&"phone"===t.formFactor&&t.os!==e&&n(Object.assign(Object.assign({},t),{os:e}))}})]}),("android"===t.platform||"ios"===t.platform)&&e.jsx(xn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:t.displayMode,onValueChanged:function(e){t.displayMode!==e&&n(Object.assign(Object.assign({},t),{displayMode:e}))}}),"web"===t.platform&&"desktop"===t.formFactor&&e.jsx(xn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ma,value:t.os,disabled:!0}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(xn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:"app-ui",disabled:!0})]})}Kt(".notificare .notificare__push__preview-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 350px;\n row-gap: 14px;\n}\n\n.notificare .notificare__push__preview-controls-preview {\n margin-top: 14px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-groups {\n display: flex;\n align-items: center;\n column-gap: 30px;\n align-self: start;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divider {\n width: 20px;\n height: 20px;\n animation: fadeIn 0.3s ease-out;\n}\n\n/* Icons */\n\n.notificare .notificare__push__preview-controls-android-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-ios-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-html5-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-desktop-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-phone-icon {\n width: 24px;\n height: auto;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}");const Na=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"platforms-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"platform-ios-icon")},{value:"web",icon:e.jsx((function(e){return r.createElement("svg",ba({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),va||(va=r.createElement("path",{d:"m0 32 34.9 395.8L191.5 480l157.6-52.2L384 32zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1z"})))}),{className:"notificare__push__preview-controls-html5-icon"},"platform-html5-icon")}],Sa=[{value:"desktop",icon:e.jsx((function(e){return r.createElement("svg",ga({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),ha||(ha=r.createElement("path",{d:"M64 0C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h176l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32h256c17.7 0 32-14.3 32-32s-14.3-32-32-32h-69.3L336 416h176c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm448 64v288H64V64z"})))}),{className:"notificare__push__preview-controls-desktop-icon"},"form-factor-desktop-icon")},{value:"phone",icon:e.jsx((function(e){return r.createElement("svg",Ea({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),xa||(xa=r.createElement("path",{d:"M16 64C16 28.7 44.7 0 80 0h224c35.3 0 64 28.7 64 64v384c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64zm208 384a32 32 0 1 0-64 0 32 32 0 1 0 64 0m80-384H80v320h224z"})))}),{className:"notificare__push__preview-controls-phone-icon"},"form-factor-phone-icon")}],Ta=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"device-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"device-iphone-icon")}],Ma=[{value:"macos",labelId:"controls.operatingSystem.macos",defaultLabel:an["controls.operatingSystem.macos"]}],Aa=[{value:"lockscreen",labelId:"controls.displayMode.lockScreen",defaultLabel:an["controls.displayMode.lockScreen"]},{value:"lockscreen-expanded",labelId:"controls.displayMode.expandedLockScreen",defaultLabel:an["controls.displayMode.expandedLockScreen"]},{value:"app-ui",labelId:"controls.displayMode.appUi",defaultLabel:an["controls.displayMode.appUi"]}];Kt("@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');\n\n.notificare {\n font-family: proxima-nova, Helvetica, Arial, sans-serif;\n color: #232c2a;\n}\n\n.notificare * {\n border: 0;\n margin: 0;\n box-sizing: border-box;\n}");Kt(".notificare .notificare__push__preview-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: max-content;\n}\n\n.notificare .notificare__push__preview {\n margin-top: 20px;\n}\n\n/* Disable label selection in every preview */\n.notificare .notificare__push__preview p,\n.notificare .notificare__push__preview span,\n.notificare .notificare__push__preview div,\n.notificare .notificare__push__preview h1,\n.notificare .notificare__push__preview h2,\n.notificare .notificare__push__preview h3,\n.notificare .notificare__push__preview h4,\n.notificare .notificare__push__preview h5,\n.notificare .notificare__push__preview h6 {\n user-select: none;\n}");const Ca={"android-lockscreen":{platform:"android",displayMode:"lockscreen"},"android-lockscreen-expanded":{platform:"android",displayMode:"lockscreen-expanded"},"android-app-ui":{platform:"android",displayMode:"app-ui"},"ios-lockscreen":{platform:"ios",displayMode:"lockscreen"},"ios-lockscreen-expanded":{platform:"ios",displayMode:"lockscreen-expanded"},"ios-app-ui":{platform:"ios",displayMode:"app-ui"},"web-desktop-macos":{platform:"web",displayMode:"lockscreen",formFactor:"desktop",os:"macos"},"web-android-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"android"},"web-iphone-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"ios"}};function Pa({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen"}){const[o,s]=t.useState(Ca[a]),{serviceKey:c}=Sn(),l=_n({id:i,serviceKey:c});return e.jsxs("div",{className:"notificare__push__preview-wrapper",children:[r&&e.jsx(ja,{previewState:o,onPreviewStateChanged:s}),(()=>{switch(l.status){case"idle":case"loading":return e.jsx(tn,{});case"success":return e.jsx(Gn,{application:l.data,children:e.jsx("div",{className:"notificare__push__preview",children:e.jsx(ua,{notification:n,previewState:o})})})}})()]})}var La,Oa;!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(La||(La={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Oa||(Oa={}));const Ra=La.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ia=e=>{switch(typeof e){case"undefined":return Ra.undefined;case"string":return Ra.string;case"number":return Number.isNaN(e)?Ra.nan:Ra.number;case"boolean":return Ra.boolean;case"function":return Ra.function;case"bigint":return Ra.bigint;case"symbol":return Ra.symbol;case"object":return Array.isArray(e)?Ra.array:null===e?Ra.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Ra.promise:"undefined"!=typeof Map&&e instanceof Map?Ra.map:"undefined"!=typeof Set&&e instanceof Set?Ra.set:"undefined"!=typeof Date&&e instanceof Date?Ra.date:Ra.object;default:return Ra.unknown}},Ua=La.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ba extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof Ba))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,La.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ba.create=e=>new Ba(e);const Ha=(e,t)=>{let n;switch(e.code){case Ua.invalid_type:n=e.received===Ra.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ua.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,La.jsonStringifyReplacer)}`;break;case Ua.unrecognized_keys:n=`Unrecognized key(s) in object: ${La.joinValues(e.keys,", ")}`;break;case Ua.invalid_union:n="Invalid input";break;case Ua.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${La.joinValues(e.options)}`;break;case Ua.invalid_enum_value:n=`Invalid enum value. Expected ${La.joinValues(e.options)}, received '${e.received}'`;break;case Ua.invalid_arguments:n="Invalid function arguments";break;case Ua.invalid_return_type:n="Invalid function return type";break;case Ua.invalid_date:n="Invalid date";break;case Ua.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:La.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ua.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ua.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ua.custom:n="Invalid input";break;case Ua.invalid_intersection_types:n="Intersection results could not be merged";break;case Ua.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ua.not_finite:n="Number must be finite";break;default:n=t.defaultError,La.assertNever(e)}return{message:n}};let Fa=Ha;function Da(e,t){const n=Fa,i=(e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ha?void 0:Ha].filter((e=>!!e))});e.common.issues.push(i)}class Ga{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return za;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return Ga.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:r}=i;if("aborted"===t.status)return za;if("aborted"===r.status)return za;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!i.alwaysSet||(n[t.value]=r.value)}return{status:e.value,value:n}}}const za=Object.freeze({status:"aborted"}),Va=e=>({status:"dirty",value:e}),Za=e=>({status:"valid",value:e}),$a=e=>"aborted"===e.status,Wa=e=>"dirty"===e.status,Ka=e=>"valid"===e.status,qa=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Xa;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(Xa||(Xa={}));var Ya,Ja,Qa=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},eo=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class to{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const no=(e,t)=>{if(Ka(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ba(e.common.issues);return this._error=t,this._error}}};function io(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class ro{get description(){return this._def.description}_getType(e){return Ia(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Ia(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ga,ctx:{common:e.parent.common,data:e.data,parsedType:Ia(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ia(e)},i=this._parseSync({data:e,path:n.path,parent:n});return no(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ia(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Ka(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>Ka(e)?{value:e.value}:{issues:t.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ia(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(qa(i)?i:Promise.resolve(i));return no(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const r=e(t),a=()=>i.addIssue({code:Ua.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(a(),!1))):!!r||(a(),!1)}))}refinement(e,t){return this._refinement(((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1)))}_refinement(e){return new is({schema:this,typeName:us.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return rs.create(this,this._def)}nullable(){return as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fo.create(this)}promise(){return ns.create(this,this._def)}or(e){return zo.create([this,e],this._def)}and(e){return Wo.create(this,e,this._def)}transform(e){return new is({...io(this._def),schema:this,typeName:us.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new os({...io(this._def),innerType:this,defaultValue:t,typeName:us.ZodDefault})}brand(){return new ls({typeName:us.ZodBranded,type:this,...io(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ss({...io(this._def),innerType:this,catchValue:t,typeName:us.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return ds.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ao=/^c[^\s-]{8,}$/i,oo=/^[0-9a-z]+$/,so=/^[0-9A-HJKMNP-TV-Z]{26}$/i,co=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lo=/^[a-z0-9_-]{21}$/i,po=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uo=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_o=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let fo;const ho=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,go=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yo="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xo=new RegExp(`^${yo}$`);function ko(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Eo(e){let t=`${yo}T${ko(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function jo(e,t){if(!po.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function No(e,t){return!("v4"!==t&&t||!mo.test(e))||!("v6"!==t&&t||!vo.test(e))}class So extends ro{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Ra.string){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.string,received:t.parsedType}),za}const t=new Ga;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(n=this._getOrReturnCtx(e,n),i?Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)_o.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"email",code:Ua.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)fo||(fo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"emoji",code:Ua.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)co.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"uuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("nanoid"===a.kind)lo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"nanoid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)ao.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)oo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid2",code:Ua.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)so.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ulid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Da(n,{validation:"url",code:Ua.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"regex",code:Ua.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){Eo(a).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else if("date"===a.kind){xo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"date",message:a.message}),t.dirty())}else if("time"===a.kind){new RegExp(`^${ko(a)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"time",message:a.message}),t.dirty())}else"duration"===a.kind?uo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"duration",code:Ua.invalid_string,message:a.message}),t.dirty()):"ip"===a.kind?(i=e.data,("v4"!==(r=a.version)&&r||!ho.test(i))&&("v6"!==r&&r||!go.test(i))&&(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ip",code:Ua.invalid_string,message:a.message}),t.dirty())):"jwt"===a.kind?jo(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"jwt",code:Ua.invalid_string,message:a.message}),t.dirty()):"cidr"===a.kind?No(e.data,a.version)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cidr",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64"===a.kind?bo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64url"===a.kind?wo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64url",code:Ua.invalid_string,message:a.message}),t.dirty()):La.assertNever(a);var i,r;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:Ua.invalid_string,...Xa.errToObj(n)})}_addCheck(e){return new So({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xa.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xa.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xa.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xa.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xa.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xa.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xa.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xa.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xa.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xa.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xa.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xa.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xa.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xa.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...Xa.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xa.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Xa.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...Xa.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Xa.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Xa.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Xa.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Xa.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Xa.errToObj(t)})}nonempty(e){return this.min(1,Xa.errToObj(e))}trim(){return new So({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function To(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}So.create=e=>new So({checks:[],typeName:us.ZodString,coerce:e?.coerce??!1,...io(e)});class Mo extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Ra.number){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.number,received:t.parsedType}),za}let t;const n=new Ga;for(const i of this._def.checks)if("int"===i.kind)La.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==To(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_finite,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new Mo({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new Mo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xa.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Xa.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xa.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xa.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&La.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Mo.create=e=>new Mo({checks:[],typeName:us.ZodNumber,coerce:e?.coerce||!1,...io(e)});class Ao extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ra.bigint)return this._getInvalidInput(e);let t;const n=new Ga;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.bigint,received:t.parsedType}),za}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new Ao({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new Ao({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Ao.create=e=>new Ao({checks:[],typeName:us.ZodBigInt,coerce:e?.coerce??!1,...io(e)});class Co extends ro{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Ra.boolean){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.boolean,received:t.parsedType}),za}return Za(e.data)}}Co.create=e=>new Co({typeName:us.ZodBoolean,coerce:e?.coerce||!1,...io(e)});class Po extends ro{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Ra.date){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.date,received:t.parsedType}),za}if(Number.isNaN(e.data.getTime())){return Da(this._getOrReturnCtx(e),{code:Ua.invalid_date}),za}const t=new Ga;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):La.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Po({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Xa.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Xa.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Po.create=e=>new Po({checks:[],coerce:e?.coerce||!1,typeName:us.ZodDate,...io(e)});class Lo extends ro{_parse(e){if(this._getType(e)!==Ra.symbol){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.symbol,received:t.parsedType}),za}return Za(e.data)}}Lo.create=e=>new Lo({typeName:us.ZodSymbol,...io(e)});class Oo extends ro{_parse(e){if(this._getType(e)!==Ra.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.undefined,received:t.parsedType}),za}return Za(e.data)}}Oo.create=e=>new Oo({typeName:us.ZodUndefined,...io(e)});class Ro extends ro{_parse(e){if(this._getType(e)!==Ra.null){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.null,received:t.parsedType}),za}return Za(e.data)}}Ro.create=e=>new Ro({typeName:us.ZodNull,...io(e)});class Io extends ro{constructor(){super(...arguments),this._any=!0}_parse(e){return Za(e.data)}}Io.create=e=>new Io({typeName:us.ZodAny,...io(e)});class Uo extends ro{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Za(e.data)}}Uo.create=e=>new Uo({typeName:us.ZodUnknown,...io(e)});class Bo extends ro{_parse(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.never,received:t.parsedType}),za}}Bo.create=e=>new Bo({typeName:us.ZodNever,...io(e)});class Ho extends ro{_parse(e){if(this._getType(e)!==Ra.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.void,received:t.parsedType}),za}return Za(e.data)}}Ho.create=e=>new Ho({typeName:us.ZodVoid,...io(e)});class Fo extends ro{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ra.array)return Da(t,{code:Ua.invalid_type,expected:Ra.array,received:t.parsedType}),za;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(Da(t,{code:e?Ua.too_big:Ua.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(Da(t,{code:Ua.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(Da(t,{code:Ua.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new to(t,e,t.path,n))))).then((e=>Ga.mergeArray(n,e)));const r=[...t.data].map(((e,n)=>i.type._parseSync(new to(t,e,t.path,n))));return Ga.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new Fo({...this._def,minLength:{value:e,message:Xa.toString(t)}})}max(e,t){return new Fo({...this._def,maxLength:{value:e,message:Xa.toString(t)}})}length(e,t){return new Fo({...this._def,exactLength:{value:e,message:Xa.toString(t)}})}nonempty(e){return this.min(1,e)}}function Do(e){if(e instanceof Go){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=rs.create(Do(i))}return new Go({...e._def,shape:()=>t})}return e instanceof Fo?new Fo({...e._def,type:Do(e.element)}):e instanceof rs?rs.create(Do(e.unwrap())):e instanceof as?as.create(Do(e.unwrap())):e instanceof Ko?Ko.create(e.items.map((e=>Do(e)))):e}Fo.create=(e,t)=>new Fo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:us.ZodArray,...io(t)});class Go extends ro{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=La.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ra.object){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.object,received:t.parsedType}),za}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),a=[];if(!(this._def.catchall instanceof Bo&&"strip"===this._def.unknownKeys))for(const e in n.data)r.includes(e)||a.push(e);const o=[];for(const e of r){const t=i[e],r=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new to(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Bo){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(Da(n,{code:Ua.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const i=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new to(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>Ga.mergeObjectSync(t,e))):Ga.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return Xa.errToObj,new Go({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const i=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:Xa.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Go({...this._def,unknownKeys:"strip"})}passthrough(){return new Go({...this._def,unknownKeys:"passthrough"})}extend(e){return new Go({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Go({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:us.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Go({...this._def,catchall:e})}pick(e){const t={};for(const n of La.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new Go({...this._def,shape:()=>t})}omit(e){const t={};for(const n of La.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new Go({...this._def,shape:()=>t})}deepPartial(){return Do(this)}partial(e){const t={};for(const n of La.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new Go({...this._def,shape:()=>t})}required(e){const t={};for(const n of La.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof rs;)e=e._def.innerType;t[n]=e}return new Go({...this._def,shape:()=>t})}keyof(){return Qo(La.objectKeys(this.shape))}}Go.create=(e,t)=>new Go({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:us.ZodObject,...io(t)}),Go.strictCreate=(e,t)=>new Go({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:us.ZodObject,...io(t)}),Go.lazycreate=(e,t)=>new Go({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:us.ZodObject,...io(t)});class zo extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Ba(e.ctx.common.issues)));return Da(t,{code:Ua.invalid_union,unionErrors:n}),za}));{let e;const i=[];for(const r of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=r._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=i.map((e=>new Ba(e)));return Da(t,{code:Ua.invalid_union,unionErrors:r}),za}}get options(){return this._def.options}}zo.create=(e,t)=>new zo({options:e,typeName:us.ZodUnion,...io(t)});const Vo=e=>e instanceof Yo?Vo(e.schema):e instanceof is?Vo(e.innerType()):e instanceof Jo?[e.value]:e instanceof es?e.options:e instanceof ts?La.objectValues(e.enum):e instanceof os?Vo(e._def.innerType):e instanceof Oo?[void 0]:e instanceof Ro?[null]:e instanceof rs?[void 0,...Vo(e.unwrap())]:e instanceof as?[null,...Vo(e.unwrap())]:e instanceof ls||e instanceof ds?Vo(e.unwrap()):e instanceof ss?Vo(e._def.innerType):[];class Zo extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ra.object)return Da(t,{code:Ua.invalid_type,expected:Ra.object,received:t.parsedType}),za;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(Da(t,{code:Ua.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),za)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const n of t){const t=Vo(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(i.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);i.set(r,n)}}return new Zo({typeName:us.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...io(n)})}}function $o(e,t){const n=Ia(e),i=Ia(t);if(e===t)return{valid:!0,data:e};if(n===Ra.object&&i===Ra.object){const n=La.objectKeys(t),i=La.objectKeys(e).filter((e=>-1!==n.indexOf(e))),r={...e,...t};for(const n of i){const i=$o(e[n],t[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===Ra.array&&i===Ra.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=$o(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===Ra.date&&i===Ra.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Wo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if($a(e)||$a(i))return za;const r=$o(e.value,i.value);return r.valid?((Wa(e)||Wa(i))&&t.dirty(),{status:t.value,value:r.data}):(Da(n,{code:Ua.invalid_intersection_types}),za)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Wo.create=(e,t,n)=>new Wo({left:e,right:t,typeName:us.ZodIntersection,...io(n)});class Ko extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ra.array)return Da(n,{code:Ua.invalid_type,expected:Ra.array,received:n.parsedType}),za;if(n.data.length<this._def.items.length)return Da(n,{code:Ua.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),za;!this._def.rest&&n.data.length>this._def.items.length&&(Da(n,{code:Ua.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new to(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>Ga.mergeArray(t,e))):Ga.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:e,typeName:us.ZodTuple,rest:null,...io(t)})};class qo extends ro{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ra.map)return Da(n,{code:Ua.invalid_type,expected:Ra.map,received:n.parsedType}),za;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:i._parse(new to(n,e,n.path,[a,"key"])),value:r._parse(new to(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return za;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return za;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}}}qo.create=(e,t,n)=>new qo({valueType:t,keyType:e,typeName:us.ZodMap,...io(n)});class Xo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ra.set)return Da(n,{code:Ua.invalid_type,expected:Ra.set,received:n.parsedType}),za;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(Da(n,{code:Ua.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(Da(n,{code:Ua.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(e){const n=new Set;for(const i of e){if("aborted"===i.status)return za;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const o=[...n.data.values()].map(((e,t)=>r._parse(new to(n,e,n.path,t))));return n.common.async?Promise.all(o).then((e=>a(e))):a(o)}min(e,t){return new Xo({...this._def,minSize:{value:e,message:Xa.toString(t)}})}max(e,t){return new Xo({...this._def,maxSize:{value:e,message:Xa.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Xo.create=(e,t)=>new Xo({valueType:e,minSize:null,maxSize:null,typeName:us.ZodSet,...io(t)});class Yo extends ro{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Yo.create=(e,t)=>new Yo({getter:e,typeName:us.ZodLazy,...io(t)});class Jo extends ro{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Da(t,{received:t.data,code:Ua.invalid_literal,expected:this._def.value}),za}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Qo(e,t){return new es({values:e,typeName:us.ZodEnum,...io(t)})}Jo.create=(e,t)=>new Jo({value:e,typeName:us.ZodLiteral,...io(t)});class es extends ro{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{expected:La.joinValues(n),received:t.parsedType,code:Ua.invalid_type}),za}if(Qa(this,Ya,"f")||eo(this,Ya,new Set(this._def.values),"f"),!Qa(this,Ya,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{received:t.data,code:Ua.invalid_enum_value,options:n}),za}return Za(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return es.create(e,{...this._def,...t})}exclude(e,t=this._def){return es.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Ya=new WeakMap,es.create=Qo;class ts extends ro{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(e){const t=La.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ra.string&&n.parsedType!==Ra.number){const e=La.objectValues(t);return Da(n,{expected:La.joinValues(e),received:n.parsedType,code:Ua.invalid_type}),za}if(Qa(this,Ja,"f")||eo(this,Ja,new Set(La.getValidEnumValues(this._def.values)),"f"),!Qa(this,Ja,"f").has(e.data)){const e=La.objectValues(t);return Da(n,{received:n.data,code:Ua.invalid_enum_value,options:e}),za}return Za(e.data)}get enum(){return this._def.values}}Ja=new WeakMap,ts.create=(e,t)=>new ts({values:e,typeName:us.ZodNativeEnum,...io(t)});class ns extends ro{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ra.promise&&!1===t.common.async)return Da(t,{code:Ua.invalid_type,expected:Ra.promise,received:t.parsedType}),za;const n=t.parsedType===Ra.promise?t.data:Promise.resolve(t.data);return Za(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ns.create=(e,t)=>new ns({type:e,typeName:us.ZodPromise,...io(t)});class is extends ro{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===us.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:e=>{Da(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===i.type){const e=i.transform(n.data,r);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return za;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?za:"dirty"===i.status||"dirty"===t.value?Va(i.value):i}));{if("aborted"===t.value)return za;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?za:"dirty"===i.status||"dirty"===t.value?Va(i.value):i}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,r);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?za:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?za:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ka(e))return e;const a=i.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Ka(e)?Promise.resolve(i.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}La.assertNever(i)}}is.create=(e,t,n)=>new is({schema:e,typeName:us.ZodEffects,effect:t,...io(n)}),is.createWithPreprocess=(e,t,n)=>new is({schema:t,effect:{type:"preprocess",transform:e},typeName:us.ZodEffects,...io(n)});class rs extends ro{_parse(e){return this._getType(e)===Ra.undefined?Za(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:us.ZodOptional,...io(t)});class as extends ro{_parse(e){return this._getType(e)===Ra.null?Za(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:us.ZodNullable,...io(t)});class os extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ra.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}os.create=(e,t)=>new os({innerType:e,typeName:us.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...io(t)});class ss extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return qa(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:us.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...io(t)});class cs extends ro{_parse(e){if(this._getType(e)!==Ra.nan){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ra.nan,received:t.parsedType}),za}return{status:"valid",value:e.data}}}cs.create=e=>new cs({typeName:us.ZodNaN,...io(e)});class ls extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ps extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?za:"dirty"===e.status?(t.dirty(),Va(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?za:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ps({in:e,out:t,typeName:us.ZodPipeline})}}class ds extends ro{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Ka(e)&&(e.value=Object.freeze(e.value)),e);return qa(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var us;ds.create=(e,t)=>new ds({innerType:e,typeName:us.ZodReadonly,...io(t)}),function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(us||(us={}));const _s=So.create,fs=Mo.create,hs=Co.create;Bo.create;const ms=Fo.create,gs=Go.create;zo.create;const vs=Zo.create;Wo.create,Ko.create;const bs=Jo.create,ws=es.create;ns.create,rs.create,as.create;const ys=gs({title:_s({message:"Property 'title' should be a string"}).optional(),subtitle:_s({message:"Property 'subtitle' should be a string"}).optional(),message:_s({message:"Property 'message' is required and should be a string"}).nonempty("Property 'message' cannot be empty"),actions:ms(gs({type:_s({message:"Action property 'type' is required and should be a string"}),label:_s({message:"Action property 'label' is required and should be a string"}),target:_s({message:"Action property 'target' should be a string"}).optional(),camera:hs({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:hs({message:"Action property 'keyboard' should be a boolean"}).optional()})).optional(),attachments:ms(gs({mimeType:_s({message:"Attachment property 'mimeType' is required and should be a string"}),uri:_s({message:"Attachment property 'uri' is required and should be a string"}).url("Attachment property 'uri' should be a valid URL")})).optional()}),xs=gs({type:bs("re.notifica.notification.None")}).merge(ys),ks=gs({type:bs("re.notifica.notification.URLResolver"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:_s({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Es=gs({type:bs("re.notifica.notification.Alert")}).merge(ys),js=gs({type:bs("re.notifica.notification.Image"),content:ms(gs({type:ws(["re.notifica.content.PNG","re.notifica.content.JPEG","re.notifica.content.GIF"],{message:"Content objects should be of type 're.notifica.content.PNG', 're.notifica.content.JPEG' or 're.notifica.content.GIF'"}),data:_s({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ns=gs({type:bs("re.notifica.notification.InAppBrowser"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:_s({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ss=gs({type:bs("re.notifica.notification.Map"),content:ms(gs({type:bs("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:gs({title:_s({message:"Content object data property 'title' is required and should be a string"}),description:_s({message:"Content object data property 'description' is required should be a string"}),latitude:fs({message:"Content object data property 'latitude' is required and should be a number"}).min(-90,"Content object data property 'latitude' should be a minimum of -90").max(90,"Content object data property 'latitude' should be a maximum of 90"),longitude:fs({message:"Content object data property 'longitude' is required and should be a number"}).min(-180,"Content object data property 'longitude' must be at least -180").max(180,"Content object data property 'longitude' must be at most 180")})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ts=gs({type:bs("re.notifica.notification.Passbook"),content:ms(gs({type:bs("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:_s({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ms=gs({type:bs("re.notifica.notification.Rate")}).merge(ys),As=gs({type:bs("re.notifica.notification.Store"),content:ms(vs("type",[gs({type:bs("re.notifica.content.AppStore"),data:gs({identifier:_s({message:"Content object data property 'identifier' is mandatory and should be a string"}),campaignToken:_s({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:_s({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:_s({message:"Content object data property 'providerToken' should be a string"}).optional()},{message:"AppStore content object data is required and must be an object with 'identifier' (mandatory), 'campaignToken', 'affiliateToken', or 'providerToken'"})}),gs({type:ws(["re.notifica.content.GooglePlayDetails","re.notifica.content.GooglePlayDeveloper","re.notifica.content.GooglePlayCollection","re.notifica.content.GooglePlaySearch","re.notifica.content.AppGalleryDetails","re.notifica.content.AppGallerySearch"]),data:_s({message:"GooglePlay and AppGallery content object data is required and must be a string"}).nonempty("GooglePlay and AppGallery content object data cannot be empty")})]),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Cs=vs("type",[Es,js,Ns,Ss,xs,Ts,Ms,As,ks,gs({type:bs("re.notifica.notification.URL"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:_s({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.URLScheme"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:_s({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.Video"),content:ms(gs({type:_s({message:"Content object type is required and should be a string"}),data:_s({message:"Content object data is required and should be a string"}).nonempty("Content object data cannot be empty")}),{message:"The notification must be content-rich. Property 'content' is required"}).superRefine(((e,t)=>{e.forEach(((e,n)=>{if(["re.notifica.content.YouTube","re.notifica.content.Vimeo","re.notifica.content.HTML5Video"].includes(e.type)||t.addIssue({code:Ua.custom,message:"Content object should be of type 're.notifica.content.YouTube', 're.notifica.content.Vimeo' or 're.notifica.content.HTML5Video'",path:["content",n,"type"]}),"re.notifica.content.HTML5Video"===e.type)try{new URL(e.data)}catch(e){t.addIssue({code:Ua.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))}))}).merge(ys),gs({type:bs("re.notifica.notification.WebView"),content:ms(gs({type:bs("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:_s({message:"Content data is required and should be a string containing the HTML markup"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys)]);function Ps({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&!e.path.includes("content")));if(t){const e=Cs.options.map((e=>e.shape.type.value));console.error(`Notification error:\n\nInvalid notification type. Expected one of: ${e.join(", ")}\n`)}else{const t=e.map((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&e.path.includes("content")?`Invalid content type. Expected one of: ${e.options.join(", ")}\n`:e.message));console.error("Notification errors:\n\n"+t.join("\n"))}}(n)}),[n]),e.jsx(En,{message:i.formatMessage({id:"preview.error.invalidNotification",defaultMessage:an["preview.error.invalidNotification"]}),showConsoleWarning:!0})}Kt("");function Ls({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__banner__wrapper","data-testid":"in-app-messaging-banner-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__banner__window",children:[t.image&&e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__banner__image",src:t.image,"data-testid":"in-app-messaging-banner-preview-image"}),e.jsxs("div",{className:"notificare__in-app-messaging__banner__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__banner__title","data-testid":"in-app-messaging-banner-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__banner__message","data-testid":"in-app-messaging-banner-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__banner__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__in-app-messaging__banner__window {\n width: 320px;\n border-radius: 5px;\n display: flex;\n background-color: #fff;\n padding: 16px;\n column-gap: 12px;\n}\n\n.notificare .notificare__in-app-messaging__banner__image {\n width: 58px;\n height: 58px;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__banner__text-content {\n width: 100%;\n overflow: hidden;\n}\n\n.notificare .notificare__in-app-messaging__banner__title {\n font-size: 15px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 18px;\n}\n\n.notificare .notificare__in-app-messaging__banner__message {\n font-size: 13px;\n width: 100%;\n word-break: break-word;\n line-height: 18px;\n}");function Os({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__card__wrapper","data-testid":"in-app-messaging-card-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__card__window",children:[e.jsxs("div",{className:"notificare__in-app-messaging__card__header",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__close-button",children:e.jsx(Yr,{className:"notificare__in-app-messaging__card__close-button-icon"})}),e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__card__image",src:t.image,"data-testid":"in-app-messaging-card-preview-image"})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__card__title","data-testid":"in-app-messaging-card-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__card__message","data-testid":"in-app-messaging-card-preview-message",children:t.message})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__actions",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--primary "+(t.primaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-primary-action-label",children:t.primaryAction.label}),t.secondaryAction&&e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--secondary "+(t.secondaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-secondary-action-label",children:t.secondaryAction.label})]})]})})}Kt(".notificare .notificare__in-app-messaging__card__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__card__window {\n width: 320px;\n background-color: white;\n border-radius: 5px;\n padding: 16px;\n overflow: hidden;\n row-gap: 16px;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__header {\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n width: 30px;\n height: 30px;\n justify-content: center;\n border-radius: 16px;\n padding: 0;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button-icon {\n fill: #000000de;\n height: 22px;\n width: 22px;\n}\n\n\n\n.notificare .notificare__in-app-messaging__card__image {\n aspect-ratio: 2 / 1;\n width: 100%;\n object-fit: cover;\n}\n\n\n.notificare .notificare__in-app-messaging__card__title {\n font-weight: 600;\n font-size: 15px;\n width: 100%;\n margin-bottom: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 18px;\n}\n\n.notificare .notificare__in-app-messaging__card__message {\n font-size: 13px;\n width: 100%;\n word-break: break-word;\n line-height: 18px;\n}\n\n.notificare .notificare__in-app-messaging__card__actions {\n display: flex;\n flex-direction: row-reverse;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 13px;\n border-radius: 4px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 18px;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary {\n background-color: #2b42f7;\n color: #fff;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary {\n color: #2a41f3;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive {\n background-color: #fff;\n color: #e54142;\n}");function Rs({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__wrapper","data-testid":"in-app-messaging-fullscreen-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__window",children:[e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__fullscreen__background-image",src:t.image,"data-testid":"in-app-messaging-fullscreen-preview-image"}),e.jsx("button",{className:"notificare__in-app-messaging__fullscreen__close-button",children:e.jsx(Yr,{className:"notificare__in-app-messaging__fullscreen__close-button-icon"})}),e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__text-content",children:[e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__title","data-testid":"in-app-messaging-fullscreen-preview-title",children:t.title}),e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__message","data-testid":"in-app-messaging-fullscreen-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__fullscreen__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__window {\n width: 310px;\n height: 95%;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__background-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n width: 30px;\n height: 30px;\n justify-content: center;\n border-radius: 16px;\n padding: 0;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button-icon {\n fill: #000000de;\n width: 22px;\n height: 22px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__text-content {\n position: absolute;\n bottom: 0;\n padding: 32px 16px 16px;\n width: 100%;\n background: linear-gradient(rgba(255, 255, 255, 0), #fff);\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__title {\n font-weight: 600;\n font-size: 15px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 18px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__message {\n font-size: 13px;\n line-height: 18px;\n}");function Is({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__preview",children:e.jsx(qt,{theme:"dark",children:(()=>{switch(t.type){case"re.notifica.inappmessage.Banner":return e.jsx(Ls,{inAppMessage:t});case"re.notifica.inappmessage.Card":return e.jsx(Os,{inAppMessage:t});case"re.notifica.inappmessage.Fullscreen":return e.jsx(Rs,{inAppMessage:t})}})()})})}Kt(".notificare .notificare__in-app-messaging__preview {\n user-select: none;\n pointer-events: none;\n}");const Us=vs("type",[gs({type:bs("re.notifica.inappmessage.Banner"),title:_s({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:_s({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:_s({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional()}),gs({type:bs("re.notifica.inappmessage.Card"),title:_s({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:_s({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:_s({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional(),primaryAction:gs({label:_s({message:"Primary action property 'label' is required and should be a string"}).max(32,"Primary action property 'label' cannot contain more than 32 characters").nonempty("Primary action property 'label' cannot be empty"),destructive:hs({message:"Primary action property 'destructive' should be a boolean"}).optional()},{message:"A Card must contain a primary action. Property 'primaryAction' is required"}),secondaryAction:gs({label:_s({message:"Secondary action property 'label' is required and should be a string"}).max(32,"Secondary action property 'label' cannot contain more than 32 characters").nonempty("Secondary action property 'label' cannot be empty"),destructive:hs({message:"Secondary action property 'destructive' should be a boolean"}).optional()}).optional()}),gs({type:bs("re.notifica.inappmessage.Fullscreen"),title:_s({message:"Property 'title' should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").optional(),message:_s({message:"Property 'message' should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").optional(),image:_s({message:"Property 'image' is required and should be a string"}).url("Property 'image' should be a valid URL")})]);function Bs({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")));if(t){const e=Us.options.map((e=>e.shape.type.value));console.error(`In-app message error:\n\nInvalid type. Expected one of: ${e.join(", ")}`)}else{const t=e.map((({message:e})=>e));console.error(`In-app message errors:\n\n' + ${t.join("\n")}`)}}(n)}),[n]),e.jsx(En,{message:i.formatMessage({id:"preview.error.invalidInAppMessage",defaultMessage:mn["preview.error.invalidInAppMessage"]}),showConsoleWarning:!0})}exports.NotificareInAppMessagePreview=function({inAppMessage:n,locale:i="en-US",translations:r}){const a=yn({locale:i,customTranslations:r,type:"in-app"}),o=t.useMemo((()=>Us.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===a.status&&e.jsx(Wt,{locale:a.data.locale,defaultLocale:"en-US",messages:a.data.translations,children:o.success?e.jsx(Is,{inAppMessage:o.data}):e.jsx(Bs,{errors:o.error.errors})}),"error"===a.status&&e.jsx(Wt,{locale:"en-US",messages:mn,children:e.jsx(En,{message:a.error.message})})]})},exports.NotificareNotificationPreview=function({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen",serviceKey:o,googleMapsAPIKey:s,locale:c="en-US",translations:l}){const p=yn({locale:c,customTranslations:l,type:"push"}),d=t.useMemo((()=>Cs.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===p.status&&e.jsx(Wt,{locale:p.data.locale,defaultLocale:"en-US",messages:p.data.translations,children:e.jsx(Nn,{serviceKey:o,googleMapsAPIKey:s,children:d.success?e.jsx(Pa,{notification:d.data,applicationId:i,showControls:r,variant:a}):e.jsx(Ps,{errors:d.error.errors})})}),"error"===p.status&&e.jsx(Wt,{locale:"en-US",messages:an,children:e.jsx(En,{message:p.error.message})})]})};
9
+ */function Mt(){return Ct||(Ct=1,"production"===process.env.NODE_ENV?jt.exports=function(){if(Et)return Nt;Et=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:switch(e=e.type){case c:case l:case i:case a:case r:case d:return e;default:switch(e=e&&e.$$typeof){case s:case p:case f:case u:case o:return e;default:return _}}case n:return _}}}function w(e){return b(e)===l}return Nt.AsyncMode=c,Nt.ConcurrentMode=l,Nt.ContextConsumer=s,Nt.ContextProvider=o,Nt.Element=t,Nt.ForwardRef=p,Nt.Fragment=i,Nt.Lazy=f,Nt.Memo=u,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=d,Nt.isAsyncMode=function(e){return w(e)||b(e)===c},Nt.isConcurrentMode=w,Nt.isContextConsumer=function(e){return b(e)===s},Nt.isContextProvider=function(e){return b(e)===o},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return b(e)===p},Nt.isFragment=function(e){return b(e)===i},Nt.isLazy=function(e){return b(e)===f},Nt.isMemo=function(e){return b(e)===u},Nt.isPortal=function(e){return b(e)===n},Nt.isProfiler=function(e){return b(e)===a},Nt.isStrictMode=function(e){return b(e)===r},Nt.isSuspense=function(e){return b(e)===d},Nt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Nt.typeOf=b,Nt}():jt.exports=(St||(St=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:var h=e.type;switch(h){case c:case l:case i:case a:case r:case d:return h;default:var m=h&&h.$$typeof;switch(m){case s:case p:case f:case u:case o:return m;default:return _}}case n:return _}}}var w=c,y=l,x=s,k=o,E=t,j=p,N=i,S=f,C=u,T=n,A=a,P=r,M=d,L=!1;function O(e){return b(e)===l}Pt.AsyncMode=w,Pt.ConcurrentMode=y,Pt.ContextConsumer=x,Pt.ContextProvider=k,Pt.Element=E,Pt.ForwardRef=j,Pt.Fragment=N,Pt.Lazy=S,Pt.Memo=C,Pt.Portal=T,Pt.Profiler=A,Pt.StrictMode=P,Pt.Suspense=M,Pt.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||b(e)===c},Pt.isConcurrentMode=O,Pt.isContextConsumer=function(e){return b(e)===s},Pt.isContextProvider=function(e){return b(e)===o},Pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pt.isForwardRef=function(e){return b(e)===p},Pt.isFragment=function(e){return b(e)===i},Pt.isLazy=function(e){return b(e)===f},Pt.isMemo=function(e){return b(e)===u},Pt.isPortal=function(e){return b(e)===n},Pt.isProfiler=function(e){return b(e)===a},Pt.isStrictMode=function(e){return b(e)===r},Pt.isSuspense=function(e){return b(e)===d},Pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Pt.typeOf=b}()),Pt)),jt.exports}!function(){if(At)return Tt;At=1;var e=Mt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};function a(n){return e.isMemo(n)?i:r[n.$$typeof]||t}r[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r[e.Memo]=i;var o=Object.defineProperty,s=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;Tt=function e(t,i,r){if("string"!=typeof i){if(d){var _=p(i);_&&_!==d&&e(t,_,r)}var u=s(i);c&&(u=u.concat(c(i)));for(var f=a(t),h=a(i),m=0;m<u.length;++m){var g=u[m];if(!(n[g]||r&&r[g]||h&&h[g]||f&&f[g])){var v=l(i,g);try{o(t,g,v)}catch(e){}}}}return t}}();var Lt="undefined"==typeof window||window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?r.createContext(null):window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=r.createContext(null));Lt.Consumer;var Ot,It,Rt=Lt.Provider,Ut=Lt;function Bt(){var e=r.useContext(Ut);return vt(e),e}function Ht(e){var t=function(t){var n=Bt(),i=t.value,r=t.children,a=c(t,["value","children"]),o="string"==typeof i?new Date(i||0):i;return r("formatDate"===e?n.formatDateToParts(o,a):n.formatTimeToParts(o,a))};return t.displayName=It[e],t}function Ft(e){var t=function(t){var n=Bt(),i=t.value,a=t.children,o=c(t,["value","children"]),s=n[e](i,o);if("function"==typeof a)return a(s);var l=n.textComponent||r.Fragment;return r.createElement(l,null,s)};return t.displayName=Ot[e],t}function Dt(e){return e?Object.keys(e).reduce((function(t,n){var i,a=e[n];return t[n]=Ce(a)?(i=a,function(e){return i(r.Children.toArray(e))}):a,t}),{}):e}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(Ot||(Ot={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(It||(It={}));var zt=function(e,t,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var s=Dt(i),c=Ke.apply(void 0,p([e,t,n,s],a,!1));return Array.isArray(c)?function(e){var t;return null!==(t=r.Children.map(e,yt))&&void 0!==t?t:[]}(c):c},Gt=function(e,t){var n=e.defaultRichTextElements,i=c(e,["defaultRichTextElements"]),r=Dt(n),a=gt(s(s(s({},bt),i),{defaultRichTextElements:r}),t),o={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:r};return s(s({},a),{formatMessage:zt.bind(null,o,a.formatters),$t:zt.bind(null,o,a.formatters)})};function Zt(e){var t=Bt(),n=t.formatMessage,i=t.textComponent,a=void 0===i?r.Fragment:i,o=e.id,s=e.description,c=e.defaultMessage,l=e.values,p=e.children,d=e.tagName,_=void 0===d?a:d,u=n({id:o,description:s,defaultMessage:c},l,{ignoreTag:e.ignoreTag});return"function"==typeof p?p(Array.isArray(u)?u:[u]):_?r.createElement(_,null,u):r.createElement(r.Fragment,null,u)}Zt.displayName="FormattedMessage";var Vt=r.memo(Zt,(function(e,t){var n=e.values,i=c(e,["values"]),r=t.values,a=c(t,["values"]);return xt(r,n)&&xt(i,a)}));function $t(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}Vt.displayName="MemoizedFormattedMessage";var Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Gt($t(t.props),t.cache),prevConfig:$t(t.props)},t}return o(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,i=t.cache,r=$t(e);return xt(n,r)?null:{intl:Gt(r,i),prevConfig:r}},t.prototype.render=function(){return vt(this.state.intl),r.createElement(Rt,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=bt,t}(r.PureComponent);function Kt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Ft("formatDate"),Ft("formatTime"),Ft("formatNumber"),Ft("formatList"),Ft("formatDisplayName"),Ht("formatDate"),Ht("formatTime");function qt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__android-phone-background__wrapper "+("dark"===n?"notificare__android-phone-background__wrapper--dark":""),"data-testid":"android-phone-background",children:[e.jsx("div",{className:"notificare__android-phone-background__camera"}),e.jsx("div",{className:"notificare__android-phone-background__content",children:t})]})}Kt(".notificare .notificare__android-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__android-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__android-phone-background__camera {\n width: 20px;\n height: 20px;\n background: #c6c6c6;\n border-radius: 50%;\n margin: 20px auto 10px;\n}\n\n.notificare .notificare__android-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Xt;function Yt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__ios-phone-background__wrapper "+("dark"===n?"notificare__ios-phone-background__wrapper--dark":""),"data-testid":"ios-phone-background",children:[e.jsx("div",{className:"notificare__ios-phone-background__camera"}),e.jsx("div",{className:"notificare__ios-phone-background__content",children:t})]})}function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jt.apply(null,arguments)}Kt(".notificare .notificare__ios-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__ios-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__ios-phone-background__camera {\n width: 80px;\n height: 20px;\n background: #c6c6c6;\n margin: 20px auto 10px;\n border-radius: 20px;\n}\n\n.notificare .notificare__ios-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Qt,en=function(e){return r.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Xt||(Xt=r.createElement("path",{fill:"#64706e",d:"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5"})))};function tn(){return e.jsx("div",{className:"notificare__loading__wrapper","data-testid":"loading",children:e.jsx(en,{className:"notificare__loading__icon"})})}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nn.apply(null,arguments)}Kt(".notificare .notificare__loading__wrapper {\n width: 100%;\n display: flex;\n justify-content: center;\n padding-top: 50px;\n}\n\n.notificare .notificare__loading__icon {\n width: 60px;\n height: 60px;\n animation: notificare-loading-icon-spin 2s linear infinite;\n}\n\n@keyframes notificare-loading-icon-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}");var rn=function(e){return r.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Qt||(Qt=r.createElement("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32m0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24m32 224a32 32 0 1 0-64 0 32 32 0 1 0 64 0"})))};const an={"controls.platform":"Platform","controls.formFactor":"Form Factor","controls.operatingSystem":"OS","controls.operatingSystem.macos":"macOS","controls.variant":"Variant","controls.displayMode.lockScreen":"Lock Screen","controls.displayMode.expandedLockScreen":"Lock Screen - Expanded","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information","preview.error.invalidNotification":"→ Invalid Notification","preview.error.provideGoogleMapsApiKey":"→ A Google Maps API key should be provided","preview.error.notSupportedPreviewVariant":"→ Not supported variant","preview.error.invalidUrl":"The URL is invalid.","preview.error.iosStoreAppNotFound":"The app was not found. Check the unique identifier and try again","preview.error.webshotFail":"Webshot failed to be loaded. Check console for more details.","preview.error.notSupportedNotificationTypePreviewVariant":"→ Previewing notifications of type ''{notificationType}'' is not possible in this variant","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a custom URL Scheme is not possible","preview.error.urlResolverInvalidUrl":"→ The provided URL is invalid","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with an HTTP URL without 'notificareWebView' query parameter is not possible in this variant","preview.error.notSupportedUrlResolverWithDynamicLink":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a dynamic link is not possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a relative URL (starts with '/') is not possible","preview.error.googleMapsAuthFailure":"Authentication failure. Your Google Maps API key might be invalid. Check console for more information.","preview.error.googleMapsLoadFailure":"Google Maps failed to be loaded. Check console for more information.","preview.error.noValidContentObject":"No valid content object was provided","preview.error.iosStoreAppLoadFailure":"The app failed to be loaded. Check console for more details","preview.android.alert.appUi.cancel":"Cancel","preview.android.inAppBrowser.appUi.pageTitleLoading":"Loading...","preview.android.lockscreen.time":"now","preview.ios.alert.appUi.cancel":"Cancel","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Done","preview.ios.inAppBrowser.appUi.notSecure":"Not Secure —","preview.ios.rate.appUi.rateNow":"Yes, I'll Rate Now","preview.ios.rate.appUi.doNotRate":"No, Thanks","preview.ios.store.appUi.done":"Done","preview.ios.store.appUi.install":"Install","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Ratings","preview.ios.store.appUi.age":"Age","preview.ios.store.appUi.yearsOld":"Years Old","preview.ios.store.appUi.category":"Category","preview.ios.store.appUi.developer":"Developer","preview.ios.store.appUi.whatsNew":"What's New","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Screenshots","preview.ios.lockScreen.time":"Now","preview.web.desktop.macos.lockScreen.time":"now","preview.web.desktop.macos.lockScreen.settings":"Settings","preview.web.desktop.macos.lockScreen.options":"Options"};var on;function sn({message:t}){const n=Bt();return e.jsxs("div",{className:"notificare__preview-error__wrapper","data-testid":"preview-error",children:[e.jsx(rn,{className:"notificare__preview-error__icon"}),e.jsxs("p",{className:"notificare__preview-error__text",children:[n.formatMessage({id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]}),t&&e.jsxs(e.Fragment,{children:[e.jsx("br",{})," ",e.jsx("br",{})," ",t]})]})]})}function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},cn.apply(null,arguments)}Kt(".notificare .notificare__preview-error__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 440px;\n text-align: center;\n padding: 0 20px;\n}\n\n.notificare .notificare__preview-error__icon {\n width: 72px;\n margin-bottom: 20px;\n height: auto;\n}\n\n.notificare .notificare__preview-error__text {\n font-weight: 700;\n font-size: 16px;\n color: #232c2a;\n}");var ln=function(e){return r.createElement("svg",cn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),on||(on=r.createElement("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})))};class pn extends Error{constructor(e){super(`Failed to fetch a resource with response code '${e.status.toString()}'.`),this.response=e,this.name="NetworkRequestError",Error.captureStackTrace&&Error.captureStackTrace(this,pn)}}function dn(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.json()}))}function _n(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}const un={name:"My app",icon:void 0,androidPackageName:"com.example.app",websitePushConfig:{icon:void 0,allowedDomains:["https://my-app.com/"]}};function fn({id:e,serviceKey:n}){const[i,r]=t.useState({status:"idle"});return t.useEffect((()=>e?n?void function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/application/${encodeURIComponent(e)}/info`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const{application:i}=yield dn(n);return{name:i.name,icon:i.icon,androidPackageName:i.androidPackageName,websitePushConfig:i.websitePushConfig&&{icon:i.websitePushConfig.icon?_n(i.websitePushConfig.icon):void 0,allowedDomains:i.websitePushConfig.allowedDomains}}}))}(e,n).then((e=>{r({status:"success",data:e})})).catch((e=>{console.error("Error fetching the application: ",e),r({status:"success",data:un})})):(console.warn("An application ID was provided, but a service key is missing. Using default application instead."),void r({status:"success",data:un})):(console.warn("An application ID was not provided. Using default application instead."),void r({status:"success",data:un}))),[e,n]),i}function hn(e,n){const[i,r]=t.useState(e);return t.useEffect((()=>{const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),i}function mn(e){try{return Intl.NumberFormat.supportedLocalesOf([e]).length>0}catch(e){return!1}}const gn={"preview.error.invalidInAppMessage":"→ Invalid in-app message","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},vn={"preview.error.invalidInAppMessage":"→ Message intégré invalide","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},bn={"preview.error.invalidInAppMessage":"→ Mensagem in-app inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"},wn={"controls.platform":"Plateforme","controls.formFactor":"Format","controls.operatingSystem":"SE","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Écran verrouillé","controls.displayMode.expandedLockScreen":"Écran verrouillé - Étendu","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Aperçu non généré","preview.error.checkConsole":"Consultez la console pour plus d’informations","preview.error.invalidNotification":"→ Notification invalide","preview.error.provideGoogleMapsApiKey":"→ Une clé API Google Maps doit être fournie","preview.error.notSupportedPreviewVariant":"→ Variante non prise en charge","preview.error.invalidUrl":"L’URL est invalide.","preview.error.iosStoreAppNotFound":"L'application n’a pas été trouvée. Vérifiez l’identifiant unique et réessayez","preview.error.webshotFail":"La capture Web a échoué. Consultez la console pour plus de détails.","preview.error.notSupportedNotificationTypePreviewVariant":"→ L’aperçu des notifications de type ''{notificationType}'' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un schéma d’URL personnalisé (URL Scheme) n’est pas possible","preview.error.urlResolverInvalidUrl":"→ L’URL fournie est invalide","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL HTTP sans le paramètre de requête 'notificareWebView' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un lien dynamique n’est pas possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL relative (commençant par '/') n’est pas possible","preview.error.googleMapsAuthFailure":"Échec de l’authentification. Votre clé API Google Maps pourrait être invalide. Consultez la console pour plus d’informations.","preview.error.googleMapsLoadFailure":"Échec du chargement de Google Maps. Consultez la console pour plus d’informations.","preview.error.noValidContentObject":"Aucun objet de contenu valide fourni","preview.error.iosStoreAppLoadFailure":"Échec du chargement de l’application. Consultez la console pour plus de détails","preview.android.alert.appUi.cancel":"Annuler","preview.android.inAppBrowser.appUi.pageTitleLoading":"Chargement...","preview.android.lockscreen.time":"maintenant","preview.ios.alert.appUi.cancel":"Annuler","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Terminé","preview.ios.inAppBrowser.appUi.notSecure":"Non Sécurisé —","preview.ios.rate.appUi.rateNow":"Oui, je vais noter maintenant","preview.ios.rate.appUi.doNotRate":"Non, Merci","preview.ios.store.appUi.done":"Terminé","preview.ios.store.appUi.install":"Installer","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Évaluations","preview.ios.store.appUi.age":"Âge","preview.ios.store.appUi.yearsOld":"Ans","preview.ios.store.appUi.category":"Catégorie","preview.ios.store.appUi.developer":"Développeur","preview.ios.store.appUi.whatsNew":"Nouveautés","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Captures d’écran","preview.ios.lockScreen.time":"Maintenant","preview.web.desktop.macos.lockScreen.time":"maintenant","preview.web.desktop.macos.lockScreen.settings":"Réglages","preview.web.desktop.macos.lockScreen.options":"Options"},yn={"controls.platform":"Plataforma","controls.formFactor":"Formato","controls.operatingSystem":"SO","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Ecrã de Bloqueio","controls.displayMode.expandedLockScreen":"Ecrã de Bloqueio - Expandido","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações","preview.error.invalidNotification":"→ Notificação inválida","preview.error.provideGoogleMapsApiKey":"→ Deve ser fornecida uma chave de API do Google Maps","preview.error.notSupportedPreviewVariant":"→ Variante não suportada","preview.error.invalidUrl":"A URL é inválida.","preview.error.iosStoreAppNotFound":"A aplicação não foi encontrada. Verifique o identificador único e tente novamente","preview.error.webshotFail":"Não foi possível efetuar a captura da página web. Consulte a consola para mais informações.","preview.error.notSupportedNotificationTypePreviewVariant":"→ A pré-visualização de notificações do tipo ''{notificationType}'' não é possível nesta variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um esquema de URL personalizado (URL Scheme) não é possível","preview.error.urlResolverInvalidUrl":"→ O URL fornecido é inválido","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL HTTP sem o parâmetro de query 'notificareWebView' não é possível nesta variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um link dinâmico não é possível","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL relativo (que começa por '/') não é possível","preview.error.googleMapsAuthFailure":"Falha de autenticação. A chave da API do Google Maps poderá ser inválida. Consulte a consola para mais informações.","preview.error.googleMapsLoadFailure":"Não foi possível carregar o Google Maps. Consulte a consola para mais informações.","preview.error.noValidContentObject":"Nenhum objeto válido foi fornecido","preview.error.iosStoreAppLoadFailure":"Não foi possível carregar a aplicação. Consulte a consola para mais informações","preview.android.alert.appUi.cancel":"Cancelar","preview.android.inAppBrowser.appUi.pageTitleLoading":"A carregar...","preview.android.lockscreen.time":"agora","preview.ios.alert.appUi.cancel":"Cancelar","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Concluído","preview.ios.inAppBrowser.appUi.notSecure":"Não seguro —","preview.ios.rate.appUi.rateNow":"Sim, avaliar agora","preview.ios.rate.appUi.doNotRate":"Não, obrigado","preview.ios.store.appUi.done":"OK","preview.ios.store.appUi.install":"Obter","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Classificações","preview.ios.store.appUi.age":"Idade","preview.ios.store.appUi.yearsOld":"Anos","preview.ios.store.appUi.category":"Categoria","preview.ios.store.appUi.developer":"Programador","preview.ios.store.appUi.whatsNew":"Novidades","preview.ios.store.appUi.historyVersion":"Versão {version}","preview.ios.store.appUi.screenshots":"Capturas de ecrã","preview.ios.lockScreen.time":"Agora","preview.web.desktop.macos.lockScreen.time":"agora","preview.web.desktop.macos.lockScreen.settings":"Definições","preview.web.desktop.macos.lockScreen.options":"Opções"},xn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Invalid application information","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},kn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informations d’application invalides","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},En={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informação da aplicação inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"};function jn({locale:e,customTranslations:n,type:i}){const[r,a]=t.useState({status:"idle"}),o=t.useMemo((()=>{if(!mn(e))return null;return function(e,t){switch(e){case"en":switch(t){case"push":return an;case"in-app":return gn;case"onboarding":return xn}break;case"pt":switch(t){case"push":return yn;case"in-app":return bn;case"onboarding":return En}break;case"fr":switch(t){case"push":return wn;case"in-app":return vn;case"onboarding":return kn}break;default:return null}}(new Intl.Locale(e).language,i)}),[e,i]);return t.useEffect((function(){mn(e)?a({status:"success",data:{locale:e,translations:Object.assign(Object.assign({},o),n)}}):a({status:"error",error:new Error("→ The locale you chose is invalid. Choose a different one and try again")})}),[e,n,o]),r}function Nn({label:n,options:i,value:r,onValueChanged:a,disabled:o=!1}){const s=Bt(),[c,l]=t.useState(!1),[p,d]=t.useState((function(){const e=i.find((e=>e.value===r));if(!e)throw new Error(`Value "${String(r)}" not found in the Selector options.`);return s.formatMessage({id:e.labelId,defaultMessage:e.defaultLabel})})),_=t.useRef(null),u=t.useRef(null);return function({refs:e,onClickOutside:n}){t.useEffect((()=>{function t(t){const i=e.every((e=>{var n;return!(null===(n=e.current)||void 0===n?void 0:n.contains(t.target))}));i&&n()}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}}),[e])}({refs:[_,u],onClickOutside:()=>{l(!1)}}),e.jsxs("div",{className:"notificare__selector__wrapper",children:[e.jsx("p",{className:"notificare__selector__label",children:n}),e.jsxs("button",{className:"notificare__selector__button",onClick:()=>l(!c),disabled:o,ref:u,children:[p,e.jsx(ln,{className:"notificare__selector__button-expand-icon"})]}),c&&e.jsx("div",{className:"notificare__selector__options",ref:_,children:i.map((t=>e.jsx("button",{className:"notificare__selector__option-button "+(r===t.value?"notificare__selector__option-button--selected":""),onClick:()=>{null==a||a(t.value),l(!1),d(s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel}))},"data-testid":`selector-option-${t.value.toString()}`,children:s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel})},t.value)))})]})}Kt(".notificare .notificare__selector__wrapper {\n position: relative;\n}\n\n.notificare .notificare__selector__label {\n font-size: 14px;\n color: #6e6e6e;\n margin-bottom: 7px;\n}\n\n.notificare .notificare__selector__button {\n width: 350px;\n height: 42px;\n background-color: #F6F6F6;\n color: #1c1c1c;\n border: 1px solid #E8E8E8;\n text-align: left;\n padding-left: 14px;\n font-size: 16px;\n display: flex;\n align-items: center;\n}\n\n.notificare .notificare__selector__button:not(:disabled) {\n cursor: pointer;\n}\n\n.notificare .notificare__selector__button:disabled {\n color: #b3b3b3;\n}\n\n.notificare .notificare__selector__button-expand-icon {\n width: 16px;\n height: 16px;\n margin-left: auto;\n margin-right: 14px;\n}\n\n.notificare .notificare__selector__button:disabled .notificare__selector__button-expand-icon {\n fill: #b3b3b3;\n}\n\n.notificare .notificare__selector__options {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 63px;\n z-index: 1;\n box-shadow: 0 14px 10px -10px rgba(0, 0, 0, 0.2);\n}\n\n.notificare .notificare__selector__option-button {\n width: 350px;\n height: 42px;\n background-color: #ececec;\n color: #151515;\n border: 0;\n font-size: 15px;\n text-align: left;\n padding-left: 14px;\n}\n\n.notificare .notificare__selector__option-button--selected {\n background-color: #c8c8c8;\n}\n\n.notificare .notificare__selector__option-button:hover {\n background-color: #5E5E5E;\n color: white;\n cursor: pointer;\n}\n");function Sn({label:n,options:i,value:r,onValueChanged:a}){return e.jsxs("div",{className:"notificare__toggle-group__wrapper",children:[e.jsx("p",{className:"notificare__toggle-group__label","data-testid":`toggle-group-${n}`,children:n}),e.jsx("div",{className:"notificare__toggle-group__options",children:i.map(((n,o)=>e.jsxs(t.Fragment,{children:[e.jsx("button",{className:"notificare__toggle-group__option-button "+(r===n.value?"notificare__toggle-group__option-button--selected":""),onClick:()=>a(n.value),"aria-label":`Button with option '${n.value.toString()}'`,"data-testid":`toggle-group-option-${n.value.toString()}`,children:e.jsx("div",{className:"notificare__toggle-group__option-button-icon "+(r===n.value?"notificare__toggle-group__option-button-icon--selected":""),children:n.icon})}),o!==i.length-1&&e.jsx("div",{className:"notificare__toggle-group__border"})]},n.value)))})]})}Kt(".notificare .notificare__toggle-group__wrapper {\n display: flex;\n flex-direction: column;\n row-gap: 7px;\n}\n\n.notificare .notificare__toggle-group__label {\n font-size: 14px;\n color: #6e6e6e;\n}\n\n.notificare .notificare__toggle-group__options {\n display: flex;\n border-radius: 8px;\n border: 1px solid #DADADA;\n width: max-content;\n overflow: hidden;\n background-color: #F6F6F6;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.notificare .notificare__toggle-group__option-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n transition: all 0.3s;\n background: #f6f6f6;\n color: #374151;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__toggle-group__option-button--selected {\n background: #5E5E5E;\n color: #ffffff;\n}\n\n.notificare .notificare__toggle-group__option-button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #C0C0C0;\n}\n\n.notificare .notificare__toggle-group__option-button-icon--selected {\n fill: #FFF\n}\n\n.notificare .notificare__toggle-group__border {\n width: 1px;\n height: 40px;\n background: #DADADA;\n}");function Cn({message:t,showConsoleWarning:n}){return e.jsxs("div",{className:"notificare__unavailable-preview__wrapper","data-testid":"unavailable-preview",children:[e.jsxs("div",{className:"notificare__unavailable-preview__warning",children:[e.jsx(rn,{className:"notificare__unavailable-preview__alert-icon"}),e.jsxs("div",{className:"notificare__unavailable-preview__text-container",children:[e.jsx("div",{className:"notificare__unavailable-preview__title",children:e.jsx(Vt,{id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]})}),e.jsx("div",{className:"notificare__unavailable-preview__reason-text","data-testid":"unavailable-preview-reason-text",children:t})]})]}),n&&e.jsx("div",{className:"notificare__unavailable-preview__check-console-text",children:e.jsx(Vt,{id:"preview.error.checkConsole",defaultMessage:an["preview.error.checkConsole"]})})]})}Kt(".notificare .notificare__unavailable-preview__wrapper {\n width: 350px;\n}\n\n.notificare .notificare__unavailable-preview__warning {\n width: 100%;\n background-color: #fff1cc;\n border: 1px solid #d5d5d5;\n display: flex;\n align-items: center;\n padding: 14px;\n border-radius: 10px;\n column-gap: 14px;\n}\n\n.notificare .notificare__unavailable-preview__text-container {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 100%;\n}\n\n.notificare .notificare__unavailable-preview__title {\n font-size: 15px;\n color: #232323;\n font-weight: bold;\n}\n\n.notificare .notificare__unavailable-preview__reason-text {\n font-size: 13px;\n color: #bd6868;\n}\n\n.notificare .notificare__unavailable-preview__alert-icon {\n width: 40px;\n height: auto;\n}\n\n.notificare .notificare__unavailable-preview__check-console-text {\n font-size: 12px;\n color: #989898;\n text-align: right;\n margin-top: 6px;\n margin-right: 3px;\n font-style: italic;\n position: relative;\n}");const Tn=t.createContext(void 0);function An(t){var{children:n}=t,i=c(t,["children"]);return e.jsx(Tn.Provider,{value:i,children:n})}function Pn(){const e=t.useContext(Tn);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e}function Mn(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}/result`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const r=yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.blob()}))}(i,{signal:n});return URL.createObjectURL(r)}))}function Ln(e,t){console.error(`${t}\n\n${e}`)}function On(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function In(e){try{const t=new URL(e).hostname,n=t.split(".");return n.length>2?n.slice(-2).join("."):t}catch(e){return console.error("Invalid URL:",e),""}}function Rn(e){const n=Bt(),i=Pn(),{url:r,platform:a,width:o,height:s,serviceKey:c}=hn(Object.assign(Object.assign({},e),{serviceKey:i.serviceKey}),500),[p,d]=t.useState({status:"idle"}),[_,u]=t.useState();return t.useEffect((function(){const e=new AbortController,t=e.signal;if(u(void 0),function(e){try{return new URL(e),!0}catch(e){return!1}}(r))return d({status:"loading"}),function(e,t,n,i,r,a){return l(this,void 0,void 0,(function*(){const o=new URL("/webshot","https://push.notifica.re");o.searchParams.set("apiKey",r);const{webshot:s}=yield dn(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:i,type:"png",params:{width:t,height:n}}),signal:a});return s.id}))}(r,o,s,a,c,t).then((e=>{t.aborted||u(e)})).catch((e=>{t.aborted||(Ln(e,"An error has occurred while trying to create the webshot request:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))}))})),()=>{e.abort()};d({status:"error",error:new Error(n.formatMessage({id:"preview.error.invalidUrl",defaultMessage:an["preview.error.invalidUrl"]}))})}),[r,o,s,a,c,n]),t.useEffect((function(){if(!_)return;const e=new AbortController,t=e.signal;let i,r=!1;const a=()=>l(this,void 0,void 0,(function*(){if(!r){r=!0;try{const e=yield function(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const{webshot:r}=yield dn(i,{signal:n});return r}))}(_,c,t);if(t.aborted)return;switch(e.status){case"finished":{clearInterval(i);const e=yield Mn(_,c,t);if(t.aborted)return;d({status:"success",data:e});break}case"error":clearInterval(i),Ln(e.result,"An error has occurred while trying to get the webshot request status:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}}catch(e){if(t.aborted)return;clearInterval(i),Ln(e,"Webshot error:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}r=!1}}));return a(),i=setInterval((()=>{a()}),3e3),()=>{e.abort(),clearInterval(i)}}),[_]),p}var Un;function Bn({url:n,platform:i,width:r,height:a,onLoadingChanged:o,canShow:s=!0}){const c=Rn({url:n,platform:i,width:r,height:a});return t.useEffect((function(){switch(c.status){case"idle":case"loading":null==o||o(!0);break;case"success":case"error":null==o||o(!1)}}),[c,o]),e.jsxs("div",{className:"notificare__webshot__wrapper",style:{width:r,height:a},children:["loading"===c.status&&e.jsx(tn,{}),"success"===c.status&&s&&e.jsx("img",{src:c.data,alt:"Webshot","data-testid":"webshot"}),"error"===c.status&&e.jsx(sn,{message:c.error.message})]})}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hn.apply(null,arguments)}Kt(".notificare .notificare__webshot__wrapper {\n background-color: #fff;\n}");var Fn,Dn=function(e){return r.createElement("svg",Hn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),Un||(Un=r.createElement("path",{d:"M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80m-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64z"})))};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zn.apply(null,arguments)}var Gn=function(e){return r.createElement("svg",zn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),Fn||(Fn=r.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256z"})))};function Zn({url:n,onLoadingChanged:i,canShow:r}){const[a,o]=t.useState(""),[s,c]=t.useState({isLoading:!0}),{serviceKey:p}=Pn(),d=Bt();return t.useEffect((function(){Vn(!0,c,i),function(e,t){return l(this,void 0,void 0,(function*(){var n,i;const r=new URL("/proxy","https://push.notifica.re");r.searchParams.set("apiKey",e),r.searchParams.set("url",t);const a=yield fetch(r),o=yield a.text();return null!==(i=null===(n=(new DOMParser).parseFromString(o,"text/html").querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:""}))}(p,n).then(o).catch((e=>{Ln(e,"Error while getting page title:")})).finally((()=>{Vn(!1,c,i)}))}),[n,p,i]),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[e.jsx(Gn,{className:"notificare__push__android__in-app-browser__app-ui__x-mark-icon"}),On(n)?e.jsx(Dn,{className:"notificare__push__android__in-app-browser__app-ui__bar-lock-icon"}):e.jsx(rn,{className:"notificare__push__android__in-app-browser__app-ui__alert-icon"}),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!s.isLoading&&r?a:d.formatMessage({id:"preview.android.inAppBrowser.appUi.pageTitleLoading",defaultMessage:an["preview.android.inAppBrowser.appUi.pageTitleLoading"]})}),e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:In(n)})]})]})}function Vn(e,t,n){t({isLoading:e}),null==n||n(e)}Kt(".notificare .notificare__push__android__in-app-browser__app-ui__bar {\n display: flex;\n width: 334px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__x-mark-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-lock-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__alert-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-domain {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--title {\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--url {\n font-size: 12px;\n}");function $n({notification:n}){const[i,r]=t.useState(!0),[a,o]=t.useState(!0),s=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[e.jsx(Zn,{url:s,onLoadingChanged:r,canShow:!a}),e.jsx(Bn,{url:s,platform:"Android",width:338,height:570,onLoadingChanged:o,canShow:!i})]})}Kt("");const Wn=t.createContext(void 0);function Kn({application:t,children:n}){return e.jsx(Wn.Provider,{value:t,children:n})}function qn(){const e=t.useContext(Wn);if(!e)throw new Error("useApplication should be used inside an ApplicationProvider");return e}function Xn(e,t){return l(this,void 0,void 0,(function*(){const n=new URL("/proxy","https://push.notifica.re");return n.searchParams.set("apiKey",e),n.searchParams.set("url",t),yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.text()}))}(n)}))}function Yn(e){return!!(e.actions&&e.actions.length>0)}function Jn(e){return!(!e.actions||1!==e.actions.length)}function Qn(e){return!!(e.actions&&e.actions.length>1)}function ei(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function ti(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("a");let n=!1;return t.forEach((e=>{new URL(e.href,window.location.origin).searchParams.has("notificareOpenAction")&&(n=!0)})),n}var ni;function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ii.apply(null,arguments)}var ri,ai=function(e){return r.createElement("svg",ii({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),ni||(ni=r.createElement("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})))};function oi(){return oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oi.apply(null,arguments)}var si=function(e){return r.createElement("svg",oi({xmlns:"http://www.w3.org/2000/svg","data-testid":"android-app-ui-navigation-bar-options-button",viewBox:"0 0 128 512",width:"1em",height:"1em"},e),ri||(ri=r.createElement("path",{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112m0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112m56-104A56 56 0 1 0 8 96a56 56 0 1 0 112 0"})))};function ci({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[e.jsx(ai,{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon"}),e.jsx("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:t}),n&&e.jsx(si,{"data-testid":"android-app-ui-navigation-bar-options-button",className:"notificare__push__android__app-ui__navigation-bar-options-button"})]})}Kt(".notificare .notificare__push__android__app-ui__navigation-bar {\n display: flex;\n width: 338px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n justify-content: flex-start;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-arrow-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-title {\n width: 100%;\n font-size: 18px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-options-button {\n margin-left: auto;\n height: 24px;\n}");var li;function pi({notification:n}){const i=qn(),r=n.content[0].data,[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,r).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[r,s]),e.jsxs("div",{"data-testid":"android-app-ui-url-notification",children:[e.jsx(ci,{title:n.title||i.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:r,platform:"Android",width:338,height:570})]})}function di(e){if(!(e=e.trim()))return li.INVALID_URL;if(e.startsWith("/"))return li.RELATIVE_URL;let t;try{t=new URL(e)}catch(e){return li.INVALID_URL}const n="http:"===t.protocol||"https:"===t.protocol,i=t.host.endsWith("ntc.re");if(!n)return li.URL_SCHEME;if(i)return li.DYNAMIC_LINK;const r=t.searchParams.get("notificareWebView");return"1"===r||"true"===(null==r?void 0:r.toLowerCase())?li.WEB_VIEW:li.IN_APP_BROWSER}function _i({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(pi,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx($n,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}Kt(""),function(e){e.INVALID_URL="invalid-url",e.DYNAMIC_LINK="dynamic-link",e.WEB_VIEW="web-view",e.IN_APP_BROWSER="in-app-browser",e.URL_SCHEME="url-scheme",e.RELATIVE_URL="relative-url"}(li||(li={}));function ui({notification:t}){const n=qn(),i=Bt(),r=function(e){const t="https://play.google.com";for(const n of e)switch(n.type){case"re.notifica.content.GooglePlayDetails":{const e=new URL("/store/apps/details",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayDeveloper":{const e=new URL("/store/apps/dev",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayCollection":return new URL(`/store/apps/collection/${encodeURIComponent(n.data)}`,t).toString();case"re.notifica.content.GooglePlaySearch":{const e=new URL("/store/search",t);return e.searchParams.set("q",n.data),e.searchParams.set("c","apps"),e.toString()}}return null}(t.content);return e.jsxs("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),r?e.jsx(Bn,{url:r,platform:"Android",width:338,height:570}):e.jsx(sn,{message:i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]})})]})}Kt("");function fi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-passbook-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}Kt("");var hi,mi;function gi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-images-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__android__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__android__image__app-ui__image-slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__android__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 570px;\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");var vi=kt(mi?hi:(mi=1,hi=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,a;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!==r--;){var o=a[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}));function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bi.apply(null,arguments)}function wi(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function yi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}const xi="NOT_LOADED",ki="LOADING",Ei="LOADED",ji="FAILED",Ni="AUTH_FAILURE";class Si{static async load(e,t){var n;const i=e.libraries?e.libraries.split(","):[],r=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=Ei),this.notifyLoadingStatusListeners()):(this.serializedApiParams=r,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==r&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...i];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var i;const r=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),r.async=!0,r.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),r.nonce=(null==(i=document.querySelector("script[nonce]"))?void 0:i.nonce)||"",r.onerror=()=>{this.loadingStatus=ji,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=Ei,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=Ni,this.notifyLoadingStatusListeners()},this.loadingStatus=ki,this.notifyLoadingStatusListeners(),document.head.append(r)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}Si.loadingStatus=xi,Si.serializedApiParams=void 0,Si.listeners=[];const Ci=["onLoad","onError","apiKey","version","libraries"],Ti=["children"],Ai=t.createContext(null);const Pi=e=>{const{children:n}=e,i=wi(e,Ti),{mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s}=function(){const[e,n]=t.useState({});return{mapInstances:e,addMapInstance:(e,t="default")=>{n((n=>bi({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>wi(t,[e].map(yi))))},clearMapInstances:()=>{n({})}}}(),{status:c,loadedLibraries:l,importLibrary:p}=function(e){const{onLoad:n,onError:i,apiKey:r,version:a,libraries:o=[]}=e,s=wi(e,Ci),[c,l]=t.useState(Si.loadingStatus),[p,d]=t.useReducer(((e,t)=>e[t.name]?e:bi({},e,{[t.name]:t.value})),{}),_=t.useMemo((()=>null==o?void 0:o.join(",")),[o]),u=t.useMemo((()=>JSON.stringify(bi({apiKey:r,version:a},s))),[r,a,s]),f=t.useCallback((async e=>{var t;if(p[e])return p[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return d({name:e,value:n}),n}),[p]);return t.useEffect((()=>{(async()=>{try{const e=bi({key:r},s);a&&(e.v=a),(null==_?void 0:_.length)>0&&(e.libraries=_),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await Si.load(e,(e=>l(e)));for(const e of["core","maps",...o])await f(e);n&&n()}catch(e){i?i(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[r,_,u]),{status:c,loadedLibraries:p,importLibrary:f}}(i),d=t.useMemo((()=>({mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s,status:c,loadedLibraries:l,importLibrary:p})),[r,a,o,s,c,l,p]);return t.createElement(Ai.Provider,{value:d},n)};function Mi(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Oi.includes(e)){const e=i,n=t.getCenter(),r=t.getZoom(),a=t.getHeading()||0,o=t.getTilt()||0,s=t.getBounds();return n&&s&&Number.isFinite(r)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:a,tilt:o,bounds:(null==s?void 0:s.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(Ii.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=i;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(r=n.latLng)?void 0:r.toJSON())||null,placeId:n.placeId},e}return i}const Li={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Oi=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Ii=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Ri=Object.keys(Li);const Ui=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Bi(e,n){const i={},r=Object.keys(n);for(const e of r)Ui.has(e)&&(i[e]=n[e]);!function(e,n){const i=t.useRef(void 0);i.current&&vi(n,i.current)||(i.current=n),t.useEffect(e,i.current)}((()=>{e&&e.setOptions(i)}),[i])}function Hi(){var e;return(null==(e=t.useContext(Ai))?void 0:e.status)||xi}function Fi(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const Di=()=>t.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},t.createElement("h2",null,"Error: AuthFailure"),t.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",t.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function zi(){return Hi()===Ei}function Gi(e){const n=function(){const[,e]=t.useReducer((e=>e+1),0);return e}(),i=t.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return t.useEffect((()=>{if(!e)return;const t=google.maps.event.addListener(e,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),i=e.getZoom(),r=e.getHeading()||0,a=e.getTilt()||0,o=e.getBounds();n&&o&&Number.isFinite(i)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:i||0,heading:r,tilt:a})}(e,i),n()}));return()=>t.remove()}),[e,n]),i}const Zi=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Vi=["padding"];class $i{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function Wi(e,n){const i=zi(),[r,a]=t.useState(null),[o,s]=function(){const[e,n]=t.useState(null);return[e,t.useCallback((e=>n(e)),[n])]}(),c=Gi(r),{id:l,defaultBounds:p,defaultCenter:d,defaultZoom:_,defaultHeading:u,defaultTilt:f,reuseMaps:h,renderingType:m,colorScheme:g}=e,v=wi(e,Zi),b=void 0!==e.zoom||void 0!==e.defaultZoom,w=void 0!==e.center||void 0!==e.defaultCenter;p||b&&w||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&d&&(v.center=d),!v.zoom&&Number.isFinite(_)&&(v.zoom=_),!v.heading&&Number.isFinite(u)&&(v.heading=u),!v.tilt&&Number.isFinite(f)&&(v.tilt=f);for(const e of Object.keys(v))void 0===v[e]&&delete v[e];const y=t.useRef(void 0);return t.useEffect((()=>{if(!o||!i)return;const{addMapInstance:t,removeMapInstance:r}=n,{mapId:s}=e,d=`${s||"default"}:${m||"default"}:${g||"LIGHT"}`;let _,u;if(h&&$i.has(d)?(u=$i.pop(d),_=u.getDiv(),o.appendChild(_),u.setOptions(v),setTimeout((()=>u.setCenter(u.getCenter())),0)):(_=document.createElement("div"),_.style.height="100%",o.appendChild(_),u=new google.maps.Map(_,bi({},v,m?{renderingType:m}:{},g?{colorScheme:g}:{}))),a(u),t(u,l),p){const{padding:e}=p,t=wi(p,Vi);u.fitBounds(t,e)}else b&&w||u.fitBounds({east:180,west:-180,south:-90,north:90});if(y.current){const{mapId:e,cameraState:t}=y.current;e!==s&&u.setOptions(t)}return()=>{y.current={mapId:s,cameraState:c.current},_.remove(),h?$i.push(d,u):google.maps.event.clearInstanceListeners(u),a(null),r(l)}}),[o,i,l,e.mapId,e.renderingType,e.colorScheme]),[r,s,c]}$i.entries={};const Ki=t.createContext(null),qi=e=>{const{children:n,id:i,className:r,style:a}=e,o=t.useContext(Ai),s=Hi();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[c,l,p]=Wi(e,o);!function(e,n,i){const r=i.center?Fi(i.center):null;let a=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(a=r.lat,o=r.lng);const s=Number.isFinite(i.zoom)?i.zoom:null,c=Number.isFinite(i.heading)?i.heading:null,l=Number.isFinite(i.tilt)?i.tilt:null;t.useLayoutEffect((()=>{if(!e)return;const t={};let i=!1;null===a||null===o||n.current.center.lat===a&&n.current.center.lng===o||(t.center={lat:a,lng:o},i=!0),null!==s&&n.current.zoom!==s&&(t.zoom=s,i=!0),null!==c&&n.current.heading!==c&&(t.heading=c,i=!0),null!==l&&n.current.tilt!==l&&(t.tilt=l,i=!0),i&&e.moveCamera(t)}))}(c,p,e),function(e,n){for(const i of Ri){const r=n[i],a=Li[i];t.useEffect((()=>{if(!e)return;if(!r)return;const t=google.maps.event.addListener(e,a,(t=>{r(Mi(a,e,t))}));return()=>t.remove()}),[e,a,r])}}(c,e),Bi(c,e);const d=function(e,n){const{viewport:i,viewState:r}=n,a=!!i;return t.useLayoutEffect((()=>{if(!e||!r)return;const{latitude:t,longitude:n,bearing:i,pitch:a,zoom:o}=r;e.moveCamera({center:{lat:t,lng:n},heading:i,tilt:a,zoom:o+1})}),[e,r]),a}(c,e),_=!!e.controlled;t.useEffect((()=>{if(c)return d&&c.setOptions({disableDefaultUI:!0}),(d||_)&&c.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{c.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[c,d,_,e.gestureHandling,e.keyboardShortcuts]);const u=e.center?Fi(e.center):null;let f=null,h=null;u&&Number.isFinite(u.lat)&&Number.isFinite(u.lng)&&(f=u.lat,h=u.lng);const m=t.useMemo((()=>{var t,n,i,r,a;return{center:{lat:null!=(t=f)?t:0,lng:null!=(n=h)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(r=e.heading)?r:0,tilt:null!=(a=e.tilt)?a:0}}),[f,h,e.zoom,e.heading,e.tilt]);t.useLayoutEffect((()=>{if(!c||!_)return;c.moveCamera(m);const e=c.addListener("bounds_changed",(()=>{c.moveCamera(m)}));return()=>e.remove()}),[c,_,m]);const g=t.useMemo((()=>bi({width:"100%",height:"100%",position:"relative",zIndex:d?-1:0},a)),[a,d]),v=t.useMemo((()=>({map:c})),[c]);return s===Ni?t.createElement("div",{style:bi({position:"relative"},r?{}:g),className:r},t.createElement(Di,null)):t.createElement("div",bi({ref:l,"data-testid":"map",style:r?void 0:g,className:r},i?{id:i}:{}),c?t.createElement(Ki.Provider,{value:v},n):null)};qi.deckGLViewProps=!0;const Xi=new Set;const Yi=(e=null)=>{const n=t.useContext(Ai),{map:i}=t.useContext(Ki)||{};if(null===n)return function(...e){const t=JSON.stringify(e);Xi.has(t)||(Xi.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=n;return null!==e?r[e]||null:i||(r.default||null)};function Ji(e,n,i){t.useEffect((()=>{if(!e||!n||!i)return;const t=google.maps.event.addListener(e,n,i);return()=>t.remove()}),[e,n,i])}function Qi(e,n,i){t.useEffect((()=>{e&&(e[n]=i)}),[e,n,i])}function er(e,n,i){t.useEffect((()=>{if(e&&n&&i)return e.addEventListener(n,i),()=>e.removeEventListener(n,i)}),[e,n,i])}const tr=t.createContext(null),nr={BOTTOM:["50%","100%"]},ir=({children:e,styles:n,className:i,anchorPoint:r})=>{const[a,o]=null!=r?r:nr.BOTTOM;let s=`-${a}`,c=`-${o}`;a.trimStart().startsWith("-")&&(s=a.substring(1)),o.trimStart().startsWith("-")&&(c=o.substring(1));const l=`translate(50%, 100%) translate(${s}, ${c})`;return t.createElement("div",{style:{transform:l}},t.createElement("div",{className:i,style:n},e))};function rr(e){const[n,i]=t.useState(null),[r,a]=t.useState(null),o=Yi(),s=function(e){const n=zi(),i=t.useContext(Ai);return t.useEffect((()=>{n&&i&&i.importLibrary(e)}),[n,i,e]),(null==i?void 0:i.loadedLibraries[e])||null}("marker"),{children:c,onClick:l,className:p,onMouseEnter:d,onMouseLeave:_,onDrag:u,onDragStart:f,onDragEnd:h,collisionBehavior:m,clickable:g,draggable:v,position:b,title:w,zIndex:y}=e,x=t.Children.count(c);return t.useEffect((()=>{if(!o||!s)return;const e=new s.AdvancedMarkerElement;e.map=o,i(e);let t=null;return x>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),i(null),a(null)}}),[o,s,x]),t.useEffect((()=>{!n||!n.content||x>0||(n.content.className=p||"")}),[n,p,x]),Qi(n,"position",b),Qi(n,"title",null!=w?w:""),Qi(n,"zIndex",y),Qi(n,"collisionBehavior",m),t.useEffect((()=>{n&&(n.gmpDraggable=void 0!==v?v:!!(u||f||h))}),[n,v,u,h,f]),t.useEffect((()=>{if(!n)return;const e=void 0!==g||Boolean(l)||Boolean(d)||Boolean(_);n.gmpClickable=e,e&&null!=n&&n.content&&n.content.nodeType===Node.ELEMENT_NODE&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,g,l,d,_]),Ji(n,"click",l),Ji(n,"drag",u),Ji(n,"dragstart",f),Ji(n,"dragend",h),er(null==n?void 0:n.element,"mouseenter",d),er(null==n?void 0:n.element,"mouseleave",_),[n,r]}t.forwardRef(((e,i)=>{const{children:r,style:a,className:o,anchorPoint:s}=e,[c,l]=rr(e),p=t.useMemo((()=>c?{marker:c}:null),[c]);return t.useImperativeHandle(i,(()=>c),[c]),l?t.createElement(tr.Provider,{value:p},n.createPortal(t.createElement(ir,{anchorPoint:s,styles:a,className:o},r),l)):null}));const ar=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const or=t.forwardRef(((e,n)=>{const i=function(e){const[n,i]=t.useState(null),r=Yi(),{onClick:a,onDrag:o,onDragStart:s,onDragEnd:c,onMouseOver:l,onMouseOut:p}=e,d=wi(e,ar),{position:_,draggable:u}=d;return t.useEffect((()=>{if(!r)return void(void 0===r&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(d);return e.setMap(r),i(e),()=>{e.setMap(null),i(null)}}),[r]),t.useEffect((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),o&&t.addListener(e,"drag",o),s&&t.addListener(e,"dragstart",s),c&&t.addListener(e,"dragend",c),l&&t.addListener(e,"mouseover",l),p&&t.addListener(e,"mouseout",p),n.setDraggable(Boolean(u)),()=>{t.clearInstanceListeners(e)}}),[n,u,a,o,s,c,l,p]),t.useEffect((()=>{n&&d&&n.setOptions(d)}),[n,d]),t.useEffect((()=>{!u&&_&&n&&n.setPosition(_)}),[u,_,n]),n}(e);return t.useImperativeHandle(n,(()=>i),[i]),t.createElement(t.Fragment,null)}));function sr({notification:n,width:i,height:r}){const{googleMapsAPIKey:a}=Pn(),[o,s]=t.useState(!1),c=t.useMemo((()=>function(e){const t=[];return e.content.forEach((e=>{t.push({title:e.data.title,latitude:e.data.latitude,longitude:e.data.longitude})})),t}(n).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title})))),[n.content]),l=t.useMemo((()=>c.length>0?{lat:c[0].lat,lng:c[0].lng}:{lat:0,lng:0}),[c]);return t.useEffect((()=>{s(!0)}),[]),0!==c.length&&o?e.jsx("div",{"data-testid":"map-notification",children:e.jsx(Pi,{apiKey:a||"",children:e.jsx(cr,{markers:c,center:l,width:i,height:r})})}):e.jsx(tn,{})}function cr({markers:t,center:n,width:i,height:r}){const a=Hi(),o=Bt();return e.jsxs("div",{style:{width:i,height:r,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[a===ki&&e.jsx(tn,{}),a===Ni&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsAuthFailure",defaultMessage:an["preview.error.googleMapsAuthFailure"]})}),a===ji&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsLoadFailure",defaultMessage:an["preview.error.googleMapsLoadFailure"]})}),a===Ei&&e.jsx(qi,{style:{width:i,height:r},defaultCenter:n,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:t.map((t=>e.jsx(or,{position:{lat:t.lat,lng:t.lng},title:t.title},t.id)))})]})}Kt("");function lr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"android-app-ui-map-notification",children:[e.jsx(ci,{title:r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"570px"})]})}Kt("");var pr;function dr({notification:t}){const n=qn(),i=new URL("/store/apps/details","https://play.google.com");return i.searchParams.set("id",n.androidPackageName||""),e.jsxs("div",{"data-testid":"android-app-ui-rate-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),e.jsx(Bn,{url:i.toString(),platform:"Android",width:338,height:570})]})}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_r.apply(null,arguments)}Kt("");var ur=function(e){return r.createElement("svg",_r({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid slice",viewBox:"1757.501 1648.178 806.546 806.694"},e),pr||(pr=r.createElement("rect",{width:"100%",height:"100%",fill:"transparent"})),r.createElement("path",{d:"M-33.085-33.085h66.17v66.17h-66.17z",style:{fill:"#232c2a",strokeWidth:1},transform:"translate(2160.42 2051.46)scale(12.2)"}),r.createElement("circle",{r:35,style:{fill:"#232c2a",stroke:"#444",strokeWidth:1},transform:"matrix(7.2 0 0 7.2 2160.42 2051.79)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"rotate(-135 1505.372 579.04)scale(15.19 -.07)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.71 -10.71 -.05 -.05 2160.62 2052.92)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.69 0 0 -.07 2160.36 2053.16)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 1896.9 2052.81)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 2423.68 2053.49)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.69 0 0 .07 2160.38 1790.29)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.68 0 0 .07 2160.42 2313.82)"}))};function fr({notification:t}){var n;const i=qn();return e.jsx("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e.jsxs("div",{className:"notificare__push__android__alert__app-ui__header",children:[e.jsx("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:i.icon?e.jsx("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:i.icon}):e.jsx(ur,{className:"notificare__push__android__alert__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__title",children:t.title||i.name})]}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__message",children:t.message}),Yn(t)&&e.jsxs("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(n=t.actions)||void 0===n?void 0:n.map(((t,n)=>e.jsx("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:e.jsx(Vt,{id:"preview.android.alert.appUi.cancel",defaultMessage:an["preview.android.alert.appUi.cancel"]})},"cancel-button-label")]})]})})}Kt(".notificare .notificare__push__android__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__android__alert__app-ui__wrapper {\n position: relative;\n background-color: #fff;\n width: 290px;\n border-radius: 2px;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n/* Header - App Icon and Title */\n\n.notificare .notificare__push__android__alert__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__alert__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__header {\n display: flex;\n align-items: center;\n column-gap: 10px;\n padding: 20px 20px 0;\n}\n\n.notificare .notificare__push__android__alert__app-ui__title {\n font-weight: 700;\n font-size: 18px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 208px;\n}\n\n/* Message */\n\n.notificare .notificare__push__android__alert__app-ui__message {\n font-size: 16px;\n margin-top: 20px;\n margin-bottom: 0;\n word-break: break-all;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 8;\n padding: 0 20px 20px;\n}\n\n/* Actions */\n\n.notificare .notificare__push__android__alert__app-ui__actions {\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__android__alert__app-ui__action-label {\n font-size: 14px;\n font-weight: 600;\n padding: 15px 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__alert__app-ui__cancel-label {\n font-size: 14px;\n font-weight: 600;\n color: #64706e;\n padding: 15px 20px 20px;\n}");function hr({videoData:t,width:n,height:i}){const r=()=>{switch(t.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${t.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${t.data}`;case"re.notifica.content.HTML5Video":return t.data;default:return""}};return"re.notifica.content.YouTube"===t.type||"re.notifica.content.Vimeo"===t.type?e.jsx("iframe",{className:"notificare__push__video-rich-content",src:r(),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",width:n,height:i}):e.jsx("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:e.jsx("source",{src:r(),type:"video/mp4"})})}Kt(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function mr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-video-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:t.content[0],width:"100%",height:"570px"})]})}Kt("");function gr({notification:t}){const n=qn(),i=t.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-web-view-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)&&!ti(i)}),e.jsx("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:i,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n pointer-events: none;\n}");function vr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[e.jsx("div",{className:"notificare__push__android__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__android__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content-top "+(ei(t)&&!n?"notificare__push__android__lock-screen__text-content-top--has-media":""),children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__title-and-subtitle",children:[e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:n?a.name:t.title||a.name}),t.subtitle&&!ei(t)&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:t.subtitle})]}),e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.android.lockscreen.time",defaultMessage:an["preview.android.lockscreen.time"]})})]}),n&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:t.title}),e.jsx("p",{className:`notificare__push__android__lock-screen__text ${n?"notificare__push__android__lock-screen__text--expanded-message":""} ${ei(t)&&!n?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:t.message}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__android__lock-screen__expanded-media",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Expanded media","data-testid":"android-lock-screen-notification-expanded-media"})]}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__android__lock-screen__media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"android-lock-screen-notification-media"})]})}Kt(".notificare .notificare__push__android__lock-screen {\n position: absolute;\n font-family: 'Roboto', sans-serif;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n padding: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 11px;\n left: 50%;\n transform: translateX(-50%);\n top: 40px;\n}\n\n.notificare .notificare__push__android__lock-screen__wrapper {\n position: relative;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__android__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__android__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top--has-media {\n max-width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle {\n display: flex;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__android__lock-screen__text {\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__android__lock-screen__text--title {\n font-weight: 700;\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-title {\n font-weight: 700;\n font-size: 14px;\n margin-top: 5px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--subtitle {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n flex-shrink: 0;\n max-width: 135px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-without-media {\n font-size: 14px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-with-media {\n font-size: 14px;\n width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-message {\n font-size: 14px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n word-break: break-word;\n width: 252px;\n white-space: wrap;\n}\n\n/* Media */\n\n.notificare .notificare__push__android__lock-screen__media {\n width: 50px;\n border-radius: 5px;\n object-fit: cover;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media {\n width: 252px;\n max-height: 168px;\n border-radius: 15px;\n margin-top: 5px;\n}\n");function br({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(vr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx(fr,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(gr,{notification:n}),theme:"light"};case"re.notifica.notification.URL":return{preview:e.jsx(pi,{notification:n}),theme:"light"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx($n,{notification:n}),theme:"light"};case"re.notifica.notification.Image":return{preview:e.jsx(gi,{notification:n}),theme:"light"};case"re.notifica.notification.Map":return{preview:e.jsx(lr,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.Rate":return{preview:e.jsx(dr,{notification:n}),theme:"light"};case"re.notifica.notification.Passbook":return{preview:e.jsx(fi,{notification:n}),theme:"light"};case"re.notifica.notification.Video":return{preview:e.jsx(mr,{notification:n}),theme:"light"};case"re.notifica.notification.Store":return{preview:e.jsx(ui,{notification:n}),theme:"light"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(_i,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(qt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__android__preview",children:o.preview})})}Kt(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function wr(t){const{url:n}=t;return e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.done",defaultMessage:an["preview.ios.inAppBrowser.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[On(n)?e.jsx(Dn,{className:"notificare__push__ios__in-app-browser__app-ui__bar-lock-icon"}):e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.notSecure",defaultMessage:an["preview.ios.inAppBrowser.appUi.notSecure"]})}),e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:In(n)})]})]})}Kt(".notificare .notificare__push__ios__in-app-browser__app-ui__bar {\n display: flex;\n width: 100%;\n padding: 12px 0;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n margin-top: 10px;\n background-color: #fff;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-done-button {\n font-size: 14px;\n font-weight: 700;\n position: absolute;\n left: 0;\n margin-left: 15px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-lock-icon {\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-domain {\n display: flex;\n column-gap: 5px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-not-secure {\n color: #64706e;\n font-weight: 400;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-url {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}");function yr({notification:t}){const n=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[e.jsx(wr,{url:n}),e.jsx(Bn,{url:n,platform:"iOS",width:338,height:564})]})}Kt("");function xr({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__ios__app-ui__title-bar",children:[e.jsx("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:t}),n&&e.jsx(si,{className:"notificare__push__ios__app-ui__title-bar-options-button","data-testid":"ios-app-ui-title-bar-options-button"})]})}Kt(".notificare .notificare__push__ios__app-ui__title-bar {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n background-color: #fff;\n margin-top: 10px;\n position: relative;\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-text {\n padding: 11px 25px;\n font-size: 14px;\n font-weight: 700;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n max-width: 255px;\n position: relative;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-options-button {\n width: 20px;\n margin-left: auto;\n margin-right: 12px;\n}");var kr;function Er({notification:n}){const i=n.content[0].data,r=qn(),[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,i).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[i,s]),e.jsxs("div",{"data-testid":"ios-app-ui-url-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:i,platform:"iOS",width:338,height:566})]})}function jr({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(Er,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx(yr,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Nr.apply(null,arguments)}Kt("");var Sr,Cr=function(e){return r.createElement("svg",Nr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),kr||(kr=r.createElement("path",{d:"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8zm212.4 204.4 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0zm-152 198.2 152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0"})))};function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Tr.apply(null,arguments)}var Ar,Pr=function(e){return r.createElement("svg",Tr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Sr||(Sr=r.createElement("path",{d:"M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"})))};function Mr(e){const{contentList:n}=hn(e,500),i=Bt(),[r,a]=t.useState({status:"idle"});return t.useEffect((function(){const e=function(e){for(const t of e)if("re.notifica.content.AppStore"===t.type)return t.data.identifier;return null}(n);e?(a({status:"loading"}),function(e){return l(this,void 0,void 0,(function*(){const t=new URL("/lookup","https://itunes.apple.com");t.searchParams.set("country","NL"),t.searchParams.set("id",e);const n=(Date.now()/1e3).toString();return t.searchParams.set("x",n),yield dn(t)}))}(e).then((e=>{0!==e.resultCount?a({status:"success",data:e.results[0]}):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppNotFound",defaultMessage:an["preview.error.iosStoreAppNotFound"]}))})})).catch((e=>{Ln(e,"Error fetching App Store app info:"),a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppLoadFailure",defaultMessage:an["preview.error.iosStoreAppLoadFailure"]}))})}))):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]}))})}),[n,i]),r}function Lr(e,t){var n;const i=new Intl.RelativeTimeFormat(t,{style:"long"}),r=new Date(e),a=new Date,o=Math.floor((a.getTime()-r.getTime())/1e3),s=[{value:60,unit:"second"},{value:3600,unit:"minute"},{value:86400,unit:"hour"},{value:604800,unit:"day"},{value:2592e3,unit:"week"},{value:31536e3,unit:"month"}];for(let e=0;e<s.length;e++){const{value:t,unit:r}=s[e];if(o<t){const t=Math.floor(o/((null===(n=s[e-1])||void 0===n?void 0:n.value)||1));return i.format(-t,r)}}const c=Math.floor(o/s[s.length-1].value);return i.format(-c,"year")}function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Or.apply(null,arguments)}var Ir,Rr,Ur=function(e){return r.createElement("svg",Or({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ar||(Ar=r.createElement("path",{d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Br.apply(null,arguments)}var Hr=function(e){return r.createElement("svg",Br({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ir||(Ir=r.createElement("defs",null,r.createElement("linearGradient",{id:"half-star_svg__a"},r.createElement("stop",{offset:"50%"}),r.createElement("stop",{offset:"50%",stopColor:"#ccc"})))),Rr||(Rr=r.createElement("path",{fill:"url(#half-star_svg__a)",d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Fr(t){const{rating:n}=t,i=[];for(let t=1;t<=5;t++)t<=n?i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):t-.5<=n?i.push(e.jsx(Hr,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon notificare__push__ios__store__app-ui__star-icon--empty"},t));return e.jsx("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}Kt(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon {\n width: 10px;\n height: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon--empty {\n fill: #EAEAEA;\n}");function Dr({notification:t}){const n=t.content,i=Bt(),r=Mr({contentList:n});return e.jsxs("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[e.jsx("div",{className:"notificare__push__ios__store__app-ui__bar",children:e.jsx(Vt,{id:"preview.ios.store.appUi.done",defaultMessage:an["preview.ios.store.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui",children:["loading"===r.status&&e.jsx(tn,{}),"error"===r.status&&e.jsx(sn,{message:r.error.message}),"success"===r.status&&e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[e.jsx("img",{src:r.data.artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:r.data.trackName}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:r.data.primaryGenreName})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-install",children:e.jsx(Vt,{id:"preview.ios.store.appUi.install",defaultMessage:an["preview.ios.store.appUi.install"]})})]})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.ratings",defaultMessage:an["preview.ios.store.appUi.ratings"],values:{userRatingCount:r.data.userRatingCount}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.averageUserRating.toFixed(1)}),e.jsx(Fr,{rating:r.data.averageUserRating})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.age",defaultMessage:an["preview.ios.store.appUi.age"]})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.trackContentRating}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:e.jsx(Vt,{id:"preview.ios.store.appUi.yearsOld",defaultMessage:an["preview.ios.store.appUi.yearsOld"]})})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.category",defaultMessage:an["preview.ios.store.appUi.category"]})}),e.jsx(Cr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.primaryGenreName})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.developer",defaultMessage:an["preview.ios.store.appUi.developer"]})}),e.jsx(Pr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.sellerName})]})]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.whatsNew",defaultMessage:an["preview.ios.store.appUi.whatsNew"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:e.jsx(Vt,{id:"preview.ios.store.appUi.historyVersion",defaultMessage:an["preview.ios.store.appUi.historyVersion"],values:{version:r.data.version}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:Lr(r.data.currentVersionReleaseDate,i.locale)})]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:r.data.releaseNotes})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.screenshots",defaultMessage:an["preview.ios.store.appUi.screenshots"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[e.jsx("img",{src:r.data.screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),e.jsx("img",{src:r.data.screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})]})]})}Kt("/* Top Bar */\n\n.notificare .notificare__push__ios__store__app-ui__bar {\n display: flex;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n font-size: 14px;\n font-weight: 700;\n padding: 11px 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: #fff;\n margin-top: 10px;\n}\n\n/* --- App Recommendation Content --- */\n\n.notificare .notificare__push__ios__store__app-ui {\n height: 566px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page {\n width: 100%;\n overflow: hidden;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__store__app-ui__page-header {\n width: 100%;\n padding: 15px;\n display: flex;\n column-gap: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__app-icon {\n width: 90px;\n height: 90px;\n border-radius: 15px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-info {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-name {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-category {\n font-size: 12px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-install {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 7px 12px;\n background: #3b82f6;\n color: #fff;\n border-radius: 15px;\n width: max-content;\n}\n\n/* Other info */\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info-wrapper {\n padding: 0 15px;\n width: calc(100% - 15px);\n overflow: hidden;\n position: relative;\n margin-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info {\n display: flex;\n width: 1000px;\n border-bottom: 1px solid #f2f4f6;\n border-top: 1px solid #f2f4f6;\n position: relative;\n box-sizing: border-box;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block {\n padding: 5px;\n width: 85px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-title {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-value {\n font-size: 30px;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-icon {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-bottom-text {\n font-size: 11px;\n text-align: center;\n}\n\n/* History */\n\n.notificare .notificare__push__ios__store__app-ui__page-history {\n margin: 0 15px;\n border-bottom: 1px solid #f2f4f6;\n padding-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version-last-update {\n display: flex;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version {\n font-size: 12px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-last-update {\n font-size: 11px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-notes {\n margin-top: 5px;\n font-size: 12px;\n max-height: 60px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n padding-right: 5px;\n word-break: break-word;\n}\n\n/* Previews */\n\n.notificare .notificare__push__ios__store__app-ui__page-previews {\n margin-top: 15px;\n padding: 0 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-images {\n display: flex;\n max-height: 400px;\n overflow: hidden;\n column-gap: 8px;\n margin-top: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-preview-image {\n border-radius: 15px;\n width: 150px;\n}");function zr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-passbook-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}Kt("");function Gr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-images-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__ios__image__app-ui__slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__ios__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 566px;\n background-color: white;\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");function Zr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"ios-app-ui-map-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"566px"})]})}Kt("");function Vr({title:t}){const n=qn();return e.jsx("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e.jsxs("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[e.jsx("p",{className:"notificare__push__ios__rate__app-ui__header",children:t||n.name}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.rateNow",defaultMessage:an["preview.ios.rate.appUi.rateNow"]})}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.doNotRate",defaultMessage:an["preview.ios.rate.appUi.doNotRate"]})})]})})}Kt(".notificare .notificare__push__ios__rate__app-ui {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__ios__rate__app-ui__wrapper {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__rate__app-ui__header {\n padding: 20px;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n word-break: break-word;\n}\n\n/* Actions */\n\n.notificare .notificare__push__ios__rate__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-top: 1px solid #f2f4f6;\n font-size: 14px;\n font-weight: 700;\n}");function $r({notification:t}){var n,i;const r=qn();return e.jsx("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[e.jsx("p",{className:"notificare__push__ios__alert__app-ui__title",children:t.title||r.name}),e.jsx("p",{className:"notificare__push__ios__alert__app-ui__message",children:t.message})]}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__actions",children:Jn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[e.jsx("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--single","data-testid":"ios-app-ui-text-alert-notification-single-action",children:null===(n=t.actions)||void 0===n?void 0:n[0].label})]}):Qn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(i=t.actions)||void 0===i?void 0:i.map(((t,n)=>e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--multiple","data-testid":`ios-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})})]}):e.jsx("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.ok",defaultMessage:an["preview.ios.alert.appUi.ok"]})})})]})})}Kt(".notificare .notificare__push__ios__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__background {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header - Title and Message */\n\n.notificare .notificare__push__ios__alert__app-ui__title-and-message {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__title {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__message {\n margin-top: 3px;\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n\n/* --- Actions --- */\n\n.notificare .notificare__push__ios__alert__app-ui__actions {\n font-size: 14px;\n font-weight: 700;\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Single Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-single {\n display: flex;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__single-cancel {\n padding: 10px 20px;\n border-right: 1px solid #f2f4f6;\n width: 50%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--single {\n width: 50%;\n}\n\n/* Multiple Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-multiple {\n display: flex;\n flex-direction: column;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__multiple-cancel {\n padding: 10px 20px;\n width: 100%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--multiple {\n width: 100%;\n border-bottom: 1px solid #f2f4f6;\n}\n\n/* No Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__no-actions {\n width: 100%;\n text-align: center;\n padding: 10px 20px;\n}");function Wr({notification:t}){const n=t.content[0],i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-video-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:n,width:"100%",height:"566px"})]})}Kt("");function Kr({notification:t}){const n=t.content[0].data,i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-web-view-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)&&!ti(n)}),e.jsx("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:n,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n pointer-events: none;\n}");function qr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__ios__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__ios__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.title||a.name}),e.jsx("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.ios.lockScreen.time",defaultMessage:an["preview.ios.lockScreen.time"]})})]}),t.subtitle&&e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.subtitle}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(ei(t)&&!n?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:t.message}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}Kt(".notificare .notificare__push__ios__lock-screen {\n position: absolute;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n left: 50%;\n transform: translateX(-50%);\n bottom: 80px;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__main-content {\n width: 100%;\n display: flex;\n align-items: center;\n column-gap: 11px;\n padding: 10px;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__ios__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n width: 35px;\n height: 35px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__ios__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__ios__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 249px;\n}\n\n.notificare .notificare__push__ios__lock-screen__title-and-time {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n position: relative;\n width: 100%;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__lock-screen__text {\n font-size: 13px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--title-or-subtitle {\n font-weight: 700;\n width: 210px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--expanded-title-or-subtitle {\n font-weight: 700;\n width: 210px;\n white-space: wrap;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n text-align: right;\n flex-shrink: 0;\n max-width: 130px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-without-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 242px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-with-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 210px;\n}\n\n/* Media */\n\n.notificare .notificare__push__ios__lock-screen__message-and-media {\n display: flex;\n column-gap: 7px;\n}\n\n.notificare .notificare__push__ios__lock-screen__media-image {\n border-radius: 5px;\n object-fit: cover;\n width: 32px;\n height: 32px;\n align-self: flex-start;\n justify-self: flex-end;\n}\n\n.notificare .notificare__push__ios__lock-screen__expanded-media {\n object-fit: cover;\n width: 100%;\n max-height: 275px;\n overflow: hidden;\n display: block;\n}\n");var Xr;function Yr({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(qr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx($r,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(Kr,{notification:n}),theme:"dark"};case"re.notifica.notification.URL":return{preview:e.jsx(Er,{notification:n}),theme:"dark"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx(yr,{notification:n}),theme:"dark"};case"re.notifica.notification.Image":return{preview:e.jsx(Gr,{notification:n}),theme:"dark"};case"re.notifica.notification.Map":return{preview:e.jsx(Zr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.Rate":return{preview:e.jsx(Vr,{title:n.title}),theme:"dark"};case"re.notifica.notification.Passbook":return{preview:e.jsx(zr,{notification:n}),theme:"dark"};case"re.notifica.notification.Video":return{preview:e.jsx(Wr,{notification:n}),theme:"dark"};case"re.notifica.notification.Store":return{preview:e.jsx(Dr,{notification:n}),theme:"dark"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(jr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(Yt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__ios__preview",children:o.preview})})}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jr.apply(null,arguments)}Kt(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");var Qr=function(e){return r.createElement("svg",Jr({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"},e),Xr||(Xr=r.createElement("defs",null,r.createElement("linearGradient",{id:"google-chrome_svg__a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#d93025"}),r.createElement("stop",{offset:1,stopColor:"#ea4335"})),r.createElement("linearGradient",{id:"google-chrome_svg__b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#fcc934"}),r.createElement("stop",{offset:1,stopColor:"#fbbc04"})),r.createElement("linearGradient",{id:"google-chrome_svg__c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#1e8e3e"}),r.createElement("stop",{offset:1,stopColor:"#34a853"})))),r.createElement("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),r.createElement("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36m31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18",style:{fill:"none"}}),r.createElement("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12",style:{fill:"url(#google-chrome_svg__a)"}}),r.createElement("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),r.createElement("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99",style:{fill:"url(#google-chrome_svg__b)"}}),r.createElement("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007",style:{fill:"url(#google-chrome_svg__c)"}}))};function ea(t){const{open:n,disabled:i,onToggle:r}=t;return e.jsx("button",{disabled:i,className:"notificare__push__web__desktop__lock-screen__expand-button "+(n?"notificare__push__web__desktop__lock-screen__expand-button--rotated":""),onClick:r,"data-testid":"web-desktop-expand-button",children:e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__expand-button-svg"})})}Kt(".notificare .notificare__push__web__desktop__lock-screen__expand-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.4s ease;\n transform: rotate(270deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button--rotated {\n transform: rotate(360deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-svg {\n width: 11px;\n height: 11px;\n fill: #9e9e9e;\n}");var ta;function na({notification:n}){var i,r,a;const[o,s]=t.useState("collapsed"),[c,l]=t.useState(!1),[p,d]=t.useState(-1),[_,u]=t.useState(!1),f=t.useRef(null),h=t.useRef(null),m=qn();function g(){f.current&&clearTimeout(f.current)}return t.useEffect((function(){if(ei(n)||Yn(n))u(!0);else if(h.current){const e=3,t=window.getComputedStyle(h.current),n=parseFloat(t.lineHeight),i=h.current.scrollHeight;u(i>n*e)}else;}),[n]),t.useEffect((function(){return()=>{g()}}),[]),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen "+("expanded"===o?"notificare__push__web__desktop__lock-screen--expanded":"notificare__push__web__desktop__lock-screen--collapsed"),"data-testid":"web-desktop-notification",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:e.jsx(Qr,{className:"notificare__push__web__desktop__lock-screen__browser-icon-svg","aria-label":"Google Chrome icon"})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__time-and-title-wrapper",children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:n.title||m.name}),!c&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__time-container "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__time-container--hidden":""),children:e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.time",defaultMessage:an["preview.web.desktop.macos.lockScreen.time"]})})})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:m.websitePushConfig&&m.websitePushConfig.allowedDomains.length>0?In(m.websitePushConfig.allowedDomains[0]):"example.com"}),e.jsx("p",{ref:h,className:`notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--message ${"expanded"===o?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--collapsed-message"} ${"expanded"!==o&&ei(n)?"notificare__push__web__desktop__lock_screen__text--message-with-attachment":""}`,children:n.message})]}),!c&&ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__small-media "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__small-media--hidden":""),src:null===(i=n.attachments)||void 0===i?void 0:i[0].uri,alt:"Small media icon"})]})]})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content "+("expanded"===o?"notificare__push__web__desktop__lock-screen__expanded-content--visible":""),children:[ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(r=n.attachments)||void 0===r?void 0:r[0].uri,alt:"Expanded media"}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(a=n.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>d(n),onMouseLeave:()=>d(-1),"data-testid":`web-desktop-expanded-action-${n.toString()}`,children:t.label}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor "+(p===n||p-1===n?"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent":"")})]},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e,t;return d(null!==(t=null===(e=n.actions)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)},onMouseLeave:()=>d(-1),children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]}),_&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container "+(c||"collapsed"!==o?"notificare__push__web__desktop__lock-screen__expand-button-container--visible":""),children:e.jsx(ea,{open:"expanded"===o,disabled:!1,onToggle:function(){if(g(),"expanded"!==o)return l(!1),void s("expanded");s("collapsing"),f.current=setTimeout((()=>{s("collapsed")}),400)}})}),e.jsx("div",{className:`notificare__push__web__desktop__lock-screen__settings-button-container ${c?"notificare__push__web__desktop__lock-screen__settings-button-container--visible":""} ${"collapsed"!==o?"notificare__push__web__desktop__lock-screen__settings-button-container--hidden":""}`,children:n.actions&&n.actions.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>l(!c),"data-testid":"web-desktop-settings-button",children:[e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.options",defaultMessage:an["preview.web.desktop.macos.lockScreen.options"]}),e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__settings-button-expand-icon"})]}),c&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option","data-testid":`web-desktop-options-action-${n.toString()}`,children:t.label},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]})]}):e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})})]})}function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ia.apply(null,arguments)}Kt("/* Preview Wrapper */\n\n.notificare .notificare__push__web__desktop__lock-screen {\n position: relative;\n background-color: #f4f4f4;\n width: 340px;\n border-radius: 15px;\n border: 1px solid #e4e4e4;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);\n transition: max-height 0.4s ease-in-out, overflow 0s ease-in-out 1s;\n align-self: start;\n max-height: 113px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--collapsed {\n animation: showOverflow 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--expanded {\n max-height: 500px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__time-container {\n opacity: 0;\n max-width: 0;\n transition: opacity 0.2s ease-in-out, max-width 0s linear 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__small-media {\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover :is(.notificare__push__web__desktop__lock-screen__settings-button-container, .notificare__push__web__desktop__lock-screen__expand-button-container) {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s;\n}\n\n/* Expand Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n visibility: hidden;\n opacity: 0;\n transition: visibility linear 0.2s, opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n/* MAIN CONTENT */\n\n.notificare .notificare__push__web__desktop__lock-screen__main-content {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n column-gap: 10px;\n padding: 12px;\n}\n\n/* Browser Icon */\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-background {\n background-color: #ffffff;\n border-radius: 10px;\n padding: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-svg {\n width: 30px;\n height: auto;\n}\n\n/* Main notification content */\n\n.notificare .notificare__push__web__desktop__lock-screen__text-content {\n width: 100%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-and-title-wrapper {\n position: relative;\n display: flex;\n width: 266px;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container {\n margin-left: auto;\n flex-shrink: 0;\n max-width: 80px;\n transition: opacity 0.2s ease-in-out, max-width 0s linear;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container--hidden {\n opacity: 0;\n max-width: 0;\n}\n\n\n.notificare .notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper {\n display: flex;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text {\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--title {\n font-weight: 700;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--domain {\n font-weight: 700;\n margin-top: 2px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--message {\n margin-top: 2px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n line-height: 1.2;\n transition: max-height 0.4s ease 0s;\n max-height: 50px;\n}\n\n.notificare .notificare__push__web__desktop__lock_screen__text--message-with-attachment {\n max-width: 222px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--expandable-message {\n max-height: 300px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--collapsed-message {\n animation: applyClamp 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--time {\n font-size: 12px;\n color: #64706e;\n}\n\n/* Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media {\n display: flex;\n width: 35px;\n height: 35px;\n border-radius: 25%;\n object-fit: cover;\n transition: opacity 0.2s ease-in-out 0s;\n margin-left: auto;\n margin-top: 2px;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media--hidden {\n opacity: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-media {\n width: 100%;\n display: block;\n}\n\n/* Expanded Content */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content {\n width: 100%;\n max-height: 0;\n visibility: hidden;\n transition: visibility 0s linear 0.4s, max-height 0s linear 0.4s, padding 0s linear 0.4s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content--visible {\n padding: 0 14px 14px;\n visibility: visible;\n max-height: 500px;\n transition-delay: 0s, 0s;\n}\n\n/* SETTINGS */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container {\n position: absolute;\n bottom: 10px;\n right: 14px;\n z-index: 10;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, visibility 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--hidden {\n visibility: hidden !important;\n opacity: 0 !important;\n transition-delay: 0s !important;\n}\n\n/* Settings Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button {\n min-width: 70px;\n display: flex;\n background-color: #d6d6d6;\n border-radius: 7px;\n border: 0;\n padding: 5px 10px 5px;\n font-size: 13px;\n justify-content: center;\n box-shadow: -5px -7px 10px 10px rgba(242, 244, 246, 1);\n position: relative;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-expand-icon {\n width: 9px;\n margin-left: 4px;\n color: #000000;\n}\n\n/* Settings Selector */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector {\n background-color: #eaeaea;\n border-radius: 7px;\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);\n padding: 4px;\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 32px;\n width: max-content;\n right: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option {\n min-width: 70px;\n background-color: transparent;\n border-radius: 7px;\n font-size: 13px;\n border: 0;\n padding: 5px 10px;\n flex: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option:hover {\n background-color: #3b82f6;\n color: #fff;\n}\n\n/* Expanded Options - Actions & Settings */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n width: 102%;\n margin-left: -1%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button {\n font-size: 14px;\n border-radius: 7px;\n width: 100%;\n border: 0;\n padding: 8px;\n background-color: transparent;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button:hover {\n background-color: #efefef;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent {\n border-top: 1px solid transparent;\n}\n\n/* keyframes */\n\n@keyframes applyClamp {\n to {\n -webkit-line-clamp: 3;\n }\n}\n\n@keyframes showOverflow {\n to {\n overflow: visible;\n }\n}\n\n\n");var ra=function(e){return r.createElement("svg",ia({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em"},e),ta||(ta=r.createElement("path",{d:"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"})))};function aa({notification:t}){return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:t.content[0].data,platform:"Web",width:268,height:430})})}function oa({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.IN_APP_BROWSER:return{status:"error",errorCode:"preview.error.urlResolverNoNotificareWebViewQueryParameter"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(aa,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function sa({notification:t}){var n;return e.jsxs("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[ei(t)&&e.jsx("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(n=t.attachments)||void 0===n?void 0:n[0].uri,alt:"Notification attachment"}),e.jsxs("div",{children:[e.jsx("p",{className:"notificare__web__phone__alert__app-ui__title",children:t.title}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:t.subtitle}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__message",children:t.message})]})]})}Kt(".notificare .notificare__web__phone__alert__app-ui__media {\n max-width: 100%;\n max-height: 250px;\n aspect-ratio: 16 / 9;\n margin-bottom: 10px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__message {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}");function ca({notification:t}){return e.jsx("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})}Kt(".notificare .notificare__web__phone__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scroll-behavior: smooth;\n scrollbar-width: thin; /* Firefox */\n scrollbar-color: #bbb transparent; /* Firefox */\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}\n\n/* For Chrome, Edge and Safari */\n.notificare .notificare__web__phone__image__app-ui__image-slider::-webkit-scrollbar {\n height: 4px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 10px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-track {\n background: transparent;\n}");function la({notification:t}){return e.jsx("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:t.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"})}Kt(".notificare .notificare__web__phone__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 360px;\n background-color: #fff;\n pointer-events: none;\n}");var pa;function da({notification:n,onError:i}){var r;const a=qn(),{googleMapsAPIKey:o}=Pn(),s=Bt();return t.useEffect((function(){o||"re.notifica.notification.Map"!==n.type||i(s.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[n,o,s,i]),e.jsx("div",{className:"notificare__web__phone__app-ui",children:e.jsxs("div",{className:"notificare__web__phone__app-ui__background",children:[e.jsxs("div",{className:"notificare__web__phone__app-ui__header",children:[e.jsx("div",{className:"notificare__web__phone__app-ui__app-icon",children:(null===(r=a.websitePushConfig)||void 0===r?void 0:r.icon)?e.jsx("img",{className:"notificare__web__phone__app-ui__app-icon-image",src:a.websitePushConfig.icon,alt:"App icon"}):e.jsx(ur,{className:"notificare__web__phone__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__web__phone__app-ui__app-name",children:a.name}),e.jsx("button",{className:"notificare__web__phone__app-ui__close-button",children:e.jsx(ra,{className:"notificare__web__phone__app-ui__close-button-icon"})})]}),(()=>{switch(n.type){case"re.notifica.notification.Alert":return e.jsx(sa,{notification:n});case"re.notifica.notification.WebView":return e.jsx(la,{notification:n});case"re.notifica.notification.URL":return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:n.content[0].data,platform:"Web",width:268,height:430})});case"re.notifica.notification.Image":return e.jsx(ca,{notification:n});case"re.notifica.notification.Map":return e.jsx(sr,{notification:n,width:"100%",height:"400px"});case"re.notifica.notification.Video":return e.jsx("div",{"data-testid":"web-mobile-app-ui-video-notification",children:e.jsx(hr,{videoData:n.content[0],width:"100%",height:"430px"})});case"re.notifica.notification.URLResolver":return e.jsx(oa,{notification:n,onError:i})}})(),n.actions&&e.jsx("div",{className:n.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row",children:n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__web__phone__app-ui__action "+(0===n?"notificare__web__phone__app-ui__action--primary":"notificare__web__phone__app-ui__action--secondary"),"data-testid":`web-mobile-app-ui-action-${n.toString()}`,children:t.label},n)))})]})})}function _a({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.formFactor){case"desktop":return{status:"success",preview:e.jsx(na,{notification:n})};case"phone":switch(i.displayMode){case"app-ui":switch(n.type){case"re.notifica.notification.Alert":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.URLResolver":case"re.notifica.notification.URL":case"re.notifica.notification.Video":case"re.notifica.notification.WebView":{const t="android"===i.os?qt:Yt;return{status:"success",preview:e.jsx(t,{theme:"dark",children:e.jsx(da,{notification:n,onError:r})})}}case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Rate":case"re.notifica.notification.Store":case"re.notifica.notification.Passbook":case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return{status:"error",errorCode:"preview.error.notSupportedNotificationTypePreviewVariant"}}break;case"lockscreen":case"lockscreen-expanded":return{status:"error",errorCode:"preview.error.notSupportedPreviewVariant"}}}})();switch(t.useEffect((function(){"error"===o.status&&r(a.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,r,a]),o.status){case"success":return o.preview;case"error":return}}function ua({notification:n,previewState:i}){const[r,a]=t.useState(null),[o,s]=t.useState(i);if(o!==i&&(a(null),s(i)),r)return e.jsx(Cn,{message:r,showConsoleWarning:!1});switch(i.platform){case"android":return e.jsx(br,{notification:n,previewState:i,onError:a});case"ios":return e.jsx(Yr,{notification:n,previewState:i,onError:a});case"web":return e.jsx(_a,{notification:n,previewState:i,onError:a})}}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fa.apply(null,arguments)}Kt("/* MAIN */\n\n.notificare .notificare__web__phone__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__web__phone__app-ui__background {\n width: 300px;\n background-color: white;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n/* Header */\n\n.notificare .notificare__web__phone__app-ui__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n column-gap: 16px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__app-name {\n font-size: 18px;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n border-radius: 4px;\n padding: 0;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button:hover {\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button-icon {\n width: 24px;\n height: 24px;\n}\n\n/* Actions */\n\n.notificare .notificare__web__phone__app-ui__actions-row {\n display: flex;\n flex-wrap: wrap;\n column-gap: 8px;\n row-gap: 8px;\n flex-direction: row-reverse;\n}\n\n.notificare .notificare__web__phone__app-ui__actions-column {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n align-items: stretch;\n}\n\n.notificare .notificare__web__phone__app-ui__action {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n padding: 8px 16px;\n text-overflow: ellipsis;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n white-space: nowrap;\n border-radius: 4px;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__web__phone__app-ui__action--full-width {\n width: 100%\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary {\n background-color: transparent;\n color: #2b42f7;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary:hover {\n background-color: #f4f5f9;\n}\n");var ha,ma=function(e){return r.createElement("svg",fa({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),pa||(pa=r.createElement("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1-24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1-24 24m273.7-144.5 47.9-83a10 10 0 1 0-17.3-10l-48.5 84.1a301.3 301.3 0 0 0-246.6 0l-48.5-84a10 10 0 1 0-17.3 10l47.9 83C64.5 202.2 8.2 285.6 0 384h576c-8.2-98.5-64.5-181.8-146.9-226.6"})))};function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ga.apply(null,arguments)}var va;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ba.apply(null,arguments)}var wa;function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ya.apply(null,arguments)}var xa,ka=function(e){return r.createElement("svg",ya({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),wa||(wa=r.createElement("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"})))};function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ea.apply(null,arguments)}function ja({previewState:t,onPreviewStateChanged:n}){const i=Bt();return e.jsxs("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e.jsxs("div",{className:"notificare__push__preview-controls-toggle-groups",children:[e.jsx(Sn,{label:i.formatMessage({id:"controls.platform",defaultMessage:an["controls.platform"]}),options:Na,value:t.platform,onValueChanged:function(e){if(t.platform!==e)switch(e){case"android":case"ios":n(Object.assign(Object.assign({},t),{platform:e}));break;case"web":n(Object.assign(Object.assign({},t),{platform:"web",formFactor:"desktop",os:"macos",displayMode:"lockscreen"}))}}}),"web"===t.platform&&e.jsx(Sn,{label:i.formatMessage({id:"controls.formFactor",defaultMessage:an["controls.formFactor"]}),options:Sa,value:t.formFactor,onValueChanged:function(e){if("web"===t.platform&&t.formFactor!==e)switch(e){case"desktop":n(Object.assign(Object.assign({},t),{formFactor:e,os:"macos",displayMode:"lockscreen"}));break;case"phone":n(Object.assign(Object.assign({},t),{formFactor:e,os:"android",displayMode:"app-ui"}))}}}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Sn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ca,value:t.os,onValueChanged:function(e){"web"===t.platform&&"phone"===t.formFactor&&t.os!==e&&n(Object.assign(Object.assign({},t),{os:e}))}})]}),("android"===t.platform||"ios"===t.platform)&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:t.displayMode,onValueChanged:function(e){t.displayMode!==e&&n(Object.assign(Object.assign({},t),{displayMode:e}))}}),"web"===t.platform&&"desktop"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ta,value:t.os,disabled:!0}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:"app-ui",disabled:!0})]})}Kt(".notificare .notificare__push__preview-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 350px;\n row-gap: 14px;\n}\n\n.notificare .notificare__push__preview-controls-preview {\n margin-top: 14px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-groups {\n display: flex;\n align-items: center;\n column-gap: 30px;\n align-self: start;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divider {\n width: 20px;\n height: 20px;\n animation: fadeIn 0.3s ease-out;\n}\n\n/* Icons */\n\n.notificare .notificare__push__preview-controls-android-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-ios-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-html5-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-desktop-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-phone-icon {\n width: 24px;\n height: auto;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}");const Na=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"platforms-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"platform-ios-icon")},{value:"web",icon:e.jsx((function(e){return r.createElement("svg",ba({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),va||(va=r.createElement("path",{d:"m0 32 34.9 395.8L191.5 480l157.6-52.2L384 32zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1z"})))}),{className:"notificare__push__preview-controls-html5-icon"},"platform-html5-icon")}],Sa=[{value:"desktop",icon:e.jsx((function(e){return r.createElement("svg",ga({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),ha||(ha=r.createElement("path",{d:"M64 0C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h176l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32h256c17.7 0 32-14.3 32-32s-14.3-32-32-32h-69.3L336 416h176c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm448 64v288H64V64z"})))}),{className:"notificare__push__preview-controls-desktop-icon"},"form-factor-desktop-icon")},{value:"phone",icon:e.jsx((function(e){return r.createElement("svg",Ea({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),xa||(xa=r.createElement("path",{d:"M16 64C16 28.7 44.7 0 80 0h224c35.3 0 64 28.7 64 64v384c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64zm208 384a32 32 0 1 0-64 0 32 32 0 1 0 64 0m80-384H80v320h224z"})))}),{className:"notificare__push__preview-controls-phone-icon"},"form-factor-phone-icon")}],Ca=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"device-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"device-iphone-icon")}],Ta=[{value:"macos",labelId:"controls.operatingSystem.macos",defaultLabel:an["controls.operatingSystem.macos"]}],Aa=[{value:"lockscreen",labelId:"controls.displayMode.lockScreen",defaultLabel:an["controls.displayMode.lockScreen"]},{value:"lockscreen-expanded",labelId:"controls.displayMode.expandedLockScreen",defaultLabel:an["controls.displayMode.expandedLockScreen"]},{value:"app-ui",labelId:"controls.displayMode.appUi",defaultLabel:an["controls.displayMode.appUi"]}];Kt("@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');\n\n.notificare {\n font-family: proxima-nova, Helvetica, Arial, sans-serif;\n color: #232c2a;\n}\n\n.notificare * {\n border: 0;\n margin: 0;\n box-sizing: border-box;\n}");Kt(".notificare .notificare__push__preview-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: max-content;\n}\n\n.notificare .notificare__push__preview {\n margin-top: 20px;\n}\n\n/* Disable label selection in every preview */\n.notificare .notificare__push__preview p,\n.notificare .notificare__push__preview span,\n.notificare .notificare__push__preview div,\n.notificare .notificare__push__preview h1,\n.notificare .notificare__push__preview h2,\n.notificare .notificare__push__preview h3,\n.notificare .notificare__push__preview h4,\n.notificare .notificare__push__preview h5,\n.notificare .notificare__push__preview h6 {\n user-select: none;\n}");const Pa={"android-lockscreen":{platform:"android",displayMode:"lockscreen"},"android-lockscreen-expanded":{platform:"android",displayMode:"lockscreen-expanded"},"android-app-ui":{platform:"android",displayMode:"app-ui"},"ios-lockscreen":{platform:"ios",displayMode:"lockscreen"},"ios-lockscreen-expanded":{platform:"ios",displayMode:"lockscreen-expanded"},"ios-app-ui":{platform:"ios",displayMode:"app-ui"},"web-desktop-macos":{platform:"web",displayMode:"lockscreen",formFactor:"desktop",os:"macos"},"web-android-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"android"},"web-iphone-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"ios"}};function Ma({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen"}){const[o,s]=t.useState(Pa[a]),{serviceKey:c}=Pn(),l=fn({id:i,serviceKey:c});return e.jsxs("div",{className:"notificare__push__preview-wrapper",children:[r&&e.jsx(ja,{previewState:o,onPreviewStateChanged:s}),(()=>{switch(l.status){case"idle":case"loading":return e.jsx(tn,{});case"success":return e.jsx(Kn,{application:l.data,children:e.jsx("div",{className:"notificare__push__preview",children:e.jsx(ua,{notification:n,previewState:o})})})}})()]})}var La,Oa;!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(La||(La={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Oa||(Oa={}));const Ia=La.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ra=e=>{switch(typeof e){case"undefined":return Ia.undefined;case"string":return Ia.string;case"number":return Number.isNaN(e)?Ia.nan:Ia.number;case"boolean":return Ia.boolean;case"function":return Ia.function;case"bigint":return Ia.bigint;case"symbol":return Ia.symbol;case"object":return Array.isArray(e)?Ia.array:null===e?Ia.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Ia.promise:"undefined"!=typeof Map&&e instanceof Map?Ia.map:"undefined"!=typeof Set&&e instanceof Set?Ia.set:"undefined"!=typeof Date&&e instanceof Date?Ia.date:Ia.object;default:return Ia.unknown}},Ua=La.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ba extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof Ba))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,La.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ba.create=e=>new Ba(e);const Ha=(e,t)=>{let n;switch(e.code){case Ua.invalid_type:n=e.received===Ia.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ua.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,La.jsonStringifyReplacer)}`;break;case Ua.unrecognized_keys:n=`Unrecognized key(s) in object: ${La.joinValues(e.keys,", ")}`;break;case Ua.invalid_union:n="Invalid input";break;case Ua.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${La.joinValues(e.options)}`;break;case Ua.invalid_enum_value:n=`Invalid enum value. Expected ${La.joinValues(e.options)}, received '${e.received}'`;break;case Ua.invalid_arguments:n="Invalid function arguments";break;case Ua.invalid_return_type:n="Invalid function return type";break;case Ua.invalid_date:n="Invalid date";break;case Ua.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:La.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ua.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ua.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ua.custom:n="Invalid input";break;case Ua.invalid_intersection_types:n="Intersection results could not be merged";break;case Ua.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ua.not_finite:n="Number must be finite";break;default:n=t.defaultError,La.assertNever(e)}return{message:n}};let Fa=Ha;function Da(e,t){const n=Fa,i=(e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ha?void 0:Ha].filter((e=>!!e))});e.common.issues.push(i)}class za{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return Ga;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return za.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:r}=i;if("aborted"===t.status)return Ga;if("aborted"===r.status)return Ga;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!i.alwaysSet||(n[t.value]=r.value)}return{status:e.value,value:n}}}const Ga=Object.freeze({status:"aborted"}),Za=e=>({status:"dirty",value:e}),Va=e=>({status:"valid",value:e}),$a=e=>"aborted"===e.status,Wa=e=>"dirty"===e.status,Ka=e=>"valid"===e.status,qa=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Xa;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(Xa||(Xa={}));var Ya,Ja,Qa=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},eo=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class to{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const no=(e,t)=>{if(Ka(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ba(e.common.issues);return this._error=t,this._error}}};function io(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class ro{get description(){return this._def.description}_getType(e){return Ra(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new za,ctx:{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parseSync({data:e,path:n.path,parent:n});return no(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Ka(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>Ka(e)?{value:e.value}:{issues:t.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(qa(i)?i:Promise.resolve(i));return no(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const r=e(t),a=()=>i.addIssue({code:Ua.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(a(),!1))):!!r||(a(),!1)}))}refinement(e,t){return this._refinement(((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1)))}_refinement(e){return new is({schema:this,typeName:_s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return rs.create(this,this._def)}nullable(){return as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fo.create(this)}promise(){return ns.create(this,this._def)}or(e){return Go.create([this,e],this._def)}and(e){return Wo.create(this,e,this._def)}transform(e){return new is({...io(this._def),schema:this,typeName:_s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new os({...io(this._def),innerType:this,defaultValue:t,typeName:_s.ZodDefault})}brand(){return new ls({typeName:_s.ZodBranded,type:this,...io(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ss({...io(this._def),innerType:this,catchValue:t,typeName:_s.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return ds.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ao=/^c[^\s-]{8,}$/i,oo=/^[0-9a-z]+$/,so=/^[0-9A-HJKMNP-TV-Z]{26}$/i,co=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lo=/^[a-z0-9_-]{21}$/i,po=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_o=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let fo;const ho=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,go=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yo="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xo=new RegExp(`^${yo}$`);function ko(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Eo(e){let t=`${yo}T${ko(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function jo(e,t){if(!po.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function No(e,t){return!("v4"!==t&&t||!mo.test(e))||!("v6"!==t&&t||!vo.test(e))}class So extends ro{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Ia.string){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.string,received:t.parsedType}),Ga}const t=new za;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(n=this._getOrReturnCtx(e,n),i?Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)uo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"email",code:Ua.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)fo||(fo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"emoji",code:Ua.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)co.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"uuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("nanoid"===a.kind)lo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"nanoid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)ao.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)oo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid2",code:Ua.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)so.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ulid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Da(n,{validation:"url",code:Ua.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"regex",code:Ua.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){Eo(a).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else if("date"===a.kind){xo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"date",message:a.message}),t.dirty())}else if("time"===a.kind){new RegExp(`^${ko(a)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"time",message:a.message}),t.dirty())}else"duration"===a.kind?_o.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"duration",code:Ua.invalid_string,message:a.message}),t.dirty()):"ip"===a.kind?(i=e.data,("v4"!==(r=a.version)&&r||!ho.test(i))&&("v6"!==r&&r||!go.test(i))&&(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ip",code:Ua.invalid_string,message:a.message}),t.dirty())):"jwt"===a.kind?jo(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"jwt",code:Ua.invalid_string,message:a.message}),t.dirty()):"cidr"===a.kind?No(e.data,a.version)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cidr",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64"===a.kind?bo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64url"===a.kind?wo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64url",code:Ua.invalid_string,message:a.message}),t.dirty()):La.assertNever(a);var i,r;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:Ua.invalid_string,...Xa.errToObj(n)})}_addCheck(e){return new So({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xa.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xa.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xa.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xa.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xa.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xa.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xa.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xa.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xa.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xa.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xa.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xa.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xa.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xa.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...Xa.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xa.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Xa.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...Xa.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Xa.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Xa.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Xa.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Xa.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Xa.errToObj(t)})}nonempty(e){return this.min(1,Xa.errToObj(e))}trim(){return new So({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Co(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}So.create=e=>new So({checks:[],typeName:_s.ZodString,coerce:e?.coerce??!1,...io(e)});class To extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Ia.number){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.number,received:t.parsedType}),Ga}let t;const n=new za;for(const i of this._def.checks)if("int"===i.kind)La.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==Co(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_finite,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new To({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new To({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xa.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Xa.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xa.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xa.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&La.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}To.create=e=>new To({checks:[],typeName:_s.ZodNumber,coerce:e?.coerce||!1,...io(e)});class Ao extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ia.bigint)return this._getInvalidInput(e);let t;const n=new za;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.bigint,received:t.parsedType}),Ga}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new Ao({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new Ao({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Ao.create=e=>new Ao({checks:[],typeName:_s.ZodBigInt,coerce:e?.coerce??!1,...io(e)});class Po extends ro{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Ia.boolean){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.boolean,received:t.parsedType}),Ga}return Va(e.data)}}Po.create=e=>new Po({typeName:_s.ZodBoolean,coerce:e?.coerce||!1,...io(e)});class Mo extends ro{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Ia.date){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.date,received:t.parsedType}),Ga}if(Number.isNaN(e.data.getTime())){return Da(this._getOrReturnCtx(e),{code:Ua.invalid_date}),Ga}const t=new za;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):La.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mo({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Xa.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Xa.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Mo.create=e=>new Mo({checks:[],coerce:e?.coerce||!1,typeName:_s.ZodDate,...io(e)});class Lo extends ro{_parse(e){if(this._getType(e)!==Ia.symbol){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.symbol,received:t.parsedType}),Ga}return Va(e.data)}}Lo.create=e=>new Lo({typeName:_s.ZodSymbol,...io(e)});class Oo extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.undefined,received:t.parsedType}),Ga}return Va(e.data)}}Oo.create=e=>new Oo({typeName:_s.ZodUndefined,...io(e)});class Io extends ro{_parse(e){if(this._getType(e)!==Ia.null){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.null,received:t.parsedType}),Ga}return Va(e.data)}}Io.create=e=>new Io({typeName:_s.ZodNull,...io(e)});class Ro extends ro{constructor(){super(...arguments),this._any=!0}_parse(e){return Va(e.data)}}Ro.create=e=>new Ro({typeName:_s.ZodAny,...io(e)});class Uo extends ro{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Va(e.data)}}Uo.create=e=>new Uo({typeName:_s.ZodUnknown,...io(e)});class Bo extends ro{_parse(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.never,received:t.parsedType}),Ga}}Bo.create=e=>new Bo({typeName:_s.ZodNever,...io(e)});class Ho extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.void,received:t.parsedType}),Ga}return Va(e.data)}}Ho.create=e=>new Ho({typeName:_s.ZodVoid,...io(e)});class Fo extends ro{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ia.array)return Da(t,{code:Ua.invalid_type,expected:Ia.array,received:t.parsedType}),Ga;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(Da(t,{code:e?Ua.too_big:Ua.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(Da(t,{code:Ua.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(Da(t,{code:Ua.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new to(t,e,t.path,n))))).then((e=>za.mergeArray(n,e)));const r=[...t.data].map(((e,n)=>i.type._parseSync(new to(t,e,t.path,n))));return za.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new Fo({...this._def,minLength:{value:e,message:Xa.toString(t)}})}max(e,t){return new Fo({...this._def,maxLength:{value:e,message:Xa.toString(t)}})}length(e,t){return new Fo({...this._def,exactLength:{value:e,message:Xa.toString(t)}})}nonempty(e){return this.min(1,e)}}function Do(e){if(e instanceof zo){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=rs.create(Do(i))}return new zo({...e._def,shape:()=>t})}return e instanceof Fo?new Fo({...e._def,type:Do(e.element)}):e instanceof rs?rs.create(Do(e.unwrap())):e instanceof as?as.create(Do(e.unwrap())):e instanceof Ko?Ko.create(e.items.map((e=>Do(e)))):e}Fo.create=(e,t)=>new Fo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_s.ZodArray,...io(t)});class zo extends ro{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=La.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ia.object){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),a=[];if(!(this._def.catchall instanceof Bo&&"strip"===this._def.unknownKeys))for(const e in n.data)r.includes(e)||a.push(e);const o=[];for(const e of r){const t=i[e],r=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new to(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Bo){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(Da(n,{code:Ua.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const i=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new to(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>za.mergeObjectSync(t,e))):za.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return Xa.errToObj,new zo({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const i=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:Xa.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new zo({...this._def,unknownKeys:"strip"})}passthrough(){return new zo({...this._def,unknownKeys:"passthrough"})}extend(e){return new zo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new zo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new zo({...this._def,catchall:e})}pick(e){const t={};for(const n of La.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}omit(e){const t={};for(const n of La.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}deepPartial(){return Do(this)}partial(e){const t={};for(const n of La.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new zo({...this._def,shape:()=>t})}required(e){const t={};for(const n of La.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof rs;)e=e._def.innerType;t[n]=e}return new zo({...this._def,shape:()=>t})}keyof(){return Qo(La.objectKeys(this.shape))}}zo.create=(e,t)=>new zo({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.strictCreate=(e,t)=>new zo({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.lazycreate=(e,t)=>new zo({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)});class Go extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Ba(e.ctx.common.issues)));return Da(t,{code:Ua.invalid_union,unionErrors:n}),Ga}));{let e;const i=[];for(const r of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=r._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=i.map((e=>new Ba(e)));return Da(t,{code:Ua.invalid_union,unionErrors:r}),Ga}}get options(){return this._def.options}}Go.create=(e,t)=>new Go({options:e,typeName:_s.ZodUnion,...io(t)});const Zo=e=>e instanceof Yo?Zo(e.schema):e instanceof is?Zo(e.innerType()):e instanceof Jo?[e.value]:e instanceof es?e.options:e instanceof ts?La.objectValues(e.enum):e instanceof os?Zo(e._def.innerType):e instanceof Oo?[void 0]:e instanceof Io?[null]:e instanceof rs?[void 0,...Zo(e.unwrap())]:e instanceof as?[null,...Zo(e.unwrap())]:e instanceof ls||e instanceof ds?Zo(e.unwrap()):e instanceof ss?Zo(e._def.innerType):[];class Vo extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.object)return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(Da(t,{code:Ua.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ga)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const n of t){const t=Zo(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(i.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);i.set(r,n)}}return new Vo({typeName:_s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...io(n)})}}function $o(e,t){const n=Ra(e),i=Ra(t);if(e===t)return{valid:!0,data:e};if(n===Ia.object&&i===Ia.object){const n=La.objectKeys(t),i=La.objectKeys(e).filter((e=>-1!==n.indexOf(e))),r={...e,...t};for(const n of i){const i=$o(e[n],t[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===Ia.array&&i===Ia.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=$o(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===Ia.date&&i===Ia.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Wo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if($a(e)||$a(i))return Ga;const r=$o(e.value,i.value);return r.valid?((Wa(e)||Wa(i))&&t.dirty(),{status:t.value,value:r.data}):(Da(n,{code:Ua.invalid_intersection_types}),Ga)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Wo.create=(e,t,n)=>new Wo({left:e,right:t,typeName:_s.ZodIntersection,...io(n)});class Ko extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.array)return Da(n,{code:Ua.invalid_type,expected:Ia.array,received:n.parsedType}),Ga;if(n.data.length<this._def.items.length)return Da(n,{code:Ua.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ga;!this._def.rest&&n.data.length>this._def.items.length&&(Da(n,{code:Ua.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new to(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>za.mergeArray(t,e))):za.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:e,typeName:_s.ZodTuple,rest:null,...io(t)})};class qo extends ro{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.map)return Da(n,{code:Ua.invalid_type,expected:Ia.map,received:n.parsedType}),Ga;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:i._parse(new to(n,e,n.path,[a,"key"])),value:r._parse(new to(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}}}qo.create=(e,t,n)=>new qo({valueType:t,keyType:e,typeName:_s.ZodMap,...io(n)});class Xo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.set)return Da(n,{code:Ua.invalid_type,expected:Ia.set,received:n.parsedType}),Ga;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(Da(n,{code:Ua.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(Da(n,{code:Ua.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(e){const n=new Set;for(const i of e){if("aborted"===i.status)return Ga;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const o=[...n.data.values()].map(((e,t)=>r._parse(new to(n,e,n.path,t))));return n.common.async?Promise.all(o).then((e=>a(e))):a(o)}min(e,t){return new Xo({...this._def,minSize:{value:e,message:Xa.toString(t)}})}max(e,t){return new Xo({...this._def,maxSize:{value:e,message:Xa.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Xo.create=(e,t)=>new Xo({valueType:e,minSize:null,maxSize:null,typeName:_s.ZodSet,...io(t)});class Yo extends ro{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Yo.create=(e,t)=>new Yo({getter:e,typeName:_s.ZodLazy,...io(t)});class Jo extends ro{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Da(t,{received:t.data,code:Ua.invalid_literal,expected:this._def.value}),Ga}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Qo(e,t){return new es({values:e,typeName:_s.ZodEnum,...io(t)})}Jo.create=(e,t)=>new Jo({value:e,typeName:_s.ZodLiteral,...io(t)});class es extends ro{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{expected:La.joinValues(n),received:t.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ya,"f")||eo(this,Ya,new Set(this._def.values),"f"),!Qa(this,Ya,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{received:t.data,code:Ua.invalid_enum_value,options:n}),Ga}return Va(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return es.create(e,{...this._def,...t})}exclude(e,t=this._def){return es.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Ya=new WeakMap,es.create=Qo;class ts extends ro{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(e){const t=La.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ia.string&&n.parsedType!==Ia.number){const e=La.objectValues(t);return Da(n,{expected:La.joinValues(e),received:n.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ja,"f")||eo(this,Ja,new Set(La.getValidEnumValues(this._def.values)),"f"),!Qa(this,Ja,"f").has(e.data)){const e=La.objectValues(t);return Da(n,{received:n.data,code:Ua.invalid_enum_value,options:e}),Ga}return Va(e.data)}get enum(){return this._def.values}}Ja=new WeakMap,ts.create=(e,t)=>new ts({values:e,typeName:_s.ZodNativeEnum,...io(t)});class ns extends ro{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.promise&&!1===t.common.async)return Da(t,{code:Ua.invalid_type,expected:Ia.promise,received:t.parsedType}),Ga;const n=t.parsedType===Ia.promise?t.data:Promise.resolve(t.data);return Va(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ns.create=(e,t)=>new ns({type:e,typeName:_s.ZodPromise,...io(t)});class is extends ro{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:e=>{Da(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===i.type){const e=i.transform(n.data,r);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return Ga;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}));{if("aborted"===t.value)return Ga;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,r);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?Ga:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Ga:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ka(e))return e;const a=i.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Ka(e)?Promise.resolve(i.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}La.assertNever(i)}}is.create=(e,t,n)=>new is({schema:e,typeName:_s.ZodEffects,effect:t,...io(n)}),is.createWithPreprocess=(e,t,n)=>new is({schema:t,effect:{type:"preprocess",transform:e},typeName:_s.ZodEffects,...io(n)});class rs extends ro{_parse(e){return this._getType(e)===Ia.undefined?Va(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:_s.ZodOptional,...io(t)});class as extends ro{_parse(e){return this._getType(e)===Ia.null?Va(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:_s.ZodNullable,...io(t)});class os extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ia.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}os.create=(e,t)=>new os({innerType:e,typeName:_s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...io(t)});class ss extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return qa(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:_s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...io(t)});class cs extends ro{_parse(e){if(this._getType(e)!==Ia.nan){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.nan,received:t.parsedType}),Ga}return{status:"valid",value:e.data}}}cs.create=e=>new cs({typeName:_s.ZodNaN,...io(e)});class ls extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ps extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),Za(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ps({in:e,out:t,typeName:_s.ZodPipeline})}}class ds extends ro{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Ka(e)&&(e.value=Object.freeze(e.value)),e);return qa(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var _s;ds.create=(e,t)=>new ds({innerType:e,typeName:_s.ZodReadonly,...io(t)}),function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(_s||(_s={}));const us=So.create,fs=To.create,hs=Po.create;Bo.create;const ms=Fo.create,gs=zo.create;Go.create;const vs=Vo.create;Wo.create,Ko.create;const bs=Jo.create,ws=es.create;ns.create,rs.create,as.create;const ys=gs({title:us({message:"Property 'title' should be a string"}).optional(),subtitle:us({message:"Property 'subtitle' should be a string"}).optional(),message:us({message:"Property 'message' is required and should be a string"}).nonempty("Property 'message' cannot be empty"),actions:ms(gs({type:us({message:"Action property 'type' is required and should be a string"}),label:us({message:"Action property 'label' is required and should be a string"}),target:us({message:"Action property 'target' should be a string"}).optional(),camera:hs({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:hs({message:"Action property 'keyboard' should be a boolean"}).optional()})).optional(),attachments:ms(gs({mimeType:us({message:"Attachment property 'mimeType' is required and should be a string"}),uri:us({message:"Attachment property 'uri' is required and should be a string"}).url("Attachment property 'uri' should be a valid URL")})).optional()}),xs=gs({type:bs("re.notifica.notification.None")}).merge(ys),ks=gs({type:bs("re.notifica.notification.URLResolver"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Es=gs({type:bs("re.notifica.notification.Alert")}).merge(ys),js=gs({type:bs("re.notifica.notification.Image"),content:ms(gs({type:ws(["re.notifica.content.PNG","re.notifica.content.JPEG","re.notifica.content.GIF"],{message:"Content objects should be of type 're.notifica.content.PNG', 're.notifica.content.JPEG' or 're.notifica.content.GIF'"}),data:us({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ns=gs({type:bs("re.notifica.notification.InAppBrowser"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ss=gs({type:bs("re.notifica.notification.Map"),content:ms(gs({type:bs("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:gs({title:us({message:"Content object data property 'title' is required and should be a string"}),description:us({message:"Content object data property 'description' is required should be a string"}),latitude:fs({message:"Content object data property 'latitude' is required and should be a number"}).min(-90,"Content object data property 'latitude' should be a minimum of -90").max(90,"Content object data property 'latitude' should be a maximum of 90"),longitude:fs({message:"Content object data property 'longitude' is required and should be a number"}).min(-180,"Content object data property 'longitude' must be at least -180").max(180,"Content object data property 'longitude' must be at most 180")})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Cs=gs({type:bs("re.notifica.notification.Passbook"),content:ms(gs({type:bs("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ts=gs({type:bs("re.notifica.notification.Rate")}).merge(ys),As=gs({type:bs("re.notifica.notification.Store"),content:ms(vs("type",[gs({type:bs("re.notifica.content.AppStore"),data:gs({identifier:us({message:"Content object data property 'identifier' is mandatory and should be a string"}),campaignToken:us({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:us({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:us({message:"Content object data property 'providerToken' should be a string"}).optional()},{message:"AppStore content object data is required and must be an object with 'identifier' (mandatory), 'campaignToken', 'affiliateToken', or 'providerToken'"})}),gs({type:ws(["re.notifica.content.GooglePlayDetails","re.notifica.content.GooglePlayDeveloper","re.notifica.content.GooglePlayCollection","re.notifica.content.GooglePlaySearch","re.notifica.content.AppGalleryDetails","re.notifica.content.AppGallerySearch"]),data:us({message:"GooglePlay and AppGallery content object data is required and must be a string"}).nonempty("GooglePlay and AppGallery content object data cannot be empty")})]),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ps=vs("type",[Es,js,Ns,Ss,xs,Cs,Ts,As,ks,gs({type:bs("re.notifica.notification.URL"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.URLScheme"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.Video"),content:ms(gs({type:us({message:"Content object type is required and should be a string"}),data:us({message:"Content object data is required and should be a string"}).nonempty("Content object data cannot be empty")}),{message:"The notification must be content-rich. Property 'content' is required"}).superRefine(((e,t)=>{e.forEach(((e,n)=>{if(["re.notifica.content.YouTube","re.notifica.content.Vimeo","re.notifica.content.HTML5Video"].includes(e.type)||t.addIssue({code:Ua.custom,message:"Content object should be of type 're.notifica.content.YouTube', 're.notifica.content.Vimeo' or 're.notifica.content.HTML5Video'",path:["content",n,"type"]}),"re.notifica.content.HTML5Video"===e.type)try{new URL(e.data)}catch(e){t.addIssue({code:Ua.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))}))}).merge(ys),gs({type:bs("re.notifica.notification.WebView"),content:ms(gs({type:bs("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:us({message:"Content data is required and should be a string containing the HTML markup"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys)]);function Ms({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&!e.path.includes("content")));if(t){const e=Ps.options.map((e=>e.shape.type.value));console.error(`Notification error:\n\nInvalid notification type. Expected one of: ${e.join(", ")}\n`)}else{const t=e.map((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&e.path.includes("content")?`Invalid content type. Expected one of: ${e.options.join(", ")}\n`:e.message));console.error(`Notification errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidNotification",defaultMessage:an["preview.error.invalidNotification"]}),showConsoleWarning:!0})}Kt("");function Ls({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__banner__wrapper","data-testid":"in-app-messaging-banner-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__banner__window",children:[t.image&&e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__banner__image",src:t.image,"data-testid":"in-app-messaging-banner-preview-image"}),e.jsxs("div",{className:"notificare__in-app-messaging__banner__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__banner__title","data-testid":"in-app-messaging-banner-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__banner__message","data-testid":"in-app-messaging-banner-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__banner__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__in-app-messaging__banner__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n background-color: #fff;\n padding: 16px;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__banner__image {\n width: 58px;\n height: 58px;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__banner__text-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.notificare .notificare__in-app-messaging__banner__title {\n font-size: 16px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__banner__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}");function Os({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__card__wrapper","data-testid":"in-app-messaging-card-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__card__window",children:[e.jsxs("div",{className:"notificare__in-app-messaging__card__header",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__close-button "+(t.image?"notificare__in-app-messaging__card__close-button--with-image":""),children:e.jsx(ra,{className:"notificare__in-app-messaging__card__close-button-icon"})}),t.image&&e.jsx("img",{className:"notificare__in-app-messaging__card__image",src:t.image,"data-testid":"in-app-messaging-card-preview-image"})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__card__title","data-testid":"in-app-messaging-card-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__card__message","data-testid":"in-app-messaging-card-preview-message",children:t.message})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__actions",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--primary "+(t.primaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-primary-action-label",children:t.primaryAction.label}),t.secondaryAction&&e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--secondary "+(t.secondaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-secondary-action-label",children:t.secondaryAction.label})]})]})})}Kt(".notificare .notificare__in-app-messaging__card__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__card__window {\n width: 320px;\n background-color: white;\n border-radius: 5px;\n padding: 16px;\n overflow: hidden;\n row-gap: 16px;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__header {\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n padding: 0;\n background-color: transparent;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image {\n border-radius: 16px;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button-icon {\n fill: #000000de;\n height: 22px;\n width: 22px;\n}\n\n.notificare .notificare__in-app-messaging__card__image {\n aspect-ratio: 2 / 1;\n width: 100%;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__card__title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__actions {\n display: flex;\n flex-direction: row-reverse;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary {\n background-color: #fff;\n color: #2b42f7;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive {\n background-color: #fff;\n color: #ba1a1a;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive:hover {\n background-color: #ffdad699;\n}");function Is({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__wrapper","data-testid":"in-app-messaging-fullscreen-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__window",children:[e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__fullscreen__background-image",src:t.image,"data-testid":"in-app-messaging-fullscreen-preview-image"}),e.jsx("button",{className:"notificare__in-app-messaging__fullscreen__close-button",children:e.jsx(ra,{className:"notificare__in-app-messaging__fullscreen__close-button-icon"})}),e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__text-content",children:[e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__title","data-testid":"in-app-messaging-fullscreen-preview-title",children:t.title}),e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__message","data-testid":"in-app-messaging-fullscreen-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__fullscreen__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__window {\n width: 310px;\n height: 95%;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__background-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n border-radius: 16px;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button-icon {\n fill: #000000de;\n width: 22px;\n height: 22px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__text-content {\n position: absolute;\n bottom: 0;\n padding: 32px 16px 16px;\n width: 100%;\n background: linear-gradient(rgba(255, 255, 255, 0), #fff);\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__title {\n font-weight: 600;\n font-size: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__message {\n font-size: 14px;\n line-height: 20px;\n}");function Rs({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__preview",children:e.jsx(qt,{theme:"dark",children:(()=>{switch(t.type){case"re.notifica.inappmessage.Banner":return e.jsx(Ls,{inAppMessage:t});case"re.notifica.inappmessage.Card":return e.jsx(Os,{inAppMessage:t});case"re.notifica.inappmessage.Fullscreen":return e.jsx(Is,{inAppMessage:t})}})()})})}Kt(".notificare .notificare__in-app-messaging__preview {\n user-select: none;\n}");const Us=vs("type",[gs({type:bs("re.notifica.inappmessage.Banner"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional()}),gs({type:bs("re.notifica.inappmessage.Card"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional(),primaryAction:gs({label:us({message:"Primary action property 'label' is required and should be a string"}).max(32,"Primary action property 'label' cannot contain more than 32 characters").nonempty("Primary action property 'label' cannot be empty"),destructive:hs({message:"Primary action property 'destructive' should be a boolean"}).optional()},{message:"A Card must contain a primary action. Property 'primaryAction' is required"}),secondaryAction:gs({label:us({message:"Secondary action property 'label' is required and should be a string"}).max(32,"Secondary action property 'label' cannot contain more than 32 characters").nonempty("Secondary action property 'label' cannot be empty"),destructive:hs({message:"Secondary action property 'destructive' should be a boolean"}).optional()}).optional()}),gs({type:bs("re.notifica.inappmessage.Fullscreen"),title:us({message:"Property 'title' should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").optional(),message:us({message:"Property 'message' should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").optional(),image:us({message:"Property 'image' is required and should be a string"}).url("Property 'image' should be a valid URL")})]);function Bs({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")));if(t){const e=Us.options.map((e=>e.shape.type.value));console.error(`In-app message error:\n\nInvalid type. Expected one of: ${e.join(", ")}`)}else{const t=e.map((({message:e})=>e));console.error(`In-app message errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidInAppMessage",defaultMessage:gn["preview.error.invalidInAppMessage"]}),showConsoleWarning:!0})}var Hs;function Fs({applicationId:t,applicationInfo:n,serviceKey:i}){const r=fn({id:t,serviceKey:i});return(()=>{var t,i,a,o;switch(r.status){case"idle":case"loading":return e.jsx(tn,{});case"success":{const s=null!==(t=n.websitePushConfig.icon)&&void 0!==t?t:null===(i=r.data.websitePushConfig)||void 0===i?void 0:i.icon,c=null!==(o=null!==(a=n.websitePushConfig.launchConfig.applicationName)&&void 0!==a?a:n.name)&&void 0!==o?o:r.data.name,l=n.websitePushConfig.launchConfig.autoOnboardingOptions;return e.jsx("div",{className:"notificare__push-onboarding__dialog__wrapper","data-testid":"push-onboarding-dialog-preview-wrapper",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__window",children:[e.jsxs("div",{className:"notificare__push-onboarding__dialog__content",children:[s?e.jsx("img",{className:"notificare__push-onboarding__dialog__icon",src:s,"data-testid":"push-onboarding-dialog-preview-icon"}):e.jsx("div",{className:"notificare__push-onboarding__dialog__default-icon-container",children:e.jsx(ur,{className:"notificare__push-onboarding__dialog__default-icon"})}),e.jsxs("div",{className:"notificare__push-onboarding__dialog__text-content",children:[e.jsx("p",{className:"notificare__push-onboarding__dialog__title","data-testid":"push-onboarding-dialog-preview-title",children:c}),e.jsx("p",{className:"notificare__push-onboarding__dialog__message","data-testid":"push-onboarding-dialog-preview-message",children:null==l?void 0:l.message})]})]}),e.jsx("div",{className:"notificare__push-onboarding__dialog__footer",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__actions",children:[e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--cancel","data-testid":"push-onboarding-dialog-cancel-button",children:null==l?void 0:l.cancelButton}),e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--accept","data-testid":"push-onboarding-dialog-accept-button",children:null==l?void 0:l.acceptButton})]})})]})})}}})()}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ds.apply(null,arguments)}Kt(".notificare .notificare__push-onboarding__dialog__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__push-onboarding__dialog__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n padding: 16px;\n row-gap: 16px;\n box-shadow: 0 0 32px -8px rgba(0, 0, 0, 0.52);\n margin-top: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__content {\n display: flex;\n flex-direction: row;\n column-gap: 16px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.notificare .notificare__push-onboarding__dialog__icon {\n width: 64px;\n height: 64px;\n border-radius: 4px;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n min-width: 64px;\n height: 64px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon {\n width: 64px;\n height: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__title {\n font-size: 24px;\n line-height: 24px;\n font-weight: 400;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push-onboarding__dialog__message {\n font-size: 14px;\n line-height: 20px;\n border: none;\n color: rgba(0, 0, 0, 0.86);\n}\n\n.notificare .notificare__push-onboarding__dialog__footer {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n margin-top: 16px;\n}\n\n.notificare .notificare__push-onboarding__dialog__actions {\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n justify-content: flex-end;\n column-gap: 8px;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n background-color: transparent;\n cursor: pointer;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel {\n color: #ba1a1a;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel:hover {\n background-color: #ffdad699;\n}");var zs,Gs=function(e){return r.createElement("svg",Ds({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Hs||(Hs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.312 3.117L17.998 5.43 15.69 3.117a.41.41 0 0 0-.572 0 .41.41 0 0 0 0 .572L17.43 6l-2.313 2.313a.41.41 0 0 0 0 .572.41.41 0 0 0 .572 0L18 6.571l2.313 2.313a.404.404 0 0 0 .568-.572L18.57 5.998l2.31-2.308a.404.404 0 0 0-.568-.573"}))))};function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Zs.apply(null,arguments)}var Vs,$s=function(e){return r.createElement("svg",Zs({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),zs||(zs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.683 3c-.14 0-.216.046-.3.18l-3.126 5.023-1.623-2.142c-.087-.122-.174-.172-.3-.172a.32.32 0 0 0-.334.33c0 .081.035.172.101.257l1.807 2.32c.105.137.213.204.362.204q.226-.001.352-.197l3.29-5.224A.5.5 0 0 0 21 3.32c0-.193-.125-.319-.317-.319Z"}))))};function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ws.apply(null,arguments)}var Ks=function(e){return r.createElement("svg",Ws({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Vs||(Vs=r.createElement("path",{d:"M1 18.39c0 .847.65 1.405 1.754 1.405h4.902C7.75 22.037 9.503 24 11.955 24c2.462 0 4.216-1.952 4.31-4.205h4.902c1.091 0 1.754-.558 1.754-1.406 0-1.161-1.185-2.207-2.184-3.24-.767-.802-.976-2.452-1.069-3.788-.081-4.577-1.266-7.527-4.356-8.643C14.917 1.197 13.674 0 11.955 0c-1.708 0-2.963 1.197-3.346 2.718-3.09 1.116-4.275 4.066-4.356 8.643-.093 1.336-.302 2.986-1.07 3.787C2.174 16.182 1 17.228 1 18.39m2.254-.35v-.139c.209-.337.906-1.022 1.51-1.696.836-.929 1.231-2.428 1.336-4.693.093-5.076 1.603-6.691 3.59-7.237.29-.07.452-.21.464-.511.035-1.208.732-2.056 1.8-2.056 1.08 0 1.766.848 1.813 2.056.011.302.162.441.453.51 1.998.547 3.508 2.162 3.601 7.238.104 2.265.5 3.764 1.324 4.693.616.674 1.301 1.36 1.51 1.696v.14H3.254Zm6.215 1.755h4.983c-.093 1.58-1.092 2.567-2.497 2.567-1.394 0-2.405-.987-2.486-2.567"})))};function qs({permissionStatus:t,options:n}){return e.jsx("div",{className:"notificare__push-onboarding__floating-button__wrapper","data-testid":"push-onboarding-floating-button-preview-wrapper",children:e.jsxs("div",{className:`notificare__push-onboarding__floating-button ${"start"===n.alignment.horizontal?"notificare__push-onboarding__floating-button--start":"notificare__push-onboarding__floating-button--end"} ${"top"===n.alignment.vertical?"notificare__push-onboarding__floating-button--top":"notificare__push-onboarding__floating-button--bottom"}`,"data-testid":"push-onboarding-floating-button-preview",children:["default"===t&&e.jsx(Ks,{className:"notificare__push-onboarding__floating-button__icon"}),"granted"===t&&e.jsx($s,{className:"notificare__push-onboarding__floating-button__icon"}),"denied"===t&&e.jsx(Gs,{className:"notificare__push-onboarding__floating-button__icon"}),e.jsxs("div",{className:"notificare__push-onboarding__floating-button-tooltip","data-testid":"push-onboarding-floating-button-preview-tooltip",children:["default"===t&&n.permissionTexts.default,"granted"===t&&n.permissionTexts.granted,"denied"===t&&n.permissionTexts.denied]})]})})}function Xs({permissionStatus:t,applicationInfo:n,applicationId:i,serviceKey:r}){return e.jsx(qt,{theme:"dark",children:n.websitePushConfig.launchConfig.autoOnboardingOptions?e.jsx(Fs,{applicationId:i,applicationInfo:n,serviceKey:r}):n.websitePushConfig.launchConfig.floatingButtonOptions&&e.jsx(qs,{permissionStatus:t,options:n.websitePushConfig.launchConfig.floatingButtonOptions})})}function Ys({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.map((({message:e})=>e));console.error(`Push onboarding preview errors:\n\n${t.join("\n")}`)}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidPushOnboardingApplicationInfo",defaultMessage:xn["preview.error.invalidPushOnboardingApplicationInfo"]}),showConsoleWarning:!0})}Kt(".notificare .notificare__push-onboarding__floating-button__wrapper {\n width: 100%;\n height: calc(615px - 32px);\n}\n\n.notificare .notificare__push-onboarding__floating-button {\n position: absolute;\n margin: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n background-color: #dfe0ff;\n color: #000a64;\n box-shadow: 0 3px 1px -2px rgb(0 0 0 / 0.2), 0 2px 2px 0 rgb(0 0 0 / 0.14), 0 1px 5px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:active {\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 4px 5px 0 rgb(0 0 0 / 0.14), 0 1px 10px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:focus {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button--start {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top {\n top: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom {\n bottom: 0\n}\n\n.notificare .notificare__push-onboarding__floating-button__icon {\n fill: #000a64;\n width: 24px;\n height: 24px;\n}\n\n.notificare .notificare__push-onboarding__floating-button-tooltip {\n visibility: hidden;\n position: absolute;\n padding: 12px 24px;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.87);\n border-radius: 8px;\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n opacity: 0;\n transition: opacity 0.3s;\n font-size: 14px;\n line-height: 20px;\n max-width: 274px;\n width: max-content;\n overflow-wrap: break-word;\n}\n\n.notificare .notificare__push-onboarding__floating-button--start .notificare__push-onboarding__floating-button-tooltip {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end .notificare__push-onboarding__floating-button-tooltip {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top .notificare__push-onboarding__floating-button-tooltip {\n top: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom .notificare__push-onboarding__floating-button-tooltip {\n bottom: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover .notificare__push-onboarding__floating-button-tooltip {\n visibility: visible;\n opacity: 1;\n}");const Js=gs({name:us({message:"Application property 'name' should be a string"}).optional(),websitePushConfig:gs({icon:us({message:"Application Website Push config property 'icon' should be a string"}).optional(),launchConfig:gs({applicationName:us({message:"Application Launch config property 'applicationName' should be a string"}).optional(),autoOnboardingOptions:gs({message:us({message:"Auto (dialog) onboarding options property 'message' is required and should be a string"}),cancelButton:us({message:"Auto (dialog) onboarding options property 'cancelButton' is required and should be a string"}),acceptButton:us({message:"Auto (dialog) onboarding options property 'acceptButton' is required and should be a string"})}).optional(),floatingButtonOptions:gs({alignment:gs({horizontal:ws(["start","end"],{errorMap:()=>({message:"Floating button horizontal alignment should be 'start' or 'end'"})}),vertical:ws(["top","bottom"],{errorMap:()=>({message:"Floating button vertical alignment should be 'top' or 'bottom'"})})}),permissionTexts:gs({default:us({message:"Floating button permission texts property 'default' is required and should be a string"}),granted:us({message:"Floating button permission texts property 'granted' is required and should be a string"}),denied:us({message:"Floating button permission texts property 'denied' is required and should be a string"})})}).optional()}).refine((e=>e.autoOnboardingOptions||e.floatingButtonOptions),{message:"Either 'floatingButtonOptions' or 'autoOnboardingOptions' must be present in the launch config options"})})});exports.NotificareInAppMessagePreview=function({inAppMessage:n,locale:i="en-US",translations:r}){const a=jn({locale:i,customTranslations:r,type:"in-app"}),o=t.useMemo((()=>Us.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===a.status&&e.jsx(Wt,{locale:a.data.locale,defaultLocale:"en-US",messages:a.data.translations,children:o.success?e.jsx(Rs,{inAppMessage:o.data}):e.jsx(Bs,{errors:o.error.errors})}),"error"===a.status&&e.jsx(Wt,{locale:"en-US",messages:gn,children:e.jsx(Cn,{message:a.error.message})})]})},exports.NotificareNotificationPreview=function({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen",serviceKey:o,googleMapsAPIKey:s,locale:c="en-US",translations:l}){const p=jn({locale:c,customTranslations:l,type:"push"}),d=t.useMemo((()=>Ps.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===p.status&&e.jsx(Wt,{locale:p.data.locale,defaultLocale:"en-US",messages:p.data.translations,children:e.jsx(An,{serviceKey:o,googleMapsAPIKey:s,children:d.success?e.jsx(Ma,{notification:d.data,applicationId:i,showControls:r,variant:a}):e.jsx(Ms,{errors:d.error.errors})})}),"error"===p.status&&e.jsx(Wt,{locale:"en-US",messages:an,children:e.jsx(Cn,{message:p.error.message})})]})},exports.NotificarePushOnboardingPreview=function({applicationId:n,permissionStatus:i="default",applicationInfo:r,serviceKey:a,locale:o="en-US",translations:s}){const c=jn({locale:o,customTranslations:s,type:"onboarding"}),l=t.useMemo((()=>Js.safeParse(r)),[r]);return e.jsxs("div",{className:"notificare",children:["success"===c.status&&e.jsx(Wt,{locale:c.data.locale,defaultLocale:"en-US",messages:c.data.translations,children:l.success?e.jsx("div",{className:"notificare__push__preview",children:e.jsx(Xs,{applicationId:n,permissionStatus:i,applicationInfo:r,serviceKey:a})}):e.jsx(Ys,{errors:l.error.errors})}),"error"===c.status&&e.jsx(Wt,{locale:"en-US",messages:xn,children:e.jsx(Cn,{message:c.error.message})})]})};
10
10
  //# sourceMappingURL=index.js.map