@@ 603-603 (lines=1) @@ | ||
600 | g.appendChild(c)}; |
|
601 | ops.EditInfo=function(g,k){function c(){var b=[],c;for(c in f)f.hasOwnProperty(c)&&b.push({memberid:c,time:f[c].time});b.sort(function(b,c){return b.time-c.time});return b}var b,f={};this.getNode=function(){return b};this.getOdtDocument=function(){return k};this.getEdits=function(){return f};this.getSortedEdits=function(){return c()};this.addEdit=function(b,c){f[b]={time:c}};this.clearEdits=function(){f={}};this.destroy=function(c){g.parentNode&&g.removeChild(b);c()};b=k.getDOMDocument().createElementNS("urn:webodf:names:editinfo","editinfo"); |
|
602 | g.insertBefore(b,g.firstChild)}; |
|
603 | gui.EditInfoMarker=function(g,k){function c(b,a){return runtime.setTimeout(function(){p.style.opacity=b},a)}var b=this,f,n,p,r,q,e;this.addEdit=function(b,a){var d=Date.now()-a;g.addEdit(b,a);n.setEdits(g.getSortedEdits());p.setAttributeNS("urn:webodf:names:editinfo","editinfo:memberid",b);runtime.clearTimeout(q);runtime.clearTimeout(e);1E4>d?(r=c(1,0),q=c(.5,1E4-d),e=c(.2,2E4-d)):1E4<=d&&2E4>d?(r=c(.5,0),e=c(.2,2E4-d)):r=c(.2,0)};this.getEdits=function(){return g.getEdits()};this.clearEdits=function(){g.clearEdits(); |
|
604 | n.setEdits([]);p.hasAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")&&p.removeAttributeNS("urn:webodf:names:editinfo","editinfo:memberid")};this.getEditInfo=function(){return g};this.show=function(){p.style.display="block"};this.hide=function(){b.hideHandle();p.style.display="none"};this.showHandle=function(){n.show()};this.hideHandle=function(){n.hide()};this.destroy=function(b){runtime.clearTimeout(r);runtime.clearTimeout(q);runtime.clearTimeout(e);f.removeChild(p);n.destroy(function(a){a? |
|
605 | b(a):g.destroy(b)})};(function(){var c=g.getOdtDocument().getDOMDocument();p=c.createElementNS(c.documentElement.namespaceURI,"div");p.setAttribute("class","editInfoMarker");p.onmouseover=function(){b.showHandle()};p.onmouseout=function(){b.hideHandle()};f=g.getNode();f.appendChild(p);n=new gui.EditInfoHandle(f);k||b.hide()})()}; |
|
606 | gui.HyperlinkTooltipView=function(g,k){var c=core.DomUtils,b=odf.OdfUtils,f=runtime.getWindow(),n,p,r;runtime.assert(null!==f,"Expected to be run in an environment which has a global window, like a browser.");this.showTooltip=function(q){var e=q.target||q.srcElement,l=g.getSizer(),a=g.getZoomLevel(),d;a:{for(;e;){if(b.isHyperlink(e))break a;if(b.isParagraph(e)||b.isInlineRoot(e))break;e=e.parentNode}e=null}if(e){c.containsNode(l,r)||l.appendChild(r);d=p;var m;switch(k()){case gui.KeyboardHandler.Modifier.Ctrl:m= |
|
@@ 78-78 (lines=1) @@ | ||
75 | String(typeof arguments)&&arguments);(function(){core.Async=function(){return{forEach:function(g,k,c){function b(b){p!==n&&(b?(p=n,c(b)):(p+=1,p===n&&c(null)))}var f,n=g.length,p=0;for(f=0;f<n;f+=1)k(g[f],b)},destroyAll:function(g,k){function c(b,f){if(f)k(f);else if(b<g.length)g[b](function(f){c(b+1,f)});else k()}c(0,void 0)}}}()})(); |
|
76 | function makeBase64(){function g(a){var d,m=a.length,h=new Uint8Array(new ArrayBuffer(m));for(d=0;d<m;d+=1)h[d]=a.charCodeAt(d)&255;return h}function k(a){var d,m="",h,b=a.length-2;for(h=0;h<b;h+=3)d=a[h]<<16|a[h+1]<<8|a[h+2],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>18],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>12&63],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>6&63],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d& |
|
77 | 63];h===b+1?(d=a[h]<<4,m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>6],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d&63],m+="=="):h===b&&(d=a[h]<<10|a[h+1]<<2,m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>12],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d>>>6&63],m+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d&63],m+="=");return m}function c(a){a=a.replace(/[^A-Za-z0-9+\/]+/g, |
|
78 | "");var d=a.length,m=new Uint8Array(new ArrayBuffer(3*d)),b=a.length%4,c=0,l,e;for(l=0;l<d;l+=4)e=(h[a.charAt(l)]||0)<<18|(h[a.charAt(l+1)]||0)<<12|(h[a.charAt(l+2)]||0)<<6|(h[a.charAt(l+3)]||0),m[c]=e>>16,m[c+1]=e>>8&255,m[c+2]=e&255,c+=3;d=3*d-[0,0,2,1][b];return m.subarray(0,d)}function b(a){var d,m,h=a.length,b=0,c=new Uint8Array(new ArrayBuffer(3*h));for(d=0;d<h;d+=1)m=a[d],128>m?c[b++]=m:(2048>m?c[b++]=192|m>>>6:(c[b++]=224|m>>>12&15,c[b++]=128|m>>>6&63),c[b++]=128|m&63);return c.subarray(0, |
|
79 | b)}function f(a){var d,m,h,b,c=a.length,l=new Uint8Array(new ArrayBuffer(c)),e=0;for(d=0;d<c;d+=1)m=a[d],128>m?l[e++]=m:(d+=1,h=a[d],224>m?l[e++]=(m&31)<<6|h&63:(d+=1,b=a[d],l[e++]=(m&15)<<12|(h&63)<<6|b&63));return l.subarray(0,e)}function n(a){return k(g(a))}function p(a){return String.fromCharCode.apply(String,c(a))}function r(a){return f(g(a))}function q(a){a=f(a);for(var d="",m=0;m<a.length;)d+=String.fromCharCode.apply(String,a.subarray(m,m+45E3)),m+=45E3;return d}function e(a,d,m){var h,b, |
|
80 | c,l="";for(c=d;c<m;c+=1)d=a.charCodeAt(c)&255,128>d?l+=String.fromCharCode(d):(c+=1,h=a.charCodeAt(c)&255,224>d?l+=String.fromCharCode((d&31)<<6|h&63):(c+=1,b=a.charCodeAt(c)&255,l+=String.fromCharCode((d&15)<<12|(h&63)<<6|b&63)));return l}function l(a,d){function m(){var c=b+1E5;c>a.length&&(c=a.length);h+=e(a,b,c);b=c;c=b===a.length;d(h,c)&&!c&&runtime.setTimeout(m,0)}var h="",b=0;1E5>a.length?d(e(a,0,a.length),!0):("string"!==typeof a&&(a=a.slice()),m())}function a(a){return b(g(a))}function d(a){return String.fromCharCode.apply(String, |
|
81 | b(a))}function m(a){return String.fromCharCode.apply(String,b(g(a)))}var h=function(a){var d={},m,h;m=0;for(h=a.length;m<h;m+=1)d[a.charAt(m)]=m;return d}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),y,x,z=runtime.getWindow(),w,v;z&&z.btoa?(w=z.btoa,y=function(a){return w(m(a))}):(w=n,y=function(d){return k(a(d))});z&&z.atob?(v=z.atob,x=function(a){a=v(a);return e(a,0,a.length)}):(v=p,x=function(a){return q(c(a))});core.Base64=function(){this.convertByteArrayToBase64=this.convertUTF8ArrayToBase64= |