1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6298],{4474:(e,t,s)=>{s.d(t,{$:()=>g});var r=s(76367),n=s(30694),i=s(22514),a=s(95155),o=s(98500),l=s.n(o),c=s(12115),u=s(91337);let g=(0,c.forwardRef)((e,t)=>{let[s,...o]=[e,t],{className:c="",variant:g="default",size:d="default",asChild:h,href:m,children:f,isLoading:p,disabled:v,withRipple:w=!1}=s,S=(0,i._)(s,["className","variant","size","asChild","href","children","isLoading","disabled","withRipple"]),[b]=o,y=(0,u.cn)("inline-flex items-center justify-center rounded-lg font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-95 whitespace-nowrap",{default:"bg-cyan-600 text-white hover:bg-cyan-700 focus-visible:ring-blue-500 shadow-sm hover:shadow-md",outline:"border-2 border-gray-300 bg-transparent text-gray-900 hover:bg-gray-100 dark:bg-gray-800 focus-visible:ring-gray-500",ghost:"bg-transparent text-gray-900 hover:bg-gray-100 dark:bg-gray-800 focus-visible:ring-gray-500",destructive:"bg-red-600 text-white hover:bg-red-700 focus-visible:ring-red-500 shadow-sm hover:shadow-md",success:"bg-green-600 text-white hover:bg-green-700 focus-visible:ring-green-500 shadow-sm hover:shadow-md",gradient:"bg-gradient-to-r from-cyan-600 to-blue-600 text-white hover:from-cyan-700 hover:to-blue-700 focus-visible:ring-blue-500 shadow-md hover:shadow-lg",glass:"glass-light text-gray-900 hover:bg-white/20 dark:bg-black/20 focus-visible:ring-blue-500 backdrop-blur-md"}[g],{default:"h-10 px-4 py-2 text-sm",sm:"h-8 rounded-md px-3 text-xs",lg:"h-12 rounded-lg px-8 text-base",icon:"h-10 w-10"}[d],w&&"ripple",c),k=p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),f]}):f;return m?(0,a.jsx)(l(),{href:m,className:y,"aria-disabled":v||p,children:k}):(0,a.jsx)("button",(0,n._)((0,r._)({className:y,ref:b,disabled:v||p,"aria-busy":p},S),{children:k}))});g.displayName="Button"},25336:(e,t,s)=>{s.d(t,{v:()=>n});class r{log(e,t,s){let r={level:e,message:t,timestamp:new Date,data:s};if(this.logs.push(r),this.logs.length>this.maxLogs&&this.logs.shift(),this.isDevelopment){let t=r.timestamp.toISOString();"[".concat(t,"] [").concat(e.toUpperCase(),"]")}}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}debug(e,t){this.log("debug",e,t)}getLogs(){return[...this.logs]}clearLogs(){this.logs=[]}constructor(){this.logs=[],this.maxLogs=100,this.isDevelopment=!1}}let n=new r},71399:(e,t,s)=>{s.d(t,{z:()=>m});var r=s(76367),n=s(30694),i=s(25336);let a=[{domain:"google",name:"Google"},{domain:"bing",name:"Bing"},{domain:"yahoo",name:"Yahoo"},{domain:"duckduckgo",name:"DuckDuckGo"},{domain:"baidu",name:"Baidu"},{domain:"yandex",name:"Yandex"},{domain:"ecosia",name:"Ecosia"}];function o(e){if(!e)return!1;try{let t=new URL(e).hostname.toLowerCase();return a.some(e=>t.includes(e.domain))}catch(e){return!1}}function l(e){try{let t=new URL(e);for(let e of["q","query","search","p","text"]){let s=t.searchParams.get(e);if(s)return s}}catch(e){}return null}let c="filemint_analytics",u="1.0.0";class g{loadStorage(){try{let t=localStorage.getItem(c);if(t){var e;let s=JSON.parse(t);if((null==(e=s.meta)?void 0:e.version)!==u)return this.migrateStorage(s);return s}}catch(e){i.v.error("Failed to load analytics storage:",e)}return this.getDefaultStorage()}getDefaultStorage(){return{events:[],sessions:[],preferences:{enabled:!0,shareAnonymous:!1},meta:{version:u,lastCleanup:Date.now()}}}migrateStorage(e){return(0,n._)((0,r._)({},e),{meta:(0,n._)((0,r._)({},e.meta),{version:u})})}saveStorage(){try{localStorage.setItem(c,JSON.stringify(this.storage))}catch(e){i.v.error("Failed to save analytics storage:",e)}}initSession(){let e=this.storage.sessions[this.storage.sessions.length-1],t=Date.now();if(e&&!e.endTime&&t-e.startTime<18e5)this.currentSessionId=e.id;else{this.currentSessionId=this.generateId();let e=function(e,t,s){let r=function(e){let t={};try{let s=new URL(e);["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach(e
1=>{let r=s.searchParams.get(e);r&&(t[e]=r)})}catch(e){}return t}(e),{source:n,medium:i}=function(e){if(!e)return{source:"direct",medium:"none"};try{let t=new URL(e).hostname.toLowerCase();if(o(e)){let t=function(e){if(!e)return null;try{let t=new URL(e).hostname.toLowerCase(),s=a.find(e=>t.includes(e.domain));return s?s.name:null}catch(e){return null}}(e);return{source:(null==t?void 0:t.toLowerCase())||"organic",medium:"organic"}}let s=["facebook","twitter","linkedin","instagram","pinterest","reddit","tiktok"];if(s.some(e=>t.includes(e)))return{source:s.find(e=>t.includes(e))||"social",medium:"social"};return{source:t.replace("www.",""),medium:"referral"}}catch(e){return{source:"direct",medium:"none"}}}(t),c=o(t),u=l(t)||l(e),g="/";try{g=new URL(e).pathname}catch(e){}return{referrer:t||null,source:r.utm_source||n,medium:r.utm_medium||i,campaign:r.utm_campaign||null,term:r.utm_term||u,content:r.utm_content||null,landingPage:g,isOrganicSearch:c,deviceType:s?(s.toLowerCase(),/(ipad|tablet|playbook|silk)|(android(?!.*mobile))/i.test(s))?"tablet":/mobile|android|iphone|ipod|blackberry|iemobile|opera mini/i.test(s)?"mobile":"desktop":void 0}}(window.location.href,document.referrer,navigator.userAgent),s={id:this.currentSessionId,startTime:t,pageViews:0,events:0,trafficSource:e,landingPage:e.landingPage};this.storage.sessions.push(s),this.saveStorage()}this.resetSessionTimeout()}resetSessionTimeout(){this.sessionTimer&&clearTimeout(this.sessionTimer),this.sessionTimer=setTimeout(()=>{this.endSession()},18e5)}endSession(){if(!this.currentSessionId)return;let e=this.storage.sessions.find(e=>e.id===this.currentSessionId);e&&(e.endTime=Date.now(),this.saveStorage()),this.currentSessionId=null}generateId(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}trackEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.storage.preferences.enabled)return;this.currentSessionId||this.initSession();let s=this.storage.sessions.find(e=>e.id===this.currentSessionId),r={id:this.generateId(),type:e,timestamp:Date.now(),sessionId:this.currentSessionId,data:t,url:window.location.href,userAgent:navigator.userAgent,trafficSource:null==s?void 0:s.trafficSource};this.storage.events.push(r),s&&(s.events++,"page_view"===e&&s.pageViews++),this.storage.events.length>1e3&&(this.storage.events=this.storage.events.slice(-1e3)),this.saveStorage(),this.resetSessionTimeout()}trackPageView(e,t){this.trackEvent("page_view",{path:e,title:t})}trackToolUsage(e,t,s){this.trackEvent("tool_use",(0,r._)({toolSlug:e,action:t},s))}trackError(e,t){let s="string"==typeof e?{message:e}:{message:e.message,stack:e.stack,name:e.name};this.trackEvent("error",(0,r._)({},s,t))}trackPerformance(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ms";this.trackEvent("performance_metric",{metric:e,value:t,unit:s})}getEvents(e){let t=[...this.storage.events];return e&&(t=t.filter(t=>Object.entries(e).every(e=>{let[s,r]=e;return t[s]===r}))),t}getSessions(){return[...this.storage.sessions]}getStatistics(){let e=this.storage.events,t=this.storage.sessions,s=new Map;e.filter(e=>"tool_view"===e.type||"tool_use"===e.type).forEach(e=>{let t=e.data.toolSlug||e.data.slug;t&&s.set(t,(s.get(t)||0)+1)});let n=Array.from(s.entries()).sort((e,t)=>t[1]-e[1]).slice(0,10).map(e=>{let[t,s]=e;return{slug:t,count:s}}),i=new Map;e.forEach(e=>{i.set(e.type,(i.get(e.type)||0)+1)});let a=t.filter(e=>e.endTime),o=a.length>0?a.reduce((e,t)=>e+(t.endTime-t.startTime),0)/a.length:0,l=new Map;t.forEach(e=>{if(!e.trafficSource)return;let t="".concat(e.trafficSource.source,"/").concat(e.trafficSource.medium),s=l.get(t)||{count:0,pageViews:0,bounces:0,avgDuration:0};s.count++,s.pageViews+=e.pageViews,1===e.pageViews&&s.bounces++,e.endTime&&(s.avgDuration+=e.endTime-e.startTime),l.set(t,s)});let c=Array.from(l.entries()).map(e=>{let[s,r]=e,n=r.count>0?r.avgDuration/r.count:0,i=r.count>0?r.bounces/r.count*100:0,a=t.length>0?r.count/t.length*100:0;return{source:s,sessions:r.count,pageViews:r.pageViews,bounceRate:i,avgDuration:n,percentage:a}}).sort((e,t)=>
1t.sessions-e.sessions),u=new Map;t.forEach(e=>{let t=e.landingPage||"/",s=u.get(t)||{count:0,bounces:0,sources:new Set};s.count++,1===e.pageViews&&s.bounces++,e.trafficSource&&s.sources.add("".concat(e.trafficSource.source,"/").concat(e.trafficSource.medium)),u.set(t,s)});let g=Array.from(u.entries()).map(e=>{let[t,s]=e;return{page:t,sessions:s.count,bounceRate:s.count>0?s.bounces/s.count*100:0,sources:Array.from(s.sources)}}).sort((e,t)=>t.sessions-e.sessions).slice(0,10),d=t.filter(e=>{var t;return null==(t=e.trafficSource)?void 0:t.isOrganicSearch}),h=d.reduce((e,t)=>e+t.pageViews,0),m=d.filter(e=>1===e.pageViews).length,f=d.length>0?m/d.length*100:0,p=new Map;t.forEach(t=>{if(!t.trafficSource)return;let s="".concat(t.trafficSource.source,"/").concat(t.trafficSource.medium),r=p.get(s)||{sessions:0,conversions:0,conversionRate:0};r.sessions++,e.filter(e=>e.sessionId===t.id).some(e=>"tool_use"===e.type)&&r.conversions++,r.conversionRate=r.conversions/r.sessions*100,p.set(s,r)});let v=Array.from(p.entries()).map(e=>{let[t,s]=e;return(0,r._)({source:t},s)}).sort((e,t)=>t.conversionRate-e.conversionRate),w=new Map;t.forEach(e=>{var t;let s=(null==(t=e.trafficSource)?void 0:t.deviceType)||"unknown",r=w.get(s)||{sessions:0,pageViews:0,bounces:0};r.sessions++,r.pageViews+=e.pageViews,1===e.pageViews&&r.bounces++,w.set(s,r)});let S=Array.from(w.entries()).map(e=>{let[s,r]=e;return{device:s,sessions:r.sessions,pageViews:r.pageViews,bounceRate:r.sessions>0?r.bounces/r.sessions*100:0,percentage:t.length>0?r.sessions/t.length*100:0}}).sort((e,t)=>t.sessions-e.sessions);return{totalEvents:e.length,totalSessions:t.length,mostUsedTools:n,eventTypes:Array.from(i.entries()).map(e=>{let[t,s]=e;return{type:t,count:s}}),avgSessionDuration:o,toolUsage:Array.from(s.entries()).map(e=>{let[t,s]=e;return{slug:t,count:s}}),trafficSources:c,landingPages:g,organicSearch:{sessions:d.length,pageViews:h,bounceRate:f,percentage:t.length>0?d.length/t.length*100:0},conversions:v,devices:S}}getPreferences(){return(0,r._)({},this.storage.preferences)}updatePreferences(e){this.storage.preferences=(0,r._)({},this.storage.preferences,e),this.saveStorage()}exportData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json",t=arguments.length>1?arguments[1]:void 0,s=this.storage.events,r=this.storage.sessions;if((null==t?void 0:t.startDate)&&(s=s.filter(e=>e.timestamp>=t.startDate),r=r.filter(e=>e.startTime>=t.startDate)),(null==t?void 0:t.endDate)&&(s=s.filter(e=>e.timestamp<=t.endDate),r=r.filter(e=>e.startTime<=t.endDate)),null==t?void 0:t.filterBySource){let e=t.filterBySource.toLowerCase(),n=new Set((r=r.filter(t=>{var s,r,n,i;return(null==(r=t.trafficSource)||null==(s=r.source)?void 0:s.toLowerCase().includes(e))||(null==(i=t.trafficSource)||null==(n=i.medium)?void 0:n.toLowerCase().includes(e))})).map(e=>e.id));s=s.filter(e=>n.has(e.sessionId))}if("json"===e){let e={events:s,sessions:r,exportDate:new Date().toISOString(),filters:t};return(null==t?void 0:t.includeTrafficSources)&&(e.statistics=this.getStatistics()),JSON.stringify(e,null,2)}return["timestamp,type,sessionId,url,source,medium,campaign,landingPage,data",...s.map(e=>{var t,s,r,n;return[new Date(e.timestamp).toISOString(),e.type,e.sessionId,e.url||"",(null==(t=e.trafficSource)?void 0:t.source)||"",(null==(s=e.trafficSource)?void 0:s.medium)||"",(null==(r=e.trafficSource)?void 0:r.campaign)||"",(null==(n=e.trafficSource)?void 0:n.landingPage)||"",JSON.stringify(e.data)]}).map(e=>e.map(e=>'"'.concat(e,'"')).join(","))].join("\n")}clearAll(){this.storage=this.getDefaultStorage(),this.currentSessionId=null,this.saveStorage()}scheduleCleanup(){Date.now()-this.storage.meta.lastCleanup>864e5&&this.cleanup(),setTimeout(()=>{this.cleanup(),this.scheduleCleanup()},864e5)}cleanup(){this.storage.sessions.length>50&&(this.storage.sessions=this.storage.sessions.slice(-50)),this.storage.events.length>1e3&&(this.storage.events=this.storage.events.slice(-1e3)),this.storage.meta.lastCleanup=Date.now(),this.saveStorage()}constructor(){this.currentSessionId=null,this.sessionTimer=null,this.storage=this.loadStorage(),this.initSession(),this.scheduleCleanup()}}let d=null;function h(){return d||(d=new g),d}let m={track:(e,t)=>h().trackEvent(e,t),trackPageView:(e,t)=>h().trackPageView(e,t),trackToolUsage:(e,t,s)=>
1h().trackToolUsage(e,t,s),trackError:(e,t)=>h().trackError(e,t),trackPerformance:(e,t,s)=>h().trackPerformance(e,t,s),getEvents:e=>h().getEvents(e),getSessions:()=>h().getSessions(),getStatistics:()=>h().getStatistics(),getPreferences:()=>h().getPreferences(),updatePreferences:e=>h().updatePreferences(e),exportData:e=>h().exportData(e),clearAll:()=>h().clearAll()}},91337:(e,t,s)=>{s.d(t,{cn:()=>i}),s(25336);var r=s(29722),n=s(622);function i(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,n.QP)((0,r.$)(t))}}}]);
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.