@rechat/sdk 0.3.0 → 0.4.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/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
 
2
2
  Rechat SDK library allows you to integrate your website or application with Rechat.
3
3
 
4
- [[include:Installation.md]]
5
-
6
4
  #### Basic Example
7
5
 
8
6
  ```html
@@ -46,6 +44,6 @@ Rechat SDK library allows you to integrate your website or application with Rech
46
44
  ```
47
45
 
48
46
  #### More Examples
49
- [Lead Capture](examples/lead-capture.html)
50
- [Lead Tracker](examples/lead-tracker.html)
51
- [Lead Form](examples/lead-form.html)
47
+ [Lead Capture](./public/examples/leads/lead-capture.html)
48
+ [Lead Tracker](./public/examples/leads/lead-tracker.html)
49
+ [Lead Form](./public/examples/leads/lead-form.html)
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap";:root{--rechat-theme-scaling: 1;--rechat-theme-radius-factor: 1;--rechat-theme-listing-card-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.05);--rechat-theme-space-1: calc(4px * var(--rechat-theme-scaling));--rechat-theme-space-2: calc(8px * var(--rechat-theme-scaling));--rechat-theme-space-3: calc(12px * var(--rechat-theme-scaling));--rechat-theme-space-4: calc(16px * var(--rechat-theme-scaling));--rechat-theme-space-5: calc(24px * var(--rechat-theme-scaling));--rechat-theme-space-6: calc(32px * var(--rechat-theme-scaling));--rechat-theme-space-7: calc(40px * var(--rechat-theme-scaling));--rechat-theme-space-8: calc(48px * var(--rechat-theme-scaling));--rechat-theme-space-9: calc(64px * var(--rechat-theme-scaling));--rechat-theme-radius-1: calc(3px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-2: calc(4px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-3: calc(6px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-4: calc(8px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-5: calc(12px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-6: calc(16px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-7: calc(24px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-radius-8: calc(32px * var(--rechat-theme-scaling) * var(--rechat-theme-radius-factor));--rechat-theme-skeleton-base-color: #ebebeb;--rechat-theme-skeleton-highlight-color: #f5f5f5;--rechat-theme-skeleton-animation-duration: 1.5s;--rechat-theme-skeleton-animation-direction: normal;--rechat-theme-skeleton-pseudo-element-display: block;--rechat-theme-gray-1: #fcfcfd;--rechat-theme-gray-2: #f9f9fb;--rechat-theme-gray-3: #eff0f3;--rechat-theme-gray-4: #e7e8ec;--rechat-theme-gray-5: #e0e1e6;--rechat-theme-gray-6: #d8d9e0;--rechat-theme-gray-7: #cdced7;--rechat-theme-gray-8: #b9bbc6;--rechat-theme-gray-9: #8b8d98;--rechat-theme-gray-10: #80828d;--rechat-theme-gray-11: #62636c;--rechat-theme-gray-12: #1e1f24;--rechat-theme-gray-a1: #00005503;--rechat-theme-gray-a2: #00005506;--rechat-theme-gray-a3: #00104010;--rechat-theme-gray-a4: #000b3618;--rechat-theme-gray-a5: #0009321f;--rechat-theme-gray-a6: #00073527;--rechat-theme-gray-a7: #00063332;--rechat-theme-gray-a8: #00083046;--rechat-theme-gray-a9: #00051d74;--rechat-theme-gray-a10: #00051b7f;--rechat-theme-gray-a11: #0002119d;--rechat-theme-gray-a12: #000107e1;--rechat-theme-gray-contrast: #FFFFFF;--rechat-theme-gray-surface: #ffffffcc;--rechat-theme-gray-indicator: #8b8d98;--rechat-theme-gray-track: #8b8d98;--rechat-theme-accent-1: #fefcfb;--rechat-theme-accent-2: #fff7ee;--rechat-theme-accent-3: #ffeedc;--rechat-theme-accent-4: #ffdfc1;--rechat-theme-accent-5: #ffd2a8;--rechat-theme-accent-6: #ffc48d;--rechat-theme-accent-7: #f3b27b;--rechat-theme-accent-8: #e69b58;--rechat-theme-accent-9: #ff9a33;--rechat-theme-accent-10: #f38f25;--rechat-theme-accent-11: #b36500;--rechat-theme-accent-12: #50331a;--rechat-theme-accent-a1: #c0400004;--rechat-theme-accent-a2: #ff870011;--rechat-theme-accent-a3: #ff840023;--rechat-theme-accent-a4: #ff7c003e;--rechat-theme-accent-a5: #ff7c0057;--rechat-theme-accent-a6: #ff7c0072;--rechat-theme-accent-a7: #e86b0084;--rechat-theme-accent-a8: #d96700a7;--rechat-theme-accent-a9: #ff8100cc;--rechat-theme-accent-a10: #f17c00da;--rechat-theme-accent-a11: #b36500;--rechat-theme-accent-a12: #3c1c00e5;--rechat-theme-accent-contrast: #fff;--rechat-theme-accent-surface: #fff5eacc;--rechat-theme-accent-indicator: #ff9a33;--rechat-theme-accent-track: #ff9a33;--rechat-theme-secondary-1: #fbfdff;--rechat-theme-secondary-2: #f5f9ff;--rechat-theme-secondary-3: #eaf3ff;--rechat-theme-secondary-4: #dbecff;--rechat-theme-secondary-5: #cae2ff;--rechat-theme-secondary-6: #b6d5fd;--rechat-theme-secondary-7: #9cc4f6;--rechat-theme-secondary-8: #76acf0;--rechat-theme-secondary-9: #0b73da;--rechat-theme-secondary-10: #0065cb;--rechat-theme-secondary-11: #0671d8;--rechat-theme-secondary-12: #0c3361;--rechat-theme-secondary-a1: #0080ff04;--rechat-theme-secondary-a2: #0066ff0a;--rechat-theme-secondary-a3: #006eff15;--rechat-theme-secondary-a4: #0079ff24;--rechat-theme-secondary-a5: #0074ff35;--rechat-theme-secondary-a6: #006df949;--rechat-theme-secondary-a7: #0068e863;--rechat-theme-secondary-a8: #0065e489;--rechat-theme-secondary-a9: #006dd8f4;--rechat-theme-secondary-a10: #0065cb;--rechat-theme-secondary-a11: #006ed7f9;--rechat-theme-secondary-a12: #002959f3;--rechat-theme-secondary-contrast: #fff;--rechat-theme-secondary-surface: #f3f8ffcc;--rechat-theme-secondary-indicator: #0b73da;--rechat-theme-secondary-track: #0b73da;--rechat-theme-black-a1: color(display-p3 0 0 0 / .05);--rechat-theme-black-a2: color(display-p3 0 0 0 / .1);--rechat-theme-black-a3: color(display-p3 0 0 0 / .15);--rechat-theme-black-a4: color(display-p3 0 0 0 / .2);--rechat-theme-black-a5: color(display-p3 0 0 0 / .3);--rechat-theme-black-a6: color(display-p3 0 0 0 / .4);--rechat-theme-black-a7: color(display-p3 0 0 0 / .5);--rechat-theme-black-a8: color(display-p3 0 0 0 / .6);--rechat-theme-black-a9: color(display-p3 0 0 0 / .7);--rechat-theme-black-a10: color(display-p3 0 0 0 / .8);--rechat-theme-black-a11: color(display-p3 0 0 0 / .9);--rechat-theme-black-a12: color(display-p3 0 0 0 / .95);--rechat-theme-white-a1: color(display-p3 1 1 1 / .05);--rechat-theme-white-a2: color(display-p3 1 1 1 / .1);--rechat-theme-white-a3: color(display-p3 1 1 1 / .15);--rechat-theme-white-a4: color(display-p3 1 1 1 / .2);--rechat-theme-white-a5: color(display-p3 1 1 1 / .3);--rechat-theme-white-a6: color(display-p3 1 1 1 / .4);--rechat-theme-white-a7: color(display-p3 1 1 1 / .5);--rechat-theme-white-a8: color(display-p3 1 1 1 / .6);--rechat-theme-white-a9: color(display-p3 1 1 1 / .7);--rechat-theme-white-a10: color(display-p3 1 1 1 / .8);--rechat-theme-white-a11: color(display-p3 1 1 1 / .9);--rechat-theme-white-a12: color(display-p3 1 1 1 / .95);--rechat-theme-text-font-family: "Lato";--rechat-theme-text-primary: var(--rechat-theme-gray-12);--rechat-theme-text-secondary: var(--rechat-theme-gray-a10);--rechat-theme-text-tertiary: var(--rechat-theme-gray-a8);--rechat-theme-text-error: #ff0033;--rechat-theme-border-color: var(--rechat-theme-gray-6);--rechat-theme-font-size-1: calc(12px * var(--rechat-theme-scaling));--rechat-theme-font-size-2: calc(14px * var(--rechat-theme-scaling));--rechat-theme-font-size-3: calc(16px * var(--rechat-theme-scaling));--rechat-theme-font-size-4: calc(18px * var(--rechat-theme-scaling));--rechat-theme-font-size-5: calc(20px * var(--rechat-theme-scaling));--rechat-theme-font-size-6: calc(24px * var(--rechat-theme-scaling));--rechat-theme-font-size-7: calc(28px * var(--rechat-theme-scaling));--rechat-theme-font-size-8: calc(35px * var(--rechat-theme-scaling));--rechat-theme-font-size-9: calc(60px * var(--rechat-theme-scaling));--rechat-theme-font-weight-light: 300;--rechat-theme-font-weight-regular: 400;--rechat-theme-font-weight-medium: 500;--rechat-theme-font-weight-bold: 700;--rechat-theme-default-font-size: var(--rechat-theme-font-size-3);--rechat-theme-default-font-style: normal;--rechat-theme-default-font-weight: var(--rechat-theme-font-weight-regular);--rechat-theme-default-line-height: 1.5;--rechat-theme-default-letter-spacing: 0em;--rechat-theme-default-leading-trim-start: 0.42em;--rechat-theme-default-leading-trim-end: 0.36em;--rechat-theme-shadow-1: inset 0 0 0 1px var(--rechat-theme-gray-a5), inset 0 1.5px 2px 0 var(--rechat-theme-gray-a2), inset 0 1.5px 2px 0 var(--rechat-theme-black-a2);--rechat-theme-shadow-2: 0 0 0 1px var(--rechat-theme-gray-a3), 0 0 0 0.5px var(--rechat-theme-black-a1), 0 1px 1px 0 var(--rechat-theme-gray-a2), 0 2px 1px -1px var(--rechat-theme-black-a1), 0 1px 3px 0 var(--rechat-theme-black-a1);--rechat-theme-shadow-3: 0 0 0 1px var(--rechat-theme-gray-a3), 0 2px 3px -2px var(--rechat-theme-gray-a3), 0 3px 12px -4px var(--rechat-theme-black-a2), 0 4px 16px -8px var(--rechat-theme-black-a2);--rechat-theme-shadow-4: 0 0 0 1px var(--rechat-theme-gray-a3), 0 8px 40px var(--rechat-theme-black-a1), 0 12px 32px -16px var(--rechat-theme-gray-a3);--rechat-theme-shadow-5: 0 0 0 1px var(--rechat-theme-gray-a3), 0 12px 60px var(--rechat-theme-black-a3), 0 12px 32px -16px var(--rechat-theme-gray-a5);--rechat-theme-shadow-6: 0 0 0 1px var(--rechat-theme-gray-a3), 0 12px 60px var(--rechat-theme-black-a3), 0 16px 64px var(--rechat-theme-gray-a2), 0 16px 36px -20px var(--rechat-theme-gray-a7);--rechat-theme-shadow-3-borderless: 0 2px 3px -2px var(--rechat-theme-gray-a3), 0 3px 12px -4px var(--rechat-theme-black-a2), 0 4px 16px -8px var(--rechat-theme-black-a2);--rechat-theme-shadow-4-borderless: 0 8px 40px var(--rechat-theme-black-a1), 0 12px 32px -16px var(--rechat-theme-gray-a3)}body{font-family:"Lato";font-size:var(--rechat-theme-default-font-size);color:var(--rechat-theme-text-primary)}p{padding:0;margin:0}@keyframes loading-skeleton{100%{transform:translateX(100%)}}.loading-skeleton{background-color:var(--rechat-theme-skeleton-base-color);width:100%;display:inline-flex;line-height:1;position:relative;user-select:none;overflow:hidden;pointer-envents:none}.loading-skeleton::after{content:" ";display:var(--rechat-theme-skeleton-pseudo-element-display);position:absolute;top:0;left:0;right:0;height:100%;background-repeat:no-repeat;background-image:var(--rechat-theme-skeleton-custom-highlight-background, linear-gradient(90deg, var(--rechat-theme-skeleton-base-color) 0%, var(--rechat-theme-skeleton-highlight-color) 50%, var(--rechat-theme-skeleton-base-color) 100%));transform:translateX(-100%);animation-name:loading-skeleton;animation-direction:var(--rechat-theme-skeleton-animation-direction);animation-duration:var(--rechat-theme-skeleton-animation-duration);animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media(prefers-reduced-motion){.loading-skeleton{--rechat-theme-skeleton-pseudo-element-display: none}}.rechat-switch-button{font-size:11px;position:relative;display:inline-block;width:3.5em;height:2em}.rechat-switch-button .rechat-switch-button__slider{position:absolute;cursor:pointer;inset:0;background:var(--rechat-theme-gray-7);border-radius:var(--rechat-theme-radius-7);transition:all .4s cubic-bezier(0.23, 1, 0.32, 1)}.rechat-switch-button .rechat-switch-button__slider:before{position:absolute;content:"";height:1.4em;width:1.4em;left:.3em;bottom:.3em;background-color:#fff;border-radius:var(--rechat-theme-radius-7);box-shadow:0 0px 20px rgba(0,0,0,.4);transition:all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275)}.rechat-switch-button input{opacity:0;width:0;height:0}.rechat-switch-button input:checked+.rechat-switch-button__slider{background:var(--rechat-theme-accent-10)}.rechat-switch-button input:focus+.rechat-switch-button__slider{box-shadow:0 0 1px var(--rechat-theme-accent-7)}.rechat-switch-button input:checked+.rechat-switch-button__slider:before{transform:translateX(1.6em);width:2em;height:2em;bottom:0}.rechat-component .rechat-button{padding:var(--rechat-theme-space-2) var(--rechat-theme-space-4);border:none;font-size:var(--rechat-theme-font-size-3);font-weight:var(--rechat-theme-font-weight-medium);border-radius:var(--rechat-theme-radius-2);cursor:pointer}.rechat-component .rechat-button.color-accent{background-color:var(--rechat-theme-accent-8);color:var(--rechat-theme-gray-12)}.rechat-component .rechat-button.color-accent:hover{background-color:var(--rechat-theme-accent-a8)}.rechat-component .rechat-button.color-gray{background-color:var(--rechat-theme-gray-a7);color:var(--rechat-theme-gray-12)}.rechat-component .rechat-button.color-gray:hover{background-color:var(--rechat-theme-gray-a8)}.rechat-component .rechat-button.variant-ghost{background-color:rgba(0,0,0,0);padding:var(--rechat-theme-space-2) var(--rechat-theme-space-1)}.rechat-component .rechat-button.variant-ghost:hover{background-color:rgba(0,0,0,0)}.rechat-component .rechat-text-field{padding:var(--rechat-theme-space-2);border:1px solid var(--rechat-theme-gray-6);font-size:var(--rechat-theme-font-size-3);font-weight:var(--rechat-theme-font-weight-medium)}.rechat-component .rechat-text-field.rounded{border-radius:var(--rechat-theme-radius-7);padding:var(--rechat-theme-space-2) var(--rechat-theme-space-4)}@keyframes rechat-popover-animation{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:scale(1)}}.rechat-popover__trigger{border:none;background-color:rgba(0,0,0,0);cursor:pointer;color:var(--rechat-theme-text-primary)}.rechat-popover__content{position:absolute;background:var(--rechat-theme-white-a1);padding:var(--rechat-theme-space-1);box-shadow:var(--rechat-theme-shadow-3-borderless);border-radius:var(--rechat-theme-radius-2);animation:rechat-popover-animation 150ms ease-out;transform-origin:top center;z-index:999}.listing-card{width:400px;max-width:600px;position:relative;padding-bottom:var(--rechat-theme-space-2);box-shadow:var(--rechat-theme-listing-card-box-shadow)}.listing-card.listing-card--skeleton{width:400px}.listing-card .listing-card__image{width:100%;user-select:none;object-fit:cover}.listing-card .listing-card__properties{display:flex;flex-direction:column;gap:var(--rechat-theme-space-2);padding:var(--rechat-theme-space-2) var(--rechat-theme-space-1)}.listing-card .listing-card__properties .listing-card__price{font-size:18px;font-weight:500}.listing-card .listing-card__properties .listing-card__address{font-size:12px;color:#5c5c5c}.listing-card .listing-card__properties .listing-card__attributes{font-size:12px;color:#555}.listing-card .listing-card__badges-container{position:absolute;top:var(--rechat-theme-space-2);left:var(--rechat-theme-space-2);display:flex;align-items:center;gap:var(--rechat-theme-space-1)}.listing-card .listing-card__badges-container .listing-card__badge{padding:4px 7px;background-color:rgba(0,0,0,.8);border-radius:var(--rechat-theme-radius-1);color:#fff;font-size:12px;font-weight:400}.listing-filter__container{display:flex;align-items:center;gap:var(--rechat-theme-space-2)}.listing-filter__dropdown_trigger{padding:var(--rechat-theme-space-2) var(--rechat-theme-space-4);border:1px solid var(--rechat-theme-gray-6);border-radius:var(--rechat-theme-radius-7);font-weight:var(--rechat-theme-font-weight-medium)}.listing-filter__dropdown_trigger:hover{background-color:var(--rechat-theme-gray-a1)}.listing-filter__dropdown_trigger--open{border:1px solid var(--rechat-theme-gray-7);background-color:var(--rechat-theme-gray-a2)}.listing-filter__dropdown_content{min-width:300px;min-height:200px}
@@ -1 +1 @@
1
- var Rechat=function(e){"use strict";var t=function(e,n){return t=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])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return r=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},r.apply(this,arguments)};function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var c,u={};var s=a(function(){if(c)return u;c=1,Object.defineProperty(u,"__esModule",{value:!0}),u.parse=function(e,t){const n=new o,r=e.length;if(r<2)return n;const i=t?.decode||l;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const o=e.indexOf(";",c),u=-1===o?r:o;if(t>u){c=e.lastIndexOf(";",t-1)+1;continue}const l=a(e,c,t),p=s(e,t,l),f=e.slice(l,p);if(void 0===n[f]){let r=a(e,t+1,u),o=s(e,u,r);const c=i(e.slice(r,o));n[f]=c}c=u+1}while(c<r);return n},u.serialize=function(o,a,c){const u=c?.encode||encodeURIComponent;if(!e.test(o))throw new TypeError(`argument name is invalid: ${o}`);const s=u(a);if(!t.test(s))throw new TypeError(`argument val is invalid: ${a}`);let l=o+"="+s;if(!c)return l;if(void 0!==c.maxAge){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);l+="; Max-Age="+c.maxAge}if(c.domain){if(!n.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);l+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);l+="; Path="+c.path}if(c.expires){if(!function(e){return"[object Date]"===i.call(e)}(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);l+="; Expires="+c.expires.toUTCString()}c.httpOnly&&(l+="; HttpOnly");c.secure&&(l+="; Secure");c.partitioned&&(l+="; Partitioned");if(c.priority){switch("string"==typeof c.priority?c.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}}if(c.sameSite){switch("string"==typeof c.sameSite?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}}return l};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function a(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function s(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function l(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}return u}()),l=function(){function e(e){this.settings=e}return Object.defineProperty(e.prototype,"ApiUrl",{get:function(){var e;return null!==(e=this.settings.api_url)&&void 0!==e?e:"https://".concat(this.settings.sandbox?"boer.":"","api.rechat.com")},enumerable:!1,configurable:!0}),e}(),p=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.identify=function(e){var t,n;document.cookie=s.serialize(this.CookieName,e,null===(n=null===(t=this.TrackerSettings)||void 0===t?void 0:t.cookie)||void 0===n?void 0:n.options)},t.prototype.capture=function(e){var t=this;return new Promise((function(n,r){var i=t.leadTrackingId;if(i)if(e.listing_id||e.mlsid){var o={action:"ContactViewedListing",object_class:"listing"};e.mlsid?o.object_sa={mls_number:e.mlsid}:e.listing_id&&(o.object=e.listing_id),fetch("".concat(t.ApiUrl,"/leads/").concat(i,"/timeline"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}).then((function(e){return e.ok?n():r(e)})).catch(r)}else r("Neither listing_id nor mlsid is provided in the data");else r("No tracking id is found")}))},t.prototype.stop=function(){document.cookie="".concat(this.CookieName,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},Object.defineProperty(t.prototype,"CookieName",{get:function(){var e,t,n;return null!==(n=null===(t=null===(e=this.TrackerSettings)||void 0===e?void 0:e.cookie)||void 0===t?void 0:t.name)&&void 0!==n?n:"rechat-sdk-tracker"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TrackerSettings",{get:function(){return this.settings.tracker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leadTrackingId",{get:function(){var e;return null!==(e=s.parse(document.cookie)[this.CookieName])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),t}(l),f=function(e){function t(t){var n=e.call(this,t)||this;return n._tracker=new p(t),n}return n(t,e),Object.defineProperty(t.prototype,"Tracker",{get:function(){return this._tracker},enumerable:!1,configurable:!0}),t.prototype.getLeadMetaDataFromUrl=function(){var e=new URLSearchParams(window.location.search);return["user_id","brand_id","ad_campaign_id","email_campaign_id","email_campaign_email_id"].reduce((function(t,n){var i,o;return r(r({},t),((i={})[n]=null!==(o=e.get("rechat_".concat(n)))&&void 0!==o?o:"",i))}),{})},t.prototype.capture=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return o(this,(function(i){return[2,new Promise((function(i,o){fetch("".concat(n.ApiUrl,"/leads"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lead:t,metadata:r(r({},n.getLeadMetaDataFromUrl()),e)})}).then((function(e){e.ok?e.json().then((function(e){var t=e.data;!1!==n.settings.tracker&&n._tracker.identify(t.id),i(t)})):o(e)})).catch(o)}))]}))}))},t.prototype.form=function(e,t,n){var i=this;e.addEventListener("submit",(function(o){var a;o.preventDefault();var c=Object.values(e).reduce((function(e,t){var n;return t.name?r(r({},e),((n={})[t.name]=t.value,n)):e}),{});!1!==(null===(a=n.validate)||void 0===a?void 0:a.call(n,c))&&i.capture(t,c).then(n.onSuccess).catch(n.onError)}))},t}(l),d=function(){function e(e){void 0===e&&(e={}),this._settings=e,this._leads=new f(e)}return Object.defineProperty(e.prototype,"Leads",{get:function(){return this._leads},enumerable:!1,configurable:!0}),e}();return e.Sdk=d,e}({});
1
+ var Rechat=function(e){"use strict";var t=function(e,n){return t=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])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{l(r.next(e))}catch(e){i(e)}}function u(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,u)}l((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=u(0),c.throw=u(1),c.return=u(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function u(u){return function(l){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var a,_={};var s,f,p,d,h,v,m,y,g,b,w,k,S=function(){if(a)return _;a=1,Object.defineProperty(_,"__esModule",{value:!0}),_.parse=function(e,t){const n=new i,r=e.length;if(r<2)return n;const o=t?.decode||l;let a=0;do{const t=e.indexOf("=",a);if(-1===t)break;const i=e.indexOf(";",a),l=-1===i?r:i;if(t>l){a=e.lastIndexOf(";",t-1)+1;continue}const _=c(e,a,t),s=u(e,t,_),f=e.slice(_,s);if(void 0===n[f]){let r=c(e,t+1,l),i=u(e,l,r);const a=o(e.slice(r,i));n[f]=a}a=l+1}while(a<r);return n},_.serialize=function(i,c,u){const l=u?.encode||encodeURIComponent;if(!e.test(i))throw new TypeError(`argument name is invalid: ${i}`);const a=l(c);if(!t.test(a))throw new TypeError(`argument val is invalid: ${c}`);let _=i+"="+a;if(!u)return _;if(void 0!==u.maxAge){if(!Number.isInteger(u.maxAge))throw new TypeError(`option maxAge is invalid: ${u.maxAge}`);_+="; Max-Age="+u.maxAge}if(u.domain){if(!n.test(u.domain))throw new TypeError(`option domain is invalid: ${u.domain}`);_+="; Domain="+u.domain}if(u.path){if(!r.test(u.path))throw new TypeError(`option path is invalid: ${u.path}`);_+="; Path="+u.path}if(u.expires){if(!function(e){return"[object Date]"===o.call(e)}(u.expires)||!Number.isFinite(u.expires.valueOf()))throw new TypeError(`option expires is invalid: ${u.expires}`);_+="; Expires="+u.expires.toUTCString()}u.httpOnly&&(_+="; HttpOnly");u.secure&&(_+="; Secure");u.partitioned&&(_+="; Partitioned");if(u.priority){switch("string"==typeof u.priority?u.priority.toLowerCase():void 0){case"low":_+="; Priority=Low";break;case"medium":_+="; Priority=Medium";break;case"high":_+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${u.priority}`)}}if(u.sameSite){switch("string"==typeof u.sameSite?u.sameSite.toLowerCase():u.sameSite){case!0:case"strict":_+="; SameSite=Strict";break;case"lax":_+="; SameSite=Lax";break;case"none":_+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${u.sameSite}`)}}return _};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function c(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function u(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function l(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}return _}(),C=l(S),P=function(){function e(e){this.settings=e}return Object.defineProperty(e.prototype,"ApiUrl",{get:function(){var e;return null!==(e=this.settings.api_url)&&void 0!==e?e:"https://".concat(this.settings.sandbox?"boer.":"","api.rechat.com")},enumerable:!1,configurable:!0}),e}(),O=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.identify=function(e){var t,n;document.cookie=C.serialize(this.CookieName,e,null===(n=null===(t=this.TrackerSettings)||void 0===t?void 0:t.cookie)||void 0===n?void 0:n.options)},t.prototype.capture=function(e){var t=this;return new Promise((function(n,r){var o=t.leadTrackingId;if(o)if(e.listing_id||e.mlsid){var i={action:"ContactViewedListing",object_class:"listing"};e.mlsid?i.object_sa={mls_number:e.mlsid}:e.listing_id&&(i.object=e.listing_id),fetch("".concat(t.ApiUrl,"/leads/").concat(o,"/timeline"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}).then((function(e){return e.ok?n():r(e)})).catch(r)}else r("Neither listing_id nor mlsid is provided in the data");else r("No tracking id is found")}))},t.prototype.stop=function(){document.cookie="".concat(this.CookieName,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},Object.defineProperty(t.prototype,"CookieName",{get:function(){var e,t,n;return null!==(n=null===(t=null===(e=this.TrackerSettings)||void 0===e?void 0:e.cookie)||void 0===t?void 0:t.name)&&void 0!==n?n:"rechat-sdk-tracker"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TrackerSettings",{get:function(){return this.settings.tracker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leadTrackingId",{get:function(){var e;return null!==(e=C.parse(document.cookie)[this.CookieName])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),t}(P),x=function(e){function t(t){var n=e.call(this,t)||this;return n._tracker=new O(t),n}return n(t,e),Object.defineProperty(t.prototype,"Tracker",{get:function(){return this._tracker},enumerable:!1,configurable:!0}),t.prototype.getLeadMetaDataFromUrl=function(){var e=new URLSearchParams(window.location.search);return["user_id","brand_id","ad_campaign_id","email_campaign_id","email_campaign_email_id"].reduce((function(t,n){var o,i;return r(r({},t),((o={})[n]=null!==(i=e.get("rechat_".concat(n)))&&void 0!==i?i:"",o))}),{})},t.prototype.capture=function(e,t){return i(this,void 0,void 0,(function(){var n=this;return c(this,(function(o){return[2,new Promise((function(o,i){fetch("".concat(n.ApiUrl,"/leads"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lead:t,metadata:r(r({},n.getLeadMetaDataFromUrl()),e)})}).then((function(e){e.ok?e.json().then((function(e){var t=e.data;!1!==n.settings.tracker&&n._tracker.identify(t.id),o(t)})):i(e)})).catch(i)}))]}))}))},t.prototype.form=function(e,t,n){var o=this;e.addEventListener("submit",(function(i){var c;i.preventDefault();var u=Object.values(e).reduce((function(e,t){var n;return t.name?r(r({},e),((n={})[t.name]=t.value,n)):e}),{});!1!==(null===(c=n.validate)||void 0===c?void 0:c.call(n,u))&&o.capture(t,u).then(n.onSuccess).catch(n.onError)}))},t}(P),N=function(){function e(e){void 0===e&&(e={}),this._settings=e,this._leads=new x(e)}return Object.defineProperty(e.prototype,"Leads",{get:function(){return this._leads},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Settings",{get:function(){return this._settings},enumerable:!1,configurable:!0}),e}(),E={},j=[],A=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,T=Array.isArray;function U(e,t){for(var n in t)e[n]=t[n];return e}function z(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function L(e,t,n){var r,o,i,c={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:c[i]=t[i];if(arguments.length>2&&(c.children=arguments.length>3?s.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return D(e,c,r,o,null)}function D(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++p:o,__i:-1,__u:0};return null==o&&null!=f.vnode&&f.vnode(i),i}function R(e){return e.children}function M(e,t){this.props=e,this.context=t}function F(e,t){if(null==t)return e.__?F(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?F(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function I(e){(!e.__d&&(e.__d=!0)&&d.push(e)&&!W.__r++||h!=f.debounceRendering)&&((h=f.debounceRendering)||v)(W)}function W(){for(var e,t,n,r,o,i,c,u=1;d.length;)d.length>u&&d.sort(m),e=d.shift(),u=d.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],c=[],t.__P&&((n=U({},r)).__v=r.__v+1,f.vnode&&f.vnode(n),Y(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,null==o?F(r):o,!!(32&r.__u),c),n.__v=r.__v,n.__.__k[n.__i]=n,G(i,n,c),n.__e!=o&&H(n)));W.__r=0}function $(e,t,n,r,o,i,c,u,l,a,_){var s,f,p,d,h,v,m,y=r&&r.__k||j,g=t.length;for(l=function(e,t,n,r,o){var i,c,u,l,a,_=n.length,s=_,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(c=t[i])&&"boolean"!=typeof c&&"function"!=typeof c?(l=i+f,(c=e.__k[i]="string"==typeof c||"number"==typeof c||"bigint"==typeof c||c.constructor==String?D(null,c,null,null,null):T(c)?D(R,{children:c},null,null,null):null==c.constructor&&c.__b>0?D(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):c).__=e,c.__b=e.__b+1,u=null,-1!=(a=c.__i=q(c,n,l,s))&&(s--,(u=n[a])&&(u.__u|=2)),null==u||null==u.__v?(-1==a&&(o>_?f--:o<_&&f++),"function"!=typeof c.type&&(c.__u|=4)):a!=l&&(a==l-1?f--:a==l+1?f++:(a>l?f--:f++,c.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<_;i++)null!=(u=n[i])&&!(2&u.__u)&&(u.__e==r&&(r=F(u)),ne(u,u));return r}(n,t,y,l,g),s=0;s<g;s++)null!=(p=n.__k[s])&&(f=-1==p.__i?E:y[p.__i]||E,p.__i=s,v=Y(e,p,f,o,i,c,u,l,a,_),d=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&te(f.ref,null,p),_.push(p.ref,p.__c||d,p)),null==h&&null!=d&&(h=d),(m=!!(4&p.__u))||f.__k===p.__k?l=V(p,l,e,m):"function"==typeof p.type&&void 0!==v?l=v:d&&(l=d.nextSibling),p.__u&=-7);return n.__e=h,l}function V(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=V(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=F(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function B(e,t){return t=t||[],null==e||"boolean"==typeof e||(T(e)?e.some((function(e){B(e,t)})):t.push(e)),t}function q(e,t,n,r){var o,i,c,u=e.key,l=e.type,a=t[n],_=null!=a&&!(2&a.__u);if(null===a&&null==e.key||_&&u==a.key&&l==a.type)return n;if(r>(_?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(a=t[c=o>=0?o--:i++])&&!(2&a.__u)&&u==a.key&&l==a.type)return c;return-1}function J(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||A.test(t)?n:n+"px"}function K(e,t,n,r,o){var i,c;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||J(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||J(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(y,"$1")),c=t.toLowerCase(),t=c in e||"onFocusOut"==t||"onFocusIn"==t?c.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=g,e.addEventListener(t,i?w:b,i)):e.removeEventListener(t,i?w:b,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function X(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=g++;else if(t.t<n.u)return;return n(f.event?f.event(t):t)}}}function Y(e,t,n,r,o,i,c,u,l,a){var _,s,p,d,h,v,m,y,g,b,w,k,S,C,P,O,x,N=t.type;if(null!=t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),i=[u=t.__e=n.__e]),(_=f.__b)&&_(t);e:if("function"==typeof N)try{if(y=t.props,g="prototype"in N&&N.prototype.render,b=(_=N.contextType)&&r[_.__c],w=_?b?b.props.value:_.__:r,n.__c?m=(s=t.__c=n.__c).__=s.__E:(g?t.__c=s=new N(y,w):(t.__c=s=new M(y,w),s.constructor=N,s.render=re),b&&b.sub(s),s.props=y,s.state||(s.state={}),s.context=w,s.__n=r,p=s.__d=!0,s.__h=[],s._sb=[]),g&&null==s.__s&&(s.__s=s.state),g&&null!=N.getDerivedStateFromProps&&(s.__s==s.state&&(s.__s=U({},s.__s)),U(s.__s,N.getDerivedStateFromProps(y,s.__s))),d=s.props,h=s.state,s.__v=t,p)g&&null==N.getDerivedStateFromProps&&null!=s.componentWillMount&&s.componentWillMount(),g&&null!=s.componentDidMount&&s.__h.push(s.componentDidMount);else{if(g&&null==N.getDerivedStateFromProps&&y!==d&&null!=s.componentWillReceiveProps&&s.componentWillReceiveProps(y,w),!s.__e&&null!=s.shouldComponentUpdate&&!1===s.shouldComponentUpdate(y,s.__s,w)||t.__v==n.__v){for(t.__v!=n.__v&&(s.props=y,s.state=s.__s,s.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),k=0;k<s._sb.length;k++)s.__h.push(s._sb[k]);s._sb=[],s.__h.length&&c.push(s);break e}null!=s.componentWillUpdate&&s.componentWillUpdate(y,s.__s,w),g&&null!=s.componentDidUpdate&&s.__h.push((function(){s.componentDidUpdate(d,h,v)}))}if(s.context=w,s.props=y,s.__P=e,s.__e=!1,S=f.__r,C=0,g){for(s.state=s.__s,s.__d=!1,S&&S(t),_=s.render(s.props,s.state,s.context),P=0;P<s._sb.length;P++)s.__h.push(s._sb[P]);s._sb=[]}else do{s.__d=!1,S&&S(t),_=s.render(s.props,s.state,s.context),s.state=s.__s}while(s.__d&&++C<25);s.state=s.__s,null!=s.getChildContext&&(r=U(U({},r),s.getChildContext())),g&&!p&&null!=s.getSnapshotBeforeUpdate&&(v=s.getSnapshotBeforeUpdate(d,h)),O=_,null!=_&&_.type===R&&null==_.key&&(O=Q(_.props.children)),u=$(e,T(O)?O:[O],t,n,r,o,i,c,u,l,a),s.base=t.__e,t.__u&=-161,s.__h.length&&c.push(s),m&&(s.__E=s.__=null)}catch(e){if(t.__v=null,l||null!=i)if(e.then){for(t.__u|=l?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;i[i.indexOf(u)]=null,t.__e=u}else{for(x=i.length;x--;)z(i[x]);Z(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Z(t);f.__e(e,t,n)}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=ee(n.__e,t,n,r,o,i,c,l,a);return(_=f.diffed)&&_(t),128&t.__u?void 0:u}function Z(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Z)}function G(e,t,n){for(var r=0;r<n.length;r++)te(n[r],n[++r],n[++r]);f.__c&&f.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){f.__e(e,t.__v)}}))}function Q(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:T(e)?e.map(Q):U({},e)}function ee(e,t,n,r,o,i,c,u,l){var a,_,p,d,h,v,m,y=n.props,g=t.props,b=t.type;if("svg"==b?o="http://www.w3.org/2000/svg":"math"==b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=i)for(a=0;a<i.length;a++)if((h=i[a])&&"setAttribute"in h==!!b&&(b?h.localName==b:3==h.nodeType)){e=h,i[a]=null;break}if(null==e){if(null==b)return document.createTextNode(g);e=document.createElementNS(o,b,g.is&&g),u&&(f.__m&&f.__m(t,i),u=!1),i=null}if(null==b)y===g||u&&e.data==g||(e.data=g);else{if(i=i&&s.call(e.childNodes),y=n.props||E,!u&&null!=i)for(y={},a=0;a<e.attributes.length;a++)y[(h=e.attributes[a]).name]=h.value;for(a in y)if(h=y[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=h;else if(!(a in g)){if("value"==a&&"defaultValue"in g||"checked"==a&&"defaultChecked"in g)continue;K(e,a,null,h,o)}for(a in g)h=g[a],"children"==a?d=h:"dangerouslySetInnerHTML"==a?_=h:"value"==a?v=h:"checked"==a?m=h:u&&"function"!=typeof h||y[a]===h||K(e,a,h,y[a],o);if(_)u||p&&(_.__html==p.__html||_.__html==e.innerHTML)||(e.innerHTML=_.__html),t.__k=[];else if(p&&(e.innerHTML=""),$("template"==t.type?e.content:e,T(d)?d:[d],t,n,r,"foreignObject"==b?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:n.__k&&F(n,0),u,l),null!=i)for(a=i.length;a--;)z(i[a]);u||(a="value","progress"==b&&null==v?e.removeAttribute("value"):null!=v&&(v!==e[a]||"progress"==b&&!v||"option"==b&&v!=y[a])&&K(e,a,v,y[a],o),a="checked",null!=m&&m!=e[a]&&K(e,a,m,y[a],o))}return e}function te(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){f.__e(e,n)}}function ne(e,t,n){var r,o;if(f.unmount&&f.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||te(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){f.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ne(r[o],t,n||"function"!=typeof e.type);n||z(e.__e),e.__c=e.__=e.__e=void 0}function re(e,t,n){return this.constructor(e,n)}function oe(e,t,n){var r,o,i,c;t==document&&(t=document.documentElement),f.__&&f.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],c=[],Y(t,e=(!r&&n||t).__k=L(R,null,[e]),o||E,E,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?s.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,c),G(i,e,c)}function ie(e,t){oe(e,t,ie)}function ce(e,t,n){var r,o,i,c,u=U({},e.props);for(i in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:u[i]=void 0===t[i]&&null!=c?c[i]:t[i];return arguments.length>2&&(u.children=arguments.length>3?s.call(arguments,2):n),D(e.type,u,r||e.key,o||e.ref,null)}function ue(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,I(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+k++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}s=j.slice,f={__e:function(e,t,n,r){for(var o,i,c;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),c=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),c=o.__d),c)return o.__E=o}catch(t){e=t}throw e}},p=0,M.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=U({},this.state),"function"==typeof e&&(e=e(U({},n),this.props)),e&&U(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),I(this))},M.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),I(this))},M.prototype.render=R,d=[],v="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,m=function(e,t){return e.__v.__b-t.__v.__b},W.__r=0,y=/(PointerCapture)$|Capture$/i,g=0,b=X(!1),w=X(!0),k=0;var ae=["context","children"];function _e(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=fe,o.prototype.attributeChangedCallback=de,o.prototype.disconnectedCallback=he,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,o)}function se(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,ae);return ce(t,n)}function fe(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=L(se,le({},this._props,{context:e.detail.context}),me(this,this._vdomComponent)),(this.hasAttribute("hydrate")?ie:oe)(this._vdom,this._root)}function pe(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function de(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[pe(e)]=n,this._vdom=ce(this._vdom,r),oe(this._vdom,this._root)}}function he(){oe(this._vdom=null,this._root)}function ve(e,t){var n=this;return L("slot",le({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function me(e,t){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var n=[],r={},o=0,i=e.attributes,c=e.childNodes;for(o=i.length;o--;)"slot"!==i[o].name&&(r[i[o].name]=i[o].value,r[pe(i[o].name)]=i[o].value);for(o=c.length;o--;){var u=me(c[o],null),l=c[o].slot;l?r[l]=L(ve,{name:l},u):n[o]=u}var a=t?L(ve,null,n):n;return L(t||e.nodeName.toLowerCase(),r,a)}var ye=0;function ge(e,t,n,r,o,i){t||(t={});var c,u,l=t;if("ref"in l)for(u in l={},t)"ref"==u?c=t[u]:l[u]=t[u];var a={type:e,props:l,key:n,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ye,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(c=e.defaultProps))for(u in c)void 0===l[u]&&(l[u]=c[u]);return f.vnode&&f.vnode(a),a}var be,we,ke,Se,Ce=0,Pe=[],Oe=f,xe=Oe.__b,Ne=Oe.__r,Ee=Oe.diffed,je=Oe.__c,Ae=Oe.unmount,Te=Oe.__;function Ue(e,t){Oe.__h&&Oe.__h(we,e,Ce||t),Ce=0;var n=we.__H||(we.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ze(e){return Ce=1,Le(Ze,e)}function Le(e,t,n){var r=Ue(be++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ze(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=we,!we.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var c=r.__c.props!==e;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(c=!0)}})),i&&i.call(this,e,t,n)||c};we.__f=!0;var i=we.shouldComponentUpdate,c=we.componentWillUpdate;we.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}c&&c.call(this,e,t,n)},we.shouldComponentUpdate=o}return r.__N||r.__}function De(e,t){var n=Ue(be++,3);!Oe.__s&&Ye(n.__H,t)&&(n.__=e,n.u=t,we.__H.__h.push(n))}function Re(e,t){var n=Ue(be++,4);!Oe.__s&&Ye(n.__H,t)&&(n.__=e,n.u=t,we.__h.push(n))}function Me(e){return Ce=5,He((function(){return{current:e}}),[])}function Fe(e,t,n){Ce=6,Re((function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}}),null==n?n:n.concat(e))}function He(e,t){var n=Ue(be++,7);return Ye(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ie(e,t){return Ce=8,He((function(){return e}),t)}function We(e){var t=we.context[e.__c],n=Ue(be++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(we)),t.props.value):e.__}function $e(e,t){Oe.useDebugValue&&Oe.useDebugValue(t?t(e):e)}function Ve(){var e=Ue(be++,11);if(!e.__){for(var t=we.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Be(){for(var e;e=Pe.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ke),e.__H.__h.forEach(Xe),e.__H.__h=[]}catch(t){e.__H.__h=[],Oe.__e(t,e.__v)}}Oe.__b=function(e){we=null,xe&&xe(e)},Oe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Te&&Te(e,t)},Oe.__r=function(e){Ne&&Ne(e),be=0;var t=(we=e.__c).__H;t&&(ke===we?(t.__h=[],we.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(Ke),t.__h.forEach(Xe),t.__h=[],be=0)),ke=we},Oe.diffed=function(e){Ee&&Ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Pe.push(t)&&Se===Oe.requestAnimationFrame||((Se=Oe.requestAnimationFrame)||Je)(Be)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),ke=we=null},Oe.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ke),e.__h=e.__h.filter((function(e){return!e.__||Xe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Oe.__e(n,e.__v)}})),je&&je(e,t)},Oe.unmount=function(e){Ae&&Ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ke(e)}catch(e){t=e}})),n.__H=void 0,t&&Oe.__e(t,n.__v))};var qe="function"==typeof requestAnimationFrame;function Je(e){var t,n=function(){clearTimeout(r),qe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);qe&&(t=requestAnimationFrame(n))}function Ke(e){var t=we,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),we=t}function Xe(e){var t=we;e.__c=e.__(),we=t}function Ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ze(e,t){return"function"==typeof t?t(e):t}function Ge(e,t){for(var n in t)e[n]=t[n];return e}function Qe(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function et(e,t){var n=t(),r=ze({t:{__:n,u:t}}),o=r[0].t,i=r[1];return Re((function(){o.__=n,o.u=t,tt(o)&&i({t:o})}),[e,n,t]),De((function(){return tt(o)&&i({t:o}),e((function(){tt(o)&&i({t:o})}))}),[e]),n}function tt(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function nt(e){e()}function rt(e){return e}function ot(){return[!1,nt]}var it=Re;function ct(e,t){this.props=e,this.context=t}(ct.prototype=new M).isPureReactComponent=!0,ct.prototype.shouldComponentUpdate=function(e,t){return Qe(this.props,e)||Qe(this.state,t)};var ut=f.__b;f.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ut&&ut(e)};var lt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var at=function(e,t){return null==e?null:B(B(e).map(t))},_t={map:at,forEach:at,count:function(e){return e?B(e).length:0},only:function(e){var t=B(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:B},st=f.__e;f.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);st(e,t,n,r)};var ft=f.unmount;function pt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return pt(e,t,n)}))),e}function dt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return dt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ht(){this.__u=0,this.o=null,this.__b=null}function vt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function mt(){this.i=null,this.l=null}f.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ft&&ft(e)},(ht.prototype=new M).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=vt(r.__v),i=!1,c=function(){i||(i=!0,n.__R=null,o?o(u):u())};n.__R=c;var u=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=dt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(c,c)},ht.prototype.componentWillUnmount=function(){this.o=[]},ht.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=pt(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&L(R,null,e.fallback);return o&&(o.__u&=-33),[L(R,null,t.__a?null:e.children),o]};var yt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function gt(e){return this.getChildContext=function(){return e.context},e.children}function bt(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){oe(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}oe(L(gt,{context:t.context},e.__v),t.v)}function wt(e,t){var n=L(bt,{__v:e,h:t});return n.containerInfo=t,n}(mt.prototype=new M).__a=function(e){var t=this,n=vt(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),yt(t,e,r)):o()};n?n(i):i()}},mt.prototype.render=function(e){this.i=null,this.l=new Map;var t=B(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},mt.prototype.componentDidUpdate=mt.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){yt(e,n,t)}))};var kt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,St=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ct=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Pt=/[A-Z0-9]/g,Ot="undefined"!=typeof document,xt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};M.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(M.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Nt=f.event;function Et(){}function jt(){return this.cancelBubble}function At(){return this.defaultPrevented}f.event=function(e){return Nt&&(e=Nt(e)),e.persist=Et,e.isPropagationStopped=jt,e.isDefaultPrevented=At,e.nativeEvent=e};var Tt,Ut={enumerable:!1,configurable:!0,get:function(){return this.class}},zt=f.vnode;f.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var c=t[i];if(!("value"===i&&"defaultValue"in t&&null==c||Ot&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var u=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===c?c="":"translate"===u&&"no"===c?c=!1:"o"===u[0]&&"n"===u[1]?"ondoubleclick"===u?i="ondblclick":"onchange"!==u||"input"!==n&&"textarea"!==n||xt(t.type)?"onfocus"===u?i="onfocusin":"onblur"===u?i="onfocusout":Ct.test(i)&&(i=u):u=i="oninput":o&&St.test(i)?i=i.replace(Pt,"-$&").toLowerCase():null===c&&(c=void 0),"oninput"===u&&r[i=u]&&(i="oninputCapture"),r[i]=c}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=B(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=B(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ut)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=kt,zt&&zt(e)};var Lt=f.__r;f.__r=function(e){Lt&&Lt(e),Tt=e.__c};var Dt=f.diffed;f.diffed=function(e){Dt&&Dt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Tt=null};var Rt={ReactCurrentDispatcher:{current:{readContext:function(e){return Tt.__n[e.__c].props.value},useCallback:Ie,useContext:We,useDebugValue:$e,useDeferredValue:rt,useEffect:De,useId:Ve,useImperativeHandle:Fe,useInsertionEffect:it,useLayoutEffect:Re,useMemo:He,useReducer:Le,useRef:Me,useState:ze,useSyncExternalStore:et,useTransition:ot}}};function Mt(e){return!!e&&e.$$typeof===kt}var Ft={useState:ze,useId:Ve,useReducer:Le,useEffect:De,useLayoutEffect:Re,useInsertionEffect:it,useTransition:ot,useDeferredValue:rt,useSyncExternalStore:et,startTransition:nt,useRef:Me,useImperativeHandle:Fe,useMemo:He,useCallback:Ie,useContext:We,useDebugValue:$e,version:"18.3.1",Children:_t,render:function(e,t,n){return null==t.__k&&(t.textContent=""),oe(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return ie(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(oe(null,e),!0)},createPortal:wt,createElement:L,createContext:ue,createFactory:function(e){return L.bind(null,e)},cloneElement:function(e){return Mt(e)?ce.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:R,isValidElement:Mt,isElement:Mt,isFragment:function(e){return Mt(e)&&e.type===R},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:M,PureComponent:ct,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Qe(this.props,e)}function r(t){return this.shouldComponentUpdate=n,L(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r},forwardRef:function(e){function t(t){var n=Ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=lt,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:R,Suspense:ht,SuspenseList:mt,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return L(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rt};const Ht=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>c,subscribe:e=>(n.add(e),()=>n.delete(e))},c=t=e(r,o,i);return i};var It=Symbol.for("immer-nothing"),Wt=Symbol.for("immer-draftable"),$t=Symbol.for("immer-state");function Vt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bt=Object.getPrototypeOf;function qt(e){return!!e&&!!e[$t]}function Jt(e){return!!e&&(Xt(e)||Array.isArray(e)||!!e[Wt]||!!e.constructor?.[Wt]||en(e)||tn(e))}var Kt=Object.prototype.constructor.toString();function Xt(e){if(!e||"object"!=typeof e)return!1;const t=Bt(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Kt}function Yt(e,t){0===Zt(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function Zt(e){const t=e[$t];return t?t.type_:Array.isArray(e)?1:en(e)?2:tn(e)?3:0}function Gt(e,t){return 2===Zt(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qt(e,t,n){const r=Zt(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function en(e){return e instanceof Map}function tn(e){return e instanceof Set}function nn(e){return e.copy_||e.base_}function rn(e,t){if(en(e))return new Map(e);if(tn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Xt(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[$t];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Bt(e),t)}{const t=Bt(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function on(e,t=!1){return un(e)||qt(e)||!Jt(e)||(Zt(e)>1&&Object.defineProperties(e,{set:{value:cn},add:{value:cn},clear:{value:cn},delete:{value:cn}}),Object.freeze(e),t&&Object.values(e).forEach((e=>on(e,!0)))),e}function cn(){Vt(2)}function un(e){return Object.isFrozen(e)}var ln,an={};function _n(e){const t=an[e];return t||Vt(0),t}function sn(){return ln}function fn(e,t){t&&(_n("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pn(e){dn(e),e.drafts_.forEach(vn),e.drafts_=null}function dn(e){e===ln&&(ln=e.parent_)}function hn(e){return ln={drafts_:[],parent_:ln,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(e){const t=e[$t];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function mn(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[$t].modified_&&(pn(t),Vt(4)),Jt(e)&&(e=yn(t,e),t.parent_||bn(t,e)),t.patches_&&_n("Patches").generateReplacementPatches_(n[$t].base_,e,t.patches_,t.inversePatches_)):e=yn(t,n,[]),pn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==It?e:void 0}function yn(e,t,n){if(un(t))return t;const r=t[$t];if(!r)return Yt(t,((o,i)=>gn(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return bn(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),Yt(o,((o,c)=>gn(e,r,t,o,c,n,i))),bn(e,t,!1),n&&e.patches_&&_n("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function gn(e,t,n,r,o,i,c){if(qt(o)){const c=yn(e,o,i&&t&&3!==t.type_&&!Gt(t.assigned_,r)?i.concat(r):void 0);if(Qt(n,r,c),!qt(c))return;e.canAutoFreeze_=!1}else c&&n.add(o);if(Jt(o)&&!un(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;yn(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(en(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||bn(e,o)}}function bn(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&on(t,n)}var wn={get(e,t){if(t===$t)return e;const n=nn(e);if(!Gt(n,t))return function(e,t,n){const r=Cn(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Jt(r)?r:r===Sn(e.base_,t)?(On(e),e.copy_[t]=xn(r,e)):r},has:(e,t)=>t in nn(e),ownKeys:e=>Reflect.ownKeys(nn(e)),set(e,t,n){const r=Cn(nn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Sn(nn(e),t),o=r?.[$t];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Gt(e.base_,t)))return!0;On(e),Pn(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Sn(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,On(e),Pn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=nn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Vt(11)},getPrototypeOf:e=>Bt(e.base_),setPrototypeOf(){Vt(12)}},kn={};function Sn(e,t){const n=e[$t];return(n?nn(n):e)[t]}function Cn(e,t){if(!(t in e))return;let n=Bt(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Bt(n)}}function Pn(e){e.modified_||(e.modified_=!0,e.parent_&&Pn(e.parent_))}function On(e){e.copy_||(e.copy_=rn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Yt(wn,((e,t)=>{kn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),kn.deleteProperty=function(e,t){return kn.set.call(this,e,t,void 0)},kn.set=function(e,t,n){return wn.set.call(this,e[0],t,n,e[0])};function xn(e,t){const n=en(e)?_n("MapSet").proxyMap_(e,t):tn(e)?_n("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:sn(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=wn;n&&(o=[r],i=kn);const{revoke:c,proxy:u}=Proxy.revocable(o,i);return r.draft_=u,r.revoke_=c,u}(e,t);return(t?t.scope_:sn()).drafts_.push(n),n}function Nn(e){if(!Jt(e)||un(e))return e;const t=e[$t];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rn(e,t.scope_.immer_.useStrictShallowCopy_)}else n=rn(e,!0);return Yt(n,((e,t)=>{Qt(n,e,Nn(t))})),t&&(t.finalized_=!1),n}var En=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Vt(6),void 0!==n&&"function"!=typeof n&&Vt(7),Jt(e)){const o=hn(this),i=xn(e,void 0);let c=!0;try{r=t(i),c=!1}finally{c?pn(o):dn(o)}return fn(o,n),mn(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===It&&(r=void 0),this.autoFreeze_&&on(r,!0),n){const t=[],o=[];_n("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Vt(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;const o=this.produce(e,t,((e,t)=>{n=e,r=t}));return[o,n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jt(e)||Vt(8),qt(e)&&(e=function(e){qt(e)||Vt(10);return Nn(e)}(e));const t=hn(this),n=xn(e,void 0);return n[$t].isManual_=!0,dn(t),n}finishDraft(e,t){const n=e&&e[$t];n&&n.isManual_||Vt(9);const{scope_:r}=n;return fn(r,t),mn(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=_n("Patches").applyPatches_;return qt(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},jn=En.produce;const An=e=>(t,n,r)=>(r.setState=(e,n,...r)=>{const o="function"==typeof e?jn(e):e;return t(o,n,...r)},e(r.setState,n,r));var Tn=function(e){return(t?Ht(t):Ht)(An((function(t){return r(r({},e),{update:function(e){return t(e)}})})));var t},Un=ue(null);const zn=e=>e;function Ln(e){return function(e,t=zn){const n=Ft.useSyncExternalStore(e.subscribe,Ft.useCallback((()=>t(e.getState())),[e,t]),Ft.useCallback((()=>t(e.getInitialState())),[e,t]));return Ft.useDebugValue(n),n}(We(Un).store,e)}function Dn(e){try{return e?JSON.parse(e):null}catch(e){return console.log("JSON parse error: ",e),null}}function Rn(e,t){var n=function(e,t){var n=this,o=t.request,l=t.enabled,a=u(ze({data:null,isLoading:!1}),2),_=a[0],s=a[1],f=Ln((function(e){return e.config.baseApiUrl}));Ln((function(e){return e.brandId}));var p=Ie((function(){return fetch("".concat(f).concat(e),r(r({},o),{headers:r({},null==o?void 0:o.headers)}))}),[]);return De((function(){!1!==l&&i(n,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return s((function(e){return r(r({},e),{isLoading:!0})})),[4,p()];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),s((function(t){return r(r({},t),{data:e.data,isLoading:!1})})),[2]}}))}))}),[p,l]),_}("/listings/".concat(e),{enabled:!!e});return r(r({},n),{listing:!e&&t?Dn(t):n.data})}function Mn(e){return ge("div",{draggable:!1,className:"rechat-component loading-skeleton",style:e})}function Fn(){return ge("div",{className:"rechat-component listing-card listing-card--skeleton",children:[ge("div",{className:"listing-card__image",children:ge(Mn,{width:"100%",height:250})}),ge("div",{className:"listing-card__properties",children:[ge("div",{className:"listing-card__price",children:ge(Mn,{width:"40%",height:20})}),ge("div",{className:"listing-card__address",children:ge(Mn,{width:"60%",height:20})}),ge("div",{className:"listing-card__attributes",children:ge(Mn,{width:"70%",height:20})})]})]})}function Hn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function In(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hn(e))&&(r&&(r+=" "),r+=t);return r}function Wn(e,t,n){var r=u(ze(null!=e?e:t),2),o=r[0],i=r[1],c=Me(void 0!==e),l=void 0!==e;De((function(){var e=c.current;e!==l&&console.warn("WARN: A component changed from ".concat(e?"controlled":"uncontrolled"," to ").concat(l?"controlled":"uncontrolled",".")),c.current=l}),[l]);var a=l?e:o,_=Ie((function(e){var t=function(e){n&&(Object.is(a,e)||n(e)),l||(a=e)};if("function"==typeof e){i((function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=e.apply(void 0,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([l?a:n],u(r),!1));return t(i),l?n:i}))}else l||i(e),t(e)}),[l,a,n]);return[a,_]}function $n(e){var t,n=e.el,o=e.trigger,i=e.classes,c=e.open,l=e.children,a=u(Wn(c,!1,e.onOpenChange),2),_=a[0],s=a[1],f=u(ze({top:0,left:0}),2),p=f[0],d=f[1],h=Me(null),v=Me(null),m=null!=n?n:h;return De((function(){if(_&&m.current){var e=m.current.getBoundingClientRect();d({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX})}}),[_]),De((function(){function e(e){var t;!v.current||v.current.contains(e.target)||(null===(t=m.current)||void 0===t?void 0:t.contains(e.target))||s(!1)}return _&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[_]),ge(R,{children:[!n&&ge("div",{className:In(null==i?void 0:i.trigger,"rechat-component","rechat-popover__trigger",r({"rechat-popover__trigger--open":_},(null==i?void 0:i.trigger)?(t={},t["".concat(null==i?void 0:i.trigger,"--open")]=_,t):{})),ref:h,onClick:function(){return s((function(e){return!e}))},children:o}),_&&wt(ge("div",{ref:v,className:In(null==i?void 0:i.content,"rechat-component","rechat-popover__content"),style:{top:p.top,left:p.left},children:l}),document.body)]})}function Vn(e){var t=e.title,n=e.children;return ge($n,{classes:{trigger:"listing-filter__dropdown_trigger",content:"listing-filter__dropdown_content"},trigger:ge("div",{className:"rechat-component",children:t}),children:ge("div",{className:"rechat-component",children:n})})}function Bn(){return ge(Vn,{title:"Baths",children:ge("div",{children:"+"})})}function qn(){return ge(Vn,{title:"Beds",children:ge("div",{children:"+"})})}function Jn(){return ge(Vn,{title:"More filters",children:ge("div",{children:"+"})})}function Kn(){return ge(Vn,{title:"Price",children:ge("div",{children:"+"})})}function Xn(e){return"var(--rechat-theme-space-".concat(e,")")}function Yn(e){var t=e.children;return ge("div",{style:o(e,["children"]),children:t})}function Zn(e){var t=e.children,n=o(e,["children"]);return ge(Yn,r({display:"flex"},n,{children:t}))}function Gn(e){var t=u(Wn(e.defaultChecked,!1,e.onCheckedChange),2),n=t[0],r=t[1];return ge("label",{className:"rechat-component rechat-switch-button",children:[ge("input",{type:"checkbox",checked:n,onChange:function(e){r(e.target.checked)}}),ge("span",{className:"rechat-switch-button__slider"})]})}function Qn(e){var t=e.children,n=e.as,r=void 0===n?"p":n,o=e.size,i=void 0===o?"2":o,c=e.color,u=void 0===c?"primary":c,l=e.weight,a=void 0===l?"regular":l;return ge(R,{children:L(r,{style:{fontSize:"var(--rechat-theme-font-size-".concat(i,")"),color:"var(--rechat-theme-text-".concat(u,")"),fontWeight:"var(--rechat-theme-font-weight-".concat(a,")")},children:t})})}function er(){return ge(Vn,{title:"Property type",children:ge(Zn,{flexDirection:"column",gap:Xn(5),padding:Xn(2),children:[ge(Qn,{size:"3",weight:"bold",children:"Property Type"}),ge(Zn,{flexDirection:"column",gap:Xn(3),children:[ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"All Listings"}),ge(Gn,{})]}),ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"Residential"}),ge(Gn,{})]}),ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"Lease"}),ge(Gn,{})]}),ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"Commercial"}),ge(Gn,{})]}),ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"Lots & Acreage"}),ge(Gn,{})]}),ge(Zn,{alignItems:"center",justifyContent:"space-between",children:[ge(Qn,{size:"3",children:"Multi-Family"}),ge(Gn,{})]})]})]})})}function tr(e){var t=e.className,n=e.variant,i=void 0===n?"solid":n,c=e.color,u=void 0===c?"accent":c,l=o(e,["className","variant","color"]);return ge("button",r({className:In("rechat-component","rechat-button",t,"variant-".concat(i),"color-".concat(u))},l))}function nr(){return ge(tr,{color:"accent",variant:"ghost",children:"Reset"})}function rr(e){var t=e.className,n=e.rounded,i=void 0!==n&&n,c=o(e,["className","rounded"]);return ge("input",r({className:In("rechat-component","rechat-text-field",t,{rounded:i})},c))}function or(){return ge(rr,{rounded:!0,placeholder:"Search by city...",onChange:function(e){console.log(e.target.value)}})}return _e((function(e){var t,n,r=e.id,o=e.skeleton,i=Rn(r,e.listing),c=i.listing,u=i.isLoading;return"true"===(n=o)||""===n||u?ge(Fn,{}):ge("div",{className:"rechat-component listing-card",children:c&&ge(R,{children:[ge("img",{draggable:!1,src:null===(t=c.gallery_image_urls)||void 0===t?void 0:t[0],height:"auto",className:"listing-card__image"}),ge("div",{className:"listing-card__badges-container",children:[ge("div",{className:"listing-card__badge",children:c.status}),ge("div",{className:"listing-card__badge",children:[c.mls_display_name," ",c.mls_number]})]}),ge("div",{className:"listing-card__properties",children:[ge("div",{className:"listing-card__price",children:c.formatted.price.text}),ge("div",{className:"listing-card__address",children:c.formatted.full_address.text}),ge("div",{className:"listing-card__attributes",children:[c.formatted.bedroom_count.text,c.formatted.total_bathroom_count.text,c.formatted.square_feet.text].filter(Boolean).join(", ")})]})]})})}),"rechat-listing-card",[],{shadow:!1}),_e((function(){return ge("div",{class:"rechat-component listing-filter__container",children:[ge(or,{}),ge(er,{}),ge(Kn,{}),ge(qn,{}),ge(Bn,{}),ge(Jn,{}),ge(nr,{})]})}),"rechat-listing-filters",[],{shadow:!1}),_e((function(e){var t=e.brand_id,n=e.api_url,r=e.children;return ge(Un.Provider,{value:{store:Me(Tn({brandId:t,config:{baseApiUrl:null!=n?n:"https://api.rechat.com"}})).current},children:r})}),"rechat-root",[],{shadow:!0,mode:"closed"}),e.Sdk=N,e}({});
@@ -0,0 +1,4 @@
1
+ export * from './sdk/types';
2
+ export { LeadCapture } from './sdk/LeadCapture';
3
+ export { LeadTracker } from './sdk/LeadTracker';
4
+ export { Sdk } from './sdk';
@@ -1 +1 @@
1
- var e=function(t,n){return e=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,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=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},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var a,c={};var u=o(function(){if(a)return c;a=1,Object.defineProperty(c,"__esModule",{value:!0}),c.parse=function(e,t){const n=new o,r=e.length;if(r<2)return n;const i=t?.decode||l;let a=0;do{const t=e.indexOf("=",a);if(-1===t)break;const o=e.indexOf(";",a),c=-1===o?r:o;if(t>c){a=e.lastIndexOf(";",t-1)+1;continue}const l=u(e,a,t),p=s(e,t,l),f=e.slice(l,p);if(void 0===n[f]){let r=u(e,t+1,c),o=s(e,c,r);const a=i(e.slice(r,o));n[f]=a}a=c+1}while(a<r);return n},c.serialize=function(o,a,c){const u=c?.encode||encodeURIComponent;if(!e.test(o))throw new TypeError(`argument name is invalid: ${o}`);const s=u(a);if(!t.test(s))throw new TypeError(`argument val is invalid: ${a}`);let l=o+"="+s;if(!c)return l;if(void 0!==c.maxAge){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);l+="; Max-Age="+c.maxAge}if(c.domain){if(!n.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);l+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);l+="; Path="+c.path}if(c.expires){if(!function(e){return"[object Date]"===i.call(e)}(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);l+="; Expires="+c.expires.toUTCString()}c.httpOnly&&(l+="; HttpOnly");c.secure&&(l+="; Secure");c.partitioned&&(l+="; Partitioned");if(c.priority){switch("string"==typeof c.priority?c.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}}if(c.sameSite){switch("string"==typeof c.sameSite?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}}return l};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function u(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function s(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function l(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}return c}()),s=function(){function e(e){this.settings=e}return Object.defineProperty(e.prototype,"ApiUrl",{get:function(){var e;return null!==(e=this.settings.api_url)&&void 0!==e?e:"https://".concat(this.settings.sandbox?"boer.":"","api.rechat.com")},enumerable:!1,configurable:!0}),e}(),l=function(e){function n(t){return e.call(this,t)||this}return t(n,e),n.prototype.identify=function(e){var t,n;document.cookie=u.serialize(this.CookieName,e,null===(n=null===(t=this.TrackerSettings)||void 0===t?void 0:t.cookie)||void 0===n?void 0:n.options)},n.prototype.capture=function(e){var t=this;return new Promise((function(n,r){var i=t.leadTrackingId;if(i)if(e.listing_id||e.mlsid){var o={action:"ContactViewedListing",object_class:"listing"};e.mlsid?o.object_sa={mls_number:e.mlsid}:e.listing_id&&(o.object=e.listing_id),fetch("".concat(t.ApiUrl,"/leads/").concat(i,"/timeline"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}).then((function(e){return e.ok?n():r(e)})).catch(r)}else r("Neither listing_id nor mlsid is provided in the data");else r("No tracking id is found")}))},n.prototype.stop=function(){document.cookie="".concat(this.CookieName,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},Object.defineProperty(n.prototype,"CookieName",{get:function(){var e,t,n;return null!==(n=null===(t=null===(e=this.TrackerSettings)||void 0===e?void 0:e.cookie)||void 0===t?void 0:t.name)&&void 0!==n?n:"rechat-sdk-tracker"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"TrackerSettings",{get:function(){return this.settings.tracker},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadTrackingId",{get:function(){var e;return null!==(e=u.parse(document.cookie)[this.CookieName])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),n}(s),p=function(e){function o(t){var n=e.call(this,t)||this;return n._tracker=new l(t),n}return t(o,e),Object.defineProperty(o.prototype,"Tracker",{get:function(){return this._tracker},enumerable:!1,configurable:!0}),o.prototype.getLeadMetaDataFromUrl=function(){var e=new URLSearchParams(window.location.search);return["user_id","brand_id","ad_campaign_id","email_campaign_id","email_campaign_email_id"].reduce((function(t,r){var i,o;return n(n({},t),((i={})[r]=null!==(o=e.get("rechat_".concat(r)))&&void 0!==o?o:"",i))}),{})},o.prototype.capture=function(e,t){return r(this,void 0,void 0,(function(){var r=this;return i(this,(function(i){return[2,new Promise((function(i,o){fetch("".concat(r.ApiUrl,"/leads"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lead:t,metadata:n(n({},r.getLeadMetaDataFromUrl()),e)})}).then((function(e){e.ok?e.json().then((function(e){var t=e.data;!1!==r.settings.tracker&&r._tracker.identify(t.id),i(t)})):o(e)})).catch(o)}))]}))}))},o.prototype.form=function(e,t,r){var i=this;e.addEventListener("submit",(function(o){var a;o.preventDefault();var c=Object.values(e).reduce((function(e,t){var r;return t.name?n(n({},e),((r={})[t.name]=t.value,r)):e}),{});!1!==(null===(a=r.validate)||void 0===a?void 0:a.call(r,c))&&i.capture(t,c).then(r.onSuccess).catch(r.onError)}))},o}(s),f=function(){function e(e){void 0===e&&(e={}),this._settings=e,this._leads=new p(e)}return Object.defineProperty(e.prototype,"Leads",{get:function(){return this._leads},enumerable:!1,configurable:!0}),e}();export{p as LeadCapture,l as LeadTracker,f as Sdk};
1
+ var e=function(t,n){return e=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,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=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},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var a,c={};var u=o(function(){if(a)return c;a=1,Object.defineProperty(c,"__esModule",{value:!0}),c.parse=function(e,t){const n=new o,r=e.length;if(r<2)return n;const i=t?.decode||l;let a=0;do{const t=e.indexOf("=",a);if(-1===t)break;const o=e.indexOf(";",a),c=-1===o?r:o;if(t>c){a=e.lastIndexOf(";",t-1)+1;continue}const l=u(e,a,t),p=s(e,t,l),f=e.slice(l,p);if(void 0===n[f]){let r=u(e,t+1,c),o=s(e,c,r);const a=i(e.slice(r,o));n[f]=a}a=c+1}while(a<r);return n},c.serialize=function(o,a,c){const u=c?.encode||encodeURIComponent;if(!e.test(o))throw new TypeError(`argument name is invalid: ${o}`);const s=u(a);if(!t.test(s))throw new TypeError(`argument val is invalid: ${a}`);let l=o+"="+s;if(!c)return l;if(void 0!==c.maxAge){if(!Number.isInteger(c.maxAge))throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);l+="; Max-Age="+c.maxAge}if(c.domain){if(!n.test(c.domain))throw new TypeError(`option domain is invalid: ${c.domain}`);l+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError(`option path is invalid: ${c.path}`);l+="; Path="+c.path}if(c.expires){if(!function(e){return"[object Date]"===i.call(e)}(c.expires)||!Number.isFinite(c.expires.valueOf()))throw new TypeError(`option expires is invalid: ${c.expires}`);l+="; Expires="+c.expires.toUTCString()}c.httpOnly&&(l+="; HttpOnly");c.secure&&(l+="; Secure");c.partitioned&&(l+="; Partitioned");if(c.priority){switch("string"==typeof c.priority?c.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${c.priority}`)}}if(c.sameSite){switch("string"==typeof c.sameSite?c.sameSite.toLowerCase():c.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${c.sameSite}`)}}return l};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function u(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function s(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function l(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}return c}()),s=function(){function e(e){this.settings=e}return Object.defineProperty(e.prototype,"ApiUrl",{get:function(){var e;return null!==(e=this.settings.api_url)&&void 0!==e?e:"https://".concat(this.settings.sandbox?"boer.":"","api.rechat.com")},enumerable:!1,configurable:!0}),e}(),l=function(e){function n(t){return e.call(this,t)||this}return t(n,e),n.prototype.identify=function(e){var t,n;document.cookie=u.serialize(this.CookieName,e,null===(n=null===(t=this.TrackerSettings)||void 0===t?void 0:t.cookie)||void 0===n?void 0:n.options)},n.prototype.capture=function(e){var t=this;return new Promise((function(n,r){var i=t.leadTrackingId;if(i)if(e.listing_id||e.mlsid){var o={action:"ContactViewedListing",object_class:"listing"};e.mlsid?o.object_sa={mls_number:e.mlsid}:e.listing_id&&(o.object=e.listing_id),fetch("".concat(t.ApiUrl,"/leads/").concat(i,"/timeline"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}).then((function(e){return e.ok?n():r(e)})).catch(r)}else r("Neither listing_id nor mlsid is provided in the data");else r("No tracking id is found")}))},n.prototype.stop=function(){document.cookie="".concat(this.CookieName,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},Object.defineProperty(n.prototype,"CookieName",{get:function(){var e,t,n;return null!==(n=null===(t=null===(e=this.TrackerSettings)||void 0===e?void 0:e.cookie)||void 0===t?void 0:t.name)&&void 0!==n?n:"rechat-sdk-tracker"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"TrackerSettings",{get:function(){return this.settings.tracker},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadTrackingId",{get:function(){var e;return null!==(e=u.parse(document.cookie)[this.CookieName])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),n}(s),p=function(e){function o(t){var n=e.call(this,t)||this;return n._tracker=new l(t),n}return t(o,e),Object.defineProperty(o.prototype,"Tracker",{get:function(){return this._tracker},enumerable:!1,configurable:!0}),o.prototype.getLeadMetaDataFromUrl=function(){var e=new URLSearchParams(window.location.search);return["user_id","brand_id","ad_campaign_id","email_campaign_id","email_campaign_email_id"].reduce((function(t,r){var i,o;return n(n({},t),((i={})[r]=null!==(o=e.get("rechat_".concat(r)))&&void 0!==o?o:"",i))}),{})},o.prototype.capture=function(e,t){return r(this,void 0,void 0,(function(){var r=this;return i(this,(function(i){return[2,new Promise((function(i,o){fetch("".concat(r.ApiUrl,"/leads"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lead:t,metadata:n(n({},r.getLeadMetaDataFromUrl()),e)})}).then((function(e){e.ok?e.json().then((function(e){var t=e.data;!1!==r.settings.tracker&&r._tracker.identify(t.id),i(t)})):o(e)})).catch(o)}))]}))}))},o.prototype.form=function(e,t,r){var i=this;e.addEventListener("submit",(function(o){var a;o.preventDefault();var c=Object.values(e).reduce((function(e,t){var r;return t.name?n(n({},e),((r={})[t.name]=t.value,r)):e}),{});!1!==(null===(a=r.validate)||void 0===a?void 0:a.call(r,c))&&i.capture(t,c).then(r.onSuccess).catch(r.onError)}))},o}(s),f=function(){function e(e){void 0===e&&(e={}),this._settings=e,this._leads=new p(e)}return Object.defineProperty(e.prototype,"Leads",{get:function(){return this._leads},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Settings",{get:function(){return this._settings},enumerable:!1,configurable:!0}),e}();export{p as LeadCapture,l as LeadTracker,f as Sdk};
@@ -1,5 +1,5 @@
1
1
  import { ISdkSettings } from './types';
2
- export declare abstract class SdkBase {
2
+ export declare abstract class LeadBase {
3
3
  protected settings: ISdkSettings;
4
4
  constructor(settings: ISdkSettings);
5
5
  protected get ApiUrl(): string;
@@ -1,7 +1,7 @@
1
1
  import { LeadTracker } from './LeadTracker';
2
- import { SdkBase } from './SdkBase';
2
+ import { LeadBase } from './LeadBase';
3
3
  import type { IFormEvents, ILeadMetaData, ILeadInput, ISdkSettings, ILeadCaptureResponse } from './types';
4
- export declare class LeadCapture extends SdkBase {
4
+ export declare class LeadCapture extends LeadBase {
5
5
  private _tracker;
6
6
  constructor(settings: ISdkSettings);
7
7
  get Tracker(): LeadTracker;
@@ -1,7 +1,7 @@
1
- import { SdkBase } from './SdkBase';
1
+ import { LeadBase } from './LeadBase';
2
2
  import { ISdkSettings } from './types';
3
3
  import { ITrackPayload } from './types/lead-tracker';
4
- export declare class LeadTracker extends SdkBase {
4
+ export declare class LeadTracker extends LeadBase {
5
5
  constructor(settings: ISdkSettings);
6
6
  identify(id: string): void;
7
7
  capture(data: ITrackPayload): Promise<void>;
@@ -1,8 +1,9 @@
1
1
  import { LeadCapture } from './LeadCapture';
2
2
  import { ISdkSettings } from './types';
3
3
  export declare class Sdk {
4
- private _settings;
4
+ protected _settings: ISdkSettings;
5
5
  private _leads;
6
6
  constructor(settings?: ISdkSettings);
7
7
  get Leads(): LeadCapture;
8
+ get Settings(): ISdkSettings;
8
9
  }
@@ -0,0 +1,5 @@
1
+ export * from '.';
2
+ export * from './types';
3
+ export * from './LeadBase';
4
+ export * from './LeadCapture';
5
+ export * from './LeadTracker';
@@ -1,11 +1,20 @@
1
+ export interface ILeadMetaDataAssignee {
2
+ email?: string;
3
+ phone_number?: string;
4
+ first_name?: string;
5
+ last_name?: string;
6
+ mlsid?: string;
7
+ mls?: string;
8
+ }
1
9
  export interface ILeadMetaData {
2
10
  lead_channel?: string;
11
+ assignees?: ILeadMetaDataAssignee[];
3
12
  user_id?: string;
4
13
  brand_id?: string;
5
- agent_emails?: string[];
6
14
  email_campaign_id?: string;
7
15
  email_campaign_email_id?: string;
8
16
  ad_campaign_id?: string;
17
+ agent_emails?: string[];
9
18
  }
10
19
  export interface ILeadInput {
11
20
  first_name?: string;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@rechat/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
- "main": "index.js",
6
5
  "scripts": {
7
- "clean:sdk": "rimraf umd && rimraf esm",
6
+ "clean:sdk": "rimraf esm && rimraf dist",
8
7
  "clean:docs": "rimraf api",
9
8
  "build:docs": "npm run clean:docs && typedoc --readme README.md && npm run docs:examples",
10
9
  "build:sdk": "npm run clean:sdk && rollup --config --bundleConfigAsCjs",
11
- "docs:examples": "cp -r ./public/examples ./api"
10
+ "docs:examples": "cp -r ./public/examples ./api",
11
+ "webcomponents:stories": "vite --config ./src/webcomponents/stories/vite.config.ts"
12
12
  },
13
13
  "keywords": [],
14
14
  "author": "Rechat INC.",
@@ -20,30 +20,43 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@eslint/eslintrc": "^3.3.1",
23
- "@eslint/js": "^9.24.0",
23
+ "@eslint/js": "^9.34.0",
24
24
  "@jsdevtools/npm-publish": "^3.1.1",
25
- "@rollup/plugin-commonjs": "^28.0.3",
25
+ "@preact/preset-vite": "^2.10.2",
26
+ "@rollup/plugin-alias": "^5.1.1",
27
+ "@rollup/plugin-commonjs": "^28.0.6",
26
28
  "@rollup/plugin-node-resolve": "^16.0.1",
29
+ "@rollup/plugin-replace": "^6.0.2",
27
30
  "@rollup/plugin-terser": "^0.4.4",
28
- "@rollup/plugin-typescript": "^12.1.2",
29
- "@typescript-eslint/eslint-plugin": "^8.30.1",
30
- "@typescript-eslint/parser": "^8.30.1",
31
- "eslint": "^9.24.0",
32
- "eslint-config-prettier": "^10.1.2",
33
- "eslint-plugin-prettier": "^5.2.6",
31
+ "@rollup/plugin-typescript": "^12.1.4",
32
+ "@types/preact-custom-element": "^4.0.4",
33
+ "@types/react": "^19.1.12",
34
+ "@typescript-eslint/eslint-plugin": "^8.42.0",
35
+ "@typescript-eslint/parser": "^8.42.0",
36
+ "clsx": "^2.1.1",
37
+ "eslint": "^9.34.0",
38
+ "eslint-config-prettier": "^10.1.8",
39
+ "eslint-plugin-prettier": "^5.5.4",
34
40
  "eslint-plugin-tsdoc": "^0.4.0",
35
- "globals": "^16.0.0",
36
- "prettier": "^3.5.3",
41
+ "globals": "^16.3.0",
42
+ "immer": "^10.1.3",
43
+ "preact": "^10.27.1",
44
+ "preact-custom-element": "^4.4.0",
45
+ "prettier": "^3.6.2",
37
46
  "rimraf": "^6.0.1",
38
- "rollup": "^4.40.0",
47
+ "rollup": "^4.50.0",
48
+ "rollup-plugin-scss": "^4.0.1",
49
+ "sass-embedded": "^1.92.0",
39
50
  "tslib": "^2.8.1",
40
- "typedoc": "^0.28.2",
51
+ "typedoc": "^0.28.12",
41
52
  "typedoc-material-theme": "^1.4.0",
42
- "typescript": "^5.8.3"
53
+ "typescript": "^5.9.2",
54
+ "vite": "^7.1.4",
55
+ "zustand": "^5.0.8"
43
56
  },
44
57
  "type": "module",
45
- "typings": "esm/index.all.d.ts",
46
- "module": "esm/index.all.js",
58
+ "typings": "esm/index.esm.d.ts",
59
+ "module": "esm/index.esm.js",
47
60
  "unpkg": "dist/rechat.min.js",
48
61
  "sideEffects": false,
49
62
  "files": [
@@ -1,4 +0,0 @@
1
- export * from './types';
2
- export { LeadCapture } from './LeadCapture';
3
- export { LeadTracker } from './LeadTracker';
4
- export { Sdk } from '.';
File without changes
File without changes
File without changes