text: import pads from'./time-converter/pads';const dashToLast=(c,a)=>'-'===c?1:'-'===a?-1:0,VALID_PAD=`%[${Object.keys(pads).sort(dashToLast).join('')}]?`,regexCreator=a=>new RegExp(`${VALID_PAD}${a}`),regexify=a=>{const b={};let c='';for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c].map(regexCreator));return b};let timeOrderArr=['millisecond','second','minute','hour','day','month','year'],timeOrderObj={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},minimumPlaceHolderObj={millisecond:0,second:1,minute:2,hour:2,day:4,month:5,year:6},placeHolderMap=regexify({millisecond:['L','Q'],second:['S','s'],minute:['M'],hour:['H','I','p'],day:['d','e','j','a','A'],month:['b','B','m'],year:['y','Y']}),len=timeOrderArr.length;function getMinPlaceHolder(a=''){let b,c,d,e;for(b=0;b<len;b++)for(d=placeHolderMap[timeOrderArr[b]],e=d.length,c=0;c<e;c++)if(a.match(d[c]))return timeOrderArr[b]}function getPlaceHolderIndex(a){return timeOrderObj[a]}function getFilterdTimeFormat(a='',b){let c,d,e=minimumPlaceHolderObj[b],f=b=>{a=a.replace(b,'')};for(d=0;d<e;d++)c=placeHolderMap[timeOrderArr[d]],c.forEach(f);return a.replace(/(\W+$)/,'').replace(/^,/,'')}export{getMinPlaceHolder,getPlaceHolderIndex,getFilterdTimeFormat};