@builder.io/react 3.0.1 → 3.0.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder-react-lite.cjs.js +1 -1
- package/dist/builder-react-lite.esm.js +1 -1
- package/dist/builder-react.browser.js +1 -1
- package/dist/builder-react.cjs.js +1 -1
- package/dist/builder-react.unpkg.js +1 -1
- package/dist/lib/package.json +3 -3
- package/dist/lib/rollup.config.js +23 -29
- package/dist/lib/rollup.config.js.map +1 -1
- package/dist/lib/src/blocks/Button.js +7 -13
- package/dist/lib/src/blocks/Button.js.map +1 -1
- package/dist/lib/src/blocks/Columns.js +15 -21
- package/dist/lib/src/blocks/Columns.js.map +1 -1
- package/dist/lib/src/blocks/CustomCode.js +13 -19
- package/dist/lib/src/blocks/CustomCode.js.map +1 -1
- package/dist/lib/src/blocks/Embed.js +7 -13
- package/dist/lib/src/blocks/Embed.js.map +1 -1
- package/dist/lib/src/blocks/Fragment.js +6 -12
- package/dist/lib/src/blocks/Fragment.js.map +1 -1
- package/dist/lib/src/blocks/Image.js +30 -39
- package/dist/lib/src/blocks/Image.js.map +1 -1
- package/dist/lib/src/blocks/Mutation.js +10 -17
- package/dist/lib/src/blocks/Mutation.js.map +1 -1
- package/dist/lib/src/blocks/Router.js +18 -24
- package/dist/lib/src/blocks/Router.js.map +1 -1
- package/dist/lib/src/blocks/Section.js +9 -15
- package/dist/lib/src/blocks/Section.js.map +1 -1
- package/dist/lib/src/blocks/Slot.js +10 -14
- package/dist/lib/src/blocks/Slot.js.map +1 -1
- package/dist/lib/src/blocks/StateProvider.js +8 -14
- package/dist/lib/src/blocks/StateProvider.js.map +1 -1
- package/dist/lib/src/blocks/Symbol.js +21 -27
- package/dist/lib/src/blocks/Symbol.js.map +1 -1
- package/dist/lib/src/blocks/Text.js +14 -20
- package/dist/lib/src/blocks/Text.js.map +1 -1
- package/dist/lib/src/blocks/Video.js +15 -21
- package/dist/lib/src/blocks/Video.js.map +1 -1
- package/dist/lib/src/blocks/forms/Button.js +5 -11
- package/dist/lib/src/blocks/forms/Button.js.map +1 -1
- package/dist/lib/src/blocks/forms/Form.js +22 -28
- package/dist/lib/src/blocks/forms/Form.js.map +1 -1
- package/dist/lib/src/blocks/forms/Input.js +6 -12
- package/dist/lib/src/blocks/forms/Input.js.map +1 -1
- package/dist/lib/src/blocks/forms/Label.js +8 -14
- package/dist/lib/src/blocks/forms/Label.js.map +1 -1
- package/dist/lib/src/blocks/forms/Select.js +7 -13
- package/dist/lib/src/blocks/forms/Select.js.map +1 -1
- package/dist/lib/src/blocks/forms/TextArea.js +5 -11
- package/dist/lib/src/blocks/forms/TextArea.js.map +1 -1
- package/dist/lib/src/blocks/raw/Img.js +5 -11
- package/dist/lib/src/blocks/raw/Img.js.map +1 -1
- package/dist/lib/src/blocks/raw/RawText.js +4 -31
- package/dist/lib/src/blocks/raw/RawText.js.map +1 -1
- package/dist/lib/src/builder-react-lite.js +17 -30
- package/dist/lib/src/builder-react-lite.js.map +1 -1
- package/dist/lib/src/builder-react.js +44 -98
- package/dist/lib/src/builder-react.js.map +1 -1
- package/dist/lib/src/components/Link.js +4 -11
- package/dist/lib/src/components/Link.js.map +1 -1
- package/dist/lib/src/components/builder-block.component.js +46 -52
- package/dist/lib/src/components/builder-block.component.js.map +1 -1
- package/dist/lib/src/components/builder-blocks.component.js +16 -22
- package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
- package/dist/lib/src/components/builder-component.component.js +102 -108
- package/dist/lib/src/components/builder-component.component.js.map +1 -1
- package/dist/lib/src/components/builder-content.component.js +31 -38
- package/dist/lib/src/components/builder-content.component.js.map +1 -1
- package/dist/lib/src/components/insert-spacer.component.js +11 -17
- package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
- package/dist/lib/src/components/no-wrap.js +1 -5
- package/dist/lib/src/components/no-wrap.js.map +1 -1
- package/dist/lib/src/components/variants-provider.component.js +9 -36
- package/dist/lib/src/components/variants-provider.component.js.map +1 -1
- package/dist/lib/src/constants/device-sizes.constant.js +5 -9
- package/dist/lib/src/constants/device-sizes.constant.js.map +1 -1
- package/dist/lib/src/decorators/builder-block.decorator.js +3 -7
- package/dist/lib/src/decorators/builder-block.decorator.js.map +1 -1
- package/dist/lib/src/functions/apply-patch-with-mutation.js +1 -5
- package/dist/lib/src/functions/apply-patch-with-mutation.js.map +1 -1
- package/dist/lib/src/functions/apply-patch-with-mutation.test.js +4 -6
- package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +1 -1
- package/dist/lib/src/functions/block-to-html-string.js +5 -10
- package/dist/lib/src/functions/block-to-html-string.js.map +1 -1
- package/dist/lib/src/functions/debonce-next-tick.js +3 -7
- package/dist/lib/src/functions/debonce-next-tick.js.map +1 -1
- package/dist/lib/src/functions/get-builder-pixel.js +1 -5
- package/dist/lib/src/functions/get-builder-pixel.js.map +1 -1
- package/dist/lib/src/functions/get.js +1 -5
- package/dist/lib/src/functions/get.js.map +1 -1
- package/dist/lib/src/functions/no-wrap.js +4 -11
- package/dist/lib/src/functions/no-wrap.js.map +1 -1
- package/dist/lib/src/functions/safe-dynamic-require.js +8 -8
- package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
- package/dist/lib/src/functions/set.js +1 -5
- package/dist/lib/src/functions/set.js.map +1 -1
- package/dist/lib/src/functions/string-to-function.js +11 -16
- package/dist/lib/src/functions/string-to-function.js.map +1 -1
- package/dist/lib/src/functions/throttle.js +1 -5
- package/dist/lib/src/functions/throttle.js.map +1 -1
- package/dist/lib/src/functions/try-eval.js +8 -12
- package/dist/lib/src/functions/try-eval.js.map +1 -1
- package/dist/lib/src/functions/update-metadata.js +5 -9
- package/dist/lib/src/functions/update-metadata.js.map +1 -1
- package/dist/lib/src/functions/utils.js +1 -5
- package/dist/lib/src/functions/utils.js.map +1 -1
- package/dist/lib/src/functions/with-builder.js +3 -7
- package/dist/lib/src/functions/with-builder.js.map +1 -1
- package/dist/lib/src/functions/with-children.js +6 -13
- package/dist/lib/src/functions/with-children.js.map +1 -1
- package/dist/lib/src/hooks/useIsPreviewing.js +6 -10
- package/dist/lib/src/hooks/useIsPreviewing.js.map +1 -1
- package/dist/lib/src/scripts/init-editing.js +2 -4
- package/dist/lib/src/scripts/init-editing.js.map +1 -1
- package/dist/lib/src/store/builder-async-requests.js +4 -12
- package/dist/lib/src/store/builder-async-requests.js.map +1 -1
- package/dist/lib/src/store/builder-meta.js +2 -8
- package/dist/lib/src/store/builder-meta.js.map +1 -1
- package/dist/lib/src/store/builder-store.js +2 -8
- package/dist/lib/src/store/builder-store.js.map +1 -1
- package/dist/lib/src/to-error.js +1 -5
- package/dist/lib/src/to-error.js.map +1 -1
- package/dist/lib/test/basic.test.js +49 -74
- package/dist/lib/test/basic.test.js.map +1 -1
- package/dist/lib/test/functions/render-block.js +3 -8
- package/dist/lib/test/functions/render-block.js.map +1 -1
- package/dist/lib/test/image.test.js +14 -39
- package/dist/lib/test/image.test.js.map +1 -1
- package/package.json +5 -4
- package/rollup.config.ts +0 -1
- package/dist/builder-react.es5.js +0 -2
- package/dist/builder-react.es5.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var BuilderReact=function(exports){"use strict";var version$3="3.0.0",_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
|
+
var BuilderReact=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
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
package/dist/lib/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/builder-react.cjs.js",
|
|
7
7
|
"unpkg": "dist/builder-react.unpkg.js",
|
|
8
|
-
"module": "dist/builder-react.
|
|
8
|
+
"module": "dist/lib/src/builder-react.js",
|
|
9
9
|
"typings": "dist/types/src/builder-react.d.ts",
|
|
10
10
|
"author": "Steve Sewell <steve@builder.io>",
|
|
11
11
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"docs": "typedoc",
|
|
25
25
|
"lint": "tslint -t codeFrame '../**/*.ts' 'test/**/*.ts'",
|
|
26
26
|
"prebuild": "rimraf dist",
|
|
27
|
-
"build": "NODE_ENV=production tsc
|
|
27
|
+
"build": "NODE_ENV=production tsc && rollup -c rollup.config.ts",
|
|
28
28
|
"build:docs": "typedoc --out docs --target es6 --theme minimal --mode file src",
|
|
29
29
|
"start": "rollup -c rollup.config.ts -w",
|
|
30
30
|
"test": "jest",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,24 +9,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
9
|
};
|
|
11
10
|
return __assign.apply(this, arguments);
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var rollup_plugin_replace_1 = __importDefault(require("rollup-plugin-replace"));
|
|
22
|
-
var rollup_plugin_json_1 = __importDefault(require("rollup-plugin-json"));
|
|
23
|
-
var rollup_plugin_terser_1 = require("rollup-plugin-terser");
|
|
24
|
-
var package_json_1 = __importDefault(require("./package.json"));
|
|
12
|
+
import resolve from 'rollup-plugin-node-resolve';
|
|
13
|
+
import commonjs from 'rollup-plugin-commonjs';
|
|
14
|
+
import sourceMaps from 'rollup-plugin-sourcemaps';
|
|
15
|
+
import typescript from 'rollup-plugin-typescript2';
|
|
16
|
+
import replace from 'rollup-plugin-replace';
|
|
17
|
+
import json from 'rollup-plugin-json';
|
|
18
|
+
import { terser } from 'rollup-plugin-terser';
|
|
19
|
+
import pkg from './package.json';
|
|
25
20
|
var libraryName = 'builder-react';
|
|
26
|
-
var resolvePlugin = (
|
|
27
|
-
var externalDependencies = Object.keys(
|
|
28
|
-
.concat(Object.keys(
|
|
21
|
+
var resolvePlugin = resolve();
|
|
22
|
+
var externalDependencies = Object.keys(pkg.dependencies)
|
|
23
|
+
.concat(Object.keys(pkg.optionalDependencies || {}))
|
|
29
24
|
.filter(function (item) { return item !== 'tslib'; })
|
|
30
|
-
.concat(Object.keys(
|
|
25
|
+
.concat(Object.keys(pkg.peerDependencies || {}));
|
|
31
26
|
var options = {
|
|
32
27
|
input: "src/".concat(libraryName, ".ts"),
|
|
33
28
|
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
|
@@ -36,7 +31,7 @@ var options = {
|
|
|
36
31
|
include: '../**',
|
|
37
32
|
},
|
|
38
33
|
plugins: [
|
|
39
|
-
(
|
|
34
|
+
typescript({
|
|
40
35
|
include: ['*.js+(|x)', '*.ts+(|x)', '**/*.ts+(|x)'],
|
|
41
36
|
tsconfigOverride: {
|
|
42
37
|
compilerOptions: {
|
|
@@ -47,14 +42,14 @@ var options = {
|
|
|
47
42
|
},
|
|
48
43
|
},
|
|
49
44
|
}),
|
|
50
|
-
(
|
|
45
|
+
replace({
|
|
51
46
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
52
47
|
}),
|
|
53
48
|
// Allow json resolution
|
|
54
|
-
(
|
|
49
|
+
json(),
|
|
55
50
|
// Compile TypeScript files
|
|
56
51
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
|
57
|
-
(
|
|
52
|
+
commonjs({
|
|
58
53
|
exclude: ['node_modules/vm2/**'],
|
|
59
54
|
namedExports: {
|
|
60
55
|
'node_modules/react/index.js': [
|
|
@@ -78,11 +73,11 @@ var options = {
|
|
|
78
73
|
// resolve({}),
|
|
79
74
|
resolvePlugin,
|
|
80
75
|
// Resolve source maps to the original source
|
|
81
|
-
(
|
|
82
|
-
|
|
76
|
+
sourceMaps(),
|
|
77
|
+
terser(),
|
|
83
78
|
],
|
|
84
79
|
};
|
|
85
|
-
|
|
80
|
+
export default [
|
|
86
81
|
__assign(__assign({}, options), { output: {
|
|
87
82
|
file: 'dist/builder-react.browser.js',
|
|
88
83
|
name: 'BuilderReact',
|
|
@@ -93,12 +88,11 @@ exports.default = [
|
|
|
93
88
|
},
|
|
94
89
|
} }),
|
|
95
90
|
__assign(__assign({}, options), { output: [
|
|
96
|
-
{ file:
|
|
97
|
-
{ file: package_json_1.default.main, format: 'cjs', sourcemap: true },
|
|
91
|
+
{ file: pkg.main, format: 'cjs', sourcemap: true },
|
|
98
92
|
], external: externalDependencies.concat('node-fetch'), plugins: options.plugins
|
|
99
93
|
.filter(function (plugin) { return plugin !== resolvePlugin; })
|
|
100
94
|
.concat([
|
|
101
|
-
(
|
|
95
|
+
resolve({
|
|
102
96
|
only: [/^\.{0,2}\//],
|
|
103
97
|
}),
|
|
104
98
|
]) }),
|
|
@@ -116,12 +110,12 @@ exports.default = [
|
|
|
116
110
|
], external: externalDependencies, plugins: options.plugins.map(function (plugin) {
|
|
117
111
|
return plugin !== resolvePlugin
|
|
118
112
|
? plugin
|
|
119
|
-
: (
|
|
113
|
+
: resolve({
|
|
120
114
|
only: [/^\.{0,2}\//],
|
|
121
115
|
});
|
|
122
116
|
}) }),
|
|
123
117
|
__assign(__assign({}, options), { output: {
|
|
124
|
-
file:
|
|
118
|
+
file: pkg.unpkg,
|
|
125
119
|
format: 'iife',
|
|
126
120
|
name: 'BuilderReact',
|
|
127
121
|
sourcemap: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.config.js","sourceRoot":"","sources":["../../rollup.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollup.config.js","sourceRoot":"","sources":["../../rollup.config.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,OAAO,MAAM,4BAA4B,CAAC;AACjD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,MAAM,gBAAgB,CAAC;AAEjC,IAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,IAAM,aAAa,GAAG,OAAO,EAAE,CAAC;AAEhC,IAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;KACvD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,oBA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,EAAE,IAAI;SAChB;CAEJ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
var __extends = (this && this.__extends) || (function () {
|
|
4
3
|
var extendStatics = function (d, b) {
|
|
@@ -26,26 +25,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
26
25
|
};
|
|
27
26
|
return __assign.apply(this, arguments);
|
|
28
27
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.Button = void 0;
|
|
34
|
-
var react_1 = __importDefault(require("react"));
|
|
35
|
-
var with_builder_1 = require("../functions/with-builder");
|
|
36
|
-
var Link_1 = require("../components/Link");
|
|
28
|
+
import React from 'react';
|
|
29
|
+
import { withBuilder } from '../functions/with-builder';
|
|
30
|
+
import { Link } from '../components/Link';
|
|
37
31
|
var ButtonComponent = /** @class */ (function (_super) {
|
|
38
32
|
__extends(ButtonComponent, _super);
|
|
39
33
|
function ButtonComponent() {
|
|
40
34
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
41
35
|
}
|
|
42
36
|
ButtonComponent.prototype.render = function () {
|
|
43
|
-
var Tag = this.props.link ?
|
|
44
|
-
return (
|
|
37
|
+
var Tag = this.props.link ? Link : 'span';
|
|
38
|
+
return (React.createElement(Tag, __assign({ role: "button", href: this.props.link, target: this.props.openLinkInNewTab ? '_blank' : undefined }, this.props.attributes), this.props.text));
|
|
45
39
|
};
|
|
46
40
|
return ButtonComponent;
|
|
47
|
-
}(
|
|
48
|
-
|
|
41
|
+
}(React.Component));
|
|
42
|
+
export var Button = withBuilder(ButtonComponent, {
|
|
49
43
|
name: 'Core:Button',
|
|
50
44
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13',
|
|
51
45
|
defaultStyles: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/blocks/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/blocks/Button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAS1C;IAA8B,mCAA4B;IAA1D;;IAcA,CAAC;IAbC,gCAAM,GAAN;QACE,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,CACL,oBAAC,GAAG,aACF,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,IACtD,IAAI,CAAC,KAAK,CAAC,UAAU,GAExB,IAAI,CAAC,KAAK,CAAC,IAAI,CACZ,CACP,CAAC;IACJ,CAAC;IACH,sBAAC;AAAD,CAAC,AAdD,CAA8B,KAAK,CAAC,SAAS,GAc5C;AAED,MAAM,CAAC,IAAM,MAAM,GAAG,WAAW,CAAC,eAAe,EAAE;IACjD,IAAI,EAAE,aAAa;IACnB,KAAK,EACH,8GAA8G;IAChH,aAAa,EAAE;QACb,kDAAkD;QAClD,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,MAAM;QAClB,aAAa,EAAE,MAAM;QACrB,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,eAAe,EAAE,SAAS;QAC1B,KAAK,EAAE,OAAO;QACd,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,SAAS;KAClB;IACD,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,YAAY,EAAE,WAAW;YACzB,MAAM,EAAE,IAAI;SACb;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,IAAI;SACb;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,sBAAsB;SACrC;KACF;IACD,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;CACb,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __extends = (this && this.__extends) || (function () {
|
|
3
2
|
var extendStatics = function (d, b) {
|
|
4
3
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -25,18 +24,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
24
|
};
|
|
26
25
|
return __assign.apply(this, arguments);
|
|
27
26
|
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.Columns = void 0;
|
|
33
27
|
/** @jsx jsx */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
import { jsx } from '@emotion/core';
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import { BuilderBlocks } from '../components/builder-blocks.component';
|
|
31
|
+
import { withBuilder } from '../functions/with-builder';
|
|
32
|
+
import { Link } from '../components/Link';
|
|
33
|
+
import { getSizesForBreakpoints } from '../constants/device-sizes.constant';
|
|
40
34
|
var DEFAULT_ASPECT_RATIO = 0.7004048582995948;
|
|
41
35
|
var defaultBlocks = [
|
|
42
36
|
{
|
|
@@ -124,11 +118,11 @@ var ColumnsComponent = /** @class */ (function (_super) {
|
|
|
124
118
|
var _b, _c, _d;
|
|
125
119
|
var _e = this, columns = _e.columns, gutterSize = _e.gutterSize;
|
|
126
120
|
var contentBreakpoints = ((_d = (_c = (_b = this.props.builderState) === null || _b === void 0 ? void 0 : _b.context.builderContent) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.breakpoints) || {};
|
|
127
|
-
var breakpointSizes =
|
|
121
|
+
var breakpointSizes = getSizesForBreakpoints(contentBreakpoints);
|
|
128
122
|
return (
|
|
129
123
|
// FIXME: make more elegant
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
jsx(React.Fragment, null,
|
|
125
|
+
jsx("div", { className: "builder-columns", css: __assign({ display: 'flex' }, (this.props.stackColumnsAt !== 'never' && (_a = {},
|
|
132
126
|
_a["@media (max-width: ".concat(this.props.stackColumnsAt !== 'tablet'
|
|
133
127
|
? breakpointSizes.small.max
|
|
134
128
|
: breakpointSizes.medium.max, "px)")] = {
|
|
@@ -137,10 +131,10 @@ var ColumnsComponent = /** @class */ (function (_super) {
|
|
|
137
131
|
},
|
|
138
132
|
_a))) }, columns.map(function (col, index) {
|
|
139
133
|
var _a, _b;
|
|
140
|
-
var TagName = col.link ?
|
|
134
|
+
var TagName = col.link ? Link : 'div';
|
|
141
135
|
// TODO: pass size down in context
|
|
142
|
-
return (
|
|
143
|
-
|
|
136
|
+
return (jsx(React.Fragment, { key: index },
|
|
137
|
+
jsx(TagName, __assign({ className: "builder-column" }, (col.link ? { href: col.link } : null), {
|
|
144
138
|
// TODO: generate width and margin-left as CSS instead so can override with pure CSS for best responsieness
|
|
145
139
|
// and no use of !important
|
|
146
140
|
css: __assign((_a = { display: 'flex', flexDirection: 'column', alignItems: 'stretch', lineHeight: 'normal' }, _a['& > .builder-blocks'] = {
|
|
@@ -153,14 +147,14 @@ var ColumnsComponent = /** @class */ (function (_super) {
|
|
|
153
147
|
marginLeft: 0,
|
|
154
148
|
},
|
|
155
149
|
_b))) }),
|
|
156
|
-
|
|
150
|
+
jsx(BuilderBlocks, { key: index,
|
|
157
151
|
// TODO: childOf [parentBlocks]?
|
|
158
152
|
child: true, parentElementId: _this.props.builderBlock && _this.props.builderBlock.id, blocks: col.blocks, dataPath: "component.options.columns.".concat(index, ".blocks") }))));
|
|
159
153
|
}))));
|
|
160
154
|
};
|
|
161
155
|
return ColumnsComponent;
|
|
162
|
-
}(
|
|
163
|
-
|
|
156
|
+
}(React.Component));
|
|
157
|
+
export var Columns = withBuilder(ColumnsComponent, {
|
|
164
158
|
name: 'Columns',
|
|
165
159
|
static: true,
|
|
166
160
|
inputs: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.js","sourceRoot":"","sources":["../../../../src/blocks/Columns.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.js","sourceRoot":"","sources":["../../../../src/blocks/Columns.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,eAAe;AACf,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAe,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEzF,IAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEhD,IAAM,aAAa,GAAqB;IACtC;QACE,OAAO,EAAE,yBAAyB;QAClC,gBAAgB,EAAE;YAChB,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,aAAa,EAAE,QAAQ;gBACvB,UAAU,EAAE,SAAS;gBACrB,UAAU,EAAE,GAAG;gBACf,QAAQ,EAAE,UAAU;gBACpB,SAAS,EAAE,M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