PageSourceSearch

https://www.wellairsolutions.com/_next/static/chunks/0nhh87itedjw1.js

js wellairsolutions.com collected 2026-10-04 22:52:20 UTC 1,236,382 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57136,e=>{e.v({card:"products-catalog-card-module__32y-xa__card",content:"products-catalog-card-module__32y-xa__content",copy:"products-catalog-card-module__32y-xa__copy",description:"products-catalog-card-module__32y-xa__description",descriptionMeasure:"products-catalog-card-module__32y-xa__descriptionMeasure",imageArea:"products-catalog-card-module__32y-xa__imageArea",productImage:"products-catalog-card-module__32y-xa__productImage",title:"products-catalog-card-module__32y-xa__title",viewMore:"products-catalog-card-module__32y-xa__viewMore"})},884033,e=>{e.v({arrow:"products-text-link-module__IDq93a__arrow",label:"products-text-link-module__IDq93a__label",link:"products-text-link-module__IDq93a__link"})},318103,e=>{"use strict";var t=e.i(843476),r=e.i(522016),n=e.i(884033);function i(){return(0,t.jsx)("svg",{className:n.default.arrow,viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M8.4136 0.915402C7.34943 3.35348 6.96711 5.93875 7.26455 8.46124C6.43959 7.61271 5.91698 6.38249 5.49538 5.04837L1.99352 8.65028L0.996693 7.62498L4.49855 4.02306C3.30461 3.69549 2.20958 3.05404 1.11104 2.06265C3.73252 2.2654 6.21371 2.04677 8.4136 0.915402Z",fill:"currentColor"})})}function a({href:e,label:s,className:o}){if(!s?.trim())return null;let l=o?`${n.default.link} ${o}`:n.default.link,u=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:n.default.label,children:s}),(0,t.jsx)(i,{})]});return e?(0,t.jsx)(r.default,{href:e,className:l,children:u}):(0,t.jsx)("span",{className:l,"aria-hidden":"true",children:u})}e.s(["ProductsTextLink",0,a])},4889,e=>{e.v({accent:"products-catalog-module__ubgs2q__accent",card:"products-catalog-module__ubgs2q__card",carousel:"products-catalog-module__ubgs2q__carousel",carouselDots:"products-catalog-module__ubgs2q__carouselDots",carouselShell:"products-catalog-module__ubgs2q__carouselShell",header:"products-catalog-module__ubgs2q__header",inner:"products-catalog-module__ubgs2q__inner",lead:"products-catalog-module__ubgs2q__lead",navButton:"products-catalog-module__ubgs2q__navButton",navButtonIcon:"products-catalog-module__ubgs2q__navButtonIcon",navButtonIconPrev:"products-catalog-module__ubgs2q__navButtonIconPrev",navButtonNext:"products-catalog-module__ubgs2q__navButtonNext",navButtonPrev:"products-catalog-module__ubgs2q__navButtonPrev",section:"products-catalog-module__ubgs2q__section",tab:"products-catalog-module__ubgs2q__tab",tabActive:"products-catalog-module__ubgs2q__tabActive",tabIcon:"products-catalog-module__ubgs2q__tabIcon",tabIconImage:"products-catalog-module__ubgs2q__tabIconImage",tabs:"products-catalog-module__ubgs2q__tabs",title:"products-catalog-module__ubgs2q__title"})},300140,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(271645),i=e.i(623191),a=e.i(367233),s=t,o=r,l=e.i(522016),u=t,c=n,f=e.i(862560),h=e.i(710060),p=e.i(57136);let m="...",d=` ${m}`,g=5,v="(min-width: 1025px)";function x(e,t){if(t(e))return e;let r=0,n=e.length;for(;r<n;){let i=Math.ceil((r+n)/2);t(`${e.slice(0,i).trimEnd()}${d}`)?r=i:n=i-1}let i=e.slice(0,r).trimEnd(),a=i.lastIndexOf(" ");for(a>0&&(i=i.slice(0,a)),i=i.replace(/[\s.,;:!?]+$/u,"");i&&!t(`${i}${d}`);){let e=i.lastIndexOf(" ");if(e<=0){i="";break}i=i.slice(0,e).replace(/[\s.,;:!?]+$/u,"")}return i?`${i}${d}`:e}function y(e){let t=(0,h.unwrapSinglePlainParagraph)(e);return null!==t?t:(0,h.isCmsHtmlContent)(e)?(0,h.cmsHtmlToPlainText)(e):e}function b({text:e}){let t=(0,c.useRef)(null),r=(0,c.useMemo)(()=>y(e),[e]),n=(0,h.isCmsHtmlContent)(e),[i,a]=(0,c.useState)(r);(0,c.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let n=window.matchMedia(v),i=()=>{if(!n.matches)return void a(r);let t=parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0)return void a(r);let i=t*g;a(x(r,t=>(e.textContent=t,e.scrollHeight<=i+1))),e.textContent=""};i(),n.addEventListener("change",i);let s=e.parentElement,o=s&&"u">typeof ResizeObserver?new ResizeObserver(i):null;return o&&s&&o.observe(s),()=>
1{n.removeEventListener("change",i),o?.disconnect()}},[r]);let s=n?"div":"p",o=n&&i===r;return(0,u.jsxs)(s,{className:p.default.description,children:[(0,u.jsx)("span",{ref:t,className:p.default.descriptionMeasure,"aria-hidden":!0}),o?(0,u.jsx)(f.CmsHtmlField,{html:e,as:"span"}):i]})}var w=e.i(318103),_=p;function D({product:e}){return(0,s.jsxs)(l.default,{href:e.href,className:_.default.card,"aria-label":`View more about ${e.title}`,children:[(0,s.jsx)("div",{className:_.default.imageArea,children:(0,s.jsx)(o.default,{className:_.default.productImage,src:e.image,alt:"",fill:!0,sizes:"(max-width: 767px) 100vw, (max-width: 1024px) 33vw, 25vw, 300px"})}),(0,s.jsxs)("div",{className:_.default.content,children:[(0,s.jsxs)("div",{className:_.default.copy,children:[(0,s.jsx)("h3",{className:_.default.title,children:e.title}),(0,s.jsx)(b,{text:e.description})]}),(0,s.jsx)(w.ProductsTextLink,{label:"View More",className:_.default.viewMore})]})]})}var C=e.i(894109),A=f,E=e.i(4889);function N({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M16.8255 1.52977C14.6599 6.23316 13.8343 11.1992 14.3506 16.0255C12.7479 14.4227 11.7517 12.0797 10.9576 9.53467L3.95392 16.5384L2.01724 14.6017L9.02096 7.59799C6.67629 7.00424 4.53532 5.80609 2.39717 3.93731C7.55961 4.25101 12.4572 3.76109 16.8255 1.52977Z",fill:"currentColor"})})}function S({content:e,titlePrefix:s="Product ",titleAccent:o="Catalog",introText:l="Explore the full WellAir portfolio across our leading brands.",showBrandTabs:u=!0,defaultBrandId:c=""}={}){let f=e?.brands??[],[h,p]=(0,n.useState)(e?.brands[0]?.id??c);if(0===f.length)return null;let m=(0,n.useMemo)(()=>f.find(e=>e.id===h)??f[0],[h,f]),d=m?.products.length??0,g=d>5,{carouselRef:v,activeIndex:x,dotCount:y,canScrollPrev:b,canScrollNext:w,scrollToIndex:_,scrollBy:M}=(0,a.useScrollCarousel)({itemCount:d,resetKey:h,cardSelector:"[data-catalog-card]"});return(0,t.jsx)("section",{className:E.default.section,"aria-labelledby":"products-catalog-title",children:(0,t.jsxs)("div",{className:E.default.inner,children:[(0,t.jsx)("header",{className:E.default.header,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.CmsCopyField,{value:e.title,variant:"title",titleTag:"h2",titleId:"products-catalog-title",titleClassName:E.default.title,accentClassName:E.default.accent}),e.introText?(0,t.jsx)(A.CmsHtmlField,{html:e.introText,className:E.default.lead,as:"div"}):null]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{id:"products-catalog-title",className:E.default.title,children:[s,(0,t.jsx)("span",{className:E.default.accent,children:o})]}),(0,t.jsx)("p",{className:E.default.lead,children:l})]})}),u?(0,t.jsx)("div",{className:E.default.tabs,role:"tablist","aria-label":"Product brands",children:f.map(e=>{let n=e.id===m?.id;return(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":n,className:n?`${E.default.tab} ${E.default.tabActive}`:E.default.tab,onClick:()=>p(e.id),children:[(0,t.jsx)("span",{className:E.default.tabIcon,"aria-hidden":!0,children:(0,t.jsx)(r.default,{className:E.default.tabIconImage,src:e.icon,alt:"",width:24,height:24,unoptimized:!0})}),e.label]},e.id)})}):null,(0,t.jsxs)("div",{className:E.default.carouselShell,children:[g?(0,t.jsx)("button",{type:"button",className:`${E.default.navButton} ${E.default.navButtonPrev}`,"aria-label":"Previous products",disabled:!b,onClick:()=>M("prev"),children:(0,t.jsx)(N,{className:`${E.default.navButtonIcon} ${E.default.navButtonIconPrev}`})}):null,(0,t.jsx)("div",{ref:v,className:E.default.carousel,role:"tabpanel","aria-label":`${m?.label??"Products"} catalog`,children:m?.products.map(e=>(0,t.jsx)("div",{className:E.default.card,"data-catalog-card":!0,children:(0,t.jsx)(D,{product:e})},e.id))}),g?(0,t.jsx)("button",{type:"button",className:`${E.default.navButton} ${E.default.navButtonNext}`,"aria-label":"Next products",disabled:!w,onClick:()=>M("next"),children:(0,t.jsx)(N,{className:E.default.navButtonIcon})}):null]}),(0,t.jsx)(i.CarouselDots,{count:y,activeIndex:x,onSelect:_,ariaLabel:"Product slides",getDotLabel:e=>`Go to ${m?.products[e]?.title??`slide ${e+1}`}`,className:E.default.carouselDots})]})})}e.s(["ProductsCatalog",0,S],300140)},710929,e=>{e.v({core:"product-detail-hero-hotspot-module__zG5DpG__core",hotspot:"product-detail-hero-hotspot-module__zG5DpG__hotspot",hotspotButton:"product-detail-hero-hotspot-module__zG5DpG__hotspotButton",hotspotsGroup:"product-detail-hero-hotspot-module__zG5DpG__hotspotsGroup",label:"product-detail-hero-hotspot-module__zG5DpG__label",labelBottomLeft:"product-detail-hero-hotspot-module__zG5DpG__labelBottomLeft",labelBroken:"product-detail-hero-hotspot-module__zG5DpG__labelBroken",labelIcon:"product-detail-hero-hotspot-module__zG5DpG__labelIcon",labelLeft:"product-detail-hero-hotspot-module__zG5DpG__labelLeft",labelRight:"product-detail-hero-hotspot-module__zG5DpG__labelRight",labelText:"product-detail-hero-hotspot-module__zG5DpG__labelText",labelTopLeft:"product-detail-hero-hotspot-module__zG5DpG__labelTopLeft","pd-hero-hotspot-pulse":"product-detail-hero-hotspot-module__zG5DpG__pd-hero-hotspot-pulse",ring:"product-detail-hero-hotspot-module__zG5DpG__ring",ringDelayed:"product-detail-hero-hotspot-module__zG5DpG__ringDelayed"})},311546,435269,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=t,i=e.i(657688);function a({className:e,width:t=22,height:r=20}){return(0,n.jsx)(i.default,{className:e,src:"/home-v2/product-spotlight/checkmark.png",alt:"",width:t,height:r,"aria-hidden":!0})}e.s(["CheckIcon",0,a],435269);var s=e.i(710929);let o={"top-left":s.default.labelTopLeft,left:s.default.labelLeft,right:s.default.labelRight,"bottom-left":s.default.labelBottomLeft},l=8;
1function u(e,t){let r=e.trim().split(/\s+/).filter(Boolean);if(t<=1||r.length<=1)return e.trim();let n=Math.min(t,r.length),i=e.trim().length/n,a=[],s="";for(let e=0;e<r.length;e+=1){let t=r[e],o=s?`${s} ${t}`:t,l=n-a.length;s&&o.length>i&&a.length<n-1&&r.length-e>=l?(a.push(s),s=t):s=o}return s&&a.push(s),a.join("\n")}function c(e){let t=e.getBoundingClientRect();return t.left<l-1||t.right>window.innerWidth-l+1}function f({hotspot:e,isActive:n,onToggle:i}){let l=(0,r.useRef)(null),h=(0,r.useRef)(null),[p,m]=(0,r.useState)(e.label);(0,r.useLayoutEffect)(()=>{if(!n)return void m(e.label);let t=()=>{let t=l.current,r=h.current;if(!t||!r)return;if(t.classList.remove(s.default.labelBroken),r.textContent=e.label,!c(t))return void m(e.label);let n=Math.min(e.label.trim().split(/\s+/).filter(Boolean).length,4),i=e.label;t.classList.add(s.default.labelBroken);for(let a=2;a<=n;a+=1){let n=u(e.label,a);if(r.textContent=n,!c(t)){i=n;break}i=n}m(i)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[n,e.label,e.labelPlacement]);let d=p.includes("\n");return(0,t.jsxs)("div",{className:s.default.hotspot,style:{left:`${e.x}%`,top:`${e.y}%`},children:[(0,t.jsxs)("button",{type:"button",className:s.default.hotspotButton,"aria-expanded":n,"aria-label":e.label,onClick:i,children:[(0,t.jsx)("span",{className:s.default.ring,"aria-hidden":!0}),(0,t.jsx)("span",{className:`${s.default.ring} ${s.default.ringDelayed}`,"aria-hidden":!0}),(0,t.jsx)("span",{className:s.default.core,"aria-hidden":!0})]}),n?(0,t.jsxs)("div",{ref:l,className:`${s.default.label} ${o[e.labelPlacement]}${d?` ${s.default.labelBroken}`:""}`,role:"tooltip",children:[(0,t.jsx)(a,{className:s.default.labelIcon,width:22,height:24}),(0,t.jsx)("span",{ref:h,className:s.default.labelText,children:p})]}):null]})}function h({hotspots:e}){let[n,i]=(0,r.useState)(null),a=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(!n)return;let e=e=>{a.current?.contains(e.target)||i(null)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[n]),0===e.length)?null:(0,t.jsx)("div",{ref:a,className:s.default.hotspotsGroup,children:e.map(e=>(0,t.jsx)(f,{hotspot:e,isActive:n===e.id,onToggle:()=>i(t=>t===e.id?null:e.id)},e.id))})}e.s(["ProductDetailHeroHotspots",0,h],311546)},642392,e=>{e.v({bar:"product-detail-nav-module__iQgOMq__bar",inner:"product-detail-nav-module__iQgOMq__inner",link:"product-detail-nav-module__iQgOMq__link",linkActive:"product-detail-nav-module__iQgOMq__linkActive",list:"product-detail-nav-module__iQgOMq__list",spacer:"product-detail-nav-module__iQgOMq__spacer",stickyRegion:"product-detail-nav-module__iQgOMq__stickyRegion"})},417607,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(642392);function i({children:e}){return(0,t.jsx)("div",{className:n.default.stickyRegion,"data-product-detail-sticky":!0,children:e})}function a(){return document.scrollingElement??document.documentElement}function s(){let e=document.querySelector(".site-header-spacer"),t=document.querySelector("[data-product-detail-nav]");return(e instanceof HTMLElement?e.offsetHeight:52)+(t instanceof HTMLElement?t.offsetHeight:61)}function o(e,t=!0){let r=e.startsWith("#")?e.slice(1):e;if(!r)return;let n=document.getElementById(r);if(!n)return;let i=a(),l=s(),u=n.getBoundingClientRect().top+i.scrollTop-l;if(i.scrollTo({top:Math.max(0,u),behavior:"smooth"}),t){let e=`${window.location.pathname}${window.location.search}#${r}`;window.history.pushState(null,"",e)}}let l="(max-width: 767px)";function u(e){return e.startsWith("#")?e.slice(1):e}function c(e){let t=s()+1,r="";for(let n of e){let e=document.getElementById(u(n.href));e&&e.getBoundingClientRect().top<=t&&(r=n.id)}let n=a(),i=n.scrollHeight-window.innerHeight;if(i>0&&n.scrollTop>=i-2){let t=[...e].reverse().find(e=>!!document.getElementById(u(e.href)));t&&(r=t.id)}return r}function f(e,t){let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();if(n.left>=r.left&&n.right<=r.right)return;let i=n.left+n.width/2-(r.left+r.width/2),a=Math.max(0,Math.min(e.scrollWidth-e.clientWidth,e.scrollLeft+i));2>Math.abs(a-e.scrollLeft)||e.scrollTo({left:a,behavior:"smooth"})}function h({product:e}){let i=(0,r.useRef)(null),s=(0,r.useRef)(!1),u=(0,r.useRef)(0),[p,m]=(0,r.useState)(""),d=(0,r.useMemo)(()=>Array.isArray(e.nav)&&e.nav.length>0?e.nav:[{id:"description",label:"Description",href:"#description"}],[e.nav]);function g(){s.current=!0,window.clearTimeout(u.current);let e=()=>{s.current=!1},t=a(),r=()=>{t.removeEventListener("scrollend",r),e()};t.addEventListener("scrollend",r),u.current=window.setTimeout(e,1200)}function v(e,t){t.href.startsWith("#")&&(e.preventDefault(),m(t.id),g(),o(t.href))}return(0,r.useEffect)(()=>{let e=window.location.hash;if(!e)return;let t=window.setTimeout(()=>{o(e,!1)},0);return()=>window.clearTimeout(t)},[]),(0,r.useEffect)(()=>{let e=window.matchMedia(l),t=0,r=()=>{!s.current&&e.matches&&m(e=>{let t=c(d);return t===e?e:t})},n=()=>{t||(t=window.requestAnimationFrame(()=>{t=0,r()}))},i=()=>
1{if(e.matches){window.addEventListener("scroll",n,{passive:!0}),r();return}window.removeEventListener("scroll",n),m("")};return i(),e.addEventListener("change",i),()=>{e.removeEventListener("change",i),window.removeEventListener("scroll",n),t&&window.cancelAnimationFrame(t),window.clearTimeout(u.current)}},[d]),(0,r.useEffect)(()=>{if(!p)return;let e=i.current,t=e?.querySelector(`[data-nav-id="${p}"]`);e&&t&&f(e,t)},[p]),(0,t.jsx)("nav",{className:n.default.bar,"data-product-detail-nav":!0,"aria-label":"Product page sections",children:(0,t.jsx)("div",{ref:i,className:n.default.inner,children:(0,t.jsx)("ul",{className:n.default.list,children:d.map(e=>{let r=e.id===p;return(0,t.jsx)("li",{children:(0,t.jsx)("a",{className:r?`${n.default.link} ${n.default.linkActive}`:n.default.link,href:e.href,"data-nav-id":e.id,"aria-current":r?"true":void 0,onClick:t=>v(t,e),children:e.label})},e.id)})})})})}e.s(["ProductDetailNav",0,h,"ProductDetailStickyRegion",0,i])},926413,e=>{e.v({accent:"product-detail-testimonials-module__4vizPq__accent",cardSlot:"product-detail-testimonials-module__4vizPq__cardSlot",grid:"product-detail-testimonials-module__4vizPq__grid",group:"product-detail-testimonials-module__4vizPq__group",groupInstallation:"product-detail-testimonials-module__4vizPq__groupInstallation",inner:"product-detail-testimonials-module__4vizPq__inner",section:"product-detail-testimonials-module__4vizPq__section",title:"product-detail-testimonials-module__4vizPq__title"})},622814,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(775977),i=e.i(894109),a=e.i(926413);function s({testimonialTitle:e,testimonialCard:o,installationTitle:l,installationCard:u}){let[c,f]=(0,r.useState)(null),h=!!o,p=!!u;return h||p?(0,t.jsxs)("section",{className:a.default.section,id:"videos","aria-label":"Product videos and testimonials",children:[(0,t.jsx)("div",{className:a.default.inner,children:(0,t.jsxs)("div",{className:a.default.grid,children:[h?(0,t.jsxs)("div",{className:`${a.default.group} ${a.default.groupTestimonial}`,children:[e?(0,t.jsx)(i.CmsCopyField,{value:e,variant:"title",titleTag:"h2",titleClassName:a.default.title,accentClassName:a.default.accent,flattenTitleParagraphs:!0}):null,(0,t.jsx)("div",{className:a.default.cardSlot,children:(0,t.jsx)(n.TestimonialCardItem,{card:o,onPlay:f})})]}):null,p?(0,t.jsxs)("div",{className:`${a.default.group} ${a.default.groupInstallation}`,children:[l?(0,t.jsx)(i.CmsCopyField,{value:l,variant:"title",titleTag:"h2",titleClassName:a.default.title,accentClassName:a.default.accent,flattenTitleParagraphs:!0}):null,(0,t.jsx)("div",{className:a.default.cardSlot,children:(0,t.jsx)(n.TestimonialCardItem,{card:u,onPlay:f})})]}):null]})}),c?(0,t.jsx)(n.TestimonialVideoModal,{videoUrl:c,onClose:()=>f(null)}):null]}):null}e.s(["ProductDetailTestimonials",0,s])},39792,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=(0,r.createContext)({title:null,slug:null,category:null,parentPage:null,breadcrumbTrail:null,headerMenuLinked:null});function i({title:e,slug:r,category:a=null,parentPage:s=null,breadcrumbTrail:o=null,headerMenuLinked:l=null,children:u}){let c="string"==typeof s?.title?s.title.trim():"",f="string"==typeof s?.slug?s.slug.trim():"",h={title:"string"==typeof e&&e.trim()?e.trim():null,slug:"string"==typeof r&&r.trim()?r.trim():null,category:a?.label?.trim()?{label:a.label.trim(),href:a.href?.trim()||"/products"}:null,parentPage:c&&f?{title:c,slug:f}:null,breadcrumbTrail:Array.isArray(o)&&o.length>0?o:null,headerMenuLinked:"boolean"==typeof l?l:null};return(0,t.jsx)(n.Provider,{value:h,children:u})}function a(){return(0,r.useContext)(n)}e.s(["CmsPageIdentityProvider",0,i,"useCmsPageIdentity",0,a])},28907,221858,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=(0,r.createContext)("default");function i({kind:e,children:r}){return(0,t.jsx)(n.Provider,{value:e,children:r})}function a(){return(0,r.useContext)(n)}e.s(["WidgetPageKindProvider",0,i,"useWidgetPageKind",0,a],28907);var s=e.i(867434),o=e.i(710060);function l(e){return"string"==typeof e?e.trim():""}function u(e){return l(e.primaryButtonText)||l(e.buttonText)||l(e.primaryCtaLabel)}function c(e,t="#"){return(0,s.resolveDatoDualLink)(e.primaryButtonLink??e.buttonLink??e.primaryCtaUrl??null,e.primaryButtonLinkExternal??e.primaryCtaUrlE
1xternal,t)}function f(e){return l(e.secondaryButtonText)||l(e.secondaryButtonLabel)||l(e.secondaryCtaLabel)}function h(e,t="#"){return(0,s.resolveDatoDualLink)(e.secondaryButtonLink??e.secondaryButtonUrl??e.secondaryCtaUrl??null,e.secondaryButtonLinkExternal??e.secondaryButtonUrlExternal??e.secondaryCtaUrlExternal,t)}function p(e){return(0,o.cmsHtmlString)(e.text)||(0,o.cmsHtmlString)(e.body)}function m(e,t,r="#"){return e?{label:e,href:t||r}:null}function d(e){let t=l(e.title),r=p(e),n=u(e),i=f(e);return{title:t,text:r,buttonText:n,buttonLink:n?c(e,"#products-catalog-title"):"",...i?{secondaryButtonText:i,secondaryButtonLink:h(e,"#")}:{}}}function g(e,t){let r=t?.primaryFallbackHref??"#",n=t?.secondaryFallbackHref??"#";return{primary:m(u(e),c(e,""),r),secondary:m(f(e),h(e,""),n)}}function v(e){let t=l(e.title),r=p(e),{primary:n,secondary:i}=g(e,{primaryFallbackHref:"",secondaryFallbackHref:""});return{title:t,body:r,primaryCta:n,secondaryCta:i}}function x(e){let t=l(e.title),r=p(e),n=u(e);return{title:t,body:r,cta:n?{label:n,href:c(e,"#")}:null}}function y(e){return!!f(e)}function b(e){return!!(l(e.title)||p(e)||u(e)||f(e))}e.s(["callToActionHasRenderableContent",0,b,"callToActionHasSecondary",0,y,"mapCallToActionToHealthProductivityFinalCta",0,x,"mapCallToActionToSolutionsFinalCta",0,v,"mapWidgetProductsCallToAction",0,d],221858)},201124,e=>{"use strict";var t=e.i(843476);e.i(210092);var r=e.i(857494),n=e.i(28907),i=e.i(221858);let a=new Set(["WidgetSolutionsHeroRecord","WidgetSolutionsChallengeRecord","WidgetSolutionsStandardRecord","WidgetSolutionsHowWeHelpRecord","WidgetSolutionsAshraeRecord"]),s=new Set(["WidgetHealthProductivityHeroRecord","WidgetHealthProductivityWhyItMatterRecord","WidgetHealthProductivityHowWellairHelpRecord","WidgetHealthProductivityEcosystemRecord","WidgetHealthProductivitySolutionsSupportRecord"]);function o(e){return e?a.has(e)?"solutions":s.has(e)?"health-productivity":null:null}function l(e,t,r){let n=o(e);return n?n:"WidgetCallToActionRecord"===e&&t?(0,i.callToActionHasSecondary)(t)?"solutions":r:"home"}function u(e){return"solutions"===e?"solutionsPage":"health-productivity"===e?"healthProductivityPage":"homeV2 homeV2Page"}function c(e){return"solutions"===e?"solutions":"health-productivity"===e?"health-productivity":"default"}function f({typename:e,widget:i,ctaFallbackFamily:a="home",children:s}){let o=l(e,i,a),h=c(o),p=`${u(o)} ${r.geograph.variable} ${r.geograph.className}`;return(0,t.jsx)(n.WidgetPageKindProvider,{kind:h,children:(0,t.jsx)("div",{className:p,children:s})})}e.s(["WidgetDesignScope",0,f],201124)},327401,e=>{"use strict";var t=e.i(271645);class r extends t.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`[Widget] Render failed (${this.props.typename??"unknown"}${this.props.widgetId?` #${this.props.widgetId}`:""}):`,e,t.componentStack)}render(){return this.state.hasError?null:this.props.children}}e.s(["WidgetErrorBoundary",0,r])},341214,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=(0,r.createContext)(!1);function i({active:e,children:r}){return(0,t.jsx)(n.Provider,{value:e,children:r})}function a(){return(0,r.useContext)(n)}e.s(["ProductSectionNavActiveProvider",0,i,"useProductSectionNavActive",0,a])},894307,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(271645),i=e.i(862560),a=e.i(987223),s=e.i(617322),o=e.i(442477);let l="tablet:h-[400px] tablet:w-full tablet:max-w-full mobile:h-[400px] mobile:w-full mobile:max-w-full";function u(){let e={},t=window.location.search;if(!t||t.length<2)return e;for(let r of t.slice(1).split("&")){let[t,n=""]=r.split("=");if(t)try{e[t.toLowerCase()]=decodeURIComponent(n)}catch{e[t.toLowerCase()]=n}}return e}function c(){let e=u(),t=document.getElementsByClassName("_form");for(let r=0;r<t.length;r++){let n=t[r];for(let t of Object.keys(e)){let r=n.elements.namedItem(t);r&&"value"in r&&(r.value=e[t])}}}function f({widget:e}){let{id:u,body:h,campaignFormId:p,campaignFormUrl:m,title:d,image:g,summary:v}=e,x=u?`form-${u}`:"form-active-campaign",y=(0,s.parseActiveCampaignFormId)((0,s.resolveActiveCampaignEmbedUrl)(m)??m)||("string"==typeof p&&/^\d+$/.test(p.trim())?p.trim():null),b=(0,n.useRef)(null),w=(0,n.useCallback)(e=>{e.querySelectorAll(":scope >
1 style").forEach(e=>e.remove()),c()},[]);(0,a.useActiveCampaignEmbed)(b,m,w);let _=(0,o.assetSrc)(g),D="widget-active-campaign__body m-0 font-normal text-black text-[min(24px,calc(24*100vw/1920))] tablet:text-[min(24px,calc(24*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] leading-[40px] mobile:leading-[32px] [&_a]:text-[#036ada] [&_a]:underline [&_p]:m-0 [&_p]:leading-[40px] mobile:[&_p]:leading-[32px] [&:not(.dato-html--cms-prose)_p+p]:mt-3";return(0,t.jsx)("section",{id:x,...y?{"data-ac-form-id":y}:{},className:["widget-active-campaign box-border w-full overflow-x-clip","scroll-mt-(--site-header-height)","bg-[linear-gradient(180deg,rgba(108,173,228,0.3)_0%,rgba(255,255,255,0.3)_100%)]"].filter(Boolean).join(" "),children:(0,t.jsxs)("div",{className:"box-border mx-auto flex w-full max-w-480 flex-col items-stretch desktop:flex-row desktop:items-start px-[min(160px,calc(160*100vw/1920))] tablet:px-[min(60px,calc(60*100vw/1024))] mobile:px-[min(20px,calc(20*100vw/390))] gap-[min(123px,calc(123*100vw/1920))] tablet:gap-[min(40px,calc(40*100vw/1024))] mobile:gap-[min(20px,calc(20*100vw/390))] pt-[min(120px,calc(120*100vw/1920))] tablet:pt-[min(90px,calc(90*100vw/1024))] mobile:pt-[min(80px,calc(80*100vw/390))] pb-[min(120px,calc(120*100vw/1920))] tablet:pb-[min(90px,calc(90*100vw/1024))] mobile:pb-[min(100px,calc(100*100vw/390))]",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 basis-0 flex-col gap-[min(12px,calc(12*100vw/1920))] tablet:gap-[min(10px,calc(10*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))]",children:[d?(0,t.jsx)("h2",{className:"m-0 font-medium leading-[normal] text-black text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]",children:d}):null,_?(0,t.jsx)("figure",{className:["widget-active-campaign__image relative m-0 w-full max-w-full shrink-0 overflow-hidden",l,"h-[min(780px,calc(780*100vw/1920))] desktop:h-[min(780px,calc(780*100vw/1920))] rounded-[min(16px,calc(16*100vw/1920))] tablet:rounded-[min(16px,calc(16*100vw/1024))] mobile:rounded-[min(16px,calc(16*100vw/390))]"].join(" "),children:(0,t.jsx)(r.default,{src:_,alt:g?.responsiveImage?.alt||g?.alt||"",fill:!0,className:"object-cover object-center tablet:object-top mobile:object-cover",sizes:"(max-width: 1024px) 100vw, 50vw"})}):null,v?(0,t.jsx)(i.CmsHtmlField,{html:v,className:`${D} widget-active-campaign__summary`,as:"div"}):null,h?(0,t.jsx)(i.CmsHtmlField,{html:h,className:`${D} widget-active-campaign__body`,as:"div"}):null]}),(0,t.jsx)("div",{className:"sendUsMessage flex min-w-0 flex-1 basis-0 flex-col w-full",children:(0,t.jsx)("div",{ref:b,className:p??void 0})})]})})}e.s(["WidgetActiveCampaign",0,f])},336389,(e,t,r)=>{!function(e,n){t.exports=r=n()}(e.e,function(){var t=t||function(t,r){if("u">typeof window&&window.crypto&&(n=window.crypto),"u">typeof self&&self.crypto&&(n=self.crypto),"u">typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"u">typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&e.g.crypto&&(n=e.g.crypto),!n)try{n={}}catch(e){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},o=s.lib={},l=o.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=o.WordArray=l.extend({init:function(e,t){e=this.words=e||[],r!=t?this.sigBytes=t:this.sigBytes=4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<i;a++){var s=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=s<<24-(n+a)%4*8}else for(var o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=0xffffffff<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new u.init(t,e)}}),c=s.enc={},f=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},p=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},m=o.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var r,n=this._data,i=n.words,a=n.sigBytes,s=this.blockSize,o=a/(4*s),l=(o=e?t.ceil(o):t.max((0|o)-this._minBufferSize,0))*s,c=t.min(4*l,a);if(l){for(var f=0;f<l;f+=s)this._doProcessBlock(i,f);r=i.splice(0,l),n.sigBytes-=c}return new u.init(r,c)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=m.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=s.algo={};return s}(Math);return t})},777765,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,a=t.x64={};a.Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=n.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var a=e[n];
vendor: 4,137 bytes, line 1
1r.push(a.high),r.push(a.low)}return i.create(r,this.sigBytes)},clone:function(){for(var e=n.clone.call(this),t=e.words=this.words.slice(0),r=t.length,i=0;i<r;i++)t[i]=t[i].clone();return e}})}(),e})},541641,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){if("function"==typeof ArrayBuffer){var t=e,r=t.lib,n=r.WordArray,i=n.init,a=n.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"u">typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],n=0;n<t;n++)r[n>>>2]|=e[n]<<24-n%4*8;i.call(this,r,t)}else i.apply(this,arguments)};a.prototype=n}}(),e.lib.WordArray})},768965,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){var t=e,r=t.lib.WordArray,n=t.enc;function i(e){return e<<8&0xff00ff00|e>>>8&0xff00ff}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a<r;a+=2){var s=i(t[a>>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,n=[],a=0;a<t;a++)n[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return r.create(n,2*t)}}}(),e.enc.Utf16})},130418,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],a=0,s=0;s<t;s++)if(s%4){var o=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;i[a>>>2]|=o<<24-a%4*8,a++}return r.create(i,a)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a<r;a+=3)for(var s=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,o=0;o<4&&a+.75*o<r;o++)i.push(n.charAt(s>>>6*(3-o)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var s=r.charAt(64);if(s){var o=e.indexOf(s);-1!==o&&(t=o)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64})},302916,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],a=0,s=0;s<t;s++)if(s%4){var o=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;i[a>>>2]|=o<<24-a%4*8,a++}return r.create(i,a)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],s=0;s<n;s+=3)for(var o=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,l=0;l<4&&s+.75*l<n;l++)a.push(i.charAt(o>>>6*(3-l)&63));var u=i.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var s=0;s<i.length;s++)a[i.charCodeAt(s)]=s}var o=i.charAt(64);if(o){var l=e.indexOf(o);-1!==l&&(r=l)}return n(e,r,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url})},257383,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,s=r.algo,o=[];!function(){for(var e=0;e<64;e++)o[e]=0x100000000*t.abs(t.sin(e+1))|0}();var l=s.MD5=a.extend({_doReset:function(){this._hash=new i.init([0x67452301,0xefcdab89,0x98badcfe,0x10325476])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=(i<<8|i>>>
vendor: 4,504 bytes, line 1
124)&0xff00ff|(i<<24|i>>>8)&0xff00ff00}var a=this._hash.words,s=e[t+0],l=e[t+1],p=e[t+2],m=e[t+3],d=e[t+4],g=e[t+5],v=e[t+6],x=e[t+7],y=e[t+8],b=e[t+9],w=e[t+10],_=e[t+11],D=e[t+12],C=e[t+13],A=e[t+14],E=e[t+15],N=a[0],S=a[1],M=a[2],T=a[3];N=u(N,S,M,T,s,7,o[0]),T=u(T,N,S,M,l,12,o[1]),M=u(M,T,N,S,p,17,o[2]),S=u(S,M,T,N,m,22,o[3]),N=u(N,S,M,T,d,7,o[4]),T=u(T,N,S,M,g,12,o[5]),M=u(M,T,N,S,v,17,o[6]),S=u(S,M,T,N,x,22,o[7]),N=u(N,S,M,T,y,7,o[8]),T=u(T,N,S,M,b,12,o[9]),M=u(M,T,N,S,w,17,o[10]),S=u(S,M,T,N,_,22,o[11]),N=u(N,S,M,T,D,7,o[12]),T=u(T,N,S,M,C,12,o[13]),M=u(M,T,N,S,A,17,o[14]),S=u(S,M,T,N,E,22,o[15]),N=c(N,S,M,T,l,5,o[16]),T=c(T,N,S,M,v,9,o[17]),M=c(M,T,N,S,_,14,o[18]),S=c(S,M,T,N,s,20,o[19]),N=c(N,S,M,T,g,5,o[20]),T=c(T,N,S,M,w,9,o[21]),M=c(M,T,N,S,E,14,o[22]),S=c(S,M,T,N,d,20,o[23]),N=c(N,S,M,T,b,5,o[24]),T=c(T,N,S,M,A,9,o[25]),M=c(M,T,N,S,m,14,o[26]),S=c(S,M,T,N,y,20,o[27]),N=c(N,S,M,T,C,5,o[28]),T=c(T,N,S,M,p,9,o[29]),M=c(M,T,N,S,x,14,o[30]),S=c(S,M,T,N,D,20,o[31]),N=f(N,S,M,T,g,4,o[32]),T=f(T,N,S,M,y,11,o[33]),M=f(M,T,N,S,_,16,o[34]),S=f(S,M,T,N,A,23,o[35]),N=f(N,S,M,T,l,4,o[36]),T=f(T,N,S,M,d,11,o[37]),M=f(M,T,N,S,x,16,o[38]),S=f(S,M,T,N,w,23,o[39]),N=f(N,S,M,T,C,4,o[40]),T=f(T,N,S,M,s,11,o[41]),M=f(M,T,N,S,m,16,o[42]),S=f(S,M,T,N,v,23,o[43]),N=f(N,S,M,T,b,4,o[44]),T=f(T,N,S,M,D,11,o[45]),M=f(M,T,N,S,E,16,o[46]),S=f(S,M,T,N,p,23,o[47]),N=h(N,S,M,T,s,6,o[48]),T=h(T,N,S,M,x,10,o[49]),M=h(M,T,N,S,A,15,o[50]),S=h(S,M,T,N,g,21,o[51]),N=h(N,S,M,T,D,6,o[52]),T=h(T,N,S,M,m,10,o[53]),M=h(M,T,N,S,w,15,o[54]),S=h(S,M,T,N,l,21,o[55]),N=h(N,S,M,T,y,6,o[56]),T=h(T,N,S,M,E,10,o[57]),M=h(M,T,N,S,v,15,o[58]),S=h(S,M,T,N,C,21,o[59]),N=h(N,S,M,T,d,6,o[60]),T=h(T,N,S,M,_,10,o[61]),M=h(M,T,N,S,p,15,o[62]),S=h(S,M,T,N,b,21,o[63]),a[0]=a[0]+N|0,a[1]=a[1]+S|0,a[2]=a[2]+M|0,a[3]=a[3]+T|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var a=t.floor(n/0x100000000),s=n;r[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&0xff00ff|(a<<24|a>>>8)&0xff00ff00,r[(i+64>>>9<<4)+14]=(s<<8|s>>>24)&0xff00ff|(s<<24|s>>>8)&0xff00ff00,e.sigBytes=(r.length+1)*4,this._process();for(var o=this._hash,l=o.words,u=0;u<4;u++){var c=l[u];l[u]=(c<<8|c>>>24)&0xff00ff|(c<<24|c>>>8)&0xff00ff00}return o},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,s){var o=e+(t&r|~t&n)+i+s;return(o<<a|o>>>32-a)+t}function c(e,t,r,n,i,a,s){var o=e+(t&n|r&~n)+i+s;return(o<<a|o>>>32-a)+t}function f(e,t,r,n,i,a,s){var o=e+(t^r^n)+i+s;return(o<<a|o>>>32-a)+t}function h(e,t,r,n,i,a,s){var o=e+(r^(t|~n))+i+s;return(o<<a|o>>>32-a)+t}r.MD5=a._createHelper(l),r.HmacMD5=a._createHmacHelper(l)}(Math),e.MD5})},506801,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,a=t.algo,s=[],o=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],l=r[4],u=0;u<80;u++){if(u<16)s[u]=0|e[t+u];else{var c=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=c<<1|c>>>31}var f=(n<<5|n>>>27)+l+s[u];u<20?f+=(i&a|~i&o)+0x5a827999:u<40?f+=(i^a^o)+0x6ed9eba1:u<60?f+=(i&a|i&o|a&o)-0x70e44324:f+=(i^a^o)-0x359d3e2a,l=o,o=a,a=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(r/0x100000000),t[(n+64>>>9<<4)+15]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(o),t.HmacSHA1=i._createHmacHelper(o)}(),e.SHA1})},301513,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,s=r.algo,o=[],l=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return(e-(0|e))*0x100000000|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(o[i]=r(t.pow(n,.5))),l[i]=r(t.pow(n,1/3)),i++),n++}();var u=[],c=s.SHA256=a.extend({_doReset:function(){this._hash=new i.init(o.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],o=r[4],c=r[5],f=r[6],h=r[7],p=0;p<64;p++){if(p<16)u[p]=0|e[t+p];else{var m=u[p-15],d=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=u[p-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[p]=d+u[p-7]+v+u[p-16]}
1var x=o&c^~o&f,y=n&i^n&a^i&a,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25))+x+l[p]+u[p],_=b+y;h=f,f=c,c=o,o=s+w|0,s=a,a=i,i=n,n=w+_|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+o|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=t.floor(n/0x100000000),r[(i+64>>>9<<4)+15]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=a._createHelper(c),r.HmacSHA256=a._createHmacHelper(c)}(Math),e.SHA256})},524294,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(301513))}(e.e,function(e){return!function(){var t=e,r=t.lib.WordArray,n=t.algo,i=n.SHA256,a=n.SHA224=i.extend({_doReset:function(){this._hash=new r.init([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=i._createHelper(a),t.HmacSHA224=i._createHmacHelper(a)}(),e.SHA224})},59379,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(777765))}(e.e,function(e){return!function(){var t=e,r=t.lib.Hasher,n=t.x64,i=n.Word,a=n.WordArray,s=t.algo;function o(){return i.create.apply(i,arguments)}var l=[o(0x428a2f98,0xd728ae22),o(0x71374491,0x23ef65cd),o(0xb5c0fbcf,0xec4d3b2f),o(0xe9b5dba5,0x8189dbbc),o(0x3956c25b,0xf348b538),o(0x59f111f1,0xb605d019),o(0x923f82a4,0xaf194f9b),o(0xab1c5ed5,0xda6d8118),o(0xd807aa98,0xa3030242),o(0x12835b01,0x45706fbe),o(0x243185be,0x4ee4b28c),o(0x550c7dc3,0xd5ffb4e2),o(0x72be5d74,0xf27b896f),o(0x80deb1fe,0x3b1696b1),o(0x9bdc06a7,0x25c71235),o(0xc19bf174,0xcf692694),o(0xe49b69c1,0x9ef14ad2),o(0xefbe4786,0x384f25e3),o(0xfc19dc6,0x8b8cd5b5),o(0x240ca1cc,0x77ac9c65),o(0x2de92c6f,0x592b0275),o(0x4a7484aa,0x6ea6e483),o(0x5cb0a9dc,0xbd41fbd4),o(0x76f988da,0x831153b5),o(0x983e5152,0xee66dfab),o(0xa831c66d,0x2db43210),o(0xb00327c8,0x98fb213f),o(0xbf597fc7,0xbeef0ee4),o(0xc6e00bf3,0x3da88fc2),o(0xd5a79147,0x930aa725),o(0x6ca6351,0xe003826f),o(0x14292967,0xa0e6e70),o(0x27b70a85,0x46d22ffc),o(0x2e1b2138,0x5c26c926),o(0x4d2c6dfc,0x5ac42aed),o(0x53380d13,0x9d95b3df),o(0x650a7354,0x8baf63de),o(0x766a0abb,0x3c77b2a8),o(0x81c2c92e,0x47edaee6),o(0x92722c85,0x1482353b),o(0xa2bfe8a1,0x4cf10364),o(0xa81a664b,0xbc423001),o(0xc24b8b70,0xd0f89791),o(0xc76c51a3,0x654be30),o(0xd192e819,0xd6ef5218),o(0xd6990624,0x5565a910),o(0xf40e3585,0x5771202a),o(0x106aa070,0x32bbd1b8),o(0x19a4c116,0xb8d2d0c8),o(0x1e376c08,0x5141ab53),o(0x2748774c,0xdf8eeb99),o(0x34b0bcb5,0xe19b48a8),o(0x391c0cb3,0xc5c95a63),o(0x4ed8aa4a,0xe3418acb),o(0x5b9cca4f,0x7763e373),o(0x682e6ff3,0xd6b2b8a3),o(0x748f82ee,0x5defb2fc),o(0x78a5636f,0x43172f60),o(0x84c87814,0xa1f0ab72),o(0x8cc70208,0x1a6439ec),o(0x90befffa,0x23631e28),o(0xa4506ceb,0xde82bde9),o(0xbef9a3f7,0xb2c67915),o(0xc67178f2,0xe372532b),o(0xca273ece,0xea26619c),o(0xd186b8c7,0x21c0c207),o(0xeada7dd6,0xcde0eb1e),o(0xf57d4f7f,0xee6ed178),o(0x6f067aa,0x72176fba),o(0xa637dc5,0xa2c898a6),o(0x113f9804,0xbef90dae),o(0x1b710b35,0x131c471b),o(0x28db77f5,0x23047d84),o(0x32caab7b,0x40c72493),o(0x3c9ebe0a,0x15c9bebc),o(0x431d67c4,0x9c100d4c),o(0x4cc5d4be,0xcb3e42b6),o(0x597f299c,0xfc657e2a),o(0x5fcb6fab,0x3ad6faec),o(0x6c44198c,0x4a475817)],u=[];!function(){for(var e=0;e<80;e++)u[e]=o()}();var c=s.SHA512=r.extend({_doReset:function(){this._hash=new a.init([new i.init(0x6a09e667,0xf3bcc908),new i.init(0xbb67ae85,0x84caa73b),new i.init(0x3c6ef372,0xfe94f82b),new i.init(0xa54ff53a,0x5f1d36f1),new i.init(0x510e527f,0xade682d1),new i.init(0x9b05688c,0x2b3e6c1f),new i.init(0x1f83d9ab,0xfb41bd6b),new i.init(0x5be0cd19,0x137e2179)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],o=r[4],c=r[5],f=r[6],h=r[7],p=n.high,m=n.low,d=i.high,g=i.low,v=a.high,x=a.low,y=s.high,b=s.low,w=o.high,_=o.low,D=c.high,C=c.low,A=f.high,E=f.low,N=h.high,S=h.low,M=p,T=m,k=d,F=g,B=v,P=x,j=y,O=b,I=w,z=_,L=D,R=C,q=A,U=E,H=N,V=S,W=0;W<80;W++){var G,$,Y=u[W];if(W<16)$=Y.high=0|e[t+2*W],G=Y.low=0|e[t+2*W+1];else{var Z=u[W-15],X=Z.high,J=Z.low,K=(X>>>1|J<<31)^(X>>>8|J<<24)^X>>>7,Q=(J>>>1|X<<31)^(J>>>8|X<<24)^(J>>>7|X<<25),ee=u[W-2],et=ee.high,er=ee.low,en=(et>>>19|er<<13)^(et<<3|er>>>29)^et>>>6,ei=(er>>>19|et<<13)^(er<<3|et>>>29)^(er>>>6|et<<26),ea=u[W-7],es=ea.high,eo=ea.low,el=u[W-16],eu=el.high,ec=el.low;$=K+es+ +((G=Q+eo)>>>0<Q>>>0),G+=ei,$=$+en+ +(G>>>
vendor: 4,087 bytes, line 1
10<ei>>>0),G+=ec,Y.high=$=$+eu+ +(G>>>0<ec>>>0),Y.low=G}var ef=I&L^~I&q,eh=z&R^~z&U,ep=M&k^M&B^k&B,em=T&F^T&P^F&P,ed=(M>>>28|T<<4)^(M<<30|T>>>2)^(M<<25|T>>>7),eg=(T>>>28|M<<4)^(T<<30|M>>>2)^(T<<25|M>>>7),ev=(I>>>14|z<<18)^(I>>>18|z<<14)^(I<<23|z>>>9),ex=(z>>>14|I<<18)^(z>>>18|I<<14)^(z<<23|I>>>9),ey=l[W],eb=ey.high,ew=ey.low,e_=V+ex,eD=H+ev+ +(e_>>>0<V>>>0),e_=e_+eh,eD=eD+ef+ +(e_>>>0<eh>>>0),e_=e_+ew,eD=eD+eb+ +(e_>>>0<ew>>>0),e_=e_+G,eD=eD+$+ +(e_>>>0<G>>>0),eC=eg+em,eA=ed+ep+ +(eC>>>0<eg>>>0);H=q,V=U,q=L,U=R,L=I,R=z,I=j+eD+ +((z=O+e_|0)>>>0<O>>>0)|0,j=B,O=P,B=k,P=F,k=M,F=T,M=eD+eA+ +((T=e_+eC|0)>>>0<e_>>>0)|0}m=n.low=m+T,n.high=p+M+ +(m>>>0<T>>>0),g=i.low=g+F,i.high=d+k+ +(g>>>0<F>>>0),x=a.low=x+P,a.high=v+B+ +(x>>>0<P>>>0),b=s.low=b+O,s.high=y+j+ +(b>>>0<O>>>0),_=o.low=_+z,o.high=w+I+ +(_>>>0<z>>>0),C=c.low=C+R,c.high=D+L+ +(C>>>0<R>>>0),E=f.low=E+U,f.high=A+q+ +(E>>>0<U>>>0),S=h.low=S+V,h.high=N+H+ +(S>>>0<V>>>0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+128>>>10<<5)+30]=Math.floor(r/0x100000000),t[(n+128>>>10<<5)+31]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(c),t.HmacSHA512=r._createHmacHelper(c)}(),e.SHA512})},279432,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(777765),e.r(59379))}(e.e,function(e){return!function(){var t=e,r=t.x64,n=r.Word,i=r.WordArray,a=t.algo,s=a.SHA512,o=a.SHA384=s.extend({_doReset:function(){this._hash=new i.init([new n.init(0xcbbb9d5d,0xc1059ed8),new n.init(0x629a292a,0x367cd507),new n.init(0x9159015a,0x3070dd17),new n.init(0x152fecd8,0xf70e5939),new n.init(0x67332667,0xffc00b31),new n.init(0x8eb44a87,0x68581511),new n.init(0xdb0c2e0d,0x64f98fa7),new n.init(0x47b5481d,0xbefa4fa4)])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=s._createHelper(o),t.HmacSHA384=s._createHmacHelper(o)}(),e.SHA384})},433110,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(777765))}(e.e,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,s=r.x64.Word,o=r.algo,l=[],u=[],c=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=t%5,i=(2*e+3*t)%5;e=n,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,o=0;o<24;o++){for(var f=0,h=0,p=0;p<7;p++){if(1&a){var m=(1<<p)-1;m<32?h^=1<<m:f^=1<<m-32}128&a?a=a<<1^113:a<<=1}c[o]=s.create(f,h)}}();var f=[];!function(){for(var e=0;e<25;e++)f[e]=s.create()}();var h=o.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var a=e[t+2*i],s=e[t+2*i+1];a=(a<<8|a>>>24)&0xff00ff|(a<<24|a>>>8)&0xff00ff00,s=(s<<8|s>>>24)&0xff00ff|(s<<24|s>>>8)&0xff00ff00;var o=r[i];o.high^=s,o.low^=a}for(var h=0;h<24;h++){for(var p=0;p<5;p++){for(var m=0,d=0,g=0;g<5;g++){var o=r[p+5*g];m^=o.high,d^=o.low}var v=f[p];v.high=m,v.low=d}for(var p=0;p<5;p++)for(var x=f[(p+4)%5],y=f[(p+1)%5],b=y.high,w=y.low,m=x.high^(b<<1|w>>>31),d=x.low^(w<<1|b>>>31),g=0;g<5;g++){var o=r[p+5*g];o.high^=m,o.low^=d}for(var _=1;_<25;_++){var m,d,o=r[_],D=o.high,C=o.low,A=l[_];A<32?(m=D<<A|C>>>32-A,d=C<<A|D>>>32-A):(m=C<<A-32|D>>>64-A,d=D<<A-32|C>>>64-A);var E=f[u[_]];E.high=m,E.low=d}var N=f[0],S=r[0];N.high=S.high,N.low=S.low;for(var p=0;p<5;p++)for(var g=0;g<5;g++){var _=p+5*g,o=r[_],M=f[_],T=f[(p+1)%5+5*g],k=f[(p+2)%5+5*g];o.high=M.high^~T.high&k.high,o.low=M.low^~T.low&k.low}var o=r[0],F=c[h];o.high^=F.high,o.low^=F.low}},_doFinalize:function(){var e=this._data,r=e.words;this._nDataBytes;var n=8*e.sigBytes,a=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/a)*a>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,o=this.cfg.outputLength/8,l=o/8,u=[],c=0;c<l;c++){var f=s[c],h=f.high,p=f.low;h=(h<<8|h>>>24)&0xff00ff|(h<<24|h>>>8)&0xff00ff00,p=(p<<8|p>>>
124)&0xff00ff|(p<<24|p>>>8)&0xff00ff00,u.push(p),u.push(h)}return new i.init(u,o)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=a._createHelper(h),r.HmacSHA3=a._createHmacHelper(h)}(Math),e.SHA3})},189092,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,s=r.algo,o=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e]),h=i.create([0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0]),p=s.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0])},_doProcessBlock:function(e,t){for(var r,n,i,a,s,p,b,w,_,D,C,A=0;A<16;A++){var E=t+A,N=e[E];e[E]=(N<<8|N>>>24)&0xff00ff|(N<<24|N>>>8)&0xff00ff00}var S=this._hash.words,M=f.words,T=h.words,k=o.words,F=l.words,B=u.words,P=c.words;p=r=S[0],b=n=S[1],w=i=S[2],_=a=S[3],D=s=S[4];for(var A=0;A<80;A+=1)C=r+e[t+k[A]]|0,A<16?C+=m(n,i,a)+M[0]:A<32?C+=d(n,i,a)+M[1]:A<48?C+=g(n,i,a)+M[2]:A<64?C+=v(n,i,a)+M[3]:C+=x(n,i,a)+M[4],C|=0,C=(C=y(C,B[A]))+s|0,r=s,s=a,a=y(i,10),i=n,n=C,C=p+e[t+F[A]]|0,A<16?C+=x(b,w,_)+T[0]:A<32?C+=v(b,w,_)+T[1]:A<48?C+=g(b,w,_)+T[2]:A<64?C+=d(b,w,_)+T[3]:C+=m(b,w,_)+T[4],C|=0,C=(C=y(C,P[A]))+D|0,p=D,D=_,_=y(w,10),w=b,b=C;C=S[1]+i+_|0,S[1]=S[2]+a+D|0,S[2]=S[3]+s+p|0,S[3]=S[4]+r+b|0,S[4]=S[0]+n+w|0,S[0]=C},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=(r<<8|r>>>24)&0xff00ff|(r<<24|r>>>8)&0xff00ff00,e.sigBytes=(t.length+1)*4,this._process();for(var i=this._hash,a=i.words,s=0;s<5;s++){var o=a[s];a[s]=(o<<8|o>>>24)&0xff00ff|(o<<24|o>>>8)&0xff00ff00}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function m(e,t,r){return e^t^r}function d(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function x(e,t,r){return e^(t|~r)}function y(e,t){return e<<t|e>>>32-t}r.RIPEMD160=a._createHelper(p),r.HmacRIPEMD160=a._createHmacHelper(p)}(Math),e.RIPEMD160})},237529,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389))}(e.e,function(e){!function(){var t=e,r=t.lib.Base,n=t.enc.Utf8;t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),s=this._iKey=t.clone(),o=a.words,l=s.words,u=0;u<r;u++)o[u]^=0x5c5c5c5c,l[u]^=0x36363636;a.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}()})},119445,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(301513),e.r(237529))}(e.e,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,a=t.algo,s=a.SHA256,o=a.HMAC,l=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=o.create(r.hasher,e),a=i.create(),s=i.create([1]),l=a.words,u=s.words,c=r.keySize,f=r.iterations;l.length<c;){var h=n.update(t).finalize(s);n.reset();for(var p=h.words,m=p.length,d=h,g=1;g<f;g++){d=n.finalize(d),n.reset();for(var v=d.words,x=0;x<m;x++)p[x]^=v[x]}a.concat(h),u[0]++}return a.sigBytes=4*c,a}});t.PBKDF2=function(e,t,r){return l.create(r).compute(e,t)}}(),e.PBKDF2})},862319,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(506801),e.r(237529))}(e.e,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,a=t.algo,s=a.MD5,o=a.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,a=n.hasher.create(),s=i.create(),o=s.words,l=n.keySize,u=n.iterations;o.length<l;){r&&a.update(r),r=a.update(e).finalize(t),a.reset();for(var c=1;c<u;c++)r=a.finalize(r),a.reset();s.concat(r)}return s.sigBytes=4*l,s}});t.EvpKDF=function(e,t,r){return o.create(r).compute(e,t)}}(),e.EvpKDF})},920566,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(862319))}(e.e,function(e){e.lib.Cipher||function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,a=r.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var o=s.Base64,l=t.algo.EvpKDF,u=r.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?x:g}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt
vendor: 5,983 bytes, line 1
1(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=t.mode={},f=r.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=c.CBC=function(){var e=f.extend();function t(e,t,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var a=0;a<r;a++)e[t+a]^=n[a]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=a}}),e}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,a=n<<24|n<<16|n<<8|n,s=[],o=0;o<n;o+=4)s.push(a);var l=i.create(s,n);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){u.reset.call(this);var e,t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=r.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),d=(t.format={}).OpenSSL={stringify:function(e){var t,r=e.ciphertext,n=e.salt;return(t=n?i.create([0x53616c74,0x65645f5f]).concat(n).concat(r):r).toString(o)},parse:function(e){var t,r=o.parse(e),n=r.words;return 0x53616c74==n[0]&&0x65645f5f==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},g=r.SerializableCipher=n.extend({cfg:n.extend({format:d}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),s=i.cfg;return m.create({ciphertext:a,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,a){if(n||(n=i.random(8)),a)var s=l.create({keySize:t+r,hasher:a}).compute(e,n);else var s=l.create({keySize:t+r}).compute(e,n);var o=i.create(s.words.slice(t),4*r);return s.sigBytes=4*t,m.create({key:s,iv:o,salt:n})}},x=r.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:v}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var a=g.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,g.decrypt.call(this,e,t,i.key,n)}})}()})},366637,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var s=0;s<r;s++)e[t+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i,n),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,a=e.slice(t,t+i);r.call(this,e,t,i,n),this._prevBlock=a}}),t}(),e.mode.CFB})},772018,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var s=a.slice(0);r.encryptBlock(s,0),a[n-1]=a[n-1]+1|0;for(var o=0;o<n;o++)e[t+o]^=s[o]}});return t.Decryptor=r,t}(),e.mode.CTR})},361520,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if((e>>24&255)==255){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0+(t<<16)+(r<<8)+n}else e+=0x1000000;return e}function n(e){return 0===(e[0]=r(e[0]))&&(e[1]=r(e[1])),e}var i=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0),n(s);var o=s.slice(0);r.encryptBlock(o,0);for(var l=0;l<i;l++)e[t+l]^=o[l]}});return t.Decryptor=i,t}(),e.mode.CTRGladman})},92891,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(a,0);for(var s=0;s<n;s++)e[t+s]^=a[s]}});return t.Decryptor=r,t}(),e.mode.OFB})},127076,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t}(),e.mode.ECB})},65299,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,a=r+i-1;
vendor: 6,825 bytes, line 1
1e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923})},775211,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126})},610624,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([0x80000000],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})},89424,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){for(var t=e.words,r=e.sigBytes-1,r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding})},170925,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})},814152,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.CipherParams,n=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return r.create({ciphertext:t})}}}(),e.format.Hex})},289886,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],a=[],s=[],o=[],l=[],u=[],c=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=0,n=0,t=0;t<256;t++){var m=n^n<<1^n<<2^n<<3^n<<4;m=m>>>8^255&m^99,i[r]=m,a[m]=r;var d=e[r],g=e[d],v=e[g],x=257*e[m]^0x1010100*m;s[r]=x<<24|x>>>8,o[r]=x<<16|x>>>16,l[r]=x<<8|x>>>24,u[r]=x;var x=0x1010101*v^65537*g^257*d^0x1010100*r;c[m]=x<<24|x>>>8,f[m]=x<<16|x>>>16,h[m]=x<<8|x>>>24,p[m]=x,r?(r=d^e[e[e[v^d]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],d=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e,t=this._keyPriorReset=this._key,r=t.words,n=t.sigBytes/4,a=this._nRounds=n+6,s=(a+1)*4,o=this._keySchedule=[],l=0;l<s;l++)l<n?o[l]=r[l]:(e=o[l-1],l%n?n>6&&l%n==4&&(e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e]):e=(i[(e=e<<8|e>>>24)>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e])^m[l/n|0]<<24,o[l]=o[l-n]^e);for(var u=this._invKeySchedule=[],d=0;d<s;d++){var l=s-d;if(d%4)var e=o[l];else var e=o[l-4];d<4||l<=4?u[d]=e:u[d]=c[i[e>>>24]]^f[i[e>>>16&255]]^h[i[e>>>8&255]]^p[i[255&e]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,o,l,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,f,h,p,a);var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,s,o){for(var l=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,m=1;m<l;m++){var d=n[u>>>24]^i[c>>>16&255]^a[f>>>8&255]^s[255&h]^r[p++],g=n[c>>>24]^i[f>>>16&255]^a[h>>>8&255]^s[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^a[u>>>8&255]^s[255&c]^r[p++],x=n[h>>>24]^i[u>>>16&255]^a[c>>>8&255]^s[255&f]^r[p++];u=d,c=g,f=v,h=x}var d=(o[u>>>24]<<24|o[c>>>16&255]<<16|o[f>>>8&255]<<8|o[255&h])^r[p++],g=(o[c>>>24]<<24|o[f>>>16&255]<<16|o[h>>>8&255]<<8|o[255&u])^r[p++],v=(o[f>>>24]<<24|o[h>>>16&255]<<16|o[u>>>8&255]<<8|o[255&c])^r[p++],x=(o[h>>>24]<<24|o[u>>>16&255]<<16|o[c>>>8&255]<<8|o[255&f])^r[p++];e[t]=d,e[t+1]=g,e[t+2]=v,e[t+3]=x},keySize:8});t.AES=r._createHelper(d)}(),e.AES})},294413,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.BlockCipher,a=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,0x10000000:32768,0x20000000:8421378,0x30000000:2,0x40000000:512,0x50000000:8421890,0x60000000:8389122,0x70000000:8388608,0x80000000:514,0x90000000:8389120,0xa0000000:33280,0xb0000000:8421376,0xc0000000:32770,0xd0000000:8388610,0xe0000000:0,0xf0000000:33282,0x8000000:0,0x18000000:8421890,0x28000000:33282,0x38000000:32768,0x48000000:8421888,0x58000000:512,0x68000000:8421378,0x78000000:2,0x88000000:8389120,0x98000000:33280,0xa8000000:8421376,0xb8000000:8389122,0xc8000000:8388610,0xd8000000:32770,0xe8000000:514,0xf8000000:8388608,1:32768,0x10000001:2,0x20000001:8421888,0x30000001:8388608,0x40000001:8421378,0x50000001:33280,0x60000001:512,0x70000001:8389122,0x80000001:8421890,0x90000001:8421376,0xa0000001:8388610,0xb0000001:33282,0xc0000001:514,0xd0000001:8389120,0xe0000001:32770,0xf0000001:0,0x8000001:8421890,0x18000001:8421376,0x28000001:8388608,0x38000001:512,0x48000001:32768,0x58000001:8388610,0x68000001:2,0x78000001:33282,0x88000001:32770,0x98000001:8389122,0xa8000001:514,0xb8000001:8421888,0xc8000001:8389120,0xd8000001:0,0xe8000001:33280,0xf8000001:8421378},{0:0x40084010,0x1000000:16384,0x2000000:524288,0x3000000:0x40080010,0x4000000:0x40000010,0x5000000:0x40084000,0x6000000:0x40004000,0x7000000:16,0x8000000:540672,0x9000000:0x40004010,0xa000000:0x40000000,0xb000000:540688,0xc000000:524304,0xd000000:0,0xe000000:16400,0xf000000:0x40080000,8388608:0x40004000,0x1800000:540688,0x2800000:16,0x3800000:0x40004010,0x4800000:0x40084010,0x5800000:0x40000000,0x6800000:524288,0x7800000:0x40080010,0x8800000:524304,0x9800000:0,0xa800000:16384,0xb800000:0x40080000,0xc800000:0x40000010,0xd800000:540672,0xe800000:0x40084000,0xf800000:16400,0x10000000:0,0x11000000:0x40080010,0x12000000:0x40004010,0x13000000:0x40084000,0x14000000:0x40080000,0x15000000:16,0x16000000:540688,0x17000000:16384,0x18000000:16400,0x19000000:524288,0x1a000000:524304,0x1b000000:0x40000010,0x1c000000:540672,0x1d000000:0x40004000,0x1e000000:0x40000000,0x1f000000:0x40084010,0x10800000:540688,0x11800000:524288,0x12800000:0x40080000,0x13800000:16384,0x14800000:0x40004000,0x15800000:0x40084010,0x16800000:16,0x17800000:0x40000000,0x18800000:0x40084000,0x19800000:0x40000010,0x1a800000:0x40004010,0x1b800000:524304,0x1c800000:0,0x1d800000:16400,0x1e800000:0x40080010,0x1f800000:540672},{0:260,1048576:0,2097152:0x4000100,3145728:65796,4194304:65540,5242880:0x4000004,6291456:0x4010104,7340032:0x4010000,8388608:0x4000000,9437184:0x4010100,0xa00000:65792,0xb00000:0x4010004,0
vendor: 6,466 bytes, line 1
1xc00000:0x4000104,0xd00000:65536,0xe00000:4,0xf00000:256,524288:0x4010100,1572864:0x4010004,2621440:0,3670016:0x4000100,4718592:0x4000004,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,0xa80000:0x4010000,0xb80000:65796,0xc80000:65792,0xd80000:0x4000104,0xe80000:0x4010104,0xf80000:0x4000000,0x1000000:0x4010100,0x1100000:65540,0x1200000:65536,0x1300000:0x4000100,0x1400000:256,0x1500000:0x4010104,0x1600000:0x4000004,0x1700000:0,0x1800000:0x4000104,0x1900000:0x4000000,0x1a00000:4,0x1b00000:65792,0x1c00000:0x4010000,0x1d00000:260,0x1e00000:65796,0x1f00000:0x4010004,0x1080000:0x4000000,0x1180000:260,0x1280000:0x4010100,0x1380000:0,0x1480000:65540,0x1580000:0x4000100,0x1680000:256,0x1780000:0x4010004,0x1880000:65536,0x1980000:0x4010104,0x1a80000:65796,0x1b80000:0x4000004,0x1c80000:0x4000104,0x1d80000:0x4010000,0x1e80000:4,0x1f80000:65792},{0:0x80401000,65536:0x80001040,131072:4198464,196608:0x80400000,262144:0,327680:4198400,393216:0x80000040,458752:4194368,524288:0x80000000,589824:4194304,655360:64,720896:0x80001000,786432:0x80400040,851968:4160,917504:4096,983040:0x80401040,32768:0x80001040,98304:64,163840:0x80400040,229376:0x80001000,294912:4198400,360448:0x80401040,425984:0,491520:0x80400000,557056:4096,622592:0x80401000,688128:4194304,753664:4160,819200:0x80000000,884736:4194368,950272:4198464,1015808:0x80000040,1048576:4194368,1114112:4198400,1179648:0x80000040,1245184:0,1310720:4160,1376256:0x80400040,1441792:0x80401000,1507328:0x80001040,1572864:0x80401040,1638400:0x80000000,1703936:0x80400000,1769472:4198464,1835008:0x80001000,1900544:4194304,1966080:64,2031616:4096,1081344:0x80400000,1146880:0x80401040,1212416:0,1277952:4198400,1343488:4194368,1409024:0x80000000,1474560:0x80001040,1540096:64,1605632:0x80000040,1671168:4096,1736704:0x80001000,1802240:0x80400040,1867776:4160,1933312:0x80401000,1998848:4194304,2064384:4198464},{0:128,4096:0x1040000,8192:262144,12288:0x20000000,16384:0x20040080,20480:0x1000080,24576:0x21000080,28672:262272,32768:0x1000000,36864:0x20040000,40960:0x20000080,45056:0x21040080,49152:0x21040000,53248:0,57344:0x1040080,61440:0x21000000,2048:0x1040080,6144:0x21000080,10240:128,14336:0x1040000,18432:262144,22528:0x20040080,26624:0x21040000,30720:0x20000000,34816:0x20040000,38912:0,43008:0x21040080,47104:0x1000080,51200:0x20000080,55296:0x21000000,59392:0x1000000,63488:262272,65536:262144,69632:128,73728:0x20000000,77824:0x21000080,81920:0x1000080,86016:0x21040000,90112:0x20040080,94208:0x1000000,98304:0x21040080,102400:0x21000000,106496:0x1040000,110592:0x20040000,114688:262272,118784:0x20000080,122880:0,126976:0x1040080,67584:0x21000080,71680:0x1000000,75776:0x1040000,79872:0x20040080,83968:0x20000000,88064:0x1040080,92160:128,96256:0x21040000,100352:262272,104448:0x21040080,108544:0,112640:0x21000000,116736:0x1000080,120832:262144,124928:0x20040000,129024:0x20000080},{0:0x10000008,256:8192,512:0x10200000,768:0x10202008,1024:0x10002000,1280:2097152,1536:2097160,1792:0x10000000,2048:0,2304:0x10002008,2560:2105344,2816:8,3072:0x10200008,3328:2105352,3584:8200,3840:0x10202000,128:0x10200000,384:0x10202008,640:8,896:2097152,1152:2105352,1408:0x10000008,1664:0x10002000,1920:8200,2176:2097160,2432:8192,2688:0x10002008,2944:0x10200008,3200:0,3456:0x10202000,3712:2105344,3968:0x10000000,4096:0x10002000,4352:0x10200008,4608:0x10202008,4864:8200,5120:2097152,5376:0x10000000,5632:0x10000008,5888:2105344,6144:2105352,6400:0,6656:8,6912:0x10200000,7168:8192,7424:0x10002008,7680:0x10202000,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:0x10000008,5248:0x10002000,5504:8200,5760:0x10202008,6016:0x10200000,6272:0x10202000,6528:0x10200008,6784:8192,7040:2105352,7296:2097160,7552:0,7808:0x10000000,8064:0x10002008},{0:1048576,16:0x2000401,32:1024,48:1049601,64:0x2100401,80:0,96:1,112:0x2100001,128:0x2000400,144:1048577,160:0x2000001,176:0x2100400,192:0x2100000,208:1025,224:1049600,240:0x2000000,8:0x2100001,24:0,40:0x2000401,56:0x2100400,72:1048576,88:0x2000001,104:0x2000000,120:1025,136:1049601,152:0x2000400,168:0x2100000,184:1048577,200:1024,216:0x2100401,232:1,248:1049600,256:0x2000000,272:1048576,288:0x2000401,304:0x2100001,320:1048577,336:0x2000400,352:0x2100400,368:1049601,384:1025,400:0x2100401,416:1049600,432:1,448:0,464:0x2100000,480:0x2000001,496:1024,264:1049600,280:0x2000401,296:0x2100001,312:1,328:0x2000000,344:1048576,360:1025,376:0x2100400,392:0x2000001,408:0x2100000,424:0,440:0x2100401,456:1049601,472:1024,488:0x2000400,504:1048577},{0:0x8000820,1:131072,2:0x8000000,3:32,4:131104,5:0x8020820,6:0x8020800,7:2048,8:0x8020000,9:0x8000800,10:133120,11:0x8020020,12:2080,13:0,14:0x8000020,15:133152,0x80000000:2048,0x80000001:0x8020820,0x80000002:0x8000820,0x80000003:0x8000000,0x80000004:0x8020000,0x80000005:133120,0x80000006:133152,0x80000007:32,0x80000008:0x8000020,0x80000009:2080,0x8000000a:131104,0x8000000b:0x8020800,0x8000000c:0,0x8000000d:0x8020020,0x8000000e:0x8000800,0x8000000f:131072,16:133152,17:0x8020800,18:32,19:2048,20:0x8000800,21:0x8000020,22:0x8020020,23:131072,24:0,25:131104,26:0x8020000,27:0x8000820,28:0x8020820,29:133120,30:2080,31:0x8000000,0x80000010:131072,0x80000011:2048,0x80000012:0x8020020,0x80000013:133152,0x80000014:32,0x80000015:0x8020000,0x80000016:0x8000000,0x80000017:0x8000820,0x80000018:0x8020820,0x80000019:0x8000020,0x8000001a:0x8000800,0x8000001b:0,0x8000001c:133120,0x8000001d:2080,0x8000001e:131104,0x8000001f:0x8020800}],c=[0xf8000001,0x1f800000,0x1f80000,2064384,129024,8064,504,0x8000001f],f=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=s[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){for(var u=i[a]=[],c=l[a],r=0;r<24;r++)u[r/6|0]|=t[(o[r]-1+c)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(o[r+24]-1+c)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(var r=1;r<7;r++)u[r]=u[r]>>>(r-1)*4+3;u[7]=u[7]<<5|u[7]>>>27}for(var f=this._invSubKeys=[],r=0;r<16;r++)f[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,0xf0f0f0f),h.call(this,16,65535),p.call(this,2,0x33333333),p.call(this,8,0xff00ff),h.call(this,1,0x55555555);for(var n=0;n<16;n++){for(var i=r[n],a=this._lBlock,s=this._rBlock,o=0,l=0;l<8;l++)o|=u[l][((s^i[l])&c[l])>>>0];this._lBlock=s,this._rBlock=a^o}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,0x55555555),p.call(this,8,0xff00ff),p.
vendor: 4,963 bytes, line 1
1call(this,2,0x33333333),h.call(this,16,65535),h.call(this,4,0xf0f0f0f),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function p(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}t.DES=i._createHelper(f);var m=a.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(m)}(),e.TripleDES})},355824,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;for(var i=0,a=0;i<256;i++){var s=i%r,o=t[s>>>2]>>>24-s%4*8&255;a=(a+n[i]+o)%256;var l=n[i];n[i]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[r],e[r]=a,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}t.RC4=r._createHelper(i);var s=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});t.RC4Drop=r._createHelper(s)}(),e.RC4})},925991,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],a=[],s=[],o=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=(e[r]<<8|e[r]>>>24)&0xff00ff|(e[r]<<24|e[r]>>>8)&0xff00ff00;var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,0xffff0000&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,0xffff0000&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,0xffff0000&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,0xffff0000&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(var r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var a=t.words,s=a[0],o=a[1],u=(s<<8|s>>>24)&0xff00ff|(s<<24|s>>>8)&0xff00ff00,c=(o<<8|o>>>24)&0xff00ff|(o<<24|o>>>8)&0xff00ff00,f=u>>>16|0xffff0000&c,h=c<<16|65535&u;i[0]^=u,i[1]^=f,i[2]^=c,i[3]^=h,i[4]^=u,i[5]^=f,i[6]^=c,i[7]^=h;for(var r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=(i[n]<<8|i[n]>>>24)&0xff00ff|(i[n]<<24|i[n]>>>8)&0xff00ff00,e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];t[0]=t[0]+0x4d34d34d+this._b|0,t[1]=t[1]+0xd34d34d3+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+0x34d34d34+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+0x4d34d34d+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+0xd34d34d3+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+0x34d34d34+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+0x4d34d34d+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+0xd34d34d3+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,o=n>>>16,l=((i*i>>>17)+i*o>>>15)+o*o,u=((0xffff0000&n)*n|0)+((65535&n)*n|0);s[r]=l^u}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=r._createHelper(o)}(),e.Rabbit})},520249,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],a=[],s=[],o=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,0xffff0000&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,0xffff0000&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,0xffff0000&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,0xffff0000&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(var i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var a=t.words,s=a[0],o=a[1],u=(s<<8|s>>>
124)&0xff00ff|(s<<24|s>>>8)&0xff00ff00,c=(o<<8|o>>>24)&0xff00ff|(o<<24|o>>>8)&0xff00ff00,f=u>>>16|0xffff0000&c,h=c<<16|65535&u;n[0]^=u,n[1]^=f,n[2]^=c,n[3]^=h,n[4]^=u,n[5]^=f,n[6]^=c,n[7]^=h;for(var i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=(i[n]<<8|i[n]>>>24)&0xff00ff|(i[n]<<24|i[n]>>>8)&0xff00ff00,e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];t[0]=t[0]+0x4d34d34d+this._b|0,t[1]=t[1]+0xd34d34d3+ +(t[0]>>>0<a[0]>>>0)|0,t[2]=t[2]+0x34d34d34+ +(t[1]>>>0<a[1]>>>0)|0,t[3]=t[3]+0x4d34d34d+ +(t[2]>>>0<a[2]>>>0)|0,t[4]=t[4]+0xd34d34d3+ +(t[3]>>>0<a[3]>>>0)|0,t[5]=t[5]+0x34d34d34+ +(t[4]>>>0<a[4]>>>0)|0,t[6]=t[6]+0x4d34d34d+ +(t[5]>>>0<a[5]>>>0)|0,t[7]=t[7]+0xd34d34d3+ +(t[6]>>>0<a[6]>>>0)|0,this._b=+(t[7]>>>0<a[7]>>>0);for(var r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,o=n>>>16,l=((i*i>>>17)+i*o>>>15)+o*o,u=((0xffff0000&n)*n|0)+((65535&n)*n|0);s[r]=l^u}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=r._createHelper(o)}(),e.RabbitLegacy})},468442,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(130418),e.r(257383),e.r(862319),e.r(920566))}(e.e,function(e){return!function(){var t=e,r=t.lib.BlockCipher,n=t.algo;let i=16,a=[0x243f6a88,0x85a308d3,0x13198a2e,0x3707344,0xa4093822,0x299f31d0,0x82efa98,0xec4e6c89,0x452821e6,0x38d01377,0xbe5466cf,0x34e90c6c,0xc0ac29b7,0xc97c50dd,0x3f84d5b5,0xb5470917,0x9216d5d9,0x8979fb1b],s=[[0xd1310ba6,0x98dfb5ac,0x2ffd72db,0xd01adfb7,0xb8e1afed,0x6a267e96,0xba7c9045,0xf12c7f99,0x24a19947,0xb3916cf7,0x801f2e2,0x858efc16,0x636920d8,0x71574e69,0xa458fea3,0xf4933d7e,0xd95748f,0x728eb658,0x718bcd58,0x82154aee,0x7b54a41d,0xc25a59b5,0x9c30d539,0x2af26013,0xc5d1b023,0x286085f0,0xca417918,0xb8db38ef,0x8e79dcb0,0x603a180e,0x6c9e0e8b,0xb01e8a3e,0xd71577c1,0xbd314b27,0x78af2fda,0x55605c60,0xe65525f3,0xaa55ab94,0x57489862,0x63e81440,0x55ca396a,0x2aab10b6,0xb4cc5c34,0x1141e8ce,0xa15486af,0x7c72e993,0xb3ee1411,0x636fbc2a,0x2ba9c55d,0x741831f6,0xce5c3e16,0x9b87931e,0xafd6ba33,0x6c24cf5c,0x7a325381,0x28958677,0x3b8f4898,0x6b4bb9af,0xc4bfe81b,0x66282193,0x61d809cc,0xfb21a991,0x487cac60,0x5dec8032,0xef845d5d,0xe98575b1,0xdc262302,0xeb651b88,0x23893e81,0xd396acc5,0xf6d6ff3,0x83f44239,0x2e0b4482,0xa4842004,0x69c8f04a,0x9e1f9b5e,0x21c66842,0xf6e96c9a,0x670c9c61,0xabd388f0,0x6a51a0d2,0xd8542f68,0x960fa728,0xab5133a3,0x6eef0b6c,0x137a3be4,0xba3bf050,0x7efb2a98,0xa1f1651d,0x39af0176,0x66ca593e,0x82430e88,0x8cee8619,0x456f9fb4,0x7d84a5c3,0x3b8b5ebe,0xe06f75d8,0x85c12073,0x401a449f,0x56c16aa6,0x4ed3aa62,0x363f7706,0x1bfedf72,0x429b023d,0x37d0d724,0xd00a1248,0xdb0fead3,0x49f1c09b,0x75372c9,0x80991b7b,0x25d479d8,0xf6e8def7,0xe3fe501a,0xb6794c3b,0x976ce0bd,0x4c006ba,0xc1a94fb6,0x409f60c4,0x5e5c9ec2,0x196a2463,0x68fb6faf,0x3e6c53b5,0x1339b2eb,0x3b52ec6f,0x6dfc511f,0x9b30952c,0xcc814544,0xaf5ebd09,0xbee3d004,0
1xde334afd,0x660f2807,0x192e4bb3,0xc0cba857,0x45c8740f,0xd20b5f39,0xb9d3fbdb,0x5579c0bd,0x1a60320a,0xd6a100c6,0x402c7279,0x679f25fe,0xfb1fa3cc,0x8ea5e9f8,0xdb3222f8,0x3c7516df,0xfd616b15,0x2f501ec8,0xad0552ab,0x323db5fa,0xfd238760,0x53317b48,0x3e00df82,0x9e5c57bb,0xca6f8ca0,0x1a87562e,0xdf1769db,0xd542a8f6,0x287effc3,0xac6732c6,0x8c4f5573,0x695b27b0,0xbbca58c8,0xe1ffa35d,0xb8f011a0,0x10fa3d98,0xfd2183b8,0x4afcb56c,0x2dd1d35b,0x9a53e479,0xb6f84565,0xd28e49bc,0x4bfb9790,0xe1ddf2da,0xa4cb7e33,0x62fb1341,0xcee4c6e8,0xef20cada,0x36774c01,0xd07e9efe,0x2bf11fb4,0x95dbda4d,0xae909198,0xeaad8e71,0x6b93d5a0,0xd08ed1d0,0xafc725e0,0x8e3c5b2f,0x8e7594b7,0x8ff6e2fb,0xf2122b64,0x8888b812,0x900df01c,0x4fad5ea0,0x688fc31c,0xd1cff191,0xb3a8c1ad,0x2f2f2218,0xbe0e1777,0xea752dfe,0x8b021fa1,0xe5a0cc0f,0xb56f74e8,0x18acf3d6,0xce89e299,0xb4a84fe0,0xfd13e0b7,0x7cc43b81,0xd2ada8d9,0x165fa266,0x80957705,0x93cc7314,0x211a1477,0xe6ad2065,0x77b5fa86,0xc75442f5,0xfb9d35cf,0xebcdaf0c,0x7b3e89a0,0xd6411bd3,0xae1e7e49,2428461,0x2071b35e,0x226800bb,0x57b8e0af,0x2464369b,0xf009b91e,0x5563911d,0x59dfa6aa,0x78c14389,0xd95a537f,0x207d5ba2,0x2e5b9c5,0x83260376,0x6295cfa9,0x11c81968,0x4e734a41,0xb3472dca,0x7b14a94a,0x1b510052,0x9a532915,0xd60f573f,0xbc9bc6e4,0x2b60a476,0x81e67400,0x8ba6fb5,0x571be91f,0xf296ec6b,0x2a0dd915,0xb6636521,0xe7b9f9b6,0xff34052e,0xc5855664,0x53b02d5d,0xa99f8fa1,0x8ba4799,0x6e85076a],[0x4b7a70e9,0xb5b32944,0xdb75092e,0xc4192623,290971e4,0x49a7df7d,0x9cee60b8,0x8fedb266,0xecaa8c71,0x699a17ff,0x5664526c,0xc2b19ee1,0x193602a5,0x75094c29,0xa0591340,0xe4183a3e,0x3f54989a,0x5b429d65,0x6b8fe4d6,0x99f73fd6,0xa1d29c07,0xefe830f5,0x4d2d38e6,0xf0255dc1,0x4cdd2086,0x8470eb26,0x6382e9c6,0x21ecc5e,0x9686b3f,0x3ebaefc9,0x3c971814,0x6b6a70a1,0x687f3584,0x52a0e286,0xb79c5305,0xaa500737,0x3e07841c,0x7fdeae5c,0x8e7d44ec,0x5716f2b8,0xb03ada37,0xf0500c0d,0xf01c1f04,0x200b3ff,0xae0cf51a,0x3cb574b2,0x25837a58,0xdc0921bd,0xd19113f9,0x7ca92ff6,0x94324773,0x22f54701,0x3ae5e581,0x37c2dadc,0xc8b57634,0x9af3dda7,0xa9446146,0xfd0030e,0xecc8c73e,0xa4751e41,0xe238cd99,0x3bea0e2f,0x3280bba1,0x183eb331,0x4e548b38,0x4f6db908,0x6f420d03,0xf60a04bf,0x2cb81290,0x24977c79,0x5679b072,0xbcaf89af,0xde9a771f,0xd9930810,0xb38bae12,0xdccf3f2e,0x5512721f,0x2e6b7124,0x501adde6,0x9f84cd87,0x7a584718,0x7408da17,0xbc9f9abc,0xe94b7d8c,0xec7aec3a,0xdb851dfa,0x63094366,0xc464c3d2,0xef1c1847,0x3215d908,0xdd433b37,0x24c2ba16,0x12a14d43,0x2a65c451,0x50940002,0x133ae4dd,0x71dff89e,0x10314e55,0x81ac77d6,0x5f11199b,0x43556f1,0xd7a3c76b,0x3c11183b,0x5924a509,0xf28fe6ed,0x97f1fbfa,0x9ebabf2c,0x1e153c6e,0x86e34570,0xeae96fb1,0x860e5e0a,0x5a3e2ab3,0x771fe71c,0x4e3d06fa,0x2965dcb9,0x99e71d0f,0x803e89d6,0x5266c825,0x2e4cc978,0x9c10b36a,0xc6150eba,0x94e2ea78,0xa5fc3c53,0x1e0a2df4,0xf2f74ea7,0x361d2b3d,0x1939260f,0x19c27960,0x5223a708,0xf71312b6,0xebadfe6e,0xeac31f66,0xe3bc4595,0xa67bc883,0xb17f37d1,0x18cff28,0xc332ddef,0xbe6c5aa5,0x65582185,0x68ab9802,0xeecea50f,0xdb2f953b,0x2aef7dad,0x5b6e2f84,0x1521b628,0x29076170,0xecdd4775,0x619f1510,0x13cca830,0xeb61bd96,0x334fe1e,0xaa0363cf,0xb5735c90,0x4c70a239,0xd59e9e0b,0xcbaade14,0xeecc86bc,0x60622ca7,0x9cab5cab,0xb2f3846e,0x648b1eaf,0x19bdf0ca,0xa02369b9,0x655abb50,0x40685a32,0x3c2ab4b3,0x319ee9d5,0xc021b8f7,0x9b540b19,0x875fa099,0x95f7997e,0x623d7da8,0xf837889a,0x97e32d77,0x11ed935f,0x16681281,0xe358829,0xc7e61fd6,0x96dedfa1,0x7858ba99,0x57f584a5,0x1b227263,0x9b83c3ff,0x1ac24696,0xcdb30aeb,0x532e3054,0x8fd948e4,0x6dbc3128,0x58ebf2ef,0x34c6ffea,0xfe28ed61,0xee7c3c73,0x5d4a14d9,0xe864b7e3,0x42105d14,0x203e13e0,0x45eee2b6,0xa3aaabea,0xdb6c4f15,0xfacb4fd0,0xc742f442,0xef6abbb5,0x654f3b1d,0x41cd2105,0xd81e799e,0x86854dc7,0xe44b476a,0x3d816250,0xcf62a1f2,0x5b8d2646,0xfc8883a0,0xc1c7b6a3,0x7f1524c3,0x69cb7492,0x47848a0b,0x5692b285,0x95bbf00,0xad19489d,0x1462b174,0x23820e00,0x58428d2a,0xc55f5ea,0x1dadf43e,0x233f7061,0x3372f092,0x8d937e41,0xd65fecf1,0x6c223bdb,0x7cde3759,0xcbee7460,0x4085f2a7,0xce77326e,0xa6078084,0x19f8509e,0xe8efd855,0x61d99735,0xa969a7aa,0xc50c06c2,0x5a04abfc,0x800bcadc,0x9e447a2e,0xc3453484,0xfdd56705,0xe1e9ec9,0xdb73dbd3,0x105588cd,0x675fda79,0xe3674340,0xc5c43465,0x713e38d8,0x3d28f89e,0xf16dff20,0x153e21e7,0x8fb03d4a,0xe6e39f2b,0xdb83adf7],[0xe93d5a68,0x948140f7,0xf64c261c,0x94692934,0x411520f7,0x7602d4f7,0xbcf46b2e,0xd4a20068,0xd4082471,0x3320f46a,0x43b7d4b7,0x500061af,0x1e39f62e,0x97244546,0x14214f74,0xbf8b8840,0x4d95fc1d,0x96b591af,0x70f4ddd3,0x66a02f45,0xbfbc09ec,0x3bd9785,0x7fac6dd0,0x31cb8504,0x96eb27b3,0x55fd3941,0xda2547e6,0xabca0a9a,0x28507825,0x530429f4,0xa2c86da,0xe9b66dfb,0x68dc1462,0xd7486900,0x680ec0a4,0x27a18dee,0x4f3ffea2,0xe887ad8c,0xb58ce006,0x7af4d6b6,0xaace1e7c,0xd3375fec,0xce78a399,0
1x406b2a42,0x20fe9e35,0xd9f385b9,0xee39d7ab,0x3b124e8b,0x1dc9faf7,0x4b6d1856,0x26a36631,0xeae397b2,0x3a6efa74,0xdd5b4332,0x6841e7f7,0xca7820fb,0xfb0af54e,0xd8feb397,0x454056ac,0xba489527,0x55533a3a,0x20838d87,0xfe6ba9b7,0xd096954b,0x55a867bc,0xa1159a58,0xcca92963,0x99e1db33,0xa62a4a56,0x3f3125f9,0x5ef47e1c,0x9029317c,0xfdf8e802,0x4272f70,0x80bb155c,0x5282ce3,0x95c11548,0xe4c66d22,0x48c1133f,0xc70f86dc,0x7f9c9ee,0x41041f0f,0x404779a4,0x5d886e17,0x325f51eb,0xd59bc0d1,0xf2bcc18f,0x41113564,0x257b7834,0x602a9c60,0xdff8e8a3,0x1f636c1b,0xe12b4c2,0x2e1329e,0xaf664fd1,0xcad18115,0x6b2395e0,0x333e92e1,0x3b240b62,0xeebeb922,0x85b2a20e,0xe6ba0d99,0xde720c8c,0x2da2f728,0xd0127845,0x95b794fd,0x647d0862,0xe7ccf5f0,0x5449a36f,0x877d48fa,0xc39dfd27,0xf33e8d1e,0xa476341,0x992eff74,0x3a6f6eab,0xf4f8fd37,0xa812dc60,0xa1ebddf8,0x991be14c,0xdb6e6b0d,0xc67b5510,0x6d672c37,0x2765d43b,0xdcd0e804,0xf1290dc7,0xcc00ffa3,0xb5390f92,0x690fed0b,0x667b9ffb,0xcedb7d9c,0xa091cf0b,0xd9155ea3,0xbb132f88,0x515bad24,0x7b9479bf,0x763bd6eb,0x37392eb3,0xcc115979,0x8026e297,0xf42e312d,0x6842ada7,0xc66a2b3b,0x12754ccc,0x782ef11c,0x6a124237,0xb79251e7,0x6a1bbe6,0x4bfb6350,0x1a6b1018,0x11caedfa,0x3d25bdd8,0xe2e1c3c9,0x44421659,0xa121386,0xd90cec6e,0xd5abea2a,0x64af674e,0xda86a85f,0xbebfe988,0x64e4c3fe,0x9dbc8057,0xf0f7c086,0x60787bf8,0x6003604d,0xd1fd8346,0xf6381fb0,0x7745ae04,0xd736fccc,0x83426b33,0xf01eab71,0xb0804187,0x3c005e5f,0x77a057be,0xbde8ae24,0x55464299,0xbf582e61,0x4e58f48f,0xf2ddfda2,0xf474ef38,0x8789bdc2,0x5366f9c3,0xc8b38e74,0xb475f255,0x46fcd9b9,0x7aeb2661,0x8b1ddf84,0x846a0e79,0x915f95e2,0x466e598e,0x20b45770,0x8cd55591,0xc902de4c,0xb90bace1,0xbb8205d0,0x11a86248,0x7574a99e,0xb77f19b6,0xe0a9dc09,0x662d09a1,0xc4324633,0xe85a1f02,0x9f0be8c,0x4a99a025,0x1d6efe10,0x1ab93d1d,0xba5a4df,0xa186f20f,0x2868f169,0xdcb7da83,0x573906fe,0xa1e2ce9b,0x4fcd7f52,0x50115e01,0xa70683fa,0xa002b5c4,0xde6d027,0x9af88c27,0x773f8641,0xc3604c06,0x61a806b5,0xf0177a28,0xc0f586e0,6314154,0x30dc7d62,0x11e69ed7,0x2338ea63,0x53c2dd94,0xc2c21634,0xbbcbee56,0x90bcb6de,0xebfc7da1,0xce591d76,0x6f05e409,0x4b7c0188,0x39720a3d,0x7c927c24,0x86e3725f,0x724d9db9,0x1ac15bb4,0xd39eb8fc,0xed545578,0x8fca5b5,0xd83d7cd3,0x4dad0fc4,0x1e50ef5e,0xb161e6f8,0xa28514d9,0x6c51133c,0x6fd5c7e7,0x56e14ec4,0x362abfce,0xddc6c837,0xd79a3234,0x92638212,0x670efa8e,0x406000e0],[0x3a39ce37,0xd3faf5cf,0xabc27737,0x5ac52d1b,0x5cb0679e,0x4fa33742,0xd3822740,0x99bc9bbe,0xd5118e9d,0xbf0f7315,0xd62d1c7e,0xc700c47b,0xb78c1b6b,0x21a19045,0xb26eb1be,0x6a366eb4,0x5748ab2f,0xbc946e79,0xc6a376d2,0x6549c2c8,0x530ff8ee,0x468dde7d,0xd5730a1d,0x4cd04dc6,0x2939bbdb,0xa9ba4650,0xac9526e8,0xbe5ee304,0xa1fad5f0,0x6a2d519a,0x63ef8ce2,0x9a86ee22,0xc089c2b8,0x43242ef6,0xa51e03aa,0x9cf2d0a4,0x83c061ba,0x9be96a4d,0x8fe51550,0xba645bd6,0x2826a2f9,0xa73a3ae1,0x4ba99586,0xef5562e9,0xc72fefd3,0xf752f7da,0x3f046f69,0x77fa0a59,0x80e4a915,0x87b08601,0x9b09e6ad,0x3b3ee593,0xe990fd5a,0x9e34d797,0x2cf0b7d9,0x22b8b51,0x96d5ac3a,0x17da67d,0xd1cf3ed6,0x7c7d2d28,0x1f9f25cf,0xadf2b89b,0x5ad6b472,0x5a88f54c,0xe029ac71,0xe019a5e6,0x47b0acfd,0xed93fa9b,0xe8d3c48d,0x283b57cc,0xf8d56629,0x79132e28,0x785f0191,0xed756055,0xf7960e44,0xe3d35e8c,0x15056dd4,0x88f46dba,0x3a16125,0x564f0bd,0xc3eb9e15,0x3c9057a2,0x97271aec,0xa93a072a,0x1b3f6d9b,0x1e6321f5,0xf59c66fb,0x26dcf319,0x7533d928,0xb155fdf5,0x3563482,0x8aba3cbb,0x28517711,0xc20ad9f8,0xabcc5167,0xccad925f,0x4de81751,0x3830dc8e,0x379d5862,0x9320f991,0xea7a90c2,0xfb3e7bce,0x5121ce64,0x774fbe32,0xa8b6e37e,0xc3293d46,0x48de5369,0x6413e680,0xa2ae0810,0xdd6db224,0x69852dfd,0x9072166,0xb39a460a,0x6445c0dd,0x586cdecf,0x1c20c8ae,0x5bbef7dd,0x1b588d40,0xccd2017f,0x6bb4e3bb,0xdda26a7e,0x3a59ff45,0x3e350a44,0xbcb4cdd5,0x72eacea8,0xfa6484bb,0x8d6612ae,0xbf3c6f47,0xd29be463,0x542f5d9e,0xaec2771b,0xf64e6370,0x740e0d8d,0xe75b1357,0xf8721671,0xaf537d5d,0x4040cb08,0x4eb4e2cc,0x34d2466a,0x115af84,3786409e3,0x95983a1d,0x6b89fb4,0xce6ea048,0x6f3f3b82,0x3520ab82,0x11a1d4b,0x277227f8,0x611560b1,0xe7933fdc,0xbb3a792b,0x344525bd,0xa08839e1,0x51ce794b,0x2f32c9b7,0xa01fbac9,0xe01cc87e,0xbcc7d1f6,0xcf0111c3,0xa1e8aac7,0x1a908749,0xd44fbd9a,0xd0dadecb,0xd50ada38,0x339c32a,0xc6913667,0x8df9317c,0xe0b12b4f,0xf79e59b7,0x43f5bb3a,0xf2d519ff,0x27d9459c,0xbf97222c,0x15e6fc2a,0xf91fc71,0x9b941525,0xfae59361,0xceb69ceb,0xc2a86459,0x12baa8d1,0xb6c1075e,0xe3056a0c,0x10d25065,0xcb03a442,0xe0ec6e0e,0x1698db3b,0x4c98a0be,0x3278e964,0x9f1f9532,0xe0d392df,0xd3a0342b,0x8971f21e,0x1b0a7441,0x4ba3348c,0xc5be7120,0xc37632d8,0xdf359f8d,0x9b992f2e,0xe60b6f47,0xfe3f11d,0xe54cda54,0x1edad891,0xce6279cf,0xcd3e7e6f,0x1618b166,0xfd2c1d05,0x848fd2c5,0xf6fb2299,0xf523f357,0xa6327623,0x93a83531,0x56cccd02,0xacf08162,0x5a75ebb5,0x6e163697,0x88d273cc,0xde966292,0x81b949d0,0x4c50901b,0x71c65614,0xe6c6c7bd,0x327a140a,0x45e1d006,0xc3f27b9a,0xc9aa53fd,0x62a80f00,0xbb25bfe2,0x35bdd2f6,0x71126905,0xb2040222,0xb6cbcf7c,0xcd769c2b,0x53113ec0,0x1640e3d3,0x38abbd60,0x2547adf0,0xba38209c,0xf746ce76,0x77afa1c5,0x20756060,0x85cbfe4e,0x8ae88dd8,0x7aaaf9b0,0x4cf9aa7e,0x1948c25c,0x2fb8a8c,0x1c36ae4,0xd6ebe1f9,0x90d4f869,0xa65cdea0,0x3f09252d,0xc208e69f,0xb74e6132,0xce77e25b,0x578fdfe3,0x3ac372e6]];var o={pbox:[],sbox:[]};function l(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,a=255&t,s=e.sbox[0][r]+e.sbox[1][n];return s^=e.sbox[2][i],s+=e.sbox[3][a]}function u(e,t,r){let n,a=t,s=r;for(let t=0;t<i;++t)a^=e.pbox[t],s=l(e,a)^s,n=a,a=s,s=n;return n=a,a=s,s=n^e.pbox[i],{left:a^=e.pbox[i+1],right:s}}function c(e,t,r){let n,a=t,s=r;for(let t=i+1;t>1;--t)a^=e.pbox[t],s=l(e,a)^s,n=a,a=s,s=n;return n=a,a=s,s=n^e.pbox[1],{left:a^=e.pbox[0],right:s}}function f(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=s[t][r]}let n=0;for(let s=0;s<i+2;s++)e.pbox[s]=a[s]^t[n],++n>=r&&(n=0);let o=0,l=0,c=0;for(let t=0;t<i+2;t+=2)o=(c=u(e,o,l)).left,l=c.right,e.pbox[t]=o,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)o=(c=u(e,o,l)).left,l=c.right,e.sbox[t][r]=o,e.sbox[t][r+1]=l;return!0}var h=n.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;f(o,t,r)}},encryptBlock:function(e,t){var r=u(o,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=c(o,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=r._createHelper(h)}(),e.Blowfish})},417137,(e,t,r)=>{!function(n,i){t.exports=r=i(e.r(336389),e.r(777765),e.r(541641),e.r(768965),e.r(130418),e.r(302916),e.r(257383),e.r(506801),e.r(301513),e.r(524294),e.r(59379),e.r(279432),e.r(433110),e.r(189092),e.r(237529),e.r(119445),e.r(862319),e.r(920566),e.r(366637),e.r(772018),e.r(361520),e.r(92891),e.r(127076),e.r(65299),e.r(775211),e.r(610624),e.r(89424),e.r(170925),e.r(814152),e.r(289886),e.r(294413),e.r(355824),e.r(925991),e.r(520249),e.r(468442))}(e.e,function(e){return e})},768108,(e,t,r)=>{!function(e,r){t.exports=r()}(e.e,function(){"use strict";function e(){return!0}function t(){return!1}function r(){}let n="Argument is not a typed-function.";function i(){let a,s;function o(e){return"object"==typeof e&&null!==e&&e.constructor===Object}let l=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:o},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],u={name:"any",test:e,isAny:!0},c=0,f={createCount:0};function h(e){let t,r=a.get(e);if(r)return r;let n='Unknown type "'+e+'"',i=e.toLowerCase();for(t of s)if(t.toLowerCase()===i){n+='. Did you mean "'+t+'" ?';break}throw TypeError(n)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any",r=t?h(t).index:s.length,n=[];for(let t=0;t<e.length;++t){if(!e[t]||"string"!=typeof e[t].name||"function"!=typeof e[t].test)throw TypeError("Object with properties {name: string, test: function} expected");let i=e[t].name;if(a.has(i))throw TypeError('Duplicate type name "'+i+'"');n.push(i),a.set(i,{name:i,test:e[t].test,isAny:e[t].isAny,index:r+t,conversionsTo:[]})}let i=s.slice(r);s=s.slice(0,r).concat(n).concat(i);for(let e=r+n.length;e<s.length;++e)a.get(s[e]).index=e}function m(){a=new Map,s=[],c=0,p([u],!1)}function d(){let e;
1for(e of s)a.get(e).conversionsTo=[];c=0}function g(e){let t=s.filter(t=>{let r=a.get(t);return!r.isAny&&r.test(e)});return t.length?t:["any"]}function v(e){return e&&"function"==typeof e&&"_typedFunctionData"in e}function x(e,t,r){let i,a;if(!v(e))throw TypeError(n);let s=r&&r.exact,o=A(Array.isArray(t)?t.join(","):t),l=w(o);if(!s||l in e.signatures){let t=e._typedFunctionData.signatureMap.get(l);if(t)return t}let u=o.length;if(s){let t;for(t in i=[],e.signatures)i.push(e._typedFunctionData.signatureMap.get(t))}else i=e._typedFunctionData.signatures;for(let e=0;e<u;++e){let t,r=o[e],n=[];for(t of i){let i=M(t.params,e);if(i&&(!r.restParam||i.restParam)){if(!i.hasAny){let e=C(i);if(r.types.some(t=>!e.has(t.name)))continue}n.push(t)}}if(0===(i=n).length)break}for(a of i)if(a.params.length<=u)return a;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+w(o,", ")+"))")}function y(e,t,r){return x(e,t,r).implementation}function b(e,t){let r=h(t);if(r.test(e))return e;let n=r.conversionsTo;if(0===n.length)throw Error("There are no conversions to "+t+" defined.");for(let t=0;t<n.length;t++)if(h(n[t].from).test(e))return n[t].convert(e);throw Error("Cannot convert "+e+" to "+t)}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return e.map(e=>e.name).join(t)}function _(e){let t=0===e.indexOf("..."),r=(t?e.length>3?e.slice(3):"any":e).split("|").map(e=>h(e.trim())),n=!1,i=t?"...":"";return{types:r.map(function(e){return n=e.isAny||n,i+=e.name+"|",{name:e.name,typeIndex:e.index,test:e.test,isAny:e.isAny,conversion:null,conversionIndex:-1}}),name:i.slice(0,-1),hasAny:n,hasConversion:!1,restParam:t}}function D(e){let t=z(e.types.map(e=>e.name)),r=e.hasAny,n=e.name,i=t.map(function(e){let t=h(e.from);return r=t.isAny||r,n+="|"+e.from,{name:e.from,typeIndex:t.index,test:t.test,isAny:t.isAny,conversion:e,conversionIndex:e.index}});return{types:e.types.concat(i),name:n,hasAny:r,hasConversion:i.length>0,restParam:e.restParam}}function C(e){return e.typeSet||(e.typeSet=new Set,e.types.forEach(t=>e.typeSet.add(t.name))),e.typeSet}function A(e){let t=[];if("string"!=typeof e)throw TypeError("Signatures must be strings");let r=e.trim();if(""===r)return t;let n=r.split(",");for(let e=0;e<n.length;++e){let r=_(n[e].trim());if(r.restParam&&e!==n.length-1)throw SyntaxError('Unexpected rest parameter "'+n[e]+'": only allowed for the last parameter');if(0===r.types.length)return null;t.push(r)}return t}function E(e){let t=X(e);return!!t&&t.restParam}function N(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return h(t.types[0].name).test;if(2===t.types.length){let e=h(t.types[0].name).test,r=h(t.types[1].name).test;return function(t){return e(t)||r(t)}}{let e=t.types.map(function(e){return h(e.name).test});return function(t){for(let r=0;r<e.length;r++)if(e[r](t))return!0;return!1}}}function S(e){let t,r,n;if(E(e)){let r=(t=Z(e).map(N)).length,n=N(X(e)),i=function(e){for(let t=r;t<e.length;t++)if(!n(e[t]))return!1;return!0};return function(e){for(let r=0;r<t.length;r++)if(!t[r](e[r]))return!1;return i(e)&&e.length>=r+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(r=N(e[0]),function(e){return r(e[0])&&1===e.length}):2===e.length?(r=N(e[0]),n=N(e[1]),function(e){return r(e[0])&&n(e[1])&&2===e.length}):(t=e.map(N),function(e){for(let r=0;r<t.length;r++)if(!t[r](e[r]))return!1;return e.length===t.length})}function M(e,t){return t<e.length?e[t]:E(e)?X(e):null}function T(e,t){let r=M(e,t);return r?C(r):new Set}function k(e){return null===e.conversion||void 0===e.conversion}function F(e,t){let r=new Set;return e.forEach(e=>{let n;for(n of T(e.params,t))r.add(n)}),r.has("any")?["any"]:Array.from(r)}function B(e,t,r){let n,i,a,s=e||"unnamed",o=r;for(a=0;a<t.length;a++){let e=[];
1if(o.forEach(r=>{let n=N(M(r.params,a));(a<r.params.length||E(r.params))&&n(t[a])&&e.push(r)}),0===e.length){if((i=F(o,a)).length>0){let e=g(t[a]);return(n=TypeError("Unexpected type of argument in function "+s+" (expected: "+i.join(" or ")+", actual: "+e.join(" | ")+", index: "+a+")")).data={category:"wrongType",fn:s,index:a,actual:e,expected:i},n}}else o=e}let l=o.map(function(e){return E(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,l))return(n=TypeError("Too few arguments in function "+s+" (expected: "+(i=F(o,a)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:s,index:t.length,expected:i},n;let u=Math.max.apply(null,l);if(t.length>u)return(n=TypeError("Too many arguments in function "+s+" (expected: "+u+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:s,index:t.length,expectedLength:u},n;let c=[];for(let e=0;e<t.length;++e)c.push(g(t[e]).join("|"));return(n=TypeError('Arguments of type "'+c.join(", ")+'" do not match any of the defined signatures of function '+s+".")).data={category:"mismatch",actual:c},n}function P(e){let t=s.length+1;for(let r=0;r<e.types.length;r++)t=Math.min(t,e.types[r].typeIndex);return t}function j(e){let t=c+1;for(let r=0;r<e.types.length;r++)k(e.types[r])||(t=Math.min(t,e.types[r].conversionIndex));return t}function O(e,t){if(e.hasAny){if(!t.hasAny)return .1}else if(t.hasAny)return -.1;if(e.restParam){if(!t.restParam)return .01}else if(t.restParam)return -.01;let r=P(e)-P(t);if(r<0)return -.001;if(r>0)return .001;let n=j(e),i=j(t);if(e.hasConversion){if(!t.hasConversion)return(1+n)*1e-6}else if(t.hasConversion)return-(1e-6*(1+i));let a=n-i;return a<0?-1e-7:1e-7*(a>0)}function I(e,t){let r,n,i=e.params,a=t.params,s=X(i),o=X(a),l=E(i),u=E(a);if(l&&s.hasAny){if(!u||!o.hasAny)return 1e7}else if(u&&o.hasAny)return -1e7;let c=0,f=0;for(r of i)r.hasAny&&++c,r.hasConversion&&++f;let h=0,p=0;for(r of a)r.hasAny&&++h,r.hasConversion&&++p;if(c!==h)return(c-h)*1e6;if(l&&s.hasConversion){if(!u||!o.hasConversion)return 1e5}else if(u&&o.hasConversion)return -1e5;if(f!==p)return(f-p)*1e4;if(l){if(!u)return 1e3}else if(u)return -1e3;let m=(i.length-a.length)*(l?-100:100);if(0!==m)return m;let d=[],g=0;for(let e=0;e<i.length;++e){let t=O(i[e],a[e]);d.push(t),g+=t}if(0!==g)return(g<0?-10:10)+g;let v=9,x=9/(d.length+1);for(n of d){if(0!==n)return(n<0?-v:v)+n;v-=x}return 0}function z(e){if(0===e.length)return[];let t=e.map(h);if(1===e.length)return t[0].conversionsTo;let r=new Set(e),n=new Set;for(let e=0;e<t.length;++e)for(let i of t[e].conversionsTo)r.has(i.from)||n.add(i.from);let i=[];for(let e of n){let r=c+1,n=null;for(let i=0;i<t.length;++i)for(let a of t[i].conversionsTo)a.from===e&&a.index<r&&(r=a.index,n=a);i.push(n)}return i}function L(e,t){let r=t,n="";if(e.some(e=>e.hasConversion)){let i=E(e),a=e.map(R);n=a.map(e=>e.name).join(";"),r=function(){let e=[],r=i?arguments.length-1:arguments.length;for(let t=0;t<r;t++)e[t]=a[t](arguments[t]);return i&&(e[r]=arguments[r].map(a[r])),t.apply(this,e)}}let i=r;if(E(e)){let t=e.length-1;i=function(){return r.apply(this,J(arguments,0,t).concat([J(arguments,t)]))}}return n&&Object.defineProperty(i,"name",{value:n}),i}function R(e){let t,r,n,i,a=[],s=[],o="";e.types.forEach(function(e){e.conversion&&(o+=e.conversion.from+"~>"+e.conversion.to+",",a.push(h(e.conversion.from).test),s.push(e.conversion.convert))}),o=o?o.slice(0,-1):"pass";let l=e=>e;switch(s.length){case 0:break;case 1:t=a[0],n=s[0],l=function(e){return t(e)?n(e):e};break;case 2:t=a[0],r=a[1],n=s[0],i=s[1],l=function(e){return t(e)?n(e):r(e)?i(e):e};break;default:l=function(e){for(let t=0;t<s.length;t++)if(a[t](e))return s[t](e);return e}}return Object.defineProperty(l,"name",{value:o}),l}function q(e){function t(e,r,n){if(!(r<e.length))return[n];{let i=e[r],a=[];if(i.restParam){let e=i.types.filter(k);e.length<i.types.length&&a.push({types:e,name:"..."+e.map(e=>e.name).join("|"),hasAny:e.some(e=>e.isAny),hasConversion:!1,restParam:!0}),a.push(i)}else a=i.types.map(function(e){return{types:[e],name:e.name,hasAny:e.isAny,hasConversion:e.conversion,restParam:!1}});return Q(a,function(i){return t(e,r+1,n.concat([i]))})}}return t(e,0,[])}function U(e,t){let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let r,i=T(e,n),a=T(t,n),s=!1;for(r of a)if(i.has(r)){s=!0;break}if(!s)return!1}let n=e.length,i=t.length,a=E(e),s=E(t);return a?s?n===i:i>=n:s?n>=i:n===i}function H(e){return e.map(e=>ei(e)?er(e.referToSelf.callback):en(e)?et(e.referTo.references,e.referTo.callback):e)}function V(e,t,r){let n,i=[];for(n of e){let e=r[n];if("number"!=typeof e)throw TypeError('No definition for referenced signature "'+n+'"');if("function"!=typeof(e=t[e]))return!1;i.push(e)}return i}function W(e,t,r){let n=H(e),i=Array(n.length).fill(!1),a=!0;for(;a;){a=!1;let e=!0;for(let s=0;s<n.length;++s){if(i[s])continue;let o=n[s];if(ei(o))n[s]=o.referToSelf.callback(r),n[s].referToSelf=o.referToSelf,i[s]=!0,e=!1;else if(en(o)){let r=V(o.referTo.references,n,t);r?(n[s]=o.referTo.callback.apply(this,r),n[s].referTo=o.referTo,i[s]=!0,e=!1):a=!0}}if(e&&a)throw SyntaxError("Circular reference detected in resolving typed.referTo")}return n}function G(e){let t=/\bthis(\(|\.signatures\b)/;Object.keys(e).forEach(r=>{let n=e[r];if(t.test(n.toString()))throw SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function $(e,n){let i,a;if(f.createCount++,0===Object.keys(n).length)throw SyntaxError("No signatures provided");f.warnAgainstDeprecatedThis&&G(n);let s=[],o=[],l={},u=[];for(i in n){let e;if(!Object.prototype.hasOwnProperty.call(n,i))continue;let t=A(i);if(!t)continue;
1s.forEach(function(e){if(U(e,t))throw TypeError('Conflicting signatures "'+w(e)+'" and "'+w(t)+'".')}),s.push(t);let r=o.length;for(e of(o.push(n[i]),q(t.map(D)))){let t=w(e);u.push({params:e,name:t,fn:r}),e.every(e=>!e.hasConversion)&&(l[t]=r)}}u.sort(I);let c=W(o,l,el);for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(l[a]=c[l[a]]);let h=[],p=new Map;for(a of u)p.has(a.name)||(a.fn=c[a.fn],h.push(a),p.set(a.name,a));let m=h[0]&&h[0].params.length<=2&&!E(h[0].params),d=h[1]&&h[1].params.length<=2&&!E(h[1].params),g=h[2]&&h[2].params.length<=2&&!E(h[2].params),v=h[3]&&h[3].params.length<=2&&!E(h[3].params),x=h[4]&&h[4].params.length<=2&&!E(h[4].params),y=h[5]&&h[5].params.length<=2&&!E(h[5].params),b=m&&d&&g&&v&&x&&y;for(let e=0;e<h.length;++e)h[e].test=S(h[e].params);let _=m?N(h[0].params[0]):t,C=d?N(h[1].params[0]):t,M=g?N(h[2].params[0]):t,T=v?N(h[3].params[0]):t,k=x?N(h[4].params[0]):t,F=y?N(h[5].params[0]):t,B=m?N(h[0].params[1]):t,P=d?N(h[1].params[1]):t,j=g?N(h[2].params[1]):t,O=v?N(h[3].params[1]):t,z=x?N(h[4].params[1]):t,R=y?N(h[5].params[1]):t;for(let e=0;e<h.length;++e)h[e].implementation=L(h[e].params,h[e].fn);let H=m?h[0].implementation:r,V=d?h[1].implementation:r,$=g?h[2].implementation:r,Y=v?h[3].implementation:r,Z=x?h[4].implementation:r,X=y?h[5].implementation:r,J=m?h[0].params.length:-1,K=d?h[1].params.length:-1,Q=g?h[2].params.length:-1,ee=v?h[3].params.length:-1,et=x?h[4].params.length:-1,er=y?h[5].params.length:-1,en=6*!!b,ei=h.length,ea=h.map(e=>e.test),es=h.map(e=>e.implementation),eo=function(){for(let e=en;e<ei;e++)if(ea[e](arguments))return es[e].apply(this,arguments);return f.onMismatch(e,arguments,h)};function el(e,t){return arguments.length===J&&_(e)&&B(t)?H.apply(this,arguments):arguments.length===K&&C(e)&&P(t)?V.apply(this,arguments):arguments.length===Q&&M(e)&&j(t)?$.apply(this,arguments):arguments.length===ee&&T(e)&&O(t)?Y.apply(this,arguments):arguments.length===et&&k(e)&&z(t)?Z.apply(this,arguments):arguments.length===er&&F(e)&&R(t)?X.apply(this,arguments):eo.apply(this,arguments)}try{Object.defineProperty(el,"name",{value:e})}catch(e){}return el.signatures=l,el._typedFunctionData={signatures:h,signatureMap:p},el}function Y(e,t,r){throw B(e,t,r)}function Z(e){return J(e,0,e.length-1)}function X(e){return e[e.length-1]}function J(e,t,r){return Array.prototype.slice.call(e,t,r)}function K(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r]}function Q(e,t){return Array.prototype.concat.apply([],e.map(t))}function ee(){let e=Z(arguments).map(e=>w(A(e))),t=X(arguments);if("function"!=typeof t)throw TypeError("Callback function expected as last argument");return et(e,t)}function et(e,t){return{referTo:{references:e,callback:t}}}function er(e){if("function"!=typeof e)throw TypeError("Callback function expected as first argument");return{referToSelf:{callback:e}}}function en(e){return e&&"object"==typeof e.referTo&&Array.isArray(e.referTo.references)&&"function"==typeof e.referTo.callback}function ei(e){return e&&"object"==typeof e.referToSelf&&"function"==typeof e.referToSelf.callback}function ea(e,t){if(!e)return t;if(t&&t!==e){let r=Error("Function names do not match (expected: "+e+", actual: "+t+")");throw r.data={actual:t,expected:e},r}return e}function es(e){let t;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(v(e[r])||"string"==typeof e[r].signature)&&(t=ea(t,e[r].name));return t}function eo(e,t){let r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(r in e&&t[r]!==e[r]){let n=Error('Signature "'+r+'" is defined twice');throw n.data={signature:r,sourceFunction:t[r],destFunction:e[r]},n}e[r]=t[r]}}m(),p(l);let el=f;function eu(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");if(e.to===e.from)throw SyntaxError('Illegal to define conversion from "'+e.from+'" to itself.')}return(f=function(e){let t="string"==typeof e,r=+!!t,n=t?e:"",i={};for(let e=r;e<arguments.length;++e){let r,a=arguments[e],s={};if("function"==typeof a?(r=a.name,"string"==typeof a.signature?s[a.signature]=a:v(a)&&(s=a.signatures)):o(a)&&(s=a,t||(r=es(a))),0===Object.keys(s).length){let t=TypeError("Argument to 'typed' at index "+e+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw t.data={index:e,argument:a},t}t||(n=ea(n,r)),eo(i,s)}return $(n||"",i)}).create=i,f.createCount=el.createCount,f.onMismatch=Y,f.throwMismatchError=Y,f.createError=B,f.clear=m,f.clearConversions=d,f.addTypes=p,f._findType=h,f.referTo=ee,f.referToSelf=er,f.convert=b,f.findSignature=x,f.find=y,f.isTypedFunction=v,f.warnAgainstDeprecatedThis=!0,f.addType=function(e,t){let r="any";!1!==t&&a.has("Object")&&(r="Object"),f.addTypes([e],r)},f.addConversion=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{override:!1};eu(e);let r=h(e.to),n=r.conversionsTo.find(t=>t.from===e.from);if(n)if(t&&t.override)f.removeConversion({from:n.from,to:e.to,convert:n.convert});else throw Error('There is already a conversion from "'+e.from+'" to "'+r.name+'"');r.conversionsTo.push({from:e.from,to:r.name,convert:e.convert,index:c++})}
1,f.addConversions=function(e,t){e.forEach(e=>f.addConversion(e,t))},f.removeConversion=function(e){eu(e);let t=h(e.to),r=K(t.conversionsTo,t=>t.from===e.from);if(!r)throw Error("Attempt to remove nonexistent conversion from "+e.from+" to "+e.to);if(r.convert!==e.convert)throw Error("Conversion to remove does not match existing conversion");let n=t.conversionsTo.indexOf(r);t.conversionsTo.splice(n,1)},f.resolve=function(e,t){if(!v(e))throw TypeError(n);let r=e._typedFunctionData.signatures;for(let e=0;e<r.length;++e)if(r[e].test(t))return r[e];return null},f}return i()})},123180,(e,t,r)=>{t.exports=function e(t,r){"use strict";var n,i,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,s=/(^[ ]*|[ ]*$)/g,o=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,u=/^0/,c=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},f=c(t).replace(s,"")||"",h=c(r).replace(s,"")||"",p=f.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=h.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(f.match(l),16)||1!==p.length&&f.match(o)&&Date.parse(f),g=parseInt(h.match(l),16)||d&&h.match(o)&&Date.parse(h)||null;if(g){if(d<g)return -1;else if(d>g)return 1}for(var v=0,x=Math.max(p.length,m.length);v<x;v++){if(n=!(p[v]||"").match(u)&&parseFloat(p[v])||p[v]||0,i=!(m[v]||"").match(u)&&parseFloat(m[v])||m[v]||0,isNaN(n)!==isNaN(i))return isNaN(n)?1:-1;if(typeof n!=typeof i&&(n+="",i+=""),n<i)return -1;if(n>i)return 1}return 0}},856166,(e,t,r)=>{"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},a={"–":"\\--","—":"\\---"," ":"~","	":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},s=function(e,t){return n({},e,t)};t.exports=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preserveFormatting,o=void 0!==r&&r,l=t.escapeMapFn,u=void 0===l?s:l,c=String(e),f="",h=u(n({},i),o?n({},a):{}),p=Object.keys(h),m=function(){var e=!1;p.forEach(function(t,r){!e&&c.length>=t.length&&c.slice(0,t.length)===t&&(f+=h[p[r]],c=c.slice(t.length,c.length),e=!0)}),e||(f+=c.slice(0,1),c=c.slice(1,c.length))};c;)m();return f}},287741,(e,t,r)=>{!function(t,r,n){function i(e){var t=this,r=o();t.next=function(){var e=2091639*t.s0+23283064365386963e-26*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=r(" "),t.s1=r(" "),t.s2=r(" "),t.s0-=r(e),t.s0<0&&(t.s0+=1),t.s1-=r(e),t.s1<0&&(t.s1+=1),t.s2-=r(e),t.s2<0&&(t.s2+=1)}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var r=new i(e),n=t&&t.state,s=r.next;return s.int32=function(){return 0x100000000*r.next()|0},s.double=function(){return s()+(2097152*s()|0)*11102230246251565e-32},s.quick=s,n&&("object"==typeof n&&a(n,r),s.state=function(){return a(r,{})}),s}function o(){var e=0xefc8249d;return function(t){t=String(t);for(var r=0;r<t.length;r++){var n=.02519603282416938*(e+=t.charCodeAt(r));e=n>>>0,n-=e,n*=e,e=n>>>0,n-=e,e+=0x100000000*n}return(e>>>0)*23283064365386963e-26}}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.alea=s}(e.e,t,"function"==typeof define&&define)},989057,(e,t,r)=>{!function(t,r,n){function i(e){var t=this,r="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:r+=e;for(var n=0;n<r.length+64;n++)t.x^=r.charCodeAt(n),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function s(e,t){var r=new i(e),n=t&&t.state,s=function(){return(r.next()>>>0)/0x100000000};return s.double=function(){do var e=((r.next()>>>11)+(r.next()>>>0)/0x100000000)/2097152;while(0===e)return e},s.int32=r.next,s.quick=s,n&&("object"==typeof n&&a(n,r),s.state=function(){return a(r,{})}),s}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.xor128=s}(e.e,t,"function"==typeof define&&define)},226605,(e,t,r)=>{!function(t,r,n){function i(e){var t=this,r="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^(e^e<<1))|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:r+=e;for(var n=0;n<r.length+64;n++)t.x^=r.charCodeAt(n),n==r.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function s(e,t){var r=new i(e),n=t&&t.state,s=function(){return(r.next()>>>0)/0x100000000};return s.double=function(){do var e=((r.next()>>>11)+(r.next()>>>0)/0x100000000)/2097152;while(0===e)return e},s.int32=r.next,s.quick=s,n&&("object"==typeof n&&a(n,r),s.state=function(){return a(r,{})}),s}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.xorwow=s}(e.e,t,"function"==typeof define&&define)},858753,(e,t,r)=>{!function(t,r,n){function i(e){var t=this;t.next=function(){var e,r,n=t.x,i=t.i;return e=n[i],e^=e>>>7,r=e^e<<24^((e=n[i+1&7])^e>>>10)^((e=n[i+3&7])^e>>>3)^((e=n[i+4&7])^e<<7),e=n[i+7&7],e^=e<<13,r^=e^e<<9,n[i]=r,t.i=i+1&7,r},function(e,t){var r,n,i=[];if(t===(0|t))n=i[0]=t;else for(r=0,t=""+t;r<t.length;++r)i[7&r]=i[7&r]<<15^t.charCodeAt(r)+i[r+1&7]<<13;for(;i.length<8;)i.push(0);for(r=0;r<8&&0===i[r];++r);for(n=8==r?i[7]=-1:i[r],e.x=i,e.i=0,r=256;r>0;--r)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function s(e,t){null==e&&(e=+new Date);var r=new i(e),n=t&&t.state,s=function(){return(r.next()>>>0)/0x100000000};return s.double=function(){do var e=((r.next()>>>11)+(r.next()>>>0)/0x100000000)/2097152;while(0===e)return e},s.int32=r.next,s.quick=s,n&&(n.x&&a(n,r),s.state=function(){return a(r,{})}),s}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.xorshift7=s}(e.e,t,"function"==typeof define&&define)},125600,(e,t,r)=>{!function(t,r,n){function i(e){var t=this;t.next=function(){var e,r,n=t.w,i=t.X,a=t.i;return t.w=n=n+0x61c88647|0,r=i[a+34&127],e=i[a=a+1&127],r^=r<<13,e^=e<<17,r^=r>>>15,e^=e>>>12,r=i[a]=r^e,t.i=a,r+(n^n>>>16)|0},function(e,t){var r,n,i,a,s,o=[],l=128;for(t===(0|t)?(n=t,t=null):(t+="\0",n=0,l=Math.max(l,t.length)),i=0,a=-32;a<l;++a)t&&(n^=t.charCodeAt((a+32)%t.length)),0===a&&(s=n),n^=n<<10,n^=n>>>15,n^=n<<4,n^=n>>>13,a>=0&&(s=s+0x61c88647|0,i=0==(r=o[127&a]^=n+s)?i+1:0);for(i>=128&&(o[127&(t&&t.length||0)]=-1),i=127,a=512;a>0;--a)n=o[i+34&127],r=o[i=i+1&127],n^=n<<13,r^=r<<17,n^=n>>>15,r^=r>>>12,o[i]=n^r;e.w=s,e.X=o,e.i=i}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function s(e,t){null==e&&(e=+new Date);var r=new i(e),n=t&&t.state,s=function(){return(r.next()>>>0)/0x100000000};return s.double=function(){do var e=((r.next()>>>11)+(r.next()>>>0)/0x100000000)/2097152;while(0===e)return e},s.int32=r.next,s.quick=s,n&&(n.X&&a(n,r),s.state=function(){return a(r,{})}),s}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.xor4096=s}(e.e,t,"function"==typeof define&&define)},314038,(e,t,r)=>{!function(t,r,n){function i(e){var t=this,r="";t.next=function(){var e=t.b,r=t.c,n=t.d,i=t.a;return e=e<<25^e>>>7^r,r=r-n|0,n=n<<24^n>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^r,t.c=r=r-n|0,t.d=n<<16^r>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-0x61c88647,t.d=0x517cc1b7,e===Math.floor(e)?(t.a=e/0x100000000|0,t.b=0|e):r+=e;for(var n=0;n<r.length+20;n++)t.b^=r.charCodeAt(n),t.next()}function a(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function s(e,t){var r=new i(e),n=t&&t.state,s=function(){return(r.next()>>>0)/0x100000000};return s.double=function(){do var e=((r.next()>>>11)+(r.next()>>>0)/0x100000000)/2097152;while(0===e)return e},s.int32=r.next,s.quick=s,n&&("object"==typeof n&&a(n,r),s.state=function(){return a(r,{})}),s}if(r&&r.exports)r.exports=s;else if(n&&n.amd){let t;e.r,void 0!==(t=s)&&e.v(t)}else this.tychei=s}(e.e,t,"function"==typeof define&&define)},232034,(e,t,r)=>{!function(r,n,i){var a,s=256,o=6,l=52,u="random",c=i.pow(s,o),f=i.pow(2,l),h=2*f,p=s-1;function m(e,t,r){var a=[],l=x(v((t=!0==t?{entropy:!0}:t||{}).entropy?[e,b(n)]:null==e?y():e,3),a),p=new d(a),m=function(){for(var e=p.g(o),t=c,r=0;e<f;)e=(e+r)*s,t*=s,r=p.g(1);for(;e>=h;)e/=2,t/=2,r>>>=1;return(e+r)/t};return m.int32=function(){return 0|p.g(4)},m.quick=function(){return p.g(4)/0x100000000},m.double=m,x(b(p.S),n),(t.pass||r||function(e,t,r,n){return(n&&(n.S&&g(n,p),e.state=function(){return g(p,{})}),r)?(i[u]=e,t):e})(m,l,"global"in t?t.global:this==i,t.state)}function d(e){var t,r=e.length,n=this,i=0,a=n.i=n.j=0,o=n.S=[];for(r||(e=[r++]);i<s;)o[i]=i++;for(i=0;i<s;i++)o[i]=o[a=p&a+e[i%r]+(t=o[i])],o[a]=t;(n.g=function(e){for(var t,r=0,i=n.i,a=n.j,o=n.S;e--;)t=o[i=p&i+1],r=r*s+o[p&(o[i]=o[a=p&a+t])+(o[a]=t)];return n.i=i,n.j=a,r})(s)}function g(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function v(e,t){var r,n=[],i=typeof e;if(t&&"object"==i)for(r in e)try{n.push(v(e[r],t-1))}catch(e){}return n.length?n:"string"==i?e:e+"\0"}function x(e,t){for(var r,n=e+"",i=0;i<n.length;)t[p&i]=p&(r^=19*t[p&i])+n.charCodeAt(i++);return b(t)}function y(){try{var e;return a&&(e=a.randomBytes)?e=e(s):(e=new Uint8Array(s),(r.crypto||r.msCrypto).getRandomValues(e)),b(e)}catch(e){var t=r.navigator,i=t&&t.plugins;return[+new Date,r,i,r.screen,b(n)]}}function b(e){return String.fromCharCode.apply(0,e)}if(x(i.random(),n),t.exports){t.exports=m;try{a={}}catch(e){}}else if("function"==typeof define&&define.amd){let t;e.r,void 0!==(t=m)&&e.v(t)}else i["seed"+u]=m}("u">typeof self?self:e.e,[],Math)},289378,(e,t,r)=>{var n=e.r(287741),i=e.r(989057),a=e.r(226605),s=e.r(858753),o=e.r(125600),l=e.r(314038),u=e.r(232034);u.alea=n,u.xor128=i,u.xorwow=a,u.xorshift7=s,u.xor4096=o,u.tychei=l,t.exports=u},865834,(e,t,r)=>{function n(){}n.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function i(){n.off(e,i),t.apply(r,arguments)}return i._=t,this.on(e,i,r)}
1,emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;n<i;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],i=[];if(n&&t)for(var a=0,s=n.length;a<s;a++)n[a].fn!==t&&n[a].fn._!==t&&i.push(n[a]);return i.length?r[e]=i:delete r[e],this}},t.exports=n,t.exports.TinyEmitter=n},502562,(e,t,r)=>{!function(e,t){t(r)}(e.e,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};e.CountUp=function(){function e(e,r,n){var i=this;this.endVal=r,this.options=n,this.version="2.10.1",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",autoAnimate:!1,autoAnimateDelay:200,autoAnimateOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(e){i.startTime||(i.startTime=e);var t=e-i.startTime;i.remaining=i.duration-t,i.useEasing?i.countDown?i.frameVal=i.startVal-i.easingFn(t,0,i.startVal-i.endVal,i.duration):i.frameVal=i.easingFn(t,i.startVal,i.endVal-i.startVal,i.duration):i.frameVal=i.startVal+(i.endVal-i.startVal)*(t/i.duration);var r=i.countDown?i.frameVal<i.endVal:i.frameVal>i.endVal;i.frameVal=r?i.endVal:i.frameVal,i.frameVal=Number(i.frameVal.toFixed(i.options.decimalPlaces)),i.printValue(i.frameVal),t<i.duration?i.rAF=requestAnimationFrame(i.count):null!==i.finalEndVal?i.update(i.finalEndVal):i.options.onCompleteCallback&&i.options.onCompleteCallback()},this.formatNumber=function(e){var t,r,n,a,s=e<0?"-":"",o=(t=Math.abs(e).toFixed(i.options.decimalPlaces)+"").split(".");if(r=o[0],n=o.length>1?i.options.decimal+o[1]:"",i.options.useGrouping){a="";for(var l=3,u=0,c=0,f=r.length;c<f;++c)i.options.useIndianSeparators&&4===c&&(l=2,u=1),0!==c&&u%l==0&&(a=i.options.separator+a),u++,a=r[f-c-1]+a;r=a}return i.options.numerals&&i.options.numerals.length&&(r=r.replace(/[0-9]/g,function(e){return i.options.numerals[+e]}),n=n.replace(/[0-9]/g,function(e){return i.options.numerals[+e]})),s+i.options.prefix+r+n+i.options.suffix},this.easeOutExpo=function(e,t,r,n){return r*(1-Math.pow(2,-10*e/n))*1024/1023+t},this.options=t(t({},this.defaults),n),this.options.enableScrollSpy&&(this.options.autoAnimate=!0),void 0!==this.options.scrollSpyDelay&&(this.options.autoAnimateDelay=this.options.scrollSpyDelay),this.options.scrollSpyOnce&&(this.options.autoAnimateOnce=!0),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.el="string"==typeof e?document.getElementById(e):e,r=null==r?this.parse(this.el.innerHTML):r,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(r),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","u">typeof window&&this.options.autoAnimate&&(this.error||"u"<typeof IntersectionObserver?this.error?console.error(this.error,e):console.error("IntersectionObserver is not supported by this browser"):this.setupObserver())}return e.prototype.setupObserver=function(){var t=this,r=e.observedElements.get(this.el);r&&r.unobserve(),e.observedElements.set(this.el,this),this.observer=new IntersectionObserver(function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];i.isIntersecting&&t.paused&&!t.once?(t.paused=!1,t.autoAnimateTimeout=setTimeout(function(){return t.start()},t.options.autoAnimateDelay),t.options.autoAnimateOnce&&(t.once=!0,t.observer.disconnect())):i.isIntersecting||t.paused||(clearTimeout(t.autoAnimateTimeout),t.reset())}},{threshold:0}),this.observer.observe(this.el)},e.prototype.unobserve=function(){var t;clearTimeout(this.autoAnimateTimeout),null==(t=this.observer)||t.disconnect(),e.observedElements.delete(this.el)},e.prototype.onDestroy=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.unobserve(),this.options.onCompleteCallback=null,this.options.onStartCallback=null},e.prototype.determineDirectionAndSmartEasing=function(){var e=null!==this.finalEndVal?this.finalEndVal:this.endVal;if(this.countDown=this.startVal>e,Math.abs(e-this.startVal)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var t=this.countDown?1:-1;
1this.endVal=e+t*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),e&&(this.options.onCompleteCallback=e),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){if(this.paused)this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count);else{cancelAnimationFrame(this.rAF);var e=null!==this.finalEndVal?this.duration+this.remaining:this.remaining;this.remaining=e}this.paused=!this.paused},e.prototype.reset=function(){clearTimeout(this.autoAnimateTimeout),cancelAnimationFrame(this.rAF),this.paused=!0,this.once=!1,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t;if(this.el){var r=this.formattingFn(e);(null==(t=this.options.plugin)?void 0:t.render)?this.options.plugin.render(this.el,r):"INPUT"===this.el.tagName?this.el.value=r:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=r:this.el.innerHTML=r}},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e.prototype.parse=function(e){var t=function(e){return e.replace(/([.,'  ])/g,"\\$1")},r=t(this.options.separator),n=t(this.options.decimal);return parseFloat(e.replace(RegExp(r,"g"),"").replace(RegExp(n,"g"),"."))},e.observedElements=new WeakMap,e}()})},483846,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(271645),i=e.r(502562);function a(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=l(e,"string");return"symbol"==typeof t?t:String(t)}function c(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(){return(f=Object.assign.bind()).apply(this,arguments)}function h(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function p(e,t){if(null==e)return{};var r,n,i=h(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m(e,t){return d(e)||a(e,t)||g(e,t)||x()}function d(e){if(Array.isArray(e))return e}function g(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}
1function x(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function b(e){var t=n.useRef(e);return y(function(){t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)},[])}var w=function(e,t){var r=t.decimal,n=t.decimals,a=t.duration,s=t.easingFn,o=t.end,l=t.formattingFn,u=t.numerals,c=t.prefix,f=t.separator,h=t.start,p=t.suffix,m=t.useEasing,d=t.useGrouping,g=t.useIndianSeparators,v=t.enableScrollSpy,x=t.scrollSpyDelay,y=t.scrollSpyOnce,b=t.plugin;return new i.CountUp(e,o,{startVal:h,duration:a,decimal:r,decimalPlaces:n,easingFn:s,formattingFn:l,numerals:u,separator:f,prefix:c,suffix:p,plugin:b,useEasing:m,useIndianSeparators:g,useGrouping:d,enableScrollSpy:v,scrollSpyDelay:x,scrollSpyOnce:y})},_=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],D={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},C=function(e){var t=Object.fromEntries(Object.entries(e).filter(function(e){return void 0!==m(e,2)[1]})),r=n.useMemo(function(){return o(o({},D),t)},[e]),i=r.ref,a=r.startOnMount,s=r.enableReinitialize,l=r.delay,u=r.onEnd,c=r.onStart,f=r.onPauseResume,h=r.onReset,d=r.onUpdate,g=p(r,_),v=n.useRef(),x=n.useRef(),y=n.useRef(!1),C=b(function(){return w("string"==typeof i?i:i.current,g)}),A=b(function(e){var t=v.current;if(t&&!e)return t;var r=C();return v.current=r,r}),E=b(function(){var e=function(){return A(!0).start(function(){null==u||u({pauseResume:N,reset:S,start:T,update:M})})};l&&l>0?x.current=setTimeout(e,1e3*l):e(),null==c||c({pauseResume:N,reset:S,update:M})}),N=b(function(){A().pauseResume(),null==f||f({reset:S,start:T,update:M})}),S=b(function(){A().el&&(x.current&&clearTimeout(x.current),A().reset(),null==h||h({pauseResume:N,start:T,update:M}))}),M=b(function(e){A().update(e),null==d||d({pauseResume:N,reset:S,start:T})}),T=b(function(){S(),E()}),k=b(function(e){a&&(e&&S(),E())});return n.useEffect(function(){y.current?s&&k(!0):(y.current=!0,k())},[s,y,k,l,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.formattingFn]),n.useEffect(function(){return function(){S()}},[S]),{start:T,pauseResume:N,reset:S,update:M,getCountUp:A}},A=["className","redraw","containerProps","children","style"];r.default=function(e){var t=e.className,r=e.redraw,i=e.containerProps,a=e.children,s=e.style,l=p(e,A),u=n.useRef(null),c=n.useRef(!1),h=C(o(o({},l),{},{ref:u,startOnMount:"function"!=typeof a||0===e.delay,enableReinitialize:!1})),m=h.start,d=h.reset,g=h.update,v=h.pauseResume,x=h.getCountUp,y=b(function(){m()}),w=b(function(t){e.preserveValue||d(),g(t)}),_=b(function(){"function"!=typeof e.children||u.current instanceof Element?x():console.error('Couldn\'t find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.')});n.useEffect(function(){_()},[_]),n.useEffect(function(){c.current&&w(e.end)},[e.end,w]);var D=r&&e;return(n.useEffect(function(){r&&c.current&&y()},[y,r,D]),n.useEffect(function(){!r&&c.current&&y()},[y,r,e.start,e.suffix,e.prefix,e.duration,e.separator,e.decimals,e.decimal,e.className,e.formattingFn]),n.useEffect(function(){c.current=!0},[]),"function"==typeof a)?a({countUpRef:u,start:m,reset:d,update:g,pauseResume:v,getCountUp:x}):n.createElement("span",f({className:t,ref:u,style:s},i),void 0!==e.start?x().formattingFn(e.start):"")},r.useCountUp=C},378923,e=>{"use strict";e.i(247167);var t=e.i(843476),r=e.i(417137);e.s([],101511),e.i(101511);var n=e.i(768108);function i(e,t){if(s(e,t)||o(e,t))return e[t];if(c(e,t))throw Error('Cannot access method "'.concat(t,'" as a property'));if(null==e)throw TypeError('Cannot access property "'.concat(t,'": object is ').concat(e));throw Error('No access to property "'+t+'"')}function a(e,t,r){if(s(e,t)||o(e,t))return e[t]=r,r;throw Error('No access to property "'.concat(t,'"'))}function s(e,t){return!!f(e)&&!(t in Object.prototype)}function o(e,t){return!!Array.isArray(e)&&("number"==typeof t||"string"==typeof t&&l(t)||"length"===t)}function l(e){return/^\d+$/.test(e)}function u(e,t){if(!c(e,t))throw Error('No access to method "'+t+'"');return e[t]}function c(e,t){return!(null==e||"function"!=typeof e[t]||ex(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!h.has(t)||!(t in Object.prototype)&&!(t in Function.prototype))}function f(e){return"object"==typeof e&&e&&e.constructor===Object}
1var h=new Set(["toString","valueOf","toLocaleString"]);class p{constructor(e){this.wrappedObject=e,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(e=>this.has(e)).values()}get(e){return i(this.wrappedObject,e)}set(e,t){return a(this.wrappedObject,e,t),this}has(e){return s(this.wrappedObject,e)&&e in this.wrappedObject}entries(){return d(this.keys(),e=>[e,this.get(e)])}forEach(e){for(var t of this.keys())e(this.get(t),t,this)}delete(e){s(this.wrappedObject,e)&&delete this.wrappedObject[e]}clear(){for(var e of this.keys())this.delete(e)}get size(){return Object.keys(this.wrappedObject).length}}class m{constructor(e,t,r){this.a=e,this.b=t,this.bKeys=r,this[Symbol.iterator]=this.entries}get(e){return this.bKeys.has(e)?this.b.get(e):this.a.get(e)}set(e,t){return this.bKeys.has(e)?this.b.set(e,t):this.a.set(e,t),this}has(e){return this.b.has(e)||this.a.has(e)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return d(this.keys(),e=>[e,this.get(e)])}forEach(e){for(var t of this.keys())e(this.get(t),t,this)}delete(e){return this.bKeys.has(e)?this.b.delete(e):this.a.delete(e)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function d(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function g(){return new Map}function v(e){if(!e)return g();if(R(e))return e;if(L(e))return new p(e);throw Error("createMap can create maps from objects or Maps")}function x(e){if(e instanceof p)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);a(t,r,n)}return t}function y(e){return"number"==typeof e}function b(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function w(e){return"bigint"==typeof e}function _(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function D(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function C(e){return e&&!0===e.constructor.prototype.isUnit||!1}function A(e){return"string"==typeof e}var E=Array.isArray;function N(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function S(e){return Array.isArray(e)||N(e)}function M(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function T(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function k(e){return e&&!0===e.constructor.prototype.isRange||!1}function F(e){return e&&!0===e.constructor.prototype.isIndex||!1}function B(e){return"boolean"==typeof e}function P(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function j(e){return e&&!0===e.constructor.prototype.isHelp||!1}function O(e){return"function"==typeof e}function I(e){return e instanceof Date}function z(e){return e instanceof RegExp}function L(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!_(e)&&!D(e))}function R(e){return!!e&&(e instanceof Map||e instanceof p||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}function q(e){return R(e)&&R(e.a)&&R(e.b)}function U(e){return R(e)&&L(e.wrappedObject)}function H(e){return null===e}function V(e){return void 0===e}function W(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function G(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function $(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function Y(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function Z(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function X(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function J(e){return X(e)||en(e)&&1===e.args.length&&X(e.args[0])&&"-+~".includes(e.op)}function K(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function Q(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function ee(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function et(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function er(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function en(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function ei(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function ea(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function es(e){return e&&!0===e.isRelationalNode&&!0===e.constructor.prototype.isNode||!1}function eo(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function el(e){return e&&!0===e.constructor.prototype.isChain||!1}function eu(e){var t=typeof e;return"object"===t?null===e?"null":b(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function ec(e){var t=typeof e;if("number"===t||"bigint"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return ec(e)});if(e instanceof Date)return new Date(e.valueOf());if(b(e))return e;if(L(e))return ef(e,ec);if("function"===t)return e;throw TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function ef(e,t){var r={};for(var n in e)ex(e,n)&&(r[n]=t(e[n]));return r}function eh(e,t){for(var r in t)ex(t,r)&&(e[r]=t[r]);return e}function ep(e,t){if(Array.isArray(t))throw TypeError("Arrays are not supported by deepExtend");for(var r in t)if(ex(t,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(t[r]&&t[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r]&&e[r].constructor===Object?ep(e[r],t[r]):e[r]=t[r];else if(Array.isArray(t[r]))throw TypeError("Arrays are not supported by deepExtend");else e[r]=t[r];return e}function em(e,t){var r,n,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;n++)if(!em(e[n],t[n]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!em(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}function ed(e){var t={};return eg(e,t),t}function eg(e,t){for(var r in e)if(ex(e,r)){var n=e[r];"object"==typeof n&&null!==n?eg(n,t):t[r]=n}}function ev(e,t,r){var n,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(n=r(),i=!1),n},set:function(e){n=e,i=!1},configurable:!0,enumerable:!0})}function ex(e,t){return e&&Object.hasOwnProperty.call(e,t)}function ey(e){return e&&"function"==typeof e.factory}function eb(e,t){for(var r={},n=0;n<t.length;n++){var i=t[n],a=e[i];void 0!==a&&(r[i]=a)}return r}function ew(e,t,r,n){function i(n){var i=eb(n,t.map(eA));return eD(e,t,n),r(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),n&&(i.meta=n),i}function e_(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function eD(e,t,r){if(!t.filter(e=>!eC(e)).every(e=>void 0!==r[e])){var n=t.filter(e=>void 0===r[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(n.map(e=>'"'.concat(e,'"')).join(", "),"."))}}function eC(e){return e&&"?"===e[0]}function eA(e){return e&&"?"===e[0]?e.slice(1):e}function eE(e){return"boolean"==typeof e||!!Number.isFinite(e)&&e===Math.round(e)}function eN(e,t){if("bigint"===t.number)try{BigInt(e)}catch(e){return t.numberFallback}return t.number}var eS=Math.sign||function(e){return e>0?1:e<0?-1:0},eM=Math.log2||function(e){return Math.log(e)/Math.LN2},eT=Math.log10||function(e){return Math.log(e)/Math.LN10},ek=Math.log1p||function(e){return Math.log(e+1)},eF=Math.cbrt||function(e){if(0===e)return e;var t,r=e<0;return r&&(e=-e),Number.isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,r?-t:t},eB=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function eP(e,t,r){var n={2:"0b",8:"0o",16:"0x"}[t],i="";if(r){if(r<1)throw Error("size must be in greater than 0");if(!eE(r))throw Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw Error("Value must be in range [-2^".concat(r-1,", 2^").
1concat(r-1,"-1]"));if(!eE(e))throw Error("Value must be an integer");e<0&&(e+=2**r),i="i".concat(r)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(n).concat(e.toString(t)).concat(i)}function ej(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:r,precision:n,wordSize:i}=eO(t);switch(r){case"fixed":return eL(e,n);case"exponential":return eR(e,n);case"engineering":return ez(e,n);case"bin":return eP(e,2,i);case"oct":return eP(e,8,i);case"hex":return eP(e,16,i);case"auto":return eq(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function eO(e){var t,r,n="auto";if(void 0!==e)if(y(e))t=e;else if(b(e))t=e.toNumber();else if(L(e))void 0!==e.precision&&(t=eQ(e.precision,()=>{throw Error('Option "precision" must be a number or BigNumber')})),void 0!==e.wordSize&&(r=eQ(e.wordSize,()=>{throw Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(n=e.notation);else throw Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:n,precision:t,wordSize:r}}function eI(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var r=t[1],n=t[2],i=parseFloat(t[4]||"0"),a=n.indexOf(".");i+=-1!==a?a-1:n.length-1;var s=n.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===s.length&&(s.push(0),i++),{sign:r,coefficients:s,exponent:i}}function ez(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=eU(eI(e),t),n=r.exponent,i=r.coefficients,a=n%3==0?n:n<0?n-3-n%3:n-n%3;if(y(t))for(;t>i.length||n-a+1>i.length;)i.push(0);else for(var s=Math.abs(n-a)-(i.length-1),o=0;o<s;o++)i.push(0);for(var l=Math.abs(n-a),u=1;l>0;)u++,l--;var c=i.slice(u).join(""),f=y(t)&&c.length||c.match(/[1-9]/)?"."+c:"",h=i.slice(0,u).join("")+f+"e"+(n>=0?"+":"")+a.toString();return r.sign+h}function eL(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=eI(e),n="number"==typeof t?eU(r,r.exponent+1+t):r,i=n.coefficients,a=n.exponent+1,s=a+(t||0);return i.length<s&&(i=i.concat(eH(s-i.length))),a<0&&(i=eH(-a+1).concat(i),a=1),a<i.length&&i.splice(a,0,0===a?"0.":"."),n.sign+i.join("")}function eR(e,t){if(isNaN(e)||!Number.isFinite(Number(e)))return String(e);var r=eI(e),n=t?eU(r,t):r,i=n.coefficients,a=n.exponent;i.length<t&&(i=i.concat(eH(t-i.length)));var s=i.shift();return n.sign+s+(i.length>0?"."+i.join(""):"")+"e"+(a>=0?"+":"")+a}function eq(e,t,r){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=e0(null==r?void 0:r.lowerExp,-3),i=e0(null==r?void 0:r.upperExp,5),a=eI(e),s=t?eU(a,t):a;if(s.exponent<n||s.exponent>=i)return eR(e,t);var o=s.coefficients,l=s.exponent;o.length<t&&(o=o.concat(eH(t-o.length))),o=o.concat(eH(l-o.length+1+(o.length<t?t-o.length:0))),o=eH(-l).concat(o);var u=l>0?l:0;return u<o.length-1&&o.splice(u+1,0,"."),s.sign+o.join("")}function eU(e,t){for(var r={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=r.coefficients;t<=0;)n.unshift(0),r.exponent++,t++;if(n.length>t&&n.splice(t,n.length-t)[0]>=5){var i=t-1;for(n[i]++;10===n[i];)n.pop(),0===i&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}return r}function eH(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function eV(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function eW(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-8,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(r<=0)throw Error("Relative tolerance must be greater than 0");if(n<0)throw Error("Absolute tolerance must be at least 0");return!(isNaN(e)||isNaN(t))&&(Number.isFinite(e)&&Number.isFinite(t)?e===t||Math.abs(e-t)<=Math.max(r*Math.max(Math.abs(e),Math.abs(t)),n):e===t)}var eG=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},e$=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},eY=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},eZ=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},eX=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},eJ=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function eK(e,t){return(e>0||!(e<0)&&1/e==1/0)^(t>0||!(t<0)&&1/t==1/0)?-e:e}function eQ(e,t){return y(e)?e:b(e)?e.toNumber():void t()}function e0(e,t){return y(e)?e:b(e)?e.toNumber():t}var e1=function(){return e1=n.default.create,n.default},e2=ew("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:r,DenseMatrix:n,Fraction:i}=e,a=e1();return a.clear(),a.addTypes([{name:"number",test:y},{name:"Complex",test:_},{name:"BigNumber",test:b},{name:"bigint",test:w},{name:"Fraction",test:D},{name:"Unit",test:C},{name:"identifier",test:e=>A&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
1D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2\uDFF3]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
10EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDB0-\uDDDB\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE4
10-\uDE7F\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2\uDFF3]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])*$/.test(e)},{name:"string",test:A},{name:"Chain",test:el},{name:"Array",test:E},{name:"Matrix",test:N},{name:"DenseMatrix",test:M},{name:"SparseMatrix",test:T},{name:"Range",test:k},{name:"Index",test:F},{name:"boolean",test:B},{name:"ResultSet",test:P},{name:"Help",test:j},{name:"function",test:O},{name:"Date",test:I},{name:"RegExp",test:z},{name:"null",test:H},{name:"undefined",test:V}
1,{name:"AccessorNode",test:W},{name:"ArrayNode",test:G},{name:"AssignmentNode",test:$},{name:"BlockNode",test:Y},{name:"ConditionalNode",test:Z},{name:"ConstantNode",test:X},{name:"FunctionNode",test:Q},{name:"FunctionAssignmentNode",test:K},{name:"IndexNode",test:ee},{name:"Node",test:et},{name:"ObjectNode",test:er},{name:"OperatorNode",test:en},{name:"ParenthesisNode",test:ei},{name:"RangeNode",test:ea},{name:"RelationalNode",test:es},{name:"SymbolNode",test:eo},{name:"Map",test:R},{name:"Object",test:L}]),a.addConversions([{from:"number",to:"BigNumber",convert:function(e){if(t||e3(e),eV(e)>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return r||e4(e),new r(e,0)}},{from:"BigNumber",to:"Complex",convert:function(e){return r||e4(e),new r(e.toNumber(),0)}},{from:"bigint",to:"number",convert:function(e){if(e>Number.MAX_SAFE_INTEGER)throw TypeError("Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: "+e+")");return Number(e)}},{from:"bigint",to:"BigNumber",convert:function(e){return t||e3(e),new t(e.toString())}},{from:"bigint",to:"Fraction",convert:function(e){return i||e5(e),new i(e)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return r||e4(e),new r(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||e5(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||e3(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"bigint",convert:function(e){try{return BigInt(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigInt')}}},{from:"string",to:"Fraction",convert:function(e){i||e5(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){r||e4(e);try{return new r(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||e3(e),new t(+e)}},{from:"boolean",to:"bigint",convert:function(e){return BigInt(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||e5(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return n||e6(),new n(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}]),a.onMismatch=(e,t,r)=>{var n=a.createError(e,t,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===t.length&&S(t[0])&&r.some(e=>!e.params.includes(","))){var i=TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."));throw i.data=n.data,i}throw n},a.onMismatch=(e,t,r)=>{var n=a.createError(e,t,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===t.length&&S(t[0])&&r.some(e=>!e.params.includes(","))){var i=TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."));throw i.data=n.data,i}throw n},a});function e3(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function e4(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function e6(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function e5(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var e8,e9,e7=ew("ResultSet",[],()=>{function e(t){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.map(String).join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),te=9e15,tt=1e9,tr="0123456789abcdef",tn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",ti="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823
1066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ta={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},ts=!0,to="[DecimalError] ",tl=to+"Invalid argument: ",tu=to+"Precision limit exceeded",tc=to+"crypto unavailable",tf="[object Decimal]",th=Math.floor,tp=Math.pow,tm=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,td=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,tg=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,tv=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tx=1e7,ty=7,tb=0x1fffffffffffff,tw=tn.length-1,t_=ti.length-1,tD={toStringTag:tf};function tC(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)(r=ty-(n=e[t]+"").length)&&(a+=tO(r)),a+=n;(r=ty-(n=(s=e[t])+"").length)&&(a+=tO(r))}else if(0===s)return"0";for(;s%10==0;)s/=10;return a+s}function tA(e,t,r){if(e!==~~e||e<t||e>r)throw Error(tl+e)}function tE(e,t,r,n){var i,a,s,o;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=ty,i=0):(i=Math.ceil((t+1)/ty),t%=ty),a=tp(10,ty-t),o=e[i]%a|0,null==n?t<3?(0==t?o=o/100|0:1==t&&(o=o/10|0),s=r<4&&99999==o||r>3&&49999==o||5e4==o||0==o):s=(r<4&&o+1==a||r>3&&o+1==a/2)&&(e[i+1]/a/100|0)==tp(10,t-2)-1||(o==a/2||0==o)&&(e[i+1]/a/100|0)==0:t<4?(0==t?o=o/1e3|0:1==t?o=o/100|0:2==t&&(o=o/10|0),s=(n||r<4)&&9999==o||!n&&r>3&&4999==o):s=((n||r<4)&&o+1==a||!n&&r>3&&o+1==a/2)&&(e[i+1]/a/1e3|0)==tp(10,t-3)-1,s}function tN(e,t,r){for(var n,i,a=[0],s=0,o=e.length;s<o;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=tr.indexOf(e.charAt(s++)),n=0;n<a.length;n++)a[n]>r-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function tS(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/t$(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tG(e,1,t.times(i),new e(1));for(var a=r;a--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}tD.absoluteValue=tD.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),tT(e)},tD.ceil=function(){return tT(new this.constructor(this),this.e+1,2)},tD.clampedTo=tD.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(tl+t);return 0>r.cmp(e)?e:r.cmp(t)>0?t:new n(r)},tD.comparedTo=tD.cmp=function(e){var t,r,n,i,a=this,s=a.d,o=(e=new a.constructor(e)).d,l=a.s,u=e.s;if(!s||!o)return l&&u?l!==u?l:s===o?0:!s^l<0?1:-1:NaN;if(!s[0]||!o[0])return s[0]?l:o[0]?-u:0;if(l!==u)return l;if(a.e!==e.e)return a.e>e.e^l<0?1:-1;for(t=0,r=(n=s.length)<(i=o.length)?n:i;t<r;++t)if(s[t]!==o[t])return s[t]>o[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1},tD.cosine=tD.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+ty,n.rounding=1,r=tS(n,tY(n,r)),n.precision=e,n.rounding=t,tT(2==e9||3==e9?r.neg():r,e,t,!0)):new n(1):new n(NaN)},tD.cubeRoot=tD.cbrt=function(){var e,t,r,n,i,a,s,o,l,u,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(ts=!1,(a=c.s*tp(c.s*c,1/3))&&Math.abs(a)!=1/0?n=new f(a.toString()):(r=tC(c.d),(a=((e=c.e)-r.length+1)%3)&&(r+=1==a||-2==a?"0":"00"),a=tp(r,1/3),e=th((e+1)/3)-(e%3==(e<0?-1:2)),(n=new f(r=a==1/0?"5e"+e:(r=a.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=c.s),s=(e=f.precision)+3;;)if(n=tM((u=(l=(o=n).times(o).times(o)).plus(c)).plus(c).times(o),u.plus(l),s+2,1),tC(o.d).slice(0,s)===(r=tC(n.d)).slice(0,s)){if("9999"!=(r=r.slice(s-3,s+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(tT(n,e+1,1),t=!n.times(n).times(n).eq(c));break}
vendor: 9,440 bytes, line 1
1if(!i&&(tT(o,e+1,0),o.times(o).times(o).eq(c))){n=o;break}s+=4,i=1}return ts=!0,tT(n,e,f.rounding,t)},tD.decimalPlaces=tD.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=((e=t.length-1)-th(this.e/ty))*ty,e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},tD.dividedBy=tD.div=function(e){return tM(this,new this.constructor(e))},tD.dividedToIntegerBy=tD.divToInt=function(e){var t=this,r=t.constructor;return tT(tM(t,new r(e),0,1,1),r.precision,r.rounding)},tD.equals=tD.eq=function(e){return 0===this.cmp(e)},tD.floor=function(){return tT(new this.constructor(this),this.e+1,3)},tD.greaterThan=tD.gt=function(e){return this.cmp(e)>0},tD.greaterThanOrEqualTo=tD.gte=function(e){var t=this.cmp(e);return 1==t||0===t},tD.hyperbolicCosine=tD.cosh=function(){var e,t,r,n,i,a=this,s=a.constructor,o=new s(1);if(!a.isFinite())return new s(a.s?1/0:NaN);if(a.isZero())return o;r=s.precision,n=s.rounding,s.precision=r+Math.max(a.e,a.sd())+4,s.rounding=1,(i=a.d.length)<32?t=(1/t$(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=tG(s,1,a.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=a.times(a),a=o.minus(l.times(c.minus(l.times(c))));return tT(a,s.precision=r,s.rounding=n,!0)},tD.hyperbolicSine=tD.sinh=function(){var e,t,r,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,r=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,(n=i.d.length)<3)i=tG(a,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=tG(a,2,i=i.times(1/t$(5,e)),i,!0);for(var s,o=new a(5),l=new a(16),u=new a(20);e--;)s=i.times(i),i=i.times(o.plus(s.times(l.times(s).plus(u))))}return a.precision=t,a.rounding=r,tT(i,t,r,!0)},tD.hyperbolicTangent=tD.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,tM(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},tD.inverseCosine=tD.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return -1!==r?0===r?e.isNeg()?tP(t,n,i):new t(0):new t(NaN):e.isZero()?tP(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},tD.inverseHyperbolicCosine=tD.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,ts=!1,r=r.times(r).minus(1).sqrt().plus(r),ts=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},tD.inverseHyperbolicSine=tD.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,ts=!1,r=r.times(r).plus(1).sqrt().plus(r),ts=!0,n.precision=e,n.rounding=t,r.ln())},tD.inverseHyperbolicTangent=tD.atanh=function(){var e,t,r,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,Math.max(n=i.sd(),e)<-(2*i.e)-1)?tT(new a(i),e,t,!0):(a.precision=r=n-i.e,i=tM(i.plus(1),new a(1).minus(i),r+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5)):new a(NaN)},tD.inverseSine=tD.asin=function(){var e,t,r,n,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),r=a.precision,n=a.rounding,-1!==t)?0===t?((e=tP(a,r+4,n).times(.5)).s=i.s,e):new a(NaN):(a.precision=r+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,i.times(2))},tD.inverseTangent=tD.atan=function(){var e,t,r,n,i,a,s,o,l,u=this,c=u.constructor,f=c.precision,h=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);else if(u.abs().eq(1)&&f+4<=t_)return(s=tP(c,f+4,h).times(.25)).s=u.s,s}else{if(!u.s)return new c(NaN);if(f+4<=t_)return(s=tP(c,f+4,h).times(.5)).s=u.s,s}for(c.precision=o=f+10,c.rounding=1,e=r=Math.min(28,o/ty+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(ts=!1,t=Math.ceil(o/ty),n=1,l=u.times(u),s=new c(u),i=u;-1!==e;)if(i=i.times(l),a=s.minus(i.div(n+=2)),i=i.times(l),void 0!==(s=a.plus(i.div(n+=2))).d[t])for(e=t;s.d[e]===a.d[e]&&e--;);return r&&(s=s.times(2<<r-1)),ts=!0,tT(s,c.precision=f,c.rounding=h,!0)},tD.isFinite=function(){return!!this.d},tD.isInteger=tD.isInt=function(){return!!this.d&&th(this.e/ty)>this.d.length-2},tD.isNaN=function(){return!this.s},tD.isNegative=tD.isNeg=function(){return this.s<0},tD.isPositive=tD.isPos=function(){return this.s>0},tD.isZero=function(){return!!this.d&&0===this.d[0]},tD.lessThan=tD.lt=function(e){return 0>this.cmp(e)},tD.lessThanOrEqualTo=tD.lte=function(e){return 1>this.cmp(e)},tD.logarithm=tD.log=function(e){var t,r,n,i,a,s,o,l,u=this,c=u.constructor,f=c.precision,h=c.rounding,p=5;if(null==e)e=new c(10),t=!0;else{if(r=(e=new c(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:1!=u.s?NaN:r?0:1/0);if(t)if(r.length>1)a=!0;else{for(i=r[0];i%10==0;)i/=10;a=1!==i}if(ts=!1,tE((l=tM(s=tq(u,o=f+p),n=t?tB(c,o+10):tq(e,o),o,1)).d,i=f,h))do if(o+=10,l=tM(s=tq(u,o),n=t?tB(c,o+10):tq(e,o),o,1),!a){+tC(l.d).slice(i+1,i+15)+1==1e14&&(l=tT(l,f+1,0));break}while(tE(l.d,i+=10,h))return ts=!0,tT(l,f,h)},tD.minus=tD.sub=function(e){var t,r,n,i,a,s,o,l,u,c,f,h,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN):e=new m(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(u=p.d,h=e.d,o=m.precision,l=m.rounding,!u[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!u[0])return new m(3===l?-0:0);e=new m(p)}return ts?tT(e,o,l):e}if(r=th(e.e/ty),c=th(p.e/ty),u=u.slice(),a=c-r){for((f=a<0)?(t=u,a=-a,s=h.length):(t=h,r=c,s=u.length),a>(n=Math.max(Math.ceil(o/ty),s)+2)&&(a=n,t.length=1),t.reverse(),n=a;n--;)t.push(0);t.reverse()}else{for((f=(n=u.length)<(s=h.length))&&(s=n),n=0;n<s;n++)if(u[n]!=h[n]){f=u[n]<h[n];break}a=0}for(f&&(t=u,u=h,h=t,e.s=-e.s),s=u.length,n=h.length-s;n>0;--n)u[s++]=0;for(n=h.length;n>a;){if(u[--n]<h[n]){for(i=n;i&&0===u[--i];)u[i]=tx-1;--u[i],u[n]+=tx}u[n]-=h[n]}for(;0===u[--s];)u.pop();for(;0===u[0];u.shift())--r;return u[0]?(e.d=u,e.e=tF(u,r),ts?tT(e,o,l):e):new m(3===l?-0:0)},tD.modulo=tD.mod=function(e){var t,r=this,n=r.constructor;return(e=new n(e),r.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!r.d||r.d[0])?(ts=!1,9==n.modulo?(t=tM(r,e.abs(),0,3,1),t.s*=e.s):t=tM(r,e,0,n.modulo,1),t=t.times(e),ts=!0,r.minus(t)):tT(new n(r),n.precision,n.rounding):new n(NaN)},tD.naturalExponential=tD.exp=function(){return tR(this)},tD.naturalLogarithm=tD.ln=function(){return tq(this)},tD.negated=tD.neg=function(){var e=new this.constructor(this);return e.s=-e.s,tT(e)},tD.plus=tD.add=function(e){var t,r,n,i,a,s,o,l,u,c,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return f.s&&e.s?f.d||(e=new h(e.d||f.s===e.s?f:NaN)):e=new h(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(u=f.d,c=e.d,o=h.precision,l=h.rounding,!u[0]||!c[0])return c[0]||(e=new h(f)),ts?tT(e,o,l):e;if(a=th(f.e/ty),n=th(e.e/ty),u=u.slice(),i=a-n){for(i<0?(r=u,i=-i,s=c.length):(r=c,n=a,s=u.length),i>(s=(a=Math.ceil(o/ty))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=u.length)-(i=c.length)<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/tx|0,u[i]%=tx;for(t&&(u.unshift(t),++n),s=u.length;0==u[--s];)u.pop();return e.d=u,e.e=tF(u,n),ts?tT(e,o,l):e},tD.precision=tD.sd=function(e){var t,r=this;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(tl+e);return r.d?(t=tj(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},tD.round=function(){var e=this,t=e.constructor;return tT(new t(e),e.e+1,t.rounding)},tD.sine=tD.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+ty,n.rounding=1,r=tW(n,tY(n,r)),n.precision=e,n.rounding=t,tT(e9>2?r.neg():r,e,t,!0)):new n(NaN)},tD.squareRoot=tD.sqrt=function(){var e,t,r,n,i,a,s=this,o=s.d,l=s.e,u=s.s,c=s.constructor;if(1!==u||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);for(ts=!1,0==(u=Math.sqrt(+s))||u==1/0?(((t=tC(o)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=th((l+1)/2)-(l<0||l%2),n=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(n=(a=n).plus(tM(s,a,r+2,1)).times(.5),tC(a.d).slice(0,r)===(t=tC(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(tT(n,l+1,1),e=!n.times(n).eq(s));break}if(!i&&(tT(a,l+1,0),a.times(a).eq(s))){n=a;break}r+=4,i=1}return ts=!0,tT(n,l,c.rounding,e)},tD.tangent=tD.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=tM(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,tT(2==e9||4==e9?r.neg():r,e,t,!0)):new n(NaN)},tD.times=tD.mul=function(e){var t,r,n,i,a,s,o,l,u,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(e.s*=c.s,!h||!h[0]||!p||!p[0])return new f(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:!h||!p?e.s/0:0*e.s);for(r=th(c.e/ty)+th(e.e/ty),(l=h.length)<(u=p.length)&&(a=h,h=p,p=a,s=l,l=u,u=s),a=[],n=s=l+u;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)o=a[i]+p[n]*h[i-n-1]+t,a[i--]=o%tx|0,t=o/tx|0;a[i]=(a[i]+t)%tx|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=tF(a,r),ts?tT(e,f.precision,f.rounding):e},tD.toBinary=function(e,t){return tZ(this,2,e,t)},tD.toDecimalPlaces=tD.toDP=function(e,t){var r=this,n=r.constructor;
vendor: 4,217 bytes, line 1
1return(r=new n(r),void 0===e)?r:(tA(e,0,tt),void 0===t?t=n.rounding:tA(t,0,8),tT(r,e+r.e+1,t))},tD.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=tk(n,!0):(tA(e,0,tt),void 0===t?t=i.rounding:tA(t,0,8),r=tk(n=tT(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},tD.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?r=tk(i):(tA(e,0,tt),void 0===t?t=a.rounding:tA(t,0,8),r=tk(n=tT(new a(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},tD.toFraction=function(e){var t,r,n,i,a,s,o,l,u,c,f,h,p=this,m=p.d,d=p.constructor;if(!m)return new d(p);if(u=r=new d(1),n=l=new d(0),s=(a=(t=new d(n)).e=tj(m)-p.e-1)%ty,t.d[0]=tp(10,s<0?ty+s:s),null==e)e=a>0?t:u;else{if(!(o=new d(e)).isInt()||o.lt(u))throw Error(tl+o);e=o.gt(t)?a>0?t:u:o}for(ts=!1,o=new d(tC(m)),c=d.precision,d.precision=a=m.length*ty*2;f=tM(o,t,0,1,1),1!=(i=r.plus(f.times(n))).cmp(e);)r=n,n=i,i=u,u=l.plus(f.times(i)),l=i,i=t,t=o.minus(f.times(i)),o=i;return i=tM(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=p.s,h=1>tM(u,n,a,1).minus(p).abs().cmp(tM(l,r,a,1).minus(p).abs())?[u,n]:[l,r],d.precision=c,ts=!0,h},tD.toHexadecimal=tD.toHex=function(e,t){return tZ(this,16,e,t)},tD.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:tA(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(ts=!1,r=tM(r,e,0,t,1).times(e),ts=!0,tT(r)):(e.s=r.s,r=e),r},tD.toNumber=function(){return+this},tD.toOctal=function(e,t){return tZ(this,8,e,t)},tD.toPower=tD.pow=function(e){var t,r,n,i,a,s,o=this,l=o.constructor,u=+(e=new l(e));if(!o.d||!e.d||!o.d[0]||!e.d[0])return new l(tp(+o,u));if((o=new l(o)).eq(1))return o;if(n=l.precision,a=l.rounding,e.eq(1))return tT(o,n,a);if((t=th(e.e/ty))>=e.d.length-1&&(r=u<0?-u:u)<=tb)return i=tI(l,o,r,n),e.s<0?new l(1).div(i):tT(i,n,a);if((s=o.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(s=1),0==o.e&&1==o.d[0]&&1==o.d.length)return o.s=s,o}return(t=0!=(r=tp(+o,u))&&isFinite(r)?new l(r+"").e:th(u*(Math.log("0."+tC(o.d))/Math.LN10+o.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(ts=!1,l.rounding=o.s=1,r=Math.min(12,(t+"").length),(i=tR(e.times(tq(o,n+r)),n)).d&&tE((i=tT(i,n+5,1)).d,n,a)&&(t=n+10,+tC((i=tT(tR(e.times(tq(o,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=tT(i,n+1,0))),i.s=s,ts=!0,l.rounding=a,tT(i,n,a))},tD.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=tk(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(tA(e,1,tt),void 0===t?t=i.rounding:tA(t,0,8),r=tk(n=tT(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},tD.toSignificantDigits=tD.toSD=function(e,t){var r=this,n=r.constructor;return void 0===e?(e=n.precision,t=n.rounding):(tA(e,1,tt),void 0===t?t=n.rounding:tA(t,0,8)),tT(new n(r),e,t)},tD.toString=function(){var e=this,t=e.constructor,r=tk(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},tD.truncated=tD.trunc=function(){return tT(new this.constructor(this),this.e+1,1)},tD.valueOf=tD.toJSON=function(){var e=this,t=e.constructor,r=tk(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var tM=function(){function e(e,t,r){var n,i=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+i,e[a]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=+(e[r]<t[r]),e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,a,s,o,l){var u,c,f,h,p,m,d,g,v,x,y,b,w,_,D,C,A,E,N,S,M=n.constructor,T=n.s==i.s?1:-1,k=n.d,F=i.d;if(!k||!k[0]||!F||!F[0])return new M(!n.s||!i.s||(k?F&&k[0]==F[0]:!F)?NaN:k&&0==k[0]||!F?0*T:T/0);for(l?(p=1,c=n.e-i.e):(l=tx,p=ty,c=th(n.e/p)-th(i.e/p)),N=F.length,A=k.length,x=(v=new M(T)).d=[],f=0;F[f]==(k[f]||0);f++);if(F[f]>(k[f]||0)&&c--,null==a?(_=a=M.precision,s=M.rounding):_=o?a+(n.e-i.e)+1:a,_<0)x.push(1),m=!0;else{if(_=_/p+2|0,f=0,1==N){for(h=0,F=F[0],_++;(f<A||h)&&_--;f++)D=h*l+(k[f]||0),x[f]=D/F|0,h=D%F|0;m=h||f<A}else{for((h=l/(F[0]+1)|0)>1&&(F=e(F,h,l),k=e(k,h,l),N=F.length,A=k.length),C=N,b=(y=k.slice(0,N)
1).length;b<N;)y[b++]=0;(S=F.slice()).unshift(0),E=F[0],F[1]>=l/2&&++E;do h=0,(u=t(F,y,N,b))<0?(w=y[0],N!=b&&(w=w*l+(y[1]||0)),(h=w/E|0)>1?(h>=l&&(h=l-1),g=(d=e(F,h,l)).length,b=y.length,1==(u=t(d,y,g,b))&&(h--,r(d,N<g?S:F,g,l))):(0==h&&(u=h=1),d=F.slice()),(g=d.length)<b&&d.unshift(0),r(y,d,b,l),-1==u&&(b=y.length,(u=t(F,y,N,b))<1&&(h++,r(y,N<b?S:F,b,l))),b=y.length):0===u&&(h++,y=[0]),x[f++]=h,u&&y[0]?y[b++]=k[C]||0:(y=[k[C]],b=1);while((C++<A||void 0!==y[0])&&_--)m=void 0!==y[0]}x[0]||x.shift()}if(1==p)v.e=c,e8=m;else{for(f=1,h=x[0];h>=10;h/=10)f++;v.e=f+c*p-1,tT(v,o?a+v.e+1:a,s,m)}return v}}();function tT(e,t,r,n){var i,a,s,o,l,u,c,f,h,p=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,o=f[0];o>=10;o/=10)i++;if((a=t-i)<0)a+=ty,s=t,l=(c=f[h=0])/tp(10,i-s-1)%10|0;else if((h=Math.ceil((a+1)/ty))>=(o=f.length))if(n){for(;o++<=h;)f.push(0);c=l=0,i=1,a%=ty,s=a-ty+1}else break e;else{for(i=1,c=o=f[h];o>=10;o/=10)i++;a%=ty,l=(s=a-ty+i)<0?0:c/tp(10,i-s-1)%10|0}if(n=n||t<0||void 0!==f[h+1]||(s<0?c:c%tp(10,i-s-1)),u=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(a>0?s>0?c/tp(10,i-s):0:f[h-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,u?(t-=e.e+1,f[0]=tp(10,(ty-t%ty)%ty),e.e=-t||0):f[0]=e.e=0,e;
vendor: 5,703 bytes, line 1
1if(0==a?(f.length=h,o=1,h--):(f.length=h+1,o=tp(10,ty-a),f[h]=s>0?(c/tp(10,i-s)%tp(10,s)|0)*o:0),u)for(;;)if(0==h){for(a=1,s=f[0];s>=10;s/=10)a++;for(s=f[0]+=o,o=1;s>=10;s/=10)o++;a!=o&&(e.e++,f[0]==tx&&(f[0]=1));break}else{if(f[h]+=o,f[h]!=tx)break;f[h--]=0,o=1}for(a=f.length;0===f[--a];)f.pop()}return ts&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function tk(e,t,r){if(!e.isFinite())return tU(e);var n,i=e.e,a=tC(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+tO(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+tO(-i-1)+a,r&&(n=r-s)>0&&(a+=tO(n))):i>=s?(a+=tO(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+tO(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=tO(n))),a}function tF(e,t){var r=e[0];for(t*=ty;r>=10;r/=10)t++;return t}function tB(e,t,r){if(t>tw)throw ts=!0,r&&(e.precision=r),Error(tu);return tT(new e(tn),t,1,!0)}function tP(e,t,r){if(t>t_)throw Error(tu);return tT(new e(ti),t,r,!0)}function tj(e){var t=e.length-1,r=t*ty+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function tO(e){for(var t="";e--;)t+="0";return t}function tI(e,t,r,n){var i,a=new e(1),s=Math.ceil(n/ty+4);for(ts=!1;;){if(r%2&&tX((a=a.times(t)).d,s)&&(i=!0),0===(r=th(r/2))){r=a.d.length-1,i&&0===a.d[r]&&++a.d[r];break}tX((t=t.times(t)).d,s)}return ts=!0,a}function tz(e){return 1&e.d[e.d.length-1]}function tL(e,t,r){for(var n,i,a=new e(t[0]),s=0;++s<t.length;){if(!(i=new e(t[s])).s){a=i;break}((n=a.cmp(i))===r||0===n&&a.s===r)&&(a=i)}return a}function tR(e,t){var r,n,i,a,s,o,l,u=0,c=0,f=0,h=e.constructor,p=h.rounding,m=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(ts=!1,l=m):l=t,o=new h(.03125);e.e>-2;)e=e.times(o),f+=5;for(l+=n=Math.log(tp(2,f))/Math.LN10*2+5|0,r=a=s=new h(1),h.precision=l;;){if(a=tT(a.times(e),l,1),r=r.times(++c),tC((o=s.plus(tM(a,r,l,1))).d).slice(0,l)===tC(s.d).slice(0,l)){for(i=f;i--;)s=tT(s.times(s),l,1);if(null!=t)return h.precision=m,s;if(!(u<3&&tE(s.d,l-n,p,u)))return tT(s,h.precision=m,p,ts=!0);h.precision=l+=10,r=a=o=new h(1),c=0,u++}s=o}}function tq(e,t){var r,n,i,a,s,o,l,u,c,f,h,p=1,m=10,d=e,g=d.d,v=d.constructor,x=v.rounding,y=v.precision;if(d.s<0||!g||!g[0]||!d.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=d.s?NaN:g?0:d);if(null==t?(ts=!1,c=y):c=t,v.precision=c+=m,n=(r=tC(g)).charAt(0),!(15e14>Math.abs(a=d.e)))return u=tB(v,c+2,y).times(a+""),d=tq(new v(n+"."+r.slice(1)),c-m).plus(u),v.precision=y,null==t?tT(d,y,x,ts=!0):d;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=tC((d=d.times(e)).d)).charAt(0),p++;for(a=d.e,n>1?(d=new v("0."+r),a++):d=new v(n+"."+r.slice(1)),f=d,l=s=d=tM(d.minus(1),d.plus(1),c,1),h=tT(d.times(d),c,1),i=3;;){if(s=tT(s.times(h),c,1),tC((u=l.plus(tM(s,new v(i),c,1))).d).slice(0,c)===tC(l.d).slice(0,c)){if(l=l.times(2),0!==a&&(l=l.plus(tB(v,c+2,y).times(a+""))),l=tM(l,new v(p),c,1),null!=t)return v.precision=y,l;if(!tE(l.d,c-m,x,o))return tT(l,v.precision=y,x,ts=!0);v.precision=c+=m,u=s=d=tM(f.minus(1),f.plus(1),c,1),h=tT(d.times(d),c,1),i=o=1}l=u,i+=2}}function tU(e){return String(e.s*e.s/0)}function tH(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%ty,r<0&&(n+=ty),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ty;n<i;)e.d.push(+t.slice(n,n+=ty));n=ty-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),ts&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function tV(e,t){var r,n,i,a,s,o,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),tv.test(t))return tH(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(td.test(t))r=16,t=t.toLowerCase();else if(tm.test(t))r=2;else if(tg.test(t))r=8;else throw Error(tl+t);for((a=t.search(/p/i))>0?(l=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),s=(a=t.indexOf("."))>=0,n=e.constructor,s&&(a=(o=(t=t.replace(".","")).length)-a,i=tI(n,new n(r),a,2*a)),a=c=(u=tN(t,r,tx)).length-1;0===u[a];--a)u.pop();return a<0?new n(0*e.s):(e.e=tF(u,c),e.d=u,ts=!1,s&&(e=tM(e,i,4*o)),l&&(e=e.times(54>Math.abs(l)?tp(2,l):rS.pow(2,l))),ts=!0,e)}function tW(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tG(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=tG(e,2,t=t.times(1/t$(5,r)),t);for(var i,a=new e(5),s=new e(16),o=new e(20);r--;)i=t.times(t),t=t.times(a.plus(i.times(s.times(i).minus(o))));return t}function tG(e,t,r,n,i){var a,s,o,l,u=e.precision,c=Math.ceil(u/ty);for(ts=!1,l=r.times(r),o=new e(n);;){if(s=tM(o.times(l),new e(t++*t++),u,1),o=i?n.plus(s):n.minus(s),n=tM(s.times(l),new e(t++*t++),u,1),void 0!==(s=o.plus(n)).d[c]){for(a=c;s.d[a]===o.d[a]&&a--;);if(-1==a)break}a=o,o=n,n=s,s=a}return ts=!0,s.d.length=c+1,s}function t$(e,t){for(var r=e;--t;)r*=e;return r}function tY(e,t){var r,n=t.s<0,i=tP(e,e.precision,1),a=i.times(.5);if((t=t.abs()).lte(a))return e9=n?4:1,t;if((r=t.divToInt(i)).isZero())e9=n?3:2;else{if((t=t.minus(r.times(i))).lte(a))return e9=tz(r)?n?2:3:n?4:1,t;e9=tz(r)?n?1:4:n?3:2}return t.minus(i).abs()}function tZ(e,t,r,n){var i,a,s,o,l,u,c,f,h,p=e.constructor,m=void 0!==r;if(m?(tA(r,1,tt),void 0===n?n=p.rounding:tA(n,0,8)):(r=p.precision,n=p.rounding),e.isFinite()){for(s=(c=tk(e)).indexOf("."),m?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,s>=0&&(c=c.replace(".",""),(h=new p(1)).e=c.length-s,h.d=tN(tk(h),10,i),h.e=h.d.length),a=l=(f=tN(c,10,i)).length;0==f[--l];)f.pop();if(f[0]){if(s<0?a--:((e=new p(e)).d=f,e.e=a,f=(e=tM(e,h,r,n,0,i)
vendor: 4,557 bytes, line 1
1).d,a=e.e,u=e8),s=f[r],o=i/2,u=u||void 0!==f[r+1],u=n<4?(void 0!==s||u)&&(0===n||n===(e.s<0?3:2)):s>o||s===o&&(4===n||u||6===n&&1&f[r-1]||n===(e.s<0?8:7)),f.length=r,u)for(;++f[--r]>i-1;)f[r]=0,r||(++a,f.unshift(1));for(l=f.length;!f[l-1];--l);for(s=0,c="";s<l;s++)c+=tr.charAt(f[s]);if(m){if(l>1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)c+="0";for(l=(f=tN(c,i,t)).length;!f[l-1];--l);for(s=1,c="1.";s<l;s++)c+=tr.charAt(f[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)c="0"+c;c="0."+c}else if(++a>l)for(a-=l;a--;)c+="0";else a<l&&(c=c.slice(0,a)+"."+c.slice(a))}else c=m?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=tU(e);return e.s<0?"-"+c:c}function tX(e,t){if(e.length>t)return e.length=t,!0}function tJ(e){return new this(e).abs()}function tK(e){return new this(e).acos()}function tQ(e){return new this(e).acosh()}function t0(e,t){return new this(e).plus(t)}function t1(e){return new this(e).asin()}function t2(e){return new this(e).asinh()}function t3(e){return new this(e).atan()}function t4(e){return new this(e).atanh()}function t6(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,a=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?tP(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=tP(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,r=this.atan(tM(e,t,a,1)),t=tP(this,a,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(tM(e,t,a,1)):(r=tP(this,a,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function t5(e){return new this(e).cbrt()}function t8(e){return tT(e=new this(e),e.e+1,2)}function t9(e,t,r){return new this(e).clamp(t,r)}function t7(e){if(!e||"object"!=typeof e)throw Error(to+"Object expected");var t,r,n,i=!0===e.defaults,a=["precision",1,tt,"rounding",0,8,"toExpNeg",-te,0,"toExpPos",0,te,"maxE",0,te,"minE",-te,0,"modulo",0,9];for(t=0;t<a.length;t+=3)if(r=a[t],i&&(this[r]=ta[r]),void 0!==(n=e[r]))if(th(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(tl+r+": "+n);if(r="crypto",i&&(this[r]=ta[r]),void 0!==(n=e[r]))if(!0===n||!1===n||0===n||1===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(tc);else this[r]=!1;else throw Error(tl+r+": "+n);return this}function re(e){return new this(e).cos()}function rt(e){return new this(e).cosh()}function rr(e){var t,r,n;function i(e){var t,r,n,a=this;if(!(a instanceof i))return new i(e);if(a.constructor=i,ro(e)){a.s=e.s,ts?!e.d||e.e>i.maxE?(a.e=NaN,a.d=null):e.e<i.minE?(a.e=0,a.d=[0]):(a.e=e.e,a.d=e.d.slice()):(a.e=e.e,a.d=e.d?e.d.slice():e.d);return}if("number"==(n=typeof e)){if(0===e){a.s=1/e<0?-1:1,a.e=0,a.d=[0];return}if(e<0?(e=-e,a.s=-1):a.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;ts?t>i.maxE?(a.e=NaN,a.d=null):t<i.minE?(a.e=0,a.d=[0]):(a.e=t,a.d=[e]):(a.e=t,a.d=[e]);return}if(0*e!=0){e||(a.s=NaN),a.e=NaN,a.d=null;return}return tH(a,e.toString())}if("string"===n)return 45===(r=e.charCodeAt(0))?(e=e.slice(1),a.s=-1):(43===r&&(e=e.slice(1)),a.s=1),tv.test(e)?tH(a,e):tV(a,e);if("bigint"===n)return e<0?(e=-e,a.s=-1):a.s=1,tH(a,e.toString());throw Error(tl+e)}if(i.prototype=tD,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=t7,i.clone=rr,i.isDecimal=ro,i.abs=tJ,i.acos=tK,i.acosh=tQ,i.add=t0,i.asin=t1,i.asinh=t2,i.atan=t3,i.atanh=t4,i.atan2=t6,i.cbrt=t5,i.ceil=t8,i.clamp=t9,i.cos=re,i.cosh=rt,i.div=rn,i.exp=ri,i.floor=ra,i.hypot=rs,i.ln=rl,i.log=ru,i.log10=rf,i.log2=rc,i.max=rh,i.min=rp,i.mod=rm,i.mul=rd,i.pow=rg,i.random=rv,i.round=rx,i.sign=ry,i.sin=rb,i.sinh=rw,i.sqrt=r_,i.sub=rD,i.sum=rC,i.tan=rA,i.tanh=rE,i.trunc=rN,void 0===e&&(e={}),e&&!0!==e.defaults)for(t=0,n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function rn(e,t){return new this(e).div(t)}function ri(e){return new this(e).exp()}function ra(e){return tT(e=new this(e),e.e+1,3)}function rs(){var e,t,r=new this(0);for(e=0,ts=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return ts=!0,new this(1/0);r=t}return ts=!0,r.sqrt()}function ro(e){return e instanceof rS||e&&e.toStringTag===tf||!1}function rl(e){return new this(e).ln()}function ru(e,t){return new this(e).log(t)}function rc(e){return new this(e).log(2)}function rf(e){return new this(e).log(10)}function rh(){return tL(this,arguments,-1)}
1function rp(){return tL(this,arguments,1)}function rm(e,t){return new this(e).mod(t)}function rd(e,t){return new this(e).mul(t)}function rg(e,t){return new this(e).pow(t)}function rv(e){var t,r,n,i,a=0,s=new this(1),o=[];if(void 0===e?e=this.precision:tA(e,1,tt),n=Math.ceil(e/ty),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));a<n;)(i=t[a])>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:o[a++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);a<n;)(i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,a):(o.push(i%1e7),a+=4);a=n/4}else throw Error(tc);else for(;a<n;)o[a++]=1e7*Math.random()|0;for(n=o[--a],e%=ty,n&&e&&(i=tp(10,ty-e),o[a]=(n/i|0)*i);0===o[a];a--)o.pop();if(a<0)r=0,o=[0];else{for(r=-1;0===o[0];r-=ty)o.shift();for(n=1,i=o[0];i>=10;i/=10)n++;n<ty&&(r-=ty-n)}return s.e=r,s.d=o,s}function rx(e){return tT(e=new this(e),e.e+1,this.rounding)}function ry(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function rb(e){return new this(e).sin()}function rw(e){return new this(e).sinh()}function r_(e){return new this(e).sqrt()}function rD(e,t){return new this(e).sub(t)}function rC(){var e=0,t=arguments,r=new this(t[0]);for(ts=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return ts=!0,tT(r,this.precision,this.rounding)}function rA(e){return new this(e).tan()}function rE(e){return new this(e).tanh()}function rN(e){return tT(e=new this(e),e.e+1,1)}tD[Symbol.for("nodejs.util.inspect.custom")]=tD.toString,tD[Symbol.toStringTag]="Decimal";var rS=tD.constructor=rr(ta);tn=new rS(tn),ti=new rS(ti);let rM=rS;var rT=ew("BigNumber",["?on","config"],e=>{var{on:t,config:r}=e,n=rM.clone({precision:r.precision,modulo:rM.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(e){return new n(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&n.config({precision:e.precision})}),n},{isClass:!0});let rk=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},rF=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},rB=e=>{let t=Math.sin(.5*e);return -2*t*t},rP=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},rj=function(){throw SyntaxError("Invalid Param")};function rO(e,t){let r=Math.abs(e),n=Math.abs(t);return 0===e?Math.log(n):0===t?Math.log(r):r<3e3&&n<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let rI={re:0,im:0},rz=function(e,t){let r=rI;if(null==e)r.re=r.im=0;else if(void 0!==t)r.re=e,r.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)r.re=e.re,r.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return rL.INFINITY;r.re=e.abs*Math.cos(e.arg),r.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return rL.INFINITY;r.re=e.r*Math.cos(e.phi),r.im=e.r*Math.sin(e.phi)}else 2===e.length?(r.re=e[0],r.im=e[1]):rj();break;case"string":r.im=r.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,a=0;null===n&&rj();for(let e=0;e<n.length;e++){let t=n[e];" "===t||"	"===t||"\n"===t||("+"===t?i++:"-"===t?a++:("i"===t||"I"===t?(i+a===0&&rj()," "===n[e+1]||isNaN(n[e+1])?r.im+=parseFloat((a%2?"-":"")+"1"):(r.im+=parseFloat((a%2?"-":"")+n[e+1]),e++)):((i+a===0||isNaN(t))&&rj(),"i"===n[e+1]||"I"===n[e+1]?(r.im+=parseFloat((a%2?"-":"")+t),e++):r.re+=parseFloat((a%2?"-":"")+t)),i=a=0))}i+a>0&&rj();break;case"number":r.im=0,r.re=e;break;default:rj()}return isNaN(r.re)||isNaN(r.im),r};function rL(e,t){if(!(this instanceof rL))return new rL(e,t);let r=rz(e,t);this.re=r.re,this.im=r.im}rL.prototype={re:0,im:0,sign:function(){let e=rP(this.re,this.im);return new rL(this.re/e,this.im/e)},add:function(e,t){let r=rz(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?rL.NAN:rL.INFINITY:new rL(this.re+r.re,this.im+r.im)},sub:function(e,t){let r=rz(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?rL.NAN:rL.INFINITY:new rL(this.re-r.re,this.im-r.im)},mul:function(e,t){let r=rz(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=0===this.re&&0===this.im,s=0===r.re&&0===r.im;return n&&s||i&&a?rL.NAN:n||i?rL.INFINITY:0===r.im&&0===this.im?new rL(this.re*r.re,0):new rL(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){let r=rz(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=0===this.re&&0===this.im,s=0===r.re&&0===r.im;if(a&&s||n&&i)return rL.NAN;if(s||n)return rL.INFINITY;if(a||i)return rL.ZERO;if(0===r.im)return new rL(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){let e=r.re/r.im,t=r.re*e+r.im;return new rL((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=r.im/r.re,t=r.im*e+r.re;return new rL((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let r=rz(e,t),n=0===this.re&&0===this.im;if(0===r.re&&0===r.im)return rL.ONE;if(0===r.im){if(0===this.im&&this.re>0)return new rL(Math.pow(this.re,r.re),0);else if(0===this.re)switch((r.re%4+4)%4){case 0:return new rL(Math.pow(this.im,r.re),0);case 1:return new rL(0,Math.pow(this.im,r.re));case 2:return new rL(-Math.pow(this.im,r.re),0);case 3:return new rL(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return rL.ZERO;let i=Math.atan2(this.im,this.re),a=rO(this.re,this.im),s=Math.exp(r.re*a-r.im*i),o=r.im*a+r.re*i;return new rL(s*Math.cos(o),s*Math.sin(o))},sqrt:function(){let e=this.re,t=this.im;if(0===t)if(e>=0)return new rL(Math.sqrt(e),0);else return new rL(0,Math.sqrt(-e));let r=Math.sqrt(.5*(rP(e,t)+Math.abs(e))),n=Math.abs(t)/(2*r);return e>=0?new rL(r,t<0?-n:n):new rL(n,t<0?-r:r)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new rL(e,0):new rL(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,t=this.im;return new rL(Math.expm1(e)*Math.cos(t)+rB(t),Math.exp(e)*Math.sin(t))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new rL(Math.log(e),0):new rL(rO(e,t),Math.atan2(t,e))},abs:function(){return rP(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new rL(Math.sin(e)*rk(t),Math.cos(e)*rF(t))},cos:function(){let e=this.re,t=this.im;return new rL(Math.cos(e)*rk(t),-Math.sin(e)*rF(t))},tan:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)+rk(t);return new rL(Math.sin(e)/r,rF(t)/r)},cot:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)-rk(t);return new rL(-Math.sin(e)/r,rF(t)/r)},sec:function(){let e=this.re,t=this.im,r=.5*rk(2*t)+.5*Math.cos(2*e);return new rL(Math.cos(e)*rk(t)/r,Math.sin(e)*rF(t)/r)},csc:function(){let e=this.re,t=this.im,r=.5*rk(2*t)-.5*Math.cos(2*e);return new rL(Math.sin(e)*rk(t)/r,-Math.cos(e)*rF(t)/r)},asin:function(){let e=this.re,t=this.im,r=new rL(t*t-e*e+1,-2*e*t).sqrt(),n=new rL(r.re-t,r.im+e).log();return new rL(n.im,-n.re)},acos:function(){let e=this.re,t=this.im,r=new rL(t*t-e*e+1,-2*e*t).sqrt(),n=new rL(r.re-t,r.im+e).log();return new rL(Math.PI/2-n.im,n.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new rL(0,1/0);if(-1===t)return new rL(0,-1/0)}let r=e*e+(1-t)*(1-t),n=new rL((1-t*t-e*e)/r,-2*e/r).log();return new rL(-.5*n.im,.5*n.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new rL(Math.atan2(1,e),0);let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).atan():new rL(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new rL(0,1/0);let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).acos():new rL(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new rL(Math.PI/2,1/0);let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).asin():new rL(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new rL(rF(e)*Math.cos(t),rk(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new rL(rk(e)*Math.cos(t),rF(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,r=rk(e)+Math.cos(t);return new rL(rF(e)/r,Math.sin(t)/r)},coth:function(){let e=2*this.re,t=2*this.im,r=rk(e)-Math.cos(t);return new rL(rF(e)/r,-Math.sin(t)/r)},csch:function(){let e=this.re,t=this.im,r=Math.cos(2*t)-rk(2*e);return new rL(-2*rF(e)*Math.cos(t)/r,2*rk(e)*Math.sin(t)/r)},sech:function(){let e=this.re,t=this.im,r=Math.cos(2*t)+rk(2*e);return new rL(2*rk(e)*Math.cos(t)/r,-2*rF(e)*Math.sin(t)/r)},asinh:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new rL(0,0);let t=Math.abs(e),r=Math.log(t+Math.sqrt(t*t+1));return new rL(e<0?-r:r,0)}let r=new rL(e*e-t*t+1,2*e*t).sqrt();return new rL(e+r.re,t+r.im).log()},acosh:function(){let e=this.re,t=this.im;if(0===t){if(e>1)return new rL(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new rL(Math.log(-e+t),Math.PI)}return new rL(0,Math.acos(e))}let r=new rL(e-1,t).sqrt(),n=new rL(e+1,t).sqrt();return new rL(e+r.re*n.re-r.im*n.im,t+r.re*n.im+r.im*n.re).log()},atanh:function(){let e=this.re,t=this.im;if(0===t)return 0===e?new rL(0,0):1===e?new rL(1/0,0):-1===e?new rL(-1/0,0):-1<e&&e<1?new rL(.5*Math.log((1+e)/(1-e)),0):e>1?new rL(.5*Math.log((e+1)/(e-1)),-Math.PI/2):new rL(.5*Math.log(-((1+e)/(1-e))),Math.PI/2);let r=1-e,n=1+e,i=r*r+t*t;if(0===i)return new rL(-1!==e?e/0:0,0!==t?t/0:0);let a=(n*r-t*t)/i,s=(t*r+n*t)/i;return new rL(rO(a,s)/2,Math.atan2(s,a)/2)},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new rL(0,Math.PI/2);let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).atanh():new rL(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new rL(1/0,0);let t=1/e;return new rL(Math.log(t+Math.sqrt(t*t+1)),0)}let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).asinh():new rL(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return rL.INFINITY;let r=e*e+t*t;return 0!==r?new rL(e/r,-t/r).acosh():new rL(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return rL.INFINITY;if(this.isInfinite())return rL.ZERO;let e=this.re,t=this.im,r=e*e+t*t;return new rL(e/r,-t/r)},conjugate:function(){return new rL(this.re,-this.im)},neg:function(){return new rL(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new rL(Math.ceil(this.re*e)/e,Math.
1ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new rL(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new rL(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let r=rz(e,t);return Math.abs(r.re-this.re)<=rL.EPSILON&&Math.abs(r.im-this.im)<=rL.EPSILON},clone:function(){return new rL(this.re,this.im)},toString:function(){let e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<rL.EPSILON&&(e=0),Math.abs(t)<rL.EPSILON&&(t=0),0===t)?r+e:(0!==e?(r+=e,r+=" ",t<0?(t=-t,r+="-"):r+="+",r+=" "):t<0&&(t=-t,r+="-"),1!==t&&(r+=t),r+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},rL.ZERO=new rL(0,0),rL.ONE=new rL(1,0),rL.I=new rL(0,1),rL.PI=new rL(Math.PI,0),rL.E=new rL(Math.E,0),rL.INFINITY=new rL(1/0,1/0),rL.NAN=new rL(NaN,NaN),rL.EPSILON=1e-15;var rR=ew("Complex",[],()=>(Object.defineProperty(rL,"name",{value:"Complex"}),rL.prototype.constructor=rL,rL.prototype.type="Complex",rL.prototype.isComplex=!0,rL.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},rL.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},rL.prototype.format=function(e){var t=this.im,r=this.re,n=ej(this.re,e),i=ej(this.im,e),a=y(e)?e:e?e.precision:null;if(null!==a){var s=Math.pow(10,-a);Math.abs(r/t)<s&&(r=0),Math.abs(t/r)<s&&(t=0)}return 0===t?n:0===r?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?n+" - i":n+" - "+i.substring(1)+"i":1===t?n+" + i":n+" + "+i+"i"},rL.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return rL(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var r=arguments[0],n=arguments[1];if(y(r)){if(C(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),y(n))return new rL({r,phi:n});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},rL.prototype.valueOf=rL.prototype.toString,rL.fromJSON=function(e){return new rL(e)},rL.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},rL),{isClass:!0});"u"<typeof BigInt&&(BigInt=function(e){if(isNaN(e))throw Error("");return e});let rq=BigInt(0),rU=BigInt(1),rH=BigInt(2),rV=BigInt(3),rW=BigInt(5),rG=BigInt(10);BigInt(Number.MAX_SAFE_INTEGER);let r$=2e3,rY={s:rU,n:rq,d:rU};function rZ(e,t){try{e=BigInt(e)}catch(e){throw r8()}return e*t}function rX(e){return"bigint"==typeof e?e:Math.floor(e)}function rJ(e,t){if(t===rq)throw r5();let r=Object.create(r6.prototype);r.s=e<rq?-rU:rU;let n=r4(e=e<rq?-e:e,t);return r.n=e/n,r.d=t/n,r}let rK=[rH*rH,rH,rH*rH,rH,rH*rH,rH*rV,rH,rH*rV];function rQ(e){let t=Object.create(null);if(e<=rU)return t[e]=rU,t;let r=e=>{t[e]=(t[e]||rq)+rU};for(;e%rH===rq;)r(rH),e/=rH;for(;e%rV===rq;)r(rV),e/=rV;for(;e%rW===rq;)r(rW),e/=rW;for(let t=0,n=rH+rW;n*n<=e;){for(;e%n===rq;)r(n),e/=n;n+=rK[t],t=t+1&7}return e>rU&&r(e),t}let r0=function(e,t){let r=rq,n=rU,i=rU;if(null==e);else if(void 0!==t){if("bigint"==typeof e)r=e;else if(isNaN(e))throw r8();else if(e%1!=0)throw r9();else r=BigInt(e);if("bigint"==typeof t)n=t;else if(isNaN(t))throw r8();else if(t%1!=0)throw r9();else n=BigInt(t);i=r*n}else if("object"==typeof e){if("d"in e&&"n"in e)r=BigInt(e.n),n=BigInt(e.d),"s"in e&&(r*=BigInt(e.s));else if(0 in e)r=BigInt(e[0]),1 in e&&(n=BigInt(e[1]));else if("bigint"==typeof e)r=e;else throw r8();i=r*n}else if("number"==typeof e){if(isNaN(e))throw r8();if(e<0&&(i=-rU,e=-e),e%1==0)r=BigInt(e);else{let t=1,i=0,a=1,s=1,o=1,l=1e7;for(e>=1&&(t=10**Math.floor(1+Math.log10(e)),e/=t);a<=l&&o<=l;){let t=(i+s)/(a+o);if(e===t){a+o<=l?(r=i+s,n=a+o):o>a?(r=s,n=o):(r=i,n=a);break}e>t?(i+=s,a+=o):(s+=i,o+=a),a>l?(r=s,n=o):(r=i,n=a)}r=BigInt(r)*BigInt(t),n=BigInt(n)}}else if("string"==typeof e){let t=0,a=rq,s=rq,o=rq,l=rU,u=rU,c=e.replace(/_/g,"").match(/\d+|./g);if(null===c)throw r8();if("-"===c[t]?(i=-rU,t++):"+"===c[t]&&t++,c.length===t+1?s=rZ(c[t++],i):"."===c[t+1]||"."===c[t]?("."!==c[t]&&(a=rZ(c[t++],i)),(++t+1===c.length||"("===c[t+1]&&")"===c[t+3]||"'"
1===c[t+1]&&"'"===c[t+3])&&(s=rZ(c[t],i),l=rG**BigInt(c[t].length),t++),("("===c[t]&&")"===c[t+2]||"'"===c[t]&&"'"===c[t+2])&&(o=rZ(c[t+1],i),u=rG**BigInt(c[t+1].length)-rU,t+=3)):"/"===c[t+1]||":"===c[t+1]?(s=rZ(c[t],i),l=rZ(c[t+2],rU),t+=3):"/"===c[t+3]&&" "===c[t+1]&&(a=rZ(c[t],i),s=rZ(c[t+2],i),l=rZ(c[t+4],rU),t+=5),c.length<=t)i=r=o+(n=l*u)*a+u*s;else throw r8()}else if("bigint"==typeof e)r=e,i=e,n=rU;else throw r8();if(n===rq)throw r5();rY.s=i<rq?-rU:rU,rY.n=r<rq?-r:r,rY.d=n<rq?-n:n};function r1(e,t,r){let n=rU;for(;t>rq;e=e*e%r,t>>=rU)t&rU&&(n=n*e%r);return n}function r2(e,t){for(;t%rH===rq;t/=rH);for(;t%rW===rq;t/=rW);if(t===rU)return rq;let r=rG%t,n=1;for(;r!==rU;n++)if(r=r*rG%t,n>r$)return rq;return BigInt(n)}function r3(e,t,r){let n=rU,i=r1(rG,r,t);for(let e=0;e<300;e++){if(n===i)return BigInt(e);n=n*rG%t,i=i*rG%t}return 0}function r4(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function r6(e,t){if(r0(e,t),!(this instanceof r6))return rJ(rY.s*rY.n,rY.d);e=r4(rY.d,rY.n),this.s=rY.s,this.n=rY.n/e,this.d=rY.d/e}let r5=function(){return Error("Division by Zero")},r8=function(){return Error("Invalid argument")},r9=function(){return Error("Parameters must be integer")};r6.prototype={s:rU,n:rq,d:rU,abs:function(){return rJ(this.n,this.d)},neg:function(){return rJ(-this.s*this.n,this.d)},add:function(e,t){return r0(e,t),rJ(this.s*this.n*rY.d+rY.s*this.d*rY.n,this.d*rY.d)},sub:function(e,t){return r0(e,t),rJ(this.s*this.n*rY.d-rY.s*this.d*rY.n,this.d*rY.d)},mul:function(e,t){return r0(e,t),rJ(this.s*rY.s*this.n*rY.n,this.d*rY.d)},div:function(e,t){return r0(e,t),rJ(this.s*rY.s*this.n*rY.d,this.d*rY.n)},clone:function(){return rJ(this.s*this.n,this.d)},mod:function(e,t){if(void 0===e)return rJ(this.s*this.n%this.d,rU);if(r0(e,t),rq===rY.n*this.d)throw r5();return rJ(this.s*(rY.d*this.n)%(rY.n*this.d),rY.d*this.d)},gcd:function(e,t){return r0(e,t),rJ(r4(rY.n,this.n)*r4(rY.d,this.d),rY.d*this.d)},lcm:function(e,t){return(r0(e,t),rY.n===rq&&this.n===rq)?rJ(rq,rU):rJ(rY.n*this.n,r4(rY.n,this.n)*r4(rY.d,this.d))},inverse:function(){return rJ(this.s*this.d,this.n)},pow:function(e,t){if(r0(e,t),rY.d===rU)if(rY.s<rq)return rJ((this.s*this.d)**rY.n,this.n**rY.n);else return rJ((this.s*this.n)**rY.n,this.d**rY.n);if(this.s<rq)return null;let r=rQ(this.n),n=rQ(this.d),i=rU,a=rU;for(let e in r)if("1"!==e){if("0"===e){i=rq;break}if(r[e]*=rY.n,r[e]%rY.d!==rq)return null;r[e]/=rY.d,i*=BigInt(e)**r[e]}for(let e in n)if("1"!==e){if(n[e]*=rY.n,n[e]%rY.d!==rq)return null;n[e]/=rY.d,a*=BigInt(e)**n[e]}return rY.s<rq?rJ(a,i):rJ(i,a)},log:function(e,t){if(r0(e,t),this.s<=rq||rY.s<=rq)return null;let r=Object.create(null),n=rQ(rY.n),i=rQ(rY.d),a=rQ(this.n),s=rQ(this.d);for(let e in i)n[e]=(n[e]||rq)-i[e];for(let e in s)a[e]=(a[e]||rq)-s[e];for(let e in n)"1"!==e&&(r[e]=!0);for(let e in a)"1"!==e&&(r[e]=!0);let o=null,l=null;for(let e in r){let t=n[e]||rq,r=a[e]||rq;if(t===rq){if(r!==rq)return null;continue}let i=r,s=t,u=r4(i,s);if(i/=u,s/=u,null===o&&null===l)o=i,l=s;else if(i*l!=o*s)return null}return null!==o&&null!==l?rJ(o,l):null},equals:function(e,t){return r0(e,t),this.s*this.n*rY.d==rY.s*rY.n*this.d},lt:function(e,t){return r0(e,t),this.s*this.n*rY.d<rY.s*rY.n*this.d},lte:function(e,t){return r0(e,t),this.s*this.n*rY.d<=rY.s*rY.n*this.d},gt:function(e,t){return r0(e,t),this.s*this.n*rY.d>rY.s*rY.n*this.d},gte:function(e,t){return r0(e,t),this.s*this.n*rY.d>=rY.s*rY.n*this.d},compare:function(e,t){r0(e,t);let r=this.s*this.n*rY.d-rY.s*rY.n*this.d;return(rq<r)-(r<rq)},ceil:function(e){return e=rG**BigInt(e||0),rJ(rX(this.s*e*this.n/this.d)+(e*this.n%this.d>rq&&this.s>=rq?rU:rq),e)},floor:function(e){return e=rG**BigInt(e||0),rJ(rX(this.s*e*this.n/this.d)-(e*this.n%this.d>rq&&this.s<rq?rU:rq),e)},round:function(e){return e=rG**BigInt(e||0),rJ(rX(this.s*e*this.n/this.d)+this.s*((this.s>=rq?rU:rq)+rH*(e*this.n%this.d)>this.d?rU:rq),e)},roundTo:function(e,t){r0(e,t);let r=this.n*rY.d,n=this.d*rY.n,i=r%n,a=rX(r/n);return i+i>=n&&a++,rJ(this.s*a*rY.n,rY.d)},divisible:function(e,t){return r0(e,t),rY.n!==rq&&this.n*rY.d%(rY.n*this.d)===rq}
1,valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e=15){let t=this.n,r=this.d,n=r2(t,r),i=r3(t,r,n),a=this.s<rq?"-":"";if(a+=rX(t/r),t%=r,(t*=rG)&&(a+="."),n){for(let e=i;e--;)a+=rX(t/r),t%=r,t*=rG;a+="(";for(let e=n;e--;)a+=rX(t/r),t%=r,t*=rG;a+=")"}else for(let n=e;t&&n--;)a+=rX(t/r),t%=r,t*=rG;return a},toFraction:function(e=!1){let t=this.n,r=this.d,n=this.s<rq?"-":"";if(r===rU)n+=t;else{let i=rX(t/r);e&&i>rq&&(n+=i,n+=" ",t%=r),n+=t,n+="/",n+=r}return n},toLatex:function(e=!1){let t=this.n,r=this.d,n=this.s<rq?"-":"";if(r===rU)n+=t;else{let i=rX(t/r);e&&i>rq&&(n+=i,t%=r),n+="\\frac{",n+=t,n+="}{",n+=r,n+="}"}return n},toContinued:function(){let e=this.n,t=this.d,r=[];for(;t;){r.push(rX(e/t));let n=e%t;e=t,t=n}return r},simplify:function(e=.001){let t=BigInt(Math.ceil(1/e)),r=this.abs(),n=r.toContinued();for(let e=1;e<n.length;e++){let i=rJ(n[e-1],rU);for(let t=e-2;t>=0;t--)i=i.inverse().add(n[t]);let a=i.sub(r);if(a.n*t<a.d)return i.mul(this.s)}return this}};var r7=ew("Fraction",[],()=>(Object.defineProperty(r6,"name",{value:"Fraction"}),r6.prototype.constructor=r6,r6.prototype.type="Fraction",r6.prototype.isFraction=!0,r6.prototype.toJSON=function(){return{mathjs:"Fraction",n:String(this.s*this.n),d:String(this.d)}},r6.fromJSON=function(e){return new r6(e)},r6),{isClass:!0}),ne=ew("Range",[],()=>{function e(t,r,n){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator");var i=null!=t,a=null!=r,s=null!=n;if(i){if(b(t))t=t.toNumber();else if("number"!=typeof t&&!w(t))throw TypeError("Parameter start must be a number or bigint")}if(a){if(b(r))r=r.toNumber();else if("number"!=typeof r&&!w(r))throw TypeError("Parameter end must be a number or bigint")}if(s){if(b(n))n=n.toNumber();else if("number"!=typeof n&&!w(n))throw TypeError("Parameter step must be a number or bigint")}if(this.start=i?parseFloat(t):0,this.end=a?parseFloat(r):0,this.step=s?parseFloat(n):1,s&&eW(this.step,0))throw Error("Step must not be zero")}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if("string"!=typeof t)return null;var r=t.split(":").map(function(e){return parseFloat(e)});if(r.some(function(e){return isNaN(e)}))return null;switch(r.length){case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[2],r[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,t=this.start,r=this.step,n=this.end-t;return eS(r)===eS(n)?e=Math.ceil(n/r):0===n&&(e=0),isNaN(e)&&(e=0),[e]},e.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},e.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},e.prototype.forEach=function(e){var t=this.start,r=this.step,n=this.end,i=0;if(r>0)for(;t<n;)e(t,[i],this),t+=r,i++;else if(r<0)for(;t>n;)e(t,[i],this),t+=r,i++},e.prototype.map=function(e){var t=[];return this.forEach(function(r,n,i){t[n[0]]=e(r,n,i)}),t},e.prototype.toArray=function(){var e=[];return this.forEach(function(t,r){e[r[0]]=t}),e},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(e){var t=ej(this.start,e);return 1!==this.step&&(t+=":"+ej(this.step,e)),t+=":"+ej(this.end,e)},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0}),nt=ew("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,r){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,r){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function nr(){return(nr=Object.assign.bind()).apply(null,arguments)}function nn(e,t,r){var n=new e.constructor(2),i="";if(r){if(r<1)throw Error("size must be in greater than 0");if(!eE(r))throw Error("size must be an integer");if(e.greaterThan(n.pow(r-1).sub(1))||e.lessThan(n.pow(r-1).mul(-1)))throw Error("Value must be in range [-2^".concat(r-1,", 2^").
1concat(r-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(n.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function ni(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:i}=eO(t);switch(r){case"fixed":return no(e,n);case"exponential":return ns(e,n);case"engineering":return na(e,n);case"bin":return nn(e,2,i);case"oct":return nn(e,8,i);case"hex":return nn(e,16,i);case"auto":var a,s=nl(null==t?void 0:t.lowerExp,-3),o=nl(null==t?void 0:t.upperExp,5);if(e.isZero())return"0";var l=e.toSignificantDigits(n),u=l.e;return(a=u>=s&&u<o?l.toFixed():ns(e,n)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function na(e,t){var r=e.e,n=r%3==0?r:r<0?r-3-r%3:r-r%3,i=e.mul(Math.pow(10,-n)).toPrecision(t);return i.includes("e")&&(i=new e.constructor(i).toFixed()),i+"e"+(r>=0?"+":"")+n.toString()}function ns(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function no(e,t){return e.toFixed(t)}function nl(e,t){return y(e)?e:b(e)?e.toNumber():t}function nu(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function nc(e,t){var r=nf(e,t);return t&&"object"==typeof t&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function nf(e,t){if("number"==typeof e)return ej(e,t);if(b(e))return ni(e,t);if(ng(e))if(!t||"decimal"!==t.fraction)return"".concat(e.s*e.n,"/").concat(e.d);else return e.toString();if(Array.isArray(e))return nd(e,t);if(A(e))return nh(e);if("function"==typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"==typeof e)if("function"==typeof e.format)return e.format(t);else return e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(r=>nh(r)+": "+nc(e[r],t)).join(", ")+"}";return String(e)}function nh(e){for(var t=String(e),r="",n=0;n<t.length;){var i=t.charAt(n);r+=i in np?np[i]:i,n++}return'"'+r+'"'}var np={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t"};function nm(e){var t=String(e);return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function nd(e,t){if(!Array.isArray(e))return nc(e,t);for(var r="[",n=e.length,i=0;i<n;i++)0!==i&&(r+=", "),r+=nd(e[i],t);return r+"]"}function ng(e){return e&&"object"==typeof e&&"bigint"==typeof e.s&&"bigint"==typeof e.n&&"bigint"==typeof e.d||!1}function nv(e,t){if(!A(e))throw TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+eu(e)+", index: 0)");if(!A(t))throw TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+eu(t)+", index: 1)");return e===t?0:e>t?1:-1}function nx(e,t,r){if(!(this instanceof nx))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function ny(e,t,r){if(!(this instanceof ny))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function nb(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function nw(e,t,r){var n,i=e.length;if(i!==t[r])throw new nx(i,t[r]);if(r<t.length-1){var a=r+1;for(n=0;n<i;n++){if(!Array.isArray(e[n]))throw new nx(t.length-1,t.length,"<");nw(e[n],t,a)}}else for(n=0;n<i;n++)if(Array.isArray(e[n]))throw new nx(t.length+1,t.length,">")}function n_(e,t){if(0===t.length){if(Array.isArray(e))throw new nx(e.length,0)}else nw(e,t,0)}function nD(e,t){var r=e.isMatrix?e._size:nb(e);t._sourceSize.forEach((e,t)=>{if(null!==e&&e!==r[t])throw new nx(e,r[t])})}function nC(e,t){if(void 0!==e){if(!y(e)||!eE(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new ny(e,t)}}function nA(e){for(var t=0;t<e._dimensions.length;++t){var r=e._dimensions[t];
1if(r._data&&E(r._data)){if(0===r._size[0])return!0}else if(r.isRange){if(r.start===r.end)return!0}else if(A(r)&&0===r.length)return!0}return!1}function nE(e,t,r){if(!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!y(e)||!eE(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+nc(t)+")")}),(y(e)||b(e))&&(e=[e]),nN(e,t,0,void 0!==r?r:0),e}function nN(e,t,r,n){var i,a,s=e.length,o=t[r],l=Math.min(s,o);if(e.length=o,r<t.length-1){var u=r+1;for(i=0;i<l;i++)Array.isArray(a=e[i])||(a=[a],e[i]=a),nN(a,t,u,n);for(i=l;i<o;i++)a=[],e[i]=a,nN(a,t,u,n)}else{for(i=0;i<l;i++)for(;Array.isArray(e[i]);)e[i]=e[i][0];for(i=l;i<o;i++)e[i]=n}}function nS(e,t){var r=nO(e,!0),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new nx(0,n,"!=");var i=nT(t=nM(t,n));if(n!==i)throw new nx(i,n,"!=");try{return nk(r,t)}catch(e){if(e instanceof nx)throw new nx(i,n,"!=");throw e}}function nM(e,t){var r=nT(e),n=e.slice(),i=-1,a=e.indexOf(i);if(e.indexOf(i,a+1)>=0)throw Error("More than one wildcard in sizes");var s=t%r==0;if(a>=0)if(s)n[a]=-t/r;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function nT(e){return e.reduce((e,t)=>e*t,1)}function nk(e,t){for(var r,n=e,i=t.length-1;i>0;i--){var a=t[i];r=[];for(var s=n.length/a,o=0;o<s;o++)r.push(n.slice(o*a,(o+1)*a));n=r}return n}function nF(e,t){for(var r=t||nb(e);Array.isArray(e)&&1===e.length;)e=e[0],r.shift();for(var n=r.length;1===r[n-1];)n--;return n<r.length&&(e=nB(e,n,0),r.length=n),e}function nB(e,t,r){var n,i;if(r<t){var a=r+1;for(n=0,i=e.length;n<i;n++)e[n]=nB(e[n],t,a)}else for(;Array.isArray(e);)e=e[0];return e}function nP(e,t,r,n){var i=n||nb(e);if(r)for(var a=0;a<r;a++)e=[e],i.unshift(1);for(e=nj(e,t,0);i.length<t;)i.push(1);return e}function nj(e,t,r){var n,i;if(Array.isArray(e)){var a=r+1;for(n=0,i=e.length;n<i;n++)e[n]=nj(e[n],t,a)}else for(var s=r;s<t;s++)e=[e];return e}function nO(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;if("boolean"!=typeof t)throw TypeError("Boolean expected for second argument of flatten");var r=[];return t?i(e):n(e),r;function n(e){for(var t=0;t<e.length;t++){var i=e[t];Array.isArray(i)?n(i):r.push(i)}}function i(e){if(Array.isArray(e[0]))for(var t=0;t<e.length;t++)i(e[t]);else for(var n=0;n<e.length;n++)r.push(e[n])}}function nI(e,t){return Array.prototype.map.call(e,t)}function nz(e,t){Array.prototype.forEach.call(e,t)}function nL(e,t){if(1!==nb(e).length)throw Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function nR(e,t){if(1!==nb(e).length)throw Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,e=>t.test(e))}function nq(e,t){return Array.prototype.join.call(e,t)}function nU(e){if(!Array.isArray(e))throw TypeError("Array input expected");if(0===e.length)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?r++:r=0,t.push({value:e[n],identifier:r});return t}function nH(e){if(!Array.isArray(e))throw TypeError("Array input expected");if(0===e.length)return e;for(var t=[],r=0;r<e.length;r++)t.push(e[r].value);return t}function nV(e,t){for(var r,n=0,i=0;i<e.length;i++){var a=e[i],s=Array.isArray(a);if(0===i&&s&&(n=a.length),s&&a.length!==n)return;var o=s?nV(a,t):t(a);if(void 0===r)r=o;else if(r!==o)return"mixed"}return r}function nW(e,t,r,n){if(!(n<r))return e.concat(t);if(e.length!==t.length)throw new nx(e.length,t.length);for(var i=[],a=0;a<e.length;a++)i[a]=nW(e[a],t[a],r,n+1);return i}function nG(){var e=Array.prototype.slice.call(arguments,0,-1),t=Array.prototype.slice.call(arguments,-1);if(1===e.length)return e[0];if(e.length>1)return e.slice(1).reduce(function(e,r){return nW(e,r,t,0)},e[0]);throw Error("Wrong number of arguments in function concat")}function n$(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.map(e=>e.length),i=Math.max(...n),a=Array(i).fill(null),s=0;s<t.length;s++)for(var o=t[s],l=n[s],u=0;u<l;u++){var c=i-l+u;o[u]>a[c]&&(a[c]=o[u])}for(var f=0;f<t.length;f++)nY(t[f],a);return a}function nY(e,t){for(var r=t.length,n=e.length,i=0;i<n;i++){var a=r-n+i;if(e[i]<t[a]&&e[i]>1||e[i]>t[a])throw Error("shape mismatch: mismatch is found in arg with shape (".concat(e,") 
1not possible to broadcast dimension ").concat(n," with size ").concat(e[i]," to size ").concat(t[a]))}}function nZ(e,t){var r=nb(e);if(em(r,t))return e;nY(r,t);var n=n$(r,t),i=n.length,a=[...Array(i-r.length).fill(1),...r],s=n0(e);r.length<i&&(r=nb(s=nS(s,a)));for(var o=0;o<i;o++)r[o]<n[o]&&(r=nb(s=nX(s,n[o],o)));return s}function nX(e,t,r){return nG(...Array(t).fill(e),r)}function nJ(e,t){if(!Array.isArray(e))throw Error("Array expected");if(!Array.isArray(t))throw Error("Array expected for index");var r=nb(e);if(t.length!==r.length)throw new nx(t.length,r.length);for(var n=0;n<t.length;n++)nC(t[n],r[n]);return t.reduce((e,t)=>e[t],e)}function nK(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0===e.length)return[];if(r)return a(e);var n=[];return i(e,0);function i(r,a){if(!Array.isArray(r))return t(r,n.slice(0,a),e);for(var s=r.length,o=Array(s),l=0;l<s;l++)n[a]=l,o[l]=i(r[l],a+1);return o}function a(e){if(!Array.isArray(e))return t(e);for(var r=e.length,n=Array(r),i=0;i<r;i++)n[i]=a(e[i]);return n}}function nQ(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0!==e.length){if(r)return void a(e);var n=[];i(e,0)}function i(r,a){if(Array.isArray(r))for(var s=r.length,o=0;o<s;o++)n[a]=o,i(r[o],a+1);else t(r,n.slice(0,a),e)}function a(e){if(Array.isArray(e))for(var r=e.length,n=0;n<r;n++)a(e[n]);else t(e)}}function n0(e){return nr([],e)}nx.prototype=RangeError(),nx.prototype.constructor=RangeError,nx.prototype.name="DimensionError",nx.prototype.isDimensionError=!0,ny.prototype=RangeError(),ny.prototype.constructor=RangeError,ny.prototype.name="IndexError",ny.prototype.isIndexError=!0;var n1=n;function n2(e,t,r,n){if(n1.default.isTypedFunction(e)){if(n)i=1;else{var i,a,s=t.isMatrix?t.size():nb(t);if(!s.length||0===s[s.length-1])return{isUnary:n,fn:e};var o=s.map(()=>0);i=n6(e,t.isMatrix?t.get(o):nJ(t,o),o,t)}if(t.isMatrix&&"mixed"!==t.dataType&&void 0!==t.dataType){var l=n3(e,i);a=void 0!==l?l:e}else a=e;return i>=1&&i<=3?{isUnary:1===i,fn:function(){for(var t=arguments.length,n=Array(t),s=0;s<t;s++)n[s]=arguments[s];return n5(a,n.slice(0,i),r,e.name)}}:{isUnary:!1,fn:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n5(a,n,r,e.name)}}}return void 0===n?{isUnary:n4(e),fn:e}:{isUnary:n,fn:e}}function n3(e,t){var r=[];if(Object.entries(e.signatures).forEach(e=>{var[n,i]=e;n.split(",").length===t&&r.push(i)}),1===r.length)return r[0]}function n4(e){if(1!==e.length)return!1;var t=e.toString();if(/arguments/.test(t))return!1;var r=t.match(/\(.*?\)/);return!/\.\.\./.test(r)}function n6(e,t,r,n){for(var i=[t,r,n],a=3;a>0;a--){var s=i.slice(0,a);if(null!==n1.default.resolve(e,s))return a}}function n5(e,t,r,n){try{return e(...t)}catch(e){n8(e,t,r,n)}}function n8(e,t,r,n){var i;if(e instanceof TypeError&&(null==(i=e.data)?void 0:i.category)==="wrongType"){var a=[];throw a.push("value: ".concat(eu(t[0]))),t.length>=2&&a.push("index: ".concat(eu(t[1]))),t.length>=3&&a.push("array: ".concat(eu(t[2]))),TypeError("Function ".concat(r," cannot apply callback arguments ")+"".concat(n,"(").concat(a.join(", "),") at index ").concat(JSON.stringify(t[1])))}throw TypeError("Function ".concat(r," cannot apply callback arguments ")+"to function ".concat(n,": ").concat(e.message))}var n9=ew("DenseMatrix",["Matrix","config"],e=>{var{Matrix:t,config:r}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!A(t))throw Error("Invalid datatype: "+t);if(N(e))"DenseMatrix"===e.type?(this._data=ec(e._data),this._size=ec(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&E(e.data)&&E(e.size))this._data=e.data,this._size=e.size,n_(this._data,this._size),this._datatype=t||e.datatype;else if(E(e))this._data=c(e),this._size=nb(this._data),n_(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+eu(e)+")");else this._data=[],this._size=[0],this._datatype=t}function i(e,t){if(!F(t))throw TypeError("Invalid index");if(r.legacySubset?t.size().every(e=>1===e):t.isScalar())return e.get(t.min());var i=t.size();if(i.length!==e._size.length)throw new nx(i.length,e._size.length);for(var s=t.min(),o=t.max(),l=0,u=e._size.length;l<u;l++)nC(s[l],e._size[l]),nC(o[l],e._size[l]);var c=new n,f=a(e._data,t);return c._size=f.size,c._datatype=e._datatype,c._data=f.data,r.legacySubset?c.reshape(t.
1size()):c}function a(e,t){var r=t.size().length-1,n=Array(r);return{data:i(e),size:n.filter(e=>null!==e)};function i(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=t.dimension(a);function o(e,t){return y(e)?t(e):e.map(t).valueOf()}return(y(s)?n[a]=null:n[a]=s.size()[0],a<r)?o(s,t=>(nC(t,e.length),i(e[t],a+1))):o(s,t=>(nC(t,e.length),e[t]))}}function s(e,t,r,n){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,a=t.size(),s=t.isScalar();if(N(r)?(i=r.size(),r=r.valueOf()):i=nb(r),s){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),r,n)}else{if(!em(i,a)){if(0===i.length)r=nZ([r],a);else try{r=nZ(r,a)}catch(e){}i=nb(r)}if(a.length<e._size.length)throw new nx(a.length,e._size.length,"<");if(i.length<a.length){for(var l=0,c=0;1===a[l]&&1===i[l];)l++;for(;1===a[l];)c++,l++;r=nP(r,a.length,c,i)}if(!em(a,i))throw new nx(a,i,">");u(e,t.max().map(function(e){return e+1}),n),o(e._data,t,r)}return e}function o(e,t,r){var n=t.size().length-1;function i(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=t.dimension(a),o=(t,n)=>{nC(t,e.length),i(e[t],r[n[0]],a+1)},l=(t,n)=>{nC(t,e.length),e[t]=r[n[0]]};a<n?y(s)?o(s,[0]):s.forEach(o):y(s)?l(s,[0]):s.forEach(l)}i(e,r)}function l(e,t,r){if(0===t.length){for(var n=e._data;E(n);)n=n[0];return n}return e._size=t.slice(0),e._data=nE(e._data,e._size,r),e}function u(e,t,r){for(var n=e._size.slice(0),i=!1;n.length<t.length;)n.push(0),i=!0;for(var a=0,s=t.length;a<s;a++)t[a]>n[a]&&(n[a]=t[a],i=!0);i&&l(e,n,r)}function c(e){return N(e)?c(e.valueOf()):E(e)?e.map(c):e}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return nV(this._data,eu)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return i(this,e);case 2:case 3:return s(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){return nJ(this._data,e)},n.prototype.set=function(e,t,r){if(!E(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new nx(e.length,this._size.length,"<");u(this,e.map(function(e){return e+1}),r);var n,i,a,s=this._data;for(n=0,i=e.length-1;n<i;n++)nC(a=e[n],s.length),s=s[a];return nC(a=e[e.length-1],s.length),s[a]=t,this},n.prototype.resize=function(e,t,r){if(!S(e))throw TypeError("Array or Matrix expected");var n=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return l(r?this.clone():this,n,t)},n.prototype.reshape=function(e,t){var r=t?this.clone():this;r._data=nS(r._data,e);var n=r._size.reduce((e,t)=>e*t);return r._size=nM(e,n),r},n.prototype.clone=function(){return new n({data:ec(this._data),size:ec(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this,n=r._size.length-1;if(n<0)return r.clone();var i=n2(e,r,"map",t),a=i.fn,s=r.create(void 0,r._datatype);if(s._size=r._size,t||i.isUnary)return s._data=h(r._data),s;if(0===n){for(var o=r.valueOf(),l=Array(o.length),u=0;u<o.length;u++)l[u]=a(o[u],[u],r);return s._data=l,s}var c=[];return s._data=f(r._data),s;function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Array(e.length);if(t<n)for(var s=0;s<e.length;s++)c[t]=s,i[s]=f(e[s],t+1);else for(var o=0;o<e.length;o++)c[t]=o,i[o]=a(e[o],c.slice(),r);return i}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=Array(e.length);if(t<n)for(var i=0;i<e.length;i++)r[i]=h(e[i],t+1);else for(var s=0;s<e.length;s++)r[s]=a(e[s]);return r}},n.prototype.forEach=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this,n=r._size.length-1;if(!(n<0)){var i=n2(e,r,"map",t),a=i.fn;if(t||i.isUnary)return void u(r._data);if(0===n){for(var s=0;s<r._data.length;s++)a(r._data[s],[s],r);return}var o=[];l(r._data)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t<n)for(var i=0;i<e.length;i++)o[t]=i,l(e[i],t+1);else for(var s=0;s<e.length;s++)o[t]=s,a(e[s],o.slice(),r)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t<n)for(var r=0;r<e.length;r++)u(e[r],t+1);else for(var i=0;i<e.length;i++)a(e[i])}},n.prototype[Symbol.iterator]=function*(){var e=this._size.length-1;if(!(e<0)){if(0===e){for(var t=0;t<this._data.length;t++)yield{value:this._data[t],index:[t]};return}for(var r=Array(e+1).fill(0),n=this._size.reduce((e,t)=>
1e*t,1),i=0;i<n;i++){for(var a=this._data,s=0;s<e;s++)a=a[r[s]];yield{value:a[r[e]],index:r.slice()};for(var o=e;o>=0&&(r[o]++,!(r[o]<this._size[o]));o--)r[o]=0}}},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,a=function(r){var a=i.map(e=>[e[r]]);t.push(new n(a,e._datatype))},s=0;s<r[1];s++)a(s);return t},n.prototype.toArray=function(){return ec(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return nc(this._data,e)},n.prototype.toString=function(){return nc(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(b(e)&&(e=e.toNumber()),!y(e)||!eE(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),a=[],s=0;s<i;s++)a[s]=this._data[s+r][s+t];return new n({data:a,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!E(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(b(e)&&(e=e.toNumber()),!y(e)||!eE(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(b(r)&&(r=r.toNumber()),!y(r)||!eE(r))throw TypeError("The parameter k must be an integer number")}else r=0;var a,s=r>0?r:0,o=r<0?-r:0,l=e[0],u=e[1],c=Math.min(l-o,u-s);if(E(t)){if(t.length!==c)throw Error("Invalid value array length");a=function(e){return t[e]}}else if(N(t)){var f=t.size();if(1!==f.length||f[0]!==c)throw Error("Invalid matrix length");a=function(e){return t.get([e])}}else a=function(){return t};i||(i=b(a(0))?a(0).mul(0):0);var h=[];if(e.length>0){h=nE(h,e,i);for(var p=0;p<c;p++)h[p+o][p+s]=a(p)}return new n({data:h,size:[l,u]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!y(e)||!eE(e)||!y(t)||!eE(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return nC(e,this._size[0]),nC(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,r){var n=r[e];r[e]=r[t],r[t]=n},n},{isClass:!0}),n7="clone",ie=ew(n7,["typed"],e=>{var{typed:t}=e;return t(n7,{any:ec})});function it(e){var t,r,n=e.length,i=e[0].length,a=[];for(r=0;r<i;r++){var s=[];for(t=0;t<n;t++)s.push(e[t][r]);a.push(s)}return a}function ir(e){for(var t=0;t<e.length;t++)if(S(e[t]))return!0;return!1}function ii(e,t){N(e)?e.forEach(e=>t(e),!1,!0):nQ(e,t,!0)}function ia(e,t,r){if(!r)if(N(e))return e.map(e=>t(e),!1,!0);else return nK(e,t,!0);var n=e=>0===e?e:t(e);return N(e)?e.map(e=>n(e),!1,!0):nK(e,n,!0)}function is(e,t,r){var n=Array.isArray(e)?nb(e):e.size();if(t<0||t>=n.length)throw new ny(t,n.length);return N(e)?e.create(io(e.valueOf(),t,r),e.datatype()):io(e,t,r)}function io(e,t,r){var n,i,a,s;if(t<=0)if(Array.isArray(e[0])){for(n=0,s=it(e),i=[];n<s.length;n++)i[n]=io(s[n],t-1,r);return i}else{for(n=1,a=e[0];n<e.length;n++)a=r(a,e[n]);return a}for(n=0,i=[];n<e.length;n++)i[n]=io(e[n],t-1,r);return i}function il(e,t,r,n,i,a,s,o,l,u,c){var f,h,p,m,d=e._values,g=e._index,v=e._ptr;if(n)for(h=v[t],p=v[t+1],f=h;f<p;f++)r[m=g[f]]!==a?(r[m]=a,s.push(m),u?(n[m]=l?o(d[f],c):o(c,d[f]),i[m]=a):n[m]=d[f]):(n[m]=l?o(d[f],n[m]):o(n[m],d[f]),i[m]=a);else for(h=v[t],p=v[t+1],f=h;f<p;f++)r[m=g[f]]!==a?(r[m]=a,s.push(m)):i[m]=a}var iu="isInteger",ic=ew(iu,["typed","equal"],e=>{var{typed:t,equal:r}=e;return t(iu,{number:e=>!!Number.isFinite(e)&&r(e,Math.round(e)),BigNumber:e=>!!e.isFinite()&&r(e.round(),e),bigint:e=>!0,Fraction:e=>1n===e.d,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),ih="number";function ip(e){return e<0}function im(e){return e>0}function id(e){return Number.isNaN(e)}function ig(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-9,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(r<=0)throw Error("Relative tolerance must be greater than 0");if(n<0)throw Error("Absolute tolerance must be at least 0");return!(e.isNaN()||t.isNaN())&&(e.isFinite()&&t.isFinite()?!!e.eq(t)||e.minus(t).abs().lte(e.constructor.max(e.constructor.max(e.abs(),t.abs()).mul(r),n)):e.eq(t))}ip.signature=ih,im.signature=ih,id.signature=ih;var iv="isNegative",ix=ew(iv,["typed","config"],e=>{var{typed:t,config:r}=e;return t(iv,{number:e=>!eW(e,0,r.relTol,r.absTol)&&ip(e),BigNumber:e=>!ig(e,new e.constructor(0),r.relTol,r.absTol)&&e.isNeg()&&!e.isZero()&&!e.isNaN(),bigint:e=>e<0n,Fraction:e=>e.s<0n,Unit:t.referToSelf(e=>r=>t.find(e,r.valueType())(r.value)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iy="isNumeric",ib=ew(iy,["typed"],e=>{var{typed:t}=e;return t(iy,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iw="hasNumericValue",i_=ew(iw,["typed","isNumeric"],e=>{var{typed:t,isNumeric:r}=e;return t(iw,{boolean:()=>!0,string:function(e){return e.trim().length>0&&!isNaN(Number(e))},any:function(e){return r(e)}})}),iD="isPositive",iC=ew(iD,["typed","config"],e=>{var{typed:t,config:r}=e;return t(iD,{number:e=>!eW(e,0,r.relTol,r.absTol)&&im(e),BigNumber:e=>!ig(e,new e.constructor(0),r.relTol,r.absTol)&&!e.isNeg()&&!e.isZero()&&!e.isNaN(),bigint:e=>e>0n,Fraction:e=>e.s>0n&&e.n>0n,Unit:t.referToSelf(e=>r=>t.find(e,r.valueType())(r.value)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iA="isZero",iE=ew(iA,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(iA,{"number | BigNumber | Complex | Fraction":e=>r(e,0),bigint:e=>0n===e,Unit:t.referToSelf(e=>r=>t.find(e,r.valueType())(r.value)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iN="isNaN",iS=ew(iN,["typed"],e=>{var{typed:t}=e;return t(iN,{number:id,BigNumber:function(e){return e.isNaN()},bigint:function(e){return!1},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iM="isBounded",iT=ew(iM,["typed"],e=>{var{typed:t}=e;return t(iM,{number:e=>Number.isFinite(e),"BigNumber | Complex":e=>e.isFinite(),"bigint | Fraction":()=>!0,"null | undefined":()=>!1,Unit:t.referToSelf(e=>t=>e(t.value)),"Array | Matrix":t.referToSelf(e=>t=>(Array.isArray(t)||(t=t.valueOf()),t.every(t=>e(t))))})}),ik="isFinite",iF=ew(ik,["typed","isBounded","map"],e=>{var{typed:t,isBounded:r,map:n}=e;return t(ik,{"Array | Matrix":e=>n(e,r),any:e=>r(e)})}),iB="typeOf",iP=ew(iB,["typed"],e=>{var{typed:t}=e;return t(iB,{any:eu})});function ij(e,t,r,n){return eW(e.re,t.re,r,n)&&eW(e.im,t.im,r,n)}var iO=ew("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(e=>(r,n)=>{if(!r.equalBase(n))throw Error("Cannot compare units with different base");return t.find(e,[r.valueType(),n.valueType()])(r.value,n.value)})}}),iI="equalScalar",iz=ew(iI,["typed","config"],e=>{var{typed:t,config:r}=e,n=iO({typed:t});return t(iI,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return eW(e,t,r.relTol,r.absTol)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||ig(e,t,r.relTol,r.absTol)},"bigint, bigint":function(e,t){return e===t},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return ij(e,t,r.relTol,r.absTol)}},n)});ew(iI,["typed","config"],e=>{var{typed:t,config:r}=e;return t(iI,{"number, number":function(e,t){return eW(e,t,r.relTol,r.absTol)}})});var iL=ew("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!A(t))throw Error("Invalid datatype: "+t);if(N(e))a(this,e,t);else if(e&&E(e.index)&&E(e.ptr)&&E(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(E(e))s(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+eu(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function a(e,t,r){"SparseMatrix"===t.type?(e._values=t._values?ec(t._values):void 0,e._index=ec(t._index),e._ptr=ec(t._ptr),e._size=ec(t._size),e._datatype=r||t._datatype):s(e,t.valueOf(),r||t._datatype)}function s(e,n,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var a=n.length,s=0,o=r,l=0;if(A(i)&&(o=t.find(r,[i,i])||r,l=t.convert(0,i)),a>0){var u=0;do{e._ptr.push(e._index.length);for(var c=0;c<a;c++){var f=n[c];if(E(f)){if(0===u&&s<f.length&&(s=f.length),u<f.length){var h=f[u];o(h,l)||(e._values.push(h),e._index.push(c))}}else 0===u&&s<1&&(s=1),o(f,l)||(e._values.push(f),e._index.push(c))}u++}while(u<s)}for(;e._ptr.length<=s;)e._ptr.push(e._index.length);e._size=[a,s]}function o(e,t){if(!F(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r,n,a,s,o=t.size();if(o.length!==e._size.length)throw new nx(o.length,e._size.length);var l=t.min(),u=t.max();for(r=0,n=e._size.length;r<n;r++)nC(l[r],e._size[r]),nC(u[r],e._size[r]);var c=e._values,f=e._index,h=e._ptr,p=t.dimension(0),m=t.dimension(1),d=[],g=[];function v(e,t){g[e]=t[0],d[e]=!0}
1Number.isInteger(p)?v(p,[0]):p.forEach(v);var x=c?[]:void 0,y=[],b=[];function w(e){for(b.push(y.length),a=h[e],s=h[e+1];a<s;a++)!0===d[r=f[a]]&&(y.push(g[r]),x&&x.push(c[a]))}return Number.isInteger(m)?w(m):m.forEach(w),b.push(y.length),new i({values:x,index:y,ptr:b,size:o,datatype:e._datatype})}function l(e,t,r,n){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,a=t.size(),s=t.isScalar();if(N(r)?(i=r.size(),r=r.toArray()):i=nb(r),s){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),r,n)}else{if(1!==a.length&&2!==a.length)throw new nx(a.length,e._size.length,"<");if(i.length<a.length){for(var o=0,l=0;1===a[o]&&1===i[o];)o++;for(;1===a[o];)l++,o++;r=nP(r,a.length,l,i)}if(!em(a,i))throw new nx(a,i,">");if(1===a.length)f(t.dimension(0),(t,i)=>{nC(t),e.set([t,0],r[i[0]],n)});else{var u=t.dimension(0),c=t.dimension(1);f(u,(t,i)=>{nC(t),f(c,(a,s)=>{nC(a),e.set([t,a],r[i[0]][s[0]],n)})})}}return e;function f(e,t){y(e)?t(e,[0]):e.forEach(t)}}function u(e,t,r,n){if(r-t==0)return r;for(var i=t;i<r;i++)if(n[i]===e)return i;return t}function c(e,t,r,n,i){r.splice(e,1),n.splice(e,1);for(var a=t+1;a<i.length;a++)i[a]--}function f(e,t,r,n,i,a,s){i.splice(e,0,n),a.splice(e,0,t);for(var o=r+1;o<s.length;o++)s[o]++}function h(e,n,i,a){var s,o,l,u=a||0,c=r,f=0;A(e._datatype)&&(c=t.find(r,[e._datatype,e._datatype])||r,f=t.convert(0,e._datatype),u=t.convert(u,e._datatype));var h=!c(u,f),p=e._size[0],m=e._size[1];if(i>m){for(o=m;o<i;o++)if(e._ptr[o]=e._values.length,h)for(s=0;s<p;s++)e._values.push(u),e._index.push(s);e._ptr[i]=e._values.length}else i<m&&(e._ptr.splice(i+1,m-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(m=i,n>p){if(h){var d=0;for(o=0;o<m;o++){e._ptr[o]=e._ptr[o]+d,l=e._ptr[o+1]+d;var g=0;for(s=p;s<n;s++,g++)e._values.splice(l+g,0,u),e._index.splice(l+g,0,s),d++}e._ptr[m]=e._values.length}}else if(n<p){var v=0;for(o=0;o<m;o++){e._ptr[o]=e._ptr[o]-v;var x=e._ptr[o],y=e._ptr[o+1]-v;for(l=x;l<y;l++)(s=e._index[l])>n-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[o]=e._values.length}return e._size[0]=n,e._size[1]=i,e}function p(e,n,a,s,o,l,u){var c=[],f=[],h=[],p=r,m=0;A(e._datatype)&&(p=t.find(r,[e._datatype,e._datatype])||r,m=t.convert(0,e._datatype));for(var d=function(e,t,r){var n=l(e,t,r);p(n,m)||(c.push(n),f.push(t))},g=s;g<=o;g++){h.push(c.length);var v=e._ptr[g],x=e._ptr[g+1];if(u)for(var y=v;y<x;y++){var b=e._index[y];b>=n&&b<=a&&d(e._values[y],b-n,g-s)}else{for(var w={},_=v;_<x;_++)w[e._index[_]]=e._values[_];for(var D=n;D<=a;D++)d(D in w?w[D]:0,D-n,g-s)}}return h.push(c.length),new i({values:c,index:f,ptr:h,size:[a-n+1,o-s+1]})}function m(e,t,r,n,i){var a,s,o=n[0],l=n[1],u=[];for(a=0;a<o;a++)for(s=0,u[a]=[];s<l;s++)u[a][s]=0;for(s=0;s<l;s++)for(var c=r[s],f=r[s+1],h=c;h<f;h++)u[a=t[h]][s]=e?i?ec(e[h]):e[h]:1;return u}return i.prototype=new n,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},Object.defineProperty(i,"name",{value:"SparseMatrix"}),i.prototype.constructor=i,i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return nV(this._values,eu)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,r){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return o(this,e);case 2:case 3:return l(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!E(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new nx(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],r=e[1];nC(t,this._size[0]),nC(r,this._size[1]);var n=u(t,this._ptr[r],this._ptr[r+1],this._index);return n<this._ptr[r+1]&&this._index[n]===t?this._values[n]:0},i.prototype.set=function(e,n,i){if(!E(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new nx(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var a=e[0],s=e[1],o=this._size[0],l=this._size[1],p=r,m=0;A(this._datatype)&&(p=t.find(r,[this._datatype,this._datatype])||r,m=t.convert(0,this._datatype)),(a>o-1||s>l-1)&&(h(this,Math.max(a+1,o),Math.max(s+1,l),i),o=this._size[0],l=this._size[1]),nC(a,o),nC(s,l);var d=u(a,this._ptr[s],this._ptr[s+1],this._index);return d<this._ptr[s+1]&&this._index[d]===a?p(n,m)?c(d,s,this._values,this._index,this._ptr):this._values[d]=n:p(n,m)||f(d,a,s,n,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,r){if(!S(e))throw TypeError("Array or Matrix expected");var n=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==n.length)throw Error("Only two dimensions matrix are supported");
1return n.forEach(function(e){if(!y(e)||!eE(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+nc(n)+")")}),h(r?this.clone():this,n[0],n[1],t)},i.prototype.reshape=function(e,t){if(!E(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!y(t)||!eE(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+nc(e)+")")});var r=this._size[0]*this._size[1],n=(e=nM(e,r))[0]*e[1];if(r!==n)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var a=[],s=0;s<i._ptr.length;s++)for(var o=0;o<i._ptr[s+1]-i._ptr[s];o++)a.push(s);for(var l=i._values.slice(),c=i._index.slice(),h=0;h<i._index.length;h++){var p=c[h],m=a[h],d=p*i._size[1]+m;a[h]=d%e[1],c[h]=Math.floor(d/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var g=0;g<i._ptr.length;g++)i._ptr[g]=0;for(var v=0;v<l.length;v++){var x=c[v],b=a[v],w=l[v];f(u(x,i._ptr[b],i._ptr[b+1],i._index),x,b,w,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?ec(this._values):void 0,index:ec(this._index),ptr:ec(this._ptr),size:ec(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,t){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var r=this,n=this._size[0],i=this._size[1],a=n2(e,r,"map");return p(this,0,n-1,0,i-1,function(e,t,n){return a.fn(e,[t,n],r)},t)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var r=this,n=this._size[0],i=this._size[1],a=n2(e,r,"forEach"),s=0;s<i;s++){var o=this._ptr[s],l=this._ptr[s+1];if(t)for(var u=o;u<l;u++){var c=this._index[u];a.fn(this._values[u],[c,s],r)}else{for(var f={},h=o;h<l;h++)f[this._index[h]]=this._values[h];for(var p=0;p<n;p++){var m=p in f?f[p]:0;a.fn(m,[p,s],r)}}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var r=this._ptr[t],n=this._ptr[t+1],i=r;i<n;i++){var a=this._index[i];yield{value:this._values[i],index:[a,t]}}},i.prototype.toArray=function(){return m(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return m(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],r=this._size[1],n=this.density(),i="Sparse Matrix ["+nc(t,e)+" x "+nc(r,e)+"] density: "+nc(n,e)+"\n",a=0;a<r;a++)for(var s=this._ptr[a],o=this._ptr[a+1],l=s;l<o;l++)i+="\n    ("+nc(this._index[l],e)+", "+nc(a,e)+") ==> "+(this._values?nc(this._values[l],e):"X");return i},i.prototype.toString=function(){return nc(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(b(e)&&(e=e.toNumber()),!y(e)||!eE(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,r=e<0?-e:0,n=this._size[0],a=this._size[1],s=Math.min(n-r,a-t),o=[],l=[],u=[];u[0]=0;for(var c=t;c<a&&o.length<s;c++)for(var f=this._ptr[c],h=this._ptr[c+1],p=f;p<h;p++){var m=this._index[p];if(m===c-t+r){o.push(this._values[p]),l[o.length-1]=m-r;break}}return u.push(o.length),new i({values:o,index:l,ptr:u,size:[s,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,n,a,s,o){if(!E(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(b(e)&&(e=e.toNumber()),!y(e)||!eE(e)||e<1)throw Error("Size values must be positive integers");return e}),a){if(b(a)&&(a=a.toNumber()),!y(a)||!eE(a))throw TypeError("The parameter k must be an integer number")}else a=0;var l,u=r,c=0;A(o)&&(u=t.find(r,[o,o])||r,c=t.convert(0,o));var f=a>0?a:0,h=a<0?-a:0,p=e[0],m=e[1],d=Math.min(p-h,m-f);if(E(n)){if(n.length!==d)throw Error("Invalid value array length");l=function(e){return n[e]}}else if(N(n)){var g=n.size();if(1!==g.length||g[0]!==d)throw Error("Invalid matrix length");l=function(e){return n.get([e])}}else l=function(){return n};for(var v=[],x=[],w=[],_=0;_<m;_++){w.push(v.length);var D=_-f;if(D>=0&&D<d){var C=l(D);u(C,c)||(x.push(D+h),v.push(C))}}return w.push(v.length),new i({values:v,index:x,ptr:w,size:[p,m]})},i.prototype.swapRows=function(e,t){if(!y(e)||!eE(e)||!y(t)||!eE(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return nC(e,this._size[0]),nC(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this}
1,i._forEachRow=function(e,t,r,n,i){for(var a=n[e],s=n[e+1],o=a;o<s;o++)i(r[o],t[o])},i._swapRows=function(e,t,r,n,i,a){for(var s=0;s<r;s++){var o=a[s],l=a[s+1],c=u(e,o,l,i),f=u(t,o,l,i);if(c<l&&f<l&&i[c]===e&&i[f]===t){if(n){var h=n[c];n[c]=n[f],n[f]=h}continue}if(c<l&&i[c]===e&&(f>=l||i[f]!==t)){var p=n?n[c]:void 0;i.splice(f,0,t),n&&n.splice(f,0,p),i.splice(f<=c?c+1:c,1),n&&n.splice(f<=c?c+1:c,1);continue}if(f<l&&i[f]===t&&(c>=l||i[c]!==e)){var m=n?n[f]:void 0;i.splice(c,0,e),n&&n.splice(c,0,m),i.splice(c<=f?f+1:f,1),n&&n.splice(c<=f?f+1:f,1)}}},i},{isClass:!0});function iR(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(!t)return null;var r={"0b":2,"0o":8,"0x":16}[t[1]];return{input:e,radix:r,integerPart:t[2],fractionalPart:t[3]}}function iq(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++)r+=parseInt(e.fractionalPart[n],e.radix)/Math.pow(e.radix,n+1);var i=t+r;if(isNaN(i))throw SyntaxError('String "'+e.input+'" is not a valid number');return i}var iU=ew("number",["typed"],e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=iR(e);if(t)return iq(t);var r=0,n=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);n&&(r=Number(n[2]),e=n[1]);var i=Number(e);if(isNaN(i))throw SyntaxError('String "'+e+'" is not a valid number');if(n){if(i>2**r-1)throw SyntaxError('String "'.concat(e,'" is out of range'));i>=2**(r-1)&&(i-=2**r)}return i},BigNumber:function(e){return e.toNumber()},bigint:function(e){return Number(e)},Fraction:function(e){return e.valueOf()},Unit:t.referToSelf(e=>t=>{var r=t.clone();return r.value=e(t.value),r}),null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))});return r.fromJSON=function(e){return parseFloat(e.value)},r}),iH=ew("bigint",["typed"],e=>{var{typed:t}=e,r=t("bigint",{"":function(){return 0n},bigint:function(e){return e},number:function(e){return BigInt(e.toFixed())},BigNumber:function(e){return BigInt(e.round().toString())},Fraction:function(e){return BigInt(e.valueOf().toFixed())},"string | boolean":function(e){return BigInt(e)},null:function(e){return 0n},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))});return r.fromJSON=function(e){return BigInt(e.value)},r}),iV="string",iW=ew(iV,["typed"],e=>{var{typed:t}=e;return t(iV,{"":function(){return""},number:ej,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e)),any:function(e){return String(e)}})}),iG="boolean",i$=ew(iG,["typed"],e=>{var{typed:t}=e;return t(iG,{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(e){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;var r=Number(e);if(""!==e&&!isNaN(r))return!!r;throw Error('Cannot convert "'+e+'" to a boolean')},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iY=ew("bignumber",["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(e){return new r(e+"")},string:function(e){var t=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(t){var n=t[2],i=r(t[1]),a=new r(2).pow(Number(n));if(i.gt(a.sub(1)))throw SyntaxError('String "'.concat(e,'" is out of range'));var s=new r(2).pow(Number(n)-1);return i.gte(s)?i.sub(a):i}return new r(e)},BigNumber:function(e){return e},bigint:function(e){return new r(e.toString())},Unit:t.referToSelf(e=>t=>{var r=t.clone();return r.value=e(t.value),r}),Fraction:function(e){return new r(String(e.n)).div(String(e.d)).times(String(e.s))},null:function(e){return new r(0)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iZ=ew("complex",["typed","Complex"],e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(e){return new r(e,0)},"number, number":function(e,t){return new r(e,t)},"BigNumber, BigNumber":function(e,t){return new r(e.toNumber(),t.toNumber())},Fraction:function(e){return new r(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return r(e)},null:function(e){return r(0)},Object:function(e){if("re"in e&&"im"in e)return new r(e.re,e.im);if("r"in e&&"phi"in e||"abs"in e&&"arg"in e)return new r(e);throw Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iX=ew("fraction",["typed","Fraction"],e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(e){if(!Number.isFinite(e)||isNaN(e))throw Error(e+" cannot be represented as a fraction");return new r(e)},string:function(e){return new r(e)},"number, number":function(e,t){return new r(e,t)},"bigint, bigint":function(e,t){return new r(e,t)},null:function(e){return new r(0)},BigNumber:function(e){return new r(e.toString())},bigint:function(e){return new r(e.toString())},Fraction:function(e){return e},Unit:t.referToSelf(e=>t=>{var r=t.clone();return r.value=e(t.value),r}),Object:function(e){return new r(e)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),iJ="matrix",iK=ew(iJ,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:i}=e;return t(iJ,{"":function(){return a([])}
1,string:function(e){return a([],e)},"string, string":function(e,t){return a([],e,t)},Array:function(e){return a(e)},Matrix:function(e){return a(e,e.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});function a(e,t,r){if("dense"===t||"default"===t||void 0===t)return new n(e,r);if("sparse"===t)return new i(e,r);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}}),iQ="matrixFromFunction",i0=ew(iQ,["typed","matrix","isZero"],e=>{var{typed:t,matrix:r,isZero:n}=e;return t(iQ,{"Array | Matrix, function, string, string":function(e,t,r,n){return i(e,t,r,n)},"Array | Matrix, function, string":function(e,t,r){return i(e,t,r)},"Matrix, function":function(e,t){return i(e,t,"dense")},"Array, function":function(e,t){return i(e,t,"dense").toArray()},"Array | Matrix, string, function":function(e,t,r){return i(e,r,t)},"Array | Matrix, string, string, function":function(e,t,r,n){return i(e,n,t,r)}});function i(e,t,i,a){var s;return(s=void 0!==a?r(i,a):r(i)).resize(e),s.forEach(function(e,r){var i=t(r);n(i)||s.set(r,i)}),s}}),i1="matrixFromRows",i2=ew(i1,["typed","matrix","flatten","size"],e=>{var{typed:t,matrix:r,flatten:n,size:i}=e;return t(i1,{"...Array":function(e){return a(e)},"...Matrix":function(e){return r(a(e.map(e=>e.toArray())))}});function a(e){if(0===e.length)throw TypeError("At least one row is needed to construct a matrix.");var t=s(e[0]),r=[];for(var i of e){var a=s(i);if(a!==t)throw TypeError("The vectors had different length: "+(0|t)+" ≠ "+(0|a));r.push(n(i))}return r}function s(e){var t=i(e);if(1===t.length)return t[0];if(2===t.length)if(1===t[0])return t[1];else if(1===t[1])return t[0];else throw TypeError("At least one of the arguments is not a vector.");throw TypeError("Only one- or two-dimensional vectors are supported.")}}),i3="matrixFromColumns",i4=ew(i3,["typed","matrix","flatten","size"],e=>{var{typed:t,matrix:r,flatten:n,size:i}=e;return t(i3,{"...Array":function(e){return a(e)},"...Matrix":function(e){return r(a(e.map(e=>e.toArray())))}});function a(e){if(0===e.length)throw TypeError("At least one column is needed to construct a matrix.");for(var t=s(e[0]),r=[],i=0;i<t;i++)r[i]=[];for(var a of e){var o=s(a);if(o!==t)throw TypeError("The vectors had different length: "+(0|t)+" ≠ "+(0|o));for(var l=n(a),u=0;u<t;u++)r[u].push(l[u])}return r}function s(e){var t=i(e);if(1===t.length)return t[0];if(2===t.length)if(1===t[0])return t[1];else if(1===t[1])return t[0];else throw TypeError("At least one of the arguments is not a vector.");throw TypeError("Only one- or two-dimensional vectors are supported.")}}),i6="splitUnit",i5=ew(i6,["typed"],e=>{var{typed:t}=e;return t(i6,{"Unit, Array":function(e,t){return e.splitUnit(t)}})}),i8="number",i9="number, number";function i7(e){return Math.abs(e)}function ae(e,t){return e+t}function at(e,t){return e-t}function ar(e,t){return e*t}function an(e){return-e}function ai(e){return e}function aa(e){return eF(e)}function as(e){return e*e*e}function ao(e){return Math.exp(e)}function al(e){return eB(e)}function au(e,t){if(!eE(e)||!eE(t))throw Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;for(var r,n=e*t;0!==t;)t=e%(r=t),e=r;return Math.abs(n/e)}function ac(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function af(e){return eT(e)}function ah(e){return eM(e)}function ap(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=t<0;if(r&&(t=-t),0===t)throw Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!=1)throw Error("Root must be odd when a is negative.");if(0===e)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function am(e){return eS(e)}function ad(e){return e*e}function ag(e,t){var r,n,i,a=0,s=1,o=1,l=0;if(!eE(e)||!eE(t))throw Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),i=e-n*t,r=a,a=s-n*a,s=r,r=o,o=l-n*o,l=r,e=t,t=i;return e<0?[-e,-s,-l]:[e,e?s:0,l]}function av(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}function ax(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!eE(t)||t<0||t>15)throw Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(eL(e,t))}i7.signature=i8,ae.signature=i9,at.signature=i9,ar.signature=i9,an.signature=i8,ai.signature=i8,aa.signature=i8,as.signature=i8,ao.signature=i8,al.signature=i8,au.signature=i9,af.signature=i8,ah.signature=i8,am.signature=i8,ad.signature=i8,ag.signature=i9,av.signature=i9;var ay="unaryMinus",ab=ew(ay,["typed"],e=>{var{typed:t}=e;return t(ay,{number:an,"Complex | BigNumber | Fraction":e=>e.neg(),bigint:e=>-e,Unit:t.referToSelf(e=>r=>{var n=r.clone();return n.value=t.find(e,n.valueType())(r.value),n}),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0))})}),aw="unaryPlus",a_=ew(aw,["typed","config","numeric"],e=>{var{typed:t,config:r,numeric:n}=e;return t(aw,{number:ai,Complex:function(e){return e},BigNumber:function(e){return e},bigint:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),boolean:function(e){return n(+!!e,r.number)},string:function(e){return n(e,eN(e,r))}})}),aD="abs",aC=ew(aD,["typed"],e=>{var{typed:t}=e;return t(aD,{number:i7,"Complex | BigNumber | Fraction | Unit":e=>e.abs(),bigint:e=>e<0n?-e:e,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0))})}),aA="mapSlices",aE=ew(aA,["typed","isInteger"],e=>{var{typed:t,isInteger:r}=e;return t(aA,{"Array | Matrix, number | BigNumber, function":function(e,t,n){if(!r(t))throw TypeError("Integer number expected for dimension");var i=Array.isArray(e)?nb(e):e.size();if(t<0||t>=i.length)throw new ny(t,i.length);return N(e)?e.create(aN(e.valueOf(),t,n),e.datatype()):aN(e,t,n)}})},{formerly:"apply"});function aN(e,t,r){var n,i,a;if(t<=0)if(!Array.isArray(e[0]))return r(e);else{for(n=0,a=aS(e),i=[];n<a.length;n++)i[n]=aN(a[n],t-1,r);return i}for(n=0,i=[];n<e.length;n++)i[n]=aN(e[n],t-1,r);return i}function aS(e){var t,r,n=e.length,i=e[0].length,a=[];for(r=0;r<i;r++){var s=[];for(t=0;t<n;t++)s.push(e[t][r]);a.push(s)}return a}var aM="addScalar",aT=ew(aM,["typed"],e=>{var{typed:t}=e;return t(aM,{"number, number":ae,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"bigint, bigint":function(e,t){return e+t},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":t.referToSelf(e=>(r,n)=>{if(null===r.value||void 0===r.value)throw Error("Parameter x contains a unit with undefined value");if(null===n.value||void 0===n.value)throw Error("Parameter y contains a unit with undefined value");if(!r.equalBase(n))throw Error("Units do not match");var i=r.clone();
1return i.value=t.find(e,[i.valueType(),n.valueType()])(i.value,n.value),i.fixPrefix=!1,i})})}),ak="subtractScalar",aF=ew(ak,["typed"],e=>{var{typed:t}=e;return t(ak,{"number, number":at,"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"bigint, bigint":function(e,t){return e-t},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":t.referToSelf(e=>(r,n)=>{if(null===r.value||void 0===r.value)throw Error("Parameter x contains a unit with undefined value");if(null===n.value||void 0===n.value)throw Error("Parameter y contains a unit with undefined value");if(!r.equalBase(n))throw Error("Units do not match");var i=r.clone();return i.value=t.find(e,[i.valueType(),n.valueType()])(i.value,n.value),i.fixPrefix=!1,i})})}),aB="cbrt",aP=ew(aB,["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],e=>{var{config:t,typed:r,isNegative:n,unaryMinus:i,matrix:a,Complex:s,BigNumber:o,Fraction:l}=e;return r(aB,{number:aa,Complex:u,"Complex, boolean":u,BigNumber:function(e){return e.cbrt()},Unit:c});function u(e,r){var n=e.arg()/3,i=e.abs(),o=new s(aa(i),0).mul(new s(0,n).exp());if(!r)return o;var l=[o,new s(aa(i),0).mul(new s(0,n+2*Math.PI/3).exp()),new s(aa(i),0).mul(new s(0,n-2*Math.PI/3).exp())];return"Array"===t.matrix?l:a(l)}function c(e){if(e.value&&_(e.value)){var t=e.clone();return t.value=1,(t=t.pow(1/3)).value=u(e.value),t}var r,a=n(e.value);a&&(e.value=i(e.value)),r=b(e.value)?new o(1).div(3):D(e.value)?new l(1,3):1/3;var s=e.pow(r);return a&&(s.value=i(s.value)),s}}),aj=ew("matAlgo11xS0s",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i,a){var s,o=e._values,l=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],m=r,d=0,g=i;"string"==typeof f&&(s=f,m=t.find(r,[s,s]),d=t.convert(0,s),n=t.convert(n,s),g=t.find(i,[s,s]));for(var v=[],x=[],y=[],b=0;b<p;b++){y[b]=x.length;for(var w=u[b],_=u[b+1],D=w;D<_;D++){var C=l[D],A=a?g(n,o[D]):g(o[D],n);m(A,d)||(x.push(C),v.push(A))}}return y[p]=x.length,e.createSparseMatrix({values:v,index:x,ptr:y,size:[h,p],datatype:s})}}),aO=ew("matAlgo12xSfs",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:r}=e;return function(e,n,i,a){var s,o=e._values,l=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],m=i;"string"==typeof f&&(s=f,n=t.convert(n,s),m=t.find(i,[s,s]));for(var d=[],g=[],v=[],x=0;x<p;x++){for(var y=x+1,b=u[x],w=u[x+1],_=b;_<w;_++){var D=l[_];g[D]=o[_],v[D]=y}for(var C=0;C<h;C++)0===x&&(d[C]=[]),v[C]===y?d[C][x]=a?m(n,g[C]):m(g[C],n):d[C][x]=a?m(n,0):m(0,n)}return new r({data:d,size:[h,p],datatype:s})}}),aI=ew("matAlgo14xDs",["typed"],e=>{var{typed:t}=e;return function(e,n,i,a){var s,o=e._data,l=e._size,u=e._datatype,c=i;"string"==typeof u&&(s=u,n=t.convert(n,s),c=t.find(i,[s,s]));var f=l.length>0?r(c,0,l,l[0],o,n,a):[];return e.createDenseMatrix({data:f,size:ec(l),datatype:s})};function r(e,t,n,i,a,s,o){var l=[];if(t===n.length-1)for(var u=0;u<i;u++)l[u]=o?e(s,a[u]):e(a[u],s);else for(var c=0;c<i;c++)l[c]=r(e,t+1,n,n[t+1],a[c],s,o);return l}}),az="ceil",aL=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],aR=new rM(10),aq=ew(az,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function i(e){var t=Math.ceil(e),i=n(e);return t===i?t:eW(e,i,r.relTol,r.absTol)&&!eW(e,t,r.relTol,r.absTol)?i:t}return t(az,{number:i,"number, number":function(e,t){if(!eE(t))throw RangeError("number of decimals in function ceil must be an integer");if(t<0||t>15)throw RangeError("number of decimals in ceil number must be in range 0-15");var r=10**t;return i(e*r)/r}})}),aU=ew(az,aL,e=>{var{typed:t,config:r,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:o}=e,l=aj({typed:t,equalScalar:a}),u=aO({typed:t,DenseMatrix:o}),c=aI({typed:t}),f=aq({typed:t,config:r,round:n});function h(e){var t=(e,t)=>ig(e,t,r.relTol,r.absTol),i=e.ceil(),a=n(e);return i.eq(a)?i:t(e,a)&&!t(e,i)?a:i}return t("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(e){return e.ceil()},"Complex, number":function(e,t){return e.ceil(t)},"Complex, BigNumber":function(e,t){return e.ceil(t.toNumber())},BigNumber:h,"BigNumber, BigNumber":function(e,t){var r=aR.pow(t);return h(e.mul(r)).div(r)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.ceil()},"Fraction, number":function(e,t){return e.ceil(t)},"Fraction, BigNumber":function(e,t){return e.ceil(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,r,n){var i=t.toNumeric(n);return n.multiply(e(i,r))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>e(t,r.toNumber(),n)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>ia(t,t=>e(t,r,n),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,r)=>e(t,0,r)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),"Array, number | BigNumber":t.referToSelf(e=>(t,r)=>ia(t,t=>e(t,r),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>
1l(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>c(t,r,e,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,r)=>c(i(r),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,r)=>a(t,0)?s(r.size(),r.storage()):"dense"===r.storage()?c(r,t,e,!0):u(r,t,e,!0))})}),aH="cube",aV=ew(aH,["typed"],e=>{var{typed:t}=e;return t(aH,{number:as,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},bigint:function(e){return e*e*e},Fraction:function(e){return e.pow(3)},Unit:function(e){return e.pow(3)}})}),aW="exp",aG=ew(aW,["typed"],e=>{var{typed:t}=e;return t(aW,{number:ao,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()}})}),a$="expm1",aY=ew(a$,["typed","Complex"],e=>{var{typed:t,Complex:r}=e;return t(a$,{number:al,Complex:function(e){var t=Math.exp(e.re);return new r(t*Math.cos(e.im)-1,t*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)}})}),aZ="fix",aX=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],aJ=ew(aZ,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(aZ,{number:function(e){return e>0?n(e):r(e)},"number, number":function(e,t){return e>0?n(e,t):r(e,t)}})}),aK=ew(aZ,aX,e=>{var{typed:t,Complex:r,matrix:n,ceil:i,floor:a,equalScalar:s,zeros:o,DenseMatrix:l}=e,u=aO({typed:t,DenseMatrix:l}),c=aI({typed:t}),f=aJ({typed:t,ceil:i,floor:a});return t("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(e){return new r(e.re>0?Math.floor(e.re):Math.ceil(e.re),e.im>0?Math.floor(e.im):Math.ceil(e.im))},"Complex, number":function(e,t){return new r(e.re>0?a(e.re,t):i(e.re,t),e.im>0?a(e.im,t):i(e.im,t))},"Complex, BigNumber":function(e,t){var n=t.toNumber();return new r(e.re>0?a(e.re,n):i(e.re,n),e.im>0?a(e.im,n):i(e.im,n))},BigNumber:function(e){return e.isNegative()?i(e):a(e)},"BigNumber, number | BigNumber":function(e,t){return e.isNegative()?i(e,t):a(e,t)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.s<0n?e.ceil():e.floor()},"Fraction, number | BigNumber":function(e,t){return e.s<0n?i(e,t):a(e,t)},"Unit, number, Unit":t.referToSelf(e=>function(t,r,n){var i=t.toNumeric(n);return n.multiply(e(i,r))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>e(t,r.toNumber(),n)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>ia(t,t=>e(t,r,n),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,r)=>e(t,0,r)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(e=>(t,r)=>ia(t,t=>e(t,r),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,r)=>c(n(r),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,r)=>s(t,0)?o(r.size(),r.storage()):"dense"===r.storage()?c(r,t,e,!0):u(r,t,e,!0))})}),aQ="floor",a0=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],a1=new rM(10),a2=ew(aQ,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function i(e){var t=Math.floor(e),i=n(e);return t===i?t:eW(e,i,r.relTol,r.absTol)&&!eW(e,t,r.relTol,r.absTol)?i:t}return t(aQ,{number:i,"number, number":function(e,t){if(!eE(t))throw RangeError("number of decimals in function floor must be an integer");if(t<0||t>15)throw RangeError("number of decimals in floor number must be in range 0 - 15");var r=10**t;return i(e*r)/r}})}),a3=ew(aQ,a0,e=>{var{typed:t,config:r,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:o}=e,l=aj({typed:t,equalScalar:a}),u=aO({typed:t,DenseMatrix:o}),c=aI({typed:t}),f=a2({typed:t,config:r,round:n});function h(e){var t=(e,t)=>ig(e,t,r.relTol,r.absTol),i=e.floor(),a=n(e);return i.eq(a)?i:t(e,a)&&!t(e,i)?a:i}return t("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(e){return e.floor()},"Complex, number":function(e,t){return e.floor(t)},"Complex, BigNumber":function(e,t){return e.floor(t.toNumber())},BigNumber:h,"BigNumber, BigNumber":function(e,t){var r=a1.pow(t);return h(e.mul(r)).div(r)},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.floor()},"Fraction, number":function(e,t){return e.floor(t)},"Fraction, BigNumber":function(e,t){return e.floor(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,r,n){var i=t.toNumeric(n);return n.multiply(e(i,r))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>e(t,r.toNumber(),n)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>ia(t,t=>e(t,r,n),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,r)=>e(t,0,r)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),"Array, number | BigNumber":t.referToSelf(e=>(t,r)=>ia(t,t=>e(t,r),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>
1l(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>c(t,r,e,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(e=>(t,r)=>c(i(r),t,e,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(e=>(t,r)=>a(t,0)?s(r.size(),r.storage()):"dense"===r.storage()?c(r,t,e,!0):u(r,t,e,!0))})}),a4=ew("matAlgo02xDS0",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i,a){var s,o=e._data,l=e._size,u=e._datatype||e.getDataType(),c=n._values,f=n._index,h=n._ptr,p=n._size,m=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(l.length!==p.length)throw new nx(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=l[0],g=l[1],v=r,x=0,y=i;"string"==typeof u&&u===m&&"mixed"!==u&&(s=u,v=t.find(r,[s,s]),x=t.convert(0,s),y=t.find(i,[s,s]));for(var b=[],w=[],_=[],D=0;D<g;D++){_[D]=w.length;for(var C=h[D],A=h[D+1],E=C;E<A;E++){var N=f[E],S=a?y(c[E],o[N][D]):y(o[N][D],c[E]);v(S,x)||(w.push(N),b.push(S))}}return _[g]=w.length,n.createSparseMatrix({values:b,index:w,ptr:_,size:[d,g],datatype:u===e._datatype&&m===n._datatype?s:void 0})}}),a6=ew("matAlgo03xDSf",["typed"],e=>{var{typed:t}=e;return function(e,r,n,i){var a,s=e._data,o=e._size,l=e._datatype||e.getDataType(),u=r._values,c=r._index,f=r._ptr,h=r._size,p=r._datatype||void 0===r._data?r._datatype:r.getDataType();if(o.length!==h.length)throw new nx(o.length,h.length);if(o[0]!==h[0]||o[1]!==h[1])throw RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+h+")");if(!u)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=o[0],d=o[1],g=0,v=n;"string"==typeof l&&l===p&&"mixed"!==l&&(a=l,g=t.convert(0,a),v=t.find(n,[a,a]));for(var x=[],y=0;y<m;y++)x[y]=[];for(var b=[],w=[],_=0;_<d;_++){for(var D=_+1,C=f[_],A=f[_+1],E=C;E<A;E++){var N=c[E];b[N]=i?v(u[E],s[N][_]):v(s[N][_],u[E]),w[N]=D}for(var S=0;S<m;S++)w[S]===D?x[S][_]=b[S]:x[S][_]=i?v(g,s[S][_]):v(s[S][_],g)}return e.createDenseMatrix({data:x,size:[m,d],datatype:l===e._datatype&&p===r._datatype?a:void 0})}}),a5=ew("matAlgo05xSfSf",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a,s,o,l,u,c=e._values,f=e._index,h=e._ptr,p=e._size,m=e._datatype||void 0===e._data?e._datatype:e.getDataType(),d=n._values,g=n._index,v=n._ptr,x=n._size,y=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(p.length!==x.length)throw new nx(p.length,x.length);if(p[0]!==x[0]||p[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+p+") must match Matrix B ("+x+")");var b=p[0],w=p[1],_=r,D=0,C=i;"string"==typeof m&&m===y&&"mixed"!==m&&(a=m,_=t.find(r,[a,a]),D=t.convert(0,a),C=t.find(i,[a,a]));var A=c&&d?[]:void 0,E=[],N=[],S=A?[]:void 0,M=A?[]:void 0,T=[],k=[];for(o=0;o<w;o++){N[o]=E.length;var F=o+1;for(l=h[o],u=h[o+1];l<u;l++)s=f[l],E.push(s),T[s]=F,S&&(S[s]=c[l]);for(l=v[o],u=v[o+1];l<u;l++)T[s=g[l]]!==F&&E.push(s),k[s]=F,M&&(M[s]=d[l]);if(A)for(l=N[o];l<E.length;){var B=T[s=E[l]],P=k[s];if(B===F||P===F){var j=C(B===F?S[s]:D,P===F?M[s]:D);_(j,D)?E.splice(l,1):(A.push(j),l++)}}}return N[w]=E.length,e.createSparseMatrix({values:A,index:E,ptr:N,size:[b,w],datatype:m===e._datatype&&y===n._datatype?a:void 0})}}),a8=ew("matAlgo13xDD",["typed"],e=>{var{typed:t}=e;return function(e,n,i){var a,s=e._data,o=e._size,l=e._datatype,u=n._data,c=n._size,f=n._datatype,h=[];if(o.length!==c.length)throw new nx(o.length,c.length);for(var p=0;p<o.length;p++){if(o[p]!==c[p])throw RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+c+")");h[p]=o[p]}var m=i;"string"==typeof l&&l===f&&(a=l,m=t.find(i,[a,a]));var d=h.length>0?r(m,0,h,h[0],s,u):[];return e.createDenseMatrix({data:d,size:h,datatype:a})};function r(e,t,n,i,a,s){var o=[];if(t===n.length-1)for(var l=0;l<i;l++)o[l]=e(a[l],s[l]);else for(var u=0;u<i;u++)o[u]=r(e,t+1,n,n[t+1],a[u],s[u]);return o}});function a9(e,t){if(em(e.size(),t.size()))return[e,t];var r=n$(e.size(),t.size());return[e,t].map(e=>a7(e,r))}function a7(e,t){return em(e.size(),t)?e:e.create(nZ(e.valueOf(),t),e.datatype())}var se=ew("matrixAlgorithmSuite",["typed","matrix"],e=>{var{typed:t,matrix:r}=e,n=a8({typed:t}),i=aI({typed:t});return function(e){var a,s=e.elop,o=e.SD||e.DS;s?(a={"DenseMatrix, DenseMatrix":(e,t)=>
vendor: 4,608 bytes, line 1
1n(...a9(e,t),s),"Array, Array":(e,t)=>n(...a9(r(e),r(t)),s).valueOf(),"Array, DenseMatrix":(e,t)=>n(...a9(r(e),t),s),"DenseMatrix, Array":(e,t)=>n(...a9(e,r(t)),s)},e.SS&&(a["SparseMatrix, SparseMatrix"]=(t,r)=>e.SS(...a9(t,r),s,!1)),e.DS&&(a["DenseMatrix, SparseMatrix"]=(t,r)=>e.DS(...a9(t,r),s,!1),a["Array, SparseMatrix"]=(t,n)=>e.DS(...a9(r(t),n),s,!1)),o&&(a["SparseMatrix, DenseMatrix"]=(e,t)=>o(...a9(t,e),s,!0),a["SparseMatrix, Array"]=(e,t)=>o(...a9(r(t),e),s,!0))):(a={"DenseMatrix, DenseMatrix":t.referToSelf(e=>(t,r)=>n(...a9(t,r),e)),"Array, Array":t.referToSelf(e=>(t,i)=>n(...a9(r(t),r(i)),e).valueOf()),"Array, DenseMatrix":t.referToSelf(e=>(t,i)=>n(...a9(r(t),i),e)),"DenseMatrix, Array":t.referToSelf(e=>(t,i)=>n(...a9(t,r(i)),e))},e.SS&&(a["SparseMatrix, SparseMatrix"]=t.referToSelf(t=>(r,n)=>e.SS(...a9(r,n),t,!1))),e.DS&&(a["DenseMatrix, SparseMatrix"]=t.referToSelf(t=>(r,n)=>e.DS(...a9(r,n),t,!1)),a["Array, SparseMatrix"]=t.referToSelf(t=>(n,i)=>e.DS(...a9(r(n),i),t,!1))),o&&(a["SparseMatrix, DenseMatrix"]=t.referToSelf(e=>(t,r)=>o(...a9(r,t),e,!0)),a["SparseMatrix, Array"]=t.referToSelf(e=>(t,n)=>o(...a9(r(n),t),e,!0))));var l=e.scalar||"any";(e.Ds||e.Ss)&&(s?(a["DenseMatrix,"+l]=(e,t)=>i(e,t,s,!1),a[l+", DenseMatrix"]=(e,t)=>i(t,e,s,!0),a["Array,"+l]=(e,t)=>i(r(e),t,s,!1).valueOf(),a[l+", Array"]=(e,t)=>i(r(t),e,s,!0).valueOf()):(a["DenseMatrix,"+l]=t.referToSelf(e=>(t,r)=>i(t,r,e,!1)),a[l+", DenseMatrix"]=t.referToSelf(e=>(t,r)=>i(r,t,e,!0)),a["Array,"+l]=t.referToSelf(e=>(t,n)=>i(r(t),n,e,!1).valueOf()),a[l+", Array"]=t.referToSelf(e=>(t,n)=>i(r(n),t,e,!0).valueOf())));var u=void 0!==e.sS?e.sS:e.Ss;return s?(e.Ss&&(a["SparseMatrix,"+l]=(t,r)=>e.Ss(t,r,s,!1)),u&&(a[l+", SparseMatrix"]=(e,t)=>u(t,e,s,!0))):(e.Ss&&(a["SparseMatrix,"+l]=t.referToSelf(t=>(r,n)=>e.Ss(r,n,t,!1))),u&&(a[l+", SparseMatrix"]=t.referToSelf(e=>(t,r)=>u(r,t,e,!0)))),s&&s.signatures&&eh(a,s.signatures),a}}),st="mod",sr=ew(st,["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],e=>{var{typed:t,config:r,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:o,concat:l}=e,u=a3({typed:t,config:r,round:n,matrix:i,equalScalar:a,zeros:s,DenseMatrix:o}),c=a4({typed:t,equalScalar:a}),f=a6({typed:t}),h=a5({typed:t,equalScalar:a}),p=aj({typed:t,equalScalar:a}),m=aO({typed:t,DenseMatrix:o}),d=se({typed:t,matrix:i,concat:l});return t(st,{"number, number":g,"BigNumber, BigNumber":function(e,t){return t.isZero()?e:e.sub(t.mul(u(e.div(t))))},"bigint, bigint":function(e,t){if(0n===t)return e;if(e<0){var r=e%t;return 0n===r?r:r+t}return e%t},"Fraction, Fraction":function(e,t){return t.equals(0)?e:e.sub(t.mul(u(e.div(t))))}},d({SS:h,DS:f,SD:c,Ss:p,sS:m}));function g(e,t){return 0===t?e:e-t*u(e/t)}}),sn=ew("matAlgo01xDSid",["typed"],e=>{var{typed:t}=e;return function(e,r,n,i){var a,s,o=e._data,l=e._size,u=e._datatype||e.getDataType(),c=r._values,f=r._index,h=r._ptr,p=r._size,m=r._datatype||void 0===r._data?r._datatype:r.getDataType();if(l.length!==p.length)throw new nx(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d=l[0],g=l[1],v="string"==typeof u&&"mixed"!==u&&u===m?u:void 0,x=v?t.find(n,[v,v]):n,y=[];for(a=0;a<d;a++)y[a]=[];var b=[],w=[];for(s=0;s<g;s++){for(var _=s+1,D=h[s],C=h[s+1],A=D;A<C;A++)b[a=f[A]]=i?x(c[A],o[a][s]):x(o[a][s],c[A]),w[a]=_;for(a=0;a<d;a++)w[a]===_?y[a][s]=b[a]:y[a][s]=o[a][s]}return e.createDenseMatrix({data:y,size:[d,g],datatype:u===e._datatype&&m===r._datatype?v:void 0})}}),si=ew("matAlgo04xSidSid",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a,s,o,l,u,c,f=e._values,h=e._index,p=e._ptr,m=e._size,d=e._datatype||void 0===e._data?e._datatype:e.getDataType(),g=n._values,v=n._index,x=n._ptr,y=n._size,b=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(m.length!==y.length)throw new nx(m.length,y.length);if(m[0]!==y[0]||m[1]!==y[1])throw RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+y+")");var w=m[0],_=m[1],D=r,C=0,A=i;"string"==typeof d&&d===b&&"mixed"!==d&&(a=d,D=t.find(r,[a,a]),C=t.convert(0,a),A=t.find(i,[a,a]));var E=f&&g?[]:void 0,N=[],S=[],M=f&&g?[]:void 0,T=f&&g?[]:void 0,k=[],F=[];for(o=0;o<_;o++){S[o]=N.length;var B=o+1;for(u=p[o],c=p[o+1],l=u;l<c;l++)s=h[l],N.push(s),k[s]=B,M&&(M[s]=f[l]);for(u=x[o],c=x[o+1],l=u;l<c;l++)if(k[s=v[l]]===B){if(M){var P=A(M[s],g[l]);D(P,C)?k[s]=null:M[s]=P}}else N.push(s),F[s]=B,T&&(T[s]=g[l]);if(M&&T)for(l=S[o];l<N.length;
1)k[s=N[l]]===B?(E[l]=M[s],l++):F[s]===B?(E[l]=T[s],l++):N.splice(l,1)}return S[_]=N.length,e.createSparseMatrix({values:E,index:N,ptr:S,size:[w,_],datatype:d===e._datatype&&b===n._datatype?a:void 0})}}),sa=ew("matAlgo10xSids",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:r}=e;return function(e,n,i,a){var s,o=e._values,l=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],m=i;"string"==typeof f&&(s=f,n=t.convert(n,s),m=t.find(i,[s,s]));for(var d=[],g=[],v=[],x=0;x<p;x++){for(var y=x+1,b=u[x],w=u[x+1],_=b;_<w;_++){var D=l[_];g[D]=o[_],v[D]=y}for(var C=0;C<h;C++)0===x&&(d[C]=[]),v[C]===y?d[C][x]=a?m(n,g[C]):m(g[C],n):d[C][x]=n}return new r({data:d,size:[h,p],datatype:s})}});function ss(e,t,r,n){if(!(this instanceof ss))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+r+(null!=n?"-"+n:"")+" expected)",this.stack=Error().stack}ss.prototype=Error(),ss.prototype.constructor=Error,ss.prototype.name="ArgumentsError",ss.prototype.isArgumentsError=!0;var so="gcd",sl=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],su="number | BigNumber | Fraction | Matrix | Array",sc="".concat(su,", ").concat(su,", ...").concat(su);function sf(e){return!e.some(e=>Array.isArray(e))}var sh=ew(so,sl,e=>{var{typed:t,matrix:r,config:n,round:i,equalScalar:a,zeros:s,BigNumber:o,DenseMatrix:l,concat:u}=e,c=sr({typed:t,config:n,round:i,matrix:r,equalScalar:a,zeros:s,DenseMatrix:l,concat:u}),f=sn({typed:t}),h=si({typed:t,equalScalar:a}),p=sa({typed:t,DenseMatrix:l}),m=se({typed:t,matrix:r,concat:u});return t(so,{"number, number":d,"BigNumber, BigNumber":g,"Fraction, Fraction":(e,t)=>e.gcd(t)},m({SS:h,DS:f,Ss:p}),{[sc]:t.referToSelf(e=>(t,r,n)=>{for(var i=e(t,r),a=0;a<n.length;a++)i=e(i,n[a]);return i}),Array:t.referToSelf(e=>t=>{if(1===t.length&&Array.isArray(t[0])&&sf(t[0]))return e(...t[0]);if(sf(t))return e(...t);throw new ss("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(e=>t=>e(t.toArray()))});function d(e,t){var r;if(!eE(e)||!eE(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)r=c(e,t),e=t,t=r;return e<0?-e:e}function g(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var r=new o(0);!t.isZero();){var n=c(e,t);e=t,t=n}return e.lt(r)?e.neg():e}}),sp=ew("matAlgo06xS0S0",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a,s=e._values,o=e._size,l=e._datatype||void 0===e._data?e._datatype:e.getDataType(),u=n._values,c=n._size,f=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(o.length!==c.length)throw new nx(o.length,c.length);if(o[0]!==c[0]||o[1]!==c[1])throw RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+c+")");var h=o[0],p=o[1],m=r,d=0,g=i;"string"==typeof l&&l===f&&"mixed"!==l&&(a=l,m=t.find(r,[a,a]),d=t.convert(0,a),g=t.find(i,[a,a]));for(var v=s&&u?[]:void 0,x=[],y=[],b=v?[]:void 0,w=[],_=[],D=0;D<p;D++){y[D]=x.length;var C=D+1;if(il(e,D,w,b,_,C,x,g),il(n,D,w,b,_,C,x,g),b)for(var A=y[D];A<x.length;){var E=x[A];if(_[E]===C){var N=b[E];m(N,d)?x.splice(A,1):(v.push(N),A++)}else x.splice(A,1)}else for(var S=y[D];S<x.length;)_[x[S]]!==C?x.splice(S,1):S++}return y[p]=x.length,e.createSparseMatrix({values:v,index:x,ptr:y,size:[h,p],datatype:l===e._datatype&&f===n._datatype?a:void 0})}}),sm="lcm",sd=ew(sm,["typed","matrix","equalScalar","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,concat:i}=e,a=a4({typed:t,equalScalar:n}),s=sp({typed:t,equalScalar:n}),o=aj({typed:t,equalScalar:n}),l=se({typed:t,matrix:r,concat:i}),u="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(u,", ").concat(u,", ...").concat(u)]=t.referToSelf(e=>(t,r,n)=>{for(var i=e(t,r),a=0;a<n.length;a++)i=e(i,n[a]);return i}),t(sm,{"number, number":au,"BigNumber, BigNumber":f,"Fraction, Fraction":(e,t)=>e.lcm(t)},l({SS:s,DS:a,Ss:o}),c);function f(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function lcm must be integer numbers");if(e.isZero())return e;if(t.isZero())return t;for(var r=e.times(t);!t.isZero();){var n=t;t=e.mod(n),e=n}return r.div(e).abs()}});function sg(e,t,r,n){return function(i){if(i>0||r.predictable){if(i<=0)return NaN;var a=i.toString(16),s=a.substring(0,15);return e*(a.length-s.length)+t(Number("0x"+s))}return n(i.toNumber())}}var sv="log10",sx=["typed","config","Complex"],sy=af(16),sb=ew(sv,sx,e=>{var{typed:t,config:r,Complex:n}=e;function i(e){return e.log().div(Math.LN10)}function a(e){return i(new n(e,0))}return t(sv,{number:function(e){return e>=0||r.predictable?af(e):a(e)},bigint:sg(sy,af,r,a),Complex:i,BigNumber:function(e){return!e.isNegative()||r.predictable?e.log():a(e.toNumber())},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),sw="log2",s_=ew(sw,["typed","config","Complex"],e=>{var{typed:t,config:r,Complex:n}=e;function i(e){return a(new n(e,0))}return t(sw,{number:function(e){return e>=0||r.predictable?ah(e):i(e)},bigint:sg(4,ah,r,i),Complex:a,BigNumber:function(e){return!e.isNegative()||r.predictable?e.log(2):i(e.toNumber())},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))});function a(e){var t=Math.sqrt(e.re*e.re+e.im*e.im);return new n(Math.log2?Math.log2(t):Math.log(t)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}}),sD=ew("multiplyScalar",["typed"],e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":ar,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"bigint, bigint":function(e,t){return e*t},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":(e,t)=>t.multiply(e),"Unit, number | Fraction | BigNumber | Complex | Unit":(e,t)=>e.multiply(t)})}),sC="multiply",sA=ew(sC,["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:i,equalScalar:a,dot:s}=e,o=aj({typed:t,equalScalar:a}),l=aI({typed:t});function u(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}
1break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}function c(e,t,r){if(0===r)throw Error("Cannot multiply two empty vectors");return s(e,t)}function f(e,t){if("dense"!==t.storage())throw Error("Support for SparseMatrix not implemented");return h(e,t)}function h(e,r){var a,s=e._data,o=e._size,l=e._datatype||e.getDataType(),u=r._data,c=r._size,f=r._datatype||r.getDataType(),h=o[0],p=c[1],m=n,d=i;l&&f&&l===f&&"string"==typeof l&&"mixed"!==l&&(a=l,m=t.find(n,[a,a]),d=t.find(i,[a,a]));for(var g=[],v=0;v<p;v++){for(var x=d(s[0],u[0][v]),y=1;y<h;y++)x=m(x,d(s[y],u[y][v]));g[v]=x}return e.createDenseMatrix({data:g,size:[p],datatype:l===e._datatype&&f===r._datatype?a:void 0})}var p=t("_multiplyMatrixVector",{"DenseMatrix, any":d,"SparseMatrix, any":x}),m=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":g,"DenseMatrix, SparseMatrix":v,"SparseMatrix, DenseMatrix":y,"SparseMatrix, SparseMatrix":b});function d(e,r){var a,s=e._data,o=e._size,l=e._datatype||e.getDataType(),u=r._data,c=r._datatype||r.getDataType(),f=o[0],h=o[1],p=n,m=i;l&&c&&l===c&&"string"==typeof l&&"mixed"!==l&&(a=l,p=t.find(n,[a,a]),m=t.find(i,[a,a]));for(var d=[],g=0;g<f;g++){for(var v=s[g],x=m(v[0],u[0]),y=1;y<h;y++)x=p(x,m(v[y],u[y]));d[g]=x}return e.createDenseMatrix({data:d,size:[f],datatype:l===e._datatype&&c===r._datatype?a:void 0})}function g(e,r){var a,s=e._data,o=e._size,l=e._datatype||e.getDataType(),u=r._data,c=r._size,f=r._datatype||r.getDataType(),h=o[0],p=o[1],m=c[1],d=n,g=i;l&&f&&l===f&&"string"==typeof l&&"mixed"!==l&&"mixed"!==l&&(a=l,d=t.find(n,[a,a]),g=t.find(i,[a,a]));for(var v=[],x=0;x<h;x++){var y=s[x];v[x]=[];for(var b=0;b<m;b++){for(var w=g(y[0],u[0][b]),_=1;_<p;_++)w=d(w,g(y[_],u[_][b]));v[x][b]=w}}return e.createDenseMatrix({data:v,size:[h,m],datatype:l===e._datatype&&f===r._datatype?a:void 0})}function v(e,r){var s,o=e._data,l=e._size,u=e._datatype||e.getDataType(),c=r._values,f=r._index,h=r._ptr,p=r._size,m=r._datatype||void 0===r._data?r._datatype:r.getDataType();if(!c)throw Error("Cannot multiply Dense Matrix times Pattern only Matrix");var d=l[0],g=p[1],v=n,x=i,y=a,b=0;u&&m&&u===m&&"string"==typeof u&&"mixed"!==u&&(s=u,v=t.find(n,[s,s]),x=t.find(i,[s,s]),y=t.find(a,[s,s]),b=t.convert(0,s));for(var w=[],_=[],D=[],C=r.createSparseMatrix({values:w,index:_,ptr:D,size:[d,g],datatype:u===e._datatype&&m===r._datatype?s:void 0}),A=0;A<g;A++){D[A]=_.length;var E=h[A],N=h[A+1];if(N>E)for(var S=0,M=0;M<d;M++){for(var T=M+1,k=void 0,F=E;F<N;F++){var B=f[F];S!==T?(k=x(o[M][B],c[F]),S=T):k=v(k,x(o[M][B],c[F]))}S!==T||y(k,b)||(_.push(M),w.push(k))}}return D[g]=_.length,C}function x(e,r){var s,o=e._values,l=e._index,u=e._ptr,c=e._datatype||void 0===e._data?e._datatype:e.getDataType();if(!o)throw Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f=r._data,h=r._datatype||r.getDataType(),p=e._size[0],m=r._size[0],d=[],g=[],v=[],x=n,y=i,b=a,w=0;c&&h&&c===h&&"string"==typeof c&&"mixed"!==c&&(s=c,x=t.find(n,[s,s]),y=t.find(i,[s,s]),b=t.find(a,[s,s]),w=t.convert(0,s));var _=[],D=[];v[0]=0;for(var C=0;C<m;C++){var A=f[C];if(!b(A,w))for(var E=u[C],N=u[C+1],S=E;S<N;S++){var M=l[S];D[M]?_[M]=x(_[M],y(A,o[S])):(D[M]=!0,g.push(M),_[M]=y(A,o[S]))}}for(var T=g.length,k=0;k<T;k++){var F=g[k];d[k]=_[F]}return v[1]=g.length,e.createSparseMatrix({values:d,index:g,ptr:v,size:[p,1],datatype:c===e._datatype&&h===r._datatype?s:void 0})}function y(e,r){var s,o=e._values,l=e._index,u=e._ptr,c=e._datatype||void 0===e._data?e._datatype:e.getDataType();if(!o)throw Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f=r._data,h=r._datatype||r.getDataType(),p=e._size[0],m=r._size[0],d=r._size[1],g=n,v=i,x=a,y=0;c&&h&&c===h&&"string"==typeof c&&"mixed"!==c&&(s=c,g=t.find(n,[s,s]),v=t.find(i,[s,s]),x=t.find(a,[s,s]),y=t.convert(0,s));for(var b=[],w=[],_=[],D=e.createSparseMatrix({values:b,index:w,ptr:_,size:[p,d],datatype:c===e._datatype&&h===r._datatype?s:void 0}),C=[],A=[],E=0;E<d;E++){_[E]=w.length;for(var N=E+1,S=0;S<m;S++){var M=f[S][E];if(!x(M,y))for(var T=u[S],k=u[S+1],F=T;F<k;F++){var B=l[F];A[B]!==N?(A[B]=N,w.push(B),C[B]=v(M,o[F])):C[B]=g(C[B],v(M,o[F]))}}for(var P=_[E],j=w.length,O=P;O<j;O++){var I=w[O];b[O]=C[I]}}return _[d]=w.length,D}function b(e,r){var a,s,o,l,u,c,f,h,p,m=e._values,d=e._index,g=e._ptr,v=e._datatype||void 0===e._data?e._datatype:e.getDataType(),x=r._values,y=r._index,b=r._ptr,w=r._datatype||void 0===r._data?r._datatype:r.getDataType(),_=e._size[0],D=r._size[1],C=m&&x,A=n,E=i;v&&w&&v===w&&"string"==typeof v&&"mixed"!==v&&(a=v,A=t.find(n,[a,a]),E=t.find(i,[a,a]));for(var N=C?[]:void 0,S=[],M=[],T=e.createSparseMatrix({values:N,index:S,ptr:M,size:[_,D],datatype:v===e._datatype&&w===r._datatype?a:void 0}),k=C?[]:void 0,F=[],B=0;B<D;B++){M[B]=S.length;var P=B+1;for(c=b[B],f=b[B+1],u=c;u<f;u++)if(p=y[u],C)for(o=g[p],l=g[p+1],s=o;s<l;s++)F[h=d[s]]!==P?(F[h]=P,S.push(h),k[h]=E(x[u],m[s])):k[h]=A(k[h],E(x[u],m[s]));else for(o=g[p],l=g[p+1],s=o;s<l;s++)F[h=d[s]]!==P&&(F[h]=P,S.push(h));if(C)for(var j=M[B],O=S.length,I=j;I<O;I++){var z=S[I];N[I]=k[z]}}return M[D]=S.length,T}return t(sC,i,{"Array, Array":t.referTo("Matrix, Matrix",e=>(t,n)=>{u(nb(t),nb(n));var i=e(r(t),r(n));return N(i)?i.valueOf():i}),"Matrix, Matrix":function(e,t){var r=e.size(),n=t.size();return(u(r,n),1===r.length)?1===n.length?c(e,t,r[0]):f(e,t):1===n.length?p(e,t):m(e,t)},"Matrix, Array":t.referTo("Matrix,Matrix",e=>(t,n)=>e(t,r(n))),"Array, Matrix":t.referToSelf(e=>(t,n)=>e(r(t,n.storage()),n)),"SparseMatrix, any":function(e,t){return o(e,t,i,!1)},"DenseMatrix, any":function(e,t){return l(e,t,i,!1)},"any, SparseMatrix":function(e,t){return o(t,e,i,!0)},"any, DenseMatrix":function(e,t){return l(t,e,i,!0)},"Array, any":function(e,t){return l(r(e),t,i,!1).valueOf()},"any, Array":function(e,t){return l(r(t),e,i,!0).valueOf()},"any, any":i,"any, any, ...any":t.referToSelf(e=>(t,r,n)=>{for(var i=e(t,r),a=0;a<n.length;a++)i=e(i,n[a]);return i})})}),sE="nthRoot",sN=ew(sE,["typed","matrix","equalScalar","BigNumber","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:i,concat:a}=e,s=sn({typed:t}),o=a4({typed:t,equalScalar:n}),l=sp({typed:t,equalScalar:n}),u=aj({typed:t,equalScalar:n}),c=se({typed:t,matrix:r,concat:a});function f(){throw Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(sE,{number:ap,"number, number":ap,BigNumber:e=>h(e,new i(2)),"BigNumber, BigNumber":h,Complex:f,"Complex, number":f,Array:t.referTo("DenseMatrix,number",e=>t=>e(r(t),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",e=>t=>e(t,2)),SparseMatrix:t.referTo("SparseMatrix,number",e=>t=>e(t,2)),"SparseMatrix, SparseMatrix":t.referToSelf(e=>(t,r)=>{if(1===r.density())return l(t,r,e);throw Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(e=>(t,r)=>{if(1===r.density())return s(t,r,e,!1);throw Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",e=>(t,n)=>e(r(t),n)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,r)=>{if(1===r.density())return u(r,t,e,!0);throw Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:o,Ss:u,sS:!1}));function h(e,t){var r=i.precision,n=i.clone({precision:r+2}),a=new i(0),s=new n(1),o=t.isNegative();if(o&&(t=t.neg()),t.isZero())throw Error("Root must be non-zero");if(e.isNegative()&&!t.abs().mod(2).equals(1))throw Error("Root must be odd when a is negative.");if(e.isZero())return o?new n(1/0):0;if(!e.isFinite())return o?a:e;var l=e.abs().pow(s.div(t));return l=e.isNeg()?l.neg():l,new i((o?s.div(l):l).toPrecision(r))}}),sS="sign",sM=ew(sS,["typed","BigNumber","Fraction","complex"],e=>{var{typed:t,BigNumber:r,complex:n,Fraction:i}=e;return t(sS,{number:am,Complex:function(e){return 0===e.im?n(am(e.re)):e.sign()},BigNumber:function(e){return new r(e.cmp(0))},bigint:function(e){return e>0n?1n:e<0n?-1n:0n},Fraction:function(e){return new i(0n===e.n?0:e.s)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),Unit:t.referToSelf(e=>r=>{if(!r._isDerived()&&0!==r.units[0].unit.offset)throw TypeError("sign is ambiguous for units with offset");return t.find(e,r.valueType())(r.value)})})}),sT=ew("sqrt",["config","typed","Complex"],e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:i,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():i(e.toNumber())},Unit:function(e){return e.pow(.5)}});function i(e){return isNaN(e)?NaN:e>=0||t.predictable?Math.sqrt(e):new n(e,0).sqrt()}}),sk="square",sF=ew(sk,["typed"],e=>{var{typed:t}=e;return t(sk,{number:ad,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},bigint:function(e){return e*e},Fraction:function(e){return e.mul(e)},Unit:function(e){return e.pow(2)}})}),sB="subtract",sP=ew(sB,["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:i,unaryMinus:a,DenseMatrix:s,concat:o}=e,l=sn({typed:t}),u=a6({typed:t}),c=a5({typed:t,equalScalar:n}),f=sa({typed:t,DenseMatrix:s}),h=aO({typed:t,DenseMatrix:s}),p=se({typed:t,matrix:r,concat:o});return t(sB,{"any, any":i},p({elop:i,SS:c,DS:l,SD:u,Ss:h,sS:f}))}),sj="xgcd",sO=ew(sj,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t(sj,{"number, number":function(e,t){var i=ag(e,t);return"Array"===r.matrix?i:n(i)},"BigNumber, BigNumber":a});function a(e,t){var a,s,o,l,u=new i(0),c=new i(1),f=u,h=c,p=c,m=u;if(!e.isInt()||!t.isInt())throw Error("Parameters in function xgcd must be integer numbers");for(;!t.isZero();)s=e.div(t).floor(),o=e.mod(t),a=f,f=h.minus(s.times(f)),h=a,a=p,p=m.minus(s.times(p)),m=a,e=t,t=o;return l=e.lt(u)?[e.neg(),h.neg(),m.neg()]:[e,e.isZero()?0:h,m],"Array"===r.matrix?l:n(l)}}),sI="invmod",sz=ew(sI,["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],e=>{var{typed:t,config:r,BigNumber:n,xgcd:i,equal:a,smaller:s,mod:o,add:l,isInteger:u}=e;return t(sI,{"number, number":c,"BigNumber, BigNumber":c});function c(e,t){if(!u(e)||!u(t))throw Error("Parameters in function invmod must be integer numbers");if(e=o(e,t),a(t,0))throw Error("Divisor must be non zero");var r=i(e,t),[c,f]=r=r.valueOf();return a(c,n(1))?(s(f=o(f,t),n(0))&&(f=l(f,t)),f):NaN}}),sL=ew("matAlgo09xS0Sf",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a,s,o,l,u,c,f=e._values,h=e._index,p=e._ptr,m=e._size,d=e._datatype||void 0===e._data?e._datatype:e.getDataType(),g=n._values,v=n._index,x=n._ptr,y=n._size,b=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(m.length!==y.length)throw new nx(m.length,y.length);if(m[0]!==y[0]||m[1]!==y[1])throw RangeError("Dimension mismatch. Matrix A ("+m+") must match Matrix B ("+y+")");var w=m[0],_=m[1],D=r,C=0,A=i;"string"==typeof d&&d===b&&"mixed"!==d&&(a=d,D=t.find(r,[a,a]),C=t.convert(0,a),A=t.find(i,[a,a]));var E=f&&g?[]:void 0,N=[],S=[],M=E?[]:void 0,T=[];for(o=0;o<_;o++){S[o]=N.length;var k=o+1;
1if(M)for(u=x[o],c=x[o+1],l=u;l<c;l++)T[s=v[l]]=k,M[s]=g[l];for(u=p[o],c=p[o+1],l=u;l<c;l++)if(s=h[l],M){var F=T[s]===k?M[s]:C,B=A(f[l],F);D(B,C)||(N.push(s),E.push(B))}else N.push(s)}return S[_]=N.length,e.createSparseMatrix({values:E,index:N,ptr:S,size:[w,_],datatype:d===e._datatype&&b===n._datatype?a:void 0})}}),sR="dotMultiply",sq=ew(sR,["typed","matrix","equalScalar","multiplyScalar","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:i,concat:a}=e,s=a4({typed:t,equalScalar:n}),o=sL({typed:t,equalScalar:n}),l=aj({typed:t,equalScalar:n}),u=se({typed:t,matrix:r,concat:a});return t(sR,u({elop:i,SS:o,DS:s,Ss:l}))});function sU(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return sW(e,t,function(e,t){return e&t})}function sH(e){if(e.isFinite()&&!e.isInteger())throw Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function sV(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:e.isFinite()&&t.isFinite()?sW(e,t,function(e,t){return e|t}):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e}function sW(e,t,r){var n,i,a,s,o,l=e.constructor,u=+(e.s<0),c=+(t.s<0);if(u){n=sG(sH(e));for(var f=0;f<n.length;++f)n[f]^=1}else n=sG(e);if(c){i=sG(sH(t));for(var h=0;h<i.length;++h)i[h]^=1}else i=sG(t);n.length<=i.length?(a=n,s=i,o=u):(a=i,s=n,o=c);var p=a.length,m=s.length,d=1^r(u,c),g=new l(1^d),v=new l(1),x=new l(2),y=l.precision;for(l.config({precision:1e9});p>0;)r(a[--p],s[--m])===d&&(g=g.plus(v)),v=v.times(x);for(;m>0;)r(o,s[--m])===d&&(g=g.plus(v)),v=v.times(x);return l.config({precision:y}),0===d&&(g.s=-g.s),g}function sG(e){for(var t=e.d,r=t[0]+"",n=1;n<t.length;++n){for(var i=t[n]+"",a=7-i.length;a--;)i="0"+i;r+=i}for(var s=r.length;"0"===r.charAt(s);)s--;var o=e.e,l=r.slice(0,s+1||1),u=l.length;if(o>0)if(++o>u)for(o-=u;o--;)l+="0";else o<u&&(l=l.slice(0,o)+"."+l.slice(o));for(var c=[0],f=0;f<l.length;){for(var h=c.length;h--;)c[h]*=10;c[0]+=parseInt(l.charAt(f++));for(var p=0;p<c.length;++p)c[p]>1&&((null===c[p+1]||void 0===c[p+1])&&(c[p+1]=0),c[p+1]+=c[p]>>1,c[p]&=1)}return c.reverse()}function s$(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?sH(t):t.eq(n)?sH(e):e.isFinite()&&t.isFinite()?sW(e,t,function(e,t){return e^t}):e.isFinite()||t.isFinite()?new r(e.isNegative()===t.isNegative()?1/0:-1/0):n}function sY(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t)):new r(NaN)}function sZ(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():new r(e.isNegative()?-1:e.isFinite()?0:NaN)}var sX="number",sJ="number, number";function sK(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function bitAnd");return e&t}function sQ(e){if(!eE(e))throw Error("Integer expected in function bitNot");return~e}function s0(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function bitOr");return e|t}function s1(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function bitXor");return e^t}function s2(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function leftShift");return e<<t}function s3(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function rightArithShift");return e>>t}function s4(e,t){if(!eE(e)||!eE(t))throw Error("Integers expected in function rightLogShift");return e>>>t}sK.signature=sJ,sQ.signature=sX,s0.signature=sJ,s1.signature=sJ,s2.signature=sJ,s3.signature=sJ,s4.signature=sJ;var s6="bitAnd",s5=ew(s6,["typed","matrix","equalScalar","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,concat:i}=e,a=a4({typed:t,equalScalar:n}),s=sp({typed:t,equalScalar:n}),o=aj({typed:t,equalScalar:n}),l=se({typed:t,matrix:r,concat:i});return t(s6,{"number, number":sK,"BigNumber, BigNumber":sU,"bigint, bigint":(e,t)=>e&t},l({SS:s,DS:a,Ss:o}))}),s8="bitNot",s9=ew(s8,["typed"],e=>{var{typed:t}=e;return t(s8,{number:sQ,BigNumber:sH,bigint:e=>~e,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),s7="bitOr",oe=ew(s7,["typed","matrix","equalScalar","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,s=sn({typed:t}),o=si({typed:t,equalScalar:n}),l=sa({typed:t,DenseMatrix:i}),u=se({typed:t,matrix:r,concat:a});return t(s7,{"number, number":s0,"BigNumber, BigNumber":sV,"bigint, bigint":(e,t)=>e|t},u({SS:o,DS:s,Ss:l}))}),ot=ew("matAlgo07xSSf",["typed","SparseMatrix"],e=>{var{typed:t,SparseMatrix:r}=e;return function(e,i,a){var s,o=e._size,l=e._datatype||void 0===e._data?e._datatype:e.getDataType(),u=i._size,c=i._datatype||void 0===i._data?i._datatype:i.getDataType();if(o.length!==u.length)throw new nx(o.length,u.length);if(o[0]!==u[0]||o[1]!==u[1])throw RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+u+")");var f=o[0],h=o[1],p=0,m=a;"string"==typeof l&&l===c&&"mixed"!==l&&(s=l,p=t.convert(0,s),m=t.find(a,[s,s]));for(var d=[],g=[],v=Array(h+1).fill(0),x=[],y=[],b=[],w=[],_=0;_<h;_++){var D=_+1,C=0;n(e,_,b,x,D),n(i,_,w,y,D);for(var A=0;A<f;A++){var E=m(b[A]===D?x[A]:p,w[A]===D?y[A]:p);0!==E&&!1!==E&&(g.push(A),d.push(E),C++)}v[_+1]=v[_]+C}return new r({values:d,index:g,ptr:v,size:[f,h],datatype:l===e._datatype&&c===i._datatype?s:void 0})};function n(e,t,r,n,i){for(var a=e._values,s=e._index,o=e._ptr,l=o[t],u=o[t+1];l<u;l++){var c=s[l];r[c]=i,n[c]=a[l]}}}),or="bitXor",on=ew(or,["typed","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:i,SparseMatrix:a}=e,s=a6({typed:t}),o=ot({typed:t,SparseMatrix:a}),l=aO({typed:t,DenseMatrix:n}),u=se({typed:t,matrix:r,concat:i});return t(or,{"number, number":s1,"BigNumber, BigNumber":s$,"bigint, bigint":(e,t)=>e^t},u({SS:o,DS:s,Ss:l}))}),oi="arg",oa=ew(oi,["typed"],e=>{var{typed:t}=e;return t(oi,{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),os="conj",oo=ew(os,["typed"],e=>{var{typed:t}=e;return t(os,{"number | BigNumber | Fraction":e=>e,Complex:e=>e.conjugate(),Unit:t.referToSelf(e=>t=>
1new t.constructor(e(t.toNumeric()),t.formatUnits())),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),ol="im",ou=ew(ol,["typed"],e=>{var{typed:t}=e;return t(ol,{number:()=>0,"BigNumber | Fraction":e=>e.mul(0),Complex:e=>e.im,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),oc="re",of=ew(oc,["typed"],e=>{var{typed:t}=e;return t(oc,{"number | BigNumber | Fraction":e=>e,Complex:e=>e.re,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),oh="number, number";function op(e){return!e}function om(e,t){return!!(e||t)}function od(e,t){return!!e!=!!t}function og(e,t){return!!(e&&t)}op.signature="number",om.signature=oh,od.signature=oh,og.signature=oh;var ov="not",ox=ew(ov,["typed"],e=>{var{typed:t}=e;return t(ov,{"null | undefined":()=>!0,number:op,Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},bigint:e=>!e,Unit:t.referToSelf(e=>r=>t.find(e,r.valueType())(r.value)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),oy="nullish",ob=ew(oy,["typed","matrix","size","flatten","deepEqual"],e=>{var{typed:t,matrix:r,size:n,flatten:i,deepEqual:a}=e,s=a6({typed:t}),o=aI({typed:t}),l=a8({typed:t});return t(oy,{"number|bigint|Complex|BigNumber|Fraction|Unit|string|boolean|SparseMatrix, any":(e,t)=>e,"null, any":(e,t)=>t,"undefined, any":(e,t)=>t,"SparseMatrix, Array | Matrix":(e,t)=>{var r=n(e),i=n(t);if(a(r,i))return e;throw new nx(r,i)},"DenseMatrix, DenseMatrix":t.referToSelf(e=>(t,r)=>l(t,r,e)),"DenseMatrix, SparseMatrix":t.referToSelf(e=>(t,r)=>s(t,r,e,!1)),"DenseMatrix, Array":t.referToSelf(e=>(t,n)=>l(t,r(n),e)),"DenseMatrix, any":t.referToSelf(e=>(t,r)=>o(t,r,e,!1)),"Array, Array":t.referToSelf(e=>(t,n)=>l(r(t),r(n),e).valueOf()),"Array, DenseMatrix":t.referToSelf(e=>(t,n)=>l(r(t),n,e)),"Array, SparseMatrix":t.referToSelf(e=>(t,n)=>s(r(t),n,e,!1)),"Array, any":t.referToSelf(e=>(t,n)=>o(r(t),n,e,!1).valueOf())})}),ow="or",o_=ew(ow,["typed","matrix","equalScalar","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,s=a6({typed:t}),o=a5({typed:t,equalScalar:n}),l=aO({typed:t,DenseMatrix:i}),u=se({typed:t,matrix:r,concat:a});return t(ow,{"number, number":om,"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"bigint, bigint":om,"Unit, Unit":t.referToSelf(e=>(t,r)=>e(t.value||0,r.value||0))},u({SS:o,DS:s,Ss:l}))}),oD="xor",oC=ew(oD,["typed","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:i,SparseMatrix:a}=e,s=a6({typed:t}),o=ot({typed:t,SparseMatrix:a}),l=aO({typed:t,DenseMatrix:n}),u=se({typed:t,matrix:r,concat:i});return t(oD,{"number, number":od,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)!=(0!==t.re||0!==t.im)},"bigint, bigint":od,"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!=(!t.isZero()&&!t.isNaN())},"Unit, Unit":t.referToSelf(e=>(t,r)=>e(t.value||0,r.value||0))},u({SS:o,DS:s,Ss:l}))}),oA="concat",oE=ew(oA,["typed","matrix","isInteger"],e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(oA,{"...Array | Matrix | number | BigNumber":function(e){var t,i,a=e.length,s=-1,o=!1,l=[];for(t=0;t<a;t++){var u=e[t];if(N(u)&&(o=!0),y(u)||b(u)){if(t!==a-1)throw Error("Dimension must be specified as last argument");if(i=s,!n(s=u.valueOf()))throw TypeError("Integer number expected for dimension");if(s<0||t>0&&s>i)throw new ny(s,i+1)}else{var c=ec(u).valueOf(),f=nb(c);if(l[t]=c,i=s,s=f.length-1,t>0&&s!==i)throw new nx(i+1,s+1)}}if(0===l.length)throw SyntaxError("At least one matrix expected");for(var h=l.shift();l.length;)h=nG(h,l.shift(),s);return o?r(h):h},"...string":function(e){return e.join("")}})}),oN="column",oS=ew(oN,["typed","Index","matrix","range"],e=>{var{typed:t,Index:r,matrix:n,range:i}=e;return t(oN,{"Matrix, number":a,"Array, number":function(e,t){return a(n(ec(e)),t).valueOf()}});function a(e,t){if(2!==e.size().length)throw Error("Only two dimensional matrix is supported");nC(t,e.size()[1]);var a=new r(i(0,e.size()[0]),[t]),s=e.subset(a);return N(s)?s:n([[s]])}}),oM="count",oT=ew(oM,["typed","size","prod"],e=>{var{typed:t,size:r,prod:n}=e;return t(oM,{string:function(e){return e.length},"Matrix | Array":function(e){return n(r(e))}})}),ok="cross",oF=ew(ok,["typed","matrix","subtract","multiply"],e=>{var{typed:t,matrix:r,subtract:n,multiply:i}=e;return t(ok,{"Matrix, Matrix":function(e,t){return r(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return r(a(e.toArray(),t))},"Array, Matrix":function(e,t){return r(a(e,t.toArray()))},"Array, Array":a});function a(e,t){var r=Math.max(nb(e).length,nb(t).length);e=nF(e),t=nF(t);var a=nb(e),s=nb(t);if(1!==a.length||1!==s.length||3!==a[0]||3!==s[0])throw RangeError("Vectors with length 3 expected (Size A = ["+a.join(", ")+"], B = ["+s.join(", ")+"])");var o=[n(i(e[1],t[2]),i(e[2],t[1])),n(i(e[2],t[0]),i(e[0],t[2])),n(i(e[0],t[1]),i(e[1],t[0]))];return r>1?[o]:o}}),oB="diag",oP=ew(oB,["typed","matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:i}=e;return t(oB,{Array:function(e){return a(e,0,nb(e),null)},"Array, number":function(e,t){return a(e,t,nb(e),null)},"Array, BigNumber":function(e,t){return a(e,t.toNumber(),nb(e),null)},"Array, string":function(e,t){return a(e,0,nb(e),t)},"Array, number, string":function(e,t,r){return a(e,t,nb(e),r)},"Array, BigNumber, string":function(e,t,r){return a(e,t.toNumber(),nb(e),r)},Matrix:function(e){return a(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return a(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return a(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return a(e,0,e.size(),t)},"Matrix, number, string":function(e,t,r){return a(e,t,e.size(),r)},"Matrix, BigNumber, string":function(e,t,r){return a(e,t.toNumber(),e.size(),r)}});function a(e,t,r,n){if(!eE(t))throw TypeError("Second parameter in function diag must be an integer");var i=t>0?t:0,a=t<0?-t:0;switch(r.length){case 1:return s(e,t,n,r[0],a,i);case 2:return o(e,t,n,r,a,i)}throw RangeError("Matrix for function diag must be 2 dimensional")}function s(e,t,r,a,s,o){var l=[a+s,a+o];if(r&&"sparse"!==r&&"dense"!==r)throw TypeError("Unknown matrix type ".concat(r,'"'));var u="sparse"===r?i.diagonal(l,e,t):n.diagonal(l,e,t);return null!==r?u:u.valueOf()}
1function o(e,t,n,i,a,s){if(N(e)){var o=e.diagonal(t);return null!==n?n!==o.storage()?r(o,n):o:o.valueOf()}for(var l=Math.min(i[0]-a,i[1]-s),u=[],c=0;c<l;c++)u[c]=e[c+a][c+s];return null!==n?r(u):u}}),oj=ew("filter",["typed"],e=>{var{typed:t}=e;return t("filter",{"Array, function":oO,"Matrix, function":function(e,t){return e.create(oO(e.valueOf(),t),e.datatype())},"Array, RegExp":nR,"Matrix, RegExp":function(e,t){return e.create(nR(e.valueOf(),t),e.datatype())}})});function oO(e,t){var r=n2(t,e,"filter");return r.isUnary?nL(e,r.fn):nL(e,function(e,t,n){return r.fn(e,[t],n)})}var oI="flatten",oz=ew(oI,["typed"],e=>{var{typed:t}=e;return t(oI,{Array:function(e){return nO(e)},DenseMatrix:function(e){return e.create(nO(e.valueOf(),!0),e.datatype())},SparseMatrix:function(e){throw TypeError("SparseMatrix is not supported by function flatten because it does not support 1D vectors. Convert to a DenseMatrix or Array first. Example: flatten(x.toArray())")}})}),oL="forEach",oR=ew(oL,["typed"],e=>{var{typed:t}=e;return t(oL,{"Array, function":oq,"Matrix, function":function(e,t){e.forEach(t)}})});function oq(e,t){var r=n2(t,e,oL);nQ(e,r.fn,r.isUnary)}var oU="getMatrixDataType",oH=ew(oU,["typed"],e=>{var{typed:t}=e;return t(oU,{Array:function(e){return nV(e,eu)},Matrix:function(e){return e.getDataType()}})}),oV="identity",oW=ew(oV,["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],e=>{var{typed:t,config:r,matrix:n,BigNumber:i,DenseMatrix:a,SparseMatrix:s}=e;return t(oV,{"":function(){return"Matrix"===r.matrix?n([]):[]},string:function(e){return n(e)},"number | BigNumber":function(e){return l(e,e,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber, string":function(e,t){return l(e,e,t)},"number | BigNumber, number | BigNumber":function(e,t){return l(e,t,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,r){return l(e,t,r)},Array:function(e){return o(e)},"Array, string":function(e,t){return o(e,t)},Matrix:function(e){return o(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return o(e.valueOf(),t)}});function o(e,t){switch(e.length){case 0:return t?n(t):[];case 1:return l(e[0],e[0],t);case 2:return l(e[0],e[1],t);default:throw Error("Vector containing two values expected")}}function l(e,t,r){var n=b(e)||b(t)?i:null;if(b(e)&&(e=e.toNumber()),b(t)&&(t=t.toNumber()),!eE(e)||e<1||!eE(t)||t<1)throw Error("Parameters in function identity must be positive integers");var o=n?new i(1):1,l=n?new n(0):0,u=[e,t];if(r){if("sparse"===r)return s.diagonal(u,o,0,l);if("dense"===r)return a.diagonal(u,o,0,l);throw TypeError('Unknown matrix type "'.concat(r,'"'))}for(var c=nE([],u,l),f=e<t?e:t,h=0;h<f;h++)c[h][h]=o;return c}}),oG="kron",o$=ew(oG,["typed","matrix","multiplyScalar"],e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(oG,{"Matrix, Matrix":function(e,t){return r(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return r(a(e.toArray(),t))},"Array, Matrix":function(e,t){return r(a(e,t.toArray()))},"Array, Array":a});function i(e,t){return e.flatMap(e=>t.map(t=>n(e,t)))}function a(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(r<0){var n=nb(e).length,s=nb(t).length;for(r=Math.max(n,s);n++<r;)e=[e];for(;s++<r;)t=[t]}return 1===r?i(e,t):e.flatMap(e=>t.map(t=>a(e,t,r-1)))}}),oY="map",oZ=ew(oY,["typed"],e=>{var{typed:t}=e;return t(oY,{"Array, function":o,"Matrix, function":function(e,t){return e.map(t)},"Array|Matrix, Array|Matrix, ...Array|Matrix|function":(e,t,n)=>r([e,t,...n.slice(0,n.length-1)],n[n.length-1])});function r(e,r){if("function"!=typeof r)throw Error("Last argument must be a callback function");var l=e[0].isMatrix,u=e.map(e=>e.isMatrix?e.size():nb(e)),c=n$(...u),f=e.length,h=l?(e,t)=>e.get(t):nJ,p=e.map((e,t)=>{var r=u[t].map(()=>0);return e.isMatrix?e.get(r):nJ(e,r)}),m=t.isTypedFunction(r)?s(r,p,c.map(()=>0),e):a(r,f);if(m<2)return n(e,i(m,r,null));var d=l?e.map(t=>t.isMatrix?t.create(nZ(t.toArray(),c),t.datatype()):e[0].create(nZ(t.valueOf(),c))):e.map(e=>e.isMatrix?nZ(e.toArray(),c):nZ(e,c)),g=i(m,r,d),v=(e,t)=>g([e,...d.slice(1).map(e=>h(e,t))],t);return l?d[0].map(v):o(d[0],v)}function n(e,t){var r=e[0],n=e.map(e=>e.isMatrix?e.valueOf():e),i=e.map(e=>e.isMatrix?e.size():nb(e)),a=n$(...i),s=i.map(e=>a.length-e.length),o=a.length-1,l=t.length>1?[]:null,u=f(n,0);if(!r.isMatrix)return u;var c=r.create();return c._data=u,c._size=a,c;function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a[r],i=Array(n);if(r<o)for(var u=function(t){l&&(l[r]=t),i[t]=f(e.map((e,n)=>s[n]>r?e:1===e.length?e[0]:e[t]),r+1)},c=0;c<n;c++)u(c);else for(var h=function(n){l&&(l[r]=n),i[n]=t(e.map(e=>1===e.length?e[0]:e[n]),l?l.slice():void 0)},p=0;p<n;p++)h(p);return i}}function i(e,t,r){switch(e){case 0:return e=>t(...e);case 1:return(e,r)=>t(...e,r);case 2:return(e,n)=>t(...e,n,...r)}}function a(e,t){var r=e.toString();if(/arguments/.test(r))return 2;var n=r.match(/\(.*?\)/);return/\.\.\./.test(n)||e.length>t+1?2:+(e.length===t+1)}
1function s(e,r,n,i){return null!==t.resolve(e,[...r,n,...i])?2:null!==t.resolve(e,[...r,n])?1:(t.resolve(e,r),0)}function o(e,t){var r=n2(t,e,oY);return nK(e,r.fn,r.isUnary)}}),oX="diff",oJ=ew(oX,["typed","matrix","subtract","number"],e=>{var{typed:t,matrix:r,subtract:n,number:i}=e;return t(oX,{"Array | Matrix":function(e){return N(e)?r(s(e.toArray())):s(e)},"Array | Matrix, number":function(e,t){if(!eE(t))throw RangeError("Dimension must be a whole number");return N(e)?r(a(e.toArray(),t)):a(e,t)},"Array, BigNumber":t.referTo("Array,number",e=>(t,r)=>e(t,i(r))),"Matrix, BigNumber":t.referTo("Matrix,number",e=>(t,r)=>e(t,i(r)))});function a(e,t){if(N(e)&&(e=e.toArray()),!Array.isArray(e))throw RangeError("Array/Matrix does not have that many dimensions");if(t>0){var r=[];return e.forEach(e=>{r.push(a(e,t-1))}),r}if(0===t)return s(e);throw RangeError("Cannot have negative dimension")}function s(e){for(var t=[],r=e.length,n=1;n<r;n++)t.push(o(e[n-1],e[n]));return t}function o(e,t){N(e)&&(e=e.toArray()),N(t)&&(t=t.toArray());var r=Array.isArray(e),i=Array.isArray(t);if(r&&i)return l(e,t);if(!r&&!i)return n(t,e);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function l(e,t){if(e.length!==t.length)throw RangeError("Not all sub-arrays have the same length");for(var r=[],n=e.length,i=0;i<n;i++)r.push(o(e[i],t[i]));return r}}),oK=ew("ones",["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t("ones",{"":function(){return"Array"===r.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return a(e,t)}return"Array"===r.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var r=s(e)?new i(1):1;if(o(e),t){var a=n(t);return e.length>0?a.resize(e,r):a}var l=[];return e.length>0?nE(l,e,r):l}function s(e){var t=!1;return e.forEach(function(e,r,n){b(e)&&(t=!0,n[r]=e.toNumber())}),t}function o(e){e.forEach(function(e){if("number"!=typeof e||!eE(e)||e<0)throw Error("Parameters in function ones must be positive integers")})}});function oQ(){throw Error('No "bignumber" implementation available')}function o0(){throw Error('No "fraction" implementation available')}function o1(){throw Error('No "matrix" implementation available')}var o2="range",o3=ew(o2,["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],e=>{var{typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:s,larger:o,largerEq:l,add:u,isZero:c,isPositive:f}=e;return t(o2,{string:p,"string, boolean":p,number:function(e){throw TypeError("Too few arguments to function range(): ".concat(e))},boolean:function(e){throw TypeError("Unexpected type of argument 1 to function range(): ".concat(e,", number|bigint|BigNumber|Fraction"))},"number, number":function(e,t){return h(m(e,t,1,!1))},"number, number, number":function(e,t,r){return h(m(e,t,r,!1))},"number, number, boolean":function(e,t,r){return h(m(e,t,1,r))},"number, number, number, boolean":function(e,t,r,n){return h(m(e,t,r,n))},"bigint, bigint|number":function(e,t){return h(m(e,t,1n,!1))},"number, bigint":function(e,t){return h(m(BigInt(e),t,1n,!1))},"bigint, bigint|number, bigint|number":function(e,t,r){return h(m(e,t,BigInt(r),!1))},"number, bigint, bigint|number":function(e,t,r){return h(m(BigInt(e),t,BigInt(r),!1))},"bigint, bigint|number, boolean":function(e,t,r){return h(m(e,t,1n,r))},"number, bigint, boolean":function(e,t,r){return h(m(BigInt(e),t,1n,r))},"bigint, bigint|number, bigint|number, boolean":function(e,t,r,n){return h(m(e,t,BigInt(r),n))},"number, bigint, bigint|number, boolean":function(e,t,r,n){return h(m(BigInt(e),t,BigInt(r),n))},"BigNumber, BigNumber":function(e,t){var r=e.constructor;return h(m(e,t,new r(1),!1))},"BigNumber, BigNumber, BigNumber":function(e,t,r){return h(m(e,t,r,!1))},"BigNumber, BigNumber, boolean":function(e,t,r){var n=e.constructor;return h(m(e,t,new n(1),r))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,r,n){return h(m(e,t,r,n))},"Fraction, Fraction":function(e,t){return h(m(e,t,1,!1))},"Fraction, Fraction, Fraction":function(e,t,r){return h(m(e,t,r,!1))},"Fraction, Fraction, boolean":function(e,t,r){return h(m(e,t,1,r))},"Fraction, Fraction, Fraction, boolean":function(e,t,r,n){return h(m(e,t,r,n))},"Unit, Unit, Unit":function(e,t,r){return h(m(e,t,r,!1))},"Unit, Unit, Unit, boolean":function(e,t,r,n){return h(m(e,t,r,n))}});function h(e){return"Matrix"===r.matrix?n?n(e):o1():e}function p(e,t){var n=d(e);if(!n)throw SyntaxError('String "'+e+'" is no valid range');return"BigNumber"===r.number?(void 0===i&&oQ(),h(m(i(n.start),i(n.end),i(n.step)),t)):h(m(n.start,n.end,n.step,t))}function m(e,t,r,n){var i=[];if(c(r))throw Error("Step must be non-zero");for(var h=f(r)?n?s:a:n?l:o,p=e;h(p,t);)i.push(p),p=u(p,r);return i}function d(e){var t=e.split(":").map(function(e){return Number(e)});if(t.some(function(e){return isNaN(e)}))return null;switch(t.length){case 2:return{start:t[0],end:t[1],step:1};case 3:return{start:t[0],end:t[2],step:t[1]};default:return null}}}),o4="reshape",o6=ew(o4,["typed","isInteger","matrix"],e=>{var{typed:t,isInteger:r}=e;return t(o4,{"Matrix, Array":function(e,t){return e.reshape(t,!0)},"Array, Array":function(e,t){return t.forEach(function(e){if(!r(e))throw TypeError("Invalid size for dimension: "+e)}),nS(e,t)}})}),o5=ew("resize",["config","matrix"],e=>{var{config:t,matrix:r}=e;return function(e,i,a){if(2!=arguments.length&&3!=arguments.length)throw new ss("resize",arguments.length,2,3);if(N(i)&&(i=i.valueOf()),b(i[0])&&(i=i.map(function(e){return b(e)?e.toNumber():e})),N(e))return e.resize(i,a,!0);if("string"==typeof e)return n(e,i,a);var s=!Array.isArray(e)&&"Array"!==t.matrix;if(0===i.length){for(;Array.isArray(e);)e=e[0];return ec(e)}Array.isArray(e)||(e=[e]);var o=nE(e=ec(e),i,a);return s?r(o):o};function n(e,t,r){if(void 0!==r){if("string"!=typeof r||1!==r.length)throw TypeError("Single character expected as defaultValue")}else r=" ";if(1!==t.length)throw new nx(t.length,1);var n=t[0];if("number"!=typeof n||!eE(n))throw TypeError("Invalid size, must contain positive integers (size: "+nc(t)+")");if(e.length>n)return e.substring(0,n);if(!(e.length<n))return e;for(var i=e,a=0,s=n-e.length;a<s;a++)i+=r;return i}}),o8="rotate",o9=ew(o8,["typed","multiply","rotationMatrix"],e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(o8,{"Array , number | BigNumber | Complex | Unit":function(e,t){return i(e,2),r(n(t),e).toArray()},"Matrix , number | BigNumber | Complex | Unit":function(e,t){return i(e,2),r(n(t),e)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){return i(e,3),r(n(t,a),e)},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){return i(e,3),r(n(t,a),e)}});function i(e,t){var r=Array.isArray(e)?nb(e):e.size();if(r.length>2||2===r.length&&1!==r[1]||r[0]!==t)throw RangeError("Vector must be of dimensions 1x".concat(t))}}),o7="rotationMatrix",le=ew(o7,["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:i,unaryMinus:a,norm:s,BigNumber:o,matrix:l,DenseMatrix:u,SparseMatrix:c,cos:f,sin:h}=e;return t(o7,{"":function(){return"Matrix"===r.matrix?l([]):[]},string:function(e){return l(e)},"number | BigNumber | Complex | Unit":function(e){return p(e,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(e,t){return p(e,t)},"number | BigNumber | Complex | Unit, Array":function(e,t){var r=l(t);return m(r),v(e,r,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(e,t){m(t);var n=t.storage()||("Matrix"===r.matrix?"dense":void 0);return v(e,t,n)},"number | BigNumber | Complex | Unit, Array, string":function(e,t,r){var n=l(t);return m(n),v(e,n,r)},"number | BigNumber | Complex | Unit, Matrix, string":function(e,t,r){return m(t),v(e,t,r)}});function p(e,t){var r=b(e)?new o(-1):-1,i=f(e),a=h(e);return g([[i,n(r,a)],[a,i]],t)}function m(e){var t=e.size();if(t.length<1||3!==t[0])throw RangeError("Vector must be of dimensions 1x3")}function d(e){return e.reduce((e,t)=>
1n(e,t))}function g(e,t){if(t){if("sparse"===t)return new c(e);if("dense"===t)return new u(e);throw TypeError('Unknown matrix type "'.concat(t,'"'))}return e}function v(e,t,r){var n=s(t);if(0===n)throw RangeError("Rotation around zero vector");var l=b(e)?o:null,u=l?new l(1):1,c=l?new l(-1):-1,p=l?new l(t.get([0])/n):t.get([0])/n,m=l?new l(t.get([1])/n):t.get([1])/n,v=l?new l(t.get([2])/n):t.get([2])/n,x=f(e),y=i(u,a(x)),w=h(e);return g([[i(x,d([p,p,y])),i(d([p,m,y]),d([c,v,w])),i(d([p,v,y]),d([m,w]))],[i(d([p,m,y]),d([v,w])),i(x,d([m,m,y])),i(d([m,v,y]),d([c,p,w]))],[i(d([p,v,y]),d([c,m,w])),i(d([m,v,y]),d([p,w])),i(x,d([v,v,y]))]],r)}}),lt="row",lr=ew(lt,["typed","Index","matrix","range"],e=>{var{typed:t,Index:r,matrix:n,range:i}=e;return t(lt,{"Matrix, number":a,"Array, number":function(e,t){return a(n(ec(e)),t).valueOf()}});function a(e,t){if(2!==e.size().length)throw Error("Only two dimensional matrix is supported");nC(t,e.size()[0]);var a=new r([t],i(0,e.size()[1])),s=e.subset(a);return N(s)?s:n([[s]])}}),ln="size",li=ew(ln,["typed"],e=>{var{typed:t}=e;return t(ln,{Matrix:e=>e.size(),Array:nb,string:e=>[e.length],"number | Complex | BigNumber | Unit | boolean | null":e=>[]})}),la="squeeze",ls=ew(la,["typed"],e=>{var{typed:t}=e;return t(la,{Array:function(e){return nF(ec(e))},Matrix:function(e){var t=nF(e.toArray());return Array.isArray(t)?e.create(t,e.datatype()):t},any:function(e){return ec(e)}})}),lo="subset",ll=ew(lo,["typed","matrix","zeros","add"],e=>{var{typed:t,matrix:r,zeros:n,add:i}=e;return t(lo,{"Matrix, Index":function(e,t){return nA(t)?r():(nD(e,t),e.subset(t))},"Array, Index":t.referTo("Matrix, Index",function(e){return function(t,n){var i=e(r(t),n);return n.isScalar()?i:i.valueOf()}}),"Object, Index":lf,"string, Index":lu,"Matrix, Index, any, any":function(e,t,r,n){return nA(t)?e:(nD(e,t),e.clone().subset(t,a(r,t),n))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(e){return function(t,n,i,a){var s=e(r(t),n,i,a);return s.isMatrix?s.valueOf():s}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(e){return function(t,n,i){return e(r(t),n,i,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(e){return function(t,r,n){return e(t,r,n,void 0)}}),"string, Index, string":lc,"string, Index, string, string":lc,"Object, Index, any":lh});function a(e,t){if("string"==typeof e)throw Error("can't boradcast a string");if(t.isScalar())return e;var r=t.size();if(!r.every(e=>e>0))return e;try{return i(e,n(r))}catch(t){return e}}});function lu(e,t){if(!F(t))throw TypeError("Index expected");if(nA(t))return"";if(nD(Array.from(e),t),1!==t.size().length)throw new nx(t.size().length,1);var r=e.length;nC(t.min()[0],r),nC(t.max()[0],r);var n=t.dimension(0),i="";function a(t){i+=e.charAt(t)}return Number.isInteger(n)?a(n):n.forEach(a),i}function lc(e,t,r,n){if(!t||!0!==t.isIndex)throw TypeError("Index expected");if(nA(t))return e;if(nD(Array.from(e),t),1!==t.size().length)throw new nx(t.size().length,1);if(void 0!==n){if("string"!=typeof n||1!==n.length)throw TypeError("Single character expected as defaultValue")}else n=" ";var i=t.dimension(0);if((Number.isInteger(i)?1:i.size()[0])!==r.length)throw new nx(i.size()[0],r.length);var a=e.length;nC(t.min()[0]),nC(t.max()[0]);for(var s=[],o=0;o<a;o++)s[o]=e.charAt(o);function l(e,t){s[e]=r.charAt(t[0])}if(Number.isInteger(i)?l(i,[0]):i.forEach(l),s.length>a)for(var u=a-1,c=s.length;u<c;u++)s[u]||(s[u]=n);return s.join("")}function lf(e,t){if(!nA(t)){if(1!==t.size().length)throw new nx(t.size(),1);var r=t.dimension(0);if("string"!=typeof r)throw TypeError("String expected as index to retrieve an object property");return i(e,r)}}function lh(e,t,r){if(nA(t))return e;if(1!==t.size().length)throw new nx(t.size(),1);var n=t.dimension(0);if("string"!=typeof n)throw TypeError("String expected as index to retrieve an object property");var i=ec(e);return a(i,n,r),i}var lp="transpose",lm=ew(lp,["typed","matrix"],e=>{var{typed:t,matrix:r}=e;return t(lp,{Array:e=>n(r(e)).valueOf(),Matrix:n,any:ec});function n(e){var t,r=e.size();switch(r.length){case 1:t=e.clone();break;case 2:var n=r[0],s=r[1];if(0===s)throw RangeError("Cannot transpose a 2D matrix with no columns (size: "+nc(r)+")");switch(e.storage()){case"dense":t=i(e,n,s);break;case"sparse":t=a(e,n,s)}break;default:throw RangeError("Matrix must be a vector or two dimensional (size: "+nc(r)+")")}return t}function i(e,t,r){for(var n,i=e._data,a=[],s=0;s<r;s++){n=a[s]=[];for(var o=0;o<t;o++)n[o]=ec(i[o][s])}return e.createDenseMatrix({data:a,size:[r,t],datatype:e._datatype})}function a(e,t,r){for(var n,i,a,s=e._values,o=e._index,l=e._ptr,u=s?[]:void 0,c=[],f=[],h=[],p=0;p<t;p++)h[p]=0;for(n=0,i=o.length;n<i;n++)h[o[n]]++;for(var m=0,d=0;d<t;d++)f.push(m),m+=h[d],h[d]=f[d];for(f.push(m),a=0;a<r;a++)for(var g=l[a],v=l[a+1],x=g;x<v;x++){var y=h[o[x]]++;c[y]=a,s&&(u[y]=ec(s[x]))}return e.createSparseMatrix({values:u,index:c,ptr:f,size:[r,t],datatype:e._datatype})}}),ld="ctranspose",lg=ew(ld,["typed","transpose","conj"],e=>{var{typed:t,transpose:r,conj:n}=e;return t(ld,{any:function(e){return n(r(e))}})}),lv="zeros",lx=ew(lv,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t(lv,{"":function(){return"Array"===r.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return a(e,t)}return"Array"===r.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var r=s(e)?new i(0):0;if(o(e),t){var a=n(t);return e.length>0?a.resize(e,r):a}var l=[];return e.length>0?nE(l,e,r):l}function s(e){var t=!1;return e.forEach(function(e,r,n){b(e)&&(t=!0,n[r]=e.toNumber())}),t}function o(e){e.forEach(function(e){if("number"!=typeof e||!eE(e)||e<0)throw Error("Parameters in function zeros must be positive integers")})}}),ly="fft",lb=ew(ly,["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:i,divideScalar:a,exp:s,tau:o,i:l,dotDivide:u,conj:c,pow:f,ceil:h,log2:p}=e;return t(ly,{Array:m,Matrix:function(e){return e.create(m(e.valueOf()),e.datatype())}});function m(e){var t=nb(e);return 1===t.length?v(e,t[0]):d(e.map(e=>m(e,t.slice(1))),0)}function d(e,t){var r=nb(e);if(0!==t)return Array(r[0]).fill(0).map((r,n)=>d(e[n],t-1));if(1===r.length)return v(e);function n(e){var t=nb(e);return Array(t[1]).fill(0).map((r,n)=>Array(t[0]).fill(0).map((t,r)=>e[r][n]))}return n(d(n(e),1))}function g(e){for(var t=e.length,r=s(a(i(-1,i(l,o)),t)),n=[],d=1-t;d<t;d++)n.push(f(r,a(f(d,2),2)));for(var g=f(2,h(p(t+t-1))),x=[...Array(t).fill(0).map((r,a)=>i(e[a],n[t-1+a])),...Array(g-t).fill(0)],y=[...Array(t+t-1).fill(0).map((e,t)=>a(1,n[t])),...Array(g-(t+t-1)).fill(0)],b=v(x),w=v(y),_=u(c(m(c(Array(g).fill(0).map((e,t)=>i(b[t],w[t]))))),g),D=[],C=t-1;C<t+t-1;C++)D.push(i(_[C],n[C]));return D}function v(e){var t=e.length;if(1===t)return[e[0]];if(t%2!=0)return g(e);for(var r=[...v(e.filter((e,t)=>
1t%2==0),t/2),...v(e.filter((e,t)=>t%2==1),t/2)],u=0;u<t/2;u++){var c=r[u],f=i(r[u+t/2],s(i(i(o,l),a(-u,t))));r[u]=n(c,f),r[u+t/2]=n(c,i(-1,f))}return r}}),lw="ifft",l_=ew(lw,["typed","fft","dotDivide","conj"],e=>{var{typed:t,fft:r,dotDivide:n,conj:i}=e;return t(lw,{"Array | Matrix":function(e){var t=N(e)?e.size():nb(e);return n(i(r(i(e))),t.reduce((e,t)=>e*t,1))}})});function lD(e){return(lD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lC(e,t){if("object"!=lD(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lD(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function lA(e){var t=lC(e,"string");return"symbol"==lD(t)?t:t+""}function lE(e,t,r){return(t=lA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function lS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lN(Object(r),!0).forEach(function(t){lE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var lM=ew("solveODE",["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,max:s,map:o,abs:l,isPositive:u,isNegative:c,larger:f,smaller:h,matrix:p,bignumber:m,unaryMinus:d}=e;function g(e){return function(t,p,g,v){if(!(2===p.length&&(p.every(A)||p.every(C))))throw Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var x=p[0],y=p[1],w=f(y,x),E=v.firstStep;if(void 0!==E&&!u(E))throw Error('"firstStep" must be positive');var N=v.maxStep;if(void 0!==N&&!u(N))throw Error('"maxStep" must be positive');var S=v.minStep;if(S&&c(S))throw Error('"minStep" must be positive or zero');var M=[x,y,E,S,N].filter(e=>void 0!==e);if(!(M.every(A)||M.every(C)))throw Error('Inconsistent type of "t" dependant variables');for(var T=1,k=v.tol?v.tol:1e-4,F=v.minDelta?v.minDelta:.2,B=v.maxDelta?v.maxDelta:5,P=v.maxIter?v.maxIter:1e4,j=[x,y,...g,N,S].some(b),[O,I,z,L]=j?[m(e.a),m(e.c),m(e.b),m(e.bp)]:[e.a,e.c,e.b,e.bp],R=E?w?E:d(E):a(n(y,x),T),q=[x],U=[g],H=n(z,L),V=0,W=0,G=_(w),$=D(w);G(q[V],y);){var Y=[];R=$(q[V],y,R),Y.push(t(q[V],U[V]));for(var Z=1;Z<I.length;++Z)Y.push(t(r(q[V],i(I[Z],R)),r(U[V],i(R,O[Z],Y))));var X=s(l(o(i(H,Y),e=>C(e)?e.value:e)));X<k&&k/X>1/4&&(q.push(r(q[V],R)),U.push(r(U[V],i(R,z,Y))),V++);var J=.84*(k/X)**.2;if(h(J,F)?J=F:f(J,B)&&(J=B),R=i(R,J=j?m(J):J),N&&f(l(R),N)?R=w?N:d(N):S&&h(l(R),S)&&(R=w?S:d(S)),++W>P)throw Error("Maximum number of iterations reached, try changing options")}return{t:q,y:U}}}function v(e,t,r,n){return g({a:[[],[.5],[0,3/4],[2/9,1/3,4/9]],c:[null,.5,3/4,1],b:[2/9,1/3,4/9,0],bp:[7/24,1/4,1/3,1/8]})(e,t,r,n)}function x(e,t,r,n){return g({a:[[],[.2],[3/40,9/40],[44/45,-56/15,32/9],[19372/6561,-25360/2187,64448/6561,-212/729],[9017/3168,-355/33,46732/5247,49/176,-5103/18656],[35/384,0,500/1113,125/192,-2187/6784,11/84]],c:[null,.2,.3,.8,8/9,1,1],b:[35/384,0,500/1113,125/192,-2187/6784,11/84,0],bp:[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40]})(e,t,r,n)}function w(e,t,r,n){var i=n.method?n.method:"RK45",a={RK23:v,RK45:x};if(i.toUpperCase()in a){var s=lS({},n);return delete s.method,a[i.toUpperCase()](e,t,r,s)}var o=Object.keys(a).map(e=>'"'.concat(e,'"')),l="".concat(o.slice(0,-1).join(", ")," and ").concat(o.slice(-1));throw Error('Unavailable method "'.concat(i,'". Available methods are ').concat(l))}function _(e){return e?h:f}function D(e){var t=e?f:h;return function(e,i,a){return t(r(e,a),i)?n(i,e):a}}function A(e){return b(e)||y(e)}function E(e,t,r,n){var i=w(e,t.toArray(),r.toArray(),n);return{t:p(i.t),y:p(i.y)}}return t("solveODE",{"function, Array, Array, Object":w,"function, Matrix, Matrix, Object":E,"function, Array, Array":(e,t,r)=>w(e,t,r,{}),"function, Matrix, Matrix":(e,t,r)=>E(e,t,r,{}),"function, Array, number | BigNumber | Unit":(e,t,r)=>{var n=w(e,t,[r],{});return{t:n.t,y:n.y.map(e=>e[0])}},"function, Matrix, number | BigNumber | Unit":(e,t,r)=>{var n=w(e,t.toArray(),[r],{});return{t:p(n.t),y:p(n.y.map(e=>e[0]))}},"function, Array, number | BigNumber | Unit, Object":(e,t,r,n)=>{var i=w(e,t,[r],n);return{t:i.t,y:i.y.map(e=>e[0])}},"function, Matrix, number | BigNumber | Unit, Object":(e,t,r,n)=>{var i=w(e,t.toArray(),[r],n);return{t:p(i.t),y:p(i.y.map(e=>e[0]))}}})}),lT=ew("erf",["typed"],e=>{var{typed:t}=e;return t("name",{number:function(e){var t=Math.abs(e);return t>=lj?eS(e):t<=lk?eS(e)*r(t):t<=4?eS(e)*(1-n(t)):eS(e)*(1-i(t))},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))});function r(e){var t,r=e*e,n=lB[0][4]*r,i=r;for(t=0;t<3;t+=1)n=(n+lB[0][t])*r,i=(i+lP[0][t])*r;return e*(n+lB[0][3])/(i+lP[0][3])}function n(e){var t,r=lB[1][8]*e,n=e;for(t=0;t<7;t+=1)r=(r+lB[1][t])*e,n=(n+lP[1][t])*e;var i=(r+lB[1][7])/(n+lP[1][7]),a=parseInt(16*e)/16,s=(e-a)*(e+a);return Math.exp(-a*a)*Math.exp(-s)*i}function i(e){var t,r=1/(e*e),n=lB[2][5]*r,i=r;for(t=0;t<4;t+=1)n=(n+lB[2][t])*r,i=(i+lP[2][t])*r;var a=r*(n+lB[2][4])/(i+lP[2][4]);a=(lF-a)/e,r=parseInt(16*e)/16;var s=(e-r)*(e+r);return Math.exp(-r*r)*Math.exp(-s)*a}}),lk=.46875,lF=.5641895835477563,lB=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,6587491615298378e-19,.016315387137302097]],lP=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],lj=0x20000000000000,lO="zeta",lI=ew(lO,["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isBounded","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],e=>{var{typed:t,config:r,multiply:n,pow:i,divide:a,factorial:s,equal:o,smallerEq:l,isBounded:u,isNegative:c,gamma:f,sin:h,subtract:p,add:m,Complex:d,BigNumber:g,pi:v}=e;return t(lO,{number:e=>x(e,e=>e,()=>20),BigNumber:e=>x(e,e=>new g(e),()=>Math.abs(Math.log10(r.relTol))),Complex:y});function x(e,t,r){return o(e,0)?t(-.5):o(e,1)?t(NaN):u(e)?b(e,t,r,e=>e):t(c(e)?NaN:1)}function y(e){return 0===e.re&&0===e.im?new d(-.5):1===e.re?new d(NaN,NaN):e.re===1/0&&0===e.im?new d(1):e.im===1/0||e.re===-1/0?new d(NaN,NaN):b(e,e=>e,e=>Math.round(19.5+.9*Math.abs(e.im)),e=>e.re)}function b(e,t,r,s){var o=r(e);
1if(s(e)>-(o-1)/2)return _(e,t(o),t);var l=n(i(2,e),i(t(v),p(e,1)));return l=n(l,h(n(a(t(v),2),e))),l=n(l,f(p(1,e))),n(l,b(p(1,e),t,r,s))}function w(e,t){for(var r=e,o=e;l(o,t);o=m(o,1)){var u=a(n(s(m(t,p(o,1))),i(4,o)),n(s(p(t,o)),s(n(2,o))));r=m(r,u)}return n(t,r)}function _(e,t,r){for(var s=a(1,n(w(r(0),t),p(1,i(2,p(1,e))))),o=r(0),u=r(1);l(u,t);u=m(u,1))o=m(o,a(n((-1)**(u-1),w(u,t)),i(u,e)));return n(s,o)}}),lz="mode",lL=ew(lz,["typed","isNaN","isNumeric"],e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(lz,{"Array | Matrix":i,"...":function(e){return i(e)}});function i(e){if(0===(e=nO(e.valueOf())).length)throw Error("Cannot calculate mode of an empty array");for(var t={},i=[],a=0,s=0;s<e.length;s++){var o=e[s];if(n(o)&&r(o))throw Error("Cannot calculate mode of an array containing NaN values");o in t||(t[o]=0),t[o]++,t[o]===a?i.push(o):t[o]>a&&(a=t[o],i=[o])}return i}});function lR(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+eu(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+eu(r)+", value: "+JSON.stringify(r)+")":"",TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var lq="prod",lU=ew(lq,["typed","config","multiplyScalar","numeric"],e=>{var{typed:t,config:r,multiplyScalar:n,numeric:i}=e;return t(lq,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){throw Error("prod(A, dim) is not yet supported")},"...":function(e){return a(e)}});function a(e){var t;if(ii(e,function(e){try{t=void 0===t?e:n(t,e)}catch(t){throw lR(t,"prod",e)}}),"string"==typeof t&&(t=i(t,eN(t,r))),void 0===t)throw Error("Cannot calculate prod of an empty array");return t}}),lH="format",lV=ew(lH,["typed"],e=>{var{typed:t}=e;return t(lH,{any:nc,"any, Object | function | number | BigNumber":nc})}),lW="bin",lG=ew(lW,["typed","format"],e=>{var{typed:t,format:r}=e;return t(lW,{"number | BigNumber":function(e){return r(e,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(e,t){return r(e,{notation:"bin",wordSize:t})}})}),l$="oct",lY=ew(l$,["typed","format"],e=>{var{typed:t,format:r}=e;return t(l$,{"number | BigNumber":function(e){return r(e,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(e,t){return r(e,{notation:"oct",wordSize:t})}})}),lZ="hex",lX=ew(lZ,["typed","format"],e=>{var{typed:t,format:r}=e;return t(lZ,{"number | BigNumber":function(e){return r(e,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(e,t){return r(e,{notation:"hex",wordSize:t})}})}),lJ=/\$([\w.]+)/g,lK="print",lQ=ew(lK,["typed"],e=>{var{typed:t}=e;return t(lK,{"string, Object | Array":l0,"string, Object | Array, number | Object":l0})});function l0(e,t,r){return e.replace(lJ,function(e,n){var i=n.split("."),a=t[i.shift()];for(void 0!==a&&a.isMatrix&&(a=a.toArray());i.length&&void 0!==a;){var s=i.shift();a=s?a[s]:a+"."}if(void 0!==a)if(!A(a))return nc(a,r);else return a;return e})}var l1="to",l2=ew(l1,["typed","matrix","concat"],e=>{var{typed:t,matrix:r,concat:n}=e,i=se({typed:t,matrix:r,concat:n});return t(l1,{"Unit, Unit | string":(e,t)=>e.to(t)},i({Ds:!0}))}),l3="toBest",l4=ew(l3,["typed"],e=>{var{typed:t}=e;return t(l3,{Unit:e=>e.toBest(),"Unit, string":(e,t)=>e.toBest(t.split(",")),"Unit, string, Object":(e,t,r)=>e.toBest(t.split(","),r),"Unit, Array":(e,t)=>e.toBest(t),"Unit, Array, Object":(e,t,r)=>e.toBest(t,r)})}),l6="isPrime",l5=ew(l6,["typed"],e=>{var{typed:t}=e;return t(l6,{number:function(e){if(e<=3)return e>1;if(e%2==0||e%3==0)return!1;for(var t=5;t*t<=e;t+=6)if(e%t==0||e%(t+2)==0)return!1;return!0},bigint:function(e){if(e<=3n)return e>1n;if(e%2n===0n||e%3n===0n)return!1;for(var t=5n;t*t<=e;t+=6n)if(e%t===0n||e%(t+2n)===0n)return!1;return!0},BigNumber:function(e){if(e.lte(3))return e.gt(1);if(e.mod(2).eq(0)||e.mod(3).eq(0))return!1;if(e.lt(0x100000000)){for(var t=e.toNumber(),r=5;r*r<=t;r+=6)if(t%r==0||t%(r+2)==0)return!1;return!0}function n(e,t,r){for(var n=1;!t.eq(0);)t.mod(2).eq(0)?(t=t.div(2),e=e.mul(e).mod(r)):(t=t.sub(1),n=e.mul(n).mod(r));return n}e=new(e.constructor.clone({precision:2*e.toFixed(0).length}))(e);for(var i=0,a=e.sub(1);a.mod(2).eq(0);)a=a.div(2),i+=1;var s=null;if(e.lt("3317044064679887385961981"))s=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(t=>t<e);else{var o=Math.min(e.toNumber()-2,Math.floor(2*Math.pow(e.toFixed(0).length*Math.log(10),2)));s=[];for(var l=2;l<=o;l+=1)s.push(o)}for(var u=0;u<s.length;u+=1){var c=s[u],f=n(e.sub(e).add(c),a,e);if(!f.eq(1)){for(var h=0,p=f;!p.eq(e.sub(1));h+=1,p=p.mul(p).mod(e))if(h===i-1)return!1}}return!0},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),l8=ew("numeric",["number","?bignumber","?fraction"],e=>{var{number:t,bignumber:r,fraction:n}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:e=>t(e),BigNumber:r?e=>r(e):oQ,bigint:e=>BigInt(e),Fraction:n?e=>n(e):o0};return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"number",r=arguments.length>2?arguments[2]:void 0;
1if(void 0!==r)throw SyntaxError("numeric() takes one or two arguments");var n=eu(e);if(!(n in i))throw TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(i).join(", "));if(!(t in a))throw TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(a).join(", "));return t===n?e:a[t](e)}}),l9="divideScalar",l7=ew(l9,["typed","numeric"],e=>{var{typed:t,numeric:r}=e;return t(l9,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"bigint, bigint":function(e,t){return e/t},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Complex | Fraction | BigNumber | Unit":(e,t)=>e.divide(t),"number | Fraction | Complex | BigNumber, Unit":(e,t)=>t.divideInto(e)})}),ue="pow",ut=ew(ue,["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],e=>{var{typed:t,config:r,identity:n,multiply:i,matrix:a,inv:s,number:o,fraction:l,Complex:u}=e;return t(ue,{"number, number":c,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(e,t){return t.isInteger()||e>=0||r.predictable?e.pow(t):new u(e.toNumber(),0).pow(t.toNumber(),0)},"bigint, bigint":(e,t)=>e**t,"Fraction, Fraction":function(e,t){var n=e.pow(t);if(null!=n)return n;if(!r.predictable)return c(e.valueOf(),t.valueOf());throw Error("Result of pow is non-rational and cannot be expressed as a fraction")},"Array, number":f,"Array, BigNumber":function(e,t){return f(e,t.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(e,t){return h(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function c(e,t){if(r.predictable&&!eE(t)&&e<0)try{var n=l(t),i=o(n);if((t===i||1e-14>Math.abs((t-i)/t))&&n.d%2n===1n)return(n.n%2n===0n?1:-1)*Math.pow(-e,t)}catch(e){}return r.predictable&&(e<-1&&t===1/0||e>-1&&e<0&&t===-1/0)?NaN:eE(t)||e>=0||r.predictable?av(e,t):e*e<1&&t===1/0||e*e>1&&t===-1/0?0:new u(e,0).pow(t,0)}function f(e,t){if(!eE(t))throw TypeError("For A^b, b must be an integer (value is "+t+")");var r=nb(e);if(2!==r.length)throw Error("For A^b, A must be 2 dimensional (A has "+r.length+" dimensions)");if(r[0]!==r[1])throw Error("For A^b, A must be square (size is "+r[0]+"x"+r[1]+")");if(t<0)try{return f(s(e),-t)}catch(e){if("Cannot calculate inverse, determinant is zero"===e.message)throw TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+t+")");throw e}for(var a=n(r[0]).valueOf(),o=e;t>=1;)(1&t)==1&&(a=i(o,a)),t>>=1,o=i(o,o);return a}function h(e,t){return a(f(e.valueOf(),t))}}),ur="Number of decimals in function round must be an integer",un="round",ui=ew(un,["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:t,config:r,matrix:n,equalScalar:i,zeros:a,BigNumber:s,DenseMatrix:o}=e,l=aj({typed:t,equalScalar:i}),u=aO({typed:t,DenseMatrix:o}),c=aI({typed:t});function f(e){return Math.abs(eI(e).exponent)}return t(un,{number:function(e){var t=ax(e,f(r.relTol));return ax(eW(e,t,r.relTol,r.absTol)?t:e)},"number, number":function(e,t){var n=f(r.relTol);if(t>=n)return ax(e,t);var i=ax(e,n);return ax(eW(e,i,r.relTol,r.absTol)?i:e,t)},"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(ur);return new s(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(ur);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(ur);var r=t.toNumber();return e.round(r)},BigNumber:function(e){var t=new s(e).toDecimalPlaces(f(r.relTol));return(ig(e,t,r.relTol,r.absTol)?t:e).toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(ur);var n=f(r.relTol);if(t>=n)return e.toDecimalPlaces(t.toNumber());var i=e.toDecimalPlaces(n);return(ig(e,i,r.relTol,r.absTol)?i:e).toDecimalPlaces(t.toNumber())},bigint:e=>e,"bigint, number":(e,t)=>e,"bigint, BigNumber":(e,t)=>e,Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(ur);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(ur);return e.round(t.toNumber())},"Unit, number, Unit":t.referToSelf(e=>function(t,r,n){var i=t.toNumeric(n);return n.multiply(e(i,r))}),"Unit, BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>e(t,r.toNumber(),n)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(e=>(t,r,n)=>ia(t,t=>e(t,r,n),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(e=>(t,r)=>e(t,0,r)),"Array | Matrix":t.referToSelf(e=>t=>ia(t,e,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>
1l(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>c(t,r,e,!1)),"Array, number | BigNumber":t.referToSelf(e=>(t,r)=>c(n(t),r,e,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(e=>(t,r)=>i(t,0)?a(r.size(),r.storage()):u(r,t,e,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(e=>(t,r)=>i(t,0)?a(r.size(),r.storage()):c(r,t,e,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(e=>(t,r)=>c(n(r),t,e,!0).valueOf())})}),ua="log",us=Math.log(16),uo=ew(ua,["config","typed","typeOf","divideScalar","Complex"],e=>{var{typed:t,typeOf:r,config:n,divideScalar:i,Complex:a}=e;function s(e){return e.log()}function o(e){return s(new a(e,0))}return t(ua,{number:function(e){return e>=0||n.predictable?ac(e):o(e)},bigint:sg(us,ac,n,o),Complex:s,BigNumber:function(e){return!e.isNegative()||n.predictable?e.ln():o(e.toNumber())},"any, any":t.referToSelf(e=>(t,n)=>{if("Fraction"===r(t)&&"Fraction"===r(n)){var a=t.log(n);if(null!==a)return a}return i(e(t),e(n))})})}),ul="log1p",uu=ew(ul,["typed","config","divideScalar","log","Complex"],e=>{var{typed:t,config:r,divideScalar:n,log:i,Complex:a}=e;return t(ul,{number:function(e){return e>=-1||r.predictable?ek(e):s(new a(e,0))},Complex:s,BigNumber:function(e){var t=e.plus(1);return!t.isNegative()||r.predictable?t.ln():s(new a(e.toNumber(),0))},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e)),"any, any":t.referToSelf(e=>(t,r)=>n(e(t),i(r)))});function s(e){var t=e.re+1;return new a(Math.log(Math.sqrt(t*t+e.im*e.im)),Math.atan2(e.im,t))}}),uc="nthRoots",uf=ew(uc,["config","typed","divideScalar","Complex"],e=>{var{typed:t,config:r,divideScalar:n,Complex:i}=e,a=[function(e){return new i(e,0)},function(e){return new i(0,e)},function(e){return new i(-e,0)},function(e){return new i(0,-e)}];function s(e,t){if(t<0)throw Error("Root must be greater than zero");if(0===t)throw Error("Root must be non-zero");if(t%1!=0)throw Error("Root must be an integer");if(0===e||0===e.abs())return[new i(0,0)];var r,n="number"==typeof e;(n||0===e.re||0===e.im)&&(r=n?2*(e<0):0===e.im?2*(e.re<0):2*(e.im<0)+1);for(var s=e.arg(),o=e.abs(),l=[],u=Math.pow(o,1/t),c=0;c<t;c++){var f=(r+4*c)/t;if(f===Math.round(f)){l.push(a[f%4](u));continue}l.push(new i({r:u,phi:(s+2*Math.PI*c)/t}))}return l}return t(uc,{Complex:function(e){return s(e,2)},"Complex, number":s})}),uh="dotPow",up=ew(uh,["typed","equalScalar","matrix","pow","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,equalScalar:r,matrix:n,pow:i,DenseMatrix:a,concat:s,SparseMatrix:o}=e,l=a6({typed:t}),u=ot({typed:t,SparseMatrix:o}),c=aj({typed:t,equalScalar:r}),f=aO({typed:t,DenseMatrix:a}),h=se({typed:t,matrix:n,concat:s}),p={};for(var m in i.signatures)!Object.prototype.hasOwnProperty.call(i.signatures,m)||m.includes("Matrix")||m.includes("Array")||(p[m]=i.signatures[m]);var d=t(p);return t(uh,h({elop:d,SS:u,DS:l,Ss:c,sS:f}))}),um="dotDivide",ud=ew(um,["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:i,DenseMatrix:a,concat:s,SparseMatrix:o}=e,l=a4({typed:t,equalScalar:n}),u=a6({typed:t}),c=ot({typed:t,SparseMatrix:o}),f=aj({typed:t,equalScalar:n}),h=aO({typed:t,DenseMatrix:a}),p=se({typed:t,matrix:r,concat:s});return t(um,p({elop:i,SS:c,DS:u,SD:l,Ss:f,sS:h}))});function ug(e){var{DenseMatrix:t}=e;return function(e,r,n){var i=e.size();if(2!==i.length)throw RangeError("Matrix must be two dimensional (size: "+nc(i)+")");var a=i[0];if(a!==i[1])throw RangeError("Matrix must be square (size: "+nc(i)+")");var s=[];if(N(r)){var o=r.size(),l=r._data;if(1===o.length){if(o[0]!==a)throw RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var u=0;u<a;u++)s[u]=[l[u]];return new t({data:s,size:[a,1],datatype:r._datatype})}if(2===o.length){if(o[0]!==a||1!==o[1])throw RangeError("Dimension mismatch. Matrix columns must match vector length.");if(M(r)){if(n){s=[];for(var c=0;c<a;c++)s[c]=[l[c][0]];return new t({data:s,size:[a,1],datatype:r._datatype})}return r}if(T(r)){for(var f=0;f<a;f++)s[f]=[0];for(var h=r._values,p=r._index,m=r._ptr,d=m[1],g=m[0];g<d;g++)s[p[g]][0]=h[g];return new t({data:s,size:[a,1],datatype:r._datatype})}}throw RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(E(r)){var v=nb(r);if(1===v.length){if(v[0]!==a)throw RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var x=0;x<a;x++)s[x]=[r[x]];return new t({data:s,size:[a,1]})}if(2===v.length){if(v[0]!==a||1!==v[1])throw RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var y=0;y<a;y++)s[y]=[r[y][0]];return new t({data:s,size:[a,1]})}throw RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var uv="lsolve",ux=ew(uv,["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:o}=e,l=ug({DenseMatrix:o});return t(uv,{"SparseMatrix, Array | Matrix":function(e,t){return c(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return u(e,t)},"Array, Array | Matrix":function(e,t){return u(r(e),t).valueOf()}});function u(e,t){for(var r=(t=l(e,t,!0))._data,u=e._size[0],c=e._size[1],f=[],h=e._data,p=0;p<c;p++){var m=r[p][0]||0,d=void 0;if(s(m,0))d=0;else{var g=h[p][p];if(s(g,0))throw Error("Linear system cannot be solved since matrix is singular");d=n(m,g);for(var v=p+1;v<u;v++)r[v]=[a(r[v][0]||0,i(d,h[v][p]))]}f[p]=[d]}return new o({data:f,size:[u,1]})}function c(e,t){for(var r=(t=l(e,t,!0))._data,u=e._size[0],c=e._size[1],f=e._values,h=e._index,p=e._ptr,m=[],d=0;d<c;d++){var g=r[d][0]||0;if(s(g,0))m[d]=[0];else{for(var v=0,x=[],y=[],b=p[d],w=p[d+1],_=b;_<w;_++){var D=h[_];D===d?v=f[_]:D>d&&(x.push(f[_]),y.push(D))}if(s(v,0))throw Error("Linear system cannot be solved since matrix is singular");for(var C=n(g,v),A=0,E=y.length;A<E;A++){var N=y[A];r[N]=[a(r[N][0]||0,i(C,x[A]))]}m[d]=[C]}}return new o({data:m,size:[u,1]})}}),uy="usolve",ub=ew(uy,["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:o}=e,l=ug({DenseMatrix:o});return t(uy,{"SparseMatrix, Array | Matrix":function(e,t){return c(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return u(e,t)},"Array, Array | Matrix":function(e,t){return u(r(e),t).valueOf()}});function u(e,t){for(var r=(t=l(e,t,!0))._data,u=e._size[0],c=e._size[1],f=[],h=e._data,p=c-1;p>=0;p--){var m=r[p][0]||0,d=void 0;if(s(m,0))d=0;else{var g=h[p][p];if(s(g,0))throw Error("Linear system cannot be solved since matrix is singular");d=n(m,g);for(var v=p-1;v>=0;v--)r[v]=[a(r[v][0]||0,i(d,h[v][p]))]}f[p]=[d]}return new o({data:f,size:[u,1]})}function c(e,t){for(var r=(t=l(e,t,!0))._data,u=e._size[0],c=e._size[1],f=e._values,h=e._index,p=e._ptr,m=[],d=c-1;d>=0;d--){var g=r[d][0]||0;if(s(g,0))m[d]=[0];else{for(var v=0,x=[],y=[],b=p[d],w=p[d+1],_=w-1;_>=b;_--){var D=h[_];D===d?v=f[_]:D<d&&(x.push(f[_]),y.push(D))}if(s(v,0))throw Error("Linear system cannot be solved since matrix is singular");for(var C=n(g,v),A=0,E=y.length;A<E;A++){var N=y[A];r[N]=[a(r[N][0],i(C,x[A]))]}m[d]=[C]}}return new o({data:m,size:[u,1]})}}),uw="lsolveAll",u_=ew(uw,["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:o}=e,l=ug({DenseMatrix:o});return t(uw,{"SparseMatrix, Array | Matrix":function(e,t){return c(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return u(e,t)},"Array, Array | Matrix":function(e,t){return u(r(e),t).map(e=>e.valueOf())}});function u(e,t){for(var r=[l(e,t,!0)._data.map(e=>e[0])],u=e._data,c=e._size[0],f=e._size[1],h=0;h<f;h++)for(var p=r.length,m=0;m<p;m++){var d=r[m];
1if(s(u[h][h],0))if(s(d[h],0)){if(0===m){var g=[...d];g[h]=1;for(var v=h+1;v<f;v++)g[v]=a(g[v],u[v][h]);r.push(g)}}else{if(0===m)return[];r.splice(m,1),m-=1,p-=1}else{d[h]=n(d[h],u[h][h]);for(var x=h+1;x<f;x++)d[x]=a(d[x],i(d[h],u[x][h]))}}return r.map(e=>new o({data:e.map(e=>[e]),size:[c,1]}))}function c(e,t){for(var r=[l(e,t,!0)._data.map(e=>e[0])],u=e._size[0],c=e._size[1],f=e._values,h=e._index,p=e._ptr,m=0;m<c;m++)for(var d=r.length,g=0;g<d;g++){for(var v=r[g],x=[],y=[],b=p[m],w=p[m+1],_=0,D=b;D<w;D++){var C=h[D];C===m?_=f[D]:C>m&&(x.push(f[D]),y.push(C))}if(s(_,0))if(s(v[m],0)){if(0===g){var A=[...v];A[m]=1;for(var E=0,N=y.length;E<N;E++){var S=y[E];A[S]=a(A[S],x[E])}r.push(A)}}else{if(0===g)return[];r.splice(g,1),g-=1,d-=1}else{v[m]=n(v[m],_);for(var M=0,T=y.length;M<T;M++){var k=y[M];v[k]=a(v[k],i(v[m],x[M]))}}}return r.map(e=>new o({data:e.map(e=>[e]),size:[u,1]}))}}),uD="usolveAll",uC=ew(uD,["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtractScalar:a,equalScalar:s,DenseMatrix:o}=e,l=ug({DenseMatrix:o});return t(uD,{"SparseMatrix, Array | Matrix":function(e,t){return c(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return u(e,t)},"Array, Array | Matrix":function(e,t){return u(r(e),t).map(e=>e.valueOf())}});function u(e,t){for(var r=[l(e,t,!0)._data.map(e=>e[0])],u=e._data,c=e._size[0],f=e._size[1],h=f-1;h>=0;h--)for(var p=r.length,m=0;m<p;m++){var d=r[m];if(s(u[h][h],0))if(s(d[h],0)){if(0===m){var g=[...d];g[h]=1;for(var v=h-1;v>=0;v--)g[v]=a(g[v],u[v][h]);r.push(g)}}else{if(0===m)return[];r.splice(m,1),m-=1,p-=1}else{d[h]=n(d[h],u[h][h]);for(var x=h-1;x>=0;x--)d[x]=a(d[x],i(d[h],u[x][h]))}}return r.map(e=>new o({data:e.map(e=>[e]),size:[c,1]}))}function c(e,t){for(var r=[l(e,t,!0)._data.map(e=>e[0])],u=e._size[0],c=e._size[1],f=e._values,h=e._index,p=e._ptr,m=c-1;m>=0;m--)for(var d=r.length,g=0;g<d;g++){for(var v=r[g],x=[],y=[],b=p[m],w=p[m+1],_=0,D=w-1;D>=b;D--){var C=h[D];C===m?_=f[D]:C<m&&(x.push(f[D]),y.push(C))}if(s(_,0))if(s(v[m],0)){if(0===g){var A=[...v];A[m]=1;for(var E=0,N=y.length;E<N;E++){var S=y[E];A[S]=a(A[S],x[E])}r.push(A)}}else{if(0===g)return[];r.splice(g,1),g-=1,d-=1}else{v[m]=n(v[m],_);for(var M=0,T=y.length;M<T;M++){var k=y[M];v[k]=a(v[k],i(v[m],x[M]))}}}return r.map(e=>new o({data:e.map(e=>[e]),size:[u,1]}))}}),uA=ew("matAlgo08xS0Sid",["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a,s,o,l,u,c=e._values,f=e._index,h=e._ptr,p=e._size,m=e._datatype||void 0===e._data?e._datatype:e.getDataType(),d=n._values,g=n._index,v=n._ptr,x=n._size,y=n._datatype||void 0===n._data?n._datatype:n.getDataType();if(p.length!==x.length)throw new nx(p.length,x.length);if(p[0]!==x[0]||p[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+p+") must match Matrix B ("+x+")");if(!c||!d)throw Error("Cannot perform operation on Pattern Sparse Matrices");var b=p[0],w=p[1],_=r,D=0,C=i;"string"==typeof m&&m===y&&"mixed"!==m&&(a=m,_=t.find(r,[a,a]),D=t.convert(0,a),C=t.find(i,[a,a]));for(var A=[],E=[],N=[],S=[],M=[],T=0;T<w;T++){N[T]=E.length;var k=T+1;for(o=h[T],l=h[T+1],s=o;s<l;s++)M[u=f[s]]=k,S[u]=c[s],E.push(u);for(o=v[T],l=v[T+1],s=o;s<l;s++)M[u=g[s]]===k&&(S[u]=C(S[u],d[s]));for(s=N[T];s<E.length;){var F=S[u=E[s]];_(F,D)?E.splice(s,1):(A.push(F),s++)}}return N[w]=E.length,e.createSparseMatrix({values:A,index:E,ptr:N,size:[b,w],datatype:m===e._datatype&&y===n._datatype?a:void 0})}}),uE=ew("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",e=>(t,n)=>e(r(t),n).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",e=>(t,n)=>e(r(t),n).valueOf()),"number, Array":t.referTo("number, DenseMatrix",e=>(t,n)=>e(t,r(n)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",e=>(t,n)=>e(t,r(n)).valueOf())}}),uN="leftShift",uS=ew(uN,["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,o=sn({typed:t}),l=a4({typed:t,equalScalar:n}),u=uA({typed:t,equalScalar:n}),c=sa({typed:t,DenseMatrix:a}),f=aj({typed:t,equalScalar:n}),h=aI({typed:t}),p=se({typed:t,matrix:r,concat:s}),m=uE({typed:t,matrix:r});return t(uN,{"number, number":s2,"BigNumber, BigNumber":sY,"bigint, bigint":(e,t)=>e<<t,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>
1n(r,0)?t.clone():f(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>n(r,0)?t.clone():h(t,r,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):c(r,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):h(r,t,e,!0))},m,p({SS:u,DS:o,SD:l}))}),uM="rightArithShift",uT=ew(uM,["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,o=sn({typed:t}),l=a4({typed:t,equalScalar:n}),u=uA({typed:t,equalScalar:n}),c=sa({typed:t,DenseMatrix:a}),f=aj({typed:t,equalScalar:n}),h=aI({typed:t}),p=se({typed:t,matrix:r,concat:s}),m=uE({typed:t,matrix:r});return t(uM,{"number, number":s3,"BigNumber, BigNumber":sZ,"bigint, bigint":(e,t)=>e>>t,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>n(r,0)?t.clone():f(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>n(r,0)?t.clone():h(t,r,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):c(r,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):h(r,t,e,!0))},m,p({SS:u,DS:o,SD:l}))}),uk="rightLogShift",uF=ew(uk,["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a,concat:s}=e,o=sn({typed:t}),l=a4({typed:t,equalScalar:n}),u=uA({typed:t,equalScalar:n}),c=sa({typed:t,DenseMatrix:a}),f=aj({typed:t,equalScalar:n}),h=aI({typed:t}),p=se({typed:t,matrix:r,concat:s}),m=uE({typed:t,matrix:r});return t(uk,{"number, number":s4,"SparseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>n(r,0)?t.clone():f(t,r,e,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(e=>(t,r)=>n(r,0)?t.clone():h(t,r,e,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):c(r,t,e,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(e=>(t,r)=>n(t,0)?i(r.size(),r.storage()):h(r,t,e,!0))},m,p({SS:u,DS:o,SD:l}))}),uB="and",uP=ew(uB,["typed","matrix","equalScalar","zeros","not","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:s}=e,o=a4({typed:t,equalScalar:n}),l=sp({typed:t,equalScalar:n}),u=aj({typed:t,equalScalar:n}),c=aI({typed:t}),f=se({typed:t,matrix:r,concat:s});return t(uB,{"number, number":og,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)&&(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!t.isZero()&&!e.isNaN()&&!t.isNaN()},"bigint, bigint":og,"Unit, Unit":t.referToSelf(e=>(t,r)=>e(t.value||0,r.value||0)),"SparseMatrix, any":t.referToSelf(e=>(t,r)=>a(r)?i(t.size(),t.storage()):u(t,r,e,!1)),"DenseMatrix, any":t.referToSelf(e=>(t,r)=>a(r)?i(t.size(),t.storage()):c(t,r,e,!1)),"any, SparseMatrix":t.referToSelf(e=>(t,r)=>a(t)?i(t.size(),t.storage()):u(r,t,e,!0)),"any, DenseMatrix":t.referToSelf(e=>(t,r)=>a(t)?i(t.size(),t.storage()):c(r,t,e,!0)),"Array, any":t.referToSelf(e=>(t,n)=>e(r(t),n).valueOf()),"any, Array":t.referToSelf(e=>(t,n)=>e(t,r(n)).valueOf())},f({SS:l,DS:o}))}),uj="compare",uO=ew(uj,["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],e=>{var{typed:t,config:r,equalScalar:n,matrix:i,BigNumber:a,Fraction:s,DenseMatrix:o,concat:l}=e,u=a6({typed:t}),c=a5({typed:t,equalScalar:n}),f=aO({typed:t,DenseMatrix:o}),h=se({typed:t,matrix:i,concat:l}),p=iO({typed:t});return t(uj,uI({typed:t,config:r}),{"boolean, boolean":function(e,t){return e===t?0:e>t?1:-1},"BigNumber, BigNumber":function(e,t){return new a(ig(e,t,r.relTol,r.absTol)?0:e.cmp(t))},"bigint, bigint":function(e,t){return e===t?0n:e>t?1n:-1n},"Fraction, Fraction":function(e,t){return new s(e.compare(t))},"Complex, Complex":function(){throw TypeError("No ordering relation is defined for complex numbers")}},p,h({SS:c,DS:u,Ss:f}))}),uI=ew(uj,["typed","config"],e=>{var{typed:t,config:r}=e;return t(uj,{"number, number":function(e,t){return eW(e,t,r.relTol,r.absTol)?0:e>t?1:-1}})}),uz=e.i(123180),uL="compareNatural",uR=ew(uL,["typed","compare"],e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(uL,{"any, any":i});function i(e,t){var l,u=eu(e),c=eu(t);if(("number"===u||"BigNumber"===u||"Fraction"===u||"bigint"===u)&&("number"===c||"BigNumber"===c||"Fraction"===c||"bigint"===c))return"0"!==(l=r(e,t)).toString()?l>0?1:-1:(0,uz.default)(u,c);var f=["Array","DenseMatrix","SparseMatrix"];
1if(f.includes(u)||f.includes(c))return 0!==(l=a(i,e,t))?l:(0,uz.default)(u,c);if(u!==c)return(0,uz.default)(u,c);if("Complex"===u)return uq(e,t);if("Unit"===u)return e.equalBase(t)?i(e.value,t.value):s(i,e.formatUnits(),t.formatUnits());if("boolean"===u)return n(e,t);if("string"===u)return(0,uz.default)(e,t);if("Object"===u)return o(i,e,t);if("null"===u||"undefined"===u)return 0;throw TypeError('Unsupported type of value "'+u+'"')}function a(e,t,r){return T(t)&&T(r)?s(e,t.toJSON().values,r.toJSON().values):T(t)?a(e,t.toArray(),r):T(r)?a(e,t,r.toArray()):M(t)?a(e,t.toJSON().data,r):M(r)?a(e,t,r.toJSON().data):Array.isArray(t)?Array.isArray(r)?s(e,t,r):a(e,t,[r]):a(e,[t],r)}function s(e,t,r){for(var n=0,i=Math.min(t.length,r.length);n<i;n++){var a=e(t[n],r[n]);if(0!==a)return a}return t.length>r.length?1:t.length<r.length?-1:0}function o(e,t,r){var n=Object.keys(t),i=Object.keys(r);n.sort(uz.default),i.sort(uz.default);var a=s(e,n,i);if(0!==a)return a;for(var o=0;o<n.length;o++){var l=e(t[n[o]],r[i[o]]);if(0!==l)return l}return 0}});function uq(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var uU="compareText",uH=["typed","matrix","concat"];nv.signature="any, any";var uV=ew(uU,uH,e=>{var{typed:t,matrix:r,concat:n}=e,i=se({typed:t,matrix:r,concat:n});return t(uU,nv,i({elop:nv,Ds:!0}))}),uW="equal",uG=ew(uW,["typed","matrix","equalScalar","DenseMatrix","SparseMatrix"],e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a,SparseMatrix:s}=e,o=a6({typed:t}),l=ot({typed:t,SparseMatrix:s}),u=aO({typed:t,DenseMatrix:i}),c=se({typed:t,matrix:r});return t(uW,u$({typed:t,equalScalar:n}),c({elop:n,SS:l,DS:o,Ss:u}))}),u$=ew(uW,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(uW,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:r(e,t)}})}),uY="equalText",uZ=ew(uY,["typed","compareText","isZero"],e=>{var{typed:t,compareText:r,isZero:n}=e;return t(uY,{"any, any":function(e,t){return n(r(e,t))}})}),uX="smaller",uJ=ew(uX,["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,config:r,bignumber:n,matrix:i,DenseMatrix:a,concat:s,SparseMatrix:o}=e,l=a6({typed:t}),u=ot({typed:t,SparseMatrix:o}),c=aO({typed:t,DenseMatrix:a}),f=se({typed:t,matrix:i,concat:s}),h=iO({typed:t});function p(e,t){return e.lt(t)&&!ig(e,t,r.relTol,r.absTol)}return t(uX,uK({typed:t,config:r}),{"boolean, boolean":(e,t)=>
1e<t,"BigNumber, BigNumber":p,"bigint, bigint":(e,t)=>e<t,"Fraction, Fraction":(e,t)=>-1===e.compare(t),"Fraction, BigNumber":function(e,t){return p(n(e),t)},"BigNumber, Fraction":function(e,t){return p(e,n(t))},"Complex, Complex":function(e,t){throw TypeError("No ordering relation is defined for complex numbers")}},h,f({SS:u,DS:l,Ss:c}))}),uK=ew(uX,["typed","config"],e=>{var{typed:t,config:r}=e;return t(uX,{"number, number":function(e,t){return e<t&&!eW(e,t,r.relTol,r.absTol)}})}),uQ="smallerEq",u0=ew(uQ,["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i,concat:a,SparseMatrix:s}=e,o=a6({typed:t}),l=ot({typed:t,SparseMatrix:s}),u=aO({typed:t,DenseMatrix:i}),c=se({typed:t,matrix:n,concat:a}),f=iO({typed:t});return t(uQ,u1({typed:t,config:r}),{"boolean, boolean":(e,t)=>e<=t,"BigNumber, BigNumber":function(e,t){return e.lte(t)||ig(e,t,r.relTol,r.absTol)},"bigint, bigint":(e,t)=>e<=t,"Fraction, Fraction":(e,t)=>1!==e.compare(t),"Complex, Complex":function(){throw TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:l,DS:o,Ss:u}))}),u1=ew(uQ,["typed","config"],e=>{var{typed:t,config:r}=e;return t(uQ,{"number, number":function(e,t){return e<=t||eW(e,t,r.relTol,r.absTol)}})}),u2="larger",u3=ew(u2,["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,config:r,bignumber:n,matrix:i,DenseMatrix:a,concat:s,SparseMatrix:o}=e,l=a6({typed:t}),u=ot({typed:t,SparseMatrix:o}),c=aO({typed:t,DenseMatrix:a}),f=se({typed:t,matrix:i,concat:s}),h=iO({typed:t});function p(e,t){return e.gt(t)&&!ig(e,t,r.relTol,r.absTol)}return t(u2,u4({typed:t,config:r}),{"boolean, boolean":(e,t)=>
1e>t,"BigNumber, BigNumber":p,"bigint, bigint":(e,t)=>e>t,"Fraction, Fraction":(e,t)=>1===e.compare(t),"Fraction, BigNumber":function(e,t){return p(n(e),t)},"BigNumber, Fraction":function(e,t){return p(e,n(t))},"Complex, Complex":function(){throw TypeError("No ordering relation is defined for complex numbers")}},h,f({SS:u,DS:l,Ss:c}))}),u4=ew(u2,["typed","config"],e=>{var{typed:t,config:r}=e;return t(u2,{"number, number":function(e,t){return e>t&&!eW(e,t,r.relTol,r.absTol)}})}),u6="largerEq",u5=ew(u6,["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i,concat:a,SparseMatrix:s}=e,o=a6({typed:t}),l=ot({typed:t,SparseMatrix:s}),u=aO({typed:t,DenseMatrix:i}),c=se({typed:t,matrix:n,concat:a}),f=iO({typed:t});return t(u6,u8({typed:t,config:r}),{"boolean, boolean":(e,t)=>e>=t,"BigNumber, BigNumber":function(e,t){return e.gte(t)||ig(e,t,r.relTol,r.absTol)},"bigint, bigint":function(e,t){return e>=t},"Fraction, Fraction":(e,t)=>-1!==e.compare(t),"Complex, Complex":function(){throw TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:l,DS:o,Ss:u}))}),u8=ew(u6,["typed","config"],e=>{var{typed:t,config:r}=e;return t(u6,{"number, number":function(e,t){return e>=t||eW(e,t,r.relTol,r.absTol)}})}),u9="deepEqual",u7=ew(u9,["typed","equal"],e=>{var{typed:t,equal:r}=e;return t(u9,{"any, any":function(e,t){return n(e.valueOf(),t.valueOf())}});function n(e,t){if(Array.isArray(e))if(!Array.isArray(t))return!1;else{var i=e.length;if(i!==t.length)return!1;for(var a=0;a<i;a++)if(!n(e[a],t[a]))return!1;return!0}return!Array.isArray(t)&&r(e,t)}}),ce="unequal",ct=ew(ce,["typed","config","equalScalar","matrix","DenseMatrix","concat","SparseMatrix"],e=>{var{typed:t,config:r,equalScalar:n,matrix:i,DenseMatrix:a,concat:s,SparseMatrix:o}=e,l=a6({typed:t}),u=ot({typed:t,SparseMatrix:o}),c=aO({typed:t,DenseMatrix:a}),f=se({typed:t,matrix:i,concat:s});return t(ce,cr({typed:t,equalScalar:n}),f({elop:h,SS:u,DS:l,Ss:c}));function h(e,t){return!n(e,t)}}),cr=ew(ce,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(ce,{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:!r(e,t)}})}),cn="partitionSelect",ci=ew(cn,["typed","isNumeric","isNaN","compare"],e=>{var{typed:t,isNumeric:r,isNaN:n,compare:i}=e,a=i,s=(e,t)=>-i(e,t);return t(cn,{"Array | Matrix, number":function(e,t){return o(e,t,a)},"Array | Matrix, number, string":function(e,t,r){if("asc"===r)return o(e,t,a);if("desc"===r)return o(e,t,s);
1throw Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":o});function o(e,t,r){if(!eE(t)||t<0)throw Error("k must be a non-negative integer");if(N(e)){if(e.size().length>1)throw Error("Only one dimensional matrices supported");return l(e.valueOf(),t,r)}if(Array.isArray(e))return l(e,t,r)}function l(e,t,i){if(t>=e.length)throw Error("k out of bounds");for(var a=0;a<e.length;a++)if(r(e[a])&&n(e[a]))return e[a];for(var s=0,o=e.length-1;s<o;){for(var l=s,u=o,c=e[Math.floor(Math.random()*(o-s+1))+s];l<u;)if(i(e[l],c)>=0){var f=e[u];e[u]=e[l],e[l]=f,--u}else++l;i(e[l],c)>0&&--l,t<=l?o=l:s=l+1}return e[t]}}),ca="sort",cs=ew(ca,["typed","matrix","compare","compareNatural"],e=>{var{typed:t,matrix:r,compare:n,compareNatural:i}=e,a=n,s=(e,t)=>-n(e,t);return t(ca,{Array:function(e){return l(e),e.sort(a)},Matrix:function(e){return u(e),r(e.toArray().sort(a),e.storage())},"Array, function":function(e,t){return l(e),e.sort(t)},"Matrix, function":function(e,t){return u(e),r(e.toArray().sort(t),e.storage())},"Array, string":function(e,t){return l(e),e.sort(o(t))},"Matrix, string":function(e,t){return u(e),r(e.toArray().sort(o(t)),e.storage())}});function o(e){if("asc"===e)return a;
1if("desc"===e)return s;if("natural"===e)return i;throw Error('String "asc", "desc", or "natural" expected')}function l(e){if(1!==nb(e).length)throw Error("One dimensional array expected")}function u(e){if(1!==e.size().length)throw Error("One dimensional matrix expected")}}),co="max",cl=ew(co,["typed","config","numeric","larger","isNaN"],e=>{var{typed:t,config:r,numeric:n,larger:i,isNaN:a}=e;return t(co,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return is(e,t.valueOf(),s)},"...":function(e){if(ir(e))throw TypeError("Scalar values expected in function max");return o(e)}});function s(e,t){try{return i(e,t)?e:t}catch(e){throw lR(e,"max",t)}}function o(e){var t;if(ii(e,function(e){try{a(e)?t=e:(void 0===t||i(e,t))&&(t=e)}catch(t){throw lR(t,"max",e)}}),void 0===t)throw Error("Cannot calculate max of an empty array");return"string"==typeof t&&(t=n(t,eN(t,r))),t}}),cu="min",cc=ew(cu,["typed","config","numeric","smaller","isNaN"],e=>{var{typed:t,config:r,numeric:n,smaller:i,isNaN:a}=e;return t(cu,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return is(e,t.valueOf(),s)},"...":function(e){if(ir(e))throw TypeError("Scalar values expected in function min");return o(e)}});function s(e,t){try{return i(e,t)?e:t}catch(e){throw lR(e,"min",t)}}function o(e){var t;if(ii(e,function(e){try{a(e)?t=e:(void 0===t||i(e,t))&&(t=e)}catch(t){throw lR(t,"min",e)}}),void 0===t)throw Error("Cannot calculate min of an empty array");return"string"==typeof t&&(t=n(t,eN(t,r))),t}}),cf=ew("ImmutableDenseMatrix",["smaller","DenseMatrix"],e=>{var{smaller:t,DenseMatrix:r}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!A(t))throw Error("Invalid datatype: "+t);if(N(e)||E(e)){var i=new r(e,t);this._data=i._data,this._size=i._size,this._datatype=i._datatype,this._min=null,this._max=null}else if(e&&E(e.data)&&E(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min=void 0!==e.min?e.min:null,this._max=void 0!==e.max?e.max:null;else if(e)throw TypeError("Unsupported type of data ("+eu(e)+")");else this._data=[],this._size=[0],this._datatype=t,this._min=null,this._max=null}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(e){switch(arguments.length){case 1:var t=r.prototype.subset.call(this,e);if(N(t))return new n({data:t._data,size:t._size,datatype:t._datatype});return t;case 2:case 3:throw Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:ec(this._data),size:ec(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(){throw Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(null===this._min){var e=null;this.forEach(function(r){(null===e||t(r,e))&&(e=r)}),this._min=null!==e?e:void 0}return this._min},n.prototype.max=function(){if(null===this._max){var e=null;this.forEach(function(r){(null===e||t(e,r))&&(e=r)}),this._max=null!==e?e:void 0}return this._max},n},{isClass:!0}),ch=ew("Index",["ImmutableDenseMatrix","getMatrixDataType"],e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var e=0,t=arguments.length;e<t;e++){var a=e<0||arguments.length<=e?void 0:arguments[e],s=E(a),o=N(a),l=typeof a,u=null;if(k(a))this._dimensions.push(a),this._isScalar=!1;else if(s||o){var c=void 0;this._isScalar=!1,"boolean"===r(a)?(s&&(c=i(cp(a).valueOf())),o&&(c=i(cp(a._data).valueOf())),u=a.valueOf().length):c=i(a.valueOf()),this._dimensions.push(c)}else if("number"===l)this._dimensions.push(a);else if("bigint"===l)this._dimensions.push(Number(a));else if("string"===l)this._dimensions.push(a);else throw TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");this._sourceSize.push(u)}}function i(e){for(var r=0,n=e.length;r<n;r++)if(!y(e[r])||!eE(e[r]))throw TypeError("Index parameters must be positive integer numbers");var i=new t;return i._data=e,i._size=[e.length],i}return n.prototype.type="Index",n.prototype.isIndex=!0,n.prototype.clone=function(){var e=new n;return e._dimensions=ec(this._dimensions),e._isScalar=this._isScalar,e._sourceSize=this._sourceSize,e},n.create=function(e){var t=new n;return n.apply(t,e),t},n.prototype.size=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]=A(n)||y(n)?1:n.size()[0]}return e},n.prototype.max=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]=A(n)||y(n)?n:n.max()}return e},n.prototype.min=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]=A(n)||y(n)?n:n.min()}return e},n.prototype.forEach=function(e){for(var t=0,r=this._dimensions.length;t<r;t++)e(this._dimensions[t],t,this)},n.prototype.dimension=function(e){var t;return y(e)&&null!=(t=this._dimensions[e])?t:null},n.prototype.isObjectProperty=function(){return 1===this._dimensions.length&&A(this._dimensions[0])},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e.push(A(n)||y(n)?n:n.toArray())}return e},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];A(n)?e.push(JSON.stringify(n)):e.push(n.toString())}return"["+e.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(e){return n.create(e.dimensions)},n},{isClass:!0});function cp(e){var t=[];return e.forEach((e,r)=>{e&&t.push(r)}),t}var cm=ew("FibonacciHeap",["smaller","larger"],e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function a(e,r,n){r.key=n;var i=r.parent;return i&&t(r.key,i.key)&&(s(e,r,i),o(e,i)),t(r.key,e.key)&&(e=r),e}function s(e,t,r){t.left.right=t.right,t.right.left=t.left,r.degree--,r.child===t&&(r.child=t.right),0===r.degree&&(r.child=null),t.left=e,t.right=e.right,e.right=t,t.right.left=t,t.parent=null,t.mark=!1}function o(e,t){var r=t.parent;r&&(t.mark?(s(e,t,r),o(r)):t.mark=!0)}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,r){var n={key:e,value:r,degree:0};if(this._minimum){var i=this._minimum;n.left=i,n.right=i.right,i.right=n,n.right.left=n,t(e,i.key)&&(this._minimum=n)}else n.left=n,n.right=n,this._minimum=n;return this._size++,n},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return 0===this._size},i.prototype.extractMinimum=function(){var e=this._minimum;if(null===e)return e;for(var t=this._minimum,r=e.degree,n=e.child;r>0;){var i=n.right;n.left.right=n.right,n.right.left=n.left,n.left=t,n.right=t.right,t.right=n,n.right.left=n,n.parent=null,n=i,r--}return e.left.right=e.right,e.right.left=e.left,t=e===e.right?null:u(t=e.right,this._size),this._size--,this._minimum=t,e},i.prototype.remove=function(e){this._minimum=a(this._minimum,e,-1),this.extractMinimum()};var l=function(e,t){e.left.right=e.right,e.right.left=e.left,e.parent=t,t.child?(e.left=t.child,e.right=t.child.right,t.child.right=e,e.right.left=e):(t.child=e,e.right=e,e.left=e),t.degree++,e.mark=!1};function u(e,i){var a,s=Math.floor(Math.log(i)*n)+1,o=Array(s),u=0,c=e;
1if(c)for(u++,c=c.right;c!==e;)u++,c=c.right;for(;u>0;){for(var f=c.degree,h=c.right;a=o[f];){if(r(c.key,a.key)){var p=a;a=c,c=p}l(a,c),o[f]=null,f++}o[f]=c,c=h,u--}e=null;for(var m=0;m<s;m++)(a=o[m])&&(e?(a.left.right=a.right,a.right.left=a.left,a.left=e,a.right=e.right,e.right=a,a.right.left=a,t(a.key,e.key)&&(e=a)):e=a);return e}return i},{isClass:!0}),cd=ew("Spa",["addScalar","equalScalar","FibonacciHeap"],e=>{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function i(){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(e,t){if(this._values[e])this._values[e].value=t;else{var r=this._heap.insert(e,t);this._values[e]=r}},i.prototype.get=function(e){var t=this._values[e];return t?t.value:0},i.prototype.accumulate=function(e,r){var n=this._values[e];n?n.value=t(n.value,r):(n=this._heap.insert(e,r),this._values[e]=n)},i.prototype.forEach=function(e,t,n){var i=this._heap,a=this._values,s=[],o=i.extractMinimum();for(o&&s.push(o);o&&o.key<=t;)o.key>=e&&!r(o.value,0)&&n(o.key,o.value,this),(o=i.extractMinimum())&&s.push(o);for(var l=0;l<s.length;l++){var u=s[l];a[(o=i.insert(u.key,u.value)).key]=o}},i.prototype.swap=function(e,t){var r=this._values[e],n=this._values[t];if(!r&&n)r=this._heap.insert(e,n.value),this._heap.remove(n),this._values[e]=r,this._values[t]=void 0;else if(r&&!n)n=this._heap.insert(t,r.value),this._heap.remove(r),this._values[t]=n,this._values[e]=void 0;else if(r&&n){var i=r.value;r.value=n.value,n.value=i}},i},{isClass:!0});function cg(e){var t=0,r=1,n=Object.create(null),i=Object.create(null),a=0,s=function(e){var s=i[e];if(s&&(delete n[s],delete i[e],--t,r===s)){if(!t){a=0,r=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++r););}};return e=Math.abs(e),{hit:function(o){var l=i[o],u=++a;if(n[u]=o,i[o]=u,!l){if(++t<=e)return;return s(o=n[r]),o}if(delete n[l],r===l)for(;!Object.prototype.hasOwnProperty.call(n,++r););},delete:s,clear:function(){t=a=0,r=1,n=Object.create(null),i=Object.create(null)}}}function cv(e){var{hasher:t,limit:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=null==r?1/0:r,t=null==t?JSON.stringify:t,function n(){"object"!=typeof n.cache&&(n.cache={values:new Map,lru:cg(r||1/0)});for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t(i);if(n.cache.values.has(s))return n.cache.lru.hit(s),n.cache.values.get(s);var o=e.apply(e,i);return n.cache.values.set(s,o),n.cache.values.delete(n.cache.lru.hit(s)),o}}var cx=cv(function(e){return new e(1).exp()},{hasher:c_}),cy=cv(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:c_}),cb=cv(function(e){return e.acos(-1)},{hasher:c_}),cw=cv(function(e){return cb(e).times(2)},{hasher:c_});function c_(e){return e[0].precision}function cD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cD(Object(r),!0).forEach(function(t){lE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var cA=ew("Unit",["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],e=>{var t,r,n,{on:i,config:a,addScalar:s,subtractScalar:o,multiplyScalar:l,divideScalar:u,pow:c,abs:f,fix:h,round:p,equal:m,isNumeric:d,format:g,number:v,Complex:x,BigNumber:y,Fraction:b}=e,w=v,D=!1,A=!0;function E(e,t){if(!(this instanceof E))throw Error("Constructor must be called with the new operator");if(!(null==e||d(e)||_(e)))throw TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=D,this.skipAutomaticSimplification=A,void 0===t)this.units=[],this.dimensions=U.map(e=>0);else if("string"==typeof t){var r=E.parse(t);this.units=r.units,this.dimensions=r.dimensions}else if(C(t)&&null===t.value)this.fixPrefix=t.fixPrefix,this.skipAutomaticSimplification=t.skipAutomaticSimplification,this.dimensions=t.dimensions.slice(0),this.units=t.units.map(e=>nr({},e));else throw TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(e)}function N(){for(;" "===n||"	"===n;)T()}function S(e){return e>="0"&&e<="9"||"."===e}function M(e){return e>="0"&&e<="9"}function T(){r++,n=t.charAt(r)}function k(e){r=e,n=t.charAt(r)}function F(){var e="",t=r;if("+"===n?T():"-"===n&&(e+=n,T()),!S(n))return k(t),null;if("."===n){if(e+=n,T(),!M(n))return k(t),null}else{for(;M(n);)e+=n,T();"."===n&&(e+=n,T())}for(;M(n);)e+=n,T();if("E"===n||"e"===n){var i="",a=r;if(i+=n,T(),("+"===n||"-"===n)&&(i+=n,T()),!M(n))return k(a),e;
1for(e+=i;M(n);)e+=n,T()}return e}function B(){for(var e="";M(n)||E.isValidAlpha(n);)e+=n,T();var t=e.charAt(0);return E.isValidAlpha(t)?e:null}function P(e){return n===e?(T(),e):null}Object.defineProperty(E,"name",{value:"Unit"}),E.prototype.constructor=E,E.prototype.type="Unit",E.prototype.isUnit=!0,E.parse=function(e,i){if(i=i||{},r=-1,n="","string"!=typeof(t=e))throw TypeError("Invalid argument in Unit.parse, string expected");var s=new E;s.units=[];var o=1,l=!1;T(),N();var u=F(),c=null;if(u){if("BigNumber"===a.number)c=new y(u);else if("Fraction"===a.number)try{c=new b(u)}catch(e){c=parseFloat(u)}else c=parseFloat(u);N(),P("*")?(o=1,l=!0):P("/")&&(o=-1,l=!0)}for(var f=[],h=1;;){for(N();"("===n;)f.push(o),h*=o,o=1,T(),N();var p=void 0;if(n){var m=n;if(null===(p=B()))throw SyntaxError('Unexpected "'+m+'" in "'+t+'" at index '+r.toString())}else break;var d=j(p);if(null===d)throw SyntaxError('Unit "'+p+'" not found.');var g=o*h;if(N(),P("^")){N();var v=F();if(null===v)throw SyntaxError('In "'+e+'", "^" must be followed by a floating-point number');g*=v}s.units.push({unit:d.unit,prefix:d.prefix,power:g});for(var x=0;x<U.length;x++)s.dimensions[x]+=(d.unit.dimensions[x]||0)*g;for(N();")"===n;){if(0===f.length)throw SyntaxError('Unmatched ")" in "'+t+'" at index '+r.toString());h/=f.pop(),T(),N()}if(l=!1,P("*")?(o=1,l=!0):P("/")?(o=-1,l=!0):o=1,d.unit.base){var w=d.unit.base.key;Z.auto[w]={unit:d.unit,prefix:d.prefix}}}if(N(),n)throw SyntaxError('Could not parse: "'+e+'"');if(l)throw SyntaxError('Trailing characters: "'+e+'"');if(0!==f.length)throw SyntaxError('Unmatched "(" in "'+t+'"');if(0===s.units.length&&!i.allowNoUnits)throw SyntaxError('"'+e+'" contains 
1no units');return s.value=void 0!==c?s._normalize(c):null,s},E.prototype.clone=function(){var e=new E;e.fixPrefix=this.fixPrefix,e.skipAutomaticSimplification=this.skipAutomaticSimplification,e.value=ec(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var t=0;t<this.units.length;t++)for(var r in e.units[t]={},this.units[t])ex(this.units[t],r)&&(e.units[t][r]=this.units[t][r]);return e},E.prototype.valueType=function(){return eu(this.value)},E.prototype._isDerived=function(){return 0!==this.units.length&&(this.units.length>1||Math.abs(this.units[0].power-1)>1e-15)},E.prototype._normalize=function(e){if(null==e||0===this.units.length)return e;for(var t=e,r=E._getNumberConverter(eu(e)),n=0;n<this.units.length;n++){var i=r(this.units[n].unit.value),a=r(this.units[n].prefix.value),s=r(this.units[n].power);t=l(t,c(l(i,a),s))}return t},E.prototype._denormalize=function(e,t){if(null==e||0===this.units.length)return e;for(var r=e,n=E._getNumberConverter(eu(e)),i=0;i<this.units.length;i++){var a=n(this.units[i].unit.value),s=n(this.units[i].prefix.value),o=n(this.units[i].power);r=u(r,c(l(a,s),o))}return r};var j=cv(e=>{if(ex(G,e)){var t=G[e],r=t.prefixes[""];return{unit:t,prefix:r}}for(var n in G)if(ex(G,n)&&nu(e,n)){var i=G[n],a=e.length-n.length,s=e.substring(0,a),o=ex(i.prefixes,s)?i.prefixes[s]:void 0;if(void 0!==o)return{unit:i,prefix:o}}return null},{hasher:e=>e[0],limit:100});function O(e){return e.equalBase(H.NONE)&&null!==e.value&&!a.predictable?e.value:e}function I(e){return E._getNumberConverter(eu(e))(1)}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.skipAutomaticSimplification||null===e.value?e.clone():e.simplify();L(r),R(r,t.offset);var n=r._denormalize(r.value),i=null!==r.value?g(n,t||{}):"",a=r.formatUnits();return{simp:r,valueStr:i,unitStr:a}}function L(e){var t=!1;for(var r in void 0!==e.value&&null!==e.value&&_(e.value)&&(t=1e-14>Math.abs(e.value.re)),e.units)ex(e.units,r)&&e.units[r].unit&&("VA"===e.units[r].unit.name&&t?e.units[r].unit=G.VAR:"VAR"!==e.units[r].unit.name||t||(e.units[r].unit=G.VA))}function R(e,t){1===e.units.length&&!e.fixPrefix&&1e-14>Math.abs(e.units[0].power-Math.round(e.units[0].power))&&(e.units[0].prefix=e._bestPrefix(t))}E.isValuelessUnit=function(e){return null!==j(e)},E.prototype.hasBase=function(e){if("string"==typeof e&&(e=H[e]),!e)return!1;for(var t=0;t<U.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},E.prototype.equalBase=function(e){for(var t=0;t<U.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},E.prototype.equals=function(e){return this.equalBase(e)&&m(this.value,e.value)},E.prototype.multiply=function(e){for(var t=this.clone(),r=C(e)?e:new E(e),n=0;n<U.length;n++)t.dimensions[n]=(this.dimensions[n]||0)+(r.dimensions[n]||0);for(var i=0;i<r.units.length;i++){var a=cC({},r.units[i]);t.units.push(a)}return null!==this.value||null!==r.value?t.value=l(null===this.value?this._normalize(I(r.value)):this.value,null===r.value?r._normalize(I(this.value)):r.value):t.value=null,C(e)&&(t.skipAutomaticSimplification=!1),O(t)},E.prototype.divideInto=function(e){return new E(e).divide(this)},E.prototype.divide=function(e){for(var t=this.clone(),r=C(e)?e:new E(e),n=0;n<U.length;n++)t.dimensions[n]=(this.dimensions[n]||0)-(r.dimensions[n]||0);for(var i=0;i<r.units.length;i++){var a=cC(cC({},r.units[i]),{},{power:-r.units[i].power});t.units.push(a)}return null!==this.value||null!==r.value?t.value=u(null===this.value?this._normalize(I(r.value)):this.value,null===r.value?r._normalize(I(this.value)):r.value):t.value=null,C(e)&&(t.skipAutomaticSimplification=!1),O(t)},E.prototype.pow=function(e){for(var t=this.clone(),r=0;r<U.length;r++)t.dimensions[r]=(this.dimensions[r]||0)*e;for(var n=0;n<t.units.length;n++)t.units[n].power*=e;return null!==t.value?t.value=c(t.value,e):t.value=null,t.skipAutomaticSimplification=!1,O(t)},E.prototype.abs=function(){var e=this.clone();if(null!==e.value)if(e._isDerived()||0===e.units.length||0===e.units[0].unit.offset)e.value=f(e.value);else{var t=e._numberConverter(),r=l(t(e.units[0].unit.value),t(e.units[0].unit.offset));e.value=o(f(s(e.value,r)),r)}for(var n in e.units)("VA"===e.units[n].unit.name||"VAR"===e.units[n].unit.name)&&(e.units[n].unit=G.W);return e},E.prototype.to=function(e){var t,r=null===this.value?this._normalize(1):this.value;if("string"==typeof e)t=E.parse(e);else if(C(e))t=e.clone();else throw Error("String or Unit expected as parameter");if(!this.equalBase(t))throw Error("Units do not match ('".concat(t.toString(),"' != '").concat(this.toString(),"')"));if(null!==t.value)throw Error("Cannot convert to a unit with a value");if(null===this.value||this._isDerived()||0===this.units.length||0===t.units.length||this.units[0].unit.offset===t.units[0].unit.offset)t.value=ec(r);else{var n=E._getNumberConverter(eu(r)),i=l(this.units[0].unit.value,this.units[0].unit.offset),a=l(t.units[0].unit.value,t.units[0].unit.offset);t.value=s(r,n(o(i,a)))}return t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t},E.prototype.toNumber=function(e){return w(this.toNumeric(e))},E.prototype.toNumeric=function(e){var t;return(t=e?this.to(e):this.clone())._isDerived()||0===t.units.length?t._denormalize(t.value):t._denormalize(t.value,t.units[0].prefix.value)},E.prototype.toString=function(){return this.format()},E.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix,skipSimp:this.skipAutomaticSimplification}},E.fromJSON=function(e){var t,r,n,i=new E(e.value,null!=(t=e.unit)?t:void 0);return i.fixPrefix=null!=(r=e.fixPrefix)?r:D,i.skipAutomaticSimplification=null!=(n=e.skipSimp)?n:A,i},E.prototype.valueOf=E.prototype.toString,E.prototype.simplify=function(){var e,t,r=this.clone(),n=[];for(var i in X)if(ex(X,i)&&r.hasBase(H[i])){e=i;break}if("NONE"===e)r.units=[];else if(e&&ex(X,e)&&(t=X[e]),t)r.units=[{unit:t.unit,prefix:t.prefix,power:1}];else{for(var a=!1,s=0;s<U.length;s++){var o=U[s];Math.abs(r.dimensions[s]||0)>1e-12&&(ex(X,o)?n.push({unit:X[o].unit,prefix:X[o].prefix,power:r.dimensions[s]||0}):a=!0)}n.length<r.units.length&&!a&&(r.units=n)}return r},E.prototype.toSI=function(){for(var e=this.clone(),t=[],r=0;r<U.length;r++){var n=U[r];if(Math.abs(e.dimensions[r]||0)>1e-12)if(ex(Z.si,n))t.push({unit:Z.si[n].unit,prefix:Z.si[n].prefix,power:e.dimensions[r]||0});else throw Error("Cannot express custom unit "+n+" in SI units")}return(e.units=t,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,null!==this.value)?(e.value=null,this.to(e)):e},E.prototype.formatUnits=function(){for(var e="",t="",r=0,n=0,i=0;i<this.units.length;i++)this.units[i].power>0?(r++,e+=" "+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power-1)>1e-15&&(e+="^"+this.units[i].power)):this.units[i].power<0&&n++;if(n>0)for(var a=0;a<this.units.length;a++)this.units[a].power<0&&(r>0?(t+=" "+this.units[a].prefix.name+this.units[a].unit.name,Math.abs(this.units[a].power+1)>1e-15&&(t+="^"+-this.units[a].power)):(t+=" "+this.units[a].prefix.name+this.units[a].unit.name,t+="^"+this.units[a].power));e=e.substr(1),t=t.substr(1),r>1&&n>0&&(e="("+e+")"),n>1&&r>0&&(t="("+t+")");var s=e;return r>0&&n>0&&(s+=" / "),s+=t},E.prototype.toBest=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&!Array.isArray(e))throw Error("Invalid unit type. Expected string or Unit.");var r=this.units[0].unit.prefixes;if(e&&e.length>0){var n=e.map(e=>{var t=null;if("string"==typeof e){if(!(t=E.parse(e)))throw Error("Invalid unit type. Expected compatible string or Unit.")}else if(!C(e))throw Error("Invalid unit type. Expected compatible string or Unit.");null===t&&(t=e.clone());try{return this.to(t.formatUnits()),t}catch(e){throw Error("Invalid unit type. Expected compatible string or Unit.")}}).map(e=>e.units[0].prefix);this.units[0].unit.prefixes=n.reduce((e,t)=>
1(e[t.name]=t,e),{}),this.units[0].prefix=n[0]}var i=z(this,t).simp;return this.units[0].unit.prefixes=r,i.fixPrefix=!0,i},E.prototype.format=function(e){var{simp:t,valueStr:r,unitStr:n}=z(this,e),i=r;return t.value&&_(t.value)&&(i="("+i+")"),n.length>0&&i.length>0&&(i+=" "),i+=n},E.prototype._bestPrefix=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.2;if(1!==this.units.length||Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var t=null!==this.value?f(this.value):0,r=f(this.units[0].unit.value),n=this.units[0].prefix;if(0===t)return n;var i=this.units[0].power,a=Math.log(t/Math.pow(n.value*r,i))/Math.LN10-e;if(a>-2.200001&&a<1.800001)return n;a=Math.abs(a);var s=this.units[0].unit.prefixes;for(var o in s)if(ex(s,o)){var l=s[o];if(l.scientific){var u=Math.abs(Math.log(t/Math.pow(l.value*r,i))/Math.LN10-e);(u<a||u===a&&l.name.length<n.name.length)&&(n=l,a=u)}}return n},E.prototype.splitUnit=function(e){for(var t=this.clone(),r=[],n=0;n<e.length&&(t=t.to(e[n]),n!==e.length-1);n++){var i=t.toNumeric(),a=p(i),l=void 0,u=new E(l=m(a,i)?a:h(t.toNumeric()),e[n].toString());r.push(u),t=o(t,u)}for(var c=0,f=0;f<r.length;f++)c=s(c,r[f].value);return m(c,this.value)&&(t.value=0),r.push(t),r};var q={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},R:{name:"R",value:1e27,scientific:!0},Q:{name:"Q",value:1e30,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0},r:{name:"r",value:1e-27,scientific:!0},q:{name:"q",value:1e-30,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},ronna:{name:"ronna",value:1e27,scientific:!0},quetta:{name:"quetta",value:1e30,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0}
vendor: 5,950 bytes, line 1
1,pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0},ronto:{name:"ronto",value:1e-27,scientific:!0},quecto:{name:"quecto",value:1e-30,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},R:{name:"R",value:1e54,scientific:!0},Q:{name:"Q",value:1e60,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0},r:{name:"r",value:1e-54,scientific:!0},q:{name:"q",value:1e-60,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},R:{name:"R",value:1e81,scientific:!0},Q:{name:"Q",value:1e90,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0},r:{name:"r",value:1e-81,scientific:!0},q:{name:"q",value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:1048576,scientific:!0},Gi:{name:"Gi",value:0x40000000,scientific:!0},Ti:{name:"Ti",value:0x10000000000,scientific:!0},Pi:{name:"Pi",value:0x4000000000000,scientific:!0},Ei:{name:"Ei",value:0x1000000000000000,scientific:!0},Zi:{name:"Zi",value:11805916207174113e5,scientific:!0},Yi:{name:"Yi",value:12089258196146292e8,scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:1048576,scientific:!0},gibi:{name:"gibi",value:0x40000000,scientific:!0},tebi:{name:"tebi",value:0x10000000000,scientific:!0},pebi:{name:"pebi",value:0x4000000000000,scientific:!0},exi:{name:"exi",value:0x1000000000000000,scientific:!0},zebi:{name:"zebi",value:11805916207174113e5,scientific:!0},yobi:{name:"yobi",value:12089258196146292e8,scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};q.SHORTLONG=nr({},q.SHORT,q.LONG),q.BINARY_SHORT=nr({},q.BINARY_SHORT_SI,q.BINARY_SHORT_IEC),q.BINARY_LONG=nr({},q.BINARY_LONG_SI,q.BINARY_LONG_IEC);var U=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],H={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var V in H)ex(H,V)&&(H[V].key=V);var W={name:"",base:{},value:1,offset:0,dimensions:U.map(e=>0)},G={meter:{name:"meter",base:H.LENGTH,prefixes:q.LONG,value:1,offset:0},inch:{name:"inch",base:H.LENGTH,prefixes:q.NONE,value:.0254,offset:0},foot:{name:"foot",base:H.LENGTH,prefixes:q.NONE,value:.3048,offset:0},yard:{name:"yard",base:H.LENGTH,prefixes:q.NONE,value:.9144,offset:0},mile:{name:"mile",base:H.LENGTH,prefixes:q.NONE,value:1609.344,offset:0},link:{name:"link",base:H.LENGTH,prefixes:q.NONE,value:.201168,offset:0}
1,rod:{name:"rod",base:H.LENGTH,prefixes:q.NONE,value:5.0292,offset:0},chain:{name:"chain",base:H.LENGTH,prefixes:q.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:H.LENGTH,prefixes:q.NONE,value:1e-10,offset:0},m:{name:"m",base:H.LENGTH,prefixes:q.SHORT,value:1,offset:0},in:{name:"in",base:H.LENGTH,prefixes:q.NONE,value:.0254,offset:0},ft:{name:"ft",base:H.LENGTH,prefixes:q.NONE,value:.3048,offset:0},yd:{name:"yd",base:H.LENGTH,prefixes:q.NONE,value:.9144,offset:0},mi:{name:"mi",base:H.LENGTH,prefixes:q.NONE,value:1609.344,offset:0},li:{name:"li",base:H.LENGTH,prefixes:q.NONE,value:.201168,offset:0},rd:{name:"rd",base:H.LENGTH,prefixes:q.NONE,value:5.02921,offset:0},ch:{name:"ch",base:H.LENGTH,prefixes:q.NONE,value:20.1168,offset:0},mil:{name:"mil",base:H.LENGTH,prefixes:q.NONE,value:254e-7,offset:0},m2:{name:"m2",base:H.SURFACE,prefixes:q.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:H.SURFACE,prefixes:q.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:H.SURFACE,prefixes:q.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:H.SURFACE,prefixes:q.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:H.SURFACE,prefixes:q.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:H.SURFACE,prefixes:q.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:H.SURFACE,prefixes:q.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:H.SURFACE,prefixes:q.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:H.SURFACE,prefixes:q.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:H.SURFACE,prefixes:q.NONE,value:1e4,offset:0},m3:{name:"m3",base:H.VOLUME,prefixes:q.CUBIC,value:1,offset:0},L:{name:"L",base:H.VOLUME,prefixes:q.SHORT,value:.001,offset:0},l:{name:"l",base:H.VOLUME,prefixes:q.SHORT,value:.001,offset:0},litre:{name:"litre",base:H.VOLUME,prefixes:q.LONG,value:.001,offset:0},cuin:{name:"cuin",base:H.VOLUME,prefixes:q.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:H.VOLUME,prefixes:q.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:H.VOLUME,prefixes:q.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:H.VOLUME,prefixes:q.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:H.VOLUME,prefixes:q.NONE,value:15e-6,offset:0},drop:{name:"drop",base:H.VOLUME,prefixes:q.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:H.VOLUME,prefixes:q.NONE,value:5e-8,offset:0},minim:{name:"minim",base:H.VOLUME,prefixes:q.NONE,value:61611519921875e-21,offset:0},fluiddram:{name:"fluiddram",base:H.VOLUME,prefixes:q.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:"fluidounce",base:H.VOLUME,prefixes:q.NONE,value:295735295625e-16,offset:0},gill:{name:"gill",base:H.VOLUME,prefixes:q.NONE,value:11829411825e-14,offset:0},cc:{name:"cc",base:H.VOLUME,prefixes:q.NONE,value:1e-6,offset:0},cup:{name:"cup",base:H.VOLUME,prefixes:q.NONE,value:2365882365e-13,offset:0},pint:{name:"pint",base:H.VOLUME,prefixes:q.NONE,value:473176473e-12,offset:0},quart:{name:"quart",base:H.VOLUME,prefixes:q.NONE,value:946352946e-12,offset:0},gallon:{name:"gallon",base:H.VOLUME,prefixes:q.NONE,value:.003785411784,offset:0},beerbarrel:{name:"beerbarrel",base:H.VOLUME,prefixes:q.NONE,value:.117347765304,offset:0},oilbarrel:{name:"oilbarrel",base:H.VOLUME,prefixes:q.NONE,value:.158987294928,offset:0},hogshead:{name:"hogshead",base:H.VOLUME,prefixes:q.NONE,value:.238480942392,offset:0},g:{name:"g",base:H.MASS,prefixes:q.SHORT,value:.001,offset:0},gram:{name:"gram",base:H.MASS,prefixes:q.LONG,value:.001,offset:0},ton:{name:"ton",base:H.MASS,prefixes:q.SHORT,value:907.18474,offset:0},t:{name:"t",base:H.MASS,prefixes:q.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:H.MASS,prefixes:q.LONG,value:1e3,offset:0},grain:{name:"grain",base:H.MASS,prefixes:q.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:H.MASS,prefixes:q.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:H.MASS,prefixes:q.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:H.MASS,prefixes:q.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:H.MASS,prefixes:q.NONE,value:45.359237,offset:0},stick:{name:"stick",base:H.MASS,prefixes:q.NONE,value:.115,offset:0},stone:{name:"stone",base:H.MASS,prefixes:q.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:H.MASS,prefixes:q.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:H.MASS,prefixes:q.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:H.MASS,prefixes:q.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:H.MASS,prefixes:q.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:H.MASS,prefixes:q.NONE,value:45.359237,offset:0}
1,s:{name:"s",base:H.TIME,prefixes:q.SHORT,value:1,offset:0},min:{name:"min",base:H.TIME,prefixes:q.NONE,value:60,offset:0},h:{name:"h",base:H.TIME,prefixes:q.NONE,value:3600,offset:0},second:{name:"second",base:H.TIME,prefixes:q.LONG,value:1,offset:0},sec:{name:"sec",base:H.TIME,prefixes:q.LONG,value:1,offset:0},minute:{name:"minute",base:H.TIME,prefixes:q.NONE,value:60,offset:0},hour:{name:"hour",base:H.TIME,prefixes:q.NONE,value:3600,offset:0},day:{name:"day",base:H.TIME,prefixes:q.NONE,value:86400,offset:0},week:{name:"week",base:H.TIME,prefixes:q.NONE,value:604800,offset:0},month:{name:"month",base:H.TIME,prefixes:q.NONE,value:2629800,offset:0},year:{name:"year",base:H.TIME,prefixes:q.NONE,value:0x1e187e0,offset:0},decade:{name:"decade",base:H.TIME,prefixes:q.NONE,value:315576e3,offset:0},century:{name:"century",base:H.TIME,prefixes:q.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:H.TIME,prefixes:q.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:H.FREQUENCY,prefixes:q.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:H.FREQUENCY,prefixes:q.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:H.ANGLE,prefixes:q.SHORT,value:1,offset:0},radian:{name:"radian",base:H.ANGLE,prefixes:q.LONG,value:1,offset:0},deg:{name:"deg",base:H.ANGLE,prefixes:q.SHORT,value:null,offset:0},degree:{name:"degree",base:H.ANGLE,prefixes:q.LONG,value:null,offset:0},grad:{name:"grad",base:H.ANGLE,prefixes:q.SHORT,value:null,offset:0},gradian:{name:"gradian",base:H.ANGLE,prefixes:q.LONG,value:null,offset:0},cycle:{name:"cycle",base:H.ANGLE,prefixes:q.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:H.ANGLE,prefixes:q.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:H.ANGLE,prefixes:q.NONE,value:null,offset:0},A:{name:"A",base:H.CURRENT,prefixes:q.SHORT,value:1,offset:0},ampere:{name:"ampere",base:H.CURRENT,prefixes:q.LONG,value:1,offset:0}
1,K:{name:"K",base:H.TEMPERATURE,prefixes:q.SHORT,value:1,offset:0},degC:{name:"degC",base:H.TEMPERATURE,prefixes:q.SHORT,value:1,offset:273.15},degF:{name:"degF",base:H.TEMPERATURE,prefixes:q.SHORT,value:new b(5,9),offset:459.67},degR:{name:"degR",base:H.TEMPERATURE,prefixes:q.SHORT,value:new b(5,9),offset:0},kelvin:{name:"kelvin",base:H.TEMPERATURE,prefixes:q.LONG,value:1,offset:0},celsius:{name:"celsius",base:H.TEMPERATURE,prefixes:q.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:H.TEMPERATURE,prefixes:q.LONG,value:new b(5,9),offset:459.67},rankine:{name:"rankine",base:H.TEMPERATURE,prefixes:q.LONG,value:new b(5,9),offset:0},mol:{name:"mol",base:H.AMOUNT_OF_SUBSTANCE,prefixes:q.SHORT,value:1,offset:0},mole:{name:"mole",base:H.AMOUNT_OF_SUBSTANCE,prefixes:q.LONG,value:1,offset:0},cd:{name:"cd",base:H.LUMINOUS_INTENSITY,prefixes:q.SHORT,value:1,offset:0},candela:{name:"candela",base:H.LUMINOUS_INTENSITY,prefixes:q.LONG,value:1,offset:0},N:{name:"N",base:H.FORCE,prefixes:q.SHORT,value:1,offset:0},newton:{name:"newton",base:H.FORCE,prefixes:q.LONG,value:1,offset:0},dyn:{name:"dyn",base:H.FORCE,prefixes:q.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:H.FORCE,prefixes:q.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:H.FORCE,prefixes:q.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:H.FORCE,prefixes:q.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:H.FORCE,prefixes:q.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:H.FORCE,prefixes:q.NONE,value:9.80665,offset:0},J:{name:"J",base:H.ENERGY,prefixes:q.SHORT,value:1,offset:0},joule:{name:"joule",base:H.ENERGY,prefixes:q.LONG,value:1,offset:0},erg:{name:"erg",base:H.ENERGY,prefixes:q.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:H.ENERGY,prefixes:q.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:H.ENERGY,prefixes:q.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:H.ENERGY,prefixes:q.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:H.ENERGY,prefixes:q.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:H.POWER,prefixes:q.SHORT,value:1,offset:0},watt:{name:"watt",base:H.POWER,prefixes:q.LONG,value:1,offset:0},hp:{name:"hp",base:H.POWER,prefixes:q.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:H.POWER,prefixes:q.SHORT,value:x.I,offset:0},VA:{name:"VA",base:H.POWER,prefixes:q.SHORT,value:1,offset:0},Pa:{name:"Pa",base:H.PRESSURE,prefixes:q.SHORT,value:1,offset:0},psi:{name:"psi",base:H.PRESSURE,prefixes:q.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:H.PRESSURE,prefixes:q.NONE,value:101325,offset:0},bar:{name:"bar",base:H.PRESSURE,prefixes:q.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:H.PRESSURE,prefixes:q.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:H.PRESSURE,prefixes:q.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:H.PRESSURE,prefixes:q.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:H.PRESSURE,prefixes:q.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:H.ELECTRIC_CHARGE,prefixes:q.LONG,value:1,offset:0},C:{name:"C",base:H.ELECTRIC_CHARGE,prefixes:q.SHORT,value:1,offset:0},Ah:{name:"Ah",base:H.ELECTRIC_CHARGE,prefixes:q.SHORT,value:3600,offset:0},farad:{name:"farad",base:H.ELECTRIC_CAPACITANCE,prefixes:q.LONG,value:1,offset:0},F:{name:"F",base:H.ELECTRIC_CAPACITANCE,prefixes:q.SHORT,value:1,offset:0},volt:{name:"volt",base:H.ELECTRIC_POTENTIAL,prefixes:q.LONG,value:1,offset:0},V:{name:"V",base:H.ELECTRIC_POTENTIAL,prefixes:q.SHORT,value:1,offset:0},ohm:{name:"ohm",base:H.ELECTRIC_RESISTANCE,prefixes:q.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:H.ELECTRIC_INDUCTANCE,prefixes:q.LONG,value:1,offset:0},H:{name:"H",base:H.ELECTRIC_INDUCTANCE,prefixes:q.SHORT,value:1,offset:0},siemens:{name:"siemens",base:H.ELECTRIC_CONDUCTANCE,prefixes:q.LONG,value:1,offset:0},S:{name:"S",base:H.ELECTRIC_CONDUCTANCE,prefixes:q.SHORT,value:1,offset:0},weber:{name:"weber",base:H.MAGNETIC_FLUX,prefixes:q.LONG,value:1,offset:0},Wb:{name:"Wb",base:H.MAGNETIC_FLUX,prefixes:q.SHORT,value:1,offset:0},tesla:{name:"tesla",base:H.MAGNETIC_FLUX_DENSITY,prefixes:q.LONG,value:1,offset:0},T:{name:"T",base:H.MAGNETIC_FLUX_DENSITY,prefixes:q.SHORT,value:1,offset:0},b:{name:"b",base:H.BIT,prefixes:q.BINARY_SHORT,value:1,offset:0}
1,bits:{name:"bits",base:H.BIT,prefixes:q.BINARY_LONG,value:1,offset:0},B:{name:"B",base:H.BIT,prefixes:q.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:H.BIT,prefixes:q.BINARY_LONG,value:8,offset:0}},$={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fldr:"fluiddram",fluiddrams:"fluiddram",floz:"fluidounce",fluidounces:"fluidounce",gi:"gill",gills:"gill",cp:"cup",cups:"cup",pt:"pint",pints:"pint",qt:"quart",quarts:"quart",gal:"gallon",gallons:"gallon",bbl:"beerbarrel",beerbarrels:"beerbarrel",obl:"oilbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Y(e){if("BigNumber"===e.number){var t=cb(y);G.rad.value=new y(1),G.deg.value=t.div(180),G.grad.value=t.div(200),G.cycle.value=t.times(2),G.arcsec.value=t.div(648e3),G.arcmin.value=t.div(10800)}else G.rad.value=1,G.deg.value=Math.PI/180,G.grad.value=Math.PI/200,G.cycle.value=2*Math.PI,G.arcsec.value=Math.PI/648e3,G.arcmin.value=Math.PI/10800;G.radian.value=G.rad.value,G.degree.value=G.deg.value,G.gradian.value=G.grad.value}Y(a),i&&i("config",function(e,t){e.number!==t.number&&Y(e)});var Z={si:{NONE:{unit:W,prefix:q.NONE[""]},LENGTH:{unit:G.m,prefix:q.SHORT[""]},MASS:{unit:G.g,prefix:q.SHORT.k},TIME:{unit:G.s,prefix:q.SHORT[""]},CURRENT:{unit:G.A,prefix:q.SHORT[""]},TEMPERATURE:{unit:G.K,prefix:q.SHORT[""]},LUMINOUS_INTENSITY:{unit:G.cd,prefix:q.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:G.mol,prefix:q.SHORT[""]},ANGLE:{unit:G.rad,prefix:q.SHORT[""]},BIT:{unit:G.bits,prefix:q.SHORT[""]},FORCE:{unit:G.N,prefix:q.SHORT[""]},ENERGY:{unit:G.J,prefix:q.SHORT[""]},POWER:{unit:G.W,prefix:q.SHORT[""]},PRESSURE:{unit:G.Pa,prefix:q.SHORT[""]},ELECTRIC_CHARGE:{unit:G.C,prefix:q.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:G.F,prefix:q.SHORT[""]},ELECTRIC_POTENTIAL:{unit:G.V,prefix:q.SHORT[""]},ELECTRIC_RESISTANCE:{unit:G.ohm,prefix:q.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:G.H,prefix:q.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:G.S,prefix:q.SHORT[""]},MAGNETIC_FLUX:{unit:G.Wb,prefix:q.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:G.T,prefix:q.SHORT[""]},FREQUENCY:{unit:G.Hz,prefix:q.SHORT[""]}}};Z.cgs=JSON.parse(JSON.stringify(Z.si)),Z.cgs.LENGTH={unit:G.m,prefix:q.SHORT.c},Z.cgs.MASS={unit:G.g,prefix:q.SHORT[""]},Z.cgs.FORCE={unit:G.dyn,prefix:q.SHORT[""]},Z.cgs.ENERGY={unit:G.erg,prefix:q.NONE[""]},Z.us=JSON.parse(JSON.stringify(Z.si)),Z.us.LENGTH={unit:G.ft,prefix:q.NONE[""]},Z.us.MASS={unit:G.lbm,prefix:q.NONE[""]},Z.us.TEMPERATURE={unit:G.degF,prefix:q.NONE[""]},Z.us.FORCE={unit:G.lbf,prefix:q.NONE[""]},Z.us.ENERGY={unit:G.BTU,prefix:q.BTU[""]},Z.us.POWER={unit:G.hp,prefix:q.NONE[""]},Z.us.PRESSURE={unit:G.psi,prefix:q.NONE[""]},Z.auto=JSON.parse(JSON.stringify(Z.si));var X=Z.auto;for(var J in E.setUnitSystem=function(e){if(ex(Z,e))X=Z[e];else throw Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(Z).join(", "))},E.getUnitSystem=function(){for(var e in Z)if(ex(Z,e)&&Z[e]===X)return e},E.typeConverters={BigNumber:function(e){return null!=e&&e.isFraction?new y(String(e.n)).div(String(e.d)).times(String(e.s)):new y(e+"")},Fraction:function(e){return new b(e)},Complex:function(e){return e},number:function(e){return null!=e&&e.isFraction?v(e):e}},E.prototype._numberConverter=function(){var e=E.typeConverters[this.valueType()];if(e)return e;throw TypeError('Unsupported Unit value type "'+this.valueType()+'"')},E._getNumberConverter=function(e){if(!E.typeConverters[e])throw TypeError('Unsupported type "'+e+'"');return E.typeConverters[e]},G)if(ex(G,J)){var K=G[J];K.dimensions=K.base.dimensions}for(var Q in $)if(ex($,Q)){var ee=G[$[Q]],et={};for(var er in ee)ex(ee,er)&&(et[er]=ee[er]);et.name=Q,G[Q]=et}function en(e){for(var t=0;t<e.length;t++){if(n=e.charAt(t),0===t&&!E.isValidAlpha(n))throw Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(t>0&&!(E.isValidAlpha(n)||M(n)))throw Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}return E.isValidAlpha=function(e){return/^[a-zA-Z]$/.test(e)},E.createUnit=function(e,t){if("object"!=typeof e)throw TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override){for(var r in e)if(ex(e,r)&&E.deleteUnit(r),e[r].aliases)for(var n,i=0;i<e[r].aliases.length;i++)E.deleteUnit(e[r].aliases[i])}for(var a in e)ex(e,a)&&(n=E.createUnitSingle(a,e[a]));return n},E.createUnitSingle=function(e,t){if(null==t&&(t={}),"string"!=typeof e)throw TypeError("createUnitSingle expects first parameter to be of type 'string'");if(ex(G,e))throw Error('Cannot create unit "'+e+'": a unit with that name already exists');en(e);var r,n,i,a=null,s=[],o=0;if(t&&"Unit"===t.type)a=t.clone();else if("string"==typeof t)""!==t&&(r=t);else if("object"==typeof t)r=t.definition,n=t.prefixes,o=t.offset,i=t.baseName,t.aliases&&(s=t.aliases.valueOf());else throw TypeError('Cannot create unit "'+e+'" from "'+t.toString()+'": expecting "string" or "Unit" or "Object"');if(s){for(var l=0;l<s.length;l++)if(ex(G,s[l]))throw Error('Cannot create alias "'+s[l]+'": a unit with that name already exists')}if(r&&"string"==typeof r&&!a)try{a=E.parse(r,{allowNoUnits:!0})}catch(t){throw t.message='Could not create unit "'+e+'" from "'+r+'": '+t.message,t}else r&&"Unit"===r.type&&(a=r.clone());s=s||[],o=o||0,n=n&&n.toUpperCase&&q[n.toUpperCase()]||q.NONE;var u={};if(a){u={name:e,value:a.value,dimensions:a.dimensions.slice(0),prefixes:n,offset:o};var c=!1;for(var f in H)if(ex(H,f)){for(var h=!0,p=0;p<U.length;p++)if(Math.abs((u.dimensions[p]||0)-(H[f].dimensions[p]||0))>1e-12){h=!1;break}if(h){c=!0,u.base=H[f];break}}if(!c){i=i||e+"_STUFF";var m={dimensions:a.dimensions.slice(0)};m.key=i,H[i]=m,X[i]={unit:u,prefix:q.NONE[""]},u.base=H[i]}}else{if(i=i||e+"_STUFF",U.indexOf(i)>=0)throw Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');for(var d in U.push(i),H)ex(H,d)&&(H[d].dimensions[U.length-1]=0);for(var g={dimensions:[]},v=0;v<U.length;v++)g.dimensions[v]=0;g.dimensions[U.length-1]=1,g.key=i,H[i]=g,u={name:e,value:1,dimensions:H[i].dimensions.slice(0),prefixes:n,offset:o,base:H[i]},X[i]={unit:u,prefix:q.NONE[""]}}E.UNITS[e]=u;for(var x=0;x<s.length;x++){var y=s[x],b={};for(var w in u)ex(u,w)&&(b[w]=u[w]);b.name=y,E.UNITS[y]=b}return delete j.cache,new E(null,e)},E.deleteUnit=function(e){delete E.UNITS[e],delete j.cache},E.PREFIXES=q,E.BASE_DIMENSIONS=U,E.BASE_UNITS=H,E.UNIT_SYSTEMS=Z,E.UNITS=G,E},{isClass:!0}),cE="unit",cN=ew(cE,["typed","Unit"],e=>{var{typed:t,Unit:r}=e;return t(cE,{Unit:function(e){return e.clone()},string:function(e){return r.isValuelessUnit(e)?new r(null,e):r.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(e,t){return new r(e,t)},"number | BigNumber | Fraction":function(e){return new r(e)},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),cS="sparse",cM=ew(cS,["typed","SparseMatrix"],e=>{var{typed:t,SparseMatrix:r}=e;return t(cS,{"":function(){return new r([])}
1,string:function(e){return new r([],e)},"Array | Matrix":function(e){return new r(e)},"Array | Matrix, string":function(e,t){return new r(e,t)}})}),cT="createUnit",ck=ew(cT,["typed","Unit"],e=>{var{typed:t,Unit:r}=e;return t(cT,{"Object, Object":function(e,t){return r.createUnit(e,t)},Object:function(e){return r.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,t,n){var i={};return i[e]=t,r.createUnit(i,n)},"string, Unit | string | Object":function(e,t){var n={};return n[e]=t,r.createUnit(n,{})},string:function(e){var t={};return t[e]={},r.createUnit(t,{})}})}),cF="acos",cB=ew(cF,["typed","config","Complex"],e=>{var{typed:t,config:r,Complex:n}=e;return t(cF,{number:function(e){return e>=-1&&e<=1||r.predictable?Math.acos(e):new n(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()}})}),cP="number",cj="number, number";function cO(e){return eG(e)}function cI(e){return Math.atan(1/e)}function cz(e){return Number.isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function cL(e){return Math.asin(1/e)}function cR(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function cq(e){return Math.acos(1/e)}function cU(e){var t=1/e;return Math.log(Math.sqrt(t*t-1)+t)}function cH(e){return e$(e)}function cV(e){return eY(e)}function cW(e){return 1/Math.tan(e)}function cG(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function c$(e){return 1/Math.sin(e)}function cY(e){return 0===e?1/0:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*eS(e)}function cZ(e){return 1/Math.cos(e)}function cX(e){return 2/(Math.exp(e)+Math.exp(-e))}function cJ(e){return eX(e)}cO.signature=cP,cI.signature=cP,cz.signature=cP,cL.signature=cP,cR.signature=cP,cq.signature=cP,cU.signature=cP,cH.signature=cP,cV.signature=cP,cW.signature=cP,cG.signature=cP,c$.signature=cP,cY.signature=cP,cZ.signature=cP,cX.signature=cP,cJ.signature=cP;var cK="acosh",cQ=ew(cK,["typed","config","Complex"],e=>{var{typed:t,config:r,Complex:n}=e;return t(cK,{number:function(e){return e>=1||r.predictable?cO(e):e<=-1?new n(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new n(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()}})}),c0="acot",c1=ew(c0,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t(c0,{number:cI,Complex:function(e){return e.acot()},BigNumber:function(e){return new r(1).div(e).atan()}})}),c2="acoth",c3=ew(c2,["typed","config","Complex","BigNumber"],e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(c2,{number:function(e){return e>=1||e<=-1||r.predictable?cz(e):new n(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new i(1).div(e).atanh()}})}),c4="acsc",c6=ew(c4,["typed","config","Complex","BigNumber"],e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(c4,{number:function(e){return e<=-1||e>=1||r.predictable?cL(e):new n(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new i(1).div(e).asin()}})}),c5="acsch",c8=ew(c5,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t(c5,{number:cR,Complex:function(e){return e.acsch()},BigNumber:function(e){return new r(1).div(e).asinh()}})}),c9="asec",c7=ew(c9,["typed","config","Complex","BigNumber"],e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(c9,{number:function(e){return e<=-1||e>=1||r.predictable?cq(e):new n(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new i(1).div(e).acos()}})}),fe="asech",ft=ew(fe,["typed","config","Complex","BigNumber"],e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(fe,{number:function(e){if(e<=1&&e>=-1||r.predictable){var t=1/e;return t>0||r.predictable?cU(e):new n(Math.log(Math.sqrt(t*t-1)-t),Math.PI)}return new n(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new i(1).div(e).acosh()}})}),fr="asin",fn=ew(fr,["typed","config","Complex"],e=>{var{typed:t,config:r,Complex:n}=e;return t(fr,{number:function(e){return e>=-1&&e<=1||r.predictable?Math.asin(e):new n(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()}})}),fi=ew("asinh",["typed"],e=>{var{typed:t}=e;
1return t("asinh",{number:cH,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()}})}),fa=ew("atan",["typed"],e=>{var{typed:t}=e;return t("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()}})}),fs="atan2",fo=ew(fs,["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:i,DenseMatrix:a,concat:s}=e,o=a4({typed:t,equalScalar:n}),l=a6({typed:t}),u=sL({typed:t,equalScalar:n}),c=aj({typed:t,equalScalar:n}),f=aO({typed:t,DenseMatrix:a}),h=se({typed:t,matrix:r,concat:s});return t(fs,{"number, number":Math.atan2,"BigNumber, BigNumber":(e,t)=>i.atan2(e,t)},h({scalar:"number | BigNumber",SS:u,DS:l,SD:o,Ss:c,sS:f}))}),fl="atanh",fu=ew(fl,["typed","config","Complex"],e=>{var{typed:t,config:r,Complex:n}=e;return t(fl,{number:function(e){return e<=1&&e>=-1||r.predictable?cV(e):new n(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()}})}),fc=ew("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(e=>r=>{if(!r.hasBase(r.constructor.BASE_UNITS.ANGLE))throw TypeError("Unit in function cot is no angle");return t.find(e,r.valueType())(r.value)})}}),ff="cos",fh=ew(ff,["typed"],e=>{var{typed:t}=e,r=fc({typed:t});return t(ff,{number:Math.cos,"Complex | BigNumber":e=>e.cos()},r)}),fp="cosh",fm=ew(fp,["typed"],e=>{var{typed:t}=e;return t(fp,{number:eZ,"Complex | BigNumber":e=>e.cosh()})}),fd="cot",fg=ew(fd,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e,n=fc({typed:t});return t(fd,{number:cW,Complex:e=>e.cot(),BigNumber:e=>new r(1).div(e.tan())},n)}),fv="coth",fx=ew(fv,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t(fv,{number:cG,Complex:e=>e.coth(),BigNumber:e=>new r(1).div(e.tanh())})}),fy="csc",fb=ew(fy,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e,n=fc({typed:t});return t(fy,{number:c$,Complex:e=>e.csc(),BigNumber:e=>new r(1).div(e.sin())},n)}),fw="csch",f_=ew(fw,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t(fw,{number:cY,Complex:e=>e.csch(),BigNumber:e=>new r(1).div(e.sinh())})}),fD="sec",fC=ew(fD,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e,n=fc({typed:t});return t(fD,{number:cZ,Complex:e=>e.sec(),BigNumber:e=>new r(1).div(e.cos())},n)}),fA="sech",fE=ew(fA,["typed","BigNumber"],e=>{var{typed:t,BigNumber:r}=e;return t(fA,{number:cX,Complex:e=>e.sech(),BigNumber:e=>new r(1).div(e.cosh())})}),fN="sin",fS=ew(fN,["typed"],e=>{var{typed:t}=e,r=fc({typed:t});return t(fN,{number:Math.sin,"Complex | BigNumber":e=>e.sin()},r)}),fM="sinh",fT=ew(fM,["typed"],e=>{var{typed:t}=e;return t(fM,{number:cJ,"Complex | BigNumber":e=>e.sinh()})}),fk="tan",fF=ew(fk,["typed"],e=>{var{typed:t}=e,r=fc({typed:t});return t(fk,{number:Math.tan,"Complex | BigNumber":e=>e.tan()},r)}),fB=ew("tanh",["typed"],e=>{var{typed:t}=e;return t("tanh",{number:eJ,"Complex | BigNumber":e=>e.tanh()})}),fP="setCartesian",fj=ew(fP,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return t(fP,{"Array | Matrix, Array | Matrix":function(e,t){var o=[];if(0!==n(r(e),new a(0))&&0!==n(r(t),new a(0))){var l=nO(Array.isArray(e)?e:e.toArray()).sort(i),u=nO(Array.isArray(t)?t:t.toArray()).sort(i);o=[];for(var c=0;c<l.length;c++)for(var f=0;f<u.length;f++)o.push([l[c],u[f]])}return Array.isArray(e)&&Array.isArray(t)?o:new s(o)}})}),fO="setDifference",fI=ew(fO,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return t(fO,{"Array | Matrix, Array | Matrix":function(e,t){var o;if(0===n(r(e),new a(0)))o=[];else{if(0===n(r(t),new a(0)))return nO(e.toArray());var l,u=nU(nO(Array.isArray(e)?e:e.toArray()).sort(i)),c=nU(nO(Array.isArray(t)?t:t.toArray()).sort(i));o=[];for(var f=0;f<u.length;f++){l=!1;for(var h=0;h<c.length;h++)if(0===i(u[f].value,c[h].value)&&u[f].identifier===c[h].identifier){l=!0;break}l||o.push(u[f])}}return Array.isArray(e)&&Array.isArray(t)?nH(o):new s(nH(o))}})}),fz="setDistinct",fL=ew(fz,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return t(fz,{"Array | Matrix":function(e){var t;if(0===n(r(e),new a(0)))t=[];else{var o=nO(Array.isArray(e)?e:e.toArray()).sort(i);(t=[]).push(o[0]);for(var l=1;l<o.length;
1l++)0!==i(o[l],o[l-1])&&t.push(o[l])}return Array.isArray(e)?t:new s(t)}})}),fR="setIntersect",fq=ew(fR,["typed","size","subset","compareNatural","Index","DenseMatrix"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:s}=e;return t(fR,{"Array | Matrix, Array | Matrix":function(e,t){var o;if(0===n(r(e),new a(0))||0===n(r(t),new a(0)))o=[];else{var l=nU(nO(Array.isArray(e)?e:e.toArray()).sort(i)),u=nU(nO(Array.isArray(t)?t:t.toArray()).sort(i));o=[];for(var c=0;c<l.length;c++)for(var f=0;f<u.length;f++)if(0===i(l[c].value,u[f].value)&&l[c].identifier===u[f].identifier){o.push(l[c]);break}}return Array.isArray(e)&&Array.isArray(t)?nH(o):new s(nH(o))}})}),fU="setIsSubset",fH=ew(fU,["typed","size","subset","compareNatural","Index"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(fU,{"Array | Matrix, Array | Matrix":function(e,t){if(0===n(r(e),new a(0)))return!0;if(0===n(r(t),new a(0)))return!1;for(var s,o=nU(nO(Array.isArray(e)?e:e.toArray()).sort(i)),l=nU(nO(Array.isArray(t)?t:t.toArray()).sort(i)),u=0;u<o.length;u++){s=!1;for(var c=0;c<l.length;c++)if(0===i(o[u].value,l[c].value)&&o[u].identifier===l[c].identifier){s=!0;break}if(!1===s)return!1}return!0}})}),fV="setMultiplicity",fW=ew(fV,["typed","size","subset","compareNatural","Index"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(fV,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,t){if(0===n(r(t),new a(0)))return 0;for(var s=nO(Array.isArray(t)?t:t.toArray()),o=0,l=0;l<s.length;l++)0===i(s[l],e)&&o++;return o}})}),fG="setPowerset",f$=ew(fG,["typed","size","subset","compareNatural","Index"],e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(fG,{"Array | Matrix":function(e){if(0===n(r(e),new a(0)))return[];for(var t=nO(Array.isArray(e)?e:e.toArray()).sort(i),l=[],u=0;u.toString(2).length<=t.length;)l.push(s(t,u.toString(2).split("").reverse())),u++;return o(l)}});function s(e,t){for(var r=[],n=0;n<t.length;n++)"1"===t[n]&&r.push(e[n]);return r}function o(e){for(var t=[],r=e.length-1;r>0;r--)for(var n=0;n<r;n++)e[n].length>e[n+1].length&&(t=e[n],e[n]=e[n+1],e[n+1]=t);return e}}),fY="setSize",fZ=ew(fY,["typed","compareNatural"],e=>{var{typed:t,compareNatural:r}=e;return t(fY,{"Array | Matrix":function(e){return Array.isArray(e)?nO(e).length:nO(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return Array.isArray(e)?nO(e).length:nO(e.toArray()).length;for(var n=nO(Array.isArray(e)?e:e.toArray()).sort(r),i=1,a=1;a<n.length;a++)0!==r(n[a],n[a-1])&&i++;return i}})}),fX="setSymDifference",fJ=ew(fX,["typed","size","concat","subset","setDifference","Index"],e=>{var{typed:t,size:r,concat:n,subset:i,setDifference:a,Index:s}=e;return t(fX,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(r(e),new s(0)))return nO(t);if(0===i(r(t),new s(0)))return nO(e);var o=nO(e),l=nO(t);return n(a(o,l),a(l,o))}})}),fK="setUnion",fQ=ew(fK,["typed","size","concat","subset","setIntersect","setSymDifference","Index"],e=>{var{typed:t,size:r,concat:n,subset:i,setIntersect:a,setSymDifference:s,Index:o}=e;return t(fK,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(r(e),new o(0)))return nO(t);if(0===i(r(t),new o(0)))return nO(e);var l=nO(e),u=nO(t);return n(s(l,u),a(l,u))}})}),f0="add",f1=ew(f0,["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:i,DenseMatrix:a,SparseMatrix:s,concat:o}=e,l=sn({typed:t}),u=si({typed:t,equalScalar:i}),c=sa({typed:t,DenseMatrix:a}),f=se({typed:t,matrix:r,concat:o});return t(f0,{"any, any":n,"any, any, ...any":t.referToSelf(e=>(t,r,n)=>{for(var i=e(t,r),a=0;a<n.length;a++)i=e(i,n[a]);return i})},f({elop:n,DS:l,SS:u,Ss:c}))}),f2="hypot",f3=ew(f2,["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],e=>{var{typed:t,abs:r,addScalar:n,divideScalar:i,multiplyScalar:a,sqrt:s,smaller:o,isPositive:l}=e;return t(f2,{"... number | BigNumber":u,Array:u,Matrix:e=>u(nO(e.toArray(),!0))});function u(e){for(var t=0,u=0,c=0;c<e.length;c++){if(_(e[c]))throw TypeError("Unexpected type of argument to hypot");var f=r(e[c]);o(u,f)?(t=n(t=a(t,a(i(u,f),i(u,f))),1),u=f):t=n(t,l(f)?a(i(f,u),i(f,u)):f)}return a(u,s(t))}}),f4="norm",f6=ew(f4,["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],e=>{var{typed:t,abs:r,add:n,pow:i,conj:a,sqrt:s,multiply:o,equalScalar:l,larger:u,smaller:c,matrix:f,ctranspose:h,eigs:p}=e;return t(f4,{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return _(f(e),2)},Matrix:function(e){return _(e,2)},"Array, number | BigNumber | string":function(e,t){return _(f(e),t)},"Matrix, number | BigNumber | string":function(e,t){return _(e,t)}});function m(e){var t=0;return e.forEach(function(e){var n=r(e);u(n,t)&&(t=n)},!0),t}function d(e){var t;return e.forEach(function(e){var n=r(e);(!t||c(n,t))&&(t=n)},!0),t||0}function g(e,t){if(t===1/0||"inf"===t)return m(e);
1if(t===-1/0||"-inf"===t)return d(e);if("fro"===t)return _(e,2);if("number"==typeof t&&!isNaN(t)){if(!l(t,0)){var a=0;return e.forEach(function(e){a=n(i(r(e),t),a)},!0),i(a,1/t)}return 1/0}throw Error("Unsupported parameter value")}function v(e){var t=0;return e.forEach(function(e,r){t=n(t,o(e,a(e)))}),r(s(t))}function x(e){var t=[],i=0;return e.forEach(function(e,a){var s=a[1],o=n(t[s]||0,r(e));u(o,i)&&(i=o),t[s]=o},!0),i}function y(e){var t=e.size();if(t[0]!==t[1])throw RangeError("Invalid matrix dimensions");var n=p(o(h(e),e)).values.toArray();return r(s(n[n.length-1]))}function b(e){var t=[],i=0;return e.forEach(function(e,a){var s=a[0],o=n(t[s]||0,r(e));u(o,i)&&(i=o),t[s]=o},!0),i}function w(e,t){if(1===t)return x(e);if(t===1/0||"inf"===t)return b(e);if("fro"===t)return v(e);if(2===t)return y(e);throw Error("Unsupported parameter value "+t)}function _(e,t){var r=e.size();if(1===r.length)return g(e,t);if(2===r.length)if(r[0]&&r[1])return w(e,t);else throw RangeError("Invalid matrix dimensions")}}),f5="dot",f8=ew(f5,["typed","addScalar","multiplyScalar","conj","size"],e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:i,size:a}=e;return t(f5,{"Array | DenseMatrix, Array | DenseMatrix":o,"SparseMatrix, SparseMatrix":l});function s(e,t){var r,n,i=a(e),s=a(t);if(1===i.length)r=i[0];else if(2===i.length&&1===i[1])r=i[0];else throw RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");if(1===s.length)n=s[0];else if(2===s.length&&1===s[1])n=s[0];else throw RangeError("Expected a column vector, instead got a matrix of size ("+s.join(", ")+")");if(r!==n)throw RangeError("Vectors must have equal length ("+r+" != "+n+")");if(0===r)throw RangeError("Cannot calculate the dot product of empty vectors");return r}function o(e,o){var l=s(e,o),u=N(e)?e._data:e,c=N(e)?e._datatype||e.getDataType():void 0,f=N(o)?o._data:o,h=N(o)?o._datatype||o.getDataType():void 0,p=2===a(e).length,m=2===a(o).length,d=r,g=n;if(c&&h&&c===h&&"string"==typeof c&&"mixed"!==c){var v=c;d=t.find(r,[v,v]),g=t.find(n,[v,v])}if(!p&&!m){for(var x=g(i(u[0]),f[0]),y=1;y<l;y++)x=d(x,g(i(u[y]),f[y]));return x}if(!p&&m){for(var b=g(i(u[0]),f[0][0]),w=1;w<l;w++)b=d(b,g(i(u[w]),f[w][0]));return b}if(p&&!m){for(var _=g(i(u[0][0]),f[0]),D=1;D<l;D++)_=d(_,g(i(u[D][0]),f[D]));return _}if(p&&m){for(var C=g(i(u[0][0]),f[0][0]),A=1;A<l;A++)C=d(C,g(i(u[A][0]),f[A][0]));return C}}function l(e,t){s(e,t);for(var i=e._index,a=e._values,o=t._index,l=t._values,u=0,c=r,f=n,h=0,p=0;h<i.length&&p<o.length;){var m=i[h],d=o[p];if(m<d){h++;continue}if(m>d){p++;continue}m===d&&(u=c(u,f(a[h],l[p])),h++,p++)}return u}}),f9=ew("trace",["typed","matrix","add"],e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(e){return i(r(e))},SparseMatrix:a,DenseMatrix:i,any:ec});function i(e){var t=e._size,r=e._data;switch(t.length){case 1:if(1===t[0])return ec(r[0]);throw RangeError("Matrix must be square (size: "+nc(t)+")");case 2:var i=t[0];if(i===t[1]){for(var a=0,s=0;s<i;s++)a=n(a,r[s][s]);return a}throw RangeError("Matrix must be square (size: "+nc(t)+")");default:throw RangeError("Matrix must be two dimensional (size: "+nc(t)+")")}}function a(e){var t=e._values,r=e._index,i=e._ptr,a=e._size,s=a[0],o=a[1];if(s===o){var l=0;if(t.length>0)for(var u=0;u<o;u++)for(var c=i[u],f=i[u+1],h=c;h<f;h++){var p=r[h];if(p===u){l=n(l,t[h]);break}if(p>u)break}return l}throw RangeError("Matrix must be square (size: "+nc(a)+")")}}),f7="index",he=ew(f7,["typed","Index"],e=>{var{typed:t,Index:r}=e;return t(f7,{"...number | string | BigNumber | Range | Array | Matrix":function(e){var t=e.map(function(e){return b(e)?e.toNumber():E(e)||N(e)?e.map(function(e){return b(e)?e.toNumber():e}):e}),n=new r;return r.apply(n,t),n}})}),ht=new Set(["end"]),hr=ew("Node",["mathWithTransform"],e=>{var{mathWithTransform:t}=e;function r(e){for(var t of[...ht])if(e.has(t))throw Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(e){return this.compile().evaluate(e)}compile(){var e=this._compile(t,{}),n={},i=null;return{evaluate:function(t){var a=v(t);return r(a),e(a,n,i)}}}_compile(e,t){throw Error("Method _compile must be implemented by type "+this.type)}forEach(e){throw Error("Cannot run forEach on a Node interface")}map(e){throw Error("Cannot run map on a Node interface")}_ifNode(e){if(!et(e))throw TypeError("Callback function must return a Node");return e}traverse(e){function t(e,r){e.forEach(function(e,n,i){r(e,n,i),t(e,r)})}e(this,null,null),t(this,e)}transform(e){function t(r,n,i){var a=e(r,n,i);return a!==r?a:r.map(t)}return t(this,null,null)}filter(e){var t=[];
1return this.traverse(function(r,n,i){e(r,n,i)&&t.push(r)}),t}clone(){throw Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(e){return e.cloneDeep()})}equals(e){return!!e&&this.type===e.type&&em(this,e)}toString(e){var t=this._getCustomString(e);return void 0!==t?t:this._toString(e)}_toString(){throw Error("_toString not implemented for "+this.type)}toJSON(){throw Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(e){var t=this._getCustomString(e);return void 0!==t?t:this._toHTML(e)}_toHTML(){throw Error("_toHTML not implemented for "+this.type)}toTex(e){var t=this._getCustomString(e);return void 0!==t?t:this._toTex(e)}_toTex(e){throw Error("_toTex not implemented for "+this.type)}_getCustomString(e){if(e&&"object"==typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function hn(e){return e&&e.isIndexError?new ny(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function hi(e){var{subset:t}=e;return function(e,r){try{if(Array.isArray(e))return t(e,r);if(e&&"function"==typeof e.subset)return e.subset(r);if("string"==typeof e)return t(e,r);else if("object"==typeof e){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return i(e,r.getObjectProperty())}else throw TypeError("Cannot apply index: unsupported type of object")}catch(e){throw hn(e)}}}var ha="AccessorNode",hs=ew(ha,["subset","Node"],e=>{var{subset:t,Node:r}=e,n=hi({subset:t});function a(e){return!(W(e)||G(e)||X(e)||Q(e)||er(e)||ei(e)||eo(e))}class s extends r{constructor(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(super(),!et(e))throw TypeError('Node expected for parameter "object"');if(!ee(t))throw TypeError('IndexNode expected for parameter "index"');this.object=e,this.index=t,this.optionalChaining=r}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return ha}get isAccessorNode(){return!0}_compile(e,t){var r=this.object._compile(e,t),a=this.index._compile(e,t),s=this.optionalChaining,o=W(this.object)&&this.object.optionalChaining;if(!this.index.isObjectProperty())return function(e,t,i){var l=i||{},u=r(e,t,l);if(s&&null==u){l.optionalShortCircuit=!0;return}if(!o||null==l||!l.optionalShortCircuit){var c=a(e,t,u);return n(u,c)}};var l=this.index.getObjectProperty();return function(e,t,n){var a=n||{},u=r(e,t,a);if(s&&null==u){a.optionalShortCircuit=!0;return}if(!o||null==a||!a.optionalShortCircuit)return i(u,l)}}forEach(e){e(this.object,"object",this),e(this.index,"index",this)}map(e){return new s(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)),this.optionalChaining)}clone(){return new s(this.object,this.index,this.optionalChaining)}_toString(e){var t=this.object.toString(e);return a(this.object)&&(t="("+t+")"),t+(this.optionalChaining?this.index.dotNotation?"?":"?.":"")+this.index.toString(e)}_toHTML(e){var t=this.object.toHTML(e);return a(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)}_toTex(e){var t=this.object.toTex(e);return a(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)}toJSON(){return{mathjs:ha,object:this.object,index:this.index,optionalChaining:this.optionalChaining}}static fromJSON(e){return new s(e.object,e.index,e.optionalChaining)}}return lE(s,"name",ha),s},{isClass:!0,isNode:!0}),ho="ArrayNode",hl=ew(ho,["Node"],e=>{var{Node:t}=e;class r extends t{constructor(e){if(super(),this.items=e||[],!Array.isArray(this.items)||!this.items.every(et))throw TypeError("Array containing Nodes expected")}get type(){return ho}get isArrayNode(){return!0}_compile(e,t){var r=nI(this.items,function(r){return r._compile(e,t)});if("Array"===e.config.matrix)return function(e,t,n){return nI(r,function(r){return r(e,t,n)})};var n=e.matrix;return function(e,t,i){return n(nI(r,function(r){return r(e,t,i)}))}}forEach(e){for(var t=0;t<this.items.length;t++)e(this.items[t],"items["+t+"]",this)}map(e){for(var t=[],n=0;n<this.items.length;n++)t[n]=this._ifNode(e(this.items[n],"items["+n+"]",this));return new r(t)}clone(){return new r(this.items.slice(0))}_toString(e){return"["+this.items.map(function(t){return t.toString(e)}).join(", ")+"]"}toJSON(){return{mathjs:ho,items:this.items}}static fromJSON(e){return new r(e.items)}_toHTML(e){return'<span class="math-parenthesis math-square-parenthesis">[</span>'+this.items.map(function(t){return t.toHTML(e)}).join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(e){function t(r,n){var i=r.some(G)&&!r.every(G),a=n||i,s=a?"&":"\\\\",o=r.map(function(r){return r.items?t(r.items,!n):r.toTex(e)}).join(s);return i||!a||a&&!n?"\\begin{bmatrix}"+o+"\\end{bmatrix}":o}return t(this.items,!1)}}return lE(r,"name",ho),r},{isClass:!0,isNode:!0});function hu(e){var{subset:t,matrix:r}=e;return function(e,n,i){try{if(Array.isArray(e))return r(e).subset(n,i).valueOf().forEac
1h((t,r)=>{e[r]=t}),e;if(e&&"function"==typeof e.subset)return e.subset(n,i);if("string"==typeof e)return t(e,n,i);else if("object"==typeof e){if(!n.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return a(e,n.getObjectProperty(),i),e}else throw TypeError("Cannot apply index: unsupported type of object")}catch(e){throw hn(e)}}}var hc=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:nullish":{op:"??",associativity:"left",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function hf(e,t){if(!t||"auto"!==t)return e;for(var r=e;ei(r);)r=r.content;return r}function hh(e,t,r,n){var i=e;"keep"!==t&&(i=e.getContent());for(var a=i.getIdentifier(),s=null,o=0;o<hc.length;o++)if(a in hc[o]){s=o;break}if("OperatorNode:multiply"===a&&i.implicit&&"show"!==r){var l=hf(i.args[0],t);X(l)&&n&&"OperatorNode:divide"===n.getIdentifier()&&J(hf(n.args[0],t))||"OperatorNode:divide"===l.getIdentifier()&&J(hf(l.args[0],t))&&X(hf(l.args[1]))||(s+=1)}return s}function hp(e,t){var r=e;"keep"!==t&&(r=e.getContent());var n=r.getIdentifier(),i=hh(r,t);if(null===i)return null;var a=hc[i][n];if(ex(a,"associativity")){if("left"===a.associativity)return"left";if("right"===a.associativity)return"right";throw Error("'"+n+"' has the invalid associativity '"+a.associativity+"'.")}return null}function hm(e,t,r){var n="keep"!==r?e.getContent():e,i="keep"!==r?e.getContent():t,a=n.getIdentifier(),s=i.getIdentifier(),o=hh(n,r);if(null===o)return null;var l=hc[o][a];if(ex(l,"associativeWith")&&l.associativeWith instanceof Array){for(var u=0;u<l.associativeWith.length;u++)if(l.associativeWith[u]===s)return!0;return!1}return null}function hd(e){var t="OperatorNode:"+e;for(var r of hc)if(t in r)return r[t].op;return null}var hg="AssignmentNode",hv=ew(hg,["subset","?matrix","Node"],e=>{var{subset:t,matrix:r,Node:n}=e,s=hi({subset:t}),o=hu({subset:t,matrix:r});function l(e,t,r){t||(t="keep");var n=hh(e,t,r),i=hh(e.value,t,r);return"all"===t||null!==i&&i<=n}class u extends n{constructor(e,t,r){if(super(),this.object=e,this.index=r?t:null,this.value=r||t,!eo(e)&&!W
1(e))throw TypeError('SymbolNode or AccessorNode expected as "object"');if(eo(e)&&"end"===e.name)throw Error('Cannot assign to symbol "end"');if(this.index&&!ee(this.index))throw TypeError('IndexNode expected as "index"');if(!et(this.value))throw TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return hg}get isAssignmentNode(){return!0}_compile(e,t){var r=this.object._compile(e,t),n=this.index?this.index._compile(e,t):null,l=this.value._compile(e,t),u=this.object.name;if(this.index)if(this.index.isObjectProperty()){var c=this.index.getObjectProperty();return function(e,t,n){var i=r(e,t,n),s=l(e,t,n);return a(i,c,s),s}}else{if(eo(this.object))return function(e,t,i){var a=r(e,t,i),s=l(e,t,i),c=n(e,t,a);return e.set(u,o(a,c,s)),s};var f=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var h=this.object.index.getObjectProperty();return function(e,t,r){var s=f(e,t,r),u=i(s,h),c=n(e,t,u),p=l(e,t,r);return a(s,h,o(u,c,p)),p}}var p=this.object.index._compile(e,t);return function(e,t,r){var i=f(e,t,r),a=p(e,t,i),u=s(i,a),c=n(e,t,u),h=l(e,t,r);return o(i,a,o(u,c,h)),h}}if(!eo(this.object))throw TypeError("SymbolNode expected as object");return function(e,t,r){var n=l(e,t,r);return e.set(u,n),n}}forEach(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)}map(e){return new u(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))}clone(){return new u(this.object,this.index,this.value)}_toString(e){var t=this.object.toString(e),r=this.index?this.index.toString(e):"",n=this.value.toString(e);return l(this,e&&e.parenthesis,e&&e.implicit)&&(n="("+n+")"),t+r+" = "+n}toJSON(){return{mathjs:hg,object:this.object,index:this.index,value:this.value}}static fromJSON(e){return new u(e.object,e.index,e.value)}_toHTML(e){var t=this.object.toHTML(e),r=this.index?this.index.toHTML(e):"",n=this.value.toHTML(e);return l(this,e&&e.parenthesis,e&&e.implicit)&&(n='<span class="math-paranthesis math-round-parenthesis">(</span>'+n+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+r+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+n}_toTex(e){var t=this.object.toTex(e),r=this.index?this.index.toTex(e):"",n=this.value.toTex(e);return l(this,e&&e.parenthesis,e&&e.implicit)&&(n="\\left(".concat(n,"\\right)")),t+r+"="+n}}return lE(u,"name",hg),u},{isClass:!0,isNode:!0}),hx="BlockNode",hy=ew(hx,["ResultSet","Node"],e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(e){if(super(),!Array.isArray(e))throw Error("Array expected");this.blocks=e.map(function(e){var t=e&&e.node,r=!e||void 0===e.visible||e.visible;if(!et(t))throw TypeError('Property "node" must be a Node');if("boolean"!=typeof r)throw TypeError('Property "visible" must be a boolean');return{node:t,visible:r}})}get type(){return hx}get isBlockNode(){return!0}_compile(e,r){var n=nI(this.blocks,function(t){return{evaluate:t.node._compile(e,r),visible:t.visible}});return function(e,r,i){var a=[];return nz(n,function(t){var n=t.evaluate(e,r,i);t.visible&&a.push(n)}),new t(a)}}forEach(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)}map(e){for(var t=[],r=0;r<this.blocks.length;r++){var i=this.blocks[r],a=this._ifNode(e(i.node,"blocks["+r+"].node",this));t[r]={node:a,visible:i.visible}}return new n(t)}clone(){return new n(this.blocks.map(function(e){return{node:e.node,visible:e.visible}}))}_toString(e){return this.blocks.map(function(t){return t.node.toString(e)+(t.visible?"":";")}).join("\n")}toJSON(){return{mathjs:hx,blocks:this.blocks}}static fromJSON(e){return new n(e.blocks)}_toHTML(e){return this.blocks.map(function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(e){return this.blocks.map(function(t){return t.node.toTex(e)+(t.visible?"":";")}).join("\\;\\;\n")}}return lE(n,"name",hx),n},{isClass:!0,isNode:!0}),hb="ConditionalNode",hw=ew(hb,["Node"],e=>{var{Node:t}=e;function r(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return!!e;if(e){if(b(e))return!e.isZero();
vendor: 5,731 bytes, line 1
1if(_(e))return!!(e.re||e.im);if(C(e))return!!e.value}if(null==e)return!1;throw TypeError('Unsupported type of condition "'+eu(e)+'"')}class n extends t{constructor(e,t,r){if(super(),!et(e))throw TypeError("Parameter condition must be a Node");if(!et(t))throw TypeError("Parameter trueExpr must be a Node");if(!et(r))throw TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=r}get type(){return hb}get isConditionalNode(){return!0}_compile(e,t){var n=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),a=this.falseExpr._compile(e,t);return function(e,t,s){return r(n(e,t,s))?i(e,t,s):a(e,t,s)}}forEach(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)}map(e){return new n(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=hh(this,t,e&&e.implicit),n=this.condition.toString(e),i=hh(this.condition,t,e&&e.implicit);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n="("+n+")");var a=this.trueExpr.toString(e),s=hh(this.trueExpr,t,e&&e.implicit);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=r)&&(a="("+a+")");var o=this.falseExpr.toString(e),l=hh(this.falseExpr,t,e&&e.implicit);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=r)&&(o="("+o+")"),n+" ? "+a+" : "+o}toJSON(){return{mathjs:hb,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(e){return new n(e.condition,e.trueExpr,e.falseExpr)}_toHTML(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=hh(this,t,e&&e.implicit),n=this.condition.toHTML(e),i=hh(this.condition,t,e&&e.implicit);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>');var a=this.trueExpr.toHTML(e),s=hh(this.trueExpr,t,e&&e.implicit);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=r)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>');var o=this.falseExpr.toHTML(e),l=hh(this.falseExpr,t,e&&e.implicit);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=r)&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n+'<span class="math-operator math-conditional-operator">?</span>'+a+'<span class="math-operator math-conditional-operator">:</span>'+o}_toTex(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return lE(n,"name",hb),n},{isClass:!0,isNode:!0}),h_=e.i(856166),hD={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},hC={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},hA={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(hC.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(hC.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(hC.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(hC.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(hC.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},fraction:{2:"\\frac{${args[0]}}{${args[1]}}"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(hC.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(hC.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"}
vendor: 4,583 bytes, line 1
1,nthRoots:{2:"\\{y : y^${args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(hC.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(hC.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(hC.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(hC.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(hC.bitAnd,"${args[1]}\\right)")},bitNot:{1:hC.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(hC.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(hC.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(hC.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(hC.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(hC.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(hC.and,"${args[1]}\\right)")},not:{1:hC.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(hC.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(hC.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(hC.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(hC.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(hC.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(hC.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(hC.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(hC.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(hC.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(hC.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(hC.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(hC.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(hC.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},bigint:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}
1\\right)+".concat(hD.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},hE="\\mathrm{${name}}\\left(${args}\\right)",hN={deg:"^\\circ"};function hS(e){return(0,h_.default)(e,{preserveFormatting:!0})}function hM(e,t){return(t=void 0!==t&&t)?ex(hN,e)?hN[e]:"\\mathrm{"+hS(e)+"}":ex(hD,e)?hD[e]:hS(e)}var hT="ConstantNode",hk=ew(hT,["Node","isBounded"],e=>{var{Node:t,isBounded:r}=e;class n extends t{constructor(e){super(),this.value=e}get type(){return hT}get isConstantNode(){return!0}_compile(e,t){var r=this.value;return function(){return r}}forEach(e){}map(e){return this.clone()}clone(){return new n(this.value)}_toString(e){return nc(this.value,e)}_toHTML(e){var t=this._toString(e);switch(eu(this.value)){case"number":case"bigint":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}}toJSON(){return{mathjs:hT,value:this.value}}static fromJSON(e){return new n(e.value)}_toTex(e){var t=this._toString(e);switch(eu(this.value)){case"string":return"\\mathtt{"+hS(t)+"}";case"number":case"BigNumber":if(!r(this.value))return 0>this.value.valueOf()?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");if(-1!==n)return t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}";return t;case"bigint":return t.toString();case"Fraction":return this.value.toLatex();default:return t}}}return lE(n,"name",hT),n},{isClass:!0,isNode:!0}),hF="FunctionAssignmentNode",hB=ew(hF,["typed","Node"],e=>{var{typed:t,Node:r}=e;function n(e,t,r){var n=hh(e,t,r),i=hh(e.expr,t,r);return"all"===t||null!==i&&i<=n}class i extends r{constructor(e,t,r){if(super(),"string"!=typeof e)throw TypeError('String expected for parameter "name"');
1if(!Array.isArray(t))throw TypeError('Array containing strings or objects expected for parameter "params"');if(!et(r))throw TypeError('Node expected for parameter "expr"');if(ht.has(e))throw Error('Illegal function name, "'+e+'" is a reserved keyword');var n=new Set;for(var i of t){var a="string"==typeof i?i:i.name;if(n.has(a))throw Error('Duplicate parameter name "'.concat(a,'"'));n.add(a)}this.name=e,this.params=t.map(function(e){return e&&e.name||e}),this.types=t.map(function(e){return e&&e.type||"any"}),this.expr=r}get type(){return hF}get isFunctionAssignmentNode(){return!0}_compile(e,r){var n=Object.create(r);nz(this.params,function(e){n[e]=!0});var i=this.expr,a=i._compile(e,n),s=this.name,o=this.params,l=nq(this.types,","),u=s+"("+nq(this.params,", ")+")";return function(e,r,n){var c={};c[l]=function(){for(var t=Object.create(r),i=0;i<o.length;i++)t[o[i]]=arguments[i];return a(e,t,n)};var f=t(s,c);return f.syntax=u,f.expr=i.toString(),e.set(s,f),f}}forEach(e){e(this.expr,"expr",this)}map(e){var t=this._ifNode(e(this.expr,"expr",this));return new i(this.name,this.params.slice(0),t)}clone(){return new i(this.name,this.params.slice(0),this.expr)}_toString(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toString(e);return n(this,t,e&&e.implicit)&&(r="("+r+")"),this.name+"("+this.params.join(", ")+") = "+r}toJSON(){var e=this.types;return{mathjs:hF,name:this.name,params:this.params.map(function(t,r){return{name:t,type:e[r]}}),expr:this.expr}}static fromJSON(e){return new i(e.name,e.params,e.expr)}_toHTML(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=[],i=0;i<this.params.length;i++)r.push('<span class="math-symbol math-parameter">'+nm(this.params[i])+"</span>");var a=this.expr.toHTML(e);return n(this,t,e&&e.implicit)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+nm(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+r.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+a}_toTex(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toTex(e);return n(this,t,e&&e.implicit)&&(r="\\left(".concat(r,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(hM).join(",")+"\\right)="+r}}return lE(i,"name",hF),i},{isClass:!0,isNode:!0}),hP="IndexNode",hj=ew(hP,["Node","size"],e=>{var{Node:t,size:r}=e;class n extends t{constructor(e,t){if(super(),this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(et))throw TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw Error("dotNotation only applicable for object properties")}get type(){return hP}get isIndexNode(){return!0}_compile(e,t){var n=nI(this.dimensions,function(n,i){if(!(n.filter(e=>e.isSymbolNode&&"end"===e.name).length>0))return n._compile(e,t);var a=Object.create(t);a.end=!0;var s=n._compile(e,a);return function(e,t,n){if(!N(n)&&!E(n)&&!A(n))throw TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+eu(n));var a=r(n),o=Object.create(t);return o.end=a[i],s(e,o,n)}}),a=i(e,"index");return function(e,t,r){return a(...nI(n,function(n){return n(e,t,r)}))}}forEach(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)}map(e){for(var t=[],r=0;r<this.dimensions.length;r++)t[r]=this._ifNode(e(this.dimensions[r],"dimensions["+r+"]",this));return new n(t,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return 1===this.dimensions.length&&X(this.dimensions[0])&&"string"==typeof this.dimensions[0].value}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:hP,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(e){return new n(e.dimensions,e.dotNotation)}_toHTML(e){for(var t=[],r=0;r<this.dimensions.length;r++)t[r]=this.dimensions[r].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+nm(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(e){var t=this.dimensions.map(function(t){return t.toTex(e)});return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"}}return lE(n,"name",hP),n},{isClass:!0,isNode:!0}),hO="ObjectNode",hI=ew(hO,["Node"],e=>{var{Node:t}=e;class r extends t{constructor(e){if(super(),this.properties=e||{},e&&("object"!=typeof e||!Object.keys(e).every(function(t){return et(e[t])})))throw TypeError("Object containing Nodes expected")}get type(){return hO}get isObjectNode(){return!0}_compile(e,t){var r={};for(var n in this.properties)if(ex(this.properties,n)){var a=JSON.parse(nh(n)),s=i(this.properties,n);r[a]=s._compile(e,t)}return function(e,t,n){var i={};for(var a in r)ex(r,a)&&(i[a]=r[a](e,t,n));return i}}forEach(e){for(var t in this.properties)ex(this.properties,t)&&e(this.properties[t],"properties["+nh(t)+"]",this)}map(e){var t={};for(var n in this.properties)ex(this.properties,n)&&(t[n]=this._ifNode(e(this.properties[n],"properties["+nh(n)+"]",this)));return new r(t)}clone(){var e={};for(var t in this.properties)ex(this.properties,t)&&(e[t]=this.properties[t]);return new r(e)}_toString(e){var t=[];for(var r in this.properties)ex(this.properties,r)&&t.push(nh(r)+": "+this.properties[r].toString(e));return"{"+t.join(", ")+"}"}toJSON(){return{mathjs:hO,properties:this.properties}}static fromJSON(e){return new r(e.properties)}_toHTML(e){var t=[];for(var r in this.properties)ex(this.properties,r)&&t.push('<span class="math-symbol math-property">'+nm(r)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[r].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(e){var t=[];for(var r in this.properties)ex(this.properties,r)&&t.push("\\mathbf{"+r+":} & "+this.properties[r].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}"+t.join("\n")+"\\end{array}\\right\\}"}}return lE(r,"name",hO),r},{isClass:!0,isNode:!0});function hz(e,t){return new m(e,new p(t),new Set(Object.keys(t)))}var hL="OperatorNode",hR=ew(hL,["Node"],e=>{var{Node:t}=e;function r(e,t){var n=e;if("auto"===t)for(;ei(n);)n=n.content;return!!X(n)||!!en(n)&&r(n.args[0],t)}
1function n(e,t,n,i,a){var s=hh(e,t,n),o=hp(e,t);if("all"===t||i.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return i.map(function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});switch(i.length){case 0:l=[];break;case 1:var l,u,c,f=hh(i[0],t,n,e);if(a&&null!==f&&("keep"===t?(u=i[0].getIdentifier(),c=e.getIdentifier()):(u=i[0].getContent().getIdentifier(),c=e.getContent().getIdentifier()),!1===hc[s][c].latexLeftParens||!1===hc[f][u].latexParens)||null===f){l=[!1];break}if(f<=s){l=[!0];break}l=[!1];break;case 2:var h,p,m,d,g,v=hh(i[0],t,n,e),x=hm(e,i[0],t);h=null!==v&&(v===s&&"right"===o&&!x||v<s);var y=hh(i[1],t,n,e),b=hm(e,i[1],t);p=null!==y&&(y===s&&"left"===o&&!b||y<s),a&&("keep"===t?(m=e.getIdentifier(),d=e.args[0].getIdentifier(),g=e.args[1].getIdentifier()):(m=e.getContent().getIdentifier(),d=e.args[0].getContent().getIdentifier(),g=e.args[1].getContent().getIdentifier()),null!==v&&(!1===hc[s][m].latexLeftParens&&(h=!1),!1===hc[v][d].latexParens&&(h=!1)),null!==y&&(!1===hc[s][m].latexRightParens&&(p=!1),!1===hc[y][g].latexParens&&(p=!1))),l=[h,p];break;default:("OperatorNode:add"===e.getIdentifier()||"OperatorNode:multiply"===e.getIdentifier())&&(l=i.map(function(r){var i=hh(r,t,n,e),a=hm(e,r,t),l=hp(r,t);if(null===i);else if(s===i&&o===l&&!a)return!0;else if(i<s)return!0;return!1}))}if(i.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"all"!==t&&"hide"===n)for(var w=1;w<l.length;++w)!r(i[w],t)||l[w-1]||"keep"===t&&ei(i[w-1])||(l[w]=!0);return l}class a extends t{constructor(e,t,r,n,i){if(super(),"string"!=typeof e)throw TypeError('string expected for parameter "op"');if("string"!=typeof t)throw TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(et))throw TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===n,this.isPercentage=!0===i,this.op=e,this.fn=t,this.args=r||[]}get type(){return hL}get isOperatorNode(){return!0}
1_compile(e,t){if("string"!=typeof this.fn||!c(e,this.fn))if(e[this.fn])throw Error('No access to function "'+this.fn+'"');else throw Error("Function "+this.fn+' missing in provided namespace "math"');var r=i(e,this.fn),n=nI(this.args,function(r){return r._compile(e,t)});if("function"==typeof r&&!0===r.rawArgs){var a=this.args;return function(t,n,i){return r(a,e,hz(t,n))}}if(1===n.length){var s=n[0];return function(e,t,n){return r(s(e,t,n))}}if(2!==n.length)return function(e,t,i){return r.apply(null,nI(n,function(r){return r(e,t,i)}))};var o=n[0],l=n[1];return function(e,t,n){return r(o(e,t,n),l(e,t,n))}}forEach(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)}map(e){for(var t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new a(this.op,this.fn,t,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return 1===this.args.length}isBinary(){return 2===this.args.length}_toString(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!1);if(1===i.length){var s=hp(this,t),o=i[0].toString(e);a[0]&&(o="("+o+")");var l=/[a-zA-Z]+/.test(this.op);return"right"===s?this.op+(l?" ":"")+o:"left"===s?o+(l?" ":"")+this.op:o+this.op}if(2===i.length){var u=i[0].toString(e),c=i[1].toString(e);return(a[0]&&(u="("+u+")"),a[1]&&(c="("+c+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r)?u+" "+c:u+" "+this.op+" "+c}if(!(i.length>2)||"OperatorNode:add"!==this.getIdentifier()&&"OperatorNode:multiply"!==this.getIdentifier())return this.fn+"("+this.args.join(", ")+")";var f=i.map(function(t,r){return t=t.toString(e),a[r]&&(t="("+t+")"),t});return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?f.join(" "):f.join(" "+this.op+" ")}toJSON(){return{mathjs:hL,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(e){return new a(e.op,e.fn,e.args,e.implicit,e.isPercentage)}_toHTML(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!1);if(1===i.length){var s=hp(this,t),o=i[0].toHTML(e);return(a[0]&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===s)?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+nm(this.op)+"</span>"+o:o+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+nm(this.op)+"</span>"}if(2===i.length){var l=i[0].toHTML(e),u=i[1].toHTML(e);return(a[0]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),a[1]&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r)?l+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+u:l+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+nm(this.op)+"</span>"+u}var c=i.map(function(t,r){return t=t.toHTML(e),a[r]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t});return i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?c.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):c.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+nm(this.op)+"</span>"):'<span class="math-function">'+nm(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}_toTex(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!0),s=hC[this.fn];if(s=void 0===s?this.op:s,1===i.length){var o=hp(this,t),l=i[0].toTex(e);return(a[0]&&(l="\\left(".concat(l,"\\right)")),"right"===o)?s+l:l+s}if(2===i.length){var u,c=i[0],f=c.toTex(e);a[0]&&(f="\\left(".concat(f,"\\right)"));var h=i[1].toTex(e);switch(a[1]&&(h="\\left(".concat(h,"\\right)")),u="keep"===t?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return s+"{"+f+"}{"+h+"}";case"OperatorNode:pow":switch(f="{"+f+"}",h="{"+h+"}",u){case"ConditionalNode":case"OperatorNode:divide":f="\\left(".concat(f,"\\right)")}break;
1case"OperatorNode:multiply":if(this.implicit&&"hide"===r)return f+"~"+h}return f+s+h}if(!(i.length>2)||"OperatorNode:add"!==this.getIdentifier()&&"OperatorNode:multiply"!==this.getIdentifier())return"\\mathrm{"+this.fn+"}\\left("+i.map(function(t){return t.toTex(e)}).join(",")+"\\right)";var p=i.map(function(t,r){return t=t.toTex(e),a[r]&&(t="\\left(".concat(t,"\\right)")),t});return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit&&"hide"===r?p.join("~"):p.join(s)}getIdentifier(){return this.type+":"+this.fn}}return lE(a,"name",hL),a},{isClass:!0,isNode:!0}),hq="ParenthesisNode",hU=ew(hq,["Node"],e=>{var{Node:t}=e;class r extends t{constructor(e){if(super(),!et(e))throw TypeError('Node expected for parameter "content"');this.content=e}get type(){return hq}get isParenthesisNode(){return!0}_compile(e,t){return this.content._compile(e,t)}getContent(){return this.content.getContent()}forEach(e){e(this.content,"content",this)}map(e){return new r(e(this.content,"content",this))}clone(){return new r(this.content)}_toString(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)}toJSON(){return{mathjs:hq,content:this.content}}static fromJSON(e){return new r(e.content)}_toHTML(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)}_toTex(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)}}return lE(r,"name",hq),r},{isClass:!0,isNode:!0}),hH="RangeNode",hV=ew(hH,["Node"],e=>{var{Node:t}=e;function r(e,t,r){var n=hh(e,t,r),i={},a=hh(e.start,t,r);if(i.start=null!==a&&a<=n||"all"===t,e.step){var s=hh(e.step,t,r);i.step=null!==s&&s<=n||"all"===t}var o=hh(e.end,t,r);return i.end=null!==o&&o<=n||"all"===t,i}class n extends t{constructor(e,t,r){if(super(),!et(e)||!et(t)||r&&!et(r))throw TypeError("Node expected");if(arguments.length>3)throw Error("Too many arguments");this.start=e,this.end=t,this.step=r||null}get type(){return hH}get isRangeNode(){return!0}needsEnd(){return this.filter(function(e){return eo(e)&&"end"===e.name}).length>0}_compile(e,t){var r=e.range,n=this.start._compile(e,t),i=this.end._compile(e,t);if(!this.step)return function(e,t,a){return r(n(e,t,a),i(e,t,a))};var a=this.step._compile(e,t);return function(e,t,s){return r(n(e,t,s),i(e,t,s),a(e,t,s))}}forEach(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)}map(e){return new n(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(e){var t,n=r(this,e&&e.parenthesis?e.parenthesis:"keep",e&&e.implicit),i=this.start.toString(e);if(n.start&&(i="("+i+")"),t=i,this.step){var a=this.step.toString(e);n.step&&(a="("+a+")"),t+=":"+a}var s=this.end.toString(e);return n.end&&(s="("+s+")"),t+=":"+s}toJSON(){return{mathjs:hH,start:this.start,end:this.end,step:this.step}}static fromJSON(e){return new n(e.start,e.end,e.step)}_toHTML(e){var t,n=r(this,e&&e.parenthesis?e.parenthesis:"keep",e&&e.implicit),i=this.start.toHTML(e);if(n.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=i,this.step){var a=this.step.toHTML(e);n.step&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+a}var s=this.end.toHTML(e);return n.end&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+s}_toTex(e){var t=r(this,e&&e.parenthesis?e.parenthesis:"keep",e&&e.implicit),n=this.start.toTex(e);if(t.start&&(n="\\left(".concat(n,"\\right)")),this.step){var i=this.step.toTex(e);t.step&&(i="\\left(".concat(i,"\\right)")),n+=":"+i}var a=this.end.toTex(e);return t.end&&(a="\\left(".concat(a,"\\right)")),n+=":"+a}}return lE(n,"name",hH),n},{isClass:!0,isNode:!0}),hW="RelationalNode",hG=ew(hW,["Node"],e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(e,t){if(super(),!Array.isArray(e))throw TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}get type(){return hW}get isRelationalNode(){return!0}_compile(e,t){var r=this,n=this.params.map(r=>r._compile(e,t));return function(t,a,s){for(var o,l=n[0](t,a,s),u=0;u<r.conditionals.length;u++)if(o=l,l=n[u+1](t,a,s),!i(e,r.conditionals[u])(o,l))return!1;return!0}}
1forEach(e){this.params.forEach((t,r)=>e(t,"params["+r+"]",this),this)}map(e){return new n(this.conditionals.slice(),this.params.map((t,r)=>this._ifNode(e(t,"params["+r+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=hh(this,t,e&&e.implicit),i=this.params.map(function(r,i){var a=hh(r,t,e&&e.implicit);return"all"===t||null!==a&&a<=n?"("+r.toString(e)+")":r.toString(e)}),a=i[0],s=0;s<this.conditionals.length;s++)a+=" "+r[this.conditionals[s]],a+=" "+i[s+1];return a}toJSON(){return{mathjs:hW,conditionals:this.conditionals,params:this.params}}static fromJSON(e){return new n(e.conditionals,e.params)}_toHTML(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=hh(this,t,e&&e.implicit),i=this.params.map(function(r,i){var a=hh(r,t,e&&e.implicit);return"all"===t||null!==a&&a<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)}),a=i[0],s=0;s<this.conditionals.length;s++)a+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+nm(r[this.conditionals[s]])+"</span>"+i[s+1];return a}_toTex(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=hh(this,t,e&&e.implicit),n=this.params.map(function(n,i){var a=hh(n,t,e&&e.implicit);return"all"===t||null!==a&&a<=r?"\\left("+n.toTex(e)+"\right)":n.toTex(e)}),i=n[0],a=0;a<this.conditionals.length;a++)i+=hC[this.conditionals[a]]+n[a+1];return i}}return lE(n,"name",hW),n},{isClass:!0,isNode:!0}),h$=ew("SymbolNode",["math","?Unit","Node"],e=>{var{math:t,Unit:r,Node:n}=e;function a(e){return!!r&&r.isValuelessUnit(e)}class s extends n{constructor(e){if(super(),"string"!=typeof e)throw TypeError('String expected for parameter "name"');this.name=e}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(e,t){var n=this.name;if(!0===t[n])return function(e,t,r){return i(t,n)};if(n in e)return function(t,r,a){return t.has(n)?t.get(n):i(e,n)};var o=a(n);return function(e,t,i){return e.has(n)?e.get(n):o?new r(null,n):s.onUndefinedSymbol(n)}}forEach(e){}map(e){return this.clone()}static onUndefinedSymbol(e){throw Error("Undefined symbol "+e)}clone(){return new s(this.name)}_toString(e){return this.name}_toHTML(e){var t=nm(this.name);if("true"===t||"false"===t)return'<span class="math-symbol math-boolean">'+t+"</span>";if("i"===t)return'<span class="math-symbol math-imaginary-symbol">'+t+"</span>";if("Infinity"===t)return'<span class="math-symbol math-infinity-symbol">'+t+"</span>";if("NaN"===t)return'<span class="math-symbol math-nan-symbol">'+t+"</span>";if("null"===t)return'<span class="math-symbol math-null-symbol">'+t+"</span>";else if("undefined"===t)return'<span class="math-symbol math-undefined-symbol">'+t+"</span>";return'<span class="math-symbol">'+t+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(e){return new s(e.name)}_toTex(e){var r=!1;void 0===t[this.name]&&a(this.name)&&(r=!0);var n=hM(this.name,r);return"\\"===n[0]?n:" "+n}}return s},{isClass:!0,isNode:!0}),hY="FunctionNode",hZ=ew(hY,["math","Node","SymbolNode"],e=>{var t,{math:r,Node:n,SymbolNode:a}=e,s=e=>nc(e,{truncate:78});function o(e,t,r){for(var n,i="",a=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,s=0;null!==(n=a.exec(e));)if(i+=e.substring(s,n.index),s=n.index,"$$"===n[0])i+="$",s++;else{s+=n[0].length;var o=t[n[1]];if(!o)throw ReferenceError("Template: Property "+n[1]+" does not exist.");if(void 0===n[2])switch(typeof o){case"string":i+=o;break;case"object":if(et(o))i+=o.toTex(r);else if(Array.isArray(o))i+=o.map(function(e,t){if(et(e))return e.toTex(r);throw TypeError("Template: "+n[1]+"["+t+"] is not a Node.")}).join(",");else throw TypeError("Template: "+n[1]+" has to be a Node, String or array of Nodes");break;default:throw TypeError("Template: "+n[1]+" has to be a Node, String or array of Nodes")}else if(et(o[n[2]]&&o[n[2]]))i+=o[n[2]].toTex(r);else throw TypeError("Template: "+n[1]+"["+n[2]+"] is not a Node.")}return i+e.slice(s)}class l extends n{constructor(e,t,r){if(super(),"string"==typeof e&&(e=new a(e)),!et(e))throw TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(et))throw TypeError('Array containing Nodes expected for parameter "args"');var n=typeof r;if("undefined"!==n&&"boolean"!==n)throw TypeError("optional flag, if specified, must be boolean");this.fn=e,this.args=t||[],this.optional=!!r}get name(){return this.fn.name||""}get type(){return hY}get isFunctionNode(){return!0}_compile(e,t){var r=this.args.map(r=>r._compile(e,t)),n=this.optional||W(this.fn)&&this.fn.optionalChaining;if(eo(this.fn)){var a=this.fn.name;if(t[a]){var o=this.args;return function(t,l,u){var c=i(l,a);if(!n||void 0!==c){if("function"!=typeof c)throw TypeError("Argument '".concat(a,"' was not a function; received: ").concat(s(c)));if(c.rawArgs)return c(o,e,hz(t,l));var f=r.map(e=>e(t,l,u));return c.apply(c,f)}}}var c=a in e?i(e,a):void 0,f="function"==typeof c&&!0===c.rawArgs,h=t=>{var r;if(t.has(a))r=t.get(a);else if(a in e)r=i(e,a);else{if(!n)return l.onUndefinedFunction(a);r=void 0}if("function"==typeof r||n&&void 0===r)return r;throw TypeError("'".concat(a,"' is not a function; its value is:\n  ").concat(s(r)))};if(f){var p=this.args;return function(t,n,i){var a=h(t);return!0===a.rawArgs?a(p,e,hz(t,n)):a(...r.map(e=>e(t,n,i)))}}switch(r.length){case 0:return function(e,t,r){var i=h(e);if(!n||void 0!==i)return i()};case 1:return function(e,t,i){var a=h(e);if(!n||void 0!==a){var s=r[0];return a(s(e,t,i))}};case 2:return function(e,t,i){var a=h(e);if(!n||void 0!==a){var s=r[0],o=r[1];return a(s(e,t,i),o(e,t,i))}};default:return function(e,t,i){var a=h(e);if(!n||void 0!==a){var s=r.map(r=>r(e,t,i));return a(...s)}}}}if(W(this.fn)&&ee(this.fn.index)&&this.fn.index.isObjectProperty()){var m=this.fn.object._compile(e,t),d=this.fn.index.getObjectProperty(),g=this.args;return function(t,i,a){var s=m(t,i,a);if(!n||null!=s&&void 0!==s[d]){var o=u(s,d);if(null!=o&&o.rawArgs)return o(g,e,hz(t,i));var l=r.map(e=>e(t,i,a));return o.apply(s,l)}}}var v=this.fn.toString(),x=this.fn._compile(e,t),y=this.args;return function(t,i,a){var o=x(t,i,a);if(!n||void 0!==o){if("function"!=typeof o)throw TypeError("Expression '".concat(v,"' did not evaluate to a function; value is:")+"\n  ".concat(s(o)));if(o.rawArgs)return o(y,e,hz(t,i));var l=r.map(e=>e(t,i,a));return o.apply(o,l)}}}forEach(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)}map(e){for(var t=this._ifNode(e(this.fn,"fn",this)),r=[],n=0;n<this.args.length;n++)r[n]=this._ifNode(e(this.args[n],"args["+n+"]",this));return new l(t,r)}clone(){return new l(this.fn,this.args.slice(0))}toString(e){var t,r=this.fn.toString(e);return(e&&"object"==typeof e.handler&&ex(e.handler,r)&&(t=e.handler[r](this,e)),void 0!==t)?t:super.toString(e)}_toString(e){var t=this.args.map(function(t){return t.toString(e)});return(K(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e))+"("+t.join(", ")+")"}toJSON(){return{mathjs:hY,fn:this.fn,args:this.args}}_toHTML(e){var t=this.args.map(function(t){return t.toHTML(e)});return'<span class="math-function">'+nm(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(e){var t;return(e&&"object"==typeof e.handler&&ex(e.handler,this.name)&&(t=e.handler[this.name](this,e)),void 0!==t)?t:super.toTex(e)}_toTex(e){var t,n,i=this.args.map(function(t){return t.toTex(e)});switch(hA[this.name]&&(t=hA[this.name]),r[this.name]&&("function"==typeof r[this.name].toTex||"object"==typeof r[this.name].toTex||"string"==typeof r[this.name].toTex)&&(t=r[this.name].toTex),typeof t){case"function":n=t(this,e);break;case"string":n=o(t,this,e);break;case"object":switch(typeof t[i.length]){case"function":n=t[i.length](this,e);break;case"string":n=o(t[i.length],this,e)}}return void 0!==n?n:o(hE,this,e)}getIdentifier(){return this.type+":"+this.name}}return t=l,lE(l,"name",hY),lE(l,"onUndefinedFunction",function(e){throw Error("Undefined function "+e)}),lE(l,"fromJSON",function(e){return new t(e.fn,e.args)}),l},{isClass:!0,isNode:!0}),hX="parse",hJ=ew(hX,["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],e=>
1{var{typed:t,numeric:r,config:n,AccessorNode:i,ArrayNode:a,AssignmentNode:s,BlockNode:o,ConditionalNode:l,ConstantNode:u,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:h,ObjectNode:p,OperatorNode:m,ParenthesisNode:d,RangeNode:g,RelationalNode:v,SymbolNode:x}=e,y=t(hX,{string:function(e){return q(e,{})},"Array | Matrix":function(e){return b(e,{})},"string, Object":function(e,t){return q(e,void 0!==t.nodes?t.nodes:{})},"Array | Matrix, Object":b});function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0!==t.nodes?t.nodes:{};return ia(e,function(e){if("string"!=typeof e)throw TypeError("String expected");return q(e,r)})}var w=0,_=1,D=2,C=3,A=4,E={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"?.":!0,"??":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},N={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},S={true:!0,false:!1,null:null,undefined},M=["NaN","Infinity"],T={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"};function k(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:w,nestingLevel:0,conditionalLevel:null}}function F(e,t){return e.expression.substr(e.index,t)}function B(e){return F(e,1)}function P(e){e.index++}function j(e){return e.expression.charAt(e.index-1)}function O(e){return e.expression.charAt(e.index+1)}function I(e){for(e.tokenType=w,e.token="",e.comment="";;){if("#"===B(e))for(;"\n"!==B(e)&&""!==B(e);)e.comment+=B(e),P(e);if(y.isWhitespace(B(e),e.nestingLevel))P(e);else break}if(""===B(e)){e.tokenType=_;return}if("\n"===B(e)&&!e.nestingLevel){e.tokenType=_,e.token=B(e),P(e);return}var t=B(e),r=F(e,2),n=F(e,3);if(3===n.length&&E[n]){e.tokenType=_,e.token=n,P(e),P(e),P(e);return}if(2===r.length&&E[r]&&("?."!==r||!y.isDigit(e.expression.charAt(e.index+2)))){e.tokenType=_,e.token=r,P(e),P(e);return}if(E[t]){e.tokenType=_,e.token=t,P(e);return}if(y.isDigitDot(t)){e.tokenType=D;var i=F(e,2);if("0b"===i||"0o"===i||"0x"===i){for(e.token+=B(e),P(e),e.token+=B(e),P(e);y.isAlpha(B(e),j(e),O(e))||y.isDigit(B(e));)e.token+=B(e),P(e);if("."===B(e))for(e.token+=".",P(e);y.isAlpha(B(e),j(e),O(e))||y.isDigit(B(e));)e.token+=B(e),P(e);else if("i"===B(e))for(e.token+="i",P(e);y.isDigit(B(e));)e.token+=B(e),P(e);return}if("."===B(e)){if(e.token+=B(e),P(e),!y.isDigit(B(e))){e.tokenType=_;return}}else{for(;y.isDigit(B(e));)e.token+=B(e),P(e);y.isDecimalMark(B(e),O(e))&&(e.token+=B(e),P(e))}for(;y.isDigit(B(e));)e.token+=B(e),P(e);if("E"===B(e)||"e"===B(e)){if(y.isDigit(O(e))||"-"===O(e)||"+"===O(e)){if(e.token+=B(e),P(e),("+"===B(e)||"-"===B(e))&&(e.token+=B(e),P(e)),!y.isDigit(B(e)))throw eT(e,'Digit expected, got "'+B(e)+'"');for(;y.isDigit(B(e));)e.token+=B(e),P(e);if(y.isDecimalMark(B(e),O(e)))throw eT(e,'Digit expected, got "'+B(e)+'"')}else if(y.isDecimalMark(O(e),e.expression.charAt(e.index+2)))throw P(e),eT(e,'Digit expected, got "'+B(e)+'"')}return}if(y.isAlpha(B(e),j(e),O(e))){for(;y.isAlpha(B(e),j(e),O(e))||y.isDigit(B(e));)e.token+=B(e),P(e);ex(N,e.token)?e.tokenType=_:e.tokenType=C;return}for(e.tokenType=A;""!==B(e);)e.token+=B(e),P(e);throw eT(e,'Syntax error in part "'+e.token+'"')}function z(e){do I(e);while("\n"===e.token)}function L(e){e.nestingLevel++}function R(e){e.nestingLevel--}function q(e,t){var r=k();nr(r,{expression:e,extraNodes:t}),I(r);var n=U(r);if(""!==r.token)if(r.tokenType===_)throw ek(r,"Unexpected operator "+r.token);else throw eT(r,'Unexpected part "'+r.token+'"');return n}function U(e){var t,r,n=[];for(""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=H(e),e.comment&&(t.comment=e.comment));"\n"===e.token||";"===e.token;)0===n.length&&t&&(r=";"!==e.token,n.push({node:t,visible:r})),I(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=H(e),e.comment&&(t.comment=e.comment),r=";"!==e.token,n.push({node:t,visible:r}));return n.length>0?new o(n):(!t&&(t=new u(void 0),e.comment&&(t.comment=e.comment)),t)}function H(e){var t,r,n,i,a=V(e);if("="===e.token){if(eo(a))return t=a.name,z(e),n=H(e),new s(new x(t),n);if(W(a)){if(a.optionalChaining)throw eT(e,"Cannot assign to optional chain");return z(e),n=H(e),new s(a.object,a.index,n)}
1if(Q(a)&&eo(a.fn)&&(i=!0,r=[],t=a.name,a.args.forEach(function(e,t){eo(e)?r[t]=e.name:i=!1}),i))return z(e),new c(t,r,n=H(e));throw eT(e,"Invalid left hand side of assignment operator =")}return a}function V(e){for(var t=G(e);"?"===e.token;){var r=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,z(e);var n=t,i=H(e);if(":"!==e.token)throw eT(e,"False part of conditional expression expected");e.conditionalLevel=null,z(e),t=new l(n,i,H(e)),e.conditionalLevel=r}return t}function G(e){for(var t=$(e);"or"===e.token;)z(e),t=new m("or","or",[t,$(e)]);return t}function $(e){for(var t=Y(e);"xor"===e.token;)z(e),t=new m("xor","xor",[t,Y(e)]);return t}function Y(e){for(var t=Z(e);"and"===e.token;)z(e),t=new m("and","and",[t,Z(e)]);return t}function Z(e){for(var t=K(e);"|"===e.token;)z(e),t=new m("|","bitOr",[t,K(e)]);return t}function K(e){for(var t=ee(e);"^|"===e.token;)z(e),t=new m("^|","bitXor",[t,ee(e)]);return t}function ee(e){for(var t=et(e);"&"===e.token;)z(e),t=new m("&","bitAnd",[t,et(e)]);return t}function et(e){for(var t=[er(e)],r=[],n={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};ex(n,e.token);){var i={name:e.token,fn:n[e.token]};r.push(i),z(e),t.push(er(e))}return 1===t.length?t[0]:2===t.length?new m(r[0].name,r[0].fn,t):new v(r.map(e=>e.fn),t)}function er(e){for(var t,r,n=ei(e),i={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};ex(i,e.token);)r=i[t=e.token],z(e),n=new m(t,r,[n,ei(e)]);return n}function ei(e){for(var t,r,n=ea(e),i={to:"to",in:"to"};ex(i,e.token);)r=i[t=e.token],z(e),n="in"===t&&"])},;".includes(e.token)?new m("*","multiply",[n,new x("in")],!0):new m(t,r,[n,ea(e)]);return n}function ea(e){var t,r=[];if(":"===e.token)if(e.conditionalLevel===e.nestingLevel)throw eT(e,"The true-expression of a conditional operator may not be empty");else t=new u(1);else t=es(e);if(":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(r.push(t);":"===e.token&&r.length<3;)z(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?r.push(new x("end")):r.push(es(e));t=3===r.length?new g(r[0],r[2],r[1]):new g(r[0],r[1])}return t}function es(e){for(var t,r,n,i=el(e),a={"+":"add","-":"subtract"};ex(a,e.token);){r=a[t=e.token],z(e);var s=el(e);n=s.isPercentage?[i,new m("*","multiply",[i,s])]:[i,s],i=new m(t,r,n)}return i}function el(e){for(var t,r,n,i=t=eu(e),a={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};;)if(ex(a,e.token))n=a[r=e.token],z(e),t=new m(r,n,[t,i=eu(e)]);else break;return t}function eu(e){var t,r;for(r=t=ec(e);;)if(e.tokenType===C||"in"===e.token&&X(t)||"in"===e.token&&en(t)&&"unaryMinus"===t.fn&&X(t.args[0])||e.tokenType===D&&!X(r)&&(!en(r)||"!"===r.op)||"("===e.token)t=new m("*","multiply",[t,r=ec(e)],!0);else break;return t}function ec(e){for(var t=ef(e),r=t,n=[];;)if("/"===e.token&&J(r))if(n.push(nr({},e)),z(e),e.tokenType===D)if(n.push(nr({},e)),z(e),e.tokenType===C||"("===e.token||"in"===e.token)nr(e,n.pop()),n.pop(),t=new m("/","divide",[t,r=ef(e)]);else{n.pop(),nr(e,n.pop());break}else{nr(e,n.pop());break}else break;return t}function ef(e){var t=eh(e);if("%"===e.token){var r=nr({},e);z(e);try{eh(e),nr(e,r)}catch(e){t=new m("/","divide",[t,new u(100)],!1,!0)}}return t}function eh(e){var t,r,n={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return ex(n,e.token)?(r=n[e.token],t=e.token,z(e),new m(t,r,[eh(e)])):ep(e)}function ep(e){var t,r,n;return t=em(e),("^"===e.token||".^"===e.token)&&(n="^"===(r=e.token)?"pow":"dotPow",z(e),t=new m(r,n,[t,eh(e)])),t}function em(e){for(var t=ed(e);"??"===e.token;)z(e),t=new m("??","nullish",[t,ed(e)]);return t}function ed(e){for(var t,r,n=eg(e),i={"!":"factorial","'":"ctranspose"};ex(i,e.token);)r=i[t=e.token],I(e),n=ey(e,n=new m(t,r,[n]));return n}function eg(e){var t=[];if(e.tokenType===C&&ex(e.extraNodes,e.token)){var r=e.extraNodes[e.token];if(I(e),"("===e.token){if(t=[],L(e),I(e),")"!==e.token)for(t.push(H(e));","===e.token;)I(e),t.push(H(e));if(")"!==e.token)throw eT(e,"Parenthesis ) expected");R(e),I(e)}return new r(t)}return ev(e)}function ev(e){var t,n;return e.tokenType===C||e.tokenType===_&&e.token in N?(n=e.token,I(e),t=ey(e,t=ex(S,n)?new u(S[n]):M.includes(n)?new u(r(n,"number")):new x(n))):eb(e)}function ey(e,t,r){for(var n;;){var a=!1;"?."===e.token&&(a=!0,I(e));var s=("("===e.token||"["===e.token||"."===e.token)&&(!r||r.includes(e.token));if(!(a||s))break;if(n=[],"("===e.token)if(a||eo(t)||W(t)){if(L(e),I(e),")"!==e.token)for(n.push(H(e));","===e.token;)I(e),n.push(H(e));if(")"!==e.token)throw eT(e,"Parenthesis ) expected");R(e),I(e),t=new f(t,n,a)}else break;else if("["===e.token){if(L(e),I(e),"]"!==e.token)for(n.push(H(e));","===e.token;)I(e),n.push(H(e));if("]"!==e.token)throw eT(e,"Parenthesis ] expected");R(e),I(e),t=new i(t,new h(n),a)}else{if(a||I(e),!(e.tokenType===C||e.tokenType===_&&e.token in N)){var o="Property name expected after ";throw eT(e,o+=a?"optional chain":"dot")}n.push(new u(e.token)),I(e),t=new i(t,new h(n,!0),a)}}return t}function eb(e){var t;return'"'===e.token||"'"===e.token?(t=new u(ew(e,e.token)),t=ey(e,t)):e_(e)}function ew(e,t){for(var r="";""!==B(e)&&B(e)!==t;)if("\\"===B(e)){P(e);var n=B(e),i=T[n];if(void 0!==i)r+=i,e.index+=1;else if("u"===n){var a=e.expression.slice(e.index+1,e.index+5);if(/^[0-9A-Fa-f]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,16)),e.index+=5;else throw eT(e,"Invalid unicode character \\u".concat(a))}else throw eT(e,"Bad escape character \\".concat(n))}else r+=B(e),P(e);if(I(e),e.token!==t)throw eT(e,"End of string ".concat(t," expected"));return I(e),r}function e_(e){var t,r,n,i;if("["===e.token){if(L(e),I(e),"]"!==e.token){var s=eD(e);if(";"===e.token){for(n=1,r=[s];";"===e.token;)I(e),"]"!==e.token&&(r[n]=eD(e),n++);if("]"!==e.token)throw eT(e,"End of matrix ] expected");R(e),I(e),i=r[0].items.length;for(var o=1;o<n;o++)if(r[o].items.length!==i)throw ek(e,"Column dimensions mismatch ("+r[o].items.length+" !== "+i+")");t=new a(r)}else{if("]"!==e.token)throw eT(e,"End of matrix ] expected");R(e),I(e),t=s}}else R(e),I(e),t=new a([]);return ey(e,t)}return eC(e)}function eD(e){for(var t=[H(e)],r=1;","===e.token;)I(e),"]"!==e.token&&";"!==e.token&&(t[r]=H(e),r++);return new a(t)}function eC(e){if("{"===e.token){L(e);var t,r={};do if(I(e),"}"!==e.token){if('"'===e.token||"'"===e.token)t=ew(e,e.token);else if(e.tokenType===C||e.tokenType===_&&e.token in N)t=e.token,I(e);else throw eT(e,"Symbol or string expected as object key");if(":"!==e.token)throw eT(e,"Colon : expected after object key");I(e),r[t]=H(e)}while(","===e.token)if("}"!==e.token)throw eT(e,"Comma , or bracket } expected after object value");R(e),I(e);var n=new p(r);return ey(e,n)}return eA(e)}function eA(e){var t;if(e.tokenType===D){t=e.token,I(e);var i=eN(t,n);return new u(r(t,i))}return eE(e)}function eE(e){var t;if("("===e.token){if(L(e),I(e),t=H(e),")"!==e.token)throw eT(e,"Parenthesis ) expected");return R(e),I(e),t=ey(e,t=new d(t))}return eS(e)}function eS(e){if(""===e.token)throw eT(e,"Unexpected end of expression");throw eT(e,"Value expected")}function eM(e){return e.index-e.token.length+1}function eT(e,t){var r=eM(e),n=SyntaxError(t+" (char "+r+")");return n.char=r,n}function ek(e,t){var r=eM(e),n=SyntaxError(t+" (char "+r+")");return n.char=r,n}return y.isAlpha=function(e,t,r){return y.isValidLatinOrGreek(e)||y.isValidMathSymbol(e,r)||y.isValidMathSymbol(t,e)},y.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},y.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},y.isWhitespace=function(e,t){return" "===e||"	"===e||" "===e||"\n"===e&&t>0},y.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},y.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},y.isDigit=function(e){return e>="0"&&e<="9"},t.addConversion({from:"string",to:"Node",convert:y}),y}),hK="compile",hQ=ew(hK,["typed","parse"],e=>{var{typed:t,parse:r}=e;
1return t(hK,{string:function(e){return r(e).compile()},"Array | Matrix":function(e){return ia(e,function(e){return r(e).compile()})}})}),h0="evaluate",h1=ew(h0,["typed","parse"],e=>{var{typed:t,parse:r}=e;return t(h0,{string:function(e){var t=g();return r(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return r(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=g();return ia(e,function(e){return r(e).compile().evaluate(t)})},"Array | Matrix, Map | Object":function(e,t){return ia(e,function(e){return r(e).compile().evaluate(t)})}})}),h2=ew("Parser",["evaluate","parse"],e=>{var{evaluate:t,parse:r}=e;function n(){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:g(),writable:!1})}function i(e){if(0===e.length)return!1;for(var t=0;t<e.length;t++){var n=e.charAt(t-1),i=e.charAt(t),a=e.charAt(t+1);if(!(r.isAlpha(i,n,a)||t>0&&r.isDigit(i)))return!1}return!0}return n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(e){return t(e,this.scope)},n.prototype.get=function(e){if(this.scope.has(e))return this.scope.get(e)},n.prototype.getAll=function(){return x(this.scope)},n.prototype.getAllAsMap=function(){return this.scope},n.prototype.set=function(e,t){if(!i(e))throw Error("Invalid variable name: '".concat(e,"'. Variable names must follow the specified rules."));return this.scope.set(e,t),t},n.prototype.remove=function(e){this.scope.delete(e)},n.prototype.clear=function(){this.scope.clear()},n.prototype.toJSON=function(){var e={mathjs:"Parser",variables:{},functions:{}};for(var[t,r]of this.scope)if(O(r)){if(!h3(r))throw Error("Cannot serialize external function ".concat(t));e.functions[t]="".concat(r.syntax," = ").concat(r.expr)}else e.variables[t]=r;return e},n.fromJSON=function(e){var t=new n;return Object.entries(e.variables).forEach(e=>{var[r,n]=e;return t.set(r,n)}),Object.entries(e.functions).forEach(e=>{var[r,n]=e;return t.evaluate(n)}),t},n},{isClass:!0});function h3(e){return"function"==typeof e&&"string"==typeof e.syntax&&"string"==typeof e.expr}var h4="parser",h6=ew(h4,["typed","Parser"],e=>{var{typed:t,Parser:r}=e;return t(h4,{"":function(){return new r}})}),h5="lup",h8=ew(h5,["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],e=>{var{typed:t,matrix:r,abs:n,addScalar:i,divideScalar:a,multiplyScalar:s,subtractScalar:o,larger:l,equalScalar:u,unaryMinus:c,DenseMatrix:f,SparseMatrix:h,Spa:p}=e;return t(h5,{DenseMatrix:function(e){return m(e)},SparseMatrix:function(e){return d(e)},Array:function(e){var t=m(r(e));return{L:t.L.valueOf(),U:t.U.valueOf(),p:t.p}}});function m(e){var t,r,c,h=e._size[0],p=e._size[1],m=Math.min(h,p),d=ec(e._data),g=[],v=[h,m],x=[],y=[m,p],b=[];for(t=0;t<h;t++)b[t]=t;for(r=0;r<p;r++){if(r>0)for(t=0;t<h;t++){var w=Math.min(t,r),_=0;for(c=0;c<w;c++)_=i(_,s(d[t][c],d[c][r]));d[t][r]=o(d[t][r],_)}var D=r,C=0,A=0;for(t=r;t<h;t++){var E=d[t][r],N=n(E);l(N,C)&&(D=t,C=N,A=E)}if(r!==D&&(b[r]=[b[D],b[D]=b[r]][0],f._swapRows(r,D,d)),r<h)for(t=r+1;t<h;t++)u(d[t][r],0)||(d[t][r]=a(d[t][r],A))}for(r=0;r<p;r++)for(t=0;t<h;t++){if(0===r&&(t<p&&(x[t]=[]),g[t]=[]),t<r){t<p&&(x[t][r]=d[t][r]),r<h&&(g[t][r]=0);continue}if(t===r){t<p&&(x[t][r]=d[t][r]),r<h&&(g[t][r]=1);continue}t<p&&(x[t][r]=0),r<h&&(g[t][r]=d[t][r])}var S=new f({data:g,size:v}),M=new f({data:x,size:y}),T=[];for(t=0,m=b.length;t<m;t++)T[b[t]]=t;return{L:S,U:M,p:T,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}function d(e){var t,r,i,o=e._size[0],f=e._size[1],m=Math.min(o,f),d=e._values,g=e._index,v=e._ptr,x=[],y=[],b=[],w=[o,m],_=[],D=[],C=[],A=[m,f],E=[],N=[];for(t=0;t<o;t++)E[t]=t,N[t]=t;var S=function(e,t){var r=N[e],n=N[t];E[r]=t,E[n]=e,N[e]=n,N[t]=r},M=function(){var e=new p;r<o&&(b.push(x.length),x.push(1),y.push(r)),C.push(_.length);var f=v[r],m=v[r+1];for(i=f;i<m;i++)t=g[i],e.set(E[t],d[i]);r>0&&e.forEach(0,r-1,function(t,r){h._forEachRow(t,x,y,b,function(n,i){n>t&&e.accumulate(n,c(s(i,r)))})});var N=r,M=e.get(r),T=n(M);e.forEach(r+1,o-1,function(e,t){var r=n(t);l(r,T)&&(N=e,T=r,M=t)}),r!==N&&(h._swapRows(r,N,w[1],x,y,b),h._swapRows(r,N,A[1],_,D,C),e.swap(r,N),S(r,N)),e.forEach(0,o-1,function(e,t){e<=r?(_.push(t),D.push(e)):u(t=a(t,M),0)||(x.push(t),y.push(e))})};for(r=0;r<f;r++)M();return C.push(_.length),b.push(x.length),{L:new h({values:x,index:y,ptr:b,size:w}),U:new h({values:_,index:D,ptr:C,size:A}),p:E,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}}),h9="qr",h7=ew(h9,["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],e=>{var{typed:t,matrix:r,zeros:n,identity:i,isZero:a,equal:s,sign:o,sqrt:l,conj:u,unaryMinus:c,addScalar:f,divideScalar:h,multiplyScalar:p,subtractScalar:m,complex:d}=e;return nr(t(h9,{DenseMatrix:function(e){return v(e)},SparseMatrix:function(e){return x(e)},Array:function(e){var t=v(r(e));return{Q:t.Q.valueOf(),R:t.R.valueOf()}}}),{_denseQRimpl:g});function g(e){var t,r,d,g=e._size[0],v=e._size[1],x=i([g],"dense"),y=x._data,b=e.clone(),w=b._data,_=n([g],"");for(d=0;d<Math.min(v,g);++d){var D=w[d][d],C=c(s(D,0)?1:o(D)),A=u(C),E=0;for(t=d;t<g;t++)E=f(E,p(w[t][d],u(w[t][d])));var N=p(C,l(E));if(!a(N)){var S=m(D,N);for(_[d]=1,t=d+1;t<g;t++)_[t]=h(w[t][d],S);var M=c(u(h(S,N))),T=void 0;for(r=d;r<v;r++){for(T=0,t=d;t<g;t++)T=f(T,p(u(_[t]),w[t][r]));for(T=p(T,M),t=d;t<g;t++)w[t][r]=p(m(w[t][r],p(_[t],T)),A)}for(t=0;t<g;t++){for(T=0,r=d;r<g;r++)T=f(T,p(y[t][r],_[r]));for(T=p(T,M),r=d;r<g;++r)y[t][r]=h(m(y[t][r],p(T,u(_[r]))),A)}}}return{Q:x,R:b,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function v(e){var t=g(e),r=t.R._data;if(e._data.length>0)for(var n="Complex"===r[0][0].type?d(0):0,i=0;i<r.length;++i)for(var a=0;a<i&&a<(r[0]||[]).length;++a)r[i][a]=n;return t}function x(e){throw Error("qr not implemented for sparse matrices yet")}});function pe(e,t,r,n){for(var i=e._values,a=e._index,s=e._ptr,o=e._size,l=e._datatype,u=o[0],c=o[1],f=n&&e._values?[]:null,h=[],p=[],m=0,d=0;d<c;d++){p[d]=m;for(var g=r?r[d]:d,v=s[g],x=s[g+1],y=v;y<x;y++){var b=t?t[a[y]]:a[y];h[m]=b,f&&(f[m]=i[y]),m++}}return p[c]=m,e.createSparseMatrix({values:f,index:h,ptr:p,size:[u,c],datatype:l})}function pt(e,t,r,n,i,a,s){var o=0;for(r[s]=e;o>=0;){var l=r[s+o],u=r[n+l];-1===u?(o--,a[t++]=l):(r[n+l]=r[i+u],r[s+ ++o]=u)}return t}function pr(e,t){if(!e)return null;var r,n=0,i=[],a=[],s=0,o=t,l=2*t;for(r=0;r<t;r++)a[s+r]=-1;for(r=t-1;r>=0;r--)-1!==e[r]&&(a[o+r]=a[s+e[r]],a[s+e[r]]=r);for(r=0;r<t;r++)-1===e[r]&&(n=pt(r,n,a,s,o,i,l));return i}function pn(e,t){if(!e)return null;var r,n,i=e._index,a=e._ptr,s=e._size,o=s[0],l=s[1],u=[],c=[],f=0,h=l;if(t)for(r=0;r<o;r++)c[h+r]=-1;for(var p=0;p<l;p++){u[p]=-1,c[f+p]=-1;for(var m=a[p],d=a[p+1],g=m;g<d;g++){var v=i[g];for(r=t?c[h+v]:v;-1!==r&&r<p;r=n)n=c[f+r],c[f+r]=p,-1===n&&(u[r]=p);t&&(c[h+v]=p)}}return u}function pi(e,t,r){for(var n=e._values,i=e._index,a=e._ptr,s=e._size[1],o=0,l=0;l<s;l++){var u=a[l];for(a[l]=o;u<a[l+1];u++)t(i[u],l,n?n[u]:1,r)&&(i[o]=i[u],n&&(n[o]=n[u]),o++)}return a[s]=o,i.splice(o,i.length-o),n&&n.splice(o,n.length-o),o}function pa(e){return-e-2}var ps=ew("csAmd",["add","multiply","transpose"],e=>{var{add:t,multiply:r,transpose:n}=e;return function(e,t){if(!t||e<=0||e>3)return null;var r,n,u,c,f,h,p,m,d,g,v,x,y,b,w,_,D=t._size,C=D[0],A=D[1],E=0,N=Math.max(16,10*Math.sqrt(A));
vendor: 5,263 bytes, line 1
1N=Math.min(A-2,N);var S=i(e,t,C,A,N);pi(S,l,null);for(var M=S._index,T=S._ptr,k=T[A],F=[],B=[],P=0,j=A+1,O=2*(A+1),I=3*(A+1),z=4*(A+1),L=5*(A+1),R=6*(A+1),q=7*(A+1),U=F,H=a(A,T,B,0,I,U,O,q,j,R,z,L),V=s(A,T,B,L,z,R,N,j,I,U,O),W=0;V<A;){for(u=-1;W<A&&-1===(u=B[I+W]);W++);-1!==B[O+u]&&(U[B[O+u]]=-1),B[I+W]=B[O+u];var G=B[z+u],$=B[j+u];V+=$;var Y=0;B[j+u]=-$;var Z=T[u],X=0===G?Z:k,J=X;for(c=1;c<=G+1;c++){for(c>G?(h=u,p=Z,m=B[P+u]-G):(p=T[h=M[Z++]],m=B[P+h]),f=1;f<=m;f++)(d=B[j+(r=M[p++])])<=0||(Y+=d,B[j+r]=-d,M[J++]=r,-1!==B[O+r]&&(U[B[O+r]]=U[r]),-1!==U[r]?B[O+U[r]]=B[O+r]:B[I+B[L+r]]=B[O+r]);h!==u&&(T[h]=pa(u),B[R+h]=0)}for(0!==G&&(k=J),B[L+u]=Y,T[u]=X,B[P+u]=J-X,B[z+u]=-2,H=o(H,E,B,R,A),g=X;g<J;g++)if(!((v=B[z+(r=M[g])])<=0)){d=-B[j+r];var K=H-d;for(Z=T[r],x=T[r]+v-1;Z<=x;Z++)B[R+(h=M[Z])]>=H?B[R+h]-=d:0!==B[R+h]&&(B[R+h]=B[L+h]+K)}for(g=X;g<J;g++){for(w=0,y=(x=T[r=M[g]])+B[z+r]-1,b=x,_=0,Z=x;Z<=y;Z++)if(0!==B[R+(h=M[Z])]){var Q=B[R+h]-H;Q>0?(_+=Q,M[b++]=h,w+=h):(T[h]=pa(u),B[R+h]=0)}B[z+r]=b-x+1;var ee=b,et=x+B[P+r];for(Z=y+1;Z<et;Z++){var er=B[j+(n=M[Z])];er<=0||(_+=er,M[b++]=n,w+=n)}0===_?(T[r]=pa(u),Y-=d=-B[j+r],$+=d,V+=d,B[j+r]=0,B[z+r]=-1):(B[L+r]=Math.min(B[L+r],_),M[b]=M[ee],M[ee]=M[x],M[x]=u,B[P+r]=b-x+1,w=(w<0?-w:w)%A,B[O+r]=B[q+w],B[q+w]=r,U[r]=w)}for(B[L+u]=Y,H=o(H+(E=Math.max(E,Y)),E,B,R,A),g=X;g<J;g++)if(!(B[j+(r=M[g])]>=0))for(r=B[q+(w=U[r])],B[q+w]=-1;-1!==r&&-1!==B[O+r];r=B[O+r],H++){for(m=B[P+r],v=B[z+r],Z=T[r]+1;Z<=T[r]+m-1;Z++)B[R+M[Z]]=H;var en=r;for(n=B[O+r];-1!==n;){var ei=B[P+n]===m&&B[z+n]===v;for(Z=T[n]+1;ei&&Z<=T[n]+m-1;Z++)B[R+M[Z]]!==H&&(ei=0);ei?(T[n]=pa(r),B[j+r]+=B[j+n],B[j+n]=0,B[z+n]=-1,n=B[O+n],B[O+en]=n):(en=n,n=B[O+n])}}for(Z=X,g=X;g<J;g++)(d=-B[j+(r=M[g])])<=0||(B[j+r]=d,_=Math.min(_=B[L+r]+Y-d,A-V-d),-1!==B[I+_]&&(U[B[I+_]]=r),B[O+r]=B[I+_],U[r]=-1,B[I+_]=r,W=Math.min(W,_),B[L+r]=_,M[Z++]=r);B[j+u]=$,0==(B[P+u]=Z-X)&&(T[u]=-1,B[R+u]=0),0!==G&&(k=Z)}for(r=0;r<A;r++)T[r]=pa(T[r]);for(n=0;n<=A;n++)B[I+n]=-1;for(n=A;n>=0;n--)B[j+n]>0||(B[O+n]=B[I+T[n]],B[I+T[n]]=n);for(h=A;h>=0;h--)B[j+h]<=0||-1!==T[h]&&(B[O+h]=B[I+T[h]],B[I+T[h]]=h);for(u=0,r=0;r<=A;r++)-1===T[r]&&(u=pt(r,u,B,I,O,F,R));return F.splice(F.length-1,1),F};function i(e,i,a,s,o){var l=n(i);if(1===e&&s===a)return t(i,l);if(2===e){for(var u=l._index,c=l._ptr,f=0,h=0;h<a;h++){var p=c[h];if(c[h]=f,!(c[h+1]-p>o))for(var m=c[h+1];p<m;p++)u[f++]=u[p]}c[a]=f,i=n(l)}return r(l,i)}function a(e,t,r,n,i,a,s,l,u,c,f,h){for(var p=0;p<e;p++)r[n+p]=t[p+1]-t[p];r[n+e]=0;for(var m=0;m<=e;m++)r[i+m]=-1,a[m]=-1,r[s+m]=-1,r[l+m]=-1,r[u+m]=1,r[c+m]=1,r[f+m]=0,r[h+m]=r[n+m];var d=o(0,0,r,c,e);return r[f+e]=-2,t[e]=-1,r[c+e]=0,d}function s(e,t,r,n,i,a,s,o,l,u,c){for(var f=0,h=0;h<e;h++){var p=r[n+h];if(0===p)r[i+h]=-2,f++,t[h]=-1,r[a+h]=0;else if(p>s)r[o+h]=0,r[i+h]=-1,f++,t[h]=pa(e),r[o+e]++;else{var m=r[l+p];-1!==m&&(u[m]=h),r[c+h]=r[l+p],r[l+p]=h}}return f}function o(e,t,r,n,i){if(e<2||e+t<0){for(var a=0;a<i;a++)0!==r[n+a]&&(r[n+a]=1);e=2}return e}function l(e,t){return e!==t}});function po(e,t,r,n,i,a,s){var o,l,u,c=0;if(e<=t||r[n+t]<=r[i+e])return -1;r[i+e]=r[n+t];var f=r[a+e];if(r[a+e]=t,-1===f)c=1,u=e;else{for(c=2,u=f;u!==r[s+u];u=r[s+u]);for(o=f;o!==u;o=l)l=r[s+o],r[s+o]=u}return{jleaf:c,q:u}}var pl=ew("csCounts",["transpose"],e=>{var{transpose:t}=e;return function(e,r,n,i){if(!e||!r||!n)return null;var a,s,o,l,u,c,f,h=e._size,p=h[0],m=h[1],d=4*m+(i?m+p+1:0),g=[],v=0,x=m,y=2*m,b=3*m,w=4*m,_=5*m+1;for(o=0;o<d;o++)g[o]=-1;var D=[],C=t(e),A=C._index,E=C._ptr;for(o=0;o<m;o++)for(D[s=n[o]]=+(-1===g[b+s]);-1!==s&&-1===g[b+s];s=r[s])g[b+s]=o;if(i){for(o=0;o<m;o++)g[n[o]]=o;for(a=0;a<p;a++){for(o=m,c=E[a],f=E[a+1],u=c;u<f;u++)o=Math.min(o,g[A[u]]);g[_+a]=g[w+o],g[w+o]=a}}for(a=0;a<m;a++)g[v+a]=a;for(o=0;o<m;o++){for(-1!==r[s=n[o]]&&D[r[s]]--,l=i?g[w+o]:s;-1!==l;l=i?g[_+l]:-1)for(u=E[l];u<E[l+1];u++){var N=po(a=A[u],s,g,b,x,y,v);N.jleaf>=1&&D[s]++,2===N.jleaf&&D[N.q]--}-1!==r[s]&&(g[v+s]=r[s])}for(s=0;s<m;s++)-1!==r[s]&&(D[r[s]]+=D[s]);return D}}),pu=ew("csSqr",["add","multiply","transpose"],e=>{var{add:t,multiply:r,transpose:n}=e,i=ps({add:t,multiply:r,transpose:n}),a=pl({transpose:n});return function(e,t,r){var n,o=t._ptr,l=t._size[1],u={};if(u.q=i(e,t),e&&!u.q)return null;if(r){var c=e?pe(t,null,u.q,0):t;u.parent=pn(c,1);var f=pr(u.parent,l);if(u.cp=a(c,u.parent,f,1),c&&u.parent&&u.cp&&s(c,u))for(u.unz=0,n=0;n<l;n++)u.unz+=u.cp[n]}else u.unz=4*o[l]+l,u.lnz=u.unz;return u};function s(e,t){var r,n,i,a,s,o=e._ptr,l=e._index,u=e._size,c=u[0],f=u[1];t.pinv=[],t.leftmost=[];var h=t.parent,p=t.pinv,m=t.leftmost,d=[],g=0,v=c,x=c+f,y=c+2*f;for(n=0;n<f;n++)d[v+n]=-1,d[x+n]=-1,d[y+n]=0;for(r=0;r<c;r++)m[r]=-1;for(n=f-1;n>=0;n--)for(a=o[n],s=o[n+1],i=a;i<s;i++)m[l[i]]=n;for(r=c-1;r>=0;r--)p[r]=-1,-1!==(n=m[r])&&(0==d[y+n]++&&(d[x+n]=r),d[g+r]=d[v+n],d[v+n]=r);for(n=0,t.lnz=0,t.m2=c;n<f;n++)if(r=d[v+n],t.lnz++,r<0&&(r=t.m2++),p[r]=n,!(--y[n]<=0)){t.lnz+=d[y+n];var b=h[n];-1!==b&&(0===d[y+b]&&(d[x+b]=d[x+n]),d[g+d[x+n]]=d[v+b],d[v+b]=d[g+r],d[y+b]+=d[y+n])}for(r=0;r<c;r++)p[r]<0&&(p[r]=n++);return!0}});function pc(e,t){return e[t]<0}function pf(e,t){e[t]=pa(e[t])}function ph(e){return e<0?pa(e):e}function pp(e,t,r,n,i){var a,s,o,l=t._index,u=t._ptr,c=t._size[1],f=0;for(n[0]=e;f>=0;){e=n[f];var h=i?i[e]:e;
1pc(u,e)||(pf(u,e),n[c+f]=h<0?0:ph(u[h]));var p=1;for(s=n[c+f],o=h<0?0:ph(u[h+1]);s<o;s++)if(!pc(u,a=l[s])){n[c+f]=s,n[++f]=a,p=0;break}p&&(f--,n[--r]=e)}return r}function pm(e,t,r,n,i){var a,s,o,l=e._ptr,u=e._size,c=t._index,f=t._ptr,h=u[1],p=h;for(s=f[r],o=f[r+1],a=s;a<o;a++){var m=c[a];pc(l,m)||(p=pp(m,e,p,n,i))}for(a=p;a<h;a++)pf(l,n[a]);return p}var pd=ew("csSpsolve",["divideScalar","multiply","subtract"],e=>{var{divideScalar:t,multiply:r,subtract:n}=e;return function(e,i,a,s,o,l,u){var c,f,h,p,m=e._values,d=e._index,g=e._ptr,v=e._size[1],x=i._values,y=i._index,b=i._ptr,w=pm(e,i,a,s,l);for(c=w;c<v;c++)o[s[c]]=0;for(f=b[a],h=b[a+1],c=f;c<h;c++)o[y[c]]=x[c];for(var _=w;_<v;_++){var D=s[_],C=l?l[D]:D;if(!(C<0))for(f=g[C],h=g[C+1],o[D]=t(o[D],m[u?f:h-1]),c=u?f+1:f,p=u?h:h-1;c<p;c++){var A=d[c];o[A]=n(o[A],r(m[c],o[D]))}}return w}}),pg=ew("csLu",["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],e=>{var{abs:t,divideScalar:r,multiply:n,subtract:i,larger:a,largerEq:s,SparseMatrix:o}=e,l=pd({divideScalar:r,multiply:n,subtract:i});return function(e,i,u){if(!e)return null;var c,f,h,p=e._size[1],m=100,d=100;i&&(c=i.q,m=i.lnz||m,d=i.unz||d);var g=[],v=[],x=[],y=new o({values:g,index:v,ptr:x,size:[p,p]}),b=[],w=[],_=[],D=new o({values:b,index:w,ptr:_,size:[p,p]}),C=[],A=[],E=[];for(f=0;f<p;f++)A[f]=0,C[f]=-1,x[f+1]=0;m=0,d=0;for(var N=0;N<p;N++){x[N]=m,_[N]=d;var S=c?c[N]:N,M=l(y,e,S,E,A,C,1),T=-1,k=-1;for(h=M;h<p;h++)if(C[f=E[h]]<0){var F=t(A[f]);a(F,k)&&(k=F,T=f)}else w[d]=C[f],b[d++]=A[f];if(-1===T||k<=0)return null;C[S]<0&&s(t(A[S]),n(k,u))&&(T=S);var B=A[T];for(w[d]=N,b[d++]=B,C[T]=N,v[m]=T,g[m++]=1,h=M;h<p;h++)C[f=E[h]]<0&&(v[m]=f,g[m++]=r(A[f],B)),A[f]=0}for(h=0,x[p]=m,_[p]=d;h<m;h++)v[h]=C[v[h]];return g.splice(m,g.length-m),v.splice(m,v.length-m),b.splice(d,b.length-d),w.splice(d,w.length-d),{L:y,U:D,pinv:C}}}),pv="slu",px=ew(pv,["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],e=>{var{typed:t,abs:r,add:n,multiply:i,transpose:a,divideScalar:s,subtract:o,larger:l,largerEq:u,SparseMatrix:c}=e,f=pu({add:n,multiply:i,transpose:a}),h=pg({abs:r,divideScalar:s,multiply:i,subtract:o,larger:l,largerEq:u,SparseMatrix:c});return t(pv,{"SparseMatrix, number, number":function(e,t,r){if(!eE(t)||t<0||t>3)throw Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(r<0||r>1)throw Error("Partial pivoting threshold must be a number from 0 to 1");var n=f(t,e,!1),i=h(e,n,r);return{L:i.L,U:i.U,p:i.pinv,q:n.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}})});function py(e,t){var r,n=t.length,i=[];if(e)for(r=0;r<n;r++)i[e[r]]=t[r];else for(r=0;r<n;r++)i[r]=t[r];return i}var pb="lusolve",pw=ew(pb,["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],e=>{var{typed:t,matrix:r,lup:n,slu:i,usolve:a,lsolve:s,DenseMatrix:o}=e,l=ug({DenseMatrix:o});return t(pb,{"Array, Array | Matrix":function(e,t){var i=n(e=r(e));return c(i.L,i.U,i.p,null,t).valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var r=n(e);return c(r.L,r.U,r.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var r=n(e);return c(r.L,r.U,r.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,r,n){var a=i(e,r,n);return c(a.L,a.U,a.p,a.q,t)},"Object, Array | Matrix":function(e,t){return c(e.L,e.U,e.p,e.q,t)}});function u(e){if(N(e))return e;if(E(e))return r(e);throw TypeError("Invalid Matrix LU decomposition")}function c(e,t,r,n,i){e=u(e),t=u(t),r&&((i=l(e,i,!0))._data=py(r,i._data));var o=a(t,s(e,i));return n&&(o._data=py(n,o._data)),o}}),p_="polynomialRoot",pD=ew(p_,["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],e=>{var{typed:t,isZero:r,equalScalar:n,add:i,subtract:a,multiply:s,divide:o,sqrt:l,unaryMinus:u,cbrt:c,typeOf:f,im:h,re:p}=e;return t(p_,{"number|Complex, ...number|Complex":(e,t)=>{for(var m=[e,...t];m.length>0&&r(m[m.length-1]);)m.pop();if(m.length<2)throw RangeError("Polynomial [".concat(e,", ").concat(t,"] must have a non-zero non-constant coefficient"));switch(m.length){case 2:return[u(o(m[0],m[1]))];case 3:var[d,g,v]=m,x=s(2,v),y=s(g,g),b=s(4,v,d);if(n(y,b))return[o(u(g),x)];var w=l(a(y,b));return[o(a(w,g),x),o(a(u(w),g),x)];case 4:var _,[D,C,A,E]=m,N=u(s(3,E)),S=s(A,A),M=s(3,E,C),T=i(s(2,A,A,A),s(27,E,E,D)),k=s(9,E,A,C);if(n(S,M)&&n(T,k))return[o(A,N)];var F=a(S,M),B=a(T,k);if(n(i(s(18,E,A,C,D),s(A,A,C,C)),i(s(4,A,A,A,D),s(4,E,C,C,C),s(27,E,E,D,D))))return[o(a(s(4,E,A,C),i(s(9,E,E,D),s(A,A,A))),s(E,F)),o(a(s(9,E,D),s(A,C)),s(2,F))];return c(_=n(S,M)?B:o(i(B,l(a(s(B,B),s(4,F,F,F)))),2),!0).toArray().map(e=>o(i(A,e,o(F,e)),N)).map(e=>"Complex"===f(e)&&n(p(e),p(e)+h(e))?p(e):e);default:throw RangeError("only implemented for cubic or lower-order polynomials, not ".concat(m))}}})}),pC=ew("Help",["evaluate"],e=>{var{evaluate:t}=e;function r(e){if(!(this instanceof r))throw SyntaxError("Constructor must be called with the new operator");if(!e)throw Error('Argument "doc" missing');this.doc=e}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var e=this.doc||{},r="\n";if(e.name&&(r+="Name: "+e.name+"\n\n"),e.category&&(r+="Category: "+e.category+"\n\n"),e.description&&(r+="Description:\n    "+e.description+"\n\n"),e.syntax&&(r+="Syntax:\n    "+e.syntax.join("\n    ")+"\n\n"),e.examples){r+="Examples:\n";for(var n=!1,i=t("config()"),a={config:e=>(n=!0,t("config(newConfig)",{newConfig:e}))},s=0;s<e.examples.length;s++){var o=e.examples[s];r+="    "+o+"\n";var l=void 0;try{l=t(o,a)}catch(e){l=e}void 0===l||j(l)||(r+="        "+nc(l,{precision:14})+"\n")}r+="\n",n&&t("config(originalConfig)",{originalConfig:i})}return e.mayThrow&&e.mayThrow.length&&(r+="Throws: "+e.mayThrow.join(", ")+"\n\n"),e.seealso&&e.seealso.length&&(r+="See also: "+e.seealso.join(", ")+"\n"),r},r.prototype.toJSON=function(){var e=ec(this.doc);return e.mathjs="Help",e},r.fromJSON=function(e){var t={};return Object.keys(e).filter(e=>"mathjs"!==e).forEach(r=>{t[r]=e[r]}),new r(t)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0}),pA=ew("Chain",["?on","math","typed"],e=>{var{on:t,math:r,typed:n}=e;function i(e){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");el(e)?this.value=e.value:this.value=e}function a(e,t){"function"==typeof t&&(i.prototype[e]=o(t))}function s(e,t){ev(i.prototype,e,function(){var e=t();if("function"==typeof e)return o(e)})}function o(e){return function(){if(0==arguments.length)return new i(e(this.value));for(var t=[this.value],r=0;r<arguments.length;r++)t[r+1]=arguments[r];if(n.isTypedFunction(e)){var a=n.resolve(e,t);if(1===a.params.length)throw Error("chain function "+e.name+" cannot match rest parameter between chain value and additional arguments.");return new i(a.implementation.apply(e,t))}return new i(e.apply(e,t))}}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return nc(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(e){return new i(e.value)},i.createProxy=function(e,t){if("string"==typeof e)a(e,t);else{var r=function(t){ex(e,t)&&void 0===l[t]&&s(t,()=>e[t])};for(var n in e)r(n)}};var l={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(r),t&&t("import",function(e,t,r){r||s(e,t)}),i},{isClass:!0}),pE={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},pN={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},pS={bignumber:{name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","bigint","complex","fraction","index","matrix","string","unit"]},bigint:{name:"bigint",category:"Construction",syntax:["bigint(x)"],description:"Create a bigint, an integer with an arbitrary number of digits, from a number or string.",examples:["123123123123123123 # a large number will lose digits",'bigint("123123123123123123")','bignumber(["1", "3", "5"])'],seealso:["boolean","bignumber","number","complex","fraction","index","matrix","string","unit"]},boolean:{name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},complex:{name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},createUnit:{name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},fraction:{name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,de
1n)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},index:{name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix","number","range","string","unit"]},matrix:{name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},number:{name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","bigint","boolean","complex","fraction","index","matrix","string","unit"]},sparse:{name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},splitUnit:{name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},string:{name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},unit:{name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},e:pE,E:pE,false:{name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},i:{name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},Infinity:{name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},LN2:{name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},LN10:{name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},LOG2E:{name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},LOG10E:{name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},NaN:{name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},null:{name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]}
1,pi:pN,PI:pN,phi:{name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},SQRT1_2:{name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},SQRT2:{name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},tau:{name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},true:{name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},version:{name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]}
1,coulomb:{description:"Coulomb's constant. Deprecated in favor of coulombConstant",examples:["coulombConstant"]},coulombConstant:{description:"Coulomb's constant",examples:["coulombConstant"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Bohr magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Bohr radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:{name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},lsolve:{name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},lsolveAll:{name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},lup:{name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 
11], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},lusolve:{name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},leafCount:{name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},polynomialRoot:{name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},resolve:{name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},simplify:{name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},simplifyConstant:{name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},simplifyCore:{name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},symbolicEqual:{name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},rationalize:{name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},slu:{name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},usolve:{name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},usolveAll:{name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},qr:{name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1,  4], [1,  4, -2], [1,  4,  2], [1,  -1, 0]])"],seealso:["lup","slu","matrix"]},abs:{name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},add:{name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},cbrt:{name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cub
1ic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},ceil:{name:"ceil",category:"Arithmetic",syntax:["ceil(x)","ceil(x, n)","ceil(unit, valuelessUnit)","ceil(unit, n, valuelessUnit)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)","ceil(3.241cm, cm)","ceil(3.241cm, 2, cm)"],seealso:["floor","fix","round"]},cube:{name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},divide:{name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},dotDivide:{name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},dotMultiply:{name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},dotPow:{name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},exp:{name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x))   # Euler's formula"],seealso:["expm","expm1","pow","log"]},expm:{name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},expm1:{name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},fix:{name:"fix",category:"Arithmetic",syntax:["fix(x)","fix(x, n)","fix(unit, valuelessUnit)","fix(unit, n, valuelessUnit)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)","fix(3.241cm, cm)","fix(3.241cm, 2, cm)"],seealso:["ceil","floor","round"]},floor:{name:"floor",category:"Arithmetic",syntax:["floor(x)","floor(x, n)","floor(unit, valuelessUnit)","floor(unit, n, valuelessUnit)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)","floor(3.241cm, cm)","floor(3.241cm, 2, cm)"],seealso:["ceil","fix","round"]},gcd:{name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},hypot:{name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenuse of a list with values.",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},lcm:{name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},log:{name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},log2:{name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},log1p:{name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},log10:{name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},mod:{name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divi
1de"]},multiply:{name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},norm:{name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},nthRoot:{name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},nthRoots:{name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},pow:{name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},round:{name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},sign:{name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>0
vendor: 2,071 bytes, line 1
1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},sqrt:{name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},sqrtm:{name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},square:{name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},subtract:{name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},unaryMinus:{name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},unaryPlus:{name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xgcd:{name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},invmod:{name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)
1","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},num:{name:"num",category:"Fraction",syntax:["num(x)"],description:"Get the numerator of a fraction.",examples:["num(fraction(2, 3))","num(fraction(5, 8))"],seealso:["den","fraction"]},den:{name:"den",category:"Fraction",syntax:["den(x)"],description:"Get the denominator of a fraction.",examples:["den(fraction(2, 3))","den(fraction(5, 8))"],seealso:["num","fraction"]},bitAnd:{name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitNot:{name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},bitOr:{name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},bitXor:{name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},leftShift:{name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},rightArithShift:{name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},rightLogShift:{name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},bellNumbers:{name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},catalan:{name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},composition:{name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},stirlingS2:{name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2
1(n, k)"],description:"The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers","bernoulli"]},config:{name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},import:{name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},typed:{name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},arg:{name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},conj:{name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},re:{name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},im:{name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},evaluate:{name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:["parser","parse","compile"]},help:{name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},parse:{name:"parse",category:"Expression",syntax:["parse(expr)","parse(expr, options)","parse([expr1, expr2, expr3, ...])","parse([expr1, expr2, expr3, ...], options)"],description:"Parse an expression. Returns a node tree, which can be evaluated by invoking node.evaluate() or transformed into a functional object via node.compile().",examples:['node1 = parse("sqrt(3^2 + 4^2)")',"node1.evaluate()","code1 = node1.compile()","code1.evaluate()","scope = {a: 3, b: 4}",'node2 = parse("a * b")',"node2.evaluate(scope)","code2 = node2.compile()","code2.evaluate(scope)"],seealso:["parser","evaluate","compile"]},parser:{name:"parser",category:"Expression",syntax:["parser()"],description:"Create a parser object that keeps a context of variables and their values, allowing the evaluation of expressions in that context.",examples:["myParser = parser()",'myParser.evaluate("sqrt(3^2 + 4^2)")','myParser.set("x", 3)','myParser.evaluate("y = x + 3")','myParser.evaluate(["y = x + 3", "y = y + 1"])','myParser.get("y")'],seealso:["evaluate","parse","compile"]},compile:{name:"compile",category:"Expression",syntax:["compile(expr) ","compile([expr1, expr2, expr3, ...])"],description:"Parse and compile an expression. Returns a an object with a function evaluate([scope]) to evaluate the compiled expression.",examples:['code1 = compile("sqrt(3^2 + 4^2)")',"code1.evaluate() ",'code2 = compile("a * b")',"code2.evaluate({a: 3, b: 4})"],seealso:["parser","parse","evaluate"]},distance:{name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},intersect:{name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1],  [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},and:{name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},not:{name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},nullish:{name:"nullish",category:"Logical",syntax:["x ?? y","nullish(x, y)"],description:"Nullish coalescing operator. Returns the right-hand operand when the left-hand operand is null or undefined, and otherwise returns the left-hand operand.",examples:["null ?? 42","undefined ?? 42","0 ?? 42","false ?? 42","null ?? undefined ?? 42"],seealso:["and","or","not"]},or:{name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},xor:{name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},mapSlices:{name:"mapSlices",category:"Matrix",syntax:["mapSlices(A, dim, callback)"],description:"Generate a matrix one dimension less than A by applying c
1allback to each slice of A along dimension dim.",examples:["A = [[1, 2], [3, 4]]","mapSlices(A, 1, sum)","mapSlices(A, 2, prod)"],seealso:["map","forEach"]},concat:{name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},count:{name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},cross:{name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0],  [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4],  [5, 6, 7])"],seealso:["multiply","dot"]},column:{name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},ctranspose:{name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","one
1s","range","size","squeeze","subset","trace","zeros"]},det:{name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diag:{name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},diff:{name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicate the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},dot:{name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},getMatrixDataType:{name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},identity:{name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},filter:{name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},flatten:{name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]}
1,forEach:{name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},inv:{name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},pinv:{name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},eigs:{name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},kron:{name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the Kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},matrixFromFunction:{name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn
1)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},matrixFromRows:{name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},matrixFromColumns:{name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},map:{name:"map",category:"Matrix",syntax:["map(x, callback)","map(x, y, ..., callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array or the matrices/arrays.",examples:["map([1, 2, 3], square)","map([1, 2], [3, 4], f(a,b) = a + b)"],seealso:["filter","forEach"]},ones:{name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},partitionSelect:{name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},range:{name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)"
vendor: 5,064 bytes, line 1
1,"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},resize:{name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},reshape:{name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},rotate:{name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},rotationMatrix:{name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},row:{name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},size:{name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},sort:{name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},squeeze:{name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},subset:{name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},trace:{name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},transpose:{name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},zeros:{name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},fft:{name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional 
1Fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},ifft:{name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse Fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},sylvester:{name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},schur:{name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},lyap:{name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},solveODE:{name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},bernoulli:{name:"bernoulli",category:"Probability",syntax:["bernoulli(n)"],description:"The nth Bernoulli number",examples:["bernoulli(4)","bernoulli(fraction(12))"],seealso:["combinations","gamma","stirlingS2"]},combinations:{name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},combinationsWithRep:{name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},factorial:{name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},gamma:{name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},kldivergence:{name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence  between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},lgamma:{name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},multinomial:{name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},permutations:{name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},pickRandom:{name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},random:{name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},randomInt:{name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},compare:{name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},compareNatural:{name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},compareText:{name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},deepEqual:{name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},equal:{name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},equalText:{name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},larger:{name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not. Comparing a value with NaN returns false.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]}
1,largerEq:{name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},smaller:{name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not. Comparing a value with NaN returns false.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},smallerEq:{name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},unequal:{name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},setCartesian:{name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},setDifference:{name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},setDistinct:{name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},setIntersect:{name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},setIsSubset:{name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},setMultiplicity:{name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},setPowerset:{name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},setSize:{name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},setSymDifference:{name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},setUnion:{name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},zpk2tf:{name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},freqz:{name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},erf:{name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},zeta:{name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemann's Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},cumsum:{name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mad:{name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},max:{name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},mean:{name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},median:{name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},min:{name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},mode:{name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},prod:{name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},quantileSeq:{name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:"Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber. \n\nIn case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.",examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},std:{name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},sum:{name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","variance"]},variance:{name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]}
1,corr:{name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},acos:{name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},acosh:{name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},acot:{name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},acoth:{name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the inverse hyperbolic tangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},acsc:{name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},acsch:{name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the inverse hyperbolic cosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},asec:{name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},asech:{name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},asin:{name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},asinh:{name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},atan:{name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},atanh:{name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},atan2:{name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},cos:{name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},cosh:{name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},cot:{name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},coth:{name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},csc:{name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},csch:{name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]}
1,sec:{name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},sech:{name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},sin:{name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},sinh:{name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},tan:{name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},tanh:{name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},to:{name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},toBest:{name:"toBest",category:"Units",syntax:["toBest(x)","toBest(x, unitList)","toBest(x, unitList, options)"],description:"Converts to the most appropriate display unit.",examples:['toBest(unit(5000, "m"))','toBest(unit(3500000, "W"))','toBest(unit(0.000000123, "A"))','toBest(unit(10, "m"), "cm")','toBest(unit(10, "m"), "mm,km", {offset: 1.5})'],seealso:[]},clone:{name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables, and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},format:{name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},bin:{name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},oct:{name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},hex:{name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},isNaN:{name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero","isFinite","isBounded"]},isBounded:{name:"isBounded",category:"Utils",syntax:["isBounded(x)"],description:"Test whether a value or its entries are bounded.",examples:["isBounded(Infinity)","isBounded(bigint(3))","isBounded([3, -Infinity, -3])"],seealso:["isFinite","isNumeric","isNaN","isNegative","isPositive"]},isFinite:{name:"isFinite",category:"Utils",syntax:["isFinite(x)"],description:"Test whether a value is finite, elementwise on collections.",examples:["isFinite(Infinity)","isFinite(bigint(3))","isFinite([3, -Infinity, -3])"],seealso:["isBounded","isNumeric","isNaN","isNegative","isPositive"]},isInteger:{name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},isNegative:{name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},isNumeric:{name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue","isFinite","isBounded"]},hasNumericValue:{name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},isPositive:{name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]}
1,isPrime:{name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},isZero:{name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},print:{name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},typeOf:{name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},numeric:{name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, bigint, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "bigint")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","bigint","fraction","bignumber","string","format"]}},pM="help",pT=ew(pM,["typed","mathWithTransform","Help"],e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(pM,{any:function(e){var t,a=e;if("string"!=typeof e){for(t in r)if(ex(r,t)&&e===r[t]){a=t;break}}var s=i(pS,a);if(!s)throw Error('No documentation found on "'+("function"==typeof a?a.name:a)+'"');return new n(s)}})}),pk="chain",pF=ew(pk,["typed","Chain"],e=>{var{typed:t,Chain:r}=e;return t(pk,{"":function(){return new r},any:function(e){return new r(e)}})}),pB="det",pP=ew(pB,["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:i,divideScalar:a,isZero:s,unaryMinus:o}=e;return t(pB,{any:function(e){return ec(e)},"Array | Matrix":function(e){var t;switch((t=N(e)?e.size():Array.isArray(e)?(e=r(e)).size():[]).length){case 0:return ec(e);case 1:if(1===t[0])return ec(e.valueOf()[0]);if(0===t[0])return 1;throw RangeError("Matrix must be square (size: "+nc(t)+")");case 2:var n=t[0],i=t[1];if(n===i)return l(e.clone().valueOf(),n,i);if(0===i)return 1;throw RangeError("Matrix must be square (size: "+nc(t)+")");default:throw RangeError("Matrix must be two dimensional (size: "+nc(t)+")")}}});function l(e,t,r){if(1===t)return ec(e[0][0]);if(2===t)return n(i(e[0][0],e[1][1]),i(e[1][0],e[0][1]));for(var l=!1,u=Array(t).fill(0).map((e,t)=>t),c=0;c<t;c++){var f=u[c];if(s(e[f][c])){var h=void 0;for(h=c+1;h<t;h++)if(!s(e[u[h]][c])){f=u[h],u[h]=u[c],u[c]=f,l=!l;break}if(h===t)return e[f][c]}for(var p=e[f][c],m=0===c?1:e[u[c-1]][c-1],d=c+1;d<t;d++)for(var g=u[d],v=c+1;v<t;v++)e[g][v]=a(n(i(e[g][v],p),i(e[g][c],e[f][v])),m)}var x=e[u[t-1]][t-1];return l?o(x):x}}),pj="inv",pO=ew(pj,["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:i,multiply:a,unaryMinus:s,det:o,identity:l,abs:u}=e;return t(pj,{"Array | Matrix":function(e){var t=N(e)?e.size():nb(e);switch(t.length){case 1:if(1===t[0])if(N(e))return r([n(1,e.valueOf()[0])]);else return[n(1,e[0])];throw RangeError("Matrix must be square (size: "+nc(t)+")");case 2:var i=t[0],a=t[1];if(i===a)if(N(e))return r(c(e.valueOf(),i,a),e.storage());else return c(e,i,a);throw RangeError("Matrix must be square (size: "+nc(t)+")");default:throw RangeError("Matrix must be two dimensional (size: "+nc(t)+")")}},any:function(e){return n(1,e)}});function c(e,t,r){if(1===t){if(0===(p=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,p)]]}if(2===t){var c,f,h,p,m,d=o(e);if(0===d)throw Error("Cannot calculate inverse, determinant is zero");return[[n(e[1][1],d),n(s(e[0][1]),d)],[n(s(e[1][0]),d),n(e[0][0],d)]]}var g=e.concat();for(c=0;c<t;c++)g[c]=g[c].concat();for(var v=l(t).valueOf(),x=0;x<r;x++){var y=u(g[x][x]),b=x;for(c=x+1;c<t;)u(g[c][x])>y&&(y=u(g[c][x]),b=c),c++;if(0===y)throw Error("Cannot calculate inverse, determinant is zero");(c=b)!==x&&(m=g[x],g[x]=g[c],g[c]=m,m=v[x],v[x]=v[c],v[c]=m);var w=g[x],_=v[x];for(c=0;c<t;c++){var D=g[c],C=v[c];if(c!==x){if(0!==D[x]){for(h=n(s(D[x]),w[x]),f=x;f<r;f++)D[f]=i(D[f],a(h,w[f]));for(f=0;f<r;f++)C[f]=i(C[f],a(h,_[f]))}}else{for(h=w[x],f=x;f<r;f++)D[f]=n(D[f],h);for(f=0;f<r;f++)C[f]=n(C[f],h)}}}return v}}),pI="pinv",pz=ew(pI,["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],e=>{var{typed:t,matrix:r,inv:n,deepEqual:i,equal:a,dotDivide:s,dot:o,ctranspose:l,divi
1deScalar:u,multiply:c,add:f,Complex:h}=e;return t(pI,{"Array | Matrix":function(e){var t=N(e)?e.size():nb(e);switch(t.length){case 1:if(v(e))return l(e);if(1===t[0])return n(e);return s(l(e),o(e,e));case 2:if(v(e))return l(e);var i=t[0],a=t[1];if(i===a)try{return n(e)}catch(e){if(e instanceof Error&&e.message.match(/Cannot calculate inverse, determinant is zero/));else throw e}if(N(e))return r(p(e.valueOf(),i,a),e.storage());return p(e,i,a);default:throw RangeError("Matrix must be two dimensional (size: "+nc(t)+")")}},any:function(e){return a(e,0)?ec(e):u(1,e)}});function p(e,t,r){var{C:i,F:a}=d(e,t,r),s=c(n(c(l(i),i)),l(i)),o=c(l(a),n(c(a,l(a))));return c(o,s)}function m(e,t,r){for(var n=ec(e),i=0,a=0;a<t&&!(r<=i);a++){for(var o=a;g(n[o][i]);)if(t===++o&&(o=a,r===++i))return n;[n[o],n[a]]=[n[a],n[o]];for(var l=n[a][i],u=0;u<r;u++)n[a][u]=s(n[a][u],l);for(var h=0;h<t;h++)if(h!==a){l=n[h][i];for(var p=0;p<r;p++)n[h][p]=f(n[h][p],c(-1,c(l,n[a][p])))}i++}return n}function d(e,t,r){var n=m(e,t,r);return{C:e.map((e,r)=>e.filter((e,r)=>r<t&&!g(o(n[r],n[r])))),F:n.filter((e,t)=>!g(o(n[t],n[t])))}}function g(e){return a(f(e,h(1,1)),f(0,h(1,1)))}function v(e){return i(f(e,h(1,1)),f(c(e,0),h(1,1)))}});function pL(e){var{addScalar:t,subtract:r,flatten:n,multiply:i,multiplyScalar:a,divideScalar:s,sqrt:o,abs:l,bignumber:u,diag:c,size:f,reshape:h,inv:p,qr:m,usolve:d,usolveAll:g,equal:v,complex:x,larger:y,smaller:b,matrixFromColumns:w,dot:_}=e;function D(e,r,n,i,o){var f,h="BigNumber"===i,p="Complex"===i,m=h?u(0):0,d=h?u(1):p?x(1):1,g=h?u(1):1,w=h?u(10):2,_=a(w,w);o&&(f=Array(r).fill(d));for(var D=!1;!D;){D=!0;for(var C=0;C<r;C++){for(var A=m,E=m,N=0;N<r;N++)C!==N&&(A=t(A,l(e[N][C])),E=t(E,l(e[C][N])));if(!v(A,0)&&!v(E,0)){for(var S=g,M=A,T=s(E,w),k=a(E,w);b(M,T);)M=a(M,_),S=a(S,w);for(;y(M,k);)M=s(M,_),S=s(S,w);if(b(s(t(M,E),S),a(t(A,E),.95))){D=!1;for(var F=s(1,S),B=0;B<r;B++)C!==B&&(e[C][B]=a(e[C][B],F),e[B][C]=a(e[B][C],S));o&&(f[C]=a(f[C],F))}}}}return o?c(f):null}function C(e,n,i,o,c,f){var h="BigNumber"===o,p="Complex"===o,m=h?u(0):p?x(0):0;h&&(i=u(i));for(var d=0;d<n-2;d++){for(var g=0,v=m,y=d+1;y<n;y++){var w=e[y][d];b(l(v),l(w))&&(v=w,g=y)}if(!b(l(v),i)){if(g!==d+1){var _=e[g];e[g]=e[d+1],e[d+1]=_;for(var D=0;D<n;D++){var C=e[D][g];e[D][g]=e[D][d+1],e[D][d+1]=C}if(c){var A=f[g];f[g]=f[d+1],f[d+1]=A}}for(var E=d+2;E<n;E++){var N=s(e[E][d],v);if(0!==N){for(var S=0;S<n;S++)e[E][S]=r(e[E][S],a(N,e[d+1][S]));for(var M=0;M<n;M++)e[M][d+1]=t(e[M][d+1],a(N,e[M][E]));if(c)for(var T=0;T<n;T++)f[E][T]=r(f[E][T],a(N,f[d+1][T]))}}}}return f}function A(e,n,a,s,o){var f="BigNumber"===s,h="Complex"===s,p=f?u(1):h?x(1):1;f&&(a=u(a));for(var d=ec(e),g=[],v=n,y=[],w=o?c(Array(n).fill(p)):void 0,_=o?c(Array(v).fill(p)):void 0,D=0;D<=100;){D+=1;for(var C=d[v-1][v-1],A=0;A<v;A++)d[A][A]=r(d[A][A],C);var{Q:E,R:k}=m(d);d=i(k,E);for(var F=0;F<v;F++)d[F][F]=t(d[F][F],C);if(o&&(_=i(_,E)),1===v||b(l(d[v-1][v-2]),a)){D=0,g.push(d[v-1][v-1]),o&&(y.unshift([[1]]),M(_,n),w=i(w,_),v>1&&(_=c(Array(v-1).fill(p)))),v-=1,d.pop();for(var B=0;B<v;B++)d[B].pop()}else if(2===v||b(l(d[v-2][v-3]),a)){D=0;var P=N(d[v-2][v-2],d[v-2][v-1],d[v-1][v-2],d[v-1][v-1]);g.push(...P),o&&(y.unshift(S(d[v-2][v-2],d[v-2][v-1],d[v-1][v-2],d[v-1][v-1],P[0],P[1],a,s)),M(_,n),w=i(w,_),v>2&&(_=c(Array(v-2).fill(p)))),v-=2,d.pop(),d.pop();for(var j=0;j<v;j++)d[j].pop(),d[j].pop()}if(0===v)break}if(g.sort((e,t)=>+r(l(e),l(t))),D>100){var O=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+g.join(", "));throw O.values=g,O.vectors=[],O}return{values:g,C:o?i(w,T(y,n)):void 0}}function E(e,t,a,s,o,l,f){var h=i(p(a),e,a),m="BigNumber"===f,d="Complex"===f,y=m?u(0):d?x(0):0,b=m?u(1):d?x(1):1,w=[],_=[];for(var D of o){var C=k(w,D,v);-1===C?(w.push(D),_.push(1)):_[C]+=1}for(var A=[],E=w.length,N=Array(t).fill(y),S=c(Array(t).fill(b)),M=function(){var e=w[T],o=r(h,i(e,S)),u=g(o,N);for(u.shift();u.length<_[T];){var c=F(o,t,u,l,f);if(null===c)break;u.push(c)}var m=i(p(s),a);u=u.map(e=>i(m,e)),A.push(...u.map(t=>({value:e,vector:n(t)})))},T=0;T<E;T++)M();return A}
vendor: 8,762 bytes, line 1
1function N(e,n,i,s){var l=t(e,s),u=r(a(e,s),a(n,i)),c=a(l,.5),f=a(o(r(a(l,l),a(4,u))),.5);return[t(c,f),r(c,f)]}function S(e,t,n,i,a,s,o,c){var f="BigNumber"===c,h="Complex"===c,p=f?u(0):h?x(0):0,m=f?u(1):h?x(1):1;if(b(l(n),o))return[[m,p],[p,m]];if(y(l(r(a,s)),o))return[[r(a,i),r(s,i)],[n,n]];var d=r(e,a),g=r(i,a);return b(l(t),o)&&b(l(g),o)?[[d,m],[n,p]]:[[t,p],[g,m]]}function M(e,t){for(var r=0;r<e.length;r++)e[r].push(...Array(t-e[r].length).fill(0));for(var n=e.length;n<t;n++)e.push(Array(t).fill(0)),e[n][n]=1;return e}function T(e,t){for(var r=[],n=0;n<t;n++)r[n]=Array(t).fill(0);var i=0;for(var a of e){for(var s=a.length,o=0;o<s;o++)for(var l=0;l<s;l++)r[i+o][i+l]=a[o][l];i+=s}return r}function k(e,t,r){for(var n=0;n<e.length;n++)if(r(e[n],t))return n;return -1}function F(e,t,r,n,i){for(var a,s="BigNumber"===i?u(1e3):1e3,o=0;o<5;++o){a=B(t,r,i);try{a=d(e,a)}catch(e){continue}if(y(j(a),s))break}if(o>=5)return null;for(o=0;;){var l=d(e,a);if(b(j(P(a,[l])),n))break;if(++o>=10)return null;a=O(l)}return a}function B(e,t,r){var n="BigNumber"===r,i="Complex"===r,a=Array(e).fill(0).map(e=>2*Math.random()-1);return n&&(a=a.map(e=>u(e))),i&&(a=a.map(e=>x(e))),O(a=P(a,t),r)}function P(e,t){var n=f(e);for(var a of t)e=r(e,i(s(_(a=h(a,n),e),_(a,a)),a));return e}function j(e){return l(o(_(e,e)))}function O(e,t){var r="BigNumber"===t,n="Complex"===t;return i(s(r?u(1):n?x(1):1,j(e)),e)}return function(e,t,r,n){var i=!(arguments.length>4)||void 0===arguments[4]||arguments[4],a=D(e,t,r,n,i);C(e,t,r,n,i,a);var{values:s,C:o}=A(e,t,r,n,i);if(i){var l=E(e,t,o,a,s,r,n);return{values:s,eigenvectors:l}}return{values:s}}}function pR(e){var{config:t,addScalar:r,subtract:n,abs:i,atan:a,cos:s,sin:o,multiplyScalar:l,inv:u,bignumber:c,multiply:f,add:h}=e;function p(e,t,r){var n,i,a=e.length,s=Math.abs(t/a);if(r){i=Array(a);for(var o=0;o<a;o++)i[o]=Array(a).fill(0),i[o][o]=1}for(var l=w(e);Math.abs(l[1])>=Math.abs(s);){var u=l[0][0],c=l[0][1];n=d(e[u][u],e[c][c],e[u][c]),e=b(e,n,u,c),r&&(i=v(i,n,u,c)),l=w(e)}for(var f=Array(a).fill(0),h=0;h<a;h++)f[h]=e[h][h];return D(ec(f),i,r)}function m(e,t,r){var n,a,s=e.length,o=i(t/s);if(r){a=Array(s);for(var l=0;l<s;l++)a[l]=Array(s).fill(0),a[l][l]=1}for(var u=_(e);i(u[1])>=i(o);){var c=u[0][0],f=u[0][1];n=g(e[c][c],e[f][f],e[c][f]),e=y(e,n,c,f),r&&(a=x(a,n,c,f)),u=_(e)}for(var h=Array(s).fill(0),p=0;p<s;p++)h[p]=e[p][p];return D(ec(h),a,r)}function d(e,r,n){return Math.abs(r-e)<=t.relTol?Math.PI/4:.5*Math.atan(2*n/(r-e))}function g(e,r,s){var o=n(r,e);return i(o)<=t.relTol?c(-1).acos().div(4):l(.5,a(f(2,s,u(o))))}function v(e,t,r,n){for(var i=e.length,a=Math.cos(t),s=Math.sin(t),o=Array(i).fill(0),l=Array(i).fill(0),u=0;u<i;u++)o[u]=a*e[u][r]-s*e[u][n],l[u]=s*e[u][r]+a*e[u][n];for(var c=0;c<i;c++)e[c][r]=o[c],e[c][n]=l[c];return e}function x(e,t,i,a){for(var u=e.length,f=s(t),h=o(t),p=Array(u).fill(c(0)),m=Array(u).fill(c(0)),d=0;d<u;d++)p[d]=n(l(f,e[d][i]),l(h,e[d][a])),m[d]=r(l(h,e[d][i]),l(f,e[d][a]));for(var g=0;g<u;g++)e[g][i]=p[g],e[g][a]=m[g];return e}function y(e,t,i,a){for(var u=e.length,p=c(s(t)),m=c(o(t)),d=l(p,p),g=l(m,m),v=Array(u).fill(c(0)),x=Array(u).fill(c(0)),y=f(c(2),p,m,e[i][a]),b=r(n(l(d,e[i][i]),y),l(g,e[a][a])),w=h(l(g,e[i][i]),y,l(d,e[a][a])),_=0;_<u;_++)v[_]=n(l(p,e[i][_]),l(m,e[a][_])),x[_]=r(l(m,e[i][_]),l(p,e[a][_]));e[i][i]=b,e[a][a]=w,e[i][a]=c(0),e[a][i]=c(0);for(var D=0;D<u;D++)D!==i&&D!==a&&(e[i][D]=v[D],e[D][i]=v[D],e[a][D]=x[D],e[D][a]=x[D]);return e}function b(e,t,r,n){for(var i=e.length,a=Math.cos(t),s=Math.sin(t),o=a*a,l=s*s,u=Array(i).fill(0),c=Array(i).fill(0),f=o*e[r][r]-2*a*s*e[r][n]+l*e[n][n],h=l*e[r][r]+2*a*s*e[r][n]+o*e[n][n],p=0;p<i;p++)u[p]=a*e[r][p]-s*e[n][p],c[p]=s*e[r][p]+a*e[n][p];e[r][r]=f,e[n][n]=h,e[r][n]=0,e[n][r]=0;for(var m=0;m<i;m++)m!==r&&m!==n&&(e[r][m]=u[m],e[m][r]=u[m],e[n][m]=c[m],e[m][n]=c[m]);return e}function w(e){for(var t=e.length,r=0,n=[0,1],i=0;i<t;i++)for(var a=i+1;a<t;a++)Math.abs(r)<Math.abs(e[i][a])&&(r=Math.abs(e[i][a]),n=[i,a]);return[n,r]}function _(e){for(var t=e.length,r=0,n=[0,1],a=0;a<t;a++)for(var s=a+1;s<t;s++)i(r)<i(e[a][s])&&(r=i(e[a][s]),n=[a,s]);return[n,r]}function D(e,t,r){var n,a=e.length,s=Array(a);if(r){n=Array(a);for(var o=0;o<a;o++)n[o]=Array(a)}for(var l=0;l<a;l++){for(var u=0,c=e[0],f=0;f<e.length;f++)i(e[f])<i(c)&&(c=e[u=f]);if(s[l]=e.splice(u,1)[0],r)for(var h=0;h<a;h++)n[l][h]=t[h][u],t[h].splice(u,1)}if(!r)return{values:s};var p=n.map((e,t)=>({value:s[t],vector:e}));return{values:s,eigenvectors:p}}return function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.relTol,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if("number"===i)return p(e,n,a);if("BigNumber"===i)return m(e,n,a);throw TypeError("Unsupported data type: "+i)}}var pq=ew("eigs",["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],e=>{var{config:t,typed:r,matrix:n,addScalar:i,subtract:a,equal:s,abs:o,atan:l,cos:u,sin:c,multiplyScalar:f,divideScalar:h,inv:p,bignumber:m,multiply:d,add:g,larger:v,column:x,flatten:w,number:C,complex:A,sqrt:E,diag:N,size:S,reshape:M,qr:T,usolve:k,usolveAll:F,im:B,re:P,smaller:j,matrixFromColumns:O,dot:I}=e,z=pR({config:t,addScalar:i,subtract:a,column:x,flatten:w,equal:s,abs:o,atan:l,cos:u,sin:c,multiplyScalar:f,inv:p,bignumber:m,complex:A,multiply:d,add:g}),L=pL({config:t,addScalar:i,subtract:a,multiply:d,multiplyScalar:f,flatten:w,divideScalar:h,sqrt:E,abs:o,bignumber:m,diag:N,size:S,reshape:M,qr:T,inv:p,usolve:k,usolveAll:F,equal:s,complex:A,larger:v,smaller:j,matrixFromColumns:O,dot:I});return r("eigs",{Array:function(e){return R(n(e))},"Array, number|BigNumber":function(e,t){return R(n(e),{precision:t})},"Array, Object":(e,t)=>R(n(e),t),Matrix:function(e){return R(e,{matricize:!0})},"Matrix, number|BigNumber":function(e,t){return R(e,{precision:t,matricize:!0})},"Matrix, Object":function(e,t){var r={matricize:!0};return nr(r,t),R(e,r)}});function R(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=!("eigenvectors"in i)||i.eigenvectors,s=q(e,null!=(r=i.precision)?r:t.relTol,a);return i.matricize&&(s.values=n(s.values),a&&(s.eigenvectors=s.eigenvectors.map(e=>{var{value:t,vector:r}=e;return{value:t,vector:n(r)}}))),a&&Object.defineProperty(s,"vectors",{enumerable:!1,get:()=>{throw Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),s}function q(e,t,r){var n=e.toArray(),i=e.size();if(2!==i.length||i[0]!==i[1])throw RangeError("Matrix must be square (size: ".concat(nc(i),")"));var a=i[0];if(H(n,a,t)&&(V(n,a),U(n,a,t))){var s=W(e,n,a);return z(n,a,t,s,r)}var o=W(e,n,a);return L(n,a,t,o,r)}function U(e,t,r){for(var n=0;n<t;n++)for(var i=n;i<t;i++)if(v(m(o(a(e[n][i],e[i][n]))),r))return!1;return!0}function H(e,t,r){for(var n=0;n<t;n++)for(var i=0;i<t;i++)if(v(m(o(B(e[n][i]))),r))return!1;return!0}function V(e,t){for(var r=0;r<t;r++)for(var n=0;n<t;n++)e[r][n]=P(e[r][n])}function W(e,t,r){var n=e.datatype();if("number"===n||"BigNumber"===n||"Complex"===n)return n;for(var i=!1,a=!1,s=!1,o=0;o<r;o++)for(var l=0;l<r;l++){var u=t[o][l];if(y(u)||D(u))i=!0;else if(b(u))a=!0;else if(_(u))s=!0;else throw TypeError("Unsupported type in Matrix: "+eu(u))}if(a&&s&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),s){for(var c=0;c<r;c++)for(var f=0;f<r;f++)t[c][f]=A(t[c][f]);return"Complex"}if(a){for(var h=0;h<r;h++)for(var p=0;p<r;p++)t[h][p]=m(t[h][p]);return"BigNumber"}if(i){for(var d=0;d<r;d++)for(var g=0;g<r;g++)t[d][g]=C(t[d][g]);return"number"}throw TypeError("Matrix contains unsupported types only.")}}),pU="expm",pH=ew(pU,["typed","abs","add","identity","inv","multiply"],e=>{var{typed:t,abs:r,add:n,identity:i,inv:a,multiply:s}=e;return t(pU,{Matrix:function(e){var t=e.size();if(2!==t.length||t[0]!==t[1])throw RangeError("Matrix must be square (size: "+nc(t)+")");for(var r=t[0],u=1e-15,c=l(o(e),u),f=c.q,h=c.j,p=s(e,Math.pow(2,-h)),m=i(r),d=i(r),g=1,v=p,x=-1,y=1;y<=f;y++)y>1&&(v=s(v,p),x=-x),m=n(m,s(g=g*(f-y+1)/((2*f-y+1)*y),v)),d=n(d,s(g*x,v));for(var b=s(a(d),m),w=0;w<h;w++)b=s(b,b);return T(e)?e.createSparseMatrix(b):b}});function o(e){for(var t=e.size()[0],n=0,i=0;i<t;i++){for(var a=0,s=0;s<t;s++)a+=r(e.get([i,s]));n=Math.max(a,n)}return n}function l(e,t){for(var r=30,n=0;n<r;n++)for(var i=0;i<=n;i++){var a=n-i;if(u(e,i,a)<t)return{q:i,j:a}}throw Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function u(e,t,r){for(var n=1,i=2;i<=t;i++)n*=i;for(var a=n,s=t+1;
1s<=2*t;s++)a*=s;var o=a*(2*t+1);return 8*Math.pow(e/Math.pow(2,r),2*t)*n*n/(a*o)}}),pV="sqrtm",pW=ew(pV,["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],e=>{var{typed:t,abs:r,add:n,multiply:i,map:a,sqrt:s,subtract:o,inv:l,size:u,max:c,identity:f}=e,h=1e3,p=1e-6;function m(e){var t,a=0,s=e,m=f(u(e));do{var d=s;if(s=i(.5,n(d,l(m))),m=i(.5,n(m,l(d))),(t=c(r(o(s,d))))>p&&++a>h)throw Error("computing square root of matrix: iterative method could not converge")}while(t>p)return s}return t(pV,{"Array | Matrix":function(e){var t=N(e)?e.size():nb(e);switch(t.length){case 1:if(1===t[0])return a(e,s);throw RangeError("Matrix must be square (size: "+nc(t)+")");case 2:if(t[0]===t[1])return m(e);throw RangeError("Matrix must be square (size: "+nc(t)+")");default:throw RangeError("Matrix must be at most two dimensional (size: "+nc(t)+")")}}})}),pG="sylvester",p$=ew(pG,["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:i,multiply:a,range:s,concat:o,transpose:l,index:u,subset:c,add:f,subtract:h,identity:p,lusolve:m,abs:d,config:g}=e;return t(pG,{"Matrix, Matrix, Matrix":v,"Array, Matrix, Matrix":function(e,t,r){return v(i(e),t,r)},"Array, Array, Matrix":function(e,t,r){return v(i(e),i(t),r)},"Array, Matrix, Array":function(e,t,r){return v(i(e),t,i(r))},"Matrix, Array, Matrix":function(e,t,r){return v(e,i(t),r)},"Matrix, Array, Array":function(e,t,r){return v(e,i(t),i(r))},"Matrix, Matrix, Array":function(e,t,r){return v(e,t,i(r))},"Array, Array, Array":function(e,t,r){return v(i(e),i(t),i(r)).toArray()}});function v(e,t,g){for(var v=t.size()[0],x=e.size()[0],y=r(e),b=y.T,w=y.U,_=r(a(-1,t)),D=_.T,C=_.U,A=a(a(l(w),g),C),E=s(0,x),N=[],S=(e,t)=>o(e,t,1),M=(e,t)=>o(e,t,0),T=0;T<v;T++)if(T<v-1&&d(c(D,u(T+1,T)))>1e-5){for(var k=M(c(A,u(E,[T])),c(A,u(E,[T+1]))),F=0;F<T;F++)k=f(k,M(a(N[F],c(D,u(F,T))),a(N[F],c(D,u(F,T+1)))));var B=a(p(x),a(-1,c(D,u(T,T)))),P=a(p(x),a(-1,c(D,u(T+1,T)))),j=a(p(x),a(-1,c(D,u(T,T+1)))),O=a(p(x),a(-1,c(D,u(T+1,T+1)))),I=m(M(S(f(b,B),P),S(j,f(b,O))),k);N[T]=I.subset(u(s(0,x),[0])),N[T+1]=I.subset(u(s(x,2*x),[0])),T++}else{for(var z=c(A,u(E,[T])),L=0;L<T;L++)z=f(z,a(N[L],c(D,u(L,T))));var R=h(b,a(c(D,u(T,T)),p(x)));N[T]=m(R,z)}return a(w,a(i(n(...N)),l(C)))}}
1),pY="schur",pZ=ew(pY,["typed","matrix","identity","multiply","qr","norm","subtract"],e=>{var{typed:t,matrix:r,identity:n,multiply:i,qr:a,norm:s,subtract:o}=e;return t(pY,{Array:function(e){var t=l(r(e));return{U:t.U.valueOf(),T:t.T.valueOf()}},Matrix:function(e){return l(e)}});function l(e){var t,r=e.size()[0],l=e,u=n(r),c=0;do{t=l;var f=a(l),h=f.Q;if(l=i(f.R,h),u=i(u,h),c++>100)break}while(s(o(l,t))>1e-4)return{U:u,T:l}}}),pX="lyap",pJ=ew(pX,["typed","matrix","sylvester","multiply","transpose"],e=>{var{typed:t,matrix:r,sylvester:n,multiply:i,transpose:a}=e;return t(pX,{"Matrix, Matrix":function(e,t){return n(e,a(e),i(-1,t))},"Array, Matrix":function(e,t){return n(r(e),a(r(e)),i(-1,t))},"Matrix, Array":function(e,t){return n(e,a(r(e)),r(i(-1,t)))},"Array, Array":function(e,t){return n(r(e),a(r(e)),r(i(-1,t))).toArray()}})}),pK=ew("divide",["typed","matrix","multiply","equalScalar","divideScalar","inv"],e=>{var{typed:t,matrix:r,multiply:n,equalScalar:i,divideScalar:a,inv:s}=e,o=aj({typed:t,equalScalar:i}),l=aI({typed:t});return t("divide",eh({"Array | Matrix, Array | Matrix":function(e,t){return n(e,s(t))},"DenseMatrix, any":function(e,t){return l(e,t,a,!1)},"SparseMatrix, any":function(e,t){return o(e,t,a,!1)},"Array, any":function(e,t){return l(r(e),t,a,!1).valueOf()},"any, Array | Matrix":function(e,t){return n(e,s(t))}},a.signatures))}),pQ="distance",p0=ew(pQ,["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,deepEqual:s,sqrt:o,abs:l}=e;return t(pQ,{"Array, Array, Array":function(e,t,r){if(2===e.length&&2===t.length&&2===r.length){if(!c(e))throw TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(t))throw TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(r))throw TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(s(t,r))throw TypeError("LinePoint1 should not be same with LinePoint2");var a=n(r[1],t[1]),o=n(t[0],r[0]),l=n(i(r[0],t[1]),i(t[0],r[1]));return g(e[0],e[1],a,o,l)}throw TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(e,t,r){if(2===Object.keys(e).length&&2===Object.keys(t).length&&2===Object.keys(r).length){if(!c(e))throw TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(t))throw TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(r))throw TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(s(m(t),m(r)))throw TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in e&&"pointY"in e&&"lineOnePtX"in t&&"lineOnePtY"in t&&"lineTwoPtX"in r&&"lineTwoPtY"in r){var a=n(r.lineTwoPtY,t.lineOnePtY),o=n(t.lineOnePtX,r.lineTwoPtX),l=n(i(r.lineTwoPtX,t.lineOnePtY),i(t.lineOnePtX,r.lineTwoPtY));return g(e.pointX,e.pointY,a,o,l)}
vendor: 1,256 bytes, line 1
1throw TypeError("Key names do not match")}throw TypeError("Invalid Arguments: Try again")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!c(e))throw TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(t))throw TypeError("Array with 3 numbers or BigNumbers expected for second argument");return g(e[0],e[1],t[0],t[1],t[2])}if(3===e.length&&6===t.length){if(!f(e))throw TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(t))throw TypeError("Array with 6 numbers or BigNumbers expected for second argument");return v(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}if(e.length===t.length&&e.length>0){if(!h(e)||!h(t))throw TypeError("All values of an array should be numbers or BigNumbers");return x(e,t)}throw TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,t){if(2===Object.keys(e).length&&3===Object.keys(t).length){if(!c(e))throw TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(t))throw TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"xCoeffLine"in t&&"yCoeffLine"in t&&"constant"in t)return g(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);
1throw TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(t).length){if(!f(e))throw TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(t))throw TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"x0"in t&&"y0"in t&&"z0"in t&&"a"in t&&"b"in t&&"c"in t)return v(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(t).length){if(!c(e))throw TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(t))throw TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointTwoX"in t&&"pointTwoY"in t)return x([e.pointOneX,e.pointOneY],[t.pointTwoX,t.pointTwoY]);throw TypeError("Key names do not match")}if(3===Object.keys(e).length&&3===Object.keys(t).length){if(!f(e))throw TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(t))throw TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointOneZ"in e&&"pointTwoX"in t&&"pointTwoY"in t&&"pointTwoZ"in t)return x([e.pointOneX,e.pointOneY,e.pointOneZ],[t.pointTwoX,t.pointTwoY,t.pointTwoZ]);
1throw TypeError("Key names do not match")}throw TypeError("Invalid Arguments: Try again")},Array:function(e){if(!d(e))throw TypeError("Incorrect array format entered for pairwise distance calculation");return y(e)}});function u(e){return"number"==typeof e||b(e)}function c(e){return e.constructor!==Array&&(e=m(e)),u(e[0])&&u(e[1])}function f(e){return e.constructor!==Array&&(e=m(e)),u(e[0])&&u(e[1])&&u(e[2])}function h(e){return Array.isArray(e)||(e=m(e)),e.every(u)}function p(e){return e.constructor!==Array&&(e=m(e)),u(e[0])&&u(e[1])&&u(e[2])&&u(e[3])&&u(e[4])&&u(e[5])}function m(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}function d(e){if(2===e[0].length&&u(e[0][0])&&u(e[0][1])){if(e.some(e=>2!==e.length||!u(e[0])||!u(e[1])))return!1}else if(!(3===e[0].length&&u(e[0][0])&&u(e[0][1])&&u(e[0][2])))return!1;else if(e.some(e=>3!==e.length||!u(e[0])||!u(e[1])||!u(e[2])))return!1;return!0}function g(e,t,n,s,u){return a(l(r(r(i(n,e),i(s,t)),u)),o(r(i(n,n),i(s,s))))}function v(e,t,s,l,u,c,f,h,p){var m=[n(i(n(u,t),p),i(n(c,s),h)),n(i(n(c,s),f),i(n(l,e),p)),n(i(n(l,e),h),i(n(u,t),f))];return a(m=o(r(r(i(m[0],m[0]),i(m[1],m[1])),i(m[2],m[2]))),o(r(r(i(f,f),i(h,h)),i(p,p))))}function x(e,t){for(var a=e.length,s=0,l=0,u=0;u<a;u++)s=r(i(l=n(e[u],t[u]),l),s);return o(s)}function y(e){for(var t=[],r=[],n=[],i=0;i<e.length-1;i++)for(var a=i+1;a<e.length;a++)2===e[0].length?(r=[e[i][0],e[i][1]],n=[e[a][0],e[a][1]]):3===e[0].length&&(r=[e[i][0],e[i][1],e[i][2]],n=[e[a][0],e[a][1],e[a][2]]),t.push(x(r,n));return t}}),p1=ew("intersect",["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],e=>{var{typed:t,config:r,abs:n,add:i,addScalar:a,matrix:s,multiply:o,multiplyScalar:l,divideScalar:u,subtract:c,smaller:f,equalScalar:h,flatten:p,isZero:m,isNumeric:d}=e;return t("intersect",{"Array, Array, Array":g,"Array, Array, Array, Array":v,"Matrix, Matrix, Matrix":function(e,t,r){var n=g(e.valueOf(),t.valueOf(),r.valueOf());return null===n?null:s(n)},"Matrix, Matrix, Matrix, Matrix":function(e,t,r,n){var i=v(e.valueOf(),t.valueOf(),r.valueOf(),n.valueOf());return null===i?null:s(i)}});function g(e,t,r){if(e=x(e),t=x(t),r=x(r),!b(e))throw TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(t))throw TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(r))throw TypeError("Array with 4 numbers expected as third argument");return A(e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3])}function v(e,t,r,n){if(e=x(e),t=x(t),r=x(r),n=x(n),2===e.length){if(!y(e))throw TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!y(t))throw TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!y(r))throw TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!y(n))throw TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return _(e,t,r,n)}if(3===e.length){if(!b(e))throw TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!b(t))throw TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!b(r))throw TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!b(n))throw TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return C(e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],n[0],n[1],n[2])}throw TypeError("Arrays with two or thee dimensional points expected")}function x(e){return 1===e.length?e[0]:e.length>1&&Array.isArray(e[0])&&e.every(e=>Array.isArray(e)&&1===e.length)?p(e):e}function y(e){return 2===e.length&&d(e[0])&&d(e[1])}function b(e){return 3===e.length&&d(e[0])&&d(e[1])&&d(e[2])}function w(e){return 4===e.length&&d(e[0])&&d(e[1])&&d(e[2])&&d(e[3])}function _(e,t,s,h){var p=e,d=s,g=c(p,t),v=c(d,h),x=c(l(g[0],v[1]),l(v[0],g[1]));if(m(x)||f(n(x),r.relTol))return null;var y=l(v[0],p[1]),b=l(v[1],p[0]),w=l(v[0],d[1]),_=l(v[1],d[0]);return i(o(g,u(a(c(c(y,b),w),_),x)),p)}function D(e,t,r,n,i,s,o,u,f,h,p,m){var d=l(c(e,t),c(r,n)),g=l(c(i,s),c(o,u)),v=l(c(f,h),c(p,m));return a(a(d,g),v)}function C(e,t,r,n,i,s,o,f,p,d,g,v){var x=D(e,o,d,o,t,f,g,f,r,p,v,p),y=D(d,o,n,e,g,f,i,t,v,p,s,r),b=D(e,o,n,e,t,f,i,t,r,p,s,r),w=D(d,o,d,o,g,f,g,f,v,p,v,p),_=D(n,e,n,e,i,t,i,t,s,r,s,r),C=c(l(x,y),l(b,w)),A=c(l(_,w),l(y,y));if(m(A))return null;var E=u(C,A),N=u(a(x,l(E,y)),w),S=a(e,l(E,c(n,e))),M=a(t,l(E,c(i,t))),T=a(r,l(E,c(s,r))),k=a(o,l(N,c(d,o))),F=a(f,l
1(N,c(g,f))),B=a(p,l(N,c(v,p)));return h(S,k)&&h(M,F)&&h(T,B)?[S,M,T]:null}function A(e,t,r,n,i,s,o,f,h,p){var m=l(e,o),d=l(n,o),g=l(t,f),v=l(i,f),x=l(r,h),y=l(s,h),b=u(c(c(c(p,m),g),x),c(c(c(a(a(d,v),y),m),g),x));return[a(e,l(b,c(n,e))),a(t,l(b,c(i,t))),a(r,l(b,c(s,r)))]}}),p2="sum",p3=ew(p2,["typed","config","add","numeric"],e=>{var{typed:t,config:r,add:n,numeric:i}=e;return t(p2,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":s,"...":function(e){if(ir(e))throw TypeError("Scalar values expected in function sum");return a(e)}});function a(e){var t;return ii(e,function(e){try{t=void 0===t?e:n(t,e)}catch(t){throw lR(t,"sum",e)}}),void 0===t&&(t=i(0,r.number)),"string"==typeof t&&(t=i(t,eN(t,r))),t}function s(e,t){try{return is(e,t,n)}catch(e){throw lR(e,"sum")}}}),p4="cumsum",p6=ew(p4,["typed","add","unaryPlus"],e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(p4,{Array:i,Matrix:function(e){return e.create(i(e.valueOf(),e.datatype()))},"Array, number | BigNumber":s,"Matrix, number | BigNumber":function(e,t){return e.create(s(e.valueOf(),t),e.datatype())},"...":function(e){if(ir(e))throw TypeError("All values expected to be scalar in function cumsum");return i(e)}});function i(e){try{return a(e)}catch(e){throw lR(e,p4)}}function a(e){if(0===e.length)return[];for(var t=[n(e[0])],i=1;i<e.length;++i)t.push(r(t[i-1],e[i]));return t}function s(e,t){var r=nb(e);if(t<0||t>=r.length)throw new ny(t,r.length);try{return o(e,t)}catch(e){throw lR(e,p4)}}function o(e,t){var r,n,i;if(t<=0){if(!Array.isArray(e[0][0]))return a(e);for(r=0,i=it(e),n=[];r<i.length;r++)n[r]=o(i[r],t-1);return n}for(r=0,n=[];r<e.length;r++)n[r]=o(e[r],t-1);return n}}),p5="mean",p8=ew(p5,["typed","add","divide"],e=>{var{typed:t,add:r,divide:n}=e;return t(p5,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(e){if(ir(e))throw TypeError("Scalar values expected in function mean");return a(e)}});function i(e,t){try{var i=is(e,t,r),a=Array.isArray(e)?nb(e):e.size();return n(i,a[t])}catch(e){throw lR(e,"mean")}}function a(e){var t,i=0;if(ii(e,function(e){try{t=void 0===t?e:r(t,e),i++}catch(t){throw lR(t,"mean",e)}}),0===i)throw Error("Cannot calculate the mean of an empty array");return n(t,i)}}),p9="median",p7=ew(p9,["typed","add","divide","compare","partitionSelect"],e=>{var{typed:t,add:r,divide:n,compare:i,partitionSelect:a}=e;function s(e){try{var t=(e=nO(e.valueOf())).length;if(0===t)throw Error("Cannot calculate median of an empty array");if(t%2==0){for(var r=t/2-1,n=a(e,r+1),s=e[r],u=0;u<r;++u)i(e[u],s)>0&&(s=e[u]);return l(s,n)}var c=a(e,(t-1)/2);return o(c)}catch(e){throw lR(e,"median")}}var o=t({"number | BigNumber | Complex | Unit":function(e){return e}}),l=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return n(r(e,t),2)}});return t(p9,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(e,t){throw Error("median(A, dim) is not yet supported")},"...":function(e){if(ir(e))throw TypeError("Scalar values expected in function median");return s(e)}})}),me="mad",mt=ew(me,["typed","abs","map","median","subtract"],e=>{var{typed:t,abs:r,map:n,median:i,subtract:a}=e;return t(me,{"Array | Matrix":s,"...":function(e){return s(e)}});function s(e){if(0===(e=nO(e.valueOf())).length)throw Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var t=i(e);return i(n(e,function(e){return r(a(e,t))}))}catch(e){if(e instanceof TypeError&&e.message.includes("median"))throw TypeError(e.message.replace("median","mad"));throw lR(e,"mad")}}}),mr="unbiased",mn="variance",mi=ew(mn,["typed","add","subtract","multiply","divide","mapSlices","isNaN"],e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,mapSlices:s,isNaN:o}=e;return t(mn,{"Array | Matrix":function(e){return l(e,mr)},"Array | Matrix, string":l,"Array | Matrix, number | BigNumber":function(e,t){return u(e,t,mr)},"Array | Matrix, number | BigNumber, string":u,"...":function(e){return l(e,mr)}});function l(e,t){var s,l=0;if(0===e.length)throw SyntaxError("Function variance requires one or more parameters (0 provided)");if(ii(e,function(e){try{s=void 0===s?e:r(s,e),l++}catch(t){throw lR(t,"variance",e)}}),0===l)throw Error("Cannot calculate variance of an empty array");var u=a(s,l);if(s=void 0,ii(e,function(e){var t=n(e,u);s=void 0===s?i(t,t):r(s,i(t,t))}),o(s))return s;switch(t){case"uncorrected":return a(s,l);case"biased":return a(s,l+1);case"unbiased":var c=b(s)?s.mul(0):0;return 1===l?c:a(s,l-1);default:throw Error('Unknown normalization "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function u(e,t,r){try{if(0===e.length)throw SyntaxError("Function variance requires one or more parameters (0 provided)");return s(e,t,e=>l(e,r))}catch(e){throw lR(e,"variance")}}}),ma="quantileSeq",ms=ew(ma,["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:s,partitionSelect:o,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:h,mapSlices:p}=e;return t(ma,{"Array | Matrix, number | BigNumber":(e,t)=>d(e,t,!1),"Array | Matrix, number | BigNumber, number":(e,t,r)=>m(e,t,!1,r,d),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(e,t,r,n)=>m(e,t,r,n,d),"Array | Matrix, Array | Matrix":(e,t)=>
1g(e,t,!1),"Array | Matrix, Array | Matrix, number":(e,t,r)=>m(e,t,!1,r,g),"Array | Matrix, Array | Matrix, boolean":g,"Array | Matrix, Array | Matrix, boolean, number":(e,t,r,n)=>m(e,t,r,n,g)});function m(e,t,r,n,i){return p(e,n,e=>i(e,t,r))}function d(e,t,i){var s,o=e.valueOf();if(c(t,0))throw Error("N/prob must be non-negative");if(f(t,1))return y(t)?v(o,t,i):r(v(o,t,i));if(h(t,1)){if(!u(t))throw Error("N must be a positive integer");if(h(t,0xffffffff))throw Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var l=n(t,1);s=[];for(var p=0;c(p,t);p++){var m=a(p+1,l);s.push(v(o,m,i))}return y(t)?s:r(s)}}function g(e,t,r){for(var n=e.valueOf(),i=t.valueOf(),a=[],s=0;s<i.length;++s)a.push(v(n,i[s],r));return a}function v(e,t,r){var a,c,f=nO(e),h=f.length;if(0===h)throw Error("Cannot calculate quantile of an empty sequence");var p=y(t)?t*(h-1):t.times(h-1),m=y(t)?Math.floor(p):p.floor().toNumber(),d=y(t)?p%1:p.minus(m);if(u(p))return r?f[p]:o(f,y(t)?p:p.valueOf());if(r)a=f[m],c=f[m+1];else{c=o(f,m+1),a=f[m];for(var g=0;g<m;++g)l(f[g],a)>0&&(a=f[g])}return n(s(a,i(1,d)),s(c,d))}}),mo="std",ml=ew(mo,["typed","map","sqrt","variance"],e=>{var{typed:t,map:r,sqrt:n,variance:i}=e;return t(mo,{"Array | Matrix":a,"Array | Matrix, string":a,"Array | Matrix, number | BigNumber":a,"Array | Matrix, number | BigNumber, string":a,"...":function(e){return a(e)}});function a(e,t){if(0===e.length)throw SyntaxError("Function std requires one or more parameters (0 provided)");try{var a=i.apply(null,arguments);if(S(a))return r(a,n);return n(a)}catch(e){if(e instanceof TypeError&&e.message.includes(" variance"))throw TypeError(e.message.replace(" variance"," std"));throw e}}}),mu="corr",mc=ew(mu,["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],e=>{var{typed:t,matrix:r,sqrt:n,sum:i,add:a,subtract:s,multiply:o,pow:l,divide:u}=e;return t(mu,{"Array, Array":function(e,t){return c(e,t)},"Matrix, Matrix":function(e,t){var n=c(e.toArray(),t.toArray());return Array.isArray(n)?r(n):n}});function c(e,t){var r=[];if(Array.isArray(e[0])&&Array.isArray(t[0])){if(e.length!==t.length)throw SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var n=0;n<e.length;n++){if(e[n].length!==t[n].length)throw SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");r.push(f(e[n],t[n]))}return r}if(e.length!==t.length)throw SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(e,t)}function f(e,t){var r=e.length,c=i(e),f=i(t),h=e.reduce((e,r,n)=>a(e,o(r,t[n])),0),p=i(e.map(e=>l(e,2))),m=i(t.map(e=>l(e,2)));return u(s(o(r,h),o(c,f)),n(o(s(o(r,p),l(c,2)),s(o(r,m),l(f,2)))))}}),mf="bernoulli",mh=ew(mf,["typed","config","isInteger","number","?BigNumber","?Fraction"],e=>{var{typed:t,config:r,number:n,BigNumber:i,Fraction:a}=e,s=[void 0],o=[void 0],l=[void 0],u=50;return t(mf,{number:e=>mp(e,e=>e,s,(e,t)=>e+t,(e,t)=>e*t,(e,t)=>e/t),"bigint | Fraction":e=>mp(n(e),e=>new a(e),o,(e,t)=>e.add(t),(e,t)=>e.mul(t),(e,t)=>e.div(t)),BigNumber:e=>(r.precision!==u&&(l=[void 0],u=r.precision),mp(n(e),e=>new i(e),l,(e,t)=>e.add(t),(e,t)=>e.mul(t),(e,t)=>e.div(t)))})});function mp(e,t,r,n,i,a){if(e<0||!eE(e))throw RangeError("Bernoulli index must be nonnegative integer");if(0===e)return t(1);if(1===e)return a(t(-1),t(2));if(e%2==1)return t(0);var s=t(1);1===r.length&&r.push([a(s,t(-3)),a(s,t(-2)),a(s,t(6))]);for(var o=e/2,l=t(0),u=t(2);r.length<=o;){for(var c=r.length,f=Math.floor((c+1)/2),h=l,p=1;p<f;++p)h=n(h,i(r[p][0],r[c-p][0]));h=i(h,u),c%2==0&&(h=n(h,i(r[f][0],r[f][0]))),h=a(h,t(-(2*c+1)));var m=a(i(r[c-1][1],t(-c*(2*c-1))),u);r.push([h,m,i(m,h)])}return r[o][2]}function mm(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return mm(e,r)*mm(r+1,t)}function md(e,t){if(!eE(e)||e<0||!eE(t)||t<0)throw TypeError("Positive integer value expected in function combinations");if(t>e)throw TypeError("k must be less than or equal to n");for(var r=e-t,n=1,i=t<r?r+1:t+1,a=2,s=t<r?t:r,o=i;o<=e;++o)for(n*=o;a<=s&&n%a==0;)n/=a,++a;return a<=s&&(n/=mm(a,s)),n}md.signature="number, number";var mg="combinations",mv=ew(mg,["typed"],e=>{var{typed:t}=e;return t(mg,{"number, number":md,"BigNumber, BigNumber":function(e,t){var r,n,i=e.constructor,a=e.minus(t),s=new i(1);if(!mx(e)||!mx(t))throw TypeError("Positive integer value expected in function combinations");
1if(t.gt(e))throw TypeError("k must be less than n in function combinations");if(r=s,t.lt(a))for(n=s;n.lte(a);n=n.plus(s))r=r.times(t.plus(n)).dividedBy(n);else for(n=s;n.lte(t);n=n.plus(s))r=r.times(a.plus(n)).dividedBy(n);return r}})});function mx(e){return e.isInteger()&&e.gte(0)}var my="combinationsWithRep",mb=ew(my,["typed"],e=>{var{typed:t}=e;return t(my,{"number, number":function(e,t){if(!eE(e)||e<0||!eE(t)||t<0)throw TypeError("Positive integer value expected in function combinationsWithRep");if(e<1)throw TypeError("k must be less than or equal to n + k - 1");return t<e-1?mm(e,e+t-1)/mm(1,t):mm(t+1,e+t-1)/mm(1,e-1)},"BigNumber, BigNumber":function(e,t){var r,n,i=new e.constructor(1),a=e.minus(i);if(!mw(e)||!mw(t))throw TypeError("Positive integer value expected in function combinationsWithRep");if(e.lt(i))throw TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(r=i,t.lt(a))for(n=i;n.lte(a);n=n.plus(i))r=r.times(t.plus(n)).dividedBy(n);else for(n=i;n.lte(t);n=n.plus(i))r=r.times(a.plus(n)).dividedBy(n);return r}})});function mw(e){return e.isInteger()&&e.gte(0)}function m_(e){if(eE(e))return e<=0?Number.isFinite(e)?1/0:NaN:e>171?1/0:mm(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*m_(1-e));if(e>=171.35)return 1/0;if(e>85){var t,r=e*e,n=r*e,i=n*e,a=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*i)+163879/(0xc756000*a)+5246819/(0x11850f0000*a*e))}--e,t=mC[0];for(var s=1;s<mC.length;++s)t+=mC[s]/(e+s);var o=e+mD+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*t}m_.signature="number";var mD=4.7421875,mC=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,1580887032249125e-19,-21026444172410488e-20,21743961811521265e-20,-1643181065367639e-19,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],mA=.9189385332046728,mE=5,mN=7,mS=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function mM(e){if(e<0)return NaN;if(0===e)return 1/0;if(!Number.isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-mM(1-e);for(var t=(e-=1)+mE+.5,r=mS[0],n=mN-1;n>=1;n--)r+=mS[n]/(e+n);return mA+(e+.5)*Math.log(t)-t+Math.log(r)}mM.signature="number";var mT="gamma",mk=ew(mT,["typed","config","multiplyScalar","pow","BigNumber","Complex"],e=>{var{typed:t,config:r,multiplyScalar:n,pow:i,BigNumber:a,Complex:s}=e;function o(e){if(0===e.im)return m_(e.re);if(e.re<.5){var t=new s(1-e.re,-e.im),r=new s(Math.PI*e.re,Math.PI*e.im);return new s(Math.PI).div(r.sin()).div(o(t))}e=new s(e.re-1,e.im);for(var n=new s(mC[0],0),i=1;i<mC.length;++i){var a=new s(mC[i],0);n=n.add(a.div(e.add(i)))}var l=new s(e.re+mD+.5,e.im),u=Math.sqrt(2*Math.PI),c=l.pow(e.add(.5)),f=l.neg().exp();return n.mul(u).mul(c).mul(f)}return t(mT,{number:m_,Complex:o,BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new a(1/0):l(e.minus(1));if(!e.isFinite())return new a(e.isNegative()?NaN:1/0);throw Error("Integer BigNumber expected")}});function l(e){if(e<8)return new a([1,1,2,6,24,120,720,5040][e]);var t=r.precision+(0|Math.log(e.toNumber())),n=a.clone({precision:t});if(e%2==1)return e.times(l(new a(e-1)));for(var i=e,s=new n(e),o=e.toNumber();i>2;)i-=2,o+=i,s=s.times(o);return new a(s.toPrecision(a.precision))}}),mF="lgamma",mB=ew(mF,["Complex","typed"],e=>{var{Complex:t,typed:r}=e,n=7,i=7,a=[-.029550653594771242,.00641025641025641,-.0019175269175269176,8417508417508417e-19,-5952380952380953e-19,7936507936507937e-19,-.002777777777777778,.08333333333333333];return r(mF,{number:mM,Complex:s,BigNumber:function(){throw Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function s(e){var r=6.283185307179586,a=1.1447298858494002,u=.1;if(e.isNaN())return new t(NaN,NaN);if(0===e.im)return new t(mM(e.re),0);if(e.re>=n||Math.abs(e.im)>=i)return o(e);if(e.re<=u){var c=eK(r,e.im)*Math.floor(.5*e.re+.25),f=e.mul(Math.PI).sin().log(),h=s(new t(1-e.re,-e.im));return new t(a,c).sub(f).sub(h)}if(e.im>=0)return l(e);else return l(e.conjugate()).conjugate()}function o(e){for(var r=e.sub(.5).mul(e.log()).sub(e).add(mA),n=new t(1,0).div(e),i=n.div(e),s=a[0],o=a[1],l=2*i.re,u=i.re*i.re+i.im*i.im,c=2;c<8;c++){var f=o;o=-u*s+a[c],s=l*s+f}var h=n.mul(i.mul(s).add(o));return r.add(h)}function l(e){var r=0,i=0,a=e;for(e=e.add(1);e.re<=n;){var s=+((a=a.mul(e)).im<0);0!==s&&0===i&&r++,i=s,e=e.add(1)}return o(e).sub(a.log()).sub(new t(0,2*r*Math.PI*1))}}
1),mP="factorial",mj=ew(mP,["typed","gamma"],e=>{var{typed:t,gamma:r}=e;return t(mP,{number:function(e){if(e<0)throw Error("Value must be non-negative");return r(e+1)},BigNumber:function(e){if(e.isNegative())throw Error("Value must be non-negative");return r(e.plus(1))},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),mO="kldivergence",mI=ew(mO,["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],e=>{var{typed:t,matrix:r,divide:n,sum:i,multiply:a,map:s,dotDivide:o,log:l,isNumeric:u}=e;return t(mO,{"Array, Array":function(e,t){return c(r(e),r(t))},"Matrix, Array":function(e,t){return c(e,r(t))},"Array, Matrix":function(e,t){return c(r(e),t)},"Matrix, Matrix":function(e,t){return c(e,t)}});function c(e,t){var r=t.size().length,c=e.size().length;if(r>1)throw Error("first object must be one dimensional");if(c>1)throw Error("second object must be one dimensional");if(r!==c)throw Error("Length of two vectors must be equal");if(0===i(e))throw Error("Sum of elements in first object must be non zero");if(0===i(t))throw Error("Sum of elements in second object must be non zero");var f=n(e,i(e)),h=n(t,i(t)),p=i(a(f,s(o(f,h),e=>l(e))));return u(p)?p:NaN}}),mz="multinomial",mL=ew(mz,["typed","add","divide","multiply","factorial","isInteger","isPositive"],e=>{var{typed:t,add:r,divide:n,multiply:i,factorial:a,isInteger:s,isPositive:o}=e;return t(mz,{"Array | Matrix":function(e){var t=0,l=1;return ii(e,function(e){if(!s(e)||!o(e))throw TypeError("Positive integer value expected in function multinomial");t=r(t,e),l=i(l,a(e))}),n(a(t),l)}})}),mR="permutations",mq=ew(mR,["typed","factorial"],e=>{var{typed:t,factorial:r}=e;return t(mR,{"number | BigNumber":r,"number, number":function(e,t){if(!eE(e)||e<0||!eE(t)||t<0)throw TypeError("Positive integer value expected in function permutations");if(t>e)throw TypeError("second argument k must be less than or equal to first argument n");return mm(e-t+1,e)},"BigNumber, BigNumber":function(e,t){var r,n;if(!mU(e)||!mU(t))throw TypeError("Positive integer value expected in function permutations");if(t.gt(e))throw TypeError("second argument k must be less than or equal to first argument n");for(r=e.mul(0).add(1),n=e.minus(t).plus(1);n.lte(e);n=n.plus(1))r=r.times(n);return r}})});function mU(e){return e.isInteger()&&e.gte(0)}var mH=e.i(289378),mV=(0,mH.default)(Date.now());function mW(e){var t;return function(e){t=null===e?mV:(0,mH.default)(String(e))}(e),function(){return t()}}var mG="pickRandom",m$=ew(mG,["typed","config","?on"],e=>{var{typed:t,config:r,on:n}=e,i=mW(r.randomSeed);return n&&n("config",function(e,t){e.randomSeed!==t.randomSeed&&(i=mW(e.randomSeed))}),t(mG,{"Array | Matrix":function(e){return a(e,{})},"Array | Matrix, Object":function(e,t){return a(e,t)},"Array | Matrix, number":function(e,t){return a(e,{number:t})},"Array | Matrix, Array | Matrix":function(e,t){return a(e,{weights:t})},"Array | Matrix, Array | Matrix, number":function(e,t,r){return a(e,{number:r,weights:t})},"Array | Matrix, number, Array | Matrix":function(e,t,r){return a(e,{number:t,weights:r})}});function a(e,t){var r,{number:n,weights:a,elementWise:s=!0}=t,o=void 0===n;o&&(n=1);var l=N(e)?e.create:N(a)?a.create:null;e=e.valueOf(),a&&(a=a.valueOf()),!0===s&&(e=nO(e),a=nO(a));var u=0;if(void 0!==a){if(a.length!==e.length)throw Error("Weights must have the same length as possibles");for(var c=0,f=a.length;c<f;c++){if(!y(a[c])||a[c]<0)throw Error("Weights must be an array of positive numbers");u+=a[c]}}for(var h=e.length,p=[];p.length<n;){if(void 0===a)r=e[Math.floor(i()*h)];else for(var m=i()*u,d=0,g=e.length;d<g;d++)if((m-=a[d])<0){r=e[d];break}p.push(r)}return o?p[0]:l?l(p):p}});function mY(e,t){var r=[];if((e=e.slice(0)).length>1)for(var n=0,i=e.shift();n<i;n++)r.push(mY(e,t));else for(var a=0,s=e.shift();a<s;a++)r.push(t());return r}var mZ="random",mX=ew(mZ,["typed","config","?on"],e=>{var{typed:t,config:r,on:n}=e,i=mW(r.randomSeed);return n&&n("config",function(e,t){e.randomSeed!==t.randomSeed&&(i=mW(e.randomSeed))}),t(mZ,{"":()=>s(0,1),number:e=>s(0,e),"number, number":(e,t)=>s(e,t),"Array | Matrix":e=>a(e,0,1),"Array | Matrix, number":(e,t)=>a(e,0,t),"Array | Matrix, number, number":(e,t,r)=>a(e,t,r)});function a(e,t,r){var n=mY(e.valueOf(),()=>s(t,r));return N(e)?e.create(n,"number"):n}function s(e,t){return e+i()*(t-e)}}),mJ="randomInt",mK=ew(mJ,["typed","config","log2","?on"],e=>{var{typed:t,config:r,log2:n,on:i}=e,a=mW(r.randomSeed);return i&&i("config",function(e,t){e.randomSeed!==t.randomSeed&&(a=mW(e.randomSeed))}),t(mJ,{"":()=>o(0,2),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),bigint:e=>l(0n,e),"bigint, bigint":l,"Array | Matrix":e=>s(e,0,1),"Array | Matrix, number":(e,t)=>s(e,0,t),"Array | Matrix, number, number":(e,t,r)=>s(e,t,r)});function s(e,t,r){var n=mY(e.valueOf(),()=>o(t,r));return N(e)?e.create(n,"number"):n}function o(e,t){return Math.floor(e+a()*(t-e))}function l(e,t){var r=t-e;if(r<=2n**30n)return e+BigInt(o(0,Number(r)));for(var i=n(r),s=r;s>=r;){s=0n;for(var l=0;l<i;++l)s=2n*s+(.5>a()?0n:1n)}return e+s}}),mQ="stirlingS2",m0=ew(mQ,["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:i,divideScalar:a,pow:s,factorial:o,combinations:l,isNegative:u,isInteger:c,number:f,bignumber:h,larger:p}=e,m=[],d=[];return t(mQ,{"number | BigNumber, number | BigNumber":function(e,t){if(!c(e)||u(e)||!c(t)||u(t))throw TypeError("Non-negative integer value expected in function stirlingS2");
1if(p(t,e))throw TypeError("k must be less than or equal to n in function stirlingS2");var n=!(y(e)&&y(t)),a=n?d:m,s=n?h:f,o=f(e),l=f(t);if(a[o]&&a[o].length>l)return a[o][l];for(var g=0;g<=o;++g)if(a[g]||(a[g]=[s(+(0===g))]),0!==g)for(var v=a[g],x=a[g-1],b=v.length;b<=g&&b<=l;++b)b===g?v[b]=1:v[b]=r(i(s(b),x[b]),x[b-1]);return a[o][l]}})}),m1="bellNumbers",m2=ew(m1,["typed","addScalar","isNegative","isInteger","stirlingS2"],e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:i,stirlingS2:a}=e;return t(m1,{"number | BigNumber":function(e){if(!i(e)||n(e))throw TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,s=0;s<=e;s++)t=r(t,a(e,s));return t}})}),m3="catalan",m4=ew(m3,["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:s,isInteger:o}=e;return t(m3,{"number | BigNumber":function(e){if(!o(e)||s(e))throw TypeError("Non-negative integer value expected in function catalan");return n(a(i(e,2),e),r(e,1))}})}),m6="composition",m5=ew(m6,["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],e=>{var{typed:t,addScalar:r,combinations:n,isPositive:i,isNegative:a,isInteger:s,larger:o}=e;return t(m6,{"number | BigNumber, number | BigNumber":function(e,t){if(s(e)&&i(e)&&s(t)&&i(t)){if(o(t,e))throw TypeError("k must be less than or equal to n in function composition")}else throw TypeError("Positive integer value expected in function composition");return n(r(e,-1),r(t,-1))}})}),m8="leafCount",m9=ew(m8,["parse","typed"],e=>{var{parse:t,typed:r}=e;function n(e){var t=0;return e.forEach(e=>{t+=n(e)}),t||1}return r(m8,{Node:function(e){return n(e)}})});function m7(e){return X(e)||en(e)&&e.isUnary()&&X(e.args[0])}function de(e){return!!(X(e)||(Q(e)||en(e))&&e.args.every(de)||ei(e)&&de(e.content))}function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach(function(t){lE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var dn=ew("simplifyUtil",["FunctionNode","OperatorNode","SymbolNode"],e=>{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,i="defaultF",a={add:{trivial:!0,total:!0,commutative:!0,associative:!0},unaryPlus:{trivial:!0,total:!0,commutative:!0,associative:!0},subtract:{trivial:!1,total:!0,commutative:!1,associative:!1},multiply:{trivial:!0,total:!0,commutative:!0,associative:!0},divide:{trivial:!1,total:!0,commutative:!1,associative:!1},paren:{trivial:!0,total:!0,commutative:!0,associative:!1},defaultF:{trivial:!1,total:!0,commutative:!1,associative:!1}};function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=i;if("string"==typeof e?n=e:en(e)?n=e.fn.toString():Q(e)?n=e.name:ei(e)&&(n="paren"),ex(r,n)){var s=r[n];if(ex(s,t))return s[t];if(ex(a,n))return a[n][t]}if(ex(r,i)){var o=r[i];return ex(o,t)?o[t]:a[i][t]}if(ex(a,n)){var l=a[n];if(ex(l,t))return l[t]}return a[i][t]}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return s(e,"commutative",t)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return s(e,"associative",t)}function u(e,t){if(!e.args||0===e.args.length)return e;e.args=c(e,t);for(var r=0;r<e.args.length;r++)u(e.args[r],t)}function c(e,t){var r,n=[],i=function(e){for(var t=0;t<e.args.length;t++){var a=e.args[t];en(a)&&r===a.op?i(a):n.push(a)}};return l(e,t)?(r=e.op,i(e),n):e.args}function f(e,t){if(e.args&&0!==e.args.length){for(var r=p(e),n=e.args.length,i=0;i<n;i++)f(e.args[i],t);if(n>2&&l(e,t)){for(var a=e.args.pop();e.args.length>0;)a=r([e.args.pop(),a]);e.args=a.args}}}function h(e,t){if(e.args&&0!==e.args.length){for(var r=p(e),n=e.args.length,i=0;i<n;i++)h(e.args[i],t);
vendor: 6,361 bytes, line 1
1if(n>2&&l(e,t)){for(var a=e.args.shift();e.args.length>0;)a=r([a,e.args.shift()]);e.args=a.args}}}function p(e){return en(e)?function(t){try{return new r(e.op,e.fn,t,e.implicit)}catch(e){return console.error(e),[]}}:function(r){return new t(new n(e.name),r)}}return{createMakeNodeFunction:p,hasProperty:s,isCommutative:o,isAssociative:l,mergeContext:function(e,t){var r=dr({},e);for(var n in t)ex(e,n)?r[n]=dr(dr({},t[n]),e[n]):r[n]=t[n];return r},flatten:u,allChildren:c,unflattenr:f,unflattenl:h,defaultContext:a,realContext:{divide:{total:!1},log:{total:!1}},positiveContext:{subtract:{total:!1},abs:{trivial:!0},log:{total:!0}}}}),di=ew("simplify",["typed","parse","equal","resolve","simplifyConstant","simplifyCore","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode","replacer"],e=>{var{typed:t,parse:r,equal:n,resolve:i,simplifyConstant:a,simplifyCore:s,AccessorNode:o,ArrayNode:l,ConstantNode:u,FunctionNode:c,IndexNode:f,ObjectNode:h,OperatorNode:p,ParenthesisNode:m,SymbolNode:d,replacer:x}=e,{hasProperty:y,isCommutative:b,isAssociative:w,mergeContext:_,flatten:D,unflattenr:C,unflattenl:A,createMakeNodeFunction:E,defaultContext:N,realContext:S,positiveContext:M}=dn({FunctionNode:c,OperatorNode:p,SymbolNode:d});t.addConversion({from:"Object",to:"Map",convert:v});var T=t("simplify",{Node:I,"Node, Map":(e,t)=>I(e,!1,t),"Node, Map, Object":(e,t,r)=>I(e,!1,t,r),"Node, Array":I,"Node, Array, Map":I,"Node, Array, Map, Object":I});function k(e){return e.transform(function(e){return ei(e)?k(e.content):e})}t.removeConversion({from:"Object",to:"Map",convert:v}),T.defaultContext=N,T.realContext=S,T.positiveContext=M;var F={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};function B(e,t){var n={};if(e.s){var i=e.s.split("->");if(2===i.length)n.l=i[0],n.r=i[1];else throw SyntaxError("Could not parse rule: "+e.s)}else n.l=e.l,n.r=e.r;for(var a of(n.l=k(r(n.l)),n.r=k(r(n.r)),["imposeContext","repeat","assuming"]))a in e&&(n[a]=e[a]);if(e.evaluate&&(n.evaluate=r(e.evaluate)),w(n.l,t)){var s,o=!b(n.l,t);o&&(s=O());var l=E(n.l),u=O();n.expanded={},n.expanded.l=l([n.l,u]),D(n.expanded.l,t),C(n.expanded.l,t),n.expanded.r=l([n.r,u]),o&&(n.expandedNC1={},n.expandedNC1.l=l([s,n.l]),n.expandedNC1.r=l([s,n.r]),n.expandedNC2={},n.expandedNC2.l=l([s,n.expanded.l]),n.expandedNC2.r=l([s,n.expanded.r]))}return n}function P(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n],a=void 0,s=typeof i;switch(s){case"string":i={s:i};case"object":a=B(i,t);break;case"function":a=i;break;default:throw TypeError("Unsupported type of rule: "+s)}r.push(a)}return r}T.rules=[s,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd   * ( vd   * n1 + n2)",r:"vd^2       * n1 +  vd   * n2"},{s:" vd   * (vd^n4 * n1 + n2)   ->  vd^(1+n4)  * n1 +  vd   * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd   * n1 + n2)   ->  vd^(n3+1)  * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2)   ->  vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},a,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 +   n3  * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3    -> (n1 + n2*n3^(n4 +  1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},a,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];var j=0;function O(){return new d("_p"+j++)}function I(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g(),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n.consoleDebug;t=P(t||T.rules,n.context);var s=i(e,r);s=k(s);for(var o={},l=s.toString({parenthesis:"all"});!o[l];){o[l]=!0,j=0;var u=l;a&&console.log("Working on: ",l);for(var c=0;c<t.length;c++){var f="";if("function"==typeof t[c]?(s=t[c](s,n),a&&(f=t[c].name)):(D(s,n.context),s=L(s,t[c],n.context),a&&(f="".concat(t[c].l.toString()," -> ").concat(t[c].r.toString()))),a){var h=s.toString({parenthesis:"all"});h!==u&&(console.log("Applying",f,"produced",h),u=h)}
1A(s,n.context)}l=s.toString({parenthesis:"all"})}return s}function z(e,t,r){var n=e;if(e)for(var i=0;i<e.length;++i){var a=L(e[i],t,r);a!==e[i]&&(n===e&&(n=e.slice()),n[i]=a)}return n}function L(e,t,r){if(t.assuming){for(var n in t.assuming)for(var i in t.assuming[n])if(y(n,i,r)!==t.assuming[n][i])return e}var a=_(t.imposeContext,r),s=e;if(s instanceof p||s instanceof c){var u=z(s.args,t,r);u!==s.args&&((s=s.clone()).args=u)}else if(s instanceof m){if(s.content){var d=L(s.content,t,r);d!==s.content&&(s=new m(d))}}else if(s instanceof l){var g=z(s.items,t,r);g!==s.items&&(s=new l(g))}else if(s instanceof o){var v=s.object;s.object&&(v=L(s.object,t,r));var x=s.index;s.index&&(x=L(s.index,t,r)),(v!==s.object||x!==s.index)&&(s=new o(v,x))}else if(s instanceof f){var b=z(s.dimensions,t,r);b!==s.dimensions&&(s=new f(b))}else if(s instanceof h){var w=!1,D={};for(var C in s.properties)D[C]=L(s.properties[C],t,r),D[C]!==s.properties[C]&&(w=!0);w&&(s=new h(D))}var A=t.r,E=V(t.l,s,a)[0];if(!E&&t.expanded&&(A=t.expanded.r,E=V(t.expanded.l,s,a)[0]),!E&&t.expandedNC1&&(A=t.expandedNC1.r,(E=V(t.expandedNC1.l,s,a)[0])||(A=t.expandedNC2.r,E=V(t.expandedNC2.l,s,a)[0])),E){var N=s.implicit;s=A.clone(),N&&"implicit"in A&&(s.implicit=!0),s=s.transform(function(e){return e.isSymbolNode&&ex(E.placeholders,e.name)?E.placeholders[e.name].clone():e})}return t.repeat&&s!==e&&(s=L(s,t,r)),s}function R(e,t){var r,n,i=[],a=E(e);if(b(e,t))for(var s=0;s<e.args.length;s++)(n=e.args.slice(0)).splice(s,1),r=1===n.length?n[0]:a(n),i.push(a([e.args[s],r]));else for(var o=1;o<e.args.length;o++){var l=e.args[0];o>1&&(l=a(e.args.slice(0,o))),r=1===(n=e.args.slice(o)).length?n[0]:a(n),i.push(a([l,r]))}return i}function q(e,t){var r={placeholders:{}};if(!e.placeholders&&!t.placeholders)return r;if(!e.placeholders)return t;if(!t.placeholders)return e;for(var n in e.placeholders)if(ex(e.placeholders,n)&&(r.placeholders[n]=e.placeholders[n],ex(t.placeholders,n)&&!W(e.placeholders[n],t.placeholders[n])))return null;for(var i in t.placeholders)ex(t.placeholders,i)&&(r.placeholders[i]=t.placeholders[i]);return r}function U(e,t){var r,n=[];if(0===e.length||0===t.length)return n;for(var i=0;i<e.length;i++)for(var a=0;a<t.length;a++)(r=q(e[i],t[a]))&&n.push(r);return n}function H(e){if(0===e.length)return e;for(var t=e.reduce(U),r=[],n={},i=0;i<t.length;i++){var a=JSON.stringify(t[i],x);n[a]||(n[a]=!0,r.push(t[i]))}return r}function V(e,t,r,i){var a=[{placeholders:{}}];if(e instanceof p&&t instanceof p||e instanceof c&&t instanceof c){if(e instanceof p){if(e.op!==t.op||e.fn!==t.fn)return[]}else if(e instanceof c&&e.name!==t.name)return[];if(1===t.args.length&&1===e.args.length||!w(t,r)&&t.args.length===e.args.length||i){for(var s=[],o=0;o<e.args.length;o++){var l=V(e.args[o],t.args[o],r);if(0===l.length)break;s.push(l)}if(s.length!==e.args.length){if(!b(t,r)||1===e.args.length)return[];if(e.args.length>2)throw Error("permuting >2 commutative non-associative rule arguments not yet implemented");var f=V(e.args[0],t.args[1],r);if(0===f.length)return[];var h=V(e.args[1],t.args[0],r);if(0===h.length)return[];s=[f,h]}a=H(s)}else if(t.args.length>=2&&2===e.args.length){for(var m=R(t,r),g=[],v=0;v<m.length;v++){var x=V(e,m[v],r,!0);g=g.concat(x)}return g}else if(!(e.args.length>2))return[];else throw Error("Unexpected non-binary associative function: "+e.toString())}else if(e instanceof d){if(0===e.name.length)throw Error("Symbol in rule has 0 length...!?");if(F[e.name]){if(e.name!==t.name)return[]}else switch(e.name[1]>="a"&&e.name[1]<="z"?e.name.substring(0,2):e.name[0]){case"n":case"_p":a[0].placeholders[e.name]=t;break;case"c":case"cl":if(!X(t))return[];a[0].placeholders[e.name]=t;break;case"v":if(X(t))return[];a[0].placeholders[e.name]=t;break;case"vl":if(!eo(t))return[];a[0].placeholders[e.name]=t;break;case"cd":if(!m7(t))return[];a[0].placeholders[e.name]=t;break;case"vd":if(m7(t))return[];a[0].placeholders[e.name]=t;break;case"ce":if(!de(t))return[];a[0].placeholders[e.name]=t;break;case"ve":if(de(t))return[];a[0].placeholders[e.name]=t;break;default:throw Error("Invalid symbol in rule: "+e.name)}
1}else if(!(e instanceof u))return[];else if(!n(e.value,t.value))return[];return a}function W(e,t){if(e instanceof u&&t instanceof u){if(!n(e.value,t.value))return!1}else if(e instanceof d&&t instanceof d){if(e.name!==t.name)return!1}else{if((!(e instanceof p)||!(t instanceof p))&&(!(e instanceof c)||!(t instanceof c)))return!1;if(e instanceof p){if(e.op!==t.op||e.fn!==t.fn)return!1}else if(e instanceof c&&e.name!==t.name)return!1;if(e.args.length!==t.args.length)return!1;for(var r=0;r<e.args.length;r++)if(!W(e.args[r],t.args[r]))return!1}return!0}return T}),da=ew("simplifyConstant",["typed","config","mathWithTransform","matrix","isBounded","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],e=>{var{typed:t,config:r,mathWithTransform:n,matrix:i,isBounded:a,fraction:s,bignumber:o,AccessorNode:l,ArrayNode:u,ConstantNode:c,FunctionNode:f,IndexNode:h,ObjectNode:p,OperatorNode:m,SymbolNode:d}=e,{isCommutative:g,isAssociative:v,allChildren:x,createMakeNodeFunction:y}=dn({FunctionNode:f,OperatorNode:m,SymbolNode:d}),b=t("simplifyConstant",{Node:e=>A(B(e,{})),"Node, Object":function(e,t){return A(B(e,t))}});function w(e){return D(e)?e.valueOf():e instanceof Array?e.map(w):N(e)?i(w(e.valueOf())):e}function _(e,t,r){try{return n[e].apply(null,t)}catch(i){return t=t.map(w),S(n[e].apply(null,t),r)}}var C=t({Fraction:T,number:function(e){return e<0?M(new c(-e)):new c(e)},BigNumber:function(e){return e<0?M(new c(-e)):new c(e)},bigint:function(e){return e<0n?M(new c(-e)):new c(e)},Complex:function(e){throw Error("Cannot convert Complex number to Node")},string:function(e){return new c(e)},Matrix:function(e){return new u(e.valueOf().map(e=>C(e)))}});function A(e){return et(e)?e:C(e)}function E(e,t){if(t&&!1!==t.exactFractions&&a(e)&&s){var r=s(e),n=t&&"number"==typeof t.fractionsLimit?t.fractionsLimit:1/0;if(r.valueOf()===e&&r.n<n&&r.d<n)return r}return e}var S=t({"string, Object":function(e,t){var n=eN(e,r);return"BigNumber"===n?(void 0===o&&oQ(),o(e)):"bigint"===n?BigInt(e):"Fraction"===n?(void 0===s&&o0(),s(e)):E(parseFloat(e),t)},"Fraction, Object":function(e,t){return e},"BigNumber, Object":function(e,t){return e},"number, Object":function(e,t){return E(e,t)},"bigint, Object":function(e,t){return e},"Complex, Object":function(e,t){return 0!==e.im?e:E(e.re,t)},"Matrix, Object":function(e,t){return i(E(e.valueOf()))},"Array, Object":function(e,t){return e.map(E)}});function M(e){return new m("-","unaryMinus",[e])}function T(e){var t=e=>"BigNumber"===r.number&&o?o(e):Number(e),n=e.s*e.n,i=n<0n?new m("-","unaryMinus",[new c(-t(n))]):new c(t(n));return 1n===e.d?i:new m("/","divide",[i,new c(t(e.d))])}function k(e,t,r){if(!ee(t))return new l(A(e),A(t));if(G(e)||N(e)){for(var n=Array.from(t.dimensions);n.length>0;)if(X(n[0])&&"string"!=typeof n[0].value){var a=S(n.shift().value,r);G(e)?e=e.items[a-1]:(e=e.valueOf()[a-1])instanceof Array&&(e=i(e))}else if(n.length>1&&X(n[1])&&"string"!=typeof n[1].value){var s=S(n[1].value,r),o=[],f=G(e)?e.items:e.valueOf();for(var p of f)if(G(p))o.push(p.items[s-1]);else if(N(e))o.push(p[s-1]);else break;if(o.length===f.length)e=G(e)?new u(o):i(o),n.splice(1,1);else break}else break;return n.length===t.dimensions.length?new l(A(e),t):n.length>0?(t=new h(n),new l(A(e),t)):e}if(er(e)&&1===t.dimensions.length&&X(t.dimensions[0])){var m=t.dimensions[0].value;return m in e.properties?e.properties[m]:new c}return new l(A(e),t)}function F(e,t,r,n){var i=t.shift(),a=t.reduce((t,i)=>{if(!et(i)){var a=t.pop();if(et(a))return[a,i];try{return t.push(_(e,[a,i],n)),t}catch(e){t.push(a)}}t.push(A(t.pop()));var s=1===t.length?t[0]:r(t);return[r([s,A(i)])]},[i]);return 1===a.length?a[0]:r([a[0],C(a[1])])}function B(e,t){switch(e.type){case"SymbolNode":return e;case"ConstantNode":switch(typeof e.value){case"number":case"bigint":return S(e.value,t);case"string":return e.value;default:if(!isNaN(e.value))return S(e.value,t)}return e;case"FunctionNode":if(n[e.name]&&n[e.name].rawArgs)return e;if(!["add","multiply"].includes(e.name)){var r=e.args.map(e=>B(e,t));if(!r.some(et))try{return _(e.name,r,t)}catch(e){}if("size"===e.name&&1===r.length&&G(r[0])){for(var a=[],s=r[0];G(s);)a.push(s.items.length),s=s.items[0];return i(a)}return new f(e.name,r.map(A))}case"OperatorNode":var o,l,c=e.fn.toString(),m=y(e);if(en(e)&&e.isUnary())l=et((o=[B(e.args[0],t)])[0])?m(o):_(c,o,t);else if(v(e,t.context))if(o=(o=x(e,t.context)).map(e=>B(e,t)),g(c,t.context)){for(var d=[],w=[],D=0;D<o.length;D++)et(o[D])?w.push(o[D]):d.push(o[D]);d.length>1?(l=F(c,d,m,t),w.unshift(l),l=F(c,w,m,t)):l=F(c,o,m,t)}else l=F(c,o,m,t);else l=F(c,o=e.args.map(e=>B(e,t)),m,t);return l;case"ParenthesisNode":return B(e.content,t);case"AccessorNode":return k(B(e.object,t),B(e.index,t),t);case"ArrayNode":var C=e.items.map(e=>B(e,t));if(C.some(et))return new u(C.map(A));return i(C);case"IndexNode":return new h(e.dimensions.map(e=>b(e,t)));case"ObjectNode":var E={};for(var N in e.properties)E[N]=b(e.properties[N],t);return new p(E);default:throw Error("Unimplemented node type in simplifyConstant: ".concat(e.type))}}return b}),ds="simplifyCore",dl=ew(ds,["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],e=>{var{typed:t,parse:r,equal:n,isZero:i,add:a,subtract:s,multiply:o,divide:l,pow:u,AccessorNode:c,ArrayNode:f,ConstantNode:h,FunctionNode:p,IndexNode:m,ObjectNode:d,OperatorNode:g,ParenthesisNode:v,SymbolNode:x}=e,y=new h(0),b=new h(1),w=new h(!0),_=new h(!1);function D(e){return en(e)&&["and","not","or"].includes(e.op)}var{hasProperty:C,isCommutative:A}=dn({FunctionNode:p,OperatorNode:g,SymbolNode:x});function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?t.context:void 0;if(C(e,"trivial",r)){if(Q(e)&&1===e.args.length)return E(e.args[0],t);var a=!1,s=0;
1if(e.forEach(e=>{1==++s&&(a=E(e,t))}),1===s)return a}var o=e;if(Q(o)){var l=hd(o.name);if(!l)return new p(E(o.fn),o.args.map(e=>E(e,t)));if(o.args.length>2&&C(o,"associative",r))for(;o.args.length>2;){var u=o.args.pop(),h=o.args.pop();o.args.push(new g(l,o.name,[u,h]))}o=new g(l,o.name,o.args)}if(en(o)&&o.isUnary()){var v=E(o.args[0],t);if("~"===o.op&&en(v)&&v.isUnary()&&"~"===v.op||"not"===o.op&&en(v)&&v.isUnary()&&"not"===v.op&&D(v.args[0]))return v.args[0];var x=!0;if("-"===o.op&&en(v)&&(v.isBinary()&&"subtract"===v.fn&&(o=new g("-","subtract",[v.args[1],v.args[0]]),x=!1),v.isUnary()&&"-"===v.op))return v.args[0];if(x)return new g(o.op,o.fn,[v])}if(en(o)&&o.isBinary()){var N=E(o.args[0],t),S=E(o.args[1],t);if("+"===o.op){if(X(N)&&i(N.value))return S;if(X(S)&&i(S.value))return N;en(S)&&S.isUnary()&&"-"===S.op&&(o=new g("-","subtract",[N,S=S.args[0]]))}if("-"===o.op)return en(S)&&S.isUnary()&&"-"===S.op?E(new g("+","add",[N,S.args[0]]),t):X(N)&&i(N.value)?E(new g("-","unaryMinus",[S])):X(S)&&i(S.value)?N:new g(o.op,o.fn,[N,S]);if("*"===o.op){if(X(N)){if(i(N.value))return y;else if(n(N.value,1))return S}if(X(S)){if(i(S.value))return y;if(n(S.value,1))return N;if(A(o,r))return new g(o.op,o.fn,[S,N],o.implicit)}return new g(o.op,o.fn,[N,S],o.implicit)}if("/"===o.op)return X(N)&&i(N.value)?y:X(S)&&n(S.value,1)?N:new g(o.op,o.fn,[N,S]);if("^"===o.op&&X(S)){if(i(S.value))return b;else if(n(S.value,1))return N}if("and"===o.op){if(X(N))if(!N.value)return _;else{if(D(S))return S;if(X(S))return S.value?w:_}if(X(S)){if(!S.value)return _;else if(D(N))return N}}if("or"===o.op){if(X(N)){if(N.value)return w;else if(D(S))return S}if(X(S)){if(S.value)return w;else if(D(N))return N}}return new g(o.op,o.fn,[N,S])}if(en(o))return new g(o.op,o.fn,o.args.map(e=>E(e,t)));if(G(o))return new f(o.items.map(e=>E(e,t)));if(W(o))return new c(E(o.object,t),E(o.index,t));if(ee(o))return new m(o.dimensions.map(e=>E(e,t)));if(er(o)){var M={};for(var T in o.properties)M[T]=E(o.properties[T],t);return new d(M)}return o}return t(ds,{Node:E,"Node,Object":E})}),du=ew("resolve",["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:i,OperatorNode:a,ParenthesisNode:s}=e;function o(e,t){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;if(!t)return e;if(eo(e)){if(l.has(e.name)){var u=Array.from(l).join(", ");throw ReferenceError("recursive loop of variable definitions among {".concat(u,"}"))}var c=t.get(e.name);if(et(c)){var f=new Set(l);return f.add(e.name),o(c,t,f)}return"number"==typeof c?r(String(c)):void 0!==c?new n(c):e}if(en(e)){var h=e.args.map(function(e){return o(e,t,l)});return new a(e.op,e.fn,h,e.implicit)}if(ei(e))return new s(o(e.content,t,l));if(Q(e)){var p=e.args.map(function(e){return o(e,t,l)});return new i(e.name,p)}return e.map(e=>o(e,t,l))}return t("resolve",{Node:o,"Node, Map | null | undefined":o,"Node, Object":(e,t)=>o(e,v(t)),"Array | Matrix":t.referToSelf(e=>t=>t.map(t=>e(t))),"Array | Matrix, null | undefined":t.referToSelf(e=>t=>t.map(t=>e(t))),"Array, Object":t.referTo("Array,Map",e=>(t,r)=>e(t,v(r))),"Matrix, Object":t.referTo("Matrix,Map",e=>(t,r)=>e(t,v(r))),"Array | Matrix, Map":t.referToSelf(e=>(t,r)=>t.map(t=>e(t,r)))})}),dc="symbolicEqual",df=ew(dc,["parse","simplify","typed","OperatorNode"],e=>{var{parse:t,simplify:r,typed:n,OperatorNode:i}=e;function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r(new i("-","subtract",[e,t]),{},n);return X(a)&&!a.value}return n(dc,{"Node, Node":a,"Node, Node, Object":a})}),dh="derivative",dp=ew(dh,["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],e=>{var{typed:t,config:r,parse:n,simplify:i,equal:a,isZero:s,numeric:o,ConstantNode:l,FunctionNode:u,OperatorNode:c,ParenthesisNode:f,SymbolNode:h}=e;function p(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{simplify:!0},n=new Map,a=t.name;function s(e){var t=n.get(e);if(void 0!==t)return t;var r=v(s,e,a);return n.set(e,r),r}var o=x(e,s);return r.simplify?i(o):o}function m(e){var t=n(e);if(!t.isSymbolNode)throw TypeError("Invalid variable. "+"Cannot parse ".concat(JSON.stringify(e)," into a variable in function derivative"));return t}var d=t(dh,{"Node, SymbolNode":p,"Node, SymbolNode, Object":p,"Node, string":(e,t)=>p(e,m(t)),"Node, string, Object":(e,t,r)=>p(e,m(t),r)});d._simplify=!0,d.toTex=function(e){return g.apply(null,e.args)};var g=t("_derivTex",{"Node, SymbolNode":function(e,t){return X(e)&&"string"===eu(e.value)?g(n(e.value).toString(),t.toString(),1):g(e.toTex(),t.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===eu(t.value))return g(e,n(t.value));
1throw Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,r){return g(e.toString(),t.name,r.value)},"string, string, number":function(e,t,r){var n;return(n=1===r?"{d\\over d"+t+"}":"{d^{"+r+"}\\over d"+t+"^{"+r+"}}")+"\\left[".concat(e,"\\right]")}}),v=t("_isConst",{"function, ConstantNode, string":function(){return!0},"function, SymbolNode, string":function(e,t,r){return t.name!==r},"function, ParenthesisNode, string":function(e,t,r){return e(t.content,r)},"function, FunctionAssignmentNode, string":function(e,t,r){return!t.params.includes(r)||e(t.expr,r)},"function, FunctionNode | OperatorNode, string":function(e,t,r){return t.args.every(t=>e(t,r))}}),x=t("_derivative",{"ConstantNode, function":function(){return y(0)},"SymbolNode, function":function(e,t){return t(e)?y(0):y(1)},"ParenthesisNode, function":function(e,t){return new f(x(e.content,t))},"FunctionAssignmentNode, function":function(e,t){return t(e)?y(0):x(e.expr,t)},"FunctionNode, function":function(e,t){if(t(e))return y(0);var r,n,i,a,s=e.args[0],o=!1,l=!1;switch(e.name){case"cbrt":o=!0,n=new c("*","multiply",[y(3),new c("^","pow",[s,new c("/","divide",[y(2),y(3)])])]);break;case"sqrt":case"nthRoot":if(1===e.args.length)o=!0,n=new c("*","multiply",[y(2),new u("sqrt",[s])]);else if(2===e.args.length)return r=new c("/","divide",[y(1),e.args[1]]),x(new c("^","pow",[s,r]),t);break;case"log10":r=y(10);case"log":if(r||1!==e.args.length){if(1===e.args.length&&r||2===e.args.length&&t(e.args[1]))n=new c("*","multiply",[s.clone(),new u("log",[r||e.args[1]])]),o=!0;else if(2===e.args.length)return x(new c("/","divide",[new u("log",[s]),new u("log",[e.args[1]])]),t)}else n=s.clone(),o=!0;break;case"pow":if(2===e.args.length)return x(new c("^","pow",[s,e.args[1]]),t);break;case"exp":n=new u("exp",[s.clone()]);break;case"sin":n=new u("cos",[s.clone()]);break;case"cos":n=new c("-","unaryMinus",[new u("sin",[s.clone()])]);break;case"tan":n=new c("^","pow",[new u("sec",[s.clone()]),y(2)]);break;case"sec":n=new c("*","multiply",[e,new u("tan",[s.clone()])]);break;case"csc":l=!0,n=new c("*","multiply",[e,new u("cot",[s.clone()])]);break;case"cot":l=!0,n=new c("^","pow",[new u("csc",[s.clone()]),y(2)]);break;case"asin":o=!0,n=new u("sqrt",[new c("-","subtract",[y(1),new c("^","pow",[s.clone(),y(2)])])]);break;case"acos":o=!0,l=!0,n=new u("sqrt",[new c("-","subtract",[y(1),new c("^","pow",[s.clone(),y(2)])])]);break;case"atan":o=!0,n=new c("+","add",[new c("^","pow",[s.clone(),y(2)]),y(1)]);break;case"asec":o=!0,n=new c("*","multiply",[new u("abs",[s.clone()]),new u("sqrt",[new c("-","subtract",[new c("^","pow",[s.clone(),y(2)]),y(1)])])]);break;case"acsc":o=!0,l=!0,n=new c("*","multiply",[new u("abs",[s.clone()]),new u("sqrt",[new c("-","subtract",[new c("^","pow",[s.clone(),y(2)]),y(1)])])]);break;case"acot":o=!0,l=!0,n=new c("+","add",[new c("^","pow",[s.clone(),y(2)]),y(1)]);break;case"sinh":n=new u("cosh",[s.clone()]);break;case"cosh":n=new u("sinh",[s.clone()]);break;case"tanh":n=new c("^","pow",[new u("sech",[s.clone()]),y(2)]);break;case"sech":l=!0,n=new c("*","multiply",[e,new u("tanh",[s.clone()])]);break;case"csch":l=!0,n=new c("*","multiply",[e,new u("coth",[s.clone()])]);break;case"coth":l=!0,n=new c("^","pow",[new u("csch",[s.clone()]),y(2)]);break;case"asinh":o=!0,n=new u("sqrt",[new c("+","add",[new c("^","pow",[s.clone(),y(2)]),y(1)])]);break;case"acosh":o=!0,n=new u("sqrt",[new c("-","subtract",[new c("^","pow",[s.clone(),y(2)]),y(1)])]);break;case"atanh":o=!0,n=new c("-","subtract",[y(1),new c("^","pow",[s.clone(),y(2)])]);break;case"asech":o=!0,l=!0,n=new c("*","multiply",[s.clone(),new u("sqrt",[new c("-","subtract",[y(1),new c("^","pow",[s.clone(),y(2)])])])]);break;case"acsch":o=!0,l=!0,n=new c("*","multiply",[new u("abs",[s.clone()]),new u("sqrt",[new c("+","add",[new c("^","pow",[s.clone(),y(2)]),y(1)])])]);break;case"acoth":o=!0,l=!0,n=new c("-","subtract",[y(1),new c("^","pow",[s.clone(),y(2)])]);break;case"abs":n=new c("/","divide",[new u(new h("abs"),[s.clone()]),s.clone()]);break;default:throw Error('Cannot process function "'+e.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}o?(i="/",a="divide"):(i="*",a="multiply");var f=x(s,t);
1return l&&(f=new c("-","unaryMinus",[f])),new c(i,a,[f,n])},"OperatorNode, function":function(e,t){if(t(e))return y(0);if("+"===e.op)return new c(e.op,e.fn,e.args.map(function(e){return x(e,t)}));if("-"===e.op){if(e.isUnary())return new c(e.op,e.fn,[x(e.args[0],t)]);if(e.isBinary())return new c(e.op,e.fn,[x(e.args[0],t),x(e.args[1],t)])}if("*"===e.op){var r=e.args.filter(function(e){return t(e)});if(r.length>0){var n=e.args.filter(function(e){return!t(e)}),i=1===n.length?n[0]:new c("*","multiply",n);return new c("*","multiply",r.concat(x(i,t)))}return new c("+","add",e.args.map(function(r){return new c("*","multiply",e.args.map(function(e){return e===r?x(e,t):e.clone()}))}))}if("/"===e.op&&e.isBinary()){var o=e.args[0],l=e.args[1];return t(l)?new c("/","divide",[x(o,t),l]):t(o)?new c("*","multiply",[new c("-","unaryMinus",[o]),new c("/","divide",[x(l,t),new c("^","pow",[l.clone(),y(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[x(o,t),l.clone()]),new c("*","multiply",[o.clone(),x(l,t)])]),new c("^","pow",[l.clone(),y(2)])])}if("^"===e.op&&e.isBinary()){var f=e.args[0],h=e.args[1];if(t(f))return X(f)&&(s(f.value)||a(f.value,1))?y(0):new c("*","multiply",[e,new c("*","multiply",[new u("log",[f.clone()]),x(h.clone(),t)])]);if(t(h)){if(X(h)){if(s(h.value))return y(0);if(a(h.value,1))return x(f,t)}var p=new c("^","pow",[f.clone(),new c("-","subtract",[h,y(1)])]);return new c("*","multiply",[h.clone(),new c("*","multiply",[x(f,t),p])])}return new c("*","multiply",[new c("^","pow",[f.clone(),h.clone()]),new c("+","add",[new c("*","multiply",[x(f,t),new c("/","divide",[h.clone(),f.clone()])]),new c("*","multiply",[x(h,t),new u("log",[f.clone()])])])])}throw Error('Cannot process operator "'+e.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function y(e,t){return new l(o(e,t||eN(String(e),r)))}return d}),dm="rationalize",dd=ew(dm,["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],e=>{var{config:t,typed:r,equal:n,isZero:i,add:a,subtract:s,multiply:o,divide:l,pow:u,parse:c,simplifyConstant:f,simplifyCore:h,simplify:p,fraction:m,bignumber:d,mathWithTransform:g,matrix:v,AccessorNode:x,ArrayNode:y,ConstantNode:b,FunctionNode:w,IndexNode:_,ObjectNode:D,OperatorNode:C,SymbolNode:A,ParenthesisNode:E}=e;function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=M(),i=S(e,t,!0,n.firstRules),a=i.variables.length,s={exactFractions:!1},o={exactFractions:!0};if(e=i.expression,a>=1){e=T(e);var l,u,c=!0,f=!1;for(e=p(e,n.firstRules,{},s);e=p(e,c?n.distrDivRules:n.sucDivRules,{},o),c=!c,(u=e.toString())!==l;)f=!0,l=u;f&&(e=p(e,n.firstRulesAgain,{},s)),e=p(e,n.finalRules,{},s)}var h=[],m={};return("OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===a&&(e.args[0]=k(e.args[0],h),e.args[1]=k(e.args[1])),r&&(m.numerator=e.args[0],m.denominator=e.args[1])):(1===a&&(e=k(e,h)),r&&(m.numerator=e,m.denominator=null)),r)?(m.coefficients=h,m.variables=i.variables,m.expression=e,m):e}return r(dm,{Node:N,"Node, boolean":(e,t)=>
1N(e,{},t),"Node, Object":N,"Node, Object, boolean":N});function S(e,t,r,n){var i=[],a=p(e,n,t,{exactFractions:!1}),s="+-*"+((r=!!r)?"/":"");l(a);var o={};return o.expression=a,o.variables=i,o;function l(e){var t=e.type;if("FunctionNode"===t)throw Error("There is an unsolved function call");if("OperatorNode"===t)if("^"===e.op)if("ConstantNode"===e.args[1].type&&eE(parseFloat(e.args[1].value)))l(e.args[0]);else throw Error("There is a non-integer exponent");else{if(!s.includes(e.op))throw Error("Operator "+e.op+" invalid in polynomial expression");for(var r=0;r<e.args.length;r++)l(e.args[r])}else if("SymbolNode"===t){var n=e.name;-1===i.indexOf(n)&&i.push(n)}else if("ParenthesisNode"===t)l(e.content);else if("ConstantNode"!==t)throw Error("type "+t+" is not allowed in polynomial expression")}}function M(){var e=[h,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],t=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],r=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],n=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],i={};return i.firstRules=e.concat(t,n),i.distrDivRules=r,i.sucDivRules=n,i.firstRulesAgain=e.concat(t),i.finalRules=[h,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],i}function T(e,t,r){var n=e.type,i=arguments.length>1;if("OperatorNode"===n&&e.isBinary()){var a,s=!1;if("^"===e.op&&("ParenthesisNode"===e.args[0].type||"OperatorNode"===e.args[0].type)&&"ConstantNode"===e.args[1].type&&(s=(a=parseFloat(e.args[1].value))>=2&&eE(a)),s){if(a>2){var o=e.args[0],l=new C("^","pow",[e.args[0].cloneDeep(),new b(a-1)]);e=new C("*","multiply",[o,l])}else e=new C("*","multiply",[e.args[0],e.args[0].cloneDeep()]);i&&("content"===r?t.content=e:t.args[r]=e)}}if("ParenthesisNode"===n)T(e.content,e,"content");else if("ConstantNode"!==n&&"SymbolNode"!==n)for(var u=0;u<e.args.length;u++)T(e.args[u],e,u);if(!i)return e}function k(e,t){void 0===t&&(t=[]),t[0]=0;var r,n={};n.cte=1,n.oper="+",n.fire="";var i=0,a="";f(e,null,n),i=t.length-1;for(var s=!0,o=i;o>=0;o--)if(0!==t[o]){var l=new b(s?t[o]:Math.abs(t[o])),u=t[o]<0?"-":"+";if(o>0){var c=new A(a);o>1&&(c=new C("^","pow",[c,new b(o)])),l=-1===t[o]&&s?new C("-","unaryMinus",[c]):1===Math.abs(t[o])?c:new C("*","multiply",[l,c])}r=s?l:"+"===u?new C("+","add",[r,l]):new C("-","subtract",[r,l]),s=!1}if(s)return new b(0);return r;function f(e,r,n){var s=e.type;if("FunctionNode"===s)throw Error("There is an unsolved function call");if("OperatorNode"===s){if(!"+-*^".includes(e.op))throw Error("Operator "+e.op+" invalid");if(null!==r&&(("unaryMinus"===e.fn||"pow"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn&&"multiply"!==r.fn||("subtract"===e.fn||"add"===e.fn||"multiply"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn||("subtract"===e.fn||"add"===e.fn||"unaryMinus"===e.fn)&&0!==n.noFil))throw Error("Invalid "+e.op+" placing");("^"===e.op||"*"===e.op)&&(n.fire=e.op);for(var o=0;o<e.args.length;o++)"unaryMinus"===e.fn&&(n.oper="-"),("+"===e.op||"subtract"===e.fn)&&(n.fire="",n.cte=1,n.oper=0===o?"+":e.op),n.noFil=o,f(e.args[o],e,n)}else if("SymbolNode"===s){if(e.name!==a&&""!==a)throw Error("There is more than one variable");if(a=e.name,null===r){t[1]=1;return}if("^"===r.op&&0!==n.noFil)throw Error("In power the variable should be the first parameter");if("*"===r.op&&1!==n.noFil)throw Error("In multiply the variable should be the second parameter");(""===n.fire||"*"===n.fire)&&(i<1&&(t[1]=0),t[1]+=n.cte*("+"===n.oper?1:-1),i=Math.max(1,i))}else if("ConstantNode"===s){var l=parseFloat(e.value);if(null===r){t[0]=l;return}if("^"===r.op){if(1!==n.noFil)throw Error("Constant cannot be powered");if(!eE(l)||l<=0)throw Error("Non-integer exponent is not allowed");for(var u=i+1;u<l;u++)t[u]=0;l>i&&(t[l]=0),t[l]+=n.cte*("+"===n.oper?1:-1),i=Math.max(l,i);return}n.cte=l,""===n.fire&&(t[0]+=n.cte*("+"===n.oper?1:-1))}else throw Error("Type "+s+" is not allowed")}}}),dg="zpk2tf",dv=ew(dg,["typed","add","multiply","Complex","number"],e=>{var{typed:t,add:r,multiply:n,Complex:i,number:a}=e;return t(dg,{"Array,Array,number":function(e,t,r){return s(e,t,r)},"Array,Array":function(e,t){return s(e,t,1)},"Matrix,Matrix,number":function(e,t,r){return s(e.valueOf(),t.valueOf(),r)},"Matrix,Matrix":function(e,t){return s(e.valueOf(),t.valueOf(),1)}});function s(e,t,r){e.some(e=>"BigNumber"===e.type)&&(e=e.map(e=>a(e))),t.some(e=>"BigNumber"===e.type)&&(t=t.map(e=>a(e)));for(var s=[i(1,0)],l=[i(1,0)],u=0;u<e.length;u++){var c=e[u];"number"==typeof c&&(c=i(c,0)),s=o(s,[i(1,0),i(-c.re,-c.im)])}for(var f=0;f<t.length;f++){var h=t[f];"number"==typeof h&&(h=i(h,0)),l=o(l,[i(1,0),i(-h.re,-h.im)])}for(var p=0;p<s.length;p++)s[p]=n(s[p],r);return[s,l]}function o(e,t){for(var a=[],s=0;s<e.length+t.length-1;s++){a[s]=i(0,0);for(var o=0;o<e.length;o++)s-o>=0&&s-o<t.length&&(a[s]=r(a[s],n(e[o],t[s-o])))}return a}}),dx="freqz",dy=ew(dx,["typed","add","multiply","Complex","divide","matrix"],e=>{var{typed:t,add:r,multiply:n,Complex:i,divide:a,matrix:s}=e;return t(dx,{"Array, Array":function(e,t){return o(e,t,l(512))},"Array, Array, Array":function(e,t,r){return o(e,t,r)},"Array, Array, number":function(e,t,r){if(r<0)throw Error("w must be a positive number");return o(e,t,l(r))},"Matrix, Matrix":function(e,t){var r=l(512),{w:n,h:i}=o(e.valueOf(),t.valueOf(),r);return{w:s(n),h:s(i)}},"Matrix, Matrix, Matrix":function(e,t,r){var{h:n}=o(e.valueOf(),t.valueOf(),r.valueOf());return{h:s(n),w:s(r)}},"Matrix, Matrix, number":function(e,t,r){if(r<0)throw Error("w must be a positive number");var n=l(r),{h:i}=o(e.valueOf(),t.valueOf(),n);return{h:s(i),w:s(n)}}});function o(e,t,s){for(var o=[],l=[],u=0;u<s.length;u++){for(var c=i(0,0),f=i(0,0),h=0;h<e.length;h++)c=r(c,n(e[h],i(Math.cos(-h*s[u]),Math.sin(-h*s[u]))));for(var p=0;p<t.length;p++)f=r(f,n(t[p],i(Math.cos(-p*s[u]),Math.sin(-p*s[u]))));o.push(c),l.push(f)}for(var m=[],d=0;d<o.length;d++)m.push(a(o[d],l[d]));return{h:m,w:s}}function l(e){for(var t=[],r=0;r<e;r++)t.push(r/e*Math.PI);return t}}),db=ew("reviver",["classes"],e=>{var{classes:t}=e;return function(e,r){var n=t[r&&r.mathjs];return n&&"function"==typeof n.fromJSON?n.fromJSON(r):r}}),dw=ew("replacer",[],()=>function(e,t){return"number"==typeof t&&(!Number.isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:"bigint"==typeof t?{mathjs:"bigint",value:String(t)}:t}
1),d_="15.2.0",dD=Math.PI,dC=2*Math.PI,dA=Math.E,dE=1.618033988749895,dN=ew("true",[],()=>!0),dS=ew("false",[],()=>!1),dM=ew("null",[],()=>null),dT=dG("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1/0):1/0}),dk=dG("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(NaN):NaN}),dF=dG("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?cb(r):dD}),dB=dG("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?cw(r):dC}),dP=dG("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?cx(r):dA}),dj=dG("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?cy(r):dE}),dO=dG("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(2).ln():Math.LN2}),dI=dG("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(10).ln():Math.LN10}),dz=dG("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1).div(new r(2).ln()):Math.LOG2E}),dL=dG("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1).div(new r(10).ln()):Math.LOG10E}),dR=dG("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r("0.5").sqrt():Math.SQRT1_2}),dq=dG("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(2).sqrt():Math.SQRT2}),dU=dG("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),dH=ew("PI",["pi"],e=>{var{pi:t}=e;return t}),dV=ew("E",["e"],e=>{var{e:t}=e;return t}),dW=ew("version",[],()=>d_);function dG(e,t,r){return ew(e,t,r,{recreateOnConfigChange:!0})}var d$=gP("speedOfLight","299792458","m s^-1"),dY=gP("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),dZ=gP("planckConstant","6.62607015e-34","J s"),dX=gP("reducedPlanckConstant","1.0545718176461565e-34","J s"),dJ=gP("magneticConstant","1.25663706212e-6","N A^-2"),dK=gP("electricConstant","8.8541878128e-12","F m^-1"),dQ=gP("vacuumImpedance","376.730313667","ohm"),d0=gP("coulomb","8.987551792261171e9","N m^2 C^-2"),d1=gP("coulombConstant","8.987551792261171e9","N m^2 C^-2"),d2=gP("elementaryCharge","1.602176634e-19","C"),d3=gP("bohrMagneton","9.2740100783e-24","J T^-1"),d4=gP("conductanceQuantum","7.748091729863649e-5","S"),d6=gP("inverseConductanceQuantum","12906.403729652257","ohm"),d5=gP("magneticFluxQuantum","2.0678338484619295e-15","Wb"),d8=gP("nuclearMagneton","5.0507837461e-27","J T^-1"),d9=gP("klitzing","25812.807459304513","ohm"),d7=gP("bohrRadius","5.29177210903e-11","m"),ge=gP("classicalElectronRadius","2.8179403262e-15","m"),gt=gP("electronMass","9.1093837015e-31","kg"),gr=gP("fermiCoupling","1.1663787e-5","GeV^-2"),gn=gj("fineStructure",.0072973525693),gi=gP("hartreeEnergy","4.3597447222071e-18","J"),ga=gP("protonMass","1.67262192369e-27","kg"),gs=gP("deuteronMass","3.3435830926e-27","kg"),go=gP("neutronMass","1.6749271613e-27","kg"),gl=gP("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),gu=gP("rydberg","10973731.568160","m^-1"),gc=gP("thomsonCrossSection","6.6524587321e-29","m^2"),gf=gj("weakMixingAngle",.2229),gh=gj("efimovFactor",22.7),gp=gP("atomicMass","1.66053906660e-27","kg"),gm=gP("avogadro","6.02214076e23","mol^-1"),gd=gP("boltzmann","1.380649e-23","J K^-1"),gg=gP("faraday","96485.33212331001","C mol^-1"),gv=gP("firstRadiation","3.7417718521927573e-16","W m^2"),gx=gP("loschmidt","2.686780111798444e25","m^-3"),gy=gP("gasConstant","8.31446261815324","J K^-1 mol^-1"),gb=gP("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),gw=gP("molarVolume","0.022413969545014137","m^3 mol^-1"),g_=gj("sackurTetrode",-1.16487052358),gD=gP("secondRadiation","0.014387768775039337","m K"),gC=gP("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),gA=gP("wienDisplacement","2.897771955e-3","m K"),gE=gP("molarMass","0.99999999965e-3","kg mol^-1"),gN=gP("molarMassC12","11.9999999958e-3","kg mol^-1"),gS=gP("gravity","9.80665","m s^-2"),gM=gP("planckLength","1.616255e-35","m"),gT=gP("planckMass","2.176435e-8","kg"),gk=gP("planckTime","5.391245e-44","s"),gF=gP("planckCharge","1.87554603778e-18","C"),gB=gP("planckTemperature","1.416785e+32","K");function gP(e,t,r){return ew(e,["config","Unit","BigNumber"],e=>{var{config:n,Unit:i,BigNumber:a}=e,s=new i("BigNumber"===n.number?new a(t):parseFloat(t),r);return s.fixPrefix=!0,s})}function gj(e,t){return ew(e,["config","BigNumber"],e=>{var{config:r,BigNumber:n}=e;return"BigNumber"===r.number?new n(t):t})}function gO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var gI=ew("mapSlices",["typed","isInteger"],e=>{var{typed:t,isInteger:r}=e,n=aE({typed:t,isInteger:r});return t("mapSlices",{"...any":function(e){var t=e[1];y(t)?e[1]=t-1:b(t)&&(e[1]=t.minus(1));try{return n.apply(null,e)}catch(e){throw hn(e)}}})},function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?gO(Object(r),!0).forEach(function(t){lE(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gO(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({isTransformFunction:!0},aE.meta)),gz=ew("column",["typed","Index","matrix","range"],e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=oS({typed:t,Index:r,matrix:n,range:i});return t("column",{"...any":function(e){var t=e.length-1,r=e[t];y(r)&&(e[t]=r-1);try{return a.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0});function gL(e,t,r){var n=e.filter(function(e){return eo(e)&&!(e.name in t)&&!r.has(e.name)})[0];if(!n)throw Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=new Map,s=new m(r,a,new Set([i])),o=e.compile();return function(e){return a.set(i,e),o.evaluate(s)}}var gR=ew("transformCallback",["typed"],e=>{var{typed:t}=e;return function(e,n){return t.isTypedFunction(e)?r(e,n):gq(e,e.length,n)};function r(e,n){var i=Object.fromEntries(Object.entries(e.signatures).map(e=>{var[i,a]=e,s=i.split(",").length;return t.isTypedFunction(a)?[i,r(a,n)]:[i,gq(a,s,n)]}));return"string"==typeof e.name?t(e.name,i):t(i)}});function gq(e,t,r){return t===r?e:t===r+1?function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e(...n.slice(0,r),gU(n[r]))}:t>r+1?function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e(...n.slice(0,r),gU(n[r]),...n.slice(r+1))}:e}function gU(e){return e.map(e=>e+1)}var gH=ew("filter",["typed"],e=>{var{typed:t}=e;function r(e,r,i){var a=oj({typed:t}),s=gR({typed:t});if(0===e.length)return a();var o=e[0];if(1===e.length)return a(o);var l=e.length-1,u=e[l];return o&&(o=n(o,i)),u&&(u=eo(u)||K(u)?n(u,i):gL(u,r,i)),a(o,s(u,l))}function n(e,t){return e.compile().evaluate(t)}return r.rawArgs=!0,r},{isTransformFunction:!0}),gV=ew("forEach",["typed"],e=>{var{typed:t}=e,r=oR({typed:t}),n=gR({typed:t});function i(e,t,i){if(0===e.length)return r();var s=e[0];if(1===e.length)return r(s);var o=e.length-1,l=e[o];return s&&(s=a(s,i)),l&&(l=eo(l)||K(l)?a(l,i):gL(l,t,i)),r(s,n(l,o))}function a(e,t){return e.compile().evaluate(t)}return i.rawArgs=!0,i},{isTransformFunction:!0}),gW=ew("index",["Index","getMatrixDataType"],e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var e=[],n=0,i=arguments.length;n<i;n++){var a=arguments[n];if(k(a))a.start--,a.end-=a.step>0?0:2;else if(a&&!0===a.isSet)a=a.map(function(e){return e-1});else if(E(a)||N(a))"boolean"!==r(a)&&(a=a.map(function(e){return e-1}));else if(y(a)||w(a))a--;else if(b(a))a=a.toNumber()-1;else if("string"==typeof a);else throw TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");e[n]=a}var s=new t;return t.apply(s,e),s}},{isTransformFunction:!0}),gG=ew("map",["typed"],e=>{var{typed:t}=e,r=oZ({typed:t}),n=gR({typed:t});function i(e,t,i){if(0===e.length)return r();if(1===e.length)return r(e[0]);var a=e.length-1,s=e.slice(0,a),o=e[a];return s=s.map(e=>l(e,i)),o&&(o=eo(o)||K(o)?l(o,i):gL(o,t,i)),r(...s,n(o,a));function l(e,t){return e.compile().evaluate(t)}}return i.rawArgs=!0,i},{isTransformFunction:!0});function g$(e){return y(e)?e-1:b(e)?e.minus(1):e}function gY(e){return y(e)||b(e)}function gZ(e){if(2===e.length&&S(e[0])){var t=(e=e.slice())[1];gY(t)&&(e[1]=g$(t))}return e}var gX=ew("max",["typed","config","numeric","larger","isNaN"],e=>{var{typed:t,config:r,numeric:n,larger:i,isNaN:a}=e,s=cl({typed:t,config:r,numeric:n,larger:i,isNaN:a});return t("max",{"...any":function(e){e=gZ(e);try{return s.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),gJ=ew("mean",["typed","add","divide"],e=>{var{typed:t,add:r,divide:n}=e,i=p8({typed:t,add:r,divide:n});return t("mean",{"...any":function(e){e=gZ(e);try{return i.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),gK=ew("min",["typed","config","numeric","smaller","isNaN"],e=>{var{typed:t,config:r,numeric:n,smaller:i,isNaN:a}=e,s=cc({typed:t,config:r,numeric:n,smaller:i,isNaN:a});return t("min",{"...any":function(e){e=gZ(e);try{return s.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),gQ=ew("range",["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],e=>{var{typed:t,config:r,matrix:n,bignumber:i,equal:a,smaller:s,smallerEq:o,larger:l,largerEq:u,add:c,isZero:f,isPositive:h}=e,p=o3({typed:t,config:r,matrix:n,bignumber:i,equal:a,smaller:s,smallerEq:o,larger:l,largerEq:u,add:c,isZero:f,isPositive:h});return t("range",{"...any":function(e){var t=e.length-1;return"boolean"!=typeof e[t]&&e.push(!0),p.apply(null,e)}})},{isTransformFunction:!0}),g0=ew("row",["typed","Index","matrix","range"],e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=lr({typed:t,Index:r,matrix:n,range:i});return t("row",{"...any":function(e){var t=e.length-1,r=e[t];y(r)&&(e[t]=r-1);try{return a.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g1=ew("subset",["typed","matrix","zeros","add"],e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=ll({typed:t,matrix:r,zeros:n,add:i});return t("subset",{"...any":function(e){try{return a.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g2=ew("concat",["typed","matrix","isInteger"],e=>{var{typed:t,matrix:r,isInteger:n}=e,i=oE({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(e){var t=e.length-1,r=e[t];y(r)?e[t]=r-1:b(r)&&(e[t]=r.minus(1));try{return i.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g3="diff",g4=ew(g3,["typed","matrix","subtract","number","bignumber"],e=>{var{typed:t,matrix:r,subtract:n,number:i,bignumber:a}=e,s=oJ({typed:t,matrix:r,subtract:n,number:i,bignumber:a});return t(g3,{"...any":function(e){e=gZ(e);try{return s.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g6=ew("std",["typed","map","sqrt","variance"],e=>{var{typed:t,map:r,sqrt:n,variance:i}=e,a=ml({typed:t,map:r,sqrt:n,variance:i});return t("std",{"...any":function(e){e=gZ(e);try{return a.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g5="sum",g8=ew(g5,["typed","config","add","numeric"],e=>{var{typed:t,config:r,add:n,numeric:i}=e,a=p3({typed:t,config:r,add:n,numeric:i});return t(g5,{"...any":function(e){e=gZ(e);try{return a.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),g9=ew("quantileSeq",["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],e=>{var{typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:s,partitionSelect:o,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:h,mapSlices:p}=e,m=ms({typed:t,bignumber:r,add:n,subtract:i,divide:a,multiply:s,partitionSelect:o,compare:l,isInteger:u,smaller:c,smallerEq:f,larger:h,mapSlices:p});return t("quantileSeq",{"Array | Matrix, number | BigNumber":m,"Array | Matrix, number | BigNumber, number":(e,t,r)=>m(e,t,d(r)),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(e,t,r,n)=>m(e,t,r,d(n)),"Array | Matrix, Array | Matrix":m,"Array | Matrix, Array | Matrix, number":(e,t,r)=>m(e,t,d(r)),"Array | Matrix, Array | Matrix, boolean":m,"Array | Matrix, Array | Matrix, boolean, number":(e,t,r,n)=>m(e,t,r,d(n))});function d(e){return gZ([[],e])[1]}},{isTransformFunction:!0}),g7="cumsum",ve=ew(g7,["typed","add","unaryPlus"],e=>{var{typed:t,add:r,unaryPlus:n}=e,i=p6({typed:t,add:r,unaryPlus:n});return t(g7,{"...any":function(e){if(2===e.length&&S(e[0])){var t=e[1];y(t)?e[1]=t-1:b(t)&&(e[1]=t.minus(1))}try{return i.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}),vt="variance",vr=ew(vt,["typed","add","subtract","multiply","divide","mapSlices","isNaN"],e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,mapSlices:s,isNaN:o}=e,l=mi({typed:t,add:r,subtract:n,multiply:i,divide:a,mapSlices:s,isNaN:o});return t(vt,{"...any":function(e){e=gZ(e);try{return l.apply(null,e)}catch(e){throw hn(e)}}})},{isTransformFunction:!0}
1),vn="print",vi=ew(vn,["typed","matrix","zeros","add"],e=>{var{typed:t,matrix:r,zeros:n,add:i}=e,a=lQ({typed:t,matrix:r,zeros:n,add:i});return t(vn,{"string, Object | Array":function(e,t){return a(s(e),t)},"string, Object | Array, number | Object":function(e,t,r){return a(s(e),t,r)}});function s(e){return e.replace(lJ,e=>"$"+e.slice(1).split(".").map(function(e){return!isNaN(e)&&e.length>0?parseInt(e)-1:e}).join("."))}},{isTransformFunction:!0}),va=ew("and",["typed","matrix","zeros","add","equalScalar","not","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:s}=e,o=uP({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:s});function l(e,t,r){var n=e[0].compile().evaluate(r);return(!!S(n)||!!o(n,!0))&&o(n,e[1].compile().evaluate(r))}return l.rawArgs=!0,l},{isTransformFunction:!0}),vs=ew("or",["typed","matrix","equalScalar","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,s=o_({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function o(e,t,r){var n=e[0].compile().evaluate(r);return!!(!S(n)&&s(n,!1))||s(n,e[1].compile().evaluate(r))}return o.rawArgs=!0,o},{isTransformFunction:!0}),vo=ew("nullish",["typed","matrix","size","flatten","deepEqual"],e=>{var{typed:t,matrix:r,size:n,flatten:i,deepEqual:a}=e,s=ob({typed:t,matrix:r,size:n,flatten:i,deepEqual:a});function o(e,t,r){var n=e[0].compile().evaluate(r);return S(n)||null==n||void 0===n?s(n,e[1].compile().evaluate(r)):n}return o.rawArgs=!0,o},{isTransformFunction:!0}),vl=ew("bitAnd",["typed","matrix","zeros","add","equalScalar","not","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:s}=e,o=s5({typed:t,matrix:r,equalScalar:n,zeros:i,not:a,concat:s});function l(e,t,r){var n=e[0].compile().evaluate(r);if(!S(n)){if(isNaN(n))return NaN;if(0===n||!1===n)return 0}return o(n,e[1].compile().evaluate(r))}return l.rawArgs=!0,l},{isTransformFunction:!0}),vu=ew("bitOr",["typed","matrix","equalScalar","DenseMatrix","concat"],e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a}=e,s=oe({typed:t,matrix:r,equalScalar:n,DenseMatrix:i,concat:a});function o(e,t,r){var n=e[0].compile().evaluate(r);if(!S(n)){if(isNaN(n))return NaN;if(-1===n)return -1;if(!0===n)return 1}return s(n,e[1].compile().evaluate(r))}return o.rawArgs=!0,o},{isTransformFunction:!0}),vc="num",vf=ew(vc,["typed","fraction"],e=>{var{typed:t,fraction:r}=e;return t(vc,{Fraction:e=>e.s*e.n,BigNumber:e=>{var t=r(e);return t.s*t.n},"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})}),vh="den",vp=ew(vh,["typed","fraction"],e=>{var{typed:t,fraction:r}=e;return t(vh,{Fraction:e=>e.d,BigNumber:e=>r(e).d,"Array | Matrix":t.referToSelf(e=>t=>ia(t,e))})});e.s(["createAbs",0,aC,"createAccessorNode",0,hs,"createAcos",0,cB,"createAcosh",0,cQ,"createAcot",0,c1,"createAcoth",0,c3,"createAcsc",0,c6,"createAcsch",0,c8,"createAdd",0,f1,"createAddScalar",0,aT,"createAnd",0,uP,"createAndTransform",0,va,"createArg",0,oa,"createArrayNode",0,hl,"createAsec",0,c7,"createAsech",0,ft,"createAsin",0,fn,"createAsinh",0,fi,"createAssignmentNode",0,hv,"createAtan",0,fa,"createAtan2",0,fo,"createAtanh",0,fu,"createAtomicMass",0,gp,"createAvogadro",0,gm,"createBellNumbers",0,m2,"createBernoulli",0,mh,"createBigNumberClass",0,rT,"createBigint",0,iH,"createBignumber",0,iY,"createBin",0,lG,"createBitAnd",0,s5,"createBitAndTransform",0,vl,"createBitNot",0,s9,"createBitOr",0,oe,"createBitOrTransform",0,vu,"createBitXor",0,on,"createBlockNode",0,hy,"createBohrMagneton",0,d3,"createBohrRadius",0,d7,"createBoltzmann",0,gd,"createBoolean",0,i$,"createCatalan",0,m4,"createCbrt",0,aP,"createCeil",0,aU,"createChain",0,pF,"createChainClass",0,pA,"createClassicalElectronRadius",0,ge,"createClone",0,ie,"createColumn",0,oS,"createColumnTransform",0,gz,"createCombinations",0,mv,"createCombinationsWithRep",0,mb,"createCompare",0,uO,"createCompareNatural",0,uR,"createCompareText",0,uV,"createCompile",0,hQ,"createComplex",0,iZ,"createComplexClass",0,rR,"createComposition",0,m5,"createConcat",0,oE,"createConcatTransform",0,g2,"createConditionalNode",0,hw,"createConductanceQuantum",0,d4,"createConj",0,oo,"createConstantNode",0,hk,"createCorr",0,mc,"createCos",0,fh,"createCosh",0,fm,"createCot",0,fg,"createCoth",0,fx,"createCoulomb",0,d0,"createCoulombConstant",0,d1,"createCount",0,oT,"createCreateUnit",0,ck,"createCross",0,oF,"createCsc",0,fb,"createCsch",0,f_,"createCtranspose",0,lg,"createCube",0,aV,"createCumSum",0,p6,"createCumSumTransform",0,ve,"createDeepEqual",0,u7,"createDen",0,vp,"createDenseMatrixClass",0,n9,"createDerivative",0,dp,"createDet",0,pP,"createDeuteronMass",0,gs,"createDiag",0,oP,"createDiff",0,oJ,"createDiffTransform",0,g4,"createDistance",0,p0,"createDivide",0,pK,"createDivideScalar",0,l7,"createDot",0,f8,"createDotDivide",0,ud,"createDotMultiply",0,sq,"createDotPow",0,up,"createE",0,dP,"createEfimovFactor",0,gh,"createEigs",0,pq,"createElectricConstant",0,dK,"createElectronMass",0,gt,"createElementaryCharge",0,d2,"createEqual",0,uG,"createEqualScalar",0,iz,"createEqualText",0,uZ,"createErf",0,lT,"createEvaluate",0,h1,"createExp",0,aG,"createExpm",0,pH,"createExpm1",0,aY,"createFactorial",0,mj,"createFalse",0,dS,"createFaraday",0,gg,"createFermiCoupling",0,gr,"createFft",0,lb,"createFibonacciHeapClass",0,cm,"createFilter",0,oj,"createFilterTransform",0,gH,"createFineStructure",0,gn,"createFirstRadiation",0,gv,"createFix",0,aK,"createFlatten",0,oz,"createFloor",0,a3,"createForEach",0,oR,"createForEachTransform",0,gV,"createFormat",0,lV,"createFraction",0,iX,"createFractionClass",0,r7,"createFreqz",0,dy,"createFunctionAssignmentNode",0,hB,"createFunctionNode",0,hZ,"createGamma",0,mk,"createGasConstant",0,g
1y,"createGcd",0,sh,"createGetMatrixDataType",0,oH,"createGravitationConstant",0,dY,"createGravity",0,gS,"createHartreeEnergy",0,gi,"createHasNumericValue",0,i_,"createHelp",0,pT,"createHelpClass",0,pC,"createHex",0,lX,"createHypot",0,f3,"createI",0,dU,"createIdentity",0,oW,"createIfft",0,l_,"createIm",0,ou,"createImmutableDenseMatrixClass",0,cf,"createIndex",0,he,"createIndexClass",0,ch,"createIndexNode",0,hj,"createIndexTransform",0,gW,"createInfinity",0,dT,"createIntersect",0,p1,"createInv",0,pO,"createInverseConductanceQuantum",0,d6,"createInvmod",0,sz,"createIsBounded",0,iT,"createIsFinite",0,iF,"createIsInteger",0,ic,"createIsNaN",0,iS,"createIsNegative",0,ix,"createIsNumeric",0,ib,"createIsPositive",0,iC,"createIsPrime",0,l5,"createIsZero",0,iE,"createKldivergence",0,mI,"createKlitzing",0,d9,"createKron",0,o$,"createLN10",0,dI,"createLN2",0,dO,"createLOG10E",0,dL,"createLOG2E",0,dz,"createLarger",0,u3,"createLargerEq",0,u5,"createLcm",0,sd,"createLeafCount",0,m9,"createLeftShift",0,uS,"createLgamma",0,mB,"createLog",0,uo,"createLog10",0,sb,"createLog1p",0,uu,"createLog2",0,s_,"createLoschmidt",0,gx,"createLsolve",0,ux,"createLsolveAll",0,u_,"createLup",0,h8,"createLusolve",0,pw,"createLyap",0,pJ,"createMad",0,mt,"createMagneticConstant",0,dJ,"createMagneticFluxQuantum",0,d5,"createMap",0,oZ,"createMapSlices",0,aE,"createMapSlicesTransform",0,gI,"createMapTransform",0,gG,"createMatrix",0,iK,"createMatrixClass",0,nt,"createMatrixFromColumns",0,i4,"createMatrixFromFunction",0,i0,"createMatrixFromRows",0,i2,"createMax",0,cl,"createMaxTransform",0,gX,"createMean",0,p8,"createMeanTransform",0,gJ,"createMedian",0,p7,"createMin",0,cc,"createMinTransform",0,gK,"createMod",0,sr,"createMode",0,lL,"createMolarMass",0,gE,"createMolarMassC12",0,gN,"createMolarPlanckConstant",0,gb,"createMolarVolume",0,gw,"createMultinomial",0,mL,"createMultiply",0,sA,"createMultiplyScalar",0,sD,"createNaN",0,dk,"createNeutronMass",0,go,"createNode",0,hr,"createNorm",0,f6,"createNot",0,ox,"createNthRoot",0,sN,"createNthRoots",0,uf,"createNuclearMagneton",0,d8,"createNull",0,dM,"createNullish",0,ob,"createNullishTransform",0,vo,"createNum",0,vf,"createNumber",0,iU,"createNumeric",0,l8,"createObjectNode",0,hI,"createOct",0,lY,"createOnes",0,oK,"createOperatorNode",0,hR,"createOr",0,o_,"createOrTransform",0,vs,"createParenthesisNode",0,hU,"createParse",0,hJ,"createParser",0,h6,"createParserClass",0,h2,"createPartitionSelect",0,ci,"createPermutations",0,mq,"createPhi",0,dj,"createPi",0,dF,"createPickRandom",0,m$,"createPinv",0,pz,"createPlanckCharge",0,gF,"createPlanckConstant",0,dZ,"createPlanckLength",0,gM,"createPlanckMass",0,gT,"createPlanckTemperature",0,gB,"createPlanckTime",0,gk,"createPolynomialRoot",0,pD,"createPow",0,ut,"createPrint",0,lQ,"createPrintTransform",0,vi,"createProd",0,lU,"createProtonMass",0,ga,"createQr",0,h7,"createQuantileSeq",0,ms,"createQuantileSeqTransform",0,g9,"createQuantumOfCirculation",0,gl,"createRandom",0,mX,"createRandomInt",0,mK,"createRange",0,o3,"createRangeClass",0,ne,"createRangeNode",0,hV,"createRangeTransform",0,gQ,"createRationalize",0,dd,"createRe",0,of,"createReducedPlanckConstant",0,dX,"createRelationalNode",0,hG,"createReplacer",0,dw,"createReshape",0,o6,"createResize",0,o5,"createResolve",0,du,"createResultSet",0,e7,"createReviver",0,db,"createRightArithShift",0,uT,"createRightLogShift",0,uF,"createRotate",0,o9,"createRotationMatrix",0,le,"createRound",0,ui,"createRow",0,lr,"createRowTransform",0,g0,"createRydberg",0,gu,"createSQRT1_2",0,dR,"createSQRT2",0,dq,"createSackurTetrode",0,g_,"createSchur",0,pZ,"createSec",0,fC,"createSech",0,fE,"createSecondRadiation",0,gD,"createSetCartesian",0,fj,"createSetDifference",0,fI,"createSetDistinct",0,fL,"createSetIntersect",0,fq,"createSetIsSubset",0,fH,"createSetMultiplicity",0,fW,"createSetPowerset",0,f$,"createSetSize",0,fZ,"createSetSymDifference",0,fJ,"createSetUnion",0,fQ,"createSign",0,sM,"createSimplify",0,di,"createSimplifyConstant",0,da,"createSimplifyCore",0,dl,"createSin",0,fS,"createSinh",0,fT,"createSize",0,li,"createSlu",0,px,"createSmaller",0,uJ,"createSmallerEq",0,u0,"createSolveODE",0,lM,"createSort",0,cs,"createSpaClass",0,cd,"createSparse",0,cM,"createSparseMatrixClass",0,iL,"createSpeedOfLight",0,d$,"createSplitUnit",0,i5,"createSqrt",0,sT,"createSqrtm",0,pW,"createSquare",0,sF,"createSqueeze",0,ls,"createStd",0,ml,"createStdTransform",0,g6,"createStefanBoltzmann",0,gC,"createStirlingS2",0,m0,"createString",0,iW,"createSubset",0,ll,"createSubsetTransform",0,g1,"createSubtract",0,sP,"createSubtractScalar",0,aF,"createSum",0,p3,"createSumTransform",0,g8,"createSylvester",0,p$,"createSymbolNode",0,h$,"createSymbolicEqual",0,df,"createTan",0,fF,"createTanh",0,fB,"createTau",0,dB,"createThomsonCrossSection",0,gc,"createTo",0,l2,"createToBest",0,l4,"createTrace",0,f9,"createTranspose",0,lm,"createTrue",0,dN,"createTypeOf",0,iP,"createTyped",0,e2,"createUnaryMinus",0,ab,"createUnaryPlus",0,a_,"createUnequal",0,ct,"createUnitClass",0,cA,"createUnitFunction",0,cN,"createUppercaseE",0,dV,"createUppercasePi",0,dH,"createUsolve",0,ub,"createUsolveAll",0,uC,"createVacuumImpedance",0,dQ,"createVariance",0,mi,"createVarianceTransform",0,vr,"createVersion",0,dW,"createWeakMixingAngle",0,gf,"createWienDisplacement",0,gA,"createXgcd",0,sO,"createXor",0,oC,"createZeros",0,lx,"createZeta",0,lI,"createZ
1pk2tf",0,dv],244316);var vm=e.i(244316),vd=n,vg=e.i(865834);function vv(e){var t=new vg.default;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}var vx={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null,legacySubset:!1},vy=["Matrix","Array"],vb=["number","BigNumber","bigint","Fraction"];function vw(e,t){function r(n){if(!n)return ec(e);if(void 0!==n.epsilon){console.warn('Warning: The configuration option "epsilon" is deprecated. Use "relTol" and "absTol" instead.');var i=ec(n);return i.relTol=n.epsilon,i.absTol=.001*n.epsilon,delete i.epsilon,r(i)}!0===n.legacySubset&&console.warn('Warning: The configuration option "legacySubset" is for compatibility only and might be deprecated in the future.');var a=ec(e);v_(n,"matrix",vy),v_(n,"number",vb),ep(e,n);var s=ec(e);return t("config",s,a,ec(n)),s}return r.MATRIX_OPTIONS=vy,r.NUMBER_OPTIONS=vb,Object.keys(vx).forEach(t=>{Object.defineProperty(r,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),r}function v_(e,t,r){void 0===e[t]||r.includes(e[t])||console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+r.map(e=>JSON.stringify(e)).join(", ")+".")}function vD(e,t,r,n){function i(t,i,s){if(s.wrap&&"function"==typeof i&&(i=o(i)),f(i)&&(i=e(t,{[i.signature]:i})),e.isTypedFunction(r[t])&&e.isTypedFunction(i)){i=s.override?e(t,i.signatures):e(r[t],i),r[t]=i,delete n[t],a(t,i),r.emit("import",t,function(){return i});return}var l,u=void 0!==r[t],c=null==(l=r.Unit)?void 0:l.isValuelessUnit(t);if(!u&&!c||s.override){r[t]=i,delete n[t],a(t,i),r.emit("import",t,function(){return i});return}if(!s.silent)throw Error('Cannot import "'+t+'": already exists')}function a(e,t){t&&"function"==typeof t.transform?(r.expression.transform[e]=t.transform,h(e)&&(r.expression.mathWithTransform[e]=t.transform)):(delete r.expression.transform[e],h(e)&&(r.expression.mathWithTransform[e]=t))}function s(e){delete r.expression.transform[e],h(e)?r.expression.mathWithTransform[e]=r[e]:delete r.expression.mathWithTransform[e]}function o(e){var t=function(){for(var t=[],n=0,i=arguments.length;n<i;n++){var a=arguments[n];t[n]=a&&a.valueOf()}return e.apply(r,t)};return e.transform&&(t.transform=e.transform),t}function l(t,i){var a,o,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(l.includes("."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(l));var u=m(t)?r.expression.transform:r,c=l in r.expression.transform,f=ex(u,l)?u[l]:void 0,h=function(){var n={};t.dependencies.map(eA).forEach(e=>{if(e.includes("."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=r:"mathWithTransform"===e?n.mathWithTransform=r.expression.mathWithTransform:"classes"===e?n.classes=r:n[e]=r[e]});var a=t(n);if(a&&"function"==typeof a.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with export const path = "expression.transform"');if(void 0===f||i.override)return a;
1if(e.isTypedFunction(f)&&e.isTypedFunction(a))return e(f,a);if(i.silent)return f;throw Error('Cannot import "'+l+'": already exists')},d=null!=(a=null==(o=t.meta)?void 0:o.formerly)?a:"",g=m(t)||p(t),v=r.expression.mathWithTransform;t.meta&&!1===t.meta.lazy?(u[l]=h(),d&&(u[d]=u[l])):(ev(u,l,h),d&&ev(u,d,h)),f&&c?(s(l),d&&s(d)):g&&(ev(v,l,()=>u[l]),d&&ev(v,d,()=>u[l])),n[l]=t,r.emit("import",l,h)}function u(e){return"function"==typeof e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||C(e)||_(e)||b(e)||D(e)||N(e)||Array.isArray(e)}function c(e){return"object"==typeof e&&"Module"===e[Symbol.toStringTag]}function f(e){return"function"==typeof e&&"string"==typeof e.signature}function h(e){return!ex(d,e)}function p(e){return!e.fn.includes(".")&&!ex(d,e.fn)&&(!e.meta||!e.meta.isClass)}function m(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var d={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(e,t){var r=arguments.length;if(1!==r&&2!==r)throw new ss("import",r,1,2);function n(e,r,i){if(Array.isArray(r))r.forEach(t=>n(e,t));else if(L(r)||c(r))for(var a in r)ex(r,a)&&n(e,r[a],a);else if(e_(r)||void 0!==i){var s=e_(r)?m(r)?r.fn+".transform":r.fn:i;if(ex(e,s)&&e[s]!==r&&!t.silent)throw Error('Cannot import "'+s+'" twice');e[s]=r}else if(!t.silent)throw TypeError("Factory, Object, or Array expected")}t||(t={});var a={};for(var s in n(a,e),a)if(ex(a,s)){var o=a[s];if(e_(o))l(o,t);else if(u(o))i(s,o,t);else if(!t.silent)throw TypeError("Factory, Object, or Array expected")}}}function vC(e,t){var r=nr({},vx,t);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=vv({isNumber:y,isComplex:_,isBigNumber:b,isBigInt:w,isFraction:D,isUnit:C,isString:A,isArray:E,isMatrix:N,isCollection:S,isDenseMatrix:M,isSparseMatrix:T,isRange:k,isIndex:F,isBoolean:B,isResultSet:P,isHelp:j,isFunction:O,isDate:I,isRegExp:z,isObject:L,isMap:R,isPartitionedMap:q,isObjectWrappingMap:U,isNull:H,isUndefined:V,isAccessorNode:W,isArrayNode:G,isAssignmentNode:$,isBlockNode:Y,isConditionalNode:Z,isConstantNode:X,isFunctionAssignmentNode:K,isFunctionNode:Q,isIndexNode:ee,isNode:et,isObjectNode:er,isOperatorNode:en,isParenthesisNode:ei,isRangeNode:ea,isRelationalNode:es,isSymbolNode:eo,isChain:el});n.config=vw(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],a=[];function s(e){if(e_(e))return e(n);var t,o=e[Object.keys(e)[0]];if(e_(o))return o(n);if(!ey(e))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",e),Error("Factory object with properties `type`, `name`, and `factory` expected");var l=i.indexOf(e);return -1===l?(t=!0===e.math?e.factory(n.type,r,s,n.typed,n):e.factory(n.type,r,s,n.typed),i.push(e),a.push(t)):t=a[l],t}var o={};function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.typed.apply(n.typed,t)}l.isTypedFunction=vd.default.isTypedFunction;var u=vD(l,s,n,o);return n.import=u,n.on("config",()=>{Object.values(o).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&u(e,{override:!0})})}),n.create=vC.bind(null,e),n.factory=ew,n.import(Object.values(ed(e))),n.ArgumentsError=ss,n.DimensionError=nx,n.IndexError=ny,n}var vA=function(e){if(e)throw Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n  import { create, all } from 'mathjs';\n  const mathjs = create(all);\n  mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(vx)};nr(vA,vx,{MATRIX_OPTIONS:vy,NUMBER_OPTIONS:vb});var vE=rT({config:vA}),vN=rR({}),vS=r7({}),vM=nt({}),vT=n9({Matrix:vM,config:vA}),vk=e2({BigNumber:vE,Complex:vN,DenseMatrix:vT,Fraction:vS}),vF=aC({typed:vk}),vB=aT({typed:vk}),vP=fa({typed:vk}),vj=iZ({Complex:vN,typed:vk}),vO=oo({typed:vk}),vI=fh({typed:vk}),vz=iz({config:vA,typed:vk}),vL=oz({typed:vk}),vR=oH({typed:vk}),vq=ou({typed:vk}),vU=iS({typed:vk}),vH=ib({typed:vk}),vV=sD({typed:vk}),vW=iU({typed:vk}),vG=of({typed:vk}),v$=sM({BigNumber:vE,Fraction:vS,complex:vj,typed:vk}),vY=fS({typed:vk}),vZ=li({typed:vk}),vX=iL({Matrix:vM,equalScalar:vz,typed:vk}),vJ=aF({typed:vk}),vK=iY({BigNumber:vE,typed:vk}),vQ=f8({addScalar:vB,conj:vO,multiplyScalar:vV,size:vZ,typed:vk}),v0=iE({equalScalar:vz,typed:vk}),v1=iK({DenseMatrix:vT,Matrix:vM,SparseMatrix:vX,typed:vk}),v2=sA({addScalar:vB,dot:vQ,equalScalar:vz,matrix:v1,multiplyScalar:vV,typed:vk}),v3=sT({Complex:vN,config:vA,typed:vk}),v4=lm({matrix:v1,typed:vk}),v6=lx({BigNumber:vE,config:vA,matrix:v1,typed:vk}),v5=lg({conj:vO,transpose:v4,typed:vk}),v8=oP({DenseMatrix:vT,SparseMatrix:vX,matrix:v1,typed:vk}),v9=uG({DenseMatrix:vT,SparseMatrix:vX,equalScalar:vz,matrix:v1,typed:vk}),v7=iX({Fraction:vS,typed:vk}),xe=oW({BigNumber:vE,DenseMatrix:vT,SparseMatrix:vX,config:vA,matrix:v1,typed:vk}),xt=ic({equal:v9,typed:vk}),xr=i4({flatten:vL,matrix:v1,size:vZ,typed:vk}),xn=o6({isInteger:xt,matrix:v1,typed:vk}),xi=ui({BigNumber:vE,DenseMatrix:vT,config:vA,equalScalar:vz,matrix:v1,typed:vk,zeros:v6}),xa=ab({typed:vk}),xs=oE({isInteger:xt,matrix:v1,typed:vk}),xo=a3({DenseMatrix:vT,config:vA,equalScalar:vz,matrix:v1,round:xi,typed:vk,zeros:v6}),xl=iC({config:vA,typed:vk}),xu=u3({DenseMatrix:vT,SparseMatrix:vX,bignumber:vK,concat:xs,config:vA,matrix:v1,typed:vk}),xc=l8({bignumber:vK,fraction:v7,number:vW}),xf=uJ({DenseMatrix:vT,SparseMatrix:vX,bignumber:vK,concat:xs,config:vA,matrix:v1,typed:vk}),xh=sP({DenseMatrix:vT,concat:xs,equalScalar:vz,matrix:v1,subtractScalar:vJ,typed:vk,unaryMinus:xa}),xp=f1({DenseMatrix:vT,SparseMatrix:vX,addScalar:vB,concat:xs,equalScalar:vz,matrix:v1,typed:vk}),xm=aU({DenseMatrix:vT,config:vA,equalScalar:vz,matrix:v1,round:xi,typed:vk,zeros:v6}),xd=uO({BigNumber:vE,DenseMatrix:vT,Fraction:vS,concat:xs,config:vA,equalScalar:vz,matrix:v1,typed:vk}),xg=l7({numeric:xc,typed:vk}),xv=cm({larger:xu,smaller:xf}),xx=ch({ImmutableDenseMatrix:cf({DenseMatrix:vT,smaller:xf}),getMatrixDataType:vR}),xy=u5({DenseMatrix:vT,SparseMatrix:vX,concat:xs,config:vA,matrix:v1,typed:vk}),xb=ux({DenseMatrix:vT,divideScalar:xg,equalScalar:vz,matrix:v1,multiplyScalar:vV,subtractScalar:vJ,typed:vk}
1),xw=h7({addScalar:vB,complex:vj,conj:vO,divideScalar:xg,equal:v9,identity:xe,isZero:v0,matrix:v1,multiplyScalar:vV,sign:v$,sqrt:v3,subtractScalar:vJ,typed:vk,unaryMinus:xa,zeros:v6}),x_=px({SparseMatrix:vX,abs:vF,add:xp,divideScalar:xg,larger:xu,largerEq:xy,multiply:v2,subtract:xh,transpose:v4,typed:vk}),xD=cd({FibonacciHeap:xv,addScalar:vB,equalScalar:vz}),xC=ll({add:xp,matrix:v1,typed:vk,zeros:v6}),xA=ub({DenseMatrix:vT,divideScalar:xg,equalScalar:vz,matrix:v1,multiplyScalar:vV,subtractScalar:vJ,typed:vk}),xE=uR({compare:xd,typed:vk}),xN=pP({divideScalar:xg,isZero:v0,matrix:v1,multiply:v2,subtractScalar:vJ,typed:vk,unaryMinus:xa}),xS=pO({abs:vF,addScalar:vB,det:xN,divideScalar:xg,identity:xe,matrix:v1,multiply:v2,typed:vk,unaryMinus:xa}),xM=ut({Complex:vN,config:vA,fraction:v7,identity:xe,inv:xS,matrix:v1,multiply:v2,number:vW,typed:vk}),xT=u0({DenseMatrix:vT,SparseMatrix:vX,concat:xs,config:vA,matrix:v1,typed:vk}),xk=uC({DenseMatrix:vT,divideScalar:xg,equalScalar:vz,matrix:v1,multiplyScalar:vV,subtractScalar:vJ,typed:vk}),xF=mk({BigNumber:vE,Complex:vN,config:vA,multiplyScalar:vV,pow:xM,typed:vk}),xB=h8({DenseMatrix:vT,Spa:xD,SparseMatrix:vX,abs:vF,addScalar:vB,divideScalar:xg,equalScalar:vz,larger:xu,matrix:v1,multiplyScalar:vV,subtractScalar:vJ,typed:vk,unaryMinus:xa}),xP=o3({bignumber:vK,matrix:v1,add:xp,config:vA,equal:v9,isPositive:xl,isZero:v0,larger:xu,largerEq:xy,smaller:xf,smallerEq:xT,typed:vk}),xj=pq({abs:vF,add:xp,addScalar:vB,atan:vP,bignumber:vK,column:oS({Index:xx,matrix:v1,range:xP,typed:vk}),complex:vj,config:vA,cos:vI,diag:v8,divideScalar:xg,dot:vQ,equal:v9,flatten:vL,im:vq,inv:xS,larger:xu,matrix:v1,matrixFromColumns:xr,multiply:v2,multiplyScalar:vV,number:vW,qr:xw,re:vG,reshape:xn,sin:vY,size:vZ,smaller:xf,sqrt:v3,subtract:xh,typed:vk,usolve:xA,usolveAll:xk}),xO=f6({abs:vF,add:xp,conj:vO,ctranspose:v5,eigs:xj,equalScalar:vz,larger:xu,matrix:v1,multiply:v2,pow:xM,smaller:xf,sqrt:v3,typed:vk}),xI=e.i(271645),xz=e.i(483846),xL=e.i(894109),xR=e.i(862560),xq=e.i(611578),xU=e.i(710060);function xH(e){return"string"==typeof e?e.trim():""}function xV(e){let t=(0,xU.cmsString)(e.formula),r=(0,xU.cmsString)(e.header),n=(0,xU.resolveCmsCopyField)(e.header),i=(0,xU.cmsHtmlString)(e.topText),a=(0,xU.cmsHtmlString)(e.bottomText);return t||r||i||a?{topText:i,header:n,headerPlain:r,formula:t,bottomText:a,backgroundColor:xH(e.backgroundColor?.hex)}:null}function xW(...e){return e.filter(Boolean).join(" ")}let xG=vC(vm),x$=/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,30})$/,xY="https://staging-cit-connector-service.herokuapp.com/syncContact",xZ=xW("box-border block h-12 min-h-12 w-full appearance-none rounded-[8px] border border-gray-200 bg-gray-100","px-4 py-0","font-sans text-[16px] leading-[48px] text-[#0f172a]","shadow-inner transition-colors duration-200","hover:bg-white hover:shadow-md","focus-visible:border-[#00f0ff] focus-visible:outline-none"),xX=xW(xZ,"placeholder:text-gray-400","[&:not(:placeholder-shown)]:border-[#00f0ff]"),xJ=xW(xZ,"border-[#00f0ff]","bg-[length:12px] bg-[position:right_16px_center] bg-no-repeat pr-10","bg-[url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3E%3Cpath fill=%27%230f172a%27 d=%27M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z%27/%3E%3C/svg%3E')]"),xK=xW("m-0 block truncate font-sans font-normal leading-6 text-[#0f172a]","text-[16px] tablet:text-[16px] mobile:text-[15px]");function xQ({label:e,htmlFor:r,extraLabel:n,children:i}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"relative mb-2 flex h-6 items-center gap-2",children:[(0,t.jsx)("label",{className:xK,htmlFor:r,children:e}),n]}),i]})}let x0=xW("m-0 w-full max-w-full text-center font-medium text-[#036ada]","text-balance leading-[1.2]","text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))]","mobile:text-[min(32px,calc(32*100vw/390))] mobile:leading-[1.25]"),x1=xW("font-normal text-[#0f172a]","text-[min(24px,calc(24*100vw/1920))] leading-[min(40px,calc(40*100vw/1920))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(32px,calc(32*100vw/1024))]","mobile:text-[min(18px,calc(18*100vw/390))] mobile:leading-[min(28px,calc(28*100vw/390))]","[&_p]:m-0 [&_p+p]:mt-[min(12px,calc(12*100vw/1920))] [&_a]:font-medium [&_a]:text-[#036ada] [&_a]:underline");function x2(){let[e,r]=(0,xI.useState)(!1),n=(0,xI.useRef)(null);return(0,xI.useEffect)(()=>
1{if(e)return document.addEventListener("pointerdown",t),document.addEventListener("keydown",i),()=>{document.removeEventListener("pointerdown",t),document.removeEventListener("keydown",i)};function t(e){n.current?.contains(e.target)||r(!1)}function i(e){"Escape"===e.key&&r(!1)}},[e]),(0,t.jsxs)("div",{ref:n,className:"group inline-flex shrink-0",children:[(0,t.jsx)("button",{type:"button",className:xW("relative inline-flex size-[18px] shrink-0 items-center justify-center","rounded-full touch-manipulation [-webkit-tap-highlight-color:transparent]","after:absolute after:-inset-3 after:content-['']"),"aria-label":"Plasma Air product cost info","aria-expanded":e,"aria-controls":"calc-product-cost-tip",onClick:()=>r(e=>!e),children:(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"10",cy:"10",r:"8.25",stroke:"#036ADA",strokeWidth:"1.5"}),(0,t.jsx)("path",{d:"M10 9.15v5.1",stroke:"#036ADA",strokeWidth:"1.5",strokeLinecap:"round"}),(0,t.jsx)("circle",{cx:"10",cy:"6.35",r:"1.15",fill:"#036ADA"})]})}),(0,t.jsx)("span",{id:"calc-product-cost-tip",role:"tooltip",className:xW("pointer-events-none absolute z-30 box-border rounded-[16px] bg-gray-700 px-4 py-3","left-0 right-0 w-auto max-w-full","text-left text-sm font-normal leading-5 text-white transition-opacity duration-200",e?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover:opacity-100 [@media(hover:hover)]:group-focus-within:opacity-100","bottom-[calc(100%+8px)]","desktop:right-auto desktop:w-80"),children:"Enter the estimated price you'll pay for Plasma Air products. Market average for the PlasmaPURE 600 Series is $250. Market average for the PlasmaPURE AutoClean 1500 is $450."})]})}function x3({label:e,value:r,previous:n}){return(0,t.jsxs)("div",{className:xW("mt-[min(8px,calc(8*100vw/1920))] box-border flex w-full flex-col items-center justify-center rounded-[16px] bg-[#036ada] text-center","px-[min(12px,calc(12*100vw/1920))] py-[min(20px,calc(20*100vw/1920))]","h-[min(128px,calc(128*100vw/1920))] tablet:h-[min(120px,calc(120*100vw/1024))] mobile:h-[min(112px,calc(112*100vw/390))]"),children:[(0,t.jsx)("p",{className:xW("m-0 font-medium text-white","text-[min(18px,calc(18*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(15px,calc(15*100vw/390))]"),children:e}),""!==r&&Number.isFinite(r)?(0,t.jsxs)("p",{className:xW("mx-auto mt-[min(8px,calc(8*100vw/1920))] w-11/12 truncate font-bold text-white","text-[min(30px,calc(30*100vw/1920))] tablet:text-[min(26px,calc(26*100vw/1024))] mobile:text-[min(24px,calc(24*100vw/390))]"),children:["$",(0,t.jsx)(xz.default,{start:n||0,end:r,duration:1})]}):(0,t.jsx)("p",{className:xW("mx-auto mt-[min(8px,calc(8*100vw/1920))] w-11/12 truncate font-bold text-white","text-[min(30px,calc(30*100vw/1920))] tablet:text-[min(26px,calc(26*100vw/1024))] mobile:text-[min(24px,calc(24*100vw/390))]"),children:"$ --"})]})}function x4({widget:e}){let n=xV(e),[i,a]=(0,xI.useState)(5),[s,o]=(0,xI.useState)(3),[l,u]=(0,xI.useState)(25),[c,f]=(0,xI.useState)(250),[h,p]=(0,xI.useState)(50),[m,d]=(0,xI.useState)(150),[g,v]=(0,xI.useState)(""),[x,y]=(0,xI.useState)(0),[b,w]=(0,xI.useState)(0),[_,D]=(0,xI.useState)(0),[C,A]=(0,xI.useState)(!1),[E,N]=(0,xI.useState)(!1),[S,M]=(0,xI.useState)(!1),T=n?.formula??"",{res1:k,res2:F,res3:B}=(0,xI.useMemo)(()=>{if(!T)return{res1:0,res2:0,res3:0};try{let e=Number(xG.evaluate(T,{value1:i,value2:s,value3:l,value4:c,value5:h,value6:m})),t=Number.isFinite(e)?e:0,r=22*t;return{res1:t,res2:r,res3:12*r}}catch{return{res1:0,res2:0,res3:0}}},[T,i,s,l,c,h,m]),{dailyOpportunity:P,monthlyOpportunity:j,yearlyOpportunity:O}=(0,xI.useMemo)(()=>i&&s&&l&&c&&h?{dailyOpportunity:k,monthlyOpportunity:F,yearlyOpportunity:B}:{dailyOpportunity:"",monthlyOpportunity:"",yearlyOpportunity:""},[i,s,l,c,h,k,F,B]);if(!n)return null;let{topText:I,header:z,headerPlain:L,bottomText:R}=n;function q(){y(Math.ceil(k)),w(Math.ceil(F)),D(Math.ceil(B))}function U(e){let t=e.currentTarget,r=parseInt(t.value,10);(vU(r)||r<0)&&(t.value="")}function H(e,t){q(),e(t.target.value)}function V(e){let t=e.target.value;x$.test(t)||""===t||A(!1),v(t)}async function W(){let e="R0NoYXIyMDIwTElWUDYxMA==",t=r.default.AES.encrypt
1(`@@${Date.now()}@@`,e).toString();if(A(!1),N(!1),!x$.test(g))return void A(!0);M(!0);try{(await fetch(xY,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:t,contact:{email:g,fieldValues:[{field:"90",value:i},{field:"91",value:s},{field:"89",value:l},{field:"93",value:c},{field:"94",value:h},{field:"95",value:m}]}})})).ok&&N(!0)}catch{}finally{M(!1)}}let G=!!(i&&s&&l&&c&&h&&m&&g&&!S),$=e.id?`widget-calculator-${e.id}`:"widget-calculator-title";return(0,t.jsx)("section",{"aria-labelledby":L?$:void 0,className:xW("relative box-border w-full overflow-x-clip font-sans text-[#0f172a]","bg-[linear-gradient(180deg,rgba(108,173,228,0.3)_0%,rgba(255,255,255,0.3)_100%)]"),children:(0,t.jsxs)("div",{className:xW("relative z-1 box-border mx-auto w-full max-w-480","px-[min(160px,calc(160*100vw/1920))] py-[min(80px,calc(80*100vw/1920))]","tablet:px-[min(60px,calc(60*100vw/1024))] tablet:py-[min(60px,calc(60*100vw/1024))]","mobile:px-[min(20px,calc(20*100vw/390))] mobile:py-[min(40px,calc(40*100vw/390))]"),children:[L?(0,t.jsx)("div",{className:"mb-[min(24px,calc(24*100vw/1920))] w-full mobile:mb-[min(16px,calc(16*100vw/390))]",children:(0,t.jsx)(xL.CmsCopyField,{value:z,variant:"title",titleTag:"h2",titleId:$,titleClassName:x0,accentClassName:"text-[#036ada]"})}):null,I?(0,t.jsx)("div",{className:"flex justify-center text-center",children:(0,t.jsx)(xR.CmsHtmlField,{html:I,className:x1,as:"div"})}):null,(0,t.jsxs)("div",{className:xW("mt-[60px] box-border rounded-[16px] bg-white shadow-lg","tablet:mt-[56px] mobile:mt-[40px]","px-[min(64px,calc(64*100vw/1920))] pt-[min(24px,calc(24*100vw/1920))] pb-[min(12px,calc(12*100vw/1920))]","tablet:px-[min(32px,calc(32*100vw/1024))]","mobile:px-[min(16px,calc(16*100vw/390))] mobile:pt-8! mobile:pb-8!"),children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 items-start gap-x-4 gap-y-4 tablet:grid-cols-2 mobile:grid-cols-1",children:[(0,t.jsx)(xQ,{label:"Number of Trucks",htmlFor:"calc-trucks",children:(0,t.jsx)("input",{id:"calc-trucks",type:"number",min:1,onInput:U,value:i,onChange:e=>H(a,e),placeholder:"Add Value",className:xX})}),(0,t.jsx)(xQ,{label:"Avg Daily Calls Per Truck",htmlFor:"calc-calls",children:(0,t.jsx)("input",{id:"calc-calls",type:"number",min:1,onInput:U,value:s,onChange:e=>H(o,e),placeholder:"Add Value",className:xX})}),(0,t.jsx)(xQ,{label:"Avg Close Rate",htmlFor:"calc-close-rate",children:(0,t.jsxs)("select",{id:"calc-close-rate",name:"percent",value:l,onChange:e=>H(u,e),className:xJ,children:[(0,t.jsx)("option",{value:10,children:"10%"}),(0,t.jsx)("option",{value:25,children:"25%"}),(0,t.jsx)("option",{value:50,children:"50%"}),(0,t.jsx)("option",{value:75,children:"75%"})]})}),(0,t.jsx)(xQ,{label:"Plasma Air Product Cost",htmlFor:"calc-product-cost",extraLabel:(0,t.jsx)(x2,{}),children:(0,t.jsxs)("div",{className:"relative h-12 w-full",children:[(0,t.jsx)("span",{className:"pointer-events-none absolute left-4 top-0 z-1 h-12 font-sans text-[16px] leading-[48px] text-[#0f172a]","aria-hidden":!0,children:"$"}),(0,t.jsx)("input",{id:"calc-product-cost",type:"number",min:1,onInput:U,value:c,placeholder:"Add Value",onChange:e=>H(f,e),className:xW(xX,"pl-8")})]})}),(0,t.jsx)(xQ,{label:"Desired Margin",htmlFor:"calc-margin",children:(0,t.jsxs)("select",{id:"calc-margin",name:"margin",value:h,onChange:e=>H(p,e),className:xJ,children:[(0,t.jsx)("option",{value:10,children:"10%"}),(0,t.jsx)("option",{value:20,children:"20%"}),(0,t.jsx)("option",{value:30,children:"30%"}),(0,t.jsx)("option",{value:40,children:"40%"}),(0,t.jsx)("option",{value:50,children:"50%"}),(0,t.jsx)("option",{value:60,children:"60%"}),(0,t.jsx)("option",{value:70,children:"70%"}),(0,t.jsx)("option",{value:80,children:"80%"}),(0,t.jsx)("option",{value:90,children:"90%"}),(0,t.jsx)("option",{value:100,children:"100%"})]})}),(0,t.jsx)(xQ,{label:"Hourly Rate",htmlFor:"calc-hourly",children:(0,t.jsxs)("div",{className:"relative h-12 w-full",children:[(0,t.jsx)("span",{className:"pointer-events-none absolute left-4 top-0 z-1 h-12 font-sans text-[16px] leading-[48px] text-[#0f172a]","aria-hidden":!0,
1children:"$"}),(0,t.jsx)("input",{id:"calc-hourly",type:"number",min:1,onInput:U,value:m,onChange:e=>H(d,e),placeholder:"Add Value",className:xW(xX,"pl-8")})]})}),(0,t.jsx)(x3,{label:"Daily Opportunity*",value:P,previous:x}),(0,t.jsx)(x3,{label:"Monthly Opportunity*",value:j,previous:b}),(0,t.jsx)(x3,{label:"Yearly Opportunity*",value:O,previous:_})]}),(0,t.jsxs)("div",{className:xW("mt-[min(16px,calc(16*100vw/1920))] flex flex-row items-center justify-between gap-4 rounded-[16px] bg-[#ECF9FD] p-3","tablet:flex-col tablet:items-stretch mobile:flex-col mobile:items-stretch"),children:[(0,t.jsx)("div",{className:"box-border w-1/3 pr-4 tablet:w-full tablet:pr-0 mobile:w-full mobile:pr-0",children:(0,t.jsx)("p",{className:xW("m-0 w-full font-bold text-[#0f172a]","text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(15px,calc(15*100vw/1024))] mobile:text-[min(14px,calc(14*100vw/390))]"),children:"Send us your results and learn how to realize your Plasma Air sales potential."})}),(0,t.jsx)("div",{className:"w-2/3 tablet:w-full mobile:w-full",children:E?(0,t.jsx)("p",{className:xW("m-0 flex items-center justify-center font-bold text-[#0f172a]","text-[min(20px,calc(20*100vw/1920))] tablet:text-[min(18px,calc(18*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))]"),children:"Thanks for your interest in growing your revenue. We'll reach out ASAP."}):(0,t.jsxs)("div",{className:"flex flex-row items-center gap-4 mobile:flex-col mobile:items-stretch",children:[(0,t.jsx)("input",{type:"email",value:g,onChange:V,placeholder:"Email Address",autoComplete:"email",className:xW(xX,"min-w-0 flex-1",C&&"border-red-500 focus-visible:border-red-500"),"aria-invalid":C}),(0,t.jsx)(xq.HomeV2HeroCta,{type:"button",label:"Send My Results",variant:"primary",disabled:!G,onClick:W,className:"shrink-0 mobile:w-full"})]})})]}),(0,t.jsx)("p",{className:xW("mt-[min(8px,calc(8*100vw/1920))] italic text-[#0f172a]","text-[min(14px,calc(14*100vw/1920))] tablet:text-[min(13px,calc(13*100vw/1024))] mobile:text-xs"),children:"* Potential for more if you qualify for the Elite Rebate"})]}),R?(0,t.jsx)("div",{className:"mt-[min(64px,calc(64*100vw/1920))] flex justify-center text-center tablet:mt-[min(40px,calc(40*100vw/1024))] mobile:mt-[min(32px,calc(32*100vw/390))]",children:(0,t.jsx)(xR.CmsHtmlField,{html:R,className:x1,as:"div"})}):null]})})}e.s(["WidgetCalculator",0,x4],378923)},62206,103361,e=>{"use strict";var t=e.i(843476);function r({children:e,className:n="",as:i="div"}){return(0,t.jsx)(i,{className:`solutions-container ${n}`.trim(),children:e})}e.s(["SolutionsContainer",0,r],62206);var n=t;function i({children:e,className:t="",id:r,"aria-labelledby":a,spacing:s="default"}){let o="compact"===s?"solutions-section-sm":"solutions-section";return(0,n.jsx)("section",{id:r,"aria-labelledby":a,className:`${o} ${t}`.trim(),children:e})}e.s(["SolutionsSection",0,i],103361)},801878,e=>{"use strict";var t=e.i(843476),r=e.i(611578);function n({href:e,label:i,variant:a,openInNewTab:s}){return(0,t.jsx)(r.HomeV2HeroCta,{href:e,label:i,variant:"primary"===a?"primary":"outline",openInNewTab:s})}e.s(["SolutionsCta",0,n])},752103,843584,e=>{"use strict";var t=e.i(843476);function r(){return"[--hero-cta-row-gap:min(30px,calc(30*100vw/1920))] [--hero-cta-btn-h:min(60px,calc(60*100vw/1920))] [--hero-cta-font:min(18px,calc(18*100vw/1920))] [--hero-cta-px:min(30px,calc(30*100vw/1920))] [--hero-cta-btn-gap:min(6px,calc(6*100vw/1920))] [--hero-cta-icon:min(20px,calc(20*100vw/1920))] [--hero-cta-icon-glyph-scale:0.5] [--hero-cta-icon-stroke:calc(2*var(--hero-cta-icon)/20)] [--hero-cta-text-gap:min(29px,calc(29*100vw/1920))] [--hero-cta-border:min(2px,calc(2*100vw/1920))] tablet:[--hero-cta-row-gap:min(20px,calc(20*100vw/1024))] tablet:[--hero-cta-btn-h:min(60px,calc(60*100vw/1024))] tablet:[--hero-cta-font:min(18px,calc(18*100vw/1024))] tablet:[--hero-cta-px:min(30px,calc(30*100vw/1024))] tablet:[--hero-cta-btn-gap:min(6px,calc(6*100vw/1024))] tablet:[--hero-cta-icon:min(20px,calc(20*100vw/1024))] tablet:[--hero-cta-icon-glyph-scale:0.65] tablet:[--hero-cta-icon-stroke:calc(2*var(--hero-cta-icon)/20)] tablet:[--hero-cta-text-gap:min(29px,calc(29*100vw/1024))] tablet:[--hero-cta-border:min(2px,calc(2*100vw/1024))] mobile:[--hero-cta-row-gap:min(20px,calc(20*100vw/390))] mobile:[--hero-cta-btn-h:min(60px,calc(60*100vw/390))] mobile:[--hero-cta-font:min(15px,calc(15*100vw/390))] mobile:[--hero-cta-px:min(20px,calc(20*100vw/390))] mobile:[--hero-cta-btn-gap:min(6px,calc(6*100vw/390))] mobile:[--hero-cta-icon:min(20px,calc(20*100vw/390))] mobile:[--hero-cta-icon-glyph-scale:0.7] mobile:[--hero-cta-icon-stroke:calc(2*var(--hero-cta-icon)/20)] mobile:[--hero-cta-text-gap:min(29px,calc(29*100vw/390))] mobile:[--hero-cta-border:min(2px,calc(2*100vw/390))]"}function n(e){let t=e?.mobileFullWidth!==!1;return[r(),"[&_a]:[--cta-btn-height:var(--hero-cta-btn-h)]","[&_a]:[--cta-v-pad:calc(var(--hero-cta-btn-h)*19/60)]","[&_a]:[--cta-h-pad:var(--hero-cta-px)]","[&_a]:[--cta-text-gap:var(--hero-cta-text-gap)]","[&_a]:[--cta-icon-size:var(--hero-cta-icon)]","[&_a]:[--cta-icon-glyph-scale:var(--hero-cta-icon-glyph-scale)]","[&_a]:[--cta-icon-stroke:var(--hero-cta-icon-stroke)]","[&_button]:[--cta-btn-height:var(--hero-cta-btn-h)]","[&_button]:[--cta-v-pad:calc(var(--hero-cta-btn-h)*19/60)]","[&_button]:[--cta-h-pad:var(--hero-cta-px)]","[&_button]:[--cta-text-gap:var(--hero-cta-text-gap)]","[&_button]:[--cta-icon-size:var(--hero-cta-icon)]","[&_button]:[--cta-icon-glyph-scale:var(--hero-cta-icon-glyph-scale)]","[&_button]:[--cta-icon-stroke:var(--hero-cta-icon-stroke)]","[&_a]:box-border","[&_button]:box-border","[&_a]:!h-[length:var(--hero-cta-btn-h)]","[&_button]:!h-[length:var(--hero-cta-btn-h)]","[&_a]:!w-auto","[&_button]:!w-auto","[&_a]:!max-w-none","[&_button]:!max-w-none","[&_a]:!shrink-0","[&_button]:!shrink-0","[&_a]:!grow-0","[&_button]:!grow-0","[&_a]:!basis-auto","[&_button]:!basis-auto","[&_a]:!px-[length:var(--hero-cta-px)]","[&_button]:!px-[length:var(--hero-cta-px)]","[&_a]:!text-[length:var(--hero-cta-font)]","[&_button]:!text-[length:var(--hero-cta-font)]","[&_a]:!gap-[length:var(--hero-cta-btn-gap)]","[&_button]:!gap-[length:var(--hero-cta-btn-gap)]","[&_a:not(.btnPrimary)]:!border-[length:var(--hero-cta-border)]","[&_button:not(.btnPrimary)]:!border-[length:var(--hero-cta-border)]","[&_a_.icon]:!w-[length:var(--hero-cta-icon)]","[&_a_.icon]:!h-[length:var(--hero-cta-icon)]","[&_button_.icon]:!w-[length:var(--hero-cta-icon)]","[&_button_.icon]:!h-[length:var(--hero-cta-icon)]",t?"mobile:[&_a]:!w-full":"",t?"mobile:[&_button]:!w-full":"",t?"mobile:[&_a]:!max-w-full":"",t?"mobile:[&_button]:!max-w-full":"",t?"mobile:[&_a]:!min-w-0":"",t?"mobile:[&_button]:!min-w-0":"",t?"mobile:[&_a]:!shrink":"",t?"mobile:[&_button]:!shrink":"",t?"mobile:[&_a>span:first-child]:!min-w-0":"",t?"mobile:[&_button>span:first-child]:!min-w-0":"",t?"mobile:[&_a>span:first-child]:!shrink":"",t?"mobile:[&_button>span:first-child]:!shrink":"",t?"mobile:[&_a>span:first-child]:!overflow-hidden":"",t?"mobile:[&_button>
1span:first-child]:!overflow-hidden":""].filter(Boolean).join(" ")}function i(e){return["flex flex-wrap items-center gap-[length:var(--hero-cta-row-gap)] tablet:flex-nowrap tablet:justify-start mobile:flex-col mobile:items-stretch mobile:flex-nowrap",n(e)].join(" ")}let a="mt-[min(12px,calc(12*100vw/1920))]",s="mt-[min(16px,calc(16*100vw/1920))]",o="mt-[min(32px,calc(32*100vw/1920))] w-full";function l({className:e,mobileFullWidth:r,children:n}){return(0,t.jsx)("div",{className:[i({mobileFullWidth:r}),e].filter(Boolean).join(" "),children:n})}e.s(["HERO_CTA_COPY_ACTIONS_MT",0,o,"HERO_CTA_COPY_BODY_MT",0,s,"HERO_CTA_COPY_LEAD_MT",0,a,"heroCtaRowClasses",0,i],843584),e.s(["HeroCtaRow",0,l],752103)},132051,e=>{e.v({accent:"products-final-cta-module__zowi7G__accent",copy:"products-final-cta-module__zowi7G__copy",ctaRow:"products-final-cta-module__zowi7G__ctaRow",ctaWrap:"products-final-cta-module__zowi7G__ctaWrap",inner:"products-final-cta-module__zowi7G__inner",lead:"products-final-cta-module__zowi7G__lead",panel:"products-final-cta-module__zowi7G__panel",section:"products-final-cta-module__zowi7G__section",title:"products-final-cta-module__zowi7G__title"})},228651,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=t,i=e.i(862560),a=e.i(62206),s=e.i(103361),o=e.i(801878);function l({content:e}){let{title:t,body:r,cta:u}=e;return(0,n.jsx)(s.SolutionsSection,{id:"hp-final-cta","aria-labelledby":"hp-final-cta-title",className:"hp-final-cta-section",children:(0,n.jsx)(a.SolutionsContainer,{children:(0,n.jsxs)("div",{className:"hp-final-cta",children:[(0,n.jsx)("div",{className:"hp-final-cta__accent","aria-hidden":!0}),(0,n.jsxs)("div",{className:"hp-final-cta__copy",children:[t?(0,n.jsx)("h2",{id:"hp-final-cta-title",className:"hp-final-cta__title",children:t}):(0,n.jsx)("h2",{id:"hp-final-cta-title",className:"hp-final-cta__title"}),r?(0,n.jsx)(i.CmsHtmlField,{html:r,className:"hp-final-cta__body",as:"div"}):null]}),u?.label?.trim()?(0,n.jsx)("div",{className:"hp-cta-row hp-final-cta__actions",children:(0,n.jsx)(o.SolutionsCta,{href:u.href,label:u.label,variant:"secondary"})}):null]})})})}var u=t,c=i,f=e.i(611578),h=e.i(752103),p=e.i(710060),m=e.i(132051);function d({content:e,id:t}){let{title:r,text:n,buttonText:i,buttonLink:a,secondaryButtonText:s,secondaryButtonLink:o}=e,l=!!(r||n),g=(0,p.cmsHasLabel)(i),v=(0,p.cmsHasLabel)(s);return l||g||v?(0,u.jsx)("section",{id:t,className:m.default.section,"aria-labelledby":r?"products-final-cta-title":void 0,children:(0,u.jsx)("div",{className:m.default.inner,children:(0,u.jsxs)("div",{className:m.default.panel,children:[(0,u.jsx)("div",{className:m.default.accent,"aria-hidden":!0}),l?(0,u.jsxs)("div",{className:m.default.copy,children:[r?(0,u.jsx)("h2",{id:"products-final-cta-title",className:m.default.title,children:r}):null,n?(0,u.jsx)(c.CmsHtmlField,{html:n,className:m.default.lead,as:"div"}):null]}):null,g||v?(0,u.jsx)("div",{className:m.default.ctaWrap,children:(0,u.jsxs)(h.HeroCtaRow,{className:m.default.ctaRow,children:[g?(0,u.jsx)(f.HomeV2HeroCta,{href:a||"#",label:i,variant:"outline"}):null,v&&s?(0,u.jsx)(f.HomeV2HeroCta,{href:o||"#",label:s,variant:"outline"}):null]})}):null]})})}):null}var g=t,v=i,x=f,y=a,b=s,w=o;function _({content:e,id:t="solutions-final-cta"}){let r=e.primaryCta?.label?.trim()??"",n=e.secondaryCta?.label?.trim()??"",i=!!r,a=!!n,s=i||a;return(0,g.jsx)(b.SolutionsSection,{id:t,"aria-labelledby":"solutions-final-cta-title",className:"solutions-final-cta-section",children:(0,g.jsx)(y.SolutionsContainer,{children:(0,g.jsxs)("div",{className:"solutions-final-cta",children:[(0,g.jsx)("div",{className:"solutions-final-cta__accent","aria-hidden":!0}),(0,g.jsxs)("div",{className:"solutions-final-cta__copy",children:[e.title?(0,g.jsx)("h2",{id:"solutions-final-cta-title",className:"solutions-final-cta__title",children:e.title}):(0,g.jsx)("h2",{id:"solutions-final-cta-title",className:"solutions-final-cta__title"}),e.body?(0,g.jsx)(v.CmsHtmlField,{html:e.body,className:"solutions-final-cta__body",as:"div"}):null]}),s?(0,g.jsxs)("div",{className:"solutions-cta-row solutions-final-cta__actions",children:[i&&e.primaryCta?a?(0,g.jsx)(x.HomeV2HeroCta,{href:e.primaryCta.href,label:e.primaryCta.label,variant:"whiteSolid",openInNewTab:e.primaryCta.openInNewTab}):(0,g.jsx)(w.SolutionsCta,{href:e.primaryCta.href,label:e.primaryCta.label,variant:"primary",openInNewTab:e.primaryCta.openInNewTab}):null,a&&e.secondaryCta?(0,g.jsx)(x.HomeV2HeroCta,{href:e.secondaryCta.href,label:e.secondaryCta.label,variant:"whiteGhost",openInNewTab:e.secondaryCta.openInNewTab}):null]}):null]})})})}var D=e.i(341214),C=e.i(28907),A=e.i(547672),E=e.i(221858);function N({widget:e}){let n=(0,C.useWidgetPageKind)(),i=(0,r.useCmsLinkSection)(),a=(0,D.useProductSectionNavActive)();
1return(0,A.withCmsLinkSection)(i,()=>{if(!(0,E.callToActionHasRenderableContent)(e))return null;let r=a?"how-to-purchase":"solutions"===n?"solutions-final-cta":"how-to-purchase";return"solutions"===n||(0,E.callToActionHasSecondary)(e)?(0,t.jsx)(_,{id:r,content:(0,E.mapCallToActionToSolutionsFinalCta)(e)}):"health-productivity"===n?(0,t.jsx)(l,{content:(0,E.mapCallToActionToHealthProductivityFinalCta)(e)}):(0,t.jsx)(d,{id:r,content:(0,E.mapWidgetProductsCallToAction)(e)})})}e.s(["WidgetCallToAction",0,N],228651)},93107,e=>{e.v({card:"products-category-card-module__QZ1fXa__card",cardStatic:"products-category-card-module__QZ1fXa__cardStatic",content:"products-category-card-module__QZ1fXa__content",description:"products-category-card-module__QZ1fXa__description",exploreMore:"products-category-card-module__QZ1fXa__exploreMore",image:"products-category-card-module__QZ1fXa__image",imageWrap:"products-category-card-module__QZ1fXa__imageWrap",textBlock:"products-category-card-module__QZ1fXa__textBlock",title:"products-category-card-module__QZ1fXa__title"})},714165,e=>{e.v({accent:"products-categories-module__cPPJda__accent",grid:"products-categories-module__cPPJda__grid",header:"products-categories-module__cPPJda__header",heading:"products-categories-module__cPPJda__heading",inner:"products-categories-module__cPPJda__inner",lead:"products-categories-module__cPPJda__lead",section:"products-categories-module__cPPJda__section"})},966363,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(522016),i=e.i(618566),a=e.i(894109),s=e.i(680673),o=e.i(170192);function l(e){return e.map((e,r)=>"break"===e.type?(0,t.jsx)("br",{},`br-${r}`):"bold"===e.type?(0,t.jsx)("span",{className:"font-medium",children:e.text},`bold-${r}`):(0,t.jsx)("span",{children:e.text},`text-${r}`))}function u({card:e,hasLink:r}){return(0,t.jsx)("h2",{className:["m-0 w-full font-medium text-[#036ada] transition-colors duration-200 ease-out",r?"group-hover:text-black":"","text-[min(24px,calc(24*100vw/1920))] tablet:text-[min(22px,calc(22*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))]",e.titleLines?"leading-[min(32px,calc(32*100vw/1920))] tablet:leading-[min(30px,calc(30*100vw/1024))] mobile:leading-[normal]":"leading-[normal]"].join(" "),children:e.titleLines?e.titleLines.map(e=>(0,t.jsx)("span",{className:"block",children:e},e)):e.title})}function c({card:e,returnPath:i}){let f=e.href?.trim(),h=f&&(0,o.isNewsArticlePath)(f)?(0,o.withNewsReturnPath)(f,i):f,p=!!(h&&"#"!==h),m=e.ctaLabel?.trim()||"Read More",d=!!e.bodyHtml,g=["group box-border flex h-fit w-full flex-col bg-white no-underline!",p?"cursor-pointer":"cursor-default","rounded-[min(16px,calc(16*100vw/1920))] tablet:rounded-[min(16px,calc(16*100vw/1024))] mobile:rounded-[min(16px,calc(16*100vw/390))] p-[min(30px,calc(30*100vw/1920))] tablet:p-[min(24px,calc(24*100vw/1024))] mobile:p-[min(16px,calc(16*100vw/390))] gap-[min(10px,calc(10*100vw/1920))] tablet:gap-[min(10px,calc(10*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))] border-[0.5px] border-solid border-[#97999b] transition-[box-shadow,border-color] duration-200 ease-out",p?"hover:border-transparent hover:shadow-[0px_0px_15px_rgba(0,0,0,0.14)] focus-visible:border-transparent focus-visible:shadow-[0px_0px_15px_rgba(0,0,0,0.14)] focus-visible:outline-none":""].join(" "),v=e.image.src?(0,t.jsx)("figure",{className:"relative m-0 w-full overflow-hidden isolate h-[min(250px,calc(250*100vw/1920))] tablet:h-[min(220px,calc(220*100vw/1024))] mobile:h-[min(200px,calc(200*100vw/390))] rounded-[min(16px,calc(16*100vw/1920))] tablet:rounded-[min(16px,calc(16*100vw/1024))] mobile:rounded-[min(16px,calc(16*100vw/390))]",children:(0,t.jsx)(r.default,{src:e.image.src,alt:e.image.alt,fill:!0,className:["object-cover object-center transition-transform duration-700 ease-[cubic-bezier(0.33,1,0.68,1)] will-change-transform",p?"group-hover:scale-[1.14] group-focus-visible:scale-[1.14]":""].join(" "),sizes:"(min-width: 1025px) 506px, (min-width: 768px) 45vw, 90vw"})}):null,x=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex w-full flex-col items-start gap-[min(20px,calc(20*100vw/1920))] tablet:gap-[min(16px,calc(16*100vw/1024))] mobile:gap-[min(16px,calc(16*100vw/390))]",children:[e.category?(0,t.jsx)("p",{className:["m-0 font-medium leading-[normal] text-[#036ada] transition-colors duration-200 ease-out",p?"group-hover:text-black":"","text-[min(20px,calc(20*100vw/1920))] tablet:text-[min(18px,calc(18*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))]"].join(" "),children:e.category}):null,d?(0,t.jsx)(u,{card:e,hasLink:p}):null,v,d?null:(0,t.jsx)(u,{card:e,hasLink:p}),e.bodyHtml?(0,t.jsx)(a.CmsCopyField,{value:e.bodyHtml,variant:"body",as:"div",paragraphClassName:"m-0 w-full font-normal text-black text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))] leading-[min(24px,calc(24*100vw/1920))] tablet:leading-[min(24px,calc(24*100vw/1024))] mobile:leading-[min(24px,calc(24*100vw/390))]"}):e.body.length>0?(0,t.jsx)("p",{className:"m-0 w-full whitespace-pre-line font-normal text-black text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))] leading-[min(24px,calc(24*100vw/1920))] tablet:leading-[min(24px,calc(24*100vw/1024))] mobile:leading-[min(24px,calc(24*100vw/390))]",children:l(e.body)}):null]}),p?(0,t.jsxs)("span",{className:"inline-flex items-center text-[#6cade4]! transition-colors duration-200 ease-out group-hover:text-[#036ada]! group-focus-visible:text-[#036ada]! gap-[min(6px,calc(6*100vw/1920))] tablet:gap-[min(6px,calc(6*100vw/1024))] mobile:gap-[min(6px,calc(6*100vw/390))] p-[min(4px,calc(4*100vw/1920))] tablet:p-[min(4px,calc(4*100vw/1024))] mobile:p-[min(4px,calc(4*100vw/390))]",children:[(0,t.jsx)("span",{className:"font-medium underline decoration-solid underline-offset-2 text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))] leading-[normal]",children:m}),(0,t.jsx)(s.HomeV2LinkArrow,{className:"shrink-0 w-[min(10px,calc(10*100vw/1920))] tablet:w-[min(10px,calc(10*100vw/1024))] mobile:w-[min(10px,calc(10*100vw/390))] h-[min(9px,calc(9*100vw/1920))] tablet:h-[min(9px,calc(9*100vw/1024))] mobile:h-[min(9px,calc(9*100vw/390))]"})]}):null]});return p?(0,t.jsx)(n.default,{href:h,className:g,onClick:()=>{(0,o.isNewsArticlePath)(h)&&(0,o.rememberNewsReturnPath)(i)},children:x}):(0,t.jsx)("article",{className:g,children:x})}function f({cards:e,returnPath:r}){return(0,t.jsx)("div",{className:"flex w-full flex-col gap-[min(40px,calc(40*100vw/1920))] tablet:gap-[min(40px,calc(40*100vw/1024))] mobile:gap-[min(20px,calc(20*100vw/390))]",children:e.map(e=>(0,t.jsx)(c,{card:e,returnPath:r},e.id))})}function h(e,t){let r=Array.from({length:t},()=>[]);return e.forEach((e,n)=>
1{r[n%t].push(e)}),r.filter(e=>e.length>0)}function p({cards:e,header:r,returnPath:n}){let a=(0,i.usePathname)(),s=n||a;if(0===e.length&&!r)return null;let o=h(e,3),l=h(e,2);return(0,t.jsx)("section",{"aria-label":"Articles",className:"box-border w-full overflow-x-clip bg-white",children:(0,t.jsxs)("div",{className:"box-border mx-auto flex w-full max-w-480 flex-col px-[min(160px,calc(160*100vw/1920))] tablet:px-[min(60px,calc(60*100vw/1024))] mobile:px-[min(20px,calc(20*100vw/390))] pt-[min(100px,calc(100*100vw/1920))] tablet:pt-[min(60px,calc(60*100vw/1024))] mobile:pt-[min(42px,calc(42*100vw/390))] pb-[min(136px,calc(136*100vw/1920))] tablet:pb-[min(80px,calc(80*100vw/1024))] mobile:pb-[min(68px,calc(68*100vw/390))] gap-[min(40px,calc(40*100vw/1920))] tablet:gap-[min(24px,calc(24*100vw/1024))] mobile:gap-[min(20px,calc(20*100vw/390))]",children:[r,e.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex w-full flex-col tablet:hidden desktop:hidden gap-[min(20px,calc(20*100vw/390))]",children:e.map(e=>(0,t.jsx)(c,{card:e,returnPath:s},e.id))}),(0,t.jsx)("div",{className:"hidden w-full tablet:grid tablet:grid-cols-2 tablet:items-start desktop:hidden tablet:gap-[min(40px,calc(40*100vw/1024))]",children:l.map((e,r)=>(0,t.jsx)(f,{cards:e,returnPath:s},`article-tab-col-${r}`))}),(0,t.jsx)("div",{className:"hidden w-full desktop:grid desktop:grid-cols-3 desktop:items-start desktop:gap-[min(40px,calc(40*100vw/1920))]",children:o.map((e,r)=>(0,t.jsx)(f,{cards:e,returnPath:s},`article-col-${r}`))})]}):null]})})}e.s(["KnowledgeCards",0,p])},68399,e=>{e.v({accent:"card-grid-impact-module__b9iqEW__accent",callout:"card-grid-impact-module__b9iqEW__callout",calloutIcon:"card-grid-impact-module__b9iqEW__calloutIcon",calloutText:"card-grid-impact-module__b9iqEW__calloutText",card:"card-grid-impact-module__b9iqEW__card",cardDescription:"card-grid-impact-module__b9iqEW__cardDescription",cardStatic:"card-grid-impact-module__b9iqEW__cardStatic",cardTitle:"card-grid-impact-module__b9iqEW__cardTitle",content:"card-grid-impact-module__b9iqEW__content",copy:"card-grid-impact-module__b9iqEW__copy",footer:"card-grid-impact-module__b9iqEW__footer",grid:"card-grid-impact-module__b9iqEW__grid",header:"card-grid-impact-module__b9iqEW__header",heading:"card-grid-impact-module__b9iqEW__heading",image:"card-grid-impact-module__b9iqEW__image",imageWrap:"card-grid-impact-module__b9iqEW__imageWrap",inner:"card-grid-impact-module__b9iqEW__inner",lead:"card-grid-impact-module__b9iqEW__lead",link:"card-grid-impact-module__b9iqEW__link",section:"card-grid-impact-module__b9iqEW__section"})},884671,e=>{"use strict";var t=e.i(843476),r=t,n=e.i(894109),i=e.i(862560),a=t,s=e.i(657688),o=e.i(522016),l=e.i(318103),u=e.i(93107);function c({category:e}){let t=e.href?.trim(),r=!!(t&&"#"!==t),n=e.ctaLabel?.trim()||"Explore More",i=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:u.default.imageWrap,children:e.image?(0,a.jsx)(s.default,{className:u.default.image,src:e.image,alt:"",fill:!0,sizes:"(max-width: 767px) 100vw, (max-width: 1024px) 420px, 506px"}):null}),(0,a.jsxs)("div",{className:u.default.content,children:[(0,a.jsxs)("div",{className:u.default.textBlock,children:[(0,a.jsx)("h3",{className:u.default.title,children:e.title}),e.description?(0,a.jsx)("p",{className:u.default.description,children:e.description}):null]}),r?(0,a.jsx)(l.ProductsTextLink,{label:n,className:u.default.exploreMore}):null]})]});return r?(0,a.jsx)(o.default,{href:t,className:u.default.card,"aria-label":`${n} about ${e.title}`,children:i}):(0,a.jsx)("article",{className:`${u.default.card} ${u.default.cardStatic}`,children:i})}var f=e.i(714165);function h({content:e}){let t=e.subtitle?.trim()??"";return(0,r.jsx)("section",{className:f.default.section,"aria-labelledby":"products-categories-title",children:(0,r.jsxs)("div",{className:f.default.inner,children:[(0,r.jsxs)("header",{className:f.default.header,children:[(0,r.jsx)(n.CmsCopyField,{value:e.title,variant:"title",titleTag:"h2",titleId:"products-categories-title",titleClassName:f.default.heading,accentClassName:f.default.accent}),t?(0,r.jsx)(i.CmsHtmlField,{html:t,className:f.default.lead,as:"div"}):null]}),(0,r.jsx)("div",{className:f.default.grid,children:e.categories.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(c,{category:e})},e.id))})]})})}var p=e.i(679982),m=e.i(966363),d=t,g=s,v=o,x=n,y=i,b=l,w=e.i(68399);function _({src:e,alt:t}){return e?(0,d.jsx)(g.default,{className:w.default.calloutIcon,src:e,alt:t||"",width:24,height:24}):(0,d.jsxs)("svg",{className:w.default.calloutIcon,width:"24",height:"24",viewBox:"0 0 20.0004 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,
1children:[(0,d.jsx)("path",{d:"M16.7092 2.495C14.8172 1.554 12.5002 1 10.0002 1C7.50018 1 5.18418 1.554 3.29118 2.495C2.36318 2.957 1.89918 3.188 1.45018 3.914C1.00118 4.64 1.00018 5.342 1.00018 6.748V10.238C1.00018 15.921 5.54218 19.08 8.17318 20.434C8.90718 20.811 9.27318 21 10.0002 21C10.7272 21 11.0932 20.811 11.8272 20.434C14.4572 19.08 19.0002 15.92 19.0002 10.237V6.748C19.0002 5.342 19.0002 4.64 18.5502 3.914C18.1002 3.188 17.6372 2.957 16.7092 2.495Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,d.jsx)("path",{d:"M7.00018 10.5C7.00018 10.5 8.40818 10.752 9.00018 12.5C9.00018 12.5 10.5002 9.5 13.0002 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function D({card:e}){let t=e.href?.trim(),r=!!(t&&"#"!==t),n=e.ctaLabel?.trim()||`Explore ${e.title} Solutions`,i=(0,d.jsxs)(d.Fragment,{children:[e.image?(0,d.jsx)("div",{className:w.default.imageWrap,children:(0,d.jsx)(g.default,{className:w.default.image,src:e.image,alt:e.imageAlt||e.title,fill:!0,sizes:"(max-width: 767px) 100vw, (max-width: 1024px) 50vw, 506px"})}):null,(0,d.jsxs)("div",{className:w.default.content,children:[(0,d.jsxs)("div",{className:w.default.copy,children:[(0,d.jsx)("h3",{className:w.default.cardTitle,children:e.title}),e.description?(0,d.jsx)(x.CmsCopyField,{value:e.description,variant:"body",paragraphClassName:w.default.cardDescription}):null]}),(0,d.jsxs)("div",{className:w.default.footer,children:[e.calloutText?(0,d.jsxs)("div",{className:w.default.callout,children:[(0,d.jsx)(_,{src:e.calloutIcon,alt:e.calloutIconAlt}),(0,d.jsx)("p",{className:w.default.calloutText,children:e.calloutText})]}):null,r?(0,d.jsx)(b.ProductsTextLink,{label:n,className:w.default.link}):null]})]})]});return r?(0,d.jsx)(v.default,{href:t,className:w.default.card,"aria-label":`${n} about ${e.title}`,children:i}):(0,d.jsx)("article",{className:`${w.default.card} ${w.default.cardStatic}`,children:i})}function C({content:e}){return(0,d.jsx)("section",{className:w.default.section,"aria-labelledby":"card-grid-impact-title",children:(0,d.jsxs)("div",{className:w.default.inner,children:[(0,d.jsxs)("header",{className:w.default.header,children:[(0,d.jsx)(x.CmsCopyField,{value:e.title,variant:"title",titleTag:"h2",titleId:"card-grid-impact-title",titleClassName:w.default.heading,accentClassName:w.default.accent}),e.subtitle?(0,d.jsx)(y.CmsHtmlField,{html:e.subtitle,className:w.default.lead,as:"div"}):null]}),(0,d.jsx)("div",{className:w.default.grid,children:e.categories.map(e=>(0,d.jsx)(D,{card:e},e.id))})]})})}var A=e.i(547672),E=e.i(442477),N=e.i(406822),S=e.i(263278),M=e.i(710060);let T={value:{schema:"dast",document:{type:"root",children:[]}}};function k(e,t,r="#"){let n=(0,N.hrefFromCmsLink)(e,"");if(n)return n;let i="string"==typeof t?t.trim():"";return i||r}function F(e){return(0,S.mapCmsStructuredTextTitle)(e)}function B(e){return Array.isArray(e)?e:e&&"object"==typeof e?[e]:[]}function P(e){let t=F(e.title)??T,r=(0,M.cmsHtmlString)(e.subtitle),n=B(e.cards).map(e=>{let t=e.title?.trim();if(!t)return null;let r=e.calloutText?.trim()??"",n=e.category?.trim()??"",i=(0,E.assetSrc)(e.calloutIcon),a=e.ctaLabel?.trim()??"",s=k(e.link,e.linkExternal,"");return{id:e.id??t,title:t,description:e.description?.trim()??"",image:(0,E.assetSrc)(e.image)??"",imageAlt:e.imageAlt?.trim()??"",...s?{href:s}:{},...a?{ctaLabel:a}:{},...n?{category:n}:{},...r?{calloutText:r}:{},...i?{calloutIcon:i,calloutIconAlt:e.calloutIcon?.alt?.trim()||e.calloutIcon?.responsiveImage?.alt?.trim()||""}:{}}}).filter(e=>null!=e);return{title:t,...r?{subtitle:r}:{},categories:n}}function j(e){return e.categories.some(e=>!!e.calloutText?.trim())}function O(e){return!j(e)&&e.categories.some(e=>!!e.category?.trim())}function I(e){return e.categories.map(e=>{let t=e.description?.trim()??"",r=t?[{type:"text",text:t}]:[],n=e.href?.trim()&&"#"!==e.href?e.href.trim():"";return{id:e.id,category:e.category?.trim()??"",title:e.title,body:r,href:n||"",...e.ctaLabel?.trim()?{ctaLabel:e.ctaLabel.trim()}:n?{ctaLabel:"Read More"}:{},image:{src:e.image,alt:e.imageAlt||e.title}}})}
1function z({widget:e}){let r=(0,p.useCmsLinkSection)(),n=(0,A.withCmsLinkSection)(r,()=>P(e));return j(n)?(0,t.jsx)(C,{content:n}):O(n)?(0,t.jsx)(m.KnowledgeCards,{cards:I(n)}):(0,t.jsx)(h,{content:n})}e.s(["WidgetCardGrid",0,z],884671)},915690,e=>{e.v({accent:"products-innovation-module__YCZvqG__accent",iconTile:"products-innovation-module__YCZvqG__iconTile",inner:"products-innovation-module__YCZvqG__inner",list:"products-innovation-module__YCZvqG__list",row:"products-innovation-module__YCZvqG__row",rowAction:"products-innovation-module__YCZvqG__rowAction",rowActionIcon:"products-innovation-module__YCZvqG__rowActionIcon",rowActive:"products-innovation-module__YCZvqG__rowActive",rowBody:"products-innovation-module__YCZvqG__rowBody",rowDescription:"products-innovation-module__YCZvqG__rowDescription",rowIcon:"products-innovation-module__YCZvqG__rowIcon",rowItem:"products-innovation-module__YCZvqG__rowItem",rowTitle:"products-innovation-module__YCZvqG__rowTitle",section:"products-innovation-module__YCZvqG__section",title:"products-innovation-module__YCZvqG__title"})},995153,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(522016),i=e.i(271645),a=e.i(894109),s=e.i(862560),o=e.i(915690);let l="(max-width: 1024px)";function u({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M8.4136 0.915402C7.34943 3.35348 6.96711 5.93875 7.26455 8.46124C6.43959 7.61271 5.91698 6.38249 5.49538 5.04837L1.99352 8.65028L0.996693 7.62498L4.49855 4.02306C3.30461 3.69549 2.20958 3.05404 1.11104 2.06265C3.73252 2.2654 6.21371 2.04677 8.4136 0.915402Z",fill:"currentColor"})})}function c({row:e,isActive:a,usesClickInteraction:l,onActivate:f}){let h=(0,i.useCallback)(()=>{l&&f(e.id)},[f,e.id,l]),p=l&&a?`${o.default.row} ${o.default.rowActive}`:o.default.row,m=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:o.default.iconTile,children:(0,t.jsx)(r.default,{className:o.default.rowIcon,src:e.icon,alt:"",width:90,height:90,sizes:"(max-width: 767px) 80px, (max-width: 1024px) 72px, (max-width: 1440px) 72px, 90px",unoptimized:!0})}),(0,t.jsxs)("span",{className:o.default.rowBody,children:[(0,t.jsx)("span",{className:o.default.rowTitle,children:e.title}),e.description?(0,t.jsx)(s.CmsHtmlField,{html:e.description,className:o.default.rowDescription,as:"div"}):null]}),e.href?(0,t.jsx)("span",{className:o.default.rowAction,"aria-hidden":!0,children:(0,t.jsx)(u,{className:o.default.rowActionIcon})}):null]});return(0,t.jsx)("li",{className:o.default.rowItem,children:e.href?(0,t.jsx)(n.default,{href:e.href,className:p,"aria-pressed":l?a:void 0,onClick:h,children:m}):(0,t.jsx)("div",{className:o.default.row,children:m})})}function f({content:e}){let[r,n]=(0,i.useState)(null),[s,u]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=window.matchMedia(l),t=()=>{let t=e.matches;u(t),t||n(null)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let h=(0,i.useCallback)(e=>{n(t=>t===e?null:e)},[]);return(0,t.jsx)("section",{className:o.default.section,"aria-labelledby":"products-innovation-title",children:(0,t.jsxs)("div",{className:o.default.inner,children:[(0,t.jsx)(a.CmsCopyField,{value:e.title,variant:"title",titleTag:"h2",titleId:"products-innovation-title",titleClassName:o.default.title,accentClassName:o.default.accent}),(0,t.jsx)("ul",{className:o.default.list,children:e.rows.map(e=>(0,t.jsx)(c,{row:e,isActive:r===e.id,usesClickInteraction:s,onActivate:h},e.id))})]})})}e.s(["ProductsInnovation",0,f])},610648,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(995153),i=e.i(547672),a=e.i(442477),s=e.i(867434),o=e.i(263278),l=e.i(710060);let u={value:{schema:"dast",document:{type:"root",children:[]}}};function c(e){return{title:(0,o.mapCmsStructuredTextTitle)(e.title)??u,rows:e.featureRows?.map(e=>{let t=e.title?.trim();if(!t)return null;let r=(0,s.resolveDatoDualLink)(e.link,e.linkExternal,"");return{id:e.id??t,title:t,description:(0,l.cmsHtmlString)(e.description),icon:(0,a.assetSrc)(e.icon)??"",...r?{href:r}:{}}}).filter(e=>null!=e)??[]}}
1function f({widget:e}){let a=(0,r.useCmsLinkSection)(),s=(0,i.withCmsLinkSection)(a,()=>c(e));return(0,t.jsx)(n.ProductsInnovation,{content:s})}e.s(["WidgetFeatureList",0,f],610648)},115453,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(522016);let i="shrink-0 w-[min(10px,calc(10*100vw/1920))] tablet:w-[min(10px,calc(10*100vw/1024))] mobile:w-[min(10px,calc(10*100vw/390))] h-[min(20px,calc(20*100vw/1920))] tablet:h-[min(20px,calc(20*100vw/1024))] mobile:h-[min(20px,calc(20*100vw/390))]";function a({onDark:e}){return(0,t.jsx)("svg",{viewBox:"0 0 10 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`${i} ${e?"text-white":"text-black"}`,"aria-hidden":!0,children:(0,t.jsx)("path",{d:"M2.04332 5.48516L2.92749 4.60182L7.74332 9.41599C7.82095 9.49313 7.88256 9.58486 7.9246 9.6859C7.96664 9.78694 7.98828 9.8953 7.98828 10.0047C7.98828 10.1142 7.96664 10.2225 7.9246 10.3236C7.88256 10.4246 7.82095 10.5163 7.74332 10.5935L2.92749 15.4102L2.04416 14.5268L6.56416 10.006L2.04332 5.48516Z",fill:"currentColor"})})}function s(e){if(e.crumbs&&e.crumbs.length>0)return e.crumbs.filter(e=>e.label?.trim());let t=[];return e.parentLabel&&t.push({label:e.parentLabel,href:e.parentHref||"#"}),e.currentLabel&&t.push({label:e.currentLabel,href:"#"}),t}function o({breadcrumb:e,arrowSrc:l,className:u="",variant:c="default"}){let f=s(e);if(f.length<2)return null;let h="onDark"===c,p=h?"shrink-0 text-white":"shrink-0 text-black";return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:["flex flex-wrap items-center leading-normal gap-[min(12px,calc(12*100vw/1920))] tablet:gap-[min(12px,calc(12*100vw/1024))] mobile:gap-[min(12px,calc(12*100vw/390))] mb-[min(27px,calc(27*100vw/1920))] tablet:mb-[min(50px,calc(50*100vw/1024))] mobile:mb-[min(20px,calc(20*100vw/390))] text-[min(14px,calc(14*100vw/1920))] tablet:text-[min(14px,calc(14*100vw/1024))] mobile:text-[min(14px,calc(14*100vw/390))]",u].join(" "),children:f.map((e,s)=>{let o=s===f.length-1;return(0,t.jsxs)("span",{className:"flex items-center gap-[inherit]",children:[s>0?l?(0,t.jsx)(r.default,{src:l,alt:"",width:10,height:20,className:i,"aria-hidden":!0}):(0,t.jsx)(a,{onDark:h}):null,o?(0,t.jsx)("span",{className:p,children:e.label}):(0,t.jsx)(n.default,{href:e.href||"#",className:"cms-page-breadcrumb__link shrink-0 !text-[#036ada] underline decoration-solid underline-offset-2",children:e.label})]},`${e.label}-${s}`)})})}e.s(["CmsPageBreadcrumbNav",0,o])},463869,e=>{"use strict";let t="resources",r=new Set(["blog","news","engineering","engineer-resource-center","partners","partner","partner-portals","partner-portal","support-center","technical-support-center","brochures","technical-documents","documentation"]);function n(e){return e.trim().replace(/^\/+|\/+$/g,"").split("/").filter(Boolean).pop()??""}function i(e){let i="string"==typeof e?e.trim().replace(/^\/+|\/+$/g,""):"";if(!i)return!1;if(i.startsWith(`${t}-`))return!0;let a=i.split("/").filter(Boolean);return a.length>=2&&a[0]===t||r.has(n(i))}var a=e.i(867434),s=e.i(741614);let o={products:"Products",solutions:"Solutions","how-to-buy":"How to Buy",industries:"Industries",proof:"Proof",resources:"Resources"},l=new Set(s.SECTION_HUB_ROOTS),u=new Set(["knowledge","knowledge-lab"]);function c(e){let t=f(e).replace(/^\/+|\/+$/g,"");if(!t)return!1;let r=t.split("/").filter(Boolean).pop()??"";return u.has(r)}function f(e){return"string"==typeof e?e.trim():""}function h(e){let t=e.trim().replace(/^\/+|\/+$/g,"");return t?(0,s.toPublicCmsPath)(t)??`/${t}`:"#"}function p(e,t){return(0,a.resolveDatoDualLink)(e,"string"==typeof t?t:null,"")||"#"}function m(e){let t=f(e).replace(/^\/+|\/+$/g,"");return t&&l.has(t)?{parentLabel:o[t]??y(t),parentHref:`/${t}`}:null}function d(e){let t=f(e?.title),r=f(e?.slug);return t&&r?{parentLabel:t,parentHref:h(r)}:null}function g(e){let t=f(e).replace(/^\/+|\/+$/g,"");if(!t)return null;let r=t.split("/").filter(Boolean);if(r.length>=2&&l.has(r[0]??"")){let e=r[0];return{parentLabel:o[e]??e,parentHref:`/${e}`}}for(let e of s.SECTION_HUB_ROOTS)if(t.startsWith(`${e}-`))return{parentLabel:o[e]??e,parentHref:`/${e}`};return i(t)?{parentLabel:o.resources??"Resources",parentHref:"/resources"}:null}function v(e){if(!e)return null;let t=f(e.breadcrumbParentLabel);return t?{parentLabel:t,parentHref:p(e.breadcrumbParentUrl,e.breadcrumbParentUrlExternal)}:null}function x(e){return f(e?.breadcrumbCurrentLabel)}
1function y(e){return e.split(/[\s-_]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function b(e){let t=f(e).replace(/^\/+|\/+$/g,"");if(!t)return"";for(let e of s.SECTION_HUB_ROOTS)if(t.startsWith(`${e}-`))return y(t.slice(e.length+1));return y(t.split("/").filter(Boolean).pop()??t)}function w(){return{parentLabel:"",parentHref:"#",currentLabel:""}}function _(e){if(!1===e.headerMenuLinked)return null;if(e.trail&&e.trail.length>=2){let t=e.trail[e.trail.length-1],r=e.trail[e.trail.length-2];if(t?.label&&r?.label)return{parentLabel:r.label,parentHref:r.href,currentLabel:t.label,crumbs:e.trail}}if(c(e.pageSlug))return null;let t=f(e.pageTitle)||x(e.legacy)||b(e.pageSlug);if(!t)return null;let r=d(e.parentPage)??m(e.sectionHub)??g(e.pageSlug)??v(e.legacy);return r?.parentLabel?{parentLabel:r.parentLabel,parentHref:r.parentHref,currentLabel:t}:null}function D(e){return{breadcrumbParentLabel:e.breadcrumbParentLabel,breadcrumbParentUrl:e.breadcrumbParentUrl,breadcrumbParentUrlExternal:e.breadcrumbParentUrlExternal,breadcrumbCurrentLabel:e.breadcrumbCurrentLabel}}e.s(["emptyCmsBreadcrumb",0,w,"extractLegacyBreadcrumbFields",0,D,"resolveCmsPageBreadcrumb",0,_],463869)},293476,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(894109),i=e.i(862560),a=e.i(115453),s=e.i(679982),o=e.i(39792),l=e.i(611578),u=e.i(752103),c=e.i(463869),f=e.i(843584),h=e.i(617322),p=e.i(442477),m=e.i(406822),d=e.i(263278),g=e.i(164524),v=e.i(710060);function x(e){return"string"==typeof e?(0,v.cmsHtmlToPlainText)(e):e&&"object"==typeof e?(0,g.structuredTextToPlainText)(e):""}function y(e){let t=(0,v.cmsString)(e).toLowerCase().replace(/[_-]+/g," ");return t.includes("center")||"centre"===t?"center":t.includes("right")?"right":"left"}function b(e){if("string"==typeof e)return e.trim().toLowerCase();if(e&&"object"==typeof e){let t=e;for(let e of["apiKey","api_key","value","id","label","name"]){let r=t[e];if("string"==typeof r&&r.trim())return r.trim().toLowerCase()}}return""}
1function w(e,t){let r=b(e);return"light"===r||"white"===r||"dark"!==r&&t}function _(e,t){return e?.responsiveImage?.alt?.trim()||e?.alt?.trim()||t}function D(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&#39;|&apos;/gi,"'").replace(/&nbsp;/gi," ")}function C(e){let t=(0,d.mapCmsStructuredTextTitle)(e);if(t){let e=D((0,g.structuredTextToPlainText)(t));return e&&/<[^>]+>/.test(e)?(0,v.cmsHtmlToPlainText)(e)||e:t}if("string"==typeof e){let t=D(e.trim());return t?/<[^>]+>/.test(t)&&(0,v.cmsHtmlToPlainText)(t)||t:null}return null}function A(e){let t=Array.isArray(e)?e[0]:e;if(!t||"object"!=typeof t)return null;let r=t,n=(0,v.cmsString)(r.label)||(0,v.cmsString)(r.title);return(0,v.cmsHasLabel)(n)?{label:n,href:(0,m.resolveNavHref)(r,"#")||"#"}:null}function E(e){let t=C(e.title),r=(0,v.cmsHtmlString)(e.leadText),n=(0,v.cmsHtmlString)(e.body),i=e.backgroundImage,a=(0,p.assetSrc)(i)||null,s=e.backgroundVideo,o=(0,v.cmsString)(s?.url)||null,l=!!(a||o),u=A(e.button),c="string"==typeof t?t:t?(0,g.structuredTextToPlainText)(t):"";return t||r||x(n)||l||u?{title:t,leadText:r,body:n,alignment:y(e.alignment),theme:b(e.theme),lightText:w(e.theme,l),backgroundImageSrc:a,backgroundImageAlt:_(i,c||"Hero"),backgroundVideoUrl:o,cta:u}:null}function N(...e){return e.filter(Boolean).join(" ")}let S=N("m-0 font-medium leading-normal","text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]"),M=N(S,"text-white"),T=N(S,"text-[#0f172a]"),k=N("[&_h1]:m-0 [&_h2]:m-0 [&_h3]:m-0 [&_h4]:m-0 [&_h5]:m-0 [&_h6]:m-0","[&_h1]:font-medium [&_h2]:font-medium [&_h3]:font-medium [&_h4]:font-medium [&_h5]:font-medium [&_h6]:font-medium","[&_h1]:leading-normal [&_h2]:leading-normal [&_h3]:leading-normal","[&_h1]:text-[min(40px,calc(40*100vw/1920))] [&_h2]:text-[min(32px,calc(32*100vw/1920))] [&_h3]:text-[min(24px,calc(24*100vw/1920))]","[&_h4]:text-[min(20px,calc(20*100vw/1920))] [&_h5]:text-[min(20px,calc(20*100vw/1920))] [&_h6]:text-[min(20px,calc(20*100vw/1920))]","tablet:[&_h1]:text-[min(32px,calc(32*100vw/1024))] tablet:[&_h2]:text-[min(26px,calc(26*100vw/1024))] tablet:[&_h3]:text-[min(20px,calc(20*100vw/1024))]","mobile:[&_h1]:text-[min(28px,calc(28*100vw/390))] mobile:[&_h2]:text-[min(22px,calc(22*100vw/390))] mobile:[&_h3]:text-[min(18px,calc(18*100vw/390))]","[&:not(.dato-html--cms-prose)_h1+p]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_h2+p]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_h3+p]:mt-[min(16px,calc(16*100vw/1920))]","[&:not(.dato-html--cms-prose)_p+h1]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h2]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h3]:mt-[min(16px,calc(16*100vw/1920))]"),F=N(f.HERO_CTA_COPY_BODY_MT,"font-normal","text-[min(20px,calc(20*100vw/1920))] leading-[min(36px,calc(36*100vw/1920))]","tablet:text-[min(18px,calc(18*100vw/1024))] tablet:leading-[min(32px,calc(32*100vw/1024))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-[min(28px,calc(28*100vw/390))]","[&_p]:m-0 [&:not(.dato-html--cms-prose)_p+p]:mt-[min(16px,calc(16*100vw/1920))]",k,"[&_a]:font-medium [&_a]:underline [&_a]:underline-offset-[0.12em]","[&_strong]:font-bold [&_b]:font-bold"),B=N(F,"text-white","[&_p]:!text-white [&_span]:!text-white [&_li]:!text-white [&_div]:!text-white","[&_h1]:!text-white [&_h2]:!text-white","[&_h3]:!text-white [&_h4]:!text-white [&_h5]:!text-white [&_h6]:!text-white","[&_a]:!text-[#edfbfe]","[&_strong]:!text-white [&_b]:!text-white"),P=N(F,"text-[#0f172a]","[&_p]:!text-[#0f172a] [&_span]:!text-[#0f172a] [&_li]:!text-[#0f172a] [&_div]:!text-[#0f172a]","[&_h1]:!text-[#036ada] [&_h2]:!text-[#036ada]","[&_h3]:!text-[#0f172a] [&_h4]:!text-[#0f172a] [&_h5]:!text-[#0f172a] [&_h6]:!text-[#0f172a]","[&_a]:!text-[#036ada]","[&_strong]:!text-[#0f172a] [&_b]:!text-[#0f172a]"),j=N("m-0",f.HERO_CTA_COPY_LEAD_MT,"font-medium","text-[min(28px,calc(28*100vw/1920))] leading-[min(40px,calc(40*100vw/1920))]","tablet:text-[min(22px,calc(22*100vw/1024))] tablet:leading-[min(32px,calc(32*100vw/1024))]","mobile:text-[min(18px,calc(18*100vw/390))] mobile:leading-[min(28px,calc(28*100vw/390))]"),O=N(j,"text-white","[&_p]:!text-white [&_span]:!text-white [&_strong]:!text-white [&_b]:!text-white"),I=N(j,"text-[#0f172a]","[&_p]:!text-[#0f172a] [&_span]:!text-[#0f172a] [&_strong]:!text-[#0f172a] [&_b]:!text-[#0f172a]");function z(e){switch(e){case"center":return"text-center items-center mx-auto";case"right":return"text-right items-end ml-auto";default:return"text-left items-start mr-auto"}}function L(e){switch(e){case"center":return"justify-center";case"right":return"justify-end";default:return"justify-start"}}function R({widget:e}){let p=(0,o.useCmsPageIdentity)(),m=(0,s.useCmsLinkSection)(),d=E(e);if(!d)return null;let g=(0,c.resolveCmsPageBreadcrumb)({pageTitle:p.title,pageSlug:p.slug,parentPage:p.parentPage,sectionHub:m,trail:p.breadcrumbTrail,legacy:(0,c.extractLegacyBreadcrumbFields)(e),headerMenuLinked:p.headerMenuLinked})??(0,c.emptyCmsBreadcrumb)(),v=!!(g.crumbs&&g.crumbs.length>=2||g.parentLabel&&g.currentLabel),x=e.id?`widget-hero-cta-${e.id}`:"widget-hero-cta-title",{lightText:y,alignment:b,theme:w}=d,_=!!(d.backgroundImageSrc||d.backgroundVideoUrl),D=!!d.title,C=!!d.leadText,A=!!d.body.trim(),S=!!d.cta?.label;return(0,t.jsxs)("section",{"data-widget":"hero-cta","data-theme":w||(y?"light":"dark"),"aria-labelledby":D?x:void 0,className:N("relative box-border w-full overflow-x-clip font-sans",_||y?"bg-[#0f172a]":"bg-white",_&&"min-h-[min(480px,calc(480*100vw/1920))] tablet:min-h-[min(400px,calc(400*100vw/1024))] mobile:min-h-[min(320px,calc(320*100vw/390))]"),children:[d.backgroundImageSrc?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 z-0","aria-hidden":!0,
1children:(0,t.jsx)(r.default,{src:d.backgroundImageSrc,alt:d.backgroundImageAlt,fill:!0,className:"object-cover object-top desktop:object-center",sizes:"100vw",priority:!0,unoptimized:!0})}):null,d.backgroundVideoUrl&&!d.backgroundImageSrc?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 z-0","aria-hidden":!0,children:(0,t.jsx)("video",{className:"h-full w-full object-cover object-top desktop:object-center",src:d.backgroundVideoUrl,autoPlay:!0,loop:!0,muted:!0,playsInline:!0})}):null,(0,t.jsx)("div",{className:N("relative z-1 box-border mx-auto flex w-full max-w-480","px-[min(160px,calc(160*100vw/1920))] py-[min(96px,calc(96*100vw/1920))]","tablet:px-[min(60px,calc(60*100vw/1024))] tablet:py-[min(72px,calc(72*100vw/1024))]","mobile:px-[min(20px,calc(20*100vw/390))] mobile:py-[min(48px,calc(48*100vw/390))]","center"===b?"justify-center":"right"===b?"justify-end":"justify-start"),children:(0,t.jsxs)("div",{className:N("box-border flex w-full max-w-[min(720px,calc(720*100vw/1920))] flex-col","tablet:max-w-[min(800px,calc(800*100vw/1024))]","mobile:max-w-full",z(b)),children:[v?(0,t.jsx)(a.CmsPageBreadcrumbNav,{breadcrumb:g,variant:y?"onDark":"default"}):null,D?(0,t.jsx)(n.CmsCopyField,{value:d.title,variant:"title",titleTag:"h1",titleId:x,titleClassName:y?M:T,accentClassName:y?"text-white":"text-[#036ada]"}):null,C?(0,t.jsx)(i.CmsHtmlField,{html:d.leadText,className:y?O:I,as:"div"}):null,A?(0,t.jsx)(i.CmsHtmlField,{html:d.body,className:y?B:P,as:"div"}):null,S&&d.cta?(0,t.jsx)(u.HeroCtaRow,{className:N(f.HERO_CTA_COPY_ACTIONS_MT,L(b)),children:(0,t.jsx)(l.HomeV2HeroCta,{href:d.cta.href,label:d.cta.label,variant:y?"whiteGhost":"primary",openInNewTab:!(0,h.parseActiveCampaignFormId)(d.cta.href)&&/^https?:\/\//i.test(d.cta.href)})}):null]})})]})}e.s(["WidgetHeroCta",0,R],293476)},204380,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(39792),i=t,a=e.i(657688),s=e.i(522016),o=e.i(894109),l=e.i(862560),u=e.i(62206),c=e.i(103361);function f({content:e}){let{breadcrumb:t,title:r,body:n,image:h,icon:p}=e,m=!!(t.parentLabel||t.currentLabel);return(0,i.jsx)(c.SolutionsSection,{spacing:"compact",className:"hp-hero-section","aria-labelledby":"hp-hero-title",children:(0,i.jsxs)(u.SolutionsContainer,{children:[m?(0,i.jsxs)("nav",{className:"hp-breadcrumb","aria-label":"Breadcrumb",children:[t.parentLabel?(0,i.jsx)(s.default,{href:t.parentHref,className:"hp-breadcrumb__link !text-[#036ada]",children:t.parentLabel}):null,t.parentLabel&&t.currentLabel?(0,i.jsx)(a.default,{src:"/solutions/health-productivity/hero/breadcrumb-arrow.svg",alt:"",width:10,height:20,className:"hp-breadcrumb__arrow","aria-hidden":!0}):null,t.currentLabel?(0,i.jsx)("span",{className:"hp-breadcrumb__current",children:t.currentLabel}):null]}):null,(0,i.jsxs)("div",{className:"hp-hero-grid",children:[h?.src?(0,i.jsx)("figure",{className:"hp-hero-visual relative w-full overflow-hidden rounded-2xl",children:(0,i.jsx)(a.default,{src:h.src,alt:h.alt,fill:!0,priority:!0,className:"hp-hero-visual__image object-cover",sizes:"(max-width: 767px) 350px, (max-width: 1024px) 914px, (max-width: 1920px) 41vw, 780px"})}):null,(0,i.jsxs)("div",{className:"hp-hero-copy min-w-0",children:[p?.src?(0,i.jsx)(a.default,{src:p.src,alt:p.alt,width:p.width??96,height:p.height??100,className:"hp-hero-copy__icon","aria-hidden":!0}):null,r?(0,i.jsx)(o.CmsCopyField,{value:r,variant:"title",titleId:"hp-hero-title",titleTag:"h1",titleClassName:"hp-h1",accentClassName:"hp-text-accent"}):(0,i.jsx)("h1",{id:"hp-hero-title",className:"hp-h1"}),n?(0,i.jsx)(l.CmsHtmlField,{html:n,className:"hp-hero-body",as:"div"}):null]})]})]})})}var h=e.i(463869);e.i(867434);var p=e.i(710060);function m(e){return e?.responsiveImage?.src??e?.url??void 0}function d(e,t=""){return e?.alt?.trim()||t}function g(e){let t=(0,p.resolveCmsTitleDocument)({structuredTitle:e.title}),r=(0,p.cmsHtmlString)(e.body),n=m(e.icon),i=m(e.heroImage),a=e.icon;return{...n?{icon:{src:n,alt:d(e.icon),width:a?.responsiveImage?.width??a?.width??96,height:a?.responsiveImage?.height??a?.height??100}}:{},title:t,body:r,...i?{image:{src:i,alt:d(e.heroImage)}}:{}}}function v({widget:e}){let i=(0,n.useCmsPageIdentity)(),a=(0,r.useCmsLinkSection)(),s=g(e),o=(0,h.resolveCmsPageBreadcrumb)({pageTitle:i.title,pageSlug:i.slug,parentPage:i.parentPage,sectionHub:a,trail:i.breadcrumbTrail,legacy:(0,h.extractLegacyBreadcrumbFields)(e),headerMenuLinked:i.headerMenuLinked})??(0,h.emptyCmsBreadcrumb)();return(0,t.jsx)(f,{content:{...s,breadcrumb:o}})}e.s(["WidgetHealthProductivityHero",0,v],204380)},866747,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(271645),i=e.i(611578),a=e.i(894109),s=e.i(862560),o=e.i(752103);function l({content:e}){let{title:u,body:c,image:f,submitLabel:h,fields:p}
1=e,[m,d]=(0,n.useState)(()=>Object.fromEntries(p.map(e=>[e.name,""])));function g(e){e.preventDefault()}return(0,t.jsx)("section",{id:"get-started","aria-labelledby":"htb-rc-get-started-title",className:"box-border w-full overflow-x-clip bg-[linear-gradient(180deg,rgba(108,173,228,0.3)_0%,rgba(255,255,255,0.3)_100%)]",children:(0,t.jsxs)("div",{className:"box-border mx-auto flex w-full max-w-480 flex-col items-stretch desktop:flex-row desktop:items-start px-[min(160px,calc(160*100vw/1920))] tablet:px-[min(60px,calc(60*100vw/1024))] mobile:px-[min(20px,calc(20*100vw/390))] gap-[min(123px,calc(123*100vw/1920))] tablet:gap-[min(40px,calc(40*100vw/1024))] mobile:gap-[min(20px,calc(20*100vw/390))] pt-[min(120px,calc(120*100vw/1920))] tablet:pt-[min(90px,calc(90*100vw/1024))] mobile:pt-[min(80px,calc(80*100vw/390))] pb-[min(120px,calc(120*100vw/1920))] tablet:pb-[min(90px,calc(90*100vw/1024))] mobile:pb-[min(100px,calc(100*100vw/390))]",children:[(0,t.jsx)("figure",{className:"relative m-0 w-full max-w-full shrink-0 overflow-hidden h-[min(780px,calc(780*100vw/1920))] tablet:h-[min(400px,calc(400*100vw/1024))] mobile:h-[min(250px,calc(250*100vw/390))] rounded-[min(16px,calc(16*100vw/1920))] tablet:rounded-[min(16px,calc(16*100vw/1024))] mobile:rounded-[min(16px,calc(16*100vw/390))] desktop:w-[min(780px,calc(780*100vw/1920))]",children:(0,t.jsx)(r.default,{src:f.src,alt:f.alt,fill:!0,className:"object-cover",sizes:"(max-width: 767px) 100vw, (max-width: 1024px) 90vw, 780px"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-[min(12px,calc(12*100vw/1920))] tablet:gap-[min(10px,calc(10*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))]",children:[(0,t.jsx)(a.CmsCopyField,{value:u,variant:"title",titleId:"htb-rc-get-started-title",titleTag:"h2",titleClassName:"m-0 font-medium leading-[normal] text-black text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]",accentClassName:"text-[#036ada]"}),(0,t.jsx)(s.CmsHtmlField,{html:c,className:"m-0 font-normal text-black text-[min(24px,calc(24*100vw/1920))] tablet:text-[min(20px,calc(20*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] leading-[min(40px,calc(40*100vw/1920))] tablet:leading-[min(40px,calc(40*100vw/1024))] mobile:leading-[min(32px,calc(32*100vw/390))]",as:"div"}),(0,t.jsx)("form",{className:"flex w-full flex-col mt-[min(12px,calc(12*100vw/1920))] tablet:mt-[min(10px,calc(10*100vw/1024))] mobile:mt-[min(10px,calc(10*100vw/390))] max-w-[min(600px,calc(600*100vw/1920))] tablet:max-w-full mobile:max-w-full gap-[min(10px,calc(10*100vw/1920))] tablet:gap-[min(10px,calc(10*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))]",onSubmit:g,noValidate:!0,children:p.length>0?(0,t.jsxs)(t.Fragment,{children:[p.map(e=>(0,t.jsxs)("label",{className:"flex w-full flex-col gap-[min(4px,calc(4*100vw/1920))] tablet:gap-[min(4px,calc(4*100vw/1024))] mobile:gap-[min(4px,calc(4*100vw/390))]",children:[(0,t.jsxs)("span",{className:"font-normal tracking-[0.15px] text-black text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))] leading-[min(24px,calc(24*100vw/1920))] tablet:leading-[min(24px,calc(24*100vw/1024))] mobile:leading-[min(24px,calc(24*100vw/390))]",children:[e.label.replace(/\*$/,""),e.required?(0,t.jsx)("span",{className:"text-red-600","aria-hidden":!0,children:"*"}):null]}),(0,t.jsxs)("span",{className:"relative block w-full",children:["select"===e.type?(0,t.jsxs)("select",{name:e.name,required:e.required,value:m[e.name]??"",onChange:t=>d(r=>({...r,[e.name]:t.target.value})),className:["box-border w-full appearance-none bg-white outline-none border-solid border-[#97999b] border-[0.5px] h-[min(56px,calc(56*100vw/1920))] tablet:h-[min(56px,calc(56*100vw/1024))] mobile:h-[min(56px,calc(56*100vw/390))] px-[min(12px,calc(12*100vw/1920))] tablet:px-[min(12px,calc(12*100vw/1024))] mobile:px-[min(12px,calc(12*100vw/390))] pr-[min(36px,calc(36*100vw/1920))] tablet:pr-[min(36px,calc(36*100vw/1024))] mobile:pr-[min(36px,calc(36*100vw/390))] rounded-[min(6px,calc(6*100vw/1920))] tablet:rounded-[min(6px,calc(6*100vw/1024))] mobile:rounded-[min(6px,calc(6*100vw/390))] text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))] leading-[min(24px,calc(24*100vw/1920))] tablet:leading-[min(24px,calc(24*100vw/1024))] mobile:leading-[min(24px,calc(24*100vw/390))]",!m[e.name]?"text-[#97999b]":"text-black"].join(" "),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:e.placeholder||"Select an option"}),(e.options??[]).map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}):(0,t.jsx)("input",{name:e.name,type:e.type,required:e.required,placeholder:e.placeholder,value:m[e.name]??"",onChange:t=>d(r=>
1({...r,[e.name]:t.target.value})),className:["box-border w-full bg-white text-black outline-none","border-solid border-[#97999b] border-[0.5px]","h-[min(56px,calc(56*100vw/1920))] tablet:h-[min(56px,calc(56*100vw/1024))] mobile:h-[min(56px,calc(56*100vw/390))]","px-[min(12px,calc(12*100vw/1920))] tablet:px-[min(12px,calc(12*100vw/1024))] mobile:px-[min(12px,calc(12*100vw/390))]","rounded-[min(6px,calc(6*100vw/1920))] tablet:rounded-[min(6px,calc(6*100vw/1024))] mobile:rounded-[min(6px,calc(6*100vw/390))]","text-[min(16px,calc(16*100vw/1920))] tablet:text-[min(16px,calc(16*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))]","leading-[min(24px,calc(24*100vw/1920))] tablet:leading-[min(24px,calc(24*100vw/1024))] mobile:leading-[min(24px,calc(24*100vw/390))]","placeholder:text-[#97999b]",e.hasChevron?"pr-[min(36px,calc(36*100vw/1920))] tablet:pr-[min(36px,calc(36*100vw/1024))] mobile:pr-[min(36px,calc(36*100vw/390))]":""].filter(Boolean).join(" ")}),e.hasChevron||"select"===e.type?(0,t.jsx)(r.default,{src:"/how-to-buy/residential-contractors/get-started/chevron.svg",alt:"",width:24,height:24,className:"pointer-events-none absolute top-1/2 -translate-y-1/2 right-[min(12px,calc(12*100vw/1920))] tablet:right-[min(12px,calc(12*100vw/1024))] mobile:right-[min(12px,calc(12*100vw/390))] size-[min(24px,calc(24*100vw/1920))] tablet:size-[min(24px,calc(24*100vw/1024))] mobile:size-[min(24px,calc(24*100vw/390))]","aria-hidden":!0}):null]})]},e.id)),(0,t.jsx)(o.HeroCtaRow,{className:"mt-[min(12px,calc(12*100vw/1920))] tablet:mt-[min(40px,calc(40*100vw/1024))] mobile:mt-[min(30px,calc(30*100vw/390))]",children:(0,t.jsx)(i.HomeV2HeroCta,{type:"submit",label:h,variant:"primary"})})]}):null})]})]})})}e.s(["ResidentialContractorsGetStarted",0,l])},334906,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=t,i=e.i(522016),a=r,s=e.i(618566),o=e.i(966363),l=e.i(442477),u=e.i(710060);let c=/knowledge\s*lab/i;function f(e,t){let r=e.match(RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`,"i"));return(r?.[2]??r?.[3]??"").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").trim()}function h(e){let t=e.match(/<img\b[^>]*>/i);if(!t)return null;let r=f(t[0],"src");return r?{src:r,alt:f(t[0],"alt")}:null}function p(e){return e.replace(/<figure\b[^>]*>[\s\S]*?<\/figure>/gi,"").replace(/<img\b[^>]*>/gi,"").replace(/<p>(?:\s|&nbsp;|<br\s*\/?>)*<\/p>/gi,"").trim()}function m(e){return Array.isArray(e)?e:e&&"object"==typeof e?[e]:[]}function d(e){return Array.isArray(e)?e:e&&"object"==typeof e?[e]:[]}function g(e){let t=(0,u.cmsHtmlToPlainText)(e);return t?[{type:"text",text:t}]:[]}function v(e){return c.test(e.trim())}function x(e){return e.find(e=>v(e.title))}function y(e,t){let r=(0,u.cmsString)(e.title);if(!r)return null;let n=(0,u.cmsString)(e.slug),i=n?`/news/${n}`:"",a=e.excerpt??"",s=h(a),o=p(a),c=(0,l.assetSrc)(e.heroImage)??s?.src??"";return{id:(0,u.cmsString)(e.id)||`${n||r}-${t}`,category:"",title:r,body:o?[]:g(a),...o?{bodyHtml:o}:{},href:i,...i?{ctaLabel:"Read More"}:{},image:{src:c,alt:e.heroImage?.alt?.trim()||e.heroImage?.responsiveImage?.alt?.trim()||s?.alt||r}}}function b(e){let t=m(e.newsCollections).map((e,t)=>{let r=(0,u.cmsString)(e.title),n=d(e.newsArticles).map((e,t)=>y(e,t)).filter(e=>null!=e);return r||0!==n.length?{id:(0,u.cmsString)(e.id)||`collection-${t}`,title:r,cards:n}:null}).filter(e=>null!=e);return 0===t.length?null:{showTabs:!!e.showTabs,collections:t}}function w(e){let t=e.collections.filter(e=>e.cards.length>0),r=t.length>0?t:e.collections;return e.showTabs?r:[x(r)??r[0]]}var _=e.i(170192);function D(e){return["m-0 cursor-pointer border-0 border-b-2 bg-transparent px-0 py-[min(8px,calc(8*100vw/1920))] font-medium leading-normal no-underline text-[min(20px,calc(20*100vw/1920))] tablet:text-[min(18px,calc(18*100vw/1024))] mobile:text-[min(16px,calc(16*100vw/390))]",e?"border-[#036ada] !text-[#036ada]":"border-transparent !text-black hover:!text-[#036ada]"].join(" ")}function C(e,t){return(0,_.newsCollectionListingHref)(t.title,e)}function A({collections:e,activeId:t,pathname:r}){return(0,n.jsx)("div",{className:"flex w-full flex-wrap items-center justify-center gap-x-[min(32px,calc(32*100vw/1920))] tablet:gap-x-[min(24px,calc(24*100vw/1024))] mobile:gap-x-[min(16px,calc(16*100vw/390))] gap-y-[min(12px,calc(12*100vw/1920))]",role:"tablist","aria-label":"Article collections",children:e.map(e=>{let a=e.id===t;return(0,n.jsx)(i.default,{href:C(r,e),role:"tab","aria-selected":a,className:D(a),children:e.title},e.id)})})}function E(e,t){if(!t)return;let r=t.trim().toLowerCase();return e.find(e=>(0,_.newsCollectionTabSlug)(e.title)===r)}
1function N(e,t){let r=t.split("/").filter(Boolean)[0]?.toLowerCase()??"",n="knowledge"===r||"knowledge-lab"===r?"knowledge-lab":r;if(n)return e.find(e=>(0,_.newsCollectionTabSlug)(e.title)===n)}function S(e,t,r){return t&&r?C(e,r):e}function M({content:e}){let t=(0,s.usePathname)(),r=(0,s.useSearchParams)(),i=(0,a.useMemo)(()=>w(e),[e]),l=(0,a.useMemo)(()=>e.showTabs?E(i,r.get(_.NEWS_BROWSER_TAB_PARAM))??N(i,t)??i[0]:x(i)??i[0],[e.showTabs,i,t,r]);return l?(0,n.jsx)(o.KnowledgeCards,{cards:l.cards,returnPath:S(t,e.showTabs,l),header:e.showTabs?(0,n.jsx)(A,{collections:i,activeId:l.id,pathname:t}):void 0}):null}function T({widget:e}){let n=b(e);return n?(0,t.jsx)(r.Suspense,{fallback:null,children:(0,t.jsx)(M,{content:n})}):null}e.s(["WidgetNewsBrowser",0,T],334906)},289374,(__turbopack_context__,module,exports)=>{"u">typeof document&&"u">typeof navigator&&function(e,t){module.exports=t()}(__turbopack_context__.e,function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,n,i=e.length;for(r=0;r<i;r+=1)for(var a in n=e[r].prototype)Object.prototype.hasOwnProperty.call(n,a)&&(t.prototype[a]=n[a])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,r=this.audios.length;for(t=0;t<r;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(!this._isMuted*this._volume)}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var r,n=0,i=[];switch(e){case"int16":case"uint8c":r=1;break;default:r=1.1}for(n=0;n<t;n+=1)i.push(r);return i}function t(t,r){return"float32"===t?new Float32Array(r):"int16"===t?new Int16Array(r):"uint8c"===t?new Uint8ClampedArray(r):e(t,r)}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,r=createSizedArray(e.length),n=e.length;for(t=0;t<n;t+=1)r[t]=Math.abs(e[t]);return r}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,r,n){this.type=e,this.currentTime=t,this.totalTime=r,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,r,n){this.type=e,this.currentLoop=r,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,r){this.type=e,this.firstFrame=t,this.totalFrames=r}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,r){var n,i,a,s,o,l,u,c;switch(s=Math.floor(6*e),o=6*e-s,l=r*(1-t),u=r*(1-o*t),c=r*(1-(1-o)*t),s%6){case 0:n=r,i=c,a=l;break;case 1:n=u,i=r,a=l;break;case 2:n=l,i=r,a=c;break;case 3:n=l,i=u,a=r;break;case 4:n=c,i=l,a=r;break;case 5:n=r,i=l,a=u}return[n,i,a]}function RGBtoHSV(e,t,r){var n,i=Math.max(e,t,r),a=Math.min(e,t,r),s=i-a,o=0===i?0:s/i,l=i/255;switch(i){case a:n=0;break;
vendor: 13,766 bytes, line 1
1case e:n=(t-r+6*(t<r)*s)/(6*s);break;case t:n=(r-e+2*s)/(6*s);break;case r:n=(e-t+4*s)/(6*s)}return[n,o,l]}function addSaturationToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[1]+=t,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e,t,r=[];for(e=0;e<256;e+=1)t=e.toString(16),r[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+r[e]+r[t]+r[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var dataManager=function(){var e,t,r=1,n=[],i={onmessage:function(){},postMessage:function(t){e({data:t})}},a={postMessage:function(e){i.onmessage({data:e})}};function s(t){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"});return new Worker(URL.createObjectURL(r))}return e=t,i}function o(){t||((t=s(function(e){function t(){function e(t,r){var s,o,l,u,c,f,p=t.length;for(o=0;o<p;o+=1)if("ks"in(s=t[o])&&!s.completed){if(s.completed=!0,s.hasMask){var m=s.masksProperties;for(l=0,u=m.length;l<u;l+=1)if(m[l].pt.k.i)a(m[l].pt.k);else for(c=0,f=m[l].pt.k.length;c<f;c+=1)m[l].pt.k[c].s&&a(m[l].pt.k[c].s[0]),m[l].pt.k[c].e&&a(m[l].pt.k[c].e[0])}0===s.ty?(s.layers=n(s.refId,r),e(s.layers,r)):4===s.ty?i(s.shapes):5===s.ty&&h(s)}}function t(t,r){if(t){var i=0,a=t.length;for(i=0;i<a;i+=1)1===t[i].t&&(t[i].data.layers=n(t[i].data.refId,r),e(t[i].data.layers,r))}}function r(e,t){for(var r=0,n=t.length;r<n;){if(t[r].id===e)return t[r];r+=1}return null}function n(e,t){var n=r(e,t);return n?n.layers.__used?JSON.parse(JSON.stringify(n.layers)):(n.layers.__used=!0,n.layers):null}function i(e){var t,r,n;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)a(e[t].ks.k);else for(r=0,n=e[t].ks.k.length;r<n;r+=1)e[t].ks.k[r].s&&a(e[t].ks.k[r].s[0]),e[t].ks.k[r].e&&a(e[t].ks.k[r].e[0]);else"gr"===e[t].ty&&i(e[t].it)}function a(e){var t,r=e.i.length;for(t=0;t<r;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function s(e,t){var r=t?t.split("."):[100,100,100];return e[0]>r[0]||!(r[0]>e[0])&&(e[1]>r[1]||!(r[1]>e[1])&&(e[2]>r[2]||!(r[2]>e[2])&&null))}var o=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function r(e){var r,n=e.length;for(r=0;r<n;r+=1)5===e[r].ty&&t(e[r])}return function(t){if(s(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}(),l=function(){var e=[4,7,99];return function(t){if(t.chars&&!s(e,t.v)){var r,n=t.chars.length;for(r=0;r<n;r+=1){var a=t.chars[r];a.data&&a.data.shapes&&(i(a.data.shapes),a.data.ip=0,a.data.op=99999,a.data.st=0,a.data.sr=1,a.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[r].t||(a.data.shapes.push({ty:"no"}),a.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),u=function(){var e=[5,7,15];function t(e){var t=e.t.p;"number"==typeof t.a&&(t.a={a:0,k:t.a}),"number"==typeof t.p&&(t.p={a:0,k:t.p}),"number"==typeof t.r&&(t.r={a:0,k:t.r})}function r(e){var r,n=e.length;for(r=0;r<n;r+=1)5===e[r].ty&&t(e[r])}return function(t){if(s(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var r,n,i,a=e.length;for(r=0;r<a;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(n=0,i=e[r].c.k.length;n<i;n+=1)e[r].c.k[n].s&&(e[r].c.k[n].s[0]/=255,e[r].c.k[n].s[1]/=255,e[r].c.k[n].s[2]/=255,e[r].c.k[n].s[3]/=255),e[r].c.k[n].e&&(e[r].c.k[n].e[0]/=255,e[r].c.k[n].e[1]/=255,e[r].c.k[n].e[2]/=255,e[r].c.k[n].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function r(e){var r,n=e.length;for(r=0;r<n;r+=1)4===e[r].ty&&t(e[r].shapes)}return function(t){if(s(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}(),f=function(){var e=[4,4,18];function t(e){var r,n,i;for(r=e.length-1;r>=0;r-=1)if("sh"===e[r].ty)if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(n=0,i=e[r].ks.k.length;n<i;n+=1)e[r].ks.k[n].s&&(e[r].ks.k[n].s[0].c=e[r].closed),e[r].ks.k[n].e&&(e[r].ks.k[n].e[0].c=e[r].closed);else"gr"===e[r].ty&&t(e[r].it)}function r(e){var r,n,i,a,s,o,l=e.length;for(n=0;n<l;n+=1){if((r=e[n]).hasMask){var u=r.masksProperties;for(i=0,a=u.length;i<a;i+=1)if(u[i].pt.k.i)u[i].pt.k.c=u[i].cl;else for(s=0,o=u[i].pt.k.length;s<o;s+=1)u[i].pt.k[s].s&&(u[i].pt.k[s].s[0].c=u[i].cl),u[i].pt.k[s].e&&(u[i].pt.k[s].e[0].c=u[i].cl)}4===r.ty&&t(r.shapes)}}return function(t){if(s(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}();function h(e){0===e.t.a.length&&e.t.p}var p={};return p.completeData=function(r){r.__complete||(c(r),o(r),l(r),u(r),f(r),e(r.layers,r.assets),t(r.chars,r.assets),r.__complete=!0)},p.checkColors=c,p.checkChars=l,p.checkPathProperties=u,p.checkShapes=f,p.completeLayers=e,p}if(a.dataManager||(a.dataManager=t()),a.assetLoader||(a.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,r,n,i){var a,s=new XMLHttpRequest;try{s.responseType="json"}catch(e){}s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)n(a=e(s));else try{a=e(s),n(a)}catch(e){i&&i(e)}};try{s.open("GET",t,!0)}catch(e){s.open("GET",r+"/"+t,!0)}s.send()}}}()),"loadAnimation"===e.data.type)a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.dataManager.completeData(t),a.postMessage({id:e.data.id,payload:t,status:"success"})},function(){a.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var r=e.data.animation;a.dataManager.completeData(r),a.postMessage({id:e.data.id,payload:r,status:"success"})}else"loadData"===e.data.type&&a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.postMessage({id:e.data.id,payload:t,status:"success"})},function(){a.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(e){var t=e.data,r=t.id,i=n[r];n[r]=null,"success"===t.status?i.onComplete(t.payload):i.onError&&i.onError()})}function l(e,t){var i="processId_"+(r+=1);return n[i]={onComplete:e,onError:t},i}return{loadAnimation:function(e,r,n){o();var i=l(r,n);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:i})},loadData:function(e,r,n){o();var i=l(r,n);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:i})},completeAnimation:function(e,r,n){o();var i=l(r,n);t.postMessage({type:"complete",animation:e,id:i})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(e,t,r){var n="";if(e.e)n=e.p;else if(t){var i=e.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),n=t+i}else n=r+(e.u?e.u:"")+e.p;return n}function i(e){var t=0,r=setInterval((function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(r)),t+=1}).bind(this),50)}function a(e){var t={assetData:e},r=n(e,this.assetsPath,this.path);return dataManager.loadData(r,(function(e){t.img=e,this._footageLoaded()}).bind(this),(function(){t.img={},this._footageLoaded()}).bind(this)),t}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(e,t){this.imagesLoadedCb=t;var r,n=e.length;for(r=0;r<n;r+=1)e[r].layers||(e[r].t&&"seq"!==e[r].t?3===e[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[r]))):(this.totalImages+=1,this.images.push(this._createImageData(e[r]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,r=this.images.length;t<r;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var r=n(t,this.assetsPath,this.path),i=createTag("img");i.crossOrigin="anonymous",i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",(function(){a.img=e,this._imageLoaded()}).bind(this),!1),i.src=r;var a={img:i,assetData:t};return a},createImageData:function(t){var r=n(t,this.assetsPath,this.path),i=createNS("image");isSafari?this.testImageLoaded(i):i.addEventListener("load",this._imageLoaded,!1),i.addEventListener("error",(function(){a.img=e,this._imageLoaded()}).bind(this),!1),i.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(i):this._elementHelper.appendChild(i);var a={img:i,assetData:t};return a},imageLoaded:t,footageLoaded:r,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},s}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var r=this._cbs[e],n=0;n<r.length;n+=1)r[n](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),(function(){this.removeEventListener(e,t)}).bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var r=0,n=this._cbs[e].length;r<n;)this._cbs[e][r]===t&&(this._cbs[e].splice(r,1),r-=1,n-=1),r+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,r=e.split("\r\n"),n={},i=0,a=0;a<r.length;a+=1)2===(t=r[a].split(":")).length&&(n[t[0]]=t[1].trim(),i+=1);if(0===i)throw Error();return n}return function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t[n],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(t[n].cm)}catch(r){try{a.payload=e(t[n].cm)}catch(e){a.payload={name:t[n].cm}}}r.push(a)}return r}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,r=this.compositions.length;t<r;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=ne
vendor: 2,600 bytes, line 1
1w BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var r=getRenderer(t);this.renderer=new r(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var r={wrapper:e,animationData:t},n=e.attributes;r.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",r.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var i=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===i?r.loop=!1:"true"===i?r.loop=!0:""!==i&&(r.loop=parseInt(i,10)),r.autoplay="false"!==(n.getNamedItem("data-anim-
1autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value),r.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,r,n=this.animationData.layers,i=n.length,a=e.layers,s=a.length;for(r=0;r<s;r+=1)for(t=0;t<i;){if(n[t].id===a[r].id){n[t]=a[r];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(t=0,i=e.assets.length;t<i;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var r="number"==typeof e?e:void 0,n="number"==typeof t?t:void 0;this.renderer.updateContainerSize(r,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame
vendor: 100,421 bytes, line 1
1(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){(!e||this.name===e)&&!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r<this.markers.length;r+=1)if((t=this.markers[r]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(n,t,r);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,r=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&!0!==this.loop)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,t=0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?r=e:this.currentRawFrame+this.firstFrame>t&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var r,n=e.length;for(r=0;r<n;r+=1)this.segments.push(e[r])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){(!e||this.name===e)&&this.renderer&&(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var r=e.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),t=this.assetsPath+r}else t=this.path+(e.u?e.u:"")+e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,r=this.assets.length;t<r;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,r){try{this.renderer.getElementByPath(e).updateDocumentData(t,r)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],r=0,n=0,i=0,a=!0,s=!1;function o(e){for(var r=0,i=e.target;r<n;)t[r].animation===i&&(t.splice(r,1),r-=1,n-=1,i.isPaused||f()),r+=1}function l(e,r){if(!e)return null;for(var i=0;i<n;){if(t[i].elem===e&&null!==t[i].elem)return t[i].animation;i+=1}var a=new AnimationItem;return h(a,e),a.setData(e,r),a}function u(){var e,r=t.length,n=[];for(e=0;e<r;e+=1)n.push(t[e].animation);return n}function c(){i+=1,E()}function f(){i-=1}function h(e,r){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",f),t.push({elem:r,animation:e}),n+=1}function p(e){var t=new AnimationItem;return h(t,null),t.setParams(e),t}function m(e,r){var i;for(i=0;i<n;i+=1)t[i].animation.setSpeed(e,r)}function d(e,r){var i;for(i=0;i<n;i+=1)t[i].animation.setDirection(e,r)}function g(e){var r;for(r=0;r<n;r+=1)t[r].animation.play(e)}function v(e){var o,l=e-r;for(o=0;o<n;o+=1)t[o].animation.advanceTime(l);r=e,i&&!s?window.requestAnimationFrame(v):a=!0}function x(e){r=e,window.requestAnimationFrame(v)}function y(e){var r;for(r=0;r<n;r+=1)t[r].animation.pause(e)}function b(e,r,i){var a;for(a=0;a<n;a+=1)t[a].animation.goToAndStop(e,r,i)}function w(e){var r;for(r=0;r<n;r+=1)t[r].animation.stop(e)}function _(e){var r;for(r=0;r<n;r+=1)t[r].animation.togglePause(e)}function D(e){var r;for(r=n-1;r>=0;r-=1)t[r].animation.destroy(e)}function C(e,t,r){var n,i=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=i.length;for(n=0;n<a;n+=1)r&&i[n].setAttribute("data-bm-type",r),l(i[n],e);if(t&&0===a){r||(r="svg");var s=document.getElementsByTagName("body")[0];s.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),s.appendChild(o),l(o,e)}}function A(){var e;for(e=0;e<n;e+=1)t[e].animation.resize()}function E(){!s&&i&&a&&(window.requestAnimationFrame(x),a=!1)}function N(){s=!0}function S(){s=!1,E()}function M(e,r){var i;for(i=0;i<n;i+=1)t[i].animation.setVolume(e,r)}function T(e){var r;for(r=0;r<n;r+=1)t[r].animation.mute(e)}function k(e){var r;for(r=0;r<n;r+=1)t[r].animation.unmute(e)}return e.registerAnimation=l,e.loadAnimation=p,e.setSpeed=m,e.setDirection=d,e.play=g,e.pause=y,e.stop=w,e.togglePause=_,e.searchAnimations=C,e.resize=A,e.goToAndStop=b,e.destroy=D,e.freeze=N,e.unfreeze=S,e.setVolume=M,e.mute=T,e.unmute=k,e.getRegisteredAnimations=u,e}(),BezierFactory=function(){var e={};e.getBezierEasing=r;var t={};function r(e,r,n,i,a){var s=a||("bez_"+e+"_"+r+"_"+n+"_"+i).replace(/\./g,"p");if(t[s])return t[s];var o=new v([e,r,n,i]);return t[s]=o,o}var n=4,i=.001,a=1e-7,s=10,o=11,l=.1,u="function"==typeof Float32Array;function c(e,t){return 1-3*t+3*e}function f(e,t){return 3*t-6*e}function h(e){return 3*e}function p(e,t,r){return((c(t,r)*e+f(t,r))*e+h(t))*e}function m(e,t,r){return 3*c(t,r)*e*e+2*f(t,r)*e+h(t)}function d(e,t,r,n,i){var o,l,u=0;do(o=p(l=t+(r-t)/2,n,i)-e)>0?r=l:t=l;while(Math.abs(o)>a&&++u<s)return l}function g(e,t,r,i){for(var a=0;a<n;++a){var s=m(t,r,i);if(0===s)break;var o=p(t,r,i)-e;t-=o/s}return t}function v(e){this._p=e,this._mSampleValues=u?new Float32Array(o):Array(o),this._precomputed=!1,this.get=this.get.bind(this)}return v.prototype={get:function(e){var t=this._p[0],r=this._p[1],n=this._p[2],i=this._p[3];return(this._precomputed||this._precompute(),t===r&&n===i)?e:0===e?0:1===e?1:p(this._getTForX(e),r,i)},_precompute:function(){var e=this._p[0],t=this._p[1],r=this._p[2],n=this._p[3];this._precomputed=!0,(e!==t||r!==n)&&this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],r=0;r<o;++r)this._mSampleValues[r]=p(r*l,e,t)},_getTForX:function(e){for(var t=this._p[0],r=this._p[2],n=this._mSampleValues,a=0,s=1,u=o-1;s!==u&&n[s]<=e;++s)a+=l;var c=a+(e-n[--s])/(n[s+1]-n[s])*l,f=m(c,t,r);return f>=i?g(e,c,t,r):0===f?c:d(e,a,a+l,t,r)}},e}(),pooling=function(){return{double:function(e){return e.concat(createSizedArray(e.length))}}}(),poolFactory=function(){return function(e,t,r){var n=0,i=e,a=createSizedArray(i);return{newElement:function(){var e;return n?(n-=1,e=a[n]):e=t(),e},release:function(e){n===i&&(a=pooling.double(a),i*=2),r&&r(e),a[n]=e,n+=1}}}}(),bezierLengthPool=function(){return poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})}(),segmentsLengthPool=function(){return poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,r=e.lengths.length;for(t=0;t<r;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0})}();function bezFunction(){var e=Math;function t(e,t,r,n,i,a){var s=e*n+t*i+r*a-i*n-a*e-r*t;return s>-.001&&s<.001}function r(r,n,i,a,s,o,l,u,c){if(0===i&&0===o&&0===c)return t(r,n,a,s,l,u);var f,h=e.sqrt(e.pow(a-r,2)+e.pow(s-n,2)+e.pow(o-i,2)),p=e.sqrt(e.pow(l-r,2)+e.pow(u-n,2)+e.pow(c-i,2)),m=e.sqrt(e.pow(l-a,2)+e.pow(u-s,2)+e.pow(c-o,2));return(f=h>p?h>m?h-p-m:m-p-h:m>p?m-p-h:p-h-m)>-1e-4&&f<1e-4}var n=function(){return function(e,t,r,n){var i,a,s,o,l,u,c=getDefaultCurveSegments(),f=0,h=[],p=[],m=bezierLengthPool.newElement();for(i=0,s=r.length;i<c;i+=1){for(a=0,l=i/(c-1),u=0;a<s;a+=1)o=bmPow(1-l,3)*e[a]+3*bmPow(1-l,2)*l*r[a]+3*(1-l)*bmPow(l,2)*n[a]+bmPow(l,3)*t[a],h[a]=o,null!==p[a]&&(u+=bmPow(h[a]-p[a],2)),p[a]=h[a];u&&(f+=u=bmSqrt(u)),m.percents[i]=l,m.lengths[i]=f}return m.addedLength=f,m}}();function i(e){var t,r=segmentsLengthPool.newElement(),i=e.c,a=e.v,s=e.o,o=e.i,l=e._length,u=r.lengths,c=0;for(t=0;t<l-1;t+=1)u[t]=n(a[t],a[t+1],s[t],o[t+1]),c+=u[t].addedLength;return i&&l&&(u[t]=n(a[t],a[0],s[t],o[0]),c+=u[t].addedLength),r.totalLength=c,r}function a(e){this.segmentLength=0,this.points=Array(e)}function s(e,t){this.partialLength=e,this.point=t}var o=function(){var e={};return function(r,n,i,o){var l=(r[0]+"_"+r[1]+"_"+n[0]+"_"+n[1]+"_"+i[0]+"_"+i[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!e[l]){var u,c,f,h,p,m,d,g=getDefaultCurveSegments(),v=0,x=null;2===r.length&&(r[0]!==n[0]||r[1]!==n[1])&&t(r[0],r[1],n[0],n[1],r[0]+i[0],r[1]+i[1])&&t(r[0],r[1],n[0],n[1],n[0]+o[0],n[1]+o[1])&&(g=2);var y=new a(g);for(u=0,f=i.length;u<g;u+=1){for(c=0,d=createSizedArray(f),p=u/(g-1),m=0;c<f;c+=1)h=bmPow(1-p,3)*r[c]+3*bmPow(1-p,2)*p*(r[c]+i[c])+3*(1-p)*bmPow(p,2)*(n[c]+o[c])+bmPow(p,3)*n[c],d[c]=h,null!==x&&(m+=bmPow(d[c]-x[c],2));v+=m=bmSqrt(m),y.points[u]=new s(m,d),x=d}y.segmentLength=v,e[l]=y}return e[l]}}();function l(e,t){var r=t.percents,n=t.lengths,i=r.length,a=bmFloor((i-1)*e),s=e*t.addedLength,o=0;if(a===i-1||0===a||s===n[a])return r[a];for(var l=n[a]>s?-1:1,u=!0;u;)if(n[a]<=s&&n[a+1]>s?(o=(s-n[a])/(n[a+1]-n[a]),u=!1):a+=l,a<0||a>=i-1){if(a===i-1)return r[a];u=!1}return r[a]+(r[a+1]-r[a])*o}function u(t,r,n,i,a,s){var o=l(a,s),u=1-o;return[e.round((u*u*u*t[0]+(o*u*u+u*o*u+u*u*o)*n[0]+(o*o*u+u*o*o+o*u*o)*i[0]+o*o*o*r[0])*1e3)/1e3,e.round((u*u*u*t[1]+(o*u*u+u*o*u+u*u*o)*n[1]+(o*o*u+u*o*o+o*u*o)*i[1]+o*o*o*r[1])*1e3)/1e3]}var c=createTypedArray("float32",8);return{getSegmentsLength:i,getNewSegment:function(t,r,n,i,a,s,o){a<0?a=0:a>1&&(a=1);var u,f=l(a,o),h=l(s=s>1?1:s,o),p=t.length,m=1-f,d=1-h,g=m*m*m,v=f*m*m*3,x=f*f*m*3,y=f*f*f,b=m*m*d,w=f*m*d+m*f*d+m*m*h,_=f*f*d+m*f*h+f*m*h,D=f*f*h,C=m*d*d,A=f*d*d+m*h*d+m*d*h,E=f*h*d+m*h*h+f*d*h,N=f*h*h,S=d*d*d,M=h*d*d+d*h*d+d*d*h,T=h*h*d+d*h*h+h*d*h,k=h*h*h;for(u=0;u<p;u+=1)c[4*u]=e.round((g*t[u]+v*n[u]+x*i[u]+y*r[u])*1e3)/1e3,c[4*u+1]=e.round((b*t[u]+w*n[u]+_*i[u]+D*r[u])*1e3)/1e3,c[4*u+2]=e.round((C*t[u]+A*n[u]+E*i[u]+N*r[u])*1e3)/1e3,c[4*u+3]=e.round((S*t[u]+M*n[u]+T*i[u]+k*r[u])*1e3)/1e3;return c},getPointInSegment:u,buildBezierData:o,pointOnLine2D:t,pointOnLine3D:r}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var r,n,i,a,s,o=this.offsetTime;"multidimensional"===this.propType&&(g=createTypedArray("float32",this.pv.length));for(var l=t.lastIndex,u=l,c=this.keyframes.length-1,f=!0;f;){if(v=this.keyframes[u],x=this.keyframes[u+1],u===c-1&&e>=x.t-o){v.h&&(v=x),l=0;break}if(x.t-o>e){l=u;break}u<c-1?u+=1:(l=0,f=!1)}y=this.keyframesMetadata[u]||{};var h=x.t-o,p=v.t-o;if(v.to){y.bezierData||(y.bezierData=bez.buildBezierData(v.s,x.s||v.e,v.to,v.ti));var m=y.bezierData;if(e>=h||e<p){var d=e>=h?m.points.length-1:0;for(b=0,w=m.points[d].point.length;b<w;b+=1)g[b]=m.points[d].point[b]}else{y.__fnct?C=y.__fnct:y.__fnct=C=BezierFactory.getBezierEasing(v.o.x,v.o.y,v.i.x,v.i.y,v.n).get;var g,v,x,y,b,w,_,D,C,A,E,N=C((e-p)/(h-p)),S=m.segmentLength*N,M=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastAddedLength:0;for(D=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastPoint:0,f=!0,_=m.points.length;f;){if(M+=m.points[D].partialLength,0===S||0===N||D===m.points.length-1){for(b=0,w=m.points[D].point.length;b<w;b+=1)g[b]=m.points[D].point[b];break}if(S>=M&&S<M+m.points[D+1].partialLength){for(b=0,E=(S-M)/m.points[D+1].partialLength,w=m.points[D].point.length;b<w;b+=1)g[b]=m.points[D].point[b]+(m.points[D+1].point[b]-m.points[D].point[b])*E;break}D<_-1?D+=1:f=!1}t._lastPoint=D,t._lastAddedLength=M-m.points[D].partialLength,t._lastKeyframeIndex=u}}else if(c=v.s.length,A=x.s||v.e,this.sh&&1!==v.h)e>=h?(g[0]=A[0],g[1]=A[1],g[2]=A[2]):e<=p?(g[0]=v.s[0],g[1]=v.s[1],g[2]=v.s[2]):quaternionToEuler(g,slerp(createQuaternion(v.s),createQuaternion(A),(e-p)/(h-p)));else for(u=0;u<c;u+=1)1!==v.h&&(e>=h?N=1:e<p?N=0:(v.o.x.constructor===Array?(y.__fnct||(y.__fnct=[]),y.__fnct[u]?C=y.__fnct[u]:(r=void 0===v.o.x[u]?v.o.x[0]:v.o.x[u],n=void 0===v.o.y[u]?v.o.y[0]:v.o.y[u],i=void 0===v.i.x[u]?v.i.x[0]:v.i.x[u],a=void 0===v.i.y[u]?v.i.y[0]:v.i.y[u],C=BezierFactory.getBezierEasing(r,n,i,a).get,y.__fnct[u]=C)):y.__fnct?C=y.__fnct:(r=v.o.x,n=v.o.y,i=v.i.x,a=v.i.y,C=BezierFactory.getBezierEasing(r,n,i,a).get,v.keyframeMetadata=C),N=C((e-p)/(h-p)))),A=x.s||v.e,s=1===v.h?v.s[u]:v.s[u]+(A[u]-v.s[u])*N,"multidimensional"===this.propType?g[u]=s:g=s;return t.lastIndex=l,g}function slerp(e,t,r){var n,i,a,s,o,l=[],u=e[0],c=e[1],f=e[2],h=e[3],p=t[0],m=t[1],d=t[2],g=t[3];return(i=u*p+c*m+f*d+h*g)<0&&(i=-i,p=-p,m=-m,d=-d,g=-g),1-i>1e-6?(a=Math.sin(n=Math.acos(i)),s=Math.sin((1-r)*n)/a,o=Math.sin(r*n)/a):(s=1-r,o=r),l[0]=s*u+o*p,l[1]=s*c+o*m,l[2]=s*f+o*d,l[3]=s*h+o*g,l}function quaternionToEuler(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],s=Math.atan2(2*n*a-2*r*i,1-2*n*n-2*i*i),o=Math.asin(2*r*n+2*i*a),l=Math.atan2(2*r*a-2*n*i,1-2*r*r-2*i*i);e[0]=s/degToRads,e[1]=o/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,r=e[1]*degToRads,n=e[2]*degToRads,i=Math.cos(t/2),a=Math.cos(r/2),s=Math.cos(n/2),o=Math.sin(t/2),l=Math.sin(r/2),u=Math.sin(n/2),c=i*a*s-o*l*u;return[o*l*s+i*a*u,o*a*s+i*l*u,i*l*s-o*a*u,c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&e>=r||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var r=0,n=this.v.length;r<n;)t=e[r]*this.mult,mathAbs(this.v[r]-t)>1e-5&&(this.v[r]=t,this._mdf=!0),r+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)r=this.effectsSequence[e](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,r,n){this.propType="unidimensional",this.mult=r||1,this.data=t,this.v=r?t.k*r:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,r,n){this.propType="multidimensional",this.mult=r||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,a=t.k.length;for(i=0,this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a);i<a;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,r,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,r,n){this.propType="multidimensional";var i,a,s,o,l,u=t.k.length;for(i=0;i<u-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(a=t.k[i].s,s=t.k[i+1].s,o=t.k[i].to,l=t.k[i].ti,(2===a.length&&(a[0]!==s[0]||a[1]!==s[1])&&bez.pointOnLine2D(a[0],a[1],s[0],s[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||3===a.length&&(a[0]!==s[0]||a[1]!==s[1]||a[2]!==s[2])&&bez.pointOnLine3D(a[0],a[1],a[2],s[0],s[1],s[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[i].to=null,t.k[i].ti=null),a[0]===s[0]&&a[1]===s[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===a.length||a[2]===s[2]&&0===o[2]&&0===l[2])&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var c=t.k[0].s.length;for(i=0,this.v=createTypedArray("float32",c),this.pv=createTypedArray("float32",c);i<c;i+=1)this.v[i]=initFrame,this.pv[i]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",c)},this.addEffect=addEffect}var PropertyFactory=function(){return{getProp:function(e,t,r,n,i){var a;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])a=new MultiDimensionalProperty(e,t,n,i);else switch(r){case 0:a=new KeyframedValueProperty(e,t,n,i);break;case 1:a=new KeyframedMultidimensionalProperty(e,t,n,i)}else a=new ValueProperty(e,t,n,i);return a.effectsSequence.length&&i.addDynamicProperty(a),a}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){return poolFactory(8,function(){return createTypedArray("float32",2)})}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var r=0;r<t;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,r,n,i){var a;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}a[n]&&(!a[n]||i)||(a[n]=pointPool.newElement()),a[n][0]=e,a[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,n,i,a,s,o){this.setXYAt(e,t,"v",s,o),this.setXYAt(r,n,"o",s,o),this.setXYAt(i,a,"i",s,o)},ShapePath.prototype.reverse=function(){var e,t=new ShapePath;t.setPathData(this.c,this._length);var r=this.v,n=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(r[0][0],r[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),a=1);var s=this._length-1,o=this._length;for(e=a;e<o;e+=1)t.setTripleAt(r[s][0],r[s][1],i[s][0],i[s][1],n[s][0],n[s][1],e,!1),s-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(e){var r,n=t.newElement(),i=void 0===e._length?e.v.length:e._length;for(n.setLength(i),n.c=e.c,r=0;r<i;r+=1)n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],r);return n}var t=poolFactory(4,function(){return new ShapePath},function(e){var t,r=e._length;for(t=0;t<r;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1});return t.clone=e,t}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:i,release:a},t=0,r=4,n=createSizedArray(4);function i(){var e;return t?(t-=1,e=n[t]):e=new ShapeCollection,e}function a(e){var i,a=e._length;for(i=0;i<a;i+=1)shapePool.release(e.shapes[i]);e._length=0,t===r&&(n=pooling.double(n),r*=2),n[t]=e,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(e,t,r){var n=r.lastIndex,i=this.keyframes;if(e<i[0].t-this.offsetTime)a=i[0].s[0],o=!0,n=0;else if(e>=i[i.length-1].t-this.offsetTime)a=i[i.length-1].s?i[i.length-1].s[0]:i[i.length-2].e[0],o=!0;else{for(var a,s,o,l,u,c,f,h,p,m,d,g,v,x=n,y=i.length-1,b=!0;b&&(m=i[x],!((d=i[x+1]).t-this.offsetTime>e));)x<y-1?x+=1:b=!1;g=this.keyframesMetadata[x]||{},o=1===m.h,n=x,o||(e>=d.t-this.offsetTime?h=1:e<m.t-this.offsetTime?h=0:(g.__fnct?v=g.__fnct:g.__fnct=v=BezierFactory.getBezierEasing(m.o.x,m.o.y,m.i.x,m.i.y).get,h=v((e-(m.t-this.offsetTime))/(d.t-this.offsetTime-(m.t-this.offsetTime)))),s=d.s?d.s[0]:m.e[0]),a=m.s[0]}for(l=0,c=t._length,f=a.i[0].length,r.lastIndex=n;l<c;l+=1)for(u=0;u<f;u+=1)p=o?a.i[l][u]:a.i[l][u]+(s.i[l][u]-a.i[l][u])*h,t.i[l][u]=p,p=o?a.o[l][u]:a.o[l][u]+(s.o[l][u]-a.o[l][u])*h,t.o[l][u]=p,p=o?a.v[l][u]:a.v[l][u]+(s.v[l][u]-a.v[l][u])*h,t.v[l][u]=p}function r(){var t=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==e&&(i<r&&t<r||i>n&&t>n)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function n(){this.paths=this.localShapeCollection}function i(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var r,n=e._length;for(r=0;r<n;r+=1)if(e.v[r][0]!==t.v[r][0]||e.v[r][1]!==t.v[r][1]||e.o[r][0]!==t.o[r][0]||e.o[r][1]!==t.o[r][1]||e.i[r][0]!==t.i[r][0]||e.i[r][1]!==t.i[r][1])return!1;return!0}function a(e){i(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var e,t,r=this.effectsSequence.length;for(t=0;t<r;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(e,t,r){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var i=3===r?t.pt.k:t.ks.k;this.v=shapePool.clone(i),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function l(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function u(t,i,a){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===a?i.pt.k:i.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var s=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[r.bind(this)]}o.prototype.interpolateShape=t,o.prototype.getValue=s,o.prototype.setVValue=a,o.prototype.addEffect=l,u.prototype.getValue=s,u.prototype.interpolateShape=t,u.prototype.setVValue=a,u.prototype.addEffect=l;var c=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],r=this.p.v[1],n=this.s.v[0]/2,i=this.s.v[1]/2,a=3!==this.d,s=this.v;s.v[0][0]=t,s.v[0][1]=r-i,s.v[1][0]=a?t+n:t-n,s.v[1][1]=r,s.v[2][0]=t,s.v[2][1]=r+i,s.v[3][0]=a?t-n:t+n,s.v[3][1]=r,s.i[0][0]=a?t-n*e:t+n*e,s.i[0][1]=r-i,s.i[1][0]=a?t+n:t-n,s.i[1][1]=r-i*e,s.i[2][0]=a?t+n*e:t-n*e,s.i[2][1]=r+i,s.i[3][0]=a?t-n:t+n,s.i[3][1]=r+i*e,s.o[0][0]=a?t+n*e:t-n*e,s.o[0][1]=r-i,s.o[1][0]=a?t+n:t-n,s.o[1][1]=r+i*e,s.o[2][0]=a?t-n*e:t+n*e,s.o[2][1]=r+i,s.o[3][0]=a?t-n:t+n,s.o[3][1]=r-i*e}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,r,n,i=2*Math.floor(this.pt.v),a=2*Math.PI/i,s=!0,o=this.or.v,l=this.ir.v,u=this.os.v,c=this.is.v,f=2*Math.PI*o/(2*i),h=2*Math.PI*l/(2*i),p=-Math.PI/2;p+=this.r.v;var m=3===this.data.d?-1:1;for(e=0,this.v._length=0;e<i;e+=1){t=s?o:l,r=s?u:c,n=s?f:h;var d=t*Math.cos(p),g=t*Math.sin(p),v=0===d&&0===g?0:g/Math.sqrt(d*d+g*g),x=0===d&&0===g?0:-d/Math.sqrt(d*d+g*g);d+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(d,g,d-v*n*r*m,g-x*n*r*m,d+v*n*r*m,g+x*n*r*m,e,!0),s=!s,p+=a*m}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),r=2*Math.PI/t,n=this.or.v,i=this.os.v,a=2*Math.PI*n/(4*t),s=-(.5*Math.PI),o=3===this.data.d?-1:1;for(s+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=n*Math.cos(s),u=n*Math.sin(s),c=0===l&&0===u?0:u/Math.sqrt(l*l+u*u),f=0===l&&0===u?0:-l/Math.sqrt(l*l+u*u);l+=+this.p.v[0],u+=+this.p.v[1],this.v.setTripleAt(l,u,l-c*a*i*o,u-f*a*i*o,l+c*a*i*o,u+f*a*i*o,e,!0),s+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),h=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],r=this.s.v[0]/2,n=this.s.v[1]/2,i=bmMin(r,n,this.r.v),a=i*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+r,t-n+i,e+r,t-n+i,e+r,t-n+a,0,!0),this.v.setTripleAt(e+r,t+n-i,e+r,t+n-a,e+r,t+n-i,1,!0),0!==i?(this.v.setTripleAt(e+r-i,t+n,e+r-i,t+n,e+r-a,t+n,2,!0),this.v.setTripleAt(e-r+i,t+n,e-r+a,t+n,e-r+i,t+n,3,!0),this.v.setTripleAt(e-r,t+n-i,e-r,t+n-i,e-r,t+n-a,4,!0),this.v.setTripleAt(e-r,t-n+i,e-r,t-n+a,e-r,t-n+i,5,!0),this.v.setTripleAt(e-r+i,t-n,e-r+i,t-n,e-r+a,t-n,6,!0),this.v.setTripleAt(e+r-i,t-n,e+r-a,t-n,e+r-i,t-n,7,!0)):(this.v.setTripleAt(e-r,t+n,e-r+a,t+n,e-r,t+n,2),this.v.setTripleAt(e-r,t-n,e-r,t-n+a,e-r,t-n,3))):(this.v.setTripleAt(e+r,t-n+i,e+r,t-n+a,e+r,t-n+i,0,!0),0!==i?(this.v.setTripleAt(e+r-i,t-n,e+r-i,t-n,e+r-a,t-n,1,!0),this.v.setTripleAt(e-r+i,t-n,e-r+a,t-n,e-r+i,t-n,2,!0),this.v.setTripleAt(e-r,t-n+i,e-r,t-n+i,e-r,t-n+a,3,!0),this.v.setTripleAt(e-r,t+n-i,e-r,t+n-a,e-r,t+n-i,4,!0),this.v.setTripleAt(e-r+i,t+n,e-r+i,t+n,e-r+a,t+n,5,!0),this.v.setTripleAt(e+r-i,t+n,e+r-a,t+n,e+r-i,t+n,6,!0),this.v.setTripleAt(e+r,t+n-i,e+r,t+n-i,e+r,t+n-a,7,!0)):(this.v.setTripleAt(e-r,t-n,e-r+a,t-n,e-r,t-n,1,!0),this.v.setTripleAt(e-r,t+n,e-r,t+n-a,e-r,t+n,2,!0),this.v.setTripleAt(e+r,t+n,e+r-a,t+n,e+r,t+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],e),e}();function p(){return o}function m(){return u}var d={};return d.getShapeProp=function(e,t,r){var n;return 3===r||4===r?n=(3===r?t.pt:t.ks).k.length?new u(e,t,r):new o(e,t,r):5===r?n=new h(e,t):6===r?n=new c(e,t):7===r&&(n=new f(e,t)),n.k&&e.addDynamicProperty(n),n},d.getConstructorFunction=p,d.getKeyframedConstructorFunction=m,d}(),Matrix=function(){var e=Math.cos,t=Math.sin,r=Math.tan,n=Math.round;function i(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(r){if(0===r)return this;var n=e(r),i=t(r);return this._t(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1)}function s(r){if(0===r)return this;var n=e(r),i=t(r);return this._t(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1)}function o(r){if(0===r)return this;var n=e(r),i=t(r);return this._t(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1)}function l(r){if(0===r)return this;var n=e(r),i=t(r);return this._t(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1)}function u(e,t){return this._t(1,t,e,1,0,0)}function c(e,t){return this.shear(r(e),r(t))}function f(n,i){var a=e(i),s=t(i);return this._t(a,s,0,0,-s,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(n),1,0,0,0,0,1,0,0,0,0,1)._t(a,-s,0,0,s,a,0,0,0,0,1,0,0,0,0,1)}function h(e,t,r){return(r||0===r||(r=1),1===e&&1===t&&1===r)?this:this._t(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1)}function p(e,t,r,n,i,a,s,o,l,u,c,f,h,p,m,d){return this.props[0]=e,this.props[1]=t,this.props[2]=r,this.props[3]=n,this.props[4]=i,this.props[5]=a,this.props[6]=s,this.props[7]=o,this.props[8]=l,this.props[9]=u,this.props[10]=c,this.props[11]=f,this.props[12]=h,this.props[13]=p,this.props[14]=m,this.props[15]=d,this}function m(e,t,r){return(r=r||0,0!==e||0!==t||0!==r)?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,r,1):this}function d(e,t,r,n,i,a,s,o,l,u,c,f,h,p,m,d){var g=this.props;if(1===e&&0===t&&0===r&&0===n&&0===i&&1===a&&0===s&&0===o&&0===l&&0===u&&1===c&&0===f)return g[12]=g[12]*e+g[15]*h,g[13]=g[13]*a+g[15]*p,g[14]=g[14]*c+g[15]*m,g[15]*=d,this._identityCalculated=!1,this;var v=g[0],x=g[1],y=g[2],b=g[3],w=g[4],_=g[5],D=g[6],C=g[7],A=g[8],E=g[9],N=g[10],S=g[11],M=g[12],T=g[13],k=g[14],F=g[15];return g[0]=v*e+x*i+y*l+b*h,g[1]=v*t+x*a+y*u+b*p,g[2]=v*r+x*s+y*c+b*m,g[3]=v*n+x*o+y*f+b*d,g[4]=w*e+_*i+D*l+C*h,g[5]=w*t+_*a+D*u+C*p,g[6]=w*r+_*s+D*c+C*m,g[7]=w*n+_*o+D*f+C*d,g[8]=A*e+E*i+N*l+S*h,g[9]=A*t+E*a+N*u+S*p,g[10]=A*r+E*s+N*c+S*m,g[11]=A*n+E*o+N*f+S*d,g[12]=M*e+T*i+k*l+F*h,g[13]=M*t+T*a+k*u+F*p,g[14]=M*r+T*s+k*c+F*m,g[15]=M*n+T*o+k*f+F*d,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function v(){return this._identityCalculated||(this._identity=1===this.props[0]&&0===this.props[1]&&0===this.props[2]&&0===this.props[3]&&0===this.props[4]&&1===this.props[5]&&0===this.props[6]&&0===this.props[7]&&0===this.props[8]&&0===this.props[9]&&1===this.props[10]&&0===this.props[11]&&0===this.props[12]&&0===this.props[13]&&0===this.props[14]&&1===this.props[15],this._identityCalculated=!0),this._identity}function x(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function y(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function b(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function w(e,t,r){return{x:e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}}function _(e,t,r){return e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12]}function D(e,t,r){return e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13]}function C(e,t,r){return e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}function A(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,r=-this.props[1]/e,n=-this.props[4]/e,i=this.props[0]/e,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,s=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,o=new Matrix;return o.props[0]=t,o.props[1]=r,o.props[4]=n,o.props[5]=i,o.props[12]=a,o.props[13]=s,o}function E(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function N(e){var t,r=e.length,n=[];for(t=0;t<r;t+=1)n[t]=E(e[t]);return n}function S(e,t,r){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=e[0],n[1]=e[1],n[2]=t[0],n[3]=t[1],n[4]=r[0],n[5]=r[1];else{var i=this.props[0],a=this.props[1],s=this.props[4],o=this.props[5],l=this.props[12],u=this.props[13];n[0]=e[0]*i+e[1]*s+l,n[1]=e[0]*a+e[1]*o+u,n[2]=t[0]*i+t[1]*s+l,n[3]=t[0]*a+t[1]*o+u,n[4]=r[0]*i+r[1]*s+l,n[5]=r[0]*a+r[1]*o+u}return n}function M(e,t,r){var n;return this.isIdentity()?[e,t,r]:[e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]]}function T(e,t){if(this.isIdentity())return e+","+t;var r=this.props;return Math.round((e*r[0]+t*r[4]+r[12])*100)/100+","+Math.round((e*r[1]+t*r[5]+r[13])*100)/100}function k(){for(var e=0,t=this.props,r="matrix3d(",i=1e4;e<16;)r+=n(t[e]*i)/i,r+=15===e?")":",",e+=1;return r}function F(e){var t=1e4;return e<1e-6&&e>0||e>-1e-6&&e<0?n(e*t)/t:e}function B(){var e=this.props;return"matrix("+F(e[0])+","+F(e[1])+","+F(e[4])+","+F(e[5])+","+F(e[12])+","+F(e[13])+")"}return function(){this.reset=i,this.rotate=a,this.rotateX=s,this.rotateY=o,this.rotateZ=l,this.skew=c,this.skewFromAxis=f,this.shear=u,this.scale=h,this.setTransform=p,this.translate=m,this.transform=d,this.multiply=g,this.applyToPoint=w,this.applyToX=_,this.applyToY=D,this.applyToZ=C,this.applyToPointArray=M,this.applyToTriplePoints=S,this.applyToPointStringified=T,this.toCSS=k,this.to2dCSS=B,this.clone=y,this.cloneFromProps=b,this.equals=x,this.inversePoints=N,this.inversePoint=E,this.getInverseMatrix=A,this._t=this.transform,this.isIdentity=v,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"u">typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r<t.length;r+=1){var n=t[r].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.13.0";var queryString="",scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer");var readyStateCheckInterval=setInterval(checkReady,100);try{"object"===_typeof$3(exports)||"function"==typeof define&&define.amd||(window.bodymovin=lottie)}catch(err){}var ShapeModifiers=function(){var e={},t={};function r(e,r,n){return new t[e](r,n)}return e.registerModifier=function e(e,r){t[e]||(t[e]=r)},e.getModifier=r,e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,r,n,i){var a,s,o,l=[];t<=1?l.push({s:e,e:t}):e>=1?l.push({s:e-1,e:t-1}):(l.push({s:e,e:1}),l.push({s:0,e:t-1}));var u=[],c=l.length;for(a=0;a<c;a+=1)(s=l[a]).e*i<n||s.s*i>n+r||(o=s.s*i<=n?0:(s.s*i-n)/r,u.push([o,s.e*i>=n+r?1:(s.e*i-n)/r]));return u.length||u.push([0,0]),u},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t<r;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){if(this._mdf||e){var t=this.o.v%360/360;if(t<0&&(t+=1),(a=this.s.v>1?1+t:this.s.v<0?0+t:this.s.v+t)>(s=this.e.v>1?1+t:this.e.v<0?0+t:this.e.v+t)){var r=a;a=s,s=r}a=1e-4*Math.round(1e4*a),s=1e-4*Math.round(1e4*s),this.sValue=a,this.eValue=s}else a=this.sValue,s=this.eValue;var n=this.shapes.length,i=0;if(s===a)for(l=0;l<n;l+=1)this.shapes[l].localShapeCollection.releaseShapes(),this.shapes[l].shape._mdf=!0,this.shapes[l].shape.paths=this.shapes[l].localShapeCollection,this._mdf&&(this.shapes[l].pathsData.length=0);else if((1!==s||0!==a)&&(0!==s||1!==a)){var a,s,o,l,u,c,f,h,p,m,d,g,v=[];for(l=0;l<n;l+=1)if((m=this.shapes[l]).shape._mdf||this._mdf||e||2===this.m){if(c=(o=m.shape.paths)._length,p=0,!m.shape._mdf&&m.pathsData.length)p=m.totalShapeLength;else{for(u=0,f=this.releasePathsData(m.pathsData);u<c;u+=1)h=bez.getSegmentsLength(o.shapes[u]),f.push(h),p+=h.totalLength;m.totalShapeLength=p,m.pathsData=f}i+=p,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var x=a,y=s,b=0;for(l=n-1;l>=0;l-=1)if((m=this.shapes[l]).shape._mdf){for((d=m.localShapeCollection).releaseShapes(),2===this.m&&n>1?(g=this.calculateShapeEdges(a,s,m.totalShapeLength,b,i),b+=m.totalShapeLength):g=[[x,y]],c=g.length,u=0;u<c;u+=1){x=g[u][0],y=g[u][1],v.length=0,y<=1?v.push({s:m.totalShapeLength*x,e:m.totalShapeLength*y}):x>=1?v.push({s:m.totalShapeLength*(x-1),e:m.totalShapeLength*(y-1)}):(v.push({s:m.totalShapeLength*x,e:m.totalShapeLength}),v.push({s:0,e:m.totalShapeLength*(y-1)}));var w=this.addShapes(m,v[0]);if(v[0].s!==v[0].e){if(v.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var _=w.pop();this.addPaths(w,d),w=this.addShapes(m,v[1],_)}else this.addPaths(w,d),w=this.addShapes(m,v[1]);this.addPaths(w,d)}}m.shape.paths=d}}else if(this._mdf)for(l=0;l<n;l+=1)this.shapes[l].pathsData.length=0,this.shapes[l].shape._mdf=!0},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t.addShape(e[r])},TrimModifier.prototype.addSegment=function(e,t,r,n,i,a,s){i.setXYAt(t[0],t[1],"o",a),i.setXYAt(r[0],r[1],"i",a+1),s&&i.setXYAt(e[0],e[1],"v",a),i.setXYAt(n[0],n[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,r,n){t.setXYAt(e[1],e[5],"o",r),t.setXYAt(e[2],e[6],"i",r+1),n&&t.setXYAt(e[0],e[4],"v",r),t.setXYAt(e[3],e[7],"v",r+1)},TrimModifier.prototype.addShapes=function(e,t,r){var n,i,a,s,o,l,u,c,f=e.pathsData,h=e.shape.paths.shapes,p=e.shape.paths._length,m=0,d=[],g=!0;for(r?(o=r._length,c=r._length):(r=shapePool.newElement(),o=0,c=0),d.push(r),n=0;n<p;n+=1){for(i=1,l=f[n].lengths,r.c=h[n].c,a=h[n].c?l.length:l.length+1;i<a;i+=1)if(m+(s=l[i-1]).addedLength<t.s)m+=s.addedLength,r.c=!1;else if(m>t.e){r.c=!1;break}else t.s<=m&&t.e>=m+s.addedLength?(this.addSegment(h[n].v[i-1],h[n].o[i-1],h[n].i[i],h[n].v[i],r,o,g),g=!1):(u=bez.getNewSegment(h[n].v[i-1],h[n].v[i],h[n].o[i-1],h[n].i[i],(t.s-m)/s.addedLength,(t.e-m)/s.addedLength,l[i-1]),this.addSegmentFromArray(u,r,o,g),g=!1,r.c=!1),m+=s.addedLength,o+=1;if(h[n].c&&l.length){if(s=l[i-1],m<=t.e){var v=l[i-1].addedLength;t.s<=m&&t.e>=m+v?(this.addSegment(h[n].v[i-1],h[n].o[i-1],h[n].i[0],h[n].v[0],r,o,g),g=!1):(u=bez.getNewSegment(h[n].v[i-1],h[n].v[0],h[n].o[i-1],h[n].i[0],(t.s-m)/v,(t.e-m)/v,l[i-1]),this.addSegmentFromArray(u,r,o,g),g=!1,r.c=!1)}else r.c=!1;m+=s.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[c][0],r.v[c][1],"i",c),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),m>t.e)break;n<p-1&&(r=shapePool.newElement(),g=!0,d.push(r),o=0)}return d},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var r,n,i,a,s,o,l=t/100,u=[0,0],c=e._length,f=0;for(f=0;f<c;f+=1)u[0]+=e.v[f][0],u[1]+=e.v[f][1];u[0]/=c,u[1]/=c;var h=shapePool.newElement();for(f=0,h.c=e.c;f<c;f+=1)r=e.v[f][0]+(u[0]-e.v[f][0])*l,n=e.v[f][1]+(u[1]-e.v[f][1])*l,i=e.o[f][0]+-((u[0]-e.o[f][0])*l),a=e.o[f][1]+-((u[1]-e.o[f][1])*l),s=e.i[f][0]+-((u[0]-e.i[f][0])*l),o=e.i[f][1]+-((u[1]-e.i[f][1])*l),h.setTripleAt(r,n,i,a,s,o,f);return h},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,r,n,i,a,s,o=this.shapes.length,l=this.amount.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(a=this.shapes[r]).localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(s.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,i=a.shape.paths._length,n=0;n<i;n+=1)s.addShape(this.processPath(t[n],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0}function r(e,t,r){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var n,i=t.or.k.length;for(n=0;n<i;n+=1)t.or.k[n].to=null,t.or.k[n].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return r.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var r;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),i=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(n=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){var n=[],i=[],a=this.px,s=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(n[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),n[1]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),i[0]=a.getValueAtTime(a.keyframes[0].t/r,0),i[1]=s.getValueAtTime(s.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(n[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),n[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),i[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0)):(n=[a.pv,s.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),i[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime))}else n=i=e;this.v.rotate(-Math.atan2(n[1]-i[1],n[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length){if(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk)if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;else this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],r),r.prototype.addDynamicProperty=t,r.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,t,n){return new r(e,t,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return 1e-5>=Math.abs(e)}function lerp(e,t,r){return e*(1-r)+t*r}function lerpPoint(e,t,r){return[lerp(e[0],t[0],r),lerp(e[1],t[1],r)]}function quadRoots(e,t,r){if(0===e)return[];var n=t*t-4*e*r;if(n<0)return[];var i=-t/(2*e);if(0===n)return[i];var a=Math.sqrt(n)/(2*e);return[i-a,i+a]}function polynomialCoefficients(e,t,r,n){return[-e+3*t-3*r+n,3*e-6*t+3*r,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,r,n,i){i&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),i&&pointEqual(r,n)&&(r=lerpPoint(e,n,2/3));var a=polynomialCoefficients(e[0],t[0],r[0],n[0]),s=polynomialCoefficients(e[1],t[1],r[1],n[1]);this.a=[a[0],s[0]],this.b=[a[1],s[1]],this.c=[a[2],s[2]],this.d=[a[3],s[3]],this.points=[e,t,r,n]}function extrema(e,t){var r=e.points[0][t],n=e.points[e.points.length-1][t];if(r>n){var i=n;n=r,r=i}for(var a=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),s=0;s<a.length;s+=1)if(a[s]>0&&a[s]<1){var o=e.point(a[s])[t];o<r?r=o:o>n&&(n=o)}return{min:r,max:n}}function intersectData(e,t,r){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+r)/2,t1:t,t2:r}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,r,n,i,a){if(boxIntersect(e,t)){if(r>=a||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)return void i.push([e.t,t.t]);var s=splitData(e),o=splitData(t);intersectsImpl(s[0],o[0],r+1,n,i,a),intersectsImpl(s[0],o[1],r+1,n,i,a),intersectsImpl(s[1],o[0],r+1,n,i,a),intersectsImpl(s[1],o[1],r+1,n,i,a)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,r,n){var i=[e[0],e[1],1],a=[t[0],t[1],1],s=[r[0],r[1],1],o=[n[0],n[1],1],l=crossProduct(crossProduct(i,a),crossProduct(s,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,r){return[e[0]+Math.cos(t)*r,e[1]-Math.sin(t)*r]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,r,n,i,a,s){var o=r-Math.PI/2,l=r+Math.PI/2,u=t[0]+Math.cos(r)*n*i,c=t[1]-Math.sin(r)*n*i;e.setTripleAt(u,c,u+Math.cos(o)*a,c-Math.sin(o)*a,u+Math.cos(l)*s,c-Math.sin(l)*s,e.length())}function getPerpendicularVector(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=-(.5*Math.PI);return[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]]}function getProjectingAngle(e,t){var r=0===t?e.length()-1:t-1,n=(t+1)%e.length(),i=getPerpendicularVector(e.v[r],e.v[n]);return Math.atan2(0,1)-Math.atan2(i[1],i[0])}function zigZagCorner(e,t,r,n,i,a,s){var o=getProjectingAngle(t,r),l=t.v[r%t._length],u=t.v[0===r?t._length-1:r-1],c=t.v[(r+1)%t._length],f=2===a?Math.sqrt(Math.pow(l[0]-u[0],2)+Math.pow(l[1]-u[1],2)):0,h=2===a?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(e,t.v[r%t._length],o,s,n,h/((i+1)*2),f/((i+1)*2),a)}function zigZagSegment(e,t,r,n,i,a){for(var s=0;s<n;s+=1){var o=(s+1)/(n+1),l=2===i?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,u=t.normalAngle(o);setPoint(e,t.point(o),u,a,r,l/((n+1)*2),l/((n+1)*2),i),a=-a}return a}function linearOffset(e,t,r){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,r),polarOffset(t,n,r)]}function offsetSegment(e,t){r=(o=linearOffset(e.points[0],e.points[1],t))[0],n=o[1],i=(o=linearOffset(e.points[1],e.points[2],t))[0],a=o[1],s=(o=linearOffset(e.points[2],e.points[3],t))[0];var r,n,i,a,s,o,l=o[1],u=lineIntersection(r,n,i,a);null===u&&(u=n);var c=lineIntersection(s,l,i,a);return null===c&&(c=s),new PolynomialBezier(r,u,c,l)}function joinLines(e,t,r,n,i){var a=t.points[3],s=r.points[0];if(3===n||pointEqual(a,s))return a;if(2===n){var o=-t.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,u=lineIntersection(a,polarOffset(a,o+Math.PI/2,100),s,polarOffset(s,o+Math.PI/2,100)),c=u?pointDistance(u,a):pointDistance(a,s)/2,f=polarOffset(a,o,2*c*roundCorner);return e.setXYAt(f[0],f[1],"o",e.length()-1),f=polarOffset(s,l,2*c*roundCorner),e.setTripleAt(s[0],s[1],s[0],s[1],f[0],f[1],e.length()),s}var h=pointEqual(a,t.points[2])?t.points[0]:t.points[2],p=pointEqual(s,r.points[1])?r.points[3]:r.points[1],m=lineIntersection(h,a,s,p);return m&&pointDistance(m,a)<i?(e.setTripleAt(m[0],m[1],m[0],m[1],m[0],m[1],e.length()),m):a}function getIntersection(e,t){var r=e.intersections(t);return(r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length)?r[0]:null}function pruneSegmentIntersection(e,t){var r=e.slice(),n=t.slice(),i=getIntersection(e[e.length-1],t[0]);return(i&&(r[e.length-1]=e[e.length-1].split(i[0])[0],n[0]=t[0].split(i[1])[1]),e.length>1&&t.length>1&&(i=getIntersection(e[0],t[t.length-1])))?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[r,n]}function pruneIntersections(e){for(var t,r=1;r<e.length;r+=1)t=pruneSegmentIntersection(e[r-1],e[r]),e[r-1]=t[0],e[r]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var r,n,i,a,s=e.inflectionPoints();if(0===s.length)return[offsetSegment(e,t)];if(1===s.length||floatEqual(s[1],1))return r=(i=e.split(s[0]))[0],n=i[1],[offsetSegment(r,t),offsetSegment(n,t)];r=(i=e.split(s[0]))[0];var o=(s[1]-s[0])/(1-s[0]);return a=(i=i[1].split(o))[0],n=i[1],[offsetSegment(r,t),offsetSegment(a,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",i=t.length,a=0;a<i;a+=1)switch(t[a].toLowerCase()){case"italic":n="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:n,weight:e.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,r,n,i,a){var s=a?-1:1,o=n.s.v[0]+(1-n.s.v[0])*(1-i),l=n.s.v[1]+(1-n.s.v[1])*(1-i);e.translate(n.p.v[0]*s*i,n.p.v[1]*s*i,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*s*i),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),r.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),r.scale(a?1/o:o,a?1/l:l),r.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,r,n){for(this.elem=e,this.arr=t,this.pos=r,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[r]);r>0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]._render=t,"gr"===e[r].ty&&this.changeGroupRender(e[r].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t=!1;if(this._mdf||e){var r,n,i,a,s,o,l,u,c=Math.ceil(this.c.v);if(this._groups.length<c){for(;this._groups.length<c;){var f={it:this.cloneElements(this._elements),ty:"gr"};f.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,f),this._groups.splice(0,0,f),this._currentCopies+=1}this.elem.reloadShapes(),t=!0}for(i=0,s=0;i<=this._groups.length-1;i+=1){if(o=s<c,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var h=this.elemsData[i].it,p=h[h.length-1];0!==p.transform.op.v?(p.transform.op._mdf=!0,p.transform.op.v=0):p.transform.op._mdf=!1}s+=1}this._currentCopies=c;var m=this.o.v,d=m%1,g=m>0?Math.floor(m):Math.ceil(m),v=this.pMatrix.props,x=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var b=0;if(m>0){for(;b<g;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,d,!1),b+=d)}else if(m<0){for(;b>g;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-d,!0),b-=d)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,s=this._currentCopies;s;){if(u=(n=(r=this.elemsData[i].it)[r.length-1].transform.mProps.v.props).length,r[r.length-1].transform.mProps._mdf=!0,r[r.length-1].transform.op._mdf=!0,r[r.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),l=0;l<u;l+=1)n[l]=this.matrix.props[l];this.matrix.reset()}else for(this.matrix.reset(),l=0;l<u;l+=1)n[l]=this.matrix.props[l];b+=1,s-=1,i+=a}}else for(s=this._currentCopies,i=0,a=1;s;)n=(r=this.elemsData[i].it)[r.length-1].transform.mProps.v.props,r[r.length-1].transform.mProps._mdf=!1,r[r.length-1].transform.op._mdf=!1,s-=1,i+=a;return t},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var r,n,i,a,s,o,l,u,c,f,h,p,m,d=shapePool.newElement();d.c=e.c;var g=e._length,v=0;for(r=0;r<g;r+=1)n=e.v[r],a=e.o[r],i=e.i[r],n[0]===a[0]&&n[1]===a[1]&&n[0]===i[0]&&n[1]===i[1]?0!==r&&r!==g-1||e.c?(s=0===r?e.v[g-1]:e.v[r-1],l=(o=Math.sqrt(Math.pow(n[0]-s[0],2)+Math.pow(n[1]-s[1],2)))?Math.min(o/2,t)/o:0,u=p=n[0]+(s[0]-n[0])*l,c=m=n[1]-(n[1]-s[1])*l,f=u-(u-n[0])*roundCorner,h=c-(c-n[1])*roundCorner,d.setTripleAt(u,c,f,h,p,m,v),v+=1,s=r===g-1?e.v[0]:e.v[r+1],l=(o=Math.sqrt(Math.pow(n[0]-s[0],2)+Math.pow(n[1]-s[1],2)))?Math.min(o/2,t)/o:0,u=f=n[0]+(s[0]-n[0])*l,c=h=n[1]+(s[1]-n[1])*l,p=u-(u-n[0])*roundCorner,m=c-(c-n[1])*roundCorner,d.setTripleAt(u,c,f,h,p,m,v)):d.setTripleAt(n[0],n[1],a[0],a[1],i[0],i[1],v):d.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],v),v+=1;return d},RoundCornersModifier.prototype.processShapes=function(e){var t,r,n,i,a,s,o=this.shapes.length,l=this.rd.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(a=this.shapes[r]).localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(s.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,i=a.shape.paths._length,n=0;n<i;n+=1)s.addShape(this.processPath(t[n],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,r=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(r<0)return[];var n=Math.sqrt(r);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),r=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),i=lerpPoint(t,r,e),a=lerpPoint(r,n,e),s=lerpPoint(i,a,e);return[new PolynomialBezier(this.points[0],t,i,s,!0),new PolynomialBezier(s,a,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,r){void 0===t&&(t=2),void 0===r&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,r),n},PolynomialBezier.shapeSegment=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[r],e.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[r],e.i[r],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,r,n){var i=e._length,a=shapePool.newElement();if(a.c=e.c,e.c||(i-=1),0===i)return a;var s=-1,o=PolynomialBezier.shapeSegment(e,0);zigZagCorner(a,e,0,t,r,n,s);for(var l=0;l<i;l+=1)s=zigZagSegment(a,o,t,r,n,-s),o=l!==i-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%i):null,zigZagCorner(a,e,l+1,t,r,n,s);return a},ZigZagModifier.prototype.processShapes=function(e){var t,r,n,i,a,s,o=this.shapes.length,l=this.amplitude.v,u=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(a=this.shapes[r]).localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(s.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,i=a.shape.paths._length,n=0;n<i;n+=1)s.addShape(this.processPath(t[n],l,u,c));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,r,n){var i,a,s,o=shapePool.newElement();o.c=e.c;var l=e.length();e.c||(l-=1);var u=[];for(i=0;i<l;i+=1)s=PolynomialBezier.shapeSegment(e,i),u.push(offsetSegmentSplit(s,t));if(!e.c)for(i=l-1;i>=0;i-=1)s=PolynomialBezier.shapeSegmentInverted(e,i),u.push(offsetSegmentSplit(s,t));u=pruneIntersections(u);var c=null,f=null;for(i=0;i<u.length;i+=1){var h=u[i];for(f&&(c=joinLines(o,f,h[0],r,n)),f=h[h.length-1],a=0;a<h.length;a+=1)s=h[a],c&&pointEqual(s.points[0],c)?o.setXYAt(s.points[1][0],s.points[1][1],"o",o.length()-1):o.setTripleAt(s.points[0][0],s.points[0][1],s.points[1][0],s.points[1][1],s.points[0][0],s.points[0][1],o.length()),o.setTripleAt(s.points[3][0],s.points[3][1],s.points[3][0],s.points[3][1],s.points[2][0],s.points[2][1],o.length()),c=s.points[3]}return u.length&&joinLines(o,f,u[0][0],r,n),o},OffsetPathModifier.prototype.processShapes=function(e){var t,r,n,i,a,s,o=this.shapes.length,l=this.amount.v,u=this.miterLimit.v,c=this.lineJoin;if(0!==l)for(r=0;r<o;r+=1){if(s=(a=this.shapes[r]).localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(s.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,i=a.shape.paths._length,n=0;n<i;n+=1)s.addShape(this.processPath(t[n],l,c,u));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e=5e3,t={w:0,size:0,shapes:[],data:{shapes:[]}},r=[];r=r.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=127988,i=917631,a=917601,s=917626,o=65039,l=8205,u=127462,c=127487,f=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function h(e){var t,r=e.split(","),n=r.length,i=[];for(t=0;t<n;t+=1)"sans-serif"!==r[t]&&"monospace"!==r[t]&&i.push(r[t]);return i.join(",")}function p(e,t){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=t;var n=createTag("span");n.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(n),document.body.appendChild(r);var i=n.offsetWidth;return n.style.fontFamily=h(e)+", "+t,{node:n,w:i,parent:r}}function m(){var t,r,n,i=this.fonts.length,a=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?a-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(r=this.fonts[t].monoCase.node,n=this.fonts[t].monoCase.w,r.offsetWidth!==n?(a-=1,this.fonts[t].loaded=!0):(r=this.fonts[t].sansCase.node,n=this.fonts[t].sansCase.w,r.offsetWidth!==n&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<e?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function d(e,t){var r,n=document.body&&t?"svg":"canvas",i=getFontProperties(e);if("svg"===n){var a=createNS("text");a.style.fontSize="100px",a.setAttribute("font-family",e.fFamily),a.setAttribute("font-style",i.style),a.setAttribute("font-weight",i.weight),a.textContent="1",e.fClass?(a.style.fontFamily="inherit",a.setAttribute("class",e.fClass)):a.style.fontFamily=e.fFamily,t.appendChild(a),r=a}else{var s=new OffscreenCanvas(500,500).getContext("2d");s.font=i.style+" "+i.weight+" 100px "+e.fFamily,r=s}return{measureText:function(e){return"svg"===n?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}}}function g(e,t){if(!e){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=e.list;return}if(!document.body){this.isLoaded=!0,e.list.forEach(function(e){e.helper=d(e),e.cache={}}),this.fonts=e.list;return}var r=e.list,n=r.length,i=n;for(a=0;a<n;a+=1){var a,s,o,l=!0;if(r[a].loaded=!1,r[a].monoCase=p(r[a].fFamily,"monospace"),r[a].sansCase=p(r[a].fFamily,"sans-serif"),r[a].fPath){if("p"===r[a].fOrigin||3===r[a].origin){if((s=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[a].fFamily+'"], style[f-origin="3"][f-family="'+r[a].fFamily+'"]')).length>0&&(l=!1),l){var u=createTag("style");u.setAttribute("f-forigin",r[a].fOrigin),u.setAttribute("f-origin",r[a].origin),u.setAttribute("f-family",r[a].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+r[a].fFamily+"; font-style: normal; src: url('"+r[a].fPath+"');}",t.appendChild(u)}}else if("g"===r[a].fOrigin||1===r[a].origin){for(o=0,s=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');o<s.length;o+=1)-1!==s[o].href.indexOf(r[a].fPath)&&(l=!1);if(l){var c=createTag("link");c.setAttribute("f-forigin",r[a].fOrigin),c.setAttribute("f-origin",r[a].origin),c.type="text/css",c.rel="stylesheet",c.href=r[a].fPath,document.body.appendChild(c)}}else if("t"===r[a].fOrigin||2===r[a].origin){for(o=0,s=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');o<s.length;o+=1)r[a].fPath===s[o].src&&(l=!1);if(l){var f=createTag("link");f.setAttribute("f-forigin",r[a].fOrigin),f.setAttribute("f-origin",r[a].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",r[a].fPath),t.appendChild(f)}}}else r[a].loaded=!0,i-=1;r[a].helper=d(r[a],t),r[a].cache={},this.fonts.push(r[a])}0===i?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function v(e){if(e){this.chars||(this.chars=[]);var t,r,n,i=e.length,a=this.chars.length;for(t=0;t<i;t+=1){for(r=0,n=!1;r<a;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(n=!0),r+=1;n||(this.chars.push(e[t]),a+=1)}}}function x(e,r,n){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===e&&this.chars[i].style===r&&this.chars[i].fFamily===n)return this.chars[i];i+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,r,n)),t}function y(e,t,r){var n=this.getFontByName(t),i=e;if(!n.cache[i]){var a=n.helper;if(" "===e){var s=a.measureText("|"+e+"|"),o=a.measureText("||");n.cache[i]=(s-o)/100}else n.cache[i]=a.measureText(e)/100}return n.cache[i]*r}function b(e){for(var t=0,r=this.fonts.length;t<r;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]}function w(e){var t=0,r=e.charCodeAt(0);if(r>=55296&&r<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=(r-55296)*1024+n-56320+65536)}return t}function _(e){return e===l}function D(e){return e===o}function C(e){var t=w(e);return!!(t>=u)&&!!(t<=c)}function A(e){return C(e.substr(0,2))&&C(e.substr(2,2))}function E(e){return -1!==r.indexOf(e)}function N(e,t){var r=w(e.substr(t,2));if(r!==n)return!1;var o=0;for(t+=2;o<5;){if((r=w(e.substr(t,2)))<a||r>s)return!1;o+=1,t+=2}return w(e.substr(t,2))===i}function S(){this.isLoaded=!0}var M=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return M.isModifier=function(e,t){var r=e.toString(16)+t.toString(16);return -1!==f.indexOf(r)},M.isZeroWidthJoiner=_,M.isFlagEmoji=A,M.isRegionalCode=C,M.isCombinedCharacter=E,M.isRegionalFlag=N,M.isVariationSelector=D,M.BLACK_FLAG_CODE_POINT=n,M.prototype={addChars:v,addFonts:g,getCharData:x,getFontByName:b,measureText:y,checkLoadedFonts:m,setIsLoaded:S},M}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var e={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(t){return e[t]||""}}();function SliderEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function AngleEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function ColorEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function PointEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function LayerIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function MaskIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function CheckboxEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var r,n,i=e.ef||[];this.effectElements=[];var a=i.length;for(r=0;r<a;r+=1)n=new GroupEffect(i[r],t),this.effectElements.push(n)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,r)}function AudioElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,r),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var r,n,i=this.data.ef.length,a=this.data.ef;for(r=0;r<i;r+=1){switch(n=null,a[r].ty){case 0:n=new SliderEffect(a[r],t,this);break;case 1:n=new AngleEffect(a[r],t,this);break;case 2:n=new ColorEffect(a[r],t,this);break;case 3:n=new PointEffect(a[r],t,this);break;case 4:case 7:n=new CheckboxEffect(a[r],t,this);break;case 10:n=new LayerIndexEffect(a[r],t,this);break;case 11:n=new MaskIndexEffect(a[r],t,this);break;case 5:n=new EffectsManager(a[r],t,this);break;default:n=new NoValueEffect(a[r],t,this)}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),r=e("effects"),n=e("shape"),i=e("text"),a=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var s=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(s),0===this.data.ty||this.data.xt?this.compInterface=a(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=i(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,r){this.globalData=t,this.comp=r,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var r,n=this.dynamicProperties.length;for(r=0;r<n;r+=1)(t||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,r,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)!this.elements[t]&&(r=this.layers[t]).ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){this.completeLayers=!1;var t,r,n=e.length,i=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<i;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,r){for(var n=this.elements,i=this.layers,a=0,s=i.length;a<s;)i[a].ind==t&&(n[a]&&!0!==n[a]?(r.push(n[a]),n[a].setAsParent(),void 0!==i[a].parent?this.buildElementParenting(e,i[a].parent,r):e.setHierarchy(r)):(this.buildItem(a),this.addPendingElement(e))),a+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,r=e.length;for(t=0;t<r;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,r=this.elements.length;for(t=0;t<r;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t=e.shift();if("number"==typeof t)r=this.elements[t];else{var r,n,i=this.elements.length;for(n=0;n<i;n+=1)if(this.elements[n].data.nm===t){r=this.elements[n];break}}return 0===e.length?r:r.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,r){this.data=e,this.element=t,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n=this.globalData.defs,i=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(i),this.solidPath="";var a=this.masksProperties,s=0,o=[],l=createElementID(),u="clipPath",c="clip-path";for(f=0;f<i;f+=1)if(("a"!==a[f].mode&&"n"!==a[f].mode||a[f].inv||100!==a[f].o.k||a[f].o.x)&&(u="mask",c="mask"),("s"===a[f].mode||"i"===a[f].mode)&&0===s?((m=createNS("rect")).setAttribute("fill","#ffffff"),m.setAttribute("width",this.element.comp.data.w||0),m.setAttribute("height",this.element.comp.data.h||0),o.push(m)):m=null,h=createNS("path"),"n"===a[f].mode)this.viewData[f]={op:PropertyFactory.getProp(this.element,a[f].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,a[f],3),elem:h,lastPath:""},n.appendChild(h);else{if(s+=1,h.setAttribute("fill","s"===a[f].mode?"#000000":"#ffffff"),h.setAttribute("clip-rule","nonzero"),0!==a[f].x.k?(u="mask",c="mask",v=PropertyFactory.getProp(this.element,a[f].x,0,null,this.element),x=createElementID(),(d=createNS("filter")).setAttribute("id",x),(g=createNS("feMorphology")).setAttribute("operator","erode"),g.setAttribute("in","SourceGraphic"),g.setAttribute("radius","0"),d.appendChild(g),n.appendChild(d),h.setAttribute("stroke","s"===a[f].mode?"#000000":"#ffffff")):(g=null,v=null),this.storedData[f]={elem:h,x:v,expan:g,lastPath:"",lastOperator:"",filterId:x,lastRadius:0},"i"===a[f].mode){var f,h,p,m,d,g,v,x,y=o.length,b=createNS("g");for(p=0;p<y;p+=1)b.appendChild(o[p]);var w=createNS("mask");w.setAttribute("mask-type","alpha"),w.setAttribute("id",l+"_"+s),w.appendChild(h),n.appendChild(w),b.setAttribute("mask","url("+getLocationHref()+"#"+l+"_"+s+")"),o.length=0,o.push(b)}else o.push(h);a[f].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[f]={elem:h,lastPath:"",op:PropertyFactory.getProp(this.element,a[f].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,a[f],3),invRect:m},this.viewData[f].prop.k||this.drawPath(a[f],this.viewData[f].prop.v,this.viewData[f])}for(f=0,this.maskElement=createNS(u),i=o.length;f<i;f+=1)this.maskElement.appendChild(o[f]);s>0&&(this.maskElement.setAttribute("id",l),this.element.maskedElement.setAttribute(c,"url("+getLocationHref()+"#"+l+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,r=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<n;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),r=0;r<n;r+=1)t.multiply(this.hierarchy[r].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(r),e=1;e<t;e+=1){var n=this.localTransforms[e].matrix;r.multiply(n)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var i=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)i*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=i}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,r=e.length;for(t=0;t<r;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t,r,n=[];n.push(this.finalTransform);for(var i=!0,a=this.comp;i;)a.finalTransform?(a.data.hasMask&&n.splice(0,0,a.finalTransform),a=a.comp):i=!1;var s=n.length;for(t=0;t<s;t+=1)r=n[t].mat.applyToPointArray(0,0,0),e=[e[0]-r[0],e[1]-r[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,r=this.element.finalTransform.mat,n=this.masksProperties.length;for(t=0;t<n;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var i=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),i.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+(" h"+this.globalData.compSize.w+" v"+this.globalData.compSize.h+" h-"+this.globalData.compSize.w+(" v-"+this.globalData.compSize.h)+" ")},MaskElement.prototype.drawPath=function(e,t,r){var n,i,a=" M"+t.v[0][0]+","+t.v[0][1];for(n=1,i=t._length;n<i;n+=1)a+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[n][0]+","+t.i[n][1]+" "+t.v[n][0]+","+t.v[n][1];if(t.c&&i>1&&(a+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==a){var s="";r.elem&&(t.c&&(s=e.inv?this.solidPath+a:a),r.elem.setAttribute("d",s)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};function t(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),e}return e.createFilter=function e(e,t){var r=createNS("filter");return r.setAttribute("id",e),!0!==t&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},e.createAlphaToLuminanceFilter=t,e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"u">typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,r,n="SourceGraphic",i=e.data.ef?e.data.ef.length:0,a=createElementID(),s=filtersFactory.createFilter(a,!0),o=0;for(t=0,this.filters=[];t<i;t+=1){r=null;var l=e.data.ef[t].ty;registeredEffects$1[l]&&(r=new registeredEffects$1[l].effect(s,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),r&&this.filters.push(r)}o&&(e.globalData.defs.appendChild(s),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+a+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,r){registeredEffects$1[e]={effect:t,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}
vendor: 4,900 bytes, line 1
1function RenderableDOMElement(){}function IImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var r=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var i=createElementID();if(r.setAttribute("id",i),r.appendChild(n),this.globalData.defs.appendChild(r),this.checkMasks()){var a=createNS("g");a.setAttribute("clip-path","url("+getLocationHref()+"#"+i+")"),a.appendChild(this.layerElement),this.transformedElement=a,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+i+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,r,n,i,a=this.layerId+"_"+e;if(1===e||3===e){var s=createNS("mask");s.setAttribute("id",a),s.setAttribute("mask-type",3===e?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),s.appendChild(n),this.globalData.defs.appendChild(s),featureSupport.maskType||1!==e||(s.setAttribute("mask-type","luminance"),t=createElementID(),r=filtersFactory.createFilter(t),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(i=createNS("g")).appendChild(n),s.appendChild(i),i.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var o=createNS("mask");o.setAttribute("id",a),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),t=createElementID(),r=filtersFactory.createFilter(t);var u=createNS("feComponentTransfer");u.setAttribute("in","SourceGraphic"),r.appendChild(u);var c=createNS("feFuncA");c.setAttribute("type","table"),c.setAttribute("tableValues","1.0 0.0"),u.appendChild(c),this.globalData.defs.appendChild(r);var f=createNS("rect");f.setAttribute("width",this.comp.data.w),f.setAttribute("height",this.comp.data.h),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("fill","#ffffff"),f.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(f),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),l.appendChild(f),i.appendChild(this.layerElement),l.appendChild(i)),this.globalData.defs.appendChild(o)}this.matteMasks[e]=a}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}}
vendor: 54,795 bytes, line 1
1,function(){extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement)}(),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,r=this.shapeModifiers.length;for(t=0;t<r;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=0,r=this.shapeModifiers.length;t<r;)if(this.shapeModifiers[t].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(t=this.shapeModifiers.length,e=t-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,r=0,n=t.length;r<n;){if(t[r].elem===e)return t[r].pos;r+=1}return 0},addProcessedElement:function(e,t){for(var r=this.processedElements,n=r.length;n;)if(r[n-=1].elem===e){r[n].pos=t;return}r.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,r){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=r,this.lvl=t,this._isAnimated=!!r.k;for(var n=0,i=e.length;n<i;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,r,n){this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var i,a,s=t.length||0;for(i=0;i<s;i+=1)a=PropertyFactory.getProp(e,t[i].v,0,0,this),this.k=a.k||this.k,this.dataProps[i]={n:t[i].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r}function SVGNoStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(e,t,r){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var n=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,r)}function SVGGradientStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,r){this.transform={mProps:e,op:t,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<r;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var r=0,n=this.o.length/2;r<n;){if(Math.abs(e[4*r]-e[4*t+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,r,n,i=4*this.data.p;for(t=0;t<i;t+=1)r=t%4==0?100:255,n=Math.round(this.prop.v[t]*r),this.c[t]!==n&&(this.c[t]=n,this._cmdf=!e);if(this.o.length)for(i=this.prop.v.length,t=4*this.data.p;t<i;t+=1)r=t%2==0?100:1,n=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==n&&(this.o[t-4*this.data.p]=n,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,r){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,t),this.setGradientOpacity(t,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var r,n,i,a=createElementID(),s=createNS(1===t.t?"linearGradient":"radialGradient");s.setAttribute("id",a),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var o=[];for(n=0,i=4*t.g.p;n<i;n+=4)r=createNS("stop"),s.appendChild(r),o.push(r);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),this.gf=s,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var r,n,i,a=createNS("mask"),s=createNS("path");a.appendChild(s);var o=createElementID(),l=createElementID();a.setAttribute("id",l);var u=createNS(1===e.t?"linearGradient":"radialGradient");u.setAttribute("id",o),u.setAttribute("spreadMethod","pad"),u.setAttribute("gradientUnits","userSpaceOnUse"),i=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var c=this.stops;for(n=4*e.g.p;n<i;n+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),u.appendChild(r),c.push(r);s.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===e.ty&&(s.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&s.setAttribute("stroke-miterlimit",e.ml)),this.of=u,this.ms=a,this.ost=c,this.maskId=l,t.msElem=s}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,r,n){if(0===t)return"";var i,a=e.o,s=e.i,o=e.v,l=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(i=1;i<t;i+=1)l+=" C"+n.applyToPointStringified(a[i-1][0],a[i-1][1])+" "+n.applyToPointStringified(s[i][0],s[i][1])+" "+n.applyToPointStringified(o[i][0],o[i][1]);return r&&t&&(l+=" C"+n.applyToPointStringified(a[i-1][0],a[i-1][1])+" "+n.applyToPointStringified(s[0][0],s[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1])+"z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function r(e,t,r){(r||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(r||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function n(){}function i(r,n,i){var a,s,o,l,u,c,f,h,p,m,d=n.styles.length,g=n.lvl;for(c=0;c<d;c+=1){if(l=n.sh._mdf||i,n.styles[c].lvl<g){for(h=t.reset(),p=g-n.styles[c].lvl,m=n.transformers.length-1;!l&&p>0;)l=n.transformers[m].mProps._mdf||l,p-=1,m-=1;if(l)for(p=g-n.styles[c].lvl,m=n.transformers.length-1;p>0;)h.multiply(n.transformers[m].mProps.v),p-=1,m-=1}else h=e;if(s=(f=n.sh.paths)._length,l){for(a=0,o="";a<s;a+=1)(u=f.shapes[a])&&u._length&&(o+=buildShapeString(u,u._length,u.c,h));n.caches[c]=o}else o=n.caches[c];n.styles[c].d+=!0===r.hd?"":o,n.styles[c]._mdf=l||n.styles[c]._mdf}}function a(e,t,r){var n=t.style;(t.c._mdf||r)&&n.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("fill-opacity",t.o.v)}function s(e,t,r){o(e,t,r),l(e,t,r)}function o(e,t,r){var n,i,a,s,o,l=t.gf,u=t.g._hasOpacity,c=t.s.v,f=t.e.v;if(t.o._mdf||r){var h="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(h,t.o.v)}if(t.s._mdf||r){var p=1===e.t?"x1":"cx",m="x1"===p?"y1":"cy";l.setAttribute(p,c[0]),l.setAttribute(m,c[1]),u&&!t.g._collapsable&&(t.of.setAttribute(p,c[0]),t.of.setAttribute(m,c[1]))}if(t.g._cmdf||r){n=t.cst;var d=t.g.c;for(i=0,a=n.length;i<a;i+=1)(s=n[i]).setAttribute("offset",d[4*i]+"%"),s.setAttribute("stop-color","rgb("+d[4*i+1]+","+d[4*i+2]+","+d[4*i+3]+")")}if(u&&(t.g._omdf||r)){var g=t.g.o;for(i=0,a=(n=t.g._collapsable?t.cst:t.ost).length;i<a;i+=1)s=n[i],t.g._collapsable||s.setAttribute("offset",g[2*i]+"%"),s.setAttribute("stop-opacity",g[2*i+1])}if(1===e.t)(t.e._mdf||r)&&(l.setAttribute("x2",f[0]),l.setAttribute("y2",f[1]),u&&!t.g._collapsable&&(t.of.setAttribute("x2",f[0]),t.of.setAttribute("y2",f[1])));else if((t.s._mdf||t.e._mdf||r)&&(o=Math.sqrt(Math.pow(c[0]-f[0],2)+Math.pow(c[1]-f[1],2)),l.setAttribute("r",o),u&&!t.g._collapsable&&t.of.setAttribute("r",o)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||r){o||(o=Math.sqrt(Math.pow(c[0]-f[0],2)+Math.pow(c[1]-f[1],2)));var v=Math.atan2(f[1]-c[1],f[0]-c[0]),x=t.h.v;x>=1?x=.99:x<=-1&&(x=-.99);var y=o*x,b=Math.cos(v+t.a.v)*y+c[0],w=Math.sin(v+t.a.v)*y+c[1];l.setAttribute("fx",b),l.setAttribute("fy",w),u&&!t.g._collapsable&&(t.of.setAttribute("fx",b),t.of.setAttribute("fy",w))}}function l(e,t,r){var n=t.style,i=t.d;i&&(i._mdf||r)&&i.dashStr&&(n.pElem.setAttribute("stroke-dasharray",i.dashStr),n.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),t.c&&(t.c._mdf||r)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||r)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return a;case"gf":return o;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return i;case"tr":return r;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}function LetterProps(e,t,r,n,i,a){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=i,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,r,n,i=this.shapes.length,a=this.stylesList.length,s=[],o=!1;for(r=0;r<a;r+=1){for(e=0,n=this.stylesList[r],o=!1,s.length=0;e<i;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(n)&&(s.push(t),o=t._isAnimated||o);s.length>1&&o&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var r,n=new SVGStyleData(e,t),i=n.pElem;return"st"===e.ty?r=new SVGStrokeStyleData(this,e,n):"fl"===e.ty?r=new SVGFillStyleData(this,e,n):"gf"===e.ty||"gs"===e.ty?(r=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,n),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),i.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))):"no"===e.ty&&(r=new SVGNoStyleData(this,e,n)),("st"===e.ty||"gs"===e.ty)&&(i.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),i.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),i.setAttribute("fill-opacity","0"),1===e.lj&&i.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&i.setAttribute("fill-rule","evenodd"),e.ln&&i.setAttribute("id",e.ln),e.cl&&i.setAttribute("class",e.cl),e.bm&&(i.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var r=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(r,r.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,r){var n=4;"rc"===e.ty?n=5:"el"===e.ty?n=6:"sr"===e.ty&&(n=7);var i=new SVGShapeData(t,r,ShapePropertyFactory.getShapeProp(this,e,n,this));return this.shapes.push(i),this.addShapeToModifiers(i),this.addToAnimatedContents(e,i),i},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var r=0,n=this.animatedContents.length;r<n;){if(this.animatedContents[r].element===t)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,r=e.styles,n=this.stylesList.length;for(t=0;t<n;t+=1)-1!==r.indexOf(this.stylesList[t])||this.stylesList[t].closed||r.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,r,n,i,a,s){var o,l,u,c,f,h,p=[].concat(a),m=e.length-1,d=[],g=[];for(o=m;o>=0;o-=1){if((h=this.searchProcessedElement(e[o]))?t[o]=r[h-1]:e[o]._render=s,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)h?t[o].style.closed=e[o].hd:t[o]=this.createStyleElement(e[o],i),e[o]._render&&t[o].style.pElem.parentNode!==n&&n.appendChild(t[o].style.pElem),d.push(t[o].style);else if("gr"===e[o].ty){if(h)for(l=0,u=t[o].it.length;l<u;l+=1)t[o].prevViewData[l]=t[o].it[l];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,t[o].gr,i+1,p,s),e[o]._render&&t[o].gr.parentNode!==n&&n.appendChild(t[o].gr)}else"tr"===e[o].ty?(h||(t[o]=this.createTransformElement(e[o],n)),c=t[o].transform,p.push(c)):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?(h||(t[o]=this.createShapeElement(e[o],p,i)),this.setElementStyles(t[o])):"tm"===e[o].ty||"rd"===e[o].ty||"ms"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(h?(f=t[o]).closed=!1:((f=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=f,this.shapeModifiers.push(f)),g.push(f)):"rp"===e[o].ty&&(h?(f=t[o]).closed=!0:(f=ShapeModifiers.getModifier(e[o].ty),t[o]=f,f.init(this,e,o,t),this.shapeModifiers.push(f),s=!1),g.push(f));this.addProcessedElement(e[o],o+1)}for(o=0,m=d.length;o<m;o+=1)d[o].closed=!0;for(o=0,m=g.length;o<m;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,r=this.animatedContents.length;for(e=0;e<r;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,r,n,i,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var s=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,s=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,s=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,s=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,s=!0),this.m!==i&&(this.m=i,this._mdf.m=!0,s=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,s=!0),s},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t,r=this.currentData,n=this.keysIndex;if(this.lock)return void this.setCurrentData(this.currentData);this.lock=!0,this._mdf=!1;var i=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(t=0;t<i;t+=1)a=n!==this.keysIndex?this.effectsSequence[t](a,a.t):this.effectsSequence[t](this.currentData,a.t);r!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,r=0,n=e.length;r<=n-1&&r!==n-1&&!(e[r+1].t>t);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,r,n=[],i=0,a=e.length,s=!1,o=!1,l="";i<a;)s=o,o=!1,t=e.charCodeAt(i),l=e.charAt(i),FontManager.isCombinedCharacter(t)?s=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,i)?l=e.substr(i,14):(r=e.charCodeAt(i+1))>=56320&&r<=57343&&(FontManager.isModifier(t,r)?(l=e.substr(i,2),s=!0):l=FontManager.isFlagEmoji(e.substr(i,4))?e.substr(i,4):e.substr(i,2)):t>56319?(r=e.charCodeAt(i+1),FontManager.isVariationSelector(t)&&(s=!0)):FontManager.isZeroWidthJoiner(t)&&(s=!0,o=!0),s?(n[n.length-1]+=l,s=!1):n.push(l),i+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,r=this.data,n=[],i=0,a=r.m.g,s=0,o=0,l=0,u=[],c=0,f=0,h=t.getFontByName(e.f),p=0,m=getFontProperties(h);e.fWeight=m.weight,e.fStyle=m.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),v=e.finalText.length,e.finalLineHeight=e.lh;var d=e.tr/1e3*e.finalSize;if(e.sz)for(var g,v,x,y,b,w,_,D,C,A,E=!0,N=e.sz[0],S=e.sz[1];E;){A=this.buildFinalText(e.t),C=0,c=0,v=A.length,d=e.tr/1e3*e.finalSize;var M=-1;for(g=0;g<v;g+=1)D=A[g].charCodeAt(0),x=!1," "===A[g]?M=g:(13===D||3===D)&&(c=0,x=!0,C+=e.finalLineHeight||1.2*e.finalSize),t.chars?(_=t.getCharData(A[g],h.fStyle,h.fFamily),p=x?0:_.w*e.finalSize/100):p=t.measureText(A[g],e.f,e.finalSize),c+p>N&&" "!==A[g]?(-1===M?v+=1:g=M,C+=e.finalLineHeight||1.2*e.finalSize,A.splice(g,+(M===g),"\r"),M=-1,c=0):(c+=p,c+=d);C+=h.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&S<C?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=A,v=e.finalText.length,E=!1)}c=-d,p=0;var T=0;for(g=0;g<v;g+=1)if(x=!1,13===(D=(B=e.finalText[g]).charCodeAt(0))||3===D?(T=0,u.push(c),f=c>f?c:f,c=-2*d,y="",x=!0,l+=1):y=B,t.chars?(_=t.getCharData(B,h.fStyle,t.getFontByName(e.f).fFamily),p=x?0:_.w*e.finalSize/100):p=t.measureText(y,e.f,e.finalSize)," "===B?T+=p+d:(c+=p+d+T,T=0),n.push({l:p,an:p,add:s,n:x,anIndexes:[],val:y,line:l,animatorJustifyOffset:0}),2==a){if(s+=p,""===y||" "===y||g===v-1){for((""===y||" "===y)&&(s-=p);o<=g;)n[o].an=s,n[o].ind=i,n[o].extra=p,o+=1;i+=1,s=0}}else if(3==a){if(s+=p,""===y||g===v-1){for(""===y&&(s-=p);o<=g;)n[o].an=s,n[o].ind=i,n[o].extra=p,o+=1;s=0,i+=1}}else n[i].ind=i,n[i].extra=0,i+=1;if(e.l=n,f=c>f?c:f,u.push(c),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=f,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=u;var k=r.a;w=k.length;var F=[];for(b=0;b<w;b+=1){for((P=k[b]).a.sc&&(e.strokeColorAnim=!0),P.a.sw&&(e.strokeWidthAnim=!0),(P.a.fc||P.a.fh||P.a.fs||P.a.fb)&&(e.fillColorAnim=!0),I=0,O=P.s.b,g=0;g<v;g+=1)(j=n[g]).anIndexes[b]=I,(1==O&&""!==j.val||2==O&&""!==j.val&&" "!==j.val||3==O&&(j.n||" "==j.val||g==v-1)||4==O&&(j.n||g==v-1))&&(1===P.s.rn&&F.push(I),I+=1);r.a[b].s.totalChars=I;var B,P,j,O,I,z,L=-1;if(1===P.s.rn)for(g=0;g<v;g+=1)L!=(j=n[g]).anIndexes[b]&&(L=j.anIndexes[b],z=F.splice(Math.floor(Math.random()*F.length),1)[0]),j.anIndexes[b]=z}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=h.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var r=this.copyData({},this.data.d.k[t].s);r=this.copyData(r,e),this.data.d.k[t].s=r,this.recalculate(t),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,r=Math.floor;function n(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),"e"in t?this.e=PropertyFactory.getProp(e,t.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var i=0,a=0,s=1,o=1;this.ne.v>0?i=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(i,a,s,o).get,u=0,c=this.finalS,f=this.finalE,h=this.data.sh;if(2===h)u=l(u=f===c?+(n>=f):e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(3===h)u=l(u=f===c?n>=f?0:1:1-e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(4===h)f===c?u=0:(u=e(0,t(.5/(f-c)+(n-c)/(f-c),1)))<.5?u*=2:u=1-2*(u-.5),u=l(u);else if(5===h){if(f===c)u=0;else{var p=f-c,m=-p/2+(n=t(e(0,n+.5-c),f-c)),d=p/2;u=Math.sqrt(1-m*m/(d*d))}u=l(u)}else 6===h?u=l(u=f===c?0:(1+Math.cos(Math.PI+2*Math.PI*(n=t(e(0,n+.5-c),f-c))/(f-c)))/2):(n>=r(c)&&(u=n-c<0?e(0,t(t(f,1)-(c-n),1)):e(0,t(f-n,1))),u=l(u));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var v=.5-.5*g;u<v?u=0:(u=(u-v)/g)>1&&(u=1)}return u*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/t,n=this.s.v/t+r,i=this.e.v/t+r;if(n>i){var a=n;n=i,i=a}this.finalS=n,this.finalE=i}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,r){return new n(e,t,r)}}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},i=PropertyFactory.getProp,a=t.a;this.a={r:a.r?i(e,a.r,0,degToRads,r):n,rx:a.rx?i(e,a.rx,0,degToRads,r):n,ry:a.ry?i(e,a.ry,0,degToRads,r):n,sk:a.sk?i(e,a.sk,0,degToRads,r):n,sa:a.sa?i(e,a.sa,0,degToRads,r):n,s:a.s?i(e,a.s,1,.01,r):n,a:a.a?i(e,a.a,1,0,r):n,o:a.o?i(e,a.o,0,.01,r):n,p:a.p?i(e,a.p,1,0,r):n,sw:a.sw?i(e,a.sw,0,0,r):n,sc:a.sc?i(e,a.sc,1,0,r):n,fc:a.fc?i(e,a.fc,1,0,r):n,fh:a.fh?i(e,a.fh,0,0,r):n,fs:a.fs?i(e,a.fs,0,.01,r):n,fb:a.fb?i(e,a.fb,0,.01,r):n,t:a.t?i(e,a.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,r=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e<r;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,n,i,a,s,o,l,u,c,f,h,p,m,d,g,v,x,y,b=this._moreOptions.alignment.v,w=this._animatorsData,_=this._textData,D=this.mHelper,C=this._renderType,A=this.renderedLetters.length,E=e.l;if(this._hasMaskedPath){if(W=this._pathData.m,!this._pathData.n||this._pathData._mdf){var N,S,M,T,k,F,B,P,j,O,I,z,L,R,q,U,H,V,W,G,$=W.v;for(this._pathData.r.v&&($=$.reverse()),k={tLength:0,segments:[]},T=$._length-1,U=0,M=0;M<T;M+=1)G=bez.buildBezierData($.v[M],$.v[M+1],[$.o[M][0]-$.v[M][0],$.o[M][1]-$.v[M][1]],[$.i[M+1][0]-$.v[M+1][0],$.i[M+1][1]-$.v[M+1][1]]),k.tLength+=G.segmentLength,k.segments.push(G),U+=G.segmentLength;M=T,W.v.c&&(G=bez.buildBezierData($.v[M],$.v[0],[$.o[M][0]-$.v[M][0],$.o[M][1]-$.v[M][1]],[$.i[0][0]-$.v[0][0],$.i[0][1]-$.v[0][1]]),k.tLength+=G.segmentLength,k.segments.push(G),U+=G.segmentLength),this._pathData.pi=k}if(k=this._pathData.pi,F=this._pathData.f.v,I=0,O=1,P=0,j=!0,R=k.segments,F<0&&W.v.c)for(k.tLength<Math.abs(F)&&(F=-Math.abs(F)%k.tLength),I=R.length-1,O=(L=R[I].points).length-1;F<0;)F+=L[O].partialLength,(O-=1)<0&&(I-=1,O=(L=R[I].points).length-1);z=(L=R[I].points)[O-1],q=(B=L[O]).partialLength}T=E.length,N=0,S=0;var Y=1.2*e.finalSize*.714,Z=!0;a=w.length;var X=-1,J=F,K=I,Q=O,ee=-1,et="",er=this.defaultPropsArray;if(2===e.j||1===e.j){var en=0,ei=0,ea=2===e.j?-.5:-1,es=0,eo=!0;for(M=0;M<T;M+=1)if(E[M].n){for(en&&(en+=ei);es<M;)E[es].animatorJustifyOffset=en,es+=1;en=0,eo=!0}else{for(i=0;i<a;i+=1)(r=w[i].a).t.propType&&(eo&&2===e.j&&(ei+=r.t.v*ea),(o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars)).length?en+=r.t.v*o[0]*ea:en+=r.t.v*o*ea);eo=!1}for(en&&(en+=ei);es<M;)E[es].animatorJustifyOffset=en,es+=1}for(M=0;M<T;M+=1){if(D.reset(),f=1,E[M].n)N=0,S+=e.yOffset,S+=+!!Z,F=J,Z=!1,this._hasMaskedPath&&(I=K,O=Q,z=(L=R[I].points)[O-1],q=(B=L[O]).partialLength,P=0),et="",x="",g="",y="",er=this.defaultPropsArray;else{if(this._hasMaskedPath){if(ee!==E[M].line){switch(e.j){case 1:F+=U-e.lineWidths[E[M].line];break;case 2:F+=(U-e.lineWidths[E[M].line])/2}ee=E[M].line}X!==E[M].ind&&(E[X]&&(F+=E[X].extra),F+=E[M].an/2,X=E[M].ind),F+=b[0]*E[M].an*.005;var el=0;for(i=0;i<a;i+=1)(r=w[i].a).p.propType&&((o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars)).length?el+=r.p.v[0]*o[0]:el+=r.p.v[0]*o),r.a.propType&&((o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars)).length?el+=r.a.v[0]*o[0]:el+=r.a.v[0]*o);for(j=!0,this._pathData.a.v&&(F=.5*E[0].an+(U-this._pathData.f.v-.5*E[0].an-.5*E[E.length-1].an)*X/(T-1)+this._pathData.f.v);j;)P+q>=F+el||!L?(H=(F+el-P)/B.partialLength,u=z.point[0]+(B.point[0]-z.point[0])*H,c=z.point[1]+(B.point[1]-z.point[1])*H,D.translate(-b[0]*E[M].an*.005,-(.01*(b[1]*Y))),j=!1):L&&(P+=B.partialLength,(O+=1)>=L.length&&(O=0,R[I+=1]?L=R[I].points:W.v.c?(O=0,L=R[I=0].points):(P-=B.partialLength,L=null)),L&&(z=B,q=(B=L[O]).partialLength));l=E[M].an/2-E[M].add,D.translate(-l,0,0)}else l=E[M].an/2-E[M].add,D.translate(-l,0,0),D.translate(-b[0]*E[M].an*.005,-b[1]*Y*.01,0);for(i=0;i<a;i+=1)(r=w[i].a).t.propType&&(o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars),(0!==N||0!==e.j)&&(this._hasMaskedPath?o.length?F+=r.t.v*o[0]:F+=r.t.v*o:o.length?N+=r.t.v*o[0]:N+=r.t.v*o));for(e.strokeWidthAnim&&(p=e.sw||0),e.strokeColorAnim&&(h=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(m=[e.fc[0],e.fc[1],e.fc[2]]),i=0;i<a;i+=1)(r=w[i].a).a.propType&&((o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars)).length?D.translate(-r.a.v[0]*o[0],-r.a.v[1]*o[1],r.a.v[2]*o[2]):D.translate(-r.a.v[0]*o,-r.a.v[1]*o,r.a.v[2]*o));for(i=0;i<a;i+=1)(r=w[i].a).s.propType&&((o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars)).length?D.scale(1+(r.s.v[0]-1)*o[0],1+(r.s.v[1]-1)*o[1],1):D.scale(1+(r.s.v[0]-1)*o,1+(r.s.v[1]-1)*o,1));for(i=0;i<a;i+=1){if(r=w[i].a,o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars),r.sk.propType&&(o.length?D.skewFromAxis(-r.sk.v*o[0],r.sa.v*o[1]):D.skewFromAxis(-r.sk.v*o,r.sa.v*o)),r.r.propType&&(o.length?D.rotateZ(-r.r.v*o[2]):D.rotateZ(-r.r.v*o)),r.ry.propType&&(o.length?D.rotateY(r.ry.v*o[1]):D.rotateY(r.ry.v*o)),r.rx.propType&&(o.length?D.rotateX(r.rx.v*o[0]):D.rotateX(r.rx.v*o)),r.o.propType&&(o.length?f+=(r.o.v*o[0]-f)*o[0]:f+=(r.o.v*o-f)*o),e.strokeWidthAnim&&r.sw.propType&&(o.length?p+=r.sw.v*o[0]:p+=r.sw.v*o),e.strokeColorAnim&&r.sc.propType)for(d=0;d<3;d+=1)o.length?h[d]+=(r.sc.v[d]-h[d])*o[0]:h[d]+=(r.sc.v[d]-h[d])*o;if(e.fillColorAnim&&e.fc){if(r.fc.propType)for(d=0;d<3;d+=1)o.length?m[d]+=(r.fc.v[d]-m[d])*o[0]:m[d]+=(r.fc.v[d]-m[d])*o;r.fh.propType&&(m=o.length?addHueToRGB(m,r.fh.v*o[0]):addHueToRGB(m,r.fh.v*o)),r.fs.propType&&(m=o.length?addSaturationToRGB(m,r.fs.v*o[0]):addSaturationToRGB(m,r.fs.v*o)),r.fb.propType&&(m=o.length?addBrightnessToRGB(m,r.fb.v*o[0]):addBrightnessToRGB(m,r.fb.v*o))}}for(i=0;i<a;i+=1)(r=w[i].a).p.propType&&(o=(n=w[i].s).getMult(E[M].anIndexes[i],_.a[i].s.totalChars),this._hasMaskedPath?o.length?D.translate(0,r.p.v[1]*o[0],-r.p.v[2]*o[1]):D.translate(0,r.p.v[1]*o,-r.p.v[2]*o):o.length?D.translate(r.p.v[0]*o[0],r.p.v[1]*o[1],-r.p.v[2]*o[2]):D.translate(r.p.v[0]*o,r.p.v[1]*o,-r.p.v[2]*o));if(e.strokeWidthAnim&&(g=p<0?0:p),e.strokeColorAnim&&(v="rgb("+Math.round(255*h[0])+","+Math.round(255*h[1])+","+Math.round(255*h[2])+")"),e.fillColorAnim&&e.fc&&(x="rgb("+Math.round(255*m[0])+","+Math.round(255*m[1])+","+Math.round(255*m[2])+")"),this._hasMaskedPath){if(D.translate(0,-e.ls),D.translate(0,b[1]*Y*.01+S,0),this._pathData.p.v){var eu=180*Math.atan(V=(B.point[1]-z.point[1])/(B.point[0]-z.point[0]))/Math.PI;B.point[0]<z.point[0]&&(eu+=180),D.rotate(-eu*Math.PI/180)}D.translate(u,c,0),F-=b[0]*E[M].an*.005,E[M+1]&&X!==E[M+1].ind&&(F+=E[M].an/2,F+=.001*e.tr*e.finalSize)}else{switch(D.translate(N,S,0),e.ps&&D.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:D.translate(E[M].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[E[M].line]),0,0);break;case 2:D.translate(E[M].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[E[M].line])/2,0,0)}D.translate(0,-e.ls),D.translate(l,0,0),D.translate(b[0]*E[M].an*.005,b[1]*Y*.01,0),N+=E[M].l+.001*e.tr*e.finalSize}"html"===C?et=D.toCSS():"svg"===C?et=D.to2dCSS():er=[D.props[0],D.props[1],D.props[2],D.props[3],D.props[4],D.props[5],D.props[6],D.props[7],D.props[8],D.props[9],D.props[10],D.props[11],D.props[12],D.props[13],D.props[14],D.props[15]],y=f}A<=M?(s=new LetterProps(y,g,v,x,et,er),this.renderedLetters.push(s),A+=1,this.lettersChangedFlag=!0):(s=this.renderedLetters[M],this.lettersChangedFlag=s.update(y,g,v,x,et,er)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,r),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var r,n,i=t.length,a="";for(r=0;r<i;r+=1)"sh"===t[r].ty&&(a+=buildShapeString(n=t[r].ks.k,n.i.length,!0,e));return a},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,r,n,i){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r])/2,0,0)}t.translate(n,i,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,r){this.textSpans=[],this.renderType="svg",this.initElement(e,t,r)}function ISolidElement(e,t,r){this.initElement(e,t,r)}function NullElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initFrame(),this.initTransform(e,t,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,r){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(t&&t.title){var n=createNS("title"),i=createElementID();n.setAttribute("id",i),n.textContent=t.title,this.svgElement.appendChild(n),r+=i}if(t&&t.description){var a=createNS("desc"),s=createElementID();a.setAttribute("id",s),a.textContent=t.description,this.svgElement.appendChild(a),r+=" "+s}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,r=e.length,n=[],i="";t<r;)"\r"===e[t]||"\x03"===e[t]?(n.push(i),i=""):i+=e[t],t+=1;return n.push(i),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var r=e.shapes[0];if(r.it){var n=r.it[r.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e?e.l.length:0),e.fc?this.layerElement.setAttribute("fill",this.buildColor(e.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),e.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(e.sc)),this.layerElement.setAttribute("stroke-width",e.sw)),this.layerElement.setAttribute("font-size",e.finalSize);var t=this.globalData.fontManager.getFontByName(e.f);if(t.fClass)this.layerElement.setAttribute("class",t.fClass);else{this.layerElement.setAttribute("font-family",t.fFamily);var r=e.fWeight,n=e.fStyle;this.layerElement.setAttribute("font-style",n),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",e.t);var i=e.l||[],a=!!this.globalData.fontManager.chars;g=i.length;var s=this.mHelper,o="",l=this.data.singleShape,u=0,c=0,f=!0,h=.001*e.tr*e.finalSize;if(!l||a||e.sz){var p=this.textSpans.length;for(d=0;d<g;d+=1){if(this.textSpans[d]||(this.textSpans[d]={span:null,childSpan:null,glyph:null}),!a||!l||0===d){if(v=p>d?this.textSpans[d].span:createNS(a?"g":"text"),p<=d){if(v.setAttribute("stroke-linecap","butt"),v.setAttribute("stroke-linejoin","round"),v.setAttribute("stroke-miterlimit","4"),this.textSpans[d].span=v,a){var m=createNS("g");v.appendChild(m),this.textSpans[d].childSpan=m}this.textSpans[d].span=v,this.layerElement.appendChild(v)}v.style.display="inherit"}if(s.reset(),l&&(i[d].n&&(u=-h,c+=e.yOffset,c+=+!!f,f=!1),this.applyTextPropertiesToMatrix(e,s,i[d].line,u,c),u+=i[d].l||0,u+=h),a){if(1===(x=this.globalData.fontManager.getCharData(e.finalText[d],t.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily)).t)y=new SVGCompElement(x.data,this.globalData,this);else{var d,g,v,x,y,b=emptyShapeData;x.data&&x.data.shapes&&(b=this.buildShapeData(x.data,e.finalSize)),y=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[d].glyph){var w=this.textSpans[d].glyph;this.textSpans[d].childSpan.removeChild(w.layerElement),w.destroy()}this.textSpans[d].glyph=y,y._debug=!0,y.prepareFrame(0),y.renderFrame(),this.textSpans[d].childSpan.appendChild(y.layerElement),1===x.t&&this.textSpans[d].childSpan.setAttribute("transform","scale("+e.finalSize/100+","+e.finalSize/100+")")}else l&&v.setAttribute("transform","translate("+s.props[12]+","+s.props[13]+")"),v.textContent=i[d].val,v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}l&&v&&v.setAttribute("d",o)}else{var _=this.textContainer,D="start";switch(e.j){case 1:D="end";break;case 2:D="middle";break;default:D="start"}_.setAttribute("text-anchor",D),_.setAttribute("letter-spacing",h);var C=this.buildTextContents(e.finalText);for(d=0,g=C.length,c=e.ps?e.ps[1]+e.ascent:0;d<g;d+=1)(v=this.textSpans[d].span||createNS("tspan")).textContent=C[d],v.setAttribute("x",0),v.setAttribute("y",c),v.style.display="inherit",_.appendChild(v),this.textSpans[d]||(this.textSpans[d]={span:null,glyph:null}),this.textSpans[d].span=v,c+=e.finalLineHeight;this.layerElement.appendChild(_)}for(;d<this.textSpans.length;)this.textSpans[d].span.style.display="none",d+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,r=this.textSpans.length;for(e=0,this.renderedFrame=this.comp.renderedFrame;e<r;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,r,n,i,a=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;for(e=0,t=s.length;e<t;e+=1)!s[e].n&&(r=a[e],n=this.textSpans[e].span,(i=this.textSpans[e].glyph)&&i.renderFrame(),r._mdf.m&&n.setAttribute("transform",r.m),r._mdf.o&&n.setAttribute("opacity",r.o),r._mdf.sw&&n.setAttribute("stroke-width",r.sw),r._mdf.sc&&n.setAttribute("stroke",r.sc),r._mdf.fc&&n.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var r=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var i=createElementID();r.setAttribute("id",i),r.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+i+")"),t.appendChild(r),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,r=this.layers.length;for(t=0;t<r;t+=1)if(this.layers[t].ind===e)return t;return -1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var r=this.createItem(this.layers[e]);if(t[e]=r,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var i=t[n].getMatte(this.layers[e].tt);r.setMatte(i)}else this.buildItem(n),this.addPendingElement(r)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,r=this.elements.length;t<r;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,i=this.elements[n].getMatte(this.layers[t].tt);e.setMatte(i);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,r=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<r;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var r,n=e.getBaseElement();if(n){for(var i=0;i<t;)this.elements[i]&&!0!==this.elements[i]&&this.elements[i].getBaseElement()&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(n,r):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t,r=this.tm.v;r===this.data.op&&(r=this.data.op-1),this.renderedFrame=r}var n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),t=n-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&(this.elements[t].prepareFrame(this.renderedFrame-this.layers[t].st),this.elements[t]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,r=e.length,n="_";for(t=0;t<r;t+=1)n+=e[t].transform.key+"_";var i=this.sequences[n];return i||(i={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=i,this.sequenceList.push(i)),i},processSequence:function(e,t){for(var r=0,n=e.transforms.length,i=t;r<n&&!t;){if(e.transforms[r].transform.mProps._mdf){i=!0;break}r+=1}if(i)for(e.finalTransform.reset(),r=n-1;r>=0;r-=1)e.finalTransform.multiply(e.transforms[r].transform.mProps.v);e._mdf=i},processSequences:function(e){var t,r=this.sequenceList.length;for(t=0;t<r;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,r=null,n=null;function i(){var t=createNS("svg"),r=createNS("filter"),n=createNS("feColorMatrix");return r.setAttribute("id",e),n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),r.appendChild(n),t.appendChild(r),t.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(t.style.display="none"),t}function a(){t||(n=i(),document.body.appendChild(n),(r=(t=createTag("canvas")).getContext("2d")).filter="url(#"+e+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1))}function s(n){return t||a(),t.width=n.width,t.height=n.height,r.filter="url
1(#"+e+")",t}return{load:a,get:s}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var r=createTag("canvas");return r.width=e,r.height=t,r}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas}}(),registeredEffects={};function CVEffects(e){var t,r,n=e.data.ef?e.data.ef.length:0;for(t=0,this.filters=[];t<n;t+=1){r=null;var i=e.data.ef[t].ty;registeredEffects[i]&&(r=new registeredEffects[i].effect(e.effectsManager.effectElements[t],e)),r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var r,n=this.masksProperties.length,i=!1;for(r=0;r<n;r+=1)"n"!==this.masksProperties[r].mode&&(i=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,r=this.masksProperties.length;for(t.beginPath(),n=0;n<r;n+=1)if("n"!==this.masksProperties[n].mode){this.masksProperties[n].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),s=this.viewData[n].v,i=e.applyToPointArray(s.v[0][0],s.v[0][1],0),t.moveTo(i[0],i[1]);var n,i,a,s,o,l=s._length;for(o=1;o<l;o+=1)a=e.applyToTriplePoints(s.o[o-1],s.i[o],s.v[o]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=e.applyToTriplePoints(s.o[o-1],s.i[0],s.v[0]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),t.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,r,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var i,a,s=4;"rc"===t.ty?s=5:"el"===t.ty?s=6:"sr"===t.ty&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,s,e);var o=r.length;for(i=0;i<o;i+=1)r[i].closed||(a={transforms:n.addTransformSequence(r[i].transforms),trNodes:[]},this.styledShapes.push(a),r[i].elements.push(a))}function CVShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,r)}function CVTextElement(e,t,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,r)}function CVImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,r)}function CVSolidElement(e,t,r){this.initElement(e,t,r)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var e,t=15;for(e=0;e<t;e+=1){var r=new CanvasContext;this.stack[e]=r}
vendor: 5,987 bytes, line 1
1this._length=t,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,r){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,r){this.initElement(e,t,r)}function HShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,r)}function HCameraElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var i,a=e.ks.or.k.length;for(i=0;i<a;i+=1)e.ks.or.k[i].to=null,e.ks.or.k[i].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,r)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,r){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffe
vendor: 105,074 bytes, line 1
1ctsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var r=assetLoader.getLumaCanvas(this.canvasContext.canvas);r.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var r={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};return"fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):("gf"===e.ty||"gs"===e.ty)&&(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty?(r.lc=lineCapEnum[e.lc||2],r.lj=lineJoinEnum[e.lj||2],1==e.lj&&(r.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(r.wi=n.w.v),e.d&&(n.d=new DashProperty(this,e.d,"canvas",this),n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0]))):r.r=2===e.r?"evenodd":"nonzero",this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,r=this.stylesList.length;for(t=0;t<r;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,r,n,i){var a,s,o,l,u,c,f=e.length-1,h=[],p=[],m=[].concat(i);for(a=f;a>=0;a-=1){if((l=this.searchProcessedElement(e[a]))?t[a]=r[l-1]:e[a]._shouldRender=n,"fl"===e[a].ty||"st"===e[a].ty||"gf"===e[a].ty||"gs"===e[a].ty)l?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],m),h.push(t[a].style);else if("gr"===e[a].ty){if(l)for(s=0,o=t[a].it.length;s<o;s+=1)t[a].prevViewData[s]=t[a].it[s];else t[a]=this.createGroupElement(e[a]);this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,n,m)}else"tr"===e[a].ty?(l||(c=this.createTransformElement(e[a]),t[a]=c),m.push(t[a]),this.addTransformToStyleList(t[a])):"sh"===e[a].ty||"rc"===e[a].ty||"el"===e[a].ty||"sr"===e[a].ty?l||(t[a]=this.createShapeElement(e[a])):"tm"===e[a].ty||"rd"===e[a].ty||"pb"===e[a].ty||"zz"===e[a].ty||"op"===e[a].ty?(l?(u=t[a]).closed=!1:((u=ShapeModifiers.getModifier(e[a].ty)).init(this,e[a]),t[a]=u,this.shapeModifiers.push(u)),p.push(u)):"rp"===e[a].ty&&(l?(u=t[a]).closed=!0:(u=ShapeModifiers.getModifier(e[a].ty),t[a]=u,u.init(this,e,a,t),this.shapeModifiers.push(u),n=!1),p.push(u));this.addProcessedElement(e[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(h),f=p.length,a=0;a<f;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,r,n,i,a,s,o,l,u=this.stylesList.length,c=this.globalData.renderer,f=this.globalData.canvasContext;for(e=0;e<u;e+=1)if(!(("st"===(o=(l=this.stylesList[e]).type)||"gs"===o)&&0===l.wi||!l.data._shouldRender||0===l.coOp||0===this.globalData.currentGlobalAlpha)){for(c.save(),a=l.elements,"st"===o||"gs"===o?(c.ctxStrokeStyle("st"===o?l.co:l.grd),c.ctxLineWidth(l.wi),c.ctxLineCap(l.lc),c.ctxLineJoin(l.lj),c.ctxMiterLimit(l.ml||0)):c.ctxFillStyle("fl"===o?l.co:l.grd),c.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&f.beginPath(),c.ctxTransform(l.preTransforms.finalTransform.props),r=a.length,t=0;t<r;t+=1){for(("st"===o||"gs"===o)&&(f.beginPath(),l.da&&(f.setLineDash(l.da),f.lineDashOffset=l.do)),i=(s=a[t].trNodes).length,n=0;n<i;n+=1)"m"===s[n].t?f.moveTo(s[n].p[0],s[n].p[1]):"c"===s[n].t?f.bezierCurveTo(s[n].pts[0],s[n].pts[1],s[n].pts[2],s[n].pts[3],s[n].pts[4],s[n].pts[5]):f.closePath();("st"===o||"gs"===o)&&(c.ctxStroke(),l.da&&f.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),c.restore()}},CVShapeElement.prototype.renderShape=function(e,t,r,n){var i,a,s=t.length-1;for(a=e,i=s;i>=0;i-=1)"tr"===t[i].ty?(a=r[i].transform,this.renderShapeTransform(e,a)):"sh"===t[i].ty||"el"===t[i].ty||"rc"===t[i].ty||"sr"===t[i].ty?this.renderPath(t[i],r[i]):"fl"===t[i].ty?this.renderFill(t[i],r[i],a):"st"===t[i].ty?this.renderStroke(t[i],r[i],a):"gf"===t[i].ty||"gs"===t[i].ty?this.renderGradientFill(t[i],r[i],a):"gr"===t[i].ty?this.renderShape(a,t[i].it,r[i].it):t[i].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r,n,i,a=e.trNodes,s=t.paths,o=s._length;a.length=0;var l=e.transforms.finalTransform;for(i=0;i<o;i+=1){var u=s.shapes[i];if(u&&u.v){for(r=1,n=u._length;r<n;r+=1)1===r&&a.push({t:"m",p:l.applyToPointArray(u.v[0][0],u.v[0][1],0)}),a.push({t:"c",pts:l.applyToTriplePoints(u.o[r-1],u.i[r],u.v[r])});1===n&&a.push({t:"m",p:l.applyToPointArray(u.v[0][0],u.v[0][1],0)}),u.c&&n&&(a.push({t:"c",pts:l.applyToTriplePoints(u.o[r-1],u.i[0],u.v[0])}),a.push({t:"z"}))}}e.trNodes=a}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var r,n=t.styledShapes.length;for(r=0;r<n;r+=1)this.renderStyledShape(t.styledShapes[r],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,r){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,r){var n=t.style;if(!n.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var i,a,s=this.globalData.canvasContext,o=t.s.v,l=t.e.v;if(1===e.t)i=s.createLinearGradient(o[0],o[1],l[0],l[1]);else{var u=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),c=Math.atan2(l[1]-o[1],l[0]-o[0]),f=t.h.v;f>=1?f=.99:f<=-1&&(f=-.99);var h=u*f,p=Math.cos(c+t.a.v)*h+o[0],m=Math.sin(c+t.a.v)*h+o[1];i=s.createRadialGradient(p,m,0,o[0],o[1],u)}var d=e.g.p,g=t.g.c,v=1;for(a=0;a<d;a+=1)t.g._hasOpacity&&t.g._collapsable&&(v=t.g.o[2*a+1]),i.addColorStop(g[4*a]/100,"rgba("+g[4*a+1]+","+g[4*a+2]+","+g[4*a+3]+","+v+")");n.grd=i}n.coOp=t.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(e,t,r){var n=t.style,i=t.d;i&&(i._mdf||this._isFirstFrame)&&(n.da=i.dashArray,n.do=i.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e,t,r,n,i,a,s,o,l,u,c,f,h=this.textProperty.currentData;this.renderedLetters=createSizedArray(h.l?h.l.length:0);var p=!1;h.fc?(p=!0,this.values.fill=this.buildColor(h.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=p;var m=!1;h.sc&&(m=!0,this.values.stroke=this.buildColor(h.sc),this.values.sWidth=h.sw);var d=this.globalData.fontManager.getFontByName(h.f),g=h.l,v=this.mHelper;this.stroke=m,this.values.fValue=h.finalSize+"px "+this.globalData.fontManager.getFontByName(h.f).fFamily,t=h.finalText.length;var x=this.data.singleShape,y=.001*h.tr*h.finalSize,b=0,w=0,_=!0,D=0;for(e=0;e<t;e+=1){n=(r=this.globalData.fontManager.getCharData(h.finalText[e],d.fStyle,this.globalData.fontManager.getFontByName(h.f).fFamily))&&r.data||{},v.reset(),x&&g[e].n&&(b=-y,w+=h.yOffset,w+=+!!_,_=!1),l=(s=n.shapes?n.shapes[0].it:[]).length,v.scale(h.finalSize/100,h.finalSize/100),x&&this.applyTextPropertiesToMatrix(h,v,g[e].line,b,w),c=createSizedArray(l-1);var C=0;for(o=0;o<l;o+=1)if("sh"===s[o].ty){for(i=1,a=s[o].ks.k.i.length,u=s[o].ks.k,f=[];i<a;i+=1)1===i&&f.push(v.applyToX(u.v[0][0],u.v[0][1],0),v.applyToY(u.v[0][0],u.v[0][1],0)),f.push(v.applyToX(u.o[i-1][0],u.o[i-1][1],0),v.applyToY(u.o[i-1][0],u.o[i-1][1],0),v.applyToX(u.i[i][0],u.i[i][1],0),v.applyToY(u.i[i][0],u.i[i][1],0),v.applyToX(u.v[i][0],u.v[i][1],0),v.applyToY(u.v[i][0],u.v[i][1],0));f.push(v.applyToX(u.o[i-1][0],u.o[i-1][1],0),v.applyToY(u.o[i-1][0],u.o[i-1][1],0),v.applyToX(u.i[0][0],u.i[0][1],0),v.applyToY(u.i[0][0],u.i[0][1],0),v.applyToX(u.v[0][0],u.v[0][1],0),v.applyToY(u.v[0][0],u.v[0][1],0)),c[C]=f,C+=1}x&&(b+=g[e].l,b+=y),this.textSpans[D]?this.textSpans[D].elem=c:this.textSpans[D]={elem:c},D+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,t,r,n,i,a,s,o,l,u=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;t=c.length;var f=null,h=null,p=null,m=this.globalData.renderer;for(e=0;e<t;e+=1)if(!c[e].n){if((s=u[e])&&(m.save(),m.ctxTransform(s.p),m.ctxOpacity(s.o)),this.fill){for(s&&s.fc?f!==s.fc&&(m.ctxFillStyle(s.fc),f=s.fc):f!==this.values.fill&&(f=this.values.fill,m.ctxFillStyle(this.values.fill)),n=(o=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(a=(l=o[r]).length,this.globalData.canvasContext.moveTo(l[0],l[1]),i=2;i<a;i+=6)this.globalData.canvasContext.bezierCurveTo(l[i],l[i+1],l[i+2],l[i+3],l[i+4],l[i+5]);this.globalData.canvasContext.closePath(),m.ctxFill()}if(this.stroke){for(s&&s.sw?p!==s.sw&&(p=s.sw,m.ctxLineWidth(s.sw)):p!==this.values.sWidth&&(p=this.values.sWidth,m.ctxLineWidth(this.values.sWidth)),s&&s.sc?h!==s.sc&&(h=s.sc,m.ctxStrokeStyle(s.sc)):h!==this.values.stroke&&(h=this.values.stroke,m.ctxStrokeStyle(this.values.stroke)),n=(o=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(a=(l=o[r]).length,this.globalData.canvasContext.moveTo(l[0],l[1]),i=2;i<a;i+=6)this.globalData.canvasContext.bezierCurveTo(l[i],l[i+1],l[i+2],l[i+3],l[i+4],l[i+5]);this.globalData.canvasContext.closePath(),m.ctxStroke()}s&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e,t,r=createTag("canvas");r.width=this.assetData.w,r.height=this.assetData.h;var n=r.getContext("2d"),i=this.img.width,a=this.img.height,s=i/a,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;s>o&&"xMidYMid slice"===l||s<o&&"xMidYMid slice"!==l?e=(t=a)*o:t=(e=i)/o,n.drawImage(this.img,(i-e)/2,(a-t)/2,e,t,0,0,this.assetData.w,this.assetData.h),this.img=r}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){(1!==e[0]||0!==e[1]||0!==e[4]||1!==e[5]||0!==e[12]||0!==e[13])&&this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,r,n){this.canvasContext.fillRect(e,t,r,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var r="0px 0px 0px";t.transformOrigin=r,t.mozTransformOrigin=r,t.webkitTransformOrigin=r,t["-webkit-transform"]=r,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){if(this.reset(),e?(r=e,n=t,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var r,n,i,a,s=this.renderConfig.preserveAspectRatio.split(" "),o=s[1]||"meet",l=s[0]||"xMidYMid",u=l.substr(0,4),c=l.substr(4);i=r/n,(a=this.transformCanvas.w/this.transformCanvas.h)>i&&"meet"===o||a<i&&"slice"===o?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),"xMid"===u&&(a<i&&"meet"===o||a>i&&"slice"===o)?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===u&&(a<i&&"meet"===o||a>i&&"slice"===o)?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===c&&(a>i&&"meet"===o||a<i&&"slice"===o)?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===c&&(a>i&&"meet"===o||a<i&&"slice"===o)?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var r,n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,r=this.stack[this.cArrPos],n=r.transform,i=this.cTr.props;for(t=0;t<16;t+=1)i[t]=n[t];if(e){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||-1!==r.opacity&&this.currentOpacity!==r.opacity)&&(this.nativeContext.globalAlpha=r.opacity,this.currentOpacity=r.opacity),this.currentFillStyle=r.fillStyle,this.currentStrokeStyle=r.strokeStyle,this.currentLineWidth=r.lineWidth,this.currentLineCap=r.lineCap,this.currentLineJoin=r.lineJoin,this.currentMiterLimit=r.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t,r=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n=this.stack[this.cArrPos];for(t=0;t<16;t+=1)n.transform[t]=r[t];this.cArrPos+=1;var i=this.stack[this.cArrPos];i.opacity=n.opacity,i.fillStyle=n.fillStyle,i.strokeStyle=n.strokeStyle,i.lineWidth=n.lineWidth,i.lineCap=n.lineCap,i.lineJoin=n.lineJoin,i.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var r=t.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,r,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,r,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t=e[r].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var r,n,i,a,s,o=e.sh.v,l=e.transformers,u=o._length;if(!(u<=1)){for(r=0;r<u-1;r+=1)n=this.getTransformedPoint(l,o.v[r]),i=this.getTransformedPoint(l,o.o[r]),a=this.getTransformedPoint(l,o.i[r+1]),s=this.getTransformedPoint(l,o.v[r+1]),this.checkBounds(n,i,a,s,t);o.c&&(n=this.getTransformedPoint(l,o.v[r]),i=this.getTransformedPoint(l,o.o[r]),a=this.getTransformedPoint(l,o.i[0]),s=this.getTransformedPoint(l,o.v[0]),this.checkBounds(n,i,a,s,t))}},HShapeElement.prototype.checkBounds=function(e,t,r,n,i){this.getBoundsOfCurve(e,t,r,n);var a=this.shapeBoundingBox;i.x=bmMin(a.left,i.x),i.xMax=bmMax(a.right,i.xMax),i.y=bmMin(a.top,i.y),i.yMax=bmMax(a.bottom,i.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,r,n){for(var i,a,s,o,l,u,c,f=[[e[0],n[0]],[e[1],n[1]]],h=0;h<2;++h)a=6*e[h]-12*t[h]+6*r[h],i=-3*e[h]+9*t[h]-9*r[h]+3*n[h],s=3*t[h]-3*e[h],a|=0,s|=0,0==(i|=0)&&0===a||(0===i?(o=-s/a)>0&&o<1&&f[h].push(this.calculateF(o,e,t,r,n,h)):(l=a*a-4*s*i)>=0&&((u=(-a+bmSqrt(l))/(2*i))>0&&u<1&&f[h].push(this.calculateF(u,e,t,r,n,h)),(c=(-a-bmSqrt(l))/(2*i))>0&&c<1&&f[h].push(this.calculateF(c,e,t,r,n,h))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,i,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*r[a]+3*(1-e)*bmPow(e,2)*n[a]+bmPow(e,3)*i[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]&&e[r].sh?this.calculateShapeBoundingBox(e[r],t):e[r]&&e[r].it?this.calculateBoundingBox(e[r].it,t):e[r]&&e[r].style&&e[r].w&&this.expandStrokeBoundingBox(e[r].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var r=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var i=e.keyframes[n].s;i>r&&(r=i)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=999999,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,!this.currentBoxContains(e)){var r=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),r=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),r=!0),r||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,i="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=i,n.webkitTransform=i}}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,r=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=r,t.color=r,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",n.fClass)this.innerElem.className=n.fClass;else{t.fontFamily=n.fFamily;var i=e.fWeight;t.fontStyle=e.fStyle,t.fontWeight=i}var a=e.l;c=a.length;var s=this.mHelper,o="",l=0;for(u=0;u<c;u+=1){if(this.globalData.fontManager.chars?(this.textPaths[l]?f=this.textPaths[l]:((f=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),f.setAttribute("stroke-linejoin",lineJoinEnum[2]),f.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[l]?p=(h=this.textSpans[l]).children[0]:((h=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(f),styleDiv(h)))):this.isMasked?f=this.textPaths[l]?this.textPaths[l]:createNS("text"):this.textSpans[l]?(h=this.textSpans[l],f=this.textPaths[l]):(styleDiv(h=createTag("span")),styleDiv(f=createTag("span")),h.appendChild(f)),this.globalData.fontManager.chars){var u,c,f,h,p,m,d,g=this.globalData.fontManager.getCharData(e.finalText[u],n.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(d=g?g.data:null,s.reset(),d&&d.shapes&&d.shapes.length&&(m=d.shapes[0].it,s.scale(e.finalSize/100,e.finalSize/100),o=this.createPathShape(s,m),f.setAttribute("d",o)),this.isMasked)this.innerElem.appendChild(f);else{if(this.innerElem.appendChild(h),d&&d.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var x=p.style,y="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";x.transform=y,x.webkitTransform=y,a[u].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);h.appendChild(p)}}else if(f.textContent=a[u].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(f);else{this.innerElem.appendChild(h);var b=f.style,w="translate3d(0,"+-e.finalSize/1.2+"px,0)";b.transform=w,b.webkitTransform=w}this.isMasked?this.textSpans[l]=f:this.textSpans[l]=h,this.textSpans[l].style.display="block",this.textPaths[l]=f,l+=1}for(;l<this.textSpans.length;)this.textSpans[l].style.display="none",l+=1},HTextElement.prototype.renderInnerContent=function(){if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH);var e,t,r,n,i,a=this.svgElement.style,s="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";a.transform=s,a.webkitTransform=s}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var o=0,l=this.textAnimator.renderedLetters,u=this.textProperty.currentData.l;for(e=0,t=u.length;e<t;e+=1)u[e].n?o+=1:(n=this.textSpans[e],i=this.textPaths[e],r=l[o],o+=1,r._mdf.m&&(this.isMasked?n.setAttribute("transform",r.m):(n.style.webkitTransform=r.m,n.style.transform=r.m)),n.style.opacity=r.o,r.sw&&r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&i.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(i.setAttribute("fill",r.fc),i.style.color=r.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height));var f=1;if(this.currentBBox.w!==c.width+2*f||this.currentBBox.h!==c.height+2*f||this.currentBBox.x!==c.x-f||this.currentBBox.y!==c.y-f){this.currentBBox.w=c.width+2*f,this.currentBBox.h=c.height+2*f,this.currentBBox.x=c.x-f,this.currentBBox.y=c.y-f,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),a=this.svgElement.style;var h="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";a.transform=h,a.webkitTransform=h}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,r,n,i=this.comp.threeDElements.length;for(e=0;e<i;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){r=t.perspectiveElem.style,n=t.container.style;var a=this.pe.v+"px",s="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,n.transformOrigin=s,n.mozTransformOrigin=s,n.webkitTransformOrigin=s,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e=this._isFirstFrame;if(this.hierarchy)for(r=0,n=this.hierarchy.length;r<n;r+=1)e=this.hierarchy[r].finalTransform.mProp._mdf||e;if(e||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(r=n=this.hierarchy.length-1;r>=0;r-=1){var t=this.hierarchy[r].finalTransform.mProp;this.mat.translate(-t.p.v[0],-t.p.v[1],t.p.v[2]),this.mat.rotateX(-t.or.v[0]).rotateY(-t.or.v[1]).rotateZ(t.or.v[2]),this.mat.rotateX(-t.rx.v).rotateY(-t.ry.v).rotateZ(t.rz.v),this.mat.scale(1/t.s.v[0],1/t.s.v[1],1/t.s.v[2]),this.mat.translate(t.a.v[0],t.a.v[1],t.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r,n,i=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]],a=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2)+Math.pow(i[2],2)),s=[i[0]/a,i[1]/a,i[2]/a],o=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],o),u=Math.atan2(s[0],-s[2]);this.mat.rotateY(u).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){for(r=0,n=this.comp.threeDElements.length;r<n;r+=1)if("3d"===(f=this.comp.threeDElements[r]).type){if(c){var f,h,p,m=this.mat.toCSS();(p=f.container.style).transform=m,p.webkitTransform=m}this.pe._mdf&&((h=f.perspectiveElem.style).perspective=this.pe.v+"px",h.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){var n=this.layers[t];if(n.ddd&&this.supports3d)this.addTo3dContainer(r,t);else if(this.threeDElements)this.addTo3dContainer(r,t);else{for(var i,a,s=0;s<t;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement&&(a=this.elements[s],i=(this.layers[s].ddd?this.getThreeDContainerByPos(s):a.getBaseElement())||i),s+=1;i?n.ddd&&this.supports3d||this.layerElement.insertBefore(r,i):n.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,r=this.threeDElements.length;t<r;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r,n,i=createTag("div");styleDiv(i);var a=createTag("div");if(styleDiv(a),"3d"===t){(r=i.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var s="50% 50%";r.webkitTransformOrigin=s,r.mozTransformOrigin=s,r.transformOrigin=s;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=a.style).transform=o,n.webkitTransform=o}i.appendChild(a);var l={container:a,perspectiveElem:i,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,r=this.layers.length,n="";for(e=0;e<r;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?"3d"!==n&&(n="3d",t=this.createThreeDContainer(e,"3d")):"2d"!==n&&(n="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e);for(e=(r=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;r<n;){if(t<=this.threeDElements[r].endPos){for(var i,a=this.threeDElements[r].startPos;a<t;)this.elements[a]&&this.elements[a].getBaseElement&&(i=this.elements[a].getBaseElement()),a+=1;i?this.threeDElements[r].container.insertBefore(e,i):this.threeDElements[r].container.appendChild(e);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),r=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),r.appendChild(t),n.overflow="hidden";var i=createNS("svg");i.setAttribute("width","1"),i.setAttribute("height","1"),styleDiv(i),this.resizerElem.appendChild(i);var a=createNS("defs");i.appendChild(a),this.data=e,this.setupGlobalData(e,i),this.globalData.defs=a,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,r,n,i=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,s=i/a;this.globalData.compSize.w/this.globalData.compSize.h>s?(e=i/this.globalData.compSize.w,t=i/this.globalData.compSize.w,r=0,n=(a-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(e=a/this.globalData.compSize.h,t=a/this.globalData.compSize.h,r=(i-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,n=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+r+","+n+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,r=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e<n;e+=1){var i=this.threeDElements[e].perspectiveElem.style;i.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(r,2))+"px",i.perspective=i.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,r=e.length,n=createTag("div");for(t=0;t<r;t+=1)if(e[t].xt){var i=this.createComp(e[t],n,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var r,n=0;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n].getBaseElement()),n+=1;r?this.layerElement.insertBefore(e,r):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(){return function(e){function t(t){for(var r=0,n=e.layers.length;r<n;){if(e.layers[r].nm===t||e.layers[r].ind===t)return e.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t}}();function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function seedRandom(e,t){var r,n=this,i=256,a=6,s=52,o="random",l=t.pow(i,a),u=t.pow(2,s),c=2*u,f=i-1;function h(r,n,s){var f=[],h=g(d((n=!0===n?{entropy:!0}:n||{}).entropy?[r,x(e)]:null===r?v():r,3),f),y=new p(f),b=function(){for(var e=y.g(a),t=l,r=0;e<u;)e=(e+r)*i,t*=i,r=y.g(1);for(;e>=c;)e/=2,t/=2,r>>>=1;return(e+r)/t};return b.int32=function(){return 0|y.g(4)},b.quick=function(){return y.g(4)/0x100000000},b.double=b,g(x(y.S),e),(n.pass||s||function(e,r,n,i){return(i&&(i.S&&m(i,y),e.state=function(){return m(y,{})}),n)?(t[o]=e,r):e})(b,h,"global"in n?n.global:this==t,n.state)}function p(e){var t,r=e.length,n=this,a=0,s=n.i=n.j=0,o=n.S=[];for(r||(e=[r++]);a<i;)o[a]=a++;for(a=0;a<i;a++)o[a]=o[s=f&s+e[a%r]+(t=o[a])],o[s]=t;n.g=function(e){for(var t,r=0,a=n.i,s=n.j,o=n.S;e--;)t=o[a=f&a+1],r=r*i+o[f&(o[a]=o[s=f&s+t])+(o[s]=t)];return n.i=a,n.j=s,r}}function m(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function d(e,t){var r,n=[],i=_typeof$2(e);if(t&&"object"==i)for(r in e)try{n.push(d(e[r],t-1))}catch(e){}return n.length?n:"string"==i?e:e+"\0"}function g(e,t){for(var r,n=e+"",i=0;i<n.length;)t[f&i]=f&(r^=19*t[f&i])+n.charCodeAt(i++);return x(t)}function v(){try{if(r)return x(r.randomBytes(i));var t=new Uint8Array(i);return(n.crypto||n.msCrypto).getRandomValues(t),x(t)}catch(t){var a=n.navigator,s=a&&a.plugins;return[+new Date,n,s,n.screen,x(e)]}}function x(e){return String.fromCharCode.apply(0,e)}t["seed"+o]=h,g(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,i=[];for(r=0;r<n;r+=1)i[r]=-e[r];return i}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t)||"string"===r||"string"===n)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return e=e.slice(0),e[0]+=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,s=t.length,o=[];i<a||i<s;)("number"==typeof e[i]||e[i]instanceof Number)&&("number"==typeof t[i]||t[i]instanceof Number)?o[i]=e[i]+t[i]:o[i]=void 0===t[i]?e[i]:e[i]||t[i],i+=1;return o}return 0}var add=sum;function sub(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t))return"string"===r&&(e=parseInt(e,10)),"string"===n&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return e=e.slice(0),e[0]-=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,a=e.length,s=t.length,o=[];i<a||i<s;)("number"==typeof e[i]||e[i]instanceof Number)&&("number"==typeof t[i]||t[i]instanceof Number)?o[i]=e[i]-t[i]:o[i]=void 0===t[i]?e[i]:e[i]||t[i],i+=1;return o}return 0}function mul(e,t){var r,n,i,a=_typeof$1(e),s=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(s,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(n=0,r=createTypedArray("float32",i=e.length);n<i;n+=1)r[n]=e[n]*t;return r}if(isNumerable(a,e)&&$bm_isInstanceOfArray(t)){for(n=0,r=createTypedArray("float32",i=t.length);n<i;n+=1)r[n]=e*t[n];return r}return 0}function div(e,t){var r,n,i,a=_typeof$1(e),s=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(s,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(n=0,r=createTypedArray("float32",i=e.length);n<i;n+=1)r[n]=e[n]/t;return r}if(isNumerable(a,e)&&$bm_isInstanceOfArray(t)){for(n=0,r=createTypedArray("float32",i=t.length);n<i;n+=1)r[n]=e/t[n];return r}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,r){if(t>r){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);t||(t=helperLengthArray);var r,n=Math.min(e.length,t.length),i=0;for(r=0;r<n;r+=1)i+=Math.pow(t[r]-e[r],2);return Math.sqrt(i)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,r,n=e[0],i=e[1],a=e[2],s=Math.max(n,i,a),o=Math.min(n,i,a),l=(s+o)/2;if(s===o)t=0,r=0;else{var u=s-o;switch(r=l>.5?u/(2-s-o):u/(s+o),s){case n:t=(i-a)/u+6*(i<a);break;case i:t=(a-n)/u+2;break;case a:t=(n-i)/u+4}t/=6}return[t,r,l,e[3]]}function hue2rgb(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t,r,n,i=e[0],a=e[1],s=e[2];if(0===a)t=s,n=s,r=s;else{var o=s<.5?s*(1+a):s+a-s*a,l=2*s-o;t=hue2rgb(l,o,i+1/3),r=hue2rgb(l,o,i),n=hue2rgb(l,o,i-1/3)}return[t,r,n,e[3]]}function linear(e,t,r,n,i){if((void 0===n||void 0===i)&&(n=t,i=r,t=0,r=1),r<t){var a,s=r;r=t,t=s}if(e<=t)return n;if(e>=r)return i;var o=r===t?0:(e-t)/(r-t);if(!n.length)return n+(i-n)*o;var l=n.length,u=createTypedArray("float32",l);for(a=0;a<l;a+=1)u[a]=n[a]+(i[a]-n[a])*o;return u}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var r,n=t.length;e||(e=createTypedArray("float32",n));var i=createTypedArray("float32",n),a=BMMath.random();for(r=0;r<n;r+=1)i[r]=e[r]+a*(t[r]-e[r]);return i}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,r,n){var i,a,s,o=e.length,l=shapePool.newElement();l.setPathData(!!n,o);var u=[0,0];for(i=0;i<o;i+=1)a=t&&t[i]?t[i]:u,s=r&&r[i]?r[i]:u,l.setTripleAt(e[i][0],e[i][1],s[0]+e[i][0],s[1]+e[i][1],a[0]+e[i][0],a[1]+e[i][1],i,!0);return l}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var transform,$bm_transform,content,effect,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,time,velocity,value,text,textIndex,textTotal,selectorValue,parent,val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=(function(e,t){var r,n,i=this.pv.length?this.pv.length:1,a=createTypedArray("float32",i);e=5;var s=Math.floor(time*e);for(r=0,n=0;r<s;){for(n=0;n<i;n+=1)a[n]+=-t+2*t*BMMath.random();r+=1}var o=time*e,l=o-Math.floor(o),u=createTypedArray("float32",i);if(i>1){for(n=0;n<i;n+=1)u[n]=this.pv[n]+a[n]+(-t+2*t*BMMath.random())*l;return u}return this.pv+a[0]+(-t+2*t*BMMath.random())*l}).bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loop_in=loopIn=thisProperty.loopIn.bind(thisProperty)),thisProperty.loopOut&&(loop_out=loopOut=thisProperty.loopOut.bind(thisProperty)),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(e,t){var r=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,n,0]}function easeOut(e,t,r,n,i){return applyEase(easeOutBez,e,t,r,n,i)}function easeIn(e,t,r,n,i){return applyEase(easeInBez,e,t,r,n,i)}function ease(e,t,r,n,i){return applyEase(easeInOutBez,e,t,r,n,i)}function applyEase(e,t,r,n,i,a){void 0===i?(i=r,a=n):t=(t-r)/(n-r),t>1?t=1:t<0&&(t=0);var s=e(t);if($bm_isInstanceOfArray(i)){var o,l=i.length,u=createTypedArray("float32",l);for(o=0;o<l;o+=1)u[o]=(a[o]-i[o])*s+i[o];return u}return(a-i)*s+i}function nearestKey(e){var t,r,n,i=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,n=data.k[0].t;else{for(t=0;t<i-1;t+=1)if(e===data.k[t].t){r=t+1,n=data.k[t].t;break}else if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(r=t+2,n=data.k[t+1].t):(r=t+1,n=data.k[t].t);break}-1===r&&(r=t+1,n=data.k[t].t)}else r=0,n=0;var a={};return a.index=r,a.time=n/elem.comp.globalData.frameRate,a}function key(e){if(!data.k.length||"number"==typeof data.k[0])throw Error("The property has no keyframe at index "+e);e-=1;var t,r,n={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]},i=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(t=0,r=i.length;t<r;t+=1)n[t]=i[t],n.value[t]=i[t];return n}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return(value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType)?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),!transform&&($bm_transform=transform=elem.layerInterface("ADBE Transform Group"),transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!!(elem.hierarchy&&elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={};return e.initExpressions=function e(e){var t=0,r=[];function n(){t+=1}function i(){0==(t-=1)&&s()}function a(e){-1===r.indexOf(e)&&r.push(e)}function s(){var e,t=r.length;for(e=0;e<t;e+=1)r[e].release();r.length=0}e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=n,e.renderer.globalData.popExpression=i,e.renderer.globalData.registerExpressionProperty=a},e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var r,n=createSizedArray(t.viewData.length),i=t.viewData.length;for(r=0;r<i;r+=1)n[r]=new e(t.viewData[r],t.masksProperties[r]);return function(e){for(r=0;r<i;){if(t.masksProperties[r].nm===e)return n[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function r(e,t,r){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(n){if(!e.numKeys)return 0;var i="";i="s"in t.keyframes[n-1]?t.keyframes[n-1].s:"e"in t.keyframes[n-2]?t.keyframes[n-2].e:t.keyframes[n-2].s;var a="unidimensional"===r?new Number(i):Object.assign({},i);return a.time=t.keyframes[n-1].t/t.elem.comp.globalData.frameRate,a.value="unidimensional"===r?i[0]:i,a},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function n(t){t&&"pv"in t||(t=e);var n=1/t.mult,i=t.pv*n,a=new Number(i);return a.value=i,r(a,t,"unidimensional"),function(){return t.k&&t.getValue(),i=t.v*n,a.value!==i&&((a=new Number(i)).value=i,a[0]=i,r(a,t,"unidimensional")),a}}function i(e){e&&"pv"in e||(e=t);var n=1/e.mult,i=e.data&&e.data.l||e.pv.length,a=createTypedArray("float32",i),s=createTypedArray("float32",i);return a.value=s,r(a,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<i;t+=1)s[t]=e.v[t]*n,a[t]=s[t];return a}}function a(){return e}return function(e){return e?"unidimensional"===e.propType?n(e):i(e):a}}(),TransformExpressionInterface=function(){return function(e){var t,r,n,i;function a(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return a.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return a.rotation;case"ADBE Rotate X":return a.xRotation;case"ADBE Rotate Y":return a.yRotation;case"position":case"Position":case"ADBE Position":case 2:return a.position;case"ADBE Position_0":return a.xPosition;case"ADBE Position_1":return a.yPosition;case"ADBE Position_2":return a.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return a.anchorPoint;case"opacity":case"Opacity":case 11:return a.opacity;default:return null}}return Object.defineProperty(a,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(a,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(a,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(a,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(a,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?i=ExpressionPropertyInterface(e.p):(t=ExpressionPropertyInterface(e.px),r=ExpressionPropertyInterface(e.py),e.pz&&(n=ExpressionPropertyInterface(e.pz))),Object.defineProperty(a,"position",{get:function(){return e.p?i():[t(),r(),n?n():0]}}),Object.defineProperty(a,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(a,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(a,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(a,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(a,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(a,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(a,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(a,"orientation",{get:ExpressionPropertyInterface(e.or)}),a}}(),LayerExpressionInterface=function(){function e(e){var t=new Matrix;return void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t),t}function t(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,e)}function r(e,t){var r=this.getMatrix(t);return this.applyPoint(r,e)}function n(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,e)}function i(e,t){var r=this.getMatrix(t);return this.invertPoint(r,e)}function a(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function s(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function o(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(u){function c(e){h.mask=new MaskManagerInterface(e,u)}function f(e){h.effect=e}function h(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return h.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return h.effect;case"ADBE Text Properties":return h.textInterface;default:return null}}h.getMatrix=e,h.invertPoint=s,h.applyPoint=a,h.toWorld=r,h.toWorldVec=t,h.fromWorld=i,h.fromWorldVec=n,h.toComp=r,h.fromComp=o,h.sampleImage=l,h.sourceRectAtTime=u.sourceRectAtTime.bind(u),h._elem=u;var p=TransformExpressionInterface(u.finalTransform.mProp),m=getDescriptor(p,"anchorPoint");return Object.defineProperties(h,{hasParent:{get:function(){return u.hierarchy.length}},parent:{get:function(){return u.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return u.isInRange}}}),h.startTime=u.data.st,h.index=u.data.ind,h.source=u.data.refId,h.height=0===u.data.ty?u.data.h:100,h.width=0===u.data.ty?u.data.w:100,h.inPoint=u.data.ip/u.comp.globalData.frameRate,h.outPoint=u.data.op/u.comp.globalData.frameRate,h._name=u.data.nm,h.registerMaskInterface=c,h.registerEffectsInterface=f,h}}(),propertyGroupFactory=function(){return function(e,t){return function(r){return(r=void 0===r?1:r)<=0?e:t(r-1)}}}(),PropertyInterface=function(){return function(e,t){var r={_name:e};return function(e){return(e=void 0===e?1:e)<=0?r:t(e-1)}}}(),EffectsExpressionInterface=function(){function e(r,n,i,a){function s(e){for(var t=r.ef,n=0,i=t.length;n<i;){if(e===t[n].nm||e===t[n].mn||e===t[n].ix){if(5===t[n].ty)return u[n];return u[n]()}n+=1}throw Error()}var o,l=propertyGroupFactory(s,i),u=[],c=r.ef.length;for(o=0;o<c;o+=1)5===r.ef[o].ty?u.push(e(r.ef[o],n.effectElements[o],n.effectElements[o].propertyGroup,a)):u.push(t(n.effectElements[o],r.ef[o].ty,a,l));return"ADBE Color Control"===r.mn&&Object.defineProperty(s,"color",{get:function(){return u[0]()}}),Object.defineProperties(s,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:l}}),s.enabled=0!==r.en,s.active=s.enabled,s}function t(e,t,r,n){var i=ExpressionPropertyInterface(e.p);function a(){return 10===t?r.comp.compInterface(e.p.v):i()}return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",n)),a}return{createEffectsInterface:function(t,r){if(t.effectsManager){var n,i=[],a=t.data.ef,s=t.effectsManager.effectElements.length;for(n=0;n<s;n+=1)i.push(e(a[n],t.effectsManager.effectElements[n],r,t));var o=t.data.ef||[],l=function(e){for(n=0,s=o.length;n<s;){if(e===o[n].nm||e===o[n].mn||e===o[n].ix)return i[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}}}(),ShapePathInterface=function(){return function(e,t,r){var n=t.sh;function i(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?i.path:null}var a=propertyGroupFactory(i,r);return n.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(i,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:r}}),i}}(),ShapeExpressionInterface=function(){function e(e,t,l){var m,d=[],g=e?e.length:0;for(m=0;m<g;m+=1)"gr"===e[m].ty?d.push(r(e[m],t[m],l)):"fl"===e[m].ty?d.push(n(e[m],t[m],l)):"st"===e[m].ty?d.push(s(e[m],t[m],l)):"tm"===e[m].ty?d.push(o(e[m],t[m],l)):"tr"===e[m].ty||("el"===e[m].ty?d.push(u(e[m],t[m],l)):"sr"===e[m].ty?d.push(c(e[m],t[m],l)):"sh"===e[m].ty?d.push(ShapePathInterface(e[m],t[m],l)):"rc"===e[m].ty?d.push(f(e[m],t[m],l)):"rd"===e[m].ty?d.push(h(e[m],t[m],l)):"rp"===e[m].ty?d.push(p(e[m],t[m],l)):"gf"===e[m].ty?d.push(i(e[m],t[m],l)):d.push(a(e[m],t[m],l)));return d}function t(t,r,n){var i,a=function(e){for(var t=0,r=i.length;t<r;){if(i[t]._name===e||i[t].mn===e||i[t].propertyIndex===e||i[t].ix===e||i[t].ind===e)return i[t];t+=1}return"number"==typeof e?i[e-1]:null};a.propertyGroup=propertyGroupFactory(a,n),i=e(t.it,r.it,a.propertyGroup),a.numProperties=i.length;var s=l(t.it[t.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.transform=s,a.propertyIndex=t.cix,a._name=t.nm,a}function r(e,r,n){var i=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return i.content;default:return i.transform}};i.propertyGroup=propertyGroupFactory(i,n);var a=t(e,r,i.propertyGroup),s=l(e.it[e.it.length-1],r.it[r.it.length-1],i.propertyGroup);return i.content=a,i.transform=s,Object.defineProperty(i,"_name",{get:function(){return e.nm}}),i.numProperties=e.np,i.propertyIndex=e.ix,i.nm=e.nm,i.mn=e.mn,i}function n(e,t,r){function n(e){return"Color"===e||"color"===e?n.color:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function i(e,t,r){function n(e){return"Start Point"===e||"start point"===e?n.startPoint:"End Point"===e||"end point"===e?n.endPoint:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",r)),t.e.setGroupProperty(PropertyInterface("End Point",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function a(){return function(){return null}}function s(e,t,r){var n,i=propertyGroupFactory(u,r),a=propertyGroupFactory(l,i);function s(r){Object.defineProperty(l,e.d[r].nm,{get:ExpressionPropertyInterface(t.d.dataProps[r].p)})}var o=e.d?e.d.length:0,l={};for(n=0;n<o;n+=1)s(n),t.d.dataProps[n].p.setGroupProperty(a);function u(e){return"Color"===e||"color"===e?u.color:"Opacity"===e||"opacity"===e?u.opacity:"Stroke Width"===e||"stroke width"===e?u.strokeWidth:null}return Object.defineProperties(u,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",i)),t.o.setGroupProperty(PropertyInterface("Opacity",i)),t.w.setGroupProperty(PropertyInterface("Stroke Width",i)),u}function o(e,t,r){function n(t){return t===e.e.ix||"End"===t||"end"===t?n.end:t===e.s.ix?n.start:t===e.o.ix?n.offset:null}var i=propertyGroupFactory(n,r);return n.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",i)),t.e.setGroupProperty(PropertyInterface("End",i)),t.o.setGroupProperty(PropertyInterface("Offset",i)),n.propertyIndex=e.ix,n.propertyGroup=r,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),n.mn=e.mn,n}function l(e,t,r){function n(t){return e.a.ix===t||"Anchor Point"===t?n.anchorPoint:e.o.ix===t||"Opacity"===t?n.opacity:e.p.ix===t||"Position"===t?n.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?n.rotation:e.s.ix===t||"Scale"===t?n.scale:e.sk&&e.sk.ix===t||"Skew"===t?n.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?n.skewAxis:null}var i=propertyGroupFactory(n,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",i)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",i)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",i)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",i)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",i)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",i)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",i))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",i)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),n.ty="tr",n.mn=e.mn,n.propertyGroup=r,n}function u(e,t,r){function n(t){return e.p.ix===t?n.position:e.s.ix===t?n.size:null}var i=propertyGroupFactory(n,r);n.propertyIndex=e.ix;var a="tm"===t.sh.ty?t.sh.prop:t.sh;return a.s.setGroupProperty(PropertyInterface("Size",i)),a.p.setGroupProperty(PropertyInterface("Position",i)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:e.nm}}),n.mn=e.mn,n}function c(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.rotation:e.pt.ix===t?n.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?n.outerRadius:e.os.ix===t?n.outerRoundness:e.ir&&(e.ir.ix===t||"ADBE Vector Star Inner Radius"===t)?n.innerRadius:e.is&&e.is.ix===t?n.innerRoundness:null}var i=propertyGroupFactory(n,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",i)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",i)),a.pt.setGroupProperty(PropertyInterface("Points",i)),a.p.setGroupProperty(PropertyInterface("Position",i)),a.r.setGroupProperty(PropertyInterface("Rotation",i)),e.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",i)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",i))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:e.nm}}),n.mn=e.mn,n}function f(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?n.size:null}var i=propertyGroupFactory(n,r),a="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,a.p.setGroupProperty(PropertyInterface("Position",i)),a.s.setGroupProperty(PropertyInterface("Size",i)),a.r.setGroupProperty(PropertyInterface("Rotation",i)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:e.nm}}),n.mn=e.mn,n}function h(e,t,r){function n(t){return e.r.ix===t||"Round Corners 1"===t?n.radius:null}var i=propertyGroupFactory(n,r),a=t;return n.propertyIndex=e.ix,a.rd.setGroupProperty(PropertyInterface("Radius",i)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:e.nm}}),n.mn=e.mn,n}function p(e,t,r){function n(t){return e.c.ix===t||"Copies"===t?n.copies:e.o.ix===t||"Offset"===t?n.offset:null}var i=propertyGroupFactory(n,r),a=t;return n.propertyIndex=e.ix,a.c.setGroupProperty(PropertyInterface("Copies",i)),a.o.setGroupProperty(PropertyInterface("Offset",i)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:e.nm}}),n.mn=e.mn,n}return function(t,r,n){var i;function a(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?n:i[e-1];for(var t=0,r=i.length;t<r;){if(i[t]._name===e)return i[t];t+=1}return null}return a.propertyGroup=propertyGroupFactory(a,function(){return n}),i=e(t,r,a.propertyGroup),a.numProperties=i.length,a._name="Contents",a}}(),TextExpressionInterface=function(){return function(e){var t;function r(e){return"ADBE Text Document"===e?r.sourceText:null}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var r=e.textProperty.currentData.t;return t&&r===t.value||((t=new String(r)).value=r||new String(r),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),r}}();function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FootageInterface=function(){var e=function(e){var t="",r=e.getFootageData();function n(e){if(r[e])return(t=e,r=r[e],"object"===_typeof(r))?n:r;var i=e.indexOf(t);return -1!==i?(r=r[parseInt(e.substr(i+t.length),10)],"object"===_typeof(r))?n:r:""}return function(){return t="",r=e.getFootageData(),n}},t=function(t){function r(e){return"Outline"===e?r.outlineInterface():null}return r._name="Outline",r.outlineInterface=e(t),r};return function(e){function r(e){return"Data"===e?r.dataInterface:null}return r._name="Data",r.dataInterface=t(e),r}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers=function(){return{searchExpressions:function(e,t,r){t.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(e,t,r).bind(r)))},getSpeedAtTime:function(e){var t,r=-.01,n=this.getValueAtTime(e),i=this.getValueAtTime(e+r),a=0;if(n.length){for(t=0;t<n.length;t+=1)a+=Math.pow(i[t]-n[t],2);a=100*Math.sqrt(a)}else a=0;return a},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,r,n=-.001,i=this.getValueAtTime(e),a=this.getValueAtTime(e+n);if(i.length)for(r=0,t=createTypedArray("float32",i.length);r<i.length;r+=1)t[r]=(a[r]-i[r])/n;else t=(a-i)/n;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}}}();function addPropertyDecorator(){function e(e,t,r){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var n,i,a,s,o,l=this.comp.renderedFrame,u=this.keyframes,c=u[u.length-1].t;if(l<=c)return this.pv;if(r?(n=t?Math.abs(c-this.elem.comp.globalData.frameRate*t):Math.max(0,c-this.elem.data.ip),i=c-n):((!t||t>u.length-1)&&(t=u.length-1),n=c-(i=u[u.length-1-t].t)),"pingpong"===e){if(Math.floor((l-i)/n)%2!=0)return this.getValueAtTime((n-(l-i)%n+i)/this.comp.globalData.frameRate,0)}else if("offset"===e){var f=this.getValueAtTime(i/this.comp.globalData.frameRate,0),h=this.getValueAtTime(c/this.comp.globalData.frameRate,0),p=this.getValueAtTime(((l-i)%n+i)/this.comp.globalData.frameRate,0),m=Math.floor((l-i)/n);if(this.pv.length){for(a=0,s=(o=Array(f.length)).length;a<s;a+=1)o[a]=(h[a]-f[a])*m+p[a];return o}return(h-f)*m+p}else if("continue"===e){var d=this.getValueAtTime(c/this.comp.globalData.frameRate,0),g=this.getValueAtTime((c-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(a=0,s=(o=Array(d.length)).length;a<s;a+=1)o[a]=d[a]+(d[a]-g[a])*((l-c)/this.comp.globalData.frameRate)/5e-4;return o}return d+(l-c)/.001*(d-g)}return this.getValueAtTime(((l-i)%n+i)/this.comp.globalData.frameRate,0)}function t(e,t,r){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var n,i,a,s,o,l=this.comp.renderedFrame,u=this.keyframes,c=u[0].t;if(l>=c)return this.pv;if(r?(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-c),i=c+n):((!t||t>u.length-1)&&(t=u.length-1),n=(i=u[t].t)-c),"pingpong"===e){if(Math.floor((c-l)/n)%2==0)return this.getValueAtTime(((c-l)%n+c)/this.comp.globalData.frameRate,0)}else if("offset"===e){var f=this.getValueAtTime(c/this.comp.globalData.frameRate,0),h=this.getValueAtTime(i/this.comp.globalData.frameRate,0),p=this.getValueAtTime((n-(c-l)%n+c)/this.comp.globalData.frameRate,0),m=Math.floor((c-l)/n)+1;if(this.pv.length){for(a=0,s=(o=Array(f.length)).length;a<s;a+=1)o[a]=p[a]-(h[a]-f[a])*m;return o}return p-(h-f)*m}else if("continue"===e){var d=this.getValueAtTime(c/this.comp.globalData.frameRate,0),g=this.getValueAtTime((c+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(a=0,s=(o=Array(d.length)).length;a<s;a+=1)o[a]=d[a]+(d[a]-g[a])*(c-l)/.001;return o}return d+(d-g)*(c-l)/.001}return this.getValueAtTime((n-((c-l)%n+c))/this.comp.globalData.frameRate,0)}function r(e,t){if(!this.k||(e=.5*(e||.4),(t=Math.floor(t||5))<=1))return this.pv;var r,n,i=this.comp.renderedFrame/this.comp.globalData.frameRate,a=i-e,s=i+e,o=t>1?(s-a)/(t-1):1,l=0,u=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;l<t;){if(n=this.getValueAtTime(a+l*o),this.pv.length)for(u=0;u<this.pv.length;u+=1)r[u]+=n[u];else r+=n;l+=1}if(this.pv.length)for(u=0;u<this.pv.length;u+=1)r[u]/=t;else r/=t;return r}function n(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(e);t.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(e);t.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var i=this.sk.getValueAtTime(e),a=this.sa.getValueAtTime(e);t.skewFromAxis(-i*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var s=this.r.getValueAtTime(e);t.rotate(-s*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),u=this.rx.getValueAtTime(e),c=this.or.getValueAtTime(e);t.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(u*this.rx.mult).rotateZ(-c[2]*this.or.mult).rotateY(c[1]*this.or.mult).rotateX(c[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var f=this.px.getValueAtTime(e),h=this.py.getValueAtTime(e);if(this.data.p.z){var p=this.pz.getValueAtTime(e);t.translate(f*this.px.mult,h*this.py.mult,-p*this.pz.mult)}else t.translate(f*this.px.mult,h*this.py.mult,0)}else{var m=this.p.getValueAtTime(e);t.translate(m[0]*this.p.mult,m[1]*this.p.mult,-m[2]*this.p.mult)}return t}function i(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,r){var s=a(e,t,r);return s.dynamicProperties.length?s.getValueAtTime=n.bind(s):s.getValueAtTime=i.bind(s),s.setGroupProperty=expressionHelpers.setGroupProperty,s};var s=PropertyFactory.getProp;function o(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}PropertyFactory.getProp=function(n,i,a,o,l){var u=s(n,i,a,o,l);u.kf?u.getValueAtTime=expressionHelpers.getValueAtTime.bind(u):u.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(u),u.setGroupProperty=expressionHelpers.setGroupProperty,u.loopOut=e,u.loopIn=t,u.smooth=r,u.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(u),u.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(u),u.numKeys=1===i.a?i.k.length:0,u.propertyIndex=i.ix;var c=0;return 0!==a&&(c=createTypedArray("float32",1===i.a?i.k[0].s.length:i.k.length)),u._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:c},expressionHelpers.searchExpressions(n,i,u),u.k&&l.addDynamicProperty(u),u};var l=ShapePropertyFactory.getConstructorFunction(),u=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var r,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0));var i=n._length,a=n[e],s=n.v,o=createSizedArray(i);for(r=0;r<i;r+=1)"i"===e||"o"===e?o[r]=[a[r][0]-s[r][0],a[r][1]-s[r][1]]:o[r]=[a[r][0],a[r][1]];return o},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var r,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(n));for(var i=this._segmentsLength,a=i.lengths,s=i.totalLength*e,o=0,l=a.length,u=0;o<l;){if(u+a[o].addedLength>s){var c=o,f=n.c&&o===l-1?0:o+1,h=(s-u)/a[o].addedLength;r=bez.getPointInSegment(n.v[c],n.v[f],n.o[c],n.i[f],h,a[o]);break}u+=a[o].addedLength,o+=1}return r||(r=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]]),r},vectorOnPath:function(e,t,r){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),a=i[0]-n[0],s=i[1]-n[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(s,2));return 0===o?[0,0]:"tangent"===r?[a/o,s/o]:[-s/o,a/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],l),extendPrototype([c],u),u.prototype.getValueAtTime=o,u.prototype.initiateExpression=ExpressionManager.initiateExpression;var f=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,r,n,i){var a=f(e,t,r,n,i);return a.propertyIndex=t.ix,a.lock=!1,3===r?expressionHelpers.searchExpressions(e,t.pt,a):4===r&&expressionHelpers.searchExpressions(e,t.ks,a),a.k&&e.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,t){var r=this.calculateExpression(t);if(e.t!==r){var n={};return this.copyData(n,e),n.t=r.toString(),n.__complete=!1,n}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var r,n,i=createNS("feMerge");for(i.setAttribute("result",e),n=0;n<t.length;n+=1)(r=createNS("feMergeNode")).setAttribute("in",t[n]),i.appendChild(r),i.appendChild(r);return i}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,r,n,i){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",n+"_tint_1"),e.appendChild(a),(a=createNS("feColorMatrix")).setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",n+"_tint_2"),e.appendChild(a),this.matrixFilter=a;var s=this.createMergeNode(n,[i,n+"_tint_1",n+"_tint_2"]);e.appendChild(s)}function SVGFillFilter(e,t,r,n){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result",n),e.appendChild(i),this.matrixFilter=i}function SVGStrokeEffect(e,t,r){this.initialized=!1,this.filterManager=t,this.elem=r,this.paths=[]}function SVGTritoneFilter(e,t,r,n){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(i);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",n),this.matrixFilter=a;var s=createNS("feFuncR");s.setAttribute("type","table"),a.appendChild(s),this.feFuncR=s;var o=createNS("feFuncG");o.setAttribute("type","table"),a.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),a.appendChild(l),this.feFuncB=l,e.appendChild(a)}function SVGProLevelsFilter(e,t,r,n){this.filterManager=t;var i=this.filterManager.effectElements,a=createNS("feComponentTransfer");(i[10].p.k||0!==i[10].p.v||i[11].p.k||1!==i[11].p.v||i[12].p.k||1!==i[12].p.v||i[13].p.k||0!==i[13].p.v||i[14].p.k||1!==i[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(i[17].p.k||0!==i[17].p.v||i[18].p.k||1!==i[18].p.v||i[19].p.k||1!==i[19].p.v||i[20].p.k||0!==i[20].p.v||i[21].p.k||1!==i[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(i[24].p.k||0!==i[24].p.v||i[25].p.k||1!==i[25].p.v||i[26].p.k||1!==i[26].p.v||i[27].p.k||0!==i[27].p.v||i[28].p.k||1!==i[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(i[31].p.k||0!==i[31].p.v||i[32].p.k||1!==i[32].p.v||i[33].p.k||1!==i[33].p.v||i[34].p.k||0!==i[34].p.v||i[35].p.k||1!==i[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(a)),(i[3].p.k||0!==i[3].p.v||i[4].p.k||1!==i[4].p.v||i[5].p.k||1!==i[5].p.v||i[6].p.k||0!==i[6].p.v||i[7].p.k||1!==i[7].p.v)&&((a=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",n),e.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}function SVGDropShadowEffect(e,t,r,n,i){var a=t.container.globalData.renderConfig.filterSize,s=t.data.fs||a;e.setAttribute("x",s.x||a.x),e.setAttribute("y",s.y||a.y),e.setAttribute("width",s.width||a.width),e.setAttribute("height",s.height||a.height),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",n+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,e.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var u=createNS("feFlood");u.setAttribute("flood-color","#00ff00"),u.setAttribute("flood-opacity","1"),u.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=u,e.appendChild(u);var c=createNS("feComposite");c.setAttribute("in",n+"_drop_shadow_3"),c.setAttribute("in2",n+"_drop_shadow_2"),c.setAttribute("operator","in"),c.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(c);var f=this.createMergeNode(n,[n+"_drop_shadow_4",i]);e.appendChild(f)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",r[0]-t[0]+" 0 0 0 "+t[0]+" "+(r[1]-t[1])+" 0 0 0 "+t[1]+" "+(r[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,r,n,i=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,r=0):n=(r=this.filterManager.effectElements[0].p.v-1)+1,(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);r<n;r+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:r});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),s=createElementID();a.setAttribute("id",s),a.setAttribute("mask-type","alpha"),a.appendChild(t),this.elem.globalData.defs.appendChild(a);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+s+")");i[0];)o.appendChild(i[0]);this.elem.layerElement.appendChild(o),this.masker=a,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(i=this.elem.layerElement.children||this.elem.layerElement.childNodes;i.length;)this.elem.layerElement.removeChild(i[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){this.initialized||this.initialize();var t=this.paths.length;for(r=0;r<t;r+=1)if(-1!==this.paths[r].m&&(n=this.elem.maskManager.viewData[this.paths[r].m],i=this.paths[r].p,(e||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var r,n,i,a,s,o=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),u=i.getTotalLength();a="0 0 0 "+u*o+" ";var c=Math.floor(u*(l-o)/(1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01));for(s=0;s<c;s+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*u+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var f=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*f[0])+","+bmFloor(255*f[1])+","+bmFloor(255*f[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,i=n[0]+" "+r[0]+" "+t[0],a=n[1]+" "+r[1]+" "+t[1],s=n[2]+" "+r[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",i),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",s)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var r=createNS(e);return r.setAttribute("type","table"),t.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(e,t,r,n,i){for(var a,s,o=0,l=256,u=Math.min(e,t),c=Math.max(e,t),f=Array.call(null,{length:256}),h=0,p=i-n,m=t-e;o<=256;)s=(a=o/256)<=u?m<0?i:n:a>=c?m<0?n:i:n+p*Math.pow((a-e)/m,1/r),f[h]=s,h+=1,o+=256/(l-1);return f.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,
vendor: 5,011 bytes, line 1
1n=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=r*Math.cos(n),a=r*Math.sin(n);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var i=createNS("feGaussianBlur");i.setAttribute("result",n),e.appendChild(i),this.feGaussianBlur=i}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t<r;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var r,n=e.layerElement.parentNode;if(n){for(var i=n.children,a=0,s=i.length;a<s&&i[a]!==e.layerElement;)a+=1;a<=s-2&&(r=i[a+1]);var o=createNS("use");o.setAttribute("href","#"+t),r?n.insertBefore(o,r):n.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var r=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var i=e.globalData.defs;i.appendChild(n);var a=createNS("symbol");a.setAttribute("id",r),this.replaceInParent(t,r),a.appendChild(t.layerElement),i.appendChild(a);var s=createNS("use");s.setAttribute("href","#"+r),n.appendChild(s),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,r=0,n=t.length;r<n;)t[r]&&t[r].data.ind===e&&this.setElementAsMask(this.elem,t[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3,r=this.filterManager.effectElements[0].p.v*t,n=this.filterManager.effectElements[1].p.v,i=3==n?0:r,a=2==n?0:r;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+a);var s=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,r=t[0].p.v,n=t[1].p.v,i=1===t[2].p.v,a=t[3].p.v,s=i?a:t[4].p.v,o=t[5].p.v,l=t[6].p.v,u=t[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(.01*s,.01*a,1),this.matrix.rotate(-u*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})},769345,(e,t,r)=>{!function(t,n){n(r,e.r(289374),e.r(271645))}(e.e,function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t),a=n(r);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e){if(Array.isArray(e))return e}function l(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function c(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t){if(null==e)return{};var r,n,i=m(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function d(e,t){return o(e)||u(e,t)||x(e,t)||c()}function g(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function v(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function x(e,t){if(e){if("string"==typeof e)return s(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}var y=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],b=function(e,t){var n=e.animationData,s=e.loop,o=e.autoplay,l=e.initialSegment,u=e.onComplete,c=e.onLoopComplete,f=e.onEnterFrame,m=e.onSegmentStart,g=e.onConfigReady,v=e.onDataReady,x=e.onDataFailed,b=e.onLoadedImages,w=e.onDOMLoaded,_=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var D=p(e,y),C=d(r.useState(!1),2),A=C[0],E=C[1],N=r.useRef(),S=r.useRef(null),M=function(){var e;null==(e=N.current)||e.play()},T=function(){var e;null==(e=N.current)||e.stop()},k=function(){var e;null==(e=N.current)||e.pause()},F=function(e){var t;null==(t=N.current)||t.setSpeed(e)},B=function(e,t){var r;null==(r=N.current)||r.goToAndPlay(e,t)},P=function(e,t){var r;null==(r=N.current)||r.goToAndStop(e,t)},j=function(e){var t;null==(t=N.current)||t.setDirection(e)},O=function(e,t){var r;null==(r=N.current)||r.playSegments(e,t)},I=function(e){var t;null==(t=N.current)||t.setSubframe(e)},z=function(e){var t;return null==(t=N.current)?void 0:t.getDuration(e)},L=function(){var e;null==(e=N.current)||e.destroy(),N.current=void 0},R=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(S.current){null==(t=N.current)||t.destroy();var n=h(h(h({},e),r),{},{container:S.current});return N.current=i.default.loadAnimation(n),E(!!N.current),function(){var e;null==(e=N.current)||e.destroy(),N.current=void 0}}};return r.useEffect(function(){var e=R();return function(){return null==e?void 0:e()}},[n,s]),r.useEffect(function(){N.current&&(N.current.autoplay=!!o)},[o]),r.useEffect(function(){!N.current||(l?Array.isArray(l)&&l.length&&((N.current.currentRawFrame<l[0]||N.current.currentRawFrame>l[1])&&(N.current.currentRawFrame=l[0]),N.current.setSegment(l[0],l[1])):N.current.resetSegments(!0))},[l]),r.useEffect(function(){var e=[{name:"complete",handler:u},{name:"loopComplete",handler:c},{name:"enterFrame",handler:f},{name:"segmentStart",handler:m},{name:"config_ready",handler:g},{name:"data_ready",handler:v},{name:"data_failed",handler:x},{name:"loaded_images",handler:b},{name:"DOMLoaded",handler:w},{name:"destroy",handler:_}].filter(function(e){return null!=e.handler});if(e.length){var t=e.map(function(e){var t;
1return null==(t=N.current)||t.addEventListener(e.name,e.handler),function(){var t;null==(t=N.current)||t.removeEventListener(e.name,e.handler)}});return function(){t.forEach(function(e){return e()})}}},[u,c,f,m,g,v,x,b,w,_]),{View:a.default.createElement("div",h({style:t,ref:S},D)),play:M,stop:T,pause:k,setSpeed:F,goToAndStop:P,goToAndPlay:B,setDirection:j,playSegments:O,setSubframe:I,getDuration:z,destroy:L,animationContainerRef:S,animationLoaded:A,animationItem:N.current}};function w(e){var t=e.getBoundingClientRect(),r=t.top,n=t.height;return(window.innerHeight-r)/(window.innerHeight+n)}function _(e,t,r){var n=e.getBoundingClientRect(),i=n.top;return{x:(t-n.left)/n.width,y:(r-i)/n.height}}var D=function(e){var t=e.wrapperRef,n=e.animationItem,i=e.mode,a=e.actions;r.useEffect(function(){var e=t.current;if(e&&n&&a.length){n.stop();var r=function(){var t=null,r=function(){var r=w(e),i=a.find(function(e){var t=e.visibility;return t&&r>=t[0]&&r<=t[1]});if(i){if("seek"===i.type&&i.visibility&&2===i.frames.length){var s=i.frames[0]+Math.ceil((r-i.visibility[0])/(i.visibility[1]-i.visibility[0])*i.frames[1]);n.goToAndStop(s-n.firstFrame-1,!0)}"loop"===i.type&&(null===t||t!==i.frames?(n.playSegments(i.frames,!0),t=i.frames):n.isPaused&&(n.playSegments(i.frames,!0),t=i.frames)),"play"===i.type&&n.isPaused&&(n.resetSegments(!0),n.play()),"stop"===i.type&&n.goToAndStop(i.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",r),function(){document.removeEventListener("scroll",r)}},s=function(){var t=function(t,r){var i=t,s=r;if(-1!==i&&-1!==s){var o=_(e,i,s);i=o.x,s=o.y}var l=a.find(function(e){var t=e.position;return t&&Array.isArray(t.x)&&Array.isArray(t.y)?i>=t.x[0]&&i<=t.x[1]&&s>=t.y[0]&&s<=t.y[1]:!(!t||Number.isNaN(t.x)||Number.isNaN(t.y))&&i===t.x&&s===t.y});if(l){if("seek"===l.type&&l.position&&Array.isArray(l.position.x)&&Array.isArray(l.position.y)&&2===l.frames.length){var u=(i-l.position.x[0])/(l.position.x[1]-l.position.x[0]),c=(s-l.position.y[0])/(l.position.y[1]-l.position.y[0]);n.playSegments(l.frames,!0),n.goToAndStop(Math.ceil((u+c)/2*(l.frames[1]-l.frames[0])),!0)}"loop"===l.type&&n.playSegments(l.frames,!0),"play"===l.type&&(n.isPaused&&n.resetSegments(!1),n.playSegments(l.frames)),"stop"===l.type&&n.goToAndStop(l.frames[0],!0)}},r=function(e){t(e.clientX,e.clientY)},i=function(){t(-1,-1)};return e.addEventListener("mousemove",r),e.addEventListener("mouseout",i),function(){e.removeEventListener("mousemove",r),e.removeEventListener("mouseout",i)}};switch(i){case"scroll":return r();case"cursor":return s()}}},[i,n])},C=function(e){var t=e.actions,r=e.mode,n=e.lottieObj,i=n.animationItem,a=n.View;return D({actions:t,animationItem:i,mode:r,wrapperRef:n.animationContainerRef}),a},A=["style","interactivity"],E=function(e){var t,n,i,a=e.style,s=e.interactivity,o=b(p(e,A),a),l=o.View,u=o.play,c=o.stop,f=o.pause,h=o.setSpeed,m=o.goToAndStop,d=o.goToAndPlay,g=o.setDirection,v=o.playSegments,x=o.setSubframe,y=o.getDuration,w=o.destroy,_=o.animationContainerRef,D=o.animationLoaded,E=o.animationItem;return r.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:u,stop:c,pause:f,setSpeed:h,goToAndPlay:d,goToAndStop:m,setDirection:g,playSegments:v,setSubframe:x,getDuration:y,destroy:w,animationContainerRef:_,animationLoaded:D,animationItem:E})},[null==(t=e.lottieRef)?void 0:t.current]),C({lottieObj:{View:l,play:u,stop:c,pause:f,setSpeed:h,goToAndStop:m,goToAndPlay:d,setDirection:g,playSegments:v,setSubframe:x,getDuration:y,destroy:w,animationContainerRef:_,animationLoaded:D,animationItem:E},actions:null!=(n=null==s?void 0:s.actions)?n:[],mode:null!=(i=null==s?void 0:s.mode)?i:"scroll"})};Object.defineProperty(e,"LottiePlayer",{enumerable:!0,get:function(){return i.default}}),e.default=E,e.useLottie=b,e.useLottieInteractivity=C,Object.defineProperty(e,"__esModule",{value:!0})})},45944,e=>{e.v({accent:"products-ecosystem-module__EutDgW__accent",btnPrimary:"products-ecosystem-module__EutDgW__btnPrimary",centerBlock:"products-ecosystem-module__EutDgW__centerBlock",centerLead:"products-ecosystem-module__EutDgW__centerLead",centerTitle:"products-ecosystem-module__EutDgW__centerTitle",contentRow:"products-ecosystem-module__EutDgW__contentRow",diagramLottie:"products-ecosystem-module__EutDgW__diagramLottie",diagramWrap:"products-ecosystem-module__EutDgW__diagramWrap",divider:"products-ecosystem-module__EutDgW__divider",footerBanner:"products-ecosystem-module__EutDgW__footerBanner",footerCta:"products-ecosystem-module__EutDgW__footerCta",footerText:"products-ecosystem-module__EutDgW__footerText",header:"products-ecosystem-module__EutDgW__header",headerLead:"products-ecosystem-module__EutDgW__headerLead",headerLeadWrap:"products-ecosystem-module__EutDgW__headerLeadWrap",headerRule:"products-ecosystem-module__EutDgW__headerRule",headerTitle:"products-ecosystem-module__EutDgW__headerTitle",headerTitleWrap:"products-ecosystem-module__EutDgW__headerTitleWrap",
1inner:"products-ecosystem-module__EutDgW__inner",isActive:"products-ecosystem-module__EutDgW__isActive",list:"products-ecosystem-module__EutDgW__list",listBrand:"products-ecosystem-module__EutDgW__listBrand",listDescription:"products-ecosystem-module__EutDgW__listDescription",listItem:"products-ecosystem-module__EutDgW__listItem",panel:"products-ecosystem-module__EutDgW__panel",section:"products-ecosystem-module__EutDgW__section",titleBreak:"products-ecosystem-module__EutDgW__titleBreak"})},853047,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=t,i=e.i(271645),a=e.i(769345),s=e.i(894109),o=e.i(862560),l=e.i(611578),u=e.i(752103),c=e.i(710060),f=e.i(45944);let h="/products/ecosystem/infographic-solutions-ecosystem.json",p="(min-width: 1025px)",m="(max-width: 1024px)",d=1;function g({animationReady:e,centerTitleRef:t,novaerusRef:r,hasPlayedRef:n,playOnce:a}){(0,i.useEffect)(()=>{if(!e)return;let i=window.matchMedia(p),s=window.matchMedia(m),o=null,l=null,u=0,c=1/0,f=()=>{o?.disconnect(),o=null,l?.disconnect(),l=null,u&&(cancelAnimationFrame(u),u=0),window.removeEventListener("scroll",g),window.removeEventListener("resize",g)},h=()=>{if(!s.matches)return;let e=t.current;if(!e)return;let r=e.getBoundingClientRect().top,n=c>d&&r<=d;c=r,n&&(a(),f())},g=()=>{u||(u=requestAnimationFrame(()=>{u=0,h()}))},v=()=>{if(f(),n.current)return;if(i.matches){let e=r.current;if(!e)return;(o=new IntersectionObserver(([e])=>{e.isIntersecting&&(a(),f())},{threshold:.2})).observe(e);return}let e=t.current;e&&(c=e.getBoundingClientRect().top,(l=new IntersectionObserver(()=>{g()},{threshold:[0,.01,.25,.5,.75,1]})).observe(e),window.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g,{passive:!0}),g())};return v(),i.addEventListener("change",v),()=>{i.removeEventListener("change",v),f()}},[e,t,r,n,a])}function v({content:e}){let t=e.items.findIndex(e=>"Novaerus"===e.brand),r=(0,i.useRef)(null),p=(0,i.useRef)(null),m=(0,i.useRef)(null),d=(0,i.useRef)(!1),[x,y]=(0,i.useState)(null),b=(0,i.useCallback)(()=>{if(d.current)return;d.current=!0;let e=m.current;if(e){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){let t=e.getDuration(!0);"number"==typeof t&&t>0&&e.goToAndStop(t-1,!0);return}e.goToAndPlay(0,!0)}},[]);(0,i.useEffect)(()=>{let e=!1;return fetch(h).then(e=>e.json()).then(t=>{e||y(t)}
1).catch(()=>{}),()=>{e=!0}},[]),g({animationReady:null!==x,centerTitleRef:r,novaerusRef:p,hasPlayedRef:d,playOnce:b});let w=(0,c.cmsHasLabel)(e.ctaLabel),_=!!e.bottomText||w;return(0,n.jsx)("section",{className:f.default.section,"aria-labelledby":"products-ecosystem-title",children:(0,n.jsx)("div",{className:f.default.inner,children:(0,n.jsxs)("div",{className:f.default.panel,children:[(0,n.jsxs)("header",{className:f.default.header,children:[(0,n.jsx)("div",{className:f.default.headerTitleWrap,children:(0,n.jsx)(s.CmsCopyField,{value:e.topTitle,variant:"title",titleTag:"h2",titleId:"products-ecosystem-title",titleClassName:f.default.headerTitle,accentClassName:f.default.accent})}),(0,n.jsxs)("div",{className:f.default.headerLeadWrap,children:[(0,n.jsx)("span",{className:f.default.divider,"aria-hidden":!0}),e.topDescription?(0,n.jsx)(o.CmsHtmlField,{html:e.topDescription,className:f.default.headerLead,as:"div"}):null]})]}),(0,n.jsx)("hr",{className:f.default.headerRule,"aria-hidden":!0}),(0,n.jsxs)("div",{className:f.default.centerBlock,children:[(0,n.jsx)(s.CmsCopyField,{value:e.middleTitle,variant:"title",titleTag:"h3",titleRef:r,titleClassName:f.default.centerTitle,accentClassName:f.default.accent}),(0,n.jsx)(s.CmsCopyField,{value:e.middleDescription,variant:"body",paragraphClassName:f.default.centerLead})]}),(0,n.jsxs)("div",{className:f.default.contentRow,children:[(0,n.jsx)("figure",{className:f.default.diagramWrap,"aria-label":"Animated diagram showing how WellAir sensing, purification, monitoring, and validation solutions connect",children:x?(0,n.jsx)(a.default,{lottieRef:m,animationData:x,className:f.default.diagramLottie,autoplay:!1,loop:!1,"aria-hidden":!0}):null}),(0,n.jsx)("ul",{className:f.default.list,children:e.items.map((e,r)=>(0,n.jsxs)("li",{ref:r===t?p:void 0,className:f.default.listItem,children:[(0,n.jsx)("p",{className:f.default.listBrand,children:e.brand}),e.description?(0,n.jsx)(o.CmsHtmlField,{html:e.description,className:f.default.listDescription,as:"div"}):null]},e.brand))})]}),_?(0,n.jsxs)("div",{className:f.default.footerBanner,children:[e.bottomText?(0,n.jsx)(o.CmsHtmlField,{html:e.bottomText,className:f.default.footerText,as:"div"}):null,w?(0,n.jsx)(u.HeroCtaRow,{className:f.default.footerCta,children:(0,n.jsx)(l.HomeV2HeroCta,{href:e.ctaHref||"#",label:e.ctaLabel,variant:"outline",openInNewTab:/^https?:\/\//i.test(e.ctaHref||"")})}):null]}):null]})})})}var x=e.i(547672),y=e.i(867434),b=e.i(263278),w=c;let _={value:{schema:"dast",document:{type:"root",children:[]}}};function D(e){return(0,b.mapCmsStructuredTextTitle)(e)??_}function C(e){let t=D(e.topTitle),r=(0,w.cmsHtmlString)(e.topDescription),n=D(e.middleTitle),i=e.middleDescription?.trim()??"",a=(0,w.cmsHtmlString)(e.bottomText),s=e.listRows?.map(e=>{let t=e.rowTitle?.trim();return t?{brand:t,description:(0,w.cmsHtmlString)(e.rowDescription)}:null}).filter(e=>null!=e)??[],o=e.ctaLabel?.trim()??"";return{topTitle:t,topDescription:r,middleTitle:n,middleDescription:i,items:s,bottomText:a,ctaLabel:o,ctaHref:o?(0,y.resolveDatoDualLink)(e.ctaLink,e.ctaLinkExternal,"#"):""}}function A({widget:e}){let n=(0,r.useCmsLinkSection)(),i=(0,x.withCmsLinkSection)(n,()=>C(e));return(0,t.jsx)(v,{content:i})}e.s(["WidgetHowItWork",0,A],853047)},385470,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(118039),i=e.i(995153),a=t,s=e.i(657688),o=e.i(894109),l=e.i(611578),u=e.i(752103);let c="m-0 font-medium leading-[normal] text-black text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))] desktop:w-[min(804px,calc(804*100vw/1920))] desktop:max-w-[min(679px,calc(679*100vw/1920))] desktop:shrink-0";function f({content:e}){let{title:t,titleBefore:r,titleAccent1:n,titleMid:i,titleAccent2:h,titleAfter:p,body:m,rows:d,cta:g}=e;return(0,a.jsx)("section",{"aria-labelledby":"solutions-grid-title",className:"box-border w-full overflow-x-clip bg-white",children:(0,a.jsxs)("div",{className:"box-border mx-auto w-full max-w-480 px-[min(160px,calc(160*100vw/1920))] tablet:px-[min(60px,calc(60*100vw/1024))] mobile:px-[min(20px,calc(20*100vw/390))] pb-[min(90px,calc(90*100vw/1920))] tablet:pb-[min(100px,calc(100*100vw/1024))] mobile:pb-[min(80px,calc(80*100vw/390))]",children:[(0,a.jsxs)("div",{className:"flex w-full flex-col border-b-[0.5px] border-solid border-[#97999b] desktop:flex-row desktop:items-center desktop:justify-between gap-[min(160px,calc(160*100vw/1920))] tablet:gap-[min(20px,calc(20*100vw/1024))] mobile:gap-[min(16px,calc(16*100vw/390))] py-[min(50px,calc(50*100vw/1920))] tablet:py-[min(40px,calc(40*100vw/1024))] mobile:py-[min(32px,calc(32*100vw/390))]",children:[t?(0,a.jsx)(o.CmsCopyField,{value:t,variant:"title",titleTag:"h2",titleId:"solutions-grid-title",titleClassName:c,accentClassName:"text-[#036ada]"}):(0,a.jsxs)("h2",{id:"solutions-grid-title",className:c,children:[r,n?(0,a.jsx)("span",{className:"text-[#036ada]",children:n}):null,i,h?(0,a.jsx)("span",{className:"text-[#036ada]",children:h}):null,p]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 items-start gap-[min(20px,calc(20*100vw/1920))] tablet:gap-[min(16px,calc(16*100vw/1024))] mobile:gap-[min(12px,calc(12*100vw/390))] desktop:items-center desktop:pr-[min(10px,calc(10*100vw/1920))]",children:m?(0,a.jsx)(o.CmsCopyField,{value:m,variant:"body",paragraphClassName:"m-0 min-w-0 font-normal text-black text-[min(24px,calc(24*100vw/1920))] tablet:text-[min(20px,calc(20*100vw/1024))] mobile:text-[min(18px,calc(18*100vw/390))] leading-[min(40px,calc(40*100vw/1920))] tablet:leading-[min(32px,calc(32*100vw/1024))] mobile:leading-[min(28px,calc(28*100vw/390))] desktop:max-w-[min(715px,calc(715*100vw/1920))]"}):null})]}),(0,a.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:d.map(e=>(0,a.jsxs)("li",{className:"group box-border flex w-full flex-col border-b-[0.5px] border-solid border-[#97999b] bg-white tablet:flex-row tablet:items-center desktop:flex-row desktop:items-center gap-[min(40px,calc(40*100vw/1920))] tablet:gap-[min(30px,calc(30*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))] p-[min(40px,calc(40*100vw/1920))] tablet:px-0 tablet:py-[min(40px,calc(40*100vw/1024))] mobile:px-0 mobile:py-[min(20px,calc(20*100vw/390))] transition-[background-color,border-radius] duration-200 ease-out desktop:hover:rounded-[min(16px,calc(16*100vw/1920))] desktop:hover:bg-[#edfbfe]",children:[(0,a.jsx)("div",{className:"relative flex shrink-0 items-center justify-center overflow-hidden bg-[#edfbfe] transition-colors duration-200 ease-out desktop:group-hover:bg-[#036ada] size-[min(100px,calc(100*100vw/1920))] tablet:size-[min(100px,calc(100*100vw/1024))] mobile:size-[min(70px,calc(70*100vw/390))] rounded-[min(16px,calc(16*100vw/1920))] tablet:rounded-[min(16px,calc(16*100vw/1024))] mobile:rounded-[min(16px,calc(16*100vw/390))]",children:(0,a.jsx)(s.default,{src:e.icon,alt:e.iconAlt,width:90,height:90,className:"object-contain size-[min(90px,calc(90*100vw/1920))] tablet:size-[min(90px,calc(90*100vw/1024))] mobile:size-[min(58px,calc(58*100vw/390))]"})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-[min(14px,calc(14*100vw/1920))] tablet:gap-[min(10px,calc(10*100vw/1024))] mobile:gap-[min(10px,calc(10*100vw/390))]",children:[(0,a.jsxs)("div",{className:"font-medium text-black transition-colors duration-200 ease-out desktop:group-hover:text-[#036ada] text-[min(32px,calc(32*100vw/1920))] tablet:text-[min(24px,calc(24*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] leading-[normal] mobile:leading-[min(32px,calc(32*100vw/390))]",children:[e.titleBefore?(0,a.jsxs)("span",{children:[e.titleBefore," "]}):null,e.stat?(0,a.jsx)("span",{className:"inline-flex items-center justify-center border border-solid border-black align-middle font-medium bg-black text-white desktop:bg-white desktop:text-black desktop:group-hover:bg-black desktop:group-hover:text-white transition-colors duration-200 ease-out rounded-[min(4px,calc(4*100vw/1920))] tablet:rounded-[min(4px,calc(4*100vw/1024))] mobile:rounded-[min(4px,calc(4*100vw/390))] px-[min(10px,calc(10*100vw/1920))] tablet:px-[min(10px,calc(10*100vw/1024))] mobile:px-[min(10px,calc(10*100vw/390))] py-[min(4px,calc(4*100vw/1920))] tablet:py-[min(4px,calc(4*100vw/1024))] mobile:py-[min(4px,calc(4*100vw/390))] text-[min(32px,calc(32*100vw/1920))] tablet:text-[min(24px,calc(24*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] leading-[normal]",children:e.stat}):null,(0,a.jsxs)("span",{children:[" ",e.titleAfter]})]}),(0,a.jsx)(o.CmsCopyField,{value:e.body,variant:"body",paragraphClassName:"m-0 font-normal text-black text-[min(20px,calc(20*100vw/1920))] tablet:text-[min(20px,calc(20*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] leading-[min(34px,calc(34*100vw/1920))] tablet:leading-[min(32px,calc(32*100vw/1024))] mobile:leading-[min(32px,calc(32*100vw/390))]"})]})]},e.id))}),g?.label&&g.href?(0,a.jsx)(u.HeroCtaRow,{mobileFullWidth:!1,className:"w-auto self-start mt-[min(40px,calc(40*100vw/1920))] tablet:mt-[min(32px,calc(32*100vw/1024))] mobile:mt-[min(24px,calc(24*100vw/390))]",children:(0,a.jsx)(l.HomeV2HeroCta,{href:g.href,label:g.label,variant:"primary"})}):null]})})}var h=e.i(547672),p=e.i(754661);function m({widget:e}){let a=(0,r.useCmsLinkSection)();if((0,p.isSolutionsGridHomeResources)(e)){let r=(0,h.withCmsLinkSection)(a,()=>(0,p.mapSolutionsGridHomeResources)(e));return(0,t.jsx)(n.HomeV2IaqResources,{data:r})}if((0,p.isSolutionsGridLinkedRows)(e)){let r=(0,h.withCmsLinkSection)(a,()=>(0,p.mapSolutionsGridLinkedRows)(e));return(0,t.jsx)(i.ProductsInnovation,{content:r})}let s=(0,p.mapSolutionsGridWidget)(e);return s?(0,t.jsx)(f,{content:s}):null}e.s(["WidgetSolutionsGrid",0,m],385470)},87848,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(300140),i=e.i(547672),a=e.i(442477),s=e.i(867434),o=e.i(263278),l=e.i(710060);let u={value:{schema:"dast",document:{type:"root",children:[]}}};function c(e){let t=(0,o.mapCmsStructuredTextTitle)(e.title)??u;return{title:t,introText:(0,l.cmsHtmlString)(e.introText),brands:e.brandTabs?.map(e=>{let t=e.tabName?.trim();if(!t)return null;let r=e.products?.map(e=>{let t=e.productName?.trim();return t?{id:e.id??t,title:t,description:(0,l.cmsHtmlString)(e.description),image:(0,a.assetSrc)(e.image)??"",imageAlt:e.imageAlt?.trim()??"",href:(0,s.resolveDatoDualLink)(e.link,e.linkExternal,"#")}:null}).filter(e=>null!=e)??[];return{id:e.id??t.toLowerCase().replace(/\s+/g,"-"),label:t,icon:(0,a.assetSrc)(e.tabIcon)??"",products:r}}).filter(e=>null!=e)??[]}}
1function f({widget:e,showBrandTabs:a=!0}){let s=(0,r.useCmsLinkSection)(),o=(0,i.withCmsLinkSection)(s,()=>c(e));return(0,t.jsx)(n.ProductsCatalog,{content:o,showBrandTabs:a})}e.s(["WidgetProductCatalog",0,f],87848)},270268,e=>{e.v({accent:"product-detail-description-module__Vjh2wq__accent",breadcrumb:"product-detail-description-module__Vjh2wq__breadcrumb",breadcrumbCurrent:"product-detail-description-module__Vjh2wq__breadcrumbCurrent",breadcrumbItem:"product-detail-description-module__Vjh2wq__breadcrumbItem",breadcrumbLink:"product-detail-description-module__Vjh2wq__breadcrumbLink",breadcrumbList:"product-detail-description-module__Vjh2wq__breadcrumbList",breadcrumbSep:"product-detail-description-module__Vjh2wq__breadcrumbSep",copyBody:"product-detail-description-module__Vjh2wq__copyBody",copyPanel:"product-detail-description-module__Vjh2wq__copyPanel",inner:"product-detail-description-module__Vjh2wq__inner",layout:"product-detail-description-module__Vjh2wq__layout",paragraph:"product-detail-description-module__Vjh2wq__paragraph",pathogenImage:"product-detail-description-module__Vjh2wq__pathogenImage",pathogenItem:"product-detail-description-module__Vjh2wq__pathogenItem",pathogenList:"product-detail-description-module__Vjh2wq__pathogenList",pathogensHeading:"product-detail-description-module__Vjh2wq__pathogensHeading",researchLink:"product-detail-description-module__Vjh2wq__researchLink",section:"product-detail-description-module__Vjh2wq__section",title:"product-detail-description-module__Vjh2wq__title",useCaseIcon:"product-detail-description-module__Vjh2wq__useCaseIcon",useCaseIconWrap:"product-detail-description-module__Vjh2wq__useCaseIconWrap",useCaseItem:"product-detail-description-module__Vjh2wq__useCaseItem",useCaseLabel:"product-detail-description-module__Vjh2wq__useCaseLabel",useCaseLink:"product-detail-description-module__Vjh2wq__useCaseLink",useCaseList:"product-detail-description-module__Vjh2wq__useCaseList",useCaseRow:"product-detail-description-module__Vjh2wq__useCaseRow",useCasesHeader:"product-detail-description-module__Vjh2wq__useCasesHeader",useCasesHeading:"product-detail-description-module__Vjh2wq__useCasesHeading",useCasesPanel:"product-detail-description-module__Vjh2wq__useCasesPanel"})},411023,e=>{"use strict";var t=e.i(710060);function r(e){let t=e;return t&&"string"==typeof t.url&&t.url||""}function n(e){return!e.replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").trim()}function i(e){let r=(0,t.cmsHtmlString)(e);if(!r)return[];if(/<[a-z][\s\S]*>/i.test(r)){let e=[...r.matchAll(/<(p|div|h[1-6]|li)(?:\s[^>]*)?>[\s\S]*?<\/\1>/gi)].map(e=>e[0].trim()).filter(e=>!n(e));return e.length>0?e:[r]}return r.split(/\n{1,}/).map(e=>e.trim()).filter(Boolean)}function a(e){if(Array.isArray(e)){let t=e.map(e=>String(e)).filter(Boolean);return t.length?t:void 0}if("string"==typeof e&&e.trim())return[e.trim()]}function s(e){return e}e.s(["fileUrl",0,r,"partialProduct",0,s,"toParagraphs",0,i,"toStringList",0,a])},575868,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(39792),i=t,a=e.i(657688),s=e.i(522016),o=e.i(862560),l=e.i(318103);e.i(171674),e.i(406822);var u=e.i(741614);let c={label:"Products",href:"/products"};function f(e,t){return!!e&&!!t&&e.label.trim().toLowerCase()===t.label.trim().toLowerCase()}function h(e){let t=e.name?.trim()||e.fullName?.trim()||"";if(!t)return null;let r=e.slug?.trim()??"";return{label:t,href:r?(0,u.toPublicCmsPath)(r)??`/${r.replace(/^\/+/,"")}`:"#"}}function p(e,t){return e.find(e=>!f(e,c)&&!f(e,t))??null}function m(e){let t=h(e),r=Array.isArray(e.breadcrumb)?e.breadcrumb.filter(e=>e.label?.trim()):[],n=e.category??p(r,t);if(!n)return[];let i=[c];return f(n,c)||f(n,t)||i.push(n),t&&!f(t,c)&&i.push(t),i}var d=e.i(270268);function g({product:e}){let{description:t}=e,r=t.paragraphs.length>0,n=t.pathogens.length>0,u=t.useCases.length>0,c=!!(t.pathogensLink.label?.trim()&&t.pathogensLink.href?.trim()),f=r||n||c||!!t.pathogensHeading?.trim(),h=f||u,p=m(e);return(0,i.jsx)("section",{className:d.default.section,id:"description","aria-labelledby":f?"product-description-title":void 0,"aria-label":!f&&p.length>0?"Product breadcrumb":void 0,children:(0,i.jsxs)("div",{className:d.default.inner,children:[p.length>0?(0,i.jsx)("nav",{className:d.default.breadcrumb,"aria-label":"Breadcrumb",children:(0,i.jsx)("ol",{className:d.default.breadcrumbList,children:p.map((e,t)=>(0,i.jsxs)("li",{className:d.default.breadcrumbItem,children:[t>0?(0,i.jsx)("span",{className:d.default.breadcrumbSep,"aria-hidden":"true",children:"›"}):null,t<p.length-1&&e.href.trim()&&"#"!==e.href.trim()?(0,i.jsx)("a",{className:d.default.breadcrumbLink,href:e.href,children:e.label}):(0,i.jsx)("span",{className:d.default.breadcrumbCurrent,"aria-current":t===p.length-1?"page":void 0,children:e.label})]},`${e.label}-${t}`))})}):null,f?(0,i.jsxs)("h2",{id:"product-description-title",className:d.default.title,children:["Product ",(0,i.jsx)("span",{className:d.default.accent,children:"Description"})]}):null,h?(0,i.jsxs)("div",{className:d.default.layout,children:[f?(0,i.jsx)("div",{className:d.default.copyPanel,children:(0,i.jsxs)("div",{className:d.default.copyBody,children:[t.paragraphs.map((e,t)=>(0,i.jsx)(o.CmsHtmlField,{html:e,className:d.default.paragraph,as:"div"},`desc-p-${t}`)),n&&t.pathogensHeading?.trim()?(0,i.jsx)("p",{className:d.default.pathogensHeading,children:t.pathogensHeading}):null,n?(0,i.jsx)("ul",{className:d.default.pathogenList,"aria-label":t.pathogensHeading||"Pathogens",children:t.pathogens.map(e=>(0,i.jsx)("li",{className:d.default.pathogenItem,children:(0,i.jsx)(a.default,{className:d.default.pathogenImage,src:e.image,alt:e.label,width:109,height:140,unoptimized:!0,sizes:"(max-width: 767px) 60px, (max-width: 1024px) 80px, 109px"})},e.id))}):null,c?(0,i.jsx)(l.ProductsTextLink,{href:t.pathogensLink.href,label:t.pathogensLink.label,className:d.default.researchLink}):null]})}):null,u?(0,i.jsxs)("aside",{className:d.default.useCasesPanel,"aria-labelledby":t.useCasesHeading?.trim()?"product-use-cases-title":void 0,children:[t.useCasesHeading?.trim()?(0,i.jsx)("div",{className:d.default.useCasesHeader,children:(0,i.jsx)("h3",{id:"product-use-cases-title",className:d.default.useCasesHeading,children:t.useCasesHeading})}):null,(0,i.jsx)("ul",{className:d.default.useCaseList,children:t.useCases.map(e=>{let t=e.href?.trim()??"",r=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:d.default.useCaseIconWrap,children:e.icon?.trim()?(0,i.jsx)(a.default,{className:d.default.useCaseIcon,src:e.icon,alt:e.iconAlt,width:48,height:48,unoptimized:!0,sizes:"48px"}):null}),e.label?.trim()?(0,i.jsx)("span",{className:d.default.useCaseLabel,children:e.label}):null]});return(0,i.jsx)("li",{className:d.default.useCaseItem,children:t?(0,i.jsx)(s.default,{href:t,className:d.default.useCaseLink,children:r}):(0,i.jsx)("div",{className:d.default.useCaseRow,children:r})},e.id)})})]}):null]}):null]})})}var v=e.i(547672),x=e.i(867434),y=u,b=e.i(411023);function w(e){return e?(0,y.toPublicCmsPath)(e)??`/${e.replace(/^\/+/,"")}`:"#"}function _({widget:e}){let i=(0,r.useCmsLinkSection)(),a=(0,n.useCmsPageIdentity)(),s=a.title??"",o=a.slug??"",l=w(o),u=a.category;return(0,v.withCmsLinkSection)(i,()=>{let r=Array.isArray(e.pathogen)?e.pathogen:[],n=Array.isArray(e.useCases)?e.useCases:[],i={paragraphs:(0,b.toParagraphs)(e.body),pathogensHeading:e.pathogensHeading??"",pathogens:r.map((e,t)=>({id:e.id??`pathogen-${t}`,label:e.label??"",image:(0,b.fileUrl)(e.iconImage),imageAlt:e.label??""})),pathogensLink:{label:e.researchLinkLabel??"",href:(0,x.resolveDatoDualLink)(e.researchLinkUrl,e.researchLinkUrlExter
1nal,"")},useCasesHeading:e.useCasesHeading??"",useCases:n.map((e,t)=>({id:e.id??`use-case-${t}`,label:e.label??"",icon:(0,b.fileUrl)(e.icon),iconAlt:e.iconAlt??e.label??"",href:(0,x.resolveDatoLink)(e.link,"")}))};return(0,t.jsx)(g,{product:(0,b.partialProduct)({slug:o,name:s,fullName:s,category:u,breadcrumb:[{label:"Products",href:"/products"},...u?[u]:[],...s?[{label:s,href:l}]:[]],description:i})})})}e.s(["WidgetProductDescription",0,_],575868)},133351,e=>{e.v({background:"product-detail-hero-module__q9e5Pa__background",backgroundImage:"product-detail-hero-module__q9e5Pa__backgroundImage",backgroundOverlay:"product-detail-hero-module__q9e5Pa__backgroundOverlay",brandBlock:"product-detail-hero-module__q9e5Pa__brandBlock",ctas:"product-detail-hero-module__q9e5Pa__ctas",ctasFooter:"product-detail-hero-module__q9e5Pa__ctasFooter",ctasHeader:"product-detail-hero-module__q9e5Pa__ctasHeader",featureIcon:"product-detail-hero-module__q9e5Pa__featureIcon",featureItem:"product-detail-hero-module__q9e5Pa__featureItem",featureText:"product-detail-hero-module__q9e5Pa__featureText",featureTextLine:"product-detail-hero-module__q9e5Pa__featureTextLine",featuresCard:"product-detail-hero-module__q9e5Pa__featuresCard",featuresLabel:"product-detail-hero-module__q9e5Pa__featuresLabel",featuresList:"product-detail-hero-module__q9e5Pa__featuresList",header:"product-detail-hero-module__q9e5Pa__header",hotspots:"product-detail-hero-module__q9e5Pa__hotspots",inner:"product-detail-hero-module__q9e5Pa__inner",logo:"product-detail-hero-module__q9e5Pa__logo",main:"product-detail-hero-module__q9e5Pa__main",productImage:"product-detail-hero-module__q9e5Pa__productImage",productImageWrap:"product-detail-hero-module__q9e5Pa__productImageWrap",productVisual:"product-detail-hero-module__q9e5Pa__productVisual",section:"product-detail-hero-module__q9e5Pa__section",title:"product-detail-hero-module__q9e5Pa__title"})},869313,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=t,i=e.i(657688),a=e.i(862560),s=e.i(611578),o=e.i(435269),l=e.i(311546),u=e.i(133351);function c({product:e}){let{hero:t,fullName:r}=e,f=!!(t.cta.label?.trim()&&t.cta.href?.trim()),h=!!t.logoLight?.trim(),p=!!t.background?.trim(),m=!!t.productImage?.trim(),d=t.features.length>0;return(0,n.jsxs)("section",{className:u.default.section,"aria-labelledby":r?.trim()?"product-detail-hero-title":void 0,"aria-label":r?.trim()?void 0:"Product hero",children:[p?(0,n.jsxs)("div",{className:u.default.background,"aria-hidden":"true",children:[(0,n.jsx)(i.default,{className:u.default.backgroundImage,src:t.background,alt:"",fill:!0,priority:!0,unoptimized:!0,sizes:"100vw"}),(0,n.jsx)("div",{className:u.default.backgroundOverlay})]}):null,(0,n.jsxs)("div",{className:u.default.inner,children:[(0,n.jsxs)("header",{className:u.default.header,children:[(0,n.jsxs)("div",{className:u.default.brandBlock,children:[h?(0,n.jsx)(i.default,{className:u.default.logo,src:t.logoLight,alt:t.logoAlt,width:240,height:50,priority:!0,unoptimized:!0}):null,r?.trim()?(0,n.jsx)("h1",{id:"product-detail-hero-title",className:u.default.title,children:r}):null]}),f?(0,n.jsx)("div",{className:`${u.default.ctas} ${u.default.ctasHeader}`,children:(0,n.jsx)(s.HomeV2HeroCta,{href:t.cta.href,label:t.cta.label,variant:"primary"})}):null]}),(0,n.jsxs)("div",{className:u.default.main,children:[d?(0,n.jsxs)("aside",{className:u.default.featuresCard,"aria-labelledby":"product-detail-features-label",children:[(0,n.jsx)("p",{id:"product-detail-features-label",className:u.default.featuresLabel,children:"Features"}),(0,n.jsx)("ul",{className:u.default.featuresList,children:t.features.map(e=>(0,n.jsxs)("li",{className:u.default.featureItem,children:[(0,n.jsx)(o.CheckIcon,{className:u.default.featureIcon,width:37,height:34}),e.mobileLines?.length?(0,n.jsx)("span",{className:u.default.featureText,children:e.mobileLines.map((t,r)=>(0,n.jsx)("span",{className:u.default.featureTextLine,children:t},`${e.id}-line-${r}`))}):e.text?(0,n.jsx)(a.CmsHtmlField,{html:e.text,className:u.default.featureText,as:"div"}):null]},e.id))})]}):null,m?(0,n.jsx)("figure",{className:u.default.productVisual,children:(0,n.jsxs)("div",{className:u.default.productImageWrap,children:[(0,n.jsx)(i.default,{className:u.default.productImage,src:t.productImage,alt:t.productImageAlt,fill:!0,priority:!0,unoptimized:!0,sizes:"(max-width: 767px) 90vw, (max-width: 1024px) 40vw, min(700px, 40vw)"}),(0,n.jsx)("div",{className:u.default.hotspots,children:(0,n.jsx)(l.ProductDetailHeroHotspots,{hotspots:t.hotspots})})]})}):null]}),f?(0,n.jsx)("div",{className:`${u.default.ctas} ${u.default.ctasFooter}`,children:(0,n.jsx)(s.HomeV2HeroCta,{href:t.cta.href,label:t.cta.label,variant:"primary"})}):null]})]})}var f=e.i(547672);function h(e){return"string"==typeof e?e.trim():""}var p=e.i(867434),m=e.i(710060),d=e.i(411023);function g({widget:e}){let n=(0,r.useCmsLinkSection)(),i="string"==typeof e.productImageAlt?e.productImageAlt.trim():"",a=h(e.productImageAlt);return(0,f.withCmsLinkSection)(n,()=>{let r=Array.isArray(e.features)?e.features:[],n=(Array.isArray(e.hotspot)?e.hotspot:e.hotspot&&"object"==typeof e.hotspot?[e.hotspot]:[]).map((e,t)=>{let r="string"==typeof e.label?e.label.trim():"",n=Number(e.positionX),i=Number(e.positionY),a="string"==typeof e.labelPlacement?e.labelPlacement.trim().toLowerCase():"";return r&&Number.isFinite(n)&&Number.isFinite(i)&&["top-left","left","right","bottom-left"].includes(a)?{id:"string"==typeof e.id&&e.id||`hotspot-${t}`,x:n,y:i,label:r,labelPlacement:a}:null}).filter(e=>null!=e),s={logoLight:(0,d.fileUrl)(e.logoLight),logoAlt:e.logoAlt??"",background:(0,d.fileUrl)(e.backgroundImage),productImage:(0,d.fileUrl)(e.productImage),productImageAlt:i,cta:{label:e.ctaLabel??"",href:(0,p.resolveDatoDualLink)(e.ctaLink,e.ctaLinkExternal,"")},features:r.map((e,t)=>({id:e.id??`feature-${t}`,text:(0,m.cmsHtmlString)(e.featureText),mobileLines:(0,d.toStringList)(e.mobileLineBreaks)})),hotspots:n};return(0,t.jsx)(c,{product:(0,d.partialProduct)({hero:s,fullName:a})})})}e.s(["WidgetProductHero",0,g],869313)},662617,e=>{e.v({accent:"product-detail-specifications-module__7W6sUG__accent",cta:"product-detail-specifications-module__7W6sUG__cta",ctaFooter:"product-detail-specifications-module__7W6sUG__ctaFooter",ctaHeader:"product-detail-specifications-module__7W6sUG__ctaHeader",grid:"product-detail-specifications-module__7W6sUG__grid",header:"product-detail-specifications-module__7W6sUG__header",inner:"product-detail-specifications-module__7W6sUG__inner",label:"product-detail-specifications-module__7W6sUG__label",row:"product-detail-specifications-module__7W6sUG__row",section:"product-detail-specifications-module__7W6sUG__section",title:"product-detail-specifications-module__7W6sUG__title",value:"product-detail-specifications-module__7W6sUG__value"})},822033,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=t,i=e.i(611578),a=e.i(662617);function s({product:e}){let{specifications:t}=e,r=t.rows.length>0,o=!!(t.cta.label?.trim()&&t.cta.href?.trim());return r||o?(0,n.jsx)("section",{className:a.default.section,id:"specifications","aria-labelledby":"product-specifications-title",children:(0,n.jsxs)("div",{className:a.default.inner,children:[(0,n.jsxs)("div",{className:a.default.header,children:[(0,n.jsxs)("h2",{id:"product-specifications-title",className:a.default.title,children:["Product ",(0,n.jsx)("span",{className:a.default.accent,children:"Specifications"})]}),o?(0,n.jsx)("div",{className:`${a.default.cta} ${a.default.ctaHeader}`,children:(0,n.jsx)(i.HomeV2HeroCta,{href:t.cta.href,label:t.cta.label,variant:"outline",openInNewTab:t.cta.openInNewTab})}):null]}),r?(0,n.jsx)("ul",{className:a.default.grid,children:t.rows.map(e=>(0,n.jsxs)("li",{className:a.default.row,children:[(0,n.jsx)("span",{className:a.default.label,children:e.label}),(0,n.jsx)("span",{className:a.default.value,children:e.value})]},e.id))}):null,o?(0,n.jsx)("div",{className:`${a.default.cta} ${a.default.ctaFooter}`,children:(0,n.jsx)(i.HomeV2HeroCta,{href:t.cta.href,label:t.cta.label,variant:"outline",openInNewTab:t.cta.openInNewTab})}):null]})}):null}var o=e.i(547672),l=e.i(867434),u=e.i(411023);function c({widget:e}){let n=(0,r.useCmsLinkSection)();return(0,o.withCmsLinkSection)(n,()=>{let r={rows:(Array.isArray(e.rows)?e.rows:[]).map((e,t)=>({id:e.id??`spec-${t}`,label:e.label??"",value:e.value??""})),cta:{label:e.ctaLabel??"",href:(0,l.resolveDatoDualLink)(e.ctaLink,e.ctaLinkExternal,""),openInNewTab:!!e.openOnNextPage}};return(0,t.jsx)(s,{product:(0,u.partialProduct)({specifications:r})})})}e.s(["WidgetProductSpecification",0,c],822033)},850747,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(769345),i=e.i(271645);function a(e,t,r){if("json"===(r?.toLowerCase()??""))return"lottie";let n=t?.toLowerCase()??"";return"application/json"===n||n.endsWith("+json")||n.includes("json")||(e?.split("?")[0]?.toLowerCase()??"").endsWith(".json")?"lottie":"image"}function s(e,t){return"image/gif"===(t?.toLowerCase()??"")||(e?.split("?")[0]?.toLowerCase()??"").endsWith(".gif")}let o="relative size-[min(72px,calc(72*100vw/1920))] tablet:size-[min(91px,calc(91*100vw/1024))] mobile:size-[min(52px,calc(52*100vw/390))]",l="object-contain transition-opacity duration-200 ease-out",u="absolute inset-0 opacity-0 transition-opacity duration-200 ease-out group-hover:opacity-100 group-focus-within:opacity-100";function c({icon:e,hoverIcon:f,hoverIconMimeType:h,hoverIconFormat:p}){let m=(0,i.useRef)(null),d=(0,i.useRef)(null),[g,v]=(0,i.useState)(null),x=f?a(f,h,p):null,y=null!=f&&"image"===x&&s(f,h);return(0,i.useEffect)(()=>
1{if(!f||"lottie"!==x)return;let e=!1;return fetch(f).then(e=>{if(!e.ok)throw Error("Failed to load hover animation");return e.json()}).then(t=>{e||v(t)}).catch(()=>{e||v(null)}),()=>{e=!0}},[f,x]),(0,i.useEffect)(()=>{if("lottie"!==x||!g)return;let e=m.current?.closest("li.group");if(!e)return;let t=()=>{let e=d.current;if(e){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){let t=e.getDuration(!0);"number"==typeof t&&t>0&&e.goToAndStop(t-1,!0);return}e.goToAndPlay(0,!0)}},r=()=>{let e=d.current;e&&(e.stop(),e.goToAndStop(0,!0))};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),e.addEventListener("focusin",t),e.addEventListener("focusout",r),()=>{e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r),e.removeEventListener("focusin",t),e.removeEventListener("focusout",r)}},[g,x]),(0,t.jsxs)("div",{ref:m,className:o,children:[(0,t.jsx)(r.default,{src:e,alt:"",fill:!0,className:[l,f?"group-hover:opacity-0 group-focus-within:opacity-0":""].join(" "),sizes:"(max-width: 767px) 52px, (max-width: 1024px) 91px, 72px","aria-hidden":!0}),f&&"lottie"===x&&g?(0,t.jsx)("div",{className:u,"aria-hidden":!0,children:(0,t.jsx)(n.default,{lottieRef:d,animationData:g,autoplay:!1,loop:!0,className:"h-full w-full"})}):null,f&&"image"===x?(0,t.jsx)(r.default,{src:f,alt:"",fill:!0,unoptimized:y,className:[l,u].join(" "),sizes:"(max-width: 767px) 52px, (max-width: 1024px) 91px, 72px","aria-hidden":!0}):null]})}e.s(["ProofValidationContaminantIcon",0,c],850747)},78533,e=>{"use strict";var t=e.i(843476),r=e.i(618566),n=e.i(271645),i=t,a=e.i(522016),s=e.i(862560);function o(...e){return e.filter(Boolean).join(" ")}function l(e){return e.split(",").map(e=>e.trim()).find(Boolean)||null}function u(){return(0,i.jsx)("svg",{className:"size-auto h-[min(9px,calc(9*100vw/1920))] w-[min(10px,calc(10*100vw/1920))] shrink-0 tablet:h-[min(9px,calc(9*100vw/1024))] tablet:w-[min(10px,calc(10*100vw/1024))] mobile:h-[min(9px,calc(9*100vw/390))] mobile:w-[min(10px,calc(10*100vw/390))]",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,i.jsx)("path",{d:"M8.4136 0.915402C7.34943 3.35348 6.96711 5.93875 7.26455 8.46124C6.43959 7.61271 5.91698 6.38249 5.49538 5.04837L1.99352 8.65028L0.996693 7.62498L4.49855 4.02306C3.30461 3.69549 2.20958 3.05404 1.11104 2.06265C3.73252 2.2654 6.21371 2.04677 8.4136 0.915402Z",fill:"currentColor"})})}function c({article:e}){if(!e.slug)return null;let t=l(e.product);return(0,i.jsxs)(a.default,{href:`/research/${e.slug}`,className:o("group box-border flex h-fit w-full max-w-full flex-col items-start overflow-visible bg-white text-left no-underline","rounded-[min(16px,calc(16*100vw/1920))] p-[min(30px,calc(30*100vw/1920))]","gap-[min(10px,calc(10*100vw/1920))]","border-[0.5px] border-solid border-[#e5e5e5] shadow-none","transition-[border-color,box-shadow] duration-200 ease-out","hover:z-2 hover:border-transparent hover:shadow-[0_0_15px_0_rgb(0_0_0/0.14)]","focus-visible:z-2 focus-visible:border-transparent focus-visible:shadow-[0_0_15px_0_rgb(0_0_0/0.14)] focus-visible:outline-none","tablet:rounded-[min(16px,calc(16*100vw/1024))] tablet:p-[min(30px,calc(30*100vw/1024))]","tablet:gap-[min(10px,calc(10*100vw/1024))]","mobile:rounded-[min(16px,calc(16*100vw/390))] mobile:p-[min(20px,calc(20*100vw/390))]","mobile:gap-[min(10px,calc(10*100vw/390))]","mobile:border-[0.5px] mobile:border-solid mobile:border-[#e5e5e5]"),children:[t?(0,i.jsx)("span",{className:o("inline-flex shrink-0 items-center bg-black font-medium text-white","rounded-[min(4px,calc(4*100vw/1920))]","px-[min(10px,calc(10*100vw/1920))] py-[min(4px,calc(4*100vw/1920))]","text-[min(12px,calc(12*100vw/1920))] leading-normal","transition-colors duration-200 ease-out","group-hover:bg-[#036ada] group-focus-visible:bg-[#036ada]","tablet:rounded-[min(4px,calc(4*100vw/1024))] tablet:px-[min(10px,calc(10*100vw/1024))] tablet:py-[min(4px,calc(4*100vw/1024))]","tablet:text-[min(12px,calc(12*100vw/1024))] tablet:font-medium!","mobile:rounded-[min(4px,calc(4*100vw/390))] mobile:px-[min(10px,calc(10*100vw/390))] mobile:py-[min(4px,calc(4*100vw/390))]","mobile:text-[min(12px,calc(12*100vw/390))] mobile:font-medium!"),children:t}):null,(0,i.jsx)("h3",{className:o("m-0 w-full shrink-0 font-medium text-black","font-[family-name:var
1(--font-geograph),Geograph,system-ui,sans-serif]","text-[min(20px,calc(20*100vw/1920))] leading-normal","transition-colors duration-200 ease-out","group-hover:text-[#036ada] group-focus-visible:text-[#036ada]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-normal tablet:font-medium!","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal mobile:font-medium!"),children:e.name}),(0,i.jsx)("span",{className:"block h-px w-full shrink-0","aria-hidden":!0,children:(0,i.jsx)("span",{className:o("block h-px origin-left bg-[#e5e5e5]","w-[min(60px,calc(60*100vw/1920))]","transition-[width] duration-200 ease-out","group-hover:w-full group-focus-visible:w-full","tablet:w-[min(60px,calc(60*100vw/1024))]","mobile:w-[min(48px,calc(48*100vw/390))]")})}),e.excerpt?(0,i.jsx)(s.CmsHtmlField,{html:e.excerpt,className:o("m-0 w-full font-normal text-black","font-[family-name:var(--font-geograph),Geograph,system-ui,sans-serif]","text-[min(16px,calc(16*100vw/1920))] leading-[min(24px,calc(24*100vw/1920))]","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:leading-[min(24px,calc(24*100vw/1024))] tablet:font-normal!","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-[min(24px,calc(24*100vw/390))] mobile:font-normal!","[&_*]:[font-family:inherit]","[&_p]:m-0","[&_strong]:font-medium [&_b]:font-medium")}):null,(0,i.jsxs)("span",{className:o("inline-flex shrink-0 items-center gap-[min(6px,calc(6*100vw/1920))] font-medium text-[#6cade4]","font-[family-name:var(--font-geograph),Geograph,system-ui,sans-serif]","text-[min(16px,calc(16*100vw/1920))] leading-normal","transition-colors duration-200 ease-out","group-hover:text-[#036ada] group-focus-visible:text-[#036ada]","tablet:gap-[min(6px,calc(6*100vw/1024))] tablet:text-[min(16px,calc(16*100vw/1024))] tablet:font-medium!","mobile:gap-[min(6px,calc(6*100vw/390))] mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-medium!"),children:[(0,i.jsx)("span",{className:"underline decoration-solid decoration-[10%] underline-offset-2 [text-decoration-skip-ink:none]",children:"Full Report"}),(0,i.jsx)(u,{})]})]})}var f=t,h=a,p=n,m=s;function d(...e){return e.filter(Boolean).join(" ")}function g(e,t){let r=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return`research-category-${e||r||"section"}`}let v=d("font-medium text-[#6cade4] no-underline transition-colors duration-150","text-[min(20px,calc(20*100vw/1920))] leading-[min(28px,calc(28*100vw/1920))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(28px,calc(28*100vw/1024))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-[min(24px,calc(24*100vw/390))] mobile:font-medium!","text-[#6cade4]! **:text-[#6cade4]!","hover:text-[#036ada] hover:**:text-[#036ada]!");function x({testResults:e,testResultsBody:t}){let[r,n]=(0,p.useState)(()=>e[0]?g(e[0].id,e[0].title):""),i=(0,p.useRef)(null),a=(0,p.useRef)(null),s=(0,p.useRef)(null),[o,l]=(0,p.useState)(!1),u=(0,p.useMemo)(()=>e.map(e=>({collection:e,anchorId:g(e.id,e.title),hasSpace:e.researchArticleLinks.some(e=>e.space&&0!==e.space.length),hasModel:e.researchArticleLinks.some(e=>e.productModel&&0!==e.productModel.length)})),[e]);(0,p.useEffect)(()=>{if(0===u.length)return;let e=()=>{let e=document.querySelector(".site-header"),t=e?.getBoundingClientRect().bottom??100,r=`${Math.max(72,Math.round(t+8))}px`;a.current?.style.setProperty("--research-sticky-top",r)},t=()=>{let e=document.getElementById(u[0].anchorId);return e&&Number.parseFloat(getComputedStyle(e).scrollMarginTop)||116},r=()=>{if(i.current)return;let e=t(),r=e+24,a=s.current?.getBoundingClientRect().top;for(let t of(l(null!=a&&a<=1),u)){let r=document.getElementById(t.anchorId),n=r?.querySelector("[data-research-table-wrap]")??r?.querySelector("table")?.parentElement??null;if(!r||!n)continue;let i=Math.max(0,e-r.getBoundingClientRect().top),a=(getComputedStyle(n).borderBottomLeftRadius||"16px").split(" ")[0],s=a&&"0px"!==a?a:"16px";i>0?n.style.clipPath=`inset(${Math.round(i)}px 0 0 0 round 0 0 ${s} ${s})`:n.style.clipPath=""}let o=u[0]?.anchorId??"";for(let e of u){let t=document.getElementById(e.anchorId);t&&t.getBoundingClientRect().top<=r&&(o=e.anchorId)}n(e=>e===o?e:o)};e(),r();let o=()=>r(),c=()=>{e(),r()};return window.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",c),()=>{for(let e of(window.removeEventListener("scroll",o),window.removeEventListener("resize",c),u)){let t=document.getElementById(e.anchorId)?.querySelector("[data-research-table-wrap]");t&&(t.style.clipPath="")}}},[u]);let c=e=>{let t=document.getElementById(e);if(!t)return;i.current=e,n(e);let r=Number.parseFloat(getComputedStyle(t).scrollMarginTop)||0,a=t.getBoundingClientRect().top+window.scrollY-r;window.scrollTo({top:Math.max(0,a),behavior:"smooth"}),window.setTimeout(()=>{i.current=null,window.dispatchEvent(new Event("scroll"))},900)};return(0,f.jsxs)("div",{className:"w-full","data-research-sticky":!0,children:[t?(0,f.jsx)(m.CmsHtmlField,{html:t,className:d("mx-auto mb-[min(40px,calc(40*100vw/1920))] max-w-[min(720px,calc(720*100vw/1920))] text-center text-[#0f172a]","text-[min(16px,calc(16*100vw/1920))] leading-[1.55]","tablet:mx-0 tablet:mb-[min(23px,calc(23*100vw/1024))] tablet:max-w-none tablet:text-left tablet:text-black","tablet:text-[min(24px,calc(24*100vw/1024))] tablet:font-normal! tablet:leading-[min(44px,calc(44*100vw/1024))]","mobile:mx-0 mobile:mb-[min(20px,calc(20*100vw/390))] mobile:max-w-none mobile:text-left mobile:text-black","mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-normal! mobile:leading-[min(28px,calc(28*100vw/390))]","[&_p]:m-0 [&_p+p]:mt-2")}):null,(0,f.jsxs)("div",{ref:a,className:d("grid w-full min-w-0 grid-cols-1 items-start","gap-[min(32px,calc(32*100vw/1920))]","desktop:grid-cols-[minmax(0,min(260px,calc(260*100vw/1920)))_minmax(0,1fr)]","tablet:gap-[min(20px,calc(20*100vw/1024))]","mobile:gap-[min(16px,calc(16*100vw/390))]","[--research-sticky-top:116px]","max-[1380px]:[--research-sticky-top:106px]","max-[1023px]:[--research-sticky-top:88px]","[--research-category-header-h:min(54px,calc(54*100vw/1920))]","tablet:[--research-category-header-h:min(50px,calc(50*100vw/1024))]","mobile:[--research-category-header-h:min(44px,calc(44*100vw/390))]"),children:[(0,f.jsxs)("aside",{className:d("w-full min-w-0 overflow-hidden rounded-[16px] bg-white bg-clip-padding","border border-solid border-[#e5e7eb] shadow-[0_8px_24px_rgb(15_23_42/0.06)]","de
1sktop:sticky desktop:top-(--research-sticky-top) desktop:z-30","tablet:overflow-hidden tablet:rounded-[16px] tablet:border-[0.5px] tablet:border-solid tablet:border-[#97999b] tablet:bg-white tablet:shadow-none","mobile:overflow-hidden mobile:rounded-[16px] mobile:border-[0.5px] mobile:border-solid mobile:border-[#97999b] mobile:shadow-none"),"aria-label":"Research categories",children:[(0,f.jsx)("div",{className:d("bg-[#6cade4] px-[min(20px,calc(20*100vw/1920))] py-[min(14px,calc(14*100vw/1920))]","text-[min(20px,calc(20*100vw/1920))] font-medium normal-case tracking-normal leading-[min(26px,calc(26*100vw/1920))] text-white","tablet:flex tablet:h-[min(46px,calc(46*100vw/1024))] tablet:items-center","tablet:px-[min(20px,calc(20*100vw/1024))] tablet:py-0","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(26px,calc(26*100vw/1024))]","tablet:font-medium! tablet:normal-case tablet:tracking-normal","mobile:flex mobile:h-[min(40px,calc(40*100vw/390))] mobile:items-center","mobile:px-[min(16px,calc(16*100vw/390))] mobile:py-0","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal","mobile:font-medium! mobile:normal-case mobile:tracking-normal"),children:"Research Categories"}),(0,f.jsx)("nav",{className:d("flex flex-col p-[min(8px,calc(8*100vw/1920))]","tablet:flex-row tablet:flex-nowrap tablet:items-stretch tablet:justify-between","tablet:gap-[min(20px,calc(20*100vw/1024))]","tablet:p-[min(10px,calc(10*100vw/1024))]","mobile:flex mobile:max-w-full mobile:flex-row mobile:flex-nowrap mobile:items-stretch mobile:justify-start","mobile:gap-[min(12px,calc(12*100vw/390))]","mobile:overflow-x-auto mobile:overscroll-x-contain mobile:p-[min(10px,calc(10*100vw/390))]","mobile:[-webkit-overflow-scrolling:touch]"),children:u.map(({collection:e,anchorId:t})=>{let n=r===t;return(0,f.jsxs)("button",{type:"button",onClick:()=>c(t),"aria-current":n?"true":void 0,"data-active":n?"true":void 0,className:d("flex w-full items-center gap-[min(12px,calc(12*100vw/1920))] rounded-[min(10px,calc(10*100vw/1920))]","px-[min(14px,calc(14*100vw/1920))] py-[min(12px,calc(12*100vw/1920))]","text-left text-[min(15px,calc(15*100vw/1920))] font-medium transition-colors duration-150","tablet:h-[min(86px,calc(86*100vw/1024))] tablet:w-[min(160.8px,calc(160.8*100vw/1024))] tablet:shrink-0","tablet:flex-col tablet:items-center tablet:justify-center tablet:gap-[min(6px,calc(6*100vw/1024))]","tablet:rounded-none tablet:border-0 tablet:px-0 tablet:py-0 tablet:text-center","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:leading-normal tablet:font-medium!","mobile:h-[min(80px,calc(80*100vw/390))] mobile:w-[min(140px,calc(140*100vw/390))] mobile:shrink-0","mobile:flex-col mobile:items-center mobile:justify-center mobile:gap-[min(6px,calc(6*100vw/390))]","mobile:rounded-none mobile:border-0 mobile:px-0 mobile:py-0 mobile:text-center","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal mobile:font-medium!",n?"bg-[#e8f3fc] text-[#036ada]":"bg-transparent text-[#0f172a] hover:bg-[#f8fafc] tablet:bg-transparent tablet:text-black tablet:hover:bg-transparent mobile:bg-transparent mobile:text-black mobile:hover:bg-transparent"),children:[e.iconUrl?(0,f.jsx)("img",{src:e.iconUrl,alt:"",width:40,height:40,className:d("size-[min(28px,calc(28*100vw/1920))] shrink-0 object-contain","tablet:size-[min(40px,calc(40*100vw/1024))]","mobile:size-[min(32px,calc(32*100vw/390))]")}):(0,f.jsx)("span",{className:d("size-[min(28px,calc(28*100vw/1920))] shrink-0 rounded-full","tablet:size-[min(40px,calc(40*100vw/1024))]","mobile:size-[min(32px,calc(32*100vw/390))]",n?"bg-[#6cade4]":"bg-[#d4d4d8]"),"aria-hidden":!0}),(0,f.jsx)("span",{className:"tablet:w-full mobile:w-full",children:e.title})]},t)})})]}),(0,f.jsxs)("div",{className:d("relative z-0 flex min-w-0 flex-col"),children:[(0,f.jsx)("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none sticky top-0 z-9 h-0 min-h-0 overflow-visible",children:(0,f.jsx)("div",{className:d("h-(--research-sticky-top) w-full",o?"bg-white":"bg-transparent")})}),u.map(({collection:e,anchorId:t,hasSpace:r,hasModel:n},i)=>(0,f.jsx)("div",{className:d("rounded-[16px]","shadow-[0_12px_32px_rgb(15_23_42/0.08)]","tablet:shadow-none mobile:shadow-none",i>0&&"mt-[min(24px,calc(24*100vw/1920))] tablet:mt-[min(20px,calc(20*100vw/1024))] mobile:mt-[min(16px,calc(16*100vw/390))]"),children:(0,f.jsxs)("section",{id:t,"data-research-category-card":!0,className:"scroll-mt-(--research-sticky-top)",children:[(0,f.jsxs)("header",{className:d("sticky top-(--research-sticky-top) z-20 flex items-center gap-[min(12px,calc(12*100vw/1920))] bg-[#e8f3fc]","overflow-hidden rounded-t-[16px]","border-x border-t border-solid border-[#e5e7eb]","px-[min(20px,calc(20*100vw/1920))] py-[min(14px,calc(14*100vw/1920))]","tablet:h-[min(50px,calc(50*100vw/1024))] tablet:flex-row tablet:items-center","tablet:gap-[min(10px,calc(10*100vw/1024))]","tablet:rounded-t-[16px]","tablet:border-[0.5px] tablet:border-solid tablet:border-[#97999b]","tablet:px-[min(20px,calc(20*100vw/1024))] tablet:py-0","mobile:h-[min(44px,calc(44*100vw/390))] mobile:flex-row mobile:items-center","mobile:gap-[min(8px,calc(8*100vw/390))]","mobile:rounded-t-[16px]","mobile:border-[0.5px] mobile:border-solid mobile:border-[#97999b]","mobile:px-[min(16px,calc(16*100vw/390))] mobile:py-0"),children:[e.iconUrl?(0,f.jsx)("img",{src:e.iconUrl,alt:"",width:30,height:30,className:"size-[min(32px,calc(32*100vw/1920))] shrink-0 object-contain tablet:size-[min(30px,calc(30*100vw/1024))] mobile:size-[min(24px,calc(24*100vw/390))]"}):null,(0,f.jsx)("h3",{className:d("m-0 text-[min(20px,calc(20*100vw/1920))] font-medium normal-case tracking-normal leading-[min(26px,calc(26*100vw/1920))] text-black","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(26px,calc(26*100vw/1024))]","tablet:font-medium! tablet:normal-case tablet:tracking-normal tablet:text-black","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal","mobile:font-medium! mobile:normal-case mobile:tracking-normal mobile:text-black"),children:e.title})]}
1),(0,f.jsx)("div",{"data-research-table-wrap":!0,className:d("min-w-0 rounded-b-[16px] bg-white bg-clip-padding","relative z-0","border-x border-b border-solid border-[#e5e7eb]","tablet:border-[0.5px] tablet:border-solid tablet:border-[#97999b]","mobile:border-[0.5px] mobile:border-solid mobile:border-[#97999b]","max-[1024px]:overflow-x-auto max-[1024px]:overscroll-x-contain","max-[1024px]:[-webkit-overflow-scrolling:touch]"),children:(0,f.jsxs)("table",{className:d("w-full table-fixed border-separate border-spacing-0 text-left","min-w-[min(640px,100%)]","tablet:min-w-[640px]","mobile:min-w-[560px]","[&_tbody_tr:last-child_td:first-child]:rounded-bl-[16px]","[&_tbody_tr:last-child_td:last-child]:rounded-br-[16px]"),children:[(0,f.jsx)("thead",{children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(y,{className:"w-[46%] tablet:w-[34.513%] mobile:w-[34%]",children:"Name"}),(0,f.jsx)(y,{className:"w-[13.5%] tablet:w-[16.372%] mobile:w-[16.5%]",children:"Reduction"}),(0,f.jsx)(y,{className:"w-[13.5%] tablet:w-[16.372%] mobile:w-[16.5%]",children:"Time"}),r?(0,f.jsx)(y,{className:"w-[13.5%] tablet:w-[16.372%] mobile:w-[16.5%]",children:"Space"}):null,n?(0,f.jsx)(y,{className:"w-[13.5%] tablet:w-[16.372%]",children:"Model"}):null]})}),(0,f.jsx)("tbody",{children:e.researchArticleLinks.map(e=>{let t=e.article?.slug?`/research/${e.article.slug}`:null;return(0,f.jsxs)("tr",{className:d("[&>td]:border-b [&>td]:border-solid [&>td]:border-[#e5e7eb]","last:[&>td]:border-b-0"),children:[(0,f.jsx)(b,{children:t?(0,f.jsx)(h.default,{href:t,className:v,children:(0,f.jsx)(m.CmsHtmlField,{html:e.name,as:"span"})}):(0,f.jsx)(m.CmsHtmlField,{html:e.name,className:v,as:"span"})}),(0,f.jsx)(w,{children:e.reduction}),(0,f.jsx)(w,{children:e.time}),r?(0,f.jsx)(w,{children:e.space?(0,f.jsx)(m.CmsHtmlField,{html:e.space,as:"span"}):null}):null,n?(0,f.jsx)(w,{children:e.productModel}):null]},e.id)})})]})})]})},t))]})]})]})}function y({children:e,className:t}){return(0,f.jsx)("th",{className:d("desktop:sticky desktop:z-[5] bg-white px-[min(20px,calc(20*100vw/1920))] py-[min(11px,calc(11*100vw/1920))]","desktop:top-[calc(var(--research-sticky-top)+var(--research-category-header-h))]","border-b border-solid border-[#e5e7eb]","desktop:shadow-[0_-1px_0_0_#fff]","h-[min(50px,calc(50*100vw/1920))]","text-[min(20px,calc(20*100vw/1920))] leading-[min(28px,calc(28*100vw/1920))]","font-medium normal-case tracking-normal text-black","tablet:h-[min(50px,calc(50*100vw/1024))] tablet:px-[min(20px,calc(20*100vw/1024))] tablet:py-[min(11px,calc(11*100vw/1024))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(28px,calc(28*100vw/1024))]","tablet:font-medium! tablet:normal-case tablet:tracking-normal tablet:text-black","mobile:h-[min(44px,calc(44*100vw/390))] mobile:px-[min(12px,calc(12*100vw/390))] mobile:py-[min(10px,calc(10*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-[min(24px,calc(24*100vw/390))]","mobile:font-medium! mobile:normal-case mobile:tracking-normal mobile:text-black","mobile:whitespace-nowrap",t),children:e})}function b({children:e}){return(0,f.jsx)("td",{className:d("bg-white px-[min(20px,calc(20*100vw/1920))] py-[min(21px,calc(21*100vw/1920))]","h-[min(70px,calc(70*100vw/1920))] align-middle","tablet:h-[min(70px,calc(70*100vw/1024))] tablet:px-[min(20px,calc(20*100vw/1024))] tablet:py-[min(21px,calc(21*100vw/1024))]","text-[#6cade4]! **:text-[#6cade4]!","mobile:h-[min(56px,calc(56*100vw/390))] mobile:px-[min(12px,calc(12*100vw/390))] mobile:py-[min(12px,calc(12*100vw/390))]"),children:e})}function w({children:e,className:t}){return(0,f.jsx)("td",{className:d("bg-white px-[min(20px,calc(20*100vw/1920))] py-[min(21px,calc(21*100vw/1920))]","h-[min(70px,calc(70*100vw/1920))]","text-[min(20px,calc(20*100vw/1920))] leading-[min(28px,calc(28*100vw/1920))]","font-normal text-black align-middle","tablet:h-[min(70px,calc(70*100vw/1024))] tablet:px-[min(20px,calc(20*100vw/1024))] tablet:py-[min(21px,calc(21*100vw/1024))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(28px,calc(28*100vw/1024))]","tablet:font-normal! tablet:text-black","mobile:h-[min(56px,calc(56*100vw/390))] mobile:px-[min(12px,calc(12*100vw/390))] mobile:py-[min(12px,calc(12*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-[min(24px,calc(24*100vw/390))]","mobile:font-normal! mobile:text-black mobile:whitespace-nowrap",t),children:e})}var _=e.i(170192);function D(e,t,r){return r.indexOf(e)===t}function C(...e){return e.filter(Boolean).join(" ")}let A="test-results";function E(e,t){if(!e)return null;let r=(0,_.newsCollectionTabSlug)(e);if(!r)return null;if(r===A)return 0;let n=t.findIndex(e=>(0,_.newsCollectionTabSlug)(e.title)===r);return n>=0?n+1:null}function N(){return(0,t.jsxs)("svg",{className:"pointer-events-none absolute right-[min(14px,calc(14*100vw/1920))] size-[min(18px,calc(18*100vw/1920))] text-[#737373] tablet:right-[min(16px,calc(16*100vw/1024))] tablet:size-[min(20px,calc(20*100vw/1024))] mobile:right-[min(12px,calc(12*100vw/390))] mobile:size-[min(18px,calc(18*100vw/390))]",viewBox:"0 0 20 20","aria-hidden":!0,
1children:[(0,t.jsx)("circle",{fill:"none",stroke:"currentColor",strokeWidth:"1.1",cx:"9",cy:"9",r:"7"}),(0,t.jsx)("path",{fill:"none",stroke:"currentColor",strokeWidth:"1.1",d:"M14 14L18 18"})]})}function S(e,t,r){return e.filter(e=>!!(""===t||e.pathogenOrPollutant?.includes(t)||e.product?.includes(t))).filter(e=>{if(""===r)return!0;let t=r;return e.name?.toLowerCase().includes(t)||e.excerpt?.toLowerCase().includes(t)||e.body?.toLowerCase().includes(t)})}function M(e,t){let r=Array.from({length:t},()=>[]);return e.forEach((e,n)=>{r[n%t].push(e)}),r.filter(e=>e.length>0)}function T({articles:e}){return(0,t.jsx)("div",{className:C("flex w-full flex-col","gap-[min(40px,calc(40*100vw/1920))]","tablet:gap-[min(40px,calc(40*100vw/1024))]","mobile:gap-[min(20px,calc(20*100vw/390))]"),children:e.map(e=>(0,t.jsx)(c,{article:e},e.id))})}function k({articles:e}){let r=M(e,3),n=M(e,2);return 0===e.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:C("flex w-full flex-col tablet:hidden desktop:hidden","gap-[min(20px,calc(20*100vw/390))]"),children:e.map(e=>(0,t.jsx)(c,{article:e},e.id))}),(0,t.jsx)("div",{className:C("hidden w-full tablet:grid tablet:grid-cols-2 tablet:items-start desktop:hidden","tablet:gap-[min(40px,calc(40*100vw/1024))]"),children:n.map((e,r)=>(0,t.jsx)(T,{articles:e},`research-tab-col-${r}`))}),(0,t.jsx)("div",{className:C("hidden w-full desktop:grid desktop:grid-cols-3 desktop:items-start","desktop:gap-[min(40px,calc(40*100vw/1920))]"),children:r.map((e,r)=>(0,t.jsx)(T,{articles:e},`research-col-${r}`))})]})}function F({content:e}){let{id:i,researchCollections:a,testResults:s,testResultsBody:o}=e,l=(0,r.usePathname)()??"/research",u=(0,r.useRouter)(),c=(0,r.useSearchParams)(),f=c.get(_.NEWS_BROWSER_TAB_PARAM),[h,p]=(0,n.useState)(0),[m,d]=(0,n.useState)(""),[g,v]=(0,n.useState)(""),[y,b]=(0,n.useState)("search");(0,n.useEffect)(()=>{let e=(l||"/research").replace(/^\//,"")||"research";try{sessionStorage.setItem("researchUrl",e.split("/")[0]||"research")}catch{}},[l]),(0,n.useLayoutEffect)(()=>{try{let e=sessionStorage.getItem(`searchValue-${i}`),t=sessionStorage.getItem(`filterValue-${i}`),r=sessionStorage.getItem(`activeTabIndex-${i}`);null!=e?v(e):sessionStorage.setItem(`searchValue-${i}`,""),null!=t?(d(t),t&&b("filter")):sessionStorage.setItem(`filterValue-${i}`,"");let n=E(f,a);null!=n?(p(n),sessionStorage.setItem(`activeTabIndex-${i}`,String(n))):null!=r?p(parseInt(r,10)||0):sessionStorage.setItem(`activeTabIndex-${i}`,"0")}catch{}},[i,f,a]),(0,n.useEffect)(()=>{try{sessionStorage.setItem(`searchValue-${i}`,g)}catch{}},[i,g]),(0,n.useEffect)(()=>{try{sessionStorage.setItem(`filterValue-${i}`,m)}catch{}},[i,m]),(0,n.useEffect)(()=>{try{sessionStorage.setItem(`activeTabIndex-${i}`,String(h))}catch{}},[i,h]),(0,n.useEffect)(()=>{m.length>0?b("filter"):g.length>0&&b("search")},[m,g]);let w=(0,n.useMemo)(()=>a.flatMap(e=>e.researchArticles.flatMap(e=>(e.pathogenOrPollutant||"").split(",").map(e=>e.trim()))).filter(D).filter(e=>""!==e),[a]),A=(0,n.useMemo)(()=>a.flatMap(e=>e.researchArticles.flatMap(e=>(e.product||"").split(",").map(e=>e.trim()))).filter(D).filter(e=>""!==e),[a]),M=e=>{p(e);let t=0===e?(0,_.newsCollectionListingHref)("Test Results",l):(0,_.newsCollectionListingHref)(a[e-1]?.title??"Test Results",l),r=c.toString();t!==(r?`${l}?${r}`:l)&&u.replace(t,{scroll:!1})},T=()=>{0===h&&M(1)},B=e=>{v(e.target.value.toLowerCase()),""!==m&&d("")},P=e=>{d(e.target.value),""!==g&&v("")},j="search"===y,O="filter"===y;return(0,t.jsx)("section",{className:C("box-border w-full font-sans text-[#0f172a]","py-[min(48px,calc(48*100vw/1920))]","tablet:pt-0 tablet:pb-[min(80px,calc(80*100vw/1024))]","mobile:pt-0 mobile:pb-[min(80px,calc(80*100vw/390))]"),children:(0,t.jsxs)("div",{className:C("box-border mx-auto w-full max-w-480","px-[min(160px,calc(160*100vw/1920))]","tablet:px-[min(60px,calc(60*100vw/1024))]","mobile:px-[min(20px,calc(20*100vw/390))]"),children:[(0,t.jsxs)("div",{className:C("mx-auto mb-[min(32px,calc(32*100vw/1920))] w-full max-w-[min(480px,calc(480*100vw/1920))]","tablet:mb-[min(27px,calc(27*100vw/1024))] tablet:max-w-[min(676px,calc(676*100vw/1024))]","mobile:mb-[min(24px,calc(24*100vw/390))] mobile:max-w-full"),children:[(0,t.jsxs)("ul",{className:C("mb-[min(12px,calc(12*100vw/1920))] flex list-none items-center justify-center gap-[min(28px,calc(28*100vw/1920))] p-0","tablet:mb-[min(16px,calc(16*100vw/1024))] tablet:gap-[min(28px,calc(28*100vw/1024))]","mobile:mb-[min(12px,calc(12*100vw/390))] mobile:gap-[min(28px,calc(28*100vw/390))]"),role:"tablist","aria-label":"Search or filter",children:[(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":j,onClick:()=>b("search"),className:C("border-0 bg-transparent p-0 font-medium uppercase tracking-[0.06em]","text-[min(13px,calc(13*100vw/1920))] transition-colors","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:font-medium! tablet:tracking-[0.06em]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-medium! mobile:tracking-[0.06em]",j?"text-[#036ada]":"text-[#6cade4]"),children:"Search"})}),(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":O,onClick:()=>b("filter"),className:C("border-0 bg-transparent p-0 font-medium uppercase tracking-[0.06em]","text-[min(13px,calc(13*100vw/1920))] transition-colors","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:font-medium! tablet:tracking-[0.06em]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-medium! mobile:tracking-[0.06em]",O?"text-[#036ada]":"text-[#6cade4]"),children:"Filter"})})]}),(0,t.jsx)("div",{className:C("rounded-[min(8px,calc(8*100vw/1920))] bg-[#e8f3fc] p-[min(12px,calc(12*100vw/1920))]","tablet:rounded-[min(8px,calc(8*100vw/1024))] tablet:p-[min(16px,calc(16*100vw/1024))]","mobile:rounded-[min(8px,calc(8*100vw/390))] mobile:p-[min(12px,calc(12*100vw/390))]"),children:j?(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsx)("input",{type:"search",placeholder:"Search articles",value:g,onChange:B,onFocus:T,"aria-label":"Search articles",className:C("box-border w-full appearance-none rounded-[min(6px,calc(6*100vw/1920))] border border-solid border-[#6cade4] bg-white","px-[min(14px,calc(14*100vw/1920))] py-[min(12px,calc(12*100vw/1920))] pr-[min(40px,calc(40*100vw/1920))]","text-[min(15px,calc(15*100vw/1920))] font-normal text-[#0f172a] outline-none","placeholder:text-[#a3a3a3]","tablet:rounded-[min(6px,calc(6*100vw/1024))] tablet:px-[min(16px,calc(16*100vw/1024))] tablet:py-[min(14px,calc(14*100vw/1024))] tablet:pr-[min(44px,calc(44*100vw/1024))]","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:font-normal!","mobile:rounded-[min(6px,calc(6*100vw/390))] mobile:px-[min(14px,calc(14*100vw/390))] mobile:py-[min(12px,calc(12*100vw/390))] mobile:pr-[min(40px,calc(40*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-normal! mobile:text-black")}),(0,t.jsx)(N,{})]}):(0,t.jsxs)("select",{value:m,onChange:P,onFocus:T,"aria-label":"Filter research",className:C("box-border w-full cursor-pointer appearance-none rounded-[min(6px,calc(6*100vw/1920))] border border-solid border-[#6cade4] bg-white","px-[min(14px,calc(14*100vw/1920))] py-[min(12px,calc(12*100vw/1920))]","text-[min(15px,calc(15*100vw/1920))] font-normal text-[#0f172a] outline-none","tablet:rounded-[min(6px,calc(6*100vw/1024))] tablet:px-[min(16px,calc(16*100vw/1024))] tablet:py-[min(14px,calc(14*100vw/1024))]","tablet:text-[min(16px,calc(16*100vw/1024))] tablet:font-normal!","mobile:rounded-[min(6px,calc(6*100vw/390))] mobile:px-[min(14px,calc(14*100vw/390))] mobile:py-[min(12px,calc(12*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:font-normal! mobile:text-black"),children:[(0,t.jsx)("option",{value:"",children:"All Research"}),(0,t.jsx)("optgroup",{label:"Pathogen or Pollutant",children:w.map(e=>(0,t.jsx)("option",{value:e,children:e},`pathogen-${e}`))}),(0,t.jsx)("optgroup",{label:"Product",children:A.map(e=>(0,t.jsx)("option",{value:e,children:e},`product-${e}`))})]})})]}),(0,t.jsxs)("ul",{className:C("mb-[min(40px,calc(40*100vw/1920))] flex list-none flex-wrap items-center justify-center gap-[min(12px,calc(12*100vw/1920))] p-0","tablet:mb-[min(27px,calc(27*100vw/1024))] tablet:flex-nowrap tablet:justify-center tablet:gap-[min(24px,calc(24*100vw/1024))]","mobile:mb-[min(24px,calc(24*100vw/390))] mobile:flex-wrap mobile:justify-center mobile:gap-[min(8px,calc(8*100vw/390))]"),role:"tablist","aria-label":"Research sections",children:[(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":0===h,onClick:()=>M(0),className:C("rounded-full border border-solid px-[min(24px,calc(24*100vw/1920))] py-[min(12px,calc(12*100vw/1920))]","h-[min(50px,calc(50*100vw/1920))] inline-flex items-center justify-center","text-[min(20px,calc(20*100vw/1920))] font-medium leading-normal transition-colors","border-[0.5px] border-[#97999b]","tablet:box-border tablet:inline-flex tablet:items-center tablet:justify-center tablet:h-[min(50px,calc(50*100vw/1024))] tablet:rounded-[min(90px,calc(90*100vw/1024))] tablet:border-[0.5px] tablet:border-solid tablet:border-[#97999b]","tablet:px-[min(24px,calc(24*100vw/1024))] tablet:py-[min(12px,calc(12*100vw/1024))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-normal tablet:font-medium!","mobile:box-border mobile:inline-flex mobile:items-center mobile:justify-center mobile:h-[min(40px,calc(40*100vw/390))]","mobile:rounded-[min(90px,calc(90*100vw/390))] mobile:border-[0.5px] mobile:border-solid mobile:border-[#97999b]","mobile:px-[min(16px,calc(16*100vw/390))] mobile:py-[min(8px,calc(8*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal mobile:font-medium!",0===h?"border-[#036ada] bg-[#036ada] text-white":"border-[#d4d4d8] bg-white text-[#0f172a] hover:border-[#6cade4] tablet:text-black mobile:text-black"),children:"Test Results"})}),a.map((e,r)=>{let n=S(e.researchArticles,m,g).length,i=r+1,a=h===i;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>M(i),className:C("rounded-full border border-solid px-[min(24px,calc(24*100vw/1920))] py-[min(12px,calc(12*100vw/1920))]","h-[min(50px,calc(50*100vw/1920))] inline-flex items-center justify-center","text-[min(20px,calc(20*100vw/1920))] font-medium leading-normal transition-colors","border-[0.5px] border-[#97999b]","tablet:box-border tablet:inline-flex tablet:items-center tablet:justify-center tablet:h-[min(50px,calc(50*100vw/1024))] tablet:rounded-[min(90px,calc(90*100vw/1024))] tablet:border-[0.5px] tablet:border-solid tablet:border-[#97999b]","tablet:px-[min(24px,calc(24*100vw/1024))] tablet:py-[min(12px,calc(12*100vw/1024))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-normal tablet:font-medium!","mobile:box-border mobile:inline-flex mobile:items-center mobile:justify-center mobile:h-[min(40px,calc(40*100vw/390))]","mobile:rounded-[min(90px,calc(90*100vw/390))] mobile:border-[0.5px] mobile:border-solid mobile:border-[#97999b]","mobile:px-[min(16px,calc(16*100vw/390))] mobile:py-[min(8px,calc(8*100vw/390))]","mobile:text-[min(16px,calc(16*100vw/390))] mobile:leading-normal mobile:font-medium!",a?"border-[#036ada] bg-[#036ada] text-white":"border-[#d4d4d8] bg-white text-[#0f172a] hover:border-[#6cade4] tablet:text-black mobile:text-black"),children:[e.title," (",n,")"]})},e.id||r)})]}),(0,t.jsx)("div",{role:"tabpanel",hidden:0!==h,className:0===h?"block":"hidden",children:(0,t.jsx)(x,{testResults:s,testResultsBody:o})}),a.map((e,r)=>{let n=r+1,i=S(e.researchArticles,m,g),a=h===n;return(0,t.jsx)("div",{role:"tabpanel",hidden:!a,className:a?"block":"hidden",children:(0,t.jsx)(k,{articles:i})},e.id||r)})]})})}e.s(["ResearchIndex",0,F],78533)},57605,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(271645),i=e.i(894109),a=e.i(164524);function s({bullet:e}
1){let[o,l]=(0,n.useState)(!1),[u,c]=(0,n.useState)(!1),[f,h]=(0,n.useState)(!1),p=!!(e.hasDetail&&(0,a.structuredTextToPlainText)(e.detail)),m=p&&u;(0,n.useLayoutEffect)(()=>{h(!0);let e=window.matchMedia("(min-width: 1025px)"),t=()=>{c(e.matches)};return t(),e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[]);let d=(0,n.useCallback)(()=>{m&&l(e=>!e)},[m]),g=(0,n.useCallback)(e=>{m&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),d())},[m,d]),v=["industries-success-bullet",p?"industries-success-bullet--interactive":"industries-success-bullet--title-only",m&&o?"industries-success-bullet--expanded":""].filter(Boolean).join(" ");return(0,t.jsxs)("li",{className:v,onClick:m?d:void 0,onKeyDown:m?g:void 0,onMouseEnter:m?()=>l(!0):void 0,onMouseLeave:m?()=>l(!1):void 0,tabIndex:m?0:void 0,"aria-expanded":f&&p?!u||o:void 0,children:[(0,t.jsx)("div",{className:"industries-success-bullet__icon-wrap",children:(0,t.jsx)(r.default,{className:"industries-success-bullet__icon",src:"/home-v2/product-spotlight/checkmark.png",alt:"",width:30,height:28,"aria-hidden":!0})}),(0,t.jsxs)("div",{className:"industries-success-bullet__copy",children:[e.title?(0,t.jsx)(i.CmsCopyField,{value:e.title,variant:"body",paragraphClassName:"industries-success-bullet__title"}):null,e.detail?(0,t.jsx)("div",{className:"industries-success-bullet__detail-wrap",children:(0,t.jsx)("div",{className:"industries-success-bullet__detail-inner",children:(0,t.jsx)(i.CmsCopyField,{value:e.detail,variant:"body",paragraphClassName:"industries-success-bullet__detail"})})}):null]})]})}e.s(["RealWorldSuccessBullet",0,s])},605426,e=>{"use strict";var t=e.i(843476),r=e.i(62206),n=e.i(103361),i=t,a=e.i(657688),s=e.i(522016),o=e.i(894109),l=e.i(318103);function u({category:e}){let t=!!e.iconSrc,r=e.href?.trim(),n=!!(r&&"#"!==r);return(0,i.jsxs)("article",{className:`solutions-category-card${n?" solutions-category-card--linked":""}`,children:[t?(0,i.jsx)("div",{className:"solutions-category-card__icon-wrap",children:(0,i.jsx)(a.default,{className:`solutions-category-card__icon${e.iconClassName?` ${e.iconClassName}`:""}`,src:e.iconSrc,alt:"",width:77,height:80,sizes:"(max-width: 767px) 77px, (max-width: 1024px) 80px, 77px"})}):null,(0,i.jsx)("h3",{className:"solutions-card-title solutions-category-card__title",children:e.title}),e.description?(0,i.jsx)("div",{className:"solutions-category-card__description-wrap",children:(0,i.jsx)(o.CmsCopyField,{value:e.description,variant:"body",fallbackClassName:"solutions-body solutions-category-card__description",paragraphClassName:"solutions-body solutions-category-card__description",prose:!0})}):null,n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.ProductsTextLink,{label:"Learn More",className:"solutions-category-card__link"}),(0,i.jsx)(s.default,{href:r,className:"solutions-category-card__overlay-link","aria-label":`Learn more about ${e.title}`})]}):null]})}var c=t;function f({stat:e}){return(0,c.jsx)("article",{className:"solutions-stat-card",tabIndex:0,children:(0,c.jsxs)("div",{className:"solutions-stat-card__inner",children:[(0,c.jsx)("span",{className:"solutions-stat-card__accent","aria-hidden":!0}),(0,c.jsxs)("div",{className:"solutions-stat-card__content",children:[(0,c.jsx)("p",{className:"solutions-stat-card__value",children:e.segments?e.segments.map((e,t)=>(0,c.jsx)("span",{className:"suffix"===e.variant?"solutions-stat-suffix":"solutions-stat-value",children:e.text},`${e.text}-${t}`)):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"solutions-stat-value",children:e.value}),e.suffix?(0,c.jsx)("span",{className:"solutions-stat-suffix",children:e.suffix}):null]})}),(0,c.jsxs)("p",{className:`solutions-stat-card__label${e.labelLines?" solutions-stat-card__label--split":""}`,children:[(0,c.jsx)("span",{className:"solutions-stat-card__label-full",children:e.label}),e.labelLines?(0,c.jsxs)("span",{className:"solutions-stat-card__label-desktop",children:[e.labelLines[0],(0,c.jsx)("br",{}),e.labelLines[1]]}):null]})]})]})})}var h=o;function p({content:e}){let i=e.stats.length>0;return(0,t.jsx)(n.SolutionsSection,{id:"solutions-challenges",className:"solutions-challenges-section","aria-labelledby":"solutions-challenges-title",children:(0,t.jsx)(r.SolutionsContainer,{children:(0,t.jsxs)("div",{className:`s
1olutions-stack solutions-challenges${i?" solutions-challenges--has-stats":""}`,children:[e.title?(0,t.jsx)(h.CmsCopyField,{value:e.title,variant:"title",titleTag:"h2",titleId:"solutions-challenges-title",titleClassName:"solutions-h2 solutions-challenges__title",accentClassName:"solutions-text-accent"}):null,i?(0,t.jsx)("div",{className:"solutions-grid-4 solutions-challenges__stats",children:e.stats.map(e=>(0,t.jsx)(f,{stat:e},e.label))}):null,(0,t.jsx)("div",{className:"solutions-category-grid",children:e.categories.map(e=>(0,t.jsx)(u,{category:e},e.title))})]})})})}e.s(["SolutionsChallenges",0,p],605426)},500280,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=e.i(39792),i=t,a=e.i(657688),s=e.i(894109),o=e.i(115453),l=e.i(62206),u=e.i(103361),c=e.i(801878);function f({content:e}){let t=!!(e.primaryCta?.label?.trim()||e.secondaryCta?.label?.trim()),r=!!e.image?.src,n=e.breadcrumb;return(0,i.jsx)(u.SolutionsSection,{spacing:"compact",className:"solutions-hero-section","aria-labelledby":"solutions-hero-title",children:(0,i.jsxs)(l.SolutionsContainer,{children:[n?(0,i.jsx)(o.CmsPageBreadcrumbNav,{breadcrumb:n}):null,(0,i.jsxs)("div",{className:"solutions-hero-grid",children:[r?(0,i.jsx)("figure",{className:"solutions-hero-visual",children:(0,i.jsx)(a.default,{src:e.image.src,alt:e.image.alt,fill:!0,priority:!0,quality:90,className:"solutions-hero-visual__image",sizes:"(max-width: 767px) calc(100vw - 40px), (max-width: 1024px) calc(100vw - 120px), min(780px, 41vw)"})}):null,(0,i.jsxs)("div",{className:"solutions-stack-xs min-w-0",children:[e.title?(0,i.jsx)(s.CmsCopyField,{value:e.title,variant:"title",titleId:"solutions-hero-title",titleTag:"h1",titleClassName:"solutions-h1",accentClassName:"solutions-text-accent"}):(0,i.jsx)("h1",{id:"solutions-hero-title",className:"solutions-h1"}),(0,i.jsxs)("div",{className:"solutions-stack-sm",children:[e.body?(0,i.jsx)(s.CmsCopyField,{value:e.body,variant:"body",paragraphClassName:"solutions-hero-body solutions-body"}):null,t?(0,i.jsxs)("div",{className:"solutions-cta-row",children:[e.primaryCta?(0,i.jsx)(c.SolutionsCta,{href:e.primaryCta.href,label:e.primaryCta.label,variant:"primary",openInNewTab:e.primaryCta.openInNewTab}):null,e.secondaryCta?(0,i.jsx)(c.SolutionsCta,{href:e.secondaryCta.href,label:e.secondaryCta.label,variant:"secondary",openInNewTab:e.secondaryCta.openInNewTab}):null]}):null]})]})]})]})})}var h=e.i(463869),p=e.i(867434),m=e.i(263278);function d(e){if(!e)return null;if(Array.isArray(e)){let t=e.find(e=>null!=e);return t&&"object"==typeof t?t:null}if("string"==typeof e){let t=e.trim();return t?{url:t}:null}return"object"==typeof e?e:null}function g(e,t=!1){let r=d(e),n="string"==typeof r?.url?r.url.trim():"",i="string"==typeof r?.responsiveImage?.src?r.responsiveImage.src.trim():"";return t?n||i||void 0:i||n||void 0}function v(e,t=""){let r=d(e);return r?.alt?.trim()||t}function x(e,t){return(0,p.resolveDatoDualLink)(e,"string"==typeof t?t:null,"")||"#"}function y(e){return/^https?:\/\//i.test(e)}function b(e,t,r,n){let i="string"==typeof e?e.trim():"";if(!i)return null;let a=x(t,r),s=!0===n||y(a);return{label:i,href:a,...s?{openInNewTab:!0}:{}}}function w(e){return(0,m.mapCmsStructuredTextTitle)(e)}function _(e){let t=b(e.primaryCtaLabel,e.primaryCtaUrl,e.primaryCtaUrlExternal),r=b(e.secondaryCtaLabel,e.secondaryCtaUrl,e.secondaryCtaUrlExternal),n=g(e.heroImage,!0);return{title:w(e.title),body:"string"==typeof e.body?e.body.trim():"",...n?{image:{src:n,alt:v(e.heroImage,"Solutions hero")}}:{},primaryCta:t,secondaryCta:r}}function D({widget:e}){let i=(0,n.useCmsPageIdentity)(),a=(0,r.useCmsLinkSection)(),s=_(e),o=(0,h.resolveCmsPageBreadcrumb)({pageTitle:i.title,pageSlug:i.slug,parentPage:i.parentPage,sectionHub:a,trail:i.breadcrumbTrail,legacy:(0,h.extractLegacyBreadcrumbFields)(e),headerMenuLinked:i.headerMenuLinked})??(0,h.emptyCmsBreadcrumb)(),l=!!(o.crumbs&&o.crumbs.length>=2||o.parentLabel&&o.currentLabel);return(0,t.jsx)(f,{content:{...s,breadcrumb:l?o:null}})}e.i(710060),e.s(["WidgetSolutionsHero",0,D],500280)},120947,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(862560),i=e.i(710060);let a="...",s=3,o="(min-width: 1025px)";function l(e,t){if(t(e))return e;let r=0,n=e.length;for(;r<n;){let i=Math.ceil((r+n)/2);t(`${e.slice(0,i).trimEnd()}${a}`)?r=i:n=i-1}let i=e.slice(0,r).trimEnd(),s=i.lastIndexOf(" ");for(s>0&&(i=i.slice(0,s)),i=i.replace(/[\s.,;:!?]+$/u,"");i&&!t(`${i}${a}`);){let e=i.lastIndexOf(" ");if(e<=0){i="";break}i=i.slice(0,e).replace(/[\s.,;:!?]+$/u,"")}return i?`${i}${a}`:e}function u(e){let t=(0,i.unwrapSinglePlainParagraph)(e);return null!==t?t:(0,i.isCmsHtmlContent)(e)?(0,i.cmsHtmlToPlainText)(e):e}function c({text:e}){let a=(0,r.useRef)(null),f=(0,r.useMemo)(()=>u(e),[e]),h=(0,i.isCmsHtmlContent)(e),[p,m]=(0,r.useState)(f);(0,r.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=window.matchMedia(o),r=()=>{if(!t.matches)return void m(f);let r=parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(r)||r<=0)return void m(f);let n=r*s;m(l(f,t=>(e.textContent=t,e.scrollHeight<=n+1))),e.textContent=""};r(),t.addEventListener("change",r);let n=e.parentElement,i=n&&"u">typeof ResizeObserver?new ResizeObserver(r):null;return i&&n&&i.observe(n),()=>{t.removeEventListener("change",r),i?.disconnect()}},[f]);let d=h?"div":"p",g=h&&p===f;return(0,t.jsxs)(d,{className:"solutions-standard-card__description",children:[(0,t.jsx)("span",{ref:a,className:"solutions-standard-card__description-measure","aria-hidden":!0}),(0,t.jsx)("span",{className:"solutions-standard-card__description-preview",children:g?(0,t.jsx)(n.CmsHtmlField,{html:e,as:"span"}):p}),(0,t.jsx)("span",{className:"solutions-standard-card__description-full",children:h?(0,t.jsx)(n.CmsHtmlField,{html:e,as:"span"}):e})]})}e.s(["SolutionsStandardDescription",0,c])},264303,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(623191),i=e.i(367233),a=t,s=e.i(657688),o=e.i(522016),l=e.i(318103),u=e.i(120947);function c({standard:e}){let t=e.logoVariant??"ashrae",r=!!e.logoSrc,n=e.href?.trim(),i=!!(n&&"#"!==n),f=["solutions-standard-card__logo",`solutions-standard-card__logo--${t}`,e.blendLogo?"solutions-standard-card__logo--blend":""].filter(
1Boolean).join(" "),h=["solutions-standard-card",`solutions-standard-card--${t}`,i?"solutions-standard-card--linked":""].filter(Boolean).join(" "),p=(0,a.jsxs)(a.Fragment,{children:[r?(0,a.jsx)("div",{className:"solutions-standard-card__logo-slot",children:(0,a.jsx)("div",{className:f,children:(0,a.jsx)(s.default,{className:"solutions-standard-card__logo-image",src:e.logoSrc,alt:e.logoAlt??"",fill:!0,sizes:"(max-width: 767px) 141px, (max-width: 1024px) 159px, 203px"})})}):null,(0,a.jsxs)("div",{className:"solutions-standard-card__body",children:[(0,a.jsx)("h3",{className:"solutions-standard-card__title",children:e.titleLines.map(e=>(0,a.jsx)("span",{className:"solutions-standard-card__title-line",children:e},e))}),e.description?(0,a.jsx)(u.SolutionsStandardDescription,{text:e.description}):null,i?(0,a.jsx)(l.ProductsTextLink,{label:"Learn More",className:"solutions-standard-card__link"}):null]})]});return i?(0,a.jsx)(o.default,{href:n,className:h,"aria-label":`Learn more about ${e.titleLines.join(" ")}`,children:p}):(0,a.jsx)("article",{className:h,children:p})}function f({standards:e}){let a=(0,r.useCallback)((e,t)=>e.querySelector(`[data-standards-card="${t}"]`),[]),{carouselRef:s,activeIndex:o,dotCount:l,scrollToIndex:u}=(0,i.useScrollCarousel)({itemCount:e.length,cardSelector:"[data-standards-card]",resolveScrollTarget:a});return 0===e.length?null:(0,t.jsxs)("div",{className:"solutions-standards__carousel-shell",children:[(0,t.jsx)("div",{ref:s,className:"solutions-standards__carousel","aria-label":"Standards and certifications",children:e.map((e,r)=>(0,t.jsx)("div",{className:"solutions-standards__carousel-slide","data-standards-card":r,children:(0,t.jsx)(c,{standard:e})},e.id))}),(0,t.jsx)(n.CarouselDots,{count:l,activeIndex:o,onSelect:u,ariaLabel:"Standards slides",getDotLabel:t=>`Go to ${e[t]?.titleLines[0]??`standards slide ${t+1}`}`,className:"solutions-standards__carousel-dots"})]})}e.s(["SolutionsStandardsCarousel",0,f],264303)},927711,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(271645),i=e.i(862560);function a({items:e}){let[s,o]=(0,n.useState)(()=>new Set),l=e=>{o(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})};return(0,t.jsx)("div",{className:"su-standards-accordion",children:e.map(e=>{let n=s.has(e.id),a=`sa-standard-panel-${e.id}`,o=`sa-standard-button-${e.id}`,u=`sa-standard-open-heading-${e.id}`;return(0,t.jsx)("div",{className:`su-standards-row${n?" su-standards-row--open":""}`,children:(0,t.jsxs)("button",{type:"button",id:o,className:"su-standards-row__trigger","aria-expanded":n,"aria-controls":a,onClick:()=>l(e.id),children:[(0,t.jsxs)("span",{className:"su-standards-row__header",children:[(0,t.jsxs)("span",{className:"su-standards-row__header-body",children:[(0,t.jsxs)("span",{className:"su-standards-row__collapsed-brand","aria-hidden":n,children:[(0,t.jsx)("span",{className:"su-standards-row__logo-wrap",children:e.logoSrc?(0,t.jsx)(r.default,{src:e.logoSrc,alt:"",width:e.logoWidth,height:e.logoHeight,className:"su-standards-row__logo"}):null}),(0,t.jsx)("span",{className:"su-standards-row__title su-standards-row__title--collapsed",children:e.title})]}),(0,t.jsx)("span",{id:u,className:"su-standards-row__open-heading","aria-hidden":!n,children:(0,t.jsx)("span",{className:"su-standards-row__title su-standards-row__title--open",children:e.title})})]}),(0,t.jsxs)("span",{className:"su-standards-row__toggle","aria-hidden":!0,children:[(0,t.jsx)(r.default,{src:"/widgets/standards-accordion/icon-add.svg",alt:"",width:50,height:50,className:"su-standards-row__toggle-icon su-standards-row__toggle-icon--plus"}),(0,t.jsx)(r.default,{src:"/widgets/standards-accordion/icon-minus.svg",alt:"",width:50,height:50,className:"su-standards-row__toggle-icon su-standards-row__toggle-icon--minus"})]})]}),(0,t.jsx)("span",{id:a,className:"su-standards-row__panel",role:"region","aria-labelledby":n?u:o,children:(0,t.jsx)("span",{className:"su-standards-row__panel-inner",children:e.description?(0,t.jsx)(i.CmsHtmlField,{html:e.description,className:"su-standards-row__description",as:"span"}):null})})]})},e.id)})})}e.s(["StandardsAccordionList",0,a])},758010,e=>{e.v({accent:"products-hero-module__MexYBa__accent",body:"products-hero-module__MexYBa__body",copy:"products-hero-module__MexYBa__copy",ctaWrap:"products-hero-module__MexYBa__ctaWrap",inner:"products-hero-module__MexYBa__inner",paragraph:"products-hero-module__MexYBa__paragraph",section:"products-hero-module__MexYBa__section",strong:"products-hero-module__MexYBa__strong",themeLight:"products-hero-module__MexYBa__themeLight",title:"products-hero-module__MexYBa__title",titleBreakAfterAir:"products-hero-module__MexYBa__titleBreakAfterAir",titleBreakBeforeSuffix:"products-hero-module__MexYBa__titleBreakBeforeSuffix",visual:"products-hero-module__MexYBa__visual",visualImage:"products-hero-module__MexYBa__visualImage",visualImageDesktop:"products-hero-module__MexYBa__visualImageDesktop",visualImageTablet:"products-hero-module__MexYBa__visualImageTablet"})},852746,e=>{e.v({accent:"products-portfolio-module__vPB8SG__accent",body:"products-portfolio-module__vPB8SG__body",copy:"products-portfolio-module__vPB8SG__copy",ctaWrap:"products-portfolio-module__vPB8SG__ctaWrap",inner:"products-portfolio-module__vPB8SG__inner",paragraph:"products-portfolio-module__vPB8SG__paragraph",section:"products-portfolio-module__vPB8SG__section",strong:"products-portfolio-module__vPB8SG__strong",themeLight:"products-portfolio-module__vPB8SG__themeLight",title:"products-portfolio-module__vPB8SG__title",visual:"products-portfolio-module__vPB8SG__visual",visualImage:"products-portfolio-module__vPB8SG__visualImage",visualImageDesktop:"products-portfolio-module__vPB8SG__visualImageDesktop",visualImageTablet:"products-portfolio-module__vPB8SG__visualImageTablet"})},869038,e=>{"use strict";var t=e.i(843476),r=e.i(679982),n=t,i=e.i(657688),a=e.i(894109),s=e.i(611578),o=e.i(752103),l=e.i(710060),u=e.i(758010),c=e.i(852746);function f(...e){return e.filter(Boolean).join(" ")}function h(e){let t=(e??"").toLowerCase();return"light"===t||"white"===t}function p({content:e,sectionKey:t}){let r=e.imageOnRight?u.default:c.default,m=`products-${t}-title`,d="hero"===t?"h1":"h2",g=(0,l.cmsHasLabel)(e.ctaLabel),v=h(e.theme);return(0,n.jsx)("section",{className:f(r.section,v&&r.themeLight),"aria-labelledby":m,"data-theme":e.theme||"dark",children:(0,n.jsxs)("div",{className:r.inner,children:[(0,n.jsxs)("div",{className:r.copy,children:[(0,n.jsx)(a.CmsCopyField,{value:e.title,variant:"title",titleTag:d,titleId:m,titleClassName:r.title,accentClassName:r.accent}),(0,n.jsx)(a.CmsCopyField,{value:e.description,variant:"body",bodyClassName:r.body,paragraphClassName:r.paragraph,strongClassName:r.strong}),g?(0,n.jsx)(o.HeroCtaRow,{className:r.ctaWrap,children:(0,n.jsx)(s.HomeV2HeroCta,{href:e.ctaHref||"#",label:e.ctaLabel,variant:v?"whiteGhost":"primary",openInNewTab:/^https?:\/\//i.test(e.ctaHref||"")})}):null]}),e.imageSrc?(0,n.jsxs)("figure",{className:r.visual,"aria-label":e.imageAlt,children:[(0,n.jsx)(i.default,{className:`${r.visualImage} ${r.visualImageDesktop}`,src:e.imageSrc,alt:e.imageAlt,width:e.imageWidth,height:e.imageHeight,priority:!0,unoptimized:!0,sizes:"(min-width: 1025px) 700px, 0px"}),(0,n.jsx)(i.default,{className:`${r.visualImage} ${r.visualImageTablet}`,src:e.imageTabletSrc||e.imageSrc,alt:e.imageAlt,width:e.imageTabletWidth,height:e.imageTabletHeight,priority:!0,unoptimized:!0,sizes:"(max-width: 1024px) 100vw, 0px"})]}):null]})})}var m=e.i(547672),d=e.i(442477),g=e.i(263278),v=l;let x={value:{schema:"dast",document:{type:"root",children:[]}}};function y(e){let t=(0,g.mapCmsStructuredTextTitle)(e.title)??x,r=(0,v.cmsHtmlString)(e.description),n=(0,d.assetSrc)(e.image)??"",i=e.imageAlt?.trim()??"",a=(0,d.assetSrc)(e.imageTablet)??n,s=(0,d.assetDimensions)(e.image),o=e.imageTablet?(0,d.assetDimensions)(e.imageTablet):s;return{title:t,description:r,imageSrc:n,imageTabletSrc:a,imageAlt:i,imageWidth:s.width,imageHeight:s.height,imageTabletWidth:o.width,imageTabletHeight:o.height,imageOnRight:e.imageOnRight??!0}}function b({widget:e}){let n=(0,r.useCmsLinkSection)(),i=(0,m.withCmsLinkSection)(n,()=>y(e));return(0,t.jsx)(p,{content:i,sectionKey:i.imageOnRight?"hero":"portfolio"})}e.s(["WidgetTextImageSection",0,b],869038)},402717,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(894109),i=e.i(862560),a=e.i(442477),s=e.i(710060);function o(e){if("string"==typeof e)return e.trim();if(e&&"object"==typeof e){let t=e;for(let e of["apiKey","api_key","value","id","label","name"]){let r=t[e];if("string"==typeof r&&r.trim())return r.trim()}}return""}function l(e){let t=e.toLowerCase().replace(/\s+/g,"");return"xsmall"===t||"xs"===t?"xsmall":"small"===t||"sm"===t||"narrow"===t?"small":"medium"===t||"md"===t?"medium":"wide"===t?"wide":"full"===t||"100%"===t?"full":("large"===t,"large")}function u(e){let t=e.toLowerCase().replace(/[_-]+/g," ").trim();return!t||"left"===t||"start"===t||t.includes("left")||"text left"===t?"left":"right"===t||"end"===t||t.includes("right")?"right":"justify"===t||"justified"===t||t.includes("justify")?"justify":"center"===t||"centre"===t||"middle"===t||t.includes("center")||t.includes("centre")?"center":"left"}function c(e){let t=(0,s.resolveCmsCopyField)(e.header),r=(0,s.cmsHtmlString)(e.header),n=(0,s.cmsHtmlString)(e.body),i=(0,a.assetSrc)(e.backgroundImage)??"";if(!r&&!n&&!i)return null;
1let c=(0,a.assetDimensions)(e.backgroundImage);return{header:t,body:n,width:l(o(e.width)),alignment:u(o(e.alignment)),theme:o(e.theme).toLowerCase(),showBackButton:!!e.showBackButton,backgroundColor:o(e.backgroundColor?.hex),backgroundImageSrc:i,backgroundImageAlt:e.backgroundImage?.responsiveImage?.alt?.trim()||e.backgroundImage?.alt?.trim()||r||"",backgroundImageWidth:c.width,backgroundImageHeight:c.height}}function f(...e){return e.filter(Boolean).join(" ")}let h=f("widget-section-body mt-[min(24px,calc(24*100vw/1920))] font-normal text-[min(24px,calc(24*100vw/1920))] leading-[min(40px,calc(40*100vw/1920))] tablet:text-[min(24px,calc(24*100vw/1024))] tablet:leading-[min(40px,calc(40*100vw/1024))] mobile:text-[min(20px,calc(20*100vw/390))] mobile:leading-[min(32px,calc(32*100vw/390))] [&_p]:m-0 [&:not(.dato-html--cms-prose)_p+p]:mt-[min(20px,calc(20*100vw/1920))] [&_h1]:m-0 [&_h2]:m-0 [&_h3]:m-0 [&_h4]:m-0 [&_h5]:m-0 [&_h6]:m-0 [&_h1]:font-medium [&_h2]:font-medium [&_h3]:font-medium [&_h4]:font-medium [&_h5]:font-medium [&_h6]:font-medium [&_h1]:leading-[1.3] [&_h2]:leading-[1.35] [&_h3]:leading-[1.4] [&_h1]:text-[min(40px,calc(40*100vw/1920))] [&_h2]:text-[min(28px,calc(28*100vw/1920))] [&_h3]:text-[min(22px,calc(22*100vw/1920))] [&_h4]:text-[min(20px,calc(20*100vw/1920))] [&_h5]:text-[min(18px,calc(18*100vw/1920))] [&_h6]:text-[min(18px,calc(18*100vw/1920))] tablet:[&_h1]:text-[min(32px,calc(32*100vw/1024))] tablet:[&_h2]:text-[min(24px,calc(24*100vw/1024))] tablet:[&_h3]:text-[min(20px,calc(20*100vw/1024))] mobile:[&_h1]:text-[min(28px,calc(28*100vw/390))] mobile:[&_h2]:text-[min(22px,calc(22*100vw/390))] mobile:[&_h3]:text-[min(18px,calc(18*100vw/390))] [&_h1]:mt-[min(40px,calc(40*100vw/1920))] [&_h2]:mt-[min(32px,calc(32*100vw/1920))] [&_h3]:mt-[min(28px,calc(28*100vw/1920))] [&_h4]:mt-[min(24px,calc(24*100vw/1920))] [&_h1]:mb-[min(16px,calc(16*100vw/1920))] [&_h2]:mb-[min(12px,calc(12*100vw/1920))] [&_h3]:mb-[min(10px,calc(10*100vw/1920))] [&_h4]:mb-[min(8px,calc(8*100vw/1920))] [&_h1:first-child]:mt-0 [&_h2:first-child]:mt-0 [&_h3:first-child]:mt-0 [&:not(.dato-html--cms-prose)_h1+p]:mt-[min(12px,calc(12*100vw/1920))] [&:not(.dato-html--cms-prose)_h2+p]:mt-[min(12px,calc(12*100vw/1920))] [&:not(.dato-html--cms-prose)_h3+p]:mt-[min(10px,calc(10*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h1]:mt-[min(32px,calc(32*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h2]:mt-[min(28px,calc(28*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h3]:mt-[min(24px,calc(24*100vw/1920))] [&_a]:font-medium [&_a]:underline [&_a]:underline-offset-[0.12em] [&_strong]:font-bold [&_b]:font-bold [&_em]:italic [&_i]:italic","[&_ul]:my-[min(20px,calc(20*100vw/1920))] [&_ol]:my-[min(20px,calc(20*100vw/1920))] [&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-[1.35em] [&_ol]:pl-[1.35em] [&_ul]:text-left [&_ol]:text-left [&_li]:text-left [&_li]:leading-[1.65] [&_li+li]:mt-[min(10px,calc(10*100vw/1920))]"),p=f(h,"text-[#0f172a] [&_h1]:text-[#036ada] [&_h2]:text-[#036ada] [&_h3]:text-inherit [&_h4]:text-inherit [&_h5]:text-inherit [&_h6]:text-inherit [&_a]:!text-[#036ada] [&_a_*]:!text-[#036ada] [&_strong]:text-[#0f172a] [&_b]:text-[#0f172a]"),m=f(h,"text-white [&_h1]:text-white [&_h2]:text-white [&_h3]:text-white [&_h4]:text-white [&_h5]:text-white [&_h6]:text-white [&_a]:text-[#edfbfe] [&_strong]:text-white [&_b]:text-white"),d=f("m-0 font-medium leading-normal text-[#036ada]","text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]"),g=f("m-0 font-medium leading-normal text-white","text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]");function v(e){switch(e){case"left":return"mr-auto w-full text-left";case"right":return f("ml-auto w-full text-right","[&_ul]:text-left [&_ol]:text-left [&_li]:text-left");case"justify":return f("mr-auto w-full text-justify","[&_ul]:text-left [&_ol]:text-left [&_li]:text-left");default:return f("mx-auto w-full text-center","[&_ul]:text-left [&_ol]:text-left [&_li]:text-left [&_ul]:mx-auto [&_ol]:mx-auto [&_ul]:w-fit [&_ol]:w-fit [&_ul]:max-w-full [&_ol]:max-w-full")}}function x(e){switch(e){case"xsmall":return"max-w-[min(480px,calc(480*100vw/1920))]";case"small":return"max-w-[min(640px,calc(640*100vw/1920))]";case"medium":return"max-w-[min(800px,calc(800*100vw/1920))]";case"wide":return"max-w-[min(1480px,calc(1480*100vw/1920))]";default:return"max-w-full"}}function y({widget:e}){let a=c(e);if(!a)return null;let s=e.id?`widget-section-${e.id}`:"widget-section-title",o=!!a.backgroundImageSrc,l="light"===a.theme||"white"===a.theme||o&&"dark"!==a.theme,u=!!a.header;return(0,t.jsxs)("section",{"aria-labelledby":u?s:void 0,className:f("relative box-border w-full overflow-x-clip bg-white font-sans",o&&"min-h-[min(420px,calc(420*100vw/1920))] tablet:min-h-[min(360px,calc(360*100vw/1024))] mobile:min-h-[min(280px,calc(280*100vw/390))]",l?"text-white":"text-[#0f172a]"),style:a.backgroundColor?{backgroundColor:a.backgroundColor}:void 0,children:[o?(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 z-0","aria-hidden":!a.backgroundImageAlt,children:[(0,t.jsx)(r.default,{src:a.backgroundImageSrc,alt:a.backgroundImageAlt,fill:!0,className:"object-cover object-center tablet:object-top",sizes:"100vw",unoptimized:!0,priority:!1}),l?(0,t.jsx)("div",{className:f("absolute inset-0","bg-[linear-gradient(90deg,rgba(15,23,42,0.72)_0%,rgba(15,23,42,0.45)_55%,rgba(15,23,42,0.2)_100%)]","mobile:bg-[linear-gradient(180deg,rgba(15,23,42,0.75)_0%,rgba(15,23,42,0.55)_100%)]")}):null]}):null,(0,t.jsx)("div",{className:f("relative z-1 box-border mx-auto w-full max-w-480","px-[min(160px,calc(160*100vw/1920))] py-[min(80px,calc(80*100vw/1920))]","tablet:px-[min(60px,calc(60*100vw/1024))] tablet:py-[min(60px,calc(60*100vw/1024))]","mobile:px-[min(20px,calc(20*100vw/390))] mobile:py-[min(40px,calc(40*100vw/390))]"),children:(0,t.jsxs)("div",{className:f("box-border",x(a.width),v(a.alignment)),children:[a.showBackButton?(0,t.jsx)("button",{type:"button",className:f("mb-[min(24px,calc(24*100vw/1920))] inline-flex cursor-pointer items-center gap-2 border-0 bg-transparent p-0 font-sans font-medium","text-[min(16px,calc(16*100vw/1920))]",l?"text-[#edfbfe]":"text-[#6cade4]"),onClick:()=>{window.history.back()},children:"← Back"}):null,u?(0,t.jsx)(n.CmsCopyField,{value:a.header,variant:"title",titleTag:"h2",titleId:s,titleClassName:f(l?g:d,"left"===a.alignment?"text-left":"r
1ight"===a.alignment?"text-right":"justify"===a.alignment?"text-justify":"text-center"),accentClassName:l?"text-white":"text-[#036ada]"}):null,a.body?(0,t.jsx)(i.CmsHtmlField,{html:a.body,className:l?m:p,as:"div",preserveEditorTextAlignment:!0}):null]})})]})}e.s(["WidgetSection",0,y],402717)},830124,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(894109),i=e.i(862560),a=e.i(611578),s=e.i(442477),o=e.i(406822),l=e.i(710060);function u(e){return"string"==typeof e?e.trim():""}function c(e){return e?u(e.title)||u(e.label):""}function f(e){let t=e.toLowerCase().replace(/\s+/g,"");return"1/3"===t||"⅓"===t||"onethird"===t||"third"===t||"xsmall"===t||"xs"===t||"small"===t||"sm"===t?"1/3":"2/3"===t||"⅔"===t||"twothirds"===t||"large"===t||"lg"===t||"big"===t||"wide"===t||"full"===t||"100%"===t?"2/3":("1/2"===t||"½"===t||"half"===t,"1/2")}function h(e){let t=(0,l.cmsHtmlString)(e.heading),r=(0,l.cmsHtmlToPlainText)(t),n=(0,l.cmsHtmlString)(e.text),i=(0,s.assetSrc)(e.image);if(!r&&!n&&!i)return null;let a=(0,s.assetDimensions)(e.image),h=u(e.imageAlignment).toLowerCase(),p=e.button??null,m=c(p),d=p?(0,o.resolveNavHref)(p,""):"";return{heading:t,text:n,imageSrc:i??"",imageAlt:e.image?.responsiveImage?.alt?.trim()||e.image?.alt?.trim()||r||"Image",imageWidth:a.width,imageHeight:a.height,imageOnRight:"left"!==h,imageSize:f(u(e.imageSize)),backgroundColor:u(e.backgroundColor?.hex),ctaLabel:m,ctaHref:m?d||"#":""}}var p=s;function m(...e){return e.filter(Boolean).join(" ")}let d=m("m-0 font-medium leading-normal text-[#0f172a]","text-[min(60px,calc(60*100vw/1920))] tablet:text-[min(44px,calc(44*100vw/1024))] mobile:text-[min(32px,calc(32*100vw/390))]"),g="text-[#036ada]",v=m("mt-[min(16px,calc(16*100vw/1920))] font-normal text-[#0f172a]","text-[min(20px,calc(20*100vw/1920))] leading-[min(40px,calc(40*100vw/1920))]","tablet:text-[min(20px,calc(20*100vw/1024))] tablet:leading-[min(40px,calc(40*100vw/1024))]","mobile:text-[min(20px,calc(20*100vw/390))] mobile:leading-[min(32px,calc(32*100vw/390))]","[&_p]:m-0 [&:not(.dato-html--cms-prose)_p+p]:mt-[min(16px,calc(16*100vw/1920))]","[&_h1]:m-0 [&_h2]:m-0 [&_h3]:m-0 [&_h4]:m-0 [&_h5]:m-0 [&_h6]:m-0","[&_h1]:font-medium [&_h2]:font-medium [&_h3]:font-medium [&_h4]:font-medium [&_h5]:font-medium [&_h6]:font-medium","[&_h1]:leading-normal [&_h2]:leading-normal [&_h3]:leading-normal","[&_h1]:text-[#036ada] [&_h2]:text-[#036ada]","[&_h3]:text-inherit [&_h4]:text-inherit [&_h5]:text-inherit [&_h6]:text-inherit","[&_h1]:text-[min(40px,calc(40*100vw/1920))] [&_h2]:text-[min(32px,calc(32*100vw/1920))] [&_h3]:text-[min(24px,calc(24*100vw/1920))]","[&_h4]:text-[min(20px,calc(20*100vw/1920))] [&_h5]:text-[min(20px,calc(20*100vw/1920))] [&_h6]:text-[min(20px,calc(20*100vw/1920))]","tablet:[&_h1]:text-[min(32px,calc(32*100vw/1024))] tablet:[&_h2]:text-[min(26px,calc(26*100vw/1024))] tablet:[&_h3]:text-[min(20px,calc(20*100vw/1024))]","mobile:[&_h1]:text-[min(28px,calc(28*100vw/390))] mobile:[&_h2]:text-[min(22px,calc(22*100vw/390))] mobile:[&_h3]:text-[min(18px,calc(18*100vw/390))]","[&:not(.dato-html--cms-prose)_h1+p]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_h2+p]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_h3+p]:mt-[min(16px,calc(16*100vw/1920))]","[&:not(.dato-html--cms-prose)_p+h1]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h2]:mt-[min(16px,calc(16*100vw/1920))] [&:not(.dato-html--cms-prose)_p+h3]:mt-[min(16px,calc(16*100vw/1920))]","[&_a]:font-medium [&_a]:!text-[#036ada] [&_a_*]:!text-[#036ada] [&_a]:underline [&_a]:underline-offset-[0.12em]","[&_strong]:font-bold [&_strong]:text-[#0f172a] [&_b]:font-bold [&_b]:text-[#0f172a] [&_em]:italic [&_i]:italic"),x="relative flex items-center justify-center w-full max-w-full h-[400px] overflow-hidden rounded-2xl tablet:w-full tablet:max-w-full tablet:h-[400px] mobile:w-full mobile:max-w-full mobile:h-[400px]";function y(e){switch(e){case"1/3":return"desktop:w-1/3 desktop:max-w-[33.333%] desktop:h-auto desktop:flex-none desktop:overflow-hidden";case"2/3":return"desktop:w-2/3 desktop:max-w-[66.666%] desktop:h-auto desktop:flex-none desktop:overflow-hidden";default:return"desktop:w-1/2 desktop:max-w-[50%] desktop:h-auto desktop:flex-none desktop:overflow-hidden"}}function b(e,t){if(t<=0)return!1;let r=e/t;return r>.9&&r<1.1}function w(e){return m(x,y(e))}function _(e){switch(e){case"1/3":return"(max-width: 1024px) 100vw, 33vw";case"2/3":return"(max-width: 1024px) 100vw, 67vw";default:return"(max-width: 1024px) 100vw, 50vw"}}function D({widget:e}){let s=h(e);if(!s)return null;let o=e.id?`widget-text-with-image-${e.id}`:"widget-text-with-image-title",l=!!s.heading,u=!!s.text,c=(0,t.jsxs)("div",{className:"box-border min-w-0 
1w-full desktop:min-w-0 desktop:flex-1",children:[l?(0,t.jsx)(n.CmsCopyField,{value:s.heading,variant:"title",titleTag:"h2",titleId:o,titleClassName:d,accentClassName:g}):null,u?(0,t.jsx)(i.CmsHtmlField,{html:s.text,className:v,as:"div"}):null,s.ctaLabel&&s.ctaHref?(0,t.jsx)("div",{className:"mt-[min(32px,calc(32*100vw/1920))] mobile:mt-[min(20px,calc(20*100vw/390))]",children:(0,t.jsx)(a.HomeV2HeroCta,{href:s.ctaHref,label:s.ctaLabel,variant:"primary",openInNewTab:/^https?:\/\//i.test(s.ctaHref)})}):null]}),f=b(s.imageWidth,s.imageHeight),x=s.imageSrc?(0,t.jsx)("figure",{className:m("m-0 box-border min-w-0",w(s.imageSize)),children:(0,t.jsx)(r.default,{src:(0,p.gifSafeSrc)(s.imageSrc),alt:s.imageAlt,width:s.imageWidth,height:s.imageHeight,className:m("block max-w-full rounded-2xl",f?"h-auto w-auto max-h-full object-contain":"h-full w-full object-cover tablet:object-top","desktop:h-auto desktop:w-full desktop:max-h-none desktop:object-contain"),sizes:_(s.imageSize),unoptimized:!0})}):null;return(0,t.jsx)("section",{"aria-labelledby":l?o:void 0,className:"box-border w-full overflow-x-clip font-sans",style:s.backgroundColor?{backgroundColor:s.backgroundColor}:{backgroundColor:"#ffffff"},children:(0,t.jsxs)("div",{className:m("box-border mx-auto flex w-full max-w-480 flex-col items-center","gap-[min(60px,calc(60*100vw/1920))] tablet:gap-[min(40px,calc(40*100vw/1024))] mobile:gap-[min(28px,calc(28*100vw/390))]","px-[min(160px,calc(160*100vw/1920))] py-[min(80px,calc(80*100vw/1920))]","tablet:px-[min(60px,calc(60*100vw/1024))] tablet:py-[min(60px,calc(60*100vw/1024))]","mobile:px-[min(20px,calc(20*100vw/390))] mobile:py-[min(40px,calc(40*100vw/390))]","desktop:flex-row desktop:items-center",!s.imageOnRight&&"desktop:flex-row-reverse"),children:[c,x]})})}e.s(["WidgetTextWithImage",0,D],830124)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.