fuck-tiny-cloud/tinymce.min.js

60 lines
445 KiB
JavaScript
Raw Normal View History

/*!
* TinyMCE
*
2024-03-21 17:16:22 -04:00
* Copyright (c) 2024 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*
2024-03-21 17:16:22 -04:00
* Version: 7.0.0
2023-10-09 16:16:12 -04:00
*/
2024-03-21 17:16:22 -04:00
!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},n=t((function(e,t){return e===t})),o=function(e){return t((function(t,n){if(t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e.eq(t[r],n[r]))return!1;return!0}))},r=function(e){return t((function(r,s){var a=Object.keys(r),i=Object.keys(s);if(!function(e,n){return function(e,n){return t((function(t,o){return e.eq(n(t),n(o))}))}(o(e),(function(e){return function(e,t){return Array.prototype.slice.call(e).sort(t)}(e,n)}))}(n).eq(a,i))return!1;for(var l=a.length,d=0;d<l;d++){var c=a[d];if(!e.eq(r[c],s[c]))return!1}return!0}))},s=t((function(t,n){if(t===n)return!0;var a=e(t);return a===e(n)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(a)?t===n:"array"===a?o(s).eq(t,n):"object"===a&&r(s).eq(t,n))}));const a=Object.getPrototypeOf,i=(e,t,n)=>{var o;return!!n(e,t.prototype)||(null===(o=e.constructor)||void 0===o?void 0:o.name)===t.name},l=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&i(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,d=e=>t=>typeof t===e,c=e=>t=>e===t,u=(e,t)=>f(e)&&i(e,t,((e,t)=>a(e)===t)),m=l("string"),f=l("object"),g=e=>u(e,Object),p=l("array"),h=c(null),b=d("boolean"),v=c(void 0),y=e=>null==e,C=e=>!y(e),w=d("function"),x=d("number"),E=(e,t)=>{if(p(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},k=()=>{},_=(e,t)=>(...n)=>e(t.apply(null,n)),S=(e,t)=>n=>e(t(n)),N=e=>()=>e,R=e=>e,A=(e,t)=>e===t;function T(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const O=e=>t=>!e(t),B=e=>()=>{throw new Error(e)},P=e=>e(),D=e=>{e()},L=N(!1),M=N(!0);class I{constructor(e,t){this.tag=e,this.value=t}static some(e){return new I(!0,e)}static none(){return I.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?I.some(e(this.value)):I.none()}bind(e){return this.tag?e(this.value):I.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:I.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(null!=e?e:"Called getOrDie on None")}static from(e){return C(e)?I.some(e):I.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()"}}I.singletonNone=new I(!1);const F=Array.prototype.slice,U=Array.prototype.indexOf,z=Array.prototype.push,j=(e,t)=>U.call(e,t),H=(e,t)=>j(e,t)>-1,$=(e,t)=>{for(let n=0,o=e.length;n<o;n++)if(t(e[n],n))return!0;return!1},V=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},q=(e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)},W=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},K=(e,t)=>{const n=[],o=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];(t(s,r)?n:o).push(s)}return{pass:n,fail:o}},Y=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},G=(e,t,n)=>(W(e,((e,o)=>{n=t(n,e,o)})),n),X=(e,t,n)=>(q(e,((e,o)=>{n=t(n,e,o)})),n),Z=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return I.some(r);if(n(r,o))break}return I.none()},Q=(e,t)=>Z(e,t,L),J=(e,t)=>{for(let n=0,o=e.length;n<o;n++)if(t(e[n],n))return I.some(n);return I.none()},ee=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!p(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);z.apply(t,e[n])}return t},te=(e,t)=>ee(V(e,t)),ne=(e,t)=>{for(
/* Ephox Fluffy plugin
*
* Copyright 2010-2016 Ephox Corporation. All rights reserved.
*
2024-03-21 17:16:22 -04:00
* Version: 2.9.0-18
*/
2024-03-21 17:16:22 -04:00
!function(){"use strict";function n(r){return function(n){return t=typeof(n=n),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var t}}function t(n,t){return{isRequired:n,applyPatch:t}}function u(e,o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=o.apply(this,n),r=v(r)?n:r;return e.apply(this,r)}}function r(){return d}function i(n,t){for(var r=0,e=n.length;r<e;r++)t(n[r],r)}function e(n,t){for(var r=function(n,t){for(var r=n.length,e=new Array(r),o=0;o<r;o++){var i=n[o];e[o]=t(i,o)}return e}(n,t),e=[],o=0,i=r.length;o<i;++o){if(!g(r[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+r);L.apply(e,r[o])}return e}function a(r){return function(n,t){r[t]=n}}function o(c){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var r,e,o={},i=0;i<n.length;i++){var u,a=n[i];for(u in a)r=a,e=u,k.call(r,e)&&(o[u]=c(o[u],a[u]))}return o}}function c(n){var t;return null!=(t=n.defaultOptions)?t:n.defaultSettings}function f(n,t){var n=E(n,t),r=x(t.plugins),e=n.custom_plugin_urls||{},e=q(e,function(n,t){return U(r,t)}),n=n.external_plugins||{},o={},e=(b(e.t,function(n,t){o[t]=n}),M(o,n)),n=0===w(e).length?{}:{external_plugins:e};return M(t,n)}var l,s,d,p=n("object"),g=n("array"),v=(l=void 0,function(n){return l===n}),y=(s="function",function(n){return typeof n===s}),m="undefined"!=typeof window?window:Function("return this;")(),h=(d=!0,Array.prototype.indexOf),L=Array.prototype.push,U=function(n,t){return-1<h.call(n,t)},w=Object.keys,k=Object.hasOwnProperty,b=function(n,t){for(var r=w(n),e=0,o=r.length;e<o;e++){var i=r[e];t(n[i],i)}},q=function(n,t){var r,e,o,i={},u={};return r=t,e=a(i),o=a(u),b(n,function(n,t){(r(n,t)?e:o)(n,t)}),{t:i,f:u}},E=o(function(n,t){return p(n)&&p(t)?E(n,t):t}),M=o(function(n,t){return t}),x=function(n){if(v(n)||""===n)return[];n=g(n)?e(n,function(n){return n.split(/[\s+,]/)}):n.split(/[\s+,]/);return e(n,function(n){return 0<n.length?[n.trim()]:[]})},V=t(r,function(r){var n=r.EditorManager;n.init=u(n.init,function(n){return[f(c(r),n)]}),n.createEditor=u(n.createEditor,function(n,t){return[n,f(c(r),t)]})});function A(n,t,r){if(r||2===arguments.length)for(var e,o=0,i=t.length;o<i;o++)!e&&o in t||((e=e||Array.prototype.slice.call(t,0,o))[o]=t[o]);return n.concat(e||Array.prototype.slice.call(t))}function j(n){return parseInt(n,10)}function S(n,t){return 0==(n-=t)?0:0<n?1:-1}function O(n,t,r){return{major:n,minor:t,patch:r}}function I(e,o){return function(n){var t=x(n.plugins),r=G(o),r=0<r.length?t.concat(r):t;return[e.util.Tools.extend({},n,{plugins:r})]}}function _(n,t){D(t,".tox-notifications-container","block"),C(n,"6.0.0")&&D(t,".tox-notification","-ms-grid"),D(t,".tox-notification","grid"),D(t,".mce-notification","block")}function P(){return(new Date).getTime()}function z(r){return function(){n="position";var n,t=(((t=r).currentStyle||window.getComputedStyle(t,null))[n]||"").toLowerCase();return"absolute"===t||"fixed"===t}}function R(n){n.parentNode.removeChild(n)}function B(n){var t=n,r=[J,K,Y,Z,H,V];if(t)for(var e=0;e<r.length;e++)r[e].isRequired(t)&&r[e].applyPatch(t)}var N=function(n){n=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(n);return n?O(j(n[1]),j(n[2]),j(n[3])):O(0,0,0)},F=function(n,t){var r=S(n.major,t.major);if(0!==r)return r;r=S(n.minor,t.minor);if(0!==r)return r;r=S(n.patch,t.patch);return 0!==r?r:0},$=function(n){return N([n.majorVersion,n.minorVersion].join(".").split(".").slice(0,3).join("."))},C=function(n,t){return!!n&&-1===F($(n),N(t))},G=function(n){n=c(n).forced_plugins;return n||[]},H=t(function(n){return C(n,"4.7.0")},function(n){var r=n,e=r.EditorManager;e.init=u(e.init,I(r,e)),e.createEditor=u(e.createEditor,function(n,t){return A([n],I(r,e)(t),!0)})}),T="readonly",J=t(r,function(r){Object.defineProperty(r,"forceReadOnly",{value:function(){r.on("AddEditor",func
2024-03-21 17:16:22 -04:00
(function tcsl(cloudSettings, consoleMessage, forceReadOnly) {
var entryUrl =
document.currentScript != null &&
typeof document.currentScript.src === "string"
? document.currentScript.src
: null;
var origin = window.location.origin;
function emitConsoleMessage(msg) {
console.warn(
msg +
"\n\n↓↓↓↓↓ ATTENTION ADMINS ↓↓↓↓↓" +
"\nPlease include these details in Tiny Cloud support requests." +
"\nResolved API key: " + cloudSettings['api_key'] +
"\nEditor read-only?: " + (forceReadOnly ? "yes" : "no") +
"\nOrigin: " + origin +
"\nTiny Cloud entry URL: " + entryUrl +
"\n↑↑↑↑↑ ---------------- ↑↑↑↑↑"
);
}
if (forceReadOnly) {
tinymce.forceReadOnly();
console.error('All created TinyMCE editors are configured to be read-only.');
}
if (consoleMessage != "") {
emitConsoleMessage(consoleMessage)
}
cloudSettings["tiny_cloud_entry_url"] = entryUrl;
tinymce.overrideDefaults(cloudSettings);
})({"rtc_tenant_id":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","editimage_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","imagetools_proxy":"https://imageproxy.tiny.cloud/2/image","autocorrect_service_url":"https://spelling.tiny.cloud","suffix":".min","linkchecker_service_url":"https://hyperlinking.tiny.cloud","spellchecker_rpc_url":"https://spelling.tiny.cloud","spellchecker_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","tinydrive_service_url":"https://catalog.tiny.cloud","api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","imagetools_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","tinydrive_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","export_image_proxy_service_url":"https://imageproxy.tiny.cloud","forced_plugins":["chiffer"],"referrer_policy":"origin","content_css_cors":true,"custom_plugin_urls":{},"chiffer_snowplow_service_url":"https://sp.tinymce.com/i","mediaembed_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","promotion":false,"rtc_service_url":"https://rtc.tiny.cloud","editimage_proxy_service_url":"https://imageproxy.tiny.cloud","linkchecker_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","chiffer_cdp_init_service_url":"https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/7.0.0-23/cdn-init","mediaembed_service_url":"https://hyperlinking.tiny.cloud"}, "", false);
tinymce.baseURL = "https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/7.0.0-23"
/*!
* Tiny Chiffer plugin
*
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*
2024-03-21 17:16:22 -04:00
* Version: 3.3.0-25
*/
2024-03-21 17:16:22 -04:00
!function(){"use strict";function n(t){return function(n){return e=typeof(n=n),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===t;var e}}function e(e){return function(n){return typeof n===e}}function a(n){return!(null==n)}function o(){}function i(n){return function(){return n}}function t(n){return n}var r,s=n("string"),l=n("object"),c=e("boolean"),u=function(n){return r===n},f=e("function"),V=e("number"),d=i(!1),p=i(!(r=void 0)),m=function(){return(m=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function g(n,e,t){if(t||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return n.concat(r||Array.prototype.slice.call(e))}function y(){return v}var N=function(n){n=n.chiffer_cdp_init_service_url;return s(n)?n:void 0},v={fold:function(n,e){return n()},isSome:d,isNone:p,getOr:t,getOrThunk:h,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:h,map:y,each:o,bind:y,exists:d,forall:p,filter:function(){return v},toArray:function(){return[]},toString:i("none()")};function h(n){return n()}function w(t){function n(){return o}function e(n){return n(t)}var r=i(t),o={fold:function(n,e){return e(t)},isSome:p,isNone:d,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return w(n(t))},each:function(n){n(t)},bind:e,exists:e,forall:e,filter:function(n){return n(t)?o:v},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o}function z(n,t,r,o){for(var e=n,i=function(n,e){(t(n,e)?r:o)(n,e)},c=U(e),a=0,u=c.length;a<u;a++){var s=c[a];i(e[s],s)}}function b(n,e){var t,r={};return z(n,e,(t=r,function(n,e){t[e]=n}),o),r}function C(){return(new Date).getTime()}function _(n){return parseInt(n,10)}function M(n,e,t){return{major:n,minor:e,patch:t}}function H(n){return ln(n.editorManager)}function K(n,e){return-1<dn.call(n,e)}function k(i,c){return function(n){var e=n.options,t=c.processor,r=c.legacyProcessor,o=c.defaultValue;return(a(e)?(e.isSet(i)?E.from(e.get(i)):E.none()).bind(t):r(n.getParam(i))).getOr(o)}}function W(n){return yn(n,"/")}function L(e){return function(n){return e(n)?E.some(n):E.none()}}function S(n){return R(n).filter((e=W,function(n){return!e(n)}));var e}function O(n){return s(n)?E.some(n):c(n)||V(n)?E.some(n.toString()):E.none()}function J(n){return n=n.plugins,n=b(n,function(n,e){var t=K(mn,e),n=!!n.isStub;return!!e&&!n&&!("chiffer"===e)&&t}),0<(n=U(n)).length?n:void 0}function Z(n,e){var t,r,o=tinymce.Env,i=sn(),c="unknown",e=function(n){n=n.tiny_cloud_entry_url;return s(n)?n:void 0}(e),o=(l(o.os)&&(t={name:o.os.current||c,version:null==(t=o.os.version)?void 0:t.major.toString()}),l(o.os)&&(r={name:o.browser.current||c,version:null==(c=o.browser.version)?void 0:c.major.toString()}),null==i?void 0:i.timeZone),c=null==i?void 0:i.locale,i={width:window.innerWidth,height:window.innerHeight,density:window.devicePixelRatio},a=navigator.userAgent,u=function(){var n;try{return null==(n=navigator.userAgentData)?void 0:n.toJSON()}catch(n){}}();return m(m({},n),{browser:r,os:t,timezone:o,locale:c,screen:i,userAgent:a,userAgentData:u,tinyCloudEntryUrl:e})}function q(n,e){var t=function(n){n=H(n);return"".concat(n.major,".").concat(n.minor,".").concat(n.patch)}(n),r=gn.getIdForEditor(n);return{apiKey:e.apiKey,pageId:e.pageId,editorId:r,editorVersion:t,editorOptions:function(n){var e,t,r,o,i,c,a,u,s,l,f;if(!fn(n))return e=vn(n),t=Sn(n),r=hn(n),o=wn(n),i=bn(n),c=kn(n),a=_n(n),u=xn(n),s=On(n),l=In(n),f=Pn(n),{plugins:J(n),icons:i,inline:e,language:t,readonly:r,resize:o,skin:c,theme:a,height:u,toolbarMode:s,toolbarLocation:l,uiMode:f}}(n)}}function B(n){return"plugin_".concat(n,"_loaded")}var G,Q,I,X,P,Y,x,$,j,nn,T,A,E={some:w,n