Файловый менеджер - Редактировать - /var/www/html/jtemplate.zip
Ðазад
PK ! � )� � plugin.min.js.gznu �[��� � �Ymw۶�������2p��v��R�|'�MZ'��{{sm��# � hG����"�%i�� $�f3 ��&��V�����T��V��'�Y�9�uP:=�V�ԁ��(��Nu=W�D9G�$�Ƈ䵠�7LLWH�O�ڙ��r6ذ��n�e�zҸ��y�� !L����B�ZU${��_�S#K@�Q�߈ ���/�jgI����!�_���؛O�29'����vH$��^�ςSfΩញ�O�?�0���C�#�d��c �� ����{����8��*����'��:���w�����o�J�M$���VW3���V3먆������<,&�O�c�Ԍn 抱�d[�����M�?"S��4Lz~��4�4M��ZM�4ny�^ �j.5l؏TV�^Ҩ�gM�b��>���*-s����Ƈ��b�Pvqyuyy�;����ň��˿��E�݆@j+�Ƨsh�?��0�`�| 7A�PVZ������ _U���uY������u�HĒ��M�@�� �unM �"-�[�`��V��u�R�u^�h�_^�_�d��v�5�vC D��zĮ��̺R�ok����m��m�=��/z �U̿��y0[>�����W7��? ~e�� �d��8������;{0~����p�ԇ��8������:��č-��R�����!�du l#�M�|��c�1���:�7��;��������Ym�k���_�H�u�Ʃ�L��6$��V���0�"��K\��5x�� ӎ����7N�ߙ�����9-�;i�7p��H�U.9���]m�w�N��yrU�!�{{������:.��[" '����tO����> � � 8$k�m_��<6��fC&ۯ'���v��������ɷ�I�}�lWO�?N��`�}Sk����1h�=( ��q�Ě��l�Ͽ�*�;e�@~��:��v�Y��&�D�:��M�����F }�x��϶���?AW�o��?$G'$#�'O,�2R��K�Ŧ���P�y�B�Ɋ�'+�Eg��sx��F/B͚I� �]m���UX(�9��0&3adPy�m t�G�~K��8�a�: lꕙkּ����E˨�%�CC�X�5ʟ!�'�F���L���RV� �mڊ�Ɂe6mEmn�)�[� ����f�h�`E3�Nj�r��?*��9��kA�>��_/ɠ�_�dВ8_���ѡ���Ff�L�T�<g: �\)N��ٻ�@��C!ɱ���'�X��N���fΖ��Q`��G�y_kM����-�S�L(-��d�@�_��`��)��5� �`�.��oQ�� �췌���yI�����60���H�4��i'�)�����ͦį�v\r�GZ� ��L�؛�3qkNZ�w5��J �ܱ�E�.a���x���Zr�&�!=�I�=['��f8eک�s3 :�nPLBd�#�ćXD��?ܙSg+pa�� �#}.zb������|�iHs�}|�]����F-B��3pJj��F�_�X퐝��~�m�NHFF:�8������p���������W��#;�6{ �h Xڧ��b���|ٽ��]�=�ZH���3?�uW@W�R+�_�������(%K}� i%��Q�+e<����t��N�`�rh0ޱ�9�A�4,�P/�+��ϣ�O?y�wi�k�P1��o�˴���a��G#j���Rk������_*J./W��/��Գ1��l'x�`�� �x&h [r/^�[�� %#����)ϩ�50k3;^���j6i�b /7ç/�[v@-ecYp�6 �M�xK Gi��M��b�U�[�W ?��B���e�e� �lR�Fu�ӽш>&Ÿ� 0��B��{Wi����� ����ޛ&ьWb�:��W�Wu4�U�����O��|�x����&�g@hL���R���-Ki J��F��G��>�뵸@�?��������/�ks;�b�h����-U��/f�`b���n���IȤ��Ԉ�^[� �hd��{=�µ �뷝$w{n5WFi�Y����[H���=>;�9F�X�he>'x�&H�/a7��$� ���@���� ;ct��.�����/?�M�=��V�h��;dg��d�n4��E$��tg���`7NN�)QԈW���`r[ �F2�SU����~��%.���NR�k�&<�n�%x2%�t��� ���'�K]b>еY�R���Kcx/KH� 9"(���O�ŋ��8��{V�tH -!�aI2i���q-�R�`c�X��_@-^�(�M����Ljlrp���$!�DL/m��,-��R��$�r�q=���� b�`�Շ����/�bzp#=^ѧ[>����o)C�ӝ�_�wv�ŶX&� iWOH��i�u�Mv[��������^<�Phwɱ��Х&!�^_>H��z�M�+��+S�q�jlP3�K��>��B�$G�͈23��<C�k�e�N%���*��EZ;=l�x�_Oe9 �[^iPAo��U�t�����6�6�{L�6��4� ��d���4 �)�Pt1���S��$i��v�S�!\���SB�/g���Bz�La�z[J .Prlk]$ƆD[Y$a�� W3ŰC)ḽ2�ټ���2�b�H^��3Z"��&�O�-��!���]�Cc�a[R�]�u��[E(��İX�x�T��T�E�~���?s���v���?�X�t�G%/X��K$��h���'+e�i��-;�f�FT��X��\��m��¸J=��F�h((���c\S�V �f�7\2_eR���p1]�tщQ�=}��<�U�c�`<ǣ�ct<���R�]�s]��0�Jƕ��y�H����<�5S����hLՄc*�Vm�VҀ&\(}V6\�Ԩt6�7u��C���� ]?�0 ��S�;��oJzl�J�l�#�r��n�����,.�ޣJ�/��CVQ�X�,���x#Ý�X`r�_��l�ō���ky:#���� 5���&8�~;��N�[��Z �� ���<����j�[�W��ʜ�q�d �`U?�)n�(��}Sr{|f[��?��u�fm��fg�Lʴ6m�0^� %5U�� v0����B<�>1�+zq����06)���b懲�-8���#�&0$��:{��>��%��5k���h���=>��V�t�V�LK�u�&r��#�%���=ek(n�i���`����9z����Ċ�mit0����rxH`�o��y���������� <����>II��l�Zu���2�����W*�f3���:�j�3�k�b��v��i����(���F�X�wi��z�`��*�~B���G�?��X���m�]��3Y`��1o����%��-�d�ceA!T>�ݽ��K?řԺ�.A��fr�8e���_��o8� PK ! ��o8� � plugin.min.jsnu �[��� (function(){"use strict";var L=tinymce.util.Tools.resolve("tinymce.PluginManager");const E=(t,e,n)=>{var s;return n(t,e.prototype)?!0:((s=t.constructor)===null||s===void 0?void 0:s.name)===e.name},F=t=>{const e=typeof t;return t===null?"null":e==="object"&&Array.isArray(t)?"array":e==="object"&&E(t,String,(n,s)=>s.isPrototypeOf(n))?"string":e},C=t=>e=>F(e)===t,$=t=>e=>typeof e===t,w=C("string"),H=C("object"),k=C("array"),B=t=>t==null,J=t=>!B(t),b=$("function"),U=(t,e)=>{if(k(t)){for(let n=0,s=t.length;n<s;++n)if(!e(t[n]))return!1;return!0}return!1},Y=t=>()=>t;function R(t,...e){return(...n)=>{const s=e.concat(n);return t.apply(null,s)}}const K=Y(!1),V=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var y=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=t=>e=>e.options.get(t),z=t=>{const e=t.options.register;e("template_cdate_classes",{processor:"string",default:"cdate"}),e("template_mdate_classes",{processor:"string",default:"mdate"}),e("template_selected_content_classes",{processor:"string",default:"selcontent"}),e("template_preview_replace_values",{processor:"object"}),e("template_replace_values",{processor:"object"}),e("jtemplates",{processor:n=>w(n)||U(n,H)||b(n),default:[]}),e("template_cdate_format",{processor:"string",default:t.translate("%Y-%m-%d")}),e("template_mdate_format",{processor:"string",default:t.translate("%Y-%m-%d")})},W=g("template_cdate_classes"),x=g("template_mdate_classes"),q=g("template_selected_content_classes"),Z=g("template_preview_replace_values"),D=g("template_replace_values"),G=g("jtemplates"),Q=g("template_cdate_format"),A=g("template_mdate_format"),X=g("content_style"),ee=g("content_css_cors"),te=g("body_class"),v=(t,e)=>{if(t=""+t,t.length<e)for(let n=0;n<e-t.length;n++)t="0"+t;return t},S=(t,e,n=new Date)=>{const s="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" ");return e=e.replace("%D","%m/%d/%Y"),e=e.replace("%r","%I:%M:%S %p"),e=e.replace("%Y",""+n.getFullYear()),e=e.replace("%y",""+n.getYear()),e=e.replace("%m",v(n.getMonth()+1,2)),e=e.replace("%d",v(n.getDate(),2)),e=e.replace("%H",""+v(n.getHours(),2)),e=e.replace("%M",""+v(n.getMinutes(),2)),e=e.replace("%S",""+v(n.getSeconds(),2)),e=e.replace("%I",""+((n.getHours()+11)%12+1)),e=e.replace("%p",n.getHours()<12?"AM":"PM"),e=e.replace("%B",""+t.translate(u[n.getMonth()])),e=e.replace("%b",""+t.translate(l[n.getMonth()])),e=e.replace("%A",""+t.translate(r[n.getDay()])),e=e.replace("%a",""+t.translate(s[n.getDay()])),e=e.replace("%%","%"),e};class o{constructor(e,n){this.tag=e,this.value=n}static some(e){return new o(!0,e)}static none(){return o.singletonNone}fold(e,n){return this.tag?n(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?o.some(e(this.value)):o.none()}bind(e){return this.tag?e(this.value):o.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:o.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return J(e)?o.some(e):o.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}o.singletonNone=new o(!1);const ne=(t,e)=>{for(let n=0,s=t.length;n<s;n++){const r=t[n];if(e(r,n))return!0}return!1},se=(t,e)=>{const n=t.length,s=new Array(n);for(let r=0;r<n;r++){const l=t[r];s[r]=e(l,r)}return s},ae=(t,e,n)=>{for(let s=0,r=t.length;s<r;s++){const l=t[s];if(e(l,s))return o.some(l);if(n(l,s))break}return o.none()},re=(t,e)=>ae(t,e,K),le=Object.hasOwnProperty,oe=(t,e)=>ce(t,e)?o.from(t[e]):o.none(),ce=(t,e)=>le.call(t,e);var ie=tinymce.util.Tools.resolve("tinymce.html.Serializer");const ue={'"':""","<":"<",">":">","&":"&","'":"'"},pe=t=>t.replace(/["'<>&]/g,e=>oe(ue,e).getOr(e)),T=(t,e,n)=>ne(n.split(/\s+/),s=>t.hasClass(e,s)),P=(t,e)=>ie({validate:!0},t.schema).serialize(t.parser.parse(e,{insert:!0})),ge=(t,e)=>()=>{const n=G(t);b(n)?n(e):w(n)?fetch(n).then(s=>{s.ok&&s.json().then(e)}):e(n)},I=(t,e)=>(y.each(e,(n,s)=>{b(n)&&(n=n(s)),t=t.replace(new RegExp("\\{\\$"+V(s)+"\\}","g"),n)}),t),O=(t,e)=>{const n=t.dom,s=D(t);y.each(n.select("*",e),r=>{y.each(s,(l,u)=>{n.hasClass(r,u)&&b(l)&&l(r)})})},me=(t,e,n)=>{const s=t.dom,r=t.selection.getContent();n=I(n,D(t));let l=s.create("div",{},P(t,n));const u=s.select(".mceTmpl",l);u&&u.length>0&&(l=s.create("div"),l.appendChild(u[0].cloneNode(!0))),y.each(s.select("*",l),p=>{T(s,p,W(t))&&(p.innerHTML=S(t,Q(t))),T(s,p,x(t))&&(p.innerHTML=S(t,A(t))),T(s,p,q(t))&&(p.innerHTML=r)}),O(t,l),t.execCommand("mceInsertContent",!1,l.innerHTML),t.addVisual()};var j=tinymce.util.Tools.resolve("tinymce.Env");const he=(t,e)=>{var n;if(e.indexOf("<html>")===-1){let s="";const r=(n=X(t))!==null&&n!==void 0?n:"",l=ee(t)?' crossorigin="anonymous"':"";y.each(t.contentCSS,c=>{s+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(c)+'"'+l+">"}),r&&(s+='<style type="text/css">'+r+"</style>");const u=te(t),p=t.dom.encode,_='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(j.os.isMacOS()||j.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",M=t.getBody().dir,a=M?' dir="'+p(M)+'"':"";e='<!DOCTYPE html><html><head><base href="'+p(t.documentBaseURI.getURI())+'">'+s+_+'</head><body class="'+p(u)+'"'+a+">"+P(t,e)+"</body></html>"}return I(e,Z(t))},de=(t,e)=>{const n=()=>{if(!e||e.length===0){const a=t.translate("No templates defined.");return t.notificationManager.open({text:a,type:"info"}),o.none()}return o.from(y.map(e,(a,c)=>{const i=h=>h.url!==void 0;return{selected:c===0,text:a.title,value:{url:i(a)?o.from(a.url):o.none(),content:i(a)?o.none():o.from(a.content),description:a.description}}}))},s=a=>se(a,c=>({text:c.text,value:c.text})),r=(a,c)=>re(a,i=>i.text===c),l=a=>{t.windowManager.alert("Could not load the specified template.",()=>a.focus("template"))},u=a=>a.value.url.fold(()=>Promise.resolve(a.value.content.getOr("")),c=>fetch(c).then(i=>i.ok?i.text():Promise.reject())),p=(a,c)=>(i,h)=>{if(h.name==="template"){const d=i.getData().template;r(a,d).each(m=>{i.block("Loading..."),u(m).then(f=>{c(i,m,f)}).catch(()=>{c(i,m,""),i.setEnabled("save",!1),l(i)})})}},N=a=>c=>{const i=c.getData();r(a,i.template).each(h=>{u(h).then(d=>{t.execCommand("mceInsertTemplate",!1,d),c.close()}).catch(()=>{c.setEnabled("save",!1),l(c)})})},_=a=>{const c=s(a),i=(m,f)=>({title:"Insert Template",size:"large",body:{type:"panel",items:m},initialData:f,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Insert",primary:!0}],onSubmit:N(a),onChange:p(a,h)}),h=(m,f,Ce)=>{const Se=he(t,Ce),_e=[{type:"selectbox",name:"template",label:"Templates",items:c},{type:"htmlpanel",html:`<p aria-live="polite">${pe(f.value.description)}</p>`},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1,transparent:!1}],Me={template:f.text,preview:Se};m.unblock(),m.redial(i(_e,Me)),m.focus("template")},d=t.windowManager.open(i([],{template:"",preview:""}));d.block("Loading..."),u(a[0]).then(m=>{h(d,a[0],m)}).catch(()=>{h(d,a[0],""),d.setEnabled("save",!1),l(d)})};n().each(_)},ye=t=>e=>{de(t,e)},fe=t=>{t.addCommand("mceInsertTemplate",R(me,t)),t.addCommand("mceTemplate",ge(t,ye(t)))},ve=t=>{t.on("PreProcess",e=>{const n=t.dom,s=A(t);y.each(n.select("div",e.node),r=>{n.hasClass(r,"mceTmpl")&&(y.each(n.select("*",r),l=>{T(n,l,x(t))&&(l.innerHTML=S(t,s))}),O(t,r))})})},be=t=>{const e=()=>t.execCommand("mceTemplate");t.ui.registry.addButton("jtemplate",{icon:"template",tooltip:"Insert template",onAction:e}),t.ui.registry.addMenuItem("jtemplate",{icon:"template",text:"Insert template...",onAction:e})};var Te=()=>{L.add("jtemplate",t=>(z(t),be(t),fe(t),ve(t),{getMetadata:()=>({name:"Template (Joomla)",url:"https://www.joomla.org/"})}))};Te()})(); PK ! �X/�L L plugin.jsnu �[��� /** * TinyMCE version 6.4.0 (2023-03-15) */ (function () { 'use strict'; var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager'); const hasProto = (v, constructor, predicate) => { var _a; if (predicate(v, constructor.prototype)) { return true; } else { return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; } }; const typeOf = x => { const t = typeof x; if (x === null) { return 'null'; } else if (t === 'object' && Array.isArray(x)) { return 'array'; } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { return 'string'; } else { return t; } }; const isType = type => value => typeOf(value) === type; const isSimpleType = type => value => typeof value === type; const isString = isType('string'); const isObject = isType('object'); const isArray = isType('array'); const isNullable = a => a === null || a === undefined; const isNonNullable = a => !isNullable(a); const isFunction = isSimpleType('function'); const isArrayOf = (value, pred) => { if (isArray(value)) { for (let i = 0, len = value.length; i < len; ++i) { if (!pred(value[i])) { return false; } } return true; } return false; }; const constant = value => { return () => { return value; }; }; function curry(fn, ...initialArgs) { return (...restArgs) => { const all = initialArgs.concat(restArgs); return fn.apply(null, all); }; } const never = constant(false); const escape = text => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools'); const option = name => editor => editor.options.get(name); const register$2 = editor => { const registerOption = editor.options.register; registerOption('template_cdate_classes', { processor: 'string', default: 'cdate' }); registerOption('template_mdate_classes', { processor: 'string', default: 'mdate' }); registerOption('template_selected_content_classes', { processor: 'string', default: 'selcontent' }); registerOption('template_preview_replace_values', { processor: 'object' }); registerOption('template_replace_values', { processor: 'object' }); registerOption('jtemplates', { processor: value => isString(value) || isArrayOf(value, isObject) || isFunction(value), default: [] }); registerOption('template_cdate_format', { processor: 'string', default: editor.translate('%Y-%m-%d') }); registerOption('template_mdate_format', { processor: 'string', default: editor.translate('%Y-%m-%d') }); }; const getCreationDateClasses = option('template_cdate_classes'); const getModificationDateClasses = option('template_mdate_classes'); const getSelectedContentClasses = option('template_selected_content_classes'); const getPreviewReplaceValues = option('template_preview_replace_values'); const getTemplateReplaceValues = option('template_replace_values'); const getTemplates = option('jtemplates'); const getCdateFormat = option('template_cdate_format'); const getMdateFormat = option('template_mdate_format'); const getContentStyle = option('content_style'); const shouldUseContentCssCors = option('content_css_cors'); const getBodyClass = option('body_class'); const addZeros = (value, len) => { value = '' + value; if (value.length < len) { for (let i = 0; i < len - value.length; i++) { value = '0' + value; } } return value; }; const getDateTime = (editor, fmt, date = new Date()) => { const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' '); const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' '); const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '); const monthsLong = 'January February March April May June July August September October November December'.split(' '); fmt = fmt.replace('%D', '%m/%d/%Y'); fmt = fmt.replace('%r', '%I:%M:%S %p'); fmt = fmt.replace('%Y', '' + date.getFullYear()); fmt = fmt.replace('%y', '' + date.getYear()); fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2)); fmt = fmt.replace('%d', addZeros(date.getDate(), 2)); fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2)); fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2)); fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2)); fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1)); fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM')); fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()])); fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()])); fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()])); fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()])); fmt = fmt.replace('%%', '%'); return fmt; }; class Optional { constructor(tag, value) { this.tag = tag; this.value = value; } static some(value) { return new Optional(true, value); } static none() { return Optional.singletonNone; } fold(onNone, onSome) { if (this.tag) { return onSome(this.value); } else { return onNone(); } } isSome() { return this.tag; } isNone() { return !this.tag; } map(mapper) { if (this.tag) { return Optional.some(mapper(this.value)); } else { return Optional.none(); } } bind(binder) { if (this.tag) { return binder(this.value); } else { return Optional.none(); } } exists(predicate) { return this.tag && predicate(this.value); } forall(predicate) { return !this.tag || predicate(this.value); } filter(predicate) { if (!this.tag || predicate(this.value)) { return this; } else { return Optional.none(); } } getOr(replacement) { return this.tag ? this.value : replacement; } or(replacement) { return this.tag ? this : replacement; } getOrThunk(thunk) { return this.tag ? this.value : thunk(); } orThunk(thunk) { return this.tag ? this : thunk(); } getOrDie(message) { if (!this.tag) { throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); } else { return this.value; } } static from(value) { return isNonNullable(value) ? Optional.some(value) : Optional.none(); } getOrNull() { return this.tag ? this.value : null; } getOrUndefined() { return this.value; } each(worker) { if (this.tag) { worker(this.value); } } toArray() { return this.tag ? [this.value] : []; } toString() { return this.tag ? `some(${ this.value })` : 'none()'; } } Optional.singletonNone = new Optional(false); const exists = (xs, pred) => { for (let i = 0, len = xs.length; i < len; i++) { const x = xs[i]; if (pred(x, i)) { return true; } } return false; }; const map = (xs, f) => { const len = xs.length; const r = new Array(len); for (let i = 0; i < len; i++) { const x = xs[i]; r[i] = f(x, i); } return r; }; const findUntil = (xs, pred, until) => { for (let i = 0, len = xs.length; i < len; i++) { const x = xs[i]; if (pred(x, i)) { return Optional.some(x); } else if (until(x, i)) { break; } } return Optional.none(); }; const find = (xs, pred) => { return findUntil(xs, pred, never); }; const hasOwnProperty = Object.hasOwnProperty; const get = (obj, key) => { return has(obj, key) ? Optional.from(obj[key]) : Optional.none(); }; const has = (obj, key) => hasOwnProperty.call(obj, key); var global$1 = tinymce.util.Tools.resolve('tinymce.html.Serializer'); const entitiesAttr = { '"': '"', '<': '<', '>': '>', '&': '&', '\'': ''' }; const htmlEscape = html => html.replace(/["'<>&]/g, match => get(entitiesAttr, match).getOr(match)); const hasAnyClasses = (dom, n, classes) => exists(classes.split(/\s+/), c => dom.hasClass(n, c)); const parseAndSerialize = (editor, html) => global$1({ validate: true }, editor.schema).serialize(editor.parser.parse(html, { insert: true })); const createTemplateList = (editor, callback) => { return () => { const templateList = getTemplates(editor); if (isFunction(templateList)) { templateList(callback); } else if (isString(templateList)) { fetch(templateList).then(res => { if (res.ok) { res.json().then(callback); } }); } else { callback(templateList); } }; }; const replaceTemplateValues = (html, templateValues) => { global$2.each(templateValues, (v, k) => { if (isFunction(v)) { v = v(k); } html = html.replace(new RegExp('\\{\\$' + escape(k) + '\\}', 'g'), v); }); return html; }; const replaceVals = (editor, scope) => { const dom = editor.dom, vl = getTemplateReplaceValues(editor); global$2.each(dom.select('*', scope), e => { global$2.each(vl, (v, k) => { if (dom.hasClass(e, k)) { if (isFunction(v)) { v(e); } } }); }); }; const insertTemplate = (editor, _ui, html) => { const dom = editor.dom; const sel = editor.selection.getContent(); html = replaceTemplateValues(html, getTemplateReplaceValues(editor)); let el = dom.create('div', {}, parseAndSerialize(editor, html)); const n = dom.select('.mceTmpl', el); if (n && n.length > 0) { el = dom.create('div'); el.appendChild(n[0].cloneNode(true)); } global$2.each(dom.select('*', el), n => { if (hasAnyClasses(dom, n, getCreationDateClasses(editor))) { n.innerHTML = getDateTime(editor, getCdateFormat(editor)); } if (hasAnyClasses(dom, n, getModificationDateClasses(editor))) { n.innerHTML = getDateTime(editor, getMdateFormat(editor)); } if (hasAnyClasses(dom, n, getSelectedContentClasses(editor))) { n.innerHTML = sel; } }); replaceVals(editor, el); editor.execCommand('mceInsertContent', false, el.innerHTML); editor.addVisual(); }; var global = tinymce.util.Tools.resolve('tinymce.Env'); const getPreviewContent = (editor, html) => { var _a; if (html.indexOf('<html>') === -1) { let contentCssEntries = ''; const contentStyle = (_a = getContentStyle(editor)) !== null && _a !== void 0 ? _a : ''; const cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : ''; global$2.each(editor.contentCSS, url => { contentCssEntries += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '"' + cors + '>'; }); if (contentStyle) { contentCssEntries += '<style type="text/css">' + contentStyle + '</style>'; } const bodyClass = getBodyClass(editor); const encode = editor.dom.encode; const isMetaKeyPressed = global.os.isMacOS() || global.os.isiOS() ? 'e.metaKey' : 'e.ctrlKey && !e.altKey'; const preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> '; const directionality = editor.getBody().dir; const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; html = '<!DOCTYPE html>' + '<html>' + '<head>' + '<base href="' + encode(editor.documentBaseURI.getURI()) + '">' + contentCssEntries + preventClicksOnLinksScript + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + parseAndSerialize(editor, html) + '</body>' + '</html>'; } return replaceTemplateValues(html, getPreviewReplaceValues(editor)); }; const open = (editor, templateList) => { const createTemplates = () => { if (!templateList || templateList.length === 0) { const message = editor.translate('No templates defined.'); editor.notificationManager.open({ text: message, type: 'info' }); return Optional.none(); } return Optional.from(global$2.map(templateList, (template, index) => { const isUrlTemplate = t => t.url !== undefined; return { selected: index === 0, text: template.title, value: { url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(), content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(), description: template.description } }; })); }; const createSelectBoxItems = templates => map(templates, t => ({ text: t.text, value: t.text })); const findTemplate = (templates, templateTitle) => find(templates, t => t.text === templateTitle); const loadFailedAlert = api => { editor.windowManager.alert('Could not load the specified template.', () => api.focus('template')); }; const getTemplateContent = t => t.value.url.fold(() => Promise.resolve(t.value.content.getOr('')), url => fetch(url).then(res => res.ok ? res.text() : Promise.reject())); const onChange = (templates, updateDialog) => (api, change) => { if (change.name === 'template') { const newTemplateTitle = api.getData().template; findTemplate(templates, newTemplateTitle).each(t => { api.block('Loading...'); getTemplateContent(t).then(previewHtml => { updateDialog(api, t, previewHtml); }).catch(() => { updateDialog(api, t, ''); api.setEnabled('save', false); loadFailedAlert(api); }); }); } }; const onSubmit = templates => api => { const data = api.getData(); findTemplate(templates, data.template).each(t => { getTemplateContent(t).then(previewHtml => { editor.execCommand('mceInsertTemplate', false, previewHtml); api.close(); }).catch(() => { api.setEnabled('save', false); loadFailedAlert(api); }); }); }; const openDialog = templates => { const selectBoxItems = createSelectBoxItems(templates); const buildDialogSpec = (bodyItems, initialData) => ({ title: 'Insert Template', size: 'large', body: { type: 'panel', items: bodyItems }, initialData, buttons: [ { type: 'cancel', name: 'cancel', text: 'Cancel' }, { type: 'submit', name: 'save', text: 'Insert', primary: true } ], onSubmit: onSubmit(templates), onChange: onChange(templates, updateDialog) }); const updateDialog = (dialogApi, template, previewHtml) => { const content = getPreviewContent(editor, previewHtml); const bodyItems = [ { type: 'selectbox', name: 'template', label: 'Templates', items: selectBoxItems }, { type: 'htmlpanel', html: `<p aria-live="polite">${ htmlEscape(template.value.description) }</p>` }, { label: 'Preview', type: 'iframe', name: 'preview', sandboxed: false, transparent: false } ]; const initialData = { template: template.text, preview: content }; dialogApi.unblock(); dialogApi.redial(buildDialogSpec(bodyItems, initialData)); dialogApi.focus('template'); }; const dialogApi = editor.windowManager.open(buildDialogSpec([], { template: '', preview: '' })); dialogApi.block('Loading...'); getTemplateContent(templates[0]).then(previewHtml => { updateDialog(dialogApi, templates[0], previewHtml); }).catch(() => { updateDialog(dialogApi, templates[0], ''); dialogApi.setEnabled('save', false); loadFailedAlert(dialogApi); }); }; const optTemplates = createTemplates(); optTemplates.each(openDialog); }; const showDialog = editor => templates => { open(editor, templates); }; const register$1 = editor => { editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor)); editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor))); }; const setup = editor => { editor.on('PreProcess', o => { const dom = editor.dom, dateFormat = getMdateFormat(editor); global$2.each(dom.select('div', o.node), e => { if (dom.hasClass(e, 'mceTmpl')) { global$2.each(dom.select('*', e), e => { if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) { e.innerHTML = getDateTime(editor, dateFormat); } }); replaceVals(editor, e); } }); }); }; const register = editor => { const onAction = () => editor.execCommand('mceTemplate'); editor.ui.registry.addButton('jtemplate', { icon: 'template', tooltip: 'Insert template', onAction }); editor.ui.registry.addMenuItem('jtemplate', { icon: 'template', text: 'Insert template...', onAction }); }; var Plugin = () => { global$3.add('jtemplate', editor => { register$2(editor); register(editor); register$1(editor); setup(editor); return { getMetadata: () => ({ name: 'Template (Joomla)', url: 'https://www.joomla.org/' }) } }); }; Plugin(); })(); PK ! � )� � plugin.min.js.gznu �[��� PK ! ��o8� � 8 plugin.min.jsnu �[��� PK ! �X/�L L \/ plugin.jsnu �[��� PK � �{
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка