From 44d34d1788be5eb83bc9fd3672843209581c68af Mon Sep 17 00:00:00 2001 From: Willem Date: Thu, 1 Oct 2020 02:06:00 +0200 Subject: [PATCH] Added DRL post and svg stuff --- README.md | 26 +++++++ _config.yml | 8 ++- package-lock.json | 31 +++++++++ package.json | 5 +- source/_posts/Cross-Unit-Converter-test.md | 75 +++++++++++++++++++++ source/_posts/Working-on-DRL.md | 10 +++ themes/custom/layout/layout.ejs | 29 ++++++++ themes/custom/source/js/svg-pan-zoom.min.js | 3 + 8 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 source/_posts/Working-on-DRL.md create mode 100644 themes/custom/source/js/svg-pan-zoom.min.js diff --git a/README.md b/README.md index e69de29..4806c35 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,26 @@ + +## ForwardFire.net website + +### Setup + +``` +npm install +``` + +### Add post + +``` +hexo new post "Working on DRL" +``` + +### Test + +``` +npm run-script server +``` + +### Deploy + +``` +npm run-script deploy +``` \ No newline at end of file diff --git a/_config.yml b/_config.yml index 7b4958e..0e40220 100644 --- a/_config.yml +++ b/_config.yml @@ -107,7 +107,9 @@ theme: custom # Deployment ## Docs: https://hexo.io/docs/deployment.html deploy: - type: '' + type: shell + command: scp -r public/* willemc@10.208.255.33:/var/www/www.forwardfire.net + # searchdb search: @@ -115,3 +117,7 @@ search: field: post format: html limit: 10000 + +# hexo-graphviz +graphviz: + enable: true diff --git a/package-lock.json b/package-lock.json index e72bb74..3d9d05c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -597,6 +597,14 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "deep-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-3.0.0.tgz", + "integrity": "sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==", + "requires": { + "is-obj": "^1.0.0" + } + }, "deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", @@ -1205,6 +1213,11 @@ "safe-json-stringify": "~1" } }, + "hexo-deployer-shell": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hexo-deployer-shell/-/hexo-deployer-shell-0.2.3.tgz", + "integrity": "sha1-FMR5YljzSGbfZYFOcmv10Q/+noY=" + }, "hexo-front-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexo-front-matter/-/hexo-front-matter-1.0.0.tgz", @@ -1271,6 +1284,14 @@ "hexo-pagination": "1.0.0" } }, + "hexo-graphviz": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hexo-graphviz/-/hexo-graphviz-1.0.2.tgz", + "integrity": "sha512-7Fa/BA7L9nCbd8YWaiSvoLizy8U1mW0ekriO7Taarqcr9IHhMQi3qsWaoB7HhszpsMGMtv5V75skeFlymJ3Wzw==", + "requires": { + "deep-assign": "^3.0.0" + } + }, "hexo-i18n": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-1.0.0.tgz", @@ -1701,6 +1722,11 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3593,6 +3619,11 @@ "has-flag": "^4.0.0" } }, + "svg-pan-zoom": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/svg-pan-zoom/-/svg-pan-zoom-3.6.1.tgz", + "integrity": "sha512-JaKkGHHfGvRrcMPdJWkssLBeWqM+Isg/a09H7kgNNajT1cX5AztDTNs+C8UzpCxjCTRrG34WbquwaovZbmSk9g==" + }, "swig-extras": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/swig-extras/-/swig-extras-0.0.1.tgz", diff --git a/package.json b/package.json index 1236cbc..f3cb8f7 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,18 @@ }, "dependencies": { "hexo": "^4.0.0", + "hexo-deployer-shell": "^0.2.3", "hexo-generator-archive": "^1.0.0", "hexo-generator-category": "^1.0.0", "hexo-generator-index": "^1.0.0", "hexo-generator-searchdb": "^1.2.0", "hexo-generator-tag": "^1.0.0", + "hexo-graphviz": "^1.0.2", "hexo-renderer-ejs": "^1.0.0", "hexo-renderer-less": "^1.0.0", "hexo-renderer-marked": "^2.0.0", "hexo-renderer-stylus": "^1.1.0", - "hexo-server": "^1.0.0" + "hexo-server": "^1.0.0", + "svg-pan-zoom": "^3.6.1" } } diff --git a/source/_posts/Cross-Unit-Converter-test.md b/source/_posts/Cross-Unit-Converter-test.md index bacf3c5..769193d 100644 --- a/source/_posts/Cross-Unit-Converter-test.md +++ b/source/_posts/Cross-Unit-Converter-test.md @@ -9,6 +9,81 @@ tags: ### Unit groups ![Unit groups](unitxc-groups.png "Unit groups") +```graphviz +digraph G { + kelvin[shape=box,style=filled,color=".9 0.5 0.9",label="kelvin\nK\nkelvin\n(thermodynamic_temperature)",labelloc=b]; + kelvin -> kelvin[color=red,label="174"]; + ampere[shape=box,style=filled,color=".9 0.5 0.9",label="ampere\nA\nampere\n(electric_current)",labelloc=b]; + ampere -> ampere[color=red,label="29"]; + candela[shape=box,style=filled,color=".9 0.5 0.9",label="candela\ncd\ncandela\n(luminous_intensity)",labelloc=b]; + candela -> candela[color=red,label="29"]; + mole[shape=box,style=filled,color=".9 0.5 0.9",label="mole\nmol\nmole\n(amount_of_substance)",labelloc=b]; + mole -> mole[color=red,label="30"]; + metre[shape=box,style=filled,color=".9 0.5 0.9",label="metre\nm\nmetre\n(length)",labelloc=b]; + metre -> metre[color=red,label="348"]; + kilogram[shape=box,style=filled,color=".9 0.5 0.9",label="kilogram\ng\ngram\n(mass)",labelloc=b]; + kilogram -> kilogram[color=red,label="174"]; + second[shape=box,style=filled,color=".9 0.5 0.9",label="second\ns\nsecond\n(time)",labelloc=b]; + second -> second[color=red,label="174"]; + square_metre[label="square_metre\nm²\nsquare metre\n(area)",labelloc=b]; + square_metre -> square_metre[color=red,label="351"]; + metre -> square_metre[dir=none]; + cubic_metre[label="cubic_metre\nm³\ncubic metre\n(volume)",labelloc=b]; + cubic_metre -> cubic_metre[color=red,label="348"]; + metre -> cubic_metre[dir=none]; + metre_per_second[label="metre_per_second\nm/s\nmetre per second\n(speed,velocity)",labelloc=b]; + metre_per_second -> metre_per_second[color=red,label="60552"]; + metre -> metre_per_second[dir=none]; + second -> metre_per_second[dir=none]; + cubic_metre_per_second[label="cubic_metre_per_second\nm³/s\ncubic metre per second\n(volumetric_flow)",labelloc=b]; + cubic_metre_per_second -> cubic_metre_per_second[color=red,label="60552"]; + cubic_metre -> cubic_metre_per_second[dir=none]; + second -> cubic_metre_per_second[dir=none]; + metre_per_second_squared[label="metre_per_second_squared\nm/s²\nMeter per second squared\n(acceleration)",labelloc=b]; + metre_per_second_squared -> metre_per_second_squared[color=red,label="10536049"]; + metre_per_second -> metre_per_second_squared[dir=none]; + second -> metre_per_second_squared[dir=none]; + metre_per_second_cubed[label="metre_per_second_cubed\nm/s²/s\nMeter per second squared per second\n(jerk,jolt,surge,lurch)",labelloc=b]; + metre_per_second_cubed -> metre_per_second_cubed[color=red,label="1833272526"]; + metre_per_second_squared -> metre_per_second_cubed[dir=none]; + second -> metre_per_second_cubed[dir=none]; + metre_per_quartic_second[label="metre_per_quartic_second\nm/s²/s/s\nMeter per second squared per second per second\n(snap,jounce)",labelloc=b]; + metre_per_quartic_second -> metre_per_quartic_second[color=red,label="318989419524"]; + metre_per_second_cubed -> metre_per_quartic_second[dir=none]; + second -> metre_per_quartic_second[dir=none]; + newton[label="newton\nN\nnewton\n(force,weight)",labelloc=b]; + newton -> newton[color=red,label="1833272527"]; + kilogram -> newton[dir=none]; + metre_per_second_squared -> newton[dir=none]; + kilogram_per_square_metre[label="kilogram_per_square_metre\ng/m²\ngram per square metre\n(area_density)",labelloc=b]; + kilogram_per_square_metre -> kilogram_per_square_metre[color=red,label="61074"]; + kilogram -> kilogram_per_square_metre[dir=none]; + square_metre -> kilogram_per_square_metre[dir=none]; + kilogram_per_cubic_metre[label="kilogram_per_cubic_metre\ng/m³\ngram per cubic metre\n(density,mass_density)",labelloc=b]; + kilogram_per_cubic_metre -> kilogram_per_cubic_metre[color=red,label="60552"]; + kilogram -> kilogram_per_cubic_metre[dir=none]; + cubic_metre -> kilogram_per_cubic_metre[dir=none]; + cubic_metre_per_kilogram[label="cubic_metre_per_kilogram\nm³/g\ncubic metre per gram\n(specific_volume)",labelloc=b]; + cubic_metre_per_kilogram -> cubic_metre_per_kilogram[color=red,label="60552"]; + cubic_metre -> cubic_metre_per_kilogram[dir=none]; + kilogram -> cubic_metre_per_kilogram[dir=none]; + mole_per_cubic_metre[label="mole_per_cubic_metre\nmol/m³\nmole per cubic metre\n(molarity)",labelloc=b]; + mole_per_cubic_metre -> mole_per_cubic_metre[color=red,label="10440"]; + mole -> mole_per_cubic_metre[dir=none]; + cubic_metre -> mole_per_cubic_metre[dir=none]; + cubic_metre_per_mole[label="cubic_metre_per_mole\nm³/mol\ncubic metre per mole\n(molar_volume)",labelloc=b]; + cubic_metre_per_mole -> cubic_metre_per_mole[color=red,label="10440"]; + cubic_metre -> cubic_metre_per_mole[dir=none]; + mole -> cubic_metre_per_mole[dir=none]; + newton_per_second[label="newton_per_second\nkg/m/s/s/s\nkilogram per metre per second per second per second\n(yank)",labelloc=b]; + newton_per_second -> newton_per_second[color=red,label="318989419698"]; + newton -> newton_per_second[dir=none]; + second -> newton_per_second[dir=none]; +Stats[shape=box,color=".9 0.2 0.8",label="unit groups: 21\ntotal units: 641656246143",labelloc=b]; +} +``` + + ### Building groups ``` java diff --git a/source/_posts/Working-on-DRL.md b/source/_posts/Working-on-DRL.md new file mode 100644 index 0000000..6696ffa --- /dev/null +++ b/source/_posts/Working-on-DRL.md @@ -0,0 +1,10 @@ +--- +title: Working on DRL +date: 2020-10-01 01:43:17 +tags: DRL +--- + +This year 2020 I started my own company named; distributedrebirth +There is some tech work there but that is not the main focus. + +site: http://DistributedRebirth.Love diff --git a/themes/custom/layout/layout.ejs b/themes/custom/layout/layout.ejs index 28b389a..462af3a 100644 --- a/themes/custom/layout/layout.ejs +++ b/themes/custom/layout/layout.ejs @@ -17,5 +17,34 @@ <%- js("https://cdn.jsdelivr.net/gh/meethigher/cdn@11/js/layer/layer.js") %> <%- js("js/meethigher.js") %> <%- js("js/toolbar.js") %> +<%- js("js/svg-pan-zoom.min.js") %> +<% if (theme.graphviz.enable) { %> + + +<% } %> \ No newline at end of file diff --git a/themes/custom/source/js/svg-pan-zoom.min.js b/themes/custom/source/js/svg-pan-zoom.min.js new file mode 100644 index 0000000..4904d12 --- /dev/null +++ b/themes/custom/source/js/svg-pan-zoom.min.js @@ -0,0 +1,3 @@ +// svg-pan-zoom v3.6.1 +// https://github.com/ariutta/svg-pan-zoom +!function s(r,a,l){function u(e,t){if(!a[e]){if(!r[e]){var o="function"==typeof require&&require;if(!t&&o)return o(e,!0);if(h)return h(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[e]={exports:{}};r[e][0].call(i.exports,function(t){return u(r[e][1][t]||t)},i,i.exports,s,r,a,l)}return a[e].exports}for(var h="function"==typeof require&&require,t=0;tthis.options.maxZoom*n.zoom&&(t=this.options.maxZoom*n.zoom/this.getZoom());var i=this.viewport.getCTM(),s=e.matrixTransform(i.inverse()),r=this.svg.createSVGMatrix().translate(s.x,s.y).scale(t).translate(-s.x,-s.y),a=i.multiply(r);a.a!==i.a&&this.viewport.setCTM(a)},i.prototype.zoom=function(t,e){this.zoomAtPoint(t,a.getSvgCenterPoint(this.svg,this.width,this.height),e)},i.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)},i.prototype.publicZoomAtPoint=function(t,e,o){if(o&&(t=this.computeFromRelativeZoom(t)),"SVGPoint"!==r.getType(e)){if(!("x"in e&&"y"in e))throw new Error("Given point is invalid");e=a.createSVGPoint(this.svg,e.x,e.y)}this.zoomAtPoint(t,e,o)},i.prototype.getZoom=function(){return this.viewport.getZoom()},i.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},i.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom},i.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)},i.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},i.prototype.reset=function(){this.resetZoom(),this.resetPan()},i.prototype.handleDblClick=function(t){var e;if((this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled)&&-1<(t.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control"))return!1;e=t.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var o=a.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(e,o)},i.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),r.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&r.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))},i.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var e=a.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),o=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(o)}},i.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&(this.state="none")},i.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)},i.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)},i.prototype.center=function(){var t=this.viewport.getViewBox(),e=.5*(this.width-(t.width+2*t.x)*this.getZoom()),o=.5*(this.height-(t.height+2*t.y)*this.getZoom());this.getPublicInstance().pan({x:e,y:o})},i.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},i.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)},i.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)},i.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}},i.prototype.resize=function(){var t=a.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},i.prototype.destroy=function(){var e=this;for(var t in this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,(this.onUpdatedCTM=null)!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()}),this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!this.options.preventMouseEventsDefault&&h);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},i.prototype.getPublicInstance=function(){var o=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return o.options.panEnabled=!0,o.pi},disablePan:function(){return o.options.panEnabled=!1,o.pi},isPanEnabled:function(){return!!o.options.panEnabled},pan:function(t){return o.pan(t),o.pi},panBy:function(t){return o.panBy(t),o.pi},getPan:function(){return o.getPan()},setBeforePan:function(t){return o.options.beforePan=null===t?null:r.proxy(t,o.publicInstance),o.pi},setOnPan:function(t){return o.options.onPan=null===t?null:r.proxy(t,o.publicInstance),o.pi},enableZoom:function(){return o.options.zoomEnabled=!0,o.pi},disableZoom:function(){return o.options.zoomEnabled=!1,o.pi},isZoomEnabled:function(){return!!o.options.zoomEnabled},enableControlIcons:function(){return o.options.controlIconsEnabled||(o.options.controlIconsEnabled=!0,s.enable(o)),o.pi},disableControlIcons:function(){return o.options.controlIconsEnabled&&(o.options.controlIconsEnabled=!1,s.disable(o)),o.pi},isControlIconsEnabled:function(){return!!o.options.controlIconsEnabled},enableDblClickZoom:function(){return o.options.dblClickZoomEnabled=!0,o.pi},disableDblClickZoom:function(){return o.options.dblClickZoomEnabled=!1,o.pi},isDblClickZoomEnabled:function(){return!!o.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return o.enableMouseWheelZoom(),o.pi},disableMouseWheelZoom:function(){return o.disableMouseWheelZoom(),o.pi},isMouseWheelZoomEnabled:function(){return!!o.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return o.options.zoomScaleSensitivity=t,o.pi},setMinZoom:function(t){return o.options.minZoom=t,o.pi},setMaxZoom:function(t){return o.options.maxZoom=t,o.pi},setBeforeZoom:function(t){return o.options.beforeZoom=null===t?null:r.proxy(t,o.publicInstance),o.pi},setOnZoom:function(t){return o.options.onZoom=null===t?null:r.proxy(t,o.publicInstance),o.pi},zoom:function(t){return o.publicZoom(t,!0),o.pi},zoomBy:function(t){return o.publicZoom(t,!1),o.pi},zoomAtPoint:function(t,e){return o.publicZoomAtPoint(t,e,!0),o.pi},zoomAtPointBy:function(t,e){return o.publicZoomAtPoint(t,e,!1),o.pi},zoomIn:function(){return this.zoomBy(1+o.options.zoomScaleSensitivity),o.pi},zoomOut:function(){return this.zoomBy(1/(1+o.options.zoomScaleSensitivity)),o.pi},getZoom:function(){return o.getRelativeZoom()},setOnUpdatedCTM:function(t){return o.options.onUpdatedCTM=null===t?null:r.proxy(t,o.publicInstance),o.pi},resetZoom:function(){return o.resetZoom(),o.pi},resetPan:function(){return o.resetPan(),o.pi},reset:function(){return o.reset(),o.pi},fit:function(){return o.fit(),o.pi},contain:function(){return o.contain(),o.pi},center:function(){return o.center(),o.pi},updateBBox:function(){return o.updateBBox(),o.pi},resize:function(){return o.resize(),o.pi},getSizes:function(){return{width:o.width,height:o.height,realZoom:o.getZoom(),viewBox:o.viewport.getViewBox()}},destroy:function(){return o.destroy(),o.pi}}),this.publicInstance};var c=[];e.exports=function(t,e){var o=r.getSvg(t);if(null===o)return null;for(var n=c.length-1;0<=n;n--)if(c[n].svg===o)return c[n].instance.getPublicInstance();return c.push({svg:o,instance:new i(o,e)}),c[c.length-1].instance.getPublicInstance()}},{"./control-icons":1,"./shadow-viewport":2,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(t,e,o){var l=t("./utilities"),s="unknown";document.documentMode&&(s="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var o=null;if(!(o=l.isElement(e)?e:t.querySelector(e))){var n=Array.prototype.slice.call(t.childNodes||t.children).filter(function(t){return"defs"!==t.nodeName&&"#text"!==t.nodeName});1===n.length&&"g"===n[0].nodeName&&null===n[0].getAttribute("transform")&&(o=n[0])}if(!o){var i="viewport-"+(new Date).toISOString().replace(/\D/g,"");(o=document.createElementNS(this.svgNS,"g")).setAttribute("id",i);var s=t.childNodes||t.children;if(s&&0