Submit
Path:
~
/
home
/
getwphos
/
www
/
kingpanel
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-templates
/
File Content:
editor-templates.min.js
!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{init:function(){return b},useLoadedTemplates:function(){return y}});var n=window.elementorV2.editor,r=window.elementorV2.editorStylesRepository,o=window.elementorV2.editorV1Adapters,i=window.elementorV2.store,a=window.elementorV2.editorDocuments;const l=(0,i.__createSlice)({name:"templates",initialState:{entities:{}},reducers:{setTemplates(e,t){t.payload.forEach(t=>{e.entities[t.id]=t.elements??[]})},clearTemplates(e){e.entities={}}}}),s=(0,i.__createSelector)([e=>e.templates.entities],e=>Object.values(e)),c='data-elementor-post-type="elementor_library"',u="data-elementor-id";var d=window.React;let m=[];const f=new Set;const p=(0,r.createStylesProvider)({key:"templates-styles",priority:50,subscribe:e=>(f.add(e),()=>{f.delete(e)}),actions:{all:()=>m,get:e=>m.find(t=>t.id===e)??null}});function y(){return(0,i.__useSelector)(s)}const w=()=>{const e=y();return(0,d.useEffect)(()=>{var t;t=e.flatMap(_),m=[...m,...t],f.forEach(e=>e())},[e]),null};function _(e){return e.length?e.flatMap(g):[]}function g(e){return[...Object.values(e.styles??{}),...(e.elements??[]).flatMap(g)]}function b(){(0,i.__registerSlice)(l),r.stylesRepository.register(p),(0,o.registerDataHook)("after","editor/documents/attach-preview",async()=>{(0,i.__dispatch)(l.actions.clearTemplates()),m=[],f.forEach(e=>e()),await async function(){const e=(0,o.getCanvasIframeDocument)();if(!e)return;const t=(0,a.getV1CurrentDocument)()?.id,n=function(e,t){const n=[...e.body.querySelectorAll(`[${c}]`)].map(e=>Number(e.getAttribute(u))).filter(e=>!isNaN(e)&&e!==t);return[...new Set(n)]}(e,t);if(!n.length)return;const r=await async function(e){return(await Promise.all(e.map(async e=>{try{return await o.ajax.load({data:{id:e},action:"get_document_config",unique_id:`template-${e}`})}catch{return null}}))).filter(e=>null!==e)}(n);(0,i.__dispatch)(l.actions.setTemplates(r))}()}),(0,n.injectIntoLogic)({id:"templates-styles",component:w})}(window.elementorV2=window.elementorV2||{}).editorTemplates=t}(),window.elementorV2.editorTemplates?.init?.();
Submit
FILE
FOLDER
Name
Size
Permission
Action
editor-templates.asset.php
368 bytes
0644
editor-templates.js
5964 bytes
0644
editor-templates.js.LICENSE.txt
2852 bytes
0644
editor-templates.min.js
2419 bytes
0644
editor-templates.strings.js
0 bytes
0644
N4ST4R_ID | Naxtarrr