@ptcwebops/ptcw-design 5.2.2 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/blog-detail-content_2.cjs.entry.js +1 -1
- package/dist/cjs/blog-detail-layout.cjs.entry.js +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-background-video.cjs.entry.js +1 -1
- package/dist/cjs/ptc-card_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-filter-tag_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +76 -185
- package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +6 -6
- package/dist/cjs/ptc-inline-cta.cjs.entry.js +3 -3
- package/dist/cjs/ptc-jumbotron.cjs.entry.js +1 -1
- package/dist/cjs/ptc-mobile-select.cjs.entry.js +4 -3
- package/dist/cjs/ptc-nav-link.cjs.entry.js +4 -3
- package/dist/cjs/ptc-nav-slider.cjs.entry.js +4 -2
- package/dist/cjs/ptc-nav-submenu.cjs.entry.js +7 -4
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/icon-asset/icon-asset.css +2 -2
- package/dist/collection/components/organism-bundles/blog-detail-content/blog-detail-content.css +1 -1
- package/dist/collection/components/organism-bundles/blog-detail-layout/blog-detail-layout.css +1 -1
- package/dist/collection/components/ptc-background-video/ptc-background-video.js +1 -1
- package/dist/collection/components/ptc-card/ptc-card.css +1 -1
- package/dist/collection/components/ptc-form-checkbox/ptc-form-checkbox.css +7 -7
- package/dist/collection/components/ptc-homepage-video-background/ptc-homepage-video-background.css +44 -39
- package/dist/collection/components/ptc-homepage-video-background/ptc-homepage-video-background.js +5 -5
- package/dist/collection/components/ptc-inline-cta/ptc-inline-cta.js +3 -3
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +2 -2
- package/dist/collection/components/ptc-pagenation/ptc-pagenation.css +1 -1
- package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +2 -2
- package/dist/collection/components/ptc-textfield/ptc-textfield.css +34 -51
- package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.css +3 -0
- package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.js +20 -2
- package/dist/collection/components/subnav/ptc-nav-slider/ptc-nav-slider.css +3 -0
- package/dist/collection/components/subnav/ptc-nav-slider/ptc-nav-slider.js +37 -1
- package/dist/collection/components/subnav/ptc-nav-submenu/ptc-nav-submenu.css +3 -0
- package/dist/collection/components/subnav/ptc-nav-submenu/ptc-nav-submenu.js +57 -3
- package/dist/custom-elements/index.js +115 -217
- package/dist/esm/blog-detail-content_2.entry.js +1 -1
- package/dist/esm/blog-detail-layout.entry.js +1 -1
- package/dist/esm/icon-asset.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-background-video.entry.js +1 -1
- package/dist/esm/ptc-card_2.entry.js +1 -1
- package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
- package/dist/esm/ptc-form-checkbox_2.entry.js +76 -185
- package/dist/esm/ptc-homepage-video-background.entry.js +6 -6
- package/dist/esm/ptc-inline-cta.entry.js +4 -4
- package/dist/esm/ptc-jumbotron.entry.js +1 -1
- package/dist/esm/ptc-mobile-select.entry.js +4 -3
- package/dist/esm/ptc-nav-link.entry.js +4 -3
- package/dist/esm/ptc-nav-slider.entry.js +4 -2
- package/dist/esm/ptc-nav-submenu.entry.js +7 -4
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-02828faf.entry.js +1 -0
- package/dist/ptcw-design/{p-fc51fc29.entry.js → p-657ecf13.entry.js} +1 -1
- package/dist/ptcw-design/p-6dc17c90.entry.js +1 -0
- package/dist/ptcw-design/p-81e940e1.entry.js +1 -0
- package/dist/ptcw-design/{p-661e7736.entry.js → p-95c74739.entry.js} +1 -1
- package/dist/ptcw-design/{p-a3ae424f.entry.js → p-9a077de7.entry.js} +1 -1
- package/dist/ptcw-design/{p-8e6059b8.entry.js → p-a27e3899.entry.js} +1 -1
- package/dist/ptcw-design/p-abf8c768.entry.js +1 -0
- package/dist/ptcw-design/p-b2ea5df5.entry.js +1 -0
- package/dist/ptcw-design/{p-a11dbfda.entry.js → p-b76cd8af.entry.js} +1 -1
- package/dist/ptcw-design/p-cabb1a4d.entry.js +68 -0
- package/dist/ptcw-design/p-d1857ada.entry.js +1 -0
- package/dist/ptcw-design/p-e3bce6bf.entry.js +1 -0
- package/dist/ptcw-design/{p-839821e0.entry.js → p-e4675432.entry.js} +1 -1
- package/dist/ptcw-design/p-e732466f.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/subnav/ptc-nav-link/ptc-nav-link.d.ts +4 -0
- package/dist/types/components/subnav/ptc-nav-slider/ptc-nav-slider.d.ts +8 -0
- package/dist/types/components/subnav/ptc-nav-submenu/ptc-nav-submenu.d.ts +12 -0
- package/dist/types/components.d.ts +48 -0
- package/dist/types/utils/eloqua.d.ts +9 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-1e95df47.entry.js +0 -68
- package/dist/ptcw-design/p-3d8902b8.entry.js +0 -1
- package/dist/ptcw-design/p-42225882.entry.js +0 -1
- package/dist/ptcw-design/p-46c96b63.entry.js +0 -1
- package/dist/ptcw-design/p-a8f7293f.entry.js +0 -1
- package/dist/ptcw-design/p-aa37ba65.entry.js +0 -1
- package/dist/ptcw-design/p-bbce25be.entry.js +0 -1
- package/dist/ptcw-design/p-eadf6313.entry.js +0 -1
- package/dist/ptcw-design/p-fe14b5ea.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s}from"./p-ac75c7ad.js";var e=Object.defineProperty,h=(t,i,s)=>(((t,i,s)=>{i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s})(t,"symbol"!=typeof i?i+"":i,s),s);const o=class{constructor(t){h(this,"mobileSelect"),h(this,"trigger"),h(this,"wheelList"),h(this,"sliderList"),h(this,"wheelsContain"),h(this,"panel"),h(this,"ensureBtn"),h(this,"cancelBtn"),h(this,"grayLayer"),h(this,"popUp"),h(this,"initPosition"),h(this,"initColWidth"),h(this,"wheelsData"),h(this,"displayJson"),h(this,"curValue"),h(this,"curIndexArr"),h(this,"isCascade"),h(this,"isJsonType"),h(this,"startY"),h(this,"moveEndY"),h(this,"moveY"),h(this,"preMoveY"),h(this,"offsetY"),h(this,"offsetSum"),h(this,"oversizeBorder"),h(this,"enableClickStatus"),h(this,"optionHeight"),h(this,"curDistance"),h(this,"cascadeJsonData"),h(this,"eventHandleMap"),h(this,"initDeepCount"),h(this,"config"),!o.checkRequiredConfig(t)||(this.config=Object.assign({},o.defaultConfig,t),this.wheelsData=t.wheels,this.isJsonType=!1,this.cascadeJsonData=[],this.displayJson=[],this.curValue=[],this.curIndexArr=[],this.isCascade=!1,this.offsetY=0,this.offsetSum=0,this.curDistance=[],this.enableClickStatus=!1,this.optionHeight=0,this.initPosition=t.position||[],this.initColWidth=t.colWidth||[],this.init())}init(){if(!this.checkTriggerAvailable())return;const{config:t}=this;if(this.isJsonType=o.checkDataType(this.wheelsData),this.renderComponent(this.wheelsData),this.wheelList=this.mobileSelect.getElementsByClassName("ms-wheel"),this.sliderList=this.mobileSelect.getElementsByClassName("ms-select-container"),this.panel=this.mobileSelect.querySelector(".ms-panel"),this.wheelsContain=this.mobileSelect.querySelector(".ms-wheels"),this.ensureBtn=this.mobileSelect.querySelector(".ms-ensure"),this.cancelBtn=this.mobileSelect.querySelector(".ms-cancel"),this.grayLayer=this.mobileSelect.querySelector(".ms-gray-layer"),this.popUp=this.mobileSelect.querySelector(".ms-content"),this.optionHeight=this.mobileSelect.querySelector("li").offsetHeight,t.initValue&&this.setTriggerInnerText(t.initValue),this.setStyle(t),this.isCascade=this.checkCascade(),this.isCascade&&this.initCascade(),t.initValue&&(this.initPosition=this.getPositionByInitValue()),this.initPosition.length<this.sliderList.length){const t=this.sliderList.length-this.initPosition.length;for(let i=0;i<t;i++)this.initPosition.push(0)}this.isCascade?this.initPosition.forEach(((t,i)=>{this.checkRange(i,this.initPosition)})):this.setCurDistance(this.initPosition),this.eventHandleMap={cancelBtn:{event:"click",fn:()=>{var t,i,s,e;this.hide(),null==(i=(t=this.config).cancel)||i.call(t,this.curIndexArr,this.curValue,this),null==(e=(s=this.config).onCancel)||e.call(s,this.curValue,this.curIndexArr,this)}},ensureBtn:{event:"click",fn:()=>{var t,i,s,e;this.hide(),this.optionHeight||(this.optionHeight=this.mobileSelect.querySelector("li").offsetHeight),this.setTriggerInnerText(this.getConnectedString()),this.curIndexArr=this.getIndexArr(),this.curValue=this.getCurValue(),null==(i=(t=this.config).callback)||i.call(t,this.curIndexArr,this.curValue,this),null==(e=(s=this.config).onChange)||e.call(s,this.curValue,this.curIndexArr,this)}},trigger:{event:"click",fn:()=>{this.show()}},grayLayer:{event:"click",fn:()=>this.hide()},popUp:{event:"click",fn:t=>t.stopPropagation()},panel:{event:["touchstart","touchend","touchmove"],fn:t=>this.touch(t)}},!navigator.userAgent.toLowerCase().match(/ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/)&&(this.eventHandleMap.panel.event=["mousedown","mousemove","mouseup"]),this.registerEvents("add"),this.fixRowStyle(),t.autoFocus&&this.show()}static checkDataType(t){var i,s;return"object"==typeof(null==(s=null==(i=t[0])?void 0:i.data)?void 0:s[0])}static checkRequiredConfig(t){const i=o.REQUIRED_PARAMS;if(!t){const t=i.map((t=>`'${t}'`));return o.log("error",`missing required param ${t.join(" and ")}.`),!1}for(let s=0;s<i.length;s++){const e=i[s];if(!t[e])return o.log("error",`missing required param '${e}'.`),!1}return!0}static log(t,i){var s;null==(s=console[t])||s.call(console,`[mobile-select]: ${i}`)}checkTriggerAvailable(){const{config:t}=this;return this.trigger=t.trigger instanceof HTMLElement?t.trigger:document.querySelector(t.trigger),!!this.trigger||(o.log("error","trigger HTMLElement does not found on your document."),!1)}getPositionByInitValue(){var t;const{keyMap:i,connector:s,initValue:e}=this.config,h=(null==e?void 0:e.split(s))||[];if(this.isJsonType){let s=null==(t=this.wheelsData[0])?void 0:t.data;return h.reduce(((t,e)=>{var h;const o=null==s?void 0:s.findIndex((t=>t[i.value]==e));return t.push(o<0?0:o),s=null==(h=s[o])?void 0:h[i.childs],t}),[])}return h.reduce(((t,i,s)=>{var e,h;const o=null==(h=null==(e=this.wheelsData[s])?void 0:e.data)?void 0:h.findIndex((t=>t==i));return t.push(o<0?0:o),t}),[])}getConnectedString(){let t="";for(let i=0;i<this.wheelList.length;i++)t+=i==this.wheelList.length-1?this.getInnerText(i):this.getInnerText(i)+this.config.connector;return t}setTriggerInnerText(t){this.config.triggerDisplayValue&&(this.trigger.textContent=t)}setValue(t){if(!t||!t.length)return;if(this.isJsonType&&"object"!=typeof t[0]||!this.isJsonType&&"object"==typeof t[0])return void o.log("error",`The setValue() input format should be same with getValue(), like: ${JSON.stringify(this.getValue())}`);const{keyMap:i}=this.config;t.forEach(((t,s)=>{var e;const h=this.isCascade?this.displayJson[s]:null==(e=this.wheelsData[s])?void 0:e.data,o=null==h?void 0:h.findIndex((s=>this.isJsonType?t[i.id]==s[i.id]||t[i.value]==s[i.value]:t==s));this.locatePosition(s,o)})),this.setTriggerInnerText(this.getConnectedString())}setTitle(t){this.mobileSelect.querySelector(".ms-title").innerHTML=t}setStyle(t){if(t.ensureBtnColor&&(this.ensureBtn.style.color=t.ensureBtnColor),t.cancelBtnColor&&(this.cancelBtn.style.color=t.cancelBtnColor),t.titleColor&&(this.mobileSelect.querySelector(".ms-title").style.color=t.titleColor),t.textColor&&(this.panel=this.mobileSelect.querySelector(".ms-panel"),this.panel.style.color=t.textColor),t.titleBgColor&&(this.mobileSelect.querySelector(".ms-btn-bar").style.backgroundColor=t.titleBgColor),t.bgColor){this.panel=this.mobileSelect.querySelector(".ms-panel");const i=this.mobileSelect.querySelector(".ms-shadow-mask");this.panel.style.backgroundColor=t.bgColor,i.style.background="linear-gradient(to bottom, "+t.bgColor+", rgba(255, 255, 255, 0), "+t.bgColor+")"}"number"==typeof t.maskOpacity&&(this.mobileSelect.querySelector(".ms-gray-layer").style.background="rgba(0, 0, 0, "+t.maskOpacity+")")}show(){var t,i,s;this.mobileSelect.classList.add("ms-show"),null==(t=document.querySelector("body"))||t.classList.add("ms-show"),"function"==typeof this.config.onShow&&(null==(s=(i=this.config).onShow)||s.call(i,this.curValue,this.curIndexArr,this))}hide(){var t,i,s;this.mobileSelect.classList.remove("ms-show"),null==(t=document.querySelector("body"))||t.classList.remove("ms-show"),"function"==typeof this.config.onHide&&(null==(s=(i=this.config).onHide)||s.call(i,this.curValue,this.curIndexArr,this))}registerEvents(t){for(const[i,s]of Object.entries(this.eventHandleMap))"string"==typeof s.event?this[i][`${t}EventListener`](s.event,s.fn,{passive:!1}):s.event.forEach((e=>{this[i][`${t}EventListener`](e,s.fn,{passive:!1})}))}destroy(){var t,i;this.registerEvents("remove"),null==(i=null==(t=this.mobileSelect)?void 0:t.parentNode)||i.removeChild(this.mobileSelect)}getOptionsHtmlStr(t){const{keyMap:i}=this.config;let s="";if(this.isJsonType)for(let e=0;e<t.length;e++)s+=`<li data-id="${t[e][i.id]}">${t[e][i.value]}</li>`;else for(let i=0;i<t.length;i++)s+="<li>"+t[i]+"</li>";return s}renderComponent(t){this.mobileSelect=document.createElement("div"),this.mobileSelect.className="ms-mobile-select",this.mobileSelect.innerHTML=`<div class="ms-gray-layer"></div>\n <div class="ms-content">\n <div class="ms-btn-bar">\n <div class="ms-fix-width">\n <div class="ms-cancel">${this.config.cancelBtnText}</div> \n <div class="ms-title">${this.config.title||""}</div>\n <div class="ms-ensure">${this.config.ensureBtnText}</div>\n </div>\n </div>\n <div class="ms-panel">\n <div class="ms-fix-width">\n <div class="ms-wheels"></div>\n <div class="ms-select-line"></div>\n <div class="ms-shadow-mask"></div>\n </div>\n </div>`,document.body.appendChild(this.mobileSelect);let i="";for(let s=0;s<t.length;s++)i+=`<div class="ms-wheel" data-index="${s}"><ul class="ms-select-container">`,i+=this.getOptionsHtmlStr(t[s].data),i+="</ul></div>";this.mobileSelect.querySelector(".ms-wheels").innerHTML=i}reRenderWheels(){const t=this.wheelList.length-this.displayJson.length;if(t>0)for(let i=0;i<t;i++)this.wheelsContain.removeChild(this.wheelList[this.wheelList.length-1]);for(let t=0;t<this.displayJson.length;t++)if(this.wheelList[t])this.sliderList[t].innerHTML=this.getOptionsHtmlStr(this.displayJson[t]);else{const i=document.createElement("div");i.className="ms-wheel",i.innerHTML=`<ul class="ms-select-container">${this.getOptionsHtmlStr(this.displayJson[t])}</ul>`,i.setAttribute("data-index",t.toString()),this.wheelsContain.appendChild(i)}}checkCascade(){var t;const{keyMap:i}=this.config;if(this.isJsonType){const s=this.wheelsData[0].data;for(let e=0;e<s.length;e++)if(i.childs in s[e]&&(null==(t=s[e][i.childs])?void 0:t.length)>0)return this.cascadeJsonData=this.wheelsData[0].data,!0}return!1}initCascade(){this.displayJson.push(this.cascadeJsonData),this.initPosition.length>0?(this.initDeepCount=0,this.initCheckArrDeep(this.cascadeJsonData[this.initPosition[0]])):this.checkArrDeep(this.cascadeJsonData[0]),this.reRenderWheels()}initCheckArrDeep(t){if(t){const{keyMap:i}=this.config;if(i.childs in t&&t[i.childs].length>0){this.displayJson.push(t[i.childs]),this.initDeepCount++;const s=t[i.childs][this.initPosition[this.initDeepCount]];s?this.initCheckArrDeep(s):this.checkArrDeep(t[i.childs][0])}}}checkArrDeep(t){if(!t)return;const{keyMap:i}=this.config;i.childs in t&&t[i.childs].length>0&&(this.displayJson.push(t[i.childs]),this.checkArrDeep(t[i.childs][0]))}checkRange(t,i){var s;const e=this.displayJson.length-1-t,{keyMap:h}=this.config;for(let t=0;t<e;t++)this.displayJson.pop();let o;for(let e=0;e<=t;e++)o=0==e?this.cascadeJsonData[i[0]]:null==(s=null==o?void 0:o[h.childs])?void 0:s[i[e]];this.checkArrDeep(o),this.reRenderWheels(),this.fixRowStyle(),this.setCurDistance(this.resetPosition(t,i))}resetPosition(t,i){const s=[...i];let e;if(this.sliderList.length>i.length){e=this.sliderList.length-i.length;for(let t=0;t<e;t++)s.push(0)}else if(this.sliderList.length<i.length){e=i.length-this.sliderList.length;for(let t=0;t<e;t++)s.pop()}for(let i=t+1;i<s.length;i++)s[i]=0;return s}updateWheels(t){if(this.isCascade){if(this.cascadeJsonData=t,this.displayJson=[],this.initCascade(),this.initPosition.length<this.sliderList.length){const t=this.sliderList.length-this.initPosition.length;for(let i=0;i<t;i++)this.initPosition.push(0)}this.setCurDistance(this.initPosition),this.fixRowStyle()}}updateWheel(t,i){if(this.isCascade)return void o.log("error","'updateWheel()' not support cascade json data, please use 'updateWheels()' instead to update the whole data source");let s="";s+=this.getOptionsHtmlStr(i),this.wheelsData[t]=this.isJsonType?{data:i}:i,this.sliderList[t].innerHTML=s}fixRowStyle(){if(this.initColWidth.length&&this.initColWidth.length===this.wheelList.length){const t=this.initColWidth.reduce(((t,i)=>t+i),0);return void this.initColWidth.forEach(((i,s)=>{this.wheelList[s].style.width=(i/t*100).toFixed(2)+"%"}))}const t=(100/this.wheelList.length).toFixed(2);for(let i=0;i<this.wheelList.length;i++)this.wheelList[i].style.width=t+"%"}getIndex(t){return Math.round((2*this.optionHeight-t)/this.optionHeight)}getIndexArr(){const t=[];for(let i=0;i<this.curDistance.length;i++)t.push(this.getIndex(this.curDistance[i]));return t}getCurValue(){const t=[],i=this.getIndexArr(),{keyMap:s}=this.config;if(this.isCascade)for(let e=0;e<this.wheelList.length;e++){const h=this.displayJson[e][i[e]];h&&t.push({[s.id]:h[s.id],[s.value]:h[s.value]})}else if(this.isJsonType)for(let i=0;i<this.curDistance.length;i++)t.push(this.wheelsData[i].data[this.getIndex(this.curDistance[i])]);else for(let i=0;i<this.curDistance.length;i++)t.push(this.getInnerText(i));return t}getValue(){return this.getCurValue()}calcDistance(t){return 2*this.optionHeight-t*this.optionHeight}setCurDistance(t){const i=[];for(let s=0;s<this.sliderList.length;s++)i.push(this.calcDistance(t[s])),this.movePosition(this.sliderList[s],i[s]);this.curDistance=i}fixPosition(t){return-(this.getIndex(t)-2)*this.optionHeight}movePosition(t,i){t.style.transform="translate3d(0,"+i+"px, 0)"}locatePosition(t,i){void 0===t||void 0===i||i<0||(this.curDistance[t]=this.calcDistance(i),this.movePosition(this.sliderList[t],this.curDistance[t]),this.isCascade&&this.checkRange(t,this.getIndexArr()))}updateCurDistance(t,i){this.curDistance[i]=parseInt(t.style.transform.split(",")[1])}getInnerText(t){var i;const s=this.sliderList[t].getElementsByTagName("li").length;let e=this.getIndex(this.curDistance[t]);return e>=s?e=s-1:e<0&&(e=0),(null==(i=this.sliderList[t].getElementsByTagName("li")[e])?void 0:i.textContent)||""}touch(t){var i,s,e,h,o,n,l,r;const a=(t.composedPath&&t.composedPath()).find((t=>{var i;return null==(i=t.classList)?void 0:i.contains("ms-wheel")}));if(!a)return;const c=a.firstChild,p=parseInt(a.getAttribute("data-index")||"0");switch(t.type){case"touchstart":case"mousedown":c.style.transition="none 0s ease-out",this.startY=Math.floor(t instanceof TouchEvent?t.touches[0].clientY:t.clientY),this.preMoveY=this.startY,"mousedown"===t.type&&(this.enableClickStatus=!0);break;case"touchmove":case"mousemove":if(t.preventDefault(),"mousemove"===t.type&&!this.enableClickStatus)break;this.moveY=Math.floor(t instanceof TouchEvent?t.touches[0].clientY:t.clientY),this.offsetY=(this.moveY-this.preMoveY)*this.config.scrollSpeed,this.updateCurDistance(c,p),this.curDistance[p]=this.curDistance[p]+this.offsetY,this.movePosition(c,this.curDistance[p]),this.preMoveY=this.moveY;break;case"touchend":case"mouseup":if(c.style.transition="transform 0.18s ease-out",this.moveEndY=Math.floor(t instanceof TouchEvent?t.changedTouches[0].clientY:t.clientY),this.offsetSum=this.moveEndY-this.startY,this.oversizeBorder=-(c.getElementsByTagName("li").length-3)*this.optionHeight,0==this.offsetSum){const t=Math.floor((window.innerHeight-this.moveEndY)/40);if(2!=t){const o=this.curDistance[p]+(t-2)*this.optionHeight;o<=2*this.optionHeight&&o>=this.oversizeBorder&&(this.curDistance[p]=o,this.movePosition(c,this.curDistance[p]),null==(s=(i=this.config).transitionEnd)||s.call(i,this.getIndexArr(),this.getCurValue(),this),null==(h=(e=this.config).onTransitionEnd)||h.call(e,this.getCurValue(),this.getIndexArr(),this))}}else this.updateCurDistance(c,p),this.curDistance[p]=this.fixPosition(this.curDistance[p]),this.curDistance[p]>2*this.optionHeight?this.curDistance[p]=2*this.optionHeight:this.curDistance[p]<this.oversizeBorder&&(this.curDistance[p]=this.oversizeBorder),this.movePosition(c,this.curDistance[p]),null==(n=(o=this.config).transitionEnd)||n.call(o,this.getIndexArr(),this.getCurValue(),this),null==(r=(l=this.config).onTransitionEnd)||r.call(l,this.getCurValue(),this.getIndexArr(),this);"mouseup"===t.type&&(this.enableClickStatus=!1),this.isCascade&&this.checkRange(p,this.getIndexArr())}}};let n=o;h(n,"defaultConfig",{keyMap:{id:"id",value:"value",childs:"childs"},position:[],colWidth:[],title:"",connector:" ",ensureBtnText:"确认",cancelBtnText:"取消",triggerDisplayValue:!0,scrollSpeed:1}),h(n,"REQUIRED_PARAMS",["trigger","wheels"]);class l{}const r=class{constructor(s){t(this,s),this.selectionChanged=i(this,"selectionChanged",7),this.triggerName=void 0,this.selectedText=void 0,this.wheelData=void 0,this.selectedId="",this.ensureBtnText="Confirm",this.cancelBtnText="Cancel",this.listTitle=void 0,this.notFoundPopupProceedButton=void 0}componentWillLoad(){this.notFoundPopupProceedButton=document.querySelector("#translation-popup-button"),this.notFoundPopupProceedButton&&this.notFoundPopupProceedButton.addEventListener("click",(()=>{let t=document.querySelector("footer-nav");if(t){let i=t.getAttribute("ms-selected-text"),s=document.querySelector("footer-nav #lang-ddl");s&&i&&(s.innerHTML=i)}}))}wrapperClick(t){if(t&&(t.preventDefault(),t.target.id!=this.triggerName)){let i=t.currentTarget.querySelector(`#${this.triggerName}`);i&&i.click()}}render(){return s("div",{class:"mobile-select-wrapper"},s("div",{onClick:t=>{this.wrapperClick(t)}},s("span",{id:this.triggerName},this.selectedText),s("icon-asset",{type:"ptc",size:"x-small",name:"lang-drop-arrow",color:"white","is-mobile-select":"true","injected-style":"svg.ismobileselect{transform:translateX(10px); width: 13px !important;height: 10px !important;}"})))}componentDidRender(){let t=this,i=0;new n({trigger:`#${this.triggerName}`,title:`${this.listTitle?this.listTitle:""}`,wheels:this.wheelData?[{data:this.wheelData}]:[{data:["test1","test2"]}],position:[0],ensureBtnText:this.ensureBtnText,cancelBtnText:this.cancelBtnText,ensureBtnColor:"var(--color-gray-12)",cancelBtnColor:"var(--color-gray-12)",titleColor:"var(--color-gray-12)",onShow:function(s,e,h){if(t.selectedId)try{const s=t.getMobileSelectedItem(h);h.locatePosition(0,s.index),i=s.index}catch(t){console.log(t)}},callback:function(i,s,e){if(this.selectionChanged.emit({sender:e,index:i&&i.length>0?i[0]:-1,data:s&&s.length>0?s[0]:void 0}),s&&s[0]&&"#"!=s[0].id)window.location.href=s[0].id;else if(!i||isNaN(i[0])){const i=t.getMobileSelectedItem(e);e.locatePosition(0,i.index),e.setValue(this.wheelData[i.index]),e.setTriggerInnerText(i.value),e.show()}}.bind(this)}).locatePosition(0,i)}getMobileSelectedItem(t){let i=new l;return i.id=this.selectedId,t.mobileSelect.querySelectorAll("[data-id]").forEach(((t,s)=>{if(t.getAttribute("data-id")==i.id)return i.index=s,void(i.value=t.textContent)})),i}};r.style='.ms-mobile-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;opacity:0;visibility:hidden;-webkit-transition:opacity 0.4s, z-index 0.4s;transition:opacity 0.4s, z-index 0.4s;transform:translate(0, 0)}.ms-mobile-select *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.ms-mobile-select .ms-gray-layer{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.7);z-index:888;display:block}.ms-mobile-select .ms-content{width:100%;display:block;position:fixed;z-index:889;color:black;-webkit-transition:all 0.4s;transition:all 0.4s;bottom:-350px;left:0;background:white}.ms-mobile-select .ms-fix-width{width:90%;margin:0 auto;position:relative}.ms-mobile-select .ms-fix-width:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-btn-bar{border-bottom:1px solid #dcdcdc;font-size:15px;height:45px;position:relative;text-align:center;line-height:45px}.ms-mobile-select .ms-cancel,.ms-mobile-select .ms-ensure{height:45px;width:55px;cursor:pointer;position:absolute;top:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-cancel{left:0;color:#666}.ms-mobile-select .ms-ensure{right:0;color:#1e83d3}.ms-mobile-select .ms-title{font-size:15px;padding:0 15%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ms-mobile-select .ms-panel:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-wheels{width:100%;height:200px;overflow:hidden}.ms-mobile-select .ms-wheel{position:relative;z-index:0;float:left;width:50%;height:200px;overflow:hidden;-webkit-transition:width 0.3s ease;transition:width 0.3s ease}.ms-mobile-select .ms-select-container{display:block;text-align:center}.ms-mobile-select .ms-select-container li{font-size:15px;display:block;height:40px;line-height:40px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-select-line{height:40px;width:100%;position:absolute;top:80px;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc}.ms-mobile-select .ms-shadow-mask{position:absolute;top:0;width:100%;height:200px;background:linear-gradient(to bottom, #fffffff5, #ffffffcc 25%, #ffffff00 49%, #ffffff00 51%, #ffffffcc 75%, #fffffff5);opacity:0.9;pointer-events:none}.ms-mobile-select.ms-show{opacity:1;z-index:10000;visibility:visible}.ms-mobile-select.ms-show .ms-content{bottom:0}.ms-default-trigger{min-height:1em;color:#888}body.ms-show{overflow-y:hidden}h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.mobile-select-wrapper{display:block}.mobile-select-wrapper div{display:inline;margin-right:var(--ptc-element-spacing-03);width:100%;font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);color:var(--color-white);height:18px}.mobileSelect .content{top:auto}.mobileSelect .content .btnBar{border-color:var(--color-gray-10)}.mobileSelect .content .btnBar .cancel,.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .title{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest)}.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .cancel{transform:translateY(12.5px);width:125px}.mobileSelect .content .panel .wheel .selectContainer li{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);height:45px}ptc-responsive-wrapper.xsmall .mobile-select-wrapper,ptc-responsive-wrapper.small .mobile-select-wrapper{display:block}ptc-responsive-wrapper.medium .mobile-select-wrapper,ptc-responsive-wrapper.large .mobile-select-wrapper,ptc-responsive-wrapper.xlarge .mobile-select-wrapper,ptc-responsive-wrapper.xxlarge .mobile-select-wrapper,ptc-responsive-wrapper.large2k .mobile-select-wrapper,ptc-responsive-wrapper.large4k .mobile-select-wrapper{display:none}';export{r as ptc_mobile_select}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as o}from"./p-ac75c7ad.js";const s=class{constructor(e){t(this,e),this.videoSrc=void 0,this.posterSrc=void 0,this.overlay=!0,this.overlayType="standard",this.playButtonTitle=void 0,this.pauseButtonTitle=void 0,this.buttonLocation="bottom-right",this.buttonTabIndex=!1,this.paused=void 0,this.trackerId=void 0,this.type="default",this.isIframe=!1}componentWillLoad(){this.paused=!1}render(){const t=this.isIframe?e("div",{class:"iframe-wrapper"},e("iframe",{id:"jumbotron-iframe",src:this.videoSrc,frameborder:0,allow:"autoplay",allowFullScreen:!0,class:"background-video-embed"})):e("video",{src:this.videoSrc,poster:this.posterSrc,autoplay:!0,loop:!0,muted:!0,playsinline:!0});return e(i,{class:this.type},t,!!this.videoSrc&&this.playButtonTitle&&e("div",{class:`play-button ${this.buttonLocation}`},this.paused&&e("ptc-tooltip",{class:"play-btn",mode:"wrapper",description:this.playButtonTitle,position:"allbp-bottom-right"===this.buttonLocation?"side-left":"bottom-right",styles:".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}"},e("ptc-button",{type:"button",color:"icon-toggle",tabNav:0,onClick:t=>this.toggleVideoPlay(t),styles:"button.icon-toggle { padding :0px 8px; }","aria-label":"Video Play button"},e("icon-asset",{name:"play",size:"small",type:"ptc",color:"black"}))),!this.paused&&!!this.pauseButtonTitle&&e("ptc-tooltip",{class:"pause-btn",mode:"wrapper",description:this.pauseButtonTitle,position:"allbp-bottom-right"===this.buttonLocation?"side-left":"bottom-right",styles:".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}"},e("ptc-button",{trackerId:this.trackerId,type:"button",color:"icon-toggle",onClick:t=>this.toggleVideoPlay(t),"aria-label":"Video Pause button"},e("icon-asset",{name:"pause",size:"small",type:"ptc",color:"black"})))),this.overlay?e("div",{class:`video-overlay ${this.overlayType}`}):"","default"==this.type?e("slot",null):"")}toggleVideoPlay(t){t.preventDefault(),this.paused=!this.paused;let e=this.el.shadowRoot.querySelector("video");e&&(this.paused?e.pause():e.play().catch((t=>console.error(t))))}get el(){return o(this)}};s.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}:host video{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100;object-fit:cover}:host .video-overlay{z-index:1;display:block;position:absolute;width:100%;height:100%;top:0;left:0;opacity:0.8;background-image:linear-gradient(270deg, rgba(30, 38, 38, 0) 26%, #1e2626)}:host .video-overlay.dark{background-color:rgba(0, 0, 0, 0.6)}:host(.legacy){display:block;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host(.legacy) video{object-fit:cover;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden}:host .iframe-wrapper{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host .iframe-wrapper .background-video-embed{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%}:host .iframe-wrapper .player .vp-video-wrapper .vp-telecine-cover video{object-fit:cover}:host .play-button{position:absolute;top:1.5rem;right:1.5rem;width:34px;height:34px;z-index:99}@media (min-width: 768px){:host .play-button.top-right{top:2rem;right:2rem}}:host .play-button.top-left{right:unset;top:1.5rem;left:1.5rem}@media (min-width: 768px){:host .play-button.top-left{bottom:3.75rem;left:2rem}}@media (min-width: 768px){:host .play-button.bottom-left{top:unset;right:unset;bottom:3.75rem;left:2rem}}@media (min-width: 768px){:host .play-button.bottom-right{top:unset;bottom:3.75rem;right:2rem}}:host .play-button.allbp-bottom-right{top:unset;bottom:4.75rem;right:2rem}:host .play-button ptc-button{display:inline-block;padding:5px;position:relative;top:-5px;left:-5px;cursor:pointer}@media only screen and (min-width: 768px){:host .play-button ptc-button{top:auto;left:auto}}@media only screen and (min-width: 992px){:host .play-button ptc-button{padding:0}}";export{s as ptc_background_video}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as n,g as o}from"./p-ac75c7ad.js";const s=class{constructor(i){t(this,i),this.dropdownClickEvent=e(this,"dropdownClickEvent",7),this.label=void 0,this.iconAssetName=void 0,this.iconSrc=void 0}calculateOffset(){var t=this.el.shadowRoot.querySelector(".submenu-container"),e=this.el.closest("ptc-subnav");if(t&&e)if(window.innerWidth>=1200){let i=e.clientHeight;i>0&&(t.style.top=`${i}px`)}else t.style.top=""}handleClick(t){this.calculateOffset(),setTimeout((()=>{this.dropdownClickEvent.emit(t)}),100)}render(){return i(n,{class:"dropdown"},i("span",{class:"back-btn"},i("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.97852 14.12L3.82515 8L9.97852 1.88L8.08414 -8.28059e-08L0.0229606 8L8.08414 16L9.97852 14.12Z",fill:"white"})),"Back"),i("span",{class:"submenu-toggle",onClick:()=>this.handleClick(this),onMouseOver:()=>this.handleClick(this)},this.iconAssetName&&i("icon-asset",{type:"ptc",size:"xx-small",name:this.iconAssetName,color:"white"}),this.label,this.iconSrc&&i("img",{src:this.iconSrc,alt:this.label,class:"custom-icon"}),!this.iconSrc&&i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15",fill:"white",class:""},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.2375 2.83325L7.5 8.60203L1.7625 2.83325L-7.76305e-08 4.60923L7.5 12.1666L15 4.60923L13.2375 2.83325Z",fill:"white"}))),i("div",{class:"submenu-container"},i("div",{class:"submenu-container-lg"},i("slot",null))))}get el(){return o(this)}};s.style='h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative;cursor:pointer}:host .back-btn{display:none;position:absolute;left:30px;top:22px;color:var(--color-white);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-denser);font-weight:var(--ptc-font-weight-bold)}:host .back-btn svg{margin-right:4px;vertical-align:middle;width:12px;height:12px}@media only screen and (min-width: 1200px){:host{display:inline-block;position:initial}}:host::before,:host::after{content:" ";width:1600px;height:1px;background-color:var(--color-gray-08);position:absolute;right:0;bottom:0}@media only screen and (min-width: 1200px){:host::before,:host::after{display:none}}:host::after{left:0;right:auto}:host .submenu-toggle{display:inline-block;color:var(--color-gray-03);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-denser);font-weight:var(--ptc-font-weight-bold);white-space:nowrap;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-03);margin-left:34%;position:relative}:host .submenu-toggle::after{content:"";display:block;border-bottom:2px solid transparent;margin:auto;position:absolute;width:calc(100% - 20px);left:0;right:0;bottom:14px}@media only screen and (min-width: 1200px){:host .submenu-toggle::after{bottom:20px}}@media only screen and (min-width: 480px){:host .submenu-toggle{margin-left:38%}}@media only screen and (min-width: 768px){:host .submenu-toggle{margin-left:42%}}@media only screen and (min-width: 1200px){:host .submenu-toggle{padding:22px var(--ptc-element-spacing-03);margin-left:0;display:flex;align-items:center}}:host .submenu-toggle svg{margin-left:5px;margin-top:2px;vertical-align:middle;width:12px;height:12px}:host .submenu-toggle svg path{fill:var(--color-gray-04)}:host .submenu-toggle:hover{color:var(--color-white)}:host .submenu-toggle:hover::after{border-color:var(--color-white)}:host .submenu-toggle:hover svg path{fill:var(--color-white)}:host .submenu-toggle icon-asset{margin-right:8px}:host .submenu-toggle icon-asset svg{margin:0}:host .submenu-container{background-color:var(--color-gray-12)}@media only screen and (min-width: 1200px){:host .submenu-container{position:absolute;width:100%;right:0;left:0;top:64px;z-index:10}}:host .submenu-container .submenu-container-lg{max-width:1200px;margin:auto}@media only screen and (min-width: 992px){:host .submenu-container .submenu-container-lg{padding:0 32px}}:host ::slotted(ptc-nav-link:last-child)::before,:host ::slotted(ptc-nav-link:last-child)::after{display:none}:host(.short-dropdown) .submenu-container{text-align:center}@media only screen and (min-width: 1200px){:host(.short-dropdown) .submenu-container{width:initial;right:3%;left:initial;top:56px;z-index:1000}}:host(.short-dropdown) .submenu-container .submenu-container-lg{padding:0;width:auto;min-width:348px;display:flex;justify-content:space-evenly}:host(.active){padding-bottom:0}:host(.active) .submenu-toggle{color:var(--color-white);border-color:var(--color-white)}:host(.active) .submenu-toggle svg path{fill:var(--color-white)}:host(.active)::before,:host(.active)::after{display:none}:host(.active.short-dropdown) .back-btn{display:inline-block}@media only screen and (min-width: 1200px){:host(.active.short-dropdown) .back-btn{display:none}}.custom-icon{object-fit:cover;width:1.5rem;height:1.5rem}.custom-icon:hover{filter:brightness(0) invert(1)}.menu-right *{color:transparent !important}';export{s as ptc_nav_submenu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as n}from"./p-ac75c7ad.js";const h=class{constructor(e){t(this,e),this.sliderId=`ptc-nav-slider-${Math.floor(1e6*Math.random())}`}componentDidLoad(){this.updateSlider(this);const{shadowRoot:t}=document.querySelector(`#${this.sliderId}`);t.querySelector(".box-wrap").addEventListener("scroll",this.updateSlider.bind(this)),setTimeout((()=>{this.updateSlider(this)}),3100)}handledropdownClickEvent(t){const e=t.target.querySelector(".nav-slider").id,i=t.target.querySelector(".nav-slider").shadowRoot.querySelector(".box-wrap"),n=document.querySelector(`#${e}`).shadowRoot.querySelector("#prevBtn"),h=document.querySelector(`#${e}`).shadowRoot.querySelector("#nextBtn");let a="ptc-nav-submenu"!=t.target.tagName.toLowerCase();console.log(t.target.tagName),this.updateArrows(i,n,h,a)}updateArrows(t,e,i,n){t.offsetWidth==t.scrollWidth?(e.style.visibility="hidden",i.style.visibility="hidden",n&&(e.closest(".btn-wrap-left").style.display="none")):t.scrollLeft+t.offsetWidth<=t.scrollWidth?(n&&(e.closest(".btn-wrap-left").style.display=""),t.scrollLeft>0?t.scrollLeft+t.offsetWidth==t.scrollWidth?(i.style.visibility="hidden",e.style.visibility="visible"):(e.style.visibility="visible",i.style.visibility="visible"):(e.style.visibility="hidden",i.style.visibility="visible")):(e.style.visibility="visible",i.style.visibility="hidden")}updateSlider(t){const e=document.querySelector(`#${this.sliderId}`).shadowRoot.querySelector(".box-wrap"),i=document.querySelector(`#${this.sliderId}`).shadowRoot.querySelector("#prevBtn"),n=document.querySelector(`#${this.sliderId}`).shadowRoot.querySelector("#nextBtn");if(void 0!==t&&t.target){let e=!t.target.closest(".dropdown-content");this.updateArrows(t.target,i,n,e)}else this.updateArrows(e,i,n,!1)}leftScroll(t){const e=document.querySelector(`#${t.sliderId}`).shadowRoot.querySelector(".box-wrap");e.scrollLeft>0&&e.scrollBy(-200,0)}rightScroll(t){const e=document.querySelector(`#${t.sliderId}`).shadowRoot.querySelector(".box-wrap");e.scrollLeft+e.offsetWidth<e.scrollWidth&&e.scrollBy(200,0)}render(){return e(i,{class:"nav-slider",id:this.sliderId},e("div",{class:"btn-wrap-left"},e("button",{id:"prevBtn",class:"navArrows",onClick:()=>this.leftScroll(this),"aria-label":"Left scroll button"},e("svg",{width:"12",height:"12",viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.166 13.2375L4.39723 7.5L10.166 1.7625L8.39004 0L0.832683 7.5L8.39004 15L10.166 13.2375Z",fill:"white"})))),e("div",{class:"box-wrap"},e("slot",null)),e("div",{class:"btn-wrap-right"},e("button",{id:"nextBtn",class:"navArrows ",onClick:()=>this.rightScroll(this),"aria-label":"Right scroll button"},e("svg",{width:"12",height:"12",viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.833984 1.7625L6.60277 7.5L0.833984 13.2375L2.60996 15L10.1673 7.5L2.60996 0L0.833984 1.7625Z",fill:"white"})))))}get el(){return n(this)}};h.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}@media only screen and (min-width: 1200px){:host{max-width:746px;padding:0px 0px;display:flex;align-items:center;margin-left:-23px}:host .box-wrap{width:100%;height:auto;display:flex;flex-wrap:nowrap;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}:host .box-wrap::-webkit-scrollbar{display:none}}@media only screen and (min-width: 1440px){:host{margin-left:-46px}}:host .navArrows{display:inline-block}:host .navArrows svg{vertical-align:middle}:host .btn-wrap-left,:host .btn-wrap-right{display:none}@media only screen and (min-width: 1200px){:host .btn-wrap-left,:host .btn-wrap-right{display:inline-block;width:32px;height:32px;position:relative}}@media (max-width: 1199px){:host .btn-wrap-left,:host .btn-wrap-right{display:none !important}}:host button#prevBtn,:host button#nextBtn{background:transparent;border-radius:var(--ptc-border-radius-standard);border:none;width:32px;height:32px}:host button#prevBtn:hover,:host button#nextBtn:hover{background:var(--color-gray-12)}:host .btn-wrap-left{margin-right:0}@media (min-width: 1250px){:host .btn-wrap-left{margin-right:14px}}:host .btn-wrap-right{margin-left:14px}";export{h as ptc_nav_slider}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as n,F as a}from"./p-ac75c7ad.js";const o={0:"green",1:"blue",2:"gray"},l=class{constructor(i){t(this,i),this.captureSlots=()=>{var t,i,e,n;this.image=null===(t=this.hostEle)||void 0===t?void 0:t.querySelector('[slot="cta-image"]'),this.cta=null===(i=this.hostEle)||void 0===i?void 0:i.querySelector('[slot="cta-link"]');const a=null===(e=this.hostEle)||void 0===e?void 0:e.querySelector('[slot="cta-heading"]'),o=null===(n=this.hostEle)||void 0===n?void 0:n.querySelector('[slot="cta-description"]');this.heading=(null==a?void 0:a.innerText)||"",this.description=(null==o?void 0:o.innerText)||""},this.setBgColor=()=>{var t;let i=null;if(this.containerSelector){const e=document.querySelector(this.containerSelector);i=this.containerIsShadow?null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelectorAll("ptc-inline-cta"):null==e?void 0:e.querySelectorAll("ptc-inline-cta")}else i=document.querySelectorAll("ptc-inline-cta");i&&i.forEach(((t,i)=>{var e,n;if(t==this.hostEle){const t=Object.keys(o).length,a=o[i%t],l=null===(n=null===(e=this.hostEle)||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.querySelector(".big-inline-cta-container");l&&l.classList.add(a)}}))},this.truncate=(t,i)=>t.length<=i?t:t.substring(0,i)+"...",this.handleFocus=(t,i)=>{var e,n,a,o;"small"===this.type?null===(e=i.querySelector("ptc-link"))||void 0===e||e.focus():"PTC-BUTTON"!==t.relatedTarget.nodeName&&(null===(o=null===(a=null===(n=i.querySelector("ptc-button"))||void 0===n?void 0:n.shadowRoot)||void 0===a?void 0:a.querySelector("button"))||void 0===o||o.focus())},this.componentWillLoad=()=>{this.captureSlots()},this.componentWillRender=()=>{},this.componentDidLoad=()=>{"big"===this.type&&this.setBgColor()},this.disconnectedCallback=()=>{},this.type=void 0,this.containerSelector="",this.containerIsShadow=!1,this.trackerId="",this.image=void 0,this.heading="",this.description="",this.cta=void 0}render(){const t=()=>{var t,e,n,o,l,r,c;return i("div",{class:"small-inline-cta-container"},i("div",{class:"cta-bg"}),i("div",{class:"cta-content"},i("div",{class:"cta-image"},!!(null===(t=this.image)||void 0===t?void 0:t.src)&&i("ptc-picture",{alt:null===(e=this.image)||void 0===e?void 0:e.alt,"display-image":"block","image-alignment":"center","image-position":"relative","is-full-height":"true","is-full-width":"true","object-fit":"cover",src:null===(n=this.image)||void 0===n?void 0:n.src,styles:"\r\n\t\t\t\t\t\t\t\t:host {\r\n\t\t\t\t\t\t\t\t\theight: 100%;\r\n\r\n\t\t\t\t\t\t\t\t\timg {\r\n\t\t\t\t\t\t\t\t\t\tborder-radius: var(--ptc-border-radius-standard);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t"})),i("div",{class:"cta-body"},i("a",{class:"cta-body-inner link-wrapper",href:null===(o=this.cta)||void 0===o?void 0:o.href,target:null===(l=this.cta)||void 0===l?void 0:l.target,tabindex:"0"},!!this.heading&&i("ptc-title",{"seo-compatibility-mode":!0,type:"h4","title-size":"medium","title-weight":"w-7","title-color":"white","title-height":"densest","title-margin":"margin-flush",upperline:"no-upperline","is-plm-hub":!1},i("h4",null,this.truncate(this.heading,70))),!!this.description&&i(a,null,i("ptc-spacer",{breakpoint:"x-small",size:"small"}),i("ptc-spacer",{breakpoint:"small",size:"x-small"}),i("ptc-para",{"font-size":"x-small","font-weight":"w-4","para-color":"white","para-line-h":"line-height-p","para-margin":"margin-flush"},this.truncate(this.description,100))),!!(null===(r=this.cta)||void 0===r?void 0:r.href)&&i(a,null,i("ptc-spacer",{breakpoint:"x-small",size:"small"}),i("ptc-spacer",{breakpoint:"small",size:"x-small"}),i("ptc-link",{disabled:!1,"font-size":"small",theme:"d-green-underline",styles:".d-green-underline {line-height: var(--ptc-line-height-p)}"},null===(c=this.cta)||void 0===c?void 0:c.innerText))))))},n=()=>{var t,e,n,o,l,r,c;return i("div",{class:"big-inline-cta-container"},i("div",{class:"cta-bg"}),i("div",{class:"cta-content"},i("div",{class:"cta-image"},!!(null===(t=this.image)||void 0===t?void 0:t.src)&&i("ptc-picture",{alt:null===(e=this.image)||void 0===e?void 0:e.alt,"display-image":"block","image-alignment":"center","image-position":"relative","is-full-height":"true","is-full-width":"true","object-fit":"cover",src:null===(n=this.image)||void 0===n?void 0:n.src,styles:"\r\n\t\t\t\t\t\t\t\t:host {\r\n\t\t\t\t\t\t\t\t\theight: 100%;\r\n\r\n\t\t\t\t\t\t\t\t\timg {\r\n\t\t\t\t\t\t\t\t\t\tborder-radius: var(--ptc-border-radius-standard);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}; \r\n\t\t\t\t\t\t\t"})),i("div",{class:"cta-body",id:this.trackerId},i("a",{class:"cta-body-inner link-wrapper",href:null===(o=this.cta)||void 0===o?void 0:o.href,target:null===(l=this.cta)||void 0===l?void 0:l.target,tabindex:"0"},!!this.heading&&i("ptc-title",{"seo-compatibility-mode":!0,type:"h3","title-size":"large","title-weight":"w-7","title-color":"white","title-height":"densest","title-margin":"margin-flush",upperline:"no-upperline","is-plm-hub":!1},i("h3",null,this.truncate(this.heading,70))),!!this.description&&i(a,null,i("ptc-spacer",{breakpoint:"x-small",size:"large"}),i("ptc-spacer",{breakpoint:"small",size:"medium"}),i("ptc-para",{"font-size":"small","font-weight":"w-4","para-color":"white","para-line-h":"line-height-p","para-margin":"margin-flush"},this.truncate(this.description,200))),!!(null===(r=this.cta)||void 0===r?void 0:r.href)&&i(a,null,i("ptc-spacer",{breakpoint:"x-small",size:"xx-large"}),i("ptc-spacer",{breakpoint:"small",size:"x-large"}),i("ptc-spacer",{breakpoint:"x-small",size:"x-small"}),i("ptc-spacer",{breakpoint:"small",size:"xx-small"}),i("ptc-button",{color:"ptc-tertiary",disabled:!1,type:"button",styles:".ptc-tertiary {border: 2px solid #FFFFFF}","tab-nav":"-1"},null===(c=this.cta)||void 0===c?void 0:c.innerText))))))},o=()=>{var t,e,n,o,l,r,c;return i("div",{class:"bottom-inline-cta-container"},i("div",{class:"cta-image"},!!(null===(t=this.image)||void 0===t?void 0:t.src)&&i("ptc-picture",{alt:null===(e=this.image)||void 0===e?void 0:e.alt,"display-image":"block","image-alignment":"center","image-position":"relative","is-full-height":"true","is-full-width":"true","object-fit":"cover",src:null===(n=this.image)||void 0===n?void 0:n.src,styles:":host {height: 100%;}"})),i("a",{class:"cta-body link-wrapper",href:null===(o=this.cta)||void 0===o?void 0:o.href,target:null===(l=this.cta)||void 0===l?void 0:l.target,tabindex:"0"},!!this.heading&&i("ptc-title",{"seo-compatibility-mode":!0,type:"h2","title-size":"xx-large","title-weight":"w-8","title-line-h":"densest","title-margin":"margin-flush",upperline:"no-upperline","is-plm-hub":!1},i("h2",null,this.truncate(this.heading,70))),!!this.description&&i(a,null,i("ptc-spacer",{breakpoint:"x-small",size:"small"}),i("ptc-spacer",{breakpoint:"x-small",size:"large"}),i("ptc-spacer",{breakpoint:"small",size:"medium"}),i("ptc-para",{"font-size":"small","font-weight":"w-4","para-line-h":"line-height-p","para-margin":"margin-bottom-4"},this.truncate(this.description,100))),!!(null===(r=this.cta)||void 0===r?void 0:r.href)&&i("ptc-button",{color:"ptc-primary",disabled:!1,type:"button","tab-nav":"-1"},null===(c=this.cta)||void 0===c?void 0:c.innerText)))};return i(e,null,i("ptc-spacer",{breakpoint:"x-small",size:"xxxx-large"}),i("ptc-spacer",{breakpoint:"small",size:"xxx-large"}),i("div",null,i((()=>{switch(this.type){case"small":return i(t,null);case"big":return i(n,null);case"bottom":return i(o,null);default:return null}}),null)),i("ptc-spacer",{breakpoint:"x-small",size:"xxxx-large"}),i("ptc-spacer",{breakpoint:"small",size:"xxx-large"}))}get hostEle(){return n(this)}};l.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}:host .small-inline-cta-container{width:100%;height:max-content;display:grid;position:relative;align-items:center;margin-top:calc(var(--ptc-element-spacing-06) + var(--ptc-element-spacing-01));margin-bottom:calc(var(--ptc-element-spacing-06) + var(--ptc-element-spacing-01))}:host .small-inline-cta-container .cta-bg{display:none}:host .small-inline-cta-container .cta-content{width:100%;display:flex;flex-direction:column;box-sizing:border-box;background-color:var(--color-gray-08);border-radius:var(--ptc-border-radius-standard);padding:var(--ptc-element-spacing-05);box-sizing:border-box}:host .small-inline-cta-container .cta-content .cta-image{width:100%;height:200px}:host .small-inline-cta-container .cta-content .cta-body{width:100%;margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05);padding:0}:host .small-inline-cta-container .cta-content .cta-body .link-wrapper{outline:none;text-decoration:none}:host .small-inline-cta-container .cta-content .cta-body .link-wrapper:hover{outline:none;text-decoration:none}:host .small-inline-cta-container .cta-content .cta-body .link-wrapper:focus-visible{padding:2px;border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid #003dd6}@media only screen and (min-width: 768px){:host .small-inline-cta-container .cta-bg{display:block;width:80%;height:calc(100% + 16px + 16px);position:absolute;right:0;z-index:-1;background-color:var(--color-gray-08);border-radius:var(--ptc-border-radius-standard)}:host .small-inline-cta-container .cta-content{flex-direction:row;align-items:center;background-color:transparent;border-radius:none;padding:0}:host .small-inline-cta-container .cta-content .cta-image{width:35%;height:164px}:host .small-inline-cta-container .cta-content .cta-body{width:65%;justify-self:right;display:flex;align-items:center;box-sizing:border-box;padding-right:var(--ptc-element-spacing-07);padding-left:var(--ptc-element-spacing-07);margin-top:0;margin-bottom:0}}:host .big-inline-cta-container{width:100%;height:max-content;display:grid;position:relative;align-items:center;margin-top:calc(var(--ptc-element-spacing-06) + var(--ptc-element-spacing-01));margin-bottom:calc(var(--ptc-element-spacing-06) + var(--ptc-element-spacing-01))}:host .big-inline-cta-container .cta-bg{display:none}:host .big-inline-cta-container .cta-content{width:100%;display:flex;flex-direction:column;border-radius:var(--ptc-border-radius-standard);padding:var(--ptc-element-spacing-05);box-sizing:border-box;background-color:var(--color-green-08)}:host .big-inline-cta-container .cta-content .cta-image{width:100%;height:300px}:host .big-inline-cta-container .cta-content .cta-body{width:100%;margin-top:var(--ptc-element-spacing-06)}:host .big-inline-cta-container .cta-content .cta-body .link-wrapper{outline:none;text-decoration:none}:host .big-inline-cta-container .cta-content .cta-body .link-wrapper:hover{outline:none;text-decoration:none}:host .big-inline-cta-container .cta-content .cta-body .link-wrapper:focus-visible{padding:2px;border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid #003dd6}@media only screen and (min-width: 480px){:host .big-inline-cta-container .cta-content .cta-body{margin-top:var(--ptc-element-spacing-04)}}@media only screen and (min-width: 768px){:host .big-inline-cta-container .cta-bg{display:block;width:80%;height:calc(100% + 24px + 24px);position:absolute;right:0;z-index:-1;border-radius:var(--ptc-border-radius-standard);background-color:var(--color-green-08)}:host .big-inline-cta-container .cta-content{flex-direction:row;align-items:center;border-radius:none;padding:0;background-color:transparent}:host .big-inline-cta-container .cta-content .cta-image{width:40%;height:400px;justify-self:left}:host .big-inline-cta-container .cta-content .cta-body{width:60%;justify-self:right;display:flex;align-items:center;box-sizing:border-box;padding-top:calc(var(--ptc-element-spacing-07) + var(--ptc-element-spacing-05));padding-right:var(--ptc-element-spacing-07);padding-bottom:calc(var(--ptc-element-spacing-08) + var(--ptc-element-spacing-04));padding-left:var(--ptc-element-spacing-07);margin-top:0}}:host .big-inline-cta-container.green .cta-content{background-color:var(--color-green-08)}@media only screen and (min-width: 768px){:host .big-inline-cta-container.green .cta-bg{background-color:var(--color-green-08)}:host .big-inline-cta-container.green .cta-content{background-color:transparent}}:host .big-inline-cta-container.blue .cta-content{background-color:var(--color-blue-08)}@media only screen and (min-width: 768px){:host .big-inline-cta-container.blue .cta-bg{background-color:var(--color-blue-08)}:host .big-inline-cta-container.blue .cta-content{background-color:transparent}}:host .big-inline-cta-container.gray .cta-content{background-color:var(--color-gray-08)}@media only screen and (min-width: 768px){:host .big-inline-cta-container.gray .cta-bg{background-color:var(--color-gray-08)}:host .big-inline-cta-container.gray .cta-content{background-color:transparent}}:host .bottom-inline-cta-container{background-color:#FFF;padding:var(--ptc-element-spacing-06);display:flex;gap:var(--ptc-element-spacing-06);flex-direction:column;border-radius:var(--ptc-border-radius-standard)}:host .bottom-inline-cta-container .cta-image{flex:none}:host .bottom-inline-cta-container .cta-body{flex:none}:host .bottom-inline-cta-container .cta-body.link-wrapper{outline:none;text-decoration:none}:host .bottom-inline-cta-container .cta-body.link-wrapper:hover{outline:none;text-decoration:none}:host .bottom-inline-cta-container .cta-body.link-wrapper:focus-visible{padding:2px;border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid #003dd6}@media only screen and (min-width: 768px){:host .bottom-inline-cta-container{flex-direction:row}:host .bottom-inline-cta-container .cta-image{flex:1 0 0;align-self:stretch}:host .bottom-inline-cta-container .cta-body{flex:1 0 0}}";export{l as ptc_inline_cta}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as a,g as h}from"./p-ac75c7ad.js";const n=class{constructor(i){t(this,i),this.navLinkClicked=e(this,"navLinkClicked",7),this.href=void 0,this.isOutsideLink=!1,this.titleText=""}handleClick(t){t.stopPropagation(),this.href&&this.href.startsWith("#")&&(document.querySelector(this.href).scrollIntoView({behavior:"smooth"}),this.navLinkClicked.emit())}trimString(t,e){return t.length>e?t.slice(0,e)+"...":t}render(){return i(a,null,i("a",{href:this.href,target:this.isOutsideLink?"_blank":"_self",title:this.titleText,onClick:t=>{this.handleClick(t)}},i("slot",null),!this.href.startsWith("#")&&i("svg",{class:"icon-arrow-right",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10",viewBox:"0 0 14 10",fill:"none"},i("path",{d:"M8.84921 0.77792L8.81313 3.41153L0.51545 3.55584L0.515449 6.5863L8.81313 6.44199L8.81313 9.40029L13.1424 5.07107L8.84921 0.77792Z",fill:"#AEB8BD"}))))}get el(){return h(this)}};n.style='h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}@media only screen and (min-width: 1200px){:host{display:inline-block}}:host::before,:host::after{content:" ";width:1600px;height:1px;background-color:var(--color-gray-08);position:absolute;right:0;bottom:0}@media only screen and (min-width: 1200px){:host::before,:host::after{display:none}}:host::after{left:0;right:auto}:host a{color:var(--color-gray-03);text-decoration:none;display:inline-block;border-bottom:2px solid transparent;margin-left:34%;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-03);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-denser);font-weight:var(--ptc-font-weight-bold)}@media only screen and (min-width: 480px){:host a{margin-left:38%}}@media only screen and (min-width: 768px){:host a{margin-left:42%}}@media only screen and (min-width: 1200px){:host a{padding:22px var(--ptc-element-spacing-03);margin-left:0;display:flex;align-items:center;white-space:nowrap;position:relative}:host a::after{content:"";display:block;border-bottom:2px solid transparent;margin:auto;position:absolute;width:calc(100% - 20px);left:0;right:0;bottom:20px}}:host a svg{width:1rem;height:0.875rem;display:inline-block;background-size:cover;transition:margin-left 250ms ease-out;vertical-align:middle;margin-left:4px}:host a:hover,:host a:focus{color:var(--color-white)}@media only screen and (min-width: 1200px){:host a:hover::after,:host a:focus::after{border-color:var(--color-white)}}:host a:hover svg path,:host a:focus svg path{fill:var(--color-white)}:host ::slotted(icon-asset){margin-top:4px;margin-right:8px}';export{n as ptc_nav_link}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,h as i,H as t,g as a}from"./p-ac75c7ad.js";import{o as e}from"./p-0d81fcbd.js";const r=class{constructor(i){n(this,i),this.videoSrc=void 0,this.posterSrc=void 0,this.overlay=!0,this.playButtonTitle=void 0,this.pauseButtonTitle=void 0,this.playButtonTrackerId=void 0,this.buttonLocation="bottom-right",this.links=void 0}componentWillLoad(){this.sliderSettings={IsMouseDown:!1,PreventAnchor:!1,Timeout:void 0,StartX:0,ScrollLeft:0},this.readLinkItems()}componentDidLoad(){this.slider=this.el.shadowRoot.querySelector(".card-section"),e(this.el,".card-section",!0)}readLinkItems(){this.links=[],this.el.querySelectorAll(".card-cta-links > a").forEach((n=>{n&&this.links.length<4&&this.links.push(n)}))}onSliderScroll(){0===this.slider.scrollLeft&&this.slider.classList.contains("scroll-st")?this.slider.classList.remove("scroll-st"):0===this.slider.scrollLeft||this.slider.classList.contains("scroll-st")||this.slider.classList.add("scroll-st"),this.slider.scrollLeft===this.slider.scrollWidth-this.slider.offsetWidth&&this.slider.classList.contains("scroll-ed")?this.slider.classList.remove("scroll-ed"):this.slider.scrollLeft===this.slider.scrollWidth-this.slider.offsetWidth||this.slider.classList.contains("scroll-ed")||this.slider.classList.add("scroll-ed")}onLinkClick(n){if(!(window.innerWidth>1199)){if(n.preventDefault(),!this.sliderSettings.PreventAnchor){let i=n.currentTarget;i&&i.href&&(window.location.href=i.href)}this.sliderSettings.PreventAnchor=!1,clearTimeout(this.sliderSettings.Timeout)}}onSliderMouseDown(n,i){n.preventDefault(),this.sliderSettings.IsMouseDown=!0,i.classList.add("active"),this.sliderSettings.StartX=n.pageX-i.offsetLeft,this.sliderSettings.ScrollLeft=i.scrollLeft,this.sliderSettings.PreventAnchor=!1,this.sliderSettings.Timeout=setTimeout((()=>{this.sliderSettings.PreventAnchor=!0}),80)}onSliderMouseExit(n,i){n.preventDefault(),clearTimeout(this.sliderSettings.Timeout),this.sliderSettings.IsMouseDown=!1,i.classList.remove("active")}onSliderMouseDrag(n,i){this.sliderSettings.IsMouseDown&&(n.preventDefault(),i.scrollLeft=this.sliderSettings.ScrollLeft-(n.pageX-i.offsetLeft-this.sliderSettings.StartX))}onCardMouseDown(n){if(n&&n.currentTarget){let i=n.currentTarget;i&&i.classList.add("active")}}onCardMouseUp(n){if(n&&n.currentTarget){let i=n.currentTarget;i&&(i.classList.remove("active"),this.sliderSettings.IsMouseDown&&(clearTimeout(this.sliderSettings.Timeout),this.sliderSettings.IsMouseDown=!1))}}render(){return i(t,null,i("ptc-background-video",Object.assign({},this.getBackgroundVideoSettings(),{"overlay-type":"dark","tracker-id":this.playButtonTrackerId}),i("div",{class:"ptc-container"},i("div",{class:"primary-content-wrapper"},i("slot",{name:"primary-content"})),i("div",{class:"card-links"},i("div",{class:"secondary-content-wrapper"},i("slot",{name:"secondary-content"})),i("div",Object.assign({id:"ptc-homepage-video-background-cards-section",class:"card-section"},this.getSliderBindings()),this.links&&this.links.map(((n,t)=>{const a=n.getAttribute("data-tracker-id"),e=n.getAttribute("data-icon"),r=n.textContent;if(r)return i("a",{id:a,class:`card-link card-link-${t+1}`,"tab-index":t+1,href:n.href,onClick:n=>this.onLinkClick(n),onMouseDown:n=>this.onCardMouseDown(n),onMouseUp:n=>this.onCardMouseUp(n),onMouseLeave:n=>this.onCardMouseUp(n),onTouchEnd:n=>{this.onCardMouseUp(n)}},i("div",{class:"bgb"}),i("div",{class:"bgh"}),i("div",{class:"bgp"}),e&&i("icon-asset",{type:"ptc",size:"large",color:"white",name:e}),i("span",{class:"link-text hyphenate-text"},r.trim()))})))))))}getBackgroundVideoSettings(){return{videoSrc:this.videoSrc,posterSrc:this.posterSrc,pauseButtonTitle:this.pauseButtonTitle,playButtonTitle:this.playButtonTitle,buttonLocation:this.buttonLocation,overlay:this.overlay,class:"bg-video"}}getSliderBindings(){return{onMouseDown:n=>{this.onSliderMouseDown(n,this.slider)},onMouseUp:n=>{this.onSliderMouseExit(n,this.slider)},onMouseLeave:n=>{this.onSliderMouseExit(n,this.slider)},onMouseMove:n=>{this.onSliderMouseDrag(n,this.slider)}}}get el(){return a(this)}};r.style="h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nul,\nli,\nptc-subnav,\nptc-tab-list,\nptc-link, ptc-square-card,\n.hyphenate-text, ptc-footer {\n word-break: break-word;\n hyphens: manual;\n -webkit-hyphens: manual;\n -moz-hyphens: manual;\n -ms-hyphens: manual;\n}\n@supports (hyphenate-limit-chars: 12 3 3) {\n h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nul,\nli,\nptc-subnav,\nptc-tab-list,\nptc-link, ptc-square-card,\n.hyphenate-text, ptc-footer {\n hyphens: auto;\n -webkit-hyphenate-limit-before: 3;\n /* For Safari */\n -webkit-hyphenate-limit-after: 3;\n /* For Safari */\n hyphenate-limit-chars: 12 3 3;\n hyphenate-limit-lines: 2;\n hyphenate-limit-last: always;\n hyphenate-limit-zone: 6%;\n -webkit-hyphens: auto;\n -webkit-hyphenate-limit-before: 3;\n -webkit-hyphenate-limit-after: 3;\n -webkit-hyphenate-limit-chars: 12 3 3;\n -webkit-hyphenate-limit-lines: 2;\n -moz-hyphens: auto;\n -moz-hyphenate-limit-chars: 12 3 3;\n -moz-hyphenate-limit-lines: 2;\n -ms-hyphens: auto;\n -ms-hyphenate-limit-chars: 12 3 3;\n -ms-hyphenate-limit-lines: 2;\n }\n}\n\n:host {\n display: block;\n position: relative;\n overflow: hidden;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nul,\nli,\nptc-subnav,\nptc-tab-list,\nptc-link, ptc-square-card,\n.hyphenate-text, ptc-footer {\n word-break: break-word;\n hyphens: manual;\n -webkit-hyphens: manual;\n -moz-hyphens: manual;\n -ms-hyphens: manual;\n}\n@supports (hyphenate-limit-chars: 12 3 3) {\n h1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nul,\nli,\nptc-subnav,\nptc-tab-list,\nptc-link, ptc-square-card,\n.hyphenate-text, ptc-footer {\n hyphens: auto;\n -webkit-hyphenate-limit-before: 3;\n /* For Safari */\n -webkit-hyphenate-limit-after: 3;\n /* For Safari */\n hyphenate-limit-chars: 12 3 3;\n hyphenate-limit-lines: 2;\n hyphenate-limit-last: always;\n hyphenate-limit-zone: 6%;\n -webkit-hyphens: auto;\n -webkit-hyphenate-limit-before: 3;\n -webkit-hyphenate-limit-after: 3;\n -webkit-hyphenate-limit-chars: 12 3 3;\n -webkit-hyphenate-limit-lines: 2;\n -moz-hyphens: auto;\n -moz-hyphenate-limit-chars: 12 3 3;\n -moz-hyphenate-limit-lines: 2;\n -ms-hyphens: auto;\n -ms-hyphenate-limit-chars: 12 3 3;\n -ms-hyphenate-limit-lines: 2;\n }\n}\n\n.ptc-container {\n padding-right: 24px;\n padding-left: 24px;\n margin-right: auto;\n margin-left: auto;\n}\n\n@media only screen and (min-width: 1200px) {\n .ptc-container {\n padding-left: 0;\n padding-right: 0;\n max-width: 1136px;\n }\n}\n@media only screen and (min-width: 1440px) {\n .ptc-container {\n padding-left: 0;\n padding-right: 0;\n max-width: 1200px;\n }\n}\n.ptc-container-lg {\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n\n@media only screen and (min-width: 480px) {\n .ptc-container-lg {\n padding-left: var(--ptc-layout-spacing-03);\n padding-right: var(--ptc-layout-spacing-03);\n }\n}\n@media only screen and (min-width: 768px) {\n .ptc-container-lg {\n padding-left: var(--ptc-layout-spacing-04);\n padding-right: var(--ptc-layout-spacing-04);\n }\n}\n@media only screen and (min-width: 992px) {\n .ptc-container-lg {\n padding-left: var(--ptc-element-spacing-08);\n padding-right: var(--ptc-element-spacing-08);\n }\n}\n@media only screen and (min-width: 1980px) {\n .ptc-container-lg {\n padding-left: 0;\n padding-right: 0;\n max-width: 1900px;\n }\n}\n.ptc-container-fluid {\n width: 100%;\n}\n\n.primary-content-wrapper {\n max-width: 720px;\n padding: 120px 0;\n}\n@media only screen and (min-width: 992px) {\n .primary-content-wrapper {\n padding: 160px 0;\n }\n}\n@media only screen and (min-width: 1440px) {\n .primary-content-wrapper {\n padding: 160px 0;\n }\n}\n\n.bg-video {\n width: 100%;\n}\n\n.ptc-container {\n position: relative;\n z-index: 20;\n min-height: 587px;\n}\n\n.card-links {\n margin: 0;\n padding-bottom: 72px;\n}\n@media only screen and (min-width: 992px) {\n .card-links {\n padding-bottom: 88px;\n }\n}\n.card-links .secondary-content-wrapper {\n margin: 0;\n max-width: 720px;\n}\n.card-links .card-section {\n display: flex;\n position: relative;\n flex-wrap: nowrap;\n flex-shrink: 0;\n margin: 20px -24px 0;\n white-space: nowrap;\n -ms-overflow-style: none;\n scrollbar-width: none;\n transition: box-shadow var(--ptc-transition-medium) var(--ptc-ease-out);\n}\n.card-links .card-section::-webkit-scrollbar {\n display: none;\n}\n.card-links .card-section .card-link {\n display: inline-flex;\n position: relative;\n overflow: hidden;\n text-decoration: none;\n z-index: 10;\n align-items: center;\n gap: 16px;\n flex: 0 0 224px;\n align-self: stretch;\n border-radius: 4px 4px 0px 0px;\n border-bottom: 2px solid var(--color-blue-07);\n background: transparent;\n backdrop-filter: blur(12px);\n padding: 24px;\n word-wrap: normal;\n color: var(--color-white);\n font-family: var(--ptc-font-latin);\n font-size: var(--ptc-font-size-small);\n font-style: var(--ptc-font-style-normal);\n font-weight: var(--ptc-font-weight-bold);\n line-height: var(--ptc-line-height-p);\n margin: 0 12px;\n}\n.card-links .card-section .card-link:first-child {\n margin-left: 24px;\n}\n.card-links .card-section .card-link:last-child {\n margin-right: 24px;\n}\n.card-links .card-section .card-link .link-text {\n display: block;\n inline-size: 190px;\n white-space: break-spaces;\n font-size: var(--ptc-font-size-small);\n}\n@media only screen and (min-width: 992px) {\n .card-links .card-section .card-link .link-text {\n font-size: var(--ptc-font-size-medium);\n }\n}\n.card-links .card-section .card-link .bgb,\n.card-links .card-section .card-link .bgh,\n.card-links .card-section .card-link .bgp {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 8;\n opacity: 0;\n}\n.card-links .card-section .card-link .bgb,\n.card-links .card-section .card-link .bgh {\n transition: opacity var(--ptc-transition-medium) var(--ptc-ease-out);\n}\n.card-links .card-section .card-link .bgb {\n background: linear-gradient(85deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.07) 100.13%);\n opacity: 1;\n}\n.card-links .card-section .card-link _::-webkit-full-page-media .bgb, .card-links .card-section .card-link _:future .bgb, .card-links .card-section .card-link :root .safari_only .bgb {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n transition-property: background, backdrop-filter;\n transition: background 0.24s cubic-bezier(0.28, 0.11, 0.32, 1);\n box-sizing: border-box;\n}\n.card-links .card-section .card-link .bgh {\n background: linear-gradient(85deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.17) 100.13%);\n}\n.card-links .card-section .card-link .bgp {\n background: linear-gradient(85deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.12) 100.13%);\n}\n.card-links .card-section .card-link:hover .bgb,\n.card-links .card-section .card-link:hover .bgp {\n opacity: 0;\n}\n.card-links .card-section .card-link:hover .bgh {\n opacity: 1;\n}\n.card-links .card-section .card-link:active .bgb,\n.card-links .card-section .card-link:active .bgh, .card-links .card-section .card-link.active .bgb,\n.card-links .card-section .card-link.active .bgh {\n display: none;\n opacity: 0;\n}\n.card-links .card-section .card-link:active .bgp, .card-links .card-section .card-link.active .bgp {\n opacity: 1;\n}\n.card-links .card-section:before {\n position: absolute;\n width: 32px;\n background: linear-gradient(85deg, rgba(255, 255, 255, 0) 0%, white 100.13%);\n top: 16px;\n right: 0;\n bottom: 0;\n z-index: 12;\n}\n.card-links .card-section.scroll-st {\n box-shadow: inset 2px 0px 0px rgba(255, 255, 255, 0.3);\n}\n.card-links .card-section.scroll-ed {\n box-shadow: inset -2px 0px 0px rgba(255, 255, 255, 0.3);\n}\n.card-links .card-section.scroll-ed.scroll-st {\n box-shadow: inset 2px 0px 0px rgba(255, 255, 255, 0.3), inset -2px 0px 0px rgba(255, 255, 255, 0.3);\n}\n@media only screen and (min-width: 1200px) {\n .card-links .card-section {\n margin: 20px 0 0;\n align-items: flex-start;\n justify-content: flex-start;\n align-content: flex-start;\n }\n .card-links .card-section.scroll-st, .card-links .card-section.scroll-ed, .card-links .card-section.scroll-ed.scroll-st {\n box-shadow: unset;\n }\n .card-links .card-section .card-link {\n flex: unset;\n }\n .card-links .card-section .card-link:first-child {\n margin-left: 0;\n }\n .card-links .card-section .card-link:last-child {\n margin-right: 0;\n }\n}\n@media only screen and (min-width: 1440px) {\n .card-links .card-section {\n margin: 20px 0 0;\n }\n}\n\n.card-section {\n overflow-x: visible;\n overflow-y: visible;\n animation-duration: 0ms;\n animation-delay: 1000ms;\n animation-fill-mode: forwards;\n}\n@media only screen and (min-width: 1200px) {\n .card-section {\n overflow-x: visible;\n }\n}\n.card-section .card-link {\n animation-duration: 750ms;\n animation-delay: 0ms;\n animation-fill-mode: forwards;\n opacity: 0;\n transform: translate3d(0, 30%, 0);\n}\n.card-section .card-link.card-link-1 {\n animation-delay: 0ms;\n}\n.card-section .card-link.card-link-2 {\n animation-delay: 250ms;\n}\n.card-section .card-link.card-link-3 {\n animation-delay: 500ms;\n}\n.card-section .card-link.card-link-4 {\n animation-delay: 750ms;\n}\n.card-section.in-view {\n animation-name: fadeUpInContainer;\n}\n.card-section.in-view .card-link {\n animation-name: fadeUpIn;\n}\n\n@keyframes fadeUpIn {\n 0% {\n opacity: 0;\n transform: translate3d(0, 30%, 0);\n }\n 100% {\n opacity: 1;\n transform: translateZ(0);\n }\n}\n@keyframes fadeUpInContainer {\n 0% {\n overflow: visible;\n overflow-y: visible;\n overflow-x: visible;\n @media only screen and (min-width: 1200px) {\n overflow-x: visible;\n }\n }\n 100% {\n overflow: inherit;\n overflow-y: hidden;\n overflow-x: scroll;\n @media only screen and (min-width: 1200px) {\n overflow-x: hidden;\n }\n }\n}";export{r as ptc_homepage_video_background}
|