- Introduced blog routing using Next.js App Router - Implemented dynamic [slug] pages for blog posts - Added MDX-based content loading via lib/posts - Integrated shared TopBar layout with navigation - Established clear content, lib and component separation
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(()=>{var t={104:function(t){(function(e){"use strict";const r="(0?\\d+|0x[a-f0-9]+)";const n={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")};const i=new RegExp(`^0[0-7]+$`,"i");const s=new RegExp(`^0x[a-f0-9]+$`,"i");const o="%[0-9a-z]{1,}";const a="(?:[0-9a-f]+::?)+";const p={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${r}\\.${r}\\.${r}\\.${r}(${o})?$`,"i")};function expandIPv6(t,e){if(t.indexOf("::")!==t.lastIndexOf("::")){return null}let r=0;let n=-1;let i=(t.match(p.zoneIndex)||[])[0];let s,o;if(i){i=i.substring(1);t=t.replace(/%.+$/,"")}while((n=t.indexOf(":",n+1))>=0){r++}if(t.substr(0,2)==="::"){r--}if(t.substr(-2,2)==="::"){r--}if(r>e){return null}o=e-r;s=":";while(o--){s+="0:"}t=t.replace("::",s);if(t[0]===":"){t=t.slice(1)}if(t[t.length-1]===":"){t=t.slice(0,-1)}e=function(){const e=t.split(":");const r=[];for(let t=0;t<e.length;t++){r.push(parseInt(e[t],16))}return r}();return{parts:e,zoneId:i}}function matchCIDR(t,e,r,n){if(t.length!==e.length){throw new Error("ipaddr: cannot match CIDR for objects with different lengths")}let i=0;let s;while(n>0){s=r-n;if(s<0){s=0}if(t[i]>>s!==e[i]>>s){return false}n-=r;i+=1}return true}function parseIntAuto(t){if(s.test(t)){return parseInt(t,16)}if(t[0]==="0"&&!isNaN(parseInt(t[1],10))){if(i.test(t)){return parseInt(t,8)}throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function padPart(t,e){while(t.length<e){t=`0${t}`}return t}const u={};u.IPv4=function(){function IPv4(t){if(t.length!==4){throw new Error("ipaddr: ipv4 octet count should be 4")}let e,r;for(e=0;e<t.length;e++){r=t[e];if(!(0<=r&&r<=255)){throw new Error("ipaddr: ipv4 octet should fit in 8 bits")}}this.octets=t}IPv4.prototype.SpecialRanges={unspecified:[[new IPv4([0,0,0,0]),8]],broadcast:[[new IPv4([255,255,255,255]),32]],multicast:[[new IPv4([224,0,0,0]),4]],linkLocal:[[new IPv4([169,254,0,0]),16]],loopback:[[new IPv4([127,0,0,0]),8]],carrierGradeNat:[[new IPv4([100,64,0,0]),10]],private:[[new IPv4([10,0,0,0]),8],[new IPv4([172,16,0,0]),12],[new IPv4([192,168,0,0]),16]],reserved:[[new IPv4([192,0,0,0]),24],[new IPv4([192,0,2,0]),24],[new IPv4([192,88,99,0]),24],[new IPv4([198,18,0,0]),15],[new IPv4([198,51,100,0]),24],[new IPv4([203,0,113,0]),24],[new IPv4([240,0,0,0]),4]],as112:[[new IPv4([192,175,48,0]),24],[new IPv4([192,31,196,0]),24]],amt:[[new IPv4([192,52,193,0]),24]]};IPv4.prototype.kind=function(){return"ipv4"};IPv4.prototype.match=function(t,e){let r;if(e===undefined){r=t;t=r[0];e=r[1]}if(t.kind()!=="ipv4"){throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one")}return matchCIDR(this.octets,t.octets,8,e)};IPv4.prototype.prefixLengthFromSubnetMask=function(){let t=0;let e=false;const r={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let n,i,s;for(n=3;n>=0;n-=1){i=this.octets[n];if(i in r){s=r[i];if(e&&s!==0){return null}if(s!==8){e=true}t+=s}else{return null}}return 32-t};IPv4.prototype.range=function(){return u.subnetMatch(this,this.SpecialRanges)};IPv4.prototype.toByteArray=function(){return this.octets.slice(0)};IPv4.prototype.toIPv4MappedAddress=function(){return u.IPv6.parse(`::ffff:${this.toString()}`)};IPv4.prototype.toNormalizedString=function(){return this.toString()};IPv4.prototype.toString=function(){return this.octets.join(".")};return IPv4}();u.IPv4.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t);const r=e[0].toByteArray();const n=this.subnetMaskFromPrefixLength(e[1]).toByteArray();const i=[];let s=0;while(s<4){i.push(parseInt(r[s],10)|parseInt(n[s],10)^255);s++}return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}};u.IPv4.isIPv4=function(t){return this.parser(t)!==null};u.IPv4.isValid=function(t){try{new this(this.parser(t));return true}catch(t){return false}};u.IPv4.isValidCIDR=function(t){try{this.parseCIDR(t);return true}catch(t){return false}};u.IPv4.isValidFourPartDecimal=function(t){if(u.IPv4.isValid(t)&&t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)){return true}else{return false}};u.IPv4.networkAddressFromCIDR=function(t){let e,r,n,i,s;try{e=this.parseCIDR(t);n=e[0].toByteArray();s=this.subnetMaskFromPrefixLength(e[1]).toByteArray();i=[];r=0;while(r<4){i.push(parseInt(n[r],10)&parseInt(s[r],10));r++}return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}};u.IPv4.parse=function(t){const e=this.parser(t);if(e===null){throw new Error("ipaddr: string is not formatted like an IPv4 Address")}return new this(e)};u.IPv4.parseCIDR=function(t){let e;if(e=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(e[2]);if(t>=0&&t<=32){const r=[this.parse(e[1]),t];Object.defineProperty(r,"toString",{value:function(){return this.join("/")}});return r}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")};u.IPv4.parser=function(t){let e,r,i;if(e=t.match(n.fourOctet)){return function(){const t=e.slice(1,6);const n=[];for(let e=0;e<t.length;e++){r=t[e];n.push(parseIntAuto(r))}return n}()}else if(e=t.match(n.longValue)){i=parseIntAuto(e[1]);if(i>4294967295||i<0){throw new Error("ipaddr: address outside defined range")}return function(){const t=[];let e;for(e=0;e<=24;e+=8){t.push(i>>e&255)}return t}().reverse()}else if(e=t.match(n.twoOctet)){return function(){const t=e.slice(1,4);const r=[];i=parseIntAuto(t[1]);if(i>16777215||i<0){throw new Error("ipaddr: address outside defined range")}r.push(parseIntAuto(t[0]));r.push(i>>16&255);r.push(i>>8&255);r.push(i&255);return r}()}else if(e=t.match(n.threeOctet)){return function(){const t=e.slice(1,5);const r=[];i=parseIntAuto(t[2]);if(i>65535||i<0){throw new Error("ipaddr: address outside defined range")}r.push(parseIntAuto(t[0]));r.push(parseIntAuto(t[1]));r.push(i>>8&255);r.push(i&255);return r}()}else{return null}};u.IPv4.subnetMaskFromPrefixLength=function(t){t=parseInt(t);if(t<0||t>32){throw new Error("ipaddr: invalid IPv4 prefix length")}const e=[0,0,0,0];let r=0;const n=Math.floor(t/8);while(r<n){e[r]=255;r++}if(n<4){e[n]=Math.pow(2,t%8)-1<<8-t%8}return new this(e)};u.IPv6=function(){function IPv6(t,e){let r,n;if(t.length===16){this.parts=[];for(r=0;r<=14;r+=2){this.parts.push(t[r]<<8|t[r+1])}}else if(t.length===8){this.parts=t}else{throw new Error("ipaddr: ipv6 part count should be 8 or 16")}for(r=0;r<this.parts.length;r++){n=this.parts[r];if(!(0<=n&&n<=65535)){throw new Error("ipaddr: ipv6 part should fit in 16 bits")}}if(e){this.zoneId=e}}IPv6.prototype.SpecialRanges={unspecified:[new IPv6([0,0,0,0,0,0,0,0]),128],linkLocal:[new IPv6([65152,0,0,0,0,0,0,0]),10],multicast:[new IPv6([65280,0,0,0,0,0,0,0]),8],loopback:[new IPv6([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new IPv6([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new IPv6([0,0,0,0,0,65535,0,0]),96],discard:[new IPv6([256,0,0,0,0,0,0,0]),64],rfc6145:[new IPv6([0,0,0,0,65535,0,0,0]),96],rfc6052:[new IPv6([100,65435,0,0,0,0,0,0]),96],"6to4":[new IPv6([8194,0,0,0,0,0,0,0]),16],teredo:[new IPv6([8193,0,0,0,0,0,0,0]),32],benchmarking:[new IPv6([8193,2,0,0,0,0,0,0]),48],amt:[new IPv6([8193,3,0,0,0,0,0,0]),32],as112v6:[[new IPv6([8193,4,274,0,0,0,0,0]),48],[new IPv6([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new IPv6([8193,16,0,0,0,0,0,0]),28],orchid2:[new IPv6([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new IPv6([8193,48,0,0,0,0,0,0]),28],reserved:[[new IPv6([8193,0,0,0,0,0,0,0]),23],[new IPv6([8193,3512,0,0,0,0,0,0]),32]]};IPv6.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"};IPv6.prototype.kind=function(){return"ipv6"};IPv6.prototype.match=function(t,e){let r;if(e===undefined){r=t;t=r[0];e=r[1]}if(t.kind()!=="ipv6"){throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one")}return matchCIDR(this.parts,t.parts,16,e)};IPv6.prototype.prefixLengthFromSubnetMask=function(){let t=0;let e=false;const r={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let n,i;for(let s=7;s>=0;s-=1){n=this.parts[s];if(n in r){i=r[n];if(e&&i!==0){return null}if(i!==16){e=true}t+=i}else{return null}}return 128-t};IPv6.prototype.range=function(){return u.subnetMatch(this,this.SpecialRanges)};IPv6.prototype.toByteArray=function(){let t;const e=[];const r=this.parts;for(let n=0;n<r.length;n++){t=r[n];e.push(t>>8);e.push(t&255)}return e};IPv6.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++){t.push(padPart(this.parts[e].toString(16),4))}return t}.call(this).join(":");let e="";if(this.zoneId){e=`%${this.zoneId}`}return t+e};IPv6.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress()){throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4")}const t=this.parts.slice(-2);const e=t[0];const r=t[1];return new u.IPv4([e>>8,e&255,r>>8,r&255])};IPv6.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++){t.push(this.parts[e].toString(16))}return t}.call(this).join(":");let e="";if(this.zoneId){e=`%${this.zoneId}`}return t+e};IPv6.prototype.toRFC5952String=function(){const t=/((^|:)(0(:|$)){2,})/g;const e=this.toNormalizedString();let r=0;let n=-1;let i;while(i=t.exec(e)){if(i[0].length>n){r=i.index;n=i[0].length}}if(n<0){return e}return`${e.substring(0,r)}::${e.substring(r+n)}`};IPv6.prototype.toString=function(){return this.toRFC5952String()};return IPv6}();u.IPv6.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t);const r=e[0].toByteArray();const n=this.subnetMaskFromPrefixLength(e[1]).toByteArray();const i=[];let s=0;while(s<16){i.push(parseInt(r[s],10)|parseInt(n[s],10)^255);s++}return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}};u.IPv6.isIPv6=function(t){return this.parser(t)!==null};u.IPv6.isValid=function(t){if(typeof t==="string"&&t.indexOf(":")===-1){return false}try{const e=this.parser(t);new this(e.parts,e.zoneId);return true}catch(t){return false}};u.IPv6.isValidCIDR=function(t){if(typeof t==="string"&&t.indexOf(":")===-1){return false}try{this.parseCIDR(t);return true}catch(t){return false}};u.IPv6.networkAddressFromCIDR=function(t){let e,r,n,i,s;try{e=this.parseCIDR(t);n=e[0].toByteArray();s=this.subnetMaskFromPrefixLength(e[1]).toByteArray();i=[];r=0;while(r<16){i.push(parseInt(n[r],10)&parseInt(s[r],10));r++}return new this(i)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}};u.IPv6.parse=function(t){const e=this.parser(t);if(e.parts===null){throw new Error("ipaddr: string is not formatted like an IPv6 Address")}return new this(e.parts,e.zoneId)};u.IPv6.parseCIDR=function(t){let e,r,n;if(r=t.match(/^(.+)\/(\d+)$/)){e=parseInt(r[2]);if(e>=0&&e<=128){n=[this.parse(r[1]),e];Object.defineProperty(n,"toString",{value:function(){return this.join("/")}});return n}}throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")};u.IPv6.parser=function(t){let e,r,n,i,s,o;if(n=t.match(p.deprecatedTransitional)){return this.parser(`::ffff:${n[1]}`)}if(p.native.test(t)){return expandIPv6(t,8)}if(n=t.match(p.transitional)){o=n[6]||"";e=n[1];if(!n[1].endsWith("::")){e=e.slice(0,-1)}e=expandIPv6(e+o,6);if(e.parts){s=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])];for(r=0;r<s.length;r++){i=s[r];if(!(0<=i&&i<=255)){return null}}e.parts.push(s[0]<<8|s[1]);e.parts.push(s[2]<<8|s[3]);return{parts:e.parts,zoneId:e.zoneId}}}return null};u.IPv6.subnetMaskFromPrefixLength=function(t){t=parseInt(t);if(t<0||t>128){throw new Error("ipaddr: invalid IPv6 prefix length")}const e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let r=0;const n=Math.floor(t/8);while(r<n){e[r]=255;r++}if(n<16){e[n]=Math.pow(2,t%8)-1<<8-t%8}return new this(e)};u.fromByteArray=function(t){const e=t.length;if(e===4){return new u.IPv4(t)}else if(e===16){return new u.IPv6(t)}else{throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")}};u.isValid=function(t){return u.IPv6.isValid(t)||u.IPv4.isValid(t)};u.isValidCIDR=function(t){return u.IPv6.isValidCIDR(t)||u.IPv4.isValidCIDR(t)};u.parse=function(t){if(u.IPv6.isValid(t)){return u.IPv6.parse(t)}else if(u.IPv4.isValid(t)){return u.IPv4.parse(t)}else{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")}};u.parseCIDR=function(t){try{return u.IPv6.parseCIDR(t)}catch(e){try{return u.IPv4.parseCIDR(t)}catch(t){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}};u.process=function(t){const e=this.parse(t);if(e.kind()==="ipv6"&&e.isIPv4MappedAddress()){return e.toIPv4Address()}else{return e}};u.subnetMatch=function(t,e,r){let n,i,s,o;if(r===undefined||r===null){r="unicast"}for(i in e){if(Object.prototype.hasOwnProperty.call(e,i)){s=e[i];if(s[0]&&!(s[0]instanceof Array)){s=[s]}for(n=0;n<s.length;n++){o=s[n];if(t.kind()===o[0].kind()&&t.match.apply(t,o)){return i}}}}return r};if(true&&t.exports){t.exports=u}else{e.ipaddr=u}})(this)}};var e={};function __nccwpck_require__(r){var n=e[r];if(n!==undefined){return n.exports}var i=e[r]={exports:{}};var s=true;try{t[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete e[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(104);module.exports=r})(); |