UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

11 lines 60 kB
module.exports=function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}({0:function(t,e,r){r(1606),t.exports=r(1606)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},20:function(t,e){t.exports=require("../kendo.core")},954:function(t,e){t.exports=require("../kendo.color")},1606:function(t,e,r){var o,n,i;!function(a,define){n=[r(1607),r(20),r(954),r(1608)],o=a,i="function"==typeof o?o.apply(e,n):o,!(void 0!==i&&(t.exports=i))}(function(){!function(t){function e(t){function e(){return T>=O}function r(){return T<O?t[T++]:0}function o(e){b(T),t[T++]=255&e,T>O&&(O=T)}function n(){return r()<<8|r()}function i(t){o(t>>8),o(t)}function a(){var t=n();return t>=32768?t-65536:t}function s(t){i(t<0?t+65536:t)}function c(){return 65536*n()+n()}function h(t){i(t>>>16&65535),i(65535&t)}function u(){var t=c();return t>=2147483648?t-4294967296:t}function f(t){h(t<0?t+4294967296:t)}function p(){return c()/65536}function l(t){h(Math.round(65536*t))}function d(){return u()/65536}function g(t){f(Math.round(65536*t))}function y(t){return w(t,r)}function m(t){return String.fromCharCode.apply(String,y(t))}function S(t){for(var e=0;e<t.length;++e)o(t.charCodeAt(e))}function w(t,e){for(var r=Array(t),o=0;o<t;++o)r[o]=e();return r}var b,x,v,_,C,T=0,O=0;return null==t?t=Ct?new Uint8Array(256):[]:O=t.length,b=Ct?function(e){if(e>=t.length){var r=new Uint8Array(Math.max(e+256,2*t.length));r.set(t,0),t=r}}:function(){},x=Ct?function(){return new Uint8Array(t.buffer,0,O)}:function(){return t},v=Ct?function(e){if("string"==typeof e)return S(e);var r=e.length;b(T+r),t.set(e,T),T+=r,T>O&&(O=T)}:function(t){if("string"==typeof t)return S(t);for(var e=0;e<t.length;++e)o(t[e])},_=Ct?function(e,r){if(t.buffer.slice)return new Uint8Array(t.buffer.slice(e,e+r));var o=new Uint8Array(r);return o.set(new Uint8Array(t.buffer,e,r)),o}:function(e,r){return t.slice(e,e+r)},C={eof:e,readByte:r,writeByte:o,readShort:n,writeShort:i,readLong:c,writeLong:h,readFixed:p,writeFixed:l,readShort_:a,writeShort_:s,readLong_:u,writeLong_:f,readFixed_:d,writeFixed_:g,read:y,write:v,readString:m,writeString:S,times:w,get:x,slice:_,offset:function(t){return null!=t?(T=t,C):T},skip:function(t){T+=t},toString:function(){throw Error("FIX CALLER. BinaryStream is no longer convertible to string!")},length:function(){return O},saveExcursion:function(t){var e=T;try{return t()}finally{T=e}},writeBase64:function(t){window.atob?S(window.atob(t)):v(Tt.decode(t))},base64:function(){return Tt.encode(x())}}}function r(t){for(var e,r,o=[],n=0,i=t.length;n<i;)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<i?(r=t.charCodeAt(n++),56320==(64512&r)?o.push(((1023&e)<<10)+(1023&r)+65536):(o.push(e),n--)):o.push(e);return o}function o(t){return t.map(function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}).join("")}function n(t){var e,r=window.atob(t),o=new Uint8Array(r.length);for(e=0;e<r.length;e++)o[e]=r.charCodeAt(e);return o}function i(t){var e,r=new Uint8Array(t.length);for(e=0;e<t.length;e++)r[e]=t[e];return r}function a(t){return window.atob?n(t):i(Tt.decode(t))}/*****************************************************************************\ * * The code in this file, although written from scratch, is influenced by the * TrueType parser/encoder in PDFKit -- http://pdfkit.org/ (a CoffeeScript * library for producing PDF files). * * PDFKit is (c) Devon Govett 2014 and released under the MIT License. * \*****************************************************************************/ function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t){return Object.keys(t).sort(function(t,e){return t-e}).map(parseFloat)}function h(){var t,e="",r=Nt+"";for(t=0;t<r.length;++t)e+=String.fromCharCode(r.charCodeAt(t)-48+65);return++Nt,e}function u(t){return Ut(t>>8)+Ut(255&t)}function f(t){var e,r,o,n,i="";for(e=0;e<t.length;e++)r=t.charCodeAt(e),r<65535?i+=u(r):(o=(r-65536>>10)+55296,n=(r-65536&1023)+56320,i+=u(o),i+=u(n));return i}function p(){function t(){var e,r,n,i=arguments;for(e=0;e<arguments.length;++e){if(r=i[e],void 0===r)throw Error("Cannot output undefined to PDF");if(r instanceof Vt)r.beforeRender(t),r.render(t);else if(Qt(r))C(r,t);else if(_(r))T(r,t);else if("number"==typeof r){if(isNaN(r))throw Error("Cannot output NaN to PDF");n=r.toFixed(7),n.indexOf(".")>=0&&(n=n.replace(/\.?0+$/,"")),"-0"==n&&(n="0"),o.writeString(n)}else/string|boolean/.test(typeof r)?o.writeString(r+""):"function"==typeof r.get?o.write(r.get()):"object"==typeof r&&(r?t(new ne(r)):o.writeString("null"))}}var r=0,o=e();return t.writeData=function(t){o.write(t)},t.withIndent=function(e){++r,e(t),--r},t.indent=function(){t(Ht,b("",2*r," ")),t.apply(null,arguments)},t.offset=function(){return o.offset()},t.toString=function(){throw Error("FIX CALLER")},t.get=function(){return o.get()},t.stream=function(){return o},t}function l(t,e){var r=t.beforeRender,o=t.render;t.beforeRender=function(){},t.render=function(t){t(e," 0 R")},t.renderFull=function(n){t._offset=n.offset(),n(e," 0 obj "),r.call(t,n),o.call(t,n),n(" endobj")}}function d(t){var e,r,o;if("function"!=typeof t&&(e=t,t=function(t,r){return t in e?e[t]:r}),r=t("paperSize",Wt.a4),!r)return{};if("string"==typeof r&&(r=Wt[r.toLowerCase()],null==r))throw Error("Unknown paper size");return r[0]=F(r[0]),r[1]=F(r[1]),t("landscape",!1)&&(r=[Math.max(r[0],r[1]),Math.min(r[0],r[1])]),o=t("margin"),o&&("string"==typeof o||"number"==typeof o?(o=F(o,0),o={left:o,top:o,right:o,bottom:o}):o={left:F(o.left,0),top:F(o.top,0),right:F(o.right,0),bottom:F(o.bottom,0)},t("addMargin")&&(r[0]+=o.left+o.right,r[1]+=o.top+o.bottom)),{paperSize:r,margin:o}}function g(t,e){function r(){window.console&&(window.console.error?window.console.error("Cannot load URL: %s",t):window.console.log("Cannot load URL: %s",t)),e(null)}var o,n;return qt.msie&&(o=/^data:.*?;base64,/i.exec(t))?void e(a(t.substr(o[0].length))):(n=new XMLHttpRequest,n.open("GET",t,!0),Ct&&(n.responseType="arraybuffer"),n.onload=function(){200==n.status||304==n.status?e(Ct?new Uint8Array(n.response):new window.VBArray(n.responseBody).toArray()):r()},n.onerror=r,void n.send(null))}function y(t,e){var r=Jt[t];r?e(r):g(t,function(r){if(null==r)throw Error("Cannot load font from "+t);var o=new jt(r);Jt[t]=o,e(o)})}function m(){Zt={}}function S(t,r,o,n){function i(t){p.src=t,p.complete&&!qt.msie?c.call(p):(p.onload=c,p.onerror=s)}function a(){var i,a,c,u,f,l,d,g,y,m,S;r||(r={width:p.width,height:p.height}),i=document.createElement("canvas"),i.width=r.width,i.height=r.height,a=i.getContext("2d"),a.drawImage(p,0,0,r.width,r.height);try{c=a.getImageData(0,0,r.width,r.height)}catch(w){return void s()}finally{h&&URL.revokeObjectURL(h)}for(u=!1,f=e(),l=e(),d=c.data,g=0;g<d.length;)f.writeByte(d[g++]),f.writeByte(d[g++]),f.writeByte(d[g++]),y=d[g++],y<255&&(u=!0),l.writeByte(y);u||n.keepPNG?p=new ue(r.width,r.height,f,l):(m=i.toDataURL("image/jpeg",n.jpegQuality),m=m.substr(m.indexOf(";base64,")+8),S=e(),S.writeBase64(m),p=new he(S)),o(Zt[t]=p)}function s(){o(Zt[t]="ERROR")}function c(){var n,i,s;r&&(n=u&&"image/svg+xml"===u.type||/^data:image\/svg\+xml;/i.test(this.src.substring(0,19)),i=r.width>=p.width||r.height>=p.height,!n&&i&&(r=null)),!r&&u&&/^image\/jpe?g$/i.test(u.type)?(s=new FileReader,s.onload=function(){try{var r=new he(e(new Uint8Array(this.result)));URL.revokeObjectURL(h),o(Zt[t]=r)}catch(n){a()}},s.readAsArrayBuffer(u)):a()}var h,u,f,p=Zt[t];p?o(p):(p=new Image,/^data:/i.test(t)||(p.crossOrigin="Anonymous"),Ct&&!/^data:/i.test(t)?(f=new XMLHttpRequest,f.onload=function(){u=f.response,h=URL.createObjectURL(u),i(h)},f.onerror=s,f.open("GET",t,!0),f.responseType="blob",f.send()):i(t))}function w(t){return function(e,r){function o(){0===--n&&r()}var n=e.length,i=n;if(0===n)return r();for(;i-- >0;)t(e[i],o)}}function b(t,e,r){for(;t.length<e;)t=r+t;return t}function x(t,e){return b(t+"",e,"0")}function v(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function _(t){return t instanceof Date}function C(t,e){e("["),t.length>0&&e.withIndent(function(){for(var r=0;r<t.length;++r)r>0&&r%8===0?e.indent(t[r]):e(" ",t[r])}),e(" ]")}function T(t,e){e("(D:",x(t.getUTCFullYear(),4),x(t.getUTCMonth()+1,2),x(t.getUTCDate(),2),x(t.getUTCHours(),2),x(t.getUTCMinutes(),2),x(t.getUTCSeconds(),2),"Z)")}function O(t){return t*(72/25.4)}function k(t){return O(10*t)}function D(t){return 72*t}function F(t,e){var r,o;if("number"==typeof t)return t;if("string"==typeof t&&(r=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(t),r&&(o=parseFloat(r[1]),!isNaN(o))))return"pt"==r[2]?o:{mm:O,cm:k,"in":D}[r[2]](o);if(null!=e)return e;throw Error("Can't parse unit: "+t)}function I(t){return v(oe,t)?oe[t]:oe[t]=new re(t)}function L(t){return t.map(function(t){return Qt(t)?L(t):"number"==typeof t?(Math.round(1e3*t)/1e3).toFixed(3):t}).join(" ")}function M(t,e,r,o,n,i,a){var s=L([e,r,o,n,i,a]),c=t.GRAD_COL_FUNCTIONS[s];return c||(c=t.GRAD_COL_FUNCTIONS[s]=t.attach(new ne({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[e,r,o],C1:[n,i,a]}))),c}function A(t,e,r){var o=L([e,r]),n=t.GRAD_OPC_FUNCTIONS[o];return n||(n=t.GRAD_OPC_FUNCTIONS[o]=t.attach(new ne({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[e],C1:[r]}))),n}function R(t,e){function r(t){return 1==t.length?t[0]:{FunctionType:3,Functions:t,Domain:[0,1],Bounds:f,Encode:p}}var o,n,i,a,s,c=!1,h=[],u=[],f=[],p=[];for(o=1;o<e.length;++o)n=e[o-1],i=e[o],a=n.color,s=i.color,u.push(M(t,a.r,a.g,a.b,s.r,s.g,s.b)),(a.a<1||s.a<1)&&(c=!0),f.push(i.offset),p.push(0,1);if(c)for(o=1;o<e.length;++o)n=e[o-1],i=e[o],a=n.color,s=i.color,h.push(A(t,a.a,s.a));return f.pop(),{hasAlpha:c,colors:r(u),opacities:c?r(h):null}}function G(t,e,r,o,n,i){var a,s,c;return i||(c=[e].concat(o),r.forEach(function(t){c.push(t.offset,t.color.r,t.color.g,t.color.b)}),s=L(c),a=t.GRAD_COL[s]),a||(a=new ne({Type:I("Shading"),ShadingType:e?3:2,ColorSpace:I("DeviceRGB"),Coords:o,Domain:[0,1],Function:n,Extend:[!0,!0]}),t.attach(a),a._resourceName="S"+ ++Xt,s&&(t.GRAD_COL[s]=a)),a}function P(t,e,r,o,n,i){var a,s,c;return i||(c=[e].concat(o),r.forEach(function(t){c.push(t.offset,t.color.a)}),s=L(c),a=t.GRAD_OPC[s]),a||(a=new ne({Type:I("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:I("Mask"),S:I("Luminosity"),G:t.attach(new ie("/a0 gs /s0 sh",{Type:I("XObject"),Subtype:I("Form"),FormType:1,BBox:i?[i.left,i.top+i.height,i.left+i.width,i.top]:[0,1,1,0],Group:{Type:I("Group"),S:I("Transparency"),CS:I("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:I("DeviceGray"),Coords:o,Domain:[0,1],ShadingType:e?3:2,Function:n,Extend:[!0,!0]}}}}))}}),t.attach(a),a._resourceName="O"+ ++Xt,s&&(t.GRAD_OPC[s]=a)),a}function E(t,e,r){var o="radial"==e.type,n=R(t,e.stops),i=o?[e.start.x,e.start.y,e.start.r,e.end.x,e.end.y,e.end.r]:[e.start.x,e.start.y,e.end.x,e.end.y],a=G(t,o,e.stops,i,n.colors,e.userSpace&&r),s=n.hasAlpha?P(t,o,e.stops,i,n.opacities,e.userSpace&&r):null;return{hasAlpha:n.hasAlpha,shading:a,opacity:s}}function N(t){return t.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function B(t){var e,r=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,o=r.exec(t);return o?(e=o[8]?parseInt(o[8],10):12,{italic:o[2]&&"italic"==o[2].toLowerCase(),variant:o[4],bold:o[6]&&/bold|700/i.test(o[6]),fontSize:e,lineHeight:o[12]?"normal"==o[12]?e:parseInt(o[12],10):null,fontFamily:o[14].split(/\s*,\s*/g).map(N)}):{fontSize:12,fontFamily:"sans-serif"}}function j(t){function e(e){return t.bold&&(e+="|bold"),t.italic&&(e+="|italic"),e.toLowerCase()}var r,o,n,i=t.fontFamily;if(i instanceof Array)for(n=0;n<i.length&&(r=e(i[n]),!(o=ge[r]));++n);else o=ge[i.toLowerCase()];for(;"function"==typeof o;)o=o();return o||(o="Times-Roman"),o}function U(t,e){t=t.toLowerCase(),ge[t]=function(){return ge[e]},ge[t+"|bold"]=function(){return ge[e+"|bold"]},ge[t+"|italic"]=function(){return ge[e+"|italic"]},ge[t+"|bold|italic"]=function(){return ge[e+"|bold|italic"]}}function z(t,e){if(1==arguments.length)for(var r in t)v(t,r)&&z(r,t[r]);else switch(t=t.toLowerCase(),ge[t]=e,t){case"dejavu sans":ge["sans-serif"]=e;break;case"dejavu sans|bold":ge["sans-serif|bold"]=e;break;case"dejavu sans|italic":ge["sans-serif|italic"]=e;break;case"dejavu sans|bold|italic":ge["sans-serif|bold|italic"]=e;break;case"dejavu serif":ge.serif=e;break;case"dejavu serif|bold":ge["serif|bold"]=e;break;case"dejavu serif|italic":ge["serif|italic"]=e;break;case"dejavu serif|bold|italic":ge["serif|bold|italic"]=e;break;case"dejavu mono":ge.monospace=e;break;case"dejavu mono|bold":ge["monospace|bold"]=e;break;case"dejavu mono|italic":ge["monospace|italic"]=e;break;case"dejavu mono|bold|italic":ge["monospace|bold|italic"]=e}}function q(t,e){var r=t[0],o=t[1],n=t[2],i=t[3],a=t[4],s=t[5],c=e[0],h=e[1],u=e[2],f=e[3],p=e[4],l=e[5];return[r*c+o*u,r*h+o*f,n*c+i*u,n*h+i*f,a*c+s*u+p,a*h+s*f+l]}function H(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]}function X(t,e){function r(t,e,r){return r||(r=s),r.pdf&&null!=r.pdf[t]?r.pdf[t]:e}function o(){function o(t){var e,o,n,a,s,c=t.options,h=dt(t),u=h.bbox;t=h.root,e=r("paperSize",r("paperSize","auto"),c),o=!1,"auto"==e&&(u?(n=u.getSize(),e=[n.width,n.height],o=!0,a=u.getOrigin(),h=new wt.Group,h.transform(new _t.Matrix(1,0,0,1,(-a.x),(-a.y))),h.append(t),t=h):e="A4"),s=i.addPage({paperSize:e,margin:r("margin",r("margin"),c),addMargin:o,landscape:r("landscape",r("landscape",!1),c)}),$(t,s,i)}if(!(--n>0)){var i=new Kt({producer:r("producer"),title:r("title"),author:r("author"),subject:r("subject"),keywords:r("keywords"),creator:r("creator"),date:r("date"),autoPrint:r("autoPrint")});c?t.children.forEach(o):o(t),e(i.render(),i)}}var n,i=[],a={},s=t.options,c=r("multiPage"),h=r("imgDPI");m(),t.traverse(function(t){Y({Image:function(t){var e,r,o=t.src();h?(e=t.bbox().size,r=a[o],e={width:Math.ceil(e.width*h/72),height:Math.ceil(e.height*h/72)},r&&(e.width=Math.max(r.width,e.width),e.height=Math.max(r.height,e.height)),a[o]=e):a[o]=null},Text:function(t){var e=B(t.options.font),r=j(e);i.indexOf(r)<0&&i.push(r)}},t)}),n=2,Yt(i,o),$t(a,o,{jpegQuality:r("jpegQuality",.92),keepPNG:r("keepPNG",!1)})}function W(t,e){X(t,function(t){e("data:application/pdf;base64,"+t.base64())})}function J(t,e){X(t,function(t){e(new window.Blob([t.get()],{type:"application/pdf"}))})}function Z(t,e,r,o){window.Blob&&!St.safari?J(t,function(t){kendo.saveAs({dataURI:t,fileName:e}),o&&o(t)}):W(t,function(t){kendo.saveAs({dataURI:t,fileName:e,proxyURL:r}),o&&o(t)})}function Y(t,e){var r=t[e.nodeType];return r?r.call.apply(r,arguments):e}function $(t,e,r){var o,n,i;t.options._pdfDebug&&e.comment("BEGIN: "+t.options._pdfDebug),o=t.transform(),n=t.opacity(),e.save(),null!=n&&n<1&&e.setOpacity(n),K(t,e,r),Q(t,e,r),o&&(i=o.matrix(),e.transform(i.a,i.b,i.c,i.d,i.e,i.f)),V(t,e,r),Y({Path:it,MultiPath:at,Circle:st,Arc:ct,Text:ht,Image:ft,Group:ut,Rect:pt},t,e,r),e.restore(),t.options._pdfDebug&&e.comment("END: "+t.options._pdfDebug)}function K(t,e){var r,o,n,i,a,s,c=t.stroke&&t.stroke();if(c){if(r=c.color){if(r=lt(r),null==r)return;e.setStrokeColor(r.r,r.g,r.b),1!=r.a&&e.setStrokeOpacity(r.a)}if(o=c.width,null!=o){if(0===o)return;e.setLineWidth(o)}n=c.dashType,n&&e.setDashPattern(Se[n],0),i=c.lineCap,i&&e.setLineCap(we[i]),a=c.lineJoin,a&&e.setLineJoin(be[a]),s=c.opacity,null!=s&&e.setStrokeOpacity(s)}}function Q(t,e){var r,o,n=t.fill&&t.fill();if(n&&!(n instanceof wt.Gradient)){if(r=n.color){if(r=lt(r),null==r)return;e.setFillColor(r.r,r.g,r.b),1!=r.a&&e.setFillOpacity(r.a)}o=n.opacity,null!=o&&e.setFillOpacity(o)}}function V(t,e,r){var o=t.clip();o&&(nt(o,e,r),e.clip())}function tt(t){return t&&(t instanceof wt.Gradient||t.color&&!/^(none|transparent)$/i.test(t.color)&&(null==t.width||t.width>0)&&(null==t.opacity||t.opacity>0))}function et(t,e,r,o){var n,i,a,s,c,h,u,f,p=t.fill();if(p instanceof wt.Gradient)return o?e.clipStroke():e.clip(),n=p instanceof wt.RadialGradient,n?(i={x:p.center().x,y:p.center().y,r:0},a={x:p.center().x,y:p.center().y,r:p.radius()}):(i={x:p.start().x,y:p.start().y},a={x:p.end().x,y:p.end().y}),s=p.stops.elements().map(function(t){var e,r=t.offset();return r=/%$/.test(r)?parseFloat(r)/100:parseFloat(r),e=lt(t.color()),e.a*=t.opacity(),{offset:r,color:e}}),s.unshift(s[0]),s.push(s[s.length-1]),c={userSpace:p.userSpace(),type:n?"radial":"linear",start:i,end:a,stops:s},h=t.rawBBox(),u=h.topLeft(),f=h.getSize(),h={left:u.x,top:u.y,width:f.width,height:f.height},e.gradient(c,h),!0}function rt(t,e,r){tt(t.fill())&&tt(t.stroke())?et(t,e,r,!0)||e.fillStroke():tt(t.fill())?et(t,e,r,!1)||e.fill():tt(t.stroke())?e.stroke():e.nop()}function ot(t,e){var r,o,n,i=t.segments;if(4==i.length&&t.options.closed){for(r=[],o=0;o<i.length;++o){if(i[o].controlIn())return!1;r[o]=i[o].anchor()}if(n=r[0].y==r[1].y&&r[1].x==r[2].x&&r[2].y==r[3].y&&r[3].x==r[0].x||r[0].x==r[1].x&&r[1].y==r[2].y&&r[2].x==r[3].x&&r[3].y==r[0].y)return e.rect(r[0].x,r[0].y,r[2].x-r[0].x,r[2].y-r[0].y),!0}}function nt(t,e,r){var o,n,i,a,s,c,h=t.segments;if(0!==h.length&&!ot(t,e,r)){for(n=0;n<h.length;++n)i=h[n],a=i.anchor(),o?(s=o.controlOut(),c=i.controlIn(),s&&c?e.bezier(s.x,s.y,c.x,c.y,a.x,a.y):e.lineTo(a.x,a.y)):e.moveTo(a.x,a.y),o=i;t.options.closed&&e.close()}}function it(t,e,r){nt(t,e,r),rt(t,e,r)}function at(t,e,r){var o,n=t.paths;for(o=0;o<n.length;++o)nt(n[o],e,r);rt(t,e,r)}function st(t,e,r){var o=t.geometry();e.circle(o.center.x,o.center.y,o.radius),rt(t,e,r)}function ct(t,e,r){var o,n=t.geometry().curvePoints();for(e.moveTo(n[0].x,n[0].y),o=1;o<n.length;)e.bezier(n[o].x,n[o++].y,n[o].x,n[o++].y,n[o].x,n[o++].y);rt(t,e,r)}function ht(t,e){var r,o=B(t.options.font),n=t._position;t.fill()&&t.stroke()?r=me.fillAndStroke:t.fill()?r=me.fill:t.stroke()&&(r=me.stroke),e.transform(1,0,0,-1,n.x,n.y+o.fontSize),e.beginText(),e.setFont(j(o),o.fontSize),e.setTextRenderingMode(r),e.showText(t.content(),t._pdfRect?t._pdfRect.width():null),e.endText()}function ut(t,e,r){var o,n;for(t._pdfLink&&e.addLink(t._pdfLink.url,t._pdfLink),o=t.children,n=0;n<o.length;++n)$(o[n],e,r)}function ft(t,e){var r,o,n,i=t.src();i&&(r=t.rect(),o=r.getOrigin(),n=r.getSize(),e.transform(n.width,0,0,-n.height,o.x,o.y+n.height),e.drawImage(i))}function pt(t,e,r){var o=t.geometry(),n=o.cornerRadius,i=n[0],a=n[1];0===i&&0===a?(e.rect(o.origin.x,o.origin.y,o.size.width,o.size.height),rt(t,e,r)):it(wt.Path.fromRect(o,t.options),e,r)}function lt(t){var e=kendo.parseColor(t,!0);return e?e.toRGB():null}function dt(t){function e(t){return s=!0,t}function r(t){return t.visible()&&t.opacity()>0&&(tt(t.fill())||tt(t.stroke()))}function o(t){var e,r,o=[];for(e=0;e<t.length;++e)r=a(t[e]),null!=r&&o.push(r);return o}function n(t,e){var r,o=c,n=h;t.transform()&&(h=h.multiplyCopy(t.transform().matrix())),r=t.clip(),r&&(r=r.bbox(),r&&(r=r.bbox(h),c=c?_t.Rect.intersect(c,r):r));try{return e()}finally{c=o,h=n}}function i(t){if(null==c)return!1;var e=t.rawBBox().bbox(h);return c&&e&&(e=_t.Rect.intersect(e,c)),e}function a(a){return n(a,function(){if(!(a instanceof wt.Group||a instanceof wt.MultiPath)){var n=i(a);if(!n)return e(null);u=u?_t.Rect.union(u,n):n}return Y({Path:function(t){return 0!==t.segments.length&&r(t)?t:e(null)},MultiPath:function(t){if(!r(t))return e(null);var n=new wt.MultiPath(t.options);return n.paths=o(t.paths),0===n.paths.length?e(null):n},Circle:function(t){return r(t)?t:e(null)},Arc:function(t){return r(t)?t:e(null)},Text:function(t){return/\S/.test(t.content())&&r(t)?t:e(null)},Image:function(t){return t.visible()&&t.opacity()>0?t:e(null)},Group:function(r){if(!(r.visible()&&r.opacity()>0))return e(null);var n=new wt.Group(r.options);return n.children=o(r.children),n._pdfLink=r._pdfLink,r===t||0!==n.children.length||r._pdfLink?n:e(null)},Rect:function(t){return r(t)?t:e(null)}},a)})}var s,c=!1,h=_t.Matrix.unit(),u=null;do s=!1,t=a(t);while(t&&s);return{root:t,bbox:u}}function gt(t,e){var r,o=bt.createPromise();for(r in e)"margin"==r&&t.options.pdf&&t.options.pdf._ignoreMargin||t.options.set("pdf."+r,e[r]);return W(t,o.resolve),o}function yt(t,e){var r,o=bt.createPromise();for(r in e)"margin"==r&&t.options.pdf&&t.options.pdf._ignoreMargin||t.options.set("pdf."+r,e[r]);return window.Blob&&!St.safari?J(t,o.resolve):W(t,o.resolve),o}var mt,St,wt,bt,xt,vt,_t,Ct,Tt,Ot,kt,Dt,Ft,It,Lt,Mt,At,Rt,Gt,Pt,Et,Nt,Bt,jt,Ut,zt,qt,Ht,Xt,Wt,Jt,Zt,Yt,$t,Kt,Qt,Vt,te,ee,re,oe,ne,ie,ae,se,ce,he,ue,fe,pe,le,de,ge,ye,me,Se,we,be;window.kendo.pdf=window.kendo.pdf||{},mt=kendo.support,St=mt.browser,wt=kendo.drawing,bt=wt.util,xt=bt.extendStatic,vt=kendo.pdf,_t=kendo.geometry,Ct="undefined"!=typeof Uint8Array&&kendo.support.browser&&(!kendo.support.browser.msie||kendo.support.browser.version>9),Tt=function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(e){for(var r,o,n,i,a,s,c,h=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),u=0,f=h.length,p=[];u<f;)r=t.indexOf(h.charAt(u++)),o=t.indexOf(h.charAt(u++)),n=t.indexOf(h.charAt(u++)),i=t.indexOf(h.charAt(u++)),a=r<<2|o>>>4,s=(15&o)<<4|n>>>2,c=(3&n)<<6|i,p.push(a),64!=n&&p.push(s),64!=i&&p.push(c);return p},encode:function(e){for(var r,o,n,i,a,s,c,h=0,u=e.length,f="";h<u;)r=e[h++],o=e[h++],n=e[h++],i=r>>>2,a=(3&r)<<4|o>>>4,s=(15&o)<<2|n>>>6,c=63&n,h-u==2?s=c=64:h-u==1&&(c=64),f+=t.charAt(i)+t.charAt(a)+t.charAt(s)+t.charAt(c);return f}}}(),Ot=function(t){var e,r,o;for(this.raw=t,this.scalerType=t.readLong(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),e=this.tables={},r=0;r<this.tableCount;++r)o={tag:t.readString(4),checksum:t.readLong(),offset:t.readLong(),length:t.readLong()},e[o.tag]=o},Ot.prototype.readTable=function(t,e){var r=this.tables[t];if(!r)throw Error("Table "+t+" not found in directory");return this[t]=r.table=new e(this,r)},Ot.prototype.render=function(t){var r,o,n,i,a,c,h,u,f=this,p=Object.keys(t).length,l=Math.pow(2,Math.floor(Math.log(p)/Math.LN2)),d=16*l,g=Math.floor(Math.log(l)/Math.LN2),y=16*p-d,m=e();m.writeLong(this.scalerType),m.writeShort(p),m.writeShort(d),m.writeShort(g),m.writeShort(y),r=16*p,o=m.offset()+r,n=null,i=e();for(a in t)if(s(t,a))for(c=t[a],m.writeString(a),m.writeLong(f.checksum(c)),m.writeLong(o),m.writeLong(c.length),i.write(c),"head"==a&&(n=o),o+=c.length;o%4;)i.writeByte(0),o++;return m.write(i.get()),h=this.checksum(m.get()),u=2981146554-h,m.offset(n+8),m.writeLong(u),m.get()},Ot.prototype.checksum=function(t){t=e(t);for(var r=0;!t.eof();)r+=t.readLong();return 4294967295&r},kt=function(t,e){this.definition=e,this.length=e.length,this.offset=e.offset,this.file=t,this.rawData=t.raw,this.parse(t.raw)},kt.prototype.raw=function(){return this.rawData.slice(this.offset,this.length)},kt.prototype.parse=function(){},Dt=function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(t){t.offset(this.offset),this.version=t.readLong(),this.revision=t.readLong(),this.checkSumAdjustment=t.readLong(),this.magicNumber=t.readLong(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.read(8),this.modified=t.read(8),this.xMin=t.readShort_(),this.yMin=t.readShort_(),this.xMax=t.readShort_(),this.yMax=t.readShort_(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort_(),this.indexToLocFormat=t.readShort_(),this.glyphDataFormat=t.readShort_()},r.prototype.render=function(t){var r=e();return r.writeLong(this.version),r.writeLong(this.revision),r.writeLong(0),r.writeLong(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.write(this.created),r.write(this.modified),r.writeShort_(this.xMin),r.writeShort_(this.yMin),r.writeShort_(this.xMax),r.writeShort_(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort_(this.fontDirectionHint),r.writeShort_(t),r.writeShort_(this.glyphDataFormat),r.get()},r}(kt),Ft=function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(t){t.offset(this.offset);var e=this.file.head.indexToLocFormat;this.offsets=0===e?t.times(this.length/2,function(){return 2*t.readShort()}):t.times(this.length/4,t.readLong)},r.prototype.offsetOf=function(t){return this.offsets[t]},r.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},r.prototype.render=function(t){var r,o=e(),n=t[t.length-1]>65535;for(r=0;r<t.length;++r)n?o.writeLong(t[r]):o.writeShort(t[r]/2);return{format:n?1:0,table:o.get()}},r}(kt),It=function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(t){t.offset(this.offset),this.version=t.readLong(),this.ascent=t.readShort_(),this.descent=t.readShort_(),this.lineGap=t.readShort_(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort_(),this.minRightSideBearing=t.readShort_(),this.xMaxExtent=t.readShort_(),this.caretSlopeRise=t.readShort_(),this.caretSlopeRun=t.readShort_(),this.caretOffset=t.readShort_(),t.skip(8),this.metricDataFormat=t.readShort_(),this.numOfLongHorMetrics=t.readShort()},r.prototype.render=function(t){var r=e();return r.writeLong(this.version),r.writeShort_(this.ascent),r.writeShort_(this.descent),r.writeShort_(this.lineGap),r.writeShort(this.advanceWidthMax),r.writeShort_(this.minLeftSideBearing),r.writeShort_(this.minRightSideBearing),r.writeShort_(this.xMaxExtent),r.writeShort_(this.caretSlopeRise),r.writeShort_(this.caretSlopeRun),r.writeShort_(this.caretOffset),r.write([0,0,0,0,0,0,0,0]),r.writeShort_(this.metricDataFormat),r.writeShort(t.length),r.get()},r}(kt),Lt=function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(t){t.offset(this.offset),this.version=t.readLong(),this.numGlyphs=t.readShort(),this.maxPoints=t.readShort(),this.maxContours=t.readShort(),this.maxComponentPoints=t.readShort(),this.maxComponentContours=t.readShort(),this.maxZones=t.readShort(),this.maxTwilightPoints=t.readShort(),this.maxStorage=t.readShort(),this.maxFunctionDefs=t.readShort(),this.maxInstructionDefs=t.readShort(),this.maxStackElements=t.readShort(),this.maxSizeOfInstructions=t.readShort(),this.maxComponentElements=t.readShort(),this.maxComponentDepth=t.readShort()},r.prototype.render=function(t){var r=e();return r.writeLong(this.version),r.writeShort(t.length),r.writeShort(this.maxPoints),r.writeShort(this.maxContours),r.writeShort(this.maxComponentPoints),r.writeShort(this.maxComponentContours),r.writeShort(this.maxZones),r.writeShort(this.maxTwilightPoints),r.writeShort(this.maxStorage),r.writeShort(this.maxFunctionDefs),r.writeShort(this.maxInstructionDefs),r.writeShort(this.maxStackElements),r.writeShort(this.maxSizeOfInstructions),r.writeShort(this.maxComponentElements),r.writeShort(this.maxComponentDepth),r.get()},r}(kt),Mt=function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(t){var e,r,o;t.offset(this.offset),e=this.file,r=e.hhea,this.metrics=t.times(r.numOfLongHorMetrics,function(){return{advance:t.readShort(),lsb:t.readShort_()}}),o=e.maxp.numGlyphs-e.hhea.numOfLongHorMetrics,this.leftSideBearings=t.times(o,t.readShort_)},r.prototype.forGlyph=function(t){var e=this.metrics,r=e.length;return t<r?e[t]:{advance:e[r-1].advance,lsb:this.leftSideBearings[t-r]}},r.prototype.render=function(t){var r,o,n=this,i=e();for(r=0;r<t.length;++r)o=n.forGlyph(t[r]),i.writeShort(o.advance),i.writeShort_(o.lsb);return i.get()},r}(kt),At=function(){var t,r,o,n,i,a,c,h=function(t){this.raw=t},u={compound:{}};return u.compound.get=function(){return!1},h.prototype.render=function(){return this.raw.get()},Object.defineProperties(h.prototype,u),t=1,r=8,o=32,n=64,i=128,a=function(e){var a,s,c;for(this.raw=e,a=this.glyphIds=[],s=this.idOffsets=[];;){if(c=e.readShort(),s.push(e.offset()),a.push(e.readShort()),!(c&o))break;e.skip(c&t?4:2),c&i?e.skip(8):c&n?e.skip(4):c&r&&e.skip(2)}},c={compound:{}},c.compound.get=function(){return!0},a.prototype.render=function(t){var r,o,n=this,i=e(this.raw.get());for(r=0;r<this.glyphIds.length;++r)o=n.glyphIds[r],i.offset(n.idOffsets[r]),i.writeShort(t[o]);return i.get()},Object.defineProperties(a.prototype,c),function(t){function r(){t.apply(this,arguments)}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.parse=function(){this.cache={}},r.prototype.glyphFor=function(t){var r,o,n,i,c,u,f,p,l,d,g,y=this.cache;return s(y,t)?y[t]:(r=this.file.loca,o=r.lengthOf(t),0===o?y[t]=null:(n=this.rawData,i=this.offset+r.offsetOf(t),c=e(n.slice(i,o)),u=c.readShort_(),f=c.readShort_(),p=c.readShort_(),l=c.readShort_(),d=c.readShort_(),g=y[t]=u<0?new a(c):new h(c),g.numberOfContours=u,g.xMin=f,g.yMin=p,g.xMax=l,g.yMax=d,g))},r.prototype.render=function(t,r,o){var n,i,a,s=e(),c=[];for(n=0;n<r.length;++n)i=r[n],a=t[i],s.offset()%2&&s.writeByte(0),c.push(s.offset()),a&&s.write(a.render(o));return s.offset()%2&&s.writeByte(0),c.push(s.offset()),{table:s.get(),offsets:c}},r}(kt)}(),Rt=function(){var t=function(t,e){this.text=t,this.length=t.length,this.platformID=e.platformID,this.platformSpecificID=e.platformSpecificID,this.languageID=e.languageID,this.nameID=e.nameID};return function(r){function o(){r.apply(this,arguments)}return xt(o,r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.fn=o.prototype,o.fn.init=o.fn.constructor,o.prototype.parse=function(e){var r,o,n,i,a,s,c;for(e.offset(this.offset),e.readShort(),r=e.readShort(),o=this.offset+e.readShort(),n=e.times(r,function(){return{platformID:e.readShort(),platformSpecificID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:e.readShort()+o}}),i=this.strings={},a=0;a<n.length;++a)s=n[a],e.offset(s.offset),c=e.readString(s.length),i[s.nameID]||(i[s.nameID]=[]),i[s.nameID].push(new t(c,s));this.postscriptEntry=i[6][0],this.postscriptName=this.postscriptEntry.text.replace(/[^\x20-\x7F]/g,"")},o.prototype.render=function(r){var o,n,i,a,c,h,u=this,f=this.strings,p=0;for(o in f)s(f,o)&&(p+=f[o].length);n=e(),i=e(),n.writeShort(0),n.writeShort(p),n.writeShort(6+12*p);for(o in f)if(s(f,o))for(a=6==o?[new t(r,u.postscriptEntry)]:f[o],c=0;c<a.length;++c)h=a[c],n.writeShort(h.platformID),n.writeShort(h.platformSpecificID),n.writeShort(h.languageID),n.writeShort(h.nameID),n.writeShort(h.length),n.writeShort(i.offset()),i.writeString(h.text);return n.write(i.get()),n.get()},o}(kt)}(),Gt=function(){var t=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);return function(r){function o(){r.apply(this,arguments)}return xt(o,r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.fn=o.prototype,o.fn.init=o.fn.constructor,o.prototype.parse=function(t){var e,r,o=this;switch(t.offset(this.offset),this.format=t.readLong(),this.italicAngle=t.readFixed_(),this.underlinePosition=t.readShort_(),this.underlineThickness=t.readShort_(),this.isFixedPitch=t.readLong(),this.minMemType42=t.readLong(),this.maxMemType42=t.readLong(),this.minMemType1=t.readLong(),this.maxMemType1=t.readLong(),this.format){case 65536:case 196608:break;case 131072:for(e=t.readShort(),this.glyphNameIndex=t.times(e,t.readShort),this.names=[],r=this.offset+this.length;t.offset()<r;)o.names.push(t.readString(t.readByte()));break;case 151552:e=t.readShort(),this.offsets=t.read(e);break;case 262144:this.map=t.times(this.file.maxp.numGlyphs,t.readShort)}},o.prototype.glyphFor=function(e){switch(this.format){case 65536:return t[e]||".notdef";case 131072:var r=this.glyphNameIndex[e];return r<t.length?t[r]:this.names[r-t.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[e]||65535}},o.prototype.render=function(r){var o,n,i,a,s,c,h,u=this;if(196608==this.format)return this.raw();for(o=e(this.rawData.slice(this.offset,32)),o.writeLong(131072),o.offset(32),n=[],i=[],a=0;a<r.length;++a)s=r[a],c=u.glyphFor(s),h=t.indexOf(c),h>=0?n.push(h):(n.push(t.length+i.length),i.push(c));for(o.writeShort(r.length),a=0;a<n.length;++a)o.writeShort(n[a]);for(a=0;a<i.length;++a)o.writeByte(i[a].length),o.writeString(i[a]);return o.get()},o}(kt)}(),Pt=function(){function t(t,r){function o(e){return r[t[e]]}var n,i,a,s,h,u,f,p,l,d,g,y,m,S,w,b,x,v=c(t),_=[],C=[],T=null,O=null;for(n=0;n<v.length;++n)i=v[n],a=o(i),s=a-i,null!=T&&s===O||(T&&C.push(T),_.push(i),O=s),T=i;for(T&&C.push(T),C.push(65535),_.push(65535),h=_.length,u=2*h,f=2*Math.pow(2,Math.floor(Math.log(h)/Math.LN2)),p=Math.log(f/2)/Math.LN2,l=u-f,d=[],g=[],y=[],n=0;n<h;++n){if(m=_[n],S=C[n],65535==m){d.push(0),g.push(0);break}if(w=o(m),m-w>=32768)for(d.push(0),g.push(2*(y.length+h-n)),b=m;b<=S;++b)y.push(o(b));else d.push(w-m),g.push(0)}return x=e(),x.writeShort(3),x.writeShort(1),x.writeLong(12),x.writeShort(4),x.writeShort(16+8*h+2*y.length),x.writeShort(0),x.writeShort(u),x.writeShort(f),x.writeShort(p),x.writeShort(l),C.forEach(x.writeShort),x.writeShort(0),_.forEach(x.writeShort),d.forEach(x.writeShort_),g.forEach(x.writeShort),y.forEach(x.writeShort),x.get()}var r=function(t,e,r){var o=this;o.platformID=t.readShort(),o.platformSpecificID=t.readShort(),o.offset=e+t.readLong(),t.saveExcursion(function(){var e,n,i,a,s,c,h,u,f,p,l,d,g,y,m,S,w;switch(t.offset(o.offset), o.format=t.readShort()){case 0:for(o.length=t.readShort(),o.language=t.readShort(),n=0;n<256;++n)r[n]=t.readByte();break;case 4:for(o.length=t.readShort(),o.language=t.readShort(),i=t.readShort()/2,t.skip(6),a=t.times(i,t.readShort),t.skip(2),s=t.times(i,t.readShort),c=t.times(i,t.readShort_),h=t.times(i,t.readShort),u=(o.length+o.offset-t.offset())/2,f=t.times(u,t.readShort),n=0;n<i;++n)for(p=s[n],l=a[n],e=p;e<=l;++e)0===h[n]?d=e+c[n]:(g=h[n]/2-(i-n)+(e-p),d=f[g]||0,0!==d&&(d+=c[n])),r[e]=65535&d;break;case 6:for(o.length=t.readShort(),o.language=t.readShort(),e=t.readShort(),y=t.readShort();y-- >0;)r[e++]=t.readShort();break;case 12:for(t.readShort(),o.length=t.readLong(),o.language=t.readLong(),m=t.readLong();m-- >0;)for(e=t.readLong(),S=t.readLong(),w=t.readLong();e<=S;)r[e++]=w++;break;default:window.console&&window.console.error("Unhandled CMAP format: "+o.format)}})};return function(o){function n(){o.apply(this,arguments)}return xt(n,o),n.prototype=Object.create(o&&o.prototype),n.prototype.constructor=n,n.fn=n.prototype,n.fn.init=n.fn.constructor,n.prototype.parse=function(t){var e,o=this,n=o.offset;t.offset(n),o.codeMap={},o.version=t.readShort(),e=t.readShort(),o.tables=t.times(e,function(){return new r(t,n,o.codeMap)})},n.render=function(r,o){var n=e();return n.writeShort(0),n.writeShort(1),n.write(t(r,o)),n.get()},n}(kt)}(),Et=function(t){function e(){t.apply(this,arguments)}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.parse=function(t){t.offset(this.offset),this.version=t.readShort(),this.averageCharWidth=t.readShort_(),this.weightClass=t.readShort(),this.widthClass=t.readShort(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort_(),this.ySubscriptYSize=t.readShort_(),this.ySubscriptXOffset=t.readShort_(),this.ySubscriptYOffset=t.readShort_(),this.ySuperscriptXSize=t.readShort_(),this.ySuperscriptYSize=t.readShort_(),this.ySuperscriptXOffset=t.readShort_(),this.ySuperscriptYOffset=t.readShort_(),this.yStrikeoutSize=t.readShort_(),this.yStrikeoutPosition=t.readShort_(),this.familyClass=t.readShort_(),this.panose=t.times(10,t.readByte),this.charRange=t.times(4,t.readLong),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort_(),this.descent=t.readShort_(),this.lineGap=t.readShort_(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=t.times(2,t.readLong),this.version>1&&(this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()))},e.prototype.render=function(){return this.raw()},e}(kt),Nt=1e5,Bt=function(t){this.font=t,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=h()+"+"+this.font.psName},Bt.prototype.use=function(t){var e,o,n,i=this;return"string"==typeof t?r(t).reduce(function(t,e){return t+String.fromCharCode(i.use(e))},""):(e=i.unicodes[t],e||(e=i.next++,i.subset[e]=t,i.unicodes[t]=e,o=i.font.cmap.codeMap[t],o&&(i.ncid2ogid[e]=o,null==i.ogid2ngid[o]&&(n=i.nextGid++,i.ogid2ngid[o]=n,i.ngid2ogid[n]=o))),e)},Bt.prototype.encodeText=function(t){return this.use(t)},Bt.prototype.glyphIds=function(){return c(this.ogid2ngid)},Bt.prototype.glyphsFor=function(t,e){var r,o,n,i=this;for(e||(e={}),r=0;r<t.length;++r)o=t[r],e[o]||(n=e[o]=i.font.glyf.glyphFor(o),n&&n.compound&&i.glyphsFor(n.glyphIds,e));return e},Bt.prototype.render=function(){var t,e,r,o,n,i,a,h,u=this,f=this.glyphsFor(this.glyphIds());for(t in f)s(f,t)&&(t=parseInt(t,10),null==u.ogid2ngid[t]&&(e=u.nextGid++,u.ogid2ngid[t]=e,u.ngid2ogid[e]=t));return r=c(this.ngid2ogid),o=r.map(function(t){return this.ngid2ogid[t]},this),n=this.font,i=n.glyf.render(f,o,this.ogid2ngid),a=n.loca.render(i.offsets),this.lastChar=this.next-1,h={cmap:Pt.render(this.ncid2ogid,this.ogid2ngid),glyf:i.table,loca:a.table,hmtx:n.hmtx.render(o),hhea:n.hhea.render(o),maxp:n.maxp.render(o),post:n.post.render(o),name:n.name.render(this.psName),head:n.head.render(a.format),"OS/2":n.os2.render()},this.font.directory.render(h)},Bt.prototype.cidToGidMap=function(){var t,r,o,n=this,i=e(),a=0;for(t=this.firstChar;t<this.next;++t){for(;a<t;)i.writeShort(0),a++;r=n.ncid2ogid[t],r?(o=n.ogid2ngid[r],i.writeShort(o)):i.writeShort(0),a++}return i.get()},jt=function(t,r){var o,n,i,a,s=this,c=s.contents=e(t);if("ttcf"==c.readString(4)){if(n=function(){c.offset(o),s.parse()},!r)throw Error("Must specify a name for TTC files");for(c.readLong(),i=c.readLong(),a=0;a<i;++a)if(o=c.readLong(),c.saveExcursion(n),s.psName==r)return;throw Error("Font "+r+" not found in collection")}c.offset(0),s.parse()},jt.prototype.parse=function(){var t=this.directory=new Ot(this.contents);this.head=t.readTable("head",Dt),this.loca=t.readTable("loca",Ft),this.hhea=t.readTable("hhea",It),this.maxp=t.readTable("maxp",Lt),this.hmtx=t.readTable("hmtx",Mt),this.glyf=t.readTable("glyf",At),this.name=t.readTable("name",Rt),this.post=t.readTable("post",Gt),this.cmap=t.readTable("cmap",Pt),this.os2=t.readTable("OS/2",Et),this.psName=this.name.postscriptName,this.ascent=this.os2.ascent||this.hhea.ascent,this.descent=this.os2.descent||this.hhea.descent,this.lineGap=this.os2.lineGap||this.hhea.lineGap,this.scale=1e3/this.head.unitsPerEm},jt.prototype.widthOfGlyph=function(t){return this.hmtx.forGlyph(t).advance*this.scale},jt.prototype.makeSubset=function(){return new Bt(this)},Ut=String.fromCharCode,zt="þÿ",qt=kendo.support.browser,Ht="\n",Xt=0,Wt={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],executive:[521.86,756],folio:[612,936],legal:[612,1008],letter:[612,792],tabloid:[792,1224]},Jt={"Times-Roman":!0,"Times-Bold":!0,"Times-Italic":!0,"Times-BoldItalic":!0,Helvetica:!0,"Helvetica-Bold":!0,"Helvetica-Oblique":!0,"Helvetica-BoldOblique":!0,Courier:!0,"Courier-Bold":!0,"Courier-Oblique":!0,"Courier-BoldOblique":!0,Symbol:!0,ZapfDingbats:!0},Zt={},Yt=w(y),$t=function(e,r,o){function n(){0===--a&&r()}o=t.extend({jpegQuality:.92,keepPNG:!1},o);var i=Object.keys(e),a=i.length;return 0===a?r():void i.forEach(function(t){S(t,e[t],n,o)})},Kt=function(t){function e(e,r){return t&&null!=t[e]?t[e]:r}var r,o,n,i,a=this,s=p(),c=0,h=[];a.getOption=e,a.attach=function(t){return h.indexOf(t)<0&&(l(t,++c),h.push(t)),t},a.pages=[],a.FONTS={},a.IMAGES={},a.GRAD_COL_FUNCTIONS={},a.GRAD_OPC_FUNCTIONS={},a.GRAD_COL={},a.GRAD_OPC={},r=a.attach(new ae),o=a.attach(new se),e("autoPrint")&&(n={},n.JavaScript=new ne({Names:[new te("JS"),a.attach(new ne({S:I("JavaScript"),JS:new te("print(true);")}))]}),r.props.Names=new ne(n)),r.setPages(o),i=a.attach(new ne({Producer:new te(e("producer","Kendo UI PDF Generator"),(!0)),Title:new te(e("title",""),(!0)),Author:new te(e("author",""),(!0)),Subject:new te(e("subject",""),(!0)),Keywords:new te(e("keywords",""),(!0)),Creator:new te(e("creator","Kendo UI PDF Generator"),(!0)),CreationDate:e("date",new Date)})),a.addPage=function(t){var e,r,n,i=d(function(e,r){return t&&null!=t[e]?t[e]:r}),s=i.paperSize,c=i.margin,h=s[0],u=s[1];return c&&(h-=c.left+c.right,u-=c.top+c.bottom),e=new ie(p(),null,(!0)),r={Contents:a.attach(e),Parent:o,MediaBox:[0,0,s[0],s[1]]},n=new de(a,r),n._content=e,o.addPage(a.attach(n)),n.transform(1,0,0,-1,0,s[1]),c&&(n.translate(c.left,c.top),n.rect(0,0,h,u),n.clip()),a.pages.push(n),n},a.render=function(){var t,e;for(s("%PDF-1.4",Ht,"%ÂÁÚÏÎ",Ht,Ht),t=0;t<h.length;++t)h[t].renderFull(s),s(Ht,Ht);for(e=s.offset(),s("xref",Ht,0," ",h.length+1,Ht),s("0000000000 65535 f ",Ht),t=0;t<h.length;++t)s(x(h[t]._offset,10)," 00000 n ",Ht);return s(Ht),s("trailer",Ht),s(new ne({Size:h.length+1,Root:r,Info:i}),Ht,Ht),s("startxref",Ht,e,Ht),s("%%EOF",Ht),s.stream().offset(0)},a.loadFonts=Yt,a.loadImages=$t},Kt.prototype.getFont=function(t){var e=this.FONTS[t];if(!e){if(e=Jt[t],!e)throw Error("Font "+t+" has not been loaded");e=this.attach(e===!0?new fe(t):new pe(this,e)),this.FONTS[t]=e}return e},Kt.prototype.getImage=function(t){var e=this.IMAGES[t];if(!e){if(e=Zt[t],!e)throw Error("Image "+t+" has not been loaded");if("ERROR"===e)return null;e=this.IMAGES[t]=this.attach(e.asStream(this))}return e},Kt.prototype.getOpacityGS=function(t,e){var r,o,n,i=parseFloat(t).toFixed(3);return t=parseFloat(i),i+=e?"S":"F",r=this._opacityGSCache||(this._opacityGSCache={}),o=r[i],o||(n={Type:I("ExtGState")},e?n.CA=t:n.ca=t,o=this.attach(new ne(n)),o._resourceName=I("GS"+ ++Xt),r[i]=o),o},Kt.prototype.dict=function(t){return new ne(t)},Kt.prototype.name=function(t){return I(t)},Kt.prototype.stream=function(t,e){return new ie(e,t)},Qt=Array.isArray||function(t){return t instanceof Array},Vt=function(){},Vt.prototype.beforeRender=function(){},te=function(t){function e(e,r){t.call(this),this.value=e,this.utf16be=!!r}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.render=function(t){var e,r,o,n=this.value;if(this.utf16be)n=zt+f(n),n=n.replace(/([\(\)\\])/g,"\\$1"),t("(",n,")");else{for(e=[40],r=0;r<n.length;++r)o=255&n.charCodeAt(r),40!=o&&41!=o&&92!=o||e.push(92),e.push(o);e.push(41),t.writeData(e)}},e.prototype.toString=function(){return this.value},e}(Vt),ee=function(t){function e(e){t.call(this,e),this.value=e}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.render=function(t){var e,r=this;for(t("<"),e=0;e<this.value.length;++e)t(x(r.value.charCodeAt(e).toString(16),4));t(">")},e}(te),re=function(t){function e(e){t.call(this),this.name=e}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.get=function(t){return I(t)},e.prototype.render=function(t){t("/"+this.escape())},e.prototype.escape=function(){return this.name.replace(/[^\x21-\x7E]/g,function(t){return"#"+x(t.charCodeAt(0).toString(16),2)})},e.prototype.toString=function(){return this.name},e}(Vt),oe={},ne=function(t){function e(e){t.call(this),this.props=e}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.render=function(t){var e=this.props,r=!0;t("<<"),t.withIndent(function(){for(var o in e)v(e,o)&&!/^_/.test(o)&&(r=!1,t.indent(I(o)," ",e[o]))}),r||t.indent(),t(">>")},e}(Vt),ie=function(t){function r(r,o,n){if(t.call(this),"string"==typeof r){var i=e();i.write(r),r=i}this.data=r,this.props=o||{},this.compress=n}return xt(r,t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.fn=r.prototype,r.fn.init=r.fn.constructor,r.prototype.render=function(t){var e=this.data.get(),r=this.props;this.compress&&vt.supportsDeflate()&&(r.Filter?r.Filter instanceof Array||(r.Filter=[r.Filter]):r.Filter=[],r.Filter.unshift(I("FlateDecode")),e=vt.deflate(e)),r.Length=e.length,t(new ne(r)," stream",Ht),t.writeData(e),t(Ht,"endstream")},r}(Vt),ae=function(t){function e(){t.call(this,{Type:I("Catalog")})}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.setPages=function(t){this.props.Pages=t},e}(ne),se=function(t){function e(){t.call(this,{Type:I("Pages"),Kids:[],Count:0})}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.addPage=function(t){this.props.Kids.push(t),this.props.Count++},e}(ne),ce=[192,193,194,195,197,198,199,201,202,203,205,206,207],he=function(t){var e,r,o,n,i,a,s,c,h;if(t.offset(0),i=t.readShort(),65496!=i)throw Error("Invalid JPEG image");for(;!t.eof();){if(a=t.readByte(),255!=a)throw Error("Invalid JPEG image");if(s=t.readByte(),c=t.readShort(),ce.indexOf(s)>=0){n=t.readByte(),r=t.readShort(),e=t.readShort(),o=t.readByte();break}t.skip(c-2)}if(null==o)throw Error("Invalid JPEG image");switch(h={Type:I("XObject"),Subtype:I("Image"),Width:e,Height:r,BitsPerComponent:n,Filter:I("DCTDecode")},o){case 1:h.ColorSpace=I("DeviceGray");break;case 3:h.ColorSpace=I("DeviceRGB");break;case 4:h.ColorSpace=I("DeviceCMYK"),h.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){t.offset(0);var e=new ie(t,h);return e._resourceName=I("I"+ ++Xt),e}},ue=function(t,e,r,o){this.asStream=function(n){var i=new ie(o,{Type:I("XObject"),Subtype:I("Image"),Width:t,Height:e,BitsPerComponent:8,ColorSpace:I("DeviceGray")},(!0)),a=new ie(r,{Type:I("XObject"),Subtype:I("Image"),Width:t,Height:e,BitsPerComponent:8,ColorSpace:I("DeviceRGB"),SMask:n.attach(i)},(!0));return a._resourceName=I("I"+ ++Xt),a}},fe=function(t){function e(e){t.call(this,{Type:I("Font"),Subtype:I("Type1"),BaseFont:I(e)}),this._resourceName=I("F"+ ++Xt)}return xt(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.fn=e.prototype,e.fn.init=e.fn.constructor,e.prototype.encodeText=function(t){return new te(t+"")},e}(ne),pe=function(t){function r(e,r,o){var n,i;t.call(this,{}),o=this.props,o.Type=I("Font"),o.Subtype=I("Type0"),o.Encoding=I("Identity-H"),this._pdf=e,this._font=r,this._sub=r.makeSubset(),this._resourceName=I("F"+ ++Xt),n=r.head,this.name=r.psName,i=this.scale=r.scale,this.bbox=[n.xMin*i,n.yMin*i,n.xMax*i,n.yMax*i],this.italicAngle=r.post.italicAngle,this.ascent=r.ascent*i,this.descent=r.descent*i,this.lineGap=r.lineGap*i,this.capHeight=r.os2.capHeight||this.ascent,this.xHeight=r.os2.xHeight||0,this.stemV=0,this.familyClass=(r.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=10==this.fam