PageSourceSearch

https://www.dentrix.com/js/chunks/ProductComparison.render-77587163.js

js dentrix.com collected 2026-10-03 20:54:21 UTC 7,130 bytes, 1 lines download raw bytes

1import{p as b,r as m}from"./vendor-3b63c367.js";import{j as e,c as h,a as w,p as R}from"./index-ec2b83ec.js";import"../index-generated.js";import{I as k}from"./Icon-d4232180.js";const F={},L={label:b.string,ariaLabel:b.string.isRequired,url:b.string.isRequired,type:b.string,disabled:b.bool,target:b.string,clickFunction:b.func},I={type:"primary",disabled:!1},_=n=>{const{label:t,ariaLabel:o,url:r,type:s,disabled:a,target:l,clickFunction:c}=n;return e.jsx("a",{href:r,className:h({"button button-primary":s==="primary","button button-secondary":s==="secondary","button button-secondary button-secondary-dark":s==="secondary-dark","button button-tertiary button-tertiary-primary-bg":s==="tertiary"}),"aria-label":o||null,disabled:a||null,target:l||null,onClick:c,children:t})};_.defaultProps=I;_.propTypes=L;const A=n=>{const{headerTitle:t,number:o,numberDescription:r,description:s,ctaButton:a,isMobile:l,columnNumber:c,tableRows:i}=n,x=t.replaceAll(" ","-"),d=i.filter(u=>u.type==="featureRow");d.map(u=>u.featureCells);const p=()=>{const u=d.map(N=>{var g;return((g=N.featureCells[c])==null?void 0:g.showCheckmark)===!0?N.title:""}).filter(Boolean).join(", ");window.dataLayer.push({event:"package_select",package_name:t,package_features:`${u}`})};return e.jsx("th",{scope:"col",className:"comparison-table__header","aria-label":t,"aria-describedby":x,colSpan:l?99:null,children:e.jsxs("div",{className:"product-details",children:[e.jsx("h3",{className:"product-details__title h5",children:t}),e.jsxs("div",{id:x,className:"product-details__content",children:[o&&e.jsx("span",{className:"product-details__number h1",children:o}),r&&e.jsx("span",{className:"product-details__number-description ui-label-m",children:r}),s&&e.jsx("p",{className:"product-details__description body-sm",children:s})]}),(a==null?void 0:a.label)&&(a==null?void 0:a.link)&&e.jsx(_,{ariaLabel:a==null?void 0:a.label,label:a==null?void 0:a.label,url:a==null?void 0:a.link,clickFunction:p})]})})},P=n=>{const{headerRows:t,tableRows:o,isMobile:r}=n;return e.jsx("thead",{children:e.jsx("tr",{children:e.jsxs(e.Fragment,{children:[!r&&e.jsx("th",{scope:"col"}),t&&t.map((s,a)=>e.jsx(A,{columnNumber:a,tableRows:o,...s,isMobile:r},a))]})})})},j=n=>{const{text:t}=n,[o,r]=m.useState(!1),s=m.useRef(null),a=()=>{r(!o)},l=c=>{s.current&&!s.current.contains(c.target)&&r(!1)};return m.useEffect(()=>(document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}),[o]),e.jsx("div",{ref:s,className:"tooltip",children:e.jsxs("div",{className:"inner-wrapper",children:[e.jsx(k,{iconName:"help",title:"toggle tooltip",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:a,className:h("icon",{active:o})}),e.jsx("div",{className:h("text-wrapper",{active:o}),children:t})]})})},T=n=>{const{content:t,tag:o,tooltipContent:r,link:s,scope:a="row"}=n;return o==="th"?e.jsxs("th",{scope:a,children:[t&&!r&&!s&&e.jsx(e.Fragment,{children:t}),t&&s&&!r&&e.jsx("a",{href:s,children:t}),t&&r&&!s&&e.jsxs("div",{className:"product-table__cell--tooltip",children:[e.jsx("p",{className:"product-table__cell--tooltip-content",children:t}),e.jsx(j,{text:r})]}),t&&r&&s&&e.jsxs("div",{className:"product-table__cell--tooltip",children:[e.jsx("p",{className:"product-table__cell--tooltip-content",children:e.jsx("a",{href:s,children:t})}),e.jsx(j,{text:r})]})]}
1):e.jsxs("td",{children:[t===!0&&e.jsx(k,{iconName:"check"}),t&&r&&!s&&e.jsxs("div",{className:"product-table__cell--tooltip",children:[e.jsx("p",{className:"product-table__cell--tooltip-content",children:t}),e.jsx(j,{text:r})]}),t&&r&&s&&e.jsxs("div",{className:"product-table__cell--tooltip",children:[e.jsx("p",{className:"product-table__cell--tooltip-content",children:e.jsx("a",{href:s,children:t})}),e.jsx(j,{text:r})]}),t&&s&&!r&&e.jsx("a",{href:s,children:t}),!r&&t&&!s&&e.jsx(e.Fragment,{children:t})]})},E=n=>{const{featureTitle:t,linkUrl:o,tooltip:r,featureCells:s}=n;return e.jsxs("tr",{children:[e.jsx(T,{tag:"th",scope:"row",content:t,tooltipContent:r,link:o}),s&&s.map((a,l)=>e.jsx(T,{link:a==null?void 0:a.linkUrl,content:a!=null&&a.customText?a.customText:a==null?void 0:a.showCheckmark},l))]})},M=n=>{const{sectionTitle:t,numCols:o}=n;return e.jsx("tr",{children:e.jsx("th",{scope:"row",colSpan:o,className:"comparison-table__section h4",children:t})})},S=n=>{const{tableRows:t,featureCellsIndex:o}=n,r=t.find(s=>s.type==="featureRow").featureCells.length+1;return e.jsx("tbody",{children:t&&t.map((s,a)=>e.jsx(e.Fragment,{children:s.type==="sectionRow"?e.jsx(M,{sectionTitle:s.title,numCols:r},a):e.jsx(E,{featureTitle:s.title,linkUrl:s.linkUrl,tooltip:s.tooltip,featureCells:o>=0?[s.featureCells[o]]:s.featureCells})}))})},y=n=>{const{headerRows:t,tableRows:o,featureCellsIndex:r,isMobile:s}=n;return e.jsxs("table",{className:"comparison-table ui-label-s-smb",children:[e.jsx(P,{headerRows:t,tableRows:o,isMobile:s}),e.jsx(S,{tableRows:o,featureCellsIndex:r})]})},v=m.forwardRef((n,t)=>{const{tabLabel:o,isActive:r,handleClick:s,handleKeyDown:a,id:l,index:c}=n;return e.jsx("button",{ref:t,onClick:()=>s(c),onKeyDown:i=>a(i),"aria-controls":l,className:h("comparison-tabs__btn ui-label-s-smb",{"is-active":r}),role:"tab",tabIndex:r?0:-1,children:o})});v.displayName="TabButton";const D=n=>{const{tabLabels:t,activeTabNumber:o,handleClick:r}=n,[s,a]=m.useState(0),l=m.useRef([]),c=()=>{(l==null?void 0:l.current.length)-1===s?(l.current[0].focus(),a(0)):(l.current[s+1].focus(),a(d=>d+1))},i=()=>{s===0?(l.current[l.current.length-1].focus(),a(l.current.length-1)):(l==null||l.current[s-1].focus(),a(d=>d-1))},x=(d,p)=>{switch(d.key){case"ArrowRight":c();break;case"ArrowLeft":i();break}};return e.jsx("div",{role:"tablist","aria-orientation":"horizontal",className:"comparison-tabs__list",children:t==null?void 0:t.map((d,p)=>e.jsx(v,{id:`tab-${p}`,index:p,ref:u=>l.current[p]=u,"aria-selected":p===o,isActive:p===o,handleClick:r,handleKeyDown:x,tabLabel:d},p))})},U=n=>{const{children:t,isActive:o,id:r}=n;return e.jsx("div",{id:r,role:"tabpanel",tabIndex:o?0:-1,"aria-labelledby":r,className:"product-comparison__tab-panel",hidden:!o,children:t})},$=n=>{const{headerRows:t,tableRows:o}=n,[r,s]=m.useState(0),a=c=>{s(c)},l=t==null?void 0:t.map(c=>c.shortTitle);return e.jsxs(e.Fragment,{children:[e.jsx(D,{tabLabels:l,activeTabNumber:r,handleClick:a}),e.jsx("div",{className:"product-comparison--tabs",children:t.map((c,i)=>e.jsx(U,{id:`tab-${i}`,isActive:i===r,children:e.jsx(y,{headerRows:[t[i]],tableRows:o,featureCellsIndex:i,isMobile:!0})},i))})]})},C=n=>{const{removeTopMargin:t,removeTopPadding:o,headerTitle:r,description:s,headerRows:a,tableRows:l}=n;return e.jsxs("section",{className:h("product-comparison container-content bottom-padding",{"top-margin":!t,"top-padding":!o}),children:[e.jsxs("div",{className:"product-comparison__heading",children:[e.jsx("h2",{className:"h2",children:r}),s&&e.jsx("p",{className:"product-comparison__subtitle subtitle-2",children:s})]}),e.jsx($,{headerRows:a,tableRows:l}),e.jsx(y,{headerRows:a,tableRows:l})]})};C.propTypes=F;let f=null;const z=n=>{f=w(f,n),f.render(e.jsx(C,{...R(n.dataset).model}))};export{z as default};

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.