@builder.io/react 3.0.2-0 → 3.0.3

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.
Files changed (138) hide show
  1. package/dist/builder-react-lite.cjs.js +1 -1
  2. package/dist/builder-react-lite.cjs.js.map +1 -1
  3. package/dist/builder-react-lite.esm.js +1 -1
  4. package/dist/builder-react-lite.esm.js.map +1 -1
  5. package/dist/builder-react.browser.js +1 -1
  6. package/dist/builder-react.browser.js.map +1 -1
  7. package/dist/builder-react.cjs.js +1 -1
  8. package/dist/builder-react.cjs.js.map +1 -1
  9. package/dist/builder-react.es5.js +2 -0
  10. package/dist/builder-react.es5.js.map +1 -0
  11. package/dist/builder-react.unpkg.js +1 -1
  12. package/dist/builder-react.unpkg.js.map +1 -1
  13. package/dist/lib/package.json +4 -4
  14. package/dist/lib/rollup.config.js +29 -23
  15. package/dist/lib/rollup.config.js.map +1 -1
  16. package/dist/lib/src/blocks/Button.js +13 -7
  17. package/dist/lib/src/blocks/Button.js.map +1 -1
  18. package/dist/lib/src/blocks/Columns.js +21 -15
  19. package/dist/lib/src/blocks/Columns.js.map +1 -1
  20. package/dist/lib/src/blocks/CustomCode.js +19 -13
  21. package/dist/lib/src/blocks/CustomCode.js.map +1 -1
  22. package/dist/lib/src/blocks/Embed.js +13 -7
  23. package/dist/lib/src/blocks/Embed.js.map +1 -1
  24. package/dist/lib/src/blocks/Fragment.js +12 -6
  25. package/dist/lib/src/blocks/Fragment.js.map +1 -1
  26. package/dist/lib/src/blocks/Image.js +39 -30
  27. package/dist/lib/src/blocks/Image.js.map +1 -1
  28. package/dist/lib/src/blocks/Mutation.js +17 -10
  29. package/dist/lib/src/blocks/Mutation.js.map +1 -1
  30. package/dist/lib/src/blocks/Router.js +24 -18
  31. package/dist/lib/src/blocks/Router.js.map +1 -1
  32. package/dist/lib/src/blocks/Section.js +15 -9
  33. package/dist/lib/src/blocks/Section.js.map +1 -1
  34. package/dist/lib/src/blocks/Slot.js +14 -10
  35. package/dist/lib/src/blocks/Slot.js.map +1 -1
  36. package/dist/lib/src/blocks/StateProvider.js +14 -8
  37. package/dist/lib/src/blocks/StateProvider.js.map +1 -1
  38. package/dist/lib/src/blocks/Symbol.js +27 -21
  39. package/dist/lib/src/blocks/Symbol.js.map +1 -1
  40. package/dist/lib/src/blocks/Text.js +20 -14
  41. package/dist/lib/src/blocks/Text.js.map +1 -1
  42. package/dist/lib/src/blocks/Video.js +21 -15
  43. package/dist/lib/src/blocks/Video.js.map +1 -1
  44. package/dist/lib/src/blocks/forms/Button.js +11 -5
  45. package/dist/lib/src/blocks/forms/Button.js.map +1 -1
  46. package/dist/lib/src/blocks/forms/Form.js +28 -22
  47. package/dist/lib/src/blocks/forms/Form.js.map +1 -1
  48. package/dist/lib/src/blocks/forms/Input.js +12 -6
  49. package/dist/lib/src/blocks/forms/Input.js.map +1 -1
  50. package/dist/lib/src/blocks/forms/Label.js +14 -8
  51. package/dist/lib/src/blocks/forms/Label.js.map +1 -1
  52. package/dist/lib/src/blocks/forms/Select.js +13 -7
  53. package/dist/lib/src/blocks/forms/Select.js.map +1 -1
  54. package/dist/lib/src/blocks/forms/TextArea.js +11 -5
  55. package/dist/lib/src/blocks/forms/TextArea.js.map +1 -1
  56. package/dist/lib/src/blocks/raw/Img.js +11 -5
  57. package/dist/lib/src/blocks/raw/Img.js.map +1 -1
  58. package/dist/lib/src/blocks/raw/RawText.js +31 -4
  59. package/dist/lib/src/blocks/raw/RawText.js.map +1 -1
  60. package/dist/lib/src/builder-react-lite.js +30 -17
  61. package/dist/lib/src/builder-react-lite.js.map +1 -1
  62. package/dist/lib/src/builder-react.js +98 -44
  63. package/dist/lib/src/builder-react.js.map +1 -1
  64. package/dist/lib/src/components/Link.js +11 -4
  65. package/dist/lib/src/components/Link.js.map +1 -1
  66. package/dist/lib/src/components/builder-block.component.js +52 -46
  67. package/dist/lib/src/components/builder-block.component.js.map +1 -1
  68. package/dist/lib/src/components/builder-blocks.component.js +22 -16
  69. package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
  70. package/dist/lib/src/components/builder-component.component.js +108 -102
  71. package/dist/lib/src/components/builder-component.component.js.map +1 -1
  72. package/dist/lib/src/components/builder-content.component.js +38 -31
  73. package/dist/lib/src/components/builder-content.component.js.map +1 -1
  74. package/dist/lib/src/components/insert-spacer.component.js +17 -11
  75. package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
  76. package/dist/lib/src/components/no-wrap.js +5 -1
  77. package/dist/lib/src/components/no-wrap.js.map +1 -1
  78. package/dist/lib/src/components/variants-provider.component.js +36 -9
  79. package/dist/lib/src/components/variants-provider.component.js.map +1 -1
  80. package/dist/lib/src/constants/device-sizes.constant.js +9 -5
  81. package/dist/lib/src/constants/device-sizes.constant.js.map +1 -1
  82. package/dist/lib/src/decorators/builder-block.decorator.js +7 -3
  83. package/dist/lib/src/decorators/builder-block.decorator.js.map +1 -1
  84. package/dist/lib/src/functions/apply-patch-with-mutation.js +5 -1
  85. package/dist/lib/src/functions/apply-patch-with-mutation.js.map +1 -1
  86. package/dist/lib/src/functions/apply-patch-with-mutation.test.js +6 -4
  87. package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +1 -1
  88. package/dist/lib/src/functions/block-to-html-string.js +10 -5
  89. package/dist/lib/src/functions/block-to-html-string.js.map +1 -1
  90. package/dist/lib/src/functions/debonce-next-tick.js +7 -3
  91. package/dist/lib/src/functions/debonce-next-tick.js.map +1 -1
  92. package/dist/lib/src/functions/get-builder-pixel.js +5 -1
  93. package/dist/lib/src/functions/get-builder-pixel.js.map +1 -1
  94. package/dist/lib/src/functions/get.js +5 -1
  95. package/dist/lib/src/functions/get.js.map +1 -1
  96. package/dist/lib/src/functions/no-wrap.js +11 -4
  97. package/dist/lib/src/functions/no-wrap.js.map +1 -1
  98. package/dist/lib/src/functions/safe-dynamic-require.js +8 -8
  99. package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
  100. package/dist/lib/src/functions/set.js +5 -1
  101. package/dist/lib/src/functions/set.js.map +1 -1
  102. package/dist/lib/src/functions/string-to-function.js +16 -11
  103. package/dist/lib/src/functions/string-to-function.js.map +1 -1
  104. package/dist/lib/src/functions/throttle.js +5 -1
  105. package/dist/lib/src/functions/throttle.js.map +1 -1
  106. package/dist/lib/src/functions/try-eval.js +12 -8
  107. package/dist/lib/src/functions/try-eval.js.map +1 -1
  108. package/dist/lib/src/functions/update-metadata.js +9 -5
  109. package/dist/lib/src/functions/update-metadata.js.map +1 -1
  110. package/dist/lib/src/functions/utils.js +5 -1
  111. package/dist/lib/src/functions/utils.js.map +1 -1
  112. package/dist/lib/src/functions/with-builder.js +7 -3
  113. package/dist/lib/src/functions/with-builder.js.map +1 -1
  114. package/dist/lib/src/functions/with-children.js +13 -6
  115. package/dist/lib/src/functions/with-children.js.map +1 -1
  116. package/dist/lib/src/hooks/useIsPreviewing.js +10 -6
  117. package/dist/lib/src/hooks/useIsPreviewing.js.map +1 -1
  118. package/dist/lib/src/scripts/init-editing.js +4 -2
  119. package/dist/lib/src/scripts/init-editing.js.map +1 -1
  120. package/dist/lib/src/store/builder-async-requests.js +12 -4
  121. package/dist/lib/src/store/builder-async-requests.js.map +1 -1
  122. package/dist/lib/src/store/builder-meta.js +8 -2
  123. package/dist/lib/src/store/builder-meta.js.map +1 -1
  124. package/dist/lib/src/store/builder-store.js +8 -2
  125. package/dist/lib/src/store/builder-store.js.map +1 -1
  126. package/dist/lib/src/to-error.js +5 -1
  127. package/dist/lib/src/to-error.js.map +1 -1
  128. package/dist/lib/test/basic.test.js +74 -49
  129. package/dist/lib/test/basic.test.js.map +1 -1
  130. package/dist/lib/test/functions/render-block.js +8 -3
  131. package/dist/lib/test/functions/render-block.js.map +1 -1
  132. package/dist/lib/test/image.test.js +39 -14
  133. package/dist/lib/test/image.test.js.map +1 -1
  134. package/dist/types/src/components/builder-content.component.d.ts +67 -1
  135. package/package.json +6 -7
  136. package/rollup.config.ts +1 -0
  137. package/src/components/builder-component.component.tsx +1 -1
  138. package/src/functions/string-to-function.ts +1 -1
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@builder.io/react",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BuilderReact={})}(this,(function(exports){"use strict";var version$3="3.0.1",_a;"undefined"!=typeof window&&(null===(_a=window.parent)||void 0===_a||_a.postMessage({type:"builder.isReactSdk",data:{value:!0,supportsPatchUpdates:"v4",supportsCustomBreakpoints:!0,priorVersion:version$3}},"*"));var extendStatics=function(e,t){return(extendStatics=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])})(e,t)};function __extends(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}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function __decorate(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pad$1(e,t){for(;e.length<t;)e="0"+e;return e}function fold$1(e,t){var n,r;if(0===t.length)return e;for(n=0,r=t.length;n<r;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e<0?-2*e:e}function foldObject$1(e,t,n){return Object.keys(t).sort().reduce((function(e,r){return foldValue$1(e,t[r],r,n)}),e)}function foldValue$1(e,t,n,r){var i=fold$1(fold$1(fold$1(e,n),toString$2(t)),typeof t);if(null===t)return fold$1(i,"null");if(void 0===t)return fold$1(i,"undefined");if("object"==typeof t||"function"==typeof t){if(-1!==r.indexOf(t))return fold$1(i,"[Circular]"+n);r.push(t);var o=foldObject$1(i,t,r);if(!("valueOf"in t)||"function"!=typeof t.valueOf)return o;try{return fold$1(o,String(t.valueOf()))}catch(e){return fold$1(o,"[valueOf exception]"+(e.stack||e.message))}}return fold$1(i,t.toString())}function toString$2(e){return Object.prototype.toString.call(e)}function sum$1(e){return pad$1(foldValue$1(0,e,"",[]).toString(16),8)}var hashSum$1=sum$1;!function(){if("undefined"==typeof window||"function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();var isSafari="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function nextTick$1(e){if("function"==typeof setImmediate&&"undefined"==typeof window)return setImmediate(e);if(isSafari||"undefined"==typeof MutationObserver)setTimeout(e);else{var t=0,n=new MutationObserver((function(){return e()})),r=document.createTextNode("");n.observe(r,{characterData:!0}),r.data=String(t=++t)}}var PROPERTY_NAME_DENY_LIST=Object.freeze(["__proto__","prototype","constructor"]),QueryString=function(){function e(){}return e.parseDeep=function(e){var t=this.parse(e);return this.deepen(t)},e.stringifyDeep=function(e){var t=this.flatten(e);return this.stringify(t)},e.parse=function(e){for(var t={},n=("?"===e[0]?e.substr(1):e).split("&"),r=0;r<n.length;r++){var i=n[r].split("=");try{t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}catch(e){}}return t},e.stringify=function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(r)}return t},e.deepen=function(e){var t={};for(var n in e){for(var r=t,i=n.split("."),o=i.pop(),a=0,s=i;a<s.length;a++){var l=s[a];assertAllowedPropertyName(l),r=r[l]=r[l]||{}}r[o]=e[n]}return t},e.flatten=function(e,t,n){for(var r in void 0===n&&(n={}),e){var i=e[r],o=t?t+"."+r:r;i&&"object"==typeof i?this.flatten(i,o,n):n[o]=i}return n},e}();function assertAllowedPropertyName(e){if(PROPERTY_NAME_DENY_LIST.indexOf(e)>=0)throw new Error('Property name "'.concat(e,'" is not allowed'))}var version$2="2.0.0",Subscription=function(){function e(e,t){this.listeners=e,this.listener=t,this.unsubscribed=!1,this.otherSubscriptions=[]}return Object.defineProperty(e.prototype,"closed",{get:function(){return this.unsubscribed},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this.otherSubscriptions.push(e)},e.prototype.unsubscribe=function(){if(!this.unsubscribed){if(this.listener&&this.listeners){var e=this.listeners.indexOf(this.listener);e>-1&&this.listeners.splice(e,1)}this.otherSubscriptions.forEach((function(e){return e.unsubscribe()})),this.unsubscribed=!0}},e}(),BehaviorSubject=function(){function e(e){this.value=e,this.listeners=[],this.errorListeners=[]}return e.prototype.next=function(e){this.value=e;for(var t=0,n=this.listeners;t<n.length;t++){(0,n[t])(e)}},e.prototype.map=function(t){var n=new e(t(this.value));return this.subscribe((function(e){n.next(t(e))})),this.catch((function(e){n.error(e)})),n},e.prototype.catch=function(e){return this.errorListeners.push(e),new Subscription(this.errorListeners,e)},e.prototype.error=function(e){for(var t=0,n=this.errorListeners;t<n.length;t++){(0,n[t])(e)}},e.prototype.subscribe=function(e,t){return this.listeners.push(e),t&&this.errorListeners.push(t),new Subscription(this.listeners,e)},e.prototype.toPromise=function(){var e=this;return new Promise((function(t,n){var r=e.subscribe((function(e){t(e),r.unsubscribe()}),(function(e){n(e),r.unsubscribe()}))}))},e.prototype.promise=function(){return this.toPromise()},e}(),State={Pending:"Pending",Fulfilled:"Fulfilled",Rejected:"Rejected"};function isFunction(e){return e&&"function"==typeof e}function isObject(e){return e&&"object"==typeof e}var TinyPromise=function(){function e(e){this._state=State.Pending,this._handlers=[],this._value=null,e(this._resolve.bind(this),this._reject.bind(this))}return e.prototype._resolve=function(t){var n=this;if(t instanceof e)t.then(this._resolve.bind(this),this._reject.bind(this));else if(isObject(t)||isFunction(t)){var r=!1;try{var i=t.then;isFunction(i)?i.call(t,(function(e){r||n._resolve(e),r=!0}),(function(e){r||n._reject(e),r=!0})):this._fulfill(t)}catch(e){r||this._reject(e)}}else this._fulfill(t)},e.prototype._fulfill=function(e){var t=this;this._state=State.Fulfilled,this._value=e,this._handlers.forEach((function(e){return t._callHandler(e)}))},e.prototype._reject=function(e){var t=this;this._state=State.Rejected,this._value=e,this._handlers.forEach((function(e){return t._callHandler(e)}))},e.prototype._isPending=function(){return this._state===State.Pending},e.prototype._isFulfilled=function(){return this._state===State.Fulfilled},e.prototype._isRejected=function(){return this._state===State.Rejected},e.prototype._addHandler=function(e,t){this._handlers.push({onFulfilled:e,onRejected:t})},e.prototype._callHandler=function(e){this._isFulfilled()&&isFunction(e.onFulfilled)?e.onFulfilled(this._value):this._isRejected()&&isFunction(e.onRejected)&&e.onRejected(this._value)},e.prototype.then=function(t,n){var r=this;switch(this._state){case State.Pending:return new e((function(e,i){r._addHandler((function(n){nextTick$1((function(){try{isFunction(t)?e(t(n)):e(n)}catch(e){i(e)}}))}),(function(t){nextTick$1((function(){try{isFunction(n)?e(n(t)):i(t)}catch(e){i(e)}}))}))}));case State.Fulfilled:return new e((function(e,n){nextTick$1((function(){try{isFunction(t)?e(t(r._value)):e(r._value)}catch(e){n(e)}}))}));case State.Rejected:return new e((function(e,t){nextTick$1((function(){try{isFunction(n)?e(n(r._value)):t(r._value)}catch(e){t(e)}}))}))}},e}(),Promise$1="undefined"!=typeof Promise?Promise:TinyPromise,serverOnlyRequire;try{serverOnlyRequire=eval("require")}catch(e){serverOnlyRequire=function(){return null}}var serverOnlyRequire$1=serverOnlyRequire;function promiseResolve(e){return new Promise$1((function(t){return t(e)}))}function tinyFetch(e,t){return void 0===t&&(t={}),new Promise$1((function(n,r){var i=new XMLHttpRequest;if(i.open(t.method||"get",e,!0),t.headers)for(var o in t.headers)i.setRequestHeader(o,t.headers[o]);function a(){var e=[],t=[],n={},r=void 0;return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,o,a){var s=o;return e.push(s=s.toLowerCase()),t.push([s,a]),r=n[s],n[s]=r?"".concat(r,",").concat(a):a,""})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:a,text:function(){return promiseResolve(i.responseText)},json:function(){return promiseResolve(i.responseText).then(JSON.parse)},blob:function(){return promiseResolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return t},get:function(e){return n[e.toLowerCase()]},has:function(e){return e.toLowerCase()in n}}}}i.withCredentials="include"===t.credentials,i.onload=function(){n(a())},i.onerror=r,i.send(t.body)}))}function getFetch(){var e=void 0;if(globalThis.fetch)null!=e||(e=globalThis.fetch);else if("undefined"==typeof window)try{null!=e||(e=serverOnlyRequire$1("node-fetch"))}catch(e){console.warn("node-fetch is not installed. consider polyfilling fetch or installing node-fetch."),console.warn(e)}return null!=e?e:tinyFetch}function assign(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}function throttle$1(e,t,n){var r,i,o;void 0===n&&(n={});var a=null,s=0,l=function(){s=!1===n.leading?0:Date.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return r=this,i=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(l,c)),o}}var camelCaseToKebabCase$1=function(e){return e?e.replace(/([A-Z])/g,(function(e){return"-".concat(e[0].toLowerCase())})):""},Animator=function(){function e(){}return e.prototype.bindAnimations=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];switch(r.trigger){case"pageLoad":this.triggerAnimation(r);break;case"hover":this.bindHoverAnimation(r);break;case"scrollInView":this.bindScrollInViewAnimation(r)}}},e.prototype.warnElementNotPresent=function(e){console.warn("Cannot animate element: element with ID ".concat(e," not found!"))},e.prototype.augmentAnimation=function(e,t){for(var n=this.getAllStylesUsed(e),r=getComputedStyle(t),i=0,o=[e.steps[0].styles,e.steps[e.steps.length-1].styles];i<o.length;i++)for(var a=o[i],s=0,l=n;s<l.length;s++){var u=l[s];u in a||(a[u]=r[u])}},e.prototype.getAllStylesUsed=function(e){for(var t=[],n=0,r=e.steps;n<r.length;n++){var i=r[n];for(var o in i.styles)-1===t.indexOf(o)&&t.push(o)}return t},e.prototype.triggerAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout((function(){n.style.transition="",n.style.transitionDelay=""}),1e3*(e.delay||0)+1e3*e.duration+100)}))})):this.warnElementNotPresent(e.elementId||e.id||"")},e.prototype.bindHoverAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n);var r=e.steps[0].styles,i=e.steps[1].styles;function o(){assign(n.style,r)}o(),n.addEventListener("mouseenter",(function(){assign(n.style,i)})),n.addEventListener("mouseleave",o),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s")}))})):this.warnElementNotPresent(e.elementId||e.id||"")},e.prototype.bindScrollInViewAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n);var r=!1,i=!1;function o(){!r&&s(n)?(r=!0,i=!0,setTimeout((function(){assign(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",a),setTimeout((function(){i=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")}),1e3*(e.duration+(e.delay||0))+100)}))):e.repeat&&r&&!i&&!s(n)&&(r=!1,assign(n.style,e.steps[0].styles))}var a=throttle$1(o,200,{leading:!1});function s(t){var n=t.getBoundingClientRect(),r=window.innerHeight,i=(e.thresholdPercent||0)/100*r;return n.bottom>i&&n.top<r-i}var l=e.steps[0].styles;assign(n.style,l),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s")})),document.addEventListener("scroll",a,{capture:!0,passive:!0}),o()})):this.warnElementNotPresent(e.elementId||e.id||"")},e}();function getTopLevelDomain(e){var t=e.split(".");return t.length>2?t.slice(1).join("."):e}var fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Cookies=function(){function e(e,t){this.request=e,this.response=t}return e.prototype.get=function(e){var t=this.request.headers.cookie;if(t){var n=t.match(getPattern(e));if(n)return n[1]}},e.prototype.set=function(e,t,n){var r=this.response,i=this.request,o=r.getHeader("Set-Cookie")||[],a=void 0!==this.secure?!!this.secure:"https"===i.protocol||i.connection.encrypted,s=new Cookie(e,t,n);if("string"==typeof o&&(o=[o]),!a&&n&&n.secure)throw new Error("Cannot send secure cookie over unencrypted connection");return s.secure=a,n&&"secure"in n&&(s.secure=!!n.secure),s.domain=i.headers.host&&getTopLevelDomain(i.headers.host),pushCookie(o,s),r.setHeader.call(r,"Set-Cookie",o),this},e}(),Cookie=function(){function e(e,t,n){if(this.path="/",this.domain=void 0,this.httpOnly=!0,this.sameSite=!1,this.secure=!1,this.overwrite=!1,this.name="",this.value="",!fieldContentRegExp.test(e))throw new TypeError("argument name is invalid");if(t&&!fieldContentRegExp.test(t))throw new TypeError("argument value is invalid");t||(this.expires=new Date(0)),this.name=e,this.value=t||"",n.expires&&(this.expires=n.expires),n.secure&&(this.secure=n.secure)}return e.prototype.toString=function(){return"".concat(this.name,"=").concat(this.value)},e.prototype.toHeader=function(){var e=this.toString();return this.maxAge&&(this.expires=new Date(Date.now()+this.maxAge)),this.path&&(e+="; path=".concat(this.path)),this.expires&&(e+="; expires=".concat(this.expires.toUTCString())),this.domain&&(e+="; domain=".concat(this.domain)),e+="; SameSite=".concat(!0===this.sameSite?"strict":"None"),this.secure&&(e+="; secure"),this.httpOnly&&(e+="; httponly"),e},e}();function getPattern(e){return new RegExp("(?:^|;) *".concat(e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"=([^;]*)"))}function pushCookie(e,t){if(t.overwrite)for(var n=e.length-1;n>=0;n--)0===e[n].indexOf("".concat(t.name,"="))&&e.splice(n,1);e.push(t.toHeader())}function omit$2(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=Object.assign({},e),i=0,o=t;i<o.length;i++){var a=o[i];delete r[a]}return r}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function uuid(){return uuidv4().replace(/-/g,"")}function emptyUrl(){return{query:null,port:null,auth:null,hash:null,host:null,hostname:null,href:null,path:null,pathname:null,protocol:null,search:null,slashes:null}}function parse(e){var t,n=emptyUrl();return""===e||"/"===e[0]?(t=new URL(e,"http://0.0.0.0/"),n.href=t.href,n.href=n.href.slice(14)):(t=new URL(e),n.href=t.href,n.port=""===t.port?null:t.port,n.hash=""===t.hash?null:t.hash,n.host=t.host,n.hostname=t.hostname,n.href=t.href,n.pathname=t.pathname,n.protocol=t.protocol,n.slashes="/"===e[t.protocol.length]),n.search=t.search,n.query=t.search.slice(1),n.path="".concat(t.pathname).concat(t.search),n.pathname=t.pathname,n}function toError$1(e){return e instanceof Error?e:new Error(String(e))}var DEFAULT_API_VERSION="v3";function datePlusMinutes(e){return void 0===e&&(e=30),new Date(Date.now()+6e4*e)}var isPositiveNumber=function(e){return"number"==typeof e&&!isNaN(e)&&e>=0},isReactNative="object"==typeof navigator&&"ReactNative"===navigator.product,validEnvList=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"];function getQueryParam(e,t){for(var n=(e.split("?")[1]||"").split("&"),r=0;r<n.length;r++){var i=n[r].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1])}return null}var urlParser={parse:function(e){var t=document.createElement("a");t.href=e;for(var n={},r=0,i=["username","password","host","hostname","port","protocol","origin","pathname","search","hash"];r<i.length;r++){var o=i[r];n[o]=t[o]}return!n.pathname&&""!==n.pathname||"string"!=typeof n.pathname||0===n.pathname.indexOf("/")||(n.pathname="/"+n.pathname),n}},parse$1=isReactNative?function(){return emptyUrl()}:"object"==typeof window?urlParser.parse:parse;function setCookie(e,t,n){try{var r="";n&&(r="; expires="+n.toUTCString());var i=!isBrowser$3||"https:"===location.protocol;document.cookie=e+"="+(t||"")+r+"; path=/"+"; domain=".concat(getTopLevelDomain(location.hostname))+(i?";secure ; SameSite=None":"")}catch(e){console.warn("Could not set cookie",e)}}function getCookie(e){try{return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}catch(e){console.warn("Could not get cookie",e)}}function size$2(e){return Object.keys(e).length}function find(e,t){for(var n=e,r=n.length>>>0,i=arguments[1],o=0;o<r;o++){var a=n[o];if(t.call(i,a,o,n))return a}}var sessionStorageKey="builderSessionId",localStorageKey="builderVisitorId",isBrowser$3="undefined"!=typeof window&&!isReactNative,isIframe=isBrowser$3&&window.top!==window.self,Builder=function(){function e(t,n,r,i,o,a){void 0===t&&(t=null),void 0===i&&(i=!1),void 0===o&&(o=null);var s=this;if(this.request=n,this.response=r,this.eventsQueue=[],this.throttledClearEventsQueue=throttle$1((function(){s.processEventsQueue(),s.setCookie(sessionStorageKey,s.sessionId,datePlusMinutes(30))}),5),this.env="production",this.sessionId=this.getSessionId(),this.targetContent=!0,this.contentPerRequest=1,this.allowCustomFonts=!0,this.cookies=null,this.cachebust=!1,this.overrideParams="",this.noCache=!1,this.preview=!1,this.apiVersion$=new BehaviorSubject(void 0),this.canTrack$=new BehaviorSubject(!this.browserTrackingDisabled),this.apiKey$=new BehaviorSubject(null),this.authToken$=new BehaviorSubject(null),this.userAttributesChanged=new BehaviorSubject(null),this.editingMode$=new BehaviorSubject(isIframe),this.editingModel$=new BehaviorSubject(null),this.userAgent="object"==typeof navigator&&navigator.userAgent||"",this.trackingHooks=[],this.visitorId=this.getVisitorId(),this.autoTrack=!!e.isBrowser&&!(this.isDevelopmentEnv||e.isBrowser&&-1!==location.search.indexOf("builder.preview=")),this.trackingUserAttributes={},this.blockContentLoading="",this.observersByKey={},this.noEditorUpdates={},this.overrides={},this.queryOptions={},this.getContentQueue=null,this.priorContentQueue=null,this.testCookiePrefix="builder.tests",this.cookieQueue=[],e.isBrowser&&!i&&e.singletonInstance)return e.singletonInstance;this.request&&this.response&&(this.setUserAgent(this.request.headers["user-agent"]||""),this.cookies=new Cookies(this.request,this.response)),t&&(this.apiKey=t),a&&(this.apiVersion=a),o&&(this.authToken=o),isBrowser$3&&(this.bindMessageListeners(),e.isEditing&&parent.postMessage({type:"builder.animatorOptions",data:{options:{version:2}}},"*")),isIframe&&this.messageFrameLoaded(),this.canTrack$.subscribe((function(e){if(e){if("undefined"!=typeof sessionStorage)try{sessionStorage.getItem(sessionStorageKey)||sessionStorage.setItem(sessionStorageKey,s.sessionId)}catch(e){console.debug("Session storage error",e)}s.eventsQueue.length&&s.throttledClearEventsQueue(),s.cookieQueue.length&&(s.cookieQueue.forEach((function(e){s.setCookie(e[0],e[1])})),s.cookieQueue.length=0)}})),isBrowser$3&&(this.setTestsFromUrl(),this.getOverridesFromQueryString())}return e.register=function(t,n){var r=this.registry[t];if(r||(r=this.registry[t]=[]),r.push(n),e.isBrowser){var i={type:"builder.register",data:{type:t,info:n}};try{parent.postMessage(i,"*"),parent!==window&&window.postMessage(i,"*")}catch(e){console.debug("Could not postmessage",e)}}this.registryChange.next(this.registry)},e.registerEditor=function(t){if(e.isBrowser){window.postMessage({type:"builder.registerEditor",data:omit$2(t,"component")},"*");var n=location.hostname;e.isTrustedHost(n)||console.error("Builder.registerEditor() called in the wrong environment! You cannot load custom editors from your app, they must be loaded through the Builder.io app itself. Follow the readme here for more details: https://github.com/builderio/builder/tree/master/plugins/cloudinary or contact chat us in our Spectrum community for help: https://spectrum.chat/builder")}this.editors.push(t)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerAction=function(e){this.actions.push(e)},e.registerTrustedHost=function(e){this.trustedHosts.push(e)},e.isTrustedHost=function(e){return this.trustedHosts.findIndex((function(t){return t===e||e.endsWith(".".concat(t))}))>-1},e.runAction=function(e){if(!("string"==typeof e?find(this.actions,(function(t){return t.name===e})):e))throw new Error("Action not found: ".concat(e))},e.fields=function(e,t){var n;null===(n=window.parent)||void 0===n||n.postMessage({type:"builder.fields",data:{name:e,fields:t}},"*")},e.set=function(t){e.register("editor.settings",t)},e.import=function(t){if(e.isBrowser){var n=window.System;if(n)return n.import("https://cdn.builder.io/systemjs/".concat(t));console.warn("System.js not available. Please include System.js when using Builder.import")}else console.warn("Builder.import used on the server - this should only be used in the browser")},Object.defineProperty(e,"editingPage",{get:function(){return this._editingPage},set:function(e){this._editingPage=e,isBrowser$3&&isIframe&&(e?document.body.classList.add("builder-editing-page"):document.body.classList.remove("builder-editing-page"))},enumerable:!1,configurable:!0}),e.prepareComponentSpecToSend=function(e){return __assign(__assign(__assign({},e),e.inputs&&{inputs:e.inputs.map((function(e){for(var t,n=0,r=["onChange","showIf"];n<r.length;n++){var i=r[n];if(e[i]&&"function"==typeof e[i]){var o=e[i];e=__assign(__assign({},e),((t={})[i]="return (".concat(o.toString(),").apply(this, arguments)"),t))}}return e}))}),{hooks:Object.keys(e.hooks||{}).reduce((function(t,n){var r=e.hooks&&e.hooks[n];return r?(t[n]="string"==typeof r?r:"return (".concat(r.toString(),").apply(this, arguments)"),t):t}),{}),class:void 0})},e.registerBlock=function(e,t){this.registerComponent(e,t)},e.registerComponent=function(e,t){var n,r=__assign(__assign({class:e},e.builderOptions),t);if(this.addComponent(r),t.models&&this.singletonInstance.editingModel?isBrowser$3&&t.models.includes(this.singletonInstance.editingModel):isBrowser$3){var i=this.prepareComponentSpecToSend(r);null===(n=window.parent)||void 0===n||n.postMessage({type:"builder.registerComponent",data:i},"*")}},e.addComponent=function(e){var t=find(this.components,(function(t){return t.name===e.name}));if(t){if(t.class&&!e.class)return;this.components.splice(this.components.indexOf(t),1,e)}else this.components.push(e)},e.component=function(e){var t=this;return void 0===e&&(e={}),function(n){var r,i=__assign(__assign({},e),{class:n});i.name||(i.name=n.name),t.addComponent(i);var o=t.prepareComponentSpecToSend(i);return isBrowser$3&&(null===(r=window.parent)||void 0===r||r.postMessage({type:"builder.registerComponent",data:o},"*")),n}},Object.defineProperty(e,"Component",{get:function(){return this.component},enumerable:!1,configurable:!0}),e.prototype.processEventsQueue=function(){if(this.eventsQueue.length){var t=this.eventsQueue;this.eventsQueue=[];for(var n=__assign(__assign({},e.overrideUserAttributes),this.trackingUserAttributes),r=0,i=t;r<i.length;r++){var o=i[r];o.data.metadata||(o.data.metadata={}),o.data.metadata.user||(o.data.metadata.user={}),Object.assign(o.data.metadata.user,n,o.data.metadata.user)}var a=this.host;getFetch()("".concat(a,"/api/v1/track"),{method:"POST",body:JSON.stringify({events:t}),headers:{"content-type":"application/json"},mode:"cors"}).catch((function(){}))}},Object.defineProperty(e.prototype,"browserTrackingDisabled",{get:function(){return e.isBrowser&&Boolean(window.builderNoTrack||!navigator.cookieEnabled)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canTrack",{get:function(){return this.canTrack$.value},set:function(e){this.canTrack!==e&&this.canTrack$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiVersion",{get:function(){return this.apiVersion$.value},set:function(e){this.apiVersion!==e&&this.apiVersion$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editingMode",{get:function(){return this.editingMode$.value},set:function(e){e!==this.editingMode&&this.editingMode$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editingModel",{get:function(){return this.editingModel$.value},set:function(e){e!==this.editingModel&&this.editingModel$.next(e)},enumerable:!1,configurable:!0}),e.prototype.findParentElement=function(e,t,n){if(void 0===n&&(n=!0),!(e instanceof HTMLElement))return null;var r=n?e:e.parentElement;do{if(!r)return null;if(t(r))return r}while(r=r.parentElement);return null},e.prototype.findBuilderParent=function(e){return this.findParentElement(e,(function(e){var t=e.getAttribute("builder-id")||e.id;return Boolean(t&&0===t.indexOf("builder-"))}))},e.prototype.setUserAgent=function(e){this.userAgent=e||""},e.prototype.setTrackingHook=function(e){this.trackingHooks.push(e)},e.prototype.track=function(t,n,r){if(void 0===n&&(n={}),!isIframe&&isBrowser$3&&!e.isPreviewing){var i=this.apiKey;if(i){for(var o=JSON.parse(JSON.stringify({type:t,data:__assign(__assign({},omit$2(n,"meta")),{metadata:__assign(__assign({sdkVersion:e.VERSION,url:location.href},n.meta),n.metadata),ownerId:i,userAttributes:this.getUserAttributes(),sessionId:this.sessionId,visitorId:this.visitorId})})),a=0,s=this.trackingHooks;a<s.length;a++){var l=(0,s[a])(o,r||{});l&&(o=l)}this.eventsQueue.push(o),this.canTrack&&this.throttledClearEventsQueue()}else console.error('Builder integration error: Looks like the Builder SDK has not been initialized properly (your API key has not been set). Make sure you are calling `builder.init("«YOUR-API-KEY»");` as early as possible in your application\'s code.')}},e.prototype.getSessionId=function(){var t=this,n=null;try{e.isBrowser&&"undefined"!=typeof sessionStorage&&(n=this.getCookie(sessionStorageKey))}catch(e){console.debug("Session storage error",e)}return n||(n=uuid()),e.isBrowser&&setTimeout((function(){try{t.canTrack&&t.setCookie(sessionStorageKey,n,datePlusMinutes(30))}catch(e){console.debug("Cookie setting error",e)}})),n},e.prototype.getVisitorId=function(){var t=this;if(this.visitorId)return this.visitorId;var n=null;try{e.isBrowser&&"undefined"!=typeof localStorage&&(n=localStorage.getItem(localStorageKey))}catch(e){console.debug("Local storage error",e)}return n||(n=uuid()),this.visitorId=n,e.isBrowser&&setTimeout((function(){try{t.canTrack&&"undefined"!=typeof localStorage&&n&&localStorage.setItem(localStorageKey,n)}catch(e){console.debug("Session storage error",e)}})),n},e.prototype.trackImpression=function(t,n,r,i){isIframe||!isBrowser$3||e.isPreviewing||this.track("impression",{contentId:t,variationId:n!==t?n:void 0,metadata:r},i)},e.prototype.trackConversion=function(t,n,r,i,o){if(!isIframe&&isBrowser$3&&!e.isPreviewing){var a="object"==typeof n?n:i,s="string"==typeof n?n:void 0;this.track("conversion",{amount:t,variationId:r,meta:a,contentId:s},o)}},Object.defineProperty(e.prototype,"isDevelopmentEnv",{get:function(){return e.isIframe||e.isBrowser&&("localhost"===location.hostname||""!==location.port)||"production"!==this.env},enumerable:!1,configurable:!0}),e.prototype.trackInteraction=function(t,n,r,i,o){if(void 0===r&&(r=!1),!isIframe&&isBrowser$3&&!e.isPreviewing){var a=i&&i.target,s=a&&this.findBuilderParent(a),l={};if(i){var u=i.clientX,c=i.clientY;if(a){var d=u-(m=a.getBoundingClientRect()).left,p=c-m.top,f=v(d/m.width),h=v(p/m.height);l.targetOffset={x:f,y:h}}if(s){var m;d=u-(m=s.getBoundingClientRect()).left,p=c-m.top,f=v(d/m.width),h=v(p/m.height);l.builderTargetOffset={x:f,y:h}}}var g=s&&(s.getAttribute("builder-id")||s.id);g&&s&&(l.builderElementIndex=[].slice.call(document.getElementsByClassName(g)).indexOf(s)),this.track("click",{contentId:t,metadata:l,variationId:n!==t?n:void 0,unique:!r,targetBuilderElement:g||void 0},o)}function v(e){return Math.round(1e3*e)/1e3}},e.prototype.component=function(t){return void 0===t&&(t={}),e.component(t)},Object.defineProperty(e.prototype,"apiKey",{get:function(){return this.apiKey$.value},set:function(e){this.apiKey$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authToken",{get:function(){return this.authToken$.value},set:function(e){this.authToken$.next(e)},enumerable:!1,configurable:!0}),e.prototype.modifySearch=function(e){return e.replace(/(^|&|\?)(builder_.*?)=/gi,(function(e,t,n){return t+n.replace(/_/g,".")+"="}))},e.prototype.setTestsFromUrl=function(){var e=this.getLocation().search,t=QueryString.parseDeep(this.modifySearch(e||"").substr(1)),n=t.builder&&t.builder.tests;if(n&&"object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&this.setTestCookie(r,n[r])},e.prototype.resetOverrides=function(){e.overrideUserAttributes={},this.cachebust=!1,this.noCache=!1,this.preview=!1,this.editingModel=null,this.overrides={},this.env="production",this.userAgent="",this.request=void 0,this.response=void 0},e.prototype.getOverridesFromQueryString=function(){var t=this.getLocation(),n=QueryString.parseDeep(this.modifySearch(t.search||"").substr(1)),r=n.builder;if(r){var i=r.userAttributes,o=r.overrides,a=r.env;r.host;var s=r.api,l=r.cachebust,u=r.noCache,c=r.preview,d=r.editing,p=r.frameEditing,f=r.options,h=r.params;if(i&&this.setUserAttributes(i),f&&(this.queryOptions=__assign(__assign({},f.locale&&{locale:f.locale}),f.includeRefs&&{includeRefs:f.includeRefs})),o&&(this.overrides=o),validEnvList.indexOf(a||s)>-1&&(this.env=a||s),e.isEditing){var m=p||d||c;m&&"true"!==m&&(this.editingModel=m)}l&&(this.cachebust=!0),u&&(this.noCache=!0),c&&(this.preview=!0),n&&(this.overrideParams=h)}},e.prototype.messageFrameLoaded=function(){var e;null===(e=window.parent)||void 0===e||e.postMessage({type:"builder.loaded",data:{value:!0}},"*")},e.prototype.bindMessageListeners=function(){var t=this;isBrowser$3&&addEventListener("message",(function(n){var r,i,o,a,s,l=parse$1(n.origin),u=-1===["builder.register","builder.registerComponent"].indexOf(null===(r=n.data)||void 0===r?void 0:r.type),c=l.hostname&&e.isTrustedHost(l.hostname);if(!u||c){var d=n.data;if(d)switch(d.type){case"builder.ping":null===(i=window.parent)||void 0===i||i.postMessage({type:"builder.pong",data:{}},"*");break;case"builder.register":if(n.source===window)break;var p=d.data;if(!p)break;var f=p.type,h=p.info,m=e.registry[f];m||(m=e.registry[f]=[]),m.push(h),e.registryChange.next(e.registry);break;case"builder.settingsChange":if(n.source===window)break;var g=d.data;if(!g)break;Object.assign(e.settings,g),e.settingsChange.next(e.settings);break;case"builder.registerEditor":if(n.source===window)break;var v=d.data;if(!v)break;var b=!!v.component;e.editors.every((function(t,n){return v.name!==t.name||(t.component&&!b||(e.editors[n]=t),!1)}));break;case"builder.triggerAnimation":e.animator.triggerAnimation(d.data);break;case"builder.contentUpdate":var y=d.data.key||d.data.alias||d.data.entry||d.data.modelName,k=d.data.data,w=t.observersByKey[y];w&&!t.noEditorUpdates[y]&&w.next([k]);break;case"builder.getComponents":null===(o=window.parent)||void 0===o||o.postMessage({type:"builder.components",data:e.components.map((function(t){return e.prepareComponentSpecToSend(t)}))},"*");break;case"builder.editingModel":t.editingModel=d.data.model;break;case"builder.registerComponent":var S=d.data;e.addComponent(S);break;case"builder.blockContentLoading":"string"==typeof d.data.model&&(t.blockContentLoading=d.data.model);break;case"builder.editingMode":d.data?(t.editingMode=!0,document.body.classList.add("builder-editing")):(t.editingMode=!1,document.body.classList.remove("builder-editing"));break;case"builder.editingPageMode":var _=d.data;e.editingPage=_;break;case"builder.overrideUserAttributes":var x=d.data;assign(e.overrideUserAttributes,x),t.flushGetContentQueue(!0);break;case"builder.overrideTestGroup":var C=d.data,E=C.variationId,B=C.contentId;E&&B&&(t.setTestCookie(B,E),t.flushGetContentQueue(!0));break;case"builder.evaluate":var T=d.data.text,P=d.data.arguments||[],j=d.data.id,R=new Function(T),O=void 0,N=null;try{O=R.apply(t,P)}catch(e){N=toError$1(e)}N?null===(a=window.parent)||void 0===a||a.postMessage({type:"builder.evaluateError",data:{id:j,error:N.message}},"*"):O&&"function"==typeof O.then?O.then((function(e){var t;null===(t=window.parent)||void 0===t||t.postMessage({type:"builder.evaluateResult",data:{id:j,result:e}},"*")})).catch(console.error):null===(s=window.parent)||void 0===s||s.postMessage({type:"builder.evaluateResult",data:{result:O,id:j}},"*")}}}))},Object.defineProperty(e.prototype,"defaultCanTrack",{get:function(){return Boolean(e.isBrowser&&navigator.userAgent.trim()&&!navigator.userAgent.match(/bot|crawler|spider|robot|crawling|prerender|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|phantom|headless|selenium|puppeteer/i)&&!this.browserTrackingDisabled)},enumerable:!1,configurable:!0}),e.prototype.init=function(e,t,n,r,i,o){return void 0===t&&(t=this.defaultCanTrack),n&&(this.request=n),r&&(this.response=r),this.canTrack=t,this.apiKey=e,i&&(this.authToken=i),o&&(this.apiVersion=o),this},Object.defineProperty(e.prototype,"previewingModel",{get:function(){var e=this.getLocation().search;return QueryString.parse((e||"").substr(1))["builder.preview"]},enumerable:!1,configurable:!0}),e.prototype.getLocation=function(){var e,t={};return this.request?t=parse$1(null!==(e=this.request.url)&&void 0!==e?e:""):"object"==typeof location&&(t=parse$1(location.href)),""===t.pathname&&(t.pathname="/"),t},e.prototype.getUserAttributes=function(t){void 0===t&&(t=this.userAgent||"");var n={Android:function(){return t.match(/Android/i)},BlackBerry:function(){return t.match(/BlackBerry/i)},iOS:function(){return t.match(/iPhone|iPod/i)},Opera:function(){return t.match(/Opera Mini/i)},Windows:function(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any:function(){return n.Android()||n.BlackBerry()||n.iOS()||n.Opera()||n.Windows()}},r=t.match(/Tablet|iPad/i),i=this.getLocation();return __assign({urlPath:i.pathname,host:i.host||i.hostname,device:r?"tablet":n.any()?"mobile":"desktop"},e.overrideUserAttributes)},e.prototype.setUserAttributes=function(t){assign(e.overrideUserAttributes,t),this.userAttributesChanged.next(t)},e.prototype.setTrackingUserAttributes=function(e){assign(this.trackingUserAttributes,e)},e.prototype.get=function(t,n){void 0===n&&(n={});var r=this;return e.isBrowser?(n.apiKey&&!this.apiKey&&(this.apiKey=n.apiKey),n.authToken&&!this.authToken&&(this.authToken=n.authToken),n.apiVersion&&!this.apiVersion&&(this.apiVersion=n.apiVersion)):(r=new e(n.apiKey||this.apiKey,n.req,n.res,void 0,n.authToken||this.authToken,n.apiVersion||this.apiVersion)).setUserAttributes(this.getUserAttributes()),r.queueGetContent(t,n).map((function(t){var n=t&&t[0];if(e.isStatic)return n;var r=n&&n.data;return r?(void 0!==r.blocksString&&(r.blocks=JSON.parse(r.blocksString),delete r.blocksString),{data:r,id:n.id,variationId:n.testVariationId||n.variationId||null,testVariationId:n.testVariationId||n.variationId||null,testVariationName:n.testVariationName||null,lastUpdated:n.lastUpdated||null}):null}))},e.prototype.queueGetContent=function(t,n){var r=this;void 0===n&&(n={});var i=n.key||n.alias||t,o=this.editingModel===t,a=this.observersByKey[i];"DEMO"!==this.apiKey||this.overrides[i]||n.initialContent||(n.initialContent=[]);var s=n.initialContent;if(a&&(!a.value||n.cache))return a.value&&nextTick$1((function(){a.next(a.value)})),a;if(o&&e.isBrowser&&parent.postMessage({type:"builder.updateContent",data:{options:n}},"*"),!s)if(this.getContentQueue||(this.getContentQueue=[]),this.getContentQueue.push(__assign(__assign({},n),{model:t,key:i})),this.getContentQueue&&this.getContentQueue.length>=this.contentPerRequest){var l=this.getContentQueue.slice();this.getContentQueue=[],nextTick$1((function(){r.flushGetContentQueue(!1,l)}))}else nextTick$1((function(){r.flushGetContentQueue()}));var u=new BehaviorSubject(null);return this.observersByKey[i]=u,n.noEditorUpdates&&(this.noEditorUpdates[i]=!0),s&&nextTick$1((function(){u.next(s)})),u},e.prototype.requestUrl=function(e,t){return getFetch()(e,t).then((function(e){return e.json()}))},Object.defineProperty(e.prototype,"host",{get:function(){switch(this.env){case"qa":return"https://qa.builder.io";case"test":return"https://builder-io-test.web.app";case"fast":return"https://fast.builder.io";case"cloud":return"https://cloud.builder.io";case"cdn2":return"https://cdn2.builder.io";case"cdn-qa":return"https://cdn-qa.builder.io";case"development":case"dev":return"http://localhost:5000";case"cdn-prod":return"https://cdn.builder.io";default:return e.overrideHost||"https://cdn.builder.io"}},enumerable:!1,configurable:!0}),e.prototype.flushGetContentQueue=function(t,n){var r=this;if(void 0===t&&(t=!1),!this.apiKey)throw new Error("Fetching content failed, expected apiKey to be defined instead got: ".concat(this.apiKey));if(this.apiVersion){if(!["v1","v3"].includes(this.apiVersion))throw new Error("Invalid apiVersion: expected 'v1' or 'v3', received '".concat(this.apiVersion,"'"))}else this.apiVersion=DEFAULT_API_VERSION;if(t||this.getContentQueue){var i=n||(t?this.priorContentQueue:this.getContentQueue)||[];this.getOverridesFromQueryString();var o=__assign(__assign({omit:i[0].omit||"meta.componentsUsed",apiKey:this.apiKey},i[0].options),this.queryOptions);i[0].fields&&(o.fields=i[0].fields),i[0].format&&(o.format=i[0].format);var a="undefined"!=typeof location?QueryString.parseDeep(location.search.substr(1)):{},s=i&&i[0].userAttributes?i[0].userAttributes:this.targetContent?this.getUserAttributes():{urlPath:this.getLocation().pathname};if(i.find((function(e){return!!e.includeUrl}))){var l=this.getLocation();l.origin&&(o.url="".concat(l.origin).concat(l.pathname).concat(l.search))}var u=null==n?void 0:n.find((function(e){return e.url}));if((null==u?void 0:u.url)&&(s.urlPath=u.url.split("?")[0]),o.userAttributes=s,t||n||(this.priorContentQueue=i,this.getContentQueue=null),(this.cachebust||isIframe||a.cachebust||a["builder.cachebust"]||"production"!==this.env)&&(o.cachebust=!0),e.isEditing&&(o.isEditing=!0),(this.noCache||"production"!==this.env)&&(o.noCache=!0),size$2(this.overrides))for(var c in this.overrides)this.overrides.hasOwnProperty(c)&&(o["overrides.".concat(c)]=this.overrides[c]);for(var d=0,p=i;d<p.length;d++){var f=p[d];f.format&&(o.format=f.format),f.static&&(o.static=f.static),f.cachebust&&(o.cachebust=f.cachebust),isPositiveNumber(f.cacheSeconds)&&(o.cacheSeconds=f.cacheSeconds),isPositiveNumber(f.staleCacheSeconds)&&(o.staleCacheSeconds=f.staleCacheSeconds);for(var h=0,m=["prerender","extractCss","limit","offset","query","preview","model","entry","rev","static"];h<m.length;h++){var g=f[c=m[h]];void 0!==g&&(o.options=o.options||{},o.options[f.key]=o.options[f.key]||{},o.options[f.key][c]=JSON.stringify(g))}}this.preview&&(o.preview="true");var v=Object.keys(o).length>0,b=this.host,y=i.map((function(e){return encodeURIComponent(e.key)})).join(",");if(this.overrideParams)assign(o,omit$2(QueryString.parse(this.overrideParams),"apiKey"));var k=QueryString.stringifyDeep(o),w=o.format,S={headers:{}};this.authToken&&(S.headers=__assign(__assign({},S.headers),{Authorization:"Bearer ".concat(this.authToken)}));var _="solid"===w||"react"===w?"codegen":"query",x="query"===_?this.apiVersion:"v1",C="".concat(b,"/api/").concat(x,"/").concat(_,"/").concat(this.apiKey,"/").concat(y)+(o&&v?"?".concat(k):"");return getFetch()(C,S).then((function(e){return e.json()})).then((function(t){for(var n=0,o=i;n<o.length;n++){var a=o[n],s=a.key;if(a.model!==r.blockContentLoading||a.noEditorUpdates){r.editingModel===a.model&&e.isEditing&&parent.postMessage({type:"builder.updateContent",data:{options:a}},"*");var l=r.observersByKey[s];if(!l)return;var u=t[s],c=u;if(u){var d=e.isServer?c:r.processResultsForTests(c);l.next(d)}else{if((r.getLocation().search||"").includes("builder.preview="+a.model)){l.next([{id:"preview",name:"Preview",data:{}}])}l.next([])}}}}),(function(e){for(var t=0,n=i;t<n.length;t++){var o=n[t],a=r.observersByKey[o.key];if(!a)return;a.error(e)}}))}},e.prototype.processResultsForTests=function(e){var t,n=this,r=e.map((function(e){if(!e.variations)return e;var t=n.getTestCookie(e.id),r=t===e.id?e:e.variations[t];if(r)return __assign(__assign({},e),{data:r.data,variationId:t,testVariationId:t,testVariationName:r.name});if(n.canTrack&&e.variations&&size$2(e.variations)){var i=0,o=Math.random();for(var a in e.variations){var s=e.variations[a];if(o<(i+=s.testRatio)){n.setTestCookie(e.id,s.id);var l=s.name||(s.id===e.id?"Default variation":"");return __assign(__assign({},e),{data:s.data,variationId:s.id,testVariationId:s.id,variationName:l,testVariationName:l})}}n.setTestCookie(e.id,e.id)}return __assign(__assign(__assign({},e),{variationId:e.id}),e.variations&&size$2(e.variations)&&{testVariationId:e.id,testVariationName:"Default variation"})}));return isIframe&&(null===(t=window.parent)||void 0===t||t.postMessage({type:"builder.contentResults",data:{results:r}},"*")),r},e.prototype.getTestCookie=function(e){return this.getCookie("".concat(this.testCookiePrefix,".").concat(e))},e.prototype.setTestCookie=function(e,t){if(this.canTrack){var n=new Date;return n.setDate(n.getDate()+30),this.setCookie("".concat(this.testCookiePrefix,".").concat(e),t,n)}this.cookieQueue.push([e,t])},e.prototype.getCookie=function(t){return this.cookies?this.cookies.get(t):e.isBrowser&&getCookie(t)},e.prototype.setCookie=function(t,n,r){return!this.cookies||e.isServer&&e.isStatic?e.isBrowser&&setCookie(t,n,r):this.cookies.set(t,n,{expires:r,secure:"https:"===this.getLocation().protocol})},e.prototype.getContent=function(e,t){if(void 0===t&&(t={}),!this.apiKey)throw new Error("Fetching content from model ".concat(e," failed, expected apiKey to be defined instead got: ").concat(this.apiKey));return this.queueGetContent(e,t)},e.prototype.getAll=function(t,n){void 0===n&&(n={});var r=this;return e.isBrowser?(n.apiKey&&!this.apiKey&&(this.apiKey=n.apiKey),n.apiVersion&&!this.apiVersion&&(this.apiVersion=n.apiVersion)):(r=new e(n.apiKey||this.apiKey,n.req,n.res,!1,null,n.apiVersion||this.apiVersion)).setUserAttributes(this.getUserAttributes()),r.getContent(t,__assign(__assign({limit:30},n),{key:n.key||e.isBrowser?"".concat(t,":").concat(hashSum$1(omit$2(n,"initialContent","req","res"))):void 0})).promise()},e.VERSION=version$2,e.components=[],e.isStatic=!0,e.animator=new Animator,e.nextTick=nextTick$1,e.throttle=throttle$1,e.editors=[],e.trustedHosts=["builder.io","localhost"],e.plugins=[],e.actions=[],e.registry={},e.registryChange=new BehaviorSubject({}),e._editingPage=!1,e.isIframe=isIframe,e.isBrowser=isBrowser$3,e.isReactNative=isReactNative,e.isServer=!isBrowser$3&&!isReactNative,e.previewingModel=e.isBrowser&&getQueryParam(location.href,"builder.preview"),e.settings={},e.settingsChange=new BehaviorSubject({}),e.isEditing=Boolean(isIframe&&(document.referrer&&document.referrer.match(/builder\.io|localhost:1234/)||-1!==location.search.indexOf("builder.frameEditing="))),e.isPreviewing=Boolean(isBrowser$3&&(-1!==location.search.indexOf("builder.preview=")||-1!==location.search.indexOf("builder.frameEditing="))),e.isReact=!1,e.overrideUserAttributes={},e}(),builder=new Builder(null,void 0,void 0,!0);function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_setPrototypeOf(e,t)}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@builder.io/react",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BuilderReact={})}(this,(function(exports){"use strict";var version$3="3.0.2",_a;"undefined"!=typeof window&&(null===(_a=window.parent)||void 0===_a||_a.postMessage({type:"builder.isReactSdk",data:{value:!0,supportsPatchUpdates:"v4",supportsCustomBreakpoints:!0,priorVersion:version$3}},"*"));var extendStatics=function(e,t){return(extendStatics=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])})(e,t)};function __extends(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}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function __decorate(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pad$1(e,t){for(;e.length<t;)e="0"+e;return e}function fold$1(e,t){var n,r;if(0===t.length)return e;for(n=0,r=t.length;n<r;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e<0?-2*e:e}function foldObject$1(e,t,n){return Object.keys(t).sort().reduce((function(e,r){return foldValue$1(e,t[r],r,n)}),e)}function foldValue$1(e,t,n,r){var i=fold$1(fold$1(fold$1(e,n),toString$2(t)),typeof t);if(null===t)return fold$1(i,"null");if(void 0===t)return fold$1(i,"undefined");if("object"==typeof t||"function"==typeof t){if(-1!==r.indexOf(t))return fold$1(i,"[Circular]"+n);r.push(t);var o=foldObject$1(i,t,r);if(!("valueOf"in t)||"function"!=typeof t.valueOf)return o;try{return fold$1(o,String(t.valueOf()))}catch(e){return fold$1(o,"[valueOf exception]"+(e.stack||e.message))}}return fold$1(i,t.toString())}function toString$2(e){return Object.prototype.toString.call(e)}function sum$1(e){return pad$1(foldValue$1(0,e,"",[]).toString(16),8)}var hashSum$1=sum$1;!function(){if("undefined"==typeof window||"function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();var isSafari="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function nextTick$1(e){if("function"==typeof setImmediate&&"undefined"==typeof window)return setImmediate(e);if(isSafari||"undefined"==typeof MutationObserver)setTimeout(e);else{var t=0,n=new MutationObserver((function(){return e()})),r=document.createTextNode("");n.observe(r,{characterData:!0}),r.data=String(t=++t)}}var PROPERTY_NAME_DENY_LIST=Object.freeze(["__proto__","prototype","constructor"]),QueryString=function(){function e(){}return e.parseDeep=function(e){var t=this.parse(e);return this.deepen(t)},e.stringifyDeep=function(e){var t=this.flatten(e);return this.stringify(t)},e.parse=function(e){for(var t={},n=("?"===e[0]?e.substr(1):e).split("&"),r=0;r<n.length;r++){var i=n[r].split("=");try{t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}catch(e){}}return t},e.stringify=function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(r)}return t},e.deepen=function(e){var t={};for(var n in e){for(var r=t,i=n.split("."),o=i.pop(),a=0,s=i;a<s.length;a++){var l=s[a];assertAllowedPropertyName(l),r=r[l]=r[l]||{}}r[o]=e[n]}return t},e.flatten=function(e,t,n){for(var r in void 0===n&&(n={}),e){var i=e[r],o=t?t+"."+r:r;i&&"object"==typeof i?this.flatten(i,o,n):n[o]=i}return n},e}();function assertAllowedPropertyName(e){if(PROPERTY_NAME_DENY_LIST.indexOf(e)>=0)throw new Error('Property name "'.concat(e,'" is not allowed'))}var version$2="2.0.2",Subscription=function(){function e(e,t){this.listeners=e,this.listener=t,this.unsubscribed=!1,this.otherSubscriptions=[]}return Object.defineProperty(e.prototype,"closed",{get:function(){return this.unsubscribed},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this.otherSubscriptions.push(e)},e.prototype.unsubscribe=function(){if(!this.unsubscribed){if(this.listener&&this.listeners){var e=this.listeners.indexOf(this.listener);e>-1&&this.listeners.splice(e,1)}this.otherSubscriptions.forEach((function(e){return e.unsubscribe()})),this.unsubscribed=!0}},e}(),BehaviorSubject=function(){function e(e){this.value=e,this.listeners=[],this.errorListeners=[]}return e.prototype.next=function(e){this.value=e;for(var t=0,n=this.listeners;t<n.length;t++){(0,n[t])(e)}},e.prototype.map=function(t){var n=new e(t(this.value));return this.subscribe((function(e){n.next(t(e))})),this.catch((function(e){n.error(e)})),n},e.prototype.catch=function(e){return this.errorListeners.push(e),new Subscription(this.errorListeners,e)},e.prototype.error=function(e){for(var t=0,n=this.errorListeners;t<n.length;t++){(0,n[t])(e)}},e.prototype.subscribe=function(e,t){return this.listeners.push(e),t&&this.errorListeners.push(t),new Subscription(this.listeners,e)},e.prototype.toPromise=function(){var e=this;return new Promise((function(t,n){var r=e.subscribe((function(e){t(e),r.unsubscribe()}),(function(e){n(e),r.unsubscribe()}))}))},e.prototype.promise=function(){return this.toPromise()},e}(),State={Pending:"Pending",Fulfilled:"Fulfilled",Rejected:"Rejected"};function isFunction(e){return e&&"function"==typeof e}function isObject(e){return e&&"object"==typeof e}var TinyPromise=function(){function e(e){this._state=State.Pending,this._handlers=[],this._value=null,e(this._resolve.bind(this),this._reject.bind(this))}return e.prototype._resolve=function(t){var n=this;if(t instanceof e)t.then(this._resolve.bind(this),this._reject.bind(this));else if(isObject(t)||isFunction(t)){var r=!1;try{var i=t.then;isFunction(i)?i.call(t,(function(e){r||n._resolve(e),r=!0}),(function(e){r||n._reject(e),r=!0})):this._fulfill(t)}catch(e){r||this._reject(e)}}else this._fulfill(t)},e.prototype._fulfill=function(e){var t=this;this._state=State.Fulfilled,this._value=e,this._handlers.forEach((function(e){return t._callHandler(e)}))},e.prototype._reject=function(e){var t=this;this._state=State.Rejected,this._value=e,this._handlers.forEach((function(e){return t._callHandler(e)}))},e.prototype._isPending=function(){return this._state===State.Pending},e.prototype._isFulfilled=function(){return this._state===State.Fulfilled},e.prototype._isRejected=function(){return this._state===State.Rejected},e.prototype._addHandler=function(e,t){this._handlers.push({onFulfilled:e,onRejected:t})},e.prototype._callHandler=function(e){this._isFulfilled()&&isFunction(e.onFulfilled)?e.onFulfilled(this._value):this._isRejected()&&isFunction(e.onRejected)&&e.onRejected(this._value)},e.prototype.then=function(t,n){var r=this;switch(this._state){case State.Pending:return new e((function(e,i){r._addHandler((function(n){nextTick$1((function(){try{isFunction(t)?e(t(n)):e(n)}catch(e){i(e)}}))}),(function(t){nextTick$1((function(){try{isFunction(n)?e(n(t)):i(t)}catch(e){i(e)}}))}))}));case State.Fulfilled:return new e((function(e,n){nextTick$1((function(){try{isFunction(t)?e(t(r._value)):e(r._value)}catch(e){n(e)}}))}));case State.Rejected:return new e((function(e,t){nextTick$1((function(){try{isFunction(n)?e(n(r._value)):t(r._value)}catch(e){t(e)}}))}))}},e}(),Promise$1="undefined"!=typeof Promise?Promise:TinyPromise,serverOnlyRequire;try{serverOnlyRequire=eval("require")}catch(e){serverOnlyRequire=function(){return null}}var serverOnlyRequire$1=serverOnlyRequire;function promiseResolve(e){return new Promise$1((function(t){return t(e)}))}function tinyFetch(e,t){return void 0===t&&(t={}),new Promise$1((function(n,r){var i=new XMLHttpRequest;if(i.open(t.method||"get",e,!0),t.headers)for(var o in t.headers)i.setRequestHeader(o,t.headers[o]);function a(){var e=[],t=[],n={},r=void 0;return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,o,a){var s=o;return e.push(s=s.toLowerCase()),t.push([s,a]),r=n[s],n[s]=r?"".concat(r,",").concat(a):a,""})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:a,text:function(){return promiseResolve(i.responseText)},json:function(){return promiseResolve(i.responseText).then(JSON.parse)},blob:function(){return promiseResolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return t},get:function(e){return n[e.toLowerCase()]},has:function(e){return e.toLowerCase()in n}}}}i.withCredentials="include"===t.credentials,i.onload=function(){n(a())},i.onerror=r,i.send(t.body)}))}function getFetch(){var e=void 0;if(globalThis.fetch)null!=e||(e=globalThis.fetch);else if("undefined"==typeof window)try{null!=e||(e=serverOnlyRequire$1("node-fetch"))}catch(e){console.warn("node-fetch is not installed. consider polyfilling fetch or installing node-fetch."),console.warn(e)}return null!=e?e:tinyFetch}function assign(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}function throttle$1(e,t,n){var r,i,o;void 0===n&&(n={});var a=null,s=0,l=function(){s=!1===n.leading?0:Date.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=t-(u-s);return r=this,i=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(l,c)),o}}var camelCaseToKebabCase$1=function(e){return e?e.replace(/([A-Z])/g,(function(e){return"-".concat(e[0].toLowerCase())})):""},Animator=function(){function e(){}return e.prototype.bindAnimations=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];switch(r.trigger){case"pageLoad":this.triggerAnimation(r);break;case"hover":this.bindHoverAnimation(r);break;case"scrollInView":this.bindScrollInViewAnimation(r)}}},e.prototype.warnElementNotPresent=function(e){console.warn("Cannot animate element: element with ID ".concat(e," not found!"))},e.prototype.augmentAnimation=function(e,t){for(var n=this.getAllStylesUsed(e),r=getComputedStyle(t),i=0,o=[e.steps[0].styles,e.steps[e.steps.length-1].styles];i<o.length;i++)for(var a=o[i],s=0,l=n;s<l.length;s++){var u=l[s];u in a||(a[u]=r[u])}},e.prototype.getAllStylesUsed=function(e){for(var t=[],n=0,r=e.steps;n<r.length;n++){var i=r[n];for(var o in i.styles)-1===t.indexOf(o)&&t.push(o)}return t},e.prototype.triggerAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout((function(){n.style.transition="",n.style.transitionDelay=""}),1e3*(e.delay||0)+1e3*e.duration+100)}))})):this.warnElementNotPresent(e.elementId||e.id||"")},e.prototype.bindHoverAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n);var r=e.steps[0].styles,i=e.steps[1].styles;function o(){assign(n.style,r)}o(),n.addEventListener("mouseenter",(function(){assign(n.style,i)})),n.addEventListener("mouseleave",o),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s")}))})):this.warnElementNotPresent(e.elementId||e.id||"")},e.prototype.bindScrollInViewAnimation=function(e){var t=this,n=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));n.length?Array.from(n).forEach((function(n){t.augmentAnimation(e,n);var r=!1,i=!1;function o(){!r&&s(n)?(r=!0,i=!0,setTimeout((function(){assign(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",a),setTimeout((function(){i=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")}),1e3*(e.duration+(e.delay||0))+100)}))):e.repeat&&r&&!i&&!s(n)&&(r=!1,assign(n.style,e.steps[0].styles))}var a=throttle$1(o,200,{leading:!1});function s(t){var n=t.getBoundingClientRect(),r=window.innerHeight,i=(e.thresholdPercent||0)/100*r;return n.bottom>i&&n.top<r-i}var l=e.steps[0].styles;assign(n.style,l),setTimeout((function(){n.style.transition="all ".concat(e.duration,"s ").concat(camelCaseToKebabCase$1(e.easing)),e.delay&&(n.style.transitionDelay=e.delay+"s")})),document.addEventListener("scroll",a,{capture:!0,passive:!0}),o()})):this.warnElementNotPresent(e.elementId||e.id||"")},e}();function getTopLevelDomain(e){var t=e.split(".");return t.length>2?t.slice(1).join("."):e}var fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Cookies=function(){function e(e,t){this.request=e,this.response=t}return e.prototype.get=function(e){var t=this.request.headers.cookie;if(t){var n=t.match(getPattern(e));if(n)return n[1]}},e.prototype.set=function(e,t,n){var r=this.response,i=this.request,o=r.getHeader("Set-Cookie")||[],a=void 0!==this.secure?!!this.secure:"https"===i.protocol||i.connection.encrypted,s=new Cookie(e,t,n);if("string"==typeof o&&(o=[o]),!a&&n&&n.secure)throw new Error("Cannot send secure cookie over unencrypted connection");return s.secure=a,n&&"secure"in n&&(s.secure=!!n.secure),s.domain=i.headers.host&&getTopLevelDomain(i.headers.host),pushCookie(o,s),r.setHeader.call(r,"Set-Cookie",o),this},e}(),Cookie=function(){function e(e,t,n){if(this.path="/",this.domain=void 0,this.httpOnly=!0,this.sameSite=!1,this.secure=!1,this.overwrite=!1,this.name="",this.value="",!fieldContentRegExp.test(e))throw new TypeError("argument name is invalid");if(t&&!fieldContentRegExp.test(t))throw new TypeError("argument value is invalid");t||(this.expires=new Date(0)),this.name=e,this.value=t||"",n.expires&&(this.expires=n.expires),n.secure&&(this.secure=n.secure)}return e.prototype.toString=function(){return"".concat(this.name,"=").concat(this.value)},e.prototype.toHeader=function(){var e=this.toString();return this.maxAge&&(this.expires=new Date(Date.now()+this.maxAge)),this.path&&(e+="; path=".concat(this.path)),this.expires&&(e+="; expires=".concat(this.expires.toUTCString())),this.domain&&(e+="; domain=".concat(this.domain)),e+="; SameSite=".concat(!0===this.sameSite?"strict":"None"),this.secure&&(e+="; secure"),this.httpOnly&&(e+="; httponly"),e},e}();function getPattern(e){return new RegExp("(?:^|;) *".concat(e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"=([^;]*)"))}function pushCookie(e,t){if(t.overwrite)for(var n=e.length-1;n>=0;n--)0===e[n].indexOf("".concat(t.name,"="))&&e.splice(n,1);e.push(t.toHeader())}function omit$2(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=Object.assign({},e),i=0,o=t;i<o.length;i++){var a=o[i];delete r[a]}return r}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function uuid(){return uuidv4().replace(/-/g,"")}function emptyUrl(){return{query:null,port:null,auth:null,hash:null,host:null,hostname:null,href:null,path:null,pathname:null,protocol:null,search:null,slashes:null}}function parse(e){var t,n=emptyUrl();return""===e||"/"===e[0]?(t=new URL(e,"http://0.0.0.0/"),n.href=t.href,n.href=n.href.slice(14)):(t=new URL(e),n.href=t.href,n.port=""===t.port?null:t.port,n.hash=""===t.hash?null:t.hash,n.host=t.host,n.hostname=t.hostname,n.href=t.href,n.pathname=t.pathname,n.protocol=t.protocol,n.slashes="/"===e[t.protocol.length]),n.search=t.search,n.query=t.search.slice(1),n.path="".concat(t.pathname).concat(t.search),n.pathname=t.pathname,n}function toError$1(e){return e instanceof Error?e:new Error(String(e))}var DEFAULT_API_VERSION="v3";function datePlusMinutes(e){return void 0===e&&(e=30),new Date(Date.now()+6e4*e)}var isPositiveNumber=function(e){return"number"==typeof e&&!isNaN(e)&&e>=0},isReactNative="object"==typeof navigator&&"ReactNative"===navigator.product,validEnvList=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"];function getQueryParam(e,t){for(var n=(e.split("?")[1]||"").split("&"),r=0;r<n.length;r++){var i=n[r].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1])}return null}var urlParser={parse:function(e){var t=document.createElement("a");t.href=e;for(var n={},r=0,i=["username","password","host","hostname","port","protocol","origin","pathname","search","hash"];r<i.length;r++){var o=i[r];n[o]=t[o]}return!n.pathname&&""!==n.pathname||"string"!=typeof n.pathname||0===n.pathname.indexOf("/")||(n.pathname="/"+n.pathname),n}},parse$1=isReactNative?function(){return emptyUrl()}:"object"==typeof window?urlParser.parse:parse;function setCookie(e,t,n){try{var r="";n&&(r="; expires="+n.toUTCString());var i=!isBrowser$3||"https:"===location.protocol;document.cookie=e+"="+(t||"")+r+"; path=/"+"; domain=".concat(getTopLevelDomain(location.hostname))+(i?";secure ; SameSite=None":"")}catch(e){console.warn("Could not set cookie",e)}}function getCookie(e){try{return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}catch(e){console.warn("Could not get cookie",e)}}function size$2(e){return Object.keys(e).length}function find(e,t){for(var n=e,r=n.length>>>0,i=arguments[1],o=0;o<r;o++){var a=n[o];if(t.call(i,a,o,n))return a}}var sessionStorageKey="builderSessionId",localStorageKey="builderVisitorId",isBrowser$3="undefined"!=typeof window&&!isReactNative,isIframe=isBrowser$3&&window.top!==window.self,Builder=function(){function e(t,n,r,i,o,a){void 0===t&&(t=null),void 0===i&&(i=!1),void 0===o&&(o=null);var s=this;if(this.request=n,this.response=r,this.eventsQueue=[],this.throttledClearEventsQueue=throttle$1((function(){s.processEventsQueue(),s.setCookie(sessionStorageKey,s.sessionId,datePlusMinutes(30))}),5),this.env="production",this.sessionId=this.getSessionId(),this.targetContent=!0,this.contentPerRequest=1,this.allowCustomFonts=!0,this.cookies=null,this.cachebust=!1,this.overrideParams="",this.noCache=!1,this.preview=!1,this.apiVersion$=new BehaviorSubject(void 0),this.canTrack$=new BehaviorSubject(!this.browserTrackingDisabled),this.apiKey$=new BehaviorSubject(null),this.authToken$=new BehaviorSubject(null),this.userAttributesChanged=new BehaviorSubject(null),this.editingMode$=new BehaviorSubject(isIframe),this.editingModel$=new BehaviorSubject(null),this.userAgent="object"==typeof navigator&&navigator.userAgent||"",this.trackingHooks=[],this.visitorId=this.getVisitorId(),this.autoTrack=!!e.isBrowser&&!(this.isDevelopmentEnv||e.isBrowser&&-1!==location.search.indexOf("builder.preview=")),this.trackingUserAttributes={},this.blockContentLoading="",this.observersByKey={},this.noEditorUpdates={},this.overrides={},this.queryOptions={},this.getContentQueue=null,this.priorContentQueue=null,this.testCookiePrefix="builder.tests",this.cookieQueue=[],e.isBrowser&&!i&&e.singletonInstance)return e.singletonInstance;this.request&&this.response&&(this.setUserAgent(this.request.headers["user-agent"]||""),this.cookies=new Cookies(this.request,this.response)),t&&(this.apiKey=t),a&&(this.apiVersion=a),o&&(this.authToken=o),isBrowser$3&&(this.bindMessageListeners(),e.isEditing&&parent.postMessage({type:"builder.animatorOptions",data:{options:{version:2}}},"*")),isIframe&&this.messageFrameLoaded(),this.canTrack$.subscribe((function(e){if(e){if("undefined"!=typeof sessionStorage)try{sessionStorage.getItem(sessionStorageKey)||sessionStorage.setItem(sessionStorageKey,s.sessionId)}catch(e){console.debug("Session storage error",e)}s.eventsQueue.length&&s.throttledClearEventsQueue(),s.cookieQueue.length&&(s.cookieQueue.forEach((function(e){s.setCookie(e[0],e[1])})),s.cookieQueue.length=0)}})),isBrowser$3&&(this.setTestsFromUrl(),this.getOverridesFromQueryString())}return e.register=function(t,n){var r=this.registry[t];if(r||(r=this.registry[t]=[]),r.push(n),e.isBrowser){var i={type:"builder.register",data:{type:t,info:n}};try{parent.postMessage(i,"*"),parent!==window&&window.postMessage(i,"*")}catch(e){console.debug("Could not postmessage",e)}}this.registryChange.next(this.registry)},e.registerEditor=function(t){if(e.isBrowser){window.postMessage({type:"builder.registerEditor",data:omit$2(t,"component")},"*");var n=location.hostname;e.isTrustedHost(n)||console.error("Builder.registerEditor() called in the wrong environment! You cannot load custom editors from your app, they must be loaded through the Builder.io app itself. Follow the readme here for more details: https://github.com/builderio/builder/tree/master/plugins/cloudinary or contact chat us in our Spectrum community for help: https://spectrum.chat/builder")}this.editors.push(t)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerAction=function(e){this.actions.push(e)},e.registerTrustedHost=function(e){this.trustedHosts.push(e)},e.isTrustedHost=function(e){return this.trustedHosts.findIndex((function(t){return t===e||e.endsWith(".".concat(t))}))>-1},e.runAction=function(e){if(!("string"==typeof e?find(this.actions,(function(t){return t.name===e})):e))throw new Error("Action not found: ".concat(e))},e.fields=function(e,t){var n;null===(n=window.parent)||void 0===n||n.postMessage({type:"builder.fields",data:{name:e,fields:t}},"*")},e.set=function(t){e.register("editor.settings",t)},e.import=function(t){if(e.isBrowser){var n=window.System;if(n)return n.import("https://cdn.builder.io/systemjs/".concat(t));console.warn("System.js not available. Please include System.js when using Builder.import")}else console.warn("Builder.import used on the server - this should only be used in the browser")},Object.defineProperty(e,"editingPage",{get:function(){return this._editingPage},set:function(e){this._editingPage=e,isBrowser$3&&isIframe&&(e?document.body.classList.add("builder-editing-page"):document.body.classList.remove("builder-editing-page"))},enumerable:!1,configurable:!0}),e.prepareComponentSpecToSend=function(e){return __assign(__assign(__assign({},e),e.inputs&&{inputs:e.inputs.map((function(e){for(var t,n=0,r=["onChange","showIf"];n<r.length;n++){var i=r[n];if(e[i]&&"function"==typeof e[i]){var o=e[i];e=__assign(__assign({},e),((t={})[i]="return (".concat(o.toString(),").apply(this, arguments)"),t))}}return e}))}),{hooks:Object.keys(e.hooks||{}).reduce((function(t,n){var r=e.hooks&&e.hooks[n];return r?(t[n]="string"==typeof r?r:"return (".concat(r.toString(),").apply(this, arguments)"),t):t}),{}),class:void 0})},e.registerBlock=function(e,t){this.registerComponent(e,t)},e.registerComponent=function(e,t){var n,r=__assign(__assign({class:e},e.builderOptions),t);if(this.addComponent(r),t.models&&this.singletonInstance.editingModel?isBrowser$3&&t.models.includes(this.singletonInstance.editingModel):isBrowser$3){var i=this.prepareComponentSpecToSend(r);null===(n=window.parent)||void 0===n||n.postMessage({type:"builder.registerComponent",data:i},"*")}},e.addComponent=function(e){var t=find(this.components,(function(t){return t.name===e.name}));if(t){if(t.class&&!e.class)return;this.components.splice(this.components.indexOf(t),1,e)}else this.components.push(e)},e.component=function(e){var t=this;return void 0===e&&(e={}),function(n){var r,i=__assign(__assign({},e),{class:n});i.name||(i.name=n.name),t.addComponent(i);var o=t.prepareComponentSpecToSend(i);return isBrowser$3&&(null===(r=window.parent)||void 0===r||r.postMessage({type:"builder.registerComponent",data:o},"*")),n}},Object.defineProperty(e,"Component",{get:function(){return this.component},enumerable:!1,configurable:!0}),e.prototype.processEventsQueue=function(){if(this.eventsQueue.length){var t=this.eventsQueue;this.eventsQueue=[];for(var n=__assign(__assign({},e.overrideUserAttributes),this.trackingUserAttributes),r=0,i=t;r<i.length;r++){var o=i[r];o.data.metadata||(o.data.metadata={}),o.data.metadata.user||(o.data.metadata.user={}),Object.assign(o.data.metadata.user,n,o.data.metadata.user)}var a=this.host;getFetch()("".concat(a,"/api/v1/track"),{method:"POST",body:JSON.stringify({events:t}),headers:{"content-type":"application/json"},mode:"cors"}).catch((function(){}))}},Object.defineProperty(e.prototype,"browserTrackingDisabled",{get:function(){return e.isBrowser&&Boolean(window.builderNoTrack||!navigator.cookieEnabled)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canTrack",{get:function(){return this.canTrack$.value},set:function(e){this.canTrack!==e&&this.canTrack$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiVersion",{get:function(){return this.apiVersion$.value},set:function(e){this.apiVersion!==e&&this.apiVersion$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editingMode",{get:function(){return this.editingMode$.value},set:function(e){e!==this.editingMode&&this.editingMode$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"editingModel",{get:function(){return this.editingModel$.value},set:function(e){e!==this.editingModel&&this.editingModel$.next(e)},enumerable:!1,configurable:!0}),e.prototype.findParentElement=function(e,t,n){if(void 0===n&&(n=!0),!(e instanceof HTMLElement))return null;var r=n?e:e.parentElement;do{if(!r)return null;if(t(r))return r}while(r=r.parentElement);return null},e.prototype.findBuilderParent=function(e){return this.findParentElement(e,(function(e){var t=e.getAttribute("builder-id")||e.id;return Boolean(t&&0===t.indexOf("builder-"))}))},e.prototype.setUserAgent=function(e){this.userAgent=e||""},e.prototype.setTrackingHook=function(e){this.trackingHooks.push(e)},e.prototype.track=function(t,n,r){if(void 0===n&&(n={}),!isIframe&&isBrowser$3&&!e.isPreviewing){var i=this.apiKey;if(i){for(var o=JSON.parse(JSON.stringify({type:t,data:__assign(__assign({},omit$2(n,"meta")),{metadata:__assign(__assign({sdkVersion:e.VERSION,url:location.href},n.meta),n.metadata),ownerId:i,userAttributes:this.getUserAttributes(),sessionId:this.sessionId,visitorId:this.visitorId})})),a=0,s=this.trackingHooks;a<s.length;a++){var l=(0,s[a])(o,r||{});l&&(o=l)}this.eventsQueue.push(o),this.canTrack&&this.throttledClearEventsQueue()}else console.error('Builder integration error: Looks like the Builder SDK has not been initialized properly (your API key has not been set). Make sure you are calling `builder.init("«YOUR-API-KEY»");` as early as possible in your application\'s code.')}},e.prototype.getSessionId=function(){var t=this,n=null;try{e.isBrowser&&"undefined"!=typeof sessionStorage&&(n=this.getCookie(sessionStorageKey))}catch(e){console.debug("Session storage error",e)}return n||(n=uuid()),e.isBrowser&&setTimeout((function(){try{t.canTrack&&t.setCookie(sessionStorageKey,n,datePlusMinutes(30))}catch(e){console.debug("Cookie setting error",e)}})),n},e.prototype.getVisitorId=function(){var t=this;if(this.visitorId)return this.visitorId;var n=null;try{e.isBrowser&&"undefined"!=typeof localStorage&&(n=localStorage.getItem(localStorageKey))}catch(e){console.debug("Local storage error",e)}return n||(n=uuid()),this.visitorId=n,e.isBrowser&&setTimeout((function(){try{t.canTrack&&"undefined"!=typeof localStorage&&n&&localStorage.setItem(localStorageKey,n)}catch(e){console.debug("Session storage error",e)}})),n},e.prototype.trackImpression=function(t,n,r,i){isIframe||!isBrowser$3||e.isPreviewing||this.track("impression",{contentId:t,variationId:n!==t?n:void 0,metadata:r},i)},e.prototype.trackConversion=function(t,n,r,i,o){if(!isIframe&&isBrowser$3&&!e.isPreviewing){var a="object"==typeof n?n:i,s="string"==typeof n?n:void 0;this.track("conversion",{amount:t,variationId:r,meta:a,contentId:s},o)}},Object.defineProperty(e.prototype,"isDevelopmentEnv",{get:function(){return e.isIframe||e.isBrowser&&("localhost"===location.hostname||""!==location.port)||"production"!==this.env},enumerable:!1,configurable:!0}),e.prototype.trackInteraction=function(t,n,r,i,o){if(void 0===r&&(r=!1),!isIframe&&isBrowser$3&&!e.isPreviewing){var a=i&&i.target,s=a&&this.findBuilderParent(a),l={};if(i){var u=i.clientX,c=i.clientY;if(a){var d=u-(m=a.getBoundingClientRect()).left,p=c-m.top,f=v(d/m.width),h=v(p/m.height);l.targetOffset={x:f,y:h}}if(s){var m;d=u-(m=s.getBoundingClientRect()).left,p=c-m.top,f=v(d/m.width),h=v(p/m.height);l.builderTargetOffset={x:f,y:h}}}var g=s&&(s.getAttribute("builder-id")||s.id);g&&s&&(l.builderElementIndex=[].slice.call(document.getElementsByClassName(g)).indexOf(s)),this.track("click",{contentId:t,metadata:l,variationId:n!==t?n:void 0,unique:!r,targetBuilderElement:g||void 0},o)}function v(e){return Math.round(1e3*e)/1e3}},e.prototype.component=function(t){return void 0===t&&(t={}),e.component(t)},Object.defineProperty(e.prototype,"apiKey",{get:function(){return this.apiKey$.value},set:function(e){this.apiKey$.next(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authToken",{get:function(){return this.authToken$.value},set:function(e){this.authToken$.next(e)},enumerable:!1,configurable:!0}),e.prototype.modifySearch=function(e){return e.replace(/(^|&|\?)(builder_.*?)=/gi,(function(e,t,n){return t+n.replace(/_/g,".")+"="}))},e.prototype.setTestsFromUrl=function(){var e=this.getLocation().search,t=QueryString.parseDeep(this.modifySearch(e||"").substr(1)),n=t.builder&&t.builder.tests;if(n&&"object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&this.setTestCookie(r,n[r])},e.prototype.resetOverrides=function(){e.overrideUserAttributes={},this.cachebust=!1,this.noCache=!1,this.preview=!1,this.editingModel=null,this.overrides={},this.env="production",this.userAgent="",this.request=void 0,this.response=void 0},e.prototype.getOverridesFromQueryString=function(){var t=this.getLocation(),n=QueryString.parseDeep(this.modifySearch(t.search||"").substr(1)),r=n.builder;if(r){var i=r.userAttributes,o=r.overrides,a=r.env;r.host;var s=r.api,l=r.cachebust,u=r.noCache,c=r.preview,d=r.editing,p=r.frameEditing,f=r.options,h=r.params;if(i&&this.setUserAttributes(i),f&&(this.queryOptions=__assign(__assign(__assign({},f.locale&&{locale:f.locale}),f.includeRefs&&{includeRefs:f.includeRefs}),f.enrich&&{enrich:f.enrich})),o&&(this.overrides=o),validEnvList.indexOf(a||s)>-1&&(this.env=a||s),e.isEditing){var m=p||d||c;m&&"true"!==m&&(this.editingModel=m)}l&&(this.cachebust=!0),u&&(this.noCache=!0),c&&(this.preview=!0),n&&(this.overrideParams=h)}},e.prototype.messageFrameLoaded=function(){var e;null===(e=window.parent)||void 0===e||e.postMessage({type:"builder.loaded",data:{value:!0}},"*")},e.prototype.bindMessageListeners=function(){var t=this;isBrowser$3&&addEventListener("message",(function(n){var r,i,o,a,s,l=parse$1(n.origin),u=-1===["builder.register","builder.registerComponent"].indexOf(null===(r=n.data)||void 0===r?void 0:r.type),c=l.hostname&&e.isTrustedHost(l.hostname);if(!u||c){var d=n.data;if(d)switch(d.type){case"builder.ping":null===(i=window.parent)||void 0===i||i.postMessage({type:"builder.pong",data:{}},"*");break;case"builder.register":if(n.source===window)break;var p=d.data;if(!p)break;var f=p.type,h=p.info,m=e.registry[f];m||(m=e.registry[f]=[]),m.push(h),e.registryChange.next(e.registry);break;case"builder.settingsChange":if(n.source===window)break;var g=d.data;if(!g)break;Object.assign(e.settings,g),e.settingsChange.next(e.settings);break;case"builder.registerEditor":if(n.source===window)break;var v=d.data;if(!v)break;var b=!!v.component;e.editors.every((function(t,n){return v.name!==t.name||(t.component&&!b||(e.editors[n]=t),!1)}));break;case"builder.triggerAnimation":e.animator.triggerAnimation(d.data);break;case"builder.contentUpdate":var y=d.data.key||d.data.alias||d.data.entry||d.data.modelName,k=d.data.data,w=t.observersByKey[y];w&&!t.noEditorUpdates[y]&&w.next([k]);break;case"builder.getComponents":null===(o=window.parent)||void 0===o||o.postMessage({type:"builder.components",data:e.components.map((function(t){return e.prepareComponentSpecToSend(t)}))},"*");break;case"builder.editingModel":t.editingModel=d.data.model;break;case"builder.registerComponent":var S=d.data;e.addComponent(S);break;case"builder.blockContentLoading":"string"==typeof d.data.model&&(t.blockContentLoading=d.data.model);break;case"builder.editingMode":d.data?(t.editingMode=!0,document.body.classList.add("builder-editing")):(t.editingMode=!1,document.body.classList.remove("builder-editing"));break;case"builder.editingPageMode":var _=d.data;e.editingPage=_;break;case"builder.overrideUserAttributes":var x=d.data;assign(e.overrideUserAttributes,x),t.flushGetContentQueue(!0);break;case"builder.overrideTestGroup":var C=d.data,E=C.variationId,B=C.contentId;E&&B&&(t.setTestCookie(B,E),t.flushGetContentQueue(!0));break;case"builder.evaluate":var T=d.data.text,P=d.data.arguments||[],j=d.data.id,R=new Function(T),O=void 0,N=null;try{O=R.apply(t,P)}catch(e){N=toError$1(e)}N?null===(a=window.parent)||void 0===a||a.postMessage({type:"builder.evaluateError",data:{id:j,error:N.message}},"*"):O&&"function"==typeof O.then?O.then((function(e){var t;null===(t=window.parent)||void 0===t||t.postMessage({type:"builder.evaluateResult",data:{id:j,result:e}},"*")})).catch(console.error):null===(s=window.parent)||void 0===s||s.postMessage({type:"builder.evaluateResult",data:{result:O,id:j}},"*")}}}))},Object.defineProperty(e.prototype,"defaultCanTrack",{get:function(){return Boolean(e.isBrowser&&navigator.userAgent.trim()&&!navigator.userAgent.match(/bot|crawler|spider|robot|crawling|prerender|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|phantom|headless|selenium|puppeteer/i)&&!this.browserTrackingDisabled)},enumerable:!1,configurable:!0}),e.prototype.init=function(e,t,n,r,i,o){return void 0===t&&(t=this.defaultCanTrack),n&&(this.request=n),r&&(this.response=r),this.canTrack=t,this.apiKey=e,i&&(this.authToken=i),o&&(this.apiVersion=o),this},Object.defineProperty(e.prototype,"previewingModel",{get:function(){var e=this.getLocation().search;return QueryString.parse((e||"").substr(1))["builder.preview"]},enumerable:!1,configurable:!0}),e.prototype.getLocation=function(){var e,t={};return this.request?t=parse$1(null!==(e=this.request.url)&&void 0!==e?e:""):"object"==typeof location&&(t=parse$1(location.href)),""===t.pathname&&(t.pathname="/"),t},e.prototype.getUserAttributes=function(t){void 0===t&&(t=this.userAgent||"");var n={Android:function(){return t.match(/Android/i)},BlackBerry:function(){return t.match(/BlackBerry/i)},iOS:function(){return t.match(/iPhone|iPod/i)},Opera:function(){return t.match(/Opera Mini/i)},Windows:function(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any:function(){return n.Android()||n.BlackBerry()||n.iOS()||n.Opera()||n.Windows()}},r=t.match(/Tablet|iPad/i),i=this.getLocation();return __assign({urlPath:i.pathname,host:i.host||i.hostname,device:r?"tablet":n.any()?"mobile":"desktop"},e.overrideUserAttributes)},e.prototype.setUserAttributes=function(t){assign(e.overrideUserAttributes,t),this.userAttributesChanged.next(t)},e.prototype.setTrackingUserAttributes=function(e){assign(this.trackingUserAttributes,e)},e.prototype.get=function(t,n){void 0===n&&(n={});var r=this;return e.isBrowser?(n.apiKey&&!this.apiKey&&(this.apiKey=n.apiKey),n.authToken&&!this.authToken&&(this.authToken=n.authToken),n.apiVersion&&!this.apiVersion&&(this.apiVersion=n.apiVersion)):(r=new e(n.apiKey||this.apiKey,n.req,n.res,void 0,n.authToken||this.authToken,n.apiVersion||this.apiVersion)).setUserAttributes(this.getUserAttributes()),r.queueGetContent(t,n).map((function(t){var n=t&&t[0];if(e.isStatic)return n;var r=n&&n.data;return r?(void 0!==r.blocksString&&(r.blocks=JSON.parse(r.blocksString),delete r.blocksString),{data:r,id:n.id,variationId:n.testVariationId||n.variationId||null,testVariationId:n.testVariationId||n.variationId||null,testVariationName:n.testVariationName||null,lastUpdated:n.lastUpdated||null}):null}))},e.prototype.queueGetContent=function(t,n){var r=this;void 0===n&&(n={});var i=n.key||n.alias||t,o=this.editingModel===t,a=this.observersByKey[i];"DEMO"!==this.apiKey||this.overrides[i]||n.initialContent||(n.initialContent=[]);var s=n.initialContent;if(a&&(!a.value||n.cache))return a.value&&nextTick$1((function(){a.next(a.value)})),a;if(o&&e.isBrowser&&parent.postMessage({type:"builder.updateContent",data:{options:n}},"*"),!s)if(this.getContentQueue||(this.getContentQueue=[]),this.getContentQueue.push(__assign(__assign({},n),{model:t,key:i})),this.getContentQueue&&this.getContentQueue.length>=this.contentPerRequest){var l=this.getContentQueue.slice();this.getContentQueue=[],nextTick$1((function(){r.flushGetContentQueue(!1,l)}))}else nextTick$1((function(){r.flushGetContentQueue()}));var u=new BehaviorSubject(null);return this.observersByKey[i]=u,n.noEditorUpdates&&(this.noEditorUpdates[i]=!0),s&&nextTick$1((function(){u.next(s)})),u},e.prototype.requestUrl=function(e,t){return getFetch()(e,t).then((function(e){return e.json()}))},Object.defineProperty(e.prototype,"host",{get:function(){switch(this.env){case"qa":return"https://qa.builder.io";case"test":return"https://builder-io-test.web.app";case"fast":return"https://fast.builder.io";case"cloud":return"https://cloud.builder.io";case"cdn2":return"https://cdn2.builder.io";case"cdn-qa":return"https://cdn-qa.builder.io";case"development":case"dev":return"http://localhost:5000";case"cdn-prod":return"https://cdn.builder.io";default:return e.overrideHost||"https://cdn.builder.io"}},enumerable:!1,configurable:!0}),e.prototype.flushGetContentQueue=function(t,n){var r=this;if(void 0===t&&(t=!1),!this.apiKey)throw new Error("Fetching content failed, expected apiKey to be defined instead got: ".concat(this.apiKey));if(this.apiVersion){if(!["v1","v3"].includes(this.apiVersion))throw new Error("Invalid apiVersion: expected 'v1' or 'v3', received '".concat(this.apiVersion,"'"))}else this.apiVersion=DEFAULT_API_VERSION;if(t||this.getContentQueue){var i=n||(t?this.priorContentQueue:this.getContentQueue)||[];this.getOverridesFromQueryString();var o=__assign(__assign({omit:i[0].omit||"meta.componentsUsed",apiKey:this.apiKey},i[0].options),this.queryOptions);i[0].locale&&(o.locale=i[0].locale),i[0].fields&&(o.fields=i[0].fields),i[0].format&&(o.format=i[0].format);var a="undefined"!=typeof location?QueryString.parseDeep(location.search.substr(1)):{},s=i&&i[0].userAttributes?i[0].userAttributes:this.targetContent?this.getUserAttributes():{urlPath:this.getLocation().pathname};if(i.find((function(e){return!!e.includeUrl}))){var l=this.getLocation();l.origin&&(o.url="".concat(l.origin).concat(l.pathname).concat(l.search))}var u=null==n?void 0:n.find((function(e){return e.url}));if((null==u?void 0:u.url)&&(s.urlPath=u.url.split("?")[0]),o.userAttributes=s,t||n||(this.priorContentQueue=i,this.getContentQueue=null),(this.cachebust||isIframe||a.cachebust||a["builder.cachebust"]||"production"!==this.env)&&(o.cachebust=!0),e.isEditing&&(o.isEditing=!0),(this.noCache||"production"!==this.env)&&(o.noCache=!0),size$2(this.overrides))for(var c in this.overrides)this.overrides.hasOwnProperty(c)&&(o["overrides.".concat(c)]=this.overrides[c]);for(var d=0,p=i;d<p.length;d++){var f=p[d];f.format&&(o.format=f.format),f.static&&(o.static=f.static),f.cachebust&&(o.cachebust=f.cachebust),isPositiveNumber(f.cacheSeconds)&&(o.cacheSeconds=f.cacheSeconds),isPositiveNumber(f.staleCacheSeconds)&&(o.staleCacheSeconds=f.staleCacheSeconds);for(var h=0,m=["prerender","extractCss","limit","offset","query","preview","model","entry","rev","static"];h<m.length;h++){var g=f[c=m[h]];void 0!==g&&(o.options=o.options||{},o.options[f.key]=o.options[f.key]||{},o.options[f.key][c]=JSON.stringify(g))}}this.preview&&(o.preview="true");var v=Object.keys(o).length>0,b=this.host,y=i.map((function(e){return encodeURIComponent(e.key)})).join(",");if(this.overrideParams)assign(o,omit$2(QueryString.parse(this.overrideParams),"apiKey"));var k=QueryString.stringifyDeep(o),w=o.format,S={headers:{}};this.authToken&&(S.headers=__assign(__assign({},S.headers),{Authorization:"Bearer ".concat(this.authToken)}));var _="solid"===w||"react"===w?"codegen":"query",x="query"===_?this.apiVersion:"v1",C="".concat(b,"/api/").concat(x,"/").concat(_,"/").concat(this.apiKey,"/").concat(y)+(o&&v?"?".concat(k):"");return getFetch()(C,S).then((function(e){return e.json()})).then((function(t){for(var n=0,o=i;n<o.length;n++){var a=o[n],s=a.key;if(a.model!==r.blockContentLoading||a.noEditorUpdates){r.editingModel===a.model&&e.isEditing&&parent.postMessage({type:"builder.updateContent",data:{options:a}},"*");var l=r.observersByKey[s];if(!l)return;var u=t[s],c=u;if(u){var d=e.isServer?c:r.processResultsForTests(c);l.next(d)}else{if((r.getLocation().search||"").includes("builder.preview="+a.model)){l.next([{id:"preview",name:"Preview",data:{}}])}l.next([])}}}}),(function(e){for(var t=0,n=i;t<n.length;t++){var o=n[t],a=r.observersByKey[o.key];if(!a)return;a.error(e)}}))}},e.prototype.processResultsForTests=function(e){var t,n=this,r=e.map((function(e){if(!e.variations)return e;var t=n.getTestCookie(e.id),r=t===e.id?e:e.variations[t];if(r)return __assign(__assign({},e),{data:r.data,variationId:t,testVariationId:t,testVariationName:r.name});if(n.canTrack&&e.variations&&size$2(e.variations)){var i=0,o=Math.random();for(var a in e.variations){var s=e.variations[a];if(o<(i+=s.testRatio)){n.setTestCookie(e.id,s.id);var l=s.name||(s.id===e.id?"Default variation":"");return __assign(__assign({},e),{data:s.data,variationId:s.id,testVariationId:s.id,variationName:l,testVariationName:l})}}n.setTestCookie(e.id,e.id)}return __assign(__assign(__assign({},e),{variationId:e.id}),e.variations&&size$2(e.variations)&&{testVariationId:e.id,testVariationName:"Default variation"})}));return isIframe&&(null===(t=window.parent)||void 0===t||t.postMessage({type:"builder.contentResults",data:{results:r}},"*")),r},e.prototype.getTestCookie=function(e){return this.getCookie("".concat(this.testCookiePrefix,".").concat(e))},e.prototype.setTestCookie=function(e,t){if(this.canTrack){var n=new Date;return n.setDate(n.getDate()+30),this.setCookie("".concat(this.testCookiePrefix,".").concat(e),t,n)}this.cookieQueue.push([e,t])},e.prototype.getCookie=function(t){return this.cookies?this.cookies.get(t):e.isBrowser&&getCookie(t)},e.prototype.setCookie=function(t,n,r){return!this.cookies||e.isServer&&e.isStatic?e.isBrowser&&setCookie(t,n,r):this.cookies.set(t,n,{expires:r,secure:"https:"===this.getLocation().protocol})},e.prototype.getContent=function(e,t){if(void 0===t&&(t={}),!this.apiKey)throw new Error("Fetching content from model ".concat(e," failed, expected apiKey to be defined instead got: ").concat(this.apiKey));return this.queueGetContent(e,t)},e.prototype.getAll=function(t,n){void 0===n&&(n={});var r=this;return e.isBrowser?(n.apiKey&&!this.apiKey&&(this.apiKey=n.apiKey),n.apiVersion&&!this.apiVersion&&(this.apiVersion=n.apiVersion)):(r=new e(n.apiKey||this.apiKey,n.req,n.res,!1,null,n.apiVersion||this.apiVersion)).setUserAttributes(this.getUserAttributes()),r.getContent(t,__assign(__assign({limit:30},n),{key:n.key||e.isBrowser?"".concat(t,":").concat(hashSum$1(omit$2(n,"initialContent","req","res"))):void 0})).promise()},e.VERSION=version$2,e.components=[],e.isStatic=!0,e.animator=new Animator,e.nextTick=nextTick$1,e.throttle=throttle$1,e.editors=[],e.trustedHosts=["builder.io","localhost"],e.plugins=[],e.actions=[],e.registry={},e.registryChange=new BehaviorSubject({}),e._editingPage=!1,e.isIframe=isIframe,e.isBrowser=isBrowser$3,e.isReactNative=isReactNative,e.isServer=!isBrowser$3&&!isReactNative,e.previewingModel=e.isBrowser&&getQueryParam(location.href,"builder.preview"),e.settings={},e.settingsChange=new BehaviorSubject({}),e.isEditing=Boolean(isIframe&&(document.referrer&&document.referrer.match(/builder\.io|localhost:1234/)||-1!==location.search.indexOf("builder.frameEditing="))),e.isPreviewing=Boolean(isBrowser$3&&(-1!==location.search.indexOf("builder.preview=")||-1!==location.search.indexOf("builder.frameEditing="))),e.isReact=!1,e.overrideUserAttributes={},e}(),builder=new Builder(null,void 0,void 0,!0);function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_setPrototypeOf(e,t)}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports
2
2
  /**
3
3
  * @license React
4
4
  * react.production.min.js