@htmlbricks/hb-form-contact 0.66.2 → 0.66.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(function(wt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const jn=1,Pn=2,$t="[",Et="[!",Tt="[?",Nt="]",Se={},x=Symbol(),St="http://www.w3.org/1999/xhtml",In=!1;var Fn=Array.isArray,qn=Array.prototype.indexOf,me=Array.prototype.includes,Yn=Array.from,je=Object.keys,Pe=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,Hn=Object.getOwnPropertyDescriptors,Bn=Object.prototype,Vn=Array.prototype,xt=Object.getPrototypeOf,kt=Object.isExtensible;const Un=()=>{};function Wn(e){for(var t=0;t<e.length;t++)e[t]()}function At(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const N=2,be=4,Ie=8,Rt=1<<24,ee=16,B=32,te=64,Xe=128,L=512,T=1024,k=2048,V=4096,U=8192,q=16384,ne=32768,Ct=1<<25,we=65536,Ot=1<<17,zn=1<<18,ce=1<<19,Gn=1<<20,he=65536,Ze=1<<21,Qe=1<<22,re=1<<23,et=Symbol("$state"),Jn=Symbol("legacy props"),Kn=Symbol(""),G=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Xn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tt=3,Fe=8;function Zn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function er(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function nr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function ir(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function lr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ar(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function nt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let $=!1;function ie(e){$=e}let b;function J(e){if(e===null)throw nt(),Se;return b=e}function rt(){return J(oe(b))}function fr(e=1){if($){for(var t=e,n=b;t--;)n=oe(n);b=n}}function Mt(e=!0){for(var t=0,n=b;;){if(n.nodeType===Fe){var r=n.data;if(r===Nt){if(t===0)return n;t-=1}else(r===$t||r===Et||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=oe(n);e&&n.remove(),n=i}}function ur(e){if(!e||e.nodeType!==Fe)throw nt(),Se;return e.data}function Dt(e){return e===this.v}function cr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function hr(e){return!cr(e,this.v)}let dr=!1,j=null;function $e(e){j=e}function Lt(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:g,l:null}}function jt(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)ln(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function Pt(){return!0}let de=[];function It(){var e=de;de=[],Wn(e)}function ve(e){if(de.length===0&&!xe){var t=de;queueMicrotask(()=>{t===de&&It()})}de.push(e)}function vr(){for(;de.length>0;)It()}function Ft(e){var t=g;if(t===null)return p.f|=re,e;if((t.f&ne)===0&&(t.f&be)===0)throw e;se(e,t)}function se(e,t){for(;t!==null;){if((t.f&Xe)!==0){if((t.f&ne)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const _r=-7169;function E(e,t){e.f=e.f&_r|t}function it(e){(e.f&L)!==0||e.deps===null?E(e,T):E(e,V)}function qt(e){if(e!==null)for(const t of e)(t.f&N)===0||(t.f&he)===0||(t.f^=he,qt(t.deps))}function Yt(e,t,n){(e.f&k)!==0?t.add(e):(e.f&V)!==0&&n.add(e),qt(e.deps),E(e,T)}const le=new Set;let y=null,Y=null,st=null,xe=!1,lt=!1,Ee=null,qe=null;var Ht=0;let pr=1;class K{id=pr++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#l=new Set;#a=new Set;#o=new Map;is_fork=!1;#c=!1;#f=new Set;#h(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#f)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#o.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#o.has(t)||this.#o.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#o.get(t);if(n){this.#o.delete(t);for(var r of n.d)E(r,k),this.schedule(r);for(r of n.m)E(r,V),this.schedule(r)}}#d(){if(Ht++>1e3&&(le.delete(this),gr()),!this.#h()){for(const l of this.#l)this.#a.delete(l),E(l,k),this.schedule(l);for(const l of this.#a)E(l,V),this.schedule(l)}const t=this.#r;this.#r=[],this.apply();var n=Ee=[],r=[],i=qe=[];for(const l of t)try{this.#u(l,n,r)}catch(o){throw zt(l),o}if(y=null,i.length>0){var s=K.ensure();for(const l of i)s.schedule(l)}if(Ee=null,qe=null,this.#h()||this.#v()){this.#_(r),this.#_(n);for(const[l,o]of this.#o)Wt(l,o)}else{this.#t.size===0&&le.delete(this),this.#l.clear(),this.#a.clear();for(const l of this.#e)l(this);this.#e.clear(),Bt(r),Bt(n),this.#s?.resolve()}var a=y;if(this.#r.length>0){const l=a??=this;l.#r.push(...this.#r.filter(o=>!l.#r.includes(o)))}a!==null&&(le.add(a),a.#d()),le.has(this)||this.#p()}#u(t,n,r){t.f^=T;for(var i=t.first;i!==null;){var s=i.f,a=(s&(B|te))!==0,l=a&&(s&T)!==0,o=l||(s&U)!==0||this.#o.has(i);if(!o&&i.fn!==null){a?i.f^=T:(s&be)!==0?n.push(i):Me(i)&&((s&ee)!==0&&this.#a.add(i),Ne(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#_(t){for(var n=0;n<t.length;n+=1)Yt(t[n],this.#l,this.#a)}capture(t,n,r=!1){n!==x&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&re)===0&&(this.current.set(t,[t.v,r]),Y?.set(t,t.v))}activate(){y=this}deactivate(){y=null,Y=null}flush(){try{lt=!0,y=this,this.#d()}finally{Ht=0,st=null,Ee=null,qe=null,lt=!1,y=null,Y=null,ae.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),le.delete(this)}#p(){for(const f of le){var t=f.id<this.id,n=[];for(const[u,[d,c]]of this.current){if(f.current.has(u)){var r=f.current.get(u)[0];if(t&&d!==r)f.current.set(u,[d,c]);else continue}n.push(u)}var i=[...f.current.keys()].filter(u=>!this.current.has(u));if(i.length===0)t&&f.discard();else if(n.length>0){f.activate();var s=new Set,a=new Map;for(var l of n)Vt(l,i,s,a);if(f.#r.length>0){f.apply();for(var o of f.#r)f.#u(o,[],[]);f.#r=[]}f.deactivate()}}for(const f of le)f.#f.has(this)&&(f.#f.delete(this),f.#f.size===0&&!f.#h()&&(f.activate(),f.#d()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,ve(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#l.add(r);for(const r of n)this.#a.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=At()).promise}static ensure(){if(y===null){const t=y=new K;lt||(le.add(y),xe||ve(()=>{y===t&&t.flush()}))}return y}apply(){{Y=null;return}}schedule(t){if(st=t,t.b?.is_pending&&(t.f&(be|Ie|Rt))!==0&&(t.f&ne)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Ee!==null&&n===g&&(p===null||(p.f&N)===0))return;if((r&(te|B))!==0){if((r&T)===0)return;n.f^=T}}this.#r.push(n)}}function ke(e){var t=xe;xe=!0;try{for(var n;;){if(vr(),y===null)return n;y.flush()}}finally{xe=t}}function gr(){try{nr()}catch(e){se(e,st)}}let X=null;function Bt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(q|U))===0&&Me(r)&&(X=new Set,Ne(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&cn(r),X?.size>0)){ae.clear();for(const i of X){if((i.f&(q|U))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)X.has(a)&&(X.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const o=s[l];(o.f&(q|U))===0&&Ne(o)}}X.clear()}}X=null}}function Vt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&N)!==0?Vt(i,t,n,r):(s&(Qe|ee))!==0&&(s&k)===0&&Ut(i,t,r)&&(E(i,k),at(i))}}function Ut(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(me.call(t,i))return!0;if((i.f&N)!==0&&Ut(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function at(e){y.schedule(e)}function Wt(e,t){if(!((e.f&B)!==0&&(e.f&T)!==0)){(e.f&k)!==0?t.d.push(e):(e.f&V)!==0&&t.m.push(e),E(e,T);for(var n=e.first;n!==null;)Wt(n,t),n=n.next}}function zt(e){E(e,T);for(var t=e.first;t!==null;)zt(t),t=t.next}function mr(e){let t=0,n=Ae(0),r;return()=>{vt()&&(A(n),an(()=>(t===0&&(r=zr(()=>e(()=>Re(n)))),t+=1,()=>{ve(()=>{t-=1,t===0&&(r?.(),r=void 0,Re(n))})})))}}var yr=we|ce;function br(e,t,n,r){new wr(e,t,n,r)}class wr{parent;is_pending=!1;transform_error;#e;#n=$?b:null;#t;#i;#s;#r=null;#l=null;#a=null;#o=null;#c=0;#f=0;#h=!1;#v=new Set;#d=new Set;#u=null;#_=mr(()=>(this.#u=Ae(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var a=g;a.b=this,a.f|=Xe,r(s)},this.parent=g.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=fn(()=>{if($){const s=this.#n;rt();const a=s.data===Et;if(s.data.startsWith(Tt)){const o=JSON.parse(s.data.slice(Tt.length));this.#w(o)}else a?this.#$():this.#p()}else this.#y()},yr),$&&(this.#e=b)}#p(){try{this.#r=Q(()=>this.#i(this.#e))}catch(t){this.error(t)}}#w(t){const n=this.#t.failed;n&&(this.#a=Q(()=>{n(this.#e,()=>t,()=>()=>{})}))}#$(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#l=Q(()=>t(this.#e)),ve(()=>{var n=this.#o=document.createDocumentFragment(),r=Te();n.append(r),this.#r=this.#m(()=>Q(()=>this.#i(r))),this.#f===0&&(this.#e.before(n),this.#o=null,Oe(this.#l,()=>{this.#l=null}),this.#g(y))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#r=Q(()=>{this.#i(this.#e)}),this.#f>0){var t=this.#o=document.createDocumentFragment();vn(this.#r,t);const n=this.#t.pending;this.#l=Q(()=>n(this.#e))}else this.#g(y)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#d)}defer_effect(t){Yt(t,this.#v,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=g,r=p,i=j;P(this.#s),C(this.#s),$e(this.#s.ctx);try{return K.ensure(),t()}catch(s){return Ft(s),null}finally{P(n),C(r),$e(i)}}#b(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t,n);return}this.#f+=t,this.#f===0&&(this.#g(n),this.#l&&Oe(this.#l,()=>{this.#l=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t,n){this.#b(t,n),this.#c+=t,!(!this.#u||this.#h)&&(this.#h=!0,ve(()=>{this.#h=!1,this.#u&&He(this.#u,this.#c)}))}get_effect_pending(){return this.#_(),A(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(R(this.#r),this.#r=null),this.#l&&(R(this.#l),this.#l=null),this.#a&&(R(this.#a),this.#a=null),$&&(J(this.#n),fr(),J(Mt()));var i=!1,s=!1;const a=()=>{if(i){or();return}i=!0,s&&ar(),this.#a!==null&&Oe(this.#a,()=>{this.#a=null}),this.#m(()=>{this.#y()})},l=o=>{try{s=!0,n?.(o,a),s=!1}catch(f){se(f,this.#s&&this.#s.parent)}r&&(this.#a=this.#m(()=>{try{return Q(()=>{var f=g;f.b=this,f.f|=Xe,r(this.#e,()=>o,()=>a)})}catch(f){return se(f,this.#s.parent),null}}))};ve(()=>{var o;try{o=this.transform_error(t)}catch(f){se(f,this.#s&&this.#s.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(l,f=>se(f,this.#s&&this.#s.parent)):l(o)})}}function $r(e,t,n,r){const i=ot;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var a=g,l=Er(),o=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function f(c){l();try{r(c)}catch(_){(a.f&q)===0&&se(_,a)}Ye()}if(n.length===0){o.then(()=>f(t.map(i)));return}var u=Gt();function d(){Promise.all(n.map(c=>Tr(c))).then(c=>f([...t.map(i),...c])).catch(c=>se(c,a)).finally(()=>u())}o?o.then(()=>{l(),d(),Ye()}):d()}function Er(){var e=g,t=p,n=j,r=y;return function(s=!0){P(e),C(t),$e(n),s&&(e.f&q)===0&&(r?.activate(),r?.apply())}}function Ye(e=!0){P(null),C(null),$e(null),e&&y?.deactivate()}function Gt(){var e=g,t=e.b,n=y,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function ot(e){var t=N|k,n=p!==null&&(p.f&N)!==0?p:null;return g!==null&&(g.f|=ce),{ctx:j,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:x,wv:0,parent:n??g,ac:null}}function Tr(e,t,n){let r=g;r===null&&Zn();var i=void 0,s=Ae(x),a=!p,l=new Map;return Yr(()=>{var o=g,f=At();i=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Ye)}catch(_){f.reject(_),Ye()}var u=y;if(a){if((o.f&ne)!==0)var d=Gt();if(r.b.is_rendered())l.get(u)?.reject(G),l.delete(u);else{for(const _ of l.values())_.reject(G);l.clear()}l.set(u,f)}const c=(_,h=void 0)=>{if(d){var m=h===G;d(m)}if(!(h===G||(o.f&q)!==0)){if(u.activate(),h)s.f|=re,He(s,h);else{(s.f&re)!==0&&(s.f^=re),He(s,_);for(const[S,D]of l){if(l.delete(S),S===u)break;D.reject(G)}}u.deactivate()}};f.promise.then(c,_=>c(null,_||"unknown"))}),sn(()=>{for(const o of l.values())o.reject(G)}),new Promise(o=>{function f(u){function d(){u===i?o(s):f(i)}u.then(d,d)}f(i)})}function Nr(e){const t=ot(e);return pn(t),t}function Sr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function xr(e){for(var t=e.parent;t!==null;){if((t.f&N)===0)return(t.f&q)===0?t:null;t=t.parent}return null}function ft(e){var t,n=g;P(xr(e));try{e.f&=~he,Sr(e),t=wn(e)}finally{P(n)}return t}function Jt(e){var t=e.v,n=ft(e);if(!e.equals(n)&&(e.wv=yn(),(!y?.is_fork||e.deps===null)&&(e.v=n,y?.capture(e,t,!0),e.deps===null))){E(e,T);return}fe||(Y!==null?(vt()||y?.is_fork)&&Y.set(e,n):it(e))}function kr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(G),t.teardown=Un,t.ac=null,De(t,0),_t(t))}function Kt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ne(t)}let ut=new Set;const ae=new Map;let Xt=!1;function Ae(e,t){var n={f:0,v:e,reactions:null,equals:Dt,rv:0,wv:0};return n}function Z(e,t){const n=Ae(e);return pn(n),n}function Ar(e,t=!1,n=!0){const r=Ae(e);return t||(r.equals=hr),r}function W(e,t,n=!1){p!==null&&(!H||(p.f&Ot)!==0)&&Pt()&&(p.f&(N|ee|Qe|Ot))!==0&&(I===null||!me.call(I,e))&&lr();let r=n?Ce(t):t;return He(e,r,qe)}function He(e,t,n=null){if(!e.equals(t)){var r=e.v;fe?ae.set(e,t):ae.set(e,r),e.v=t;var i=K.ensure();if(i.capture(e,r),(e.f&N)!==0){const s=e;(e.f&k)!==0&&ft(s),Y===null&&it(s)}e.wv=yn(),Zt(e,k,n),g!==null&&(g.f&T)!==0&&(g.f&(B|te))===0&&(F===null?Ur([e]):F.push(e)),!i.is_fork&&ut.size>0&&!Xt&&Rr()}return t}function Rr(){Xt=!1;for(const e of ut)(e.f&T)!==0&&E(e,V),Me(e)&&Ne(e);ut.clear()}function Re(e){W(e,e.v+1)}function Zt(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var a=r[s],l=a.f,o=(l&k)===0;if(o&&E(a,t),(l&N)!==0){var f=a;Y?.delete(f),(l&he)===0&&(l&L&&(a.f|=he),Zt(f,V,n))}else if(o){var u=a;(l&ee)!==0&&X!==null&&X.add(u),n!==null?n.push(u):at(u)}}}function Ce(e){if(typeof e!="object"||e===null||et in e)return e;const t=xt(e);if(t!==Bn&&t!==Vn)return e;var n=new Map,r=Fn(e),i=Z(0),s=pe,a=l=>{if(pe===s)return l();var o=p,f=pe;C(null),mn(s);var u=l();return C(o),mn(f),u};return r&&n.set("length",Z(e.length)),new Proxy(e,{defineProperty(l,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&ir();var u=n.get(o);return u===void 0?a(()=>{var d=Z(f.value);return n.set(o,d),d}):W(u,f.value,!0),!0},deleteProperty(l,o){var f=n.get(o);if(f===void 0){if(o in l){const u=a(()=>Z(x));n.set(o,u),Re(i)}}else W(f,x),Re(i);return!0},get(l,o,f){if(o===et)return e;var u=n.get(o),d=o in l;if(u===void 0&&(!d||ye(l,o)?.writable)&&(u=a(()=>{var _=Ce(d?l[o]:x),h=Z(_);return h}),n.set(o,u)),u!==void 0){var c=A(u);return c===x?void 0:c}return Reflect.get(l,o,f)},getOwnPropertyDescriptor(l,o){var f=Reflect.getOwnPropertyDescriptor(l,o);if(f&&"value"in f){var u=n.get(o);u&&(f.value=A(u))}else if(f===void 0){var d=n.get(o),c=d?.v;if(d!==void 0&&c!==x)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return f},has(l,o){if(o===et)return!0;var f=n.get(o),u=f!==void 0&&f.v!==x||Reflect.has(l,o);if(f!==void 0||g!==null&&(!u||ye(l,o)?.writable)){f===void 0&&(f=a(()=>{var c=u?Ce(l[o]):x,_=Z(c);return _}),n.set(o,f));var d=A(f);if(d===x)return!1}return u},set(l,o,f,u){var d=n.get(o),c=o in l;if(r&&o==="length")for(var _=f;_<d.v;_+=1){var h=n.get(_+"");h!==void 0?W(h,x):_ in l&&(h=a(()=>Z(x)),n.set(_+"",h))}if(d===void 0)(!c||ye(l,o)?.writable)&&(d=a(()=>Z(void 0)),W(d,Ce(f)),n.set(o,d));else{c=d.v!==x;var m=a(()=>Ce(f));W(d,m)}var S=Reflect.getOwnPropertyDescriptor(l,o);if(S?.set&&S.set.call(u,f),!c){if(r&&typeof o=="string"){var D=n.get("length"),ue=Number(o);Number.isInteger(ue)&&ue>=D.v&&W(D,ue+1)}Re(i)}return!0},ownKeys(l){A(i);var o=Reflect.ownKeys(l).filter(d=>{var c=n.get(d);return c===void 0||c.v!==x});for(var[f,u]of n)u.v!==x&&!(f in l)&&o.push(f);return o},setPrototypeOf(){sr()}})}var Qt,en,tn,nn;function ct(){if(Qt===void 0){Qt=window,en=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;tn=ye(t,"firstChild").get,nn=ye(t,"nextSibling").get,kt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),kt(n)&&(n.__t=void 0)}}function Te(e=""){return document.createTextNode(e)}function Be(e){return tn.call(e)}function oe(e){return nn.call(e)}function Cr(e,t=!1){if(!$){var n=Be(e);return n instanceof Comment&&n.data===""?oe(n):n}if(t){if(b?.nodeType!==tt){var r=Te();return b?.before(r),J(r),r}rn(b)}return b}function Or(e,t=1,n=!1){let r=$?b:e;for(var i;t--;)i=r,r=oe(r);if(!$)return r;if(n){if(r?.nodeType!==tt){var s=Te();return r===null?i?.after(s):r.before(s),J(s),s}rn(r)}return J(r),r}function Mr(e){e.textContent=""}function Dr(){return!1}function ht(e,t,n){return document.createElementNS(St,e,void 0)}function rn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===tt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function dt(e){var t=p,n=g;C(null),P(null);try{return e()}finally{C(t),P(n)}}function Lr(e){g===null&&(p===null&&tr(),er()),fe&&Qn()}function jr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function z(e,t){var n=g;n!==null&&(n.f&U)!==0&&(e|=U);var r={ctx:j,deps:null,nodes:null,f:e|k|L,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&be)!==0)Ee!==null?Ee.push(r):K.ensure().schedule(r);else if(t!==null){try{Ne(r)}catch(a){throw R(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ce)===0&&(i=i.first,(e&ee)!==0&&(e&we)!==0&&i!==null&&(i.f|=we))}if(i!==null&&(i.parent=n,n!==null&&jr(i,n),p!==null&&(p.f&N)!==0&&(e&te)===0)){var s=p;(s.effects??=[]).push(i)}return r}function vt(){return p!==null&&!H}function sn(e){const t=z(Ie,null);return E(t,T),t.teardown=e,t}function Pr(e){Lr();var t=g.f,n=!p&&(t&B)!==0&&(t&ne)===0;if(n){var r=j;(r.e??=[]).push(e)}else return ln(e)}function ln(e){return z(be|Gn,e)}function Ir(e){K.ensure();const t=z(te|ce,e);return()=>{R(t)}}function Fr(e){K.ensure();const t=z(te|ce,e);return(n={})=>new Promise(r=>{n.outro?Oe(t,()=>{R(t),r(void 0)}):(R(t),r(void 0))})}function qr(e){return z(be,e)}function Yr(e){return z(Qe|ce,e)}function an(e,t=0){return z(Ie|t,e)}function on(e,t=[],n=[],r=[]){$r(r,t,n,i=>{z(Ie,()=>e(...i.map(A)))})}function fn(e,t=0){var n=z(ee|t,e);return n}function Q(e){return z(B|ce,e)}function un(e){var t=e.teardown;if(t!==null){const n=fe,r=p;_n(!0),C(null);try{t.call(null)}finally{_n(n),C(r)}}}function _t(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&dt(()=>{i.abort(G)});var r=n.next;(n.f&te)!==0?n.parent=null:R(n,t),n=r}}function Hr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&B)===0&&R(t),t=n}}function R(e,t=!0){var n=!1;(t||(e.f&zn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Br(e.nodes.start,e.nodes.end),n=!0),E(e,Ct),_t(e,t&&!n),De(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();un(e),e.f^=Ct,e.f|=q;var i=e.parent;i!==null&&i.first!==null&&cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Br(e,t){for(;e!==null;){var n=e===t?null:oe(e);e.remove(),e=n}}function cn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Oe(e,t,n=!0){var r=[];hn(e,r,!0);var i=()=>{n&&R(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var l of r)l.out(a)}else i()}function hn(e,t,n){if((e.f&U)===0){e.f^=U;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&we)!==0||(i.f&B)!==0&&(e.f&ee)!==0;hn(i,t,a?n:!1),i=s}}}function Vr(e){dn(e,!0)}function dn(e,t){if((e.f&U)!==0){e.f^=U,(e.f&T)===0&&(E(e,k),K.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&we)!==0||(n.f&B)!==0;dn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function vn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:oe(n);t.append(n),n=i}}let Ve=!1,fe=!1;function _n(e){fe=e}let p=null,H=!1;function C(e){p=e}let g=null;function P(e){g=e}let I=null;function pn(e){p!==null&&(I===null?I=[e]:I.push(e))}let O=null,M=0,F=null;function Ur(e){F=e}let gn=1,_e=0,pe=_e;function mn(e){pe=e}function yn(){return++gn}function Me(e){var t=e.f;if((t&k)!==0)return!0;if(t&N&&(e.f&=~he),(t&V)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Me(s)&&Jt(s),s.wv>e.wv)return!0}(t&L)!==0&&Y===null&&E(e,T)}return!1}function bn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(I!==null&&me.call(I,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&N)!==0?bn(s,t,!1):t===s&&(n?E(s,k):(s.f&T)!==0&&E(s,V),at(s))}}function wn(e){var t=O,n=M,r=F,i=p,s=I,a=j,l=H,o=pe,f=e.f;O=null,M=0,F=null,p=(f&(B|te))===0?e:null,I=null,$e(e.ctx),H=!1,pe=++_e,e.ac!==null&&(dt(()=>{e.ac.abort(G)}),e.ac=null);try{e.f|=Ze;var u=e.fn,d=u();e.f|=ne;var c=e.deps,_=y?.is_fork;if(O!==null){var h;if(_||De(e,M),c!==null&&M>0)for(c.length=M+O.length,h=0;h<O.length;h++)c[M+h]=O[h];else e.deps=c=O;if(vt()&&(e.f&L)!==0)for(h=M;h<c.length;h++)(c[h].reactions??=[]).push(e)}else!_&&c!==null&&M<c.length&&(De(e,M),c.length=M);if(Pt()&&F!==null&&!H&&c!==null&&(e.f&(N|V|k))===0)for(h=0;h<F.length;h++)bn(F[h],e);if(i!==null&&i!==e){if(_e++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=_e;if(t!==null)for(const m of t)m.rv=_e;F!==null&&(r===null?r=F:r.push(...F))}return(e.f&re)!==0&&(e.f^=re),d}catch(m){return Ft(m)}finally{e.f^=Ze,O=t,M=n,F=r,p=i,I=s,$e(a),H=l,pe=o}}function Wr(e,t){let n=t.reactions;if(n!==null){var r=qn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&N)!==0&&(O===null||!me.call(O,t))){var s=t;(s.f&L)!==0&&(s.f^=L,s.f&=~he),it(s),kr(s),De(s,0)}}function De(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Wr(e,n[r])}function Ne(e){var t=e.f;if((t&q)===0){E(e,T);var n=g,r=Ve;g=e,Ve=!0;try{(t&(ee|Rt))!==0?Hr(e):_t(e),un(e);var i=wn(e);e.teardown=typeof i=="function"?i:null,e.wv=gn;var s;In&&dr&&(e.f&k)!==0&&e.deps}finally{Ve=r,g=n}}}function A(e){var t=e.f,n=(t&N)!==0;if(p!==null&&!H){var r=g!==null&&(g.f&q)!==0;if(!r&&(I===null||!me.call(I,e))){var i=p.deps;if((p.f&Ze)!==0)e.rv<_e&&(e.rv=_e,O===null&&i!==null&&i[M]===e?M++:O===null?O=[e]:O.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:me.call(s,p)||s.push(p)}}}if(fe&&ae.has(e))return ae.get(e);if(n){var a=e;if(fe){var l=a.v;return((a.f&T)===0&&a.reactions!==null||En(a))&&(l=ft(a)),ae.set(a,l),l}var o=(a.f&L)===0&&!H&&p!==null&&(Ve||(p.f&L)!==0),f=(a.f&ne)===0;Me(a)&&(o&&(a.f|=L),Jt(a)),o&&!f&&(Kt(a),$n(a))}if(Y?.has(e))return Y.get(e);if((e.f&re)!==0)throw e.v;return e.v}function $n(e){if(e.f|=L,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&N)!==0&&(t.f&L)===0&&(Kt(t),$n(t))}function En(e){if(e.v===x)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ae.has(t)||(t.f&N)!==0&&En(t))return!0;return!1}function zr(e){var t=H;try{return H=!0,e()}finally{H=t}}const Ue=Symbol("events"),Gr=new Set,Tn=new Set;function Jr(e,t,n,r={}){function i(s){if(r.capture||gt.call(t,s),!s.cancelBubble)return dt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ve(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pt(e,t,n,r,i){var s={capture:r,passive:i},a=Jr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&sn(()=>{t.removeEventListener(e,a,s)})}let Nn=null;function gt(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Nn=e;var a=0,l=Nn===e&&e[Ue];if(l){var o=i.indexOf(l);if(o!==-1&&(t===document||t===window)){e[Ue]=t;return}var f=i.indexOf(t);if(f===-1)return;o<=f&&(a=o)}if(s=i[a]||e.target,s!==t){Pe(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=p,d=g;C(null),P(null);try{for(var c,_=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var m=s[Ue]?.[r];m!=null&&(!s.disabled||e.target===s)&&m.call(s,e)}catch(S){c?_.push(S):c=S}if(e.cancelBubble||h===t||h===null)break;s=h}if(c){for(let S of _)queueMicrotask(()=>{throw S});throw c}}finally{e[Ue]=t,delete e.currentTarget,C(u),P(d)}}}const Kr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Xr(e){return Kr?.createHTML(e)??e}function Zr(e){var t=ht("template");return t.innerHTML=Xr(e.replaceAll("<!>","<!---->")),t.content}function We(e,t){var n=g;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function mt(e,t){var n=(t&jn)!==0,r=(t&Pn)!==0,i,s=!e.startsWith("<!>");return()=>{if($)return We(b,null),b;i===void 0&&(i=Zr(s?e:"<!>"+e),n||(i=Be(i)));var a=r||en?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Be(a),o=a.lastChild;We(l,o)}else We(a,a);return a}}function ze(e,t){if($){var n=g;((n.f&ne)===0||n.nodes.end===null)&&(n.nodes.end=b),rt();return}e!==null&&e.before(t)}const Qr=["touchstart","touchmove"];function ei(e){return Qr.includes(e)}function Sn(e,t){return xn(e,t)}function ti(e,t){ct(),t.intro=t.intro??!1;const n=t.target,r=$,i=b;try{for(var s=Be(n);s&&(s.nodeType!==Fe||s.data!==$t);)s=oe(s);if(!s)throw Se;ie(!0),J(s);const a=xn(e,{...t,anchor:s});return ie(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==Se&&console.warn("Failed to hydrate: ",a),t.recover===!1&&rr(),ct(),Mr(n),ie(!1),Sn(e,t)}finally{ie(r),J(i)}}const Ge=new Map;function xn(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:l}){ct();var o=void 0,f=Fr(()=>{var u=n??t.appendChild(Te());br(u,{pending:()=>{}},_=>{Lt({});var h=j;if(s&&(h.c=s),i&&(r.$$events=i),$&&We(_,null),o=e(_,r)||{},$&&(g.nodes.end=b,b===null||b.nodeType!==Fe||b.data!==Nt))throw nt(),Se;jt()},l);var d=new Set,c=_=>{for(var h=0;h<_.length;h++){var m=_[h];if(!d.has(m)){d.add(m);var S=ei(m);for(const v of[t,document]){var D=Ge.get(v);D===void 0&&(D=new Map,Ge.set(v,D));var ue=D.get(m);ue===void 0?(v.addEventListener(m,gt,{passive:S}),D.set(m,1)):D.set(m,ue+1)}}}};return c(Yn(Gr)),Tn.add(c),()=>{for(var _ of d)for(const S of[t,document]){var h=Ge.get(S),m=h.get(_);--m==0?(S.removeEventListener(_,gt),h.delete(_),h.size===0&&Ge.delete(S)):h.set(_,m)}Tn.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return yt.set(o,f),o}let yt=new WeakMap;function ni(e,t){const n=yt.get(e);return n?(yt.delete(e),n(t)):Promise.resolve()}class ri{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Vr(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#t.get(a);l&&(R(l.effect),this.#t.delete(a))}for(const[s,a]of this.#n){if(s===n||this.#i.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();vn(a,f),f.append(Te()),this.#t.set(s,{effect:a,fragment:f})}else R(a);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Oe(a,l,!1)):l()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(R(i.effect),this.#t.delete(r))};ensure(t,n){var r=y,i=Dr();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),a=Te();s.append(a),this.#t.set(t,{effect:Q(()=>n(a)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,o]of this.#n)l===t?r.unskip_effect(o):r.skip_effect(o);for(const[l,o]of this.#t)l===t?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else $&&(this.anchor=b),this.#r(r)}}function kn(e,t,n=!1){var r;$&&(r=b,rt());var i=new ri(e),s=n?we:0;function a(l,o){if($){var f=ur(r);if(l!==parseInt(f.substring(1))){var u=Mt();J(u),i.anchor=u,ie(!1),i.ensure(l,o),ie(!0);return}}i.ensure(l,o)}fn(()=>{var l=!1;t((o,f=0)=>{l=!0,a(f,o)}),l||a(-1,null)},s)}function ii(e,t){qr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=ht("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const si=Symbol("is custom element"),li=Symbol("is html"),ai=Xn?"link":"LINK";function oi(e,t,n,r){var i=fi(e);$&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===ai)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Kn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Rn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function An(e,t,n){var r=p,i=g;let s=$;$&&ie(!1),C(null),P(null);try{t!=="style"&&(bt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Rn(e).includes(t):n&&typeof n=="object")?e[t]=n:oi(e,t,n==null?n:String(n))}finally{C(r),P(i),s&&ie(!0)}}function fi(e){return e.__attributes??={[si]:e.nodeName.includes("-"),[li]:e.namespaceURI===St}}var bt=new Map;function Rn(e){var t=e.getAttribute("is")||e.nodeName,n=bt.get(t);if(n)return n;bt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Hn(i);for(var a in r)r[a].set&&n.push(a);i=xt(i)}return n}function Je(e,t,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),l;l=e[t],l===void 0&&r!==void 0&&(l=a());var o;o=()=>{var c=e[t];return c===void 0?a():(s=!0,c)};var f=!1,u=ot(()=>(f=!1,o())),d=g;return(function(c,_){if(arguments.length>0){const h=_?A(u):c;return W(u,h),f=!0,i!==void 0&&(i=h),c}return fe&&f||(d.f&q)!==0?u.v:A(u)})}function ui(e){return new ci(e)}class ci{#e;#n;constructor(t){var n=new Map,r=(s,a)=>{var l=Ar(a,!1,!1);return n.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return A(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===Jn?!0:(A(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,l){return W(n.get(a)??r(a,l),l),Reflect.set(s,a,l)}});this.#n=(t.hydrate?ti:Sn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Pe(this,s,{get(){return this.#n[s]},set(a){this.#n[s]=a},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ni(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Cn;typeof HTMLElement=="function"&&(Cn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=ht("slot");r!=="default"&&(s.name=r),ze(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=hi(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Ke(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=ui({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ir(()=>{an(()=>{this.$$r=!0;for(const r of je(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ke(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ke(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return je(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ke(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function hi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function di(e,t,n,r,i,s){let a=class extends Cn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return je(t).map(l=>(t[l].attribute||l).toLowerCase())}};return je(t).forEach(l=>{Pe(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(o){o=Ke(l,o,t),this.$$d[l]=o;var f=this.$$c;if(f){var u=ye(f,l)?.get;u?f[l]=o:f.$set({[l]:o})}}})}),r.forEach(l=>{Pe(a.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=a,a}var ge={},On;function vi(){if(On)return ge;On=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.LanguageTranslator=void 0,ge.getChildStyleToPass=e,ge.addComponent=t;function e(r,i){var s,a,l="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||a===void 0)&&a.length))for(var o=function(c){var _=i?.filter(function(h){return h.name===c&&h.defaultValue!==r[c]});_&&(l+="".concat(c,":").concat(r[c],";"))},f=0,u=Object.keys(r);f<u.length;f++){var d=u[f];o(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return l}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var l=document.createElement("script");if(l.id=s+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var o=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(o+"-",""),"/").concat(a)}document.head.appendChild(l)}catch(f){console.warn(f)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,l="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(i,s,a){var l;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((l=s[a])===null||l===void 0)&&l[i]))return s[a][i];var o="",f=r.getDefaultLang();if(!a||f!==a){var u=s?.[f];u?.[i]&&(o=u[i])}return o},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return l.format(i)},r})();return ge.LanguageTranslator=n,ge}var Mn=vi();const Dn={version:"0.66.2"};var _i=mt("<hb-captcha-google-recaptcha-v2-invisible></hb-captcha-google-recaptcha-v2-invisible>",2),pi=mt("<hb-form></hb-form>",2),gi=mt("<!> <!>",1);const mi={hash:"svelte-kch9v7",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;}'};function Ln(e,t){Lt(t,!0),ii(e,mi);let n=Je(t,"id",7,""),r=Je(t,"informations",7,void 0),i=Je(t,"privacy_policy",7,void 0),s=Je(t,"captcha",7,void 0),a,l=Z(!1);Pr(()=>{if(typeof s()=="string")try{s(JSON.parse(s()))}catch(v){console.error("error parsing captcha",v)}if(typeof r()=="string")try{r(JSON.parse(r()))}catch(v){console.error("error parsing informations",v)}if(typeof i()=="string")try{i(JSON.parse(i()))}catch(v){console.error("error parsing privacy_policy",v)}});let o=Nr(()=>{const v=[];if(!r()||typeof r()!="object")return[];if(r()?.name){const w={id:"name",name:"name",label:r().name.label||"Name",type:"text",required:!!r().name.required,placeholder:r().name.placeholder||"Your name",value:r().name.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(r()?.email){const w={id:"email",name:"email",label:r().email.label||"email",type:"email",required:!!r().email.required,placeholder:r().email.placeholder||"Your email",value:r().email.value||"",validation:{min:{value:3,message:"email must be at least 3 characters long"}}};v.push(w)}if(r()?.phone){const w={id:"phone",name:"phone",label:r().phone.label||"phone",type:"text",required:!!r().phone.required,placeholder:r().phone.placeholder||"Your phone",value:r().phone.value||"",validation:{min:{value:3,message:"phone must be at least 3 characters long"}}};v.push(w)}if(r()?.subject){const w={id:"subject",name:"subject",label:r().subject.label||"Subject",type:"text",required:!!r().subject.required,placeholder:r().subject.placeholder||"Email Subject",value:r().subject.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(r()?.message){const w={id:"message",name:"message",label:r().message.label||"Message",type:"textarea",required:!!r().message.required,placeholder:r().message.placeholder||"Your message here...",value:r().message.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(i()?.input){const w={id:"policy",name:"policy",label:i().input,type:"checkbox",required:i().required,value:!1,valid:!1,error:""};v.push(w)}return v});Mn.addComponent({repoName:"@htmlbricks/hb-form",version:Dn.version}),Mn.addComponent({repoName:"@htmlbricks/hb-captcha-google-recaptcha-v2-invisible",version:Dn.version});function f(v,w){t.$$host.dispatchEvent(new CustomEvent(v,{detail:w}))}function u(v){if(!v._valid)return console.error("is not yet valid!",v);console.log("submit",s()),s()?.siteKey?(W(l,!0),a=v):f("formContactSubmit",v)}function d(v){console.log(v)}function c(v){f("formContactSubmitWithCaptcha",Object.assign({response:v.response,type:"recaptcha-v2-invisible"},a))}var _={get id(){return n()},set id(v=""){n(v),ke()},get informations(){return r()},set informations(v=void 0){r(v),ke()},get privacy_policy(){return i()},set privacy_policy(v=void 0){i(v),ke()},get captcha(){return s()},set captcha(v=void 0){s(v),ke()}},h=gi(),m=Cr(h);{var S=v=>{var w=_i();on(()=>An(w,"api_key",s().siteKey)),pt("googleRecaptchaV2Response",w,Le=>c(Le.detail)),ze(v,w)};kn(m,v=>{s()?.siteKey&&A(l)&&v(S)})}var D=Or(m,2);{var ue=v=>{var w=pi();on(()=>An(w,"schema",JSON.stringify(A(o)))),pt("submit",w,Le=>u(Le.detail)),pt("update",w,Le=>d(Le.detail)),ze(v,w)};kn(D,v=>{A(o)&&typeof A(o)=="object"&&A(o).length&&v(ue)})}return ze(e,h),jt(_)}customElements.define("hb-form-contact",di(Ln,{id:{},informations:{},privacy_policy:{},captcha:{}},[],[],{mode:"open"})),wt.Component=Ln,Object.defineProperty(wt,Symbol.toStringTag,{value:"Module"})})(this["form-contact"]=this["form-contact"]||{});
|
|
2
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==Se&&console.warn("Failed to hydrate: ",a),t.recover===!1&&rr(),ct(),Mr(n),ie(!1),Sn(e,t)}finally{ie(r),J(i)}}const Ge=new Map;function xn(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:l}){ct();var o=void 0,f=Fr(()=>{var u=n??t.appendChild(Te());br(u,{pending:()=>{}},_=>{Lt({});var h=j;if(s&&(h.c=s),i&&(r.$$events=i),$&&We(_,null),o=e(_,r)||{},$&&(g.nodes.end=b,b===null||b.nodeType!==Fe||b.data!==Nt))throw nt(),Se;jt()},l);var d=new Set,c=_=>{for(var h=0;h<_.length;h++){var m=_[h];if(!d.has(m)){d.add(m);var S=ei(m);for(const v of[t,document]){var D=Ge.get(v);D===void 0&&(D=new Map,Ge.set(v,D));var ue=D.get(m);ue===void 0?(v.addEventListener(m,gt,{passive:S}),D.set(m,1)):D.set(m,ue+1)}}}};return c(Yn(Gr)),Tn.add(c),()=>{for(var _ of d)for(const S of[t,document]){var h=Ge.get(S),m=h.get(_);--m==0?(S.removeEventListener(_,gt),h.delete(_),h.size===0&&Ge.delete(S)):h.set(_,m)}Tn.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return yt.set(o,f),o}let yt=new WeakMap;function ni(e,t){const n=yt.get(e);return n?(yt.delete(e),n(t)):Promise.resolve()}class ri{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Vr(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#t.get(a);l&&(R(l.effect),this.#t.delete(a))}for(const[s,a]of this.#n){if(s===n||this.#i.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();vn(a,f),f.append(Te()),this.#t.set(s,{effect:a,fragment:f})}else R(a);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Oe(a,l,!1)):l()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(R(i.effect),this.#t.delete(r))};ensure(t,n){var r=y,i=Dr();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),a=Te();s.append(a),this.#t.set(t,{effect:Q(()=>n(a)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,o]of this.#n)l===t?r.unskip_effect(o):r.skip_effect(o);for(const[l,o]of this.#t)l===t?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else $&&(this.anchor=b),this.#r(r)}}function kn(e,t,n=!1){var r;$&&(r=b,rt());var i=new ri(e),s=n?we:0;function a(l,o){if($){var f=ur(r);if(l!==parseInt(f.substring(1))){var u=Mt();J(u),i.anchor=u,ie(!1),i.ensure(l,o),ie(!0);return}}i.ensure(l,o)}fn(()=>{var l=!1;t((o,f=0)=>{l=!0,a(f,o)}),l||a(-1,null)},s)}function ii(e,t){qr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=ht("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const si=Symbol("is custom element"),li=Symbol("is html"),ai=Xn?"link":"LINK";function oi(e,t,n,r){var i=fi(e);$&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===ai)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Kn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Rn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function An(e,t,n){var r=p,i=g;let s=$;$&&ie(!1),C(null),P(null);try{t!=="style"&&(bt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Rn(e).includes(t):n&&typeof n=="object")?e[t]=n:oi(e,t,n==null?n:String(n))}finally{C(r),P(i),s&&ie(!0)}}function fi(e){return e.__attributes??={[si]:e.nodeName.includes("-"),[li]:e.namespaceURI===St}}var bt=new Map;function Rn(e){var t=e.getAttribute("is")||e.nodeName,n=bt.get(t);if(n)return n;bt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Hn(i);for(var a in r)r[a].set&&n.push(a);i=xt(i)}return n}function Je(e,t,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),l;l=e[t],l===void 0&&r!==void 0&&(l=a());var o;o=()=>{var c=e[t];return c===void 0?a():(s=!0,c)};var f=!1,u=ot(()=>(f=!1,o())),d=g;return(function(c,_){if(arguments.length>0){const h=_?A(u):c;return W(u,h),f=!0,i!==void 0&&(i=h),c}return fe&&f||(d.f&q)!==0?u.v:A(u)})}function ui(e){return new ci(e)}class ci{#e;#n;constructor(t){var n=new Map,r=(s,a)=>{var l=Ar(a,!1,!1);return n.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return A(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===Jn?!0:(A(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,l){return W(n.get(a)??r(a,l),l),Reflect.set(s,a,l)}});this.#n=(t.hydrate?ti:Sn)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&ke(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||Pe(this,s,{get(){return this.#n[s]},set(a){this.#n[s]=a},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{ni(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let Cn;typeof HTMLElement=="function"&&(Cn=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=ht("slot");r!=="default"&&(s.name=r),ze(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=hi(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Ke(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=ui({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ir(()=>{an(()=>{this.$$r=!0;for(const r of je(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ke(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ke(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return je(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ke(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function hi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function di(e,t,n,r,i,s){let a=class extends Cn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return je(t).map(l=>(t[l].attribute||l).toLowerCase())}};return je(t).forEach(l=>{Pe(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(o){o=Ke(l,o,t),this.$$d[l]=o;var f=this.$$c;if(f){var u=ye(f,l)?.get;u?f[l]=o:f.$set({[l]:o})}}})}),r.forEach(l=>{Pe(a.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=a,a}var ge={},On;function vi(){if(On)return ge;On=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.LanguageTranslator=void 0,ge.getChildStyleToPass=e,ge.addComponent=t;function e(r,i){var s,a,l="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||a===void 0)&&a.length))for(var o=function(c){var _=i?.filter(function(h){return h.name===c&&h.defaultValue!==r[c]});_&&(l+="".concat(c,":").concat(r[c],";"))},f=0,u=Object.keys(r);f<u.length;f++){var d=u[f];o(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return l}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var l=document.createElement("script");if(l.id=s+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var o=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(o+"-",""),"/").concat(a)}document.head.appendChild(l)}catch(f){console.warn(f)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,l="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(i,s,a){var l;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((l=s[a])===null||l===void 0)&&l[i]))return s[a][i];var o="",f=r.getDefaultLang();if(!a||f!==a){var u=s?.[f];u?.[i]&&(o=u[i])}return o},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return l.format(i)},r})();return ge.LanguageTranslator=n,ge}var Mn=vi();const Dn={version:"0.66.3"};var _i=mt("<hb-captcha-google-recaptcha-v2-invisible></hb-captcha-google-recaptcha-v2-invisible>",2),pi=mt("<hb-form></hb-form>",2),gi=mt("<!> <!>",1);const mi={hash:"svelte-kch9v7",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;}'};function Ln(e,t){Lt(t,!0),ii(e,mi);let n=Je(t,"id",7,""),r=Je(t,"informations",7,void 0),i=Je(t,"privacy_policy",7,void 0),s=Je(t,"captcha",7,void 0),a,l=Z(!1);Pr(()=>{if(typeof s()=="string")try{s(JSON.parse(s()))}catch(v){console.error("error parsing captcha",v)}if(typeof r()=="string")try{r(JSON.parse(r()))}catch(v){console.error("error parsing informations",v)}if(typeof i()=="string")try{i(JSON.parse(i()))}catch(v){console.error("error parsing privacy_policy",v)}});let o=Nr(()=>{const v=[];if(!r()||typeof r()!="object")return[];if(r()?.name){const w={id:"name",name:"name",label:r().name.label||"Name",type:"text",required:!!r().name.required,placeholder:r().name.placeholder||"Your name",value:r().name.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(r()?.email){const w={id:"email",name:"email",label:r().email.label||"email",type:"email",required:!!r().email.required,placeholder:r().email.placeholder||"Your email",value:r().email.value||"",validation:{min:{value:3,message:"email must be at least 3 characters long"}}};v.push(w)}if(r()?.phone){const w={id:"phone",name:"phone",label:r().phone.label||"phone",type:"text",required:!!r().phone.required,placeholder:r().phone.placeholder||"Your phone",value:r().phone.value||"",validation:{min:{value:3,message:"phone must be at least 3 characters long"}}};v.push(w)}if(r()?.subject){const w={id:"subject",name:"subject",label:r().subject.label||"Subject",type:"text",required:!!r().subject.required,placeholder:r().subject.placeholder||"Email Subject",value:r().subject.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(r()?.message){const w={id:"message",name:"message",label:r().message.label||"Message",type:"textarea",required:!!r().message.required,placeholder:r().message.placeholder||"Your message here...",value:r().message.value||"",validation:{min:{value:3,message:"Name must be at least 3 characters long"}}};v.push(w)}if(i()?.input){const w={id:"policy",name:"policy",label:i().input,type:"checkbox",required:i().required,value:!1,valid:!1,error:""};v.push(w)}return v});Mn.addComponent({repoName:"@htmlbricks/hb-form",version:Dn.version}),Mn.addComponent({repoName:"@htmlbricks/hb-captcha-google-recaptcha-v2-invisible",version:Dn.version});function f(v,w){t.$$host.dispatchEvent(new CustomEvent(v,{detail:w}))}function u(v){if(!v._valid)return console.error("is not yet valid!",v);console.log("submit",s()),s()?.siteKey?(W(l,!0),a=v):f("formContactSubmit",v)}function d(v){console.log(v)}function c(v){f("formContactSubmitWithCaptcha",Object.assign({response:v.response,type:"recaptcha-v2-invisible"},a))}var _={get id(){return n()},set id(v=""){n(v),ke()},get informations(){return r()},set informations(v=void 0){r(v),ke()},get privacy_policy(){return i()},set privacy_policy(v=void 0){i(v),ke()},get captcha(){return s()},set captcha(v=void 0){s(v),ke()}},h=gi(),m=Cr(h);{var S=v=>{var w=_i();on(()=>An(w,"api_key",s().siteKey)),pt("googleRecaptchaV2Response",w,Le=>c(Le.detail)),ze(v,w)};kn(m,v=>{s()?.siteKey&&A(l)&&v(S)})}var D=Or(m,2);{var ue=v=>{var w=pi();on(()=>An(w,"schema",JSON.stringify(A(o)))),pt("submit",w,Le=>u(Le.detail)),pt("update",w,Le=>d(Le.detail)),ze(v,w)};kn(D,v=>{A(o)&&typeof A(o)=="object"&&A(o).length&&v(ue)})}return ze(e,h),jt(_)}customElements.define("hb-form-contact",di(Ln,{id:{},informations:{},privacy_policy:{},captcha:{}},[],[],{mode:"open"})),wt.Component=Ln,Object.defineProperty(wt,Symbol.toStringTag,{value:"Module"})})(this["form-contact"]=this["form-contact"]||{});
|
|
3
3
|
//# sourceMappingURL=main.iife.js.map
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-form-contact",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.3",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Opinionated contact form: JSON `informations` toggles and labels fields (name, email, phone, subject, message, etc.) and builds the `hb-form` schema at runtime, including privacy-policy checkbox from `privacy_policy`. Optional `captcha` config embeds `hb-captcha-google-recaptcha-v2-invisible` before submit; success UI uses Svelte transitions.",
|
|
6
6
|
"licenses": [
|