merge #2843 with minor tweaks

This commit is contained in:
Hakim El Hattab committed 2021-05-05 11:02:02 +02:00
commit 892c752a4b
6 files changed
+74 -54

No files matched your search

+3
View File
@@ -458,6 +458,9 @@ Reveal.on( 'customevent', function() {
<script src="plugin/highlight/highlight.js"></script> <script src="plugin/highlight/highlight.js"></script>
<script> <script>
console.time( 'print' )
Reveal.addEventListener( 'pdf-ready', () => console.timeEnd( 'print' ) );
// Also available as an ES module, see: // Also available as an ES module, see:
// https://revealjs.com/initialization/ // https://revealjs.com/initialization/
Reveal.initialize({ Reveal.initialize({
+1 -1
View File
@@ -5,5 +5,5 @@
* *
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se * Copyright (C) 2020 Hakim El Hattab, https://hakim.se
*/ */
const e=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,t=/fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var s=function(e){return e&&e.Math==Math&&e},r=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i&&i)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},l=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u={f:c&&!d.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:d},h=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,v=function(e){return g.call(e).slice(8,-1)},p="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==v(e)?p.call(e,""):Object(e)}:Object,m=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return f(m(e))},y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},w=function(e,t){if(!y(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!y(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!y(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!y(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},E={}.hasOwnProperty,S=function(e,t){return E.call(e,t)},R=r.document,A=y(R)&&y(R.createElement),k=!l&&!o((function(){return 7!=Object.defineProperty((e="div",A?R.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),x=Object.getOwnPropertyDescriptor,L={f:l?x:function(e,t){if(e=b(e),t=w(t,!0),k)try{return x(e,t)}catch(e){}if(S(e,t))return h(!u.f.call(e,t),e[t])}},C=function(e){if(!y(e))throw TypeError(String(e)+" is not an object");return e},P=Object.defineProperty,N={f:l?P:function(e,t,i){if(C(e),t=w(t,!0),C(i),k)try{return P(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},M=l?function(e,t,i){return N.f(e,t,h(1,i))}:function(e,t,i){return e[t]=i,e},I=function(e,t){try{M(r,e,t)}catch(i){r[e]=t}return t},D=r["__core-js_shared__"]||I("__core-js_shared__",{}),T=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(e){return T.call(e)});var O,z,H,B,U=D.inspectSource,F=r.WeakMap,q="function"==typeof F&&/native code/.test(U(F)),W=a((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j=0,$=Math.random(),V=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++j+$).toString(36)},K=W("keys"),_={},X=r.WeakMap;if(q){var Y=D.state||(D.state=new X),G=Y.get,J=Y.has,Q=Y.set;O=function(e,t){return t.facade=e,Q.call(Y,e,t),t},z=function(e){return G.call(Y,e)||{}},H=function(e){return J.call(Y,e)}}else{var Z=K[B="state"]||(K[B]=V(B));_[Z]=!0,O=function(e,t){return t.facade=e,M(e,Z,t),t},z=function(e){return S(e,Z)?e[Z]:{}},H=function(e){return S(e,Z)}}var ee={set:O,get:z,has:H,enforce:function(e){return H(e)?z(e):O(e,{})},getterFor:function(e){return function(t){var i;if(!y(t)||(i=z(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},te=a((function(e){var t=ee.get,i=ee.enforce,n=String(String).split("String");(e.exports=function(e,t,a,s){var o,l=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof a&&("string"!=typeof t||S(a,"name")||M(a,"name",t),(o=i(a)).source||(o.source=n.join("string"==typeof t?t:""))),e!==r?(l?!c&&e[t]&&(d=!0):delete e[t],d?e[t]=a:M(e,t,a)):d?e[t]=a:I(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||U(this)}))})),ie=r,ne=function(e){return"function"==typeof e?e:void 0},ae=Math.ceil,se=Math.floor,re=function(e){return isNaN(e=+e)?0:(e>0?se:ae)(e)},oe=Math.min,le=function(e){return e>0?oe(re(e),9007199254740991):0},de=Math.max,ce=Math.min,ue=function(e){return function(t,i,n){var a,s=b(t),r=le(s.length),o=function(e,t){var i=re(e);return i<0?de(i+t,0):ce(i,t)}(n,r);if(e&&i!=i){for(;r>o;)if((a=s[o++])!=a)return!0}else for(;r>o;o++)if((e||o in s)&&s[o]===i)return e||o||0;return!e&&-1}},he={includes:ue(!0),indexOf:ue(!1)}.indexOf,ge=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ve={f:OLine truncated const e=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,t=/fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var s=function(e){return e&&e.Math==Math&&e},r=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i&&i)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},l=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u={f:c&&!d.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:d},h=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,v=function(e){return g.call(e).slice(8,-1)},p="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==v(e)?p.call(e,""):Object(e)}:Object,m=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return f(m(e))},y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},w=function(e,t){if(!y(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!y(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!y(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!y(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},E={}.hasOwnProperty,S=function(e,t){return E.call(e,t)},R=r.document,A=y(R)&&y(R.createElement),k=!l&&!o((function(){return 7!=Object.defineProperty((e="div",A?R.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),x=Object.getOwnPropertyDescriptor,L={f:l?x:function(e,t){if(e=b(e),t=w(t,!0),k)try{return x(e,t)}catch(e){}if(S(e,t))return h(!u.f.call(e,t),e[t])}},C=function(e){if(!y(e))throw TypeError(String(e)+" is not an object");return e},P=Object.defineProperty,N={f:l?P:function(e,t,i){if(C(e),t=w(t,!0),C(i),k)try{return P(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},M=l?function(e,t,i){return N.f(e,t,h(1,i))}:function(e,t,i){return e[t]=i,e},I=function(e,t){try{M(r,e,t)}catch(i){r[e]=t}return t},D=r["__core-js_shared__"]||I("__core-js_shared__",{}),T=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(e){return T.call(e)});var O,z,H,U,B=D.inspectSource,q=r.WeakMap,F="function"==typeof q&&/native code/.test(B(q)),W=a((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j=0,$=Math.random(),V=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++j+$).toString(36)},K=W("keys"),_={},X=r.WeakMap;if(F){var Y=D.state||(D.state=new X),G=Y.get,J=Y.has,Q=Y.set;O=function(e,t){return t.facade=e,Q.call(Y,e,t),t},z=function(e){return G.call(Y,e)||{}},H=function(e){return J.call(Y,e)}}else{var Z=K[U="state"]||(K[U]=V(U));_[Z]=!0,O=function(e,t){return t.facade=e,M(e,Z,t),t},z=function(e){return S(e,Z)?e[Z]:{}},H=function(e){return S(e,Z)}}var ee={set:O,get:z,has:H,enforce:function(e){return H(e)?z(e):O(e,{})},getterFor:function(e){return function(t){var i;if(!y(t)||(i=z(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},te=a((function(e){var t=ee.get,i=ee.enforce,n=String(String).split("String");(e.exports=function(e,t,a,s){var o,l=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof a&&("string"!=typeof t||S(a,"name")||M(a,"name",t),(o=i(a)).source||(o.source=n.join("string"==typeof t?t:""))),e!==r?(l?!c&&e[t]&&(d=!0):delete e[t],d?e[t]=a:M(e,t,a)):d?e[t]=a:I(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||B(this)}))})),ie=r,ne=function(e){return"function"==typeof e?e:void 0},ae=Math.ceil,se=Math.floor,re=function(e){return isNaN(e=+e)?0:(e>0?se:ae)(e)},oe=Math.min,le=function(e){return e>0?oe(re(e),9007199254740991):0},de=Math.max,ce=Math.min,ue=function(e){return function(t,i,n){var a,s=b(t),r=le(s.length),o=function(e,t){var i=re(e);return i<0?de(i+t,0):ce(i,t)}(n,r);if(e&&i!=i){for(;r>o;)if((a=s[o++])!=a)return!0}else for(;r>o;o++)if((e||o in s)&&s[o]===i)return e||o||0;return!e&&-1}},he={includes:ue(!0),indexOf:ue(!1)}.indexOf,ge=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ve={f:OLine truncated
//# sourceMappingURL=reveal.esm.js.map //# sourceMappingURL=reveal.esm.js.map
+1 -1
View File
@@ -5,5 +5,5 @@
* *
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se * Copyright (C) 2020 Hakim El Hattab, https://hakim.se
*/ */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Reveal=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},o=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,u={f:l&&!s.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:s},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,h=function(e){return d.call(e).slice(8,-1)},f="".split,v=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?f.call(e,""):Object(e)}:Object,g=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},p=function(e){return v(g(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!m(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(e,t){return b.call(e,t)},S=r.document,E=m(S)&&m(S.createElement),k=function(e){return E?S.createElement(e):{}},A=!o&&!a((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),R=Object.getOwnPropertyDescriptor,x={f:o?R:function(e,t){if(e=p(e),t=y(t,!0),A)try{return R(e,t)}catch(e){}if(w(e,t))return c(!u.f.call(e,t),e[t])}},L=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},C=Object.defineProperty,P={f:o?C:function(e,t,n){if(L(e),t=y(t,!0),L(n),A)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},N=o?function(e,t,n){return P.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},M=function(e,t){try{N(r,e,t)}catch(n){r[e]=t}return t},I="__core-js_shared__",O=r[I]||M(I,{}),T=Function.toString;"function"!=typeof O.inspectSource&&(O.inspectSource=function(e){return T.call(e)});var D,j,z,H=O.inspectSource,F=r.WeakMap,U="function"==typeof F&&/native code/.test(H(F)),B=n((function(e){(e.exports=function(e,t){return O[e]||(O[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),q=0,W=Math.random(),_=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++q+W).toString(36)},V=B("keys"),K=function(e){return V[e]||(V[e]=_(e))},$={},X=r.WeakMap;if(U){var Y=O.state||(O.state=new X),G=Y.get,J=Y.has,Q=Y.set;D=function(e,t){return t.facade=e,Q.call(Y,e,t),t},j=function(e){return G.call(Y,e)||{}},z=function(e){return J.call(Y,e)}}else{var Z=K("state");$[Z]=!0,D=function(e,t){return t.facade=e,N(e,Z,t),t},j=function(e){return w(e,Z)?e[Z]:{}},z=function(e){return w(e,Z)}}var ee,te,ne={set:D,get:j,has:z,enforce:function(e){return z(e)?j(e):D(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=j(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ie=n((function(e){var t=ne.get,n=ne.enforce,i=String(String).split("String");(e.exports=function(e,t,a,o){var s,l=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||w(a,"name")||N(a,"name",t),(s=n(a)).source||(s.source=i.join("string"==typeof t?t:""))),e!==r?(l?!c&&e[t]&&(u=!0):delete e[t],u?e[t]=a:N(e,t,a)):u?e[t]=a:M(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||H(this)}))})),re=r,ae=function(e){return"function"==typeof e?e:void 0},oe=function(e,t){return arguments.length<2?ae(re[e])||ae(r[e]):re[e]&&re[e][t]||r[e]&&r[e][t]},se=Math.ceil,le=Math.floor,ue=function(e){return isNaN(e=+e)?0:(e>0?le:se)(e)},ce=Math.min,de=function(e){return e>0?ce(ue(e),9007199254740991):0},he=Math.max,fe=Math.min,ve=function(e,t){var n=ue(e);return n<0?he(n+t,0):fe(n,t)},ge=function(e){return function(t,n,i){var r,a=p(t),o=de(a.length),s=ve(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},pe={includes:ge(!0Line truncated !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Reveal=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},o=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c={f:l&&!s.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:s},u=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,h=function(e){return d.call(e).slice(8,-1)},f="".split,v=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?f.call(e,""):Object(e)}:Object,p=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return v(p(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!m(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(e,t){return b.call(e,t)},S=r.document,E=m(S)&&m(S.createElement),k=function(e){return E?S.createElement(e):{}},A=!o&&!a((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),R=Object.getOwnPropertyDescriptor,x={f:o?R:function(e,t){if(e=g(e),t=y(t,!0),A)try{return R(e,t)}catch(e){}if(w(e,t))return u(!c.f.call(e,t),e[t])}},L=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},C=Object.defineProperty,P={f:o?C:function(e,t,n){if(L(e),t=y(t,!0),L(n),A)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},N=o?function(e,t,n){return P.f(e,t,u(1,n))}:function(e,t,n){return e[t]=n,e},M=function(e,t){try{N(r,e,t)}catch(n){r[e]=t}return t},I="__core-js_shared__",O=r[I]||M(I,{}),T=Function.toString;"function"!=typeof O.inspectSource&&(O.inspectSource=function(e){return T.call(e)});var j,D,F,z=O.inspectSource,H=r.WeakMap,U="function"==typeof H&&/native code/.test(z(H)),_=n((function(e){(e.exports=function(e,t){return O[e]||(O[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),B=0,q=Math.random(),W=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++B+q).toString(36)},V=_("keys"),K=function(e){return V[e]||(V[e]=W(e))},$={},X=r.WeakMap;if(U){var Y=O.state||(O.state=new X),G=Y.get,J=Y.has,Q=Y.set;j=function(e,t){return t.facade=e,Q.call(Y,e,t),t},D=function(e){return G.call(Y,e)||{}},F=function(e){return J.call(Y,e)}}else{var Z=K("state");$[Z]=!0,j=function(e,t){return t.facade=e,N(e,Z,t),t},D=function(e){return w(e,Z)?e[Z]:{}},F=function(e){return w(e,Z)}}var ee,te,ne={set:j,get:D,has:F,enforce:function(e){return F(e)?D(e):j(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=D(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ie=n((function(e){var t=ne.get,n=ne.enforce,i=String(String).split("String");(e.exports=function(e,t,a,o){var s,l=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||w(a,"name")||N(a,"name",t),(s=n(a)).source||(s.source=i.join("string"==typeof t?t:""))),e!==r?(l?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=a:N(e,t,a)):c?e[t]=a:M(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||z(this)}))})),re=r,ae=function(e){return"function"==typeof e?e:void 0},oe=function(e,t){return arguments.length<2?ae(re[e])||ae(r[e]):re[e]&&re[e][t]||r[e]&&r[e][t]},se=Math.ceil,le=Math.floor,ce=function(e){return isNaN(e=+e)?0:(e>0?le:se)(e)},ue=Math.min,de=function(e){return e>0?ue(ce(e),9007199254740991):0},he=Math.max,fe=Math.min,ve=function(e,t){var n=ce(e);return n<0?he(n+t,0):fe(n,t)},pe=function(e){return function(t,n,i){var r,a=g(t),o=de(a.length),s=ve(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},ge={includes:pe(!0Line truncated
//# sourceMappingURL=reveal.js.map //# sourceMappingURL=reveal.js.map
+18 -18
View File
@@ -27,8 +27,6 @@ export default class Backgrounds {
*/ */
create() { create() {
let printMode = this.Reveal.isPrintingPDF();
// Clear prior backgrounds // Clear prior backgrounds
this.element.innerHTML = ''; this.element.innerHTML = '';
this.element.classList.add( 'no-transition' ); this.element.classList.add( 'no-transition' );
@@ -114,9 +112,24 @@ export default class Backgrounds {
*/ */
sync( slide ) { sync( slide ) {
let element = slide.slideBackgroundElement, const element = slide.slideBackgroundElement,
contentElement = slide.slideBackgroundContentElement; contentElement = slide.slideBackgroundContentElement;
const data = {
background: slide.getAttribute( 'data-background' ),
backgroundSize: slide.getAttribute( 'data-background-size' ),
backgroundImage: slide.getAttribute( 'data-background-image' ),
backgroundVideo: slide.getAttribute( 'data-background-video' ),
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
backgroundColor: slide.getAttribute( 'data-background-color' ),
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
backgroundPosition: slide.getAttribute( 'data-background-position' ),
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
backgroundOpacity: slide.getAttribute( 'data-background-opacity' ),
};
const dataPreload = slide.hasAttribute( 'data-preload' );
// Reset the prior background state in case this is not the // Reset the prior background state in case this is not the
// initial sync // initial sync
slide.classList.remove( 'has-dark-background' ); slide.classList.remove( 'has-dark-background' );
@@ -135,19 +148,6 @@ export default class Backgrounds {
contentElement.style.opacity = ''; contentElement.style.opacity = '';
contentElement.innerHTML = ''; contentElement.innerHTML = '';
let data = {
background: slide.getAttribute( 'data-background' ),
backgroundSize: slide.getAttribute( 'data-background-size' ),
backgroundImage: slide.getAttribute( 'data-background-image' ),
backgroundVideo: slide.getAttribute( 'data-background-video' ),
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
backgroundColor: slide.getAttribute( 'data-background-color' ),
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
backgroundPosition: slide.getAttribute( 'data-background-position' ),
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
backgroundOpacity: slide.getAttribute( 'data-background-opacity' )
};
if( data.background ) { if( data.background ) {
// Auto-wrap image urls in url(...) // Auto-wrap image urls in url(...)
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) { if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) {
@@ -179,7 +179,7 @@ export default class Backgrounds {
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
if( slide.hasAttribute( 'data-preload' ) ) element.setAttribute( 'data-preload', '' ); if( dataPreload ) element.setAttribute( 'data-preload', '' );
// Background image options are set on the content wrapper // Background image options are set on the content wrapper
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize; if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
@@ -201,7 +201,7 @@ export default class Backgrounds {
} }
if( contrastColor ) { if( contrastColor ) {
let rgb = colorToRgb( contrastColor ); const rgb = colorToRgb( contrastColor );
// Ignore fully transparent backgrounds. Some browsers return // Ignore fully transparent backgrounds. Some browsers return
// rgba(0,0,0,0) when reading the computed background color of // rgba(0,0,0,0) when reading the computed background color of
+45 -32
View File
@@ -16,20 +16,26 @@ export default class Print {
* Configures the presentation for printing to a static * Configures the presentation for printing to a static
* PDF. * PDF.
*/ */
setupPDF() { async setupPDF() {
let config = this.Reveal.getConfig(); const config = this.Reveal.getConfig();
const slides = queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR )
let slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight ); // Compute slide numbers now, before we start duplicating slides
const doingSlideNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );
const slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
// Dimensions of the PDF pages // Dimensions of the PDF pages
let pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ), const pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),
pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) ); pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );
// Dimensions of slides within the pages // Dimensions of slides within the pages
let slideWidth = slideSize.width, const slideWidth = slideSize.width,
slideHeight = slideSize.height; slideHeight = slideSize.height;
await new Promise( requestAnimationFrame );
// Let the browser know what page size we want to print // Let the browser know what page size we want to print
createStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' ); createStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' );
@@ -41,29 +47,32 @@ export default class Print {
document.body.style.height = pageHeight + 'px'; document.body.style.height = pageHeight + 'px';
// Make sure stretch elements fit on slide // Make sure stretch elements fit on slide
await new Promise( requestAnimationFrame );
this.Reveal.layoutSlideContents( slideWidth, slideHeight ); this.Reveal.layoutSlideContents( slideWidth, slideHeight );
// Compute slide numbers now, before we start duplicating slides // Re-run the slide layout so that r-fit-text is applied based on
let doingSlideNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber ); // the printed slide size
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) { slides.forEach( slide => this.Reveal.slideContent.layout( slide ) );
slide.setAttribute( 'data-slide-number', this.Reveal.slideNumber.getSlideNumber( slide ) );
}, this ); // Batch scrollHeight access to prevent layout thrashing
await new Promise( requestAnimationFrame );
const slideScrollHeights = slides.map( slide => slide.scrollHeight );
const pages = [];
const pageContainer = slides[0].parentNode;
// Slide and slide background layout // Slide and slide background layout
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) { slides.forEach( function( slide, index ) {
// Vertical stacks are not centred since their section // Vertical stacks are not centred since their section
// children will be // children will be
if( slide.classList.contains( 'stack' ) === false ) { if( slide.classList.contains( 'stack' ) === false ) {
// Center the slide inside of the page, giving the slide some margin // Center the slide inside of the page, giving the slide some margin
let left = ( pageWidth - slideWidth ) / 2, let left = ( pageWidth - slideWidth ) / 2;
top = ( pageHeight - slideHeight ) / 2; let top = ( pageHeight - slideHeight ) / 2;
// Re-run the slide layout so that r-fit-text is applied based on const contentHeight = slideScrollHeights[ index ];
// the printed slide size
this.Reveal.slideContent.layout( slide );
let contentHeight = slide.scrollHeight;
let numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 ); let numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
// Adhere to configured pages per slide limit // Adhere to configured pages per slide limit
@@ -76,10 +85,11 @@ export default class Print {
// Wrap the slide in a page element and hide its overflow // Wrap the slide in a page element and hide its overflow
// so that no page ever flows onto another // so that no page ever flows onto another
let page = document.createElement( 'div' ); const page = document.createElement( 'div' );
pages.push( page );
page.className = 'pdf-page'; page.className = 'pdf-page';
page.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px'; page.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px';
slide.parentNode.insertBefore( page, slide );
page.appendChild( slide ); page.appendChild( slide );
// Position the slide inside of the page // Position the slide inside of the page
@@ -95,19 +105,19 @@ export default class Print {
if( config.showNotes ) { if( config.showNotes ) {
// Are there notes for this slide? // Are there notes for this slide?
let notes = this.Reveal.getSlideNotes( slide ); const notes = this.Reveal.getSlideNotes( slide );
if( notes ) { if( notes ) {
let notesSpacing = 8; const notesSpacing = 8;
let notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline'; const notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';
let notesElement = document.createElement( 'div' ); const notesElement = document.createElement( 'div' );
notesElement.classList.add( 'speaker-notes' ); notesElement.classList.add( 'speaker-notes' );
notesElement.classList.add( 'speaker-notes-pdf' ); notesElement.classList.add( 'speaker-notes-pdf' );
notesElement.setAttribute( 'data-layout', notesLayout ); notesElement.setAttribute( 'data-layout', notesLayout );
notesElement.innerHTML = notes; notesElement.innerHTML = notes;
if( notesLayout === 'separate-page' ) { if( notesLayout === 'separate-page' ) {
page.parentNode.insertBefore( notesElement, page.nextSibling ); pages.push( notesElement );
} }
else { else {
notesElement.style.left = notesSpacing + 'px'; notesElement.style.left = notesSpacing + 'px';
@@ -122,10 +132,11 @@ export default class Print {
// Inject slide numbers if `slideNumbers` are enabled // Inject slide numbers if `slideNumbers` are enabled
if( doingSlideNumbers ) { if( doingSlideNumbers ) {
let numberElement = document.createElement( 'div' ); const slideNumber = index + 1;
const numberElement = document.createElement( 'div' );
numberElement.classList.add( 'slide-number' ); numberElement.classList.add( 'slide-number' );
numberElement.classList.add( 'slide-number-pdf' ); numberElement.classList.add( 'slide-number-pdf' );
numberElement.innerHTML = slide.getAttribute( 'data-slide-number' ); numberElement.innerHTML = slideNumber;
page.appendChild( numberElement ); page.appendChild( numberElement );
} }
@@ -135,10 +146,9 @@ export default class Print {
// Each fragment 'group' is an array containing one or more // Each fragment 'group' is an array containing one or more
// fragments. Multiple fragments that appear at the same time // fragments. Multiple fragments that appear at the same time
// are part of the same group. // are part of the same group.
let fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true ); const fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );
let previousFragmentStep; let previousFragmentStep;
let previousPage;
fragmentGroups.forEach( function( fragments ) { fragmentGroups.forEach( function( fragments ) {
@@ -155,11 +165,10 @@ export default class Print {
}, this ); }, this );
// Create a separate page for the current fragment state // Create a separate page for the current fragment state
let clonedPage = page.cloneNode( true ); const clonedPage = page.cloneNode( true );
page.parentNode.insertBefore( clonedPage, ( previousPage || page ).nextSibling ); pages.push( clonedPage );
previousFragmentStep = fragments; previousFragmentStep = fragments;
previousPage = clonedPage;
}, this ); }, this );
@@ -182,6 +191,10 @@ export default class Print {
}, this ); }, this );
await new Promise( requestAnimationFrame );
pages.forEach( page => pageContainer.appendChild( page ) );
// Notify subscribers that the PDF layout is good to go // Notify subscribers that the PDF layout is good to go
this.Reveal.dispatchEvent({ type: 'pdf-ready' }); this.Reveal.dispatchEvent({ type: 'pdf-ready' });
+6 -2
View File
@@ -1335,7 +1335,11 @@ export default function( revealElement, options ) {
} }
// Announce the current slide contents to screen readers // Announce the current slide contents to screen readers
announceStatus( getStatusText( currentSlide ) ); // Use animation frame to prevent getComputedStyle in getStatusText
// from triggering layout mid-frame
requestAnimationFrame( () => {
announceStatus( getStatusText( currentSlide ) );
});
progress.update(); progress.update();
controls.update(); controls.update();
@@ -2290,7 +2294,7 @@ export default function( revealElement, options ) {
// When looping is enabled `routes.down` is always available // When looping is enabled `routes.down` is always available
// so we need a separate check for when we've reached the // so we need a separate check for when we've reached the
// end of a stack and should move horizontally // end of a stack and should move horizontally
if( routes.down && routes.right && config.loop && isLastVerticalSlide( currentSlide ) ) { if( routes.down && routes.right && config.loop && isLastVerticalSlide() ) {
routes.down = false; routes.down = false;
} }