From 050a8e9cecfd6bc681a449db11b901060cd60a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Fri, 2 Aug 2024 20:05:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=B9=81=E4=BD=93=E5=AD=97=20=20=E2=80=9C?= =?UTF-8?q?=E5=B2=B3=E2=80=9D=E5=AD=97=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/lang/relationship-mode.zh-HK.min.js | 2 +- dist/lang/relationship-mode.zh-HK.min.mjs | 2 +- dist/lang/relationship.zh-HK.min.js | 4 +- dist/lang/relationship.zh-HK.min.mjs | 4 +- dist/relationship-mode.min.js | 2 +- dist/relationship-mode.min.mjs | 2 +- dist/relationship.min.js | 2 +- dist/relationship.min.mjs | 2 +- gulpfile.js | 2 + package-lock.json | 309 +++++++++++++++++++++- package.json | 3 +- 11 files changed, 321 insertions(+), 13 deletions(-) diff --git a/dist/lang/relationship-mode.zh-HK.min.js b/dist/lang/relationship-mode.zh-HK.min.js index 65b30da7..afb97d88 100644 --- a/dist/lang/relationship-mode.zh-HK.min.js +++ b/dist/lang/relationship-mode.zh-HK.min.js @@ -1 +1 @@ -!function(f,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(f="undefined"!=typeof globalThis?globalThis:f||self).relationshipMode=s()}(this,(function(){"use strict";function f(s){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},f(s)}function s(s){var m=function(s,m){if("object"!==f(s)||null===s)return s;var o=s[Symbol.toPrimitive];if(void 0!==o){var d=o.call(s,m||"default");if("object"!==f(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===m?String:Number)(s)}(s,"string");return"symbol"===f(m)?m:String(m)}function m(f,m,o){return(m=s(m))in f?Object.defineProperty(f,m,{value:o,enumerable:!0,configurable:!0,writable:!0}):f[m]=o,f}var o;return{guangdong:{name:"廣東",data:(o={f:["老竇"],"f,f":["阿爺"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿嬸"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨媽"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},m(o,"0,m,xb,d,s",["姨姨甥"]),m(o,"1,m,xb,d,s",["姨外甥"]),m(o,"0,m,xb,d,d",["姨姨甥女"]),m(o,"1,m,xb,d,d",["姨外甥女"]),m(o,"ob",["大佬"]),m(o,"ob,w",["阿嫂"]),m(o,"lb",["細佬"]),m(o,"lb,w",["弟婦"]),m(o,"xb,s",["侄"]),m(o,"xb,d",["侄女"]),m(o,"os",["家姐"]),m(o,"os,h",["姐夫"]),m(o,"ls",["阿妹"]),m(o,"ls,h",["妹夫"]),m(o,"0,xs,s",["姨甥"]),m(o,"1,xs,s",["外甥"]),m(o,"0,xs,d",["姨甥女"]),m(o,"1,xs,d",["外甥女"]),m(o,"s",["仔"]),m(o,"s,w",["新婦"]),m(o,"s,s",["孫"]),m(o,"s,s,w",["孫新婦"]),m(o,"s,s,s",["息仔"]),m(o,"s,s,d",["息女"]),m(o,"s,d",["孫女"]),m(o,"s,d,h",["孫女婿"]),m(o,"s,d,s",["外息仔"]),m(o,"s,d,d",["外息女"]),m(o,"d",["女"]),m(o,"d,s",["外孫"]),m(o,"d,s,w",["外孫新婦"]),m(o,"d,s,s",["外息仔"]),m(o,"d,s,d",["外息女"]),m(o,"d,d",["外孫女"]),m(o,"d,d,h",["外孫女婿"]),m(o,"d,d,s",["外息仔"]),m(o,"d,d,d",["外息女"]),o)},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爺"],"m,m,xb":["舅姥爺"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爺"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爺"],"m,f,ob":["大姥爺"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爺"],"m,f,lb,w":["小姥姥"],"f,ob":["大爺"],"f,ob,w":["大娘"]}}}})); +!function(f,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(f="undefined"!=typeof globalThis?globalThis:f||self).relationshipMode=s()}(this,(function(){"use strict";function f(s){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},f(s)}function s(s){var m=function(s,m){if("object"!=f(s)||!s)return s;var o=s[Symbol.toPrimitive];if(void 0!==o){var d=o.call(s,m||"default");if("object"!=f(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===m?String:Number)(s)}(s,"string");return"symbol"==f(m)?m:m+""}function m(f,m,o){return(m=s(m))in f?Object.defineProperty(f,m,{value:o,enumerable:!0,configurable:!0,writable:!0}):f[m]=o,f}var o;return{guangdong:{name:"廣東",data:(o={f:["老竇"],"f,f":["阿爺"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿嬸"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨媽"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},m(m(m(m(m(m(m(m(m(m(o,"0,m,xb,d,s",["姨姨甥"]),"1,m,xb,d,s",["姨外甥"]),"0,m,xb,d,d",["姨姨甥女"]),"1,m,xb,d,d",["姨外甥女"]),"ob",["大佬"]),"ob,w",["阿嫂"]),"lb",["細佬"]),"lb,w",["弟婦"]),"xb,s",["侄"]),"xb,d",["侄女"]),m(m(m(m(m(m(m(m(m(m(o,"os",["家姐"]),"os,h",["姐夫"]),"ls",["阿妹"]),"ls,h",["妹夫"]),"0,xs,s",["姨甥"]),"1,xs,s",["外甥"]),"0,xs,d",["姨甥女"]),"1,xs,d",["外甥女"]),"s",["仔"]),"s,w",["新婦"]),m(m(m(m(m(m(m(m(m(m(o,"s,s",["孫"]),"s,s,w",["孫新婦"]),"s,s,s",["息仔"]),"s,s,d",["息女"]),"s,d",["孫女"]),"s,d,h",["孫女婿"]),"s,d,s",["外息仔"]),"s,d,d",["外息女"]),"d",["女"]),"d,s",["外孫"]),m(m(m(m(m(m(m(o,"d,s,w",["外孫新婦"]),"d,s,s",["外息仔"]),"d,s,d",["外息女"]),"d,d",["外孫女"]),"d,d,h",["外孫女婿"]),"d,d,s",["外息仔"]),"d,d,d",["外息女"]))},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爺"],"m,m,xb":["舅姥爺"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爺"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爺"],"m,f,ob":["大姥爺"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爺"],"m,f,lb,w":["小姥姥"],"f,ob":["大爺"],"f,ob,w":["大娘"]}}}})); diff --git a/dist/lang/relationship-mode.zh-HK.min.mjs b/dist/lang/relationship-mode.zh-HK.min.mjs index 8376c21a..0b737f66 100644 --- a/dist/lang/relationship-mode.zh-HK.min.mjs +++ b/dist/lang/relationship-mode.zh-HK.min.mjs @@ -1 +1 @@ -function m(s){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},m(s)}function s(s){var f=function(s,f){if("object"!==m(s)||null===s)return s;var d=s[Symbol.toPrimitive];if(void 0!==d){var o=d.call(s,f||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(s)}(s,"string");return"symbol"===m(f)?f:String(f)}function f(m,f,d){return(f=s(f))in m?Object.defineProperty(m,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):m[f]=d,m}var d,o={guangdong:{name:"廣東",data:(d={f:["老竇"],"f,f":["阿爺"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿嬸"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨媽"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},f(d,"0,m,xb,d,s",["姨姨甥"]),f(d,"1,m,xb,d,s",["姨外甥"]),f(d,"0,m,xb,d,d",["姨姨甥女"]),f(d,"1,m,xb,d,d",["姨外甥女"]),f(d,"ob",["大佬"]),f(d,"ob,w",["阿嫂"]),f(d,"lb",["細佬"]),f(d,"lb,w",["弟婦"]),f(d,"xb,s",["侄"]),f(d,"xb,d",["侄女"]),f(d,"os",["家姐"]),f(d,"os,h",["姐夫"]),f(d,"ls",["阿妹"]),f(d,"ls,h",["妹夫"]),f(d,"0,xs,s",["姨甥"]),f(d,"1,xs,s",["外甥"]),f(d,"0,xs,d",["姨甥女"]),f(d,"1,xs,d",["外甥女"]),f(d,"s",["仔"]),f(d,"s,w",["新婦"]),f(d,"s,s",["孫"]),f(d,"s,s,w",["孫新婦"]),f(d,"s,s,s",["息仔"]),f(d,"s,s,d",["息女"]),f(d,"s,d",["孫女"]),f(d,"s,d,h",["孫女婿"]),f(d,"s,d,s",["外息仔"]),f(d,"s,d,d",["外息女"]),f(d,"d",["女"]),f(d,"d,s",["外孫"]),f(d,"d,s,w",["外孫新婦"]),f(d,"d,s,s",["外息仔"]),f(d,"d,s,d",["外息女"]),f(d,"d,d",["外孫女"]),f(d,"d,d,h",["外孫女婿"]),f(d,"d,d,s",["外息仔"]),f(d,"d,d,d",["外息女"]),d)},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爺"],"m,m,xb":["舅姥爺"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爺"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爺"],"m,f,ob":["大姥爺"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爺"],"m,f,lb,w":["小姥姥"],"f,ob":["大爺"],"f,ob,w":["大娘"]}}};export{o as default}; +function m(s){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},m(s)}function s(s){var f=function(s,f){if("object"!=m(s)||!s)return s;var d=s[Symbol.toPrimitive];if(void 0!==d){var o=d.call(s,f||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(s)}(s,"string");return"symbol"==m(f)?f:f+""}function f(m,f,d){return(f=s(f))in m?Object.defineProperty(m,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):m[f]=d,m}var d,o={guangdong:{name:"廣東",data:(d={f:["老竇"],"f,f":["阿爺"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿嬸"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨媽"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},f(f(f(f(f(f(f(f(f(f(d,"0,m,xb,d,s",["姨姨甥"]),"1,m,xb,d,s",["姨外甥"]),"0,m,xb,d,d",["姨姨甥女"]),"1,m,xb,d,d",["姨外甥女"]),"ob",["大佬"]),"ob,w",["阿嫂"]),"lb",["細佬"]),"lb,w",["弟婦"]),"xb,s",["侄"]),"xb,d",["侄女"]),f(f(f(f(f(f(f(f(f(f(d,"os",["家姐"]),"os,h",["姐夫"]),"ls",["阿妹"]),"ls,h",["妹夫"]),"0,xs,s",["姨甥"]),"1,xs,s",["外甥"]),"0,xs,d",["姨甥女"]),"1,xs,d",["外甥女"]),"s",["仔"]),"s,w",["新婦"]),f(f(f(f(f(f(f(f(f(f(d,"s,s",["孫"]),"s,s,w",["孫新婦"]),"s,s,s",["息仔"]),"s,s,d",["息女"]),"s,d",["孫女"]),"s,d,h",["孫女婿"]),"s,d,s",["外息仔"]),"s,d,d",["外息女"]),"d",["女"]),"d,s",["外孫"]),f(f(f(f(f(f(f(d,"d,s,w",["外孫新婦"]),"d,s,s",["外息仔"]),"d,s,d",["外息女"]),"d,d",["外孫女"]),"d,d,h",["外孫女婿"]),"d,d,s",["外息仔"]),"d,d,d",["外息女"]))},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爺"],"m,m,xb":["舅姥爺"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爺"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爺"],"m,f,ob":["大姥爺"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爺"],"m,f,lb,w":["小姥姥"],"f,ob":["大爺"],"f,ob,w":["大娘"]}}};export{o as default}; diff --git a/dist/lang/relationship.zh-HK.min.js b/dist/lang/relationship.zh-HK.min.js index 248943a3..9297c42b 100644 --- a/dist/lang/relationship.zh-HK.min.js +++ b/dist/lang/relationship.zh-HK.min.js @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/relationship * - * Created on: 2024-07-31 + * Created on: 2024-08-02 */ -!function(s,f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define(f):(s="undefined"!=typeof globalThis?globalThis:s||self).relationship=f()}(this,(function(){"use strict";function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,e=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){e=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(e)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","親兄弟","同胞兄弟"],"xb,w":["兄弟媳婦","兄弟婦"],xs:["姐妹","親姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["從祖祖父","從祖父"],"f,f,xb,w":["從祖祖母","從祖母"],"m,f,xb":["外從祖祖父"],"m,f,xb,w":["外從祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","嬸子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var e=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");e.push({selector:x,sex:m})}))}))})),e}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var e=b.value;if((d=d.replace(e.exp,e.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return T(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),e=f.replace(/&[ol]/g,"");for(var h in t){var l=h.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[h][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[h][0]),(n.includes(r)&&a.includes(e)||n.includes(e)&&a.includes(r))&&m.push(t[h][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};return Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)},Y})); +!function(s,f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define(f):(s="undefined"!=typeof globalThis?globalThis:s||self).relationship=f()}(this,(function(){"use strict";function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,e=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){e=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(e)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","親兄弟","同胞兄弟"],"xb,w":["兄弟媳婦","兄弟婦"],xs:["姐妹","親姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["從祖祖父","從祖父"],"f,f,xb,w":["從祖祖母","從祖母"],"m,f,xb":["外從祖祖父"],"m,f,xb,w":["外從祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","嬸子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var e=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");e.push({selector:x,sex:m})}))}))})),e}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var e=b.value;if((d=d.replace(e.exp,e.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return T(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),e=f.replace(/&[ol]/g,"");for(var h in t){var l=h.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[h][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[h][0]),(n.includes(r)&&a.includes(e)||n.includes(e)&&a.includes(r))&&m.push(t[h][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};return Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)},Y})); diff --git a/dist/lang/relationship.zh-HK.min.mjs b/dist/lang/relationship.zh-HK.min.mjs index 4ab5f293..b0d68948 100644 --- a/dist/lang/relationship.zh-HK.min.mjs +++ b/dist/lang/relationship.zh-HK.min.mjs @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/relationship * - * Created on: 2024-07-31 + * Created on: 2024-08-02 */ -function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,h=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){h=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(h)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","親兄弟","同胞兄弟"],"xb,w":["兄弟媳婦","兄弟婦"],xs:["姐妹","親姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["從祖祖父","從祖父"],"f,f,xb,w":["從祖祖母","從祖母"],"m,f,xb":["外從祖祖父"],"m,f,xb,w":["外從祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","嬸子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var h=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");h.push({selector:x,sex:m})}))}))})),h}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var h=b.value;if((d=d.replace(h.exp,h.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return C(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),h=f.replace(/&[ol]/g,"");for(var e in t){var l=e.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[e][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[e][0]),(n.includes(r)&&a.includes(h)||n.includes(h)&&a.includes(r))&&m.push(t[e][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)};export{Y as default}; +function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,h=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){h=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(h)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","親兄弟","同胞兄弟"],"xb,w":["兄弟媳婦","兄弟婦"],xs:["姐妹","親姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["從祖祖父","從祖父"],"f,f,xb,w":["從祖祖母","從祖母"],"m,f,xb":["外從祖祖父"],"m,f,xb,w":["外從祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","嬸子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var h=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");h.push({selector:x,sex:m})}))}))})),h}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var h=b.value;if((d=d.replace(h.exp,h.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return C(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),h=f.replace(/&[ol]/g,"");for(var e in t){var l=e.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[e][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[e][0]),(n.includes(r)&&a.includes(h)||n.includes(h)&&a.includes(r))&&m.push(t[e][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)};export{Y as default}; diff --git a/dist/relationship-mode.min.js b/dist/relationship-mode.min.js index 0e72c621..c1ebdf4f 100644 --- a/dist/relationship-mode.min.js +++ b/dist/relationship-mode.min.js @@ -1 +1 @@ -!function(f,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(f="undefined"!=typeof globalThis?globalThis:f||self).relationshipMode=s()}(this,(function(){"use strict";function f(s){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},f(s)}function s(s){var m=function(s,m){if("object"!==f(s)||null===s)return s;var o=s[Symbol.toPrimitive];if(void 0!==o){var d=o.call(s,m||"default");if("object"!==f(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===m?String:Number)(s)}(s,"string");return"symbol"===f(m)?m:String(m)}function m(f,m,o){return(m=s(m))in f?Object.defineProperty(f,m,{value:o,enumerable:!0,configurable:!0,writable:!0}):f[m]=o,f}var o;return{guangdong:{name:"广东",data:(o={f:["老窦"],"f,f":["阿爷"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿婶"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨妈"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},m(o,"0,m,xb,d,s",["姨姨甥"]),m(o,"1,m,xb,d,s",["姨外甥"]),m(o,"0,m,xb,d,d",["姨姨甥女"]),m(o,"1,m,xb,d,d",["姨外甥女"]),m(o,"ob",["大佬"]),m(o,"ob,w",["阿嫂"]),m(o,"lb",["细佬"]),m(o,"lb,w",["弟妇"]),m(o,"xb,s",["侄"]),m(o,"xb,d",["侄女"]),m(o,"os",["家姐"]),m(o,"os,h",["姐夫"]),m(o,"ls",["阿妹"]),m(o,"ls,h",["妹夫"]),m(o,"0,xs,s",["姨甥"]),m(o,"1,xs,s",["外甥"]),m(o,"0,xs,d",["姨甥女"]),m(o,"1,xs,d",["外甥女"]),m(o,"s",["仔"]),m(o,"s,w",["新妇"]),m(o,"s,s",["孙"]),m(o,"s,s,w",["孙新妇"]),m(o,"s,s,s",["息仔"]),m(o,"s,s,d",["息女"]),m(o,"s,d",["孙女"]),m(o,"s,d,h",["孙女婿"]),m(o,"s,d,s",["外息仔"]),m(o,"s,d,d",["外息女"]),m(o,"d",["女"]),m(o,"d,s",["外孙"]),m(o,"d,s,w",["外孙新妇"]),m(o,"d,s,s",["外息仔"]),m(o,"d,s,d",["外息女"]),m(o,"d,d",["外孙女"]),m(o,"d,d,h",["外孙女婿"]),m(o,"d,d,s",["外息仔"]),m(o,"d,d,d",["外息女"]),o)},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爷"],"m,m,xb":["舅姥爷"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爷"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爷"],"m,f,ob":["大姥爷"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爷"],"m,f,lb,w":["小姥姥"],"f,ob":["大爷"],"f,ob,w":["大娘"]}}}})); +!function(f,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(f="undefined"!=typeof globalThis?globalThis:f||self).relationshipMode=s()}(this,(function(){"use strict";function f(s){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},f(s)}function s(s){var m=function(s,m){if("object"!=f(s)||!s)return s;var o=s[Symbol.toPrimitive];if(void 0!==o){var d=o.call(s,m||"default");if("object"!=f(d))return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===m?String:Number)(s)}(s,"string");return"symbol"==f(m)?m:m+""}function m(f,m,o){return(m=s(m))in f?Object.defineProperty(f,m,{value:o,enumerable:!0,configurable:!0,writable:!0}):f[m]=o,f}var o;return{guangdong:{name:"广东",data:(o={f:["老窦"],"f,f":["阿爷"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿婶"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨妈"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},m(m(m(m(m(m(m(m(m(m(o,"0,m,xb,d,s",["姨姨甥"]),"1,m,xb,d,s",["姨外甥"]),"0,m,xb,d,d",["姨姨甥女"]),"1,m,xb,d,d",["姨外甥女"]),"ob",["大佬"]),"ob,w",["阿嫂"]),"lb",["细佬"]),"lb,w",["弟妇"]),"xb,s",["侄"]),"xb,d",["侄女"]),m(m(m(m(m(m(m(m(m(m(o,"os",["家姐"]),"os,h",["姐夫"]),"ls",["阿妹"]),"ls,h",["妹夫"]),"0,xs,s",["姨甥"]),"1,xs,s",["外甥"]),"0,xs,d",["姨甥女"]),"1,xs,d",["外甥女"]),"s",["仔"]),"s,w",["新妇"]),m(m(m(m(m(m(m(m(m(m(o,"s,s",["孙"]),"s,s,w",["孙新妇"]),"s,s,s",["息仔"]),"s,s,d",["息女"]),"s,d",["孙女"]),"s,d,h",["孙女婿"]),"s,d,s",["外息仔"]),"s,d,d",["外息女"]),"d",["女"]),"d,s",["外孙"]),m(m(m(m(m(m(m(o,"d,s,w",["外孙新妇"]),"d,s,s",["外息仔"]),"d,s,d",["外息女"]),"d,d",["外孙女"]),"d,d,h",["外孙女婿"]),"d,d,s",["外息仔"]),"d,d,d",["外息女"]))},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爷"],"m,m,xb":["舅姥爷"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爷"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爷"],"m,f,ob":["大姥爷"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爷"],"m,f,lb,w":["小姥姥"],"f,ob":["大爷"],"f,ob,w":["大娘"]}}}})); diff --git a/dist/relationship-mode.min.mjs b/dist/relationship-mode.min.mjs index 57ff4dda..e7ceca6c 100644 --- a/dist/relationship-mode.min.mjs +++ b/dist/relationship-mode.min.mjs @@ -1 +1 @@ -function m(s){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},m(s)}function s(s){var f=function(s,f){if("object"!==m(s)||null===s)return s;var d=s[Symbol.toPrimitive];if(void 0!==d){var o=d.call(s,f||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(s)}(s,"string");return"symbol"===m(f)?f:String(f)}function f(m,f,d){return(f=s(f))in m?Object.defineProperty(m,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):m[f]=d,m}var d,o={guangdong:{name:"广东",data:(d={f:["老窦"],"f,f":["阿爷"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿婶"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨妈"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},f(d,"0,m,xb,d,s",["姨姨甥"]),f(d,"1,m,xb,d,s",["姨外甥"]),f(d,"0,m,xb,d,d",["姨姨甥女"]),f(d,"1,m,xb,d,d",["姨外甥女"]),f(d,"ob",["大佬"]),f(d,"ob,w",["阿嫂"]),f(d,"lb",["细佬"]),f(d,"lb,w",["弟妇"]),f(d,"xb,s",["侄"]),f(d,"xb,d",["侄女"]),f(d,"os",["家姐"]),f(d,"os,h",["姐夫"]),f(d,"ls",["阿妹"]),f(d,"ls,h",["妹夫"]),f(d,"0,xs,s",["姨甥"]),f(d,"1,xs,s",["外甥"]),f(d,"0,xs,d",["姨甥女"]),f(d,"1,xs,d",["外甥女"]),f(d,"s",["仔"]),f(d,"s,w",["新妇"]),f(d,"s,s",["孙"]),f(d,"s,s,w",["孙新妇"]),f(d,"s,s,s",["息仔"]),f(d,"s,s,d",["息女"]),f(d,"s,d",["孙女"]),f(d,"s,d,h",["孙女婿"]),f(d,"s,d,s",["外息仔"]),f(d,"s,d,d",["外息女"]),f(d,"d",["女"]),f(d,"d,s",["外孙"]),f(d,"d,s,w",["外孙新妇"]),f(d,"d,s,s",["外息仔"]),f(d,"d,s,d",["外息女"]),f(d,"d,d",["外孙女"]),f(d,"d,d,h",["外孙女婿"]),f(d,"d,d,s",["外息仔"]),f(d,"d,d,d",["外息女"]),d)},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爷"],"m,m,xb":["舅姥爷"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爷"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爷"],"m,f,ob":["大姥爷"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爷"],"m,f,lb,w":["小姥姥"],"f,ob":["大爷"],"f,ob,w":["大娘"]}}};export{o as default}; +function m(s){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},m(s)}function s(s){var f=function(s,f){if("object"!=m(s)||!s)return s;var d=s[Symbol.toPrimitive];if(void 0!==d){var o=d.call(s,f||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(s)}(s,"string");return"symbol"==m(f)?f:f+""}function f(m,f,d){return(f=s(f))in m?Object.defineProperty(m,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):m[f]=d,m}var d,o={guangdong:{name:"广东",data:(d={f:["老窦"],"f,f":["阿爷"],"f,f,f":["太公"],"f,f,m":["太婆"],"f,m":["阿嫲"],"f,m,f":["太外公"],"f,m,m":["太外婆"],"f,ob":["伯伯"],"f,ob,w":["伯娘"],"f,lb":["阿叔"],"f,lb,w":["阿婶"],"0,f,xb,d,s":["堂姨甥"],"1,f,xb,d,s":["堂外甥"],"0,f,xb,d,d":["堂姨甥女"],"1,f,xb,d,d":["堂外甥女"],"f,os":["姑母"],"f,ls":["姑姐"],"f,xs,h":["姑丈"],"0,f,xs,d,s":["姑表姨甥"],"1,f,xs,d,s":["姑表外甥"],"0,f,xs,d,d":["姑表姨甥女"],"1,f,xs,d,d":["姑表外甥女"],m:["老母"],"m,f":["阿公"],"m,f,f":["外太公"],"m,f,m":["外太婆"],"m,m":["阿婆"],"m,m,f":["外太外公"],"m,m,m":["外太外婆"],"m,ob":["舅父"],"m,lb":["舅仔"],"m,xb,w":["舅母"],"0,m,xb,d,s":["舅表姨甥"],"1,m,xb,d,s":["舅表外甥"],"0,m,xb,d,d":["舅表姨甥女"],"1,m,xb,d,d":["舅表外甥女"],"m,os":["姨妈"],"m,ls":["姨仔"],"m,xs,h":["姨丈"]},f(f(f(f(f(f(f(f(f(f(d,"0,m,xb,d,s",["姨姨甥"]),"1,m,xb,d,s",["姨外甥"]),"0,m,xb,d,d",["姨姨甥女"]),"1,m,xb,d,d",["姨外甥女"]),"ob",["大佬"]),"ob,w",["阿嫂"]),"lb",["细佬"]),"lb,w",["弟妇"]),"xb,s",["侄"]),"xb,d",["侄女"]),f(f(f(f(f(f(f(f(f(f(d,"os",["家姐"]),"os,h",["姐夫"]),"ls",["阿妹"]),"ls,h",["妹夫"]),"0,xs,s",["姨甥"]),"1,xs,s",["外甥"]),"0,xs,d",["姨甥女"]),"1,xs,d",["外甥女"]),"s",["仔"]),"s,w",["新妇"]),f(f(f(f(f(f(f(f(f(f(d,"s,s",["孙"]),"s,s,w",["孙新妇"]),"s,s,s",["息仔"]),"s,s,d",["息女"]),"s,d",["孙女"]),"s,d,h",["孙女婿"]),"s,d,s",["外息仔"]),"s,d,d",["外息女"]),"d",["女"]),"d,s",["外孙"]),f(f(f(f(f(f(f(d,"d,s,w",["外孙新妇"]),"d,s,s",["外息仔"]),"d,s,d",["外息女"]),"d,d",["外孙女"]),"d,d,h",["外孙女婿"]),"d,d,s",["外息仔"]),"d,d,d",["外息女"]))},north:{name:"北方",data:{"m,m":["姥姥"],"m,m,xs":["姨姥姥"],"m,m,xs,h":["姨姥爷"],"m,m,xb":["舅姥爷"],"m,m,xb,w":["舅姥姥"],"m,f":["姥爷"],"m,f,xs":["姑姥姥"],"m,f,xs,h":["姑姥爷"],"m,f,ob":["大姥爷"],"m,f,ob,w":["大姥姥"],"m,f,lb":["小姥爷"],"m,f,lb,w":["小姥姥"],"f,ob":["大爷"],"f,ob,w":["大娘"]}}};export{o as default}; diff --git a/dist/relationship.min.js b/dist/relationship.min.js index cd05fcd1..b3a97ae5 100644 --- a/dist/relationship.min.js +++ b/dist/relationship.min.js @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/relationship * - * Created on: 2024-07-31 + * Created on: 2024-08-02 */ !function(s,f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define(f):(s="undefined"!=typeof globalThis?globalThis:s||self).relationship=f()}(this,(function(){"use strict";function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,e=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){e=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(e)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","亲兄弟","同胞兄弟"],"xb,w":["兄弟媳妇","兄弟妇"],xs:["姐妹","亲姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["从祖祖父","从祖父"],"f,f,xb,w":["从祖祖母","从祖母"],"m,f,xb":["外从祖祖父"],"m,f,xb,w":["外从祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","婶子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var e=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");e.push({selector:x,sex:m})}))}))})),e}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var e=b.value;if((d=d.replace(e.exp,e.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return T(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),e=f.replace(/&[ol]/g,"");for(var h in t){var l=h.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[h][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[h][0]),(n.includes(r)&&a.includes(e)||n.includes(e)&&a.includes(r))&&m.push(t[h][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};return Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)},Y})); diff --git a/dist/relationship.min.mjs b/dist/relationship.min.mjs index 5e9bdad6..17047047 100644 --- a/dist/relationship.min.mjs +++ b/dist/relationship.min.mjs @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/relationship * - * Created on: 2024-07-31 + * Created on: 2024-08-02 */ function s(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,h=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return r=s.done,s},e:function(s){h=!0,o=s},f:function(){try{r||null==x.return||x.return()}finally{if(h)throw o}}}}function b(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x1&&void 0!==arguments[1]?arguments[1]:-1,x=s.split(",").map((function(s){var f=s.replace(/&[ol\d]+/,"");return U[f][0]})).join("的");return f>-1&&U[f+","+s]&&(0==f?x="(女性)"+x:1==f&&(x="(男性)"+x)),x}var z={xb:["兄弟","亲兄弟","同胞兄弟"],"xb,w":["兄弟媳妇","兄弟妇"],xs:["姐妹","亲姐妹","同胞姐妹"],"xs,h":["姐妹夫","姊妹婿"],"f,xb":["伯叔父"],"f,xb,w":["伯叔母"],"f,f,xb":["从祖祖父","从祖父"],"f,f,xb,w":["从祖祖母","从祖母"],"m,f,xb":["外从祖祖父"],"m,f,xb,w":["外从祖祖母"],"h,xb":["伯叔"],"h,xb,w":["妯娌","娣姒","娣姒姊妹","婶子"]},B=Object.assign({},N);for(var D in z)B[D]=(B[D]||[]).concat(z[D]);for(var F in w)B[F]=(B[F]||[]).concat(w[F]);var H={},J=function(s){B[s].forEach((function(f){void 0===H[f]&&(H[f]=[]),H[f].push(s)}))};for(var K in B)J(K);function L(s,f){var x="undefined"!=typeof Symbol&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(s,f){if(!s)return;if("string"==typeof s)return P(s,f);var x=Object.prototype.toString.call(s).slice(8,-1);"Object"===x&&s.constructor&&(x=s.constructor.name);if("Map"===x||"Set"===x)return Array.from(s);if("Arguments"===x||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return P(s,f)}(s))||f&&s&&"number"==typeof s.length){x&&(s=x);var d=0,m=function(){};return{s:m,n:function(){return d>=s.length?{done:!0}:{done:!1,value:s[d++]}},e:function(s){throw s},f:m}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,o=!0,r=!1;return{s:function(){x=x.call(s)},n:function(){var s=x.next();return o=s.done,s},e:function(s){r=!0,b=s},f:function(){try{o||null==x.return||x.return()}finally{if(r)throw b}}}}function P(s,f){(null==f||f>s.length)&&(f=s.length);for(var x=0,d=new Array(f);x-1)d=m;else if(b>-1&&-1==m)d=b;else{if(b!=m)return[];d=b}}var o=X(s.from,d),r=X(s.to,d);if(!o.length||!r.length)return[];var h=[];return o.forEach((function(f){r.forEach((function(x){var m=d,b=","+x;if(b.match(/,([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?$/)&&(m=1),b.match(/,([mwd0](&[ol\d]+)?|[olx]s)(&[ol\d]+)?$/)&&(m=0),f&&x){var o=s.optimal;if((f.match(/&\d+/)||x.match(/&\d+/))&&(o=!0),o){var r=function(s){for(var f=s.from,x=s.to,d=s.sex,m=f.split(","),b=x.split(","),o=0;o+w?m[o]=m[o].replace(/^[xol]b|^s/,"lb").replace(/^[xol]s|^d/,"ls"):+t<+w&&(m[o]=m[o].replace(/^[xol]b|^s/,"ob").replace(/^[xol]s|^d/,"os")),f=m.slice(o).join(","),x=b.slice(o+1).join(","),d=b[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;else if(s.optimal){var M,n;if(t=(null===(M=m[o].match(/([xol])[bs]/))||void 0===M?void 0:M[1])||"",w=(null===(n=b[o].match(/([xol])[bs]/))||void 0===n?void 0:n[1])||"","x"==t||"x"==w){f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0;continue}}}break}f=m.slice(o+1).join(","),x=b.slice(o+1).join(","),d=m[o].match(/^([fhs1](&[ol\d]+)?|[olx]b)(&[ol\d]+)?/)?1:0}return{from:f,to:x,sex:d}}({from:f,to:x,sex:d,optimal:s.optimal});f=r.from,x=r.to,d=r.sex}}(x?I(x,d):[""]).forEach((function(s){var x=(s?","+s:"")+(f?","+f:"");h.push({selector:x,sex:m})}))}))})),h}function V(s){var f=[],x={};return function s(d){var m="";if(!x[d]){x[d]=!0;do{m=d;var b,r=L(o);try{for(r.s();!(b=r.n()).done;){var h=b.value;if((d=d.replace(h.exp,h.str)).includes("#"))return d.split("#").forEach(s),!1}}catch(s){r.e(s)}finally{r.f()}}while(m!=d);if(d.match(/,[mwd0](&[ol\d+])?,w|,[hfs1](&[ol\d]+)?,h/))return!1;f.push(d)}}(s),f}function X(s,f){if(s.match(/^,/)||(s=","+s),f<0)s.match(/^,[w1]/)?f=1:s.match(/^,[h0]/)&&(f=0);else{if(1==f&&s.match(/^,[h0]/))return[];if(0==f&&s.match(/^,[w1]/))return[]}if(f>-1&&!s.includes(",1")&&!s.includes(",0")&&(s=","+f+s),s.match(/,[mwd0](&[ol\d]+)?,w|,[hfs1](&[ol\d]+)?,h/))return[];var x=V(s).map((function(s){return s.replace(/,[01]/,"").substr(1)}));return C(x)}var Y=function(s){"string"==typeof s&&(s=function(s){var f,x=m(d);try{for(x.s();!(f=x.n()).done;){var b=f.value,o=s.match(b.exp);if(o)return b.opt(o)}}catch(s){x.e(s)}finally{x.f()}return{}}(s));var f=Object.assign({text:"",target:"",sex:-1,type:"default",reverse:!1,mode:"default",optimal:!1},s);!function(s){if(N=Object.assign({},A),s&&O[s])for(var f in O[s])N[f]=[].concat(O[s][f],A[f]||[])}(f.mode);var b=Q(f.text),o=Q(f.target);o.length||(o=[""]);var r=[];return b.forEach((function(s){o.forEach((function(x){R({from:s,to:x,sex:f.sex,optimal:f.optimal}).forEach((function(s){(s?X(s.selector,s.sex):[]).forEach((function(x){var d=[x],m=s.sex;f.reverse&&(d=I(x,m),m=x.match(/([fhs1](&[ol\d]+)?|[olx]b)$/)?1:0),"chain"==f.type?d.forEach((function(f){var x=q(f,s.sex);x&&r.push(x)})):"pair"==f.type?(d=I(x,s.sex)).forEach((function(s){var f=function(s,f){var x=[],d=[],m=[];s=s.replace(/&\d+/g,""),f=f.replace(/&\d+/g,"");var b=s.replace(/([ol])([bs])/g,"x$2"),o=f.replace(/([ol])([bs])/g,"x$2"),r=s.replace(/&[ol]/g,""),h=f.replace(/&[ol]/g,"");for(var e in t){var l=e.split("#");if(l.length>1){var w=X(l[0]),M=X(l[1]),n=w.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")})),a=M.map((function(s){return s.replace(/&[ol\d]+/,"").replace(/([ol])([bs])/,"x$2")}));(w.includes(s)&&M.includes(f)||w.includes(f)&&M.includes(s))&&x.push(t[e][0]),(n.includes(b)&&a.includes(o)||n.includes(o)&&a.includes(b))&&d.push(t[e][0]),(n.includes(r)&&a.includes(h)||n.includes(h)&&a.includes(r))&&m.push(t[e][0])}}return x.length||(x=d),x.length||(x=m),x}(x,s);r=r.concat(f)})):d.forEach((function(s){var f=k(s);f.length||(f=k(m+","+s)),r=r.concat(f)}))}))}))}))})),x(new Set(r))};Y.data=N,Y.dataCount=Object.keys(N).length,Y.setMode=function(s,f){O[s]=Object.assign(O[s]||{},f)};export{Y as default}; diff --git a/gulpfile.js b/gulpfile.js index df29ad83..32f4b522 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,7 @@ const gulp = require('gulp'); const rename = require("gulp-rename"); const cht = require('gulp-cht'); +const replace = require('gulp-replace'); gulp.task('localization', () => { // gulp.src('./index.html') @@ -14,6 +15,7 @@ gulp.task('localization', () => { 'dist/relationship-mode.min.js', 'dist/relationship-mode.min.mjs', ]).pipe(cht()) + .pipe(replace('嶽','岳')) .pipe(rename(function(path) { path.basename = path.basename.replace('.min','.zh-HK.min'); })) diff --git a/package-lock.json b/package-lock.json index a7ec2cf0..910cc0f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "relationship.js", - "version": "1.2.6", + "version": "1.2.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "relationship.js", - "version": "1.2.6", + "version": "1.2.7", "license": "MIT", "devDependencies": { "@babel/core": "^7.24.4", @@ -19,6 +19,7 @@ "gulp": "^5.0.0", "gulp-cht": "^2.0.20", "gulp-rename": "^2.0.0", + "gulp-replace": "^1.1.4", "rollup": "^3.29.4", "tape": "^5.7.5", "through2": "^4.0.2" @@ -1933,12 +1934,40 @@ "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", "dev": true }, + "node_modules/@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.13.0" + } + }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, + "node_modules/@types/vinyl": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.12.tgz", + "integrity": "sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/expect": "^1.20.4", + "@types/node": "*" + } + }, "node_modules/acorn": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.1.tgz", @@ -2191,6 +2220,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/binaryextensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", + "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/bl": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", @@ -2460,6 +2502,13 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3325,6 +3374,23 @@ "node": ">=4" } }, + "node_modules/gulp-replace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.4.tgz", + "integrity": "sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/vinyl": "^2.0.4", + "istextorbinary": "^3.0.0", + "replacestream": "^4.0.3", + "yargs-parser": ">=5.0.0-security.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gulplog": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-2.2.0.tgz", @@ -3929,6 +3995,13 @@ "node": ">=0.10.0" } }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3944,6 +4017,23 @@ "node": ">=0.10.0" } }, + "node_modules/istextorbinary": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", + "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "binaryextensions": "^2.2.0", + "textextensions": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4136,6 +4226,16 @@ "node": ">= 10.13.0" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -4301,6 +4401,13 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, "node_modules/queue-tick": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", @@ -4466,6 +4573,51 @@ "node": ">= 10.13.0" } }, + "node_modules/replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/replacestream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/replacestream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/replacestream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4949,6 +5101,19 @@ "node": ">=10" } }, + "node_modules/textextensions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", + "integrity": "sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -5104,6 +5269,13 @@ "node": ">= 10.13.0" } }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "dev": true, + "license": "MIT" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -6742,12 +6914,37 @@ "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", "dev": true }, + "@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", + "dev": true + }, + "@types/node": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dev": true, + "requires": { + "undici-types": "~6.13.0" + } + }, "@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, + "@types/vinyl": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.12.tgz", + "integrity": "sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==", + "dev": true, + "requires": { + "@types/expect": "^1.20.4", + "@types/node": "*" + } + }, "acorn": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.1.tgz", @@ -6920,6 +7117,12 @@ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true }, + "binaryextensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", + "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", + "dev": true + }, "bl": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", @@ -7105,6 +7308,12 @@ "browserslist": "^4.23.0" } }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -7769,6 +7978,19 @@ "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", "dev": true }, + "gulp-replace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.4.tgz", + "integrity": "sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/vinyl": "^2.0.4", + "istextorbinary": "^3.0.0", + "replacestream": "^4.0.3", + "yargs-parser": ">=5.0.0-security.0" + } + }, "gulplog": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-2.2.0.tgz", @@ -8167,6 +8389,12 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8179,6 +8407,16 @@ "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true }, + "istextorbinary": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", + "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", + "dev": true, + "requires": { + "binaryextensions": "^2.2.0", + "textextensions": "^3.2.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8325,6 +8563,12 @@ "once": "^1.4.0" } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -8445,6 +8689,12 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "queue-tick": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", @@ -8579,6 +8829,49 @@ "integrity": "sha512-bgEuQQ/BHW0XkkJtawzrfzHFSN70f/3cNOiHa2QsYxqrjaC30X1k74FJ6xswVBP0sr0SpGIdVFuPwfrYziVeyw==", "dev": true }, + "replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8948,6 +9241,12 @@ "source-map-support": "~0.5.20" } }, + "textextensions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", + "integrity": "sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==", + "dev": true + }, "through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -9064,6 +9363,12 @@ "integrity": "sha512-+hhVICbnp+rlzZMgxXenpvTxpuvA67Bfgtt+O9WOE5jo7w/dyiF1VmoZVIHvP2EkUjsyKyTwYKlLhA+j47m1Ew==", "dev": true }, + "undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "dev": true + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/package.json b/package.json index bdf1bb70..9a818296 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "bugs": { "url": "https://github.com/mumuy/relationship/issues" }, - "files":[ + "files": [ "dist" ], "devDependencies": { @@ -58,6 +58,7 @@ "gulp": "^5.0.0", "gulp-cht": "^2.0.20", "gulp-rename": "^2.0.0", + "gulp-replace": "^1.1.4", "rollup": "^3.29.4", "tape": "^5.7.5", "through2": "^4.0.2" From c66541124a903c05e79f1569b2456d998590cb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Sat, 3 Aug 2024 02:08:34 +0800 Subject: [PATCH 2/6] =?UTF-8?q?updated=20=E6=BB=9A=E5=8A=A8=E6=95=88?= =?UTF-8?q?=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 438 +++++++++++++++++++++-------------------- static/style/index.css | 313 +++++++++++++++-------------- zh-HK.html | 438 +++++++++++++++++++++-------------------- 3 files changed, 614 insertions(+), 575 deletions(-) diff --git a/index.html b/index.html index b4818031..f4bd01af 100644 --- a/index.html +++ b/index.html @@ -26,21 +26,8 @@ -
-
- - - - - - - - - - - -
-
+
+
@@ -57,229 +44,246 @@
-
-
-
+ +
+
+ + + + + + + + + + + +
+
-
-

中国亲戚关系计算器开源算法

-

逢年过节遇到三姑六婆,拒绝叫不出口的尴尬!轻松搞定亲戚关系~

-

当前亲戚称呼大全已收录约-条亲戚关系

-

始于2016年3月

-
- 亲戚称呼换算APP -
- -
-
- +
+

中国亲戚关系计算器开源算法

+

逢年过节遇到三姑六婆,拒绝叫不出口的尴尬!轻松搞定亲戚关系~

+

当前亲戚称呼大全已收录约-条亲戚关系

+

始于2016年3月

+
+ 亲戚称呼换算APP +
+
-
-
-
-
- 区域模式: - - - +
+ +
+
+
+
+ 区域模式: + + + +
+
+ 我的性别: + + +
+
+ 称呼方式: + + +
-
- 我的性别: - - +
+
-
- 称呼方式: - - +
+
+

+ + + + + + + + + + + + + + + + + + + + +

+
+
+ + + +
-
-
- -
-
-

- - - - - - - - - - - - - - - - - - - - -

+

计算结果:

+

+
+
- - - +
+ 输入称呼: + +
-
-
-

计算结果:

-

-
-
-
-
-
- 输入称呼: - +
+
+ + +
-
-
- - +

计算结果:

+

-
-
-

计算结果:

-

-
-
-

应用场景

-

七舅姥爷和我什么关系?

-

三叔公是什么亲戚?

-

侄子和外甥的区别在哪里?

-

太外公和外太公有什么不同?

-
-
-
-
- -
-
-
- +
+

应用场景

+

七舅姥爷和我什么关系?

+

三叔公是什么亲戚?

+

侄子和外甥的区别在哪里?

+

太外公和外太公有什么不同?

-
-
- 称呼方式: - -
+
功能支持
@@ -361,9 +365,11 @@

应用场景

-
+ +
+
-
+ -
-
-
-
关于中国亲戚称呼

亲属是基于婚姻、血缘和法律拟制而形成的社会关系。亲属关系包括夫妻、父母、子女、兄弟姊妹、祖父母和外祖父母、孙子女和外孙子女、儿媳和公婆、女婿和岳父母、以及其他三代以内的旁系血亲,如伯、叔、姑、舅、姨、侄子女、甥子女、堂兄弟姊妹、表兄弟姊妹、姨兄弟姊妹等。

@@ -416,6 +418,8 @@

应用场景

+
+
算法开源
@@ -433,6 +437,8 @@

应用场景

+ +
他们都在使用
@@ -466,7 +472,7 @@

应用场景

-
+
😳支持我的开源
@@ -503,7 +509,9 @@

应用场景

-
+ + +
@@ -764,7 +772,5 @@

应用场景

})(); - - diff --git a/static/style/index.css b/static/style/index.css index e00fd45e..3d41c08f 100644 --- a/static/style/index.css +++ b/static/style/index.css @@ -23,11 +23,30 @@ a:hover{ } -.header{ - margin-bottom: 15px; +.scroll-container{ + position: relative; + height: 100vh; + scroll-snap-type: y mandatory; + overflow: auto; + scrollbar-gutter:stable; + scroll-behavior:smooth } -.container{ - padding-bottom: 30px; +.scroll-container .scroll-item{ + position: relative; + scroll-snap-align: center; +} +.scroll-container .scroll-item:before,.scroll-container .scroll-item:after { + content:""; + display:table; + } + .scroll-container .scroll-item:after { clear:both; } +header{ + position: sticky; + left: 0; + top: 0; + width: 100%; + height: 0; + z-index: 99; } .inner{ max-width: 1000px; @@ -35,7 +54,7 @@ a:hover{ margin: 0 auto; } .module{ - margin-bottom: 80px; + margin: 60px 0; } .module .hd{ margin: 0 5px 5px; @@ -103,12 +122,11 @@ a:hover{ } } -.header{ - position: sticky; +.mod-head{ + position: absolute; left: 0; top: 0; width: 100%; - z-index: 99; backdrop-filter: blur(10px); } .mod-head .bd{ @@ -184,26 +202,27 @@ a:hover{ opacity: .02; } -.mod-panel{ - margin-bottom: 80px; + +.mod-panel .bd{ + display: flex; + padding-top: 10px; } -.mod-panel .hd{ - float: left; - width: 50%; +.mod-panel .panel-left{ + width: 55%; padding-top: 15px; line-height: 22px; } -.mod-panel .hd h1{ +.mod-panel .panel-left h1{ margin-bottom: 10px; line-height: 30px; font-weight: bold; font-size: 30px; color:#1a2b3b; } -.mod-panel .hd h1 span.name{ +.mod-panel .panel-left h1 span.name{ display: block; } -.mod-panel .hd h1 span.tag{ +.mod-panel .panel-left h1 span.tag{ display: inline-block; padding: 0 8px; margin: 0 5px; @@ -215,22 +234,22 @@ a:hover{ border-radius: 4px; box-shadow: 0 1px 5px 0 rgba(0,0,0,0.03); } -.mod-panel .hd p{ +.mod-panel .panel-left p{ line-height: 24px; font-size: 15px; } -.mod-panel .hd p.text-gray{ +.mod-panel .panel-left p.text-gray{ color: rgba(0,0,0,0.25); } -.mod-panel .hd .picture,.mod-panel .hd .mobile{ +.mod-panel .panel-left .picture,.mod-panel .panel-left .mobile{ position: relative; width: 400px; text-align: center; } -.mod-panel .hd .picture img{ +.mod-panel .panel-left .picture img{ margin-left: -56px; } -.mod-panel .hd .btn{ +.mod-panel .panel-left .btn{ position: relative; display: inline-block; height: 36px; @@ -248,12 +267,12 @@ a:hover{ outline: none; -webkit-appearance: none; } -.mod-panel .hd .btn span.name{ +.mod-panel .panel-left .btn span.name{ display: inline-block; padding-right: 30px; background: url('../image/scan.png') right center / 16px 16px no-repeat; } -.mod-panel .hd .btn span.qrcode{ +.mod-panel .panel-left .btn span.qrcode{ display: none; position: absolute; right: -160px; @@ -264,13 +283,13 @@ a:hover{ margin-top: -84px; border: 2px solid rgba(0,0,0,0.1); } -.mod-panel .hd .btn span.qrcode img{ +.mod-panel .panel-left .btn span.qrcode img{ width: 150px; height: 150px; padding: 5px; background: #fff; } -.mod-panel .hd .btn span.qrcode::after{ +.mod-panel .panel-left .btn span.qrcode::after{ position: absolute; left: -6px; top: 50%; @@ -283,33 +302,33 @@ a:hover{ box-shadow: -2px 2px 0 rgba(0,0,0,0.1); transform: rotate(45deg); } -.mod-panel .hd .btn:hover { +.mod-panel .panel-left .btn:hover { background: #207fcc; } -.mod-panel .hd .btn:hover span.qrcode{ +.mod-panel .panel-left .btn:hover span.qrcode{ display: block; } -.mod-panel .hd b{ +.mod-panel .panel-left b{ margin: 0 3px; color: #fd7474; } -.mod-panel .bd{ - margin-left: 55%; +.mod-panel .panel-right{ + width: 45%; background: #fff; box-shadow: 0 1px 5px 0 rgba(0,0,0,0.025); border: 1px solid rgba(0,0,0,0.025); } -.mod-panel .bd .c-hd{ +.mod-panel .panel-right .c-hd{ height: 44px; border-bottom: 1px solid #f4f4f4; } -.mod-panel .bd .c-hd li{ +.mod-panel .panel-right .c-hd li{ float: left; width: 25%; height: 44px; line-height: 44px; } -.mod-panel .bd .c-hd li a{ +.mod-panel .panel-right .c-hd li a{ display: block; text-align: center; text-decoration: none; @@ -317,11 +336,11 @@ a:hover{ color: #999; cursor: pointer; } -.mod-panel .bd .c-hd li.active a{ +.mod-panel .panel-right .c-hd li.active a{ position: relative; color: #333; } -.mod-panel .bd .c-hd li.active a::after{ +.mod-panel .panel-right .c-hd li.active a::after{ position: absolute; left: 50%; bottom: 0; @@ -333,23 +352,23 @@ a:hover{ background: #2095f2; border-radius: 3px; } -.mod-panel .bd .c-bd{ +.mod-panel .panel-right .c-bd{ height: 450px; padding: 18px 20px; } -.mod-panel .bd .c-panel{ +.mod-panel .panel-right .c-panel{ display: none; } -.mod-panel .bd .c-panel .operation{ +.mod-panel .panel-right .c-panel .operation{ margin: 10px 0; } -.mod-panel .bd .c-panel .row{ +.mod-panel .panel-right .c-panel .row{ margin-bottom: 5px; } -.mod-panel .bd .c-panel .field{ +.mod-panel .panel-right .c-panel .field{ line-height: 28px; } -.mod-panel .bd .c-panel .intro{ +.mod-panel .panel-right .c-panel .intro{ padding: 10px 15px; margin: 25px 0; background: #fffbf5; @@ -357,24 +376,24 @@ a:hover{ color: #666; border-radius: 5px; } -.mod-panel .bd .c-panel .intro h3{ +.mod-panel .panel-right .c-panel .intro h3{ line-height: 30px; font-weight: bold; font-size: 15px; color: #666; } -.mod-panel .bd p{ +.mod-panel .panel-right p{ overflow: hidden; } -.mod-panel .bd label{ +.mod-panel .panel-right label{ display: inline-block; min-width: 90px; margin-right: 15px; } -.mod-panel .bd label span,.mod-panel .bd label input{ +.mod-panel .panel-right label span,.mod-panel .panel-right label input{ vertical-align: middle; } -.mod-panel .bd .input-text{ +.mod-panel .panel-right .input-text{ display: inline-block; width: 100%; height: 36px; @@ -386,13 +405,13 @@ a:hover{ border-radius: 5px; outline: none; } -.mod-panel .bd .input-text-small{ +.mod-panel .panel-right .input-text-small{ width: 200px; } -.mod-panel .bd .text-right{ +.mod-panel .panel-right .text-right{ text-align: right; } -.mod-panel .bd .btn { +.mod-panel .panel-right .btn { height: 32px; min-width: 80px; background: #f0f0f0; @@ -406,40 +425,40 @@ a:hover{ border-radius: 4px; box-sizing: border-box; } -.mod-panel .bd .btn:hover{ +.mod-panel .panel-right .btn:hover{ background: #e4e4e4; } -.mod-panel .bd .btn-green{ +.mod-panel .panel-right .btn-green{ background: #4bae4f; color: #fff; } -.mod-panel .bd .btn-green:hover{ +.mod-panel .panel-right .btn-green:hover{ background: #47a04b; } -.mod-panel .bd .btn-red{ +.mod-panel .panel-right .btn-red{ background: #f56954; color: #fff; } -.mod-panel .bd .btn-red:hover{ +.mod-panel .panel-right .btn-red:hover{ background: #f4543c;; } -.mod-panel .bd .btn-orange{ +.mod-panel .panel-right .btn-orange{ background: #ff9000; color: #fff; } -.mod-panel .bd .btn-orange:hover{ +.mod-panel .panel-right .btn-orange:hover{ background: #e18309; } -.mod-panel .bd .btn-small{ +.mod-panel .panel-right .btn-small{ min-width: 36px; margin-right: -1px; cursor: pointer; } -.mod-panel .bd .btn[disabled]{ +.mod-panel .panel-right .btn[disabled]{ background: #f0f0f0; color: #aaa; } -.mod-panel .bd textarea{ +.mod-panel .panel-right textarea{ display: block; width: 100%; height: 120px; @@ -451,14 +470,50 @@ a:hover{ resize: none; outline: none; } -.mod-panel .bd p{ +.mod-panel .panel-right p{ line-height: 22px; } -.mod-panel .bd p span{ +.mod-panel .panel-right p span{ margin-right: 4px; } -.mod-banner .bd{ +.mod-intro .bd ul{ + overflow: hidden; +} +.mod-intro .bd li{ + float: left; + width: 33.33%; +} +.mod-intro .bd .item{ + padding: 15px; + margin: 0 5px 10px; + background: rgb(246, 248, 250); + border-radius: 12px; +} +.mod-intro .bd p{ + line-height: 22px; +} +.mod-intro .bd p strong{ + margin-right: 5px; + font-size: 24px; + font-weight: bold; + font-family: fantasy; + color: #8b949e; +} +.mod-intro .bd p.q{ + line-height: 28px; + font-weight: bold; + color: #646464; +} +.mod-intro .article p{ + line-height: 22px; + text-indent: 2em; +} +.mod-intro .table-inner{ + overflow-x: auto; +} + +.mod-article .banner{ height: 120px; padding: 20px 20px 20px 38%; background: linear-gradient(to right,rgba(0,0,0,0) 0%, rgba(246,248,250,0.5) 100%); @@ -470,83 +525,43 @@ a:hover{ font-weight: bold; color: #8b949e; } -.mod-banner .bd span{ +.mod-article .banner span{ display: inline-block; white-space: nowrap; transform: scale(1); } -.mod-banner .bd span:hover{ +.mod-article .banner span:hover{ transform: scale(1.2); transition: all 0.25s ease-in; } -.mod-banner .bd span:nth-child(7n){ +.mod-article .banner span:nth-child(7n){ opacity: 0.15; zoom: 0.6; } -.mod-banner .bd span:nth-child(7n+1){ +.mod-article .banner span:nth-child(7n+1){ opacity: 0.35; zoom: 0.7; } -.mod-banner .bd span:nth-child(7n+2){ +.mod-article .banner span:nth-child(7n+2){ opacity: 0.25; zoom: 0.6; } -.mod-banner .bd span:nth-child(7n+3){ +.mod-article .banner span:nth-child(7n+3){ opacity: 0.30; zoom: 0.9; } -.mod-banner .bd span:nth-child(7n+4){ +.mod-article .banner span:nth-child(7n+4){ opacity: 0.45; zoom: 0.8; } -.mod-banner .bd span:nth-child(7n+5){ +.mod-article .banner span:nth-child(7n+5){ opacity: 0.40; zoom: 0.7; } -.mod-banner .bd span:nth-child(7n+6){ +.mod-article .banner span:nth-child(7n+6){ opacity: 0.65; zoom: 1; } - -.mod-intro .bd ul{ - overflow: hidden; -} -.mod-intro .bd li{ - float: left; - width: 33.33%; -} -.mod-intro .bd .item{ - padding: 15px; - margin: 0 5px 10px; - background: rgb(246, 248, 250); - border-radius: 12px; -} -.mod-intro .bd p{ - line-height: 22px; -} -.mod-intro .bd p strong{ - margin-right: 5px; - font-size: 24px; - font-weight: bold; - font-family: fantasy; - color: #8b949e; -} -.mod-intro .bd p.q{ - line-height: 28px; - font-weight: bold; - color: #646464; -} -.mod-intro .article p{ - line-height: 22px; - text-indent: 2em; -} -.mod-intro .table-inner{ - overflow-x: auto; -} - -.mod-article{ - margin-bottom: 100px; -} .mod-article .hd{ margin-top: -36px; } @@ -580,6 +595,9 @@ a:hover{ text-indent: 2em; } +.mod-app{ + margin: 120px 0 80px; +} .mod-app .hd{ text-align: center; } @@ -605,8 +623,8 @@ a:hover{ .mod-copy{ position: relative; - margin-bottom: 125px; padding: 15px 0 45px; + margin-bottom: 120px; background: rgb(246, 248, 250); } .mod-copy::before { @@ -733,8 +751,12 @@ a:hover{ } @media screen and (max-width: 1020px) { - .header{ - margin-bottom: 10px; + .scroll-container{ + height: auto; + scroll-snap-type: none; + } + header{ + position: fixed; } .inner{ max-width: 640px; @@ -749,71 +771,77 @@ a:hover{ } .mod-panel{ - margin-bottom: 25px; + padding-top: 20px; + } + .mod-panel .bd{ + flex-direction: column; } - .mod-panel .hd{ + .mod-panel .panel-left,.mod-panel .panel-right{ + width: auto; + } + .mod-panel .panel-left{ float: none; padding-top: 0; width: auto; margin-bottom: 15px; text-align: center; } - .mod-panel .hd h1{ + .mod-panel .panel-left h1{ margin-bottom: 5px; line-height: 26px; font-size: 20px; } - .mod-panel .hd h1 span.name{ + .mod-panel .panel-left h1 span.name{ display: inline; } - .mod-panel .hd p{ + .mod-panel .panel-left p{ line-height: 22px; font-size: 13px; overflow: hidden; } - .mod-panel .hd .picture{ + .mod-panel .panel-left .picture{ width: auto; padding-top: 0; } - .mod-panel .hd .mobile{ + .mod-panel .panel-left .mobile{ width: auto; } - .mod-panel .hd .picture img{ + .mod-panel .panel-left .picture img{ width: 256px; height: 160px; margin-left: 0; } - .mod-panel .hd .btn{ + .mod-panel .panel-left .btn{ display: block; margin: 0 auto; } - .mod-panel .hd .btn span.name{ + .mod-panel .panel-left .btn span.name{ padding-right: 0; background: none; } - .mod-panel .hd .btn span.qrcode{ + .mod-panel .panel-left .btn span.qrcode{ display: none!important; } - .mod-panel .bd{ + .mod-panel .panel-right{ margin-left: 0; } - .mod-panel .bd .c-hd{ + .mod-panel .panel-right .c-hd{ text-align: center; } - .mod-panel .bd .c-hd ul{ + .mod-panel .panel-right .c-hd ul{ overflow-x: auto; white-space: nowrap; } - .mod-panel .bd .c-hd li{ + .mod-panel .panel-right .c-hd li{ float: none; display: inline-block; width: auto; min-width: 24% } - .mod-panel .bd .c-hd li a{ + .mod-panel .panel-right .c-hd li a{ padding: 0 4px; } - .mod-panel .bd .c-bd{ + .mod-panel .panel-right .c-bd{ height: auto; } .mod-panel textarea{ @@ -821,7 +849,7 @@ a:hover{ height: 80px; box-sizing: border-box; } - .mod-panel .bd p span{ + .mod-panel .panel-right p span{ float: left; width: 50%; text-align: center; @@ -850,6 +878,15 @@ a:hover{ .mod-article{ margin-bottom: 55px; } + .mod-article .banner{ + height: auto; + padding: 15px; + line-height: 20px; + font-size: 20px; + } + .mod-article .hd{ + margin-top: 0; + } .mod-article .bd{ padding: 15px 0; } @@ -892,20 +929,10 @@ a:hover{ } @media screen and (max-width: 640px) { - .mod-panel .inner{ - padding: 10px 0; - } - .mod-panel .bd .c-bd{ + .mod-panel .panel-right .c-bd{ padding: 15px 10px; } - .mod-banner .bd{ - height: auto; - padding: 15px; - line-height: 20px; - font-size: 20px; - } - .mod-intro .hd{ margin: 0 0 5px; } diff --git a/zh-HK.html b/zh-HK.html index fc793fc9..98aadc95 100644 --- a/zh-HK.html +++ b/zh-HK.html @@ -26,21 +26,8 @@ -
-
- - - - - - - - - - - -
-
+
+
@@ -57,229 +44,246 @@
-
-
-
+ +
+
+ + + + + + + + + + + +
+
-
-

中國親戚關系計算器開源算法

-

逢年過節遇到三姑六婆,拒絕叫不出口的尷尬!輕鬆搞定親戚關系~

-

當前親戚稱呼大全已收錄約-條親戚關系

-

始於2016年3月

-
- 親戚稱呼換算APP -
- -
-
- +
+

中國親戚關系計算器開源算法

+

逢年過節遇到三姑六婆,拒絕叫不出口的尷尬!輕鬆搞定親戚關系~

+

當前親戚稱呼大全已收錄約-條親戚關系

+

始於2016年3月

+
+ 親戚稱呼換算APP +
+
-
-
-
-
- 區域模式: - - - +
+ +
+
+
+
+ 區域模式: + + + +
+
+ 我的性別: + + +
+
+ 稱呼方式: + + +
-
- 我的性別: - - +
+
-
- 稱呼方式: - - +
+
+

+ + + + + + + + + + + + + + + + + + + + +

+
+
+ + + +
-
-
- -
-
-

- - - - - - - - - - - - - - - - - - - - -

+

計算結果:

+

+
+
- - - +
+ 輸入稱呼: + +
-
-
-

計算結果:

-

-
-
-
-
-
- 輸入稱呼: - +
+
+ + +
-
-
- - +

計算結果:

+

-
-
-

計算結果:

-

-
-
-

應用場景

-

七舅姥爺和我什麼關系?

-

三叔公是什麼親戚?

-

侄子和外甥的區別在哪裏?

-

太外公和外太公有什麼不同?

-
-
-
-
- -
-
-
- +
+

應用場景

+

七舅姥爺和我什麼關系?

+

三叔公是什麼親戚?

+

侄子和外甥的區別在哪裏?

+

太外公和外太公有什麼不同?

-
-
- 稱呼方式: - -
+
功能支持
@@ -361,9 +365,11 @@

應用場景

-
+ +
+
-
+ -
-
-
-
關於中國親戚稱呼

親屬是基於婚姻、血緣和法律擬制而形成的社會關系。親屬關系包括夫妻、父母、子女、兄弟姊妹、祖父母和外祖父母、孫子女和外孫子女、兒媳和公婆、女婿和岳父母、以及其他三代以內的旁系血親,如伯、叔、姑、舅、姨、侄子女、甥子女、堂兄弟姊妹、表兄弟姊妹、姨兄弟姊妹等。

@@ -416,6 +418,8 @@

應用場景

+
+
算法開源
@@ -433,6 +437,8 @@

應用場景

+ +
他們都在使用
@@ -466,7 +472,7 @@

應用場景

-
+
😳支持我的開源
@@ -503,7 +509,9 @@

應用場景

-
+ + +
@@ -764,7 +772,5 @@

應用場景

})(); - - From 9c199810529d2afeb7530600804dc481f922f78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Sat, 3 Aug 2024 02:17:42 +0800 Subject: [PATCH 3/6] Update index.js --- static/script/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/script/index.js b/static/script/index.js index 97187d61..42b42388 100644 --- a/static/script/index.js +++ b/static/script/index.js @@ -1,8 +1,9 @@ // 头部滚动 (function(){ - let $header = document.querySelector('.header'); - document.addEventListener('scroll',function(){ - let scrollTop = document.documentElement.scrollTop; + let $header = document.querySelector('.mod-head'); + document.querySelector('.scroll-container').addEventListener('scroll',function(){ + let scrollTop = this.scrollTop; + console.log('[scrollTop]',scrollTop); let ratio = Math.min(scrollTop/1000,1); $header.style.background = 'rgba(255,255,255,'+(ratio*0.8)+')'; $header.style.boxShadow = '1px 1px 6px rgba(0,0,0,'+(ratio*0.1)+')'; From a4699825ca6890dd99e217e32d21b29e485813a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Sat, 3 Aug 2024 02:55:15 +0800 Subject: [PATCH 4/6] Update index.js --- static/script/index.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/static/script/index.js b/static/script/index.js index 42b42388..e44a8e9c 100644 --- a/static/script/index.js +++ b/static/script/index.js @@ -1,9 +1,8 @@ // 头部滚动 (function(){ - let $header = document.querySelector('.mod-head'); + let $header = document.querySelector('header'); document.querySelector('.scroll-container').addEventListener('scroll',function(){ let scrollTop = this.scrollTop; - console.log('[scrollTop]',scrollTop); let ratio = Math.min(scrollTop/1000,1); $header.style.background = 'rgba(255,255,255,'+(ratio*0.8)+')'; $header.style.boxShadow = '1px 1px 6px rgba(0,0,0,'+(ratio*0.1)+')'; @@ -12,20 +11,13 @@ // 底部滚动 (function(){ - let timer = null; let $gotop = document.querySelector('.mod-fixedbar .gotop'); + let $container = document.querySelector('.scroll-container'); $gotop.addEventListener('click',function(){ - cancelAnimationFrame(timer); - let scrollTop = document.body.scrollTop || document.documentElement.scrollTop; - let move = scrollTop/18; - timer = requestAnimationFrame(function fn(){ - var oTop = document.body.scrollTop || document.documentElement.scrollTop; - if(oTop > 0){ - document.body.scrollTop = document.documentElement.scrollTop = oTop - move; - timer = requestAnimationFrame(fn); - }else{ - cancelAnimationFrame(timer); - } + $container.scrollTo({ + left:0, + top:0, + behavior:'smooth' }); }); })(); From e5a3435926603f4de585a9d0f2ac498a743a077c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Sat, 3 Aug 2024 11:01:25 +0800 Subject: [PATCH 5/6] Update index.js --- static/script/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/script/index.js b/static/script/index.js index e44a8e9c..0ff219e6 100644 --- a/static/script/index.js +++ b/static/script/index.js @@ -1,6 +1,6 @@ // 头部滚动 (function(){ - let $header = document.querySelector('header'); + let $header = document.querySelector('.mod-head'); document.querySelector('.scroll-container').addEventListener('scroll',function(){ let scrollTop = this.scrollTop; let ratio = Math.min(scrollTop/1000,1); From dc64307e79f82231358d6210294a2d0bf3ffcc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E4=BA=BA=E7=94=B2?= Date: Tue, 6 Aug 2024 23:15:59 +0800 Subject: [PATCH 6/6] Update index.css --- static/style/index.css | 60 ++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/static/style/index.css b/static/style/index.css index 3d41c08f..1c20af39 100644 --- a/static/style/index.css +++ b/static/style/index.css @@ -70,7 +70,7 @@ header{ position: absolute; left: 0; top: 0; - height: 500px; + height: 550px; width: 100%; z-index: -1; background: url('../image/bg.svg') center top repeat-x; @@ -205,7 +205,7 @@ header{ .mod-panel .bd{ display: flex; - padding-top: 10px; + padding-top: 20px; } .mod-panel .panel-left{ width: 55%; @@ -314,31 +314,47 @@ header{ } .mod-panel .panel-right{ width: 45%; - background: #fff; - box-shadow: 0 1px 5px 0 rgba(0,0,0,0.025); - border: 1px solid rgba(0,0,0,0.025); } .mod-panel .panel-right .c-hd{ height: 44px; - border-bottom: 1px solid #f4f4f4; + margin-bottom: 10px; +} +.mod-panel .panel-right .c-hd ul{ + display: flex; } .mod-panel .panel-right .c-hd li{ - float: left; - width: 25%; + flex: 1; height: 44px; line-height: 44px; } .mod-panel .panel-right .c-hd li a{ + position: relative; display: block; text-align: center; text-decoration: none; - font-size: 14px; - color: #999; + font-size: 16px; + font-weight: bold; + color: rgba(0,0,0,0.25); cursor: pointer; + transition: all 0.25s ease-in; +} +.mod-panel .panel-right .c-hd li a::after{ + position: absolute; + left: 50%; + bottom: 0; + display: block; + content: ''; + width: 0px; + height: 0px; + margin-left: 0px; + background: #2095f2; + border-radius: 0px; + transition: all 0.25s ease-in; } .mod-panel .panel-right .c-hd li.active a{ - position: relative; - color: #333; + flex: 1.5; + font-size: 20px; + color: rgba(0,0,0,0.9); } .mod-panel .panel-right .c-hd li.active a::after{ position: absolute; @@ -347,7 +363,7 @@ header{ display: block; content: ''; width: 16px; - height: 4px; + height: 6px; margin-left: -8px; background: #2095f2; border-radius: 3px; @@ -355,6 +371,10 @@ header{ .mod-panel .panel-right .c-bd{ height: 450px; padding: 18px 20px; + background: #fff; + box-shadow: 0 0 0 3px rgba(0,0,0,0.025); + border: 1px solid rgba(0,0,0,0.025); + border-radius: 12px; } .mod-panel .panel-right .c-panel{ display: none; @@ -783,7 +803,7 @@ header{ float: none; padding-top: 0; width: auto; - margin-bottom: 15px; + margin-bottom: 20px; text-align: center; } .mod-panel .panel-left h1{ @@ -929,9 +949,21 @@ header{ } @media screen and (max-width: 640px) { + .mod-panel .panel-right .c-hd{ + margin-bottom: 4px; + } + .mod-panel .panel-right .c-hd li a{ + font-size: 14px; + } + .mod-panel .panel-right .c-hd li.active a{ + font-size: 16px; + } .mod-panel .panel-right .c-bd{ padding: 15px 10px; } + .mod-panel .panel-right .c-hd li.active a::after{ + height: 4px; + } .mod-intro .hd{ margin: 0 0 5px;