Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/main.min.js
Назад
var Themify;((h,f,m,g)=>{"use strict";const i=(e,s,i,a,l)=>{for(let t=(i="string"==typeof i?i.split(" "):i).length-1;-1<t;--t)!0===e?s.addEventListener(i[t],a,l):s.removeEventListener(i[t],a,l);return s};Node.prototype.tfClass=function(t){return this.getElementsByClassName(t)},Node.prototype.tfTag=function(t){return this.getElementsByTagName(t)},Node.prototype.tfId=function(t){return this.getElementById(t)},EventTarget.prototype.tfOn=function(t,e,s){return i(!0,this,t,e,s)},EventTarget.prototype.tfOff=function(t,e,s){return i(null,this,t,e,s)},(Themify={events:new Map,cssLazy:new Map,jsLazy:new Map,fontsQueue:new Set,device:"desktop",lazyScrolling:null,observer:null,triggerEvent(t,e,s,i){let a;return!0===i||"click"===e||"submit"===e||"input"===e||"resize"===e||"change"===e&&!s||0===e.indexOf("pointer")||0===e.indexOf("touch")||0===e.indexOf("mouse")?((s=s||{}).bubbles===m&&(s.bubbles=!0),s.cancelable===m&&(s.cancelable=!0),a=new("click"===e||0===e.indexOf("pointer")?PointerEvent:0===e.indexOf("mouse")?MouseEvent:Event)(e,s),Object.defineProperty(a,"target",{value:s.target||t,enumerable:!0})):a=new h.CustomEvent(e,{detail:s}),t.dispatchEvent(a),this},on(s,i,a,t){if(!0!==t||(i(),!0!==a)){const l=(s=s.split(" ")).length;for(let e=l-1;-1<e;--e){let t=this.events.get(s[e])||new Map;t.set(i,!!a),this.events.set(s[e],t)}}return this},off(t,e){const s=this.events.get(t);return s===m||e&&(s.delete(e),0!==s.size)||this.events.delete(t),this},trigger(t,s){const i=this.events.get(t),a=[];if(i!==m){s===m||Array.isArray(s)||(s=[s]);for(let[e,t]of i){try{let t=e.apply(null,s);t!==m&&t instanceof Promise&&a.push(t)}catch(t){console.error(t)}!0===t&&i.delete(e)}0===i.size&&this.events.delete(t)}return 0===a.length&&s!==m&&a.push(Promise.resolve(s)),Promise.all(a)},requestIdleCallback(t,e,s){h.requestIdleCallback?h.requestIdleCallback(t,{timeout:e}):(e=0<s?s:e<0?2500:e,setTimeout(t,e))},parseVideo(t){const e=t.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?\/?([A-Za-z0-9._%-]*)(\&\S+)?/i),s={type:null!==e&&(e[3].includes("youtu")?"youtube":!!e[3].includes("vimeo")&&"vimeo"),id:null!==e&&e[6]};return"vimeo"===s.type&&e[8]&&(s.h=e[8]),s},hash(e){let s=0;for(let t=e.length-1;-1<t;--t)s=(s<<5)-s+e.charCodeAt(t),s&=s;return s},scrollTo(t,e,s,i){e=e||800,t=t||0;const a=jQuery("html,body"),l="smooth"===a.css("scroll-behavior");l&&a.css("scroll-behavior","auto"),a.stop().animate({scrollTop:t},{progress:i,duration:e,done(){l&&a.css("scroll-behavior",""),s&&s()}})},imagesLoad(s){return new Promise(t=>{if(null!==s){const i=[];for(let t=(s=s.length===m?[s]:s).length-1;-1<t;--t){let e="IMG"===s[t].tagName?[s[t]]:s[t].tfTag("img");for(let t=e.legnth-1;-1<t;--t)if(!e[t].complete){let s=e[t];i.push(new Promise((t,e)=>{s.onload=t,s.onerror=e,s=null}))}}Promise.all(i).finally(()=>{t(s[0])})}else t()})},updateQueryString(t,e,s){s=s||h.location.href;const i=new URL(s,h.location),a=i.searchParams;null===e?a.delete(t):a.set(t,e);let l=a.toString();return""!==l&&(l="?"+l),s.split("?")[0]+l+i.hash},selectWithParent(t,e){let s=null;const i=!t.includes(".")&&!t.includes("["),a=!0==i&&("video"===t||"audio"===t||"img"===t);return(e=e&&e[0]!==m?e[0]:e)?(s=!1==i?e.querySelectorAll(t):!0==a?e.tfTag(t):e.tfClass(t),(!0==i&&e.classList.contains(t)||!1==i&&e.matches(t)||!0==a&&e.tagName.toLowerCase()===t)&&(s=this.convert(s,e))):s=!1==i?f.querySelectorAll(t):!0==a?f.tfTag(t):f.tfClass(t),s},convert(t,e){let s=t.length;const i=new Array(s);while(s--)i[s]=t[s];return e&&i.push(e),i},init(){this.is_builder_active=f.body.classList.contains("themify_builder_active");const t=()=>{if(this.body=jQuery("body"),this.w=h.innerWidth,this.h=h.innerHeight,this.isRTL=f.body.classList.contains("rtl"),this.isTouch=!!("ontouchstart"in h||0<navigator.msMaxTouchPoints),this.lazyDisable=!0===this.is_builder_active||f.body.classList.contains("tf_lazy_disable"),this.click=this.isTouch?"pointerdown":"click",this.isTouch){const t=screen.orientation?.angle!==m?screen.orientation.angle:h.orientation,e=90===t||-90===t?this.h:this.w;e<769&&(this.device=e<681?"mobile":"tablet")}requestAnimationFrame(()=>{if(null!==this.urlArgs&&(this.urlArgs="&"+new URLSearchParams({media:this.urlArgs}).toString()),this.cssUrl=this.url+"css/modules/",this.builder_url=g.theme_v?this.url+"themify-builder/":this.url.substring(0,this.url.slice(0,-1).lastIndexOf("/")+1),g.done!==m&&(this.cssLazy=new Map(Object.entries(g.done))),this.requestIdleCallback(()=>{this.mobileMenu()},40),this.trigger("tf_init"),h.loaded=!0,!g.is_admin){if(g.theme_v&&(g.theme_url=this.url.split("/").slice(0,-2).join("/"),this.loadJs(g.theme_url+"/js/themify.script",null,g.theme_v)),!1===this.is_builder_active){const t=h.tbLocalScript&&f.tfClass("module_row")[0]?this.loadJs(this.builder_url+"js/themify.builder.script"):Promise.resolve();t.then(()=>{this.lazyLoading()}),this.requestIdleCallback(()=>{this.commonJs()},-1),this.requestIdleCallback(()=>{this.tooltips()},110)}this.requestIdleCallback(()=>{this.wc()},50),this.requestIdleCallback(()=>{this.touchDropDown()},60),setTimeout(()=>{this.requestIdleCallback(()=>{this.gallery()},100)},800)}this.requestIdleCallback(()=>{this.resizer()},-1,2e3)})},e=f.currentScript,s=new URL(e.src,h.location.origin);this.is_min=s.href.includes(".min.js"),this.v=s.searchParams.get("ver")||e.dataset.v,this.urlArgs=s.searchParams.get("media")||null,this.urlHost=s.hostname,this.url=s.href.split("js/main.")[0].trim(),this.includesURL=s.origin+"/wp-includes/",this.cdnPlugin=e.dataset.plHref.split("?")[0].replace("/fake.css",""),"complete"===f.readyState||!0===this.is_builder_active?this.requestIdleCallback(t,50):h.tfOn("load",t,{once:!0,passive:!0}),h.self!==h.top&&typeof h.wp?.customize===m&&(f.body.className+=" lightboxed")},async initComponents(s,i){if(!0!==i||"IMG"!==s.tagName){let e;const a={VIDEO:"video",AUDIO:"audio",auto_tiles:"autoTiles",tf_carousel:"carousel",themify_map:"map","[data-lax]":"lax",masonry:"isotop",tf_search_form:"ajaxSearch",tf_sticky_form_wrap:"stickyBuy"},l=[];for(let t in a)!(e=null)===i?"tf_sticky_form_wrap"===t?s.id===t&&(e=[s]):"[data-lax]"===t?s.hasAttribute("data-lax")&&(e=[s]):(s.tagName===t||s.classList.contains(t)||"tf_search_form"===t&&s.classList.contains("tf_search_icon"))&&(e=[s]):e=this.selectWithParent(t.toLowerCase(),s),0<e?.length&&l.push(this[a[t]](e));return!(e=null)===i?s.classList.contains("wp-embedded-content")?e=[s]:l.push(this.wpEmbed(s.tfClass("wp-embedded-content"))):e=this.selectWithParent("wp-embedded-content",s),0<e?.length&&l.push(this.wpEmbed(e)),e=null,this.largeImages(s),Promise.all(l)}},fixedHeader(s){if(!this.is_builder_active)return new Promise((t,e)=>{this.loadJs("fixedheader").then(()=>{this.requestIdleCallback(()=>{this.trigger("tf_fixed_header_init",s),t()},50)}).catch(e)})},async lax(t,e){(!0===e||!this.is_builder_active)&&0<t.length&&(await this.loadJs("lax"),this.trigger("tf_lax_init",[t]))},async video(i){if(0<i?.length){for(let s=i.length-1;-1<s;--s){let e=i[s].dataset.poster;if(e){let t=new Image;t.src=e,t.decode().catch(()=>{}).finally(()=>{i[s].poster=e}),i[s].removeAttribute("data-poster")}}await this.loadJs("video-player"),this.trigger("tf_video_init",[i])}},async audio(t,e){0<t?.length&&(await Promise.all([this.loadCss("audio","tf_audio"),this.loadJs("audio-player")]),this.trigger("tf_audio_init",[t,e]))},async sideMenu(t,e){t&&(0<t.length||t.length===m)&&(await this.loadJs("themify.sidemenu"),this.trigger("tf_sidemenu_init",[t,e]))},async edgeMenu(t){f.tfClass("sub-menu")[0]!==m&&(await this.loadJs("edge.Menu"),this.trigger("tf_edge_init",t))},async sharer(t,e,s){await this.loadJs("sharer"),this.trigger("tf_sharer_init",[t,e,s])},async autoTiles(t){await this.loadJs("autoTiles"),this.trigger("tf_autotiles_init",[t])},async map(t){await this.loadJs("map"),this.trigger("tf_map_init",[t])},async carousel(t,e){t&&(await this.loadJs("themify.carousel"),this.trigger("tf_carousel_init",[t,e]))},async infinity(t,e){!t||0===t.length||!0===this.is_builder_active||!e.button&&e.hasOwnProperty("button")||e.path&&"string"==typeof e.path&&null===f.querySelector(e.path)||(e.append&&null===f.querySelector(e.append)?e.button&&(e.button.style.display="block"):(await this.loadJs("infinite"),this.trigger("tf_infinite_init",[t,e])))},async isotop(s,t){const i=[];for(let e=(s=s.length===m?[s]:s).length-1;-1<e;--e){let t=s[e].classList;t.contains("masonry-done")||t.contains("auto_tiles")&&t.contains("list-post")&&s[e].previousElementSibling&&!s[e].previousElementSibling.classList.contains("post-filter")||i.push(s[e])}0<i.length&&(await Promise.all([this.loadJs("jquery.isotope.min",void 0!==jQuery.fn.packery,"3.0.6"),this.loadJs("isotop")]),this.trigger("tf_isotop_init",[i,t]))},fonts(r){return new Promise((t,e)=>{r?"string"==typeof r?r=[r]:Array.isArray(r)||(r instanceof jQuery&&(r=r[0]),r=this.selectWithParent("tf_fa",r)):r=f.tfClass("tf_fa");const s=new Set,i=[],a=[],c=f.tfId("tf_svg").firstChild,l=c.tfTag("symbol");for(let t=l.length-1;-1<t;--t)s.add(l[t].id),s.add(l[t].id.replace("tf-",""));for(let e=r.length-1;-1<e;--e)if(r[e].tagName===m||"svg"===r[e].tagName){let t=r[e].classList?.[1]||r[e];if(t&&!s.has(t)){if(!this.fontsQueue.has(t)){this.fontsQueue.add(t);let e=t.replace("tf-",""),s=e.split("-");if("fas"===s[0]||"far"===s[0]||"fab"===s[0]){let t=s[0];s.shift(),e=t+" "+s.join("-")}i.push(e)}if(r[e].classList){let t=r[e].parentNode;t.classList.add("tf_lazy"),a.push(t)}}}if(0<i.length){const n=this.is_builder_active?5:2e3;setTimeout(()=>{this.fetch({action:"tf_load_icons",icons:JSON.stringify(i)},null,{credentials:"omit"}).then(l=>{const n=f.createDocumentFragment(),r="http://www.w3.org/2000/svg",o=[];for(let a in l){let t=f.createElementNS(r,"symbol"),e=f.createElementNS(r,"path"),s="tf-"+a.replace(" ","-"),i="0 0 ";i=(i=i+(l[a].vw!==m&&""!==l[a].vw?l[a].vw:"32")+" ")+(l[a].vh!==m&&""!==l[a].vh?l[a].vh:"32"),t.id=s,t.setAttributeNS(null,"viewBox",i),e.setAttributeNS(null,"d",l[a].p),t.appendChild(e),n.appendChild(t),l[a].w&&o.push(".tf_fa."+s+"{width:"+l[a].w+"em}")}if(c.appendChild(n),0<o.length){let t=f.tfId("tf_fonts_style");null===t&&((t=f.createElement("style")).id="tf_fonts_style",c.appendChild(t)),t.textContent+=o.join("")}this.fontsQueue.clear();for(let t=a.length-1;-1<t;--t)a[t]&&a[t].classList.remove("tf_lazy");t()}).catch(e)},n)}else t()})},commonJs(){return new Promise((t,e)=>{f.tfTag("tf-lottie")[0]&&this.loadJs("lottie",!!h.TF_Lottie),this.requestIdleCallback(()=>{this.fonts().then(t).catch(e)},200),g.commentUrl&&this.requestIdleCallback(()=>{!h.addComment&&g.commentUrl&&f.tfId("cancel-comment-reply-link")&&this.loadJs("comments")},-1,3e3),g.wp_emoji&&this.requestIdleCallback(()=>{const t=f.createElement("script");t.text=g.wp_emoji,requestAnimationFrame(()=>{f.head.appendChild(t),h._wpemojiSettings.DOMReady=!0}),g.wp_emoji=null},-1,4e3)})},loadJs(a,l,n,r){const o=a;let t=this.jsLazy.get(o);return t===m&&(t=new Promise((t,e)=>{if(!0===l)requestAnimationFrame(t);else{const s=(a=g.plugin_url!==this.cdnPlugin&&0===a.indexOf(g.plugin_url)?a.replace(g.plugin_url,this.cdnPlugin):a).includes(this.urlHost)||o.includes(this.urlHost),i=f.createElement("script");!0!==s&&(a.includes("http")||0===a.indexOf("//"))||(a.includes(".js")||(a+=".js"),!1===n)||(!1===s&&(a=this.url+"js/modules/"+a),(a=!0!==this.is_min||a.includes(".min.js")?a:a.replace(this.urlHost,"$D$").replace(".js",".min.js").replace("$D$",this.urlHost)).includes("ver=")||(n=n||this.v,a+="?ver="+n),null===this.urlArgs)||(a+=this.urlArgs),i.async=!1!==r,i.tfOn("load",()=>{requestAnimationFrame(t)},{passive:!0,once:!0}).tfOn("error",e,{passive:!0,once:!0}),i.src=a,requestAnimationFrame(()=>{f.head.appendChild(i)})}}),this.jsLazy.set(o,t)),t},loadCss(o,c,h,d,u){c=c||"tf_"+this.hash(o);let t=this.cssLazy.get(c);if(t===m)t=new Promise((a,e)=>{const t=d?d.getRootNode():f,s=o,i=t.tfId(c);if(null!==i&&"print"!==i.media)a();else{g.plugin_url!==this.cdnPlugin&&0===o.indexOf(g.plugin_url)&&(o=o.replace(g.plugin_url,this.cdnPlugin));const l=f.createElement("link"),n=function(){u=u||"all",this.media=u;const i=this.id,t=()=>{const e=this.getRootNode().styleSheets;let s=!1;for(let t=e.length-1;-1<t;--t)if(null!==e[t].ownerNode&&e[t].ownerNode.id===i){s=!0;break}!0===s?a():requestAnimationFrame(()=>{t()})};requestAnimationFrame(()=>{t()})},r=o.includes(this.urlHost)||s.includes(this.urlHost);!0!==r&&(o.includes("http")||0===o.indexOf("//"))||(o.includes(".css")||(o+=".css"),!1===h)||(!1===r&&(o=this.url+"css/modules/"+o),(o=!0!==this.is_min||o.includes(".min.css")?o:o.replace(this.urlHost,"$D$").replace(".css",".min.css").replace("$D$",this.urlHost)).includes("ver=")||(h=h||this.v,o+="?ver="+h),null===this.urlArgs)||(o+=this.urlArgs),l.rel="stylesheet",l.media="print",l.id=c,l.href=o,l.setAttribute("fetchpriority","low"),"isApplicationInstalled"in navigator?l.onloadcssdefined(n):l.tfOn("load",n,{passive:!0,once:!0}),l.tfOn("error",e,{passive:!0,once:!0});let t=d;requestAnimationFrame(()=>{(t=t?.parentNode?t:f.tfId("tf_lazy_common")?.nextSibling||f.head.firstElementChild).parentNode.insertBefore(l,d?t:t.nextSibling)})}}),this.cssLazy.set(c,t);else if(!0===t)t=Promise.resolve(),this.cssLazy.set(c,t);else if(null===d?.getRootNode().tfId(c))return this.cssLazy.delete(c),this.loadCss(o,c,h,d,u);return t},gallery(){const t=!(!1!==this.is_builder_active||!g.lightbox)&&g.lightbox;if(!1!==t&&!1!==t.lightboxOn&&!this.jsLazy.has("tf_gal")){this.jsLazy.set("tf_gal",!0);let l=!1;const e=h.location.hash.replace("#",""),n={extraLightboxArgs:g.extraLightboxArgs,lightboxSelector:t.lightboxSelector||".themify_lightbox",gallerySelector:t.gallerySelector||".gallery-item a",contentImagesAreas:t.contentImagesAreas,i18n:t.i18n||[],disableSharing:t.disable_sharing},r=t=>t?t.match(/\.(gif|jpg|jpeg|tiff|png|webp|apng)(\?fit=\d+(,|%2C)\d+)?(\&ssl=\d+)?$/i):null,o=t=>{if(!0!==l){f.tfOff("click",c),l=!0;const e=t.getAttribute("href"),s=f.createElement("div"),i=f.createElement("div");if(s.className="tf_lazy_lightbox tf_w tf_h",r(e)){s.textContent="Loading...";const a=new Image;a.decoding="async",a.src=e,a.decode()}else i.className="tf_lazy tf_w tf_h",s.appendChild(i);f.body.appendChild(s),Promise.all([this.loadCss("lightbox","tf_lightbox"),this.loadJs("lightbox.min",void 0!==jQuery.fn.magnificPopup),this.loadJs("themify.gallery")]).then(()=>{this.trigger("tf_gallery_init",n),t.click()}).finally(()=>{s.remove()})}},c=t=>{const e=t.target?t.target.closest("a"):null;if(e){const s=n.gallerySelector,i=n.contentImagesAreas,a=n.lightboxSelector;(e.closest(a)||r(e.getAttribute("href"))&&(i&&e.closest(i)||s&&(e.matches(s)||e.closest(s))&&!e.closest(".module-gallery")))&&(t.preventDefault(),t.stopImmediatePropagation(),o(e))}};if(f.tfOn("click",c),e&&"#"!==e){const s=decodeURI(e);let t=f.querySelector('img[alt="'+s+'"],img[title="'+s+'"]');(t=t&&t.closest(".themify_lightbox"))&&o(t)}}},lazyLoading(t){if(!0!==this.lazyDisable){const r=(t=t||f)instanceof Document||t instanceof HTMLElement?t.querySelectorAll("[data-lazy]"):t,o=r.length;if(0<o){const c=(e,s,i)=>{for(let t=e.length-1;-1<t;--t)null===this.lazyScrolling&&!0===e[t].isIntersecting&&(s.unobserve(e[t].target),requestAnimationFrame(()=>{this.lazyScroll([e[t].target],i)}))};let e;if(e=null===this.observer?new IntersectionObserver((t,e)=>{c(t,e,!0),e.disconnect();let s=!1;const i=this.isTouch?"touchstart":"mousemove",n=()=>{s&&s.disconnect(),s=null,h.tfOff("scroll "+i,n,{once:!0,passive:!0}),this.observer=new IntersectionObserver((t,e)=>{c(t,e)},{rootMargin:"300px 0px"});let a=0;const l=new Set;for(let t=0;t<o;++t){let i=r[t];if(i.hasAttribute("data-lazy")&&!i.hasAttribute("data-tf-not-load")&&(this.observer.observe(i),a<10)&&i.hasAttribute("data-tf-src")&&i.hasAttribute("data-lazy")){let s=i.getAttribute("data-tf-src");if(s&&!l.has(s)){l.add(s);let t=new Image,e=i.getAttribute("data-tf-srcset");t.decoding="async",e&&(t.srcset=e),t.src=s,t.decode(),++a}}}f.tfClass("wow")[0]&&this.requestIdleCallback(()=>{this.wow()},1500),l.clear()};h.tfOn("beforeprint",()=>{this.lazyScroll(f.querySelectorAll("[data-lazy]"),!0)},{passive:!0}).tfOn("scroll "+i,n,{once:!0,passive:!0}),setTimeout(()=>{if(!1===s){s=new IntersectionObserver((t,e)=>{null!==s&&c(t,e,!0),e.disconnect()});const t=15<o?15:o;for(let e=0;e<t;++e){let t=r[e];t&&t.hasAttribute("data-lazy")&&!t.hasAttribute("data-tf-not-load")&&s.observe(t)}}},1600)}):this.observer)for(let t=0;t<o;++t)r[t].hasAttribute("data-tf-not-load")||e.observe(r[t])}}},async lazyScroll(s,i){let t=0;if(s)if((t=s.length)===m)s=[s],t=1;else if(0===t)return;const r=function(){this.classList.remove("tf_svg_lazy_loaded","tf_svg_lazy")},o=[];for(let e=t-1;-1<e;--e){let n=s[e],t=n.tagName;if(n?.hasAttribute("data-lazy"))if(n.removeAttribute("data-lazy"),"IMG"===t||"DIV"!==t&&n.hasAttribute("data-tf-src")){if("svg"!==t){let e=n.dataset.tfSrc,a=n.dataset.tfSrcset,l=a?n.dataset.tfSizes:null;if(e||a)if("IMG"===t){let s=new Image,i=n.attributes;for(let e=i.length-1;-1<e;--e){let t=i[e].name;"src"===t||"srcset"===t||"sizes"===t||"loading"===t||t.includes("data-tf")||s.setAttribute(t,i[e].value)}s.decoding="async",a&&(l&&s.setAttribute("sizes",l),s.srcset=a),e&&(s.src=e);let t=new Promise(t=>{s.decode().catch(()=>{}).finally(()=>{requestAnimationFrame(()=>{n.replaceWith(s),s.classList.contains("tf_svg_lazy")&&(s.tfOn("transitionend",r,{once:!0,passive:!0}),requestAnimationFrame(()=>{s.classList.add("tf_svg_lazy_loaded")})),t()})})});o.push(t)}else{if(e&&(n.src=e,n.removeAttribute("data-tf-src")),n.removeAttribute("loading"),!0!==i&&n.parentNode!==f.body){n.parentNode.classList.add("tf_lazy");let t=this.imagesLoad(n).then(t=>{t.parentNode.classList.remove("tf_lazy")});o.push(t)}this.largeImages()}}}else try{"TF-LOTTIE"!==t&&n.classList.remove("tf_lazy"),o.push(this.reRun(n,!0)),o.push(this.trigger("tf_lazy",n))}catch(t){console.log(t)}else n?.removeAttribute("data-lazy");null!==this.observer&&n&&this.observer.unobserve(n)}return Promise.all(o).catch(()=>{})},async reRun(t,e){if(!0!==e&&this.commonJs(),g&&!g.is_admin){const s=!0===this.is_builder_loaded||"undefined"!=typeof ThemifyBuilderModuleJs,i=[];return(!0==s||h.tbLocalScript&&f.tfClass("module_row")[0]!==m)&&(!1==s&&await this.loadJs(this.builder_url+"js/themify.builder.script","undefined"!=typeof ThemifyBuilderModuleJs),i.push(ThemifyBuilderModuleJs.loadModules(t,e))),i.push(this.initComponents(t,e)),Promise.all(i)}},animateCss(){return this.loadCss("animate.min","animate")},wow(){return Promise.all([this.animateCss(),this.loadJs("tf_wow")])},async dropDown(t,e){if(0<t?.length){const s=[];!1!==e&&s.push(this.loadCss("dropdown","tf_dropdown")),s.push(this.loadJs("themify.dropdown")),await Promise.all(s),this.trigger("tf_dropdown_init",[t])}},resizer(){let s=!1,i,a;const t="onorientationchange"in h?"orientationchange":"resize";h.tfOn(t,()=>{s||(s=!0,i&&clearTimeout(i),i=setTimeout(()=>{a&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{const t=h.innerWidth,e=h.innerHeight;e===this.h&&t===this.w||(this.trigger("tfsmartresize",{w:t,h:e}),this.w=t,this.h=e),s=!1,a=i=null})},150))},{passive:!0})},mobileMenu(){if(g.menu_point){const s=parseInt(g.menu_point),t=t=>{const e=f.body.classList;!t&&this.w<=s||t&&t.w<=s?e.add("mobile_menu_active"):t!==m&&e.remove("mobile_menu_active")};t(),this.on("tfsmartresize",t)}},async wc(t){g.wc_js&&(g.wc_js_normal||setTimeout(()=>{f.tfOn(this.isTouch?"touchstart":"mousemove",()=>{const i=f.createDocumentFragment();for(let s in g.wc_js){let t=f.createElement("link"),e=g.wc_js[s];e.includes("ver",12)||(e+="?ver="+g.wc_version),t.as="script",t.rel="prefetch",t.href=e,i.appendChild(t)}f.head.appendChild(i)},{once:!0,passive:!0})},1800),await this.loadJs("wc"),this.trigger("tf_wc_init",t))},megaMenu(t){if(t&&!t.dataset.init){t.dataset.init=!0;const c=this,h=+g.menu_point+1,d=function(t){const e=t instanceof jQuery?t:this,s=(t instanceof jQuery?c:t).w;s>h?e.css("display",""):c.on("tfsmartresize",d.bind(e),!0)},u=function(t){const e=t instanceof jQuery?t:this;t.target&&!e[0].parentNode.contains(t.target)?e.css("display","")[0].parentNode.classList.remove("toggle-on"):f.tfOn("touchstart",u.bind(e),{once:!0})};this.cssLazy.has("tf_megamenu")&&t.tfClass("mega-link")[0]?Promise.all([this.loadCss(this.url+"megamenu/css/megamenu","tf_megamenu",null,null,"screen and (min-width:"+h+"px)"),this.loadJs(this.url+"megamenu/js/themify.mega-menu")]).then(()=>{this.trigger("tf_mega_menu",[t,h])}):this.requestIdleCallback(()=>{this.edgeMenu()},-1,2e3),t.tfOn("click",function(s){const t=s.target;if(!t.closest(".with-sub-arrow")&&(t.classList.contains("child-arrow")||"A"===t.tagName&&(!t.href||"#"===t.getAttribute("href")||t.parentNode.classList.contains("themify_toggle_dropdown")))){let t=jQuery(s.target);if("A"===t[0].tagName){if(!t.find(".child-arrow")[0])return}else t=t.parent();s.preventDefault(),s.stopPropagation();const i=t.parent();let e=null;if(m!==g.m_m_toggle&&!i.hasClass("toggle-on")&&c.w<h&&0===(e=i.siblings(".toggle-on")).length&&(e=null),c.w<h||s.target.classList.contains("child-arrow")||0<t.find(".child-arrow:visible").length){const a=t.next("div, ul"),l=a[0].style,n=f.tfId("headerwrap");if(c.w<h&&(null===l||""===l)&&d(a),c.isTouch&&!i.hasClass("toggle-on")&&!f.body.classList.contains("mobile-menu-visible")&&(null===n||400<n.offsetWidth)&&(u(a),i.siblings(".toggle-on").removeClass("toggle-on")),a.toggle("fast"),e){const r=e.find(">div,>ul"),o=r[0].style;c.w<h&&(null===o||""===o)&&d(r),r.toggle("fast")}}e&&e.removeClass("toggle-on"),i.toggleClass("toggle-on")}})}},touchDropDown(){const i=f.querySelectorAll("ul:not(.sub-menu)>.menu-item:first-child");for(let s=i.length-1;-1<s;--s){let t=i[s].parentNode,e=t.parentNode;"LI"===e.tagName||e.classList.contains("sub-menu")||this.megaMenu(t)}},ajaxSearch(l){if(!1===this.is_builder_active){const n=t=>{const e=t.currentTarget,s="click"===t.type,i=s?"overlay":"dropdown",a=["search_form","search_form_ajax","search_form_"+i],l=(s&&(t.preventDefault(),t.stopImmediatePropagation()),s&&e.classList.contains("tf_search_icon")&&a.push("searchform_overlay"),[this.loadJs("ajax-search")]);for(let s=a.length-1;-1<s;--s){let t="",e=null;"searchform_overlay"===a[s]&&(e=g.theme_v,t=g.theme_url+"/styles/modules/"),l.push(this.loadCss(t+a[s].replaceAll("_","-"),null,e))}Promise.all(l).finally(()=>{this.trigger("themify_overlay_search_init",[e]),this.triggerEvent(e,t.type)})};for(let a=l.length-1;-1<a;--a)if(!l[a].hasAttribute("data-ajax")||""!==l[a].dataset.ajax){let t=l[a].classList.contains("tf_search_icon"),e=t||l[a].classList.contains("tf_search_overlay"),s,i;!1===e?(i="focus",(s=l[a].querySelector('input[name="s"]')).autocomplete="off"):(i="click",s=t?l[a]:l[a].tfClass("tf_search_icon")[0]),s&&s.tfOn(i,n,{once:!0,passive:!e})}}},async stickyBuy(t){await Promise.all([this.loadCss("sticky-buy"),this.loadJs("sticky-buy")]),this.trigger("tf_sticky_buy_init",t)},async wpEmbed(e){if((e=e.length===m?[e]:e)[0]!==m){const s=[];for(let t=e.length-1;-1<t;--t)"IFRAME"!==e[t].tagName||e[t].dataset.done||(e[t].dataset.done=1,s.push(e[t]));if(s[0]!==m){await this.loadJs(this.includesURL+"js/wp-embed.min.js",!!h.wp&&!!h.wp.receiveEmbedMessage,g.wp);for(let e=s.length-1;-1<e;--e){let t=s[e].dataset.secret;t||(t=Math.random().toString(36).substr(2,10),s[e].setAttribute("data-secret",t)),s[e].hasAttribute("src")||(s[e].src=s[e].dataset.tfSrc),h.wp.receiveEmbedMessage({data:{message:"height",value:this.h,secret:t},source:s[e].contentWindow})}}}},largeImages(e){return new Promise(t=>{g.lgi===m&&!0!==this.is_builder_active||!f.querySelector(".tf_large_img:not(.tf_large_img_done)")?t():this.requestIdleCallback(async()=>{await this.loadJs("large-image-alert.min"),this.trigger("tf_large_images_init",e),t()},-1,1e3)})},async tooltips(){return g.menu_tooltips.length||g.builder_tooltips?this.loadJs("tooltip"):1},fetch(s,i,t,a){if(a=a||g.ajax_url,(t=Object.assign({credentials:"same-origin",method:"POST",headers:{}},t)).mode!==m||a.includes(location.origin)?"cors"!==t.mode&&(t.headers["X-Requested-With"]="XMLHttpRequest"):t.mode="cors","json"===(i=i||"json")&&(t.headers.accept="application/json,text/javascript,*/*;q=0.01"),s){let e;if(s instanceof FormData)e=s;else{e=new FormData;for(let t in s)"object"!=typeof s[t]||s[t]instanceof Blob?e.set(t,s[t]):e.set(t,JSON.stringify(s[t]))}if("POST"===t.method)"application/x-www-form-urlencoded"===t.headers["Content-type"]&&(e=new URLSearchParams(e)),t.body=e;else{a=new URL(a,h.location);for(let t of e.entries())a.searchParams.set(t[0],t[1])}}return fetch(a,t).then(t=>{if(t.ok)return"json"===i?t.json():"blob"===i?t.blob():t.text();throw t}).then(t=>{if(t&&("html"===i||"text"===i)&&(t=t.trim(),"html"===i)&&t){const e=f.createElement("template");e.innerHTML=t,t=e.content}return t})}}).init()})(window,document,void 0,themify_vars);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка