react-linear-feedback 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 +4 -3
- package/dist/embed/index.js +134 -87
- package/dist/embed/linear-feedback.js +11 -8
- package/dist/react/index.cjs +134 -87
- package/dist/react/index.js +134 -87
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";var LinearFeedback=(()=>{var Re=Object.defineProperty;var Mn=Object.getOwnPropertyDescriptor;var Ln=Object.getOwnPropertyNames;var Un=Object.prototype.hasOwnProperty;var On=(e,t)=>{for(var n in t)Re(e,n,{get:t[n],enumerable:!0})},$n=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ln(t))!Un.call(e,a)&&a!==n&&Re(e,a,{get:()=>t[a],enumerable:!(r=Mn(t,a))||r.enumerable});return e};var Wn=e=>$n(Re({},"__esModule",{value:!0}),e);var Fo={};On(Fo,{destroy:()=>Ge,init:()=>Ce});var me,w,st,Hn,W,rt,lt,ct,Ae,ue,Z,ut,Ie,Fe,Pe,Bn,de={},pe=[],zn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Q=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ee(e,t,n){var r,a,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return fe(e,s,r,a,null)}function fe(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++st,__i:-1,__u:0};return a==null&&w.vnode!=null&&w.vnode(o),o}function A(e){return e.children}function M(e,t){this.props=e,this.context=t}function j(e,t){if(t==null)return e.__?j(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?j(e):null}function Vn(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],o=$({},t);o.__v=t.__v+1,w.vnode&&w.vnode(o),Le(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??j(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,_t(r,o,a),t.__e=t.__=null,o.__e!=n&&ft(o)}}function ft(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ft(e)}function ot(e){(!e.__d&&(e.__d=!0)&&W.push(e)&&!_e.__r++||rt!=w.debounceRendering)&&((rt=w.debounceRendering)||lt)(_e)}function _e(){try{for(var e,t=1;W.length;)W.length>t&&W.sort(ct),e=W.shift(),t=W.length,Vn(e)}finally{W.length=_e.__r=0}}function dt(e,t,n,r,a,o,s,i,f,u,c){var l,p,d,b,m,g,h,y=r&&r.__k||pe,x=t.length;for(f=jn(n,t,y,f,x),l=0;l<x;l++)(d=n.__k[l])!=null&&(p=d.__i!=-1&&y[d.__i]||de,d.__i=l,g=Le(e,d,p,a,o,s,i,f,u,c),b=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&Ue(p.ref,null,d),c.push(d.ref,d.__c||b,d)),m==null&&b!=null&&(m=b),(h=!!(4&d.__u))||p.__k===d.__k?(f=pt(d,f,e,h),h&&p.__e&&(p.__e=null)):typeof d.type=="function"&&g!==void 0?f=g:b&&(f=b.nextSibling),d.__u&=-7);return n.__e=m,f}function jn(e,t,n,r,a){var o,s,i,f,u,c=n.length,l=c,p=0;for(e.__k=new Array(a),o=0;o<a;o++)(s=t[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[o]=fe(null,s,null,null,null):Q(s)?s=e.__k[o]=fe(A,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=fe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,f=o+p,s.__=e,s.__b=e.__b+1,i=null,(u=s.__i=qn(s,n,f,l))!=-1&&(l--,(i=n[u])&&(i.__u|=2)),i==null||i.__v==null?(u==-1&&(a>c?p--:a<c&&p++),typeof s.type!="function"&&(s.__u|=4)):u!=f&&(u==f-1?p--:u==f+1?p++:(u>f?p--:p++,s.__u|=4))):e.__k[o]=null;if(l)for(o=0;o<c;o++)(i=n[o])!=null&&(2&i.__u)==0&&(i.__e==r&&(r=j(i)),ht(i,i));return r}function pt(e,t,n,r){var a,o;if(typeof e.type=="function"){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,t=pt(a[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=j(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function te(e,t){return t=t||[],e==null||typeof e=="boolean"||(Q(e)?e.some(function(n){te(n,t)}):t.push(e)),t}function qn(e,t,n,r){var a,o,s,i=e.key,f=e.type,u=t[n],c=u!=null&&(2&u.__u)==0;if(u===null&&i==null||c&&i==u.key&&f==u.type)return n;if(r>(c?1:0)){for(a=n-1,o=n+1;a>=0||o<t.length;)if((u=t[s=a>=0?a--:o++])!=null&&(2&u.__u)==0&&i==u.key&&f==u.type)return s}return-1}function at(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||zn.test(t)?n:n+"px"}function ce(e,t,n,r,a){var o,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||at(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||at(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(ut,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n[Z]=r[Z]:(n[Z]=Ie,e.addEventListener(t,o?Pe:Fe,o)):e.removeEventListener(t,o?Pe:Fe,o);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function it(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[ue]==null)t[ue]=Ie++;else if(t[ue]<n[Z])return;return n(w.event?w.event(t):t)}}}function Le(e,t,n,r,a,o,s,i,f,u){var c,l,p,d,b,m,g,h,y,x,k,T,N,P,O,R=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),o=[i=t.__e=n.__e]),(c=w.__b)&&c(t);e:if(typeof R=="function")try{if(h=t.props,y=R.prototype&&R.prototype.render,x=(c=R.contextType)&&r[c.__c],k=c?x?x.props.value:c.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new R(h,k):(t.__c=l=new M(h,k),l.constructor=R,l.render=Yn),x&&x.sub(l),l.state||(l.state={}),l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&R.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$({},l.__s)),$(l.__s,R.getDerivedStateFromProps(h,l.__s))),d=l.props,b=l.state,l.__v=t,p)y&&R.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&R.getDerivedStateFromProps==null&&h!==d&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(h,k),t.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(h,l.__s,k)===!1){t.__v!=n.__v&&(l.props=h,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(I){I&&(I.__=t)}),pe.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(h,l.__s,k),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(d,b,m)})}if(l.context=k,l.props=h,l.__P=e,l.__e=!1,T=w.__r,N=0,y)l.state=l.__s,l.__d=!1,T&&T(t),c=l.render(l.props,l.state,l.context),pe.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,T&&T(t),c=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=$($({},r),l.getChildContext())),y&&!p&&l.getSnapshotBeforeUpdate!=null&&(m=l.getSnapshotBeforeUpdate(d,b)),P=c!=null&&c.type===A&&c.key==null?mt(c.props.children):c,i=dt(e,Q(P)?P:[P],t,n,r,a,o,s,i,f,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),g&&(l.__E=l.__=null)}catch(I){if(t.__v=null,f||o!=null)if(I.then){for(t.__u|=f?160:128;i&&i.nodeType==8&&i.nextSibling;)i=i.nextSibling;o[o.indexOf(i)]=null,t.__e=i}else{for(O=o.length;O--;)Me(o[O]);De(t)}else t.__e=n.__e,t.__k=n.__k,I.then||De(t);w.__e(I,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):i=t.__e=Xn(n.__e,t,n,r,a,o,s,f,u);return(c=w.diffed)&&c(t),128&t.__u?void 0:i}function De(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(De))}function _t(e,t,n){for(var r=0;r<n.length;r++)Ue(n[r],n[++r],n[++r]);w.__c&&w.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(o){o.call(a)})}catch(o){w.__e(o,a.__v)}})}function mt(e){return typeof e!="object"||e==null||e.__b>0?e:Q(e)?e.map(mt):e.constructor!==void 0?null:$({},e)}function Xn(e,t,n,r,a,o,s,i,f){var u,c,l,p,d,b,m,g=n.props||de,h=t.props,y=t.type;if(y=="svg"?a="http://www.w3.org/2000/svg":y=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((d=o[u])&&"setAttribute"in d==!!y&&(y?d.localName==y:d.nodeType==3)){e=d,o[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(h);e=document.createElementNS(a,y,h.is&&h),i&&(w.__m&&w.__m(t,o),i=!1),o=null}if(y==null)g===h||i&&e.data==h||(e.data=h);else{if(o=y=="textarea"&&h.defaultValue!=null?null:o&&me.call(e.childNodes),!i&&o!=null)for(g={},u=0;u<e.attributes.length;u++)g[(d=e.attributes[u]).name]=d.value;for(u in g)d=g[u],u=="dangerouslySetInnerHTML"?l=d:u=="children"||u in h||u=="value"&&"defaultValue"in h||u=="checked"&&"defaultChecked"in h||ce(e,u,null,d,a);for(u in h)d=h[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?c=d:u=="value"?b=d:u=="checked"?m=d:i&&typeof d!="function"||g[u]===d||ce(e,u,d,g[u],a);if(c)i||l&&(c.__html==l.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(l&&(e.innerHTML=""),dt(t.type=="template"?e.content:e,Q(p)?p:[p],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,s,o?o[0]:n.__k&&j(n,0),i,f),o!=null)for(u=o.length;u--;)Me(o[u]);i&&y!="textarea"||(u="value",y=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[u]||y=="progress"&&!b||y=="option"&&b!=g[u])&&ce(e,u,b,g[u],a),u="checked",m!=null&&m!=e[u]&&ce(e,u,m,g[u],a))}return e}function Ue(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(a){w.__e(a,n)}}function ht(e,t,n){var r,a;if(w.unmount&&w.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ue(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){w.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ht(r[a],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function Yn(e,t,n){return this.constructor(e,n)}function Oe(e,t,n){var r,a,o,s;t==document&&(t=document.documentElement),w.__&&w.__(e,t),a=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Le(t,e=(!r&&n||t).__k=ee(A,null,[e]),a||de,de,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?me.call(t.childNodes):null,o,!r&&n?n:a?a.__e:t.firstChild,r,s),_t(o,e,s)}me=pe.slice,w={__e:function(e,t,n,r){for(var a,o,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,r||{}),s=a.__d),s)return a.__E=a}catch(i){e=i}throw e}},st=0,Hn=function(e){return e!=null&&e.constructor===void 0},M.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$({},this.state),typeof e=="function"&&(e=e($({},n),this.props)),e&&$(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ot(this))},M.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ot(this))},M.prototype.render=A,W=[],lt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ct=function(e,t){return e.__v.__b-t.__v.__b},_e.__r=0,Ae=Math.random().toString(8),ue="__d"+Ae,Z="__a"+Ae,ut=/(PointerCapture)$|Capture$/i,Ie=0,Fe=it(!1),Pe=it(!0),Bn=0;var ne,E,$e,bt,be=0,Et=[],C=w,gt=C.__b,yt=C.__r,vt=C.diffed,wt=C.__c,xt=C.unmount,kt=C.__;function He(e,t){C.__h&&C.__h(E,e,be||t),be=0;var n=E.__H||(E.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function F(e){return be=1,Ct(Rt,e)}function Ct(e,t,n){var r=He(ne++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Rt(void 0,t),function(i){var f=r.__N?r.__N[0]:r.__[0],u=r.t(f,i);f!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=E,!E.__f)){var a=function(i,f,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(p){return p.__c});if(c.every(function(p){return!p.__N}))return!o||o.call(this,i,f,u);var l=r.__c.props!==i;return c.some(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(l=!0)}}),o&&o.call(this,i,f,u)||l};E.__f=!0;var o=E.shouldComponentUpdate,s=E.componentWillUpdate;E.componentWillUpdate=function(i,f,u){if(this.__e){var c=o;o=void 0,a(i,f,u),o=c}s&&s.call(this,i,f,u)},E.shouldComponentUpdate=a}return r.__N||r.__}function z(e,t){var n=He(ne++,3);!C.__s&&Tt(n.__H,t)&&(n.__=e,n.u=t,E.__H.__h.push(n))}function ge(e){return be=5,Nt(function(){return{current:e}},[])}function Nt(e,t){var n=He(ne++,7);return Tt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Gn(){for(var e;e=Et.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(he),t.__h.some(We),t.__h=[]}catch(n){t.__h=[],C.__e(n,e.__v)}}}C.__b=function(e){E=null,gt&>(e)},C.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),kt&&kt(e,t)},C.__r=function(e){yt&&yt(e),ne=0;var t=(E=e.__c).__H;t&&($e===E?(t.__h=[],E.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(he),t.__h.some(We),t.__h=[],ne=0)),$e=E},C.diffed=function(e){vt&&vt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Et.push(t)!==1&&bt===C.requestAnimationFrame||((bt=C.requestAnimationFrame)||Kn)(Gn)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),$e=E=null},C.__c=function(e,t){t.some(function(n){try{n.__h.some(he),n.__h=n.__h.filter(function(r){return!r.__||We(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],C.__e(r,n.__v)}}),wt&&wt(e,t)},C.unmount=function(e){xt&&xt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{he(r)}catch(a){t=a}}),n.__H=void 0,t&&C.__e(t,n.__v))};var St=typeof requestAnimationFrame=="function";function Kn(e){var t,n=function(){clearTimeout(r),St&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);St&&(t=requestAnimationFrame(n))}function he(e){var t=E,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),E=t}function We(e){var t=E;e.__c=e.__(),E=t}function Tt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Rt(e,t){return typeof t=="function"?t(e):t}function Qn(e,t){for(var n in t)e[n]=t[n];return e}function At(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ft(e,t){this.props=e,this.context=t}(Ft.prototype=new M).isPureReactComponent=!0,Ft.prototype.shouldComponentUpdate=function(e,t){return At(this.props,e)||At(this.state,t)};var Pt=w.__b;w.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pt&&Pt(e)};var qo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var er=w.__e;w.__e=function(e,t,n,r){if(e.then){for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t)}er(e,t,n,r)};var Dt=w.unmount;function $t(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Qn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return $t(r,t,n)})),e}function Wt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Wt(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Be(){this.__u=0,this.o=null,this.__b=null}function Ht(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ye(){this.i=null,this.l=null}w.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Dt&&Dt(e)},(Be.prototype=new M).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var a=Ht(r.__v),o=!1,s=function(){o||r.__z||(o=!0,n.__R=null,a?a(f):f())};n.__R=s;var i=n.__P;n.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Wt(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.__P=i,c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Be.prototype.componentWillUnmount=function(){this.o=[]},Be.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]=$t(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&ee(A,null,e.fallback);return a&&(a.__u&=-33),[ee(A,null,t.__a?null:e.children),a]};var It=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!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]}};(ye.prototype=new M).__a=function(e){var t=this,n=Ht(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),It(t,e,r)):a()};n?n(o):o()}},ye.prototype.render=function(e){this.i=null,this.l=new Map;var t=te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ye.prototype.componentDidUpdate=ye.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){It(e,n,t)})};var tr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nr=/^(?: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]/,rr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,or=/[A-Z0-9]/g,ar=typeof document<"u",ir=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Bt(e,t,n){return t.__k==null&&(t.textContent=""),Oe(e,t),typeof n=="function"&&n(),e?e.__c:null}M.prototype.isReactComponent=!0,["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 Mt=w.event;w.event=function(e){return Mt&&(e=Mt(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var zt,sr={configurable:!0,get:function(){return this.class}},Lt=w.vnode;w.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,a={},o=r.indexOf("-")==-1;for(var s in n){var i=n[s];if(!(s==="value"&&"defaultValue"in n&&i==null||ar&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var f=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&i===!0?i="":f==="translate"&&i==="no"?i=!1:f[0]==="o"&&f[1]==="n"?f==="ondoubleclick"?s="ondblclick":f!=="onchange"||r!=="input"&&r!=="textarea"||ir(n.type)?f==="onfocus"?s="onfocusin":f==="onblur"?s="onfocusout":rr.test(s)&&(s=f):f=s="oninput":o&&nr.test(s)?s=s.replace(or,"-$&").toLowerCase():i===null&&(i=void 0),f==="oninput"&&a[s=f]&&(s="oninputCapture"),a[s]=i}}r=="select"&&(a.multiple&&Array.isArray(a.value)&&(a.value=te(n.children).forEach(function(u){u.props.selected=a.value.indexOf(u.props.value)!=-1})),a.defaultValue!=null&&(a.value=te(n.children).forEach(function(u){u.props.selected=a.multiple?a.defaultValue.indexOf(u.props.value)!=-1:a.defaultValue==u.props.value}))),n.class&&!n.className?(a.class=n.class,Object.defineProperty(a,"className",sr)):n.className&&(a.class=a.className=n.className),t.props=a})(e),e.$$typeof=tr,Lt&&Lt(e)};var Ut=w.__r;w.__r=function(e){Ut&&Ut(e),zt=e.__c};var Ot=w.diffed;w.diffed=function(e){Ot&&Ot(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),zt=null};function Vt(e){return!!e.__k&&(Oe(null,e),!0)}function jt(e){return{render:function(t){Bt(t,e)},unmount:function(){Vt(e)}}}var Xt="data-feedback-overlay";function qt(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[^\w-]/g,t=>`\\${t}`)}function lr(e,t=5){let n=[],r=e;for(;r&&n.length<t&&r!==document.body&&r!==document.documentElement;){let a=r.getAttribute("data-testid");if(a)return n.unshift(`[data-testid="${qt(a)}"]`),n.join(" > ");if(r.id)return n.unshift(`#${qt(r.id)}`),n.join(" > ");let o=r.tagName.toLowerCase(),s=r.parentElement;if(s){let i=Array.from(s.children).filter(f=>f.tagName===r.tagName);i.length>1&&(o+=`:nth-of-type(${i.indexOf(r)+1})`)}n.unshift(o),r=s}return n.join(" > ")}function cr(e,t){return document.elementsFromPoint(e,t).find(r=>!r.closest(`[${Xt}]`))??null}function Yt(e,t){let n=cr(e,t);return n&&lr(n)||null}var ze=Xt;var tn="[modern-screenshot]",H=typeof window<"u",ur=H&&"Worker"in window,ea=H&&"atob"in window,ta=H&&"btoa"in window,qe=H?window.navigator?.userAgent:"",nn=qe.includes("Chrome"),ve=qe.includes("AppleWebKit")&&!nn,Xe=qe.includes("Firefox"),fr=e=>e&&"__CONTEXT__"in e,dr=e=>e.constructor.name==="CSSFontFaceRule",pr=e=>e.constructor.name==="CSSImportRule",_r=e=>e.constructor.name==="CSSLayerBlockRule",U=e=>e.nodeType===1,ie=e=>typeof e.className=="object",rn=e=>e.tagName==="image",mr=e=>e.tagName==="use",re=e=>U(e)&&typeof e.style<"u"&&!ie(e),hr=e=>e.nodeType===8,br=e=>e.nodeType===3,X=e=>e.tagName==="IMG",we=e=>e.tagName==="VIDEO",gr=e=>e.tagName==="CANVAS",yr=e=>e.tagName==="TEXTAREA",vr=e=>e.tagName==="INPUT",wr=e=>e.tagName==="STYLE",xr=e=>e.tagName==="SCRIPT",kr=e=>e.tagName==="SELECT",Sr=e=>e.tagName==="SLOT",Er=e=>e.tagName==="IFRAME",Cr=(...e)=>console.warn(tn,...e);function Nr(e){let t=e?.createElement?.("canvas");return t&&(t.height=t.width=1),!!t&&"toDataURL"in t&&!!t.toDataURL("image/webp").includes("image/webp")}var Ve=e=>e.startsWith("data:");function on(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(H&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!H)return e;let n=xe().implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}function xe(e){return(e&&U(e)?e?.ownerDocument:e)??window.document}var ke="http://www.w3.org/2000/svg";function Tr(e,t,n){let r=xe(n).createElementNS(ke,"svg");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),r}function Rr(e,t){let n=new XMLSerializer().serializeToString(e);return t&&(n=n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`}function Ar(e,t){return new Promise((n,r)=>{let a=new FileReader;a.onload=()=>n(a.result),a.onerror=()=>r(a.error),a.onabort=()=>r(new Error(`Failed read blob to ${t}`)),t==="dataUrl"?a.readAsDataURL(e):t==="arrayBuffer"&&a.readAsArrayBuffer(e)})}var Fr=e=>Ar(e,"dataUrl");function q(e,t){let n=xe(t).createElement("img");return n.decoding="sync",n.loading="eager",n.src=e,n}function oe(e,t){return new Promise(n=>{let{timeout:r,ownerDocument:a,onError:o,onWarn:s}=t??{},i=typeof e=="string"?q(e,xe(a)):e,f=null,u=null;function c(){n(i),f&&clearTimeout(f),u?.()}if(r&&(f=setTimeout(c,r)),we(i)){let l=i.currentSrc||i.src;if(!l)return i.poster?oe(i.poster,t).then(n):c();if(i.readyState>=2)return c();let p=c,d=b=>{s?.("Failed video load",l,b),o?.(b),c()};u=()=>{i.removeEventListener("loadeddata",p),i.removeEventListener("error",d)},i.addEventListener("loadeddata",p,{once:!0}),i.addEventListener("error",d,{once:!0})}else{let l=rn(i)?i.href.baseVal:i.currentSrc||i.src;if(!l)return c();let p=async()=>{if(X(i)&&"decode"in i)try{await i.decode()}catch(b){s?.("Failed to decode image, trying to render anyway",i.dataset.originalSrc||l,b)}c()},d=b=>{s?.("Failed image load",i.dataset.originalSrc||l,b),c()};if(X(i)&&i.complete)return p();u=()=>{i.removeEventListener("load",p),i.removeEventListener("error",d)},i.addEventListener("load",p,{once:!0}),i.addEventListener("error",d,{once:!0})}})}async function Pr(e,t){re(e)&&(X(e)||we(e)?await oe(e,t):await Promise.all(["img","video"].flatMap(n=>Array.from(e.querySelectorAll(n)).map(r=>oe(r,t)))))}var an=(function(){let t=0,n=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${n()}${t}`)})();function sn(e){return e?.split(",").map(t=>t.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var Gt=0;function Dr(e){let t=`${tn}[#${Gt}]`;return Gt++,{time:n=>e&&console.time(`${t} ${n}`),timeEnd:n=>e&&console.timeEnd(`${t} ${n}`),warn:(...n)=>e&&Cr(...n)}}function Ir(e){return{cache:e?"no-cache":"force-cache"}}async function ln(e,t){return fr(e)?e:Mr(e,{...t,autoDestruct:!0})}async function Mr(e,t){let{scale:n=1,workerUrl:r,workerNumber:a=1}=t||{},o=!!t?.debug,s=t?.features??!0,i=e.ownerDocument??(H?window.document:void 0),f=e.ownerDocument?.defaultView??(H?window:void 0),u=new Map,c={width:0,height:0,quality:1,type:"image/png",scale:n,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:o,fetch:{requestInit:Ir(t?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...t?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:a,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...t,__CONTEXT__:!0,log:Dr(o),node:e,ownerDocument:i,ownerWindow:f,dpi:n===1?null:96*n,svgStyleElement:cn(i),svgDefsElement:i?.createElementNS(ke,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:ur&&r&&a?a:0})].map(()=>{try{let d=new Worker(r);return d.onmessage=async b=>{let{url:m,result:g}=b.data;g?u.get(m)?.resolve?.(g):u.get(m)?.reject?.(new Error(`Error receiving message from worker: ${m}`))},d.onmessageerror=b=>{let{url:m}=b.data;u.get(m)?.reject?.(new Error(`Error receiving message from worker: ${m}`))},d}catch(d){return c.log.warn("Failed to new Worker",d),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[Nr(i)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:u,drawImageCount:0,tasks:[],features:s,isEnable:d=>d==="restoreScrollPosition"?typeof s=="boolean"?!1:s[d]??!1:typeof s=="boolean"?s:s[d]??!0,shadowRoots:[]};c.log.time("wait until load"),await Pr(e,{timeout:c.timeout,onWarn:c.log.warn}),c.log.timeEnd("wait until load");let{width:l,height:p}=Lr(e,c);return c.width=l,c.height=p,c}function cn(e){if(!e)return;let t=e.createElement("style"),n=t.ownerDocument.createTextNode(`
|
|
1
|
+
"use strict";var LinearFeedback=(()=>{var Te=Object.defineProperty;var Vn=Object.getOwnPropertyDescriptor;var jn=Object.getOwnPropertyNames;var qn=Object.prototype.hasOwnProperty;var Xn=(e,t)=>{for(var n in t)Te(e,n,{get:t[n],enumerable:!0})},Yn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jn(t))!qn.call(e,a)&&a!==n&&Te(e,a,{get:()=>t[a],enumerable:!(r=Vn(t,a))||r.enumerable});return e};var Gn=e=>Yn(Te({},"__esModule",{value:!0}),e);var Ho={};Xn(Ho,{destroy:()=>Ge,init:()=>Ce});var he,w,ft,Kn,H,st,dt,pt,Ae,fe,ee,_t,Ie,Fe,Pe,Jn,pe={},_e=[],Zn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ne(e,t,n){var r,a,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?he.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return de(e,s,r,a,null)}function de(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++ft,__i:-1,__u:0};return a==null&&w.vnode!=null&&w.vnode(o),o}function F(e){return e.children}function L(e,t){this.props=e,this.context=t}function G(e,t){if(t==null)return e.__?G(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?G(e):null}function Qn(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],o=$({},t);o.__v=t.__v+1,w.vnode&&w.vnode(o),Le(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??G(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,gt(r,o,a),t.__e=t.__=null,o.__e!=n&&mt(o)}}function mt(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),mt(e)}function lt(e){(!e.__d&&(e.__d=!0)&&H.push(e)&&!me.__r++||st!=w.debounceRendering)&&((st=w.debounceRendering)||dt)(me)}function me(){try{for(var e,t=1;H.length;)H.length>t&&H.sort(pt),e=H.shift(),t=H.length,Qn(e)}finally{H.length=me.__r=0}}function ht(e,t,n,r,a,o,s,i,f,u,c){var l,p,d,b,m,y,h,v=r&&r.__k||_e,x=t.length;for(f=er(n,t,v,f,x),l=0;l<x;l++)(d=n.__k[l])!=null&&(p=d.__i!=-1&&v[d.__i]||pe,d.__i=l,y=Le(e,d,p,a,o,s,i,f,u,c),b=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&Ue(p.ref,null,d),c.push(d.ref,d.__c||b,d)),m==null&&b!=null&&(m=b),(h=!!(4&d.__u))||p.__k===d.__k?(f=bt(d,f,e,h),h&&p.__e&&(p.__e=null)):typeof d.type=="function"&&y!==void 0?f=y:b&&(f=b.nextSibling),d.__u&=-7);return n.__e=m,f}function er(e,t,n,r,a){var o,s,i,f,u,c=n.length,l=c,p=0;for(e.__k=new Array(a),o=0;o<a;o++)(s=t[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[o]=de(null,s,null,null,null):te(s)?s=e.__k[o]=de(F,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=de(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,f=o+p,s.__=e,s.__b=e.__b+1,i=null,(u=s.__i=tr(s,n,f,l))!=-1&&(l--,(i=n[u])&&(i.__u|=2)),i==null||i.__v==null?(u==-1&&(a>c?p--:a<c&&p++),typeof s.type!="function"&&(s.__u|=4)):u!=f&&(u==f-1?p--:u==f+1?p++:(u>f?p--:p++,s.__u|=4))):e.__k[o]=null;if(l)for(o=0;o<c;o++)(i=n[o])!=null&&(2&i.__u)==0&&(i.__e==r&&(r=G(i)),vt(i,i));return r}function bt(e,t,n,r){var a,o;if(typeof e.type=="function"){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,t=bt(a[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=G(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function re(e,t){return t=t||[],e==null||typeof e=="boolean"||(te(e)?e.some(function(n){re(n,t)}):t.push(e)),t}function tr(e,t,n,r){var a,o,s,i=e.key,f=e.type,u=t[n],c=u!=null&&(2&u.__u)==0;if(u===null&&i==null||c&&i==u.key&&f==u.type)return n;if(r>(c?1:0)){for(a=n-1,o=n+1;a>=0||o<t.length;)if((u=t[s=a>=0?a--:o++])!=null&&(2&u.__u)==0&&i==u.key&&f==u.type)return s}return-1}function ct(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Zn.test(t)?n:n+"px"}function ue(e,t,n,r,a){var o,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ct(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ct(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(_t,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n[ee]=r[ee]:(n[ee]=Ie,e.addEventListener(t,o?Pe:Fe,o)):e.removeEventListener(t,o?Pe:Fe,o);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function ut(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[fe]==null)t[fe]=Ie++;else if(t[fe]<n[ee])return;return n(w.event?w.event(t):t)}}}function Le(e,t,n,r,a,o,s,i,f,u){var c,l,p,d,b,m,y,h,v,x,k,R,N,A,O,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),o=[i=t.__e=n.__e]),(c=w.__b)&&c(t);e:if(typeof T=="function")try{if(h=t.props,v=T.prototype&&T.prototype.render,x=(c=T.contextType)&&r[c.__c],k=c?x?x.props.value:c.__:r,n.__c?y=(l=t.__c=n.__c).__=l.__E:(v?t.__c=l=new T(h,k):(t.__c=l=new L(h,k),l.constructor=T,l.render=rr),x&&x.sub(l),l.state||(l.state={}),l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),v&&l.__s==null&&(l.__s=l.state),v&&T.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$({},l.__s)),$(l.__s,T.getDerivedStateFromProps(h,l.__s))),d=l.props,b=l.state,l.__v=t,p)v&&T.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),v&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&h!==d&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(h,k),t.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(h,l.__s,k)===!1){t.__v!=n.__v&&(l.props=h,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(M){M&&(M.__=t)}),_e.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(h,l.__s,k),v&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(d,b,m)})}if(l.context=k,l.props=h,l.__P=e,l.__e=!1,R=w.__r,N=0,v)l.state=l.__s,l.__d=!1,R&&R(t),c=l.render(l.props,l.state,l.context),_e.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,R&&R(t),c=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=$($({},r),l.getChildContext())),v&&!p&&l.getSnapshotBeforeUpdate!=null&&(m=l.getSnapshotBeforeUpdate(d,b)),A=c!=null&&c.type===F&&c.key==null?yt(c.props.children):c,i=ht(e,te(A)?A:[A],t,n,r,a,o,s,i,f,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),y&&(l.__E=l.__=null)}catch(M){if(t.__v=null,f||o!=null)if(M.then){for(t.__u|=f?160:128;i&&i.nodeType==8&&i.nextSibling;)i=i.nextSibling;o[o.indexOf(i)]=null,t.__e=i}else{for(O=o.length;O--;)Me(o[O]);De(t)}else t.__e=n.__e,t.__k=n.__k,M.then||De(t);w.__e(M,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):i=t.__e=nr(n.__e,t,n,r,a,o,s,f,u);return(c=w.diffed)&&c(t),128&t.__u?void 0:i}function De(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(De))}function gt(e,t,n){for(var r=0;r<n.length;r++)Ue(n[r],n[++r],n[++r]);w.__c&&w.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(o){o.call(a)})}catch(o){w.__e(o,a.__v)}})}function yt(e){return typeof e!="object"||e==null||e.__b>0?e:te(e)?e.map(yt):e.constructor!==void 0?null:$({},e)}function nr(e,t,n,r,a,o,s,i,f){var u,c,l,p,d,b,m,y=n.props||pe,h=t.props,v=t.type;if(v=="svg"?a="http://www.w3.org/2000/svg":v=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((d=o[u])&&"setAttribute"in d==!!v&&(v?d.localName==v:d.nodeType==3)){e=d,o[u]=null;break}}if(e==null){if(v==null)return document.createTextNode(h);e=document.createElementNS(a,v,h.is&&h),i&&(w.__m&&w.__m(t,o),i=!1),o=null}if(v==null)y===h||i&&e.data==h||(e.data=h);else{if(o=v=="textarea"&&h.defaultValue!=null?null:o&&he.call(e.childNodes),!i&&o!=null)for(y={},u=0;u<e.attributes.length;u++)y[(d=e.attributes[u]).name]=d.value;for(u in y)d=y[u],u=="dangerouslySetInnerHTML"?l=d:u=="children"||u in h||u=="value"&&"defaultValue"in h||u=="checked"&&"defaultChecked"in h||ue(e,u,null,d,a);for(u in h)d=h[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?c=d:u=="value"?b=d:u=="checked"?m=d:i&&typeof d!="function"||y[u]===d||ue(e,u,d,y[u],a);if(c)i||l&&(c.__html==l.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(l&&(e.innerHTML=""),ht(t.type=="template"?e.content:e,te(p)?p:[p],t,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,s,o?o[0]:n.__k&&G(n,0),i,f),o!=null)for(u=o.length;u--;)Me(o[u]);i&&v!="textarea"||(u="value",v=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[u]||v=="progress"&&!b||v=="option"&&b!=y[u])&&ue(e,u,b,y[u],a),u="checked",m!=null&&m!=e[u]&&ue(e,u,m,y[u],a))}return e}function Ue(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(a){w.__e(a,n)}}function vt(e,t,n){var r,a;if(w.unmount&&w.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ue(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){w.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&vt(r[a],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function rr(e,t,n){return this.constructor(e,n)}function Oe(e,t,n){var r,a,o,s;t==document&&(t=document.documentElement),w.__&&w.__(e,t),a=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Le(t,e=(!r&&n||t).__k=ne(F,null,[e]),a||pe,pe,t.namespaceURI,!r&&n?[n]:a?null:t.firstChild?he.call(t.childNodes):null,o,!r&&n?n:a?a.__e:t.firstChild,r,s),gt(o,e,s)}he=_e.slice,w={__e:function(e,t,n,r){for(var a,o,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,r||{}),s=a.__d),s)return a.__E=a}catch(i){e=i}throw e}},ft=0,Kn=function(e){return e!=null&&e.constructor===void 0},L.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$({},this.state),typeof e=="function"&&(e=e($({},n),this.props)),e&&$(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),lt(this))},L.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),lt(this))},L.prototype.render=F,H=[],dt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,pt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,Ae=Math.random().toString(8),fe="__d"+Ae,ee="__a"+Ae,_t=/(PointerCapture)$|Capture$/i,Ie=0,Fe=ut(!1),Pe=ut(!0),Jn=0;var oe,E,$e,wt,ge=0,Tt=[],C=w,xt=C.__b,kt=C.__r,St=C.diffed,Et=C.__c,Ct=C.unmount,Nt=C.__;function He(e,t){C.__h&&C.__h(E,e,ge||t),ge=0;var n=E.__H||(E.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function P(e){return ge=1,At(Dt,e)}function At(e,t,n){var r=He(oe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Dt(void 0,t),function(i){var f=r.__N?r.__N[0]:r.__[0],u=r.t(f,i);f!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=E,!E.__f)){var a=function(i,f,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(p){return p.__c});if(c.every(function(p){return!p.__N}))return!o||o.call(this,i,f,u);var l=r.__c.props!==i;return c.some(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(l=!0)}}),o&&o.call(this,i,f,u)||l};E.__f=!0;var o=E.shouldComponentUpdate,s=E.componentWillUpdate;E.componentWillUpdate=function(i,f,u){if(this.__e){var c=o;o=void 0,a(i,f,u),o=c}s&&s.call(this,i,f,u)},E.shouldComponentUpdate=a}return r.__N||r.__}function W(e,t){var n=He(oe++,3);!C.__s&&Pt(n.__H,t)&&(n.__=e,n.u=t,E.__H.__h.push(n))}function q(e){return ge=5,Ft(function(){return{current:e}},[])}function Ft(e,t){var n=He(oe++,7);return Pt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function or(){for(var e;e=Tt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(be),t.__h.some(We),t.__h=[]}catch(n){t.__h=[],C.__e(n,e.__v)}}}C.__b=function(e){E=null,xt&&xt(e)},C.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Nt&&Nt(e,t)},C.__r=function(e){kt&&kt(e),oe=0;var t=(E=e.__c).__H;t&&($e===E?(t.__h=[],E.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(be),t.__h.some(We),t.__h=[],oe=0)),$e=E},C.diffed=function(e){St&&St(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Tt.push(t)!==1&&wt===C.requestAnimationFrame||((wt=C.requestAnimationFrame)||ar)(or)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),$e=E=null},C.__c=function(e,t){t.some(function(n){try{n.__h.some(be),n.__h=n.__h.filter(function(r){return!r.__||We(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],C.__e(r,n.__v)}}),Et&&Et(e,t)},C.unmount=function(e){Ct&&Ct(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{be(r)}catch(a){t=a}}),n.__H=void 0,t&&C.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function ar(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function be(e){var t=E,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),E=t}function We(e){var t=E;e.__c=e.__(),E=t}function Pt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Dt(e,t){return typeof t=="function"?t(e):t}function lr(e,t){for(var n in t)e[n]=t[n];return e}function It(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Mt(e,t){this.props=e,this.context=t}(Mt.prototype=new L).isPureReactComponent=!0,Mt.prototype.shouldComponentUpdate=function(e,t){return It(this.props,e)||It(this.state,t)};var Lt=w.__b;w.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Lt&&Lt(e)};var na=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var cr=w.__e;w.__e=function(e,t,n,r){if(e.then){for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t)}cr(e,t,n,r)};var Ut=w.unmount;function zt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=lr({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return zt(r,t,n)})),e}function Vt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Vt(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Be(){this.__u=0,this.o=null,this.__b=null}function jt(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ye(){this.i=null,this.l=null}w.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ut&&Ut(e)},(Be.prototype=new L).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var a=jt(r.__v),o=!1,s=function(){o||r.__z||(o=!0,n.__R=null,a?a(f):f())};n.__R=s;var i=n.__P;n.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Vt(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.__P=i,c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Be.prototype.componentWillUnmount=function(){this.o=[]},Be.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]=zt(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&ne(F,null,e.fallback);return a&&(a.__u&=-33),[ne(F,null,t.__a?null:e.children),a]};var Ot=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!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]}};(ye.prototype=new L).__a=function(e){var t=this,n=jt(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),Ot(t,e,r)):a()};n?n(o):o()}},ye.prototype.render=function(e){this.i=null,this.l=new Map;var t=re(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ye.prototype.componentDidUpdate=ye.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ot(e,n,t)})};var ur=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,fr=/^(?: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]/,dr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,pr=/[A-Z0-9]/g,_r=typeof document<"u",mr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function qt(e,t,n){return t.__k==null&&(t.textContent=""),Oe(e,t),typeof n=="function"&&n(),e?e.__c:null}L.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(L.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=w.event;w.event=function(e){return $t&&(e=$t(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Xt,hr={configurable:!0,get:function(){return this.class}},Wt=w.vnode;w.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,a={},o=r.indexOf("-")==-1;for(var s in n){var i=n[s];if(!(s==="value"&&"defaultValue"in n&&i==null||_r&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var f=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&i===!0?i="":f==="translate"&&i==="no"?i=!1:f[0]==="o"&&f[1]==="n"?f==="ondoubleclick"?s="ondblclick":f!=="onchange"||r!=="input"&&r!=="textarea"||mr(n.type)?f==="onfocus"?s="onfocusin":f==="onblur"?s="onfocusout":dr.test(s)&&(s=f):f=s="oninput":o&&fr.test(s)?s=s.replace(pr,"-$&").toLowerCase():i===null&&(i=void 0),f==="oninput"&&a[s=f]&&(s="oninputCapture"),a[s]=i}}r=="select"&&(a.multiple&&Array.isArray(a.value)&&(a.value=re(n.children).forEach(function(u){u.props.selected=a.value.indexOf(u.props.value)!=-1})),a.defaultValue!=null&&(a.value=re(n.children).forEach(function(u){u.props.selected=a.multiple?a.defaultValue.indexOf(u.props.value)!=-1:a.defaultValue==u.props.value}))),n.class&&!n.className?(a.class=n.class,Object.defineProperty(a,"className",hr)):n.className&&(a.class=a.className=n.className),t.props=a})(e),e.$$typeof=ur,Wt&&Wt(e)};var Ht=w.__r;w.__r=function(e){Ht&&Ht(e),Xt=e.__c};var Bt=w.diffed;w.diffed=function(e){Bt&&Bt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Xt=null};function Yt(e){return!!e.__k&&(Oe(null,e),!0)}function Gt(e){return{render:function(t){qt(t,e)},unmount:function(){Yt(e)}}}var Jt="data-feedback-overlay";function Kt(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/[^\w-]/g,t=>`\\${t}`)}function br(e,t=5){let n=[],r=e;for(;r&&n.length<t&&r!==document.body&&r!==document.documentElement;){let a=r.getAttribute("data-testid");if(a)return n.unshift(`[data-testid="${Kt(a)}"]`),n.join(" > ");if(r.id)return n.unshift(`#${Kt(r.id)}`),n.join(" > ");let o=r.tagName.toLowerCase(),s=r.parentElement;if(s){let i=Array.from(s.children).filter(f=>f.tagName===r.tagName);i.length>1&&(o+=`:nth-of-type(${i.indexOf(r)+1})`)}n.unshift(o),r=s}return n.join(" > ")}function gr(e,t){return document.elementsFromPoint(e,t).find(r=>!r.closest(`[${Jt}]`))??null}function Zt(e,t){let n=gr(e,t);return n&&br(n)||null}var ze=Jt;var an="[modern-screenshot]",B=typeof window<"u",yr=B&&"Worker"in window,ua=B&&"atob"in window,fa=B&&"btoa"in window,qe=B?window.navigator?.userAgent:"",sn=qe.includes("Chrome"),ve=qe.includes("AppleWebKit")&&!sn,Xe=qe.includes("Firefox"),vr=e=>e&&"__CONTEXT__"in e,wr=e=>e.constructor.name==="CSSFontFaceRule",xr=e=>e.constructor.name==="CSSImportRule",kr=e=>e.constructor.name==="CSSLayerBlockRule",U=e=>e.nodeType===1,le=e=>typeof e.className=="object",ln=e=>e.tagName==="image",Sr=e=>e.tagName==="use",ae=e=>U(e)&&typeof e.style<"u"&&!le(e),Er=e=>e.nodeType===8,Cr=e=>e.nodeType===3,J=e=>e.tagName==="IMG",we=e=>e.tagName==="VIDEO",Nr=e=>e.tagName==="CANVAS",Rr=e=>e.tagName==="TEXTAREA",Tr=e=>e.tagName==="INPUT",Ar=e=>e.tagName==="STYLE",Fr=e=>e.tagName==="SCRIPT",Pr=e=>e.tagName==="SELECT",Dr=e=>e.tagName==="SLOT",Ir=e=>e.tagName==="IFRAME",Mr=(...e)=>console.warn(an,...e);function Lr(e){let t=e?.createElement?.("canvas");return t&&(t.height=t.width=1),!!t&&"toDataURL"in t&&!!t.toDataURL("image/webp").includes("image/webp")}var Ve=e=>e.startsWith("data:");function cn(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(B&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!B)return e;let n=xe().implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}function xe(e){return(e&&U(e)?e?.ownerDocument:e)??window.document}var ke="http://www.w3.org/2000/svg";function Ur(e,t,n){let r=xe(n).createElementNS(ke,"svg");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),r}function Or(e,t){let n=new XMLSerializer().serializeToString(e);return t&&(n=n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`}function $r(e,t){return new Promise((n,r)=>{let a=new FileReader;a.onload=()=>n(a.result),a.onerror=()=>r(a.error),a.onabort=()=>r(new Error(`Failed read blob to ${t}`)),t==="dataUrl"?a.readAsDataURL(e):t==="arrayBuffer"&&a.readAsArrayBuffer(e)})}var Wr=e=>$r(e,"dataUrl");function K(e,t){let n=xe(t).createElement("img");return n.decoding="sync",n.loading="eager",n.src=e,n}function ie(e,t){return new Promise(n=>{let{timeout:r,ownerDocument:a,onError:o,onWarn:s}=t??{},i=typeof e=="string"?K(e,xe(a)):e,f=null,u=null;function c(){n(i),f&&clearTimeout(f),u?.()}if(r&&(f=setTimeout(c,r)),we(i)){let l=i.currentSrc||i.src;if(!l)return i.poster?ie(i.poster,t).then(n):c();if(i.readyState>=2)return c();let p=c,d=b=>{s?.("Failed video load",l,b),o?.(b),c()};u=()=>{i.removeEventListener("loadeddata",p),i.removeEventListener("error",d)},i.addEventListener("loadeddata",p,{once:!0}),i.addEventListener("error",d,{once:!0})}else{let l=ln(i)?i.href.baseVal:i.currentSrc||i.src;if(!l)return c();let p=async()=>{if(J(i)&&"decode"in i)try{await i.decode()}catch(b){s?.("Failed to decode image, trying to render anyway",i.dataset.originalSrc||l,b)}c()},d=b=>{s?.("Failed image load",i.dataset.originalSrc||l,b),c()};if(J(i)&&i.complete)return p();u=()=>{i.removeEventListener("load",p),i.removeEventListener("error",d)},i.addEventListener("load",p,{once:!0}),i.addEventListener("error",d,{once:!0})}})}async function Hr(e,t){ae(e)&&(J(e)||we(e)?await ie(e,t):await Promise.all(["img","video"].flatMap(n=>Array.from(e.querySelectorAll(n)).map(r=>ie(r,t)))))}var un=(function(){let t=0,n=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${n()}${t}`)})();function fn(e){return e?.split(",").map(t=>t.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var Qt=0;function Br(e){let t=`${an}[#${Qt}]`;return Qt++,{time:n=>e&&console.time(`${t} ${n}`),timeEnd:n=>e&&console.timeEnd(`${t} ${n}`),warn:(...n)=>e&&Mr(...n)}}function zr(e){return{cache:e?"no-cache":"force-cache"}}async function dn(e,t){return vr(e)?e:Vr(e,{...t,autoDestruct:!0})}async function Vr(e,t){let{scale:n=1,workerUrl:r,workerNumber:a=1}=t||{},o=!!t?.debug,s=t?.features??!0,i=e.ownerDocument??(B?window.document:void 0),f=e.ownerDocument?.defaultView??(B?window:void 0),u=new Map,c={width:0,height:0,quality:1,type:"image/png",scale:n,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:o,fetch:{requestInit:zr(t?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...t?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:a,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...t,__CONTEXT__:!0,log:Br(o),node:e,ownerDocument:i,ownerWindow:f,dpi:n===1?null:96*n,svgStyleElement:pn(i),svgDefsElement:i?.createElementNS(ke,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:yr&&r&&a?a:0})].map(()=>{try{let d=new Worker(r);return d.onmessage=async b=>{let{url:m,result:y}=b.data;y?u.get(m)?.resolve?.(y):u.get(m)?.reject?.(new Error(`Error receiving message from worker: ${m}`))},d.onmessageerror=b=>{let{url:m}=b.data;u.get(m)?.reject?.(new Error(`Error receiving message from worker: ${m}`))},d}catch(d){return c.log.warn("Failed to new Worker",d),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[Lr(i)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:u,drawImageCount:0,tasks:[],features:s,isEnable:d=>d==="restoreScrollPosition"?typeof s=="boolean"?!1:s[d]??!1:typeof s=="boolean"?s:s[d]??!0,shadowRoots:[]};c.log.time("wait until load"),await Hr(e,{timeout:c.timeout,onWarn:c.log.warn}),c.log.timeEnd("wait until load");let{width:l,height:p}=jr(e,c);return c.width=l,c.height=p,c}function pn(e){if(!e)return;let t=e.createElement("style"),n=t.ownerDocument.createTextNode(`
|
|
2
2
|
.______background-clip--text {
|
|
3
3
|
background-clip: text;
|
|
4
4
|
-webkit-background-clip: text;
|
|
5
5
|
}
|
|
6
|
-
`);return t.appendChild(n),t}function
|
|
7
|
-
`),
|
|
8
|
-
`))}else{let f=Array.from(n.styleSheets).filter(d=>{try{return"cssRules"in d&&!!d.cssRules.length}catch(b){return t.log.warn(`Error while reading CSS rules from ${d.href}`,b),!1}}),u=n.implementation.createHTMLDocument(""),c=u.createElement("style");u.head.appendChild(c);let l=c.sheet;await Promise.all(f.flatMap(d=>Array.from(d.cssRules).map(async b=>{if(
|
|
9
|
-
`)):s.push(
|
|
10
|
-
`))}))})}}var
|
|
6
|
+
`);return t.appendChild(n),t}function jr(e,t){let{width:n,height:r}=t;if(U(e)&&(!n||!r)){let a=e.getBoundingClientRect();n=n||a.width||Number(e.getAttribute("width"))||0,r=r||a.height||Number(e.getAttribute("height"))||0}return{width:n,height:r}}async function qr(e,t){let{log:n,timeout:r,drawImageCount:a,drawImageInterval:o}=t;n.time("image to canvas");let s=await ie(e,{timeout:r,onWarn:t.log.warn}),{canvas:i,context2d:f}=Xr(e.ownerDocument,t),u=()=>{try{f?.drawImage(s,0,0,i.width,i.height)}catch(c){t.log.warn("Failed to drawImage",c)}};if(u(),t.isEnable("fixSvgXmlDecode"))for(let c=0;c<a;c++)await new Promise(l=>{setTimeout(()=>{f?.clearRect(0,0,i.width,i.height),u(),l()},c+o)});return t.drawImageCount=0,n.timeEnd("image to canvas"),i}function Xr(e,t){let{width:n,height:r,scale:a,backgroundColor:o,maximumCanvasSize:s}=t,i=e.createElement("canvas");i.width=Math.floor(n*a),i.height=Math.floor(r*a),i.style.width=`${n}px`,i.style.height=`${r}px`,s&&(i.width>s||i.height>s)&&(i.width>s&&i.height>s?i.width>i.height?(i.height*=s/i.width,i.width=s):(i.width*=s/i.height,i.height=s):i.width>s?(i.height*=s/i.width,i.width=s):(i.width*=s/i.height,i.height=s));let f=i.getContext("2d");return f&&o&&(f.fillStyle=o,f.fillRect(0,0,i.width,i.height)),{canvas:i,context2d:f}}function _n(e,t){if(e.ownerDocument)try{let o=e.toDataURL();if(o!=="data:,")return K(o,e.ownerDocument)}catch(o){t.log.warn("Failed to clone canvas",o)}let n=e.cloneNode(!1),r=e.getContext("2d"),a=n.getContext("2d");try{return r&&a&&a.putImageData(r.getImageData(0,0,e.width,e.height),0,0),n}catch(o){t.log.warn("Failed to clone canvas",o)}return n}function Yr(e,t){try{if(e?.contentDocument?.documentElement)return Ye(e.contentDocument.documentElement,t)}catch(n){t.log.warn("Failed to clone iframe",n)}return e.cloneNode(!1)}function Gr(e){let t=e.cloneNode(!1);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager"),t}async function Kr(e,t){if(e.ownerDocument&&!e.currentSrc&&e.poster)return K(e.poster,e.ownerDocument);let n=e.cloneNode(!1);n.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(n.src=e.currentSrc);let r=n.ownerDocument;if(r){let a=!0;if(await ie(n,{onError:()=>a=!1,onWarn:t.log.warn}),!a)return e.poster?K(e.poster,e.ownerDocument):n;n.currentTime=e.currentTime,await new Promise(s=>{n.addEventListener("seeked",s,{once:!0})});let o=r.createElement("canvas");o.width=e.offsetWidth,o.height=e.offsetHeight;try{let s=o.getContext("2d");s&&s.drawImage(n,0,0,o.width,o.height)}catch(s){return t.log.warn("Failed to clone video",s),e.poster?K(e.poster,e.ownerDocument):n}return _n(o,t)}return n}function Jr(e,t){return Nr(e)?_n(e,t):Ir(e)?Yr(e,t):J(e)?Gr(e):we(e)?Kr(e,t):e.cloneNode(!1)}function Zr(e){let t=e.sandbox;if(!t){let{ownerDocument:n}=e;try{n&&(t=n.createElement("iframe"),t.id=`__SANDBOX__${un()}`,t.width="0",t.height="0",t.style.visibility="hidden",t.style.position="fixed",n.body.appendChild(t),t.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',e.sandbox=t)}catch(r){e.log.warn("Failed to getSandBox",r)}}return t}var Qr=["width","height","-webkit-text-fill-color"],eo=["stroke","fill"];function mn(e,t,n){let{defaultComputedStyles:r}=n,a=e.nodeName.toLowerCase(),o=le(e)&&a!=="svg",s=o?eo.map(m=>[m,e.getAttribute(m)]).filter(([,m])=>m!==null):[],i=[o&&"svg",a,s.map((m,y)=>`${m}=${y}`).join(","),t].filter(Boolean).join(":");if(r.has(i))return r.get(i);let u=Zr(n)?.contentWindow;if(!u)return new Map;let c=u?.document,l,p;o?(l=c.createElementNS(ke,"svg"),p=l.ownerDocument.createElementNS(l.namespaceURI,a),s.forEach(([m,y])=>{p.setAttributeNS(null,m,y)}),l.appendChild(p)):l=p=c.createElement(a),p.textContent=" ",c.body.appendChild(l);let d=u.getComputedStyle(p,t),b=new Map;for(let m=d.length,y=0;y<m;y++){let h=d.item(y);Qr.includes(h)||b.set(h,d.getPropertyValue(h))}return c.body.removeChild(l),r.set(i,b),b}function hn(e,t,n){let r=new Map,a=[],o=new Map;if(n)for(let i of n)s(i);else for(let i=e.length,f=0;f<i;f++){let u=e.item(f);s(u)}for(let i=a.length,f=0;f<i;f++)o.get(a[f])?.forEach((u,c)=>r.set(c,u));function s(i){let f=e.getPropertyValue(i),u=e.getPropertyPriority(i),c=i.lastIndexOf("-"),l=c>-1?i.substring(0,c):void 0;if(l){let p=o.get(l);p||(p=new Map,o.set(l,p)),p.set(i,[f,u])}t.get(i)===f&&!u||(l?a.push(l):r.set(i,[f,u]))}return r}function to(e,t,n,r){let{ownerWindow:a,includeStyleProperties:o,currentParentNodeStyle:s}=r,i=t.style,f=a.getComputedStyle(e),u=mn(e,null,r);s?.forEach((l,p)=>{u.delete(p)});let c=hn(f,u,o);c.delete("transition-property"),c.delete("all"),c.delete("d"),c.delete("content"),n&&(c.delete("position"),c.delete("margin-top"),c.delete("margin-right"),c.delete("margin-bottom"),c.delete("margin-left"),c.delete("margin-block-start"),c.delete("margin-block-end"),c.delete("margin-inline-start"),c.delete("margin-inline-end"),c.set("box-sizing",["border-box",""])),c.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text"),sn&&(c.has("font-kerning")||c.set("font-kerning",["normal",""]),(c.get("overflow-x")?.[0]==="hidden"||c.get("overflow-y")?.[0]==="hidden")&&c.get("text-overflow")?.[0]==="ellipsis"&&e.scrollWidth===e.clientWidth&&c.set("text-overflow",["clip",""]));for(let l=i.length,p=0;p<l;p++)i.removeProperty(i.item(p));return c.forEach(([l,p],d)=>{i.setProperty(d,l,p)}),c}function no(e,t){(Rr(e)||Tr(e)||Pr(e))&&t.setAttribute("value",e.value)}var ro=["::before","::after"],oo=["::-webkit-scrollbar","::-webkit-scrollbar-button","::-webkit-scrollbar-thumb","::-webkit-scrollbar-track","::-webkit-scrollbar-track-piece","::-webkit-scrollbar-corner","::-webkit-resizer"];function ao(e,t,n,r,a){let{ownerWindow:o,svgStyleElement:s,svgStyles:i,currentNodeStyle:f}=r;if(!s||!o)return;function u(c){let l=o.getComputedStyle(e,c),p=l.getPropertyValue("content");if(!p||p==="none")return;a?.(p),p=p.replace(/(')|(")|(counter\(.+\))/g,"");let d=[un()],b=mn(e,c,r);f?.forEach((x,k)=>{b.delete(k)});let m=hn(l,b,r.includeStyleProperties);m.delete("content"),m.delete("-webkit-locale"),m.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text");let y=[`content: '${p}';`];if(m.forEach(([x,k],R)=>{y.push(`${R}: ${x}${k?" !important":""};`)}),y.length===1)return;try{t.className=[t.className,...d].join(" ")}catch(x){r.log.warn("Failed to copyPseudoClass",x);return}let h=y.join(`
|
|
7
|
+
`),v=i.get(h);v||(v=[],i.set(h,v)),v.push(`.${d[0]}${c}`)}ro.forEach(u),n&&oo.forEach(u)}var en=new Set(["symbol"]);async function tn(e,t,n,r,a){if(U(n)&&(Ar(n)||Fr(n))||r.filter&&!r.filter(n))return;en.has(t.nodeName)||en.has(n.nodeName)?r.currentParentNodeStyle=void 0:r.currentParentNodeStyle=r.currentNodeStyle;let o=await Ye(n,r,!1,a);r.isEnable("restoreScrollPosition")&&io(e,o),t.appendChild(o)}async function nn(e,t,n,r){let a=e.firstChild;U(e)&&e.shadowRoot&&(a=e.shadowRoot?.firstChild,n.shadowRoots.push(e.shadowRoot));for(let o=a;o;o=o.nextSibling)if(!Er(o))if(U(o)&&Dr(o)&&typeof o.assignedNodes=="function"){let s=o.assignedNodes();for(let i=0;i<s.length;i++)await tn(e,t,s[i],n,r)}else await tn(e,t,o,n,r)}function io(e,t){if(!ae(e)||!ae(t))return;let{scrollTop:n,scrollLeft:r}=e;if(!n&&!r)return;let{transform:a}=t.style,o=new DOMMatrix(a),{a:s,b:i,c:f,d:u}=o;o.a=1,o.b=0,o.c=0,o.d=1,o.translateSelf(-r,-n),o.a=s,o.b=i,o.c=f,o.d=u,t.style.transform=o.toString()}function so(e,t){let{backgroundColor:n,width:r,height:a,style:o}=t,s=e.style;if(n&&s.setProperty("background-color",n,"important"),r&&s.setProperty("width",`${r}px`,"important"),a&&s.setProperty("height",`${a}px`,"important"),o)for(let i in o)s[i]=o[i]}var lo=/^[\w-:]+$/;async function Ye(e,t,n=!1,r){let{ownerDocument:a,ownerWindow:o,fontFamilies:s,onCloneEachNode:i}=t;if(a&&Cr(e))return r&&/\S/.test(e.data)&&r(e.data),a.createTextNode(e.data);if(a&&o&&U(e)&&(ae(e)||le(e))){let u=await Jr(e,t);if(t.isEnable("removeAbnormalAttributes")){let m=u.getAttributeNames();for(let y=m.length,h=0;h<y;h++){let v=m[h];lo.test(v)||u.removeAttribute(v)}}let c=t.currentNodeStyle=to(e,u,n,t);n&&so(u,t);let l=!1;if(t.isEnable("copyScrollbar")){let m=[c.get("overflow-x")?.[0],c.get("overflow-y")?.[0]];l=m.includes("scroll")||(m.includes("auto")||m.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}let p=c.get("text-transform")?.[0],d=fn(c.get("font-family")?.[0]),b=d?m=>{p==="uppercase"?m=m.toUpperCase():p==="lowercase"?m=m.toLowerCase():p==="capitalize"&&(m=m[0].toUpperCase()+m.substring(1)),d.forEach(y=>{let h=s.get(y);h||s.set(y,h=new Set),m.split("").forEach(v=>h.add(v))})}:void 0;return ao(e,u,l,t,b),no(e,u),we(e)||await nn(e,u,t,b),await i?.(u),u}let f=e.cloneNode(!1);return await nn(e,f,t),await i?.(f),f}function co(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove()}catch(t){e.log.warn("Failed to destroyContext",t)}e.sandbox=void 0}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[],e.shadowRoots=[]}function uo(e){let{url:t,timeout:n,responseType:r,...a}=e,o=new AbortController,s=n?setTimeout(()=>o.abort(),n):void 0;return fetch(t,{signal:o.signal,...a}).then(i=>{if(!i.ok)throw new Error("Failed fetch, not 2xx response",{cause:i});switch(r){case"arrayBuffer":return i.arrayBuffer();case"dataUrl":return i.blob().then(Wr);default:return i.text()}}).finally(()=>clearTimeout(s))}function se(e,t){let{url:n,requestType:r="text",responseType:a="text",imageDom:o}=t,s=n,{timeout:i,acceptOfImage:f,requests:u,fetchFn:c,fetch:{requestInit:l,bypassingCache:p,placeholderImage:d},font:b,workers:m,fontFamilies:y}=e;r==="image"&&(ve||Xe)&&e.drawImageCount++;let h=u.get(n);if(!h){p&&p instanceof RegExp&&p.test(s)&&(s+=(/\?/.test(s)?"&":"?")+new Date().getTime());let v=r.startsWith("font")&&b&&b.minify,x=new Set;v&&r.split(";")[1].split(",").forEach(A=>{y.has(A)&&y.get(A).forEach(O=>x.add(O))});let k=v&&x.size,R={url:s,timeout:i,responseType:k?"arrayBuffer":a,headers:r==="image"?{accept:f}:void 0,...l};h={type:r,resolve:void 0,reject:void 0,response:null},h.response=(async()=>{if(c&&r==="image"){let N=await c(n);if(N)return N}return!ve&&n.startsWith("http")&&m.length?new Promise((N,A)=>{m[u.size&m.length-1].postMessage({rawUrl:n,...R}),h.resolve=N,h.reject=A}):uo(R)})().catch(N=>{if(u.delete(n),r==="image"&&d)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",s),typeof d=="string"?d:d(o);throw N}),u.set(n,h)}return h.response}async function bn(e,t,n,r){if(!gn(e))return e;for(let[a,o]of fo(e,t))try{let s=await se(n,{url:o,requestType:r?"image":"text",responseType:"dataUrl"});e=e.replace(po(a),`$1${s}$3`)}catch(s){n.log.warn("Failed to fetch css data url",a,s)}return e}function gn(e){return/url\((['"]?)([^'"]+?)\1\)/.test(e)}var yn=/url\((['"]?)([^'"]+?)\1\)/g;function fo(e,t){let n=[];return e.replace(yn,(r,a,o)=>(n.push([o,cn(o,t)]),r)),n.filter(([r])=>!Ve(r))}function po(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}var _o=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function mo(e,t){return _o.map(n=>{let r=e.getPropertyValue(n);return!r||r==="none"?null:((ve||Xe)&&t.drawImageCount++,bn(r,null,t,!0).then(a=>{!a||r===a||e.setProperty(n,a,e.getPropertyPriority(n))}))}).filter(Boolean)}function ho(e,t){if(J(e)){let n=e.currentSrc||e.src;if(!Ve(n))return[se(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(r=>{r&&(e.srcset="",e.dataset.originalSrc=n,e.src=r||"")})];(ve||Xe)&&t.drawImageCount++}else if(le(e)&&!Ve(e.href.baseVal)){let n=e.href.baseVal;return[se(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(r=>{r&&(e.dataset.originalSrc=n,e.href.baseVal=r||"")})]}return[]}function bo(e,t){let{ownerDocument:n,svgDefsElement:r}=t,a=e.getAttribute("href")??e.getAttribute("xlink:href");if(!a)return[];let[o,s]=a.split("#");if(s){let i=`#${s}`,f=t.shadowRoots.reduce((u,c)=>u??c.querySelector(`svg ${i}`),n?.querySelector(`svg ${i}`));if(o&&e.setAttribute("href",i),r?.querySelector(i))return[];if(f)return r?.appendChild(f.cloneNode(!0)),[];if(o)return[se(t,{url:o,responseType:"text"}).then(u=>{r?.insertAdjacentHTML("beforeend",u)})]}return[]}function vn(e,t){let{tasks:n}=t;U(e)&&((J(e)||ln(e))&&n.push(...ho(e,t)),Sr(e)&&n.push(...bo(e,t))),ae(e)&&n.push(...mo(e.style,t)),e.childNodes.forEach(r=>{vn(r,t)})}async function go(e,t){let{ownerDocument:n,svgStyleElement:r,fontFamilies:a,fontCssTexts:o,tasks:s,font:i}=t;if(!(!n||!r||!a.size))if(i&&i.cssText){let f=on(i.cssText,t);r.appendChild(n.createTextNode(`${f}
|
|
8
|
+
`))}else{let f=Array.from(n.styleSheets).filter(d=>{try{return"cssRules"in d&&!!d.cssRules.length}catch(b){return t.log.warn(`Error while reading CSS rules from ${d.href}`,b),!1}}),u=n.implementation.createHTMLDocument(""),c=u.createElement("style");u.head.appendChild(c);let l=c.sheet;await Promise.all(f.flatMap(d=>Array.from(d.cssRules).map(async b=>{if(xr(b)){let m=b.href,y="";try{y=await se(t,{url:m,requestType:"text",responseType:"text"})}catch(v){t.log.warn(`Error fetch remote css import from ${m}`,v)}let h=y.replace(yn,(v,x,k)=>v.replace(k,cn(k,m)));for(let v of vo(h))try{l.insertRule(v,l.cssRules.length)}catch(x){t.log.warn("Error inserting rule from remote css import",{rule:v,error:x})}}}))),l.cssRules.length&&f.push(l);let p=[];f.forEach(d=>{je(d.cssRules,p)}),p.filter(d=>wr(d)&&gn(d.style.getPropertyValue("src"))&&fn(d.style.getPropertyValue("font-family"))?.some(b=>a.has(b))).forEach(d=>{let b=d,m=o.get(b.cssText);m?r.appendChild(n.createTextNode(`${m}
|
|
9
|
+
`)):s.push(bn(b.cssText,b.parentStyleSheet?b.parentStyleSheet.href:null,t).then(y=>{y=on(y,t),o.set(b.cssText,y),r.appendChild(n.createTextNode(`${y}
|
|
10
|
+
`))}))})}}var yo=/(\/\*[\s\S]*?\*\/)/g,rn=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function vo(e){if(e==null)return[];let t=[],n=e.replace(yo,"");for(;;){let o=rn.exec(n);if(!o)break;t.push(o[0])}n=n.replace(rn,"");let r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let o=r.exec(n);if(o)a.lastIndex=r.lastIndex;else if(o=a.exec(n),o)r.lastIndex=a.lastIndex;else break;t.push(o[0])}return t}var wo=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xo=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function on(e,t){let{font:n}=t,r=n?n?.preferredFormat:void 0;return r?e.replace(xo,a=>{for(;;){let[o,,s]=wo.exec(a)||[];if(!s)return"";if(s===r)return`src: ${o};`}}):e}function je(e,t=[]){for(let n of Array.from(e))kr(n)?t.push(...je(n.cssRules)):"cssRules"in n?je(n.cssRules,t):t.push(n);return t}var ko=/\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;function So(e){return ko.test(e.innerHTML)}async function Eo(e,t){let n=await dn(e,t);if(U(n.node)&&le(n.node)&&!So(n.node))return n.node;let{ownerDocument:r,log:a,tasks:o,svgStyleElement:s,svgDefsElement:i,svgStyles:f,font:u,progress:c,autoDestruct:l,onCloneNode:p,onEmbedNode:d,onCreateForeignObjectSvg:b}=n;a.time("clone node");let m=await Ye(n.node,n,!0);if(s&&r){let k="";f.forEach((R,N)=>{k+=`${R.join(`,
|
|
11
11
|
`)} {
|
|
12
12
|
${N}
|
|
13
13
|
}
|
|
14
|
-
`}),s.appendChild(r.createTextNode(k))}a.timeEnd("clone node"),await p?.(m),u!==!1&&U(m)&&(a.time("embed web font"),await
|
|
14
|
+
`}),s.appendChild(r.createTextNode(k))}a.timeEnd("clone node"),await p?.(m),u!==!1&&U(m)&&(a.time("embed web font"),await go(m,n),a.timeEnd("embed web font")),a.time("embed node"),vn(m,n);let y=o.length,h=0,v=async()=>{for(;;){let k=o.pop();if(!k)break;try{await k}catch(R){n.log.warn("Failed to run task",R)}c?.(++h,y)}};c?.(h,y),await Promise.all([...Array.from({length:4})].map(v)),a.timeEnd("embed node"),await d?.(m);let x=Co(m,n);return i&&x.insertBefore(i,x.children[0]),s&&x.insertBefore(s,x.children[0]),l&&co(n),await b?.(x),x}function Co(e,t){let{width:n,height:r}=t,a=Ur(n,r,e.ownerDocument),o=a.ownerDocument.createElementNS(a.namespaceURI,"foreignObject");return o.setAttributeNS(null,"x","0%"),o.setAttributeNS(null,"y","0%"),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.append(e),a.appendChild(o),a}async function wn(e,t){let n=await dn(e,t),r=await Eo(n),a=Or(r,n.isEnable("removeControlCharacter"));n.autoDestruct||(n.svgStyleElement=pn(n.ownerDocument),n.svgDefsElement=n.ownerDocument?.createElementNS(ke,"defs"),n.svgStyles.clear());let o=K(a,r.ownerDocument);return await qr(o,n)}var No=1600;async function xn(e,t={}){let n=t.endpoint??"/api/feedback",r=To(e),a=await Ro(e),o={annotation:e,context:r,screenshot:a};try{let s=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(o)});if(!s.ok){let i=await s.text().catch(()=>"");return console.error("[feedback] submit failed",s.status,i),null}return await s.json()}catch(s){return console.error("[feedback] submit error",s),null}}async function Ro(e){try{let t=document.documentElement,n=t.scrollWidth,r=t.scrollHeight,a=window.innerWidth,o=window.innerHeight,s=Math.min(1,No/Math.max(a,o)),i=await wn(document.body,{scale:s,backgroundColor:"#ffffff",filter:p=>!(p instanceof HTMLElement&&p.dataset.feedbackOverlay!==void 0)}),f=i.width/n,u=i.height/r,c=document.createElement("canvas");c.width=Math.max(1,Math.round(a*f)),c.height=Math.max(1,Math.round(o*u));let l=c.getContext("2d");if(l){l.drawImage(i,window.scrollX*f,window.scrollY*u,a*f,o*u,0,0,c.width,c.height);let{x:p,y:d,width:b,height:m}=e.rect,y=(p-window.scrollX)*f,h=(d-window.scrollY)*u;l.lineWidth=Math.max(2,3*f),l.strokeStyle="#ff0055",l.fillStyle="rgba(255, 0, 85, 0.12)",l.fillRect(y,h,b*f,m*u),l.strokeRect(y,h,b*f,m*u)}return c.toDataURL("image/jpeg",.85)}catch(t){return console.warn("[feedback] screenshot capture failed, sending without image",t),null}}function To(e){let t=e.rect.x+e.rect.width/2-window.scrollX,n=e.rect.y+e.rect.height/2-window.scrollY;return{url:window.location.href,pathname:window.location.pathname,title:document.title,viewport:{width:window.innerWidth,height:window.innerHeight,dpr:window.devicePixelRatio},scroll:{x:window.scrollX,y:window.scrollY},userAgent:navigator.userAgent,referrer:document.referrer,elementHint:Zt(t,n),timestamp:new Date().toISOString()}}var Ao=0;function _(e,t,n,r,a,o){t||(t={});var s,i,f=t;if("ref"in f)for(i in f={},t)i=="ref"?s=t[i]:f[i]=t[i];var u={type:e,props:f,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ao,__i:-1,__u:0,__source:a,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(i in s)f[i]===void 0&&(f[i]=s[i]);return w.vnode&&w.vnode(u),u}function X({size:e=16,children:t,...n}){return _("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:t})}var kn=e=>_(X,{...e,children:_("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z"})}),ce=e=>_(X,{...e,children:_("path",{d:"M18 6 6 18M6 6l12 12"})}),Sn=e=>_(X,{...e,children:[_("path",{d:"M12 20h9"}),_("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"})]}),En=e=>_(X,{...e,children:[_("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),_("path",{d:"M22 4 12 14.01l-3-3"})]}),Fo=e=>_(X,{...e,children:[_("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),_("path",{d:"M12 9v4"}),_("path",{d:"M12 17h.01"})]}),Po=e=>_(X,{...e,children:_("path",{d:"M12 19V5M5 12l7-7 7 7"})}),Do=e=>_(X,{...e,strokeWidth:0,children:_("circle",{cx:"12",cy:"12",r:"6",fill:"currentColor"})}),Cn={bug:Fo,improvement:Po,dot:Do};var Nn="lfb-styles",Io=`
|
|
15
15
|
/*
|
|
16
16
|
* Defaults live on .lfb-root (the element that also receives the inline brandColor
|
|
17
17
|
* override) \u2014 NOT on the layers. The layers/FAB inherit from here. If the defaults
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
|
|
39
39
|
.lfb-rect { position: absolute; border: 2px solid var(--lfb-rect); background: rgba(255,0,85,0.12); border-radius: 3px; pointer-events: none; }
|
|
40
40
|
|
|
41
|
+
.lfb-shield { position: fixed; inset: 0; pointer-events: auto; cursor: default; }
|
|
42
|
+
|
|
41
43
|
.lfb-anchor { position: absolute; pointer-events: auto; }
|
|
42
44
|
|
|
43
45
|
.lfb-card {
|
|
@@ -52,6 +54,7 @@
|
|
|
52
54
|
line-height: 1.4;
|
|
53
55
|
}
|
|
54
56
|
.lfb-composer { position: absolute; top: 100%; left: 0; margin-top: 8px; width: 320px; max-width: calc(100vw - 32px); }
|
|
57
|
+
.lfb-composer--above { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 8px; }
|
|
55
58
|
|
|
56
59
|
.lfb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
57
60
|
.lfb-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--lfb-fg-tertiary); }
|
|
@@ -124,4 +127,4 @@
|
|
|
124
127
|
.lfb-toast-text { margin-top: 2px; font-size: 12px; color: var(--lfb-fg-tertiary); }
|
|
125
128
|
.lfb-toast-link { color: var(--lfb-brand); font-weight: 500; text-decoration: none; }
|
|
126
129
|
.lfb-toast-link:hover { text-decoration: underline; }
|
|
127
|
-
`;function
|
|
130
|
+
`;function Rn(){if(typeof document>"u"||document.getElementById(Nn))return;let e=document.createElement("style");e.id=Nn,e.textContent=Io,document.head.appendChild(e)}var Tn=12,An={width:220,height:130},Mo=320,Fn=320,Lo=[{id:"bug",label:"Bug",color:"#ef4444",icon:"bug"},{id:"improvement",label:"Improvement",color:"#22c55e",icon:"improvement"}];function Se({endpoint:e,brandColor:t,position:n="bottom-right",types:r=Lo,nameRequired:a=!0,nameStorageKey:o="wh_feedback_name",fabLabel:s="Give feedback",zIndex:i,requestHeaders:f}){let u=n==="right"||n==="left",[c,l]=P({kind:"idle"}),[p,d]=P(""),[b,m]=P(""),[y,h]=P(!1),[v,x]=P(""),[k,R]=P(r[0]?.id??"bug"),[N,A]=P(!1),[O,T]=P(null),[M,Ne]=P(null),[D,Q]=P(null),Je=q(null),Ze=q(null),Qe=q(null),et=q(!1);et.current=N;let tt=q(!1);tt.current=y,W(()=>{Rn();try{let g=window.localStorage.getItem(o);g&&d(g)}catch{}},[o]),W(()=>{if(c.kind==="idle")return;let g=S=>{if(!(S.key!=="Escape"||et.current)){if(tt.current){h(!1);return}l({kind:"idle"}),Q(null),x(""),T(null),A(!1),h(!1)}};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[c.kind]),W(()=>{if(c.kind==="composing"){let g=window.setTimeout(()=>Je.current?.focus(),0);return()=>window.clearTimeout(g)}if(c.kind==="naming"){let g=window.setTimeout(()=>Ze.current?.focus(),0);return()=>window.clearTimeout(g)}},[c.kind]),W(()=>{y&&Qe.current?.focus()},[y]),W(()=>{if(c.kind!=="drawing"&&c.kind!=="composing")return;let g=document.documentElement,S=g.style.overflow,I=g.style.paddingRight,z=window.innerWidth-g.clientWidth;return g.style.overflow="hidden",z>0&&(g.style.paddingRight=`${z}px`),()=>{g.style.overflow=S,g.style.paddingRight=I}},[c.kind]);let Re=g=>{try{window.localStorage.setItem(o,g)}catch{}},Dn=()=>{if(c.kind==="drawing"||c.kind==="naming"){l({kind:"idle"}),Q(null);return}Ne(null),a&&!p.trim()?(m(""),l({kind:"naming"})):l({kind:"drawing"})},In=g=>{g.preventDefault();let S=b.trim();S&&(d(S),Re(S),l({kind:"drawing"}))},Mn=g=>{if(c.kind!=="drawing")return;g.preventDefault();let S={x:g.clientX,y:g.clientY};Q({start:S,current:S})},Ln=g=>{c.kind!=="drawing"||!D||Q(S=>S&&{...S,current:{x:g.clientX,y:g.clientY}})},Un=g=>{if(c.kind!=="drawing"||!D)return;let S=D.start,I={x:g.clientX,y:g.clientY},z=Math.min(S.x,I.x),V=Math.min(S.y,I.y),j=Math.abs(I.x-S.x),Y=Math.abs(I.y-S.y);(j<Tn||Y<Tn)&&(j=Math.max(j,An.width),Y=Math.max(Y,An.height),z=I.x-j/2,V=I.y-Y/2);let it={x:Math.max(0,z+window.scrollX),y:Math.max(0,V+window.scrollY),width:j,height:Y},$n=V+Y+Fn<=window.innerHeight,Wn=V>=Fn,Hn=!$n&&Wn?"above":"below",Bn=window.scrollX+Math.max(16,window.innerWidth-Mo-16),zn=Math.min(it.x,Bn);Q(null),x(""),R(r[0]?.id??"bug"),T(null),h(!1),l({kind:"composing",rect:it,placement:Hn,anchorX:zn})},nt=()=>{l({kind:"idle"}),x(""),T(null),h(!1),A(!1)},rt=async g=>{if(g.preventDefault(),c.kind!=="composing"||N)return;let S=v.trim();if(!S)return;let I=p.trim(),z=r.find(j=>j.id===k);A(!0),T(null),I&&Re(I);let V=await xn({rect:c.rect,note:S,type:k,typeLabel:z?.label,name:I||void 0},{endpoint:e,headers:f});A(!1),V?(Ne(V),x(""),h(!1),l({kind:"idle"})):T("Couldn't send \u2014 please try again.")},On={display:"contents",...t?{"--lfb-brand":t}:{},...i!=null?{"--lfb-z":String(i)}:{}},ot={[ze]:""},at=D?{left:Math.min(D.start.x,D.current.x),top:Math.min(D.start.y,D.current.y),width:Math.abs(D.current.x-D.start.x),height:Math.abs(D.current.y-D.start.y)}:null;return _("div",{className:"lfb-root",style:On,children:[_("div",{...ot,className:"lfb-doc-layer",children:c.kind==="composing"&&_(F,{children:[_("div",{className:"lfb-shield","aria-hidden":"true"}),_("div",{className:"lfb-rect",style:{left:c.rect.x,top:c.rect.y,width:c.rect.width,height:c.rect.height}}),_("div",{className:"lfb-anchor",style:{left:c.anchorX,top:c.placement==="below"?c.rect.y+c.rect.height:c.rect.y},children:_("form",{className:`lfb-card lfb-composer${c.placement==="above"?" lfb-composer--above":""}`,onSubmit:rt,children:[_("div",{className:"lfb-row",children:[_("span",{className:"lfb-eyebrow",children:"New feedback"}),_("button",{type:"button",className:"lfb-iconbtn","aria-label":"Cancel",onClick:nt,children:_(ce,{})})]}),_("div",{style:{marginTop:12},children:[_("span",{className:"lfb-field-label",children:"Issue type"}),_("div",{className:"lfb-types",children:r.map(g=>{let S=Cn[g.icon??"dot"];return _("button",{type:"button",className:"lfb-type","aria-pressed":k===g.id,onClick:()=>R(g.id),children:[_("span",{className:"lfb-swatch",style:{background:g.color},children:_(S,{size:14})}),g.label]},g.id)})})]}),_("textarea",{ref:Je,className:"lfb-textarea",placeholder:"What's on your mind?",value:v,onChange:g=>x(g.target.value),maxLength:5e3,required:!0,disabled:N,rows:3,onKeyDown:g=>{g.key==="Enter"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),rt(g))}}),y?_("input",{ref:Qe,className:"lfb-input",type:"text",value:p,maxLength:80,onChange:g=>d(g.target.value),onBlur:()=>{let g=p.trim();g&&Re(g),h(!1)},onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),g.target.blur()),g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),h(!1))}}):_("div",{className:"lfb-namerow",children:[_("span",{children:["Posting as ",_("span",{className:"lfb-name",children:p||"anonymous"})]}),_("button",{type:"button",className:"lfb-link",onClick:()=>h(!0),children:[_(Sn,{size:12}),"change"]})]}),O&&_("p",{className:"lfb-error",children:O}),_("div",{className:"lfb-actions",children:[_("button",{type:"button",className:"lfb-btn lfb-btn-ghost",onClick:nt,disabled:N,children:"Cancel"}),_("button",{type:"submit",className:"lfb-btn lfb-btn-primary",disabled:N||!v.trim(),children:N?"Sending\u2026":"Send to Linear"})]})]})})]})}),_("div",{...ot,className:"lfb-fixed-layer",children:[c.kind==="drawing"&&_("div",{className:"lfb-draw",role:"presentation",onMouseDown:Mn,onMouseMove:Ln,onMouseUp:Un,children:[_("div",{className:"lfb-hint",children:"Drag to select an area \xB7 Esc to cancel"}),at&&_("div",{className:"lfb-rect",style:at})]}),c.kind!=="composing"&&_("div",{className:`lfb-stack${n==="bottom-right"?"":` lfb-stack--${n}`}`,children:[c.kind==="naming"&&_("form",{className:"lfb-card",style:{width:288,maxWidth:"calc(100vw - 32px)"},onSubmit:In,children:[_("div",{className:"lfb-row",children:[_("span",{className:"lfb-eyebrow",children:"What's your name?"}),_("button",{type:"button",className:"lfb-iconbtn","aria-label":"Cancel",onClick:()=>l({kind:"idle"}),children:_(ce,{})})]}),_("p",{className:"lfb-sub",children:"Saved locally so you don't have to type it again."}),_("input",{ref:Ze,className:"lfb-input",type:"text",placeholder:"Olivia Rhye",value:b,maxLength:80,required:!0,onChange:g=>m(g.target.value)}),_("div",{className:"lfb-actions",children:[_("button",{type:"button",className:"lfb-btn lfb-btn-ghost",onClick:()=>l({kind:"idle"}),children:"Cancel"}),_("button",{type:"submit",className:"lfb-btn lfb-btn-primary",disabled:!b.trim(),children:"Continue"})]})]}),M&&c.kind==="idle"&&_("div",{className:"lfb-card lfb-toast",children:[_("span",{className:"lfb-toast-icon",children:_(En,{size:20})}),_("div",{className:"lfb-toast-body",children:[_("div",{className:"lfb-toast-title",children:"Feedback sent"}),_("div",{className:"lfb-toast-text",children:["Created ",M.identifier??"an issue",".",M.url&&_(F,{children:[" ",_("a",{className:"lfb-toast-link",href:M.url,target:"_blank",rel:"noopener noreferrer",children:"View in Linear"})]})]})]}),_("button",{type:"button",className:"lfb-iconbtn","aria-label":"Dismiss",onClick:()=>Ne(null),children:_(ce,{})})]}),_("button",{type:"button",className:`lfb-fab${u?" lfb-fab--tab":""}${c.kind==="idle"?"":" lfb-fab--active"}`,"aria-label":c.kind==="idle"?s:"Cancel feedback",title:u?c.kind==="idle"?s:"Cancel feedback":void 0,onClick:Dn,children:[c.kind==="idle"?_(kn,{size:u?22:18}):_(ce,{size:u?22:18}),!u&&_("span",{children:c.kind==="idle"?s:"Cancel"})]})]})]})]})}var Uo=3600*24*90;function Oo(e,t,n,r){typeof document>"u"||(document.cookie=n?`${e}=${t}; path=/; max-age=${r}; SameSite=Lax`:`${e}=; path=/; max-age=0; SameSite=Lax`)}function $o(e,t){return typeof document>"u"?!1:document.cookie.split(";").map(n=>n.trim()).some(n=>n===`${e}=${t}`)}function Pn({urlParam:e="feedback",cookieName:t="wh_feedback",cookieValue:n="1",cookieMaxAgeSeconds:r=Uo,...a}){let[o,s]=P(!1);return W(()=>{if(typeof window>"u")return;let i=new URLSearchParams(window.location.search),f=i.get(e);if(f!=null){let u=f!=="0";Oo(t,n,u,r),s(u),i.delete(e);let c=i.toString(),l=window.location.pathname+(c?`?${c}`:"")+window.location.hash;window.history.replaceState(null,"",l);return}s($o(t,n))},[e,t,n,r]),o?_(Se,{...a}):null}var Ee=null,Z=null;function Ce(e={}){Ge(),Z=document.createElement("div"),Z.setAttribute("data-lfb-embed",""),document.body.appendChild(Z),Ee=Gt(Z);let{mode:t,token:n,...r}=e,a={...r,requestHeaders:n?{"x-feedback-token":n,...r.requestHeaders}:r.requestHeaders};Ee.render(t==="gated"?_(Pn,{...a}):_(Se,{...a}))}function Ge(){Ee?.unmount(),Z?.remove(),Ee=null,Z=null}function Wo(e){let t=e.dataset;return{...t.endpoint?{endpoint:t.endpoint}:{},...t.brandColor?{brandColor:t.brandColor}:{},...t.position?{position:t.position}:{},...t.fabLabel?{fabLabel:t.fabLabel}:{},...t.mode?{mode:t.mode}:{},...t.token?{token:t.token}:{},...t.zIndex?{zIndex:Number(t.zIndex)}:{},...t.nameRequired?{nameRequired:t.nameRequired!=="false"}:{}}}var Ke=document.currentScript;if(Ke&&Ke.dataset.manual!=="true"){let e={...Wo(Ke),...window.lfbConfig??{}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ce(e),{once:!0}):Ce(e)}return Gn(Ho);})();
|