1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8433],{33320:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(57437),i=n(2069),a=n(46387),o=n(77543);let l={none:0,sm:"12px",md:"16px",lg:"24px"},c={none:"none",sm:o.Zg.card,md:"0 4px 12px 0 ".concat(o.oR.shadowMd)},s={md:o.PY.md,lg:o.PY.lg,xl:o.PY.xl};function u(e){var t;let{header:n,children:u,footer:d,padding:p="md",bordered:g=!1,shadow:m="sm",radius:f="lg",className:h="",onClick:b,fullWidth:x=!0,id:y,ref:v,sx:R={}}=e,C=!!b,j=null!==(t=l[p])&&void 0!==t?t:l.md,O=g&&"sm"===m?"0 1px 2px 0 ".concat(o.oR.shadowSm):c[m]||c.sm;return(0,r.jsxs)(i.Z,{id:y,ref:v,onClick:b,className:h,sx:{bgcolor:o.oR.bgCard,borderRadius:s[f]||s.lg,border:g?"1px solid ".concat(o.oR.borderDefault):"none",boxShadow:O,width:x?"100%":"auto",overflow:"hidden",cursor:C?"pointer":"default",transition:C?"box-shadow 150ms ease-in-out, border-color 150ms ease-in-out":void 0,"&:hover":C?{boxShadow:c.md,borderColor:o.oR.borderStrong}:void 0,...R},children:[n&&(0,r.jsx)(i.Z,{sx:{px:j,py:"number"==typeof j?0:"calc(".concat(j," * 0.75)"),borderBottom:"1px solid ".concat(o.oR.borderDefault)},children:"string"==typeof n?(0,r.jsx)(a.Z,{sx:{fontSize:14,fontWeight:600,color:o.oR.textPrimary},children:n}):n}),(0,r.jsx)(i.Z,{sx:{p:j},children:u}),d&&(0,r.jsx)(i.Z,{sx:{px:j,py:"number"==typeof j?0:"calc(".concat(j," * 0.75)"),borderTop:"1px solid ".concat(o.oR.borderDefault)},children:d})]})}},11217:function(e,t,n){n.d(t,{GF:function(){return A},HE:function(){return x},Jv:function(){return H},RR:function(){return G},ZM:function(){return T},xy:function(){return Z},zF:function(){return O}});var r=n(74315),i=n(59497);let a=Object.freeze([/search volume/i,/lower your price/i,/will sell/i,/\bP(25|50|75)\b/]),o=Object.freeze(["tags","description","images","title","price","extras"]),l=Object.freeze({title:"title",tags:"tags",description:"description",images:"photos",price:"price",extras:"extras"}),c=e=>Number(e).toLocaleString("en-US"),s=e=>"$".concat(Number(e).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})),u=e=>{if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&""===e.trim())return null;let t=Number(e);return Number.isFinite(t)?t:null},d=e=>{let t=u(e);return null===t||t<0?null:t},p=(e,t,n)=>"".concat(c(e)," ").concat(1===e?t:n),g=/undefined|NaN|\bnull\b|\[object/,m=e=>{if("string"!=typeof e)return null;let t=e.trim();return!t||g.test(t)?null:a.some(e=>e.test(t))?null:t},f=e=>{if(!e||"object"!=typeof e)return null;let t=u(e.p25),n=u(e.p50),r=u(e.p75);return null===t||null===n||null===r||t<=0||n<=0||r<=0||t>n||n>r?null:{p25:t,p50:n,p75:r}},h=e=>{let t=u(e);return null!==t&&t>0?t:null},b=e=>"checking ".concat(p(e,"tag","tags"),"â¦"),x=Object.freeze({factors:Object.freeze({title:"Title",tags:"Tags",description:"Description",images:"Photos",price:"Price",extras:"Extras"}),badgeLabels:Object.freeze({title:"Title",tags:"Tags",description:"Description",images:"Photos",price:"Price",extras:"Personalization",overall:"Listing score"}),overallPrefix:"Score",rows:Object.freeze({titleLength:"Title length",tagCount:"Tag count",tagDemand:"Tag demand",descriptionLength:"Description length",descriptionStructure:"Structure",numberOfPhotos:"Number of photos",photoQuality:"Photo quality",price:"Price competitiveness",extras:"Personalization question",noTags:"No tags yet",tagsUnscored:"Add tags to be scored",noData:"No data (not counted)",noDataInline:"no data",tagDemandChecking:b(1),maxReached:"Max reached",notScored:"not scored",extrasUnknown:"No personalization info yet"}),legend:Object.freeze({tagDemand:"Demand = sales performance of listings using the tag"}),price:Object.freeze({neutralNonUsd:"Neutral â price competitiveness is computed for USD listings only",neutralUnknownCategory:"Neutral â no category range available yet",neutralNoPrice:"Neutral â no price on this listing to compare yet"}),degraded:Object.freeze({tagDemand:"Demand data unavailable right now â not counted",priceBreakpoints:"Category price range unavailable right now â scored neutral"}),nudge:Object.freeze({priceTail:"Positioning info for your category â not a price recommendation.",personalization:"Add a personalization question (+".concat(i.SCORE_RUBRIC.extras.points,")"),personalizationAction:"Add a question"}),rubricPrefix:Object.freeze({notice:"Now scored:",tooltip:"How it's scored:"}),rubricTail:"â aligned with what top listings do.",notice:Object.freeze({headline:"We rebuilt the listing score around what top-selling listings actually do â your number changed, your listing didn't.",linkLabel:"Learn what it measures â",dismissLabel:"Dismiss listing score update"}),helpUrl:null}),y="+".concat(i.SCORE_RUBRIC.extras.points," when personalization has at least ").concat(p(i.SCORE_RUBRIC.extras.minQuestions,"question","questions")),v=Object.freeze({titleLength:Object.freeze({ladder:i.SCORE_RUBRIC.title.ladder,read:e=>e.titleLength}),tagCount:Object.freeze({ladder:i.SCORE_RUBRIC.tags.count.ladder,read:e=>e.tagCount}),tagDemand:Object.freeze({ladder:i.SCORE_RUBRIC.tags.demand.ladder,read:e=>e.tagDemandMedian}),descriptionLength:Object.freeze({ladder:i.SCORE_RUBRIC.description.length.ladder,read:e=>e.descriptionLength})}),R=Object.freeze({title:"titleLength",description:"descriptionLength"}),C=e=>e.reduce((e,t)=>
1Math.min(e,t.min),1/0),j=(e,t)=>{var n;let r=v[null!==(n=R[e])&&void 0!==n?n:e];if(!r||!t||"object"!=typeof t)return null;let i=d(r.read(t));return null===i?null:i>=C(r.ladder)?i:null};function O(e,t){var n;let r=null!==(n=R[e])&&void 0!==n?n:e,i=v[r];if(!i)return null;let a=j(r,t);if(null===a)return null;let{ladder:o}=i,l=-1;for(let e=0;e<o.length;e+=1)if(a>=o[e].min){l=e;break}if(l<=0)return null;let c=o[l-1].points-o[l].points;return!Number.isFinite(c)||c<=0?null:{gain:c,threshold:o[l-1].min}}let w=(e,t)=>"Next: +".concat(e.gain," at ").concat(c(e.threshold)).concat(t?" ".concat(t):""),S=(e,t,n,r)=>{if(null===j(t,n))return e;let i=O(t,n),a=i?w(i,r):x.rows.maxReached;return"".concat(e," \xb7 ").concat(a)},k=e=>{if(!e||"object"!=typeof e)return null;if(e.percentages&&"object"==typeof e.percentages)return e;let t=e.score;return t&&"object"==typeof t&&t.percentages&&"object"==typeof t.percentages?t:null},z=(e,t)=>{if(!e||"object"!=typeof e)return;let n=e[t];if(!n)return;if("string"==typeof n){let e=m(n);return e?{description:e}:void 0}if("object"!=typeof n)return;let r=m("string"==typeof n[t]?n[t]:n.description),i=m("string"==typeof n["".concat(t,"Issue")]?n["".concat(t,"Issue")]:n.issue);if(!r&&!i)return;let a={};return r&&(a.description=r),i&&(a.issue=i),a},M=Object.freeze({title:"duplicateWordsInTitle",tags:"duplicateTags",description:"tagsInDescription"}),D=(e,t,n)=>{let r=u(null==e?void 0:e[t]);return null===r?null:Math.round(r*n/100)},L=e=>{let{key:t,factor:n,label:i,points:a,max:o,detail:l,check:c,subItems:s,note:u,help:d,observed:p}=e,g=Number.isFinite(a),m={key:t,label:i,points:g?a:null,max:o,tone:g?(0,r.Et)(n,a,o,p):"neutral"};return g&&l&&(m.detail=l),g&&c&&(m.check=c),g&&s&&s.length&&(m.subItems=s),u&&(m.note=u),d&&(m.help=d),m},P=e=>{let t=[];if(e&&"object"==typeof e){let n=[],r=[];for(let t of Object.keys(e)){let i=m(t);if(null===i)continue;let a=u(e[t]);null===a?r.push(i):n.push({tag:i,value:a})}if(n.length){n.sort((e,t)=>e.value-t.value||e.tag.localeCompare(t.tag));let e=n.slice(0,4).map(e=>{let{tag:t,value:n}=e;return"".concat(t," ").concat(Math.round(n))}).join(" \xb7 ");t.push({text:"Lowest demand: ".concat(e," â swapping these moves the median first")})}if(r.length){r.sort((e,t)=>e.localeCompare(t));let e=r.slice(0,4),n=e.map(e=>"'".concat(e,"'")).join(", "),i=r.length-e.length;t.push({text:"".concat(x.rows.noData,": ").concat(n).concat(i>0?" +".concat(i," more"):""),tone:"muted"})}}return t.push({text:x.legend.tagDemand,tone:"muted"}),t},U=Object.freeze([Object.freeze(["p25","a quarter"]),Object.freeze(["p50","half"]),Object.freeze(["p75","three-quarters"])]),N=e=>{let t=[];return U.forEach(n=>{let[r,i]=n,a=e[r],o=t[t.length-1];o&&o.value===a?o.word=i:t.push({word:i,value:a})}),t},I=(e,t)=>N(e).map((e,n)=>{let{word:r,value:i}=e;return 0===n?"".concat(r," ").concat(t," ").concat(s(i)):"".concat(r," under ").concat(s(i))}).join(", "),B=(e,t)=>{var n,r,i;let a=null==e?void 0:e.priceBand;if(null==a)return{detail:void 0,neutral:!1};if("neutral"===a){let e="string"==typeof t.currency?t.currency.trim():"";return e&&"USD"!==e.toUpperCase()?{detail:x.price.neutralNonUsd,neutral:!0}:null!==f(t.breakpoints)&&null===h(t.price)?{detail:x.price.neutralNoPrice,neutral:!0}:(null===(r=t.degraded)||void 0===r?void 0:r.priceBreakpoints)?{detail:x.degraded.priceBreakpoints,neutral:!0}:{detail:x.price.neutralUnknownCategory,neutral:!0}}let o=f(t.breakpoints);if(null===o)return{detail:void 0,neutral:!1};let l=null!==(i=m(t.taxonomyName))&&void 0!==i?i:m(null===(n=t.breakpoints)||void 0===n?void 0:n.taxonomyName),c=l?"Price competitiveness in ".concat(l,":"):"Price competitiveness in your category:",u=I(o,"of listings are under"),d=h(t.price),p=null===d?"".concat(c," ").concat(u):"".concat(c," ").concat(u," â yours is ").concat(s(d));return{detail:"".concat(p,". ").concat(x.nudge.priceTail),neutral:!1}},E=e=>{if(!e||"object"!=typeof e)return;let t=e.personalizationQuestionCount;if(null==t)return x.rows.extrasUnknown;let n=d(t);return null===n?x.rows.extrasUnknown:n>=i.SCORE_RUBRIC.extras.minQuestions?"".concat(p(n,"question","questions")," \xb7 ").concat(x.rows.maxReached):"".concat(y," \xb7 Next: +").concat(i.SCORE_RUBRIC.extras.points)},_=e=>{if(!e||"object"!=typeof e)return;
1let t=d(e.descriptionLines);if(null===t)return;let{structure:n}=i.SCORE_RUBRIC.description,r=!0===e.descriptionHasList,a=[r?"list â":"no list yet",p(t,"line","lines")];return r?t<n.minLines?a.push("Next: +".concat(n.lineCountPoints," at ").concat(c(n.minLines)," lines")):a.push(x.rows.maxReached):a.push("Next: +".concat(n.listPoints," for a bulleted or numbered block")),a.join(" \xb7 ")},Q=(e,t)=>{var n;if(null===(n=t.degraded)||void 0===n?void 0:n.tagDemand)return x.degraded.tagDemand;if(!e||"object"!=typeof e)return;if(0===d(e.tagCount))return x.rows.tagsUnscored;let r=j("tagDemand",e),i=d(t.checkingCount),a=null!==i&&i>0?" \xb7 ".concat(b(i)):"";if(null===r)return"".concat(x.rows.noData).concat(a);let o="median demand ".concat(c(Math.round(r))," across your tags");return"".concat(S(o,"tagDemand",e)).concat(a)};function T(e,t){var n,r;let a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=k(e);if(!l)return[];let s=o&&"object"==typeof o?o:{},u=l.percentages,d=l.observed&&"object"==typeof l.observed?l.observed:null,g=e=>z(s.scoreDescription,e),m=e=>{var n;return L({...e,factor:t,observed:d,points:D(u,e.percentageKey,e.max),help:e.noHelp?void 0:g(null!==(n=e.helpKey)&&void 0!==n?n:e.percentageKey)})};switch(t){case"title":{let e=j("titleLength",d),t=null===e?void 0:!0===l.titleOverLimit?"".concat(p(e,"char","chars")," \xb7 over Etsy's ").concat(c(i.SCORE_RUBRIC.title.limit),"-character limit"):S(p(e,"char","chars"),"titleLength",d);a=[m({key:"titleLength",label:x.rows.titleLength,percentageKey:"titleLength",max:i.SCORE_RUBRIC.max.title,detail:t})];break}case"tags":{let e=j("tagCount",d),t=null===e?void 0:0===e?x.rows.noTags:S(p(e,"tag","tags"),"tagCount",d);a=[m({key:"tagCount",label:x.rows.tagCount,percentageKey:"numberOfTags",helpKey:"tagCount",max:i.SCORE_RUBRIC.tags.count.max,detail:t}),m({key:"tagDemand",label:x.rows.tagDemand,percentageKey:"tagDemand",max:i.SCORE_RUBRIC.tags.demand.max,detail:Q(d,s),subItems:0===e||(null===(n=s.degraded)||void 0===n?void 0:n.tagDemand)?[]:P(s.tagDemand)})];break}case"description":{let e=D(u,"descriptionStructure",i.SCORE_RUBRIC.description.structure.max),t=j("descriptionLength",d);a=[m({key:"descriptionLength",label:x.rows.descriptionLength,percentageKey:"descriptionLength",max:i.SCORE_RUBRIC.description.length.max,detail:null===t?void 0:S(p(t,"char","chars"),"descriptionLength",d)}),m({key:"descriptionStructure",label:x.rows.descriptionStructure,percentageKey:"descriptionStructure",max:i.SCORE_RUBRIC.description.structure.max,detail:_(d),check:null===e?void 0:e===i.SCORE_RUBRIC.description.structure.max?"pass":0===e?"fail":void 0})];break}case"images":a=[m({key:"numberOfPhotos",label:x.rows.numberOfPhotos,percentageKey:"numberOfPhotos",helpKey:"imageCount",max:100}),m({key:"photoQuality",label:x.rows.photoQuality,percentageKey:"photoQuality",helpKey:"lowQualityImages",max:100})];break;case"price":{let e=B(d,s);a=[m({key:"price",label:x.rows.price,percentageKey:"price",max:i.SCORE_RUBRIC.max.price,detail:e.detail,noHelp:e.neutral})];break}case"extras":{let e=D(u,"extras",i.SCORE_RUBRIC.max.extras);a=[m({key:"extras",label:x.rows.extras,percentageKey:"extras",max:i.SCORE_RUBRIC.max.extras,detail:E(d),check:null===e?void 0:e>0?"pass":"fail"})];break}default:return[]}let f=M[t];if(f&&a.length){let e=z(s.scoreDescription,f);((null==e?void 0:e.issue)||(null==e?void 0:e.description))&&(a[0].note=null!==(r=e.issue)&&void 0!==r?r:e.description)}return a}let q=()=>o.slice().sort((e,t)=>{var n,r;return(null!==(n=i.SCORE_RUBRIC.max[t])&&void 0!==n?n:0)-(null!==(r=i.SCORE_RUBRIC.max[e])&&void 0!==r?r:0)}),K=Object.freeze({p25:"lowest quarter",p50:"second quarter",p75:"third quarter",above:"top quarter"}),F=(e,t)=>{if(t&&"object"==typeof t)switch(e){case"title":{let e=j("titleLength",t);return null===e?void 0:p(e,"char","chars")}case"tags":{let e=j("tagDemand",t),n=j("tagCount",t);if(null!==e)return"median demand ".concat(c(Math.round(e)));return null===n?void 0:p(n,"tag","tags")}case"description":{let e=j("descriptionLength",t);return null===e?void 0:p(e,"char","chars")}case"price":{let e=t.priceBand;if("neutral"===e)return"Neutral";let n=K[e];return n?"".concat(n," of category prices"):void 0}case"extras":{let e=t.personalizationQuestionCount;if(null==e)return x.rows.extrasUnknown;let n=d(e);return null===n?x.rows.extrasUnknown:p(n,"question","questions")}default:return}};function A(e){let t=k(e);if(!t)return[];let n=t.observed&&"object"==typeof t.observed?t.observed:null;return q().map(e=>{let r=i.SCORE_RUBRIC.max[e],a=u(t[e]),o=null!==a?a:D(t.percentages,l[e],r);return L({key:e,factor:e,label:x.factors[e],points:o,max:r,observed:n,detail:F(e,n)})})}function Z(){var e;let{prefix:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null!==(e=m(t))&&void 0!==e?e:x.rubricPrefix.tooltip,r=q().map(e=>"".concat(x.factors[e]," ").concat(i.SCORE_RUBRIC.max[e])).join(" \xb7 ");return"".concat(n," ").concat(r," ").concat(x.rubricTail)}function H(e,t,n){var r;let i=f(e),a=h(t);if(null===i||null===a||a<=i.p75)return"";let o=null!==(r=m(n))&&void 0!==r?r:m(null==e?void 0:e.taxonomyName);return"Your price (".concat(s(a),") is above three-quarters of ").concat(o?"".concat(o," listings"):"listings in your category"," ")+"(".concat(I(i,"are under"),"). ").
1concat(x.nudge.priceTail)}let Y=Object.freeze(["title","tags","description","images","price","extras"]),W=e=>e>0?"+".concat(e):"".concat("â").concat(Math.abs(e)),V=e=>{if(!e||"object"!=typeof e)return"";let t=d(e.before),n=d(e.after);if("tagDemandMedian"===e.kind){let r,i;if(r=e.before,null===t&&null!==r||(i=e.after,null===n&&null!==i)||null===t&&null===n)return"";let a=e=>null===e?x.rows.noDataInline:c(Math.round(e));return"demand ".concat(a(t)," â ").concat(a(n))}if(null===t||null===n)return"";switch(e.kind){case"descriptionLength":{let r=!0===e.listAdded?", list added":"";return"".concat(c(t)," â ").concat(c(n)," chars").concat(r)}case"titleLength":return"".concat(c(t)," â ").concat(c(n)," chars");default:return""}};function G(e){if(!e||"object"!=typeof e)return{inline:"",tooltip:""};let t=[];if(Y.forEach(n=>{let r=e[n];if(!r||"object"!=typeof r)return;let i=u(r.delta);if(null===i){let e=u(r.before),t=u(r.after);i=null===e||null===t?null:t-e}null!==i&&0!==i&&t.push({factor:n,delta:i,driver:V(r.driver)})}),!t.length)return{inline:"",tooltip:""};t.sort((e,t)=>Math.abs(t.delta)-Math.abs(e.delta));let n=e=>"".concat(x.factors[e.factor]," ").concat(W(e.delta));return{inline:t.slice(0,2).map(n).join(" \xb7 "),tooltip:t.map(e=>e.driver?"".concat(n(e)," (").concat(e.driver,")"):n(e)).join(" \xb7 ")}}},74315:function(e,t,n){n.d(t,{Et:function(){return u},OD:function(){return a},fx:function(){return o},ky:function(){return l},lO:function(){return c}});var r=n(77543),i=n(59497);let a=Object.freeze({green:"bg-lv-success-pill text-lv-success-strong",amber:"bg-lv-warning-pill text-lv-warning-strong",red:"bg-lv-error-pill text-lv-error-strong",neutral:"bg-lv-elevated text-lv-text-secondary"}),o=Object.freeze({green:Object.freeze({bg:r.oR.successPillBg,text:r.oR.successStrong}),amber:Object.freeze({bg:r.oR.warningPillBg,text:r.oR.warningStrong}),red:Object.freeze({bg:r.oR.errorPillBg,text:r.oR.errorStrong}),neutral:Object.freeze({bg:r.oR.bgElevated,text:r.oR.textSecondary})}),l=Object.freeze({green:"success",amber:"warning",red:"error",neutral:"default"}),c=Object.freeze({green:"Strong",amber:"Fair",red:"Needs work",neutral:"Neutral"}),s=e=>"number"==typeof e||"string"==typeof e?Number(e):NaN,u=(e,t,n,r)=>{if("price"===e&&r&&"object"==typeof r&&"neutral"===r.priceBand)return"neutral";let a=s(t);return"extras"===e&&0===a?"neutral":(0,i.VY)(a/s(n)*100)}},59497:function(e,t,n){n.d(t,{SCORE_RUBRIC:function(){return a},VY:function(){return l},qE:function(){return f}});let r=e=>{if(e&&"object"==typeof e&&!Object.isFrozen(e))for(let t of(Object.freeze(e),Object.keys(e)))r(e[t]);return e},i=/^\s*([-*â¢â
âââªâ¦]|\d+[.)])\s+/,a=r({version:2,total:100,max:{title:15,tags:30,description:20,images:20,price:10,extras:5},title:{max:15,limit:140,overLimitPoints:12,ladder:[{min:110,points:15},{min:90,points:12},{min:70,points:7},{min:40,points:3},{min:0,points:0}]},tags:{max:30,count:{max:8,ladder:[{min:13,points:8},{min:10,points:6},{min:7,points:3},{min:0,points:0}]},demand:{max:22,ladder:[{min:85,points:22},{min:75,points:17},{min:65,points:11},{min:55,points:6},{min:0,points:0}]}},description:{max:20,length:{max:12,ladder:[{min:2e3,points:12},{min:1500,points:10},{min:1e3,points:8},{min:500,points:5},{min:250,points:2},{min:0,points:0}]},structure:{max:8,listPoints:4,lineCountPoints:4,minLines:12,listPattern:i.source}},price:{max:10,neutralPoints:5,bands:[{band:"p25",points:10},{band:"p50",points:7},{band:"p75",points:4},{band:"above",points:0}]},images:{max:20,highQualityMinWidth:2e3,pointsPerHighQualityImage:4,maxScoredHighQualityImages:
15,lowQualityPenaltyPerImage:2,maxLowQualityPenalty:6},extras:{max:5,points:5,minQuestions:1}}),o=Object.freeze({green:75,amber:60}),l=e=>{let t="number"==typeof e||"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t>=o.green?"green":t>=o.amber?"amber":"red":"red"},c=(e,t)=>{if(!Number.isFinite(t))return 0;for(let n=0;n<e.length;n+=1)if(t>=e[n].min)return e[n].points;return 0},s=(e,t)=>Math.max(0,Math.min(100,Math.round(e/t*100))),u=e=>{if(!e.length)return null;let t=e.slice().sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==1?t[n]:(t[n-1]+t[n])/2},d=e=>{if(null==e||"number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&""===e.trim())return null;let t=Number(e);return Number.isFinite(t)?t:null},p=e=>{if(!e||"object"!=typeof e)return null;let t=d(e.p25),n=d(e.p50),r=d(e.p75);return null===t||null===n||null===r||t<=0||n<=0||r<=0||t>n||n>r?null:{p25:t,p50:n,p75:r}},g=e=>{if(null==e)return!0;let t=String(e).trim();return""===t||"USD"===t.toUpperCase()},m=e=>"string"==typeof e?e.trim().toLowerCase():null,f=(e,t)=>{let n=t&&"object"==typeof t?t:{},r=void 0===n.sections?"full":n.sections,o=e&&"object"==typeof e?e:{},l=0,f={},h=0,b=!1,x=0,y="string"==typeof o.title?o.title:"";if(y.length>0){h=(b=(x=y.length)>a.title.limit)?a.title.overLimitPoints:c(a.title.ladder,x),f.titleLength=s(h,a.max.title);let e=y.replace(/[^a-zA-Z\s]/g,"").toLowerCase().split(/\s+/).reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{}),t=0;for(let n of Object.values(e))n>3&&(t+=3);f.duplicateWords=0===t?100:Math.max(0,100-10*t),f.title=f.titleLength}l+=h=Math.max(0,Math.min(h,a.max.title));let v=0,R=Array.isArray(o.images)?o.images:[],C=R.filter(e=>!!e&&e.full_width>=2e3).length;v+=4*Math.min(C,5),v-=Math.min(2*Math.max(0,R.length-C),6),l+=v=Math.max(0,Math.min(v,20)),f.numberOfPhotos=Math.min(Math.round(R.length/5*100),100),f.photoQuality=0===R.length?0:Math.round(C/R.length*100),f.photos=Math.round(v/a.max.images*100);let j="string"==typeof o.description?o.description:"",O=j.length,w=c(a.description.length.ladder,O),S=j.split(/\r?\n/),k=0,z=!1;for(let e=0;e<S.length;e+=1){let t=S[e];""!==t.trim()&&(k+=1),!z&&i.test(t)&&(z=!0)}let M=0;z&&(M+=a.description.structure.listPoints),k>=a.description.structure.minLines&&(M+=a.description.structure.lineCountPoints);let D=Array.isArray(o.tags)?o.tags:[],L=D.filter(e=>"string"==typeof e&&j.includes(e)).length,P=w+M;l+=P=Math.max(0,Math.min(P,a.max.description)),f.descriptionLength=s(w,a.description.length.max),f.descriptionStructure=s(M,a.description.structure.max),f.tagsInDescription=Math.min(Math.round(L/2*100),100),f.description=s(P,a.max.description);let U=D.length,N=c(a.tags.count.ladder,U),I=n.tagDemand&&"object"==typeof n.tagDemand?n.tagDemand:null,B=[];if(I)for(let e=0;e<D.length;e+=1){let t=m(D[e]);if(null===t||!Object.prototype.hasOwnProperty.call(I,t))continue;let n=d(I[t]);null!==n&&B.push(n)}let E=B.length,_=u(B),Q=null===_?0:c(a.tags.demand.ladder,_),T=D.reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{}),q=0;for(let e of Object.values(T))e>2&&(q+=3);let K=N+Q;l+=K=Math.max(0,Math.min(K,a.max.tags)),f.numberOfTags=s(N,a.tags.count.max),f.tagDemand=s(Q,a.tags.demand.max),f.tagQuality=0===q?100:Math.max(0,100-10*q),f.tags=s(K,a.max.tags);let F=a.price.neutralPoints,A="neutral",Z=p(n.priceBreakpoints),H=d(o.price);if(null!==Z&&null!==H&&H>0&&g(o.currency_code)){A=H<=Z.p25?"p25":H<=Z.p50?"p50":H<=Z.p75?"p75":"above";for(let e=0;e<a.price.bands.length;e+=1)if(a.price.bands[e].band===A){F=a.price.bands[e].points;break}}l+=F=Math.max(0,Math.min(F,a.max.price)),f.price=s(F,a.max.price);let Y=d(o.personalizationQuestionCount),W=o.is_personalizable&&null!==Y&&Y>=a.extras.minQuestions?a.extras.points:0;l+=W,f.extras=s(W,a.max.extras),f.overall=Math.round(l);let V=Math.round(l=Math.min(l,100));return"limited"===r?{count:V,titleOverLimit:b}:{count:V,title:Math.round(h),images:Math.round(v),description:Math.round(P),tags:Math.round(K),price:Math.round(F),extras:Math.round(W),percentages:f,observed:{titleLength:x,tagCount:U,tagDemandMedian:_,tagDemandMatched:E,descriptionLength:O,descriptionLines:k,descriptionHasList:z,priceBand:A,personalizationQuestionCount:Y},titleOverLimit:b}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.